@milkdown/crepe 7.3.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 (241) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/lib/apl-p0IPP13W.js +76 -0
  4. package/lib/asciiarmor-lJsBxlJJ.js +34 -0
  5. package/lib/asn1-Q9v1zIy5.js +102 -0
  6. package/lib/asterisk-foNkeTjy.js +273 -0
  7. package/lib/brainfuck-0XqyXpNS.js +35 -0
  8. package/lib/clike-ak6Z6Yhe.js +639 -0
  9. package/lib/clojure-iYO8U8Sg.js +810 -0
  10. package/lib/clsx-7d8NmkQq.js +21 -0
  11. package/lib/cmake-SVzjkxV_.js +28 -0
  12. package/lib/cobol-APHEnAOX.js +74 -0
  13. package/lib/coffeescript-KqQa0SYG.js +182 -0
  14. package/lib/commonlisp-bwqNqR5V.js +79 -0
  15. package/lib/core/crepe.d.ts +21 -0
  16. package/lib/core/crepe.d.ts.map +1 -0
  17. package/lib/core/index.d.ts +3 -0
  18. package/lib/core/index.d.ts.map +1 -0
  19. package/lib/core/slice.d.ts +12 -0
  20. package/lib/core/slice.d.ts.map +1 -0
  21. package/lib/crystal-BViWuDpA.js +217 -0
  22. package/lib/css-KHXHXfXg.js +1572 -0
  23. package/lib/cypher-XpTt4zQ3.js +69 -0
  24. package/lib/d-fLig6yqY.js +139 -0
  25. package/lib/diff-WoKGLpy6.js +18 -0
  26. package/lib/dockerfile-u6f6Vw2s.js +194 -0
  27. package/lib/dtd-SIJRUW6K.js +91 -0
  28. package/lib/dylan-4HCLhpWP.js +238 -0
  29. package/lib/ebnf-h_0lged5.js +77 -0
  30. package/lib/ecl-Lf4FF0lf.js +133 -0
  31. package/lib/eiffel-qlw8KUyf.js +112 -0
  32. package/lib/elm-QRnB3zXs.js +108 -0
  33. package/lib/erlang-fyVKb7eK.js +488 -0
  34. package/lib/factor-BEeN4upY.js +65 -0
  35. package/lib/fcl-lRek3hEb.js +106 -0
  36. package/lib/feature/block-edit/handle/component.d.ts +9 -0
  37. package/lib/feature/block-edit/handle/component.d.ts.map +1 -0
  38. package/lib/feature/block-edit/handle/index.d.ts +12 -0
  39. package/lib/feature/block-edit/handle/index.d.ts.map +1 -0
  40. package/lib/feature/block-edit/index.d.ts +3 -0
  41. package/lib/feature/block-edit/index.d.ts.map +1 -0
  42. package/lib/feature/block-edit/menu/component.d.ts +14 -0
  43. package/lib/feature/block-edit/menu/component.d.ts.map +1 -0
  44. package/lib/feature/block-edit/menu/config.d.ts +21 -0
  45. package/lib/feature/block-edit/menu/config.d.ts.map +1 -0
  46. package/lib/feature/block-edit/menu/icons.d.ts +14 -0
  47. package/lib/feature/block-edit/menu/icons.d.ts.map +1 -0
  48. package/lib/feature/block-edit/menu/index.d.ts +9 -0
  49. package/lib/feature/block-edit/menu/index.d.ts.map +1 -0
  50. package/lib/feature/code-mirror/index.d.ts +3 -0
  51. package/lib/feature/code-mirror/index.d.ts.map +1 -0
  52. package/lib/feature/gap-cursor/index.d.ts +3 -0
  53. package/lib/feature/gap-cursor/index.d.ts.map +1 -0
  54. package/lib/feature/image-block/index.d.ts +3 -0
  55. package/lib/feature/image-block/index.d.ts.map +1 -0
  56. package/lib/feature/index.d.ts +18 -0
  57. package/lib/feature/index.d.ts.map +1 -0
  58. package/lib/feature/link-tooltip/consts.d.ts +5 -0
  59. package/lib/feature/link-tooltip/consts.d.ts.map +1 -0
  60. package/lib/feature/link-tooltip/index.d.ts +3 -0
  61. package/lib/feature/link-tooltip/index.d.ts.map +1 -0
  62. package/lib/feature/list-item/consts.d.ts +2 -0
  63. package/lib/feature/list-item/consts.d.ts.map +1 -0
  64. package/lib/feature/list-item/index.d.ts +3 -0
  65. package/lib/feature/list-item/index.d.ts.map +1 -0
  66. package/lib/feature/placeholder/index.d.ts +10 -0
  67. package/lib/feature/placeholder/index.d.ts.map +1 -0
  68. package/lib/feature/shared.d.ts +3 -0
  69. package/lib/feature/shared.d.ts.map +1 -0
  70. package/lib/feature/toolbar/component.d.ts +13 -0
  71. package/lib/feature/toolbar/component.d.ts.map +1 -0
  72. package/lib/feature/toolbar/consts.d.ts +5 -0
  73. package/lib/feature/toolbar/consts.d.ts.map +1 -0
  74. package/lib/feature/toolbar/index.d.ts +3 -0
  75. package/lib/feature/toolbar/index.d.ts.map +1 -0
  76. package/lib/forth-ua2bRd8T.js +60 -0
  77. package/lib/fortran-WnF7znuN.js +443 -0
  78. package/lib/gas-wowve1o7.js +183 -0
  79. package/lib/gherkin-m7GIChu3.js +34 -0
  80. package/lib/go-th443Dhb.js +158 -0
  81. package/lib/groovy-tR4RiZnc.js +161 -0
  82. package/lib/haskell-jxVBofv5.js +375 -0
  83. package/lib/haxe-kWPI2tq3.js +390 -0
  84. package/lib/hooks-82sqkbtE.js +21 -0
  85. package/lib/http-3GIFWUlG.js +45 -0
  86. package/lib/icons-HYkfuR-O.js +50 -0
  87. package/lib/idl-PvpMZg-l.js +947 -0
  88. package/lib/index-0RbcZMbq.js +8 -0
  89. package/lib/index-4afXjFMY.js +517 -0
  90. package/lib/index-7MeyepDG.js +78 -0
  91. package/lib/index-7QgQq3x3.js +551 -0
  92. package/lib/index-7pgP6qYs.js +107 -0
  93. package/lib/index-8DvtgRVa.js +19511 -0
  94. package/lib/index-8Gg-jEP4.js +288 -0
  95. package/lib/index-8S8qcncB.js +507 -0
  96. package/lib/index-9A_GmGh4.js +1039 -0
  97. package/lib/index-EJJfYLzA.js +928 -0
  98. package/lib/index-Eg39w5kL.js +984 -0
  99. package/lib/index-FIk_7oPb.js +168 -0
  100. package/lib/index-LlbrXb_n.js +368 -0
  101. package/lib/index-MovKtgMG.js +121 -0
  102. package/lib/index-N9GtIS4X.js +64 -0
  103. package/lib/index-Pwn25-kf.js +8 -0
  104. package/lib/index-SdFSDosa.js +1295 -0
  105. package/lib/index-W5Th22-Z.js +1744 -0
  106. package/lib/index-XiXSFLmI.js +20975 -0
  107. package/lib/index-bknOViGv.js +47 -0
  108. package/lib/index-bkuIUPFS.js +275 -0
  109. package/lib/index-jPA8J9Eo.js +8 -0
  110. package/lib/index-lsG76a9s.js +552 -0
  111. package/lib/index-oTRzPo3B.js +146 -0
  112. package/lib/index-rrf6_6DC.js +317 -0
  113. package/lib/index-vJbZIHYF.js +81 -0
  114. package/lib/index-vPRh55CO.js +137 -0
  115. package/lib/index-vxy63hib.js +323 -0
  116. package/lib/index-wn1_LgCS.js +99 -0
  117. package/lib/index-xHADmDT3.js +12 -0
  118. package/lib/index-yt2EpMtv.js +141 -0
  119. package/lib/index.d.ts +4 -0
  120. package/lib/index.d.ts.map +1 -0
  121. package/lib/index.es.js +7 -0
  122. package/lib/javascript-8ZHqHagw.js +758 -0
  123. package/lib/jinja2-vsOFe0qD.js +154 -0
  124. package/lib/julia-dlp_pbN1.js +241 -0
  125. package/lib/livescript-Gf5R-LT6.js +273 -0
  126. package/lib/lua-c5Y_JsBp.js +221 -0
  127. package/lib/mathematica-iiGTGmUs.js +35 -0
  128. package/lib/mbox-ZJh86H8B.js +78 -0
  129. package/lib/meta-tAGyVRPE.js +511 -0
  130. package/lib/mirc-i0qkCa0y.js +73 -0
  131. package/lib/mllike-Dy551fZW.js +275 -0
  132. package/lib/modelica-n6tGqUT9.js +94 -0
  133. package/lib/mscgen-aKSbB7D9.js +104 -0
  134. package/lib/mumps-lNiKA6sp.js +25 -0
  135. package/lib/nginx--YmuCfDj.js +93 -0
  136. package/lib/nsis-zhS8iA09.js +62 -0
  137. package/lib/ntriples-E3jQl3MC.js +79 -0
  138. package/lib/octave-EQvkGIeG.js +144 -0
  139. package/lib/oz-W2cpqFf6.js +152 -0
  140. package/lib/pascal-lCh6ouNZ.js +79 -0
  141. package/lib/perl-PxEQBX0B.js +915 -0
  142. package/lib/pig-Y_bNcrzS.js +56 -0
  143. package/lib/powershell-GaQP-TZr.js +249 -0
  144. package/lib/properties-mbRyn54L.js +26 -0
  145. package/lib/prosemirror-noTDkx-k.js +4 -0
  146. package/lib/protobuf-8CJideyJ.js +49 -0
  147. package/lib/puppet-ABBaChNZ.js +45 -0
  148. package/lib/python-sKdHg3Ka.js +321 -0
  149. package/lib/q-_1yG40Nm.js +89 -0
  150. package/lib/r-Ziz56bHT.js +108 -0
  151. package/lib/rpm-ORjGOHaQ.js +57 -0
  152. package/lib/ruby-jlbYq0dT.js +233 -0
  153. package/lib/sas-2n7xeUuO.js +107 -0
  154. package/lib/schema-tKk3m1fu.js +62 -0
  155. package/lib/scheme-XCs-NPeU.js +126 -0
  156. package/lib/shell-0_1Um7Dq.js +184 -0
  157. package/lib/sieve-7uyJD1x1.js +73 -0
  158. package/lib/simple-mode--HIzBxba.js +95 -0
  159. package/lib/smalltalk-PEFzrlQ-.js +48 -0
  160. package/lib/solr-BLBaHahN.js +41 -0
  161. package/lib/sparql-4F9ZWf1b.js +204 -0
  162. package/lib/spreadsheet-SGSo6blj.js +49 -0
  163. package/lib/sql-tebLBzN0.js +291 -0
  164. package/lib/stex-SFJcFGOO.js +130 -0
  165. package/lib/stylus-rwwWYWFm.js +256 -0
  166. package/lib/swift-eorJ0tCv.js +238 -0
  167. package/lib/tcl-IwXMB8U4.js +82 -0
  168. package/lib/textile-ok2VyjwC.js +299 -0
  169. package/lib/theme/classic/index.d.ts +3 -0
  170. package/lib/theme/classic/index.d.ts.map +1 -0
  171. package/lib/theme/classic-dark/index.d.ts +3 -0
  172. package/lib/theme/classic-dark/index.d.ts.map +1 -0
  173. package/lib/theme/headless/index.d.ts +3 -0
  174. package/lib/theme/headless/index.d.ts.map +1 -0
  175. package/lib/theme/index.d.ts +8 -0
  176. package/lib/theme/index.d.ts.map +1 -0
  177. package/lib/theme/shared.d.ts +3 -0
  178. package/lib/theme/shared.d.ts.map +1 -0
  179. package/lib/tiddlywiki-DLhz8_pc.js +156 -0
  180. package/lib/tiki-DFAqFElY.js +183 -0
  181. package/lib/tippy.esm-MZ2vxByW.js +1813 -0
  182. package/lib/toml-ryxpTZEV.js +49 -0
  183. package/lib/tooltip-plugin-gcwyQdiT.js +119 -0
  184. package/lib/troff-ZzZyvNct.js +36 -0
  185. package/lib/ttcn-6gvkqqpW.js +136 -0
  186. package/lib/ttcn-cfg-oSu-Dq5C.js +98 -0
  187. package/lib/turtle-10ofr5au.js +87 -0
  188. package/lib/use-css-light-dom-EKWZDmbJ.js +82 -0
  189. package/lib/utils/index.d.ts +4 -0
  190. package/lib/utils/index.d.ts.map +1 -0
  191. package/lib/vb-a6n6fzrD.js +74 -0
  192. package/lib/vbscript-dgvo8jPt.js +324 -0
  193. package/lib/velocity-CBncCrwO.js +97 -0
  194. package/lib/verilog-KlcACt6C.js +271 -0
  195. package/lib/vhdl-NMd7Gf35.js +117 -0
  196. package/lib/webidl-z1UE5DN_.js +160 -0
  197. package/lib/xquery-hDt5jWTp.js +431 -0
  198. package/lib/yacas-ftgh_qwr.js +74 -0
  199. package/lib/yaml-DnNTfjXK.js +53 -0
  200. package/lib/z80-dA1PqWe1.js +62 -0
  201. package/package.json +87 -0
  202. package/src/core/crepe.ts +98 -0
  203. package/src/core/index.ts +4 -0
  204. package/src/core/slice.ts +44 -0
  205. package/src/feature/block-edit/handle/component.ts +68 -0
  206. package/src/feature/block-edit/handle/index.ts +81 -0
  207. package/src/feature/block-edit/index.ts +17 -0
  208. package/src/feature/block-edit/menu/component.ts +210 -0
  209. package/src/feature/block-edit/menu/config.ts +335 -0
  210. package/src/feature/block-edit/menu/icons.ts +171 -0
  211. package/src/feature/block-edit/menu/index.ts +113 -0
  212. package/src/feature/block-edit/style.css +126 -0
  213. package/src/feature/code-mirror/index.ts +60 -0
  214. package/src/feature/code-mirror/style.css +159 -0
  215. package/src/feature/gap-cursor/index.ts +31 -0
  216. package/src/feature/image-block/index.ts +59 -0
  217. package/src/feature/image-block/style.css +215 -0
  218. package/src/feature/index.ts +66 -0
  219. package/src/feature/link-tooltip/consts.ts +47 -0
  220. package/src/feature/link-tooltip/index.ts +22 -0
  221. package/src/feature/link-tooltip/style.css +107 -0
  222. package/src/feature/list-item/consts.ts +15 -0
  223. package/src/feature/list-item/index.ts +30 -0
  224. package/src/feature/list-item/style.css +23 -0
  225. package/src/feature/placeholder/index.ts +87 -0
  226. package/src/feature/placeholder/style.css +9 -0
  227. package/src/feature/shared.ts +4 -0
  228. package/src/feature/toolbar/component.ts +101 -0
  229. package/src/feature/toolbar/consts.ts +26 -0
  230. package/src/feature/toolbar/index.ts +92 -0
  231. package/src/feature/toolbar/style.css +37 -0
  232. package/src/index.ts +5 -0
  233. package/src/theme/classic/index.ts +12 -0
  234. package/src/theme/classic/style.css +192 -0
  235. package/src/theme/classic-dark/index.ts +12 -0
  236. package/src/theme/classic-dark/style.css +197 -0
  237. package/src/theme/headless/index.ts +9 -0
  238. package/src/theme/index.ts +26 -0
  239. package/src/theme/shared.ts +4 -0
  240. package/src/utils/index.ts +12 -0
  241. package/src/vite-env.d.ts +2 -0
