@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,321 @@
1
+ function s(o) {
2
+ return new RegExp("^((" + o.join(")|(") + "))\\b");
3
+ }
4
+ var N = s(["and", "or", "not", "is"]), E = [
5
+ "as",
6
+ "assert",
7
+ "break",
8
+ "class",
9
+ "continue",
10
+ "def",
11
+ "del",
12
+ "elif",
13
+ "else",
14
+ "except",
15
+ "finally",
16
+ "for",
17
+ "from",
18
+ "global",
19
+ "if",
20
+ "import",
21
+ "lambda",
22
+ "pass",
23
+ "raise",
24
+ "return",
25
+ "try",
26
+ "while",
27
+ "with",
28
+ "yield",
29
+ "in",
30
+ "False",
31
+ "True"
32
+ ], F = [
33
+ "abs",
34
+ "all",
35
+ "any",
36
+ "bin",
37
+ "bool",
38
+ "bytearray",
39
+ "callable",
40
+ "chr",
41
+ "classmethod",
42
+ "compile",
43
+ "complex",
44
+ "delattr",
45
+ "dict",
46
+ "dir",
47
+ "divmod",
48
+ "enumerate",
49
+ "eval",
50
+ "filter",
51
+ "float",
52
+ "format",
53
+ "frozenset",
54
+ "getattr",
55
+ "globals",
56
+ "hasattr",
57
+ "hash",
58
+ "help",
59
+ "hex",
60
+ "id",
61
+ "input",
62
+ "int",
63
+ "isinstance",
64
+ "issubclass",
65
+ "iter",
66
+ "len",
67
+ "list",
68
+ "locals",
69
+ "map",
70
+ "max",
71
+ "memoryview",
72
+ "min",
73
+ "next",
74
+ "object",
75
+ "oct",
76
+ "open",
77
+ "ord",
78
+ "pow",
79
+ "property",
80
+ "range",
81
+ "repr",
82
+ "reversed",
83
+ "round",
84
+ "set",
85
+ "setattr",
86
+ "slice",
87
+ "sorted",
88
+ "staticmethod",
89
+ "str",
90
+ "sum",
91
+ "super",
92
+ "tuple",
93
+ "type",
94
+ "vars",
95
+ "zip",
96
+ "__import__",
97
+ "NotImplemented",
98
+ "Ellipsis",
99
+ "__debug__"
100
+ ];
101
+ function c(o) {
102
+ return o.scopes[o.scopes.length - 1];
103
+ }
104
+ function A(o) {
105
+ for (var p = "error", O = o.delimiters || o.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/, h = [
106
+ o.singleOperators,
107
+ o.doubleOperators,
108
+ o.doubleDelimiters,
109
+ o.tripleDelimiters,
110
+ o.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/
111
+ ], g = 0; g < h.length; g++)
112
+ h[g] || h.splice(g--, 1);
113
+ var k = o.hangingIndent, d = E, a = F;
114
+ o.extra_keywords != null && (d = d.concat(o.extra_keywords)), o.extra_builtins != null && (a = a.concat(o.extra_builtins));
115
+ var x = !(o.version && Number(o.version) < 3);
116
+ if (x) {
117
+ var y = o.identifiers || /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;
118
+ d = d.concat(["nonlocal", "None", "aiter", "anext", "async", "await", "breakpoint", "match", "case"]), a = a.concat(["ascii", "bytes", "exec", "print"]);
119
+ var w = new RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`, "i");
120
+ } else {
121
+ var y = o.identifiers || /^[_A-Za-z][_A-Za-z0-9]*/;
122
+ d = d.concat(["exec", "print"]), a = a.concat([
123
+ "apply",
124
+ "basestring",
125
+ "buffer",
126
+ "cmp",
127
+ "coerce",
128
+ "execfile",
129
+ "file",
130
+ "intern",
131
+ "long",
132
+ "raw_input",
133
+ "reduce",
134
+ "reload",
135
+ "unichr",
136
+ "unicode",
137
+ "xrange",
138
+ "None"
139
+ ]);
140
+ var w = new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`, "i");
141
+ }
142
+ var I = s(d), L = s(a);
143
+ function z(n, e) {
144
+ var r = n.sol() && e.lastToken != "\\";
145
+ if (r && (e.indent = n.indentation()), r && c(e).type == "py") {
146
+ var i = c(e).offset;
147
+ if (n.eatSpace()) {
148
+ var l = n.indentation();
149
+ return l > i ? S(n, e) : l < i && _(n, e) && n.peek() != "#" && (e.errorToken = !0), null;
150
+ } else {
151
+ var t = v(n, e);
152
+ return i > 0 && _(n, e) && (t += " " + p), t;
153
+ }
154
+ }
155
+ return v(n, e);
156
+ }
157
+ function v(n, e, r) {
158
+ if (n.eatSpace())
159
+ return null;
160
+ if (!r && n.match(/^#.*/))
161
+ return "comment";
162
+ if (n.match(/^[0-9\.]/, !1)) {
163
+ var i = !1;
164
+ if (n.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i) && (i = !0), n.match(/^[\d_]+\.\d*/) && (i = !0), n.match(/^\.\d+/) && (i = !0), i)
165
+ return n.eat(/J/i), "number";
166
+ var l = !1;
167
+ if (n.match(/^0x[0-9a-f_]+/i) && (l = !0), n.match(/^0b[01_]+/i) && (l = !0), n.match(/^0o[0-7_]+/i) && (l = !0), n.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/) && (n.eat(/J/i), l = !0), n.match(/^0(?![\dx])/i) && (l = !0), l)
168
+ return n.eat(/L/i), "number";
169
+ }
170
+ if (n.match(w)) {
171
+ var t = n.current().toLowerCase().indexOf("f") !== -1;
172
+ return t ? (e.tokenize = R(n.current(), e.tokenize), e.tokenize(n, e)) : (e.tokenize = B(n.current(), e.tokenize), e.tokenize(n, e));
173
+ }
174
+ for (var u = 0; u < h.length; u++)
175
+ if (n.match(h[u]))
176
+ return "operator";
177
+ return n.match(O) ? "punctuation" : e.lastToken == "." && n.match(y) ? "property" : n.match(I) || n.match(N) ? "keyword" : n.match(L) ? "builtin" : n.match(/^(self|cls)\b/) ? "self" : n.match(y) ? e.lastToken == "def" || e.lastToken == "class" ? "def" : "variable" : (n.next(), r ? null : p);
178
+ }
179
+ function R(n, e) {
180
+ for (; "rubf".indexOf(n.charAt(0).toLowerCase()) >= 0; )
181
+ n = n.substr(1);
182
+ var r = n.length == 1, i = "string";
183
+ function l(u) {
184
+ return function(f, b) {
185
+ var T = v(f, b, !0);
186
+ return T == "punctuation" && (f.current() == "{" ? b.tokenize = l(u + 1) : f.current() == "}" && (u > 1 ? b.tokenize = l(u - 1) : b.tokenize = t)), T;
187
+ };
188
+ }
189
+ function t(u, f) {
190
+ for (; !u.eol(); )
191
+ if (u.eatWhile(/[^'"\{\}\\]/), u.eat("\\")) {
192
+ if (u.next(), r && u.eol())
193
+ return i;
194
+ } else {
195
+ if (u.match(n))
196
+ return f.tokenize = e, i;
197
+ if (u.match("{{"))
198
+ return i;
199
+ if (u.match("{", !1))
200
+ return f.tokenize = l(0), u.current() ? i : f.tokenize(u, f);
201
+ if (u.match("}}"))
202
+ return i;
203
+ if (u.match("}"))
204
+ return p;
205
+ u.eat(/['"]/);
206
+ }
207
+ if (r) {
208
+ if (o.singleLineStringErrors)
209
+ return p;
210
+ f.tokenize = e;
211
+ }
212
+ return i;
213
+ }
214
+ return t.isString = !0, t;
215
+ }
216
+ function B(n, e) {
217
+ for (; "rubf".indexOf(n.charAt(0).toLowerCase()) >= 0; )
218
+ n = n.substr(1);
219
+ var r = n.length == 1, i = "string";
220
+ function l(t, u) {
221
+ for (; !t.eol(); )
222
+ if (t.eatWhile(/[^'"\\]/), t.eat("\\")) {
223
+ if (t.next(), r && t.eol())
224
+ return i;
225
+ } else {
226
+ if (t.match(n))
227
+ return u.tokenize = e, i;
228
+ t.eat(/['"]/);
229
+ }
230
+ if (r) {
231
+ if (o.singleLineStringErrors)
232
+ return p;
233
+ u.tokenize = e;
234
+ }
235
+ return i;
236
+ }
237
+ return l.isString = !0, l;
238
+ }
239
+ function S(n, e) {
240
+ for (; c(e).type != "py"; )
241
+ e.scopes.pop();
242
+ e.scopes.push({
243
+ offset: c(e).offset + n.indentUnit,
244
+ type: "py",
245
+ align: null
246
+ });
247
+ }
248
+ function m(n, e, r) {
249
+ var i = n.match(/^[\s\[\{\(]*(?:#|$)/, !1) ? null : n.column() + 1;
250
+ e.scopes.push({
251
+ offset: e.indent + (k || n.indentUnit),
252
+ type: r,
253
+ align: i
254
+ });
255
+ }
256
+ function _(n, e) {
257
+ for (var r = n.indentation(); e.scopes.length > 1 && c(e).offset > r; ) {
258
+ if (c(e).type != "py")
259
+ return !0;
260
+ e.scopes.pop();
261
+ }
262
+ return c(e).offset != r;
263
+ }
264
+ function D(n, e) {
265
+ n.sol() && (e.beginningOfLine = !0, e.dedent = !1);
266
+ var r = e.tokenize(n, e), i = n.current();
267
+ if (e.beginningOfLine && i == "@")
268
+ return n.match(y, !1) ? "meta" : x ? "operator" : p;
269
+ if (/\S/.test(i) && (e.beginningOfLine = !1), (r == "variable" || r == "builtin") && e.lastToken == "meta" && (r = "meta"), (i == "pass" || i == "return") && (e.dedent = !0), i == "lambda" && (e.lambda = !0), i == ":" && !e.lambda && c(e).type == "py" && n.match(/^\s*(?:#|$)/, !1) && S(n, e), i.length == 1 && !/string|comment/.test(r)) {
270
+ var l = "[({".indexOf(i);
271
+ if (l != -1 && m(n, e, "])}".slice(l, l + 1)), l = "])}".indexOf(i), l != -1)
272
+ if (c(e).type == i)
273
+ e.indent = e.scopes.pop().offset - (k || n.indentUnit);
274
+ else
275
+ return p;
276
+ }
277
+ return e.dedent && n.eol() && c(e).type == "py" && e.scopes.length > 1 && e.scopes.pop(), r;
278
+ }
279
+ return {
280
+ name: "python",
281
+ startState: function() {
282
+ return {
283
+ tokenize: z,
284
+ scopes: [{ offset: 0, type: "py", align: null }],
285
+ indent: 0,
286
+ lastToken: null,
287
+ lambda: !1,
288
+ dedent: 0
289
+ };
290
+ },
291
+ token: function(n, e) {
292
+ var r = e.errorToken;
293
+ r && (e.errorToken = !1);
294
+ var i = D(n, e);
295
+ return i && i != "comment" && (e.lastToken = i == "keyword" || i == "punctuation" ? n.current() : i), i == "punctuation" && (i = null), n.eol() && e.lambda && (e.lambda = !1), r ? p : i;
296
+ },
297
+ indent: function(n, e, r) {
298
+ if (n.tokenize != z)
299
+ return n.tokenize.isString ? null : 0;
300
+ var i = c(n), l = i.type == e.charAt(0) || i.type == "py" && !n.dedent && /^(else:|elif |except |finally:)/.test(e);
301
+ return i.align != null ? i.align - (l ? 1 : 0) : i.offset - (l ? k || r.unit : 0);
302
+ },
303
+ languageData: {
304
+ autocomplete: E.concat(F).concat(["exec", "print"]),
305
+ indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:)$/,
306
+ commentTokens: { line: "#" },
307
+ closeBrackets: { brackets: ["(", "[", "{", "'", '"', "'''", '"""'] }
308
+ }
309
+ };
310
+ }
311
+ var U = function(o) {
312
+ return o.split(" ");
313
+ };
314
+ const Z = A({}), P = A({
315
+ extra_keywords: U("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")
316
+ });
317
+ export {
318
+ P as cython,
319
+ A as mkPython,
320
+ Z as python
321
+ };
@@ -0,0 +1,89 @@
1
+ var c, p = x(["abs", "acos", "aj", "aj0", "all", "and", "any", "asc", "asin", "asof", "atan", "attr", "avg", "avgs", "bin", "by", "ceiling", "cols", "cor", "cos", "count", "cov", "cross", "csv", "cut", "delete", "deltas", "desc", "dev", "differ", "distinct", "div", "do", "each", "ej", "enlist", "eval", "except", "exec", "exit", "exp", "fby", "fills", "first", "fkeys", "flip", "floor", "from", "get", "getenv", "group", "gtime", "hclose", "hcount", "hdel", "hopen", "hsym", "iasc", "idesc", "if", "ij", "in", "insert", "inter", "inv", "key", "keys", "last", "like", "list", "lj", "load", "log", "lower", "lsq", "ltime", "ltrim", "mavg", "max", "maxs", "mcount", "md5", "mdev", "med", "meta", "min", "mins", "mmax", "mmin", "mmu", "mod", "msum", "neg", "next", "not", "null", "or", "over", "parse", "peach", "pj", "plist", "prd", "prds", "prev", "prior", "rand", "rank", "ratios", "raze", "read0", "read1", "reciprocal", "reverse", "rload", "rotate", "rsave", "rtrim", "save", "scan", "select", "set", "setenv", "show", "signum", "sin", "sqrt", "ss", "ssr", "string", "sublist", "sum", "sums", "sv", "system", "tables", "tan", "til", "trim", "txf", "type", "uj", "ungroup", "union", "update", "upper", "upsert", "value", "var", "view", "views", "vs", "wavg", "where", "where", "while", "within", "wj", "wj1", "wsum", "xasc", "xbar", "xcol", "xcols", "xdesc", "xexp", "xgroup", "xkey", "xlog", "xprev", "xrank"]), f = /[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;
2
+ function x(n) {
3
+ return new RegExp("^(" + n.join("|") + ")$");
4
+ }
5
+ function r(n, e) {
6
+ var o = n.sol(), i = n.next();
7
+ if (c = null, o) {
8
+ if (i == "/")
9
+ return (e.tokenize = s)(n, e);
10
+ if (i == "\\")
11
+ return n.eol() || /\s/.test(n.peek()) ? (n.skipToEnd(), /^\\\s*$/.test(n.current()) ? (e.tokenize = k)(n) : e.tokenize = r, "comment") : (e.tokenize = r, "builtin");
12
+ }
13
+ if (/\s/.test(i))
14
+ return n.peek() == "/" ? (n.skipToEnd(), "comment") : "null";
15
+ if (i == '"')
16
+ return (e.tokenize = m)(n, e);
17
+ if (i == "`")
18
+ return n.eatWhile(/[A-Za-z\d_:\/.]/), "macroName";
19
+ if (i == "." && /\d/.test(n.peek()) || /\d/.test(i)) {
20
+ var t = null;
21
+ return n.backUp(1), n.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) || n.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/) || n.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/) || n.match(/^\d+[ptuv]{1}/) ? t = "temporal" : (n.match(/^0[NwW]{1}/) || n.match(/^0x[\da-fA-F]*/) || n.match(/^[01]+[b]{1}/) || n.match(/^\d+[chijn]{1}/) || n.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/)) && (t = "number"), t && (!(i = n.peek()) || f.test(i)) ? t : (n.next(), "error");
22
+ }
23
+ return /[A-Za-z]|\./.test(i) ? (n.eatWhile(/[A-Za-z._\d]/), p.test(n.current()) ? "keyword" : "variable") : /[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(i) || /[{}\(\[\]\)]/.test(i) ? null : "error";
24
+ }
25
+ function s(n, e) {
26
+ return n.skipToEnd(), /\/\s*$/.test(n.current()) ? (e.tokenize = v)(n, e) : e.tokenize = r, "comment";
27
+ }
28
+ function v(n, e) {
29
+ var o = n.sol() && n.peek() == "\\";
30
+ return n.skipToEnd(), o && /^\\\s*$/.test(n.current()) && (e.tokenize = r), "comment";
31
+ }
32
+ function k(n) {
33
+ return n.skipToEnd(), "comment";
34
+ }
35
+ function m(n, e) {
36
+ for (var o = !1, i, t = !1; i = n.next(); ) {
37
+ if (i == '"' && !o) {
38
+ t = !0;
39
+ break;
40
+ }
41
+ o = !o && i == "\\";
42
+ }
43
+ return t && (e.tokenize = r), "string";
44
+ }
45
+ function l(n, e, o) {
46
+ n.context = { prev: n.context, indent: n.indent, col: o, type: e };
47
+ }
48
+ function u(n) {
49
+ n.indent = n.context.indent, n.context = n.context.prev;
50
+ }
51
+ const h = {
52
+ name: "q",
53
+ startState: function() {
54
+ return {
55
+ tokenize: r,
56
+ context: null,
57
+ indent: 0,
58
+ col: 0
59
+ };
60
+ },
61
+ token: function(n, e) {
62
+ n.sol() && (e.context && e.context.align == null && (e.context.align = !1), e.indent = n.indentation());
63
+ var o = e.tokenize(n, e);
64
+ if (o != "comment" && e.context && e.context.align == null && e.context.type != "pattern" && (e.context.align = !0), c == "(")
65
+ l(e, ")", n.column());
66
+ else if (c == "[")
67
+ l(e, "]", n.column());
68
+ else if (c == "{")
69
+ l(e, "}", n.column());
70
+ else if (/[\]\}\)]/.test(c)) {
71
+ for (; e.context && e.context.type == "pattern"; )
72
+ u(e);
73
+ e.context && c == e.context.type && u(e);
74
+ } else
75
+ c == "." && e.context && e.context.type == "pattern" ? u(e) : /atom|string|variable/.test(o) && e.context && (/[\}\]]/.test(e.context.type) ? l(e, "pattern", n.column()) : e.context.type == "pattern" && !e.context.align && (e.context.align = !0, e.context.col = n.column()));
76
+ return o;
77
+ },
78
+ indent: function(n, e, o) {
79
+ var i = e && e.charAt(0), t = n.context;
80
+ if (/[\]\}]/.test(i))
81
+ for (; t && t.type == "pattern"; )
82
+ t = t.prev;
83
+ var d = t && i == t.type;
84
+ return t ? t.type == "pattern" ? t.col : t.align ? t.col + (d ? 0 : 1) : t.indent + (d ? 0 : o.unit) : 0;
85
+ }
86
+ };
87
+ export {
88
+ h as q
89
+ };
@@ -0,0 +1,108 @@
1
+ function f(e) {
2
+ for (var n = {}, r = 0; r < e.length; ++r)
3
+ n[e[r]] = !0;
4
+ return n;
5
+ }
6
+ var b = ["NULL", "NA", "Inf", "NaN", "NA_integer_", "NA_real_", "NA_complex_", "NA_character_", "TRUE", "FALSE"], g = ["list", "quote", "bquote", "eval", "return", "call", "parse", "deparse"], s = ["if", "else", "repeat", "while", "function", "for", "in", "next", "break"], y = ["if", "else", "repeat", "while", "function", "for"], h = f(b), m = f(g), N = f(s), A = f(y), k = /[+\-*\/^<>=!&|~$:]/, t;
7
+ function p(e, n) {
8
+ t = null;
9
+ var r = e.next();
10
+ if (r == "#")
11
+ return e.skipToEnd(), "comment";
12
+ if (r == "0" && e.eat("x"))
13
+ return e.eatWhile(/[\da-f]/i), "number";
14
+ if (r == "." && e.eat(/\d/))
15
+ return e.match(/\d*(?:e[+\-]?\d+)?/), "number";
16
+ if (/\d/.test(r))
17
+ return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/), "number";
18
+ if (r == "'" || r == '"')
19
+ return n.tokenize = E(r), "string";
20
+ if (r == "`")
21
+ return e.match(/[^`]+`/), "string.special";
22
+ if (r == "." && e.match(/.(?:[.]|\d+)/))
23
+ return "keyword";
24
+ if (/[a-zA-Z\.]/.test(r)) {
25
+ e.eatWhile(/[\w\.]/);
26
+ var i = e.current();
27
+ return h.propertyIsEnumerable(i) ? "atom" : N.propertyIsEnumerable(i) ? (A.propertyIsEnumerable(i) && !e.match(/\s*if(\s+|$)/, !1) && (t = "block"), "keyword") : m.propertyIsEnumerable(i) ? "builtin" : "variable";
28
+ } else
29
+ return r == "%" ? (e.skipTo("%") && e.next(), "variableName.special") : r == "<" && e.eat("-") || r == "<" && e.match("<-") || r == "-" && e.match(/>>?/) || r == "=" && n.ctx.argList ? "operator" : k.test(r) ? (r == "$" || e.eatWhile(k), "operator") : /[\(\){}\[\];]/.test(r) ? (t = r, r == ";" ? "punctuation" : null) : null;
30
+ }
31
+ function E(e) {
32
+ return function(n, r) {
33
+ if (n.eat("\\")) {
34
+ var i = n.next();
35
+ return i == "x" ? n.match(/^[a-f0-9]{2}/i) : (i == "u" || i == "U") && n.eat("{") && n.skipTo("}") ? n.next() : i == "u" ? n.match(/^[a-f0-9]{4}/i) : i == "U" ? n.match(/^[a-f0-9]{8}/i) : /[0-7]/.test(i) && n.match(/^[0-7]{1,2}/), "string.special";
36
+ } else {
37
+ for (var l; (l = n.next()) != null; ) {
38
+ if (l == e) {
39
+ r.tokenize = p;
40
+ break;
41
+ }
42
+ if (l == "\\") {
43
+ n.backUp(1);
44
+ break;
45
+ }
46
+ }
47
+ return "string";
48
+ }
49
+ };
50
+ }
51
+ var v = 1, u = 2, c = 4;
52
+ function o(e, n, r) {
53
+ e.ctx = {
54
+ type: n,
55
+ indent: e.indent,
56
+ flags: 0,
57
+ column: r.column(),
58
+ prev: e.ctx
59
+ };
60
+ }
61
+ function x(e, n) {
62
+ var r = e.ctx;
63
+ e.ctx = {
64
+ type: r.type,
65
+ indent: r.indent,
66
+ flags: r.flags | n,
67
+ column: r.column,
68
+ prev: r.prev
69
+ };
70
+ }
71
+ function a(e) {
72
+ e.indent = e.ctx.indent, e.ctx = e.ctx.prev;
73
+ }
74
+ const I = {
75
+ name: "r",
76
+ startState: function(e) {
77
+ return {
78
+ tokenize: p,
79
+ ctx: {
80
+ type: "top",
81
+ indent: -e,
82
+ flags: u
83
+ },
84
+ indent: 0,
85
+ afterIdent: !1
86
+ };
87
+ },
88
+ token: function(e, n) {
89
+ if (e.sol() && (n.ctx.flags & 3 || (n.ctx.flags |= u), n.ctx.flags & c && a(n), n.indent = e.indentation()), e.eatSpace())
90
+ return null;
91
+ var r = n.tokenize(e, n);
92
+ return r != "comment" && !(n.ctx.flags & u) && x(n, v), (t == ";" || t == "{" || t == "}") && n.ctx.type == "block" && a(n), t == "{" ? o(n, "}", e) : t == "(" ? (o(n, ")", e), n.afterIdent && (n.ctx.argList = !0)) : t == "[" ? o(n, "]", e) : t == "block" ? o(n, "block", e) : t == n.ctx.type ? a(n) : n.ctx.type == "block" && r != "comment" && x(n, c), n.afterIdent = r == "variable" || r == "keyword", r;
93
+ },
94
+ indent: function(e, n, r) {
95
+ if (e.tokenize != p)
96
+ return 0;
97
+ var i = n && n.charAt(0), l = e.ctx, d = i == l.type;
98
+ return l.flags & c && (l = l.prev), l.type == "block" ? l.indent + (i == "{" ? 0 : r.unit) : l.flags & v ? l.column + (d ? 0 : 1) : l.indent + (d ? 0 : r.unit);
99
+ },
100
+ languageData: {
101
+ wordChars: ".",
102
+ commentTokens: { line: "#" },
103
+ autocomplete: b.concat(g, s)
104
+ }
105
+ };
106
+ export {
107
+ I as r
108
+ };
@@ -0,0 +1,57 @@
1
+ var o = /^-+$/, a = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /, c = /^[\w+.-]+@[\w.-]+/;
2
+ const h = {
3
+ name: "rpmchanges",
4
+ token: function(r) {
5
+ return r.sol() && (r.match(o) || r.match(a)) ? "tag" : r.match(c) ? "string" : (r.next(), null);
6
+ }
7
+ };
8
+ var i = /^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/, t = /^[a-zA-Z0-9()]+:/, l = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/, p = /^%(ifnarch|ifarch|if)/, f = /^%(else|endif)/, u = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;
9
+ const d = {
10
+ name: "rpmspec",
11
+ startState: function() {
12
+ return {
13
+ controlFlow: !1,
14
+ macroParameters: !1,
15
+ section: !1
16
+ };
17
+ },
18
+ token: function(r, e) {
19
+ var n = r.peek();
20
+ if (n == "#")
21
+ return r.skipToEnd(), "comment";
22
+ if (r.sol()) {
23
+ if (r.match(t))
24
+ return "header";
25
+ if (r.match(l))
26
+ return "atom";
27
+ }
28
+ if (r.match(/^\$\w+/) || r.match(/^\$\{\w+\}/))
29
+ return "def";
30
+ if (r.match(f))
31
+ return "keyword";
32
+ if (r.match(p))
33
+ return e.controlFlow = !0, "keyword";
34
+ if (e.controlFlow) {
35
+ if (r.match(u))
36
+ return "operator";
37
+ if (r.match(/^(\d+)/))
38
+ return "number";
39
+ r.eol() && (e.controlFlow = !1);
40
+ }
41
+ if (r.match(i))
42
+ return r.eol() && (e.controlFlow = !1), "number";
43
+ if (r.match(/^%[\w]+/))
44
+ return r.match("(") && (e.macroParameters = !0), "keyword";
45
+ if (e.macroParameters) {
46
+ if (r.match(/^\d+/))
47
+ return "number";
48
+ if (r.match(")"))
49
+ return e.macroParameters = !1, "keyword";
50
+ }
51
+ return r.match(/^%\{\??[\w \-\:\!]+\}/) ? (r.eol() && (e.controlFlow = !1), "def") : (r.next(), null);
52
+ }
53
+ };
54
+ export {
55
+ h as rpmChanges,
56
+ d as rpmSpec
57
+ };