zs_library 0.4.6 → 0.4.8

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 (118) hide show
  1. package/dist/apl-DzB7vleG.js +77 -0
  2. package/dist/asciiarmor-GBg_dTix.js +35 -0
  3. package/dist/asn1-C3znSLx9.js +96 -0
  4. package/dist/asterisk-DlqRFsge.js +272 -0
  5. package/dist/brainfuck-BRsrPeoO.js +35 -0
  6. package/dist/clike-BvRdj3ii.js +621 -0
  7. package/dist/clojure-DoHCnq3P.js +801 -0
  8. package/dist/cmake-lga2BQKc.js +29 -0
  9. package/dist/cobol-CoUZEClC.js +73 -0
  10. package/dist/coffeescript-DtzhVgPb.js +180 -0
  11. package/dist/commonlisp-Dczl5pgK.js +76 -0
  12. package/dist/crystal-CGcK8mnw.js +218 -0
  13. package/dist/css-BSROsPdq.js +1561 -0
  14. package/dist/cypher-DtSMl1Mv.js +69 -0
  15. package/dist/d-Dvhr70b-.js +128 -0
  16. package/dist/diff-CGwDp7kO.js +19 -0
  17. package/dist/dockerfile-comEO-T6.js +195 -0
  18. package/dist/dtd-CCHJ68ra.js +85 -0
  19. package/dist/dylan-DuvcMu5H.js +235 -0
  20. package/dist/ebnf-40BT7kIS.js +79 -0
  21. package/dist/ecl-D1uoNQJW.js +122 -0
  22. package/dist/eiffel-5pGo0kXa.js +111 -0
  23. package/dist/elm-BaiVOLJD.js +109 -0
  24. package/dist/erlang-CkzodiGe.js +488 -0
  25. package/dist/factor-BOXOAn_M.js +66 -0
  26. package/dist/fcl-BpnTn_eU.js +104 -0
  27. package/dist/forth-DErAeAEb.js +61 -0
  28. package/dist/fortran-D2-6KpzO.js +443 -0
  29. package/dist/gas-DyEPANLH.js +184 -0
  30. package/dist/gherkin-Drt_srgO.js +35 -0
  31. package/dist/groovy-BMVfw_nf.js +147 -0
  32. package/dist/haskell-hWhKnZO1.js +376 -0
  33. package/dist/haxe-B1MRfS0p.js +360 -0
  34. package/dist/http-DmgKxj-g.js +45 -0
  35. package/dist/idl-DqZ86h3r.js +948 -0
  36. package/dist/index-5dj8r7GK.js +266 -0
  37. package/dist/index-BTXiadLB.js +309 -0
  38. package/dist/index-BlC4-BmN.js +72 -0
  39. package/dist/index-BrFeP3fX.js +244 -0
  40. package/dist/index-Bto4OncH.js +539 -0
  41. package/dist/index-Bvv7YkGe.js +136 -0
  42. package/dist/index-Bx4MkRG_.js +76 -0
  43. package/dist/index-CVOhQMF3.js +608 -0
  44. package/dist/index-CecD8NGL.js +228472 -0
  45. package/dist/index-CmoZmAhh.js +289 -0
  46. package/dist/index-DE3hmKbB.js +135 -0
  47. package/dist/index-DF7XjAxV.js +94 -0
  48. package/dist/index-DcChItCb.js +157 -0
  49. package/dist/index-Dl5DpQ2k.js +342 -0
  50. package/dist/index-Dpbxeq5U.js +59 -0
  51. package/dist/index-gpJmCEdM.js +99 -0
  52. package/dist/index-udH8R_K0.js +300 -0
  53. package/dist/{zs_library.css → index.css} +1 -1
  54. package/dist/index.js +9 -0
  55. package/dist/javascript-BvuVDFxD.js +691 -0
  56. package/dist/jinja2-sU0UaYnG.js +155 -0
  57. package/dist/julia-3_lRZPrK.js +242 -0
  58. package/dist/livescript-BeDiX_lv.js +273 -0
  59. package/dist/lua-DsgFLpii.js +218 -0
  60. package/dist/mathematica-1GSq-6KQ.js +36 -0
  61. package/dist/mbox-agttEgFX.js +77 -0
  62. package/dist/mirc-0mTi20sq.js +73 -0
  63. package/dist/mllike-Cn3QD1L6.js +273 -0
  64. package/dist/modelica-zXUsSMFb.js +94 -0
  65. package/dist/mscgen-CjqYDKLG.js +105 -0
  66. package/dist/mumps-o2cuacx9.js +26 -0
  67. package/dist/nginx-BwTpvSVN.js +90 -0
  68. package/dist/nsis-BuRdhAu4.js +63 -0
  69. package/dist/ntriples-DrgMTIhT.js +80 -0
  70. package/dist/octave-Cxdtf9mO.js +144 -0
  71. package/dist/oz-DFmTw-qE.js +152 -0
  72. package/dist/pascal-DXxn4Ogv.js +78 -0
  73. package/dist/perl-C73cx1ym.js +916 -0
  74. package/dist/pig-Bb8sMbk0.js +55 -0
  75. package/dist/powershell-DxmufwKU.js +250 -0
  76. package/dist/properties-C4fhBR7T.js +27 -0
  77. package/dist/protobuf-Eqae3kep.js +50 -0
  78. package/dist/pug-Cdoid33I.js +249 -0
  79. package/dist/puppet-BH84QZvC.js +46 -0
  80. package/dist/python-D32-_XsH.js +314 -0
  81. package/dist/q-CDvEpNHY.js +84 -0
  82. package/dist/r-D9TtEI-G.js +105 -0
  83. package/dist/rpm-Ckejt31K.js +58 -0
  84. package/dist/ruby-gRVA_lpr.js +229 -0
  85. package/dist/sas-Cetv6MtF.js +106 -0
  86. package/dist/scheme-BpAxUIwV.js +125 -0
  87. package/dist/shell-DmARhv5h.js +183 -0
  88. package/dist/sieve-DJENs6f1.js +73 -0
  89. package/dist/simple-mode-B0kVDhR7.js +89 -0
  90. package/dist/smalltalk-CtRR6guu.js +49 -0
  91. package/dist/solr-ZVIJNGhC.js +42 -0
  92. package/dist/sparql-Cg1WYQva.js +198 -0
  93. package/dist/spreadsheet-Bi94Lk_2.js +50 -0
  94. package/dist/sql-BLhvp4JJ.js +283 -0
  95. package/dist/stex-DuReG47O.js +130 -0
  96. package/dist/stylus-D5QpSSbb.js +251 -0
  97. package/dist/swift-CZplZXOW.js +231 -0
  98. package/dist/tcl-COiqjz-O.js +82 -0
  99. package/dist/textile-BIDpYsbD.js +296 -0
  100. package/dist/tiddlywiki-C4woD_uK.js +156 -0
  101. package/dist/tiki-Ddj0Z2aQ.js +182 -0
  102. package/dist/toml-Byr0PaXO.js +50 -0
  103. package/dist/troff-BEvN8lSw.js +36 -0
  104. package/dist/ttcn-CyeSpuPS.js +124 -0
  105. package/dist/ttcn-cfg-C4JBLVfg.js +89 -0
  106. package/dist/turtle-8qSCc9Tc.js +81 -0
  107. package/dist/vb-BOJI7cFm.js +75 -0
  108. package/dist/vbscript-Cu6iG9pw.js +325 -0
  109. package/dist/velocity-BEpFYT7L.js +97 -0
  110. package/dist/verilog-BBxq08Rh.js +264 -0
  111. package/dist/vhdl-B0tZHMGi.js +107 -0
  112. package/dist/webidl-CW91NtvY.js +156 -0
  113. package/dist/xquery-DzC9wL36.js +423 -0
  114. package/dist/yacas-lKwNB4DM.js +74 -0
  115. package/dist/z80-Bq0fiCqy.js +62 -0
  116. package/package.json +146 -146
  117. package/dist/index.es.js +0 -10618
  118. package/dist/index.umd.js +0 -701
