repl-sdk 1.0.1 → 1.0.3

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 (261) hide show
  1. package/package.json +12 -20
  2. package/dist/apl-fqmucPXA.js +0 -141
  3. package/dist/apl-fqmucPXA.js.map +0 -1
  4. package/dist/asciiarmor-DucZyvP0.js +0 -57
  5. package/dist/asciiarmor-DucZyvP0.js.map +0 -1
  6. package/dist/asn1-BnOEsgAm.js +0 -145
  7. package/dist/asn1-BnOEsgAm.js.map +0 -1
  8. package/dist/assets/tar-worker-CxTcoQcr.js +0 -593
  9. package/dist/assets/tar-worker-CxTcoQcr.js.map +0 -1
  10. package/dist/asterisk-QAlztEwS.js +0 -346
  11. package/dist/asterisk-QAlztEwS.js.map +0 -1
  12. package/dist/brainfuck-DZVCuF_t.js +0 -54
  13. package/dist/brainfuck-DZVCuF_t.js.map +0 -1
  14. package/dist/clike-CTYGlS6x.js +0 -800
  15. package/dist/clike-CTYGlS6x.js.map +0 -1
  16. package/dist/clojure-BhXMqnxz.js +0 -850
  17. package/dist/clojure-BhXMqnxz.js.map +0 -1
  18. package/dist/cmake-BGaNd9E7.js +0 -72
  19. package/dist/cmake-BGaNd9E7.js.map +0 -1
  20. package/dist/cobol-4yqQntpt.js +0 -121
  21. package/dist/cobol-4yqQntpt.js.map +0 -1
  22. package/dist/codemirror-De3S70Np.js +0 -2912
  23. package/dist/codemirror-De3S70Np.js.map +0 -1
  24. package/dist/coffeescript-D2dXvhEc.js +0 -309
  25. package/dist/coffeescript-D2dXvhEc.js.map +0 -1
  26. package/dist/commonlisp-CF_VNHQR.js +0 -131
  27. package/dist/commonlisp-CF_VNHQR.js.map +0 -1
  28. package/dist/crystal-DyuLTqLs.js +0 -399
  29. package/dist/crystal-DyuLTqLs.js.map +0 -1
  30. package/dist/css-DkSyTW67.js +0 -1773
  31. package/dist/css-DkSyTW67.js.map +0 -1
  32. package/dist/cypher-Dlu_3r4V.js +0 -122
  33. package/dist/cypher-Dlu_3r4V.js.map +0 -1
  34. package/dist/d-UURgV0Ux.js +0 -180
  35. package/dist/d-UURgV0Ux.js.map +0 -1
  36. package/dist/diff-B_Bi2Crb.js +0 -26
  37. package/dist/diff-B_Bi2Crb.js.map +0 -1
  38. package/dist/dockerfile-Bvk733Ga.js +0 -202
  39. package/dist/dockerfile-Bvk733Ga.js.map +0 -1
  40. package/dist/dtd-Dy74G54E.js +0 -115
  41. package/dist/dtd-Dy74G54E.js.map +0 -1
  42. package/dist/dylan-TSb-Nfix.js +0 -315
  43. package/dist/dylan-TSb-Nfix.js.map +0 -1
  44. package/dist/ebnf-4fKAGW3a.js +0 -141
  45. package/dist/ebnf-4fKAGW3a.js.map +0 -1
  46. package/dist/ecl-B59qGGVg.js +0 -179
  47. package/dist/ecl-B59qGGVg.js.map +0 -1
  48. package/dist/eiffel-Dze7nlu3.js +0 -135
  49. package/dist/eiffel-Dze7nlu3.js.map +0 -1
  50. package/dist/elm-DG7jkhNZ.js +0 -177
  51. package/dist/elm-DG7jkhNZ.js.map +0 -1
  52. package/dist/erlang-BO6gOnGA.js +0 -675
  53. package/dist/erlang-BO6gOnGA.js.map +0 -1
  54. package/dist/factor-CMxFHDqz.js +0 -66
  55. package/dist/factor-CMxFHDqz.js.map +0 -1
  56. package/dist/fcl-CDDUNjTj.js +0 -142
  57. package/dist/fcl-CDDUNjTj.js.map +0 -1
  58. package/dist/forth-B9D2JCeE.js +0 -117
  59. package/dist/forth-B9D2JCeE.js.map +0 -1
  60. package/dist/fortran-CAG2BFbe.js +0 -468
  61. package/dist/fortran-CAG2BFbe.js.map +0 -1
  62. package/dist/gas-0Aw8zDr5.js +0 -294
  63. package/dist/gas-0Aw8zDr5.js.map +0 -1
  64. package/dist/gherkin-DhZlEZiy.js +0 -116
  65. package/dist/gherkin-DhZlEZiy.js.map +0 -1
  66. package/dist/gjs-DfguZDLq.js +0 -173
  67. package/dist/gjs-DfguZDLq.js.map +0 -1
  68. package/dist/gmd-Yas-Oo8k.js +0 -163
  69. package/dist/gmd-Yas-Oo8k.js.map +0 -1
  70. package/dist/groovy-CpwJiBl7.js +0 -224
  71. package/dist/groovy-CpwJiBl7.js.map +0 -1
  72. package/dist/haskell-ySd-OUo8.js +0 -460
  73. package/dist/haskell-ySd-OUo8.js.map +0 -1
  74. package/dist/haxe-7MlzfeYV.js +0 -515
  75. package/dist/haxe-7MlzfeYV.js.map +0 -1
  76. package/dist/hbs-CxcmWxSJ.js +0 -62
  77. package/dist/hbs-CxcmWxSJ.js.map +0 -1
  78. package/dist/http-BqypyemW.js +0 -80
  79. package/dist/http-BqypyemW.js.map +0 -1
  80. package/dist/idl-4HIGJlDI.js +0 -986
  81. package/dist/idl-4HIGJlDI.js.map +0 -1
  82. package/dist/index-B3Meoznj.js +0 -118
  83. package/dist/index-B3Meoznj.js.map +0 -1
  84. package/dist/index-BQyfDUUx.js +0 -692
  85. package/dist/index-BQyfDUUx.js.map +0 -1
  86. package/dist/index-BRDroAD8.js +0 -305
  87. package/dist/index-BRDroAD8.js.map +0 -1
  88. package/dist/index-BRMAzRyM.js +0 -179
  89. package/dist/index-BRMAzRyM.js.map +0 -1
  90. package/dist/index-Bb8uYQgv.js +0 -927
  91. package/dist/index-Bb8uYQgv.js.map +0 -1
  92. package/dist/index-BlOjO66K.js +0 -17618
  93. package/dist/index-BlOjO66K.js.map +0 -1
  94. package/dist/index-BoGWnSNL.js +0 -706
  95. package/dist/index-BoGWnSNL.js.map +0 -1
  96. package/dist/index-BsRrEiOu.js +0 -98
  97. package/dist/index-BsRrEiOu.js.map +0 -1
  98. package/dist/index-C2sFZMth.js +0 -391
  99. package/dist/index-C2sFZMth.js.map +0 -1
  100. package/dist/index-C7xwOjmS.js +0 -291
  101. package/dist/index-C7xwOjmS.js.map +0 -1
  102. package/dist/index-CA3lFUx6.js +0 -315
  103. package/dist/index-CA3lFUx6.js.map +0 -1
  104. package/dist/index-CB-pPTIf.js +0 -98
  105. package/dist/index-CB-pPTIf.js.map +0 -1
  106. package/dist/index-CCa6x1FE.js +0 -386
  107. package/dist/index-CCa6x1FE.js.map +0 -1
  108. package/dist/index-CD4DINI1.js +0 -158
  109. package/dist/index-CD4DINI1.js.map +0 -1
  110. package/dist/index-CE0B_fcG.js +0 -328
  111. package/dist/index-CE0B_fcG.js.map +0 -1
  112. package/dist/index-CVGAEPMV.js +0 -2139
  113. package/dist/index-CVGAEPMV.js.map +0 -1
  114. package/dist/index-CmaT2afn.js +0 -332
  115. package/dist/index-CmaT2afn.js.map +0 -1
  116. package/dist/index-D8sUxXp5.js +0 -83
  117. package/dist/index-D8sUxXp5.js.map +0 -1
  118. package/dist/index-DIz8Vpn-.js +0 -737
  119. package/dist/index-DIz8Vpn-.js.map +0 -1
  120. package/dist/index-DNP1xT-S.js +0 -408
  121. package/dist/index-DNP1xT-S.js.map +0 -1
  122. package/dist/index-DOAqdvnQ.js +0 -862
  123. package/dist/index-DOAqdvnQ.js.map +0 -1
  124. package/dist/index-DVUMFbgi.js +0 -152
  125. package/dist/index-DVUMFbgi.js.map +0 -1
  126. package/dist/index-VeTBKRVd.js +0 -83
  127. package/dist/index-VeTBKRVd.js.map +0 -1
  128. package/dist/index-dXZeR7Bx.js +0 -1767
  129. package/dist/index-dXZeR7Bx.js.map +0 -1
  130. package/dist/index-gtqbIb6T.js +0 -62
  131. package/dist/index-gtqbIb6T.js.map +0 -1
  132. package/dist/index-pN_pUAQ7.js +0 -2426
  133. package/dist/index-pN_pUAQ7.js.map +0 -1
  134. package/dist/index-wasu5VX0.js +0 -1150
  135. package/dist/index-wasu5VX0.js.map +0 -1
  136. package/dist/javascript-Bt8B7yTi.js +0 -993
  137. package/dist/javascript-Bt8B7yTi.js.map +0 -1
  138. package/dist/julia-Bs6JJhYG.js +0 -408
  139. package/dist/julia-Bs6JJhYG.js.map +0 -1
  140. package/dist/livescript-DmzgM3Yt.js +0 -297
  141. package/dist/livescript-DmzgM3Yt.js.map +0 -1
  142. package/dist/lua-8cJgIlqe.js +0 -257
  143. package/dist/lua-8cJgIlqe.js.map +0 -1
  144. package/dist/mathematica-DNLOL9PQ.js +0 -111
  145. package/dist/mathematica-DNLOL9PQ.js.map +0 -1
  146. package/dist/mbox-Ga7d4MMN.js +0 -118
  147. package/dist/mbox-Ga7d4MMN.js.map +0 -1
  148. package/dist/mirc-Dma3B8rS.js +0 -108
  149. package/dist/mirc-Dma3B8rS.js.map +0 -1
  150. package/dist/mllike-DHn7xckP.js +0 -335
  151. package/dist/mllike-DHn7xckP.js.map +0 -1
  152. package/dist/modelica-0d55jYY0.js +0 -148
  153. package/dist/modelica-0d55jYY0.js.map +0 -1
  154. package/dist/mscgen-DdqZYINH.js +0 -136
  155. package/dist/mscgen-DdqZYINH.js.map +0 -1
  156. package/dist/mumps-Btr8VblO.js +0 -94
  157. package/dist/mumps-Btr8VblO.js.map +0 -1
  158. package/dist/nginx-DTDtBDVN.js +0 -142
  159. package/dist/nginx-DTDtBDVN.js.map +0 -1
  160. package/dist/nsis-3zG7tgur.js +0 -63
  161. package/dist/nsis-3zG7tgur.js.map +0 -1
  162. package/dist/ntriples-CvgOYMpL.js +0 -154
  163. package/dist/ntriples-CvgOYMpL.js.map +0 -1
  164. package/dist/octave-DYBj3-tl.js +0 -201
  165. package/dist/octave-DYBj3-tl.js.map +0 -1
  166. package/dist/oz-R_e8WMIi.js +0 -232
  167. package/dist/oz-R_e8WMIi.js.map +0 -1
  168. package/dist/parse-CAqQaKsh.js +0 -21685
  169. package/dist/parse-CAqQaKsh.js.map +0 -1
  170. package/dist/pascal-GD8iposT.js +0 -106
  171. package/dist/pascal-GD8iposT.js.map +0 -1
  172. package/dist/perl-DL9mHpoi.js +0 -1106
  173. package/dist/perl-DL9mHpoi.js.map +0 -1
  174. package/dist/pig-C_4T4YIV.js +0 -102
  175. package/dist/pig-C_4T4YIV.js.map +0 -1
  176. package/dist/powershell-B0suO7Vd.js +0 -329
  177. package/dist/powershell-B0suO7Vd.js.map +0 -1
  178. package/dist/properties-BR-vP1aU.js +0 -59
  179. package/dist/properties-BR-vP1aU.js.map +0 -1
  180. package/dist/protobuf-BxgpyhoW.js +0 -78
  181. package/dist/protobuf-BxgpyhoW.js.map +0 -1
  182. package/dist/pug-vHnWR0UE.js +0 -406
  183. package/dist/pug-vHnWR0UE.js.map +0 -1
  184. package/dist/puppet-Bdao66PW.js +0 -138
  185. package/dist/puppet-Bdao66PW.js.map +0 -1
  186. package/dist/python-BFGRmuZ9.js +0 -427
  187. package/dist/python-BFGRmuZ9.js.map +0 -1
  188. package/dist/q-CrbCVq4a.js +0 -132
  189. package/dist/q-CrbCVq4a.js.map +0 -1
  190. package/dist/r-V7nswm59.js +0 -171
  191. package/dist/r-V7nswm59.js.map +0 -1
  192. package/dist/render-app-island-B-i8rvGi.js +0 -61
  193. package/dist/render-app-island-B-i8rvGi.js.map +0 -1
  194. package/dist/repl-sdk.js +0 -7
  195. package/dist/repl-sdk.js.map +0 -1
  196. package/dist/rpm-C-DLY-If.js +0 -110
  197. package/dist/rpm-C-DLY-If.js.map +0 -1
  198. package/dist/ruby-JDKLJNK0.js +0 -331
  199. package/dist/ruby-JDKLJNK0.js.map +0 -1
  200. package/dist/sas-D2UG-yhZ.js +0 -208
  201. package/dist/sas-D2UG-yhZ.js.map +0 -1
  202. package/dist/scheme-BKzrkGJD.js +0 -223
  203. package/dist/scheme-BKzrkGJD.js.map +0 -1
  204. package/dist/shell-BlsXDxCn.js +0 -223
  205. package/dist/shell-BlsXDxCn.js.map +0 -1
  206. package/dist/sieve-CjwBwOY5.js +0 -136
  207. package/dist/sieve-CjwBwOY5.js.map +0 -1
  208. package/dist/simple-mode-DMneyfDu.js +0 -131
  209. package/dist/simple-mode-DMneyfDu.js.map +0 -1
  210. package/dist/smalltalk-BOIGQuhN.js +0 -122
  211. package/dist/smalltalk-BOIGQuhN.js.map +0 -1
  212. package/dist/solr-CwD7U71z.js +0 -70
  213. package/dist/solr-CwD7U71z.js.map +0 -1
  214. package/dist/sparql-DYskk2vE.js +0 -250
  215. package/dist/sparql-DYskk2vE.js.map +0 -1
  216. package/dist/spreadsheet-Bgtt3oLP.js +0 -88
  217. package/dist/spreadsheet-Bgtt3oLP.js.map +0 -1
  218. package/dist/sql-Cei9CMfk.js +0 -343
  219. package/dist/sql-Cei9CMfk.js.map +0 -1
  220. package/dist/stex-C1nZSzAw.js +0 -231
  221. package/dist/stex-C1nZSzAw.js.map +0 -1
  222. package/dist/stylus-BkS-boTH.js +0 -566
  223. package/dist/stylus-BkS-boTH.js.map +0 -1
  224. package/dist/swift-FRZi1uvB.js +0 -292
  225. package/dist/swift-FRZi1uvB.js.map +0 -1
  226. package/dist/tcl-CUcaCdmq.js +0 -115
  227. package/dist/tcl-CUcaCdmq.js.map +0 -1
  228. package/dist/textile-BnFpjsrl.js +0 -415
  229. package/dist/textile-BnFpjsrl.js.map +0 -1
  230. package/dist/tiddlywiki-CjprD-Qp.js +0 -219
  231. package/dist/tiddlywiki-CjprD-Qp.js.map +0 -1
  232. package/dist/tiki-DK9DOeWn.js +0 -269
  233. package/dist/tiki-DK9DOeWn.js.map +0 -1
  234. package/dist/toml-BOuWGMcf.js +0 -77
  235. package/dist/toml-BOuWGMcf.js.map +0 -1
  236. package/dist/troff-E1bJ0PPL.js +0 -62
  237. package/dist/troff-E1bJ0PPL.js.map +0 -1
  238. package/dist/ttcn-cfg-Dc39-fIP.js +0 -134
  239. package/dist/ttcn-cfg-Dc39-fIP.js.map +0 -1
  240. package/dist/ttcn-tKd4HLu4.js +0 -193
  241. package/dist/ttcn-tKd4HLu4.js.map +0 -1
  242. package/dist/turtle-Dq7-1WAf.js +0 -125
  243. package/dist/turtle-Dq7-1WAf.js.map +0 -1
  244. package/dist/vb-Dp90gtsv.js +0 -197
  245. package/dist/vb-Dp90gtsv.js.map +0 -1
  246. package/dist/vbscript-Bfn8O8I7.js +0 -479
  247. package/dist/vbscript-Bfn8O8I7.js.map +0 -1
  248. package/dist/velocity-BwIZK1TH.js +0 -150
  249. package/dist/velocity-BwIZK1TH.js.map +0 -1
  250. package/dist/verilog-CnT9bMk0.js +0 -430
  251. package/dist/verilog-CnT9bMk0.js.map +0 -1
  252. package/dist/vhdl-DCkMIyT9.js +0 -159
  253. package/dist/vhdl-DCkMIyT9.js.map +0 -1
  254. package/dist/webidl-BTLTThCm.js +0 -205
  255. package/dist/webidl-BTLTThCm.js.map +0 -1
  256. package/dist/xquery-BrBUuxMR.js +0 -526
  257. package/dist/xquery-BrBUuxMR.js.map +0 -1
  258. package/dist/yacas-b5lAVEIl.js +0 -131
  259. package/dist/yacas-b5lAVEIl.js.map +0 -1
  260. package/dist/z80-ClgwfNdB.js +0 -93
  261. package/dist/z80-ClgwfNdB.js.map +0 -1
