svg.escobar.life

A simple SVG markup editor for the web

Types.elm (584B)

 1 module Types exposing (..)
 2 
 3 import Http
 4 import File exposing (File)
 5 import Regex exposing (Regex)
 6 
 7 type alias Model =
 8   { image : String
 9   , status : Status
10   , darkModeOn : Bool
11   , uriEncoder : Regex
12   , fileName : String
13   , editorScroll : (Int, Int)
14   , load : Load
15   }
16 
17 type Status
18   = Valid
19   | Invalid
20 
21 type Load
22   = Loading
23   | Loaded
24 
25 type Upload
26   = Requested
27   | Selected File
28 
29 type Msg
30   = Update String
31   | Load (Result Http.Error String)
32   | Validation Status
33   | ToggleDarkMode
34   | Download
35   | Upload Upload
36   | Scroll (Int, Int)
37