@aiao/code-editor-react 0.0.8 → 0.0.10

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 (121) hide show
  1. package/dist/index.js +118 -2
  2. package/package.json +7 -4
  3. package/dist/apl-B2DGVGxc-Dd6D39pP.js +0 -76
  4. package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +0 -34
  5. package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +0 -95
  6. package/dist/asterisk-DS281yxp-B5eTWk_B.js +0 -271
  7. package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +0 -34
  8. package/dist/clike-BMALKCNj-Ck7Gc35_.js +0 -620
  9. package/dist/clojure-CCKyeQKf-N9sg777Z.js +0 -800
  10. package/dist/cmake-CuaCgAKt-BbEgXraO.js +0 -28
  11. package/dist/cobol-BlTKFDRj-CHCoWafp.js +0 -72
  12. package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +0 -179
  13. package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +0 -75
  14. package/dist/crystal-D309uH6_-DS6LrXoE.js +0 -217
  15. package/dist/css-BkF-NPzE-DiJu9Nkd.js +0 -1553
  16. package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +0 -68
  17. package/dist/d-BZcgY6La-KCW6-bIm.js +0 -127
  18. package/dist/diff-Cg9d_RX2-C01qBVFc.js +0 -18
  19. package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +0 -194
  20. package/dist/dtd-CtLokQ-U-DCbNdeIA.js +0 -84
  21. package/dist/dylan-QYeExnWK-DIUVpsct.js +0 -234
  22. package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +0 -78
  23. package/dist/ecl-CiXN-g_D-DOI-W0if.js +0 -121
  24. package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +0 -110
  25. package/dist/elm-CNT9vbN0-BcYlydpO.js +0 -108
  26. package/dist/erlang-CFOYdy9e-DULXsFZl.js +0 -487
  27. package/dist/factor-Clf6BoVk-DBb2EHMF.js +0 -65
  28. package/dist/fcl-CPC2WYrI-CuXG3fcK.js +0 -103
  29. package/dist/forth-BmxRyE9S-BcFwWpeL.js +0 -60
  30. package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +0 -442
  31. package/dist/gas-cpmYfFX2-sZgGhMxB.js +0 -183
  32. package/dist/gherkin-CJuwpceU-BRrr8yjO.js +0 -34
  33. package/dist/groovy-DZeT_VM--CmF8wcSo.js +0 -146
  34. package/dist/haskell-CxiO_7JL-BuULsXvv.js +0 -375
  35. package/dist/haxe-70NVW1pR-CM27SfgM.js +0 -359
  36. package/dist/http-D9LttvKF-j9E8oQ7o.js +0 -44
  37. package/dist/idl-B6TRFYjl-B6TRFYjl.js +0 -947
  38. package/dist/index-BMiCCEB1-CFMNJD60.js +0 -305
  39. package/dist/index-BNuasEBW-DZ41gDvf.js +0 -94
  40. package/dist/index-Bg1KDWyt-C0dA4q7z.js +0 -290
  41. package/dist/index-BuVm7ZG6-CVgdIGdI.js +0 -1305
  42. package/dist/index-BvS1cnHq-CvzF_kJP.js +0 -613
  43. package/dist/index-C44L0DmY-y7wRzM46.js +0 -138
  44. package/dist/index-C71CZfUx-BtWSxfva.js +0 -247
  45. package/dist/index-CGKWrtgc.js +0 -29766
  46. package/dist/index-CQ6JWNwi-DowNkPcb.js +0 -566
  47. package/dist/index-CpRVx97--DylNh-Zi.js +0 -342
  48. package/dist/index-CqvQj6d--nBAN1vpF.js +0 -270
  49. package/dist/index-CrbQBmWq-DmiRVF9u.js +0 -157
  50. package/dist/index-CzovO10m-DDglzqnG.js +0 -301
  51. package/dist/index-D0BZOY-S-rNSlBO9l.js +0 -101
  52. package/dist/index-D0svJS59-f8ZA2hgC.js +0 -555
  53. package/dist/index-D93XVMi1-CZ_Q2QZM.js +0 -136
  54. package/dist/index-DEB5VK0f-iiwOciBu.js +0 -252
  55. package/dist/index-Dp8osI_J-DDFW8XvK.js +0 -960
  56. package/dist/index-Ds4AioqO-Cg_BlAEI.js +0 -1917
  57. package/dist/index-Dy-OpkyQ-DcLuBsQT.js +0 -76
  58. package/dist/index-Dyi9rNIT-B7p7Dpus.js +0 -391
  59. package/dist/index-ZJkjD9tT-DJQk0ayW.js +0 -74
  60. package/dist/index-qH2lMs0G-Co53S8h3.js +0 -944
  61. package/dist/index-srIksFxX-BLrX1cGK.js +0 -59
  62. package/dist/javascript-DOuB9oqA-BxiygWgm.js +0 -691
  63. package/dist/julia-DpvXAuO6-Bk_IfD8X.js +0 -241
  64. package/dist/livescript-CanGTf8u-Cx6PrvS4.js +0 -272
  65. package/dist/lua-XplVlWi_-8f8obHzY.js +0 -217
  66. package/dist/mathematica-jaRHnSxC-B83gQsL2.js +0 -35
  67. package/dist/mbox-BctzC1hL-Hg5U2B4l.js +0 -76
  68. package/dist/mirc-CFBPAOaF-CfzSSk9W.js +0 -72
  69. package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +0 -272
  70. package/dist/modelica-vUgVs--1-BObVpYBg.js +0 -93
  71. package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +0 -104
  72. package/dist/mumps-CQoS1kWX-CkTUOQnt.js +0 -25
  73. package/dist/nginx-zDPm3Z74-DJk4KP7N.js +0 -87
  74. package/dist/nsis-BCLyjY7m-C2MffOQ3.js +0 -62
  75. package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +0 -79
  76. package/dist/octave-C8PmmSRH-DM5vTWlU.js +0 -143
  77. package/dist/oz-Ce8aN8oE-BcJM4SVy.js +0 -151
  78. package/dist/pascal-De0D6mP7-D7DGFFKL.js +0 -77
  79. package/dist/perl-B4bSCe1C-6aIa2glS.js +0 -915
  80. package/dist/pig-D24Z8EXi-BD-qt5FU.js +0 -54
  81. package/dist/powershell-DkYVfTzP-Blt1Rodi.js +0 -249
  82. package/dist/properties-Dn9wna3M-EOOwnCnk.js +0 -26
  83. package/dist/protobuf-BPIjwpzm-DAButU8_.js +0 -49
  84. package/dist/pug-TGXr6c5j-C9HfQ86E.js +0 -248
  85. package/dist/puppet-nyd4dhjf-CGzH5dsa.js +0 -45
  86. package/dist/python-BkR3uSy8-CjDnyp3B.js +0 -313
  87. package/dist/q-DyHZGnqm-DGuqeH_T.js +0 -86
  88. package/dist/r-LKEuhEGI-BFQhJnTP.js +0 -104
  89. package/dist/rpm-IznJm2Xc-CbZqrWCM.js +0 -57
  90. package/dist/ruby-CcYfvIk6-DzPSfSGo.js +0 -228
  91. package/dist/sas-7E8yHoCW-D726Uzkw.js +0 -105
  92. package/dist/scheme-DjibxsNh-Bp5gVFkm.js +0 -124
  93. package/dist/shell-C0C2sNA_-BTeYg6ir.js +0 -182
  94. package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +0 -72
  95. package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +0 -89
  96. package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +0 -48
  97. package/dist/solr-BNlsLglM-BM2OpfTI.js +0 -41
  98. package/dist/sparql-FarWu_Gb-FN_uQNd4.js +0 -197
  99. package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +0 -49
  100. package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +0 -278
  101. package/dist/stex-Du4h4KAU-QOov_zHj.js +0 -129
  102. package/dist/stylus-CAdqWld3-BcRBbBxD.js +0 -250
  103. package/dist/swift-DSxqR9R6-2Hz4NOoF.js +0 -230
  104. package/dist/tcl-xfoLljhY-DAZBRGQI.js +0 -81
  105. package/dist/textile-D1AWE-pc-DuiIfEnb.js +0 -295
  106. package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +0 -155
  107. package/dist/tiki-__Kn3CeS-CWcR9ib_.js +0 -181
  108. package/dist/toml-DWAmxCjl-CyJoDzs6.js +0 -56
  109. package/dist/troff-D2UO-fKf-DVoIzS-O.js +0 -35
  110. package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +0 -123
  111. package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +0 -88
  112. package/dist/turtle-xwJUxoPV-fs94wdNM.js +0 -80
  113. package/dist/vb-c2kQGd6--DU726qF0.js +0 -74
  114. package/dist/vbscript-1f_Dhg5H-DriA32xD.js +0 -324
  115. package/dist/velocity-DJd0pTTC-BG368IR6.js +0 -96
  116. package/dist/verilog-CiS1jyi5-giQA8J-e.js +0 -259
  117. package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +0 -106
  118. package/dist/webidl-CjfDENEo-BM8KXKJ5.js +0 -155
  119. package/dist/xquery-Ct6lEb4B-C5KDc61l.js +0 -422
  120. package/dist/yacas-C0absKBh-B82QJ76F.js +0 -73
  121. package/dist/z80-Pki2zAjW-B0IQoIbR.js +0 -61
