@vc-shell/framework 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/apl-B2DGVGxc.js +76 -0
  3. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  4. package/dist/asn1-jKiBa2Ya.js +95 -0
  5. package/dist/asterisk-DS281yxp.js +271 -0
  6. package/dist/brainfuck-C_p9pTT8.js +34 -0
  7. package/dist/clike-BUuHEmgZ.js +620 -0
  8. package/dist/clojure-CCKyeQKf.js +800 -0
  9. package/dist/cmake-CuaCgAKt.js +28 -0
  10. package/dist/cobol-BlTKFDRj.js +72 -0
  11. package/dist/coffeescript-BVCvwO8I.js +179 -0
  12. package/dist/commonlisp-D_kxz07b.js +75 -0
  13. package/dist/crystal-D309uH6_.js +217 -0
  14. package/dist/css-bIlmDBTK.js +1560 -0
  15. package/dist/cypher-BMq4Fwjl.js +68 -0
  16. package/dist/d-BZcgY6La.js +127 -0
  17. package/dist/diff-Cg9d_RX2.js +18 -0
  18. package/dist/{assets/dockerfile-D0MivFIF.js → dockerfile-DIy8NleC.js} +36 -41
  19. package/dist/dtd-CtLokQ-U.js +84 -0
  20. package/dist/dylan-QYeExnWK.js +234 -0
  21. package/dist/ebnf-DUPDuY4r.js +78 -0
  22. package/dist/ecl-CiXN-g_D.js +121 -0
  23. package/dist/eiffel-yQhjl4T1.js +110 -0
  24. package/dist/elm-CNT9vbN0.js +108 -0
  25. package/dist/erlang-CFOYdy9e.js +487 -0
  26. package/dist/factor-DDOC7X6P.js +65 -0
  27. package/dist/fcl-CPC2WYrI.js +103 -0
  28. package/dist/forth-BmxRyE9S.js +60 -0
  29. package/dist/fortran-9bvPyrOW.js +442 -0
  30. package/dist/framework.js +288 -29
  31. package/dist/gas-BdfkXJT_.js +183 -0
  32. package/dist/gherkin-CJuwpceU.js +34 -0
  33. package/dist/groovy-DZeT_VM-.js +146 -0
  34. package/dist/haskell-Bvt3Qq1t.js +375 -0
  35. package/dist/haxe-70NVW1pR.js +359 -0
  36. package/dist/http-D9LttvKF.js +44 -0
  37. package/dist/idl-B6TRFYjl.js +947 -0
  38. package/dist/{assets/index-BKF-A58l.js → index-BBYKbiRX.js} +79 -92
  39. package/dist/index-BDm0tcWn.js +145680 -0
  40. package/dist/{assets/index-CeeaNa4F.js → index-BDqUaIyQ.js} +136 -167
  41. package/dist/index-BdflTsg6.js +308 -0
  42. package/dist/{assets/index-CtmpJVwa.js → index-BpBTtmQ6.js} +270 -312
  43. package/dist/index-Br0y2YMn.js +58 -0
  44. package/dist/index-CIcET-ZI.js +71 -0
  45. package/dist/index-CYAMpxnu.js +341 -0
  46. package/dist/index-Cf2H7YZ1.js +98 -0
  47. package/dist/{assets/index-Bv_z_qRq.js → index-Ck055pN8.js} +121 -124
  48. package/dist/index-D-fPN3yf.js +75 -0
  49. package/dist/{assets/index-BT8o9-M5.js → index-DJOis7Nc.js} +267 -386
  50. package/dist/index-DKtQMsy4.js +538 -0
  51. package/dist/{assets/index-DMTL7O1s.js → index-DWTsz5bC.js} +570 -586
  52. package/dist/{assets/index-C7zlEJy8.js → index-DuY7BIGm.js} +229 -302
  53. package/dist/{assets/index-B1srGfDb.js → index-o6aSdNED.js} +119 -165
  54. package/dist/index-wfv8ehcx.js +249 -0
  55. package/dist/index.css +9 -18
  56. package/dist/javascript-WMWNx-Vj.js +690 -0
  57. package/dist/jinja2-DnB6dQmV.js +154 -0
  58. package/dist/julia-DpvXAuO6.js +241 -0
  59. package/dist/livescript-CanGTf8u.js +272 -0
  60. package/dist/lua-XplVlWi_.js +217 -0
  61. package/dist/mathematica-jaRHnSxC.js +35 -0
  62. package/dist/mbox-BctzC1hL.js +76 -0
  63. package/dist/mirc-CFBPAOaF.js +72 -0
  64. package/dist/mllike-BSnXJBGA.js +272 -0
  65. package/dist/modelica-vUgVs--1.js +93 -0
  66. package/dist/mscgen-Cpl0NYLN.js +104 -0
  67. package/dist/mumps-CQoS1kWX.js +25 -0
  68. package/dist/nginx-zDPm3Z74.js +89 -0
  69. package/dist/nsis-fePjrhq7.js +62 -0
  70. package/dist/ntriples-CsNjv2QF.js +79 -0
  71. package/dist/octave-C8PmmSRH.js +143 -0
  72. package/dist/oz-Ce8aN8oE.js +151 -0
  73. package/dist/pascal-De0D6mP7.js +77 -0
  74. package/dist/perl-B4bSCe1C.js +915 -0
  75. package/dist/pig-D24Z8EXi.js +54 -0
  76. package/dist/powershell-DkYVfTzP.js +249 -0
  77. package/dist/properties-Dn9wna3M.js +26 -0
  78. package/dist/protobuf-BPIjwpzm.js +49 -0
  79. package/dist/pug-BqUR2bBq.js +248 -0
  80. package/dist/puppet-nyd4dhjf.js +45 -0
  81. package/dist/python-B5QdSKoL.js +313 -0
  82. package/dist/q-DXjKs-tC.js +83 -0
  83. package/dist/r-LKEuhEGI.js +104 -0
  84. package/dist/rpm-IznJm2Xc.js +57 -0
  85. package/dist/ruby-CcYfvIk6.js +228 -0
  86. package/dist/sas-7E8yHoCW.js +105 -0
  87. package/dist/scheme-DjibxsNh.js +124 -0
  88. package/dist/shell-C0C2sNA_.js +182 -0
  89. package/dist/sieve-Bwz7vjP5.js +72 -0
  90. package/dist/simple-mode-B0dvCdAA.js +89 -0
  91. package/dist/smalltalk-Bhddl2pB.js +48 -0
  92. package/dist/solr-BNlsLglM.js +41 -0
  93. package/dist/sparql-FarWu_Gb.js +197 -0
  94. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  95. package/dist/sql-mMre1Bo3.js +282 -0
  96. package/dist/stex-92raWT1r.js +129 -0
  97. package/dist/stylus-CAdqWld3.js +250 -0
  98. package/dist/swift-DSxqR9R6.js +230 -0
  99. package/dist/tcl-xfoLljhY.js +81 -0
  100. package/dist/textile-D1AWE-pc.js +295 -0
  101. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  102. package/dist/tiki-__Kn3CeS.js +181 -0
  103. package/dist/toml-BHiuTcfn.js +49 -0
  104. package/dist/troff-D2UO-fKf.js +35 -0
  105. package/dist/tsconfig.tsbuildinfo +1 -1
  106. package/dist/ttcn-Bsa4sfRm.js +123 -0
  107. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  108. package/dist/turtle-xwJUxoPV.js +80 -0
  109. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
  110. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
  111. package/dist/vb-c2kQGd6-.js +74 -0
  112. package/dist/vbscript-Dz1TtKsy.js +324 -0
  113. package/dist/velocity-DJd0pTTC.js +96 -0
  114. package/dist/verilog-C4VGD9n1.js +263 -0
  115. package/dist/vhdl-T9HkrbI2.js +106 -0
  116. package/dist/webidl-CjfDENEo.js +155 -0
  117. package/dist/xquery-BUQdORAS.js +422 -0
  118. package/dist/yacas-C0absKBh.js +73 -0
  119. package/dist/z80-C8rPtw-0.js +61 -0
  120. package/package.json +4 -4
  121. package/ui/components/atoms/vc-widget/vc-widget.vue +2 -0
  122. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +65 -32
  123. package/dist/assets/apl-NdZ6-T1z.js +0 -142
  124. package/dist/assets/asciiarmor-CmJEbAuq.js +0 -56
  125. package/dist/assets/asn1-Ctc8K72v.js +0 -192
  126. package/dist/assets/asterisk-D6r__RMF.js +0 -187
  127. package/dist/assets/brainfuck-COwWCBpq.js +0 -70
  128. package/dist/assets/clike-C-PtfL50.js +0 -1019
  129. package/dist/assets/clojure-C2XPrGCa.js +0 -274
  130. package/dist/assets/cmake-BGrEgXCL.js +0 -81
  131. package/dist/assets/cobol-DShPmpZe.js +0 -234
  132. package/dist/assets/coffeescript-BG8vTfSz.js +0 -329
  133. package/dist/assets/commonlisp-8oE2EpEe.js +0 -108
  134. package/dist/assets/core-api-BMLS9FrT.js +0 -8288
  135. package/dist/assets/core-composables-DYxpIWyY.js +0 -1799
  136. package/dist/assets/core-constants-DiKDBbnD.js +0 -83
  137. package/dist/assets/core-directives-QhJx9kWh.js +0 -41
  138. package/dist/assets/core-interceptors-CSjUvxQ0.js +0 -78
  139. package/dist/assets/core-plugins-wv2bDZ0l.js +0 -4919
  140. package/dist/assets/core-services-CAfJRsjs.js +0 -4
  141. package/dist/assets/core-utilities-BTktq_a-.js +0 -33
  142. package/dist/assets/crystal--rIRMl16.js +0 -419
  143. package/dist/assets/css/core-directives-FL4vIIkN.css +0 -73
  144. package/dist/assets/css/fonts-M1mtyV8L.css +0 -305
  145. package/dist/assets/css/icons-css-DbCVsovz.css +0 -41
  146. package/dist/assets/css/shared-components-bnLHdCtf.css +0 -429
  147. package/dist/assets/css/shared-modules-CNOICmYQ.css +0 -45
  148. package/dist/assets/css/styles-C62nDZwV.css +0 -4096
  149. package/dist/assets/css/ui-app-Bh9hmlIB.css +0 -1287
  150. package/dist/assets/css/ui-content-B29jsmK7.css +0 -1187
  151. package/dist/assets/css/ui-controls-CRtfFczw.css +0 -387
  152. package/dist/assets/css/ui-data-CYLxfdUa.css +0 -1555
  153. package/dist/assets/css/ui-form-C3WrWfVl.css +0 -71
  154. package/dist/assets/css/ui-form-fields-DOtHhDeM.css +0 -1360
  155. package/dist/assets/css/ui-helpers-bOoNv5dS.css +0 -37
  156. package/dist/assets/css/ui-indicators-CybQnCoU.css +0 -628
  157. package/dist/assets/css/ui-layout-DyGKgizy.css +0 -251
  158. package/dist/assets/css/ui-media-TWYep8js.css +0 -298
  159. package/dist/assets/css/ui-media-advanced-BGxy3VSB.css +0 -183
  160. package/dist/assets/css/ui-navigation-DcPRn8SB.css +0 -1693
  161. package/dist/assets/css-C_ZeEwz2.js +0 -847
  162. package/dist/assets/cypher-Bayei42D.js +0 -122
  163. package/dist/assets/d-B0hhz6be.js +0 -205
  164. package/dist/assets/diff-DQutOIXs.js +0 -30
  165. package/dist/assets/dtd-C1CeYVnM.js +0 -121
  166. package/dist/assets/dylan-Dm9-uD-A.js +0 -337
  167. package/dist/assets/ebnf-jWG_1Yly.js +0 -151
  168. package/dist/assets/ecl-CgJPA6z9.js +0 -190
  169. package/dist/assets/eiffel-lj7uLahq.js +0 -146
  170. package/dist/assets/elm-Cz7o1ijk.js +0 -230
  171. package/dist/assets/erlang-CyL5QOyR.js +0 -581
  172. package/dist/assets/factor-BVWHwYpu.js +0 -65
  173. package/dist/assets/fcl-DiozYjc8.js +0 -154
  174. package/dist/assets/forth-B7vn5ze0.js +0 -164
  175. package/dist/assets/fortran-D2XNEnBT.js +0 -172
  176. package/dist/assets/gas-B_Tj57Ve.js +0 -343
  177. package/dist/assets/gherkin-CJ6Qk4EZ.js +0 -147
  178. package/dist/assets/groovy-ioGz2WSV.js +0 -228
  179. package/dist/assets/haskell-BHnm1B83.js +0 -239
  180. package/dist/assets/haxe-Bn6Yo6N3.js +0 -490
  181. package/dist/assets/http-BOd5SYCT.js +0 -89
  182. package/dist/assets/idl-FSFk8_xX.js +0 -274
  183. package/dist/assets/index--5fKpGeN.js +0 -792
  184. package/dist/assets/index-0lME64YH.js +0 -342
  185. package/dist/assets/index-B6Ip0FgO.js +0 -437
  186. package/dist/assets/index-BmV05E5M.js +0 -479
  187. package/dist/assets/index-C6MavZDA.js +0 -131
  188. package/dist/assets/index-CwKpgcYl.js +0 -85
  189. package/dist/assets/index-DRUmDL0J.js +0 -59
  190. package/dist/assets/index-DgFC-M9G.js +0 -96
  191. package/dist/assets/javascript-DGrAs70C.js +0 -922
  192. package/dist/assets/jinja2-D9k5QrXv.js +0 -171
  193. package/dist/assets/julia-DM42tOPB.js +0 -369
  194. package/dist/assets/livescript-Dci8HnOi.js +0 -259
  195. package/dist/assets/lua-CByQu4v6.js +0 -137
  196. package/dist/assets/lucide-icons-af0BY3bi.js +0 -34555
  197. package/dist/assets/mathematica-Dkv0uCYF.js +0 -153
  198. package/dist/assets/mbox-CYTvs5kC.js +0 -114
  199. package/dist/assets/mirc-DpgP3GCo.js +0 -176
  200. package/dist/assets/mllike-C6tNn2Yt.js +0 -343
  201. package/dist/assets/modelica-CR6hTSce.js +0 -192
  202. package/dist/assets/mscgen-D0GXtzMS.js +0 -149
  203. package/dist/assets/mumps-Bf1EyDa6.js +0 -129
  204. package/dist/assets/nginx-By9Phklj.js +0 -163
  205. package/dist/assets/nsis-B5ggMLQ9.js +0 -80
  206. package/dist/assets/ntriples-C7VJ7pnm.js +0 -141
  207. package/dist/assets/octave-6yR_ix15.js +0 -112
  208. package/dist/assets/oz-CEUnktiQ.js +0 -235
  209. package/dist/assets/pascal-Dksf1EyF.js +0 -124
  210. package/dist/assets/perl-B99DUQQt.js +0 -819
  211. package/dist/assets/pig-DFeDRta6.js +0 -149
  212. package/dist/assets/powershell-DhwsNWMx.js +0 -381
  213. package/dist/assets/properties-o21uErwC.js +0 -62
  214. package/dist/assets/protobuf-YxlANsmD.js +0 -54
  215. package/dist/assets/pug-bUgjeODZ.js +0 -504
  216. package/dist/assets/puppet-B8WICGYE.js +0 -205
  217. package/dist/assets/python-D3FFx1Id.js +0 -389
  218. package/dist/assets/q-D2Hjhl2C.js +0 -123
  219. package/dist/assets/r-D73k5lac.js +0 -174
  220. package/dist/assets/rpm-Duv_WH0z.js +0 -89
  221. package/dist/assets/ruby-DGCVqZDt.js +0 -287
  222. package/dist/assets/sas-XjPv1Vy5.js +0 -268
  223. package/dist/assets/scheme-DeaA28vt.js +0 -263
  224. package/dist/assets/shared-components-CfAt2hC6.js +0 -1501
  225. package/dist/assets/shared-composables-v9NkNuAe.js +0 -35
  226. package/dist/assets/shared-modules-CDP-H5ZB.js +0 -3588
  227. package/dist/assets/shared-pages-BGRRA5WB.js +0 -20
  228. package/dist/assets/shell-Bx6QZTgx.js +0 -145
  229. package/dist/assets/sieve-CWCD62sW.js +0 -178
  230. package/dist/assets/simple-mode-BAO9cD7H.js +0 -136
  231. package/dist/assets/smalltalk-DSQbF4MF.js +0 -153
  232. package/dist/assets/solr-v_XRf31C.js +0 -80
  233. package/dist/assets/sparql-BrfDqf0-.js +0 -170
  234. package/dist/assets/spreadsheet-Csn84Pef.js +0 -98
  235. package/dist/assets/sql-D4utlq1l.js +0 -480
  236. package/dist/assets/stex-DBkktma-.js +0 -246
  237. package/dist/assets/stylus-ByG-Fd6f.js +0 -750
  238. package/dist/assets/swift-CHbTprt3.js +0 -202
  239. package/dist/assets/tcl-BRlMUELr.js +0 -125
  240. package/dist/assets/textile-CqfTUjd4.js +0 -441
  241. package/dist/assets/tiddlywiki-BrsoM8KB.js +0 -278
  242. package/dist/assets/tiki-D-ivWPkc.js +0 -289
  243. package/dist/assets/toml-t_IhJu83.js +0 -75
  244. package/dist/assets/troff-DckGF2AE.js +0 -64
  245. package/dist/assets/ttcn-B8TAFbRR.js +0 -253
  246. package/dist/assets/ttcn-cfg-NHh25oCM.js +0 -197
  247. package/dist/assets/turtle-D9Js0BlL.js +0 -141
  248. package/dist/assets/ui-app-D31Pr1WY.js +0 -1993
  249. package/dist/assets/ui-content-B7SxH8y9.js +0 -52887
  250. package/dist/assets/ui-controls-nmDJYLmC.js +0 -348
  251. package/dist/assets/ui-data-Ci3b1ye0.js +0 -22901
  252. package/dist/assets/ui-form-Cs5ooOo7.js +0 -159
  253. package/dist/assets/ui-form-fields-DFQi31jT.js +0 -40575
  254. package/dist/assets/ui-helpers-CF-EUlOg.js +0 -1736
  255. package/dist/assets/ui-indicators-mIQeEqha.js +0 -199
  256. package/dist/assets/ui-layout-v2XBQky3.js +0 -320
  257. package/dist/assets/ui-media-WWYrwmZw.js +0 -1259
  258. package/dist/assets/ui-media-advanced-T8ibi153.js +0 -492
  259. package/dist/assets/ui-modals-BdZXzI85.js +0 -2
  260. package/dist/assets/ui-navigation-BtHa6ovW.js +0 -24269
  261. package/dist/assets/utils-DZK5fu48.js +0 -17216
  262. package/dist/assets/vb-CbIGLrpY.js +0 -249
  263. package/dist/assets/vbscript-8ANWle9n.js +0 -320
  264. package/dist/assets/velocity-D6hz3Hzw.js +0 -186
  265. package/dist/assets/verilog-DIV442at.js +0 -565
  266. package/dist/assets/vhdl-BlTiZo_v.js +0 -174
  267. package/dist/assets/vueuse-CTQm4Zh0.js +0 -9308
  268. package/dist/assets/webidl-Cp3tcqdk.js +0 -179
  269. package/dist/assets/xquery-Dd4TBzXv.js +0 -411
  270. package/dist/assets/yacas-DQ1WucF0.js +0 -182
  271. package/dist/assets/z80-P1j44jDI.js +0 -102