@@ -0,0 +1,184 @@
1
+ var c = {};
2
+ function s(n, e) {
3
+ for (var i = 0; i < e.length; i++)
4
+ c[e[i]] = n;
5
+ }
6
+ var k = ["true", "false"], h = [
7
+ "if",
8
+ "then",
9
+ "do",
10
+ "else",
11
+ "elif",
12
+ "while",
13
+ "until",
14
+ "for",
15
+ "in",
16
+ "esac",
17
+ "fi",
18
+ "fin",
19
+ "fil",
20
+ "done",
21
+ "exit",
22
+ "set",
23
+ "unset",
24
+ "export",
25
+ "function"
26
+ ], p = [
27
+ "ab",
28
+ "awk",
29
+ "bash",
30
+ "beep",
31
+ "cat",
32
+ "cc",
33
+ "cd",
34
+ "chown",
35
+ "chmod",
36
+ "chroot",
37
+ "clear",
38
+ "cp",
39
+ "curl",
40
+ "cut",
41
+ "diff",
42
+ "echo",
43
+ "find",
44
+ "gawk",
45
+ "gcc",
46
+ "get",
47
+ "git",
48
+ "grep",
49
+ "hg",
50
+ "kill",
51
+ "killall",
52
+ "ln",
53
+ "ls",
54
+ "make",
55
+ "mkdir",
56
+ "openssl",
57
+ "mv",
58
+ "nc",
59
+ "nl",
60
+ "node",
61
+ "npm",
62
+ "ping",
63
+ "ps",
64
+ "restart",
65
+ "rm",
66
+ "rmdir",
67
+ "sed",
68
+ "service",
69
+ "sh",
70
+ "shopt",
71
+ "shred",
72
+ "source",
73
+ "sort",
74
+ "sleep",
75
+ "ssh",
76
+ "start",
77
+ "stop",
78
+ "su",
79
+ "sudo",
80
+ "svn",
81
+ "tee",
82
+ "telnet",
83
+ "top",
84
+ "touch",
85
+ "vi",
86
+ "vim",
87
+ "wall",
88
+ "wc",
89
+ "wget",
90
+ "who",
91
+ "write",
92
+ "yes",
93
+ "zsh"
94
+ ];
95
+ s("atom", k);
96
+ s("keyword", h);
97
+ s("builtin", p);
98
+ function d(n, e) {
99
+ if (n.eatSpace())
100
+ return null;
101
+ var i = n.sol(), t = n.next();
102
+ if (t === "\\")
103
+ return n.next(), null;
104
+ if (t === "'" || t === '"' || t === "`")
105
+ return e.tokens.unshift(l(t, t === "`" ? "quote" : "string")), u(n, e);
106
+ if (t === "#")
107
+ return i && n.eat("!") ? (n.skipToEnd(), "meta") : (n.skipToEnd(), "comment");
108
+ if (t === "$")
109
+ return e.tokens.unshift(a), u(n, e);
110
+ if (t === "+" || t === "=")
111
+ return "operator";
112
+ if (t === "-")
113
+ return n.eat("-"), n.eatWhile(/\w/), "attribute";
114
+ if (t == "<") {
115
+ if (n.match("<<"))
116
+ return "operator";
117
+ var o = n.match(/^<-?\s*(?:['"]([^'"]*)['"]|([^'"\s]*))/);
118
+ if (o)
119
+ return e.tokens.unshift(w(o[1] || o[2])), "string.special";
120
+ }
121
+ if (/\d/.test(t) && (n.eatWhile(/\d/), n.eol() || !/\w/.test(n.peek())))
122
+ return "number";
123
+ n.eatWhile(/[\w-]/);
124
+ var r = n.current();
125
+ return n.peek() === "=" && /\w+/.test(r) ? "def" : c.hasOwnProperty(r) ? c[r] : null;
126
+ }
127
+ function l(n, e) {
128
+ var i = n == "(" ? ")" : n == "{" ? "}" : n;
129
+ return function(t, o) {
130
+ for (var r, f = !1; (r = t.next()) != null; ) {
131
+ if (r === i && !f) {
132
+ o.tokens.shift();
133
+ break;
134
+ } else if (r === "$" && !f && n !== "'" && t.peek() != i) {
135
+ f = !0, t.backUp(1), o.tokens.unshift(a);
136
+ break;
137
+ } else {
138
+ if (!f && n !== i && r === n)
139
+ return o.tokens.unshift(l(n, e)), u(t, o);
140
+ if (!f && /['"]/.test(r) && !/['"]/.test(n)) {
141
+ o.tokens.unshift(g(r, "string")), t.backUp(1);
142
+ break;
143
+ }
144
+ }
145
+ f = !f && r === "\\";
146
+ }
147
+ return e;
148
+ };
149
+ }
150
+ function g(n, e) {
151
+ return function(i, t) {
152
+ return t.tokens[0] = l(n, e), i.next(), u(i, t);
153
+ };
154
+ }
155
+ var a = function(n, e) {
156
+ e.tokens.length > 1 && n.eat("$");
157
+ var i = n.next();
158
+ return /['"({]/.test(i) ? (e.tokens[0] = l(i, i == "(" ? "quote" : i == "{" ? "def" : "string"), u(n, e)) : (/\d/.test(i) || n.eatWhile(/\w/), e.tokens.shift(), "def");
159
+ };
160
+ function w(n) {
161
+ return function(e, i) {
162
+ return e.sol() && e.string == n && i.tokens.shift(), e.skipToEnd(), "string.special";
163
+ };
164
+ }
165
+ function u(n, e) {
166
+ return (e.tokens[0] || d)(n, e);
167
+ }
168
+ const v = {
169
+ name: "shell",
170
+ startState: function() {
171
+ return { tokens: [] };
172
+ },
173
+ token: function(n, e) {
174
+ return u(n, e);
175
+ },
176
+ languageData: {
177
+ autocomplete: k.concat(h, p),
178
+ closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
179
+ commentTokens: { line: "#" }
180
+ }
181
+ };
182
+ export {
183
+ v as shell
184
+ };
@@ -0,0 +1,73 @@
1
+ function l(n) {
2
+ for (var e = {}, i = n.split(" "), r = 0; r < i.length; ++r)
3
+ e[i[r]] = !0;
4
+ return e;
5
+ }
6
+ var f = l("if elsif else stop require"), p = l("true false not");
7
+ function t(n, e) {
8
+ var i = n.next();
9
+ if (i == "/" && n.eat("*"))
10
+ return e.tokenize = o, o(n, e);
11
+ if (i === "#")
12
+ return n.skipToEnd(), "comment";
13
+ if (i == '"')
14
+ return e.tokenize = d(i), e.tokenize(n, e);
15
+ if (i == "(")
16
+ return e._indent.push("("), e._indent.push("{"), null;
17
+ if (i === "{")
18
+ return e._indent.push("{"), null;
19
+ if (i == ")" && (e._indent.pop(), e._indent.pop()), i === "}")
20
+ return e._indent.pop(), null;
21
+ if (i == "," || i == ";" || /[{}\(\),;]/.test(i))
22
+ return null;
23
+ if (/\d/.test(i))
24
+ return n.eatWhile(/[\d]/), n.eat(/[KkMmGg]/), "number";
25
+ if (i == ":")
26
+ return n.eatWhile(/[a-zA-Z_]/), n.eatWhile(/[a-zA-Z0-9_]/), "operator";
27
+ n.eatWhile(/\w/);
28
+ var r = n.current();
29
+ return r == "text" && n.eat(":") ? (e.tokenize = k, "string") : f.propertyIsEnumerable(r) ? "keyword" : p.propertyIsEnumerable(r) ? "atom" : null;
30
+ }
31
+ function k(n, e) {
32
+ return e._multiLineString = !0, n.sol() ? (n.next() == "." && n.eol() && (e._multiLineString = !1, e.tokenize = t), "string") : (n.eatSpace(), n.peek() == "#" ? (n.skipToEnd(), "comment") : (n.skipToEnd(), "string"));
33
+ }
34
+ function o(n, e) {
35
+ for (var i = !1, r; (r = n.next()) != null; ) {
36
+ if (i && r == "/") {
37
+ e.tokenize = t;
38
+ break;
39
+ }
40
+ i = r == "*";
41
+ }
42
+ return "comment";
43
+ }
44
+ function d(n) {
45
+ return function(e, i) {
46
+ for (var r = !1, u; (u = e.next()) != null && !(u == n && !r); )
47
+ r = !r && u == "\\";
48
+ return r || (i.tokenize = t), "string";
49
+ };
50
+ }
51
+ const c = {
52
+ name: "sieve",
53
+ startState: function(n) {
54
+ return {
55
+ tokenize: t,
56
+ baseIndent: n || 0,
57
+ _indent: []
58
+ };
59
+ },
60
+ token: function(n, e) {
61
+ return n.eatSpace() ? null : (e.tokenize || t)(n, e);
62
+ },
63
+ indent: function(n, e, i) {
64
+ var r = n._indent.length;
65
+ return e && e[0] == "}" && r--, r < 0 && (r = 0), r * i.unit;
66
+ },
67
+ languageData: {
68
+ indentOnInput: /^\s*\}$/
69
+ }
70
+ };
71
+ export {
72
+ c as sieve
73
+ };
@@ -0,0 +1,95 @@
1
+ function k(n) {
2
+ c(n, "start");
3
+ var i = {}, e = n.languageData || {}, p = !1;
4
+ for (var d in n)
5
+ if (d != e && n.hasOwnProperty(d))
6
+ for (var u = i[d] = [], r = n[d], t = 0; t < r.length; t++) {
7
+ var f = r[t];
8
+ u.push(new l(f, n)), (f.indent || f.dedent) && (p = !0);
9
+ }
10
+ return {
11
+ name: e.name,
12
+ startState: function() {
13
+ return { state: "start", pending: null, indent: p ? [] : null };
14
+ },
15
+ copyState: function(o) {
16
+ var g = { state: o.state, pending: o.pending, indent: o.indent && o.indent.slice(0) };
17
+ return o.stack && (g.stack = o.stack.slice(0)), g;
18
+ },
19
+ token: s(i),
20
+ indent: x(i, e),
21
+ languageData: e
22
+ };
23
+ }
24
+ function c(n, i) {
25
+ if (!n.hasOwnProperty(i))
26
+ throw new Error("Undefined state " + i + " in simple mode");
27
+ }
28
+ function h(n, i) {
29
+ if (!n)
30
+ return /(?:)/;
31
+ var e = "";
32
+ return n instanceof RegExp ? (n.ignoreCase && (e = "i"), n = n.source) : n = String(n), new RegExp((i === !1 ? "" : "^") + "(?:" + n + ")", e);
33
+ }
34
+ function a(n) {
35
+ if (!n)
36
+ return null;
37
+ if (n.apply)
38
+ return n;
39
+ if (typeof n == "string")
40
+ return n.replace(/\./g, " ");
41
+ for (var i = [], e = 0; e < n.length; e++)
42
+ i.push(n[e] && n[e].replace(/\./g, " "));
43
+ return i;
44
+ }
45
+ function l(n, i) {
46
+ (n.next || n.push) && c(i, n.next || n.push), this.regex = h(n.regex), this.token = a(n.token), this.data = n;
47
+ }
48
+ function s(n) {
49
+ return function(i, e) {
50
+ if (e.pending) {
51
+ var p = e.pending.shift();
52
+ return e.pending.length == 0 && (e.pending = null), i.pos += p.text.length, p.token;
53
+ }
54
+ for (var d = n[e.state], u = 0; u < d.length; u++) {
55
+ var r = d[u], t = (!r.data.sol || i.sol()) && i.match(r.regex);
56
+ if (t) {
57
+ r.data.next ? e.state = r.data.next : r.data.push ? ((e.stack || (e.stack = [])).push(e.state), e.state = r.data.push) : r.data.pop && e.stack && e.stack.length && (e.state = e.stack.pop()), r.data.indent && e.indent.push(i.indentation() + i.indentUnit), r.data.dedent && e.indent.pop();
58
+ var f = r.token;
59
+ if (f && f.apply && (f = f(t)), t.length > 2 && r.token && typeof r.token != "string") {
60
+ e.pending = [];
61
+ for (var o = 2; o < t.length; o++)
62
+ t[o] && e.pending.push({ text: t[o], token: r.token[o - 1] });
63
+ return i.backUp(t[0].length - (t[1] ? t[1].length : 0)), f[0];
64
+ } else
65
+ return f && f.join ? f[0] : f;
66
+ }
67
+ }
68
+ return i.next(), null;
69
+ };
70
+ }
71
+ function x(n, i) {
72
+ return function(e, p) {
73
+ if (e.indent == null || i.dontIndentStates && i.doneIndentState.indexOf(e.state) > -1)
74
+ return null;
75
+ var d = e.indent.length - 1, u = n[e.state];
76
+ n:
77
+ for (; ; ) {
78
+ for (var r = 0; r < u.length; r++) {
79
+ var t = u[r];
80
+ if (t.data.dedent && t.data.dedentIfLineStart !== !1) {
81
+ var f = t.regex.exec(p);
82
+ if (f && f[0]) {
83
+ d--, (t.next || t.push) && (u = n[t.next || t.push]), p = p.slice(f[0].length);
84
+ continue n;
85
+ }
86
+ }
87
+ }
88
+ break;
89
+ }
90
+ return d < 0 ? 0 : e.indent[d];
91
+ };
92
+ }
93
+ export {
94
+ k as s
95
+ };
@@ -0,0 +1,48 @@
1
+ var o = /[+\-\/\\*~<>=@%|&?!.,:;^]/, p = /true|false|nil|self|super|thisContext/, l = function(e, n) {
2
+ this.next = e, this.parent = n;
3
+ }, r = function(e, n, t) {
4
+ this.name = e, this.context = n, this.eos = t;
5
+ }, c = function() {
6
+ this.context = new l(h, null), this.expectVariable = !0, this.indentation = 0, this.userIndentationDelta = 0;
7
+ };
8
+ c.prototype.userIndent = function(e, n) {
9
+ this.userIndentationDelta = e > 0 ? e / n - this.indentation : 0;
10
+ };
11
+ var h = function(e, n, t) {
12
+ var i = new r(null, n, !1), a = e.next();
13
+ return a === '"' ? i = u(e, new l(u, n)) : a === "'" ? i = s(e, new l(s, n)) : a === "#" ? e.peek() === "'" ? (e.next(), i = f(e, new l(f, n))) : e.eatWhile(/[^\s.{}\[\]()]/) ? i.name = "string.special" : i.name = "meta" : a === "$" ? (e.next() === "<" && (e.eatWhile(/[^\s>]/), e.next()), i.name = "string.special") : a === "|" && t.expectVariable ? i.context = new l(x, n) : /[\[\]{}()]/.test(a) ? (i.name = "bracket", i.eos = /[\[{(]/.test(a), a === "[" ? t.indentation++ : a === "]" && (t.indentation = Math.max(0, t.indentation - 1))) : o.test(a) ? (e.eatWhile(o), i.name = "operator", i.eos = a !== ";") : /\d/.test(a) ? (e.eatWhile(/[\w\d]/), i.name = "number") : /[\w_]/.test(a) ? (e.eatWhile(/[\w\d_]/), i.name = t.expectVariable ? p.test(e.current()) ? "keyword" : "variable" : null) : i.eos = t.expectVariable, i;
14
+ }, u = function(e, n) {
15
+ return e.eatWhile(/[^"]/), new r("comment", e.eat('"') ? n.parent : n, !0);
16
+ }, s = function(e, n) {
17
+ return e.eatWhile(/[^']/), new r("string", e.eat("'") ? n.parent : n, !1);
18
+ }, f = function(e, n) {
19
+ return e.eatWhile(/[^']/), new r("string.special", e.eat("'") ? n.parent : n, !1);
20
+ }, x = function(e, n) {
21
+ var t = new r(null, n, !1), i = e.next();
22
+ return i === "|" ? (t.context = n.parent, t.eos = !0) : (e.eatWhile(/[^|]/), t.name = "variable"), t;
23
+ };
24
+ const d = {
25
+ name: "smalltalk",
26
+ startState: function() {
27
+ return new c();
28
+ },
29
+ token: function(e, n) {
30
+ if (n.userIndent(e.indentation(), e.indentUnit), e.eatSpace())
31
+ return null;
32
+ var t = n.context.next(e, n.context, n);
33
+ return n.context = t.context, n.expectVariable = t.eos, t.name;
34
+ },
35
+ blankLine: function(e, n) {
36
+ e.userIndent(0, n);
37
+ },
38
+ indent: function(e, n, t) {
39
+ var i = e.context.next === h && n && n.charAt(0) === "]" ? -1 : e.userIndentationDelta;
40
+ return (e.indentation + i) * t.unit;
41
+ },
42
+ languageData: {
43
+ indentOnInput: /^\s*\]$/
44
+ }
45
+ };
46
+ export {
47
+ d as smalltalk
48
+ };
@@ -0,0 +1,41 @@
1
+ var u = /[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/, f = /[\|\!\+\-\*\?\~\^\&]/, l = /^(OR|AND|NOT|TO)$/i;
2
+ function k(n) {
3
+ return parseFloat(n).toString() === n;
4
+ }
5
+ function a(n) {
6
+ return function(e, r) {
7
+ for (var t = !1, o; (o = e.next()) != null && !(o == n && !t); )
8
+ t = !t && o == "\\";
9
+ return t || (r.tokenize = i), "string";
10
+ };
11
+ }
12
+ function c(n) {
13
+ return function(e, r) {
14
+ return n == "|" ? e.eat(/\|/) : n == "&" && e.eat(/\&/), r.tokenize = i, "operator";
15
+ };
16
+ }
17
+ function s(n) {
18
+ return function(e, r) {
19
+ for (var t = n; (n = e.peek()) && n.match(u) != null; )
20
+ t += e.next();
21
+ return r.tokenize = i, l.test(t) ? "operator" : k(t) ? "number" : e.peek() == ":" ? "propertyName" : "string";
22
+ };
23
+ }
24
+ function i(n, e) {
25
+ var r = n.next();
26
+ return r == '"' ? e.tokenize = a(r) : f.test(r) ? e.tokenize = c(r) : u.test(r) && (e.tokenize = s(r)), e.tokenize != i ? e.tokenize(n, e) : null;
27
+ }
28
+ const p = {
29
+ name: "solr",
30
+ startState: function() {
31
+ return {
32
+ tokenize: i
33
+ };
34
+ },
35
+ token: function(n, e) {
36
+ return n.eatSpace() ? null : e.tokenize(n, e);
37
+ }
38
+ };
39
+ export {
40
+ p as solr
41
+ };
@@ -0,0 +1,204 @@
1
+ var u;
2
+ function s(n) {
3
+ return new RegExp("^(?:" + n.join("|") + ")$", "i");
4
+ }
5
+ var d = s([
6
+ "str",
7
+ "lang",
8
+ "langmatches",
9
+ "datatype",
10
+ "bound",
11
+ "sameterm",
12
+ "isiri",
13
+ "isuri",
14
+ "iri",
15
+ "uri",
16
+ "bnode",
17
+ "count",
18
+ "sum",
19
+ "min",
20
+ "max",
21
+ "avg",
22
+ "sample",
23
+ "group_concat",
24
+ "rand",
25
+ "abs",
26
+ "ceil",
27
+ "floor",
28
+ "round",
29
+ "concat",
30
+ "substr",
31
+ "strlen",
32
+ "replace",
33
+ "ucase",
34
+ "lcase",
35
+ "encode_for_uri",
36
+ "contains",
37
+ "strstarts",
38
+ "strends",
39
+ "strbefore",
40
+ "strafter",
41
+ "year",
42
+ "month",
43
+ "day",
44
+ "hours",
45
+ "minutes",
46
+ "seconds",
47
+ "timezone",
48
+ "tz",
49
+ "now",
50
+ "uuid",
51
+ "struuid",
52
+ "md5",
53
+ "sha1",
54
+ "sha256",
55
+ "sha384",
56
+ "sha512",
57
+ "coalesce",
58
+ "if",
59
+ "strlang",
60
+ "strdt",
61
+ "isnumeric",
62
+ "regex",
63
+ "exists",
64
+ "isblank",
65
+ "isliteral",
66
+ "a",
67
+ "bind"
68
+ ]), F = s([
69
+ "base",
70
+ "prefix",
71
+ "select",
72
+ "distinct",
73
+ "reduced",
74
+ "construct",
75
+ "describe",
76
+ "ask",
77
+ "from",
78
+ "named",
79
+ "where",
80
+ "order",
81
+ "limit",
82
+ "offset",
83
+ "filter",
84
+ "optional",
85
+ "graph",
86
+ "by",
87
+ "asc",
88
+ "desc",
89
+ "as",
90
+ "having",
91
+ "undef",
92
+ "values",
93
+ "group",
94
+ "minus",
95
+ "in",
96
+ "not",
97
+ "service",
98
+ "silent",
99
+ "using",
100
+ "insert",
101
+ "delete",
102
+ "union",
103
+ "true",
104
+ "false",
105
+ "with",
106
+ "data",
107
+ "copy",
108
+ "to",
109
+ "move",
110
+ "add",
111
+ "create",
112
+ "drop",
113
+ "clear",
114
+ "load",
115
+ "into"
116
+ ]), x = /[*+\-<>=&|\^\/!\?]/, a = "[A-Za-z_\\-0-9]", h = new RegExp("[A-Za-z]"), g = new RegExp("((" + a + "|\\.)*(" + a + "))?:");
117
+ function p(n, e) {
118
+ var t = n.next();
119
+ if (u = null, t == "$" || t == "?")
120
+ return t == "?" && n.match(/\s/, !1) ? "operator" : (n.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/), "variableName.local");
121
+ if (t == "<" && !n.match(/^[\s\u00a0=]/, !1))
122
+ return n.match(/^[^\s\u00a0>]*>?/), "atom";
123
+ if (t == '"' || t == "'")
124
+ return e.tokenize = v(t), e.tokenize(n, e);
125
+ if (/[{}\(\),\.;\[\]]/.test(t))
126
+ return u = t, "bracket";
127
+ if (t == "#")
128
+ return n.skipToEnd(), "comment";
129
+ if (x.test(t))
130
+ return "operator";
131
+ if (t == ":")
132
+ return f(n), "atom";
133
+ if (t == "@")
134
+ return n.eatWhile(/[a-z\d\-]/i), "meta";
135
+ if (h.test(t) && n.match(g))
136
+ return f(n), "atom";
137
+ n.eatWhile(/[_\w\d]/);
138
+ var i = n.current();
139
+ return d.test(i) ? "builtin" : F.test(i) ? "keyword" : "variable";
140
+ }
141
+ function f(n) {
142
+ n.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i);
143
+ }
144
+ function v(n) {
145
+ return function(e, t) {
146
+ for (var i = !1, r; (r = e.next()) != null; ) {
147
+ if (r == n && !i) {
148
+ t.tokenize = p;
149
+ break;
150
+ }
151
+ i = !i && r == "\\";
152
+ }
153
+ return "string";
154
+ };
155
+ }
156
+ function o(n, e, t) {
157
+ n.context = { prev: n.context, indent: n.indent, col: t, type: e };
158
+ }
159
+ function c(n) {
160
+ n.indent = n.context.indent, n.context = n.context.prev;
161
+ }
162
+ const m = {
163
+ name: "sparql",
164
+ startState: function() {
165
+ return {
166
+ tokenize: p,
167
+ context: null,
168
+ indent: 0,
169
+ col: 0
170
+ };
171
+ },
172
+ token: function(n, e) {
173
+ if (n.sol() && (e.context && e.context.align == null && (e.context.align = !1), e.indent = n.indentation()), n.eatSpace())
174
+ return null;
175
+ var t = e.tokenize(n, e);
176
+ if (t != "comment" && e.context && e.context.align == null && e.context.type != "pattern" && (e.context.align = !0), u == "(")
177
+ o(e, ")", n.column());
178
+ else if (u == "[")
179
+ o(e, "]", n.column());
180
+ else if (u == "{")
181
+ o(e, "}", n.column());
182
+ else if (/[\]\}\)]/.test(u)) {
183
+ for (; e.context && e.context.type == "pattern"; )
184
+ c(e);
185
+ e.context && u == e.context.type && (c(e), u == "}" && e.context && e.context.type == "pattern" && c(e));
186
+ } else
187
+ u == "." && e.context && e.context.type == "pattern" ? c(e) : /atom|string|variable/.test(t) && e.context && (/[\}\]]/.test(e.context.type) ? o(e, "pattern", n.column()) : e.context.type == "pattern" && !e.context.align && (e.context.align = !0, e.context.col = n.column()));
188
+ return t;
189
+ },
190
+ indent: function(n, e, t) {
191
+ var i = e && e.charAt(0), r = n.context;
192
+ if (/[\]\}]/.test(i))
193
+ for (; r && r.type == "pattern"; )
194
+ r = r.prev;
195
+ var l = r && i == r.type;
196
+ return r ? r.type == "pattern" ? r.col : r.align ? r.col + (l ? 0 : 1) : r.indent + (l ? 0 : t.unit) : 0;
197
+ },
198
+ languageData: {
199
+ commentTokens: { line: "#" }
200
+ }
201
+ };
202
+ export {
203
+ m as sparql
204
+ };
@@ -0,0 +1,49 @@
1
+ const i = {
2
+ name: "spreadsheet",
3
+ startState: function() {
4
+ return {
5
+ stringType: null,
6
+ stack: []
7
+ };
8
+ },
9
+ token: function(e, n) {
10
+ if (e) {
11
+ switch (n.stack.length === 0 && (e.peek() == '"' || e.peek() == "'") && (n.stringType = e.peek(), e.next(), n.stack.unshift("string")), n.stack[0]) {
12
+ case "string":
13
+ for (; n.stack[0] === "string" && !e.eol(); )
14
+ e.peek() === n.stringType ? (e.next(), n.stack.shift()) : e.peek() === "\\" ? (e.next(), e.next()) : e.match(/^.[^\\\"\']*/);
15
+ return "string";
16
+ case "characterClass":
17
+ for (; n.stack[0] === "characterClass" && !e.eol(); )
18
+ e.match(/^[^\]\\]+/) || e.match(/^\\./) || n.stack.shift();
19
+ return "operator";
20
+ }
21
+ var c = e.peek();
22
+ switch (c) {
23
+ case "[":
24
+ return e.next(), n.stack.unshift("characterClass"), "bracket";
25
+ case ":":
26
+ return e.next(), "operator";
27
+ case "\\":
28
+ return e.match(/\\[a-z]+/) ? "string.special" : (e.next(), "atom");
29
+ case ".":
30
+ case ",":
31
+ case ";":
32
+ case "*":
33
+ case "-":
34
+ case "+":
35
+ case "^":
36
+ case "<":
37
+ case "/":
38
+ case "=":
39
+ return e.next(), "atom";
40
+ case "$":
41
+ return e.next(), "builtin";
42
+ }
43
+ return e.match(/\d+/) ? e.match(/^\w+/) ? "error" : "number" : e.match(/^[a-zA-Z_]\w*/) ? e.match(/(?=[\(.])/, !1) ? "keyword" : "variable" : ["[", "]", "(", ")", "{", "}"].indexOf(c) != -1 ? (e.next(), "bracket") : (e.eatSpace() || e.next(), null);
44
+ }
45
+ }
46
+ };
47
+ export {
48
+ i as spreadsheet
49
+ };