@aiao/code-editor-vue 0.0.7

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.
@@ -0,0 +1,76 @@
1
+ import { L as s } from "./index-D6_k5ZgA.js";
2
+ import { s as n, t as r, a as o, L as P, i as Q, f as i, c as a, g as c } from "./index-3d5LPf68.js";
3
+ const g = n({
4
+ String: r.string,
5
+ Number: r.number,
6
+ "True False": r.bool,
7
+ PropertyName: r.propertyName,
8
+ Null: r.null,
9
+ ", :": r.separator,
10
+ "[ ]": r.squareBracket,
11
+ "{ }": r.brace
12
+ }), p = s.deserialize({
13
+ version: 14,
14
+ states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",
15
+ stateData: "#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",
16
+ goto: "!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
17
+ nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",
18
+ maxTerm: 25,
19
+ nodeProps: [
20
+ ["isolate", -2, 6, 11, ""],
21
+ ["openedBy", 7, "{", 14, "["],
22
+ ["closedBy", 8, "}", 15, "]"]
23
+ ],
24
+ propSources: [g],
25
+ skippedNodes: [0],
26
+ repeatNodeCount: 2,
27
+ tokenData: "(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",
28
+ tokenizers: [0],
29
+ topRules: { JsonText: [0, 1] },
30
+ tokenPrec: 0
31
+ }), d = () => (t) => {
32
+ try {
33
+ JSON.parse(t.state.doc.toString());
34
+ } catch (O) {
35
+ if (!(O instanceof SyntaxError))
36
+ throw O;
37
+ const e = l(O, t.state.doc);
38
+ return [{
39
+ from: e,
40
+ message: O.message,
41
+ severity: "error",
42
+ to: e
43
+ }];
44
+ }
45
+ return [];
46
+ };
47
+ function l(t, O) {
48
+ let e;
49
+ return (e = t.message.match(/at position (\d+)/)) ? Math.min(+e[1], O.length) : (e = t.message.match(/at line (\d+) column (\d+)/)) ? Math.min(O.line(+e[1]).from + +e[2] - 1, O.length) : 0;
50
+ }
51
+ const u = /* @__PURE__ */ o.define({
52
+ name: "json",
53
+ parser: /* @__PURE__ */ p.configure({
54
+ props: [
55
+ /* @__PURE__ */ Q.add({
56
+ Object: /* @__PURE__ */ a({ except: /^\s*\}/ }),
57
+ Array: /* @__PURE__ */ a({ except: /^\s*\]/ })
58
+ }),
59
+ /* @__PURE__ */ i.add({
60
+ "Object Array": c
61
+ })
62
+ ]
63
+ }),
64
+ languageData: {
65
+ closeBrackets: { brackets: ["[", "{", '"'] },
66
+ indentOnInput: /^\s*[\}\]]$/
67
+ }
68
+ });
69
+ function T() {
70
+ return new P(u);
71
+ }
72
+ export {
73
+ T as json,
74
+ u as jsonLanguage,
75
+ d as jsonParseLinter
76
+ };