@@ -1,295 +0,0 @@
1
- var s = {
2
- addition: "inserted",
3
- attributes: "propertyName",
4
- bold: "strong",
5
- cite: "keyword",
6
- code: "monospace",
7
- definitionList: "list",
8
- deletion: "deleted",
9
- div: "punctuation",
10
- em: "emphasis",
11
- footnote: "variable",
12
- footCite: "qualifier",
13
- header: "heading",
14
- html: "comment",
15
- image: "atom",
16
- italic: "emphasis",
17
- link: "link",
18
- linkDefinition: "link",
19
- list1: "list",
20
- list2: "list.special",
21
- list3: "list",
22
- notextile: "string.special",
23
- pre: "operator",
24
- p: "content",
25
- quote: "bracket",
26
- span: "quote",
27
- specialChar: "character",
28
- strong: "strong",
29
- sub: "content.special",
30
- sup: "content.special",
31
- table: "variableName.special",
32
- tableHeading: "operator"
33
- };
34
- function b(e, t) {
35
- t.mode = l.newLayout, t.tableHeading = !1, t.layoutType === "definitionList" && t.spanningLayout && e.match(r("definitionListEnd"), !1) && (t.spanningLayout = !1);
36
- }
37
- function p(e, t, a) {
38
- if (a === "_")
39
- return e.eat("_") ? u(e, t, "italic", /__/, 2) : u(e, t, "em", /_/, 1);
40
- if (a === "*")
41
- return e.eat("*") ? u(e, t, "bold", /\*\*/, 2) : u(e, t, "strong", /\*/, 1);
42
- if (a === "[")
43
- return e.match(/\d+\]/) && (t.footCite = !0), o(t);
44
- if (a === "(") {
45
- var i = e.match(/^(r|tm|c)\)/);
46
- if (i)
47
- return s.specialChar;
48
- }
49
- if (a === "<" && e.match(/(\w+)[^>]+>[^<]+<\/\1>/))
50
- return s.html;
51
- if (a === "?" && e.eat("?"))
52
- return u(e, t, "cite", /\?\?/, 2);
53
- if (a === "=" && e.eat("="))
54
- return u(e, t, "notextile", /==/, 2);
55
- if (a === "-" && !e.eat("-"))
56
- return u(e, t, "deletion", /-/, 1);
57
- if (a === "+")
58
- return u(e, t, "addition", /\+/, 1);
59
- if (a === "~")
60
- return u(e, t, "sub", /~/, 1);
61
- if (a === "^")
62
- return u(e, t, "sup", /\^/, 1);
63
- if (a === "%")
64
- return u(e, t, "span", /%/, 1);
65
- if (a === "@")
66
- return u(e, t, "code", /@/, 1);
67
- if (a === "!") {
68
- var c = u(e, t, "image", /(?:\([^\)]+\))?!/, 1);
69
- return e.match(/^:\S+/), c;
70
- }
71
- return o(t);
72
- }
73
- function u(e, t, a, i, c) {
74
- var f = e.pos > c ? e.string.charAt(e.pos - c - 1) : null, m = e.peek();
75
- if (t[a]) {
76
- if ((!m || /\W/.test(m)) && f && /\S/.test(f)) {
77
- var h = o(t);
78
- return t[a] = !1, h;
79
- }
80
- } else (!f || /\W/.test(f)) && m && /\S/.test(m) && e.match(new RegExp("^.*\\S" + i.source + "(?:\\W|$)"), !1) && (t[a] = !0, t.mode = l.attributes);
81
- return o(t);
82
- }
83
- function o(e) {
84
- var t = d(e);
85
- if (t) return t;
86
- var a = [];
87
- return e.layoutType && a.push(s[e.layoutType]), a = a.concat(y(
88
- e,
89
- "addition",
90
- "bold",
91
- "cite",
92
- "code",
93
- "deletion",
94
- "em",
95
- "footCite",
96
- "image",
97
- "italic",
98
- "link",
99
- "span",
100
- "strong",
101
- "sub",
102
- "sup",
103
- "table",
104
- "tableHeading"
105
- )), e.layoutType === "header" && a.push(s.header + "-" + e.header), a.length ? a.join(" ") : null;
106
- }
107
- function d(e) {
108
- var t = e.layoutType;
109
- switch (t) {
110
- case "notextile":
111
- case "code":
112
- case "pre":
113
- return s[t];
114
- default:
115
- return e.notextile ? s.notextile + (t ? " " + s[t] : "") : null;
116
- }
117
- }
118
- function y(e) {
119
- for (var t = [], a = 1; a < arguments.length; ++a)
120
- e[arguments[a]] && t.push(s[arguments[a]]);
121
- return t;
122
- }
123
- function g(e) {
124
- var t = e.spanningLayout, a = e.layoutType;
125
- for (var i in e) e.hasOwnProperty(i) && delete e[i];
126
- e.mode = l.newLayout, t && (e.layoutType = a, e.spanningLayout = !0);
127
- }
128
- var n = {
129
- cache: {},
130
- single: {
131
- bc: "bc",
132
- bq: "bq",
133
- definitionList: /- .*?:=+/,
134
- definitionListEnd: /.*=:\s*$/,
135
- div: "div",
136
- drawTable: /\|.*\|/,
137
- foot: /fn\d+/,
138
- header: /h[1-6]/,
139
- html: /\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,
140
- link: /[^"]+":\S/,
141
- linkDefinition: /\[[^\s\]]+\]\S+/,
142
- list: /(?:#+|\*+)/,
143
- notextile: "notextile",
144
- para: "p",
145
- pre: "pre",
146
- table: "table",
147
- tableCellAttributes: /[\/\\]\d+/,
148
- tableHeading: /\|_\./,
149
- tableText: /[^"_\*\[\(\?\+~\^%@|-]+/,
150
- text: /[^!"_=\*\[\(<\?\+~\^%@-]+/
151
- },
152
- attributes: {
153
- align: /(?:<>|<|>|=)/,
154
- selector: /\([^\(][^\)]+\)/,
155
- lang: /\[[^\[\]]+\]/,
156
- pad: /(?:\(+|\)+){1,2}/,
157
- css: /\{[^\}]+\}/
158
- },
159
- createRe: function(e) {
160
- switch (e) {
161
- case "drawTable":
162
- return n.makeRe("^", n.single.drawTable, "$");
163
- case "html":
164
- return n.makeRe("^", n.single.html, "(?:", n.single.html, ")*", "$");
165
- case "linkDefinition":
166
- return n.makeRe("^", n.single.linkDefinition, "$");
167
- case "listLayout":
168
- return n.makeRe("^", n.single.list, r("allAttributes"), "*\\s+");
169
- case "tableCellAttributes":
170
- return n.makeRe("^", n.choiceRe(
171
- n.single.tableCellAttributes,
172
- r("allAttributes")
173
- ), "+\\.");
174
- case "type":
175
- return n.makeRe("^", r("allTypes"));
176
- case "typeLayout":
177
- return n.makeRe(
178
- "^",
179
- r("allTypes"),
180
- r("allAttributes"),
181
- "*\\.\\.?",
182
- "(\\s+|$)"
183
- );
184
- case "attributes":
185
- return n.makeRe("^", r("allAttributes"), "+");
186
- case "allTypes":
187
- return n.choiceRe(
188
- n.single.div,
189
- n.single.foot,
190
- n.single.header,
191
- n.single.bc,
192
- n.single.bq,
193
- n.single.notextile,
194
- n.single.pre,
195
- n.single.table,
196
- n.single.para
197
- );
198
- case "allAttributes":
199
- return n.choiceRe(
200
- n.attributes.selector,
201
- n.attributes.css,
202
- n.attributes.lang,
203
- n.attributes.align,
204
- n.attributes.pad
205
- );
206
- default:
207
- return n.makeRe("^", n.single[e]);
208
- }
209
- },
210
- makeRe: function() {
211
- for (var e = "", t = 0; t < arguments.length; ++t) {
212
- var a = arguments[t];
213
- e += typeof a == "string" ? a : a.source;
214
- }
215
- return new RegExp(e);
216
- },
217
- choiceRe: function() {
218
- for (var e = [arguments[0]], t = 1; t < arguments.length; ++t)
219
- e[t * 2 - 1] = "|", e[t * 2] = arguments[t];
220
- return e.unshift("(?:"), e.push(")"), n.makeRe.apply(null, e);
221
- }
222
- };
223
- function r(e) {
224
- return n.cache[e] || (n.cache[e] = n.createRe(e));
225
- }
226
- var l = {
227
- newLayout: function(e, t) {
228
- if (e.match(r("typeLayout"), !1))
229
- return t.spanningLayout = !1, (t.mode = l.blockType)(e, t);
230
- var a;
231
- return d(t) || (e.match(r("listLayout"), !1) ? a = l.list : e.match(r("drawTable"), !1) ? a = l.table : e.match(r("linkDefinition"), !1) ? a = l.linkDefinition : e.match(r("definitionList")) ? a = l.definitionList : e.match(r("html"), !1) && (a = l.html)), (t.mode = a || l.text)(e, t);
232
- },
233
- blockType: function(e, t) {
234
- var a, i;
235
- if (t.layoutType = null, a = e.match(r("type")))
236
- i = a[0];
237
- else
238
- return (t.mode = l.text)(e, t);
239
- return (a = i.match(r("header"))) ? (t.layoutType = "header", t.header = parseInt(a[0][1])) : i.match(r("bq")) ? t.layoutType = "quote" : i.match(r("bc")) ? t.layoutType = "code" : i.match(r("foot")) ? t.layoutType = "footnote" : i.match(r("notextile")) ? t.layoutType = "notextile" : i.match(r("pre")) ? t.layoutType = "pre" : i.match(r("div")) ? t.layoutType = "div" : i.match(r("table")) && (t.layoutType = "table"), t.mode = l.attributes, o(t);
240
- },
241
- text: function(e, t) {
242
- if (e.match(r("text"))) return o(t);
243
- var a = e.next();
244
- return a === '"' ? (t.mode = l.link)(e, t) : p(e, t, a);
245
- },
246
- attributes: function(e, t) {
247
- return t.mode = l.layoutLength, e.match(r("attributes")) ? s.attributes : o(t);
248
- },
249
- layoutLength: function(e, t) {
250
- return e.eat(".") && e.eat(".") && (t.spanningLayout = !0), t.mode = l.text, o(t);
251
- },
252
- list: function(e, t) {
253
- var a = e.match(r("list"));
254
- t.listDepth = a[0].length;
255
- var i = (t.listDepth - 1) % 3;
256
- return i ? i === 1 ? t.layoutType = "list2" : t.layoutType = "list3" : t.layoutType = "list1", t.mode = l.attributes, o(t);
257
- },
258
- link: function(e, t) {
259
- return t.mode = l.text, e.match(r("link")) ? (e.match(/\S+/), s.link) : o(t);
260
- },
261
- linkDefinition: function(e) {
262
- return e.skipToEnd(), s.linkDefinition;
263
- },
264
- definitionList: function(e, t) {
265
- return e.match(r("definitionList")), t.layoutType = "definitionList", e.match(/\s*$/) ? t.spanningLayout = !0 : t.mode = l.attributes, o(t);
266
- },
267
- html: function(e) {
268
- return e.skipToEnd(), s.html;
269
- },
270
- table: function(e, t) {
271
- return t.layoutType = "table", (t.mode = l.tableCell)(e, t);
272
- },
273
- tableCell: function(e, t) {
274
- return e.match(r("tableHeading")) ? t.tableHeading = !0 : e.eat("|"), t.mode = l.tableCellAttributes, o(t);
275
- },
276
- tableCellAttributes: function(e, t) {
277
- return t.mode = l.tableText, e.match(r("tableCellAttributes")) ? s.attributes : o(t);
278
- },
279
- tableText: function(e, t) {
280
- return e.match(r("tableText")) ? o(t) : e.peek() === "|" ? (t.mode = l.tableCell, o(t)) : p(e, t, e.next());
281
- }
282
- };
283
- const k = {
284
- name: "textile",
285
- startState: function() {
286
- return { mode: l.newLayout };
287
- },
288
- token: function(e, t) {
289
- return e.sol() && b(e, t), t.mode(e, t);
290
- },
291
- blankLine: g
292
- };
293
- export {
294
- k as textile
295
- };
@@ -1,155 +0,0 @@
1
- var o = {}, f = {
2
- allTags: !0,
3
- closeAll: !0,
4
- list: !0,
5
- newJournal: !0,
6
- newTiddler: !0,
7
- permaview: !0,
8
- saveChanges: !0,
9
- search: !0,
10
- slider: !0,
11
- tabs: !0,
12
- tag: !0,
13
- tagging: !0,
14
- tags: !0,
15
- tiddler: !0,
16
- timeline: !0,
17
- today: !0,
18
- version: !0,
19
- option: !0,
20
- with: !0,
21
- filter: !0
22
- }, l = /[\w_\-]/i, c = /^\-\-\-\-+$/, m = /^\/\*\*\*$/, s = /^\*\*\*\/$/, k = /^<<<$/, h = /^\/\/\{\{\{$/, d = /^\/\/\}\}\}$/, p = /^<!--\{\{\{-->$/, b = /^<!--\}\}\}-->$/, $ = /^\{\{\{$/, v = /^\}\}\}$/, z = /.*?\}\}\}/;
23
- function u(t, r, n) {
24
- return r.tokenize = n, n(t, r);
25
- }
26
- function i(t, r) {
27
- var n = t.sol(), e = t.peek();
28
- if (r.block = !1, n && /[<\/\*{}\-]/.test(e)) {
29
- if (t.match($))
30
- return r.block = !0, u(t, r, a);
31
- if (t.match(k))
32
- return "quote";
33
- if (t.match(m) || t.match(s) || t.match(h) || t.match(d) || t.match(p) || t.match(b))
34
- return "comment";
35
- if (t.match(c))
36
- return "contentSeparator";
37
- }
38
- if (t.next(), n && /[\/\*!#;:>|]/.test(e)) {
39
- if (e == "!")
40
- return t.skipToEnd(), "header";
41
- if (e == "*")
42
- return t.eatWhile("*"), "comment";
43
- if (e == "#")
44
- return t.eatWhile("#"), "comment";
45
- if (e == ";")
46
- return t.eatWhile(";"), "comment";
47
- if (e == ":")
48
- return t.eatWhile(":"), "comment";
49
- if (e == ">")
50
- return t.eatWhile(">"), "quote";
51
- if (e == "|")
52
- return "header";
53
- }
54
- if (e == "{" && t.match("{{"))
55
- return u(t, r, a);
56
- if (/[hf]/i.test(e) && /[ti]/i.test(t.peek()) && t.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))
57
- return "link";
58
- if (e == '"')
59
- return "string";
60
- if (e == "~" || /[\[\]]/.test(e) && t.match(e))
61
- return "brace";
62
- if (e == "@")
63
- return t.eatWhile(l), "link";
64
- if (/\d/.test(e))
65
- return t.eatWhile(/\d/), "number";
66
- if (e == "/") {
67
- if (t.eat("%"))
68
- return u(t, r, w);
69
- if (t.eat("/"))
70
- return u(t, r, W);
71
- }
72
- if (e == "_" && t.eat("_"))
73
- return u(t, r, g);
74
- if (e == "-" && t.eat("-")) {
75
- if (t.peek() != " ")
76
- return u(t, r, _);
77
- if (t.peek() == " ")
78
- return "brace";
79
- }
80
- return e == "'" && t.eat("'") ? u(t, r, x) : e == "<" && t.eat("<") ? u(t, r, y) : (t.eatWhile(/[\w\$_]/), o.propertyIsEnumerable(t.current()) ? "keyword" : null);
81
- }
82
- function w(t, r) {
83
- for (var n = !1, e; e = t.next(); ) {
84
- if (e == "/" && n) {
85
- r.tokenize = i;
86
- break;
87
- }
88
- n = e == "%";
89
- }
90
- return "comment";
91
- }
92
- function x(t, r) {
93
- for (var n = !1, e; e = t.next(); ) {
94
- if (e == "'" && n) {
95
- r.tokenize = i;
96
- break;
97
- }
98
- n = e == "'";
99
- }
100
- return "strong";
101
- }
102
- function a(t, r) {
103
- var n = r.block;
104
- return n && t.current() ? "comment" : !n && t.match(z) || n && t.sol() && t.match(v) ? (r.tokenize = i, "comment") : (t.next(), "comment");
105
- }
106
- function W(t, r) {
107
- for (var n = !1, e; e = t.next(); ) {
108
- if (e == "/" && n) {
109
- r.tokenize = i;
110
- break;
111
- }
112
- n = e == "/";
113
- }
114
- return "emphasis";
115
- }
116
- function g(t, r) {
117
- for (var n = !1, e; e = t.next(); ) {
118
- if (e == "_" && n) {
119
- r.tokenize = i;
120
- break;
121
- }
122
- n = e == "_";
123
- }
124
- return "link";
125
- }
126
- function _(t, r) {
127
- for (var n = !1, e; e = t.next(); ) {
128
- if (e == "-" && n) {
129
- r.tokenize = i;
130
- break;
131
- }
132
- n = e == "-";
133
- }
134
- return "deleted";
135
- }
136
- function y(t, r) {
137
- if (t.current() == "<<")
138
- return "meta";
139
- var n = t.next();
140
- return n ? n == ">" && t.peek() == ">" ? (t.next(), r.tokenize = i, "meta") : (t.eatWhile(/[\w\$_]/), f.propertyIsEnumerable(t.current()) ? "keyword" : null) : (r.tokenize = i, null);
141
- }
142
- const S = {
143
- name: "tiddlywiki",
144
- startState: function() {
145
- return { tokenize: i };
146
- },
147
- token: function(t, r) {
148
- if (t.eatSpace()) return null;
149
- var n = r.tokenize(t, r);
150
- return n;
151
- }
152
- };
153
- export {
154
- S as tiddlyWiki
155
- };
@@ -1,181 +0,0 @@
1
- function a(n, t, e) {
2
- return function(r, f) {
3
- for (; !r.eol(); ) {
4
- if (r.match(t)) {
5
- f.tokenize = u;
6
- break;
7
- }
8
- r.next();
9
- }
10
- return e && (f.tokenize = e), n;
11
- };
12
- }
13
- function p(n) {
14
- return function(t, e) {
15
- for (; !t.eol(); )
16
- t.next();
17
- return e.tokenize = u, n;
18
- };
19
- }
20
- function u(n, t) {
21
- function e(m) {
22
- return t.tokenize = m, m(n, t);
23
- }
24
- var r = n.sol(), f = n.next();
25
- switch (f) {
26
- //switch is generally much faster than if, so it is used here
27
- case "{":
28
- return n.eat("/"), n.eatSpace(), n.eatWhile(/[^\s\u00a0=\"\'\/?(}]/), t.tokenize = g, "tag";
29
- case "_":
30
- if (n.eat("_"))
31
- return e(a("strong", "__", u));
32
- break;
33
- case "'":
34
- if (n.eat("'"))
35
- return e(a("em", "''", u));
36
- break;
37
- case "(":
38
- if (n.eat("("))
39
- return e(a("link", "))", u));
40
- break;
41
- case "[":
42
- return e(a("url", "]", u));
43
- case "|":
44
- if (n.eat("|"))
45
- return e(a("comment", "||"));
46
- break;
47
- case "-":
48
- if (n.eat("="))
49
- return e(a("header string", "=-", u));
50
- if (n.eat("-"))
51
- return e(a("error tw-deleted", "--", u));
52
- break;
53
- case "=":
54
- if (n.match("=="))
55
- return e(a("tw-underline", "===", u));
56
- break;
57
- case ":":
58
- if (n.eat(":"))
59
- return e(a("comment", "::"));
60
- break;
61
- case "^":
62
- return e(a("tw-box", "^"));
63
- case "~":
64
- if (n.match("np~"))
65
- return e(a("meta", "~/np~"));
66
- break;
67
- }
68
- if (r)
69
- switch (f) {
70
- case "!":
71
- return n.match("!!!!!") || n.match("!!!!") || n.match("!!!") || n.match("!!"), e(p("header string"));
72
- case "*":
73
- //unordered list line item, or <li /> at start of line
74
- case "#":
75
- //ordered list line item, or <li /> at start of line
76
- case "+":
77
- return e(p("tw-listitem bracket"));
78
- }
79
- return null;
80
- }
81
- var k, l;
82
- function g(n, t) {
83
- var e = n.next(), r = n.peek();
84
- return e == "}" ? (t.tokenize = u, "tag") : e == "(" || e == ")" ? "bracket" : e == "=" ? (l = "equals", r == ">" && (n.next(), r = n.peek()), /[\'\"]/.test(r) || (t.tokenize = z()), "operator") : /[\'\"]/.test(e) ? (t.tokenize = v(e), t.tokenize(n, t)) : (n.eatWhile(/[^\s\u00a0=\"\'\/?]/), "keyword");
85
- }
86
- function v(n) {
87
- return function(t, e) {
88
- for (; !t.eol(); )
89
- if (t.next() == n) {
90
- e.tokenize = g;
91
- break;
92
- }
93
- return "string";
94
- };
95
- }
96
- function z() {
97
- return function(n, t) {
98
- for (; !n.eol(); ) {
99
- var e = n.next(), r = n.peek();
100
- if (e == " " || e == "," || /[ )}]/.test(r)) {
101
- t.tokenize = g;
102
- break;
103
- }
104
- }
105
- return "string";
106
- };
107
- }
108
- var i, c;
109
- function s() {
110
- for (var n = arguments.length - 1; n >= 0; n--) i.cc.push(arguments[n]);
111
- }
112
- function o() {
113
- return s.apply(null, arguments), !0;
114
- }
115
- function b(n, t) {
116
- var e = i.context && i.context.noIndent;
117
- i.context = {
118
- prev: i.context,
119
- pluginName: n,
120
- indent: i.indented,
121
- startOfLine: t,
122
- noIndent: e
123
- };
124
- }
125
- function x() {
126
- i.context && (i.context = i.context.prev);
127
- }
128
- function w(n) {
129
- if (n == "openPlugin")
130
- return i.pluginName = k, o(d, L(i.startOfLine));
131
- if (n == "closePlugin") {
132
- var t = !1;
133
- return i.context ? (t = i.context.pluginName != k, x()) : t = !0, t && (c = "error"), o(O(t));
134
- } else return n == "string" && ((!i.context || i.context.name != "!cdata") && b("!cdata"), i.tokenize == u && x()), o();
135
- }
136
- function L(n) {
137
- return function(t) {
138
- return t == "selfclosePlugin" || t == "endPlugin" || t == "endPlugin" && b(i.pluginName, n), o();
139
- };
140
- }
141
- function O(n) {
142
- return function(t) {
143
- return n && (c = "error"), t == "endPlugin" ? o() : s();
144
- };
145
- }
146
- function d(n) {
147
- return n == "keyword" ? (c = "attribute", o(d)) : n == "equals" ? o(P, d) : s();
148
- }
149
- function P(n) {
150
- return n == "keyword" ? (c = "string", o()) : n == "string" ? o(h) : s();
151
- }
152
- function h(n) {
153
- return n == "string" ? o(h) : s();
154
- }
155
- const N = {
156
- name: "tiki",
157
- startState: function() {
158
- return { tokenize: u, cc: [], indented: 0, startOfLine: !0, pluginName: null, context: null };
159
- },
160
- token: function(n, t) {
161
- if (n.sol() && (t.startOfLine = !0, t.indented = n.indentation()), n.eatSpace()) return null;
162
- c = l = k = null;
163
- var e = t.tokenize(n, t);
164
- if ((e || l) && e != "comment")
165
- for (i = t; ; ) {
166
- var r = t.cc.pop() || w;
167
- if (r(l || e)) break;
168
- }
169
- return t.startOfLine = !1, c || e;
170
- },
171
- indent: function(n, t, e) {
172
- var r = n.context;
173
- if (r && r.noIndent) return 0;
174
- for (r && /^{\//.test(t) && (r = r.prev); r && !r.startOfLine; )
175
- r = r.prev;
176
- return r ? r.indent + e.unit : 0;
177
- }
178
- };
179
- export {
180
- N as tiki
181
- };
@@ -1,56 +0,0 @@
1
- const n = {
2
- name: "toml",
3
- startState: function() {
4
- return {
5
- inString: !1,
6
- stringType: "",
7
- lhs: !0,
8
- inArray: 0
9
- };
10
- },
11
- token: function(t, r) {
12
- let e;
13
- if (!r.inString && (e = t.match(/^('''|"""|'|")/)) && (r.stringType = e[0], r.inString = !0), t.sol() && !r.inString && r.inArray === 0 && (r.lhs = !0), r.inString) {
14
- for (; r.inString; )
15
- if (t.match(r.stringType))
16
- r.inString = !1;
17
- else if (t.peek() === "\\")
18
- t.next(), t.next();
19
- else {
20
- if (t.eol())
21
- break;
22
- t.match(/^.[^\\\"\']*/);
23
- }
24
- return r.lhs ? "property" : "string";
25
- } else {
26
- if (r.inArray && t.peek() === "]")
27
- return t.next(), r.inArray--, "bracket";
28
- if (r.lhs && t.peek() === "[" && t.skipTo("]"))
29
- return t.next(), t.peek() === "]" && t.next(), "atom";
30
- if (t.peek() === "#")
31
- return t.skipToEnd(), "comment";
32
- if (t.eatSpace())
33
- return null;
34
- if (r.lhs && t.eatWhile(function(i) {
35
- return i != "=" && i != " ";
36
- }))
37
- return "property";
38
- if (r.lhs && t.peek() === "=")
39
- return t.next(), r.lhs = !1, null;
40
- if (!r.lhs && t.match(/^\d\d\d\d[\d\-\:\.T]*Z/) || !r.lhs && (t.match("true") || t.match("false")))
41
- return "atom";
42
- if (!r.lhs && t.peek() === "[")
43
- return r.inArray++, t.next(), "bracket";
44
- if (!r.lhs && t.match(/^\-?\d+(?:\.\d+)?/))
45
- return "number";
46
- t.eatSpace() || t.next();
47
- }
48
- return null;
49
- },
50
- languageData: {
51
- commentTokens: { line: "#" }
52
- }
53
- };
54
- export {
55
- n as toml
56
- };