@@ -1,566 +0,0 @@
1
- var tagKeywords_ = ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "bgsound", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "var", "video"];
2
- var documentTypes_ = ["domain", "regexp", "url-prefix", "url"];
3
- var mediaTypes_ = ["all", "aural", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "embossed"];
4
- var mediaFeatures_ = ["width", "min-width", "max-width", "height", "min-height", "max-height", "device-width", "min-device-width", "max-device-width", "device-height", "min-device-height", "max-device-height", "aspect-ratio", "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio", "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color", "max-color", "color-index", "min-color-index", "max-color-index", "monochrome", "min-monochrome", "max-monochrome", "resolution", "min-resolution", "max-resolution", "scan", "grid", "dynamic-range", "video-dynamic-range"];
5
- var propertyKeywords_ = ["align-content", "align-items", "align-self", "alignment-adjust", "alignment-baseline", "anchor-point", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "appearance", "azimuth", "backface-visibility", "background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "baseline-shift", "binding", "bleed", "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target", "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "clear", "clip", "color", "color-profile", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after", "cue-before", "cursor", "direction", "display", "dominant-baseline", "drop-initial-after-adjust", "drop-initial-after-align", "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size", "drop-initial-value", "elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings", "font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-synthesis", "font-variant", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position", "font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-position", "grid-auto-rows", "grid-column", "grid-column-end", "grid-column-start", "grid-row", "grid-row-end", "grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns", "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "inline-box-align", "justify-content", "left", "letter-spacing", "line-break", "line-height", "line-stacking", "line-stacking-ruby", "line-stacking-shift", "line-stacking-strategy", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "marker-offset", "marks", "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed", "marquee-style", "max-height", "max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "object-fit", "object-position", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "page", "page-break-after", "page-break-before", "page-break-inside", "page-policy", "pause", "pause-after", "pause-before", "perspective", "perspective-origin", "pitch", "pitch-range", "play-during", "position", "presentation-level", "punctuation-trim", "quotes", "region-break-after", "region-break-before", "region-break-inside", "region-fragment", "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness", "right", "rotation", "rotation-point", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside", "size", "speak", "speak-as", "speak-header", "speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size", "table-layout", "target", "target-name", "target-new", "target-position", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-skip", "text-decoration-style", "text-emphasis", "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", "text-height", "text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow", "text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position", "text-wrap", "top", "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", "voice-balance", "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress", "voice-volume", "volume", "white-space", "widows", "width", "will-change", "word-break", "word-spacing", "word-wrap", "z-index", "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color", "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events", "color-interpolation", "color-interpolation-filters", "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering", "marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering", "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal", "glyph-orientation-vertical", "text-anchor", "writing-mode", "font-smoothing", "osx-font-smoothing"];
6
- var nonStandardPropertyKeywords_ = ["scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color", "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color", "scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button", "searchfield-results-decoration", "zoom"];
7
- var fontProperties_ = ["font-family", "src", "unicode-range", "font-variant", "font-feature-settings", "font-stretch", "font-weight", "font-style"];
8
- var colorKeywords_ = ["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"];
9
- var valueKeywords_ = ["above", "absolute", "activeborder", "additive", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", "arabic-indic", "armenian", "asterisks", "attr", "auto", "avoid", "avoid-column", "avoid-page", "avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary", "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box", "both", "bottom", "break", "break-all", "break-word", "bullets", "button", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote", "col-resize", "collapse", "column", "compact", "condensed", "conic-gradient", "contain", "content", "contents", "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "cyclic", "dashed", "decimal", "decimal-leading-zero", "default", "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "devanagari", "disc", "discard", "disclosure-closed", "disclosure-open", "document", "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ethiopic-numeric", "ew-resize", "expanded", "extends", "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "footnotes", "forwards", "from", "geometricPrecision", "georgian", "graytext", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", "help", "hidden", "hide", "high", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore", "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", "inline-block", "inline-flex", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "japanese-formal", "japanese-informal", "justify", "kannada", "katakana", "katakana-iroha", "keep-all", "khmer", "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal", "landscape", "lao", "large", "larger", "left", "level", "lighter", "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian", "lower-roman", "lowercase", "ltr", "malayalam", "match", "matrix", "matrix3d", "media-play-button", "media-slider", "media-sliderthumb", "media-volume-slider", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button", "menutext", "message-box", "middle", "min-intrinsic", "mix", "mongolian", "monospace", "move", "multiple", "myanmar", "n-resize", "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote", "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset", "outside", "outside-shape", "overlay", "overline", "padding", "padding-box", "painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter", "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", "radial-gradient", "radio", "read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient", "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button", "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "simp-chinese-formal", "simp-chinese-informal", "single", "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over", "space", "spell-out", "square", "square-button", "standard", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row", "table-row-group", "tamil", "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top", "trad-chinese-formal", "trad-chinese-informal", "translate", "translate3d", "translateX", "translateY", "translateZ", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal", "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", "var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", "window", "windowframe", "windowtext", "words", "x-large", "x-small", "xor", "xx-large", "xx-small", "bicubic", "optimizespeed", "grayscale", "row", "row-reverse", "wrap", "wrap-reverse", "column-reverse", "flex-start", "flex-end", "space-between", "space-around", "unset"];
10
- var wordOperatorKeywords_ = ["in", "and", "or", "not", "is not", "is a", "is", "isnt", "defined", "if unless"], blockKeywords_ = ["for", "if", "else", "unless", "from", "to"], commonAtoms_ = ["null", "true", "false", "href", "title", "type", "not-allowed", "readonly", "disabled"], commonDef_ = ["@font-face", "@keyframes", "@media", "@viewport", "@page", "@host", "@supports", "@block", "@css"];
11
- var hintWords = tagKeywords_.concat(
12
- documentTypes_,
13
- mediaTypes_,
14
- mediaFeatures_,
15
- propertyKeywords_,
16
- nonStandardPropertyKeywords_,
17
- colorKeywords_,
18
- valueKeywords_,
19
- fontProperties_,
20
- wordOperatorKeywords_,
21
- blockKeywords_,
22
- commonAtoms_,
23
- commonDef_
24
- );
25
- function wordRegexp(words) {
26
- words = words.sort(function(a, b) {
27
- return b > a;
28
- });
29
- return new RegExp("^((" + words.join(")|(") + "))\\b");
30
- }
31
- function keySet(array) {
32
- var keys = {};
33
- for (var i = 0; i < array.length; ++i) keys[array[i]] = true;
34
- return keys;
35
- }
36
- function escapeRegExp(text) {
37
- return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
38
- }
39
- var tagKeywords = keySet(tagKeywords_), tagVariablesRegexp = /^(a|b|i|s|col|em)$/i, propertyKeywords = keySet(propertyKeywords_), nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_), valueKeywords = keySet(valueKeywords_), colorKeywords = keySet(colorKeywords_), documentTypes = keySet(documentTypes_), documentTypesRegexp = wordRegexp(documentTypes_), mediaFeatures = keySet(mediaFeatures_), mediaTypes = keySet(mediaTypes_), fontProperties = keySet(fontProperties_), operatorsRegexp = /^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/, wordOperatorKeywordsRegexp = wordRegexp(wordOperatorKeywords_), blockKeywords = keySet(blockKeywords_), vendorPrefixesRegexp = new RegExp(/^\-(moz|ms|o|webkit)-/i), commonAtoms = keySet(commonAtoms_), firstWordMatch = "", states = {}, ch, style, type, override;
40
- function tokenBase(stream, state) {
41
- firstWordMatch = stream.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/);
42
- state.context.line.firstWord = firstWordMatch ? firstWordMatch[0].replace(/^\s*/, "") : "";
43
- state.context.line.indent = stream.indentation();
44
- ch = stream.peek();
45
- if (stream.match("//")) {
46
- stream.skipToEnd();
47
- return ["comment", "comment"];
48
- }
49
- if (stream.match("/*")) {
50
- state.tokenize = tokenCComment;
51
- return tokenCComment(stream, state);
52
- }
53
- if (ch == '"' || ch == "'") {
54
- stream.next();
55
- state.tokenize = tokenString(ch);
56
- return state.tokenize(stream, state);
57
- }
58
- if (ch == "@") {
59
- stream.next();
60
- stream.eatWhile(/[\w\\-]/);
61
- return ["def", stream.current()];
62
- }
63
- if (ch == "#") {
64
- stream.next();
65
- if (stream.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i)) {
66
- return ["atom", "atom"];
67
- }
68
- if (stream.match(/^[a-z][\w-]*/i)) {
69
- return ["builtin", "hash"];
70
- }
71
- }
72
- if (stream.match(vendorPrefixesRegexp)) {
73
- return ["meta", "vendor-prefixes"];
74
- }
75
- if (stream.match(/^-?[0-9]?\.?[0-9]/)) {
76
- stream.eatWhile(/[a-z%]/i);
77
- return ["number", "unit"];
78
- }
79
- if (ch == "!") {
80
- stream.next();
81
- return [stream.match(/^(important|optional)/i) ? "keyword" : "operator", "important"];
82
- }
83
- if (ch == "." && stream.match(/^\.[a-z][\w-]*/i)) {
84
- return ["qualifier", "qualifier"];
85
- }
86
- if (stream.match(documentTypesRegexp)) {
87
- if (stream.peek() == "(") state.tokenize = tokenParenthesized;
88
- return ["property", "word"];
89
- }
90
- if (stream.match(/^[a-z][\w-]*\(/i)) {
91
- stream.backUp(1);
92
- return ["keyword", "mixin"];
93
- }
94
- if (stream.match(/^(\+|-)[a-z][\w-]*\(/i)) {
95
- stream.backUp(1);
96
- return ["keyword", "block-mixin"];
97
- }
98
- if (stream.string.match(/^\s*&/) && stream.match(/^[-_]+[a-z][\w-]*/)) {
99
- return ["qualifier", "qualifier"];
100
- }
101
- if (stream.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)) {
102
- stream.backUp(1);
103
- return ["variableName.special", "reference"];
104
- }
105
- if (stream.match(/^&{1}\s*$/)) {
106
- return ["variableName.special", "reference"];
107
- }
108
- if (stream.match(wordOperatorKeywordsRegexp)) {
109
- return ["operator", "operator"];
110
- }
111
- if (stream.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)) {
112
- if (stream.match(/^(\.|\[)[\w-\'\"\]]+/i, false)) {
113
- if (!wordIsTag(stream.current())) {
114
- stream.match(".");
115
- return ["variable", "variable-name"];
116
- }
117
- }
118
- return ["variable", "word"];
119
- }
120
- if (stream.match(operatorsRegexp)) {
121
- return ["operator", stream.current()];
122
- }
123
- if (/[:;,{}\[\]\(\)]/.test(ch)) {
124
- stream.next();
125
- return [null, ch];
126
- }
127
- stream.next();
128
- return [null, null];
129
- }
130
- function tokenCComment(stream, state) {
131
- var maybeEnd = false, ch2;
132
- while ((ch2 = stream.next()) != null) {
133
- if (maybeEnd && ch2 == "/") {
134
- state.tokenize = null;
135
- break;
136
- }
137
- maybeEnd = ch2 == "*";
138
- }
139
- return ["comment", "comment"];
140
- }
141
- function tokenString(quote) {
142
- return function(stream, state) {
143
- var escaped = false, ch2;
144
- while ((ch2 = stream.next()) != null) {
145
- if (ch2 == quote && !escaped) {
146
- if (quote == ")") stream.backUp(1);
147
- break;
148
- }
149
- escaped = !escaped && ch2 == "\\";
150
- }
151
- if (ch2 == quote || !escaped && quote != ")") state.tokenize = null;
152
- return ["string", "string"];
153
- };
154
- }
155
- function tokenParenthesized(stream, state) {
156
- stream.next();
157
- if (!stream.match(/\s*[\"\')]/, false))
158
- state.tokenize = tokenString(")");
159
- else
160
- state.tokenize = null;
161
- return [null, "("];
162
- }
163
- function Context(type2, indent, prev, line) {
164
- this.type = type2;
165
- this.indent = indent;
166
- this.prev = prev;
167
- this.line = line || { firstWord: "", indent: 0 };
168
- }
169
- function pushContext(state, stream, type2, indent) {
170
- indent = indent >= 0 ? indent : stream.indentUnit;
171
- state.context = new Context(type2, stream.indentation() + indent, state.context);
172
- return type2;
173
- }
174
- function popContext(state, stream, currentIndent) {
175
- var contextIndent = state.context.indent - stream.indentUnit;
176
- currentIndent = currentIndent || false;
177
- state.context = state.context.prev;
178
- if (currentIndent) state.context.indent = contextIndent;
179
- return state.context.type;
180
- }
181
- function pass(type2, stream, state) {
182
- return states[state.context.type](type2, stream, state);
183
- }
184
- function popAndPass(type2, stream, state, n) {
185
- for (var i = 1; i > 0; i--)
186
- state.context = state.context.prev;
187
- return pass(type2, stream, state);
188
- }
189
- function wordIsTag(word) {
190
- return word.toLowerCase() in tagKeywords;
191
- }
192
- function wordIsProperty(word) {
193
- word = word.toLowerCase();
194
- return word in propertyKeywords || word in fontProperties;
195
- }
196
- function wordIsBlock(word) {
197
- return word.toLowerCase() in blockKeywords;
198
- }
199
- function wordIsVendorPrefix(word) {
200
- return word.toLowerCase().match(vendorPrefixesRegexp);
201
- }
202
- function wordAsValue(word) {
203
- var wordLC = word.toLowerCase();
204
- var override2 = "variable";
205
- if (wordIsTag(word)) override2 = "tag";
206
- else if (wordIsBlock(word)) override2 = "block-keyword";
207
- else if (wordIsProperty(word)) override2 = "property";
208
- else if (wordLC in valueKeywords || wordLC in commonAtoms) override2 = "atom";
209
- else if (wordLC == "return" || wordLC in colorKeywords) override2 = "keyword";
210
- else if (word.match(/^[A-Z]/)) override2 = "string";
211
- return override2;
212
- }
213
- function typeIsBlock(type2, stream) {
214
- return endOfLine(stream) && (type2 == "{" || type2 == "]" || type2 == "hash" || type2 == "qualifier") || type2 == "block-mixin";
215
- }
216
- function typeIsInterpolation(type2, stream) {
217
- return type2 == "{" && stream.match(/^\s*\$?[\w-]+/i, false);
218
- }
219
- function typeIsPseudo(type2, stream) {
220
- return type2 == ":" && stream.match(/^[a-z-]+/, false);
221
- }
222
- function startOfLine(stream) {
223
- return stream.sol() || stream.string.match(new RegExp("^\\s*" + escapeRegExp(stream.current())));
224
- }
225
- function endOfLine(stream) {
226
- return stream.eol() || stream.match(/^\s*$/, false);
227
- }
228
- function firstWordOfLine(line) {
229
- var re = /^\s*[-_]*[a-z0-9]+[\w-]*/i;
230
- var result = typeof line == "string" ? line.match(re) : line.string.match(re);
231
- return result ? result[0].replace(/^\s*/, "") : "";
232
- }
233
- states.block = function(type2, stream, state) {
234
- if (type2 == "comment" && startOfLine(stream) || type2 == "," && endOfLine(stream) || type2 == "mixin") {
235
- return pushContext(state, stream, "block", 0);
236
- }
237
- if (typeIsInterpolation(type2, stream)) {
238
- return pushContext(state, stream, "interpolation");
239
- }
240
- if (endOfLine(stream) && type2 == "]") {
241
- if (!/^\s*(\.|#|:|\[|\*|&)/.test(stream.string) && !wordIsTag(firstWordOfLine(stream))) {
242
- return pushContext(state, stream, "block", 0);
243
- }
244
- }
245
- if (typeIsBlock(type2, stream)) {
246
- return pushContext(state, stream, "block");
247
- }
248
- if (type2 == "}" && endOfLine(stream)) {
249
- return pushContext(state, stream, "block", 0);
250
- }
251
- if (type2 == "variable-name") {
252
- if (stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/) || wordIsBlock(firstWordOfLine(stream))) {
253
- return pushContext(state, stream, "variableName");
254
- } else {
255
- return pushContext(state, stream, "variableName", 0);
256
- }
257
- }
258
- if (type2 == "=") {
259
- if (!endOfLine(stream) && !wordIsBlock(firstWordOfLine(stream))) {
260
- return pushContext(state, stream, "block", 0);
261
- }
262
- return pushContext(state, stream, "block");
263
- }
264
- if (type2 == "*") {
265
- if (endOfLine(stream) || stream.match(/\s*(,|\.|#|\[|:|{)/, false)) {
266
- override = "tag";
267
- return pushContext(state, stream, "block");
268
- }
269
- }
270
- if (typeIsPseudo(type2, stream)) {
271
- return pushContext(state, stream, "pseudo");
272
- }
273
- if (/@(font-face|media|supports|(-moz-)?document)/.test(type2)) {
274
- return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
275
- }
276
- if (/@(-(moz|ms|o|webkit)-)?keyframes$/.test(type2)) {
277
- return pushContext(state, stream, "keyframes");
278
- }
279
- if (/@extends?/.test(type2)) {
280
- return pushContext(state, stream, "extend", 0);
281
- }
282
- if (type2 && type2.charAt(0) == "@") {
283
- if (stream.indentation() > 0 && wordIsProperty(stream.current().slice(1))) {
284
- override = "variable";
285
- return "block";
286
- }
287
- if (/(@import|@require|@charset)/.test(type2)) {
288
- return pushContext(state, stream, "block", 0);
289
- }
290
- return pushContext(state, stream, "block");
291
- }
292
- if (type2 == "reference" && endOfLine(stream)) {
293
- return pushContext(state, stream, "block");
294
- }
295
- if (type2 == "(") {
296
- return pushContext(state, stream, "parens");
297
- }
298
- if (type2 == "vendor-prefixes") {
299
- return pushContext(state, stream, "vendorPrefixes");
300
- }
301
- if (type2 == "word") {
302
- var word = stream.current();
303
- override = wordAsValue(word);
304
- if (override == "property") {
305
- if (startOfLine(stream)) {
306
- return pushContext(state, stream, "block", 0);
307
- } else {
308
- override = "atom";
309
- return "block";
310
- }
311
- }
312
- if (override == "tag") {
313
- if (/embed|menu|pre|progress|sub|table/.test(word)) {
314
- if (wordIsProperty(firstWordOfLine(stream))) {
315
- override = "atom";
316
- return "block";
317
- }
318
- }
319
- if (stream.string.match(new RegExp("\\[\\s*" + word + "|" + word + "\\s*\\]"))) {
320
- override = "atom";
321
- return "block";
322
- }
323
- if (tagVariablesRegexp.test(word)) {
324
- if (startOfLine(stream) && stream.string.match(/=/) || !startOfLine(stream) && !stream.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/) && !wordIsTag(firstWordOfLine(stream))) {
325
- override = "variable";
326
- if (wordIsBlock(firstWordOfLine(stream))) return "block";
327
- return pushContext(state, stream, "block", 0);
328
- }
329
- }
330
- if (endOfLine(stream)) return pushContext(state, stream, "block");
331
- }
332
- if (override == "block-keyword") {
333
- override = "keyword";
334
- if (stream.current(/(if|unless)/) && !startOfLine(stream)) {
335
- return "block";
336
- }
337
- return pushContext(state, stream, "block");
338
- }
339
- if (word == "return") return pushContext(state, stream, "block", 0);
340
- if (override == "variable" && stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)) {
341
- return pushContext(state, stream, "block");
342
- }
343
- }
344
- return state.context.type;
345
- };
346
- states.parens = function(type2, stream, state) {
347
- if (type2 == "(") return pushContext(state, stream, "parens");
348
- if (type2 == ")") {
349
- if (state.context.prev.type == "parens") {
350
- return popContext(state, stream);
351
- }
352
- if (stream.string.match(/^[a-z][\w-]*\(/i) && endOfLine(stream) || wordIsBlock(firstWordOfLine(stream)) || /(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(firstWordOfLine(stream)) || !stream.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/) && wordIsTag(firstWordOfLine(stream))) {
353
- return pushContext(state, stream, "block");
354
- }
355
- if (stream.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/) || stream.string.match(/^\s*(\(|\)|[0-9])/) || stream.string.match(/^\s+[a-z][\w-]*\(/i) || stream.string.match(/^\s+[\$-]?[a-z]/i)) {
356
- return pushContext(state, stream, "block", 0);
357
- }
358
- if (endOfLine(stream)) return pushContext(state, stream, "block");
359
- else return pushContext(state, stream, "block", 0);
360
- }
361
- if (type2 && type2.charAt(0) == "@" && wordIsProperty(stream.current().slice(1))) {
362
- override = "variable";
363
- }
364
- if (type2 == "word") {
365
- var word = stream.current();
366
- override = wordAsValue(word);
367
- if (override == "tag" && tagVariablesRegexp.test(word)) {
368
- override = "variable";
369
- }
370
- if (override == "property" || word == "to") override = "atom";
371
- }
372
- if (type2 == "variable-name") {
373
- return pushContext(state, stream, "variableName");
374
- }
375
- if (typeIsPseudo(type2, stream)) {
376
- return pushContext(state, stream, "pseudo");
377
- }
378
- return state.context.type;
379
- };
380
- states.vendorPrefixes = function(type2, stream, state) {
381
- if (type2 == "word") {
382
- override = "property";
383
- return pushContext(state, stream, "block", 0);
384
- }
385
- return popContext(state, stream);
386
- };
387
- states.pseudo = function(type2, stream, state) {
388
- if (!wordIsProperty(firstWordOfLine(stream.string))) {
389
- stream.match(/^[a-z-]+/);
390
- override = "variableName.special";
391
- if (endOfLine(stream)) return pushContext(state, stream, "block");
392
- return popContext(state, stream);
393
- }
394
- return popAndPass(type2, stream, state);
395
- };
396
- states.atBlock = function(type2, stream, state) {
397
- if (type2 == "(") return pushContext(state, stream, "atBlock_parens");
398
- if (typeIsBlock(type2, stream)) {
399
- return pushContext(state, stream, "block");
400
- }
401
- if (typeIsInterpolation(type2, stream)) {
402
- return pushContext(state, stream, "interpolation");
403
- }
404
- if (type2 == "word") {
405
- var word = stream.current().toLowerCase();
406
- if (/^(only|not|and|or)$/.test(word))
407
- override = "keyword";
408
- else if (documentTypes.hasOwnProperty(word))
409
- override = "tag";
410
- else if (mediaTypes.hasOwnProperty(word))
411
- override = "attribute";
412
- else if (mediaFeatures.hasOwnProperty(word))
413
- override = "property";
414
- else if (nonStandardPropertyKeywords.hasOwnProperty(word))
415
- override = "string.special";
416
- else override = wordAsValue(stream.current());
417
- if (override == "tag" && endOfLine(stream)) {
418
- return pushContext(state, stream, "block");
419
- }
420
- }
421
- if (type2 == "operator" && /^(not|and|or)$/.test(stream.current())) {
422
- override = "keyword";
423
- }
424
- return state.context.type;
425
- };
426
- states.atBlock_parens = function(type2, stream, state) {
427
- if (type2 == "{" || type2 == "}") return state.context.type;
428
- if (type2 == ")") {
429
- if (endOfLine(stream)) return pushContext(state, stream, "block");
430
- else return pushContext(state, stream, "atBlock");
431
- }
432
- if (type2 == "word") {
433
- var word = stream.current().toLowerCase();
434
- override = wordAsValue(word);
435
- if (/^(max|min)/.test(word)) override = "property";
436
- if (override == "tag") {
437
- tagVariablesRegexp.test(word) ? override = "variable" : override = "atom";
438
- }
439
- return state.context.type;
440
- }
441
- return states.atBlock(type2, stream, state);
442
- };
443
- states.keyframes = function(type2, stream, state) {
444
- if (stream.indentation() == "0" && (type2 == "}" && startOfLine(stream) || type2 == "]" || type2 == "hash" || type2 == "qualifier" || wordIsTag(stream.current()))) {
445
- return popAndPass(type2, stream, state);
446
- }
447
- if (type2 == "{") return pushContext(state, stream, "keyframes");
448
- if (type2 == "}") {
449
- if (startOfLine(stream)) return popContext(state, stream, true);
450
- else return pushContext(state, stream, "keyframes");
451
- }
452
- if (type2 == "unit" && /^[0-9]+\%$/.test(stream.current())) {
453
- return pushContext(state, stream, "keyframes");
454
- }
455
- if (type2 == "word") {
456
- override = wordAsValue(stream.current());
457
- if (override == "block-keyword") {
458
- override = "keyword";
459
- return pushContext(state, stream, "keyframes");
460
- }
461
- }
462
- if (/@(font-face|media|supports|(-moz-)?document)/.test(type2)) {
463
- return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
464
- }
465
- if (type2 == "mixin") {
466
- return pushContext(state, stream, "block", 0);
467
- }
468
- return state.context.type;
469
- };
470
- states.interpolation = function(type2, stream, state) {
471
- if (type2 == "{") popContext(state, stream) && pushContext(state, stream, "block");
472
- if (type2 == "}") {
473
- if (stream.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i) || stream.string.match(/^\s*[a-z]/i) && wordIsTag(firstWordOfLine(stream))) {
474
- return pushContext(state, stream, "block");
475
- }
476
- if (!stream.string.match(/^(\{|\s*\&)/) || stream.match(/\s*[\w-]/, false)) {
477
- return pushContext(state, stream, "block", 0);
478
- }
479
- return pushContext(state, stream, "block");
480
- }
481
- if (type2 == "variable-name") {
482
- return pushContext(state, stream, "variableName", 0);
483
- }
484
- if (type2 == "word") {
485
- override = wordAsValue(stream.current());
486
- if (override == "tag") override = "atom";
487
- }
488
- return state.context.type;
489
- };
490
- states.extend = function(type2, stream, state) {
491
- if (type2 == "[" || type2 == "=") return "extend";
492
- if (type2 == "]") return popContext(state, stream);
493
- if (type2 == "word") {
494
- override = wordAsValue(stream.current());
495
- return "extend";
496
- }
497
- return popContext(state, stream);
498
- };
499
- states.variableName = function(type2, stream, state) {
500
- if (type2 == "string" || type2 == "[" || type2 == "]" || stream.current().match(/^(\.|\$)/)) {
501
- if (stream.current().match(/^\.[\w-]+/i)) override = "variable";
502
- return "variableName";
503
- }
504
- return popAndPass(type2, stream, state);
505
- };
506
- const stylus = {
507
- name: "stylus",
508
- startState: function() {
509
- return {
510
- tokenize: null,
511
- state: "block",
512
- context: new Context("block", 0, null)
513
- };
514
- },
515
- token: function(stream, state) {
516
- if (!state.tokenize && stream.eatSpace()) return null;
517
- style = (state.tokenize || tokenBase)(stream, state);
518
- if (style && typeof style == "object") {
519
- type = style[1];
520
- style = style[0];
521
- }
522
- override = style;
523
- state.state = states[state.state](type, stream, state);
524
- return override;
525
- },
526
- indent: function(state, textAfter, iCx) {
527
- var cx = state.context, ch2 = textAfter && textAfter.charAt(0), indent = cx.indent, lineFirstWord = firstWordOfLine(textAfter), lineIndent = cx.line.indent, prevLineFirstWord = state.context.prev ? state.context.prev.line.firstWord : "", prevLineIndent = state.context.prev ? state.context.prev.line.indent : lineIndent;
528
- if (cx.prev && (ch2 == "}" && (cx.type == "block" || cx.type == "atBlock" || cx.type == "keyframes") || ch2 == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") || ch2 == "{" && cx.type == "at")) {
529
- indent = cx.indent - iCx.unit;
530
- } else if (!/(\})/.test(ch2)) {
531
- if (/@|\$|\d/.test(ch2) || /^\{/.test(textAfter) || /^\s*\/(\/|\*)/.test(textAfter) || /^\s*\/\*/.test(prevLineFirstWord) || /^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(textAfter) || /^(\+|-)?[a-z][\w-]*\(/i.test(textAfter) || /^return/.test(textAfter) || wordIsBlock(lineFirstWord)) {
532
- indent = lineIndent;
533
- } else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(ch2) || wordIsTag(lineFirstWord)) {
534
- if (/\,\s*$/.test(prevLineFirstWord)) {
535
- indent = prevLineIndent;
536
- } else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord)) {
537
- indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + iCx.unit;
538
- } else {
539
- indent = lineIndent;
540
- }
541
- } else if (!/,\s*$/.test(textAfter) && (wordIsVendorPrefix(lineFirstWord) || wordIsProperty(lineFirstWord))) {
542
- if (wordIsBlock(prevLineFirstWord)) {
543
- indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + iCx.unit;
544
- } else if (/^\{/.test(prevLineFirstWord)) {
545
- indent = lineIndent <= prevLineIndent ? lineIndent : prevLineIndent + iCx.unit;
546
- } else if (wordIsVendorPrefix(prevLineFirstWord) || wordIsProperty(prevLineFirstWord)) {
547
- indent = lineIndent >= prevLineIndent ? prevLineIndent : lineIndent;
548
- } else if (/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(prevLineFirstWord) || /=\s*$/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord) || /^\$[\w-\.\[\]\'\"]/.test(prevLineFirstWord)) {
549
- indent = prevLineIndent + iCx.unit;
550
- } else {
551
- indent = lineIndent;
552
- }
553
- }
554
- }
555
- return indent;
556
- },
557
- languageData: {
558
- indentOnInput: /^\s*\}$/,
559
- commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
560
- autocomplete: hintWords
561
- }
562
- };
563
- export {
564
- stylus
565
- };
566
- //# sourceMappingURL=stylus-BkS-boTH.js.map