@@ -0,0 +1,296 @@
1
+ import "./index.css";
2
+ var f = {
3
+ addition: "inserted",
4
+ attributes: "propertyName",
5
+ bold: "strong",
6
+ cite: "keyword",
7
+ code: "monospace",
8
+ definitionList: "list",
9
+ deletion: "deleted",
10
+ div: "punctuation",
11
+ em: "emphasis",
12
+ footnote: "variable",
13
+ footCite: "qualifier",
14
+ header: "heading",
15
+ html: "comment",
16
+ image: "atom",
17
+ italic: "emphasis",
18
+ link: "link",
19
+ linkDefinition: "link",
20
+ list1: "list",
21
+ list2: "list.special",
22
+ list3: "list",
23
+ notextile: "string.special",
24
+ pre: "operator",
25
+ p: "content",
26
+ quote: "bracket",
27
+ span: "quote",
28
+ specialChar: "character",
29
+ strong: "strong",
30
+ sub: "content.special",
31
+ sup: "content.special",
32
+ table: "variableName.special",
33
+ tableHeading: "operator"
34
+ };
35
+ function h(i, e) {
36
+ e.mode = r.newLayout, e.tableHeading = !1, e.layoutType === "definitionList" && e.spanningLayout && i.match(l("definitionListEnd"), !1) && (e.spanningLayout = !1);
37
+ }
38
+ function s(i, e, n) {
39
+ if (n === "_")
40
+ return i.eat("_") ? a(i, e, "italic", /__/, 2) : a(i, e, "em", /_/, 1);
41
+ if (n === "*")
42
+ return i.eat("*") ? a(i, e, "bold", /\*\*/, 2) : a(i, e, "strong", /\*/, 1);
43
+ if (n === "[")
44
+ return i.match(/\d+\]/) && (e.footCite = !0), u(e);
45
+ if (n === "(") {
46
+ var o = i.match(/^(r|tm|c)\)/);
47
+ if (o)
48
+ return f.specialChar;
49
+ }
50
+ if (n === "<" && i.match(/(\w+)[^>]+>[^<]+<\/\1>/))
51
+ return f.html;
52
+ if (n === "?" && i.eat("?"))
53
+ return a(i, e, "cite", /\?\?/, 2);
54
+ if (n === "=" && i.eat("="))
55
+ return a(i, e, "notextile", /==/, 2);
56
+ if (n === "-" && !i.eat("-"))
57
+ return a(i, e, "deletion", /-/, 1);
58
+ if (n === "+")
59
+ return a(i, e, "addition", /\+/, 1);
60
+ if (n === "~")
61
+ return a(i, e, "sub", /~/, 1);
62
+ if (n === "^")
63
+ return a(i, e, "sup", /\^/, 1);
64
+ if (n === "%")
65
+ return a(i, e, "span", /%/, 1);
66
+ if (n === "@")
67
+ return a(i, e, "code", /@/, 1);
68
+ if (n === "!") {
69
+ var c = a(i, e, "image", /(?:\([^\)]+\))?!/, 1);
70
+ return i.match(/^:\S+/), c;
71
+ }
72
+ return u(e);
73
+ }
74
+ function a(i, e, n, o, c) {
75
+ var d = i.pos > c ? i.string.charAt(i.pos - c - 1) : null, p = i.peek();
76
+ if (e[n]) {
77
+ if ((!p || /\W/.test(p)) && d && /\S/.test(d)) {
78
+ var y = u(e);
79
+ return e[n] = !1, y;
80
+ }
81
+ } else (!d || /\W/.test(d)) && p && /\S/.test(p) && i.match(new RegExp("^.*\\S" + o.source + "(?:\\W|$)"), !1) && (e[n] = !0, e.mode = r.attributes);
82
+ return u(e);
83
+ }
84
+ function u(i) {
85
+ var e = b(i);
86
+ if (e) return e;
87
+ var n = [];
88
+ return i.layoutType && n.push(f[i.layoutType]), n = n.concat(g(
89
+ i,
90
+ "addition",
91
+ "bold",
92
+ "cite",
93
+ "code",
94
+ "deletion",
95
+ "em",
96
+ "footCite",
97
+ "image",
98
+ "italic",
99
+ "link",
100
+ "span",
101
+ "strong",
102
+ "sub",
103
+ "sup",
104
+ "table",
105
+ "tableHeading"
106
+ )), i.layoutType === "header" && n.push(f.header + "-" + i.header), n.length ? n.join(" ") : null;
107
+ }
108
+ function b(i) {
109
+ var e = i.layoutType;
110
+ switch (e) {
111
+ case "notextile":
112
+ case "code":
113
+ case "pre":
114
+ return f[e];
115
+ default:
116
+ return i.notextile ? f.notextile + (e ? " " + f[e] : "") : null;
117
+ }
118
+ }
119
+ function g(i) {
120
+ for (var e = [], n = 1; n < arguments.length; ++n)
121
+ i[arguments[n]] && e.push(f[arguments[n]]);
122
+ return e;
123
+ }
124
+ function m(i) {
125
+ var e = i.spanningLayout, n = i.layoutType;
126
+ for (var o in i) i.hasOwnProperty(o) && delete i[o];
127
+ i.mode = r.newLayout, e && (i.layoutType = n, i.spanningLayout = !0);
128
+ }
129
+ var t = {
130
+ cache: {},
131
+ single: {
132
+ bc: "bc",
133
+ bq: "bq",
134
+ definitionList: /- .*?:=+/,
135
+ definitionListEnd: /.*=:\s*$/,
136
+ div: "div",
137
+ drawTable: /\|.*\|/,
138
+ foot: /fn\d+/,
139
+ header: /h[1-6]/,
140
+ html: /\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,
141
+ link: /[^"]+":\S/,
142
+ linkDefinition: /\[[^\s\]]+\]\S+/,
143
+ list: /(?:#+|\*+)/,
144
+ notextile: "notextile",
145
+ para: "p",
146
+ pre: "pre",
147
+ table: "table",
148
+ tableCellAttributes: /[\/\\]\d+/,
149
+ tableHeading: /\|_\./,
150
+ tableText: /[^"_\*\[\(\?\+~\^%@|-]+/,
151
+ text: /[^!"_=\*\[\(<\?\+~\^%@-]+/
152
+ },
153
+ attributes: {
154
+ align: /(?:<>|<|>|=)/,
155
+ selector: /\([^\(][^\)]+\)/,
156
+ lang: /\[[^\[\]]+\]/,
157
+ pad: /(?:\(+|\)+){1,2}/,
158
+ css: /\{[^\}]+\}/
159
+ },
160
+ createRe: function(i) {
161
+ switch (i) {
162
+ case "drawTable":
163
+ return t.makeRe("^", t.single.drawTable, "$");
164
+ case "html":
165
+ return t.makeRe("^", t.single.html, "(?:", t.single.html, ")*", "$");
166
+ case "linkDefinition":
167
+ return t.makeRe("^", t.single.linkDefinition, "$");
168
+ case "listLayout":
169
+ return t.makeRe("^", t.single.list, l("allAttributes"), "*\\s+");
170
+ case "tableCellAttributes":
171
+ return t.makeRe("^", t.choiceRe(
172
+ t.single.tableCellAttributes,
173
+ l("allAttributes")
174
+ ), "+\\.");
175
+ case "type":
176
+ return t.makeRe("^", l("allTypes"));
177
+ case "typeLayout":
178
+ return t.makeRe(
179
+ "^",
180
+ l("allTypes"),
181
+ l("allAttributes"),
182
+ "*\\.\\.?",
183
+ "(\\s+|$)"
184
+ );
185
+ case "attributes":
186
+ return t.makeRe("^", l("allAttributes"), "+");
187
+ case "allTypes":
188
+ return t.choiceRe(
189
+ t.single.div,
190
+ t.single.foot,
191
+ t.single.header,
192
+ t.single.bc,
193
+ t.single.bq,
194
+ t.single.notextile,
195
+ t.single.pre,
196
+ t.single.table,
197
+ t.single.para
198
+ );
199
+ case "allAttributes":
200
+ return t.choiceRe(
201
+ t.attributes.selector,
202
+ t.attributes.css,
203
+ t.attributes.lang,
204
+ t.attributes.align,
205
+ t.attributes.pad
206
+ );
207
+ default:
208
+ return t.makeRe("^", t.single[i]);
209
+ }
210
+ },
211
+ makeRe: function() {
212
+ for (var i = "", e = 0; e < arguments.length; ++e) {
213
+ var n = arguments[e];
214
+ i += typeof n == "string" ? n : n.source;
215
+ }
216
+ return new RegExp(i);
217
+ },
218
+ choiceRe: function() {
219
+ for (var i = [arguments[0]], e = 1; e < arguments.length; ++e)
220
+ i[e * 2 - 1] = "|", i[e * 2] = arguments[e];
221
+ return i.unshift("(?:"), i.push(")"), t.makeRe.apply(null, i);
222
+ }
223
+ };
224
+ function l(i) {
225
+ return t.cache[i] || (t.cache[i] = t.createRe(i));
226
+ }
227
+ var r = {
228
+ newLayout: function(i, e) {
229
+ if (i.match(l("typeLayout"), !1))
230
+ return e.spanningLayout = !1, (e.mode = r.blockType)(i, e);
231
+ var n;
232
+ return b(e) || (i.match(l("listLayout"), !1) ? n = r.list : i.match(l("drawTable"), !1) ? n = r.table : i.match(l("linkDefinition"), !1) ? n = r.linkDefinition : i.match(l("definitionList")) ? n = r.definitionList : i.match(l("html"), !1) && (n = r.html)), (e.mode = n || r.text)(i, e);
233
+ },
234
+ blockType: function(i, e) {
235
+ var n, o;
236
+ if (e.layoutType = null, n = i.match(l("type")))
237
+ o = n[0];
238
+ else
239
+ return (e.mode = r.text)(i, e);
240
+ return (n = o.match(l("header"))) ? (e.layoutType = "header", e.header = parseInt(n[0][1])) : o.match(l("bq")) ? e.layoutType = "quote" : o.match(l("bc")) ? e.layoutType = "code" : o.match(l("foot")) ? e.layoutType = "footnote" : o.match(l("notextile")) ? e.layoutType = "notextile" : o.match(l("pre")) ? e.layoutType = "pre" : o.match(l("div")) ? e.layoutType = "div" : o.match(l("table")) && (e.layoutType = "table"), e.mode = r.attributes, u(e);
241
+ },
242
+ text: function(i, e) {
243
+ if (i.match(l("text"))) return u(e);
244
+ var n = i.next();
245
+ return n === '"' ? (e.mode = r.link)(i, e) : s(i, e, n);
246
+ },
247
+ attributes: function(i, e) {
248
+ return e.mode = r.layoutLength, i.match(l("attributes")) ? f.attributes : u(e);
249
+ },
250
+ layoutLength: function(i, e) {
251
+ return i.eat(".") && i.eat(".") && (e.spanningLayout = !0), e.mode = r.text, u(e);
252
+ },
253
+ list: function(i, e) {
254
+ var n = i.match(l("list"));
255
+ e.listDepth = n[0].length;
256
+ var o = (e.listDepth - 1) % 3;
257
+ return o ? o === 1 ? e.layoutType = "list2" : e.layoutType = "list3" : e.layoutType = "list1", e.mode = r.attributes, u(e);
258
+ },
259
+ link: function(i, e) {
260
+ return e.mode = r.text, i.match(l("link")) ? (i.match(/\S+/), f.link) : u(e);
261
+ },
262
+ linkDefinition: function(i) {
263
+ return i.skipToEnd(), f.linkDefinition;
264
+ },
265
+ definitionList: function(i, e) {
266
+ return i.match(l("definitionList")), e.layoutType = "definitionList", i.match(/\s*$/) ? e.spanningLayout = !0 : e.mode = r.attributes, u(e);
267
+ },
268
+ html: function(i) {
269
+ return i.skipToEnd(), f.html;
270
+ },
271
+ table: function(i, e) {
272
+ return e.layoutType = "table", (e.mode = r.tableCell)(i, e);
273
+ },
274
+ tableCell: function(i, e) {
275
+ return i.match(l("tableHeading")) ? e.tableHeading = !0 : i.eat("|"), e.mode = r.tableCellAttributes, u(e);
276
+ },
277
+ tableCellAttributes: function(i, e) {
278
+ return e.mode = r.tableText, i.match(l("tableCellAttributes")) ? f.attributes : u(e);
279
+ },
280
+ tableText: function(i, e) {
281
+ return i.match(l("tableText")) ? u(e) : i.peek() === "|" ? (e.mode = r.tableCell, u(e)) : s(i, e, i.next());
282
+ }
283
+ };
284
+ const T = {
285
+ name: "textile",
286
+ startState: function() {
287
+ return { mode: r.newLayout };
288
+ },
289
+ token: function(i, e) {
290
+ return i.sol() && h(i, e), e.mode(i, e);
291
+ },
292
+ blankLine: m
293
+ };
294
+ export {
295
+ T as textile
296
+ };
@@ -0,0 +1,156 @@
1
+ import "./index.css";
2
+ var c = {}, l = {
3
+ allTags: !0,
4
+ closeAll: !0,
5
+ list: !0,
6
+ newJournal: !0,
7
+ newTiddler: !0,
8
+ permaview: !0,
9
+ saveChanges: !0,
10
+ search: !0,
11
+ slider: !0,
12
+ tabs: !0,
13
+ tag: !0,
14
+ tagging: !0,
15
+ tags: !0,
16
+ tiddler: !0,
17
+ timeline: !0,
18
+ today: !0,
19
+ version: !0,
20
+ option: !0,
21
+ with: !0,
22
+ filter: !0
23
+ }, f = /[\w_\-]/i, k = /^\-\-\-\-+$/, h = /^\/\*\*\*$/, d = /^\*\*\*\/$/, a = /^<<<$/, p = /^\/\/\{\{\{$/, w = /^\/\/\}\}\}$/, b = /^<!--\{\{\{-->$/, v = /^<!--\}\}\}-->$/, S = /^\{\{\{$/, y = /^\}\}\}$/, $ = /.*?\}\}\}/;
24
+ function o(e, t, r) {
25
+ return t.tokenize = r, r(e, t);
26
+ }
27
+ function i(e, t) {
28
+ var r = e.sol(), n = e.peek();
29
+ if (t.block = !1, r && /[<\/\*{}\-]/.test(n)) {
30
+ if (e.match(S))
31
+ return t.block = !0, o(e, t, u);
32
+ if (e.match(a))
33
+ return "quote";
34
+ if (e.match(h) || e.match(d) || e.match(p) || e.match(w) || e.match(b) || e.match(v))
35
+ return "comment";
36
+ if (e.match(k))
37
+ return "contentSeparator";
38
+ }
39
+ if (e.next(), r && /[\/\*!#;:>|]/.test(n)) {
40
+ if (n == "!")
41
+ return e.skipToEnd(), "header";
42
+ if (n == "*")
43
+ return e.eatWhile("*"), "comment";
44
+ if (n == "#")
45
+ return e.eatWhile("#"), "comment";
46
+ if (n == ";")
47
+ return e.eatWhile(";"), "comment";
48
+ if (n == ":")
49
+ return e.eatWhile(":"), "comment";
50
+ if (n == ">")
51
+ return e.eatWhile(">"), "quote";
52
+ if (n == "|")
53
+ return "header";
54
+ }
55
+ if (n == "{" && e.match("{{"))
56
+ return o(e, t, u);
57
+ if (/[hf]/i.test(n) && /[ti]/i.test(e.peek()) && e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))
58
+ return "link";
59
+ if (n == '"')
60
+ return "string";
61
+ if (n == "~" || /[\[\]]/.test(n) && e.match(n))
62
+ return "brace";
63
+ if (n == "@")
64
+ return e.eatWhile(f), "link";
65
+ if (/\d/.test(n))
66
+ return e.eatWhile(/\d/), "number";
67
+ if (n == "/") {
68
+ if (e.eat("%"))
69
+ return o(e, t, z);
70
+ if (e.eat("/"))
71
+ return o(e, t, W);
72
+ }
73
+ if (n == "_" && e.eat("_"))
74
+ return o(e, t, x);
75
+ if (n == "-" && e.eat("-")) {
76
+ if (e.peek() != " ")
77
+ return o(e, t, g);
78
+ if (e.peek() == " ")
79
+ return "brace";
80
+ }
81
+ return n == "'" && e.eat("'") ? o(e, t, C) : n == "<" && e.eat("<") ? o(e, t, m) : (e.eatWhile(/[\w\$_]/), c.propertyIsEnumerable(e.current()) ? "keyword" : null);
82
+ }
83
+ function z(e, t) {
84
+ for (var r = !1, n; n = e.next(); ) {
85
+ if (n == "/" && r) {
86
+ t.tokenize = i;
87
+ break;
88
+ }
89
+ r = n == "%";
90
+ }
91
+ return "comment";
92
+ }
93
+ function C(e, t) {
94
+ for (var r = !1, n; n = e.next(); ) {
95
+ if (n == "'" && r) {
96
+ t.tokenize = i;
97
+ break;
98
+ }
99
+ r = n == "'";
100
+ }
101
+ return "strong";
102
+ }
103
+ function u(e, t) {
104
+ var r = t.block;
105
+ return r && e.current() ? "comment" : !r && e.match($) || r && e.sol() && e.match(y) ? (t.tokenize = i, "comment") : (e.next(), "comment");
106
+ }
107
+ function W(e, t) {
108
+ for (var r = !1, n; n = e.next(); ) {
109
+ if (n == "/" && r) {
110
+ t.tokenize = i;
111
+ break;
112
+ }
113
+ r = n == "/";
114
+ }
115
+ return "emphasis";
116
+ }
117
+ function x(e, t) {
118
+ for (var r = !1, n; n = e.next(); ) {
119
+ if (n == "_" && r) {
120
+ t.tokenize = i;
121
+ break;
122
+ }
123
+ r = n == "_";
124
+ }
125
+ return "link";
126
+ }
127
+ function g(e, t) {
128
+ for (var r = !1, n; n = e.next(); ) {
129
+ if (n == "-" && r) {
130
+ t.tokenize = i;
131
+ break;
132
+ }
133
+ r = n == "-";
134
+ }
135
+ return "deleted";
136
+ }
137
+ function m(e, t) {
138
+ if (e.current() == "<<")
139
+ return "meta";
140
+ var r = e.next();
141
+ return r ? r == ">" && e.peek() == ">" ? (e.next(), t.tokenize = i, "meta") : (e.eatWhile(/[\w\$_]/), l.propertyIsEnumerable(e.current()) ? "keyword" : null) : (t.tokenize = i, null);
142
+ }
143
+ const E = {
144
+ name: "tiddlywiki",
145
+ startState: function() {
146
+ return { tokenize: i };
147
+ },
148
+ token: function(e, t) {
149
+ if (e.eatSpace()) return null;
150
+ var r = t.tokenize(e, t);
151
+ return r;
152
+ }
153
+ };
154
+ export {
155
+ E as tiddlyWiki
156
+ };
@@ -0,0 +1,182 @@
1
+ import "./index.css";
2
+ function c(e, t, n) {
3
+ return function(r, a) {
4
+ for (; !r.eol(); ) {
5
+ if (r.match(t)) {
6
+ a.tokenize = o;
7
+ break;
8
+ }
9
+ r.next();
10
+ }
11
+ return n && (a.tokenize = n), e;
12
+ };
13
+ }
14
+ function f(e) {
15
+ return function(t, n) {
16
+ for (; !t.eol(); )
17
+ t.next();
18
+ return n.tokenize = o, e;
19
+ };
20
+ }
21
+ function o(e, t) {
22
+ function n(p) {
23
+ return t.tokenize = p, p(e, t);
24
+ }
25
+ var r = e.sol(), a = e.next();
26
+ switch (a) {
27
+ //switch is generally much faster than if, so it is used here
28
+ case "{":
29
+ return e.eat("/"), e.eatSpace(), e.eatWhile(/[^\s\u00a0=\"\'\/?(}]/), t.tokenize = h, "tag";
30
+ case "_":
31
+ if (e.eat("_"))
32
+ return n(c("strong", "__", o));
33
+ break;
34
+ case "'":
35
+ if (e.eat("'"))
36
+ return n(c("em", "''", o));
37
+ break;
38
+ case "(":
39
+ if (e.eat("("))
40
+ return n(c("link", "))", o));
41
+ break;
42
+ case "[":
43
+ return n(c("url", "]", o));
44
+ case "|":
45
+ if (e.eat("|"))
46
+ return n(c("comment", "||"));
47
+ break;
48
+ case "-":
49
+ if (e.eat("="))
50
+ return n(c("header string", "=-", o));
51
+ if (e.eat("-"))
52
+ return n(c("error tw-deleted", "--", o));
53
+ break;
54
+ case "=":
55
+ if (e.match("=="))
56
+ return n(c("tw-underline", "===", o));
57
+ break;
58
+ case ":":
59
+ if (e.eat(":"))
60
+ return n(c("comment", "::"));
61
+ break;
62
+ case "^":
63
+ return n(c("tw-box", "^"));
64
+ case "~":
65
+ if (e.match("np~"))
66
+ return n(c("meta", "~/np~"));
67
+ break;
68
+ }
69
+ if (r)
70
+ switch (a) {
71
+ case "!":
72
+ return e.match("!!!!!") || e.match("!!!!") || e.match("!!!") || e.match("!!"), n(f("header string"));
73
+ case "*":
74
+ //unordered list line item, or <li /> at start of line
75
+ case "#":
76
+ //ordered list line item, or <li /> at start of line
77
+ case "+":
78
+ return n(f("tw-listitem bracket"));
79
+ }
80
+ return null;
81
+ }
82
+ var g, s;
83
+ function h(e, t) {
84
+ var n = e.next(), r = e.peek();
85
+ return n == "}" ? (t.tokenize = o, "tag") : n == "(" || n == ")" ? "bracket" : n == "=" ? (s = "equals", r == ">" && (e.next(), r = e.peek()), /[\'\"]/.test(r) || (t.tokenize = z()), "operator") : /[\'\"]/.test(n) ? (t.tokenize = w(n), t.tokenize(e, t)) : (e.eatWhile(/[^\s\u00a0=\"\'\/?]/), "keyword");
86
+ }
87
+ function w(e) {
88
+ return function(t, n) {
89
+ for (; !t.eol(); )
90
+ if (t.next() == e) {
91
+ n.tokenize = h;
92
+ break;
93
+ }
94
+ return "string";
95
+ };
96
+ }
97
+ function z() {
98
+ return function(e, t) {
99
+ for (; !e.eol(); ) {
100
+ var n = e.next(), r = e.peek();
101
+ if (n == " " || n == "," || /[ )}]/.test(r)) {
102
+ t.tokenize = h;
103
+ break;
104
+ }
105
+ }
106
+ return "string";
107
+ };
108
+ }
109
+ var i, l;
110
+ function k() {
111
+ for (var e = arguments.length - 1; e >= 0; e--) i.cc.push(arguments[e]);
112
+ }
113
+ function u() {
114
+ return k.apply(null, arguments), !0;
115
+ }
116
+ function b(e, t) {
117
+ var n = i.context && i.context.noIndent;
118
+ i.context = {
119
+ prev: i.context,
120
+ pluginName: e,
121
+ indent: i.indented,
122
+ startOfLine: t,
123
+ noIndent: n
124
+ };
125
+ }
126
+ function x() {
127
+ i.context && (i.context = i.context.prev);
128
+ }
129
+ function L(e) {
130
+ if (e == "openPlugin")
131
+ return i.pluginName = g, u(d, N(i.startOfLine));
132
+ if (e == "closePlugin") {
133
+ var t = !1;
134
+ return i.context ? (t = i.context.pluginName != g, x()) : t = !0, t && (l = "error"), u(P(t));
135
+ } else return e == "string" && ((!i.context || i.context.name != "!cdata") && b("!cdata"), i.tokenize == o && x()), u();
136
+ }
137
+ function N(e) {
138
+ return function(t) {
139
+ return t == "selfclosePlugin" || t == "endPlugin" || t == "endPlugin" && b(i.pluginName, e), u();
140
+ };
141
+ }
142
+ function P(e) {
143
+ return function(t) {
144
+ return e && (l = "error"), t == "endPlugin" ? u() : k();
145
+ };
146
+ }
147
+ function d(e) {
148
+ return e == "keyword" ? (l = "attribute", u(d)) : e == "equals" ? u(O, d) : k();
149
+ }
150
+ function O(e) {
151
+ return e == "keyword" ? (l = "string", u()) : e == "string" ? u(v) : k();
152
+ }
153
+ function v(e) {
154
+ return e == "string" ? u(v) : k();
155
+ }
156
+ const I = {
157
+ name: "tiki",
158
+ startState: function() {
159
+ return { tokenize: o, cc: [], indented: 0, startOfLine: !0, pluginName: null, context: null };
160
+ },
161
+ token: function(e, t) {
162
+ if (e.sol() && (t.startOfLine = !0, t.indented = e.indentation()), e.eatSpace()) return null;
163
+ l = s = g = null;
164
+ var n = t.tokenize(e, t);
165
+ if ((n || s) && n != "comment")
166
+ for (i = t; ; ) {
167
+ var r = t.cc.pop() || L;
168
+ if (r(s || n)) break;
169
+ }
170
+ return t.startOfLine = !1, l || n;
171
+ },
172
+ indent: function(e, t, n) {
173
+ var r = e.context;
174
+ if (r && r.noIndent) return 0;
175
+ for (r && /^{\//.test(t) && (r = r.prev); r && !r.startOfLine; )
176
+ r = r.prev;
177
+ return r ? r.indent + n.unit : 0;
178
+ }
179
+ };
180
+ export {
181
+ I as tiki
182
+ };
@@ -0,0 +1,50 @@
1
+ import "./index.css";
2
+ const r = {
3
+ name: "toml",
4
+ startState: function() {
5
+ return {
6
+ inString: !1,
7
+ stringType: "",
8
+ lhs: !0,
9
+ inArray: 0
10
+ };
11
+ },
12
+ token: function(n, e) {
13
+ if (!e.inString && (n.peek() == '"' || n.peek() == "'") && (e.stringType = n.peek(), n.next(), e.inString = !0), n.sol() && e.inArray === 0 && (e.lhs = !0), e.inString) {
14
+ for (; e.inString && !n.eol(); )
15
+ n.peek() === e.stringType ? (n.next(), e.inString = !1) : n.peek() === "\\" ? (n.next(), n.next()) : n.match(/^.[^\\\"\']*/);
16
+ return e.lhs ? "property" : "string";
17
+ } else {
18
+ if (e.inArray && n.peek() === "]")
19
+ return n.next(), e.inArray--, "bracket";
20
+ if (e.lhs && n.peek() === "[" && n.skipTo("]"))
21
+ return n.next(), n.peek() === "]" && n.next(), "atom";
22
+ if (n.peek() === "#")
23
+ return n.skipToEnd(), "comment";
24
+ if (n.eatSpace())
25
+ return null;
26
+ if (e.lhs && n.eatWhile(function(i) {
27
+ return i != "=" && i != " ";
28
+ }))
29
+ return "property";
30
+ if (e.lhs && n.peek() === "=")
31
+ return n.next(), e.lhs = !1, null;
32
+ if (!e.lhs && n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))
33
+ return "atom";
34
+ if (!e.lhs && (n.match("true") || n.match("false")))
35
+ return "atom";
36
+ if (!e.lhs && n.peek() === "[")
37
+ return e.inArray++, n.next(), "bracket";
38
+ if (!e.lhs && n.match(/^\-?\d+(?:\.\d+)?/))
39
+ return "number";
40
+ n.eatSpace() || n.next();
41
+ }
42
+ return null;
43
+ },
44
+ languageData: {
45
+ commentTokens: { line: "#" }
46
+ }
47
+ };
48
+ export {
49
+ r as toml
50
+ };