editor.md-next 0.0.0-stage → 0.1.1
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.
- package/LICENSE +32 -0
- package/dist/cdn/editormd-next.min.js +96 -0
- package/dist/cdn/index.css +2 -0
- package/dist/es/chunks/apl-BsW9fB9B.js +74 -0
- package/dist/es/chunks/asciiarmor-CZm6RLC5.js +30 -0
- package/dist/es/chunks/asn1-DBNYSAs9.js +86 -0
- package/dist/es/chunks/asterisk-XIYTp-BQ.js +63 -0
- package/dist/es/chunks/brainfuck-C03PadMX.js +26 -0
- package/dist/es/chunks/clike-QWVxZJBi.js +583 -0
- package/dist/es/chunks/clojure-DT_PY7rc.js +98 -0
- package/dist/es/chunks/cmake-DsoLxE-D.js +27 -0
- package/dist/es/chunks/cobol-CZjCUlI-.js +59 -0
- package/dist/es/chunks/coffeescript-CuHwxkgS.js +174 -0
- package/dist/es/chunks/commonlisp-CGpKWWCQ.js +90 -0
- package/dist/es/chunks/crystal-BH2tBqmL.js +159 -0
- package/dist/es/chunks/css-C6pN9rmb.js +314 -0
- package/dist/es/chunks/cypher-DknS4f0k.js +66 -0
- package/dist/es/chunks/d-zXrED2QC.js +121 -0
- package/dist/es/chunks/diff-Ca3g43eR.js +15 -0
- package/dist/es/chunks/dist-9Y-Blrkp.js +118 -0
- package/dist/es/chunks/dist-B0cBTTiS.js +408 -0
- package/dist/es/chunks/dist-BX9Ur1J1.js +74 -0
- package/dist/es/chunks/dist-BmAxhg3z.js +555 -0
- package/dist/es/chunks/dist-C6c_aHTh.js +269 -0
- package/dist/es/chunks/dist-CGdw3vqm.js +429 -0
- package/dist/es/chunks/dist-CNbWaVYs.js +11572 -0
- package/dist/es/chunks/dist-CR-jmTSB.js +1338 -0
- package/dist/es/chunks/dist-CahNaXTc.js +388 -0
- package/dist/es/chunks/dist-CeqtAM8-.js +438 -0
- package/dist/es/chunks/dist-Clo-Jkvm.js +291 -0
- package/dist/es/chunks/dist-Cpw9AD2K.js +372 -0
- package/dist/es/chunks/dist-Ct5FNAAH.js +406 -0
- package/dist/es/chunks/dist-D0OW86fR.js +605 -0
- package/dist/es/chunks/dist-DAlgXLzd.js +110 -0
- package/dist/es/chunks/dist-DL-UifMi.js +744 -0
- package/dist/es/chunks/dist-DQadNG25.js +523 -0
- package/dist/es/chunks/dist-DlAXkWGE.js +67 -0
- package/dist/es/chunks/dist-DoThxrrR.js +371 -0
- package/dist/es/chunks/dist-DrwgGib-.js +377 -0
- package/dist/es/chunks/dist-P5rAF7pi.js +197 -0
- package/dist/es/chunks/dist-fTCYxiV-.js +355 -0
- package/dist/es/chunks/dockerfile-BZSDl6MT.js +196 -0
- package/dist/es/chunks/dtd-DzUNfrcJ.js +77 -0
- package/dist/es/chunks/dylan-CFjlscB1.js +186 -0
- package/dist/es/chunks/ebnf-Vn9hWL1o.js +67 -0
- package/dist/es/chunks/ecl-CbjLeBF5.js +105 -0
- package/dist/es/chunks/eiffel-Dmm3m78y.js +49 -0
- package/dist/es/chunks/elm-CSe2F7PE.js +85 -0
- package/dist/es/chunks/erlang-D6YOoBpM.js +321 -0
- package/dist/es/chunks/factor-DAqyQvq1.js +165 -0
- package/dist/es/chunks/fcl-BZA_wXmw.js +99 -0
- package/dist/es/chunks/forth-MNc4axOK.js +45 -0
- package/dist/es/chunks/fortran-auI4bdzC.js +40 -0
- package/dist/es/chunks/gas-CZDp8wLI.js +167 -0
- package/dist/es/chunks/gherkin-B12NX28O.js +29 -0
- package/dist/es/chunks/groovy-CBShT4in.js +143 -0
- package/dist/es/chunks/haskell-DQf5nq2l.js +85 -0
- package/dist/es/chunks/haxe-CBKywepX.js +351 -0
- package/dist/es/chunks/http-B-vrcJu5.js +43 -0
- package/dist/es/chunks/idl-kztl-rIS.js +41 -0
- package/dist/es/chunks/javascript-COVyUmNV.js +636 -0
- package/dist/es/chunks/julia-C7x1UmUy.js +173 -0
- package/dist/es/chunks/livescript-BcSQznfC.js +250 -0
- package/dist/es/chunks/lua-CuzOmeFy.js +104 -0
- package/dist/es/chunks/mathematica-C_8O0eBN.js +37 -0
- package/dist/es/chunks/mbox-CgRq7o1s.js +65 -0
- package/dist/es/chunks/mirc-46fAnY_I.js +61 -0
- package/dist/es/chunks/mllike-DwngWEOH.js +260 -0
- package/dist/es/chunks/modelica-CLh6SOPZ.js +82 -0
- package/dist/es/chunks/mscgen-CqCKoWqr.js +287 -0
- package/dist/es/chunks/mumps-CTaGGpGh.js +24 -0
- package/dist/es/chunks/nginx-D8_Tx5a5.js +76 -0
- package/dist/es/chunks/nsis-LQ_3myBa.js +143 -0
- package/dist/es/chunks/ntriples-C8_f-qnr.js +76 -0
- package/dist/es/chunks/octave-Bg8pIvq8.js +40 -0
- package/dist/es/chunks/oz-fY6iPhaV.js +151 -0
- package/dist/es/chunks/pascal-yJGuSy92.js +66 -0
- package/dist/es/chunks/perl-Cp3_dIJp.js +626 -0
- package/dist/es/chunks/pig-Dp8CFFHM.js +49 -0
- package/dist/es/chunks/powershell-CFKKqebC.js +233 -0
- package/dist/es/chunks/properties-bVaZpKhj.js +19 -0
- package/dist/es/chunks/protobuf-CJ_NuiRp.js +14 -0
- package/dist/es/chunks/pug-CNVrzrF7.js +202 -0
- package/dist/es/chunks/puppet-DFrFlsRb.js +37 -0
- package/dist/es/chunks/python-DDOdLHWp.js +219 -0
- package/dist/es/chunks/q-CfAEY3XK.js +82 -0
- package/dist/es/chunks/r-D33f5qKA.js +133 -0
- package/dist/es/chunks/rolldown-runtime-QGRDbDUS.js +19 -0
- package/dist/es/chunks/rpm-KA2CbYVz.js +39 -0
- package/dist/es/chunks/ruby-DkaeL5UR.js +165 -0
- package/dist/es/chunks/sas-BMhoxqFi.js +73 -0
- package/dist/es/chunks/scheme-DiiFnhTV.js +116 -0
- package/dist/es/chunks/shell-BkraTAet.js +108 -0
- package/dist/es/chunks/sieve-CO0RsW8J.js +59 -0
- package/dist/es/chunks/simple-mode-DwMrk-pB.js +95 -0
- package/dist/es/chunks/smalltalk-susA3LoJ.js +43 -0
- package/dist/es/chunks/solr-Dyiozr6d.js +36 -0
- package/dist/es/chunks/sparql-svcWfrig.js +78 -0
- package/dist/es/chunks/spreadsheet-D64TPnFY.js +48 -0
- package/dist/es/chunks/sql-iy-in7fW.js +254 -0
- package/dist/es/chunks/stex-CK4iWXBq.js +108 -0
- package/dist/es/chunks/stylus-Bla1TtoF.js +281 -0
- package/dist/es/chunks/swift-BfLWtovc.js +158 -0
- package/dist/es/chunks/tcl-Cqsx32oK.js +71 -0
- package/dist/es/chunks/textile-CP9LptjR.js +215 -0
- package/dist/es/chunks/tiddlywiki-Ta-GM0jK.js +129 -0
- package/dist/es/chunks/tiki-CX4cONcl.js +160 -0
- package/dist/es/chunks/toml-BvD52WqI.js +27 -0
- package/dist/es/chunks/troff-CQ9EHWHs.js +29 -0
- package/dist/es/chunks/ttcn-DvhS_Gkc.js +117 -0
- package/dist/es/chunks/ttcn-cfg-GQi0YvSM.js +80 -0
- package/dist/es/chunks/turtle-VdGQLPpt.js +78 -0
- package/dist/es/chunks/vb-CPJS1Nrj.js +108 -0
- package/dist/es/chunks/vbscript-DEYreBb1.js +208 -0
- package/dist/es/chunks/velocity-BzjrTOAF.js +89 -0
- package/dist/es/chunks/verilog-Bc3Yq1WU.js +218 -0
- package/dist/es/chunks/vhdl-BD6jHQjr.js +102 -0
- package/dist/es/chunks/webidl-C5YO-ffA.js +102 -0
- package/dist/es/chunks/xquery-ugZJVSaq.js +204 -0
- package/dist/es/chunks/yacas-tAOeQ6Ok.js +72 -0
- package/dist/es/chunks/z80-DZa7RpgS.js +43 -0
- package/dist/es/index.js +19829 -0
- package/dist/iife/index.iife.js +96 -0
- package/dist/index.css +2 -0
- package/dist/types/cm/create-view.d.ts +19 -0
- package/dist/types/cm/create-view.d.ts.map +1 -0
- package/dist/types/cm/shortcuts.d.ts +11 -0
- package/dist/types/cm/shortcuts.d.ts.map +1 -0
- package/dist/types/cm/themes.d.ts +24 -0
- package/dist/types/cm/themes.d.ts.map +1 -0
- package/dist/types/cm/themes.test.d.ts +2 -0
- package/dist/types/cm/themes.test.d.ts.map +1 -0
- package/dist/types/defaults.d.ts +5 -0
- package/dist/types/defaults.d.ts.map +1 -0
- package/dist/types/dialogs/code.d.ts +5 -0
- package/dist/types/dialogs/code.d.ts.map +1 -0
- package/dist/types/dialogs/data/html-entities-data.d.ts +9 -0
- package/dist/types/dialogs/data/html-entities-data.d.ts.map +1 -0
- package/dist/types/dialogs/dialog.d.ts +37 -0
- package/dist/types/dialogs/dialog.d.ts.map +1 -0
- package/dist/types/dialogs/emoji.d.ts +4 -0
- package/dist/types/dialogs/emoji.d.ts.map +1 -0
- package/dist/types/dialogs/entities.d.ts +4 -0
- package/dist/types/dialogs/entities.d.ts.map +1 -0
- package/dist/types/dialogs/form.d.ts +12 -0
- package/dist/types/dialogs/form.d.ts.map +1 -0
- package/dist/types/dialogs/image.d.ts +4 -0
- package/dist/types/dialogs/image.d.ts.map +1 -0
- package/dist/types/dialogs/link.d.ts +6 -0
- package/dist/types/dialogs/link.d.ts.map +1 -0
- package/dist/types/dialogs/misc.d.ts +6 -0
- package/dist/types/dialogs/misc.d.ts.map +1 -0
- package/dist/types/dialogs/registry.d.ts +8 -0
- package/dist/types/dialogs/registry.d.ts.map +1 -0
- package/dist/types/dialogs/table.d.ts +4 -0
- package/dist/types/dialogs/table.d.ts.map +1 -0
- package/dist/types/editor.d.ts +105 -0
- package/dist/types/editor.d.ts.map +1 -0
- package/dist/types/features/paste-drop.d.ts +4 -0
- package/dist/types/features/paste-drop.d.ts.map +1 -0
- package/dist/types/features/view-modes.d.ts +8 -0
- package/dist/types/features/view-modes.d.ts.map +1 -0
- package/dist/types/i18n/en.d.ts +3 -0
- package/dist/types/i18n/en.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +9 -0
- package/dist/types/i18n/index.d.ts.map +1 -0
- package/dist/types/i18n/zh-cn.d.ts +3 -0
- package/dist/types/i18n/zh-cn.d.ts.map +1 -0
- package/dist/types/i18n/zh-tw.d.ts +3 -0
- package/dist/types/i18n/zh-tw.d.ts.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lifecycle/layout.d.ts +11 -0
- package/dist/types/lifecycle/layout.d.ts.map +1 -0
- package/dist/types/lifecycle/mount.d.ts +12 -0
- package/dist/types/lifecycle/mount.d.ts.map +1 -0
- package/dist/types/markdown/cdn-lazy.d.ts +49 -0
- package/dist/types/markdown/cdn-lazy.d.ts.map +1 -0
- package/dist/types/markdown/data/emoji-data.d.ts +13 -0
- package/dist/types/markdown/data/emoji-data.d.ts.map +1 -0
- package/dist/types/markdown/data/emoji-unicode.d.ts +6 -0
- package/dist/types/markdown/data/emoji-unicode.d.ts.map +1 -0
- package/dist/types/markdown/data-attr.d.ts +10 -0
- package/dist/types/markdown/data-attr.d.ts.map +1 -0
- package/dist/types/markdown/engine.d.ts +18 -0
- package/dist/types/markdown/engine.d.ts.map +1 -0
- package/dist/types/markdown/engine.test.d.ts +2 -0
- package/dist/types/markdown/engine.test.d.ts.map +1 -0
- package/dist/types/markdown/highlight.d.ts +9 -0
- package/dist/types/markdown/highlight.d.ts.map +1 -0
- package/dist/types/markdown/plugin-emoji.d.ts +9 -0
- package/dist/types/markdown/plugin-emoji.d.ts.map +1 -0
- package/dist/types/markdown/plugin-fence.d.ts +3 -0
- package/dist/types/markdown/plugin-fence.d.ts.map +1 -0
- package/dist/types/markdown/plugin-misc.d.ts +9 -0
- package/dist/types/markdown/plugin-misc.d.ts.map +1 -0
- package/dist/types/markdown/plugin-tasks.d.ts +4 -0
- package/dist/types/markdown/plugin-tasks.d.ts.map +1 -0
- package/dist/types/markdown/plugin-tex.d.ts +3 -0
- package/dist/types/markdown/plugin-tex.d.ts.map +1 -0
- package/dist/types/markdown/plugin-toc.d.ts +18 -0
- package/dist/types/markdown/plugin-toc.d.ts.map +1 -0
- package/dist/types/normalize.d.ts +3 -0
- package/dist/types/normalize.d.ts.map +1 -0
- package/dist/types/preview/pane.d.ts +9 -0
- package/dist/types/preview/pane.d.ts.map +1 -0
- package/dist/types/preview/post-render.d.ts +19 -0
- package/dist/types/preview/post-render.d.ts.map +1 -0
- package/dist/types/preview/sync-scroll.d.ts +13 -0
- package/dist/types/preview/sync-scroll.d.ts.map +1 -0
- package/dist/types/preview/toc.d.ts +15 -0
- package/dist/types/preview/toc.d.ts.map +1 -0
- package/dist/types/render-to.d.ts +3 -0
- package/dist/types/render-to.d.ts.map +1 -0
- package/dist/types/toolbar/handlers.d.ts +4 -0
- package/dist/types/toolbar/handlers.d.ts.map +1 -0
- package/dist/types/toolbar/icons.d.ts +5 -0
- package/dist/types/toolbar/icons.d.ts.map +1 -0
- package/dist/types/toolbar/modes.d.ts +20 -0
- package/dist/types/toolbar/modes.d.ts.map +1 -0
- package/dist/types/toolbar/toolbar.d.ts +16 -0
- package/dist/types/toolbar/toolbar.d.ts.map +1 -0
- package/dist/types/types/common.d.ts +7 -0
- package/dist/types/types/common.d.ts.map +1 -0
- package/dist/types/types/events.d.ts +38 -0
- package/dist/types/types/events.d.ts.map +1 -0
- package/dist/types/types/lang.d.ts +95 -0
- package/dist/types/types/lang.d.ts.map +1 -0
- package/dist/types/types/settings.d.ts +171 -0
- package/dist/types/types/settings.d.ts.map +1 -0
- package/dist/umd/index.umd.cjs +96 -0
- package/package.json +69 -3
- package/README.md +0 -3
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@codemirror+legacy-modes@6.5.5/node_modules/@codemirror/legacy-modes/mode/textile.js
|
|
2
|
+
var e = {
|
|
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 t(e, t) {
|
|
36
|
+
t.mode = u.newLayout, t.tableHeading = !1, t.layoutType === "definitionList" && t.spanningLayout && e.match(l("definitionListEnd"), !1) && (t.spanningLayout = !1);
|
|
37
|
+
}
|
|
38
|
+
function n(t, n, a) {
|
|
39
|
+
if (a === "_") return t.eat("_") ? r(t, n, "italic", /__/, 2) : r(t, n, "em", /_/, 1);
|
|
40
|
+
if (a === "*") return t.eat("*") ? r(t, n, "bold", /\*\*/, 2) : r(t, n, "strong", /\*/, 1);
|
|
41
|
+
if (a === "[") return t.match(/\d+\]/) && (n.footCite = !0), i(n);
|
|
42
|
+
if (a === "(" && t.match(/^(r|tm|c)\)/)) return e.specialChar;
|
|
43
|
+
if (a === "<" && t.match(/(\w+)[^>]+>[^<]+<\/\1>/)) return e.html;
|
|
44
|
+
if (a === "?" && t.eat("?")) return r(t, n, "cite", /\?\?/, 2);
|
|
45
|
+
if (a === "=" && t.eat("=")) return r(t, n, "notextile", /==/, 2);
|
|
46
|
+
if (a === "-" && !t.eat("-")) return r(t, n, "deletion", /-/, 1);
|
|
47
|
+
if (a === "+") return r(t, n, "addition", /\+/, 1);
|
|
48
|
+
if (a === "~") return r(t, n, "sub", /~/, 1);
|
|
49
|
+
if (a === "^") return r(t, n, "sup", /\^/, 1);
|
|
50
|
+
if (a === "%") return r(t, n, "span", /%/, 1);
|
|
51
|
+
if (a === "@") return r(t, n, "code", /@/, 1);
|
|
52
|
+
if (a === "!") {
|
|
53
|
+
var o = r(t, n, "image", /(?:\([^\)]+\))?!/, 1);
|
|
54
|
+
return t.match(/^:\S+/), o;
|
|
55
|
+
}
|
|
56
|
+
return i(n);
|
|
57
|
+
}
|
|
58
|
+
function r(e, t, n, r, a) {
|
|
59
|
+
var o = e.pos > a ? e.string.charAt(e.pos - a - 1) : null, s = e.peek();
|
|
60
|
+
if (t[n]) {
|
|
61
|
+
if ((!s || /\W/.test(s)) && o && /\S/.test(o)) {
|
|
62
|
+
var c = i(t);
|
|
63
|
+
return t[n] = !1, c;
|
|
64
|
+
}
|
|
65
|
+
} else (!o || /\W/.test(o)) && s && /\S/.test(s) && e.match(RegExp("^.*\\S" + r.source + "(?:\\W|$)"), !1) && (t[n] = !0, t.mode = u.attributes);
|
|
66
|
+
return i(t);
|
|
67
|
+
}
|
|
68
|
+
function i(t) {
|
|
69
|
+
var n = a(t);
|
|
70
|
+
if (n) return n;
|
|
71
|
+
var r = [];
|
|
72
|
+
return t.layoutType && r.push(e[t.layoutType]), r = r.concat(o(t, "addition", "bold", "cite", "code", "deletion", "em", "footCite", "image", "italic", "link", "span", "strong", "sub", "sup", "table", "tableHeading")), t.layoutType === "header" && r.push(e.header + "-" + t.header), r.length ? r.join(" ") : null;
|
|
73
|
+
}
|
|
74
|
+
function a(t) {
|
|
75
|
+
var n = t.layoutType;
|
|
76
|
+
switch (n) {
|
|
77
|
+
case "notextile":
|
|
78
|
+
case "code":
|
|
79
|
+
case "pre": return e[n];
|
|
80
|
+
default: return t.notextile ? e.notextile + (n ? " " + e[n] : "") : null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function o(t) {
|
|
84
|
+
for (var n = [], r = 1; r < arguments.length; ++r) t[arguments[r]] && n.push(e[arguments[r]]);
|
|
85
|
+
return n;
|
|
86
|
+
}
|
|
87
|
+
function s(e) {
|
|
88
|
+
var t = e.spanningLayout, n = e.layoutType;
|
|
89
|
+
for (var r in e) e.hasOwnProperty(r) && delete e[r];
|
|
90
|
+
e.mode = u.newLayout, t && (e.layoutType = n, e.spanningLayout = !0);
|
|
91
|
+
}
|
|
92
|
+
var c = {
|
|
93
|
+
cache: {},
|
|
94
|
+
single: {
|
|
95
|
+
bc: "bc",
|
|
96
|
+
bq: "bq",
|
|
97
|
+
definitionList: /- .*?:=+/,
|
|
98
|
+
definitionListEnd: /.*=:\s*$/,
|
|
99
|
+
div: "div",
|
|
100
|
+
drawTable: /\|.*\|/,
|
|
101
|
+
foot: /fn\d+/,
|
|
102
|
+
header: /h[1-6]/,
|
|
103
|
+
html: /\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,
|
|
104
|
+
link: /[^"]+":\S/,
|
|
105
|
+
linkDefinition: /\[[^\s\]]+\]\S+/,
|
|
106
|
+
list: /(?:#+|\*+)/,
|
|
107
|
+
notextile: "notextile",
|
|
108
|
+
para: "p",
|
|
109
|
+
pre: "pre",
|
|
110
|
+
table: "table",
|
|
111
|
+
tableCellAttributes: /[\/\\]\d+/,
|
|
112
|
+
tableHeading: /\|_\./,
|
|
113
|
+
tableText: /[^"_\*\[\(\?\+~\^%@|-]+/,
|
|
114
|
+
text: /[^!"_=\*\[\(<\?\+~\^%@-]+/
|
|
115
|
+
},
|
|
116
|
+
attributes: {
|
|
117
|
+
align: /(?:<>|<|>|=)/,
|
|
118
|
+
selector: /\([^\(][^\)]+\)/,
|
|
119
|
+
lang: /\[[^\[\]]+\]/,
|
|
120
|
+
pad: /(?:\(+|\)+){1,2}/,
|
|
121
|
+
css: /\{[^\}]+\}/
|
|
122
|
+
},
|
|
123
|
+
createRe: function(e) {
|
|
124
|
+
switch (e) {
|
|
125
|
+
case "drawTable": return c.makeRe("^", c.single.drawTable, "$");
|
|
126
|
+
case "html": return c.makeRe("^", c.single.html, "(?:", c.single.html, ")*", "$");
|
|
127
|
+
case "linkDefinition": return c.makeRe("^", c.single.linkDefinition, "$");
|
|
128
|
+
case "listLayout": return c.makeRe("^", c.single.list, l("allAttributes"), "*\\s+");
|
|
129
|
+
case "tableCellAttributes": return c.makeRe("^", c.choiceRe(c.single.tableCellAttributes, l("allAttributes")), "+\\.");
|
|
130
|
+
case "type": return c.makeRe("^", l("allTypes"));
|
|
131
|
+
case "typeLayout": return c.makeRe("^", l("allTypes"), l("allAttributes"), "*\\.\\.?", "(\\s+|$)");
|
|
132
|
+
case "attributes": return c.makeRe("^", l("allAttributes"), "+");
|
|
133
|
+
case "allTypes": return c.choiceRe(c.single.div, c.single.foot, c.single.header, c.single.bc, c.single.bq, c.single.notextile, c.single.pre, c.single.table, c.single.para);
|
|
134
|
+
case "allAttributes": return c.choiceRe(c.attributes.selector, c.attributes.css, c.attributes.lang, c.attributes.align, c.attributes.pad);
|
|
135
|
+
default: return c.makeRe("^", c.single[e]);
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
makeRe: function() {
|
|
139
|
+
for (var e = "", t = 0; t < arguments.length; ++t) {
|
|
140
|
+
var n = arguments[t];
|
|
141
|
+
e += typeof n == "string" ? n : n.source;
|
|
142
|
+
}
|
|
143
|
+
return new RegExp(e);
|
|
144
|
+
},
|
|
145
|
+
choiceRe: function() {
|
|
146
|
+
for (var e = [arguments[0]], t = 1; t < arguments.length; ++t) e[t * 2 - 1] = "|", e[t * 2] = arguments[t];
|
|
147
|
+
return e.unshift("(?:"), e.push(")"), c.makeRe.apply(null, e);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
function l(e) {
|
|
151
|
+
return c.cache[e] || (c.cache[e] = c.createRe(e));
|
|
152
|
+
}
|
|
153
|
+
var u = {
|
|
154
|
+
newLayout: function(e, t) {
|
|
155
|
+
if (e.match(l("typeLayout"), !1)) return t.spanningLayout = !1, (t.mode = u.blockType)(e, t);
|
|
156
|
+
var n;
|
|
157
|
+
return a(t) || (e.match(l("listLayout"), !1) ? n = u.list : e.match(l("drawTable"), !1) ? n = u.table : e.match(l("linkDefinition"), !1) ? n = u.linkDefinition : e.match(l("definitionList")) ? n = u.definitionList : e.match(l("html"), !1) && (n = u.html)), (t.mode = n || u.text)(e, t);
|
|
158
|
+
},
|
|
159
|
+
blockType: function(e, t) {
|
|
160
|
+
var n, r;
|
|
161
|
+
if (t.layoutType = null, n = e.match(l("type"))) r = n[0];
|
|
162
|
+
else return (t.mode = u.text)(e, t);
|
|
163
|
+
return (n = r.match(l("header"))) ? (t.layoutType = "header", t.header = parseInt(n[0][1])) : r.match(l("bq")) ? t.layoutType = "quote" : r.match(l("bc")) ? t.layoutType = "code" : r.match(l("foot")) ? t.layoutType = "footnote" : r.match(l("notextile")) ? t.layoutType = "notextile" : r.match(l("pre")) ? t.layoutType = "pre" : r.match(l("div")) ? t.layoutType = "div" : r.match(l("table")) && (t.layoutType = "table"), t.mode = u.attributes, i(t);
|
|
164
|
+
},
|
|
165
|
+
text: function(e, t) {
|
|
166
|
+
if (e.match(l("text"))) return i(t);
|
|
167
|
+
var r = e.next();
|
|
168
|
+
return r === "\"" ? (t.mode = u.link)(e, t) : n(e, t, r);
|
|
169
|
+
},
|
|
170
|
+
attributes: function(t, n) {
|
|
171
|
+
return n.mode = u.layoutLength, t.match(l("attributes")) ? e.attributes : i(n);
|
|
172
|
+
},
|
|
173
|
+
layoutLength: function(e, t) {
|
|
174
|
+
return e.eat(".") && e.eat(".") && (t.spanningLayout = !0), t.mode = u.text, i(t);
|
|
175
|
+
},
|
|
176
|
+
list: function(e, t) {
|
|
177
|
+
t.listDepth = e.match(l("list"))[0].length;
|
|
178
|
+
var n = (t.listDepth - 1) % 3;
|
|
179
|
+
return t.layoutType = n ? n === 1 ? "list2" : "list3" : "list1", t.mode = u.attributes, i(t);
|
|
180
|
+
},
|
|
181
|
+
link: function(t, n) {
|
|
182
|
+
return n.mode = u.text, t.match(l("link")) ? (t.match(/\S+/), e.link) : i(n);
|
|
183
|
+
},
|
|
184
|
+
linkDefinition: function(t) {
|
|
185
|
+
return t.skipToEnd(), e.linkDefinition;
|
|
186
|
+
},
|
|
187
|
+
definitionList: function(e, t) {
|
|
188
|
+
return e.match(l("definitionList")), t.layoutType = "definitionList", e.match(/\s*$/) ? t.spanningLayout = !0 : t.mode = u.attributes, i(t);
|
|
189
|
+
},
|
|
190
|
+
html: function(t) {
|
|
191
|
+
return t.skipToEnd(), e.html;
|
|
192
|
+
},
|
|
193
|
+
table: function(e, t) {
|
|
194
|
+
return t.layoutType = "table", (t.mode = u.tableCell)(e, t);
|
|
195
|
+
},
|
|
196
|
+
tableCell: function(e, t) {
|
|
197
|
+
return e.match(l("tableHeading")) ? t.tableHeading = !0 : e.eat("|"), t.mode = u.tableCellAttributes, i(t);
|
|
198
|
+
},
|
|
199
|
+
tableCellAttributes: function(t, n) {
|
|
200
|
+
return n.mode = u.tableText, t.match(l("tableCellAttributes")) ? e.attributes : i(n);
|
|
201
|
+
},
|
|
202
|
+
tableText: function(e, t) {
|
|
203
|
+
return e.match(l("tableText")) ? i(t) : e.peek() === "|" ? (t.mode = u.tableCell, i(t)) : n(e, t, e.next());
|
|
204
|
+
}
|
|
205
|
+
}, d = {
|
|
206
|
+
name: "textile",
|
|
207
|
+
startState: function() {
|
|
208
|
+
return { mode: u.newLayout };
|
|
209
|
+
},
|
|
210
|
+
token: function(e, n) {
|
|
211
|
+
return e.sol() && t(e, n), n.mode(e, n);
|
|
212
|
+
},
|
|
213
|
+
blankLine: s
|
|
214
|
+
};
|
|
215
|
+
export { d as textile };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@codemirror+legacy-modes@6.5.5/node_modules/@codemirror/legacy-modes/mode/tiddlywiki.js
|
|
2
|
+
var e = {}, t = {
|
|
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
|
+
}, n = /[\w_\-]/i, r = /^\-\-\-\-+$/, i = /^\/\*\*\*$/, a = /^\*\*\*\/$/, o = /^<<<$/, s = /^\/\/\{\{\{$/, c = /^\/\/\}\}\}$/, l = /^<!--\{\{\{-->$/, u = /^<!--\}\}\}-->$/, d = /^\{\{\{$/, f = /^\}\}\}$/, p = /.*?\}\}\}/;
|
|
24
|
+
function m(e, t, n) {
|
|
25
|
+
return t.tokenize = n, n(e, t);
|
|
26
|
+
}
|
|
27
|
+
function h(t, f) {
|
|
28
|
+
var p = t.sol(), h = t.peek();
|
|
29
|
+
if (f.block = !1, p && /[<\/\*{}\-]/.test(h)) {
|
|
30
|
+
if (t.match(d)) return f.block = !0, m(t, f, v);
|
|
31
|
+
if (t.match(o)) return "quote";
|
|
32
|
+
if (t.match(i) || t.match(a) || t.match(s) || t.match(c) || t.match(l) || t.match(u)) return "comment";
|
|
33
|
+
if (t.match(r)) return "contentSeparator";
|
|
34
|
+
}
|
|
35
|
+
if (t.next(), p && /[\/\*!#;:>|]/.test(h)) {
|
|
36
|
+
if (h == "!") return t.skipToEnd(), "header";
|
|
37
|
+
if (h == "*") return t.eatWhile("*"), "comment";
|
|
38
|
+
if (h == "#") return t.eatWhile("#"), "comment";
|
|
39
|
+
if (h == ";") return t.eatWhile(";"), "comment";
|
|
40
|
+
if (h == ":") return t.eatWhile(":"), "comment";
|
|
41
|
+
if (h == ">") return t.eatWhile(">"), "quote";
|
|
42
|
+
if (h == "|") return "header";
|
|
43
|
+
}
|
|
44
|
+
if (h == "{" && t.match("{{")) return m(t, f, v);
|
|
45
|
+
if (/[hf]/i.test(h) && /[ti]/i.test(t.peek()) && t.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i)) return "link";
|
|
46
|
+
if (h == "\"") return "string";
|
|
47
|
+
if (h == "~" || /[\[\]]/.test(h) && t.match(h)) return "brace";
|
|
48
|
+
if (h == "@") return t.eatWhile(n), "link";
|
|
49
|
+
if (/\d/.test(h)) return t.eatWhile(/\d/), "number";
|
|
50
|
+
if (h == "/") {
|
|
51
|
+
if (t.eat("%")) return m(t, f, g);
|
|
52
|
+
if (t.eat("/")) return m(t, f, y);
|
|
53
|
+
}
|
|
54
|
+
if (h == "_" && t.eat("_")) return m(t, f, b);
|
|
55
|
+
if (h == "-" && t.eat("-")) {
|
|
56
|
+
if (t.peek() != " ") return m(t, f, x);
|
|
57
|
+
if (t.peek() == " ") return "brace";
|
|
58
|
+
}
|
|
59
|
+
return h == "'" && t.eat("'") ? m(t, f, _) : h == "<" && t.eat("<") ? m(t, f, S) : (t.eatWhile(/[\w\$_]/), e.propertyIsEnumerable(t.current()) ? "keyword" : null);
|
|
60
|
+
}
|
|
61
|
+
function g(e, t) {
|
|
62
|
+
for (var n = !1, r; r = e.next();) {
|
|
63
|
+
if (r == "/" && n) {
|
|
64
|
+
t.tokenize = h;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
n = r == "%";
|
|
68
|
+
}
|
|
69
|
+
return "comment";
|
|
70
|
+
}
|
|
71
|
+
function _(e, t) {
|
|
72
|
+
for (var n = !1, r; r = e.next();) {
|
|
73
|
+
if (r == "'" && n) {
|
|
74
|
+
t.tokenize = h;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
n = r == "'";
|
|
78
|
+
}
|
|
79
|
+
return "strong";
|
|
80
|
+
}
|
|
81
|
+
function v(e, t) {
|
|
82
|
+
var n = t.block;
|
|
83
|
+
return n && e.current() ? "comment" : !n && e.match(p) || n && e.sol() && e.match(f) ? (t.tokenize = h, "comment") : (e.next(), "comment");
|
|
84
|
+
}
|
|
85
|
+
function y(e, t) {
|
|
86
|
+
for (var n = !1, r; r = e.next();) {
|
|
87
|
+
if (r == "/" && n) {
|
|
88
|
+
t.tokenize = h;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
n = r == "/";
|
|
92
|
+
}
|
|
93
|
+
return "emphasis";
|
|
94
|
+
}
|
|
95
|
+
function b(e, t) {
|
|
96
|
+
for (var n = !1, r; r = e.next();) {
|
|
97
|
+
if (r == "_" && n) {
|
|
98
|
+
t.tokenize = h;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
n = r == "_";
|
|
102
|
+
}
|
|
103
|
+
return "link";
|
|
104
|
+
}
|
|
105
|
+
function x(e, t) {
|
|
106
|
+
for (var n = !1, r; r = e.next();) {
|
|
107
|
+
if (r == "-" && n) {
|
|
108
|
+
t.tokenize = h;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
n = r == "-";
|
|
112
|
+
}
|
|
113
|
+
return "deleted";
|
|
114
|
+
}
|
|
115
|
+
function S(e, n) {
|
|
116
|
+
if (e.current() == "<<") return "meta";
|
|
117
|
+
var r = e.next();
|
|
118
|
+
return r ? r == ">" && e.peek() == ">" ? (e.next(), n.tokenize = h, "meta") : (e.eatWhile(/[\w\$_]/), t.propertyIsEnumerable(e.current()) ? "keyword" : null) : (n.tokenize = h, null);
|
|
119
|
+
}
|
|
120
|
+
var C = {
|
|
121
|
+
name: "tiddlywiki",
|
|
122
|
+
startState: function() {
|
|
123
|
+
return { tokenize: h };
|
|
124
|
+
},
|
|
125
|
+
token: function(e, t) {
|
|
126
|
+
return e.eatSpace() ? null : t.tokenize(e, t);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
export { C as tiddlyWiki };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@codemirror+legacy-modes@6.5.5/node_modules/@codemirror/legacy-modes/mode/tiki.js
|
|
2
|
+
function e(e, t, r) {
|
|
3
|
+
return function(i, a) {
|
|
4
|
+
for (; !i.eol();) {
|
|
5
|
+
if (i.match(t)) {
|
|
6
|
+
a.tokenize = n;
|
|
7
|
+
break;
|
|
8
|
+
}
|
|
9
|
+
i.next();
|
|
10
|
+
}
|
|
11
|
+
return r && (a.tokenize = r), e;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function t(e) {
|
|
15
|
+
return function(t, r) {
|
|
16
|
+
for (; !t.eol();) t.next();
|
|
17
|
+
return r.tokenize = n, e;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function n(r, i) {
|
|
21
|
+
function o(e) {
|
|
22
|
+
return i.tokenize = e, e(r, i);
|
|
23
|
+
}
|
|
24
|
+
var s = r.sol(), c = r.next();
|
|
25
|
+
switch (c) {
|
|
26
|
+
case "{": return r.eat("/"), r.eatSpace(), r.eatWhile(/[^\s\u00a0=\"\'\/?(}]/), i.tokenize = a, "tag";
|
|
27
|
+
case "_":
|
|
28
|
+
if (r.eat("_")) return o(e("strong", "__", n));
|
|
29
|
+
break;
|
|
30
|
+
case "'":
|
|
31
|
+
if (r.eat("'")) return o(e("em", "''", n));
|
|
32
|
+
break;
|
|
33
|
+
case "(":
|
|
34
|
+
if (r.eat("(")) return o(e("link", "))", n));
|
|
35
|
+
break;
|
|
36
|
+
case "[": return o(e("url", "]", n));
|
|
37
|
+
case "|":
|
|
38
|
+
if (r.eat("|")) return o(e("comment", "||"));
|
|
39
|
+
break;
|
|
40
|
+
case "-":
|
|
41
|
+
if (r.eat("=")) return o(e("header string", "=-", n));
|
|
42
|
+
if (r.eat("-")) return o(e("error tw-deleted", "--", n));
|
|
43
|
+
break;
|
|
44
|
+
case "=":
|
|
45
|
+
if (r.match("==")) return o(e("tw-underline", "===", n));
|
|
46
|
+
break;
|
|
47
|
+
case ":":
|
|
48
|
+
if (r.eat(":")) return o(e("comment", "::"));
|
|
49
|
+
break;
|
|
50
|
+
case "^": return o(e("tw-box", "^"));
|
|
51
|
+
case "~": if (r.match("np~")) return o(e("meta", "~/np~"));
|
|
52
|
+
}
|
|
53
|
+
if (s) switch (c) {
|
|
54
|
+
case "!": return r.match("!!!!!") || r.match("!!!!") || r.match("!!!") || r.match("!!"), o(t("header string"));
|
|
55
|
+
case "*":
|
|
56
|
+
case "#":
|
|
57
|
+
case "+": return o(t("tw-listitem bracket"));
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
var r, i;
|
|
62
|
+
function a(e, t) {
|
|
63
|
+
var r = e.next(), a = e.peek();
|
|
64
|
+
return r == "}" ? (t.tokenize = n, "tag") : r == "(" || r == ")" ? "bracket" : r == "=" ? (i = "equals", a == ">" && (e.next(), a = e.peek()), /[\'\"]/.test(a) || (t.tokenize = s()), "operator") : /[\'\"]/.test(r) ? (t.tokenize = o(r), t.tokenize(e, t)) : (e.eatWhile(/[^\s\u00a0=\"\'\/?]/), "keyword");
|
|
65
|
+
}
|
|
66
|
+
function o(e) {
|
|
67
|
+
return function(t, n) {
|
|
68
|
+
for (; !t.eol();) if (t.next() == e) {
|
|
69
|
+
n.tokenize = a;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
return "string";
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function s() {
|
|
76
|
+
return function(e, t) {
|
|
77
|
+
for (; !e.eol();) {
|
|
78
|
+
var n = e.next(), r = e.peek();
|
|
79
|
+
if (n == " " || n == "," || /[ )}]/.test(r)) {
|
|
80
|
+
t.tokenize = a;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return "string";
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
var c, l;
|
|
88
|
+
function u() {
|
|
89
|
+
for (var e = arguments.length - 1; e >= 0; e--) c.cc.push(arguments[e]);
|
|
90
|
+
}
|
|
91
|
+
function d() {
|
|
92
|
+
return u.apply(null, arguments), !0;
|
|
93
|
+
}
|
|
94
|
+
function f(e, t) {
|
|
95
|
+
var n = c.context && c.context.noIndent;
|
|
96
|
+
c.context = {
|
|
97
|
+
prev: c.context,
|
|
98
|
+
pluginName: e,
|
|
99
|
+
indent: c.indented,
|
|
100
|
+
startOfLine: t,
|
|
101
|
+
noIndent: n
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function p() {
|
|
105
|
+
c.context && (c.context = c.context.prev);
|
|
106
|
+
}
|
|
107
|
+
function m(e) {
|
|
108
|
+
if (e == "openPlugin") return c.pluginName = r, d(_, h(c.startOfLine));
|
|
109
|
+
if (e == "closePlugin") {
|
|
110
|
+
var t = !1;
|
|
111
|
+
return c.context ? (t = c.context.pluginName != r, p()) : t = !0, t && (l = "error"), d(g(t));
|
|
112
|
+
}
|
|
113
|
+
return e == "string" && (c.context && c.context.name == "!cdata" || f("!cdata"), c.tokenize == n && p()), d();
|
|
114
|
+
}
|
|
115
|
+
function h(e) {
|
|
116
|
+
return function(t) {
|
|
117
|
+
return t == "selfclosePlugin" || t == "endPlugin" || t == "endPlugin" && f(c.pluginName, e), d();
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function g(e) {
|
|
121
|
+
return function(t) {
|
|
122
|
+
return e && (l = "error"), t == "endPlugin" ? d() : u();
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function _(e) {
|
|
126
|
+
return e == "keyword" ? (l = "attribute", d(_)) : e == "equals" ? d(v, _) : u();
|
|
127
|
+
}
|
|
128
|
+
function v(e) {
|
|
129
|
+
return e == "keyword" ? (l = "string", d()) : e == "string" ? d(y) : u();
|
|
130
|
+
}
|
|
131
|
+
function y(e) {
|
|
132
|
+
return e == "string" ? d(y) : u();
|
|
133
|
+
}
|
|
134
|
+
var b = {
|
|
135
|
+
name: "tiki",
|
|
136
|
+
startState: function() {
|
|
137
|
+
return {
|
|
138
|
+
tokenize: n,
|
|
139
|
+
cc: [],
|
|
140
|
+
indented: 0,
|
|
141
|
+
startOfLine: !0,
|
|
142
|
+
pluginName: null,
|
|
143
|
+
context: null
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
token: function(e, t) {
|
|
147
|
+
if (e.sol() && (t.startOfLine = !0, t.indented = e.indentation()), e.eatSpace()) return null;
|
|
148
|
+
l = i = r = null;
|
|
149
|
+
var n = t.tokenize(e, t);
|
|
150
|
+
if ((n || i) && n != "comment") for (c = t; !(t.cc.pop() || m)(i || n););
|
|
151
|
+
return t.startOfLine = !1, l || n;
|
|
152
|
+
},
|
|
153
|
+
indent: function(e, t, n) {
|
|
154
|
+
var r = e.context;
|
|
155
|
+
if (r && r.noIndent) return 0;
|
|
156
|
+
for (r && /^{\//.test(t) && (r = r.prev); r && !r.startOfLine;) r = r.prev;
|
|
157
|
+
return r ? r.indent + n.unit : 0;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
export { b as tiki };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@codemirror+legacy-modes@6.5.5/node_modules/@codemirror/legacy-modes/mode/toml.js
|
|
2
|
+
var e = {
|
|
3
|
+
name: "toml",
|
|
4
|
+
startState: function() {
|
|
5
|
+
return {
|
|
6
|
+
inString: !1,
|
|
7
|
+
stringType: "",
|
|
8
|
+
lhs: !0,
|
|
9
|
+
inArray: 0
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
token: function(e, t) {
|
|
13
|
+
let n;
|
|
14
|
+
if (!t.inString && (n = e.match(/^('''|"""|'|")/)) && (t.stringType = n[0], t.inString = !0), e.sol() && !t.inString && t.inArray === 0 && (t.lhs = !0), t.inString) {
|
|
15
|
+
for (; t.inString;) if (e.match(t.stringType)) t.inString = !1;
|
|
16
|
+
else if (e.peek() === "\\") e.next(), e.next();
|
|
17
|
+
else if (e.eol()) break;
|
|
18
|
+
else e.match(/^.[^\\\"\']*/);
|
|
19
|
+
return t.lhs ? "property" : "string";
|
|
20
|
+
}
|
|
21
|
+
return t.inArray && e.peek() === "]" ? (e.next(), t.inArray--, "bracket") : t.lhs && e.peek() === "[" && e.skipTo("]") ? (e.next(), e.peek() === "]" && e.next(), "atom") : e.peek() === "#" ? (e.skipToEnd(), "comment") : e.eatSpace() ? null : t.lhs && e.eatWhile(function(e) {
|
|
22
|
+
return e != "=" && e != " ";
|
|
23
|
+
}) ? "property" : t.lhs && e.peek() === "=" ? (e.next(), t.lhs = !1, null) : !t.lhs && e.match(/^\d\d\d\d[\d\-\:\.T]*Z/) || !t.lhs && (e.match("true") || e.match("false")) ? "atom" : !t.lhs && e.peek() === "[" ? (t.inArray++, e.next(), "bracket") : !t.lhs && e.match(/^\-?\d+(?:\.\d+)?/) ? "number" : (e.eatSpace() || e.next(), null);
|
|
24
|
+
},
|
|
25
|
+
languageData: { commentTokens: { line: "#" } }
|
|
26
|
+
};
|
|
27
|
+
export { e as toml };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@codemirror+legacy-modes@6.5.5/node_modules/@codemirror/legacy-modes/mode/troff.js
|
|
2
|
+
var e = {};
|
|
3
|
+
function t(t) {
|
|
4
|
+
if (t.eatSpace()) return null;
|
|
5
|
+
var n = t.sol(), r = t.next();
|
|
6
|
+
if (r === "\\") return t.match("fB") || t.match("fR") || t.match("fI") || t.match("u") || t.match("d") || t.match("%") || t.match("&") ? "string" : t.match("m[") ? (t.skipTo("]"), t.next(), "string") : t.match("s+") || t.match("s-") ? (t.eatWhile(/[\d-]/), "string") : ((t.match("(") || t.match("*(")) && t.eatWhile(/[\w-]/), "string");
|
|
7
|
+
if (n && (r === "." || r === "'") && t.eat("\\") && t.eat("\"")) return t.skipToEnd(), "comment";
|
|
8
|
+
if (n && r === ".") {
|
|
9
|
+
if (t.match("B ") || t.match("I ") || t.match("R ")) return "attribute";
|
|
10
|
+
if (t.match("TH ") || t.match("SH ") || t.match("SS ") || t.match("HP ")) return t.skipToEnd(), "quote";
|
|
11
|
+
if (t.match(/[A-Z]/) && t.match(/[A-Z]/) || t.match(/[a-z]/) && t.match(/[a-z]/)) return "attribute";
|
|
12
|
+
}
|
|
13
|
+
t.eatWhile(/[\w-]/);
|
|
14
|
+
var i = t.current();
|
|
15
|
+
return e.hasOwnProperty(i) ? e[i] : null;
|
|
16
|
+
}
|
|
17
|
+
function n(e, n) {
|
|
18
|
+
return (n.tokens[0] || t)(e, n);
|
|
19
|
+
}
|
|
20
|
+
var r = {
|
|
21
|
+
name: "troff",
|
|
22
|
+
startState: function() {
|
|
23
|
+
return { tokens: [] };
|
|
24
|
+
},
|
|
25
|
+
token: function(e, t) {
|
|
26
|
+
return n(e, t);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export { r as troff };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@codemirror+legacy-modes@6.5.5/node_modules/@codemirror/legacy-modes/mode/ttcn.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
for (var t = {}, n = e.split(" "), r = 0; r < n.length; ++r) t[n[r]] = !0;
|
|
4
|
+
return t;
|
|
5
|
+
}
|
|
6
|
+
var t = {
|
|
7
|
+
name: "ttcn",
|
|
8
|
+
keywords: e("activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b"),
|
|
9
|
+
builtin: e("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int"),
|
|
10
|
+
types: e("anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer"),
|
|
11
|
+
timerOps: e("read running start stop timeout"),
|
|
12
|
+
portOps: e("call catch check clear getcall getreply halt raise receive reply send trigger"),
|
|
13
|
+
configOps: e("create connect disconnect done kill killed map unmap"),
|
|
14
|
+
verdictOps: e("getverdict setverdict"),
|
|
15
|
+
sutOps: e("action"),
|
|
16
|
+
functionOps: e("apply derefers refers"),
|
|
17
|
+
verdictConsts: e("error fail inconc none pass"),
|
|
18
|
+
booleanConsts: e("true false"),
|
|
19
|
+
otherConsts: e("null NULL omit"),
|
|
20
|
+
visibilityModifiers: e("private public friend"),
|
|
21
|
+
templateMatch: e("complement ifpresent subset superset permutation"),
|
|
22
|
+
multiLineStrings: !0
|
|
23
|
+
}, n = [];
|
|
24
|
+
function r(e) {
|
|
25
|
+
if (e) for (var t in e) e.hasOwnProperty(t) && n.push(t);
|
|
26
|
+
}
|
|
27
|
+
r(t.keywords), r(t.builtin), r(t.timerOps), r(t.portOps);
|
|
28
|
+
var i = t.keywords || {}, a = t.builtin || {}, o = t.timerOps || {}, s = t.portOps || {}, c = t.configOps || {}, l = t.verdictOps || {}, u = t.sutOps || {}, d = t.functionOps || {}, f = t.verdictConsts || {}, p = t.booleanConsts || {}, m = t.otherConsts || {}, h = t.types || {}, g = t.visibilityModifiers || {}, _ = t.templateMatch || {}, v = t.multiLineStrings, y = t.indentStatements !== !1, b = /[+\-*&@=<>!\/]/, x;
|
|
29
|
+
function S(e, t) {
|
|
30
|
+
var n = e.next();
|
|
31
|
+
if (n == "\"" || n == "'") return t.tokenize = C(n), t.tokenize(e, t);
|
|
32
|
+
if (/[\[\]{}\(\),;\\:\?\.]/.test(n)) return x = n, "punctuation";
|
|
33
|
+
if (n == "#") return e.skipToEnd(), "atom";
|
|
34
|
+
if (n == "%") return e.eatWhile(/\b/), "atom";
|
|
35
|
+
if (/\d/.test(n)) return e.eatWhile(/[\w\.]/), "number";
|
|
36
|
+
if (n == "/") {
|
|
37
|
+
if (e.eat("*")) return t.tokenize = w, w(e, t);
|
|
38
|
+
if (e.eat("/")) return e.skipToEnd(), "comment";
|
|
39
|
+
}
|
|
40
|
+
if (b.test(n)) return n == "@" && (e.match("try") || e.match("catch") || e.match("lazy")) ? "keyword" : (e.eatWhile(b), "operator");
|
|
41
|
+
e.eatWhile(/[\w\$_\xa1-\uffff]/);
|
|
42
|
+
var r = e.current();
|
|
43
|
+
return i.propertyIsEnumerable(r) ? "keyword" : a.propertyIsEnumerable(r) ? "builtin" : o.propertyIsEnumerable(r) || c.propertyIsEnumerable(r) || l.propertyIsEnumerable(r) || s.propertyIsEnumerable(r) || u.propertyIsEnumerable(r) || d.propertyIsEnumerable(r) ? "def" : f.propertyIsEnumerable(r) || p.propertyIsEnumerable(r) || m.propertyIsEnumerable(r) ? "string" : h.propertyIsEnumerable(r) ? "typeName.standard" : g.propertyIsEnumerable(r) ? "modifier" : _.propertyIsEnumerable(r) ? "atom" : "variable";
|
|
44
|
+
}
|
|
45
|
+
function C(e) {
|
|
46
|
+
return function(t, n) {
|
|
47
|
+
for (var r = !1, i, a = !1; (i = t.next()) != null;) {
|
|
48
|
+
if (i == e && !r) {
|
|
49
|
+
var o = t.peek();
|
|
50
|
+
o && (o = o.toLowerCase(), (o == "b" || o == "h" || o == "o") && t.next()), a = !0;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
r = !r && i == "\\";
|
|
54
|
+
}
|
|
55
|
+
return (a || !(r || v)) && (n.tokenize = null), "string";
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function w(e, t) {
|
|
59
|
+
for (var n = !1, r; r = e.next();) {
|
|
60
|
+
if (r == "/" && n) {
|
|
61
|
+
t.tokenize = null;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
n = r == "*";
|
|
65
|
+
}
|
|
66
|
+
return "comment";
|
|
67
|
+
}
|
|
68
|
+
function T(e, t, n, r, i) {
|
|
69
|
+
this.indented = e, this.column = t, this.type = n, this.align = r, this.prev = i;
|
|
70
|
+
}
|
|
71
|
+
function E(e, t, n) {
|
|
72
|
+
var r = e.indented;
|
|
73
|
+
return e.context && e.context.type == "statement" && (r = e.context.indented), e.context = new T(r, t, n, null, e.context);
|
|
74
|
+
}
|
|
75
|
+
function D(e) {
|
|
76
|
+
var t = e.context.type;
|
|
77
|
+
return (t == ")" || t == "]" || t == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
|
|
78
|
+
}
|
|
79
|
+
var O = {
|
|
80
|
+
name: "ttcn",
|
|
81
|
+
startState: function() {
|
|
82
|
+
return {
|
|
83
|
+
tokenize: null,
|
|
84
|
+
context: new T(0, 0, "top", !1),
|
|
85
|
+
indented: 0,
|
|
86
|
+
startOfLine: !0
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
token: function(e, t) {
|
|
90
|
+
var n = t.context;
|
|
91
|
+
if (e.sol() && (n.align ?? (n.align = !1), t.indented = e.indentation(), t.startOfLine = !0), e.eatSpace()) return null;
|
|
92
|
+
x = null;
|
|
93
|
+
var r = (t.tokenize || S)(e, t);
|
|
94
|
+
if (r == "comment") return r;
|
|
95
|
+
if (n.align ?? (n.align = !0), (x == ";" || x == ":" || x == ",") && n.type == "statement") D(t);
|
|
96
|
+
else if (x == "{") E(t, e.column(), "}");
|
|
97
|
+
else if (x == "[") E(t, e.column(), "]");
|
|
98
|
+
else if (x == "(") E(t, e.column(), ")");
|
|
99
|
+
else if (x == "}") {
|
|
100
|
+
for (; n.type == "statement";) n = D(t);
|
|
101
|
+
for (n.type == "}" && (n = D(t)); n.type == "statement";) n = D(t);
|
|
102
|
+
} else x == n.type ? D(t) : y && ((n.type == "}" || n.type == "top") && x != ";" || n.type == "statement" && x == "newstatement") && E(t, e.column(), "statement");
|
|
103
|
+
return t.startOfLine = !1, r;
|
|
104
|
+
},
|
|
105
|
+
languageData: {
|
|
106
|
+
indentOnInput: /^\s*[{}]$/,
|
|
107
|
+
commentTokens: {
|
|
108
|
+
line: "//",
|
|
109
|
+
block: {
|
|
110
|
+
open: "/*",
|
|
111
|
+
close: "*/"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
autocomplete: n
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
export { O as ttcn };
|