@aiao/code-editor-vue 0.0.7 → 0.0.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.
- package/dist/apl-B2DGVGxc-Dd6D39pP.js +76 -0
- package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +34 -0
- package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +95 -0
- package/dist/asterisk-DS281yxp-B5eTWk_B.js +271 -0
- package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +34 -0
- package/dist/clike-BMALKCNj-Ck7Gc35_.js +620 -0
- package/dist/clojure-CCKyeQKf-N9sg777Z.js +800 -0
- package/dist/cmake-CuaCgAKt-BbEgXraO.js +28 -0
- package/dist/cobol-BlTKFDRj-CHCoWafp.js +72 -0
- package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +179 -0
- package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +75 -0
- package/dist/crystal-D309uH6_-DS6LrXoE.js +217 -0
- package/dist/css-BkF-NPzE-DiJu9Nkd.js +1553 -0
- package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +68 -0
- package/dist/d-BZcgY6La-KCW6-bIm.js +127 -0
- package/dist/diff-Cg9d_RX2-C01qBVFc.js +18 -0
- package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +194 -0
- package/dist/dtd-CtLokQ-U-DCbNdeIA.js +84 -0
- package/dist/dylan-QYeExnWK-DIUVpsct.js +234 -0
- package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +78 -0
- package/dist/ecl-CiXN-g_D-DOI-W0if.js +121 -0
- package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +110 -0
- package/dist/elm-CNT9vbN0-BcYlydpO.js +108 -0
- package/dist/erlang-CFOYdy9e-DULXsFZl.js +487 -0
- package/dist/factor-Clf6BoVk-DBb2EHMF.js +65 -0
- package/dist/fcl-CPC2WYrI-CuXG3fcK.js +103 -0
- package/dist/forth-BmxRyE9S-BcFwWpeL.js +60 -0
- package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +442 -0
- package/dist/gas-cpmYfFX2-sZgGhMxB.js +183 -0
- package/dist/gherkin-CJuwpceU-BRrr8yjO.js +34 -0
- package/dist/groovy-DZeT_VM--CmF8wcSo.js +146 -0
- package/dist/haskell-CxiO_7JL-BuULsXvv.js +375 -0
- package/dist/haxe-70NVW1pR-CM27SfgM.js +359 -0
- package/dist/http-D9LttvKF-j9E8oQ7o.js +44 -0
- package/dist/idl-B6TRFYjl-B6TRFYjl.js +947 -0
- package/dist/index-BMiCCEB1-Bhkem_yf.js +305 -0
- package/dist/index-BNuasEBW-Djq6JMRj.js +94 -0
- package/dist/index-Bg1KDWyt-DaNGMguF.js +290 -0
- package/dist/{index-D6_k5ZgA.js → index-BuVm7ZG6-BZLKs8s6.js} +106 -106
- package/dist/index-BvS1cnHq-DM0hbFEQ.js +613 -0
- package/dist/index-C44L0DmY-BmmnwVzM.js +138 -0
- package/dist/index-C71CZfUx-CXN80Lrt.js +247 -0
- package/dist/{index-BluJGN_u.js → index-CQ6JWNwi-BkIQd0CX.js} +131 -130
- package/dist/index-CpRVx97--qRVKhpm0.js +342 -0
- package/dist/index-CqvQj6d--Cks52f8R.js +270 -0
- package/dist/index-CrbQBmWq-CH-PcW1J.js +157 -0
- package/dist/index-CzovO10m-BGtdggaq.js +301 -0
- package/dist/index-D0BZOY-S-DP1N-_JY.js +101 -0
- package/dist/{index-DcMCsmYb.js → index-D0svJS59-B1ELwWap.js} +79 -78
- package/dist/index-D93XVMi1-BA3BTMNq.js +136 -0
- package/dist/index-DEB5VK0f-DmPMy-wS.js +252 -0
- package/dist/index-Dp8osI_J-_47iGH9z.js +960 -0
- package/dist/index-Ds4AioqO-C6aO_ISw.js +1917 -0
- package/dist/{index-DBgKi_NE.js → index-Dy-OpkyQ-BBMsyHBR.js} +18 -18
- package/dist/index-Dyi9rNIT-DTaMAKyY.js +391 -0
- package/dist/index-ZJkjD9tT-CsDrbsME.js +74 -0
- package/dist/index-qH2lMs0G-VT1Nd_LF.js +944 -0
- package/dist/index-srIksFxX-jkv39JhL.js +59 -0
- package/dist/index-wcsJ2mym.js +31598 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/javascript-DOuB9oqA-BxiygWgm.js +691 -0
- package/dist/julia-DpvXAuO6-Bk_IfD8X.js +241 -0
- package/dist/livescript-CanGTf8u-Cx6PrvS4.js +272 -0
- package/dist/lua-XplVlWi_-8f8obHzY.js +217 -0
- package/dist/mathematica-jaRHnSxC-B83gQsL2.js +35 -0
- package/dist/mbox-BctzC1hL-Hg5U2B4l.js +76 -0
- package/dist/mirc-CFBPAOaF-CfzSSk9W.js +72 -0
- package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +272 -0
- package/dist/modelica-vUgVs--1-BObVpYBg.js +93 -0
- package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +104 -0
- package/dist/mumps-CQoS1kWX-CkTUOQnt.js +25 -0
- package/dist/nginx-zDPm3Z74-DJk4KP7N.js +87 -0
- package/dist/nsis-BCLyjY7m-C2MffOQ3.js +62 -0
- package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +79 -0
- package/dist/octave-C8PmmSRH-DM5vTWlU.js +143 -0
- package/dist/oz-Ce8aN8oE-BcJM4SVy.js +151 -0
- package/dist/pascal-De0D6mP7-D7DGFFKL.js +77 -0
- package/dist/perl-B4bSCe1C-6aIa2glS.js +915 -0
- package/dist/pig-D24Z8EXi-BD-qt5FU.js +54 -0
- package/dist/powershell-DkYVfTzP-Blt1Rodi.js +249 -0
- package/dist/properties-Dn9wna3M-EOOwnCnk.js +26 -0
- package/dist/protobuf-BPIjwpzm-DAButU8_.js +49 -0
- package/dist/pug-TGXr6c5j-C9HfQ86E.js +248 -0
- package/dist/puppet-nyd4dhjf-CGzH5dsa.js +45 -0
- package/dist/python-BkR3uSy8-CjDnyp3B.js +313 -0
- package/dist/q-DyHZGnqm-DGuqeH_T.js +86 -0
- package/dist/r-LKEuhEGI-BFQhJnTP.js +104 -0
- package/dist/rpm-IznJm2Xc-CbZqrWCM.js +57 -0
- package/dist/ruby-CcYfvIk6-DzPSfSGo.js +228 -0
- package/dist/sas-7E8yHoCW-D726Uzkw.js +105 -0
- package/dist/scheme-DjibxsNh-Bp5gVFkm.js +124 -0
- package/dist/shell-C0C2sNA_-BTeYg6ir.js +182 -0
- package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +72 -0
- package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +89 -0
- package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +48 -0
- package/dist/solr-BNlsLglM-BM2OpfTI.js +41 -0
- package/dist/sparql-FarWu_Gb-FN_uQNd4.js +197 -0
- package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +49 -0
- package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +278 -0
- package/dist/stex-Du4h4KAU-QOov_zHj.js +129 -0
- package/dist/stylus-CAdqWld3-BcRBbBxD.js +250 -0
- package/dist/swift-DSxqR9R6-2Hz4NOoF.js +230 -0
- package/dist/tcl-xfoLljhY-DAZBRGQI.js +81 -0
- package/dist/textile-D1AWE-pc-DuiIfEnb.js +295 -0
- package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +155 -0
- package/dist/tiki-__Kn3CeS-CWcR9ib_.js +181 -0
- package/dist/toml-DWAmxCjl-CyJoDzs6.js +56 -0
- package/dist/troff-D2UO-fKf-DVoIzS-O.js +35 -0
- package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +123 -0
- package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +88 -0
- package/dist/turtle-xwJUxoPV-fs94wdNM.js +80 -0
- package/dist/vb-c2kQGd6--DU726qF0.js +74 -0
- package/dist/vbscript-1f_Dhg5H-DriA32xD.js +324 -0
- package/dist/velocity-DJd0pTTC-BG368IR6.js +96 -0
- package/dist/verilog-CiS1jyi5-giQA8J-e.js +259 -0
- package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +106 -0
- package/dist/webidl-CjfDENEo-BM8KXKJ5.js +155 -0
- package/dist/xquery-Ct6lEb4B-C5KDc61l.js +422 -0
- package/dist/yacas-C0absKBh-B82QJ76F.js +73 -0
- package/dist/z80-Pki2zAjW-B0IQoIbR.js +61 -0
- package/package.json +8 -10
- package/dist/index-3d5LPf68.js +0 -19017
- package/dist/languages.d.ts +0 -3
- package/dist/languages.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const g =
|
|
1
|
+
import { w as s } from "./index-BuVm7ZG6-BZLKs8s6.js";
|
|
2
|
+
import { E as P, x as n, b as o, n as Q, t, s as c, u as i, P as r } from "./index-wcsJ2mym.js";
|
|
3
|
+
const g = i({
|
|
4
4
|
String: r.string,
|
|
5
5
|
Number: r.number,
|
|
6
6
|
"True False": r.bool,
|
|
@@ -28,13 +28,13 @@ const g = n({
|
|
|
28
28
|
tokenizers: [0],
|
|
29
29
|
topRules: { JsonText: [0, 1] },
|
|
30
30
|
tokenPrec: 0
|
|
31
|
-
}),
|
|
31
|
+
}), T = () => (a) => {
|
|
32
32
|
try {
|
|
33
|
-
JSON.parse(
|
|
33
|
+
JSON.parse(a.state.doc.toString());
|
|
34
34
|
} catch (O) {
|
|
35
35
|
if (!(O instanceof SyntaxError))
|
|
36
36
|
throw O;
|
|
37
|
-
const e = l(O,
|
|
37
|
+
const e = l(O, a.state.doc);
|
|
38
38
|
return [{
|
|
39
39
|
from: e,
|
|
40
40
|
message: O.message,
|
|
@@ -44,19 +44,19 @@ const g = n({
|
|
|
44
44
|
}
|
|
45
45
|
return [];
|
|
46
46
|
};
|
|
47
|
-
function l(
|
|
47
|
+
function l(a, O) {
|
|
48
48
|
let e;
|
|
49
|
-
return (e =
|
|
49
|
+
return (e = a.message.match(/at position (\d+)/)) ? Math.min(+e[1], O.length) : (e = a.message.match(/at line (\d+) column (\d+)/)) ? Math.min(O.line(+e[1]).from + +e[2] - 1, O.length) : 0;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const m = /* @__PURE__ */ P.define({
|
|
52
52
|
name: "json",
|
|
53
53
|
parser: /* @__PURE__ */ p.configure({
|
|
54
54
|
props: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
Object: /* @__PURE__ */
|
|
57
|
-
Array: /* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ o.add({
|
|
56
|
+
Object: /* @__PURE__ */ t({ except: /^\s*\}/ }),
|
|
57
|
+
Array: /* @__PURE__ */ t({ except: /^\s*\]/ })
|
|
58
58
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ Q.add({
|
|
60
60
|
"Object Array": c
|
|
61
61
|
})
|
|
62
62
|
]
|
|
@@ -66,11 +66,11 @@ const u = /* @__PURE__ */ o.define({
|
|
|
66
66
|
indentOnInput: /^\s*[\}\]]$/
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
function
|
|
70
|
-
return new
|
|
69
|
+
function d() {
|
|
70
|
+
return new n(m);
|
|
71
71
|
}
|
|
72
72
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
d as json,
|
|
74
|
+
m as jsonLanguage,
|
|
75
|
+
T as jsonParseLinter
|
|
76
76
|
};
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { R as C, o as L, p as O, I as E, q as x, v as A, w as R, a as w, y as T, S as y, z as g, i as q, O as z, A as k, B, D as P } from "./index-wcsJ2mym.js";
|
|
2
|
+
class te {
|
|
3
|
+
/**
|
|
4
|
+
Create a new completion context. (Mostly useful for testing
|
|
5
|
+
completion sources—in the editor, the extension will create
|
|
6
|
+
these for you.)
|
|
7
|
+
*/
|
|
8
|
+
constructor(t, e, n, i) {
|
|
9
|
+
this.state = t, this.pos = e, this.explicit = n, this.view = i, this.abortListeners = [], this.abortOnDocChange = !1;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
Get the extent, content, and (if there is a token) type of the
|
|
13
|
+
token before `this.pos`.
|
|
14
|
+
*/
|
|
15
|
+
tokenBefore(t) {
|
|
16
|
+
let e = C(this.state).resolveInner(this.pos, -1);
|
|
17
|
+
for (; e && t.indexOf(e.name) < 0; )
|
|
18
|
+
e = e.parent;
|
|
19
|
+
return e ? {
|
|
20
|
+
from: e.from,
|
|
21
|
+
to: this.pos,
|
|
22
|
+
text: this.state.sliceDoc(e.from, this.pos),
|
|
23
|
+
type: e.type
|
|
24
|
+
} : null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
Get the match of the given expression directly before the
|
|
28
|
+
cursor.
|
|
29
|
+
*/
|
|
30
|
+
matchBefore(t) {
|
|
31
|
+
let e = this.state.doc.lineAt(this.pos), n = Math.max(e.from, this.pos - 250), i = e.text.slice(n - e.from, this.pos - e.from), l = i.search(H(t));
|
|
32
|
+
return l < 0 ? null : { from: n + l, to: this.pos, text: i.slice(l) };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
Yields true when the query has been aborted. Can be useful in
|
|
36
|
+
asynchronous queries to avoid doing work that will be ignored.
|
|
37
|
+
*/
|
|
38
|
+
get aborted() {
|
|
39
|
+
return this.abortListeners == null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
Allows you to register abort handlers, which will be called when
|
|
43
|
+
the query is
|
|
44
|
+
[aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
|
|
45
|
+
|
|
46
|
+
By default, running queries will not be aborted for regular
|
|
47
|
+
typing or backspacing, on the assumption that they are likely to
|
|
48
|
+
return a result with a
|
|
49
|
+
[`validFor`](https://codemirror.net/6/docs/ref/#autocomplete.CompletionResult.validFor) field that
|
|
50
|
+
allows the result to be used after all. Passing `onDocChange:
|
|
51
|
+
true` will cause this query to be aborted for any document
|
|
52
|
+
change.
|
|
53
|
+
*/
|
|
54
|
+
addEventListener(t, e, n) {
|
|
55
|
+
t == "abort" && this.abortListeners && (this.abortListeners.push(e), n && n.onDocChange && (this.abortOnDocChange = !0));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function $(o) {
|
|
59
|
+
let t = Object.keys(o).join(""), e = /\w/.test(t);
|
|
60
|
+
return e && (t = t.replace(/\w/g, "")), `[${e ? "\\w" : ""}${t.replace(/[^\w\s]/g, "\\$&")}]`;
|
|
61
|
+
}
|
|
62
|
+
function j(o) {
|
|
63
|
+
let t = /* @__PURE__ */ Object.create(null), e = /* @__PURE__ */ Object.create(null);
|
|
64
|
+
for (let { label: i } of o) {
|
|
65
|
+
t[i[0]] = !0;
|
|
66
|
+
for (let l = 1; l < i.length; l++)
|
|
67
|
+
e[i[l]] = !0;
|
|
68
|
+
}
|
|
69
|
+
let n = $(t) + $(e) + "*$";
|
|
70
|
+
return [new RegExp("^" + n), new RegExp(n)];
|
|
71
|
+
}
|
|
72
|
+
function ne(o) {
|
|
73
|
+
let t = o.map((i) => typeof i == "string" ? { label: i } : i), [e, n] = t.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : j(t);
|
|
74
|
+
return (i) => {
|
|
75
|
+
let l = i.matchBefore(n);
|
|
76
|
+
return l || i.explicit ? { from: l ? l.from : i.pos, options: t, validFor: e } : null;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function oe(o, t) {
|
|
80
|
+
return (e) => {
|
|
81
|
+
for (let n = C(e.state).resolveInner(e.pos, -1); n; n = n.parent) {
|
|
82
|
+
if (o.indexOf(n.name) > -1)
|
|
83
|
+
return null;
|
|
84
|
+
if (n.type.isTop)
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
return t(e);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function H(o, t) {
|
|
91
|
+
var e;
|
|
92
|
+
let { source: n } = o, i = n[n.length - 1] != "$";
|
|
93
|
+
return i ? new RegExp(`(?:${n})${i ? "$" : ""}`, (e = o.flags) !== null && e !== void 0 ? e : o.ignoreCase ? "i" : "") : o;
|
|
94
|
+
}
|
|
95
|
+
const V = /* @__PURE__ */ L.define(), W = /* @__PURE__ */ w.baseTheme({
|
|
96
|
+
".cm-tooltip.cm-tooltip-autocomplete": {
|
|
97
|
+
"& > ul": {
|
|
98
|
+
fontFamily: "monospace",
|
|
99
|
+
whiteSpace: "nowrap",
|
|
100
|
+
overflow: "hidden auto",
|
|
101
|
+
maxWidth_fallback: "700px",
|
|
102
|
+
maxWidth: "min(700px, 95vw)",
|
|
103
|
+
minWidth: "250px",
|
|
104
|
+
maxHeight: "10em",
|
|
105
|
+
height: "100%",
|
|
106
|
+
listStyle: "none",
|
|
107
|
+
margin: 0,
|
|
108
|
+
padding: 0,
|
|
109
|
+
"& > li, & > completion-section": {
|
|
110
|
+
padding: "1px 3px",
|
|
111
|
+
lineHeight: 1.2
|
|
112
|
+
},
|
|
113
|
+
"& > li": {
|
|
114
|
+
overflowX: "hidden",
|
|
115
|
+
textOverflow: "ellipsis",
|
|
116
|
+
cursor: "pointer"
|
|
117
|
+
},
|
|
118
|
+
"& > completion-section": {
|
|
119
|
+
display: "list-item",
|
|
120
|
+
borderBottom: "1px solid silver",
|
|
121
|
+
paddingLeft: "0.5em",
|
|
122
|
+
opacity: 0.7
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"&light .cm-tooltip-autocomplete ul li[aria-selected]": {
|
|
127
|
+
background: "#17c",
|
|
128
|
+
color: "white"
|
|
129
|
+
},
|
|
130
|
+
"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
|
|
131
|
+
background: "#777"
|
|
132
|
+
},
|
|
133
|
+
"&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
|
|
134
|
+
background: "#347",
|
|
135
|
+
color: "white"
|
|
136
|
+
},
|
|
137
|
+
"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
|
|
138
|
+
background: "#444"
|
|
139
|
+
},
|
|
140
|
+
".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
|
|
141
|
+
content: '"···"',
|
|
142
|
+
opacity: 0.5,
|
|
143
|
+
display: "block",
|
|
144
|
+
textAlign: "center"
|
|
145
|
+
},
|
|
146
|
+
".cm-tooltip.cm-completionInfo": {
|
|
147
|
+
position: "absolute",
|
|
148
|
+
padding: "3px 9px",
|
|
149
|
+
width: "max-content",
|
|
150
|
+
maxWidth: "400px",
|
|
151
|
+
boxSizing: "border-box",
|
|
152
|
+
whiteSpace: "pre-line"
|
|
153
|
+
},
|
|
154
|
+
".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
|
|
155
|
+
".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
|
|
156
|
+
".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
|
|
157
|
+
".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
|
|
158
|
+
"&light .cm-snippetField": { backgroundColor: "#00000022" },
|
|
159
|
+
"&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
|
|
160
|
+
".cm-snippetFieldPosition": {
|
|
161
|
+
verticalAlign: "text-top",
|
|
162
|
+
width: 0,
|
|
163
|
+
height: "1.15em",
|
|
164
|
+
display: "inline-block",
|
|
165
|
+
margin: "0 -0.7px -.7em",
|
|
166
|
+
borderLeft: "1.4px dotted #888"
|
|
167
|
+
},
|
|
168
|
+
".cm-completionMatchedText": {
|
|
169
|
+
textDecoration: "underline"
|
|
170
|
+
},
|
|
171
|
+
".cm-completionDetail": {
|
|
172
|
+
marginLeft: "0.5em",
|
|
173
|
+
fontStyle: "italic"
|
|
174
|
+
},
|
|
175
|
+
".cm-completionIcon": {
|
|
176
|
+
fontSize: "90%",
|
|
177
|
+
width: ".8em",
|
|
178
|
+
display: "inline-block",
|
|
179
|
+
textAlign: "center",
|
|
180
|
+
paddingRight: ".6em",
|
|
181
|
+
opacity: "0.6",
|
|
182
|
+
boxSizing: "content-box"
|
|
183
|
+
},
|
|
184
|
+
".cm-completionIcon-function, .cm-completionIcon-method": {
|
|
185
|
+
"&:after": { content: "'ƒ'" }
|
|
186
|
+
},
|
|
187
|
+
".cm-completionIcon-class": {
|
|
188
|
+
"&:after": { content: "'○'" }
|
|
189
|
+
},
|
|
190
|
+
".cm-completionIcon-interface": {
|
|
191
|
+
"&:after": { content: "'◌'" }
|
|
192
|
+
},
|
|
193
|
+
".cm-completionIcon-variable": {
|
|
194
|
+
"&:after": { content: "'𝑥'" }
|
|
195
|
+
},
|
|
196
|
+
".cm-completionIcon-constant": {
|
|
197
|
+
"&:after": { content: "'𝐶'" }
|
|
198
|
+
},
|
|
199
|
+
".cm-completionIcon-type": {
|
|
200
|
+
"&:after": { content: "'𝑡'" }
|
|
201
|
+
},
|
|
202
|
+
".cm-completionIcon-enum": {
|
|
203
|
+
"&:after": { content: "'∪'" }
|
|
204
|
+
},
|
|
205
|
+
".cm-completionIcon-property": {
|
|
206
|
+
"&:after": { content: "'□'" }
|
|
207
|
+
},
|
|
208
|
+
".cm-completionIcon-keyword": {
|
|
209
|
+
"&:after": { content: "'🔑︎'" }
|
|
210
|
+
// Disable emoji rendering
|
|
211
|
+
},
|
|
212
|
+
".cm-completionIcon-namespace": {
|
|
213
|
+
"&:after": { content: "'▢'" }
|
|
214
|
+
},
|
|
215
|
+
".cm-completionIcon-text": {
|
|
216
|
+
"&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
class X {
|
|
220
|
+
constructor(t, e, n, i) {
|
|
221
|
+
this.field = t, this.line = e, this.from = n, this.to = i;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
class b {
|
|
225
|
+
constructor(t, e, n) {
|
|
226
|
+
this.field = t, this.from = e, this.to = n;
|
|
227
|
+
}
|
|
228
|
+
map(t) {
|
|
229
|
+
let e = t.mapPos(this.from, -1, k.TrackDel), n = t.mapPos(this.to, 1, k.TrackDel);
|
|
230
|
+
return e == null || n == null ? null : new b(this.field, e, n);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
class I {
|
|
234
|
+
constructor(t, e) {
|
|
235
|
+
this.lines = t, this.fieldPositions = e;
|
|
236
|
+
}
|
|
237
|
+
instantiate(t, e) {
|
|
238
|
+
let n = [], i = [e], l = t.doc.lineAt(e), f = /^\s*/.exec(l.text)[0];
|
|
239
|
+
for (let s of this.lines) {
|
|
240
|
+
if (n.length) {
|
|
241
|
+
let a = f, c = /^\t*/.exec(s)[0].length;
|
|
242
|
+
for (let r = 0; r < c; r++)
|
|
243
|
+
a += t.facet(T);
|
|
244
|
+
i.push(e + a.length - c), s = a + s.slice(c);
|
|
245
|
+
}
|
|
246
|
+
n.push(s), e += s.length + 1;
|
|
247
|
+
}
|
|
248
|
+
let p = this.fieldPositions.map((s) => new b(s.field, i[s.line] + s.from, i[s.line] + s.to));
|
|
249
|
+
return { text: n, ranges: p };
|
|
250
|
+
}
|
|
251
|
+
static parse(t) {
|
|
252
|
+
let e = [], n = [], i = [], l;
|
|
253
|
+
for (let f of t.split(/\r\n?|\n/)) {
|
|
254
|
+
for (; l = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(f); ) {
|
|
255
|
+
let p = l[1] ? +l[1] : null, s = l[2] || l[3] || "", a = -1, c = s.replace(/\\[{}]/g, (r) => r[1]);
|
|
256
|
+
for (let r = 0; r < e.length; r++)
|
|
257
|
+
(p != null ? e[r].seq == p : c && e[r].name == c) && (a = r);
|
|
258
|
+
if (a < 0) {
|
|
259
|
+
let r = 0;
|
|
260
|
+
for (; r < e.length && (p == null || e[r].seq != null && e[r].seq < p); )
|
|
261
|
+
r++;
|
|
262
|
+
e.splice(r, 0, { seq: p, name: c }), a = r;
|
|
263
|
+
for (let d of i)
|
|
264
|
+
d.field >= a && d.field++;
|
|
265
|
+
}
|
|
266
|
+
for (let r of i)
|
|
267
|
+
if (r.line == n.length && r.from > l.index) {
|
|
268
|
+
let d = l[2] ? 3 + (l[1] || "").length : 2;
|
|
269
|
+
r.from -= d, r.to -= d;
|
|
270
|
+
}
|
|
271
|
+
i.push(new X(a, n.length, l.index, l.index + c.length)), f = f.slice(0, l.index) + s + f.slice(l.index + l[0].length);
|
|
272
|
+
}
|
|
273
|
+
f = f.replace(/\\([{}])/g, (p, s, a) => {
|
|
274
|
+
for (let c of i)
|
|
275
|
+
c.line == n.length && c.from > a && (c.from--, c.to--);
|
|
276
|
+
return s;
|
|
277
|
+
}), n.push(f);
|
|
278
|
+
}
|
|
279
|
+
return new I(n, i);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
let M = /* @__PURE__ */ g.widget({ widget: /* @__PURE__ */ new class extends B {
|
|
283
|
+
toDOM() {
|
|
284
|
+
let o = document.createElement("span");
|
|
285
|
+
return o.className = "cm-snippetFieldPosition", o;
|
|
286
|
+
}
|
|
287
|
+
ignoreEvent() {
|
|
288
|
+
return !1;
|
|
289
|
+
}
|
|
290
|
+
}() }), N = /* @__PURE__ */ g.mark({ class: "cm-snippetField" });
|
|
291
|
+
class m {
|
|
292
|
+
constructor(t, e) {
|
|
293
|
+
this.ranges = t, this.active = e, this.deco = g.set(t.map((n) => (n.from == n.to ? M : N).range(n.from, n.to)), !0);
|
|
294
|
+
}
|
|
295
|
+
map(t) {
|
|
296
|
+
let e = [];
|
|
297
|
+
for (let n of this.ranges) {
|
|
298
|
+
let i = n.map(t);
|
|
299
|
+
if (!i)
|
|
300
|
+
return null;
|
|
301
|
+
e.push(i);
|
|
302
|
+
}
|
|
303
|
+
return new m(e, this.active);
|
|
304
|
+
}
|
|
305
|
+
selectionInsideField(t) {
|
|
306
|
+
return t.ranges.every((e) => this.ranges.some((n) => n.field == this.active && n.from <= e.from && n.to >= e.to));
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
const h = /* @__PURE__ */ x.define({
|
|
310
|
+
map(o, t) {
|
|
311
|
+
return o && o.map(t);
|
|
312
|
+
}
|
|
313
|
+
}), Y = /* @__PURE__ */ x.define(), u = /* @__PURE__ */ A.define({
|
|
314
|
+
create() {
|
|
315
|
+
return null;
|
|
316
|
+
},
|
|
317
|
+
update(o, t) {
|
|
318
|
+
for (let e of t.effects) {
|
|
319
|
+
if (e.is(h))
|
|
320
|
+
return e.value;
|
|
321
|
+
if (e.is(Y) && o)
|
|
322
|
+
return new m(o.ranges, e.value);
|
|
323
|
+
}
|
|
324
|
+
return o && t.docChanged && (o = o.map(t.changes)), o && t.selection && !o.selectionInsideField(t.selection) && (o = null), o;
|
|
325
|
+
},
|
|
326
|
+
provide: (o) => w.decorations.from(o, (t) => t ? t.deco : g.none)
|
|
327
|
+
});
|
|
328
|
+
function v(o, t) {
|
|
329
|
+
return y.create(o.filter((e) => e.field == t).map((e) => y.range(e.from, e.to)));
|
|
330
|
+
}
|
|
331
|
+
function G(o) {
|
|
332
|
+
let t = I.parse(o);
|
|
333
|
+
return (e, n, i, l) => {
|
|
334
|
+
let { text: f, ranges: p } = t.instantiate(e.state, i), { main: s } = e.state.selection, a = {
|
|
335
|
+
changes: { from: i, to: l == s.from ? s.to : l, insert: E.of(f) },
|
|
336
|
+
scrollIntoView: !0,
|
|
337
|
+
annotations: n ? [V.of(n), O.userEvent.of("input.complete")] : void 0
|
|
338
|
+
};
|
|
339
|
+
if (p.length && (a.selection = v(p, 0)), p.some((c) => c.field > 0)) {
|
|
340
|
+
let c = new m(p, 0), r = a.effects = [h.of(c)];
|
|
341
|
+
e.state.field(u, !1) === void 0 && r.push(x.appendConfig.of([u, Z, _, W]));
|
|
342
|
+
}
|
|
343
|
+
e.dispatch(e.state.update(a));
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
function D(o) {
|
|
347
|
+
return ({ state: t, dispatch: e }) => {
|
|
348
|
+
let n = t.field(u, !1);
|
|
349
|
+
if (!n || o < 0 && n.active == 0)
|
|
350
|
+
return !1;
|
|
351
|
+
let i = n.active + o, l = o > 0 && !n.ranges.some((f) => f.field == i + o);
|
|
352
|
+
return e(t.update({
|
|
353
|
+
selection: v(n.ranges, i),
|
|
354
|
+
effects: h.of(l ? null : new m(n.ranges, i)),
|
|
355
|
+
scrollIntoView: !0
|
|
356
|
+
})), !0;
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
const J = ({ state: o, dispatch: t }) => o.field(u, !1) ? (t(o.update({ effects: h.of(null) })), !0) : !1, K = /* @__PURE__ */ D(1), Q = /* @__PURE__ */ D(-1), U = [
|
|
360
|
+
{ key: "Tab", run: K, shift: Q },
|
|
361
|
+
{ key: "Escape", run: J }
|
|
362
|
+
], S = /* @__PURE__ */ z.define({
|
|
363
|
+
combine(o) {
|
|
364
|
+
return o.length ? o[0] : U;
|
|
365
|
+
}
|
|
366
|
+
}), Z = /* @__PURE__ */ R.highest(/* @__PURE__ */ q.compute([S], (o) => o.facet(S)));
|
|
367
|
+
function ie(o, t) {
|
|
368
|
+
return { ...t, apply: G(o) };
|
|
369
|
+
}
|
|
370
|
+
const _ = /* @__PURE__ */ w.domEventHandlers({
|
|
371
|
+
mousedown(o, t) {
|
|
372
|
+
let e = t.state.field(u, !1), n;
|
|
373
|
+
if (!e || (n = t.posAtCoords({ x: o.clientX, y: o.clientY })) == null)
|
|
374
|
+
return !1;
|
|
375
|
+
let i = e.ranges.find((l) => l.from <= n && l.to >= n);
|
|
376
|
+
return !i || i.field == e.active ? !1 : (t.dispatch({
|
|
377
|
+
selection: v(e.ranges, i.field),
|
|
378
|
+
effects: h.of(e.ranges.some((l) => l.field > i.field) ? new m(e.ranges, i.field) : null),
|
|
379
|
+
scrollIntoView: !0
|
|
380
|
+
}), !0);
|
|
381
|
+
}
|
|
382
|
+
}), F = /* @__PURE__ */ new class extends P {
|
|
383
|
+
}();
|
|
384
|
+
F.startSide = 1;
|
|
385
|
+
F.endSide = -1;
|
|
386
|
+
export {
|
|
387
|
+
ie as i,
|
|
388
|
+
ne as n,
|
|
389
|
+
oe as o,
|
|
390
|
+
te as t
|
|
391
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { E as l, x as p, J as n, u, P as e } from "./index-wcsJ2mym.js";
|
|
2
|
+
import { html as m } from "./index-qH2lMs0G-VT1Nd_LF.js";
|
|
3
|
+
import { javascriptLanguage as S } from "./index-D0svJS59-B1ELwWap.js";
|
|
4
|
+
import { w as b, H as r } from "./index-BuVm7ZG6-BZLKs8s6.js";
|
|
5
|
+
const c = /* @__PURE__ */ b.deserialize({
|
|
6
|
+
version: 14,
|
|
7
|
+
states: "%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",
|
|
8
|
+
stateData: "$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",
|
|
9
|
+
goto: "!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso",
|
|
10
|
+
nodeNames: "⚠ Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity",
|
|
11
|
+
maxTerm: 36,
|
|
12
|
+
nodeProps: [
|
|
13
|
+
["isolate", -3, 3, 13, 17, ""]
|
|
14
|
+
],
|
|
15
|
+
skippedNodes: [0],
|
|
16
|
+
repeatNodeCount: 4,
|
|
17
|
+
tokenData: "'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",
|
|
18
|
+
tokenizers: [6, 7, /* @__PURE__ */ new r("b~RP#q#rU~XP#q#r[~aOT~~", 17, 4), /* @__PURE__ */ new r("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~", 72, 2), /* @__PURE__ */ new r("[~RPwxU~ZOp~~", 11, 15), /* @__PURE__ */ new r("[~RPrsU~ZOn~~", 11, 14), /* @__PURE__ */ new r("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~", 66, 35), /* @__PURE__ */ new r("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~", 66, 33)],
|
|
19
|
+
topRules: { Content: [0, 1], Attribute: [1, 7] },
|
|
20
|
+
tokenPrec: 157
|
|
21
|
+
}), P = /* @__PURE__ */ S.parser.configure({
|
|
22
|
+
top: "SingleExpression"
|
|
23
|
+
}), o = /* @__PURE__ */ c.configure({
|
|
24
|
+
props: [
|
|
25
|
+
/* @__PURE__ */ u({
|
|
26
|
+
Text: e.content,
|
|
27
|
+
Is: e.definitionOperator,
|
|
28
|
+
AttributeName: e.attributeName,
|
|
29
|
+
VueAttributeName: e.keyword,
|
|
30
|
+
Identifier: e.variableName,
|
|
31
|
+
"AttributeValue ScriptAttributeValue": e.attributeValue,
|
|
32
|
+
Entity: e.character,
|
|
33
|
+
"{{ }}": e.brace,
|
|
34
|
+
"@ :": e.punctuation
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
}), i = { parser: P }, Q = /* @__PURE__ */ o.configure({
|
|
38
|
+
wrap: /* @__PURE__ */ n((O, t) => O.name == "InterpolationContent" ? i : null)
|
|
39
|
+
}), g = /* @__PURE__ */ o.configure({
|
|
40
|
+
wrap: /* @__PURE__ */ n((O, t) => O.name == "AttributeScript" ? i : null),
|
|
41
|
+
top: "Attribute"
|
|
42
|
+
}), y = { parser: Q }, X = { parser: g }, a = /* @__PURE__ */ m();
|
|
43
|
+
function s(O) {
|
|
44
|
+
return O.configure({
|
|
45
|
+
dialect: "selfClosing",
|
|
46
|
+
wrap: n(f)
|
|
47
|
+
}, "vue");
|
|
48
|
+
}
|
|
49
|
+
const R = /* @__PURE__ */ s(a.language);
|
|
50
|
+
function f(O, t) {
|
|
51
|
+
switch (O.name) {
|
|
52
|
+
case "Attribute":
|
|
53
|
+
return /^(@|:|v-)/.test(t.read(O.from, O.from + 2)) ? X : null;
|
|
54
|
+
case "Text":
|
|
55
|
+
return y;
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
function C(O = {}) {
|
|
60
|
+
let t = a;
|
|
61
|
+
if (O.base) {
|
|
62
|
+
if (O.base.language.name != "html" || !(O.base.language instanceof l))
|
|
63
|
+
throw new RangeError("The base option must be the result of calling html(...)");
|
|
64
|
+
t = O.base;
|
|
65
|
+
}
|
|
66
|
+
return new p(t.language == a.language ? R : s(t.language), [
|
|
67
|
+
t.support,
|
|
68
|
+
t.language.data.of({ closeBrackets: { brackets: ["{", '"'] } })
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
C as vue,
|
|
73
|
+
R as vueLanguage
|
|
74
|
+
};
|