git.iko.soy/rowtype-yoga/psfp
on master help sign in
Move fill in the gaps component to components
969116cMark Eibes
blog/.psc-ide-portdeleted−1
@@ -1 +0,0 @@
1−15408
blog/src/components/FillInTheGaps.purs+1−1
@@ -204,7 +204,7 @@ mkFillInTheGaps fetch = do
204 guard (isJust item)
204 guard (isJust item)
205 $ join item
205 $ join item
206 # foldMap \_ ->
206 # foldMap \_ ->
207− [element clickAway (justifill { style: props, onClick: modifyResult (const Nothing) })]
207+ [element clickAway (justifill { allowEscape: true, style: props, onClick: modifyResult (const Nothing) })]
208 , fragment
208 , fragment
209 $ modalTransitions
209 $ modalTransitions
210 >>= \{ item, key, props } ->
210 >>= \{ item, key, props } ->
components/src/React/Basic/Hooks/Spring/Stories.purs+23−14
@@ -1,8 +1,12 @@
1module React.Basic.Hooks.Spring.Stories where
1module React.Basic.Hooks.Spring.Stories where
2
2
3import Prelude hiding (add)
3import Prelude hiding (add)
4+import Data.Function.Uncurried (mkFn2)
5+import Data.Int (pow)
4−import Data.Maybe (Maybe(..))
6+import Data.Maybe (Maybe(..), isJust)
7+import Data.Monoid (guard)
5import Data.Tuple.Nested ((/\))
8import Data.Tuple.Nested ((/\))
9+import Debug.Trace (spy)
6import Effect (Effect)
10import Effect (Effect)
7import Effect.Unsafe (unsafePerformEffect)
11import Effect.Unsafe (unsafePerformEffect)
8import JSS (jssClasses)
12import JSS (jssClasses)
@@ -20,6 +24,7 @@ import Yoga.Button.Component (mkButton)
20import Yoga.Card.Component (mkCard)
24import Yoga.Card.Component (mkCard)
21import Yoga.Centre.Component as Centre
25import Yoga.Centre.Component as Centre
22import Yoga.Cluster.Component as Cluster
26import Yoga.Cluster.Component as Cluster
27+import Yoga.Helpers ((?||))
23import Yoga.Spec.Helpers (withDarkTheme)
28import Yoga.Spec.Helpers (withDarkTheme)
24import Yoga.Stack.Component as Stack
29import Yoga.Stack.Component as Stack
25import Yoga.Theme.Styles (makeStylesJSS)
30import Yoga.Theme.Styles (makeStylesJSS)
@@ -92,24 +97,28 @@ mkTransition = do
92 { from: { opacity: 0.0, transform: "translate3d(-50vw, 0px, 0.0) scale3d(0.2, 0.2, 0.2)", position: "absolute" }
97 { from: { opacity: 0.0, transform: "translate3d(-50vw, 0px, 0.0) scale3d(0.2, 0.2, 0.2)", position: "absolute" }
93 , enter: { opacity: 1.0, transform: "translate3d(0.0, 0px, 0.0) scale3d(1.0,1.0,1.0)" }
98 , enter: { opacity: 1.0, transform: "translate3d(0.0, 0px, 0.0) scale3d(1.0,1.0,1.0)" }
94 , leave: { opacity: 0.0, transform: "translate3d(50vw, 0px, 0.0) scale3d(0.0, 0.0, 1.0)" }
99 , leave: { opacity: 0.0, transform: "translate3d(50vw, 0px, 0.0) scale3d(0.0, 0.0, 1.0)" }
95− , config: { mass: 5, tension: 500, friction: 100 }
100+ , config: { mass: 1, tension: 100, friction: 12, clamp: true, easing: pow 2 }
101+ , unique: true
96 }
102 }
97 pure
103 pure
98 $ fragment
104 $ fragment
99 $ ( transitions
105 $ ( transitions
100 <#> \{ item, key, props } ->
106 <#> \{ item, key, props } ->
107+ guard (item # isJust)
101− if item == Just true then
108+ $ if item == Just true then
102− animatedDiv
109+ animatedDiv
103− { className: classes.div
110+ { className: classes.div
104− , style: props
111+ , style: props
112+ , key: "you"
105− , children: [ jsx card {} [ R.text "hello, you" ] ]
113+ , children: [ jsx card {} [ R.text "hello, you" ] ]
106− }
114+ }
107− else
115+ else
108− animatedDiv
116+ animatedDiv
109− { className: classes.div
117+ { className: classes.div
110− , style: props
118+ , style: props
119+ , key: "again"
111− , children: [ jsx card {} [ R.text "hello, again" ] ]
120+ , children: [ jsx card {} [ R.text "hello, again" ] ]
112− }
121+ }
113 )
122 )
114 <> [ jsx button { onClick: handler_ (modifyToggled not) } [ R.text "Toggle" ] ]
123 <> [ jsx button { onClick: handler_ (modifyToggled not) } [ R.text "Toggle" ] ]
115
124
components/src/Yoga/Button/Component.purs+103−74
@@ -1,9 +1,10 @@
1module Yoga.Button.Component where
1module Yoga.Button.Component where
2
2
3import Prelude
3import Prelude
4−import CSS (Color, angular, black, cssStringRGBA, deg, desaturate, pct, saturate)
4+import CSS (Color, ColorSpace(..), angular, black, cssStringRGBA, deg, desaturate, pct, saturate)
5import CSS as C
5import CSS as C
6import CSS as Color
6import CSS as Color
7+import Color (mixCubehelix)
7import Color.Scheme.Clrs (blue)
8import Color.Scheme.Clrs (blue)
8import Data.Array.NonEmpty as NEA
9import Data.Array.NonEmpty as NEA
9import Data.Foldable (intercalate)
10import Data.Foldable (intercalate)
@@ -42,20 +43,53 @@ highlightStyles =
42 { highlightedButton:
43 { highlightedButton:
43 { background:
44 { background:
44 linearGradient
45 linearGradient
45− "135deg"
46+ "180deg"
46− [ withAlpha (if theme.isLight then 0.15 else 0.07) theme.backgroundColourDarker
47+ [ withAlpha (if theme.isLight then 0.2 else 0.2) (Color.lighten 0.5 theme.highlightColour)
47− , withAlpha (if theme.isLight then 0.15 else 0.07) theme.backgroundColourLighter
48+ , withAlpha (if theme.isLight then 0.15 else 0.4) (Color.darken 0.5 theme.highlightColour)
48 ]
49 ]
50+ <> " ,"
51+ <> linearGradient
52+ "225deg"
53+ [ theme.highlightColourRotatedBackwards
54+ , theme.highlightColourRotatedForwards
55+ ]
56+ , color: Color.cssStringRGBA theme.backgroundColour <> " !important"
57+ , boxShadow:
58+ "0 var(--s-5) var(--s-2)" <> (Color.cssStringRGBA $ withAlpha 0.2 Color.black)
59+ , backgroundClip: "border-box"
60+ , "-webkit-background-clip": "border-box"
61+ , textFillColor: theme.backgroundColour
62+ , "-webkit-text-fill-color": theme.backgroundColour
63+ , "&:active":
64+ { boxShadow:
65+ i "inset var(--s-3) var(--s-3) var(--s-3) "
66+ (cssStringRGBA $ Color.darken 0.5 theme.backgroundColourDarker)
67+ ", inset calc(-1 * var(--s-3)) calc(-1 * -var(--s-3)) var(--s-3) "
68+ (cssStringRGBA $ Color.darken 0.2 theme.backgroundColourDarkest) ∷
69+ String
70+ , color: Color.darken 0.05 theme.backgroundColour
49− , color: theme.backgroundColour
71+ , textFillColor: Color.darken 0.05 theme.backgroundColour
72+ , background:
73+ linearGradient
74+ "0deg"
75+ [ withAlpha (if theme.isLight then 0.2 else 0.2) (Color.darken 0.1 theme.highlightColour)
76+ , withAlpha (if theme.isLight then 0.15 else 0.4) (Color.darken 0.8 theme.highlightColour)
77+ ]
78+ <> " ,"
79+ <> linearGradient
80+ "225deg"
81+ [ theme.highlightColourRotatedBackwards
82+ , theme.highlightColourRotatedForwards
83+ ]
84+ }
50 }
85 }
51 }
86 }
52
87
53styles ∷
88styles ∷
54 JSSClasses YogaTheme {}
89 JSSClasses YogaTheme {}
55− ( "@keyframes gradientBG" ∷ JSSElem StyleProps
56− , btn ∷ JSSElem StyleProps
57− , buttonContainer ∷ JSSElem StyleProps
90+ ( btn ∷ JSSElem StyleProps
58 , disabled ∷ JSSElem StyleProps
91 , disabled ∷ JSSElem StyleProps
92+ , container ∷ JSSElem StyleProps
59 )
93 )
60styles =
94styles =
61 jssClasses
95 jssClasses
@@ -69,95 +103,90 @@ styles =
69
103
70 less amount x = if Color.isLight x then darken amount x else lighten amount x
104 less amount x = if Color.isLight x then darken amount x else lighten amount x
71 in
105 in
72− { buttonContainer:
106+ { container:
73− { padding: "var(--s-4)"
107+ \props ->
108+ { borderRadius: "var(--s1)"
74− , background:
109+ , "-webkit-background-clip": "border-box"
110+ , backgroundClip: "border-box"
111+ , background:
75− linearGradient "225deg"
112+ linearGradient (if theme.isLight then "180deg" else "0deg")
76− [ theme.highlightColourRotatedBackwards
113+ [ more 0.02 $ Color.mix HSL theme.backgroundColour theme.highlightColourRotatedBackwards 0.05 # (flip (Color.mix HSL theme.highlightColourRotatedForwards) (if theme.isLight then 0.94 else 0.85))
77− , theme.highlightColourRotatedForwards
114+ , less 0.03 $ Color.mix HSL theme.backgroundColour theme.highlightColourRotatedForwards 0.05 # (flip (Color.mix HSL theme.highlightColourRotatedBackwards) (if theme.isLight then 0.84 else 0.70))
78− ]
115+ ]
79− , borderRadius: "var(--s1)"
116+ , display: "inline-block"
80− , height: "calc(var(--s1) - var(--s1-3))"
81− , minWidth: "var(--s2)"
82− , boxSizing: "border-box"
83− , boxShadow:
84− ( cssStringRGBA (Color.rgba 0 0 0 0.15)
85− )
86− <> " 0 var(--s-5) var(--s-5) var(--s-5)"
87− }
88− , "@keyframes gradientBG":
89− { "0%": { backgroundPosition: "0% 50%" }
90− , "50%": { backgroundPosition: "100% 50%" }
91− , "100%": { backgroundPosition: "0% 50%" }
92− }
117+ }
93 , btn:
118 , btn:
94− { width: "calc(100%)"
95− , background:
119+ { background:
96− linearGradient "80deg"
120+ linearGradient "127deg"
97− [ less 0.03 theme.backgroundColour
121+ [ theme.highlightColourRotatedBackwards # Color.rotateHue (-10.0)
98− , less 0.05 theme.backgroundColour
122+ , theme.highlightColourRotatedForwards # Color.rotateHue (10.0)
99 ]
123 ]
100− , color:
124+ , boxShadow:
101− let
125+ "0 var(--s-5) var(--s-2)" <> (Color.cssStringRGBA $ withAlpha 0.1 Color.black)
102− c = theme.highlightColour
126+ , padding: "calc(var(--s0) - var(--s-4)) var(--s1) calc(var(--s0) - var(--s-5)) var(--s1)"
103− in
127+ , backgroundClip: "text"
104− if Color.isLight c then Color.rotateHue (-10.0) c else Color.lighten 0.2 c
128+ , "-webkit-background-clip": "text"
129+ , textFillColor: "transparent"
130+ , "-webkit-text-fill-color": "transparent"
105 , borderRadius: "var(--s1)"
131 , borderRadius: "var(--s1)"
106 , border: "0"
132 , border: "0"
107− , height: "calc(var(--s2))"
133+ -- , height: "calc(var(--s2) + var(--s-2))"
108− , fontSize: "calc(var(--s-1))"
134+ , fontSize: "calc(var(--s-2) + var(--s-3))"
109 , fontFamily: NEA.head theme.textFontFamily
135 , fontFamily: NEA.head theme.textFontFamily
110− , fontWeight: "600"
136+ , fontWeight: "500"
111− , padding: "0 var(--s0) 0 var(--s0)"
112− , letterSpacing: "var(--s-5)"
137+ , letterSpacing: "var(--s-4)"
113 , textTransform: "uppercase"
138 , textTransform: "uppercase"
114 , outline: "none"
139 , outline: "none"
115 , "&:focus":
140 , "&:focus":
116 { boxShadow:
141 { boxShadow:
117− ( i "var(--s-4) 0 var(--s-2)"
142+ i "var(--s-4) 0 var(--s-2)"
118− (cssStringRGBA theme.highlightColourRotatedForwards)
143+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedForwards)
119− ", calc(-1 * var(--s-4)) 0 var(--s-2)"
144+ ", calc(-1 * var(--s-4)) 0 var(--s-2)"
120− (cssStringRGBA theme.highlightColourRotatedForwards)
145+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedForwards)
121− ", 0 calc(-1 * var(--s-4)) var(--s-2)"
146+ ", 0 calc(-1 * var(--s-4)) var(--s-2)"
122− (cssStringRGBA theme.highlightColourRotatedBackwards)
147+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedBackwards)
123− ", 0 var(--s-4) var(--s-2)"
148+ ", 0 var(--s-4) var(--s-2)"
124− (cssStringRGBA theme.highlightColourRotatedBackwards)
149+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedBackwards) ∷
125− ) ∷
126 String
150 String
127 }
151 }
128 , "&:active":
152 , "&:active":
129 { boxShadow:
153 { boxShadow:
130− ( i "inset var(--s-3) var(--s-3) var(--s-3) "
154+ i "inset var(--s-3) var(--s-3) var(--s-3) "
131− (cssStringRGBA $ darken 0.3 theme.backgroundColourDarker)
155+ (cssStringRGBA $ darken 0.5 theme.backgroundColourDarker)
132− ", inset calc(-1 * var(--s-3)) calc(-1 * -var(--s-3)) var(--s-3) "
156+ ", inset calc(-1 * var(--s-3)) calc(-1 * -var(--s-3)) var(--s-3) "
133− (cssStringRGBA theme.backgroundColourDarkest)
157+ (cssStringRGBA $ darken 0.2 theme.backgroundColourDarkest)
134− ) ∷
158+ ", var(--s-4) 0 var(--s-2)"
159+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedForwards)
160+ ", calc(-1 * var(--s-4)) 0 var(--s-2)"
161+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedForwards)
162+ ", 0 calc(-1 * var(--s-4)) var(--s-2)"
163+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedBackwards)
164+ ", 0 var(--s-4) var(--s-2)"
165+ (cssStringRGBA $ withAlpha 0.5 theme.highlightColourRotatedBackwards) ∷
135 String
166 String
136 , background:
167 , background:
137− linearGradient
168+ linearGradient (if theme.isLight then "0deg" else "180deg")
138− "135deg"
169+ [ less 0.04 $ withAlpha 0.92 theme.backgroundColour
139− [ withAlpha (if theme.isLight then 0.15 else 0.07) theme.backgroundColourLighter
170+ , less 0.09 $ withAlpha 0.92 theme.backgroundColour
140− , withAlpha (if theme.isLight then 0.15 else 0.07) theme.backgroundColourDarker
141 ]
171 ]
142− <> ","
172+ , color: more 0.02 theme.highlightColour
143− <> linearGradient
173+ , textFillColor: more 0.02 theme.highlightColour
144− "180deg"
145− [ Color.rgba 0 0 10 0.17
146− , Color.rgba 0 0 10 0.03
147− , Color.rgba 0 0 10 0.067
148− ]
149− , color: theme.backgroundColour
150 }
174 }
151 , "&:disabled":
175 , "&:disabled":
152− { boxShadow: "0 0 0 black"
176+ { boxShadow: "none"
153− , background: less 0.1 theme.backgroundColour
177+ , backgroundClip: "border-box"
178+ , "-webkit-background-clip": "border-box"
179+ , textFillColor: "initial"
180+ , "-webkit-text-fill-color": "initial"
181+ , background: "transparent"
154 , color: less 0.2 theme.backgroundColour
182 , color: less 0.2 theme.backgroundColour
155 }
183 }
156 }
184 }
157 , "disabled":
185 , "disabled":
158 { background:
186 { background:
159− (cssStringRGBA $ less 0.1 theme.backgroundColour)
187+ (cssStringRGBA $ withAlpha 0.5 $ less 0.1 theme.backgroundColour)
160 <> " !important"
188 <> " !important"
189+ , boxShadow: "none !important"
161 }
190 }
162 }
191 }
163
192
@@ -181,7 +210,7 @@ mkButton = do
181 className = props.className ?|| ""
210 className = props.className ?|| ""
182 pure
211 pure
183 $ R.div
212 $ R.div
184− { className: classes.buttonContainer <> " " <> if buttonType == DisabledButton then classes.disabled else ""
213+ { className: classes.container <> " " <> if buttonType == DisabledButton then classes.disabled else ""
185 , children:
214 , children:
186 [ R.button
215 [ R.button
187 $ { className:
216 $ { className:
components/src/Yoga/Card/Component.purs+27−50
@@ -1,7 +1,7 @@
1module Yoga.Card.Component where
1module Yoga.Card.Component where
2
2
3import Prelude
3import Prelude
4−import CSS (angular, deg, linearGradient, pct)
4+import CSS (BackgroundImage, angular, deg, linearGradient, pct)
5import Color (cssStringRGBA)
5import Color (cssStringRGBA)
6import Color as Color
6import Color as Color
7import Data.Interpolate (i)
7import Data.Interpolate (i)
@@ -13,76 +13,53 @@ import React.Basic (JSX)
13import React.Basic.Helpers (jsx)
13import React.Basic.Helpers (jsx)
14import React.Basic.Hooks (ReactComponent, component)
14import React.Basic.Hooks (ReactComponent, component)
15import React.Basic.Hooks as React
15import React.Basic.Hooks as React
16+import Record.Extra (pick)
16import Yoga.Box.Component as Box
17import Yoga.Box.Component as Box
17−import Yoga.Helpers ((?||))
18+import Yoga.Helpers (ifJustTrue, (?||))
19+import Yoga.Theme (withAlpha)
18import Yoga.Theme.Styles (makeStylesJSS)
20import Yoga.Theme.Styles (makeStylesJSS)
19import Yoga.Theme.Types (CSSTheme, YogaTheme)
21import Yoga.Theme.Types (CSSTheme, YogaTheme)
20
22
21type StyleProps
23type StyleProps
22− = {}
24+ = ( zoomOnHover ∷ Maybe Boolean )
23
25
24−styles ∷ JSSClasses YogaTheme StyleProps ( card ∷ JSSElem StyleProps )
26+styles ∷ JSSClasses YogaTheme { | StyleProps } ( card ∷ JSSElem { | StyleProps } )
25styles =
27styles =
26 jssClasses \(theme ∷ CSSTheme) ->
28 jssClasses \(theme ∷ CSSTheme) ->
27− let
28− lighten x = Color.lighten if theme.isLight then (0.5 * x) else 1.7 * x
29−
30− darken x = Color.darken if theme.isLight then 1.0 * x else (1.2 * x)
31−
32− normal =
33− if theme.isLight then
34− darken 0.03 $ theme.backgroundColour
35− else
36− lighten 0.015 theme.backgroundColour
37−
38− dark =
39− if theme.isLight then
40− darken 0.03 normal
41− else
42− darken 0.05 normal
43−
44− light =
45− if theme.isLight then
46− lighten 0.10 normal
47− else
48− lighten 0.05 normal
49− in
50− { card:
29+ { card:
30+ \props ->
51− { borderRadius: "var(--s1)"
31+ { borderRadius: "var(--s-2)"
52 , boxShadow:
32 , boxShadow:
53 i -- bottom right
33 i -- bottom right
54− "var(--s-2) var(--s-2) var(--s-1) "
34+ "var(--s-5) var(--s-3) var(--s-3) "
55− (cssStringRGBA dark)
35+ (cssStringRGBA $ withAlpha 0.13 Color.black)
56− --bottom left
57− ", calc(-1 * var(--s-2)) var(--s-2) var(--s-1) "
58− (cssStringRGBA normal)
59− --top left
60− ", calc(-1 * var(--s-2)) calc(-1 * var(--s-2)) var(--s-1) "
36+ ", calc(var(--s-5) * -1) calc(-1 * var(--s-5)) var(--s-2) "
61− (cssStringRGBA light)
37+ (cssStringRGBA $ withAlpha 0.1 Color.black) ∷
62− --top right
63− ", var(--s-2) calc(-1 * var(--s-2)) var(--s-1) "
64− (cssStringRGBA normal) ∷
65 String
38 String
66− , background:
39+ , transform: ifJustTrue props.zoomOnHover $ "scale3d(0.9, 0.9, 1.0)"
67− linearGradient (angular (-45.0 # deg))
40+ , transition: "transform 0.2s ease-in-out"
68− [ dark /\ (0.0 # pct)
41+ , "&:hover":
69− , light /\ (100.0 # pct)
42+ { transform: "scale3d(1.0, 1.0, 1.0)"
70− ]
43+ }
71 }
44 }
72− }
45+ }
46+
47+type Props r
48+ = ( kids ∷ Array JSX
49+ , className ∷ Maybe String
50+ | r
51+ )
73
52
74mkCard ∷
53mkCard ∷
75 Effect
54 Effect
76 ( ReactComponent
55 ( ReactComponent
77− { kids ∷ Array JSX
56+ { | Props (StyleProps) }
78− , className ∷ Maybe String
79− }
80 )
57 )
81mkCard = do
58mkCard = do
82 useStyles <- makeStylesJSS styles
59 useStyles <- makeStylesJSS styles
83 box <- Box.makeComponent
60 box <- Box.makeComponent
84 component "Card" \props@{ kids, className } -> React.do
61 component "Card" \props@{ kids, className } -> React.do
85− classes <- useStyles {}
62+ classes <- useStyles (pick props)
86 pure
63 pure
87 $ jsx box
64 $ jsx box
88 { className: classes.card <> " " <> (className ?|| "")
65 { className: classes.card <> " " <> (className ?|| "")
components/src/Yoga/Compiler.pursnew file+1
@@ -0,0 +1 @@
1+module Yoga.Compiler where
components/src/Yoga/Compiler/Api.pursnew file+53
@@ -0,0 +1,53 @@
1+module Yoga.Compiler.Api where
2+
3+import Prelude
4+import Data.Either (Either(..))
5+import Data.Maybe (Maybe(..))
6+import Effect.Aff (Aff, attempt, error, message, throwError)
7+import Milkis as M
8+import Shared.Json (readAff)
9+import Shared.Models.Body as Body
10+import Simple.JSON (writeJSON)
11+import Yoga.Compiler.Types (Compiler)
12+
13+apiCompiler ∷ M.Fetch -> { | Compiler () }
14+apiCompiler fetch =
15+ { compileAndRun
16+ }
17+ where
18+ compileAndRun ∷ Body.CompileRequest -> Aff (Either Body.CompileResult Body.RunResult)
19+ compileAndRun body = do
20+ response <-
21+ attempt
22+ $ fetch (M.URL "/api/compileAndRun")
23+ { method: M.postMethod
24+ , body: writeJSON body
25+ , headers: M.makeHeaders { "Content-Type": "application/json" }
26+ }
27+ case response of
28+ Left l ->
29+ pure
30+ ( Left
31+ { resultType: ""
32+ , result:
33+ [ { allSpans: []
34+ , errorCode: ""
35+ , errorLink: ""
36+ , filename: ""
37+ , message: message l
38+ , moduleName: Nothing
39+ , position:
40+ { endColumn: 0
41+ , endLine: 0
42+ , startColumn: 0
43+ , startLine: 0
44+ }
45+ , suggestion: Nothing
46+ }
47+ ]
48+ }
49+ )
50+ Right r -> case M.statusCode r of
51+ 200 -> M.json r >>= readAff <#> Right
52+ 422 -> M.json r >>= readAff <#> Left
53+ code -> throwError (error $ "Unexpected response code " <> show code)
components/src/Yoga/Compiler/Types.pursnew file+11
@@ -0,0 +1,11 @@
1+module Yoga.Compiler.Types where
2+
3+import Data.Either (Either)
4+import Effect.Aff (Aff)
5+import Shared.Models.Body as Body
6+
7+type Compiler r
8+ = ( compileAndRun ∷
9+ Body.CompileRequest -> Aff (Either Body.CompileResult Body.RunResult)
10+ | r
11+ )
components/src/Yoga/FillInTheGaps/Component.pursnew file+232
@@ -0,0 +1,232 @@
1+module Yoga.FillInTheGaps.Component where
2+
3+import Prelude
4+import Data.Array (foldMap, intercalate)
5+import Data.Array as A
6+import Data.Either (Either(..))
7+import Data.Foldable (foldl)
8+import Data.Function.Uncurried (mkFn2)
9+import Data.Lens ((%~))
10+import Data.Lens.Index (ix)
11+import Data.Maybe (Maybe(..), fromMaybe', isJust, isNothing)
12+import Data.Monoid (guard)
13+import Data.String (Pattern(..), split)
14+import Data.String as S
15+import Data.String.Regex (Regex)
16+import Data.String.Regex as Regex
17+import Data.String.Regex.Flags as RegexFlags
18+import Data.String.Regex.Unsafe (unsafeRegex)
19+import Data.Tuple.Nested ((/\))
20+import Effect (Effect)
21+import Effect.Aff (launchAff_)
22+import Effect.Class (liftEffect)
23+import Justifill (justifill)
24+import Partial.Unsafe (unsafeCrashWith)
25+import React.Basic (JSX, ReactComponent, element, fragment)
26+import React.Basic.DOM (css)
27+import React.Basic.DOM as R
28+import React.Basic.Events (handler_)
29+import React.Basic.Helpers (jsx)
30+import React.Basic.Hooks (component, useState)
31+import React.Basic.Hooks as React
32+import React.Basic.Hooks.Spring (useTransition)
33+import Shared.Models.Body (CompileResult, RunResult)
34+import Type.Row (type (+))
35+import Yoga.Button.Component (ButtonType(..), mkButton)
36+import Yoga.ClickAway.Component as ClickAway
37+import Yoga.CloseIcon.Component as CloseIcon
38+import Yoga.Cluster.Component as Cluster
39+import Yoga.Compiler.Types (Compiler)
40+import Yoga.Helpers ((?||))
41+import Yoga.Highlighter.Types (Highlighter)
42+import Yoga.InlineCode.Component as InlineCode
43+import Yoga.Modal.Component as Modal
44+
45+data Segment
46+ = ExpectedResult String
47+ | Start
48+ | End
49+ | Filler String
50+ | Hole Int String
51+
52+derive instance eqSegment ∷ Eq Segment
53+getResult ∷ Segment -> Maybe String
54+getResult = case _ of
55+ ExpectedResult r -> Just r
56+ _ -> Nothing
57+
58+findResult ∷ Array Segment -> String
59+findResult = fromMaybe' (\_ -> unsafeCrashWith "Even teachers make mistakes") <<< A.findMap getResult
60+
61+toCode ∷ Array (Array Segment) -> String
62+toCode lines = intercalate "\n" mapped
63+ where
64+ mapped = lines <#> (intercalate "" <<< map segmentToCode)
65+ segmentToCode = case _ of
66+ Filler s -> s
67+ Hole _ s -> s
68+ _ -> ""
69+
70+complete ∷ Array (Array Segment) -> Boolean
71+complete arr = foldl f true (join arr)
72+ where
73+ f acc seg =
74+ acc
75+ && case seg of
76+ Hole _ s -> s /= ""
77+ _ -> true
78+
79+visibleRange ∷ Array (Array Segment) -> { end ∷ Int, start ∷ Int }
80+visibleRange arr = { start, end }
81+ where
82+ start = A.findIndex (_ == [ Start ]) arr ?|| 0
83+ end = A.findIndex (_ == [ End ]) arr ?|| A.length arr
84+
85+renderSegments ∷ ReactComponent InlineCode.Props -> ((Array (Array Segment) -> Array (Array Segment)) -> Effect Unit) -> Array (Array Segment) -> JSX
86+renderSegments ic update arrs = R.div_ (A.mapWithIndex renderLine arrs)
87+ where
88+ { start, end } = visibleRange arrs
89+ renderLine i l = R.div_ (A.mapWithIndex (renderSegment i) l)
90+ renderSegment i j s =
91+ if between start end i then case s of
92+ Filler s' -> R.code_ [ R.text s' ]
93+ Hole width _ ->
94+ element ic
95+ $ justifill
96+ { width
97+ , onSubmit: update <<< updateSegments i j
98+ }
99+ _ -> mempty
100+ else
101+ mempty
102+
103+updateSegments ∷ Int -> Int -> String -> Array (Array Segment) -> Array (Array Segment)
104+updateSegments i j v = (ix i <<< ix j) %~ f
105+ where
106+ f = case _ of
107+ Hole h _ -> Hole h v
108+ _ -> unsafeCrashWith "Updated a non-hole"
109+
110+holeRegex ∷ Regex
111+holeRegex = unsafeRegex "({-.*?-})" RegexFlags.global
112+
113+resultRegex ∷ Regex
114+resultRegex = unsafeRegex "--result" RegexFlags.global
115+
116+startRegex ∷ Regex
117+startRegex = unsafeRegex "--start here" RegexFlags.global
118+
119+endRegex ∷ Regex
120+endRegex = unsafeRegex "--end here" RegexFlags.global
121+
122+rawSegments ∷ String -> Array String
123+rawSegments = Regex.split holeRegex
124+
125+toSegment ∷ String -> Segment
126+toSegment = case _ of
127+ x
128+ | Regex.test holeRegex x -> Hole (S.length x - 4) ""
129+ x
130+ | S.indexOf (Pattern "--result ") x == Just 0 -> ExpectedResult ((S.stripPrefix (Pattern "--result ") x) ?|| "")
131+ x
132+ | Regex.test startRegex x -> Start
133+ x
134+ | Regex.test endRegex x -> End
135+ other -> Filler other
136+
137+type Ctx r
138+ = (Compiler + Highlighter r)
139+
140+makeComponent ∷ { | Ctx () } -> Effect (ReactComponent { code ∷ String })
141+makeComponent { compileAndRun, highlight } = do
142+ ic <- InlineCode.makeComponent
143+ modal <- Modal.makeComponent
144+ closeIcon <- CloseIcon.makeComponent
145+ cluster <- Cluster.makeComponent
146+ clickAway <- ClickAway.makeComponent
147+ button <- mkButton
148+ component "FillInTheGaps" \{ code } -> React.do
149+ let
150+ lines = split (Pattern "\n") code
151+
152+ initialSegments = lines <#> \line -> rawSegments line <#> toSegment
153+ segments /\ modifySegments <- useState initialSegments
154+ result /\ modifyResult <- useState Nothing
155+ modalTransitions <-
156+ useTransition [ result ] (Just show)
157+ $ css
158+ { from: { opacity: 0.0, transform: "translate3d(-50%, -50%, 0) scale3d(0.3, 0.3, 1.0)" }
159+ , enter: { opacity: 1.0, transform: "translate3d(-50%, -50%, 0) scale3d(1.0, 1.0, 1.0)" }
160+ , leave: { opacity: 0.0, transform: "translate3d(-50%, -50%, 0) scale3d(0.3, 0.3, 1.0)" }
161+ , config:
162+ mkFn2 \_ state -> case state of
163+ "leave" -> { mass: 1.0, tension: 140, friction: 15 }
164+ _ -> { mass: 1.0, tension: 170, friction: 20 }
165+ }
166+ clickAwayTransitions <-
167+ useTransition [ result ] (Just show)
168+ $ css
169+ { from: { opacity: 0.0 }
170+ , enter: { opacity: 1.0 }
171+ , leave: { opacity: 0.0 }
172+ , config:
173+ mkFn2 \_ state -> case state of
174+ "leave" -> { mass: 1.0, tension: 140, friction: 15 }
175+ _ -> { mass: 1.0, tension: 170, friction: 20 }
176+ }
177+ let
178+ expectedResult = findResult (join segments)
179+
180+ onClick =
181+ launchAff_ do
182+ do
183+ res <- compileAndRun { code: toCode segments }
184+ modifyResult (const (Just $ res)) # liftEffect
185+ pure
186+ $ fragment
187+ $ [ renderSegments ic (modifySegments) segments
188+ , jsx cluster {}
189+ [ R.div_
190+ [ jsx button
191+ { onClick: handler_ onClick
192+ , buttonType:
193+ if complete segments && isNothing result then
194+ HighlightedButton
195+ else
196+ DisabledButton
197+ }
198+ [ R.text "Try it" ]
199+ ]
200+ ]
201+ , fragment
202+ $ clickAwayTransitions
203+ >>= \{ item, key, props } ->
204+ guard (isJust item)
205+ $ join item
206+ # foldMap \_ ->
207+ [ element clickAway (justifill { allowEscape: true, style: props, onClick: modifyResult (const Nothing) }) ]
208+ , fragment
209+ $ modalTransitions
210+ >>= \{ item, key, props } ->
211+ guard (isJust item)
212+ $ join item
213+ # foldMap \r ->
214+ [ jsx modal
215+ { title:
216+ case r of
217+ (Right { stdout })
218+ | S.stripSuffix (S.Pattern "\n") stdout == Just expectedResult -> "Hooray!"
219+ (Left l) -> "Does not compile"
220+ (Right _) -> "Not " <> (findResult $ join segments)
221+ , icon: element closeIcon { onClick: modifyResult (const Nothing), style: Nothing }
222+ , style: props
223+ }
224+ [ R.pre_ [ R.text $ compileResultToString result ] ]
225+ ]
226+ ]
227+
228+compileResultToString ∷ Maybe (Either CompileResult RunResult) -> String
229+compileResultToString = case _ of
230+ Nothing -> ""
231+ Just (Left cr) -> cr.result <#> _.message # intercalate "\n"
232+ Just (Right r) -> r.stdout
components/src/Yoga/FillInTheGaps/Stories.pursnew file+60
@@ -0,0 +1,60 @@
1+module Yoga.FillInTheGaps.Stories where
2+
3+import Prelude hiding (add)
4+import Data.Either (Either(..))
5+import Data.Maybe (Maybe(..))
6+import Data.String as String
7+import Debug.Trace (spy)
8+import Effect (Effect)
9+import Storybook.Decorator.FullScreen (fullScreenDecorator)
10+import Storybook.React (Storybook, add, addDecorator, storiesOf)
11+import Yoga.FillInTheGaps.Component as FillInTheGaps
12+import Yoga.Highlighter.Types (HTMLString(..), Language(..))
13+
14+ctx ∷ { | FillInTheGaps.Ctx () }
15+ctx =
16+ { compileAndRun
17+ , highlight
18+ }
19+ where
20+ highlight c Purescript = pure (HTMLString c)
21+ compileAndRun = case _ of
22+ { code }
23+ | code == correctCode -> pure (Right { code: Nothing, stdout: "Hello World\n", stderr: "" })
24+ other -> pure (Right { code: Nothing, stdout: "Not hello world", stderr: "" })
25+
26+stories ∷ Effect Storybook
27+stories = do
28+ storiesOf "FillInTheGaps" do
29+ addDecorator fullScreenDecorator
30+ add "The FillInTheGaps" (FillInTheGaps.makeComponent ctx)
31+ [ { code: codeWithHoles }
32+ ]
33+
34+codeWithHoles =
35+ """
36+--result Hello World
37+module Main where
38+import Batteries
39+
40+main :: Effect Unit
41+--start here
42+main = log
43+ "{-Hello World-}"
44+--end here
45+"""
46+
47+correctCode =
48+ String.replace
49+ (String.Pattern "{-Hello World-}")
50+ (String.Replacement "Hello World")
51+ <<< String.replace
52+ (String.Pattern "--result Hello World")
53+ (String.Replacement "")
54+ <<< String.replace
55+ (String.Pattern "--start here")
56+ (String.Replacement "")
57+ <<< String.replace
58+ (String.Pattern "--end here")
59+ (String.Replacement "")
60+ $ codeWithHoles
components/src/Yoga/FillInTheGaps/Styles.pursnew file+23
@@ -0,0 +1,23 @@
1+module Yoga.FillInTheGaps.Styles where
2+
3+import Prelude hiding (top)
4+import JSS (JSSClasses, JSSElem, jssClasses)
5+import Yoga.Theme.Types (YogaTheme)
6+
7+type PropsR
8+ = ()
9+
10+type Props
11+ = Record PropsR
12+
13+type Classes a
14+ = ( blue ∷ a
15+ , green ∷ a
16+ )
17+
18+styles ∷ JSSClasses YogaTheme Props (Classes (JSSElem Props))
19+styles =
20+ jssClasses \theme ->
21+ { blue: { color: theme.blue }
22+ , green: { color: theme.green }
23+ }
components/src/Yoga/Highlighter.pursnew file+3
@@ -0,0 +1,3 @@
1+module Yoga.Highlighter where
2+
3+import Yoga.Highlighter.Types (Highlighter)
components/src/Yoga/Highlighter/Monaco.pursnew file+24
@@ -0,0 +1,24 @@
1+module Yoga.Highlighter.Monaco where
2+
3+import Prelude
4+import Control.Promise as Promise
5+import Effect.Aff (Aff)
6+import Yoga.Editor (Editor, colorizeImpl)
7+import Yoga.Highlighter.Types (HTMLString(..), Highlighter, Language(..))
8+
9+monacoHighlighter ∷ Editor -> { | Highlighter () }
10+monacoHighlighter editor =
11+ { highlight
12+ }
13+ where
14+ langToString ∷ Language -> String
15+ langToString Purescript = "purescript"
16+ highlight ∷ String -> Language -> Aff HTMLString
17+ highlight code lang =
18+ HTMLString
19+ <$> Promise.toAff
20+ ( colorizeImpl code
21+ (langToString lang)
22+ { tabSize: 2 }
23+ editor
24+ )
components/src/Yoga/Highlighter/Types.pursnew file+15
@@ -0,0 +1,15 @@
1+module Yoga.Highlighter.Types where
2+
3+import Effect.Aff (Aff)
4+
5+data Language
6+ = Purescript
7+
8+newtype HTMLString
9+ = HTMLString String
10+
11+type Highlighter r
12+ = ( highlight ∷
13+ String -> Language -> Aff HTMLString
14+ | r
15+ )
components/src/Yoga/Modal/Stories.purs−1
@@ -4,7 +4,6 @@ import Prelude hiding (add)
4import Data.Maybe (Maybe(..))
4import Data.Maybe (Maybe(..))
5import Data.Monoid (guard)
5import Data.Monoid (guard)
6import Data.Tuple.Nested ((/\))
6import Data.Tuple.Nested ((/\))
7−import Debug.Trace (spy)
8import Effect (Effect)
7import Effect (Effect)
9import Justifill (justifill)
8import Justifill (justifill)
10import React.Basic.DOM (css)
9import React.Basic.DOM (css)
components/src/Yoga/Monaco/Editor.js+215−212
@@ -58,6 +58,9 @@ exports.getValue = function (editor) {
58 return editor.getValue();
58 return editor.getValue();
59 };
59 };
60};
60};
61+exports.colorizeImpl = function (text) { return function (languageId) { return function (options) { return function (editor) {
62+ return editor.colorize(text, languageId, options);
63+}; }; }; };
61exports.setValue = function (value) { return function (editor) { return function () { return editor.setValue(value); }; }; };
64exports.setValue = function (value) { return function (editor) { return function () { return editor.setValue(value); }; }; };
62exports.defineThemeImpl = function (monacoInstance) { return function (name) { return function (theme) { return function () {
65exports.defineThemeImpl = function (monacoInstance) { return function (name) { return function (theme) { return function () {
63 return monacoInstance.editor.defineTheme(name, theme);
66 return monacoInstance.editor.defineTheme(name, theme);
@@ -91,84 +94,84 @@ exports.vsCodeTheme = function (bg) { return ({
91 rules: [
94 rules: [
92 {
95 {
93 foreground: "008e00",
96 foreground: "008e00",
94− token: "comment"
97+ token: "comment",
95 },
98 },
96 {
99 {
97 foreground: "7d4726",
100 foreground: "7d4726",
98− token: "meta.preprocessor"
101+ token: "meta.preprocessor",
99 },
102 },
100 {
103 {
101 foreground: "7d4726",
104 foreground: "7d4726",
102− token: "keyword.control.import"
105+ token: "keyword.control.import",
103 },
106 },
104 {
107 {
105 foreground: "df0002",
108 foreground: "df0002",
106− token: "string"
109+ token: "string",
107 },
110 },
108 {
111 {
109 foreground: "3a00dc",
112 foreground: "3a00dc",
110− token: "constant.numeric"
113+ token: "constant.numeric",
111 },
114 },
112 {
115 {
113 foreground: "c800a4",
116 foreground: "c800a4",
114− token: "constant.language"
117+ token: "constant.language",
115 },
118 },
116 {
119 {
117 foreground: "275a5e",
120 foreground: "275a5e",
118− token: "constant.character"
121+ token: "constant.character",
119 },
122 },
120 {
123 {
121 foreground: "275a5e",
124 foreground: "275a5e",
122− token: "constant.other"
125+ token: "constant.other",
123 },
126 },
124 {
127 {
125 foreground: "c800a4",
128 foreground: "c800a4",
126− token: "variable.language"
129+ token: "variable.language",
127 },
130 },
128 {
131 {
129 foreground: "c800a4",
132 foreground: "c800a4",
130− token: "variable.other"
133+ token: "variable.other",
131 },
134 },
132 {
135 {
133 foreground: "c800a4",
136 foreground: "c800a4",
134− token: "keyword"
137+ token: "keyword",
135 },
138 },
136 {
139 {
137 foreground: "c900a4",
140 foreground: "c900a4",
138− token: "storage"
141+ token: "storage",
139 },
142 },
140 {
143 {
141 foreground: "438288",
144 foreground: "438288",
142− token: "entity.name.class"
145+ token: "entity.name.class",
143 },
146 },
144 {
147 {
145 foreground: "790ead",
148 foreground: "790ead",
146− token: "entity.name.tag"
149+ token: "entity.name.tag",
147 },
150 },
148 {
151 {
149 foreground: "450084",
152 foreground: "450084",
150− token: "entity.other.attribute-name"
153+ token: "entity.other.attribute-name",
151 },
154 },
152 {
155 {
153 foreground: "450084",
156 foreground: "450084",
154− token: "support.function"
157+ token: "support.function",
155 },
158 },
156 {
159 {
157 foreground: "450084",
160 foreground: "450084",
158− token: "support.constant"
161+ token: "support.constant",
159 },
162 },
160 {
163 {
161 foreground: "790ead",
164 foreground: "790ead",
162− token: "support.type"
165+ token: "support.type",
163 },
166 },
164 {
167 {
165 foreground: "790ead",
168 foreground: "790ead",
166− token: "support.class"
169+ token: "support.class",
167 },
170 },
168 {
171 {
169 foreground: "790ead",
172 foreground: "790ead",
170− token: "support.other.variable"
173+ token: "support.other.variable",
171− }
174+ },
172 ],
175 ],
173 colors: {
176 colors: {
174 "editor.foreground": "#000000",
177 "editor.foreground": "#000000",
@@ -176,8 +179,8 @@ exports.vsCodeTheme = function (bg) { return ({
176 "editor.selectionBackground": "#B5D5FF",
179 "editor.selectionBackground": "#B5D5FF",
177 "editor.lineHighlightBackground": "#00000012",
180 "editor.lineHighlightBackground": "#00000012",
178 "editorCursor.foreground": "#000000",
181 "editorCursor.foreground": "#000000",
179− "editorWhitespace.foreground": "#BFBFBF"
182+ "editorWhitespace.foreground": "#BFBFBF",
180− }
183+ },
181}); };
184}); };
182exports.nightOwlTheme = function (bg) { return ({
185exports.nightOwlTheme = function (bg) { return ({
183 base: "vs-dark",
186 base: "vs-dark",
@@ -185,664 +188,664 @@ exports.nightOwlTheme = function (bg) { return ({
185 rules: [
188 rules: [
186 {
189 {
187 foreground: "637777",
190 foreground: "637777",
188− token: "comment"
191+ token: "comment",
189 },
192 },
190 {
193 {
191 foreground: "addb67",
194 foreground: "addb67",
192− token: "string"
195+ token: "string",
193 },
196 },
194 {
197 {
195 foreground: "ecc48d",
198 foreground: "ecc48d",
196− token: "vstring.quoted"
199+ token: "vstring.quoted",
197 },
200 },
198 {
201 {
199 foreground: "ecc48d",
202 foreground: "ecc48d",
200− token: "variable.other.readwrite.js"
203+ token: "variable.other.readwrite.js",
201 },
204 },
202 {
205 {
203 foreground: "5ca7e4",
206 foreground: "5ca7e4",
204− token: "string.regexp"
207+ token: "string.regexp",
205 },
208 },
206 {
209 {
207 foreground: "5ca7e4",
210 foreground: "5ca7e4",
208− token: "string.regexp keyword.other"
211+ token: "string.regexp keyword.other",
209 },
212 },
210 {
213 {
211 foreground: "5f7e97",
214 foreground: "5f7e97",
212− token: "meta.function punctuation.separator.comma"
215+ token: "meta.function punctuation.separator.comma",
213 },
216 },
214 {
217 {
215 foreground: "f78c6c",
218 foreground: "f78c6c",
216− token: "constant.numeric"
219+ token: "constant.numeric",
217 },
220 },
218 {
221 {
219 foreground: "f78c6c",
222 foreground: "f78c6c",
220− token: "constant.character.numeric"
223+ token: "constant.character.numeric",
221 },
224 },
222 {
225 {
223 foreground: "addb67",
226 foreground: "addb67",
224− token: "variable"
227+ token: "variable",
225 },
228 },
226 {
229 {
227 foreground: "c792ea",
230 foreground: "c792ea",
228− token: "keyword"
231+ token: "keyword",
229 },
232 },
230 {
233 {
231 foreground: "c792ea",
234 foreground: "c792ea",
232− token: "punctuation.accessor"
235+ token: "punctuation.accessor",
233 },
236 },
234 {
237 {
235 foreground: "c792ea",
238 foreground: "c792ea",
236− token: "storage"
239+ token: "storage",
237 },
240 },
238 {
241 {
239 foreground: "c792ea",
242 foreground: "c792ea",
240− token: "meta.var.expr"
243+ token: "meta.var.expr",
241 },
244 },
242 {
245 {
243 foreground: "c792ea",
246 foreground: "c792ea",
244− token: "meta.class meta.method.declaration meta.var.expr storage.type.jsm"
247+ token: "meta.class meta.method.declaration meta.var.expr storage.type.jsm",
245 },
248 },
246 {
249 {
247 foreground: "c792ea",
250 foreground: "c792ea",
248− token: "storage.type.property.js"
251+ token: "storage.type.property.js",
249 },
252 },
250 {
253 {
251 foreground: "c792ea",
254 foreground: "c792ea",
252− token: "storage.type.property.ts"
255+ token: "storage.type.property.ts",
253 },
256 },
254 {
257 {
255 foreground: "c792ea",
258 foreground: "c792ea",
256− token: "storage.type.property.tsx"
259+ token: "storage.type.property.tsx",
257 },
260 },
258 {
261 {
259 foreground: "82aaff",
262 foreground: "82aaff",
260− token: "storage.type"
263+ token: "storage.type",
261 },
264 },
262 {
265 {
263 foreground: "ffcb8b",
266 foreground: "ffcb8b",
264− token: "entity.name.class"
267+ token: "entity.name.class",
265 },
268 },
266 {
269 {
267 foreground: "ffcb8b",
270 foreground: "ffcb8b",
268− token: "meta.class entity.name.type.class"
271+ token: "meta.class entity.name.type.class",
269 },
272 },
270 {
273 {
271 foreground: "addb67",
274 foreground: "addb67",
272− token: "entity.other.inherited-class"
275+ token: "entity.other.inherited-class",
273 },
276 },
274 {
277 {
275 foreground: "82aaff",
278 foreground: "82aaff",
276− token: "entity.name.function"
279+ token: "entity.name.function",
277 },
280 },
278 {
281 {
279 foreground: "addb67",
282 foreground: "addb67",
280− token: "punctuation.definition.variable"
283+ token: "punctuation.definition.variable",
281 },
284 },
282 {
285 {
283 foreground: "d3423e",
286 foreground: "d3423e",
284− token: "punctuation.section.embedded"
287+ token: "punctuation.section.embedded",
285 },
288 },
286 {
289 {
287 foreground: "d6deeb",
290 foreground: "d6deeb",
288− token: "punctuation.terminator.expression"
291+ token: "punctuation.terminator.expression",
289 },
292 },
290 {
293 {
291 foreground: "d6deeb",
294 foreground: "d6deeb",
292− token: "punctuation.definition.arguments"
295+ token: "punctuation.definition.arguments",
293 },
296 },
294 {
297 {
295 foreground: "d6deeb",
298 foreground: "d6deeb",
296− token: "punctuation.definition.array"
299+ token: "punctuation.definition.array",
297 },
300 },
298 {
301 {
299 foreground: "d6deeb",
302 foreground: "d6deeb",
300− token: "punctuation.section.array"
303+ token: "punctuation.section.array",
301 },
304 },
302 {
305 {
303 foreground: "d6deeb",
306 foreground: "d6deeb",
304− token: "meta.array"
307+ token: "meta.array",
305 },
308 },
306 {
309 {
307 foreground: "d9f5dd",
310 foreground: "d9f5dd",
308− token: "punctuation.definition.list.begin"
311+ token: "punctuation.definition.list.begin",
309 },
312 },
310 {
313 {
311 foreground: "d9f5dd",
314 foreground: "d9f5dd",
312− token: "punctuation.definition.list.end"
315+ token: "punctuation.definition.list.end",
313 },
316 },
314 {
317 {
315 foreground: "d9f5dd",
318 foreground: "d9f5dd",
316− token: "punctuation.separator.arguments"
319+ token: "punctuation.separator.arguments",
317 },
320 },
318 {
321 {
319 foreground: "d9f5dd",
322 foreground: "d9f5dd",
320− token: "punctuation.definition.list"
323+ token: "punctuation.definition.list",
321 },
324 },
322 {
325 {
323 foreground: "d3423e",
326 foreground: "d3423e",
324− token: "string.template meta.template.expression"
327+ token: "string.template meta.template.expression",
325 },
328 },
326 {
329 {
327 foreground: "d6deeb",
330 foreground: "d6deeb",
328− token: "string.template punctuation.definition.string"
331+ token: "string.template punctuation.definition.string",
329 },
332 },
330 {
333 {
331 foreground: "c792ea",
334 foreground: "c792ea",
332 fontStyle: "italic",
335 fontStyle: "italic",
333− token: "italic"
336+ token: "italic",
334 },
337 },
335 {
338 {
336 foreground: "addb67",
339 foreground: "addb67",
337 fontStyle: "bold",
340 fontStyle: "bold",
338− token: "bold"
341+ token: "bold",
339 },
342 },
340 {
343 {
341 foreground: "82aaff",
344 foreground: "82aaff",
342− token: "constant.language"
345+ token: "constant.language",
343 },
346 },
344 {
347 {
345 foreground: "82aaff",
348 foreground: "82aaff",
346− token: "punctuation.definition.constant"
349+ token: "punctuation.definition.constant",
347 },
350 },
348 {
351 {
349 foreground: "82aaff",
352 foreground: "82aaff",
350− token: "variable.other.constant"
353+ token: "variable.other.constant",
351 },
354 },
352 {
355 {
353 foreground: "7fdbca",
356 foreground: "7fdbca",
354− token: "support.function.construct"
357+ token: "support.function.construct",
355 },
358 },
356 {
359 {
357 foreground: "7fdbca",
360 foreground: "7fdbca",
358− token: "keyword.other.new"
361+ token: "keyword.other.new",
359 },
362 },
360 {
363 {
361 foreground: "82aaff",
364 foreground: "82aaff",
362− token: "constant.character"
365+ token: "constant.character",
363 },
366 },
364 {
367 {
365 foreground: "82aaff",
368 foreground: "82aaff",
366− token: "constant.other"
369+ token: "constant.other",
367 },
370 },
368 {
371 {
369 foreground: "f78c6c",
372 foreground: "f78c6c",
370− token: "constant.character.escape"
373+ token: "constant.character.escape",
371 },
374 },
372 {
375 {
373 foreground: "addb67",
376 foreground: "addb67",
374− token: "entity.other.inherited-class"
377+ token: "entity.other.inherited-class",
375 },
378 },
376 {
379 {
377 foreground: "d7dbe0",
380 foreground: "d7dbe0",
378− token: "variable.parameter"
381+ token: "variable.parameter",
379 },
382 },
380 {
383 {
381 foreground: "7fdbca",
384 foreground: "7fdbca",
382− token: "entity.name.tag"
385+ token: "entity.name.tag",
383 },
386 },
384 {
387 {
385 foreground: "cc2996",
388 foreground: "cc2996",
386− token: "punctuation.definition.tag.html"
389+ token: "punctuation.definition.tag.html",
387 },
390 },
388 {
391 {
389 foreground: "cc2996",
392 foreground: "cc2996",
390− token: "punctuation.definition.tag.begin"
393+ token: "punctuation.definition.tag.begin",
391 },
394 },
392 {
395 {
393 foreground: "cc2996",
396 foreground: "cc2996",
394− token: "punctuation.definition.tag.end"
397+ token: "punctuation.definition.tag.end",
395 },
398 },
396 {
399 {
397 foreground: "addb67",
400 foreground: "addb67",
398− token: "entity.other.attribute-name"
401+ token: "entity.other.attribute-name",
399 },
402 },
400 {
403 {
401 foreground: "addb67",
404 foreground: "addb67",
402− token: "entity.name.tag.custom"
405+ token: "entity.name.tag.custom",
403 },
406 },
404 {
407 {
405 foreground: "82aaff",
408 foreground: "82aaff",
406− token: "support.function"
409+ token: "support.function",
407 },
410 },
408 {
411 {
409 foreground: "82aaff",
412 foreground: "82aaff",
410− token: "support.constant"
413+ token: "support.constant",
411 },
414 },
412 {
415 {
413 foreground: "7fdbca",
416 foreground: "7fdbca",
414− token: "upport.constant.meta.property-value"
417+ token: "upport.constant.meta.property-value",
415 },
418 },
416 {
419 {
417 foreground: "addb67",
420 foreground: "addb67",
418− token: "support.type"
421+ token: "support.type",
419 },
422 },
420 {
423 {
421 foreground: "addb67",
424 foreground: "addb67",
422− token: "support.class"
425+ token: "support.class",
423 },
426 },
424 {
427 {
425 foreground: "addb67",
428 foreground: "addb67",
426− token: "support.variable.dom"
429+ token: "support.variable.dom",
427 },
430 },
428 {
431 {
429 foreground: "7fdbca",
432 foreground: "7fdbca",
430− token: "support.constant"
433+ token: "support.constant",
431 },
434 },
432 {
435 {
433 foreground: "7fdbca",
436 foreground: "7fdbca",
434− token: "keyword.other.special-method"
437+ token: "keyword.other.special-method",
435 },
438 },
436 {
439 {
437 foreground: "7fdbca",
440 foreground: "7fdbca",
438− token: "keyword.other.new"
441+ token: "keyword.other.new",
439 },
442 },
440 {
443 {
441 foreground: "7fdbca",
444 foreground: "7fdbca",
442− token: "keyword.other.debugger"
445+ token: "keyword.other.debugger",
443 },
446 },
444 {
447 {
445 foreground: "7fdbca",
448 foreground: "7fdbca",
446− token: "keyword.control"
449+ token: "keyword.control",
447 },
450 },
448 {
451 {
449 foreground: "c792ea",
452 foreground: "c792ea",
450− token: "keyword.operator.comparison"
453+ token: "keyword.operator.comparison",
451 },
454 },
452 {
455 {
453 foreground: "c792ea",
456 foreground: "c792ea",
454− token: "keyword.control.flow.js"
457+ token: "keyword.control.flow.js",
455 },
458 },
456 {
459 {
457 foreground: "c792ea",
460 foreground: "c792ea",
458− token: "keyword.control.flow.ts"
461+ token: "keyword.control.flow.ts",
459 },
462 },
460 {
463 {
461 foreground: "c792ea",
464 foreground: "c792ea",
462− token: "keyword.control.flow.tsx"
465+ token: "keyword.control.flow.tsx",
463 },
466 },
464 {
467 {
465 foreground: "c792ea",
468 foreground: "c792ea",
466− token: "keyword.control.ruby"
469+ token: "keyword.control.ruby",
467 },
470 },
468 {
471 {
469 foreground: "c792ea",
472 foreground: "c792ea",
470− token: "keyword.control.module.ruby"
473+ token: "keyword.control.module.ruby",
471 },
474 },
472 {
475 {
473 foreground: "c792ea",
476 foreground: "c792ea",
474− token: "keyword.control.class.ruby"
477+ token: "keyword.control.class.ruby",
475 },
478 },
476 {
479 {
477 foreground: "c792ea",
480 foreground: "c792ea",
478− token: "keyword.control.def.ruby"
481+ token: "keyword.control.def.ruby",
479 },
482 },
480 {
483 {
481 foreground: "c792ea",
484 foreground: "c792ea",
482− token: "keyword.control.loop.js"
485+ token: "keyword.control.loop.js",
483 },
486 },
484 {
487 {
485 foreground: "c792ea",
488 foreground: "c792ea",
486− token: "keyword.control.loop.ts"
489+ token: "keyword.control.loop.ts",
487 },
490 },
488 {
491 {
489 foreground: "c792ea",
492 foreground: "c792ea",
490− token: "keyword.control.import.js"
493+ token: "keyword.control.import.js",
491 },
494 },
492 {
495 {
493 foreground: "c792ea",
496 foreground: "c792ea",
494− token: "keyword.control.import.ts"
497+ token: "keyword.control.import.ts",
495 },
498 },
496 {
499 {
497 foreground: "c792ea",
500 foreground: "c792ea",
498− token: "keyword.control.import.tsx"
501+ token: "keyword.control.import.tsx",
499 },
502 },
500 {
503 {
501 foreground: "c792ea",
504 foreground: "c792ea",
502− token: "keyword.control.from.js"
505+ token: "keyword.control.from.js",
503 },
506 },
504 {
507 {
505 foreground: "c792ea",
508 foreground: "c792ea",
506− token: "keyword.control.from.ts"
509+ token: "keyword.control.from.ts",
507 },
510 },
508 {
511 {
509 foreground: "c792ea",
512 foreground: "c792ea",
510− token: "keyword.control.from.tsx"
513+ token: "keyword.control.from.tsx",
511 },
514 },
512 {
515 {
513 foreground: "ffffff",
516 foreground: "ffffff",
514 background: "ff2c83",
517 background: "ff2c83",
515− token: "invalid"
518+ token: "invalid",
516 },
519 },
517 {
520 {
518 foreground: "ffffff",
521 foreground: "ffffff",
519 background: "d3423e",
522 background: "d3423e",
520− token: "invalid.deprecated"
523+ token: "invalid.deprecated",
521 },
524 },
522 {
525 {
523 foreground: "7fdbca",
526 foreground: "7fdbca",
524− token: "keyword.operator"
527+ token: "keyword.operator",
525 },
528 },
526 {
529 {
527 foreground: "c792ea",
530 foreground: "c792ea",
528− token: "keyword.operator.relational"
531+ token: "keyword.operator.relational",
529 },
532 },
530 {
533 {
531 foreground: "c792ea",
534 foreground: "c792ea",
532− token: "keyword.operator.assignement"
535+ token: "keyword.operator.assignement",
533 },
536 },
534 {
537 {
535 foreground: "c792ea",
538 foreground: "c792ea",
536− token: "keyword.operator.arithmetic"
539+ token: "keyword.operator.arithmetic",
537 },
540 },
538 {
541 {
539 foreground: "c792ea",
542 foreground: "c792ea",
540− token: "keyword.operator.bitwise"
543+ token: "keyword.operator.bitwise",
541 },
544 },
542 {
545 {
543 foreground: "c792ea",
546 foreground: "c792ea",
544− token: "keyword.operator.increment"
547+ token: "keyword.operator.increment",
545 },
548 },
546 {
549 {
547 foreground: "c792ea",
550 foreground: "c792ea",
548− token: "keyword.operator.ternary"
551+ token: "keyword.operator.ternary",
549 },
552 },
550 {
553 {
551 foreground: "637777",
554 foreground: "637777",
552− token: "comment.line.double-slash"
555+ token: "comment.line.double-slash",
553 },
556 },
554 {
557 {
555 foreground: "cdebf7",
558 foreground: "cdebf7",
556− token: "object"
559+ token: "object",
557 },
560 },
558 {
561 {
559 foreground: "ff5874",
562 foreground: "ff5874",
560− token: "constant.language.null"
563+ token: "constant.language.null",
561 },
564 },
562 {
565 {
563 foreground: "d6deeb",
566 foreground: "d6deeb",
564− token: "meta.brace"
567+ token: "meta.brace",
565 },
568 },
566 {
569 {
567 foreground: "c792ea",
570 foreground: "c792ea",
568− token: "meta.delimiter.period"
571+ token: "meta.delimiter.period",
569 },
572 },
570 {
573 {
571 foreground: "d9f5dd",
574 foreground: "d9f5dd",
572− token: "punctuation.definition.string"
575+ token: "punctuation.definition.string",
573 },
576 },
574 {
577 {
575 foreground: "ff5874",
578 foreground: "ff5874",
576− token: "constant.language.boolean"
579+ token: "constant.language.boolean",
577 },
580 },
578 {
581 {
579 foreground: "ffffff",
582 foreground: "ffffff",
580− token: "object.comma"
583+ token: "object.comma",
581 },
584 },
582 {
585 {
583 foreground: "7fdbca",
586 foreground: "7fdbca",
584− token: "variable.parameter.function"
587+ token: "variable.parameter.function",
585 },
588 },
586 {
589 {
587 foreground: "80cbc4",
590 foreground: "80cbc4",
588− token: "support.type.vendor.property-name"
591+ token: "support.type.vendor.property-name",
589 },
592 },
590 {
593 {
591 foreground: "80cbc4",
594 foreground: "80cbc4",
592− token: "support.constant.vendor.property-value"
595+ token: "support.constant.vendor.property-value",
593 },
596 },
594 {
597 {
595 foreground: "80cbc4",
598 foreground: "80cbc4",
596− token: "support.type.property-name"
599+ token: "support.type.property-name",
597 },
600 },
598 {
601 {
599 foreground: "80cbc4",
602 foreground: "80cbc4",
600− token: "meta.property-list entity.name.tag"
603+ token: "meta.property-list entity.name.tag",
601 },
604 },
602 {
605 {
603 foreground: "57eaf1",
606 foreground: "57eaf1",
604− token: "meta.property-list entity.name.tag.reference"
607+ token: "meta.property-list entity.name.tag.reference",
605 },
608 },
606 {
609 {
607 foreground: "f78c6c",
610 foreground: "f78c6c",
608− token: "constant.other.color.rgb-value punctuation.definition.constant"
611+ token: "constant.other.color.rgb-value punctuation.definition.constant",
609 },
612 },
610 {
613 {
611 foreground: "ffeb95",
614 foreground: "ffeb95",
612− token: "constant.other.color"
615+ token: "constant.other.color",
613 },
616 },
614 {
617 {
615 foreground: "ffeb95",
618 foreground: "ffeb95",
616− token: "keyword.other.unit"
619+ token: "keyword.other.unit",
617 },
620 },
618 {
621 {
619 foreground: "c792ea",
622 foreground: "c792ea",
620− token: "meta.selector"
623+ token: "meta.selector",
621 },
624 },
622 {
625 {
623 foreground: "fad430",
626 foreground: "fad430",
624− token: "entity.other.attribute-name.id"
627+ token: "entity.other.attribute-name.id",
625 },
628 },
626 {
629 {
627 foreground: "80cbc4",
630 foreground: "80cbc4",
628− token: "meta.property-name"
631+ token: "meta.property-name",
629 },
632 },
630 {
633 {
631 foreground: "c792ea",
634 foreground: "c792ea",
632− token: "entity.name.tag.doctype"
635+ token: "entity.name.tag.doctype",
633 },
636 },
634 {
637 {
635 foreground: "c792ea",
638 foreground: "c792ea",
636− token: "meta.tag.sgml.doctype"
639+ token: "meta.tag.sgml.doctype",
637 },
640 },
638 {
641 {
639 foreground: "d9f5dd",
642 foreground: "d9f5dd",
640− token: "punctuation.definition.parameters"
643+ token: "punctuation.definition.parameters",
641 },
644 },
642 {
645 {
643 foreground: "ecc48d",
646 foreground: "ecc48d",
644− token: "string.quoted"
647+ token: "string.quoted",
645 },
648 },
646 {
649 {
647 foreground: "ecc48d",
650 foreground: "ecc48d",
648− token: "string.quoted.double"
651+ token: "string.quoted.double",
649 },
652 },
650 {
653 {
651 foreground: "ecc48d",
654 foreground: "ecc48d",
652− token: "string.quoted.single"
655+ token: "string.quoted.single",
653 },
656 },
654 {
657 {
655 foreground: "addb67",
658 foreground: "addb67",
656− token: "support.constant.math"
659+ token: "support.constant.math",
657 },
660 },
658 {
661 {
659 foreground: "addb67",
662 foreground: "addb67",
660− token: "support.type.property-name.json"
663+ token: "support.type.property-name.json",
661 },
664 },
662 {
665 {
663 foreground: "addb67",
666 foreground: "addb67",
664− token: "support.constant.json"
667+ token: "support.constant.json",
665 },
668 },
666 {
669 {
667 foreground: "c789d6",
670 foreground: "c789d6",
668− token: "meta.structure.dictionary.value.json string.quoted.double"
671+ token: "meta.structure.dictionary.value.json string.quoted.double",
669 },
672 },
670 {
673 {
671 foreground: "80cbc4",
674 foreground: "80cbc4",
672− token: "string.quoted.double.json punctuation.definition.string.json"
675+ token: "string.quoted.double.json punctuation.definition.string.json",
673 },
676 },
674 {
677 {
675 foreground: "ff5874",
678 foreground: "ff5874",
676− token: "meta.structure.dictionary.json meta.structure.dictionary.value constant.language"
679+ token: "meta.structure.dictionary.json meta.structure.dictionary.value constant.language",
677 },
680 },
678 {
681 {
679 foreground: "d6deeb",
682 foreground: "d6deeb",
680− token: "variable.other.ruby"
683+ token: "variable.other.ruby",
681 },
684 },
682 {
685 {
683 foreground: "ecc48d",
686 foreground: "ecc48d",
684− token: "entity.name.type.class.ruby"
687+ token: "entity.name.type.class.ruby",
685 },
688 },
686 {
689 {
687 foreground: "ecc48d",
690 foreground: "ecc48d",
688− token: "keyword.control.class.ruby"
691+ token: "keyword.control.class.ruby",
689 },
692 },
690 {
693 {
691 foreground: "ecc48d",
694 foreground: "ecc48d",
692− token: "meta.class.ruby"
695+ token: "meta.class.ruby",
693 },
696 },
694 {
697 {
695 foreground: "7fdbca",
698 foreground: "7fdbca",
696− token: "constant.language.symbol.hashkey.ruby"
699+ token: "constant.language.symbol.hashkey.ruby",
697 },
700 },
698 {
701 {
699 foreground: "e0eddd",
702 foreground: "e0eddd",
700 background: "a57706",
703 background: "a57706",
701 fontStyle: "italic",
704 fontStyle: "italic",
702− token: "meta.diff"
705+ token: "meta.diff",
703 },
706 },
704 {
707 {
705 foreground: "e0eddd",
708 foreground: "e0eddd",
706 background: "a57706",
709 background: "a57706",
707 fontStyle: "italic",
710 fontStyle: "italic",
708− token: "meta.diff.header"
711+ token: "meta.diff.header",
709 },
712 },
710 {
713 {
711 foreground: "ef535090",
714 foreground: "ef535090",
712 fontStyle: "italic",
715 fontStyle: "italic",
713− token: "markup.deleted"
716+ token: "markup.deleted",
714 },
717 },
715 {
718 {
716 foreground: "a2bffc",
719 foreground: "a2bffc",
717 fontStyle: "italic",
720 fontStyle: "italic",
718− token: "markup.changed"
721+ token: "markup.changed",
719 },
722 },
720 {
723 {
721 foreground: "a2bffc",
724 foreground: "a2bffc",
722 fontStyle: "italic",
725 fontStyle: "italic",
723− token: "meta.diff.header.git"
726+ token: "meta.diff.header.git",
724 },
727 },
725 {
728 {
726 foreground: "a2bffc",
729 foreground: "a2bffc",
727 fontStyle: "italic",
730 fontStyle: "italic",
728− token: "meta.diff.header.from-file"
731+ token: "meta.diff.header.from-file",
729 },
732 },
730 {
733 {
731 foreground: "a2bffc",
734 foreground: "a2bffc",
732 fontStyle: "italic",
735 fontStyle: "italic",
733− token: "meta.diff.header.to-file"
736+ token: "meta.diff.header.to-file",
734 },
737 },
735 {
738 {
736 foreground: "219186",
739 foreground: "219186",
737 background: "eae3ca",
740 background: "eae3ca",
738− token: "markup.inserted"
741+ token: "markup.inserted",
739 },
742 },
740 {
743 {
741 foreground: "d3201f",
744 foreground: "d3201f",
742− token: "other.package.exclude"
745+ token: "other.package.exclude",
743 },
746 },
744 {
747 {
745 foreground: "d3201f",
748 foreground: "d3201f",
746− token: "other.remove"
749+ token: "other.remove",
747 },
750 },
748 {
751 {
749 foreground: "269186",
752 foreground: "269186",
750− token: "other.add"
753+ token: "other.add",
751 },
754 },
752 {
755 {
753 foreground: "ff5874",
756 foreground: "ff5874",
754− token: "constant.language.python"
757+ token: "constant.language.python",
755 },
758 },
756 {
759 {
757 foreground: "82aaff",
760 foreground: "82aaff",
758− token: "variable.parameter.function.python"
761+ token: "variable.parameter.function.python",
759 },
762 },
760 {
763 {
761 foreground: "82aaff",
764 foreground: "82aaff",
762− token: "meta.function-call.arguments.python"
765+ token: "meta.function-call.arguments.python",
763 },
766 },
764 {
767 {
765 foreground: "b2ccd6",
768 foreground: "b2ccd6",
766− token: "meta.function-call.python"
769+ token: "meta.function-call.python",
767 },
770 },
768 {
771 {
769 foreground: "b2ccd6",
772 foreground: "b2ccd6",
770− token: "meta.function-call.generic.python"
773+ token: "meta.function-call.generic.python",
771 },
774 },
772 {
775 {
773 foreground: "d6deeb",
776 foreground: "d6deeb",
774− token: "punctuation.python"
777+ token: "punctuation.python",
775 },
778 },
776 {
779 {
777 foreground: "addb67",
780 foreground: "addb67",
778− token: "entity.name.function.decorator.python"
781+ token: "entity.name.function.decorator.python",
779 },
782 },
780 {
783 {
781 foreground: "8eace3",
784 foreground: "8eace3",
782− token: "source.python variable.language.special"
785+ token: "source.python variable.language.special",
783 },
786 },
784 {
787 {
785 foreground: "82b1ff",
788 foreground: "82b1ff",
786− token: "markup.heading.markdown"
789+ token: "markup.heading.markdown",
787 },
790 },
788 {
791 {
789 foreground: "c792ea",
792 foreground: "c792ea",
790 fontStyle: "italic",
793 fontStyle: "italic",
791− token: "markup.italic.markdown"
794+ token: "markup.italic.markdown",
792 },
795 },
793 {
796 {
794 foreground: "addb67",
797 foreground: "addb67",
795 fontStyle: "bold",
798 fontStyle: "bold",
796− token: "markup.bold.markdown"
799+ token: "markup.bold.markdown",
797 },
800 },
798 {
801 {
799 foreground: "697098",
802 foreground: "697098",
800− token: "markup.quote.markdown"
803+ token: "markup.quote.markdown",
801 },
804 },
802 {
805 {
803 foreground: "80cbc4",
806 foreground: "80cbc4",
804− token: "markup.inline.raw.markdown"
807+ token: "markup.inline.raw.markdown",
805 },
808 },
806 {
809 {
807 foreground: "ff869a",
810 foreground: "ff869a",
808− token: "markup.underline.link.markdown"
811+ token: "markup.underline.link.markdown",
809 },
812 },
810 {
813 {
811 foreground: "ff869a",
814 foreground: "ff869a",
812− token: "markup.underline.link.image.markdown"
815+ token: "markup.underline.link.image.markdown",
813 },
816 },
814 {
817 {
815 foreground: "d6deeb",
818 foreground: "d6deeb",
816− token: "string.other.link.title.markdown"
819+ token: "string.other.link.title.markdown",
817 },
820 },
818 {
821 {
819 foreground: "d6deeb",
822 foreground: "d6deeb",
820− token: "string.other.link.description.markdown"
823+ token: "string.other.link.description.markdown",
821 },
824 },
822 {
825 {
823 foreground: "82b1ff",
826 foreground: "82b1ff",
824− token: "punctuation.definition.string.markdown"
827+ token: "punctuation.definition.string.markdown",
825 },
828 },
826 {
829 {
827 foreground: "82b1ff",
830 foreground: "82b1ff",
828− token: "punctuation.definition.string.begin.markdown"
831+ token: "punctuation.definition.string.begin.markdown",
829 },
832 },
830 {
833 {
831 foreground: "82b1ff",
834 foreground: "82b1ff",
832− token: "punctuation.definition.string.end.markdown"
835+ token: "punctuation.definition.string.end.markdown",
833 },
836 },
834 {
837 {
835 foreground: "82b1ff",
838 foreground: "82b1ff",
836− token: "meta.link.inline.markdown punctuation.definition.string"
839+ token: "meta.link.inline.markdown punctuation.definition.string",
837 },
840 },
838 {
841 {
839 foreground: "7fdbca",
842 foreground: "7fdbca",
840− token: "punctuation.definition.metadata.markdown"
843+ token: "punctuation.definition.metadata.markdown",
841 },
844 },
842 {
845 {
843 foreground: "82b1ff",
846 foreground: "82b1ff",
844− token: "beginning.punctuation.definition.list.markdown"
847+ token: "beginning.punctuation.definition.list.markdown",
845− }
848+ },
846 ],
849 ],
847 colors: {
850 colors: {
848 "editor.foreground": "#d6deeb",
851 "editor.foreground": "#d6deeb",
@@ -853,8 +856,8 @@ exports.nightOwlTheme = function (bg) { return ({
853 "editorCursor.foreground": "#80a4c2",
856 "editorCursor.foreground": "#80a4c2",
854 "editorWhitespace.foreground": "#2e2040",
857 "editorWhitespace.foreground": "#2e2040",
855 "editorIndentGuide.background": "#5e81ce52",
858 "editorIndentGuide.background": "#5e81ce52",
856− "editor.selectionHighlightBorder": "#122d42"
859+ "editor.selectionHighlightBorder": "#122d42",
857− }
860+ },
858}); };
861}); };
859exports.purescriptSyntax = {
862exports.purescriptSyntax = {
860 displayName: "Purescript",
863 displayName: "Purescript",
@@ -895,7 +898,7 @@ exports.purescriptSyntax = {
895 "|",
898 "|",
896 "foreign",
899 "foreign",
897 "forall",
900 "forall",
898− "∷"
901+ "∷",
899 ],
902 ],
900 extraKeywords: [],
903 extraKeywords: [],
901 typeKeywords: [],
904 typeKeywords: [],
@@ -909,11 +912,11 @@ exports.purescriptSyntax = {
909 root: [
912 root: [
910 [
913 [
911 "((?:[A-Z]@idchars\\.)+)([a-z]@idchars)",
914 "((?:[A-Z]@idchars\\.)+)([a-z]@idchars)",
912− ["identifier.namespace", "identifier"]
915+ ["identifier.namespace", "identifier"],
913 ],
916 ],
914 [
917 [
915 "((?:[A-Z]@idchars\\.)+)([A-Z]@idchars)",
918 "((?:[A-Z]@idchars\\.)+)([A-Z]@idchars)",
916− ["identifier.namespace", "constructor"]
919+ ["identifier.namespace", "constructor"],
917 ],
920 ],
918 [
921 [
919 "[a-z]@idchars(?!\\.)",
922 "[a-z]@idchars(?!\\.)",
@@ -923,9 +926,9 @@ exports.purescriptSyntax = {
923 "@typeStart": { token: "keyword", next: "@type_type" },
926 "@typeStart": { token: "keyword", next: "@type_type" },
924 "@keywords": "keyword",
927 "@keywords": "keyword",
925 "@extraKeywords": "keyword",
928 "@extraKeywords": "keyword",
926− "@default": "identifier"
929+ "@default": "identifier",
927− }
930+ },
928− }
931+ },
929 ],
932 ],
930 ["[A-Z]@idchars", "type.identifier"],
933 ["[A-Z]@idchars", "type.identifier"],
931 ["_@idchars", "identifier.wildcard"],
934 ["_@idchars", "identifier.wildcard"],
@@ -940,9 +943,9 @@ exports.purescriptSyntax = {
940 cases: {
943 cases: {
941 "@keywords": "keyword.operator",
944 "@keywords": "keyword.operator",
942 "@extraKeywords": "keyword.operator",
945 "@extraKeywords": "keyword.operator",
943− "@default": "operator"
946+ "@default": "operator",
944− }
947+ },
945− }
948+ },
946 ],
949 ],
947 ["[0-9]+\\.[0-9]+([eE][\\-+]?[0-9]+)?", "number.float"],
950 ["[0-9]+\\.[0-9]+([eE][\\-+]?[0-9]+)?", "number.float"],
948 ["0[xX][0-9a-fA-F]+", "number.hex"],
951 ["0[xX][0-9a-fA-F]+", "number.hex"],
@@ -952,49 +955,49 @@ exports.purescriptSyntax = {
952 ["'[^\\\\']'", "string"],
955 ["'[^\\\\']'", "string"],
953 ["(')(@escapes)(')", ["string", "string.escape", "string"]],
956 ["(')(@escapes)(')", ["string", "string.escape", "string"]],
954 ["'", "string.invalid"],
957 ["'", "string.invalid"],
955− ["^[ ]*#.*", "namespace"]
958+ ["^[ ]*#.*", "namespace"],
956 ],
959 ],
957 whitespace: [
960 whitespace: [
958 ["[ \\r\\n]+", ""],
961 ["[ \\r\\n]+", ""],
959 ["{-", "comment", "@comment"],
962 ["{-", "comment", "@comment"],
960− ["--.*$", "comment"]
963+ ["--.*$", "comment"],
961 ],
964 ],
962 comment: [
965 comment: [
963 ["[^\\{\\-]+", "comment"],
966 ["[^\\{\\-]+", "comment"],
964 ["{-", "comment", "@push"],
967 ["{-", "comment", "@push"],
965 ["-}", "comment", "@pop"],
968 ["-}", "comment", "@pop"],
966− ["[\\{\\-]", "comment"]
969+ ["[\\{\\-]", "comment"],
967 ],
970 ],
968 string: [
971 string: [
969 ['[^\\\\"]+', "string"],
972 ['[^\\\\"]+', "string"],
970 ["@escapes", "string.escape"],
973 ["@escapes", "string.escape"],
971 ["\\\\.", "string.escape.invalid"],
974 ["\\\\.", "string.escape.invalid"],
972− ['"', { token: "string.quote", bracket: "@close", next: "@pop" }]
975+ ['"', { token: "string.quote", bracket: "@close", next: "@pop" }],
973 ],
976 ],
974 type_type: [
977 type_type: [
975 ["\\=", "keyword"],
978 ["\\=", "keyword"],
976 ["^\\s*(?!\\-\\-|\\{\\-)[^\\s]", { token: "@rematch", next: "@pop" }],
979 ["^\\s*(?!\\-\\-|\\{\\-)[^\\s]", { token: "@rematch", next: "@pop" }],
977− { include: "@type" }
980+ { include: "@type" },
978 ],
981 ],
979 type_data: [
982 type_data: [
980 ["([=|])(\\s*)([A-Z]@idchars)", ["keyword.operator", "", "constructor"]],
983 ["([=|])(\\s*)([A-Z]@idchars)", ["keyword.operator", "", "constructor"]],
981 ["^\\s*$", { token: "", next: "@pop" }],
984 ["^\\s*$", { token: "", next: "@pop" }],
982− { include: "@type" }
985+ { include: "@type" },
983 ],
986 ],
984 type_line: [
987 type_line: [
985 ["^\\s*(?!\\-\\-|\\{\\-)[_a-z]", { token: "@rematch", next: "@pop" }],
988 ["^\\s*(?!\\-\\-|\\{\\-)[_a-z]", { token: "@rematch", next: "@pop" }],
986 ["[^=]*=", { token: "@rematch", next: "@pop" }],
989 ["[^=]*=", { token: "@rematch", next: "@pop" }],
987− { include: "@type" }
990+ { include: "@type" },
988 ],
991 ],
989 type: [
992 type: [
990 ["[(\\[]", { token: "@brackets.type" }, "@type_nested"],
993 ["[(\\[]", { token: "@brackets.type" }, "@type_nested"],
991− { include: "@type_content" }
994+ { include: "@type_content" },
992 ],
995 ],
993 type_nested: [
996 type_nested: [
994 ["[)\\]]", { token: "@brackets.type" }, "@pop"],
997 ["[)\\]]", { token: "@brackets.type" }, "@pop"],
995 ["[(\\[]", { token: "@brackets.type" }, "@push"],
998 ["[(\\[]", { token: "@brackets.type" }, "@push"],
996 [",", "delimiter.type"],
999 [",", "delimiter.type"],
997− { include: "@type_content" }
1000+ { include: "@type_content" },
998 ],
1001 ],
999 type_content: [
1002 type_content: [
1000 { include: "@whitespace" },
1003 { include: "@whitespace" },
@@ -1002,7 +1005,7 @@ exports.purescriptSyntax = {
1002 ["_@idchars", "type.identifier.typevar"],
1005 ["_@idchars", "type.identifier.typevar"],
1003 [
1006 [
1004 "((?:[A-Z]@idchars\\.)*)([A-Z]@idchars)",
1007 "((?:[A-Z]@idchars\\.)*)([A-Z]@idchars)",
1005− ["type.identifier.namespace", "type.identifier"]
1008+ ["type.identifier.namespace", "type.identifier"],
1006 ],
1009 ],
1007 [
1010 [
1008 "((?:[A-Z]@idchars\\.)*)([a-z]@idchars)",
1011 "((?:[A-Z]@idchars\\.)*)([a-z]@idchars)",
@@ -1010,12 +1013,12 @@ exports.purescriptSyntax = {
1010 cases: {
1013 cases: {
1011 "@typeKeywords": ["type.identifier.namespace", "type.keyword"],
1014 "@typeKeywords": ["type.identifier.namespace", "type.keyword"],
1012 "@keywords": { token: "@rematch", next: "@pop" },
1015 "@keywords": { token: "@rematch", next: "@pop" },
1013− "@default": ["type.identifier.namespace", "type.identifier"]
1016+ "@default": ["type.identifier.namespace", "type.identifier"],
1014− }
1017+ },
1015− }
1018+ },
1016 ],
1019 ],
1017 ["::|->|[\\.:|]", "type.operator"],
1020 ["::|->|[\\.:|]", "type.operator"],
1018− ["[\\s\\S]", "@rematch", "@pop"]
1021+ ["[\\s\\S]", "@rematch", "@pop"],
1019− ]
1022+ ],
1020− }
1023+ },
1021};
1024};
components/src/Yoga/Monaco/Editor.purs+2
@@ -56,6 +56,8 @@ foreign import getValue ∷ Editor -> Effect String
56
56
57foreign import setValue ∷ String -> Editor -> Effect Unit
57foreign import setValue ∷ String -> Editor -> Effect Unit
58
58
59+foreign import colorizeImpl ∷ String -> String -> { tabSize ∷ Int } -> Editor -> Promise String
60+
59foreign import data Monaco ∷ Type
61foreign import data Monaco ∷ Type
60
62
61foreign import data Editor ∷ Type
63foreign import data Editor ∷ Type
components/src/Yoga/Monaco/Editor.ts+234−228
@@ -5,37 +5,42 @@ exports.monacoEditorImpl = async () => {
5 return x.default;
5 return x.default;
6};
6};
7
7
8−exports.getValue = function(editor) {
8+exports.getValue = function (editor) {
9− return function() {
9+ return function () {
10 return editor.getValue();
10 return editor.getValue();
11 };
11 };
12};
12};
13
13
14−exports.setValue = (value: String) => editor => () => editor.setValue(value);
14+exports.colorizeImpl = (text: string) => (languageId: string) => (
15+ options: any
16+) => (editor: any): Promise<string> =>
17+ editor.colorize(text, languageId, options);
15
18
19+exports.setValue = (value: string) => (editor) => () => editor.setValue(value);
20+
16−exports.defineThemeImpl = monacoInstance => name => theme => () =>
21+exports.defineThemeImpl = (monacoInstance) => (name) => (theme) => () =>
17 monacoInstance.editor.defineTheme(name, theme);
22 monacoInstance.editor.defineTheme(name, theme);
18
23
19−exports.setThemeImpl = function(monacoInstance) {
24+exports.setThemeImpl = function (monacoInstance) {
20− return function(theme) {
25+ return function (theme) {
21− return function() {
26+ return function () {
22 return monacoInstance.editor.setTheme(theme);
27 return monacoInstance.editor.setTheme(theme);
23 };
28 };
24 };
29 };
25};
30};
26
31
27−exports.registerLanguageImpl = function(monacoInstance) {
32+exports.registerLanguageImpl = function (monacoInstance) {
28− return function(languageId) {
33+ return function (languageId) {
29− return function() {
34+ return function () {
30 monacoInstance.languages.register({ id: languageId });
35 monacoInstance.languages.register({ id: languageId });
31 };
36 };
32 };
37 };
33};
38};
34
39
35−exports.setMonarchTokensProviderImpl = function(monacoInstance) {
40+exports.setMonarchTokensProviderImpl = function (monacoInstance) {
36− return function(name) {
41+ return function (name) {
37− return function(monarchLanguage) {
42+ return function (monarchLanguage) {
38− return function() {
43+ return function () {
39 return monacoInstance.languages.setMonarchTokensProvider(
44 return monacoInstance.languages.setMonarchTokensProvider(
40 name,
45 name,
41 monarchLanguage
46 monarchLanguage
@@ -45,90 +50,90 @@ exports.setMonarchTokensProviderImpl = function(monacoInstance) {
45 };
50 };
46};
51};
47
52
48−exports.vsCodeTheme = bg => ({
53+exports.vsCodeTheme = (bg) => ({
49 base: "vs",
54 base: "vs",
50 inherit: true,
55 inherit: true,
51 rules: [
56 rules: [
52 {
57 {
53 foreground: "008e00",
58 foreground: "008e00",
54− token: "comment"
59+ token: "comment",
55 },
60 },
56 {
61 {
57 foreground: "7d4726",
62 foreground: "7d4726",
58− token: "meta.preprocessor"
63+ token: "meta.preprocessor",
59 },
64 },
60 {
65 {
61 foreground: "7d4726",
66 foreground: "7d4726",
62− token: "keyword.control.import"
67+ token: "keyword.control.import",
63 },
68 },
64 {
69 {
65 foreground: "df0002",
70 foreground: "df0002",
66− token: "string"
71+ token: "string",
67 },
72 },
68 {
73 {
69 foreground: "3a00dc",
74 foreground: "3a00dc",
70− token: "constant.numeric"
75+ token: "constant.numeric",
71 },
76 },
72 {
77 {
73 foreground: "c800a4",
78 foreground: "c800a4",
74− token: "constant.language"
79+ token: "constant.language",
75 },
80 },
76 {
81 {
77 foreground: "275a5e",
82 foreground: "275a5e",
78− token: "constant.character"
83+ token: "constant.character",
79 },
84 },
80 {
85 {
81 foreground: "275a5e",
86 foreground: "275a5e",
82− token: "constant.other"
87+ token: "constant.other",
83 },
88 },
84 {
89 {
85 foreground: "c800a4",
90 foreground: "c800a4",
86− token: "variable.language"
91+ token: "variable.language",
87 },
92 },
88 {
93 {
89 foreground: "c800a4",
94 foreground: "c800a4",
90− token: "variable.other"
95+ token: "variable.other",
91 },
96 },
92 {
97 {
93 foreground: "c800a4",
98 foreground: "c800a4",
94− token: "keyword"
99+ token: "keyword",
95 },
100 },
96 {
101 {
97 foreground: "c900a4",
102 foreground: "c900a4",
98− token: "storage"
103+ token: "storage",
99 },
104 },
100 {
105 {
101 foreground: "438288",
106 foreground: "438288",
102− token: "entity.name.class"
107+ token: "entity.name.class",
103 },
108 },
104 {
109 {
105 foreground: "790ead",
110 foreground: "790ead",
106− token: "entity.name.tag"
111+ token: "entity.name.tag",
107 },
112 },
108 {
113 {
109 foreground: "450084",
114 foreground: "450084",
110− token: "entity.other.attribute-name"
115+ token: "entity.other.attribute-name",
111 },
116 },
112 {
117 {
113 foreground: "450084",
118 foreground: "450084",
114− token: "support.function"
119+ token: "support.function",
115 },
120 },
116 {
121 {
117 foreground: "450084",
122 foreground: "450084",
118− token: "support.constant"
123+ token: "support.constant",
119 },
124 },
120 {
125 {
121 foreground: "790ead",
126 foreground: "790ead",
122− token: "support.type"
127+ token: "support.type",
123 },
128 },
124 {
129 {
125 foreground: "790ead",
130 foreground: "790ead",
126− token: "support.class"
131+ token: "support.class",
127 },
132 },
128 {
133 {
129 foreground: "790ead",
134 foreground: "790ead",
130− token: "support.other.variable"
135+ token: "support.other.variable",
131− }
136+ },
132 ],
137 ],
133 colors: {
138 colors: {
134 "editor.foreground": "#000000",
139 "editor.foreground": "#000000",
@@ -136,675 +141,676 @@ exports.vsCodeTheme = bg => ({
136 "editor.selectionBackground": "#B5D5FF",
141 "editor.selectionBackground": "#B5D5FF",
137 "editor.lineHighlightBackground": "#00000012",
142 "editor.lineHighlightBackground": "#00000012",
138 "editorCursor.foreground": "#000000",
143 "editorCursor.foreground": "#000000",
139− "editorWhitespace.foreground": "#BFBFBF"
144+ "editorWhitespace.foreground": "#BFBFBF",
140− }
145+ },
141});
146});
142
147
143−exports.nightOwlTheme = bg => ({
148+exports.nightOwlTheme = (bg) => ({
144 base: "vs-dark",
149 base: "vs-dark",
145 inherit: true,
150 inherit: true,
146 rules: [
151 rules: [
147 {
152 {
148 foreground: "637777",
153 foreground: "637777",
149− token: "comment"
154+ token: "comment",
150 },
155 },
151 {
156 {
152 foreground: "addb67",
157 foreground: "addb67",
153− token: "string"
158+ token: "string",
154 },
159 },
155 {
160 {
156 foreground: "ecc48d",
161 foreground: "ecc48d",
157− token: "vstring.quoted"
162+ token: "vstring.quoted",
158 },
163 },
159 {
164 {
160 foreground: "ecc48d",
165 foreground: "ecc48d",
161− token: "variable.other.readwrite.js"
166+ token: "variable.other.readwrite.js",
162 },
167 },
163 {
168 {
164 foreground: "5ca7e4",
169 foreground: "5ca7e4",
165− token: "string.regexp"
170+ token: "string.regexp",
166 },
171 },
167 {
172 {
168 foreground: "5ca7e4",
173 foreground: "5ca7e4",
169− token: "string.regexp keyword.other"
174+ token: "string.regexp keyword.other",
170 },
175 },
171 {
176 {
172 foreground: "5f7e97",
177 foreground: "5f7e97",
173− token: "meta.function punctuation.separator.comma"
178+ token: "meta.function punctuation.separator.comma",
174 },
179 },
175 {
180 {
176 foreground: "f78c6c",
181 foreground: "f78c6c",
177− token: "constant.numeric"
182+ token: "constant.numeric",
178 },
183 },
179 {
184 {
180 foreground: "f78c6c",
185 foreground: "f78c6c",
181− token: "constant.character.numeric"
186+ token: "constant.character.numeric",
182 },
187 },
183 {
188 {
184 foreground: "addb67",
189 foreground: "addb67",
185− token: "variable"
190+ token: "variable",
186 },
191 },
187 {
192 {
188 foreground: "c792ea",
193 foreground: "c792ea",
189− token: "keyword"
194+ token: "keyword",
190 },
195 },
191 {
196 {
192 foreground: "c792ea",
197 foreground: "c792ea",
193− token: "punctuation.accessor"
198+ token: "punctuation.accessor",
194 },
199 },
195 {
200 {
196 foreground: "c792ea",
201 foreground: "c792ea",
197− token: "storage"
202+ token: "storage",
198 },
203 },
199 {
204 {
200 foreground: "c792ea",
205 foreground: "c792ea",
201− token: "meta.var.expr"
206+ token: "meta.var.expr",
202 },
207 },
203 {
208 {
204 foreground: "c792ea",
209 foreground: "c792ea",
210+ token:
205− token: "meta.class meta.method.declaration meta.var.expr storage.type.jsm"
211+ "meta.class meta.method.declaration meta.var.expr storage.type.jsm",
206 },
212 },
207 {
213 {
208 foreground: "c792ea",
214 foreground: "c792ea",
209− token: "storage.type.property.js"
215+ token: "storage.type.property.js",
210 },
216 },
211 {
217 {
212 foreground: "c792ea",
218 foreground: "c792ea",
213− token: "storage.type.property.ts"
219+ token: "storage.type.property.ts",
214 },
220 },
215 {
221 {
216 foreground: "c792ea",
222 foreground: "c792ea",
217− token: "storage.type.property.tsx"
223+ token: "storage.type.property.tsx",
218 },
224 },
219 {
225 {
220 foreground: "82aaff",
226 foreground: "82aaff",
221− token: "storage.type"
227+ token: "storage.type",
222 },
228 },
223 {
229 {
224 foreground: "ffcb8b",
230 foreground: "ffcb8b",
225− token: "entity.name.class"
231+ token: "entity.name.class",
226 },
232 },
227 {
233 {
228 foreground: "ffcb8b",
234 foreground: "ffcb8b",
229− token: "meta.class entity.name.type.class"
235+ token: "meta.class entity.name.type.class",
230 },
236 },
231 {
237 {
232 foreground: "addb67",
238 foreground: "addb67",
233− token: "entity.other.inherited-class"
239+ token: "entity.other.inherited-class",
234 },
240 },
235 {
241 {
236 foreground: "82aaff",
242 foreground: "82aaff",
237− token: "entity.name.function"
243+ token: "entity.name.function",
238 },
244 },
239 {
245 {
240 foreground: "addb67",
246 foreground: "addb67",
241− token: "punctuation.definition.variable"
247+ token: "punctuation.definition.variable",
242 },
248 },
243 {
249 {
244 foreground: "d3423e",
250 foreground: "d3423e",
245− token: "punctuation.section.embedded"
251+ token: "punctuation.section.embedded",
246 },
252 },
247 {
253 {
248 foreground: "d6deeb",
254 foreground: "d6deeb",
249− token: "punctuation.terminator.expression"
255+ token: "punctuation.terminator.expression",
250 },
256 },
251 {
257 {
252 foreground: "d6deeb",
258 foreground: "d6deeb",
253− token: "punctuation.definition.arguments"
259+ token: "punctuation.definition.arguments",
254 },
260 },
255 {
261 {
256 foreground: "d6deeb",
262 foreground: "d6deeb",
257− token: "punctuation.definition.array"
263+ token: "punctuation.definition.array",
258 },
264 },
259 {
265 {
260 foreground: "d6deeb",
266 foreground: "d6deeb",
261− token: "punctuation.section.array"
267+ token: "punctuation.section.array",
262 },
268 },
263 {
269 {
264 foreground: "d6deeb",
270 foreground: "d6deeb",
265− token: "meta.array"
271+ token: "meta.array",
266 },
272 },
267 {
273 {
268 foreground: "d9f5dd",
274 foreground: "d9f5dd",
269− token: "punctuation.definition.list.begin"
275+ token: "punctuation.definition.list.begin",
270 },
276 },
271 {
277 {
272 foreground: "d9f5dd",
278 foreground: "d9f5dd",
273− token: "punctuation.definition.list.end"
279+ token: "punctuation.definition.list.end",
274 },
280 },
275 {
281 {
276 foreground: "d9f5dd",
282 foreground: "d9f5dd",
277− token: "punctuation.separator.arguments"
283+ token: "punctuation.separator.arguments",
278 },
284 },
279 {
285 {
280 foreground: "d9f5dd",
286 foreground: "d9f5dd",
281− token: "punctuation.definition.list"
287+ token: "punctuation.definition.list",
282 },
288 },
283 {
289 {
284 foreground: "d3423e",
290 foreground: "d3423e",
285− token: "string.template meta.template.expression"
291+ token: "string.template meta.template.expression",
286 },
292 },
287 {
293 {
288 foreground: "d6deeb",
294 foreground: "d6deeb",
289− token: "string.template punctuation.definition.string"
295+ token: "string.template punctuation.definition.string",
290 },
296 },
291 {
297 {
292 foreground: "c792ea",
298 foreground: "c792ea",
293 fontStyle: "italic",
299 fontStyle: "italic",
294− token: "italic"
300+ token: "italic",
295 },
301 },
296 {
302 {
297 foreground: "addb67",
303 foreground: "addb67",
298 fontStyle: "bold",
304 fontStyle: "bold",
299− token: "bold"
305+ token: "bold",
300 },
306 },
301 {
307 {
302 foreground: "82aaff",
308 foreground: "82aaff",
303− token: "constant.language"
309+ token: "constant.language",
304 },
310 },
305 {
311 {
306 foreground: "82aaff",
312 foreground: "82aaff",
307− token: "punctuation.definition.constant"
313+ token: "punctuation.definition.constant",
308 },
314 },
309 {
315 {
310 foreground: "82aaff",
316 foreground: "82aaff",
311− token: "variable.other.constant"
317+ token: "variable.other.constant",
312 },
318 },
313 {
319 {
314 foreground: "7fdbca",
320 foreground: "7fdbca",
315− token: "support.function.construct"
321+ token: "support.function.construct",
316 },
322 },
317 {
323 {
318 foreground: "7fdbca",
324 foreground: "7fdbca",
319− token: "keyword.other.new"
325+ token: "keyword.other.new",
320 },
326 },
321 {
327 {
322 foreground: "82aaff",
328 foreground: "82aaff",
323− token: "constant.character"
329+ token: "constant.character",
324 },
330 },
325 {
331 {
326 foreground: "82aaff",
332 foreground: "82aaff",
327− token: "constant.other"
333+ token: "constant.other",
328 },
334 },
329 {
335 {
330 foreground: "f78c6c",
336 foreground: "f78c6c",
331− token: "constant.character.escape"
337+ token: "constant.character.escape",
332 },
338 },
333 {
339 {
334 foreground: "addb67",
340 foreground: "addb67",
335− token: "entity.other.inherited-class"
341+ token: "entity.other.inherited-class",
336 },
342 },
337 {
343 {
338 foreground: "d7dbe0",
344 foreground: "d7dbe0",
339− token: "variable.parameter"
345+ token: "variable.parameter",
340 },
346 },
341 {
347 {
342 foreground: "7fdbca",
348 foreground: "7fdbca",
343− token: "entity.name.tag"
349+ token: "entity.name.tag",
344 },
350 },
345 {
351 {
346 foreground: "cc2996",
352 foreground: "cc2996",
347− token: "punctuation.definition.tag.html"
353+ token: "punctuation.definition.tag.html",
348 },
354 },
349 {
355 {
350 foreground: "cc2996",
356 foreground: "cc2996",
351− token: "punctuation.definition.tag.begin"
357+ token: "punctuation.definition.tag.begin",
352 },
358 },
353 {
359 {
354 foreground: "cc2996",
360 foreground: "cc2996",
355− token: "punctuation.definition.tag.end"
361+ token: "punctuation.definition.tag.end",
356 },
362 },
357 {
363 {
358 foreground: "addb67",
364 foreground: "addb67",
359− token: "entity.other.attribute-name"
365+ token: "entity.other.attribute-name",
360 },
366 },
361 {
367 {
362 foreground: "addb67",
368 foreground: "addb67",
363− token: "entity.name.tag.custom"
369+ token: "entity.name.tag.custom",
364 },
370 },
365 {
371 {
366 foreground: "82aaff",
372 foreground: "82aaff",
367− token: "support.function"
373+ token: "support.function",
368 },
374 },
369 {
375 {
370 foreground: "82aaff",
376 foreground: "82aaff",
371− token: "support.constant"
377+ token: "support.constant",
372 },
378 },
373 {
379 {
374 foreground: "7fdbca",
380 foreground: "7fdbca",
375− token: "upport.constant.meta.property-value"
381+ token: "upport.constant.meta.property-value",
376 },
382 },
377 {
383 {
378 foreground: "addb67",
384 foreground: "addb67",
379− token: "support.type"
385+ token: "support.type",
380 },
386 },
381 {
387 {
382 foreground: "addb67",
388 foreground: "addb67",
383− token: "support.class"
389+ token: "support.class",
384 },
390 },
385 {
391 {
386 foreground: "addb67",
392 foreground: "addb67",
387− token: "support.variable.dom"
393+ token: "support.variable.dom",
388 },
394 },
389 {
395 {
390 foreground: "7fdbca",
396 foreground: "7fdbca",
391− token: "support.constant"
397+ token: "support.constant",
392 },
398 },
393 {
399 {
394 foreground: "7fdbca",
400 foreground: "7fdbca",
395− token: "keyword.other.special-method"
401+ token: "keyword.other.special-method",
396 },
402 },
397 {
403 {
398 foreground: "7fdbca",
404 foreground: "7fdbca",
399− token: "keyword.other.new"
405+ token: "keyword.other.new",
400 },
406 },
401 {
407 {
402 foreground: "7fdbca",
408 foreground: "7fdbca",
403− token: "keyword.other.debugger"
409+ token: "keyword.other.debugger",
404 },
410 },
405 {
411 {
406 foreground: "7fdbca",
412 foreground: "7fdbca",
407− token: "keyword.control"
413+ token: "keyword.control",
408 },
414 },
409 {
415 {
410 foreground: "c792ea",
416 foreground: "c792ea",
411− token: "keyword.operator.comparison"
417+ token: "keyword.operator.comparison",
412 },
418 },
413 {
419 {
414 foreground: "c792ea",
420 foreground: "c792ea",
415− token: "keyword.control.flow.js"
421+ token: "keyword.control.flow.js",
416 },
422 },
417 {
423 {
418 foreground: "c792ea",
424 foreground: "c792ea",
419− token: "keyword.control.flow.ts"
425+ token: "keyword.control.flow.ts",
420 },
426 },
421 {
427 {
422 foreground: "c792ea",
428 foreground: "c792ea",
423− token: "keyword.control.flow.tsx"
429+ token: "keyword.control.flow.tsx",
424 },
430 },
425 {
431 {
426 foreground: "c792ea",
432 foreground: "c792ea",
427− token: "keyword.control.ruby"
433+ token: "keyword.control.ruby",
428 },
434 },
429 {
435 {
430 foreground: "c792ea",
436 foreground: "c792ea",
431− token: "keyword.control.module.ruby"
437+ token: "keyword.control.module.ruby",
432 },
438 },
433 {
439 {
434 foreground: "c792ea",
440 foreground: "c792ea",
435− token: "keyword.control.class.ruby"
441+ token: "keyword.control.class.ruby",
436 },
442 },
437 {
443 {
438 foreground: "c792ea",
444 foreground: "c792ea",
439− token: "keyword.control.def.ruby"
445+ token: "keyword.control.def.ruby",
440 },
446 },
441 {
447 {
442 foreground: "c792ea",
448 foreground: "c792ea",
443− token: "keyword.control.loop.js"
449+ token: "keyword.control.loop.js",
444 },
450 },
445 {
451 {
446 foreground: "c792ea",
452 foreground: "c792ea",
447− token: "keyword.control.loop.ts"
453+ token: "keyword.control.loop.ts",
448 },
454 },
449 {
455 {
450 foreground: "c792ea",
456 foreground: "c792ea",
451− token: "keyword.control.import.js"
457+ token: "keyword.control.import.js",
452 },
458 },
453 {
459 {
454 foreground: "c792ea",
460 foreground: "c792ea",
455− token: "keyword.control.import.ts"
461+ token: "keyword.control.import.ts",
456 },
462 },
457 {
463 {
458 foreground: "c792ea",
464 foreground: "c792ea",
459− token: "keyword.control.import.tsx"
465+ token: "keyword.control.import.tsx",
460 },
466 },
461 {
467 {
462 foreground: "c792ea",
468 foreground: "c792ea",
463− token: "keyword.control.from.js"
469+ token: "keyword.control.from.js",
464 },
470 },
465 {
471 {
466 foreground: "c792ea",
472 foreground: "c792ea",
467− token: "keyword.control.from.ts"
473+ token: "keyword.control.from.ts",
468 },
474 },
469 {
475 {
470 foreground: "c792ea",
476 foreground: "c792ea",
471− token: "keyword.control.from.tsx"
477+ token: "keyword.control.from.tsx",
472 },
478 },
473 {
479 {
474 foreground: "ffffff",
480 foreground: "ffffff",
475 background: "ff2c83",
481 background: "ff2c83",
476− token: "invalid"
482+ token: "invalid",
477 },
483 },
478 {
484 {
479 foreground: "ffffff",
485 foreground: "ffffff",
480 background: "d3423e",
486 background: "d3423e",
481− token: "invalid.deprecated"
487+ token: "invalid.deprecated",
482 },
488 },
483 {
489 {
484 foreground: "7fdbca",
490 foreground: "7fdbca",
485− token: "keyword.operator"
491+ token: "keyword.operator",
486 },
492 },
487 {
493 {
488 foreground: "c792ea",
494 foreground: "c792ea",
489− token: "keyword.operator.relational"
495+ token: "keyword.operator.relational",
490 },
496 },
491 {
497 {
492 foreground: "c792ea",
498 foreground: "c792ea",
493− token: "keyword.operator.assignement"
499+ token: "keyword.operator.assignement",
494 },
500 },
495 {
501 {
496 foreground: "c792ea",
502 foreground: "c792ea",
497− token: "keyword.operator.arithmetic"
503+ token: "keyword.operator.arithmetic",
498 },
504 },
499 {
505 {
500 foreground: "c792ea",
506 foreground: "c792ea",
501− token: "keyword.operator.bitwise"
507+ token: "keyword.operator.bitwise",
502 },
508 },
503 {
509 {
504 foreground: "c792ea",
510 foreground: "c792ea",
505− token: "keyword.operator.increment"
511+ token: "keyword.operator.increment",
506 },
512 },
507 {
513 {
508 foreground: "c792ea",
514 foreground: "c792ea",
509− token: "keyword.operator.ternary"
515+ token: "keyword.operator.ternary",
510 },
516 },
511 {
517 {
512 foreground: "637777",
518 foreground: "637777",
513− token: "comment.line.double-slash"
519+ token: "comment.line.double-slash",
514 },
520 },
515 {
521 {
516 foreground: "cdebf7",
522 foreground: "cdebf7",
517− token: "object"
523+ token: "object",
518 },
524 },
519 {
525 {
520 foreground: "ff5874",
526 foreground: "ff5874",
521− token: "constant.language.null"
527+ token: "constant.language.null",
522 },
528 },
523 {
529 {
524 foreground: "d6deeb",
530 foreground: "d6deeb",
525− token: "meta.brace"
531+ token: "meta.brace",
526 },
532 },
527 {
533 {
528 foreground: "c792ea",
534 foreground: "c792ea",
529− token: "meta.delimiter.period"
535+ token: "meta.delimiter.period",
530 },
536 },
531 {
537 {
532 foreground: "d9f5dd",
538 foreground: "d9f5dd",
533− token: "punctuation.definition.string"
539+ token: "punctuation.definition.string",
534 },
540 },
535 {
541 {
536 foreground: "ff5874",
542 foreground: "ff5874",
537− token: "constant.language.boolean"
543+ token: "constant.language.boolean",
538 },
544 },
539 {
545 {
540 foreground: "ffffff",
546 foreground: "ffffff",
541− token: "object.comma"
547+ token: "object.comma",
542 },
548 },
543 {
549 {
544 foreground: "7fdbca",
550 foreground: "7fdbca",
545− token: "variable.parameter.function"
551+ token: "variable.parameter.function",
546 },
552 },
547 {
553 {
548 foreground: "80cbc4",
554 foreground: "80cbc4",
549− token: "support.type.vendor.property-name"
555+ token: "support.type.vendor.property-name",
550 },
556 },
551 {
557 {
552 foreground: "80cbc4",
558 foreground: "80cbc4",
553− token: "support.constant.vendor.property-value"
559+ token: "support.constant.vendor.property-value",
554 },
560 },
555 {
561 {
556 foreground: "80cbc4",
562 foreground: "80cbc4",
557− token: "support.type.property-name"
563+ token: "support.type.property-name",
558 },
564 },
559 {
565 {
560 foreground: "80cbc4",
566 foreground: "80cbc4",
561− token: "meta.property-list entity.name.tag"
567+ token: "meta.property-list entity.name.tag",
562 },
568 },
563 {
569 {
564 foreground: "57eaf1",
570 foreground: "57eaf1",
565− token: "meta.property-list entity.name.tag.reference"
571+ token: "meta.property-list entity.name.tag.reference",
566 },
572 },
567 {
573 {
568 foreground: "f78c6c",
574 foreground: "f78c6c",
569− token: "constant.other.color.rgb-value punctuation.definition.constant"
575+ token: "constant.other.color.rgb-value punctuation.definition.constant",
570 },
576 },
571 {
577 {
572 foreground: "ffeb95",
578 foreground: "ffeb95",
573− token: "constant.other.color"
579+ token: "constant.other.color",
574 },
580 },
575 {
581 {
576 foreground: "ffeb95",
582 foreground: "ffeb95",
577− token: "keyword.other.unit"
583+ token: "keyword.other.unit",
578 },
584 },
579 {
585 {
580 foreground: "c792ea",
586 foreground: "c792ea",
581− token: "meta.selector"
587+ token: "meta.selector",
582 },
588 },
583 {
589 {
584 foreground: "fad430",
590 foreground: "fad430",
585− token: "entity.other.attribute-name.id"
591+ token: "entity.other.attribute-name.id",
586 },
592 },
587 {
593 {
588 foreground: "80cbc4",
594 foreground: "80cbc4",
589− token: "meta.property-name"
595+ token: "meta.property-name",
590 },
596 },
591 {
597 {
592 foreground: "c792ea",
598 foreground: "c792ea",
593− token: "entity.name.tag.doctype"
599+ token: "entity.name.tag.doctype",
594 },
600 },
595 {
601 {
596 foreground: "c792ea",
602 foreground: "c792ea",
597− token: "meta.tag.sgml.doctype"
603+ token: "meta.tag.sgml.doctype",
598 },
604 },
599 {
605 {
600 foreground: "d9f5dd",
606 foreground: "d9f5dd",
601− token: "punctuation.definition.parameters"
607+ token: "punctuation.definition.parameters",
602 },
608 },
603 {
609 {
604 foreground: "ecc48d",
610 foreground: "ecc48d",
605− token: "string.quoted"
611+ token: "string.quoted",
606 },
612 },
607 {
613 {
608 foreground: "ecc48d",
614 foreground: "ecc48d",
609− token: "string.quoted.double"
615+ token: "string.quoted.double",
610 },
616 },
611 {
617 {
612 foreground: "ecc48d",
618 foreground: "ecc48d",
613− token: "string.quoted.single"
619+ token: "string.quoted.single",
614 },
620 },
615 {
621 {
616 foreground: "addb67",
622 foreground: "addb67",
617− token: "support.constant.math"
623+ token: "support.constant.math",
618 },
624 },
619 {
625 {
620 foreground: "addb67",
626 foreground: "addb67",
621− token: "support.type.property-name.json"
627+ token: "support.type.property-name.json",
622 },
628 },
623 {
629 {
624 foreground: "addb67",
630 foreground: "addb67",
625− token: "support.constant.json"
631+ token: "support.constant.json",
626 },
632 },
627 {
633 {
628 foreground: "c789d6",
634 foreground: "c789d6",
629− token: "meta.structure.dictionary.value.json string.quoted.double"
635+ token: "meta.structure.dictionary.value.json string.quoted.double",
630 },
636 },
631 {
637 {
632 foreground: "80cbc4",
638 foreground: "80cbc4",
633− token: "string.quoted.double.json punctuation.definition.string.json"
639+ token: "string.quoted.double.json punctuation.definition.string.json",
634 },
640 },
635 {
641 {
636 foreground: "ff5874",
642 foreground: "ff5874",
637 token:
643 token:
638− "meta.structure.dictionary.json meta.structure.dictionary.value constant.language"
644+ "meta.structure.dictionary.json meta.structure.dictionary.value constant.language",
639 },
645 },
640 {
646 {
641 foreground: "d6deeb",
647 foreground: "d6deeb",
642− token: "variable.other.ruby"
648+ token: "variable.other.ruby",
643 },
649 },
644 {
650 {
645 foreground: "ecc48d",
651 foreground: "ecc48d",
646− token: "entity.name.type.class.ruby"
652+ token: "entity.name.type.class.ruby",
647 },
653 },
648 {
654 {
649 foreground: "ecc48d",
655 foreground: "ecc48d",
650− token: "keyword.control.class.ruby"
656+ token: "keyword.control.class.ruby",
651 },
657 },
652 {
658 {
653 foreground: "ecc48d",
659 foreground: "ecc48d",
654− token: "meta.class.ruby"
660+ token: "meta.class.ruby",
655 },
661 },
656 {
662 {
657 foreground: "7fdbca",
663 foreground: "7fdbca",
658− token: "constant.language.symbol.hashkey.ruby"
664+ token: "constant.language.symbol.hashkey.ruby",
659 },
665 },
660 {
666 {
661 foreground: "e0eddd",
667 foreground: "e0eddd",
662 background: "a57706",
668 background: "a57706",
663 fontStyle: "italic",
669 fontStyle: "italic",
664− token: "meta.diff"
670+ token: "meta.diff",
665 },
671 },
666 {
672 {
667 foreground: "e0eddd",
673 foreground: "e0eddd",
668 background: "a57706",
674 background: "a57706",
669 fontStyle: "italic",
675 fontStyle: "italic",
670− token: "meta.diff.header"
676+ token: "meta.diff.header",
671 },
677 },
672 {
678 {
673 foreground: "ef535090",
679 foreground: "ef535090",
674 fontStyle: "italic",
680 fontStyle: "italic",
675− token: "markup.deleted"
681+ token: "markup.deleted",
676 },
682 },
677 {
683 {
678 foreground: "a2bffc",
684 foreground: "a2bffc",
679 fontStyle: "italic",
685 fontStyle: "italic",
680− token: "markup.changed"
686+ token: "markup.changed",
681 },
687 },
682 {
688 {
683 foreground: "a2bffc",
689 foreground: "a2bffc",
684 fontStyle: "italic",
690 fontStyle: "italic",
685− token: "meta.diff.header.git"
691+ token: "meta.diff.header.git",
686 },
692 },
687 {
693 {
688 foreground: "a2bffc",
694 foreground: "a2bffc",
689 fontStyle: "italic",
695 fontStyle: "italic",
690− token: "meta.diff.header.from-file"
696+ token: "meta.diff.header.from-file",
691 },
697 },
692 {
698 {
693 foreground: "a2bffc",
699 foreground: "a2bffc",
694 fontStyle: "italic",
700 fontStyle: "italic",
695− token: "meta.diff.header.to-file"
701+ token: "meta.diff.header.to-file",
696 },
702 },
697 {
703 {
698 foreground: "219186",
704 foreground: "219186",
699 background: "eae3ca",
705 background: "eae3ca",
700− token: "markup.inserted"
706+ token: "markup.inserted",
701 },
707 },
702 {
708 {
703 foreground: "d3201f",
709 foreground: "d3201f",
704− token: "other.package.exclude"
710+ token: "other.package.exclude",
705 },
711 },
706 {
712 {
707 foreground: "d3201f",
713 foreground: "d3201f",
708− token: "other.remove"
714+ token: "other.remove",
709 },
715 },
710 {
716 {
711 foreground: "269186",
717 foreground: "269186",
712− token: "other.add"
718+ token: "other.add",
713 },
719 },
714 {
720 {
715 foreground: "ff5874",
721 foreground: "ff5874",
716− token: "constant.language.python"
722+ token: "constant.language.python",
717 },
723 },
718 {
724 {
719 foreground: "82aaff",
725 foreground: "82aaff",
720− token: "variable.parameter.function.python"
726+ token: "variable.parameter.function.python",
721 },
727 },
722 {
728 {
723 foreground: "82aaff",
729 foreground: "82aaff",
724− token: "meta.function-call.arguments.python"
730+ token: "meta.function-call.arguments.python",
725 },
731 },
726 {
732 {
727 foreground: "b2ccd6",
733 foreground: "b2ccd6",
728− token: "meta.function-call.python"
734+ token: "meta.function-call.python",
729 },
735 },
730 {
736 {
731 foreground: "b2ccd6",
737 foreground: "b2ccd6",
732− token: "meta.function-call.generic.python"
738+ token: "meta.function-call.generic.python",
733 },
739 },
734 {
740 {
735 foreground: "d6deeb",
741 foreground: "d6deeb",
736− token: "punctuation.python"
742+ token: "punctuation.python",
737 },
743 },
738 {
744 {
739 foreground: "addb67",
745 foreground: "addb67",
740− token: "entity.name.function.decorator.python"
746+ token: "entity.name.function.decorator.python",
741 },
747 },
742 {
748 {
743 foreground: "8eace3",
749 foreground: "8eace3",
744− token: "source.python variable.language.special"
750+ token: "source.python variable.language.special",
745 },
751 },
746 {
752 {
747 foreground: "82b1ff",
753 foreground: "82b1ff",
748− token: "markup.heading.markdown"
754+ token: "markup.heading.markdown",
749 },
755 },
750 {
756 {
751 foreground: "c792ea",
757 foreground: "c792ea",
752 fontStyle: "italic",
758 fontStyle: "italic",
753− token: "markup.italic.markdown"
759+ token: "markup.italic.markdown",
754 },
760 },
755 {
761 {
756 foreground: "addb67",
762 foreground: "addb67",
757 fontStyle: "bold",
763 fontStyle: "bold",
758− token: "markup.bold.markdown"
764+ token: "markup.bold.markdown",
759 },
765 },
760 {
766 {
761 foreground: "697098",
767 foreground: "697098",
762− token: "markup.quote.markdown"
768+ token: "markup.quote.markdown",
763 },
769 },
764 {
770 {
765 foreground: "80cbc4",
771 foreground: "80cbc4",
766− token: "markup.inline.raw.markdown"
772+ token: "markup.inline.raw.markdown",
767 },
773 },
768 {
774 {
769 foreground: "ff869a",
775 foreground: "ff869a",
770− token: "markup.underline.link.markdown"
776+ token: "markup.underline.link.markdown",
771 },
777 },
772 {
778 {
773 foreground: "ff869a",
779 foreground: "ff869a",
774− token: "markup.underline.link.image.markdown"
780+ token: "markup.underline.link.image.markdown",
775 },
781 },
776 {
782 {
777 foreground: "d6deeb",
783 foreground: "d6deeb",
778− token: "string.other.link.title.markdown"
784+ token: "string.other.link.title.markdown",
779 },
785 },
780 {
786 {
781 foreground: "d6deeb",
787 foreground: "d6deeb",
782− token: "string.other.link.description.markdown"
788+ token: "string.other.link.description.markdown",
783 },
789 },
784 {
790 {
785 foreground: "82b1ff",
791 foreground: "82b1ff",
786− token: "punctuation.definition.string.markdown"
792+ token: "punctuation.definition.string.markdown",
787 },
793 },
788 {
794 {
789 foreground: "82b1ff",
795 foreground: "82b1ff",
790− token: "punctuation.definition.string.begin.markdown"
796+ token: "punctuation.definition.string.begin.markdown",
791 },
797 },
792 {
798 {
793 foreground: "82b1ff",
799 foreground: "82b1ff",
794− token: "punctuation.definition.string.end.markdown"
800+ token: "punctuation.definition.string.end.markdown",
795 },
801 },
796 {
802 {
797 foreground: "82b1ff",
803 foreground: "82b1ff",
798− token: "meta.link.inline.markdown punctuation.definition.string"
804+ token: "meta.link.inline.markdown punctuation.definition.string",
799 },
805 },
800 {
806 {
801 foreground: "7fdbca",
807 foreground: "7fdbca",
802− token: "punctuation.definition.metadata.markdown"
808+ token: "punctuation.definition.metadata.markdown",
803 },
809 },
804 {
810 {
805 foreground: "82b1ff",
811 foreground: "82b1ff",
806− token: "beginning.punctuation.definition.list.markdown"
812+ token: "beginning.punctuation.definition.list.markdown",
807− }
813+ },
808 ],
814 ],
809 colors: {
815 colors: {
810 "editor.foreground": "#d6deeb",
816 "editor.foreground": "#d6deeb",
@@ -815,8 +821,8 @@ exports.nightOwlTheme = bg => ({
815 "editorCursor.foreground": "#80a4c2",
821 "editorCursor.foreground": "#80a4c2",
816 "editorWhitespace.foreground": "#2e2040",
822 "editorWhitespace.foreground": "#2e2040",
817 "editorIndentGuide.background": "#5e81ce52",
823 "editorIndentGuide.background": "#5e81ce52",
818− "editor.selectionHighlightBorder": "#122d42"
824+ "editor.selectionHighlightBorder": "#122d42",
819− }
825+ },
820});
826});
821
827
822exports.purescriptSyntax = {
828exports.purescriptSyntax = {
@@ -861,7 +867,7 @@ exports.purescriptSyntax = {
861 "|",
867 "|",
862 "foreign",
868 "foreign",
863 "forall",
869 "forall",
864− "∷"
870+ "∷",
865 ],
871 ],
866
872
867 extraKeywords: [],
873 extraKeywords: [],
@@ -882,11 +888,11 @@ exports.purescriptSyntax = {
882 root: [
888 root: [
883 [
889 [
884 "((?:[A-Z]@idchars\\.)+)([a-z]@idchars)",
890 "((?:[A-Z]@idchars\\.)+)([a-z]@idchars)",
885− ["identifier.namespace", "identifier"]
891+ ["identifier.namespace", "identifier"],
886 ],
892 ],
887 [
893 [
888 "((?:[A-Z]@idchars\\.)+)([A-Z]@idchars)",
894 "((?:[A-Z]@idchars\\.)+)([A-Z]@idchars)",
889− ["identifier.namespace", "constructor"]
895+ ["identifier.namespace", "constructor"],
890 ],
896 ],
891
897
892 [
898 [
@@ -897,9 +903,9 @@ exports.purescriptSyntax = {
897 "@typeStart": { token: "keyword", next: "@type_type" },
903 "@typeStart": { token: "keyword", next: "@type_type" },
898 "@keywords": "keyword",
904 "@keywords": "keyword",
899 "@extraKeywords": "keyword",
905 "@extraKeywords": "keyword",
900− "@default": "identifier"
906+ "@default": "identifier",
901− }
907+ },
902− }
908+ },
903 ],
909 ],
904
910
905 ["[A-Z]@idchars", "type.identifier"],
911 ["[A-Z]@idchars", "type.identifier"],
@@ -920,9 +926,9 @@ exports.purescriptSyntax = {
920 cases: {
926 cases: {
921 "@keywords": "keyword.operator",
927 "@keywords": "keyword.operator",
922 "@extraKeywords": "keyword.operator",
928 "@extraKeywords": "keyword.operator",
923− "@default": "operator"
929+ "@default": "operator",
924− }
930+ },
925− }
931+ },
926 ],
932 ],
927
933
928 ["[0-9]+\\.[0-9]+([eE][\\-+]?[0-9]+)?", "number.float"],
934 ["[0-9]+\\.[0-9]+([eE][\\-+]?[0-9]+)?", "number.float"],
@@ -936,57 +942,57 @@ exports.purescriptSyntax = {
936 ["(')(@escapes)(')", ["string", "string.escape", "string"]],
942 ["(')(@escapes)(')", ["string", "string.escape", "string"]],
937 ["'", "string.invalid"],
943 ["'", "string.invalid"],
938
944
939− ["^[ ]*#.*", "namespace"]
945+ ["^[ ]*#.*", "namespace"],
940 ],
946 ],
941
947
942 whitespace: [
948 whitespace: [
943 ["[ \\r\\n]+", ""],
949 ["[ \\r\\n]+", ""],
944 ["{-", "comment", "@comment"],
950 ["{-", "comment", "@comment"],
945− ["--.*$", "comment"]
951+ ["--.*$", "comment"],
946 ],
952 ],
947
953
948 comment: [
954 comment: [
949 ["[^\\{\\-]+", "comment"],
955 ["[^\\{\\-]+", "comment"],
950 ["{-", "comment", "@push"],
956 ["{-", "comment", "@push"],
951 ["-}", "comment", "@pop"],
957 ["-}", "comment", "@pop"],
952− ["[\\{\\-]", "comment"]
958+ ["[\\{\\-]", "comment"],
953 ],
959 ],
954
960
955 string: [
961 string: [
956 ['[^\\\\"]+', "string"],
962 ['[^\\\\"]+', "string"],
957 ["@escapes", "string.escape"],
963 ["@escapes", "string.escape"],
958 ["\\\\.", "string.escape.invalid"],
964 ["\\\\.", "string.escape.invalid"],
959− ['"', { token: "string.quote", bracket: "@close", next: "@pop" }]
965+ ['"', { token: "string.quote", bracket: "@close", next: "@pop" }],
960 ],
966 ],
961
967
962 type_type: [
968 type_type: [
963 ["\\=", "keyword"],
969 ["\\=", "keyword"],
964 ["^\\s*(?!\\-\\-|\\{\\-)[^\\s]", { token: "@rematch", next: "@pop" }],
970 ["^\\s*(?!\\-\\-|\\{\\-)[^\\s]", { token: "@rematch", next: "@pop" }],
965− { include: "@type" }
971+ { include: "@type" },
966 ],
972 ],
967
973
968 type_data: [
974 type_data: [
969 ["([=|])(\\s*)([A-Z]@idchars)", ["keyword.operator", "", "constructor"]],
975 ["([=|])(\\s*)([A-Z]@idchars)", ["keyword.operator", "", "constructor"]],
970 ["^\\s*$", { token: "", next: "@pop" }],
976 ["^\\s*$", { token: "", next: "@pop" }],
971− { include: "@type" }
977+ { include: "@type" },
972 ],
978 ],
973
979
974 type_line: [
980 type_line: [
975 ["^\\s*(?!\\-\\-|\\{\\-)[_a-z]", { token: "@rematch", next: "@pop" }],
981 ["^\\s*(?!\\-\\-|\\{\\-)[_a-z]", { token: "@rematch", next: "@pop" }],
976 ["[^=]*=", { token: "@rematch", next: "@pop" }],
982 ["[^=]*=", { token: "@rematch", next: "@pop" }],
977− { include: "@type" }
983+ { include: "@type" },
978 ],
984 ],
979
985
980 type: [
986 type: [
981 ["[(\\[]", { token: "@brackets.type" }, "@type_nested"],
987 ["[(\\[]", { token: "@brackets.type" }, "@type_nested"],
982− { include: "@type_content" }
988+ { include: "@type_content" },
983 ],
989 ],
984
990
985 type_nested: [
991 type_nested: [
986 ["[)\\]]", { token: "@brackets.type" }, "@pop"],
992 ["[)\\]]", { token: "@brackets.type" }, "@pop"],
987 ["[(\\[]", { token: "@brackets.type" }, "@push"],
993 ["[(\\[]", { token: "@brackets.type" }, "@push"],
988 [",", "delimiter.type"],
994 [",", "delimiter.type"],
989− { include: "@type_content" }
995+ { include: "@type_content" },
990 ],
996 ],
991
997
992 type_content: [
998 type_content: [
@@ -997,7 +1003,7 @@ exports.purescriptSyntax = {
997
1003
998 [
1004 [
999 "((?:[A-Z]@idchars\\.)*)([A-Z]@idchars)",
1005 "((?:[A-Z]@idchars\\.)*)([A-Z]@idchars)",
1000− ["type.identifier.namespace", "type.identifier"]
1006+ ["type.identifier.namespace", "type.identifier"],
1001 ],
1007 ],
1002 [
1008 [
1003 "((?:[A-Z]@idchars\\.)*)([a-z]@idchars)",
1009 "((?:[A-Z]@idchars\\.)*)([a-z]@idchars)",
@@ -1005,13 +1011,13 @@ exports.purescriptSyntax = {
1005 cases: {
1011 cases: {
1006 "@typeKeywords": ["type.identifier.namespace", "type.keyword"],
1012 "@typeKeywords": ["type.identifier.namespace", "type.keyword"],
1007 "@keywords": { token: "@rematch", next: "@pop" },
1013 "@keywords": { token: "@rematch", next: "@pop" },
1008− "@default": ["type.identifier.namespace", "type.identifier"]
1014+ "@default": ["type.identifier.namespace", "type.identifier"],
1009− }
1015+ },
1010− }
1016+ },
1011 ],
1017 ],
1012
1018
1013 ["::|->|[\\.:|]", "type.operator"],
1019 ["::|->|[\\.:|]", "type.operator"],
1014− ["[\\s\\S]", "@rematch", "@pop"]
1020+ ["[\\s\\S]", "@rematch", "@pop"],
1015− ]
1021+ ],
1016− }
1022+ },
1017};
1023};
components/src/Yoga/Theme.purs+2−2
@@ -76,9 +76,9 @@ fromTheme theme =
76 >>> RB.insert (f ∷ _ "highlightColourDark")
76 >>> RB.insert (f ∷ _ "highlightColourDark")
77 (theme.highlightColour # darken 0.2 # desaturate 0.35)
77 (theme.highlightColour # darken 0.2 # desaturate 0.35)
78 >>> RB.insert (f ∷ _ "highlightColourRotatedForwards")
78 >>> RB.insert (f ∷ _ "highlightColourRotatedForwards")
79− (theme.highlightColour # rotateHue (20.0))
79+ (theme.highlightColour # rotateHue (30.0))
80 >>> RB.insert (f ∷ _ "highlightColourRotatedBackwards")
80 >>> RB.insert (f ∷ _ "highlightColourRotatedBackwards")
81− (theme.highlightColour # rotateHue (-20.0))
81+ (theme.highlightColour # rotateHue (-30.0))
82 -- altHighlight
82 -- altHighlight
83
83
84 >>> RB.insert (f ∷ _ "altHighlightColourDark")
84 >>> RB.insert (f ∷ _ "altHighlightColourDark")
components/src/Yoga/Theme/Default.purs+2−3
@@ -16,11 +16,10 @@ hex c = c # Color.fromHexString # fromMaybe' \_ -> unsafeCrashWith $ "Invalid he
16
16
17darkTheme ∷ Theme
17darkTheme ∷ Theme
18darkTheme =
18darkTheme =
19− { backgroundColour: Color.hsl 228.0 0.12 0.20
19+ { backgroundColour: Color.hsl 238.0 0.12 0.20
20 , textColour: Color.hsl 225.0 0.28 0.90
20 , textColour: Color.hsl 225.0 0.28 0.90
21 , interfaceColour: Color.hsl 225.0 0.48 0.12
21 , interfaceColour: Color.hsl 225.0 0.48 0.12
22− , highlightColour: Color.hsl 300.0 0.58 0.77
22+ , highlightColour: Color.hsl 265.0 0.58 0.77
23− -- , highlightColour: Color.hsl 33.0 0.37 0.8
24 , altHighlightColour: Color.hsl 84.0 0.617 0.631
23 , altHighlightColour: Color.hsl 84.0 0.617 0.631
25 , textFontFamily: cons' "Rubik" systemFontStack
24 , textFontFamily: cons' "Rubik" systemFontStack
26 , headingFontFamily: cons' "Rubik" systemFontStack
25 , headingFontFamily: cons' "Rubik" systemFontStack