@aiao/code-editor-vue 0.0.9 → 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.
- package/dist/index.js +128 -2
- package/package.json +4 -4
- package/dist/apl-B2DGVGxc-Dd6D39pP.js +0 -76
- package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +0 -34
- package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +0 -95
- package/dist/asterisk-DS281yxp-B5eTWk_B.js +0 -271
- package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +0 -34
- package/dist/clike-BMALKCNj-Ck7Gc35_.js +0 -620
- package/dist/clojure-CCKyeQKf-N9sg777Z.js +0 -800
- package/dist/cmake-CuaCgAKt-BbEgXraO.js +0 -28
- package/dist/cobol-BlTKFDRj-CHCoWafp.js +0 -72
- package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +0 -179
- package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +0 -75
- package/dist/crystal-D309uH6_-DS6LrXoE.js +0 -217
- package/dist/css-BkF-NPzE-DiJu9Nkd.js +0 -1553
- package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +0 -68
- package/dist/d-BZcgY6La-KCW6-bIm.js +0 -127
- package/dist/diff-Cg9d_RX2-C01qBVFc.js +0 -18
- package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +0 -194
- package/dist/dtd-CtLokQ-U-DCbNdeIA.js +0 -84
- package/dist/dylan-QYeExnWK-DIUVpsct.js +0 -234
- package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +0 -78
- package/dist/ecl-CiXN-g_D-DOI-W0if.js +0 -121
- package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +0 -110
- package/dist/elm-CNT9vbN0-BcYlydpO.js +0 -108
- package/dist/erlang-CFOYdy9e-DULXsFZl.js +0 -487
- package/dist/factor-Clf6BoVk-DBb2EHMF.js +0 -65
- package/dist/fcl-CPC2WYrI-CuXG3fcK.js +0 -103
- package/dist/forth-BmxRyE9S-BcFwWpeL.js +0 -60
- package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +0 -442
- package/dist/gas-cpmYfFX2-sZgGhMxB.js +0 -183
- package/dist/gherkin-CJuwpceU-BRrr8yjO.js +0 -34
- package/dist/groovy-DZeT_VM--CmF8wcSo.js +0 -146
- package/dist/haskell-CxiO_7JL-BuULsXvv.js +0 -375
- package/dist/haxe-70NVW1pR-CM27SfgM.js +0 -359
- package/dist/http-D9LttvKF-j9E8oQ7o.js +0 -44
- package/dist/idl-B6TRFYjl-B6TRFYjl.js +0 -947
- package/dist/index-4oLq9F9B-Bwzqzq-7.js +0 -944
- package/dist/index-9NH8hlZ--BIK1-_7Y.js +0 -342
- package/dist/index-BFXNCCbG-Dn1DmTkR.js +0 -253
- package/dist/index-BLHYcXXK-D3jw64Ia.js +0 -101
- package/dist/index-BQU3Rb2C-BhijiYjz.js +0 -290
- package/dist/index-Bg18ePld-CYeapYL7.js +0 -157
- package/dist/index-Bp5lqnbN-BoMgXRma.js +0 -555
- package/dist/index-Bqzq8A1N-PdN6VK36.js +0 -59
- package/dist/index-Bx-s4g99-DYf1g6JD.js +0 -76
- package/dist/index-BxX25QmV-DN1ZGFmt.js +0 -248
- package/dist/index-CFCzgc33-DE9rG3W6.js +0 -1917
- package/dist/index-CL7JTU9M-4NGEQoO4.js +0 -136
- package/dist/index-CipmEceX-CFTPqpKk.js +0 -74
- package/dist/index-Cv4vvpa2-BukCrc2X.js +0 -1305
- package/dist/index-D4hhdPbZ-DdhnEv3l.js +0 -6152
- package/dist/index-DhNQ8g9I-CVe0AfsL.js +0 -270
- package/dist/index-DiRkPt_L.js +0 -37449
- package/dist/index-Djp53tAP-D0DXRMTU.js +0 -94
- package/dist/index-KlsAFhIj-eocEKyjX.js +0 -566
- package/dist/index-OntZqtu6-D0l05YUl.js +0 -305
- package/dist/index-PGnZjMCR-CmhlYKb5.js +0 -301
- package/dist/index-TyYoYgss-C-LVSkzX.js +0 -613
- package/dist/index-oMSPmlXA-CBTT7XSR.js +0 -960
- package/dist/index-rQC6Gbk0-Cj-ZtGkV.js +0 -138
- package/dist/javascript-DOuB9oqA-BxiygWgm.js +0 -691
- package/dist/julia-DpvXAuO6-Bk_IfD8X.js +0 -241
- package/dist/livescript-CanGTf8u-Cx6PrvS4.js +0 -272
- package/dist/lua-XplVlWi_-8f8obHzY.js +0 -217
- package/dist/mathematica-jaRHnSxC-B83gQsL2.js +0 -35
- package/dist/mbox-BctzC1hL-Hg5U2B4l.js +0 -76
- package/dist/mirc-CFBPAOaF-CfzSSk9W.js +0 -72
- package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +0 -272
- package/dist/modelica-vUgVs--1-BObVpYBg.js +0 -93
- package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +0 -104
- package/dist/mumps-CQoS1kWX-CkTUOQnt.js +0 -25
- package/dist/nginx-zDPm3Z74-DJk4KP7N.js +0 -87
- package/dist/nsis-BCLyjY7m-C2MffOQ3.js +0 -62
- package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +0 -79
- package/dist/octave-C8PmmSRH-DM5vTWlU.js +0 -143
- package/dist/oz-Ce8aN8oE-BcJM4SVy.js +0 -151
- package/dist/pascal-De0D6mP7-D7DGFFKL.js +0 -77
- package/dist/perl-B4bSCe1C-6aIa2glS.js +0 -915
- package/dist/pig-D24Z8EXi-BD-qt5FU.js +0 -54
- package/dist/powershell-DkYVfTzP-Blt1Rodi.js +0 -249
- package/dist/properties-Dn9wna3M-EOOwnCnk.js +0 -26
- package/dist/protobuf-BPIjwpzm-DAButU8_.js +0 -49
- package/dist/pug-TGXr6c5j-C9HfQ86E.js +0 -248
- package/dist/puppet-nyd4dhjf-CGzH5dsa.js +0 -45
- package/dist/python-BkR3uSy8-CjDnyp3B.js +0 -313
- package/dist/q-DyHZGnqm-DGuqeH_T.js +0 -86
- package/dist/r-LKEuhEGI-BFQhJnTP.js +0 -104
- package/dist/rpm-IznJm2Xc-CbZqrWCM.js +0 -57
- package/dist/ruby-CcYfvIk6-DzPSfSGo.js +0 -228
- package/dist/sas-7E8yHoCW-D726Uzkw.js +0 -105
- package/dist/scheme-DjibxsNh-Bp5gVFkm.js +0 -124
- package/dist/shell-C0C2sNA_-BTeYg6ir.js +0 -182
- package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +0 -72
- package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +0 -89
- package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +0 -48
- package/dist/solr-BNlsLglM-BM2OpfTI.js +0 -41
- package/dist/sparql-FarWu_Gb-FN_uQNd4.js +0 -197
- package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +0 -49
- package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +0 -278
- package/dist/stex-Du4h4KAU-QOov_zHj.js +0 -129
- package/dist/stylus-CAdqWld3-BcRBbBxD.js +0 -250
- package/dist/swift-DSxqR9R6-2Hz4NOoF.js +0 -230
- package/dist/tcl-xfoLljhY-DAZBRGQI.js +0 -81
- package/dist/textile-D1AWE-pc-DuiIfEnb.js +0 -295
- package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +0 -155
- package/dist/tiki-__Kn3CeS-CWcR9ib_.js +0 -181
- package/dist/toml-DWAmxCjl-CyJoDzs6.js +0 -56
- package/dist/troff-D2UO-fKf-DVoIzS-O.js +0 -35
- package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +0 -123
- package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +0 -88
- package/dist/turtle-xwJUxoPV-fs94wdNM.js +0 -80
- package/dist/vb-c2kQGd6--DU726qF0.js +0 -74
- package/dist/vbscript-1f_Dhg5H-DriA32xD.js +0 -324
- package/dist/velocity-DJd0pTTC-BG368IR6.js +0 -96
- package/dist/verilog-CiS1jyi5-giQA8J-e.js +0 -259
- package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +0 -106
- package/dist/webidl-CjfDENEo-BM8KXKJ5.js +0 -155
- package/dist/xquery-Ct6lEb4B-C5KDc61l.js +0 -422
- package/dist/yacas-C0absKBh-B82QJ76F.js +0 -73
- package/dist/z80-Pki2zAjW-B0IQoIbR.js +0 -61
package/dist/index.js
CHANGED
|
@@ -1,4 +1,130 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent as P, ref as B, onMounted as q, onUnmounted as A, watch as i, createElementBlock as D, openBlock as G } from "vue";
|
|
2
|
+
import { SUPPORT_LANGUAGES as N } from "@aiao/code-editor";
|
|
3
|
+
import { indentWithTab as O } from "@codemirror/commands";
|
|
4
|
+
import { indentUnit as H, LanguageDescription as I } from "@codemirror/language";
|
|
5
|
+
import { Compartment as o, EditorState as L } from "@codemirror/state";
|
|
6
|
+
import { oneDark as M } from "@codemirror/theme-one-dark";
|
|
7
|
+
import { EditorView as l, placeholder as V, keymap as j, highlightWhitespace as z } from "@codemirror/view";
|
|
8
|
+
import { basicSetup as F, minimalSetup as J } from "codemirror";
|
|
9
|
+
const ne = /* @__PURE__ */ P({
|
|
10
|
+
__name: "CodeEditor",
|
|
11
|
+
props: {
|
|
12
|
+
value: { default: "" },
|
|
13
|
+
theme: { default: "light" },
|
|
14
|
+
language: { default: "sql" },
|
|
15
|
+
placeholder: { default: "" },
|
|
16
|
+
readonly: { type: Boolean, default: !1 },
|
|
17
|
+
disabled: { type: Boolean, default: !1 },
|
|
18
|
+
setup: { default: "basic" },
|
|
19
|
+
indentWithTab: { type: Boolean, default: !1 },
|
|
20
|
+
indentUnit: { default: " " },
|
|
21
|
+
lineWrapping: { type: Boolean, default: !1 },
|
|
22
|
+
highlightWhitespace: { type: Boolean, default: !1 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:value", "change"],
|
|
25
|
+
setup(T, { emit: k }) {
|
|
26
|
+
const t = T, f = k, r = B(null), a = B(null), c = new o(), s = new o(), d = new o(), u = new o(), p = new o(), h = new o(), g = new o(), m = new o(), v = new o(), x = async (e) => {
|
|
27
|
+
const n = I.matchLanguageName(N, e, !0);
|
|
28
|
+
return n ? await n.load() : [];
|
|
29
|
+
};
|
|
30
|
+
q(async () => {
|
|
31
|
+
if (!r.value) return;
|
|
32
|
+
const e = [
|
|
33
|
+
c.of([]),
|
|
34
|
+
s.of([]),
|
|
35
|
+
d.of([]),
|
|
36
|
+
u.of([]),
|
|
37
|
+
p.of([]),
|
|
38
|
+
h.of([]),
|
|
39
|
+
g.of([]),
|
|
40
|
+
m.of([]),
|
|
41
|
+
v.of([]),
|
|
42
|
+
l.updateListener.of((S) => {
|
|
43
|
+
if (S.docChanged) {
|
|
44
|
+
const _ = S.state.doc.toString();
|
|
45
|
+
f("update:value", _), f("change", _);
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
];
|
|
49
|
+
t.setup === "basic" ? e.unshift(F) : e.unshift(J);
|
|
50
|
+
const n = L.create({
|
|
51
|
+
doc: t.value,
|
|
52
|
+
extensions: e
|
|
53
|
+
}), R = new l({
|
|
54
|
+
state: n,
|
|
55
|
+
parent: r.value
|
|
56
|
+
});
|
|
57
|
+
a.value = R, w(), y(), W(), b(), C(), U(), E();
|
|
58
|
+
}), A(() => {
|
|
59
|
+
a.value?.destroy();
|
|
60
|
+
}), i(
|
|
61
|
+
() => t.value,
|
|
62
|
+
(e) => {
|
|
63
|
+
const n = a.value;
|
|
64
|
+
n && n.state.doc.toString() !== e && n.dispatch({
|
|
65
|
+
changes: { from: 0, to: n.state.doc.length, insert: e }
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
), i(() => t.theme, w), i(() => t.language, y), i(() => [t.readonly, t.disabled], W), i(() => t.placeholder, b), i(() => [t.indentWithTab, t.indentUnit], C), i(() => t.lineWrapping, U), i(() => t.highlightWhitespace, E);
|
|
69
|
+
function w() {
|
|
70
|
+
const e = a.value;
|
|
71
|
+
if (!e) return;
|
|
72
|
+
const n = t.theme === "dark" ? M : [];
|
|
73
|
+
e.dispatch({
|
|
74
|
+
effects: s.reconfigure(n)
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
async function y() {
|
|
78
|
+
const e = a.value;
|
|
79
|
+
if (!e) return;
|
|
80
|
+
const n = await x(t.language || "sql");
|
|
81
|
+
e.dispatch({
|
|
82
|
+
effects: c.reconfigure(n)
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function W() {
|
|
86
|
+
const e = a.value;
|
|
87
|
+
e && e.dispatch({
|
|
88
|
+
effects: [
|
|
89
|
+
d.reconfigure(L.readOnly.of(t.readonly || t.disabled)),
|
|
90
|
+
u.reconfigure(l.editable.of(!t.readonly && !t.disabled))
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function b() {
|
|
95
|
+
const e = a.value;
|
|
96
|
+
e && e.dispatch({
|
|
97
|
+
effects: p.reconfigure(t.placeholder ? V(t.placeholder) : [])
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function C() {
|
|
101
|
+
const e = a.value;
|
|
102
|
+
e && e.dispatch({
|
|
103
|
+
effects: [
|
|
104
|
+
h.reconfigure(t.indentWithTab ? j.of([O]) : []),
|
|
105
|
+
g.reconfigure(t.indentUnit ? H.of(t.indentUnit) : [])
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function U() {
|
|
110
|
+
const e = a.value;
|
|
111
|
+
e && e.dispatch({
|
|
112
|
+
effects: m.reconfigure(t.lineWrapping ? l.lineWrapping : [])
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function E() {
|
|
116
|
+
const e = a.value;
|
|
117
|
+
e && e.dispatch({
|
|
118
|
+
effects: v.reconfigure(t.highlightWhitespace ? z() : [])
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return (e, n) => (G(), D("div", {
|
|
122
|
+
ref_key: "editorRef",
|
|
123
|
+
ref: r,
|
|
124
|
+
class: "h-full w-full overflow-hidden text-sm"
|
|
125
|
+
}, null, 512));
|
|
126
|
+
}
|
|
127
|
+
});
|
|
2
128
|
export {
|
|
3
|
-
|
|
129
|
+
ne as CodeEditor
|
|
4
130
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiao/code-editor-vue",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@codemirror/commands": "^6.10.1",
|
|
35
35
|
"@codemirror/language": "^6.12.0",
|
|
36
|
-
"@codemirror/state": "^6.5.
|
|
36
|
+
"@codemirror/state": "^6.5.4",
|
|
37
37
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
38
|
-
"@codemirror/view": "^6.39.
|
|
38
|
+
"@codemirror/view": "^6.39.11",
|
|
39
39
|
"codemirror": "^6.0.1",
|
|
40
|
-
"@aiao/code-editor": "0.0.
|
|
40
|
+
"@aiao/code-editor": "0.0.10"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
var a = {
|
|
2
|
-
"+": ["conjugate", "add"],
|
|
3
|
-
"−": ["negate", "subtract"],
|
|
4
|
-
"×": ["signOf", "multiply"],
|
|
5
|
-
"÷": ["reciprocal", "divide"],
|
|
6
|
-
"⌈": ["ceiling", "greaterOf"],
|
|
7
|
-
"⌊": ["floor", "lesserOf"],
|
|
8
|
-
"∣": ["absolute", "residue"],
|
|
9
|
-
"⍳": ["indexGenerate", "indexOf"],
|
|
10
|
-
"?": ["roll", "deal"],
|
|
11
|
-
"⋆": ["exponentiate", "toThePowerOf"],
|
|
12
|
-
"⍟": ["naturalLog", "logToTheBase"],
|
|
13
|
-
"○": ["piTimes", "circularFuncs"],
|
|
14
|
-
"!": ["factorial", "binomial"],
|
|
15
|
-
"⌹": ["matrixInverse", "matrixDivide"],
|
|
16
|
-
"<": [null, "lessThan"],
|
|
17
|
-
"≤": [null, "lessThanOrEqual"],
|
|
18
|
-
"=": [null, "equals"],
|
|
19
|
-
">": [null, "greaterThan"],
|
|
20
|
-
"≥": [null, "greaterThanOrEqual"],
|
|
21
|
-
"≠": [null, "notEqual"],
|
|
22
|
-
"≡": ["depth", "match"],
|
|
23
|
-
"≢": [null, "notMatch"],
|
|
24
|
-
"∈": ["enlist", "membership"],
|
|
25
|
-
"⍷": [null, "find"],
|
|
26
|
-
"∪": ["unique", "union"],
|
|
27
|
-
"∩": [null, "intersection"],
|
|
28
|
-
"∼": ["not", "without"],
|
|
29
|
-
"∨": [null, "or"],
|
|
30
|
-
"∧": [null, "and"],
|
|
31
|
-
"⍱": [null, "nor"],
|
|
32
|
-
"⍲": [null, "nand"],
|
|
33
|
-
"⍴": ["shapeOf", "reshape"],
|
|
34
|
-
",": ["ravel", "catenate"],
|
|
35
|
-
"⍪": [null, "firstAxisCatenate"],
|
|
36
|
-
"⌽": ["reverse", "rotate"],
|
|
37
|
-
"⊖": ["axis1Reverse", "axis1Rotate"],
|
|
38
|
-
"⍉": ["transpose", null],
|
|
39
|
-
"↑": ["first", "take"],
|
|
40
|
-
"↓": [null, "drop"],
|
|
41
|
-
"⊂": ["enclose", "partitionWithAxis"],
|
|
42
|
-
"⊃": ["diclose", "pick"],
|
|
43
|
-
"⌷": [null, "index"],
|
|
44
|
-
"⍋": ["gradeUp", null],
|
|
45
|
-
"⍒": ["gradeDown", null],
|
|
46
|
-
"⊤": ["encode", null],
|
|
47
|
-
"⊥": ["decode", null],
|
|
48
|
-
"⍕": ["format", "formatByExample"],
|
|
49
|
-
"⍎": ["execute", null],
|
|
50
|
-
"⊣": ["stop", "left"],
|
|
51
|
-
"⊢": ["pass", "right"]
|
|
52
|
-
}, n = /[\.\/⌿⍀¨⍣]/, r = /⍬/, u = /[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/, s = /←/, i = /[⍝#].*$/, o = function(l) {
|
|
53
|
-
var t;
|
|
54
|
-
return t = !1, function(e) {
|
|
55
|
-
return t = e, e === l ? t === "\\" : !0;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
const f = {
|
|
59
|
-
name: "apl",
|
|
60
|
-
startState: function() {
|
|
61
|
-
return {
|
|
62
|
-
prev: !1,
|
|
63
|
-
func: !1,
|
|
64
|
-
op: !1,
|
|
65
|
-
string: !1,
|
|
66
|
-
escape: !1
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
token: function(l, t) {
|
|
70
|
-
var e;
|
|
71
|
-
return l.eatSpace() ? null : (e = l.next(), e === '"' || e === "'" ? (l.eatWhile(o(e)), l.next(), t.prev = !0, "string") : /[\[{\(]/.test(e) ? (t.prev = !1, null) : /[\]}\)]/.test(e) ? (t.prev = !0, null) : r.test(e) ? (t.prev = !1, "atom") : /[¯\d]/.test(e) ? (t.func ? (t.func = !1, t.prev = !1) : t.prev = !0, l.eatWhile(/[\w\.]/), "number") : n.test(e) || s.test(e) ? "operator" : u.test(e) ? (t.func = !0, t.prev = !1, a[e] ? "variableName.function.standard" : "variableName.function") : i.test(e) ? (l.skipToEnd(), "comment") : e === "∘" && l.peek() === "." ? (l.next(), "variableName.function") : (l.eatWhile(/[\w\$_]/), t.prev = !0, "keyword"));
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
f as apl
|
|
76
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
function s(t) {
|
|
2
|
-
var a = t.match(/^\s*\S/);
|
|
3
|
-
return t.skipToEnd(), a ? "error" : null;
|
|
4
|
-
}
|
|
5
|
-
const r = {
|
|
6
|
-
name: "asciiarmor",
|
|
7
|
-
token: function(t, a) {
|
|
8
|
-
var e;
|
|
9
|
-
if (a.state == "top")
|
|
10
|
-
return t.sol() && (e = t.match(/^-----BEGIN (.*)?-----\s*$/)) ? (a.state = "headers", a.type = e[1], "tag") : s(t);
|
|
11
|
-
if (a.state == "headers") {
|
|
12
|
-
if (t.sol() && t.match(/^\w+:/))
|
|
13
|
-
return a.state = "header", "atom";
|
|
14
|
-
var n = s(t);
|
|
15
|
-
return n && (a.state = "body"), n;
|
|
16
|
-
} else {
|
|
17
|
-
if (a.state == "header")
|
|
18
|
-
return t.skipToEnd(), a.state = "headers", "string";
|
|
19
|
-
if (a.state == "body")
|
|
20
|
-
return t.sol() && (e = t.match(/^-----END (.*)?-----\s*$/)) ? e[1] != a.type ? "error" : (a.state = "end", "tag") : t.eatWhile(/[A-Za-z0-9+\/=]/) ? null : (t.next(), "error");
|
|
21
|
-
if (a.state == "end")
|
|
22
|
-
return s(t);
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
blankLine: function(t) {
|
|
26
|
-
t.state == "headers" && (t.state = "body");
|
|
27
|
-
},
|
|
28
|
-
startState: function() {
|
|
29
|
-
return { state: "top", type: null };
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
r as asciiArmor
|
|
34
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
function E(i) {
|
|
2
|
-
for (var S = {}, l = i.split(" "), T = 0; T < l.length; ++T) S[l[T]] = !0;
|
|
3
|
-
return S;
|
|
4
|
-
}
|
|
5
|
-
const s = {
|
|
6
|
-
keywords: E("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),
|
|
7
|
-
cmipVerbs: E("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),
|
|
8
|
-
compareTypes: E("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),
|
|
9
|
-
status: E("current deprecated mandatory obsolete"),
|
|
10
|
-
tags: E("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),
|
|
11
|
-
storage: E("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminString TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),
|
|
12
|
-
modifier: E("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),
|
|
13
|
-
accessTypes: E("not-accessible accessible-for-notify read-only read-create read-write"),
|
|
14
|
-
multiLineStrings: !0
|
|
15
|
-
};
|
|
16
|
-
function y(i) {
|
|
17
|
-
var S = i.keywords || s.keywords, l = i.cmipVerbs || s.cmipVerbs, T = i.compareTypes || s.compareTypes, c = i.status || s.status, O = i.tags || s.tags, C = i.storage || s.storage, d = i.modifier || s.modifier, f = i.accessTypes || s.accessTypes;
|
|
18
|
-
i.multiLineStrings || s.multiLineStrings;
|
|
19
|
-
var R = i.indentStatements !== !1, N = /[\|\^]/, a;
|
|
20
|
-
function g(e, t) {
|
|
21
|
-
var n = e.next();
|
|
22
|
-
if (n == '"' || n == "'")
|
|
23
|
-
return t.tokenize = D(n), t.tokenize(e, t);
|
|
24
|
-
if (/[\[\]\(\){}:=,;]/.test(n))
|
|
25
|
-
return a = n, "punctuation";
|
|
26
|
-
if (n == "-" && e.eat("-"))
|
|
27
|
-
return e.skipToEnd(), "comment";
|
|
28
|
-
if (/\d/.test(n))
|
|
29
|
-
return e.eatWhile(/[\w\.]/), "number";
|
|
30
|
-
if (N.test(n))
|
|
31
|
-
return e.eatWhile(N), "operator";
|
|
32
|
-
e.eatWhile(/[\w\-]/);
|
|
33
|
-
var r = e.current();
|
|
34
|
-
return S.propertyIsEnumerable(r) ? "keyword" : l.propertyIsEnumerable(r) ? "variableName" : T.propertyIsEnumerable(r) ? "atom" : c.propertyIsEnumerable(r) ? "comment" : O.propertyIsEnumerable(r) ? "typeName" : C.propertyIsEnumerable(r) || d.propertyIsEnumerable(r) || f.propertyIsEnumerable(r) ? "modifier" : "variableName";
|
|
35
|
-
}
|
|
36
|
-
function D(e) {
|
|
37
|
-
return function(t, n) {
|
|
38
|
-
for (var r = !1, u, m = !1; (u = t.next()) != null; ) {
|
|
39
|
-
if (u == e && !r) {
|
|
40
|
-
var o = t.peek();
|
|
41
|
-
o && (o = o.toLowerCase(), (o == "b" || o == "h" || o == "o") && t.next()), m = !0;
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
r = !r && u == "\\";
|
|
45
|
-
}
|
|
46
|
-
return m && (n.tokenize = null), "string";
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function p(e, t, n, r, u) {
|
|
50
|
-
this.indented = e, this.column = t, this.type = n, this.align = r, this.prev = u;
|
|
51
|
-
}
|
|
52
|
-
function A(e, t, n) {
|
|
53
|
-
var r = e.indented;
|
|
54
|
-
return e.context && e.context.type == "statement" && (r = e.context.indented), e.context = new p(r, t, n, null, e.context);
|
|
55
|
-
}
|
|
56
|
-
function I(e) {
|
|
57
|
-
var t = e.context.type;
|
|
58
|
-
return (t == ")" || t == "]" || t == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
name: "asn1",
|
|
62
|
-
startState: function() {
|
|
63
|
-
return {
|
|
64
|
-
tokenize: null,
|
|
65
|
-
context: new p(-2, 0, "top", !1),
|
|
66
|
-
indented: 0,
|
|
67
|
-
startOfLine: !0
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
token: function(e, t) {
|
|
71
|
-
var n = t.context;
|
|
72
|
-
if (e.sol() && (n.align == null && (n.align = !1), t.indented = e.indentation(), t.startOfLine = !0), e.eatSpace()) return null;
|
|
73
|
-
a = null;
|
|
74
|
-
var r = (t.tokenize || g)(e, t);
|
|
75
|
-
if (r == "comment") return r;
|
|
76
|
-
if (n.align == null && (n.align = !0), (a == ";" || a == ":" || a == ",") && n.type == "statement")
|
|
77
|
-
I(t);
|
|
78
|
-
else if (a == "{") A(t, e.column(), "}");
|
|
79
|
-
else if (a == "[") A(t, e.column(), "]");
|
|
80
|
-
else if (a == "(") A(t, e.column(), ")");
|
|
81
|
-
else if (a == "}") {
|
|
82
|
-
for (; n.type == "statement"; ) n = I(t);
|
|
83
|
-
for (n.type == "}" && (n = I(t)); n.type == "statement"; ) n = I(t);
|
|
84
|
-
} else a == n.type ? I(t) : R && ((n.type == "}" || n.type == "top") && a != ";" || n.type == "statement" && a == "newstatement") && A(t, e.column(), "statement");
|
|
85
|
-
return t.startOfLine = !1, r;
|
|
86
|
-
},
|
|
87
|
-
languageData: {
|
|
88
|
-
indentOnInput: /^\s*[{}]$/,
|
|
89
|
-
commentTokens: { line: "--" }
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
y as asn1
|
|
95
|
-
};
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
var n = ["exten", "same", "include", "ignorepat", "switch"], s = ["#include", "#exec"], o = [
|
|
2
|
-
"addqueuemember",
|
|
3
|
-
"adsiprog",
|
|
4
|
-
"aelsub",
|
|
5
|
-
"agentlogin",
|
|
6
|
-
"agentmonitoroutgoing",
|
|
7
|
-
"agi",
|
|
8
|
-
"alarmreceiver",
|
|
9
|
-
"amd",
|
|
10
|
-
"answer",
|
|
11
|
-
"authenticate",
|
|
12
|
-
"background",
|
|
13
|
-
"backgrounddetect",
|
|
14
|
-
"bridge",
|
|
15
|
-
"busy",
|
|
16
|
-
"callcompletioncancel",
|
|
17
|
-
"callcompletionrequest",
|
|
18
|
-
"celgenuserevent",
|
|
19
|
-
"changemonitor",
|
|
20
|
-
"chanisavail",
|
|
21
|
-
"channelredirect",
|
|
22
|
-
"chanspy",
|
|
23
|
-
"clearhash",
|
|
24
|
-
"confbridge",
|
|
25
|
-
"congestion",
|
|
26
|
-
"continuewhile",
|
|
27
|
-
"controlplayback",
|
|
28
|
-
"dahdiacceptr2call",
|
|
29
|
-
"dahdibarge",
|
|
30
|
-
"dahdiras",
|
|
31
|
-
"dahdiscan",
|
|
32
|
-
"dahdisendcallreroutingfacility",
|
|
33
|
-
"dahdisendkeypadfacility",
|
|
34
|
-
"datetime",
|
|
35
|
-
"dbdel",
|
|
36
|
-
"dbdeltree",
|
|
37
|
-
"deadagi",
|
|
38
|
-
"dial",
|
|
39
|
-
"dictate",
|
|
40
|
-
"directory",
|
|
41
|
-
"disa",
|
|
42
|
-
"dumpchan",
|
|
43
|
-
"eagi",
|
|
44
|
-
"echo",
|
|
45
|
-
"endwhile",
|
|
46
|
-
"exec",
|
|
47
|
-
"execif",
|
|
48
|
-
"execiftime",
|
|
49
|
-
"exitwhile",
|
|
50
|
-
"extenspy",
|
|
51
|
-
"externalivr",
|
|
52
|
-
"festival",
|
|
53
|
-
"flash",
|
|
54
|
-
"followme",
|
|
55
|
-
"forkcdr",
|
|
56
|
-
"getcpeid",
|
|
57
|
-
"gosub",
|
|
58
|
-
"gosubif",
|
|
59
|
-
"goto",
|
|
60
|
-
"gotoif",
|
|
61
|
-
"gotoiftime",
|
|
62
|
-
"hangup",
|
|
63
|
-
"iax2provision",
|
|
64
|
-
"ices",
|
|
65
|
-
"importvar",
|
|
66
|
-
"incomplete",
|
|
67
|
-
"ivrdemo",
|
|
68
|
-
"jabberjoin",
|
|
69
|
-
"jabberleave",
|
|
70
|
-
"jabbersend",
|
|
71
|
-
"jabbersendgroup",
|
|
72
|
-
"jabberstatus",
|
|
73
|
-
"jack",
|
|
74
|
-
"log",
|
|
75
|
-
"macro",
|
|
76
|
-
"macroexclusive",
|
|
77
|
-
"macroexit",
|
|
78
|
-
"macroif",
|
|
79
|
-
"mailboxexists",
|
|
80
|
-
"meetme",
|
|
81
|
-
"meetmeadmin",
|
|
82
|
-
"meetmechanneladmin",
|
|
83
|
-
"meetmecount",
|
|
84
|
-
"milliwatt",
|
|
85
|
-
"minivmaccmess",
|
|
86
|
-
"minivmdelete",
|
|
87
|
-
"minivmgreet",
|
|
88
|
-
"minivmmwi",
|
|
89
|
-
"minivmnotify",
|
|
90
|
-
"minivmrecord",
|
|
91
|
-
"mixmonitor",
|
|
92
|
-
"monitor",
|
|
93
|
-
"morsecode",
|
|
94
|
-
"mp3player",
|
|
95
|
-
"mset",
|
|
96
|
-
"musiconhold",
|
|
97
|
-
"nbscat",
|
|
98
|
-
"nocdr",
|
|
99
|
-
"noop",
|
|
100
|
-
"odbc",
|
|
101
|
-
"odbc",
|
|
102
|
-
"odbcfinish",
|
|
103
|
-
"originate",
|
|
104
|
-
"ospauth",
|
|
105
|
-
"ospfinish",
|
|
106
|
-
"osplookup",
|
|
107
|
-
"ospnext",
|
|
108
|
-
"page",
|
|
109
|
-
"park",
|
|
110
|
-
"parkandannounce",
|
|
111
|
-
"parkedcall",
|
|
112
|
-
"pausemonitor",
|
|
113
|
-
"pausequeuemember",
|
|
114
|
-
"pickup",
|
|
115
|
-
"pickupchan",
|
|
116
|
-
"playback",
|
|
117
|
-
"playtones",
|
|
118
|
-
"privacymanager",
|
|
119
|
-
"proceeding",
|
|
120
|
-
"progress",
|
|
121
|
-
"queue",
|
|
122
|
-
"queuelog",
|
|
123
|
-
"raiseexception",
|
|
124
|
-
"read",
|
|
125
|
-
"readexten",
|
|
126
|
-
"readfile",
|
|
127
|
-
"receivefax",
|
|
128
|
-
"receivefax",
|
|
129
|
-
"receivefax",
|
|
130
|
-
"record",
|
|
131
|
-
"removequeuemember",
|
|
132
|
-
"resetcdr",
|
|
133
|
-
"retrydial",
|
|
134
|
-
"return",
|
|
135
|
-
"ringing",
|
|
136
|
-
"sayalpha",
|
|
137
|
-
"saycountedadj",
|
|
138
|
-
"saycountednoun",
|
|
139
|
-
"saycountpl",
|
|
140
|
-
"saydigits",
|
|
141
|
-
"saynumber",
|
|
142
|
-
"sayphonetic",
|
|
143
|
-
"sayunixtime",
|
|
144
|
-
"senddtmf",
|
|
145
|
-
"sendfax",
|
|
146
|
-
"sendfax",
|
|
147
|
-
"sendfax",
|
|
148
|
-
"sendimage",
|
|
149
|
-
"sendtext",
|
|
150
|
-
"sendurl",
|
|
151
|
-
"set",
|
|
152
|
-
"setamaflags",
|
|
153
|
-
"setcallerpres",
|
|
154
|
-
"setmusiconhold",
|
|
155
|
-
"sipaddheader",
|
|
156
|
-
"sipdtmfmode",
|
|
157
|
-
"sipremoveheader",
|
|
158
|
-
"skel",
|
|
159
|
-
"slastation",
|
|
160
|
-
"slatrunk",
|
|
161
|
-
"sms",
|
|
162
|
-
"softhangup",
|
|
163
|
-
"speechactivategrammar",
|
|
164
|
-
"speechbackground",
|
|
165
|
-
"speechcreate",
|
|
166
|
-
"speechdeactivategrammar",
|
|
167
|
-
"speechdestroy",
|
|
168
|
-
"speechloadgrammar",
|
|
169
|
-
"speechprocessingsound",
|
|
170
|
-
"speechstart",
|
|
171
|
-
"speechunloadgrammar",
|
|
172
|
-
"stackpop",
|
|
173
|
-
"startmusiconhold",
|
|
174
|
-
"stopmixmonitor",
|
|
175
|
-
"stopmonitor",
|
|
176
|
-
"stopmusiconhold",
|
|
177
|
-
"stopplaytones",
|
|
178
|
-
"system",
|
|
179
|
-
"testclient",
|
|
180
|
-
"testserver",
|
|
181
|
-
"transfer",
|
|
182
|
-
"tryexec",
|
|
183
|
-
"trysystem",
|
|
184
|
-
"unpausemonitor",
|
|
185
|
-
"unpausequeuemember",
|
|
186
|
-
"userevent",
|
|
187
|
-
"verbose",
|
|
188
|
-
"vmauthenticate",
|
|
189
|
-
"vmsayname",
|
|
190
|
-
"voicemail",
|
|
191
|
-
"voicemailmain",
|
|
192
|
-
"wait",
|
|
193
|
-
"waitexten",
|
|
194
|
-
"waitfornoise",
|
|
195
|
-
"waitforring",
|
|
196
|
-
"waitforsilence",
|
|
197
|
-
"waitmusiconhold",
|
|
198
|
-
"waituntil",
|
|
199
|
-
"while",
|
|
200
|
-
"zapateller"
|
|
201
|
-
];
|
|
202
|
-
function c(e, t) {
|
|
203
|
-
var a = "", i = e.next();
|
|
204
|
-
if (t.blockComment)
|
|
205
|
-
return i == "-" && e.match("-;", !0) ? t.blockComment = !1 : e.skipTo("--;") ? (e.next(), e.next(), e.next(), t.blockComment = !1) : e.skipToEnd(), "comment";
|
|
206
|
-
if (i == ";")
|
|
207
|
-
return e.match("--", !0) && !e.match("-", !1) ? (t.blockComment = !0, "comment") : (e.skipToEnd(), "comment");
|
|
208
|
-
if (i == "[")
|
|
209
|
-
return e.skipTo("]"), e.eat("]"), "header";
|
|
210
|
-
if (i == '"')
|
|
211
|
-
return e.skipTo('"'), "string";
|
|
212
|
-
if (i == "'")
|
|
213
|
-
return e.skipTo("'"), "string.special";
|
|
214
|
-
if (i == "#" && (e.eatWhile(/\w/), a = e.current(), s.indexOf(a) !== -1))
|
|
215
|
-
return e.skipToEnd(), "strong";
|
|
216
|
-
if (i == "$") {
|
|
217
|
-
var r = e.peek();
|
|
218
|
-
if (r == "{")
|
|
219
|
-
return e.skipTo("}"), e.eat("}"), "variableName.special";
|
|
220
|
-
}
|
|
221
|
-
if (e.eatWhile(/\w/), a = e.current(), n.indexOf(a) !== -1) {
|
|
222
|
-
switch (t.extenStart = !0, a) {
|
|
223
|
-
case "same":
|
|
224
|
-
t.extenSame = !0;
|
|
225
|
-
break;
|
|
226
|
-
case "include":
|
|
227
|
-
case "switch":
|
|
228
|
-
case "ignorepat":
|
|
229
|
-
t.extenInclude = !0;
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
return "atom";
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
const l = {
|
|
236
|
-
name: "asterisk",
|
|
237
|
-
startState: function() {
|
|
238
|
-
return {
|
|
239
|
-
blockComment: !1,
|
|
240
|
-
extenStart: !1,
|
|
241
|
-
extenSame: !1,
|
|
242
|
-
extenInclude: !1,
|
|
243
|
-
extenExten: !1,
|
|
244
|
-
extenPriority: !1,
|
|
245
|
-
extenApplication: !1
|
|
246
|
-
};
|
|
247
|
-
},
|
|
248
|
-
token: function(e, t) {
|
|
249
|
-
var a = "";
|
|
250
|
-
if (e.eatSpace()) return null;
|
|
251
|
-
if (t.extenStart)
|
|
252
|
-
return e.eatWhile(/[^\s]/), a = e.current(), /^=>?$/.test(a) ? (t.extenExten = !0, t.extenStart = !1, "strong") : (t.extenStart = !1, e.skipToEnd(), "error");
|
|
253
|
-
if (t.extenExten)
|
|
254
|
-
return t.extenExten = !1, t.extenPriority = !0, e.eatWhile(/[^,]/), t.extenInclude && (e.skipToEnd(), t.extenPriority = !1, t.extenInclude = !1), t.extenSame && (t.extenPriority = !1, t.extenSame = !1, t.extenApplication = !0), "tag";
|
|
255
|
-
if (t.extenPriority)
|
|
256
|
-
return t.extenPriority = !1, t.extenApplication = !0, e.next(), t.extenSame ? null : (e.eatWhile(/[^,]/), "number");
|
|
257
|
-
if (t.extenApplication) {
|
|
258
|
-
if (e.eatWhile(/,/), a = e.current(), a === ",") return null;
|
|
259
|
-
if (e.eatWhile(/\w/), a = e.current().toLowerCase(), t.extenApplication = !1, o.indexOf(a) !== -1)
|
|
260
|
-
return "def";
|
|
261
|
-
} else
|
|
262
|
-
return c(e, t);
|
|
263
|
-
return null;
|
|
264
|
-
},
|
|
265
|
-
languageData: {
|
|
266
|
-
commentTokens: { line: ";", block: { open: ";--", close: "--;" } }
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
export {
|
|
270
|
-
l as asterisk
|
|
271
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var r = "><+-.,[]".split("");
|
|
2
|
-
const o = {
|
|
3
|
-
name: "brainfuck",
|
|
4
|
-
startState: function() {
|
|
5
|
-
return {
|
|
6
|
-
commentLine: !1,
|
|
7
|
-
left: 0,
|
|
8
|
-
right: 0,
|
|
9
|
-
commentLoop: !1
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
token: function(n, t) {
|
|
13
|
-
if (n.eatSpace()) return null;
|
|
14
|
-
n.sol() && (t.commentLine = !1);
|
|
15
|
-
var e = n.next().toString();
|
|
16
|
-
if (r.indexOf(e) !== -1) {
|
|
17
|
-
if (t.commentLine === !0)
|
|
18
|
-
return n.eol() && (t.commentLine = !1), "comment";
|
|
19
|
-
if (e === "]" || e === "[")
|
|
20
|
-
return e === "[" ? t.left++ : t.right++, "bracket";
|
|
21
|
-
if (e === "+" || e === "-")
|
|
22
|
-
return "keyword";
|
|
23
|
-
if (e === "<" || e === ">")
|
|
24
|
-
return "atom";
|
|
25
|
-
if (e === "." || e === ",")
|
|
26
|
-
return "def";
|
|
27
|
-
} else
|
|
28
|
-
return t.commentLine = !0, n.eol() && (t.commentLine = !1), "comment";
|
|
29
|
-
n.eol() && (t.commentLine = !1);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
o as brainfuck
|
|
34
|
-
};
|