@@ -1,847 +0,0 @@
1
- function mkCSS(parserConfig) {
2
- parserConfig = {...defaults, ...parserConfig};
3
- var inline = parserConfig.inline;
4
-
5
- var tokenHooks = parserConfig.tokenHooks,
6
- documentTypes = parserConfig.documentTypes || {},
7
- mediaTypes = parserConfig.mediaTypes || {},
8
- mediaFeatures = parserConfig.mediaFeatures || {},
9
- mediaValueKeywords = parserConfig.mediaValueKeywords || {},
10
- propertyKeywords = parserConfig.propertyKeywords || {},
11
- nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
12
- fontProperties = parserConfig.fontProperties || {},
13
- counterDescriptors = parserConfig.counterDescriptors || {},
14
- colorKeywords = parserConfig.colorKeywords || {},
15
- valueKeywords = parserConfig.valueKeywords || {},
16
- allowNested = parserConfig.allowNested,
17
- lineComment = parserConfig.lineComment,
18
- supportsAtComponent = parserConfig.supportsAtComponent === true,
19
- highlightNonStandardPropertyKeywords = parserConfig.highlightNonStandardPropertyKeywords !== false;
20
-
21
- var type, override;
22
- function ret(style, tp) { type = tp; return style; }
23
-
24
- // Tokenizers
25
-
26
- function tokenBase(stream, state) {
27
- var ch = stream.next();
28
- if (tokenHooks[ch]) {
29
- var result = tokenHooks[ch](stream, state);
30
- if (result !== false) return result;
31
- }
32
- if (ch == "@") {
33
- stream.eatWhile(/[\w\\\-]/);
34
- return ret("def", stream.current());
35
- } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
36
- return ret(null, "compare");
37
- } else if (ch == "\"" || ch == "'") {
38
- state.tokenize = tokenString(ch);
39
- return state.tokenize(stream, state);
40
- } else if (ch == "#") {
41
- stream.eatWhile(/[\w\\\-]/);
42
- return ret("atom", "hash");
43
- } else if (ch == "!") {
44
- stream.match(/^\s*\w*/);
45
- return ret("keyword", "important");
46
- } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
47
- stream.eatWhile(/[\w.%]/);
48
- return ret("number", "unit");
49
- } else if (ch === "-") {
50
- if (/[\d.]/.test(stream.peek())) {
51
- stream.eatWhile(/[\w.%]/);
52
- return ret("number", "unit");
53
- } else if (stream.match(/^-[\w\\\-]*/)) {
54
- stream.eatWhile(/[\w\\\-]/);
55
- if (stream.match(/^\s*:/, false))
56
- return ret("def", "variable-definition");
57
- return ret("variableName", "variable");
58
- } else if (stream.match(/^\w+-/)) {
59
- return ret("meta", "meta");
60
- }
61
- } else if (/[,+>*\/]/.test(ch)) {
62
- return ret(null, "select-op");
63
- } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
64
- return ret("qualifier", "qualifier");
65
- } else if (/[:;{}\[\]\(\)]/.test(ch)) {
66
- return ret(null, ch);
67
- } else if (stream.match(/^[\w-.]+(?=\()/)) {
68
- if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {
69
- state.tokenize = tokenParenthesized;
70
- }
71
- return ret("variableName.function", "variable");
72
- } else if (/[\w\\\-]/.test(ch)) {
73
- stream.eatWhile(/[\w\\\-]/);
74
- return ret("property", "word");
75
- } else {
76
- return ret(null, null);
77
- }
78
- }
79
-
80
- function tokenString(quote) {
81
- return function(stream, state) {
82
- var escaped = false, ch;
83
- while ((ch = stream.next()) != null) {
84
- if (ch == quote && !escaped) {
85
- if (quote == ")") stream.backUp(1);
86
- break;
87
- }
88
- escaped = !escaped && ch == "\\";
89
- }
90
- if (ch == quote || !escaped && quote != ")") state.tokenize = null;
91
- return ret("string", "string");
92
- };
93
- }
94
-
95
- function tokenParenthesized(stream, state) {
96
- stream.next(); // Must be '('
97
- if (!stream.match(/^\s*[\"\')]/, false))
98
- state.tokenize = tokenString(")");
99
- else
100
- state.tokenize = null;
101
- return ret(null, "(");
102
- }
103
-
104
- // Context management
105
-
106
- function Context(type, indent, prev) {
107
- this.type = type;
108
- this.indent = indent;
109
- this.prev = prev;
110
- }
111
-
112
- function pushContext(state, stream, type, indent) {
113
- state.context = new Context(type, stream.indentation() + (indent === false ? 0 : stream.indentUnit), state.context);
114
- return type;
115
- }
116
-
117
- function popContext(state) {
118
- if (state.context.prev)
119
- state.context = state.context.prev;
120
- return state.context.type;
121
- }
122
-
123
- function pass(type, stream, state) {
124
- return states[state.context.type](type, stream, state);
125
- }
126
- function popAndPass(type, stream, state, n) {
127
- for (var i = n || 1; i > 0; i--)
128
- state.context = state.context.prev;
129
- return pass(type, stream, state);
130
- }
131
-
132
- // Parser
133
-
134
- function wordAsValue(stream) {
135
- var word = stream.current().toLowerCase();
136
- if (valueKeywords.hasOwnProperty(word))
137
- override = "atom";
138
- else if (colorKeywords.hasOwnProperty(word))
139
- override = "keyword";
140
- else
141
- override = "variable";
142
- }
143
-
144
- var states = {};
145
-
146
- states.top = function(type, stream, state) {
147
- if (type == "{") {
148
- return pushContext(state, stream, "block");
149
- } else if (type == "}" && state.context.prev) {
150
- return popContext(state);
151
- } else if (supportsAtComponent && /@component/i.test(type)) {
152
- return pushContext(state, stream, "atComponentBlock");
153
- } else if (/^@(-moz-)?document$/i.test(type)) {
154
- return pushContext(state, stream, "documentTypes");
155
- } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
156
- return pushContext(state, stream, "atBlock");
157
- } else if (/^@(font-face|counter-style)/i.test(type)) {
158
- state.stateArg = type;
159
- return "restricted_atBlock_before";
160
- } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
161
- return "keyframes";
162
- } else if (type && type.charAt(0) == "@") {
163
- return pushContext(state, stream, "at");
164
- } else if (type == "hash") {
165
- override = "builtin";
166
- } else if (type == "word") {
167
- override = "tag";
168
- } else if (type == "variable-definition") {
169
- return "maybeprop";
170
- } else if (type == "interpolation") {
171
- return pushContext(state, stream, "interpolation");
172
- } else if (type == ":") {
173
- return "pseudo";
174
- } else if (allowNested && type == "(") {
175
- return pushContext(state, stream, "parens");
176
- }
177
- return state.context.type;
178
- };
179
-
180
- states.block = function(type, stream, state) {
181
- if (type == "word") {
182
- var word = stream.current().toLowerCase();
183
- if (propertyKeywords.hasOwnProperty(word)) {
184
- override = "property";
185
- return "maybeprop";
186
- } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
187
- override = highlightNonStandardPropertyKeywords ? "string.special" : "property";
188
- return "maybeprop";
189
- } else if (allowNested) {
190
- override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
191
- return "block";
192
- } else {
193
- override = "error";
194
- return "maybeprop";
195
- }
196
- } else if (type == "meta") {
197
- return "block";
198
- } else if (!allowNested && (type == "hash" || type == "qualifier")) {
199
- override = "error";
200
- return "block";
201
- } else {
202
- return states.top(type, stream, state);
203
- }
204
- };
205
-
206
- states.maybeprop = function(type, stream, state) {
207
- if (type == ":") return pushContext(state, stream, "prop");
208
- return pass(type, stream, state);
209
- };
210
-
211
- states.prop = function(type, stream, state) {
212
- if (type == ";") return popContext(state);
213
- if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
214
- if (type == "}" || type == "{") return popAndPass(type, stream, state);
215
- if (type == "(") return pushContext(state, stream, "parens");
216
-
217
- if (type == "hash" && !/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(stream.current())) {
218
- override = "error";
219
- } else if (type == "word") {
220
- wordAsValue(stream);
221
- } else if (type == "interpolation") {
222
- return pushContext(state, stream, "interpolation");
223
- }
224
- return "prop";
225
- };
226
-
227
- states.propBlock = function(type, _stream, state) {
228
- if (type == "}") return popContext(state);
229
- if (type == "word") { override = "property"; return "maybeprop"; }
230
- return state.context.type;
231
- };
232
-
233
- states.parens = function(type, stream, state) {
234
- if (type == "{" || type == "}") return popAndPass(type, stream, state);
235
- if (type == ")") return popContext(state);
236
- if (type == "(") return pushContext(state, stream, "parens");
237
- if (type == "interpolation") return pushContext(state, stream, "interpolation");
238
- if (type == "word") wordAsValue(stream);
239
- return "parens";
240
- };
241
-
242
- states.pseudo = function(type, stream, state) {
243
- if (type == "meta") return "pseudo";
244
-
245
- if (type == "word") {
246
- override = "variableName.constant";
247
- return state.context.type;
248
- }
249
- return pass(type, stream, state);
250
- };
251
-
252
- states.documentTypes = function(type, stream, state) {
253
- if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
254
- override = "tag";
255
- return state.context.type;
256
- } else {
257
- return states.atBlock(type, stream, state);
258
- }
259
- };
260
-
261
- states.atBlock = function(type, stream, state) {
262
- if (type == "(") return pushContext(state, stream, "atBlock_parens");
263
- if (type == "}" || type == ";") return popAndPass(type, stream, state);
264
- if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
265
-
266
- if (type == "interpolation") return pushContext(state, stream, "interpolation");
267
-
268
- if (type == "word") {
269
- var word = stream.current().toLowerCase();
270
- if (word == "only" || word == "not" || word == "and" || word == "or")
271
- override = "keyword";
272
- else if (mediaTypes.hasOwnProperty(word))
273
- override = "attribute";
274
- else if (mediaFeatures.hasOwnProperty(word))
275
- override = "property";
276
- else if (mediaValueKeywords.hasOwnProperty(word))
277
- override = "keyword";
278
- else if (propertyKeywords.hasOwnProperty(word))
279
- override = "property";
280
- else if (nonStandardPropertyKeywords.hasOwnProperty(word))
281
- override = highlightNonStandardPropertyKeywords ? "string.special" : "property";
282
- else if (valueKeywords.hasOwnProperty(word))
283
- override = "atom";
284
- else if (colorKeywords.hasOwnProperty(word))
285
- override = "keyword";
286
- else
287
- override = "error";
288
- }
289
- return state.context.type;
290
- };
291
-
292
- states.atComponentBlock = function(type, stream, state) {
293
- if (type == "}")
294
- return popAndPass(type, stream, state);
295
- if (type == "{")
296
- return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
297
- if (type == "word")
298
- override = "error";
299
- return state.context.type;
300
- };
301
-
302
- states.atBlock_parens = function(type, stream, state) {
303
- if (type == ")") return popContext(state);
304
- if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
305
- return states.atBlock(type, stream, state);
306
- };
307
-
308
- states.restricted_atBlock_before = function(type, stream, state) {
309
- if (type == "{")
310
- return pushContext(state, stream, "restricted_atBlock");
311
- if (type == "word" && state.stateArg == "@counter-style") {
312
- override = "variable";
313
- return "restricted_atBlock_before";
314
- }
315
- return pass(type, stream, state);
316
- };
317
-
318
- states.restricted_atBlock = function(type, stream, state) {
319
- if (type == "}") {
320
- state.stateArg = null;
321
- return popContext(state);
322
- }
323
- if (type == "word") {
324
- if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
325
- (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
326
- override = "error";
327
- else
328
- override = "property";
329
- return "maybeprop";
330
- }
331
- return "restricted_atBlock";
332
- };
333
-
334
- states.keyframes = function(type, stream, state) {
335
- if (type == "word") { override = "variable"; return "keyframes"; }
336
- if (type == "{") return pushContext(state, stream, "top");
337
- return pass(type, stream, state);
338
- };
339
-
340
- states.at = function(type, stream, state) {
341
- if (type == ";") return popContext(state);
342
- if (type == "{" || type == "}") return popAndPass(type, stream, state);
343
- if (type == "word") override = "tag";
344
- else if (type == "hash") override = "builtin";
345
- return "at";
346
- };
347
-
348
- states.interpolation = function(type, stream, state) {
349
- if (type == "}") return popContext(state);
350
- if (type == "{" || type == ";") return popAndPass(type, stream, state);
351
- if (type == "word") override = "variable";
352
- else if (type != "variable" && type != "(" && type != ")") override = "error";
353
- return "interpolation";
354
- };
355
-
356
- return {
357
- name: parserConfig.name,
358
- startState: function() {
359
- return {tokenize: null,
360
- state: inline ? "block" : "top",
361
- stateArg: null,
362
- context: new Context(inline ? "block" : "top", 0, null)};
363
- },
364
-
365
- token: function(stream, state) {
366
- if (!state.tokenize && stream.eatSpace()) return null;
367
- var style = (state.tokenize || tokenBase)(stream, state);
368
- if (style && typeof style == "object") {
369
- type = style[1];
370
- style = style[0];
371
- }
372
- override = style;
373
- if (type != "comment")
374
- state.state = states[state.state](type, stream, state);
375
- return override;
376
- },
377
-
378
- indent: function(state, textAfter, iCx) {
379
- var cx = state.context, ch = textAfter && textAfter.charAt(0);
380
- var indent = cx.indent;
381
- if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
382
- if (cx.prev) {
383
- if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
384
- cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
385
- // Resume indentation from parent context.
386
- cx = cx.prev;
387
- indent = cx.indent;
388
- } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
389
- ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
390
- // Dedent relative to current context.
391
- indent = Math.max(0, cx.indent - iCx.unit);
392
- }
393
- }
394
- return indent;
395
- },
396
-
397
- languageData: {
398
- indentOnInput: /^\s*\}$/,
399
- commentTokens: {line: lineComment, block: {open: "/*", close: "*/"}},
400
- autocomplete: allWords
401
- }
402
- };
403
- }
404
- function keySet(array) {
405
- var keys = {};
406
- for (var i = 0; i < array.length; ++i) {
407
- keys[array[i].toLowerCase()] = true;
408
- }
409
- return keys;
410
- }
411
-
412
- var documentTypes_ = [
413
- "domain", "regexp", "url", "url-prefix"
414
- ], documentTypes = keySet(documentTypes_);
415
-
416
- var mediaTypes_ = [
417
- "all", "aural", "braille", "handheld", "print", "projection", "screen",
418
- "tty", "tv", "embossed"
419
- ], mediaTypes = keySet(mediaTypes_);
420
-
421
- var mediaFeatures_ = [
422
- "width", "min-width", "max-width", "height", "min-height", "max-height",
423
- "device-width", "min-device-width", "max-device-width", "device-height",
424
- "min-device-height", "max-device-height", "aspect-ratio",
425
- "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
426
- "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
427
- "max-color", "color-index", "min-color-index", "max-color-index",
428
- "monochrome", "min-monochrome", "max-monochrome", "resolution",
429
- "min-resolution", "max-resolution", "scan", "grid", "orientation",
430
- "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
431
- "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme",
432
- "dynamic-range", "video-dynamic-range"
433
- ], mediaFeatures = keySet(mediaFeatures_);
434
-
435
- var mediaValueKeywords_ = [
436
- "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
437
- "interlace", "progressive",
438
- "dark", "light",
439
- "standard", "high"
440
- ], mediaValueKeywords = keySet(mediaValueKeywords_);
441
-
442
- var propertyKeywords_ = [
443
- "align-content", "align-items", "align-self", "alignment-adjust",
444
- "alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
445
- "animation-direction", "animation-duration", "animation-fill-mode",
446
- "animation-iteration-count", "animation-name", "animation-play-state",
447
- "animation-timing-function", "appearance", "azimuth", "backdrop-filter",
448
- "backface-visibility", "background", "background-attachment",
449
- "background-blend-mode", "background-clip", "background-color",
450
- "background-image", "background-origin", "background-position",
451
- "background-position-x", "background-position-y", "background-repeat",
452
- "background-size", "baseline-shift", "binding", "bleed", "block-size",
453
- "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
454
- "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
455
- "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
456
- "border-collapse", "border-color", "border-image", "border-image-outset",
457
- "border-image-repeat", "border-image-slice", "border-image-source",
458
- "border-image-width", "border-left", "border-left-color", "border-left-style",
459
- "border-left-width", "border-radius", "border-right", "border-right-color",
460
- "border-right-style", "border-right-width", "border-spacing", "border-style",
461
- "border-top", "border-top-color", "border-top-left-radius",
462
- "border-top-right-radius", "border-top-style", "border-top-width",
463
- "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
464
- "break-after", "break-before", "break-inside", "caption-side", "caret-color",
465
- "clear", "clip", "color", "color-profile", "column-count", "column-fill",
466
- "column-gap", "column-rule", "column-rule-color", "column-rule-style",
467
- "column-rule-width", "column-span", "column-width", "columns", "contain",
468
- "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
469
- "cue-before", "cursor", "direction", "display", "dominant-baseline",
470
- "drop-initial-after-adjust", "drop-initial-after-align",
471
- "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
472
- "drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",
473
- "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
474
- "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
475
- "font", "font-family", "font-feature-settings", "font-kerning",
476
- "font-language-override", "font-optical-sizing", "font-size",
477
- "font-size-adjust", "font-stretch", "font-style", "font-synthesis",
478
- "font-variant", "font-variant-alternates", "font-variant-caps",
479
- "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
480
- "font-variant-position", "font-variation-settings", "font-weight", "gap",
481
- "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
482
- "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
483
- "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
484
- "grid-template", "grid-template-areas", "grid-template-columns",
485
- "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
486
- "image-orientation", "image-rendering", "image-resolution", "inline-box-align",
487
- "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
488
- "inset-inline-end", "inset-inline-start", "isolation", "justify-content",
489
- "justify-items", "justify-self", "left", "letter-spacing", "line-break",
490
- "line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
491
- "line-stacking-shift", "line-stacking-strategy", "list-style",
492
- "list-style-image", "list-style-position", "list-style-type", "margin",
493
- "margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
494
- "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
495
- "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
496
- "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
497
- "max-block-size", "max-height", "max-inline-size",
498
- "max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
499
- "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
500
- "nav-up", "object-fit", "object-position", "offset", "offset-anchor",
501
- "offset-distance", "offset-path", "offset-position", "offset-rotate",
502
- "opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
503
- "outline-style", "outline-width", "overflow", "overflow-style",
504
- "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
505
- "padding-left", "padding-right", "padding-top", "page", "page-break-after",
506
- "page-break-before", "page-break-inside", "page-policy", "pause",
507
- "pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
508
- "pitch-range", "place-content", "place-items", "place-self", "play-during",
509
- "position", "presentation-level", "punctuation-trim", "quotes",
510
- "region-break-after", "region-break-before", "region-break-inside",
511
- "region-fragment", "rendering-intent", "resize", "rest", "rest-after",
512
- "rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
513
- "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
514
- "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
515
- "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
516
- "scroll-margin-inline", "scroll-margin-inline-end",
517
- "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
518
- "scroll-margin-top", "scroll-padding", "scroll-padding-block",
519
- "scroll-padding-block-end", "scroll-padding-block-start",
520
- "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
521
- "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
522
- "scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
523
- "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
524
- "size", "speak", "speak-as", "speak-header", "speak-numeral",
525
- "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
526
- "table-layout", "target", "target-name", "target-new", "target-position",
527
- "text-align", "text-align-last", "text-combine-upright", "text-decoration",
528
- "text-decoration-color", "text-decoration-line", "text-decoration-skip",
529
- "text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
530
- "text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
531
- "text-height", "text-indent", "text-justify", "text-orientation",
532
- "text-outline", "text-overflow", "text-rendering", "text-shadow",
533
- "text-size-adjust", "text-space-collapse", "text-transform",
534
- "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
535
- "transform-style", "transition", "transition-delay", "transition-duration",
536
- "transition-property", "transition-timing-function", "translate",
537
- "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
538
- "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
539
- "voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
540
- "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
541
- // SVG-specific
542
- "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
543
- "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
544
- "color-interpolation", "color-interpolation-filters",
545
- "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
546
- "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
547
- "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
548
- "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
549
- "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
550
- "glyph-orientation-vertical", "text-anchor", "writing-mode",
551
- ], propertyKeywords = keySet(propertyKeywords_);
552
-
553
- var nonStandardPropertyKeywords_ = [
554
- "accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",
555
- "border-block-end-color", "border-block-end-style", "border-block-end-width",
556
- "border-block-start", "border-block-start-color", "border-block-start-style",
557
- "border-block-start-width", "border-block-style", "border-block-width",
558
- "border-inline", "border-inline-color", "border-inline-end",
559
- "border-inline-end-color", "border-inline-end-style",
560
- "border-inline-end-width", "border-inline-start", "border-inline-start-color",
561
- "border-inline-start-style", "border-inline-start-width",
562
- "border-inline-style", "border-inline-width", "content-visibility", "margin-block",
563
- "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
564
- "margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",
565
- "padding-block-start", "padding-inline", "padding-inline-end",
566
- "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
567
- "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
568
- "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
569
- "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
570
- "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
571
- ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
572
-
573
- var fontProperties_ = [
574
- "font-display", "font-family", "src", "unicode-range", "font-variant",
575
- "font-feature-settings", "font-stretch", "font-weight", "font-style"
576
- ], fontProperties = keySet(fontProperties_);
577
-
578
- var counterDescriptors_ = [
579
- "additive-symbols", "fallback", "negative", "pad", "prefix", "range",
580
- "speak-as", "suffix", "symbols", "system"
581
- ], counterDescriptors = keySet(counterDescriptors_);
582
-
583
- var colorKeywords_ = [
584
- "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
585
- "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
586
- "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
587
- "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
588
- "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",
589
- "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
590
- "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",
591
- "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
592
- "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
593
- "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
594
- "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
595
- "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
596
- "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
597
- "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",
598
- "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
599
- "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
600
- "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
601
- "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
602
- "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
603
- "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
604
- "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
605
- "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
606
- "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
607
- "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",
608
- "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
609
- "whitesmoke", "yellow", "yellowgreen"
610
- ], colorKeywords = keySet(colorKeywords_);
611
-
612
- var valueKeywords_ = [
613
- "above", "absolute", "activeborder", "additive", "activecaption", "afar",
614
- "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
615
- "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
616
- "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
617
- "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
618
- "bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",
619
- "both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button",
620
- "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
621
- "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
622
- "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
623
- "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
624
- "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
625
- "compact", "condensed", "conic-gradient", "contain", "content", "contents",
626
- "content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",
627
- "cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
628
- "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
629
- "destination-in", "destination-out", "destination-over", "devanagari", "difference",
630
- "disc", "discard", "disclosure-closed", "disclosure-open", "document",
631
- "dot-dash", "dot-dot-dash",
632
- "dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
633
- "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
634
- "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
635
- "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
636
- "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
637
- "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
638
- "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
639
- "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
640
- "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
641
- "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
642
- "forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",
643
- "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
644
- "help", "hidden", "hide", "higher", "highlight", "highlighttext",
645
- "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",
646
- "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
647
- "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
648
- "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
649
- "italic", "japanese-formal", "japanese-informal", "justify", "kannada",
650
- "katakana", "katakana-iroha", "keep-all", "khmer",
651
- "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
652
- "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
653
- "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
654
- "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
655
- "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
656
- "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
657
- "media-play-button", "media-slider", "media-sliderthumb",
658
- "media-volume-slider", "media-volume-sliderthumb", "medium",
659
- "menu", "menulist", "menulist-button",
660
- "menutext", "message-box", "middle", "min-intrinsic",
661
- "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
662
- "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
663
- "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
664
- "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
665
- "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
666
- "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
667
- "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
668
- "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
669
- "progress", "push-button", "radial-gradient", "radio", "read-only",
670
- "read-write", "read-write-plaintext-only", "rectangle", "region",
671
- "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient",
672
- "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse",
673
- "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
674
- "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
675
- "s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
676
- "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
677
- "searchfield-cancel-button", "searchfield-decoration",
678
- "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
679
- "semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",
680
- "simp-chinese-formal", "simp-chinese-informal", "single",
681
- "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
682
- "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
683
- "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
684
- "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
685
- "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
686
- "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
687
- "table-caption", "table-cell", "table-column", "table-column-group",
688
- "table-footer-group", "table-header-group", "table-row", "table-row-group",
689
- "tamil",
690
- "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
691
- "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
692
- "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
693
- "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
694
- "trad-chinese-formal", "trad-chinese-informal", "transform",
695
- "translate", "translate3d", "translateX", "translateY", "translateZ",
696
- "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
697
- "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
698
- "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
699
- "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
700
- "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
701
- "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
702
- "xx-large", "xx-small"
703
- ], valueKeywords = keySet(valueKeywords_);
704
-
705
- var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
706
- .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
707
- .concat(valueKeywords_);
708
-
709
- const keywords = {properties: propertyKeywords_, colors: colorKeywords_,
710
- fonts: fontProperties_, values: valueKeywords_, all: allWords};
711
-
712
- const defaults = {
713
- documentTypes: documentTypes,
714
- mediaTypes: mediaTypes,
715
- mediaFeatures: mediaFeatures,
716
- mediaValueKeywords: mediaValueKeywords,
717
- propertyKeywords: propertyKeywords,
718
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
719
- fontProperties: fontProperties,
720
- counterDescriptors: counterDescriptors,
721
- colorKeywords: colorKeywords,
722
- valueKeywords: valueKeywords,
723
- tokenHooks: {
724
- "/": function(stream, state) {
725
- if (!stream.eat("*")) return false;
726
- state.tokenize = tokenCComment;
727
- return tokenCComment(stream, state);
728
- }
729
- }
730
- };
731
-
732
- const css = mkCSS({name: "css"});
733
-
734
- function tokenCComment(stream, state) {
735
- var maybeEnd = false, ch;
736
- while ((ch = stream.next()) != null) {
737
- if (maybeEnd && ch == "/") {
738
- state.tokenize = null;
739
- break;
740
- }
741
- maybeEnd = (ch == "*");
742
- }
743
- return ["comment", "comment"];
744
- }
745
-
746
- const sCSS = mkCSS({
747
- name: "scss",
748
- mediaTypes: mediaTypes,
749
- mediaFeatures: mediaFeatures,
750
- mediaValueKeywords: mediaValueKeywords,
751
- propertyKeywords: propertyKeywords,
752
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
753
- colorKeywords: colorKeywords,
754
- valueKeywords: valueKeywords,
755
- fontProperties: fontProperties,
756
- allowNested: true,
757
- lineComment: "//",
758
- tokenHooks: {
759
- "/": function(stream, state) {
760
- if (stream.eat("/")) {
761
- stream.skipToEnd();
762
- return ["comment", "comment"];
763
- } else if (stream.eat("*")) {
764
- state.tokenize = tokenCComment;
765
- return tokenCComment(stream, state);
766
- } else {
767
- return ["operator", "operator"];
768
- }
769
- },
770
- ":": function(stream) {
771
- if (stream.match(/^\s*\{/, false))
772
- return [null, null]
773
- return false;
774
- },
775
- "$": function(stream) {
776
- stream.match(/^[\w-]+/);
777
- if (stream.match(/^\s*:/, false))
778
- return ["def", "variable-definition"];
779
- return ["variableName.special", "variable"];
780
- },
781
- "#": function(stream) {
782
- if (!stream.eat("{")) return false;
783
- return [null, "interpolation"];
784
- }
785
- }
786
- });
787
-
788
- const less = mkCSS({
789
- name: "less",
790
- mediaTypes: mediaTypes,
791
- mediaFeatures: mediaFeatures,
792
- mediaValueKeywords: mediaValueKeywords,
793
- propertyKeywords: propertyKeywords,
794
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
795
- colorKeywords: colorKeywords,
796
- valueKeywords: valueKeywords,
797
- fontProperties: fontProperties,
798
- allowNested: true,
799
- lineComment: "//",
800
- tokenHooks: {
801
- "/": function(stream, state) {
802
- if (stream.eat("/")) {
803
- stream.skipToEnd();
804
- return ["comment", "comment"];
805
- } else if (stream.eat("*")) {
806
- state.tokenize = tokenCComment;
807
- return tokenCComment(stream, state);
808
- } else {
809
- return ["operator", "operator"];
810
- }
811
- },
812
- "@": function(stream) {
813
- if (stream.eat("{")) return [null, "interpolation"];
814
- if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
815
- stream.eatWhile(/[\w\\\-]/);
816
- if (stream.match(/^\s*:/, false))
817
- return ["def", "variable-definition"];
818
- return ["variableName", "variable"];
819
- },
820
- "&": function() {
821
- return ["atom", "atom"];
822
- }
823
- }
824
- });
825
-
826
- const gss = mkCSS({
827
- name: "gss",
828
- documentTypes: documentTypes,
829
- mediaTypes: mediaTypes,
830
- mediaFeatures: mediaFeatures,
831
- propertyKeywords: propertyKeywords,
832
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
833
- fontProperties: fontProperties,
834
- counterDescriptors: counterDescriptors,
835
- colorKeywords: colorKeywords,
836
- valueKeywords: valueKeywords,
837
- supportsAtComponent: true,
838
- tokenHooks: {
839
- "/": function(stream, state) {
840
- if (!stream.eat("*")) return false;
841
- state.tokenize = tokenCComment;
842
- return tokenCComment(stream, state);
843
- }
844
- }
845
- });
846
-
847
- export { css, gss, keywords, less, mkCSS, sCSS };