@arach/arc 0.4.5 → 0.6.0

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,77 @@
1
+ import { L as n } from "./index-CVhUGF67.js";
2
+ import { s as o, t as r } from "./index-CvsZLy9v.js";
3
+ import { LRLanguage as s, LanguageSupport as P, indentNodeProp as Q, foldNodeProp as i, continuedIndent as a, foldInside as c } from "./index-DBTOQDAV.js";
4
+ const g = o({
5
+ String: r.string,
6
+ Number: r.number,
7
+ "True False": r.bool,
8
+ PropertyName: r.propertyName,
9
+ Null: r.null,
10
+ ", :": r.separator,
11
+ "[ ]": r.squareBracket,
12
+ "{ }": r.brace
13
+ }), p = n.deserialize({
14
+ version: 14,
15
+ 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",
16
+ stateData: "#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",
17
+ goto: "!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
18
+ nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",
19
+ maxTerm: 25,
20
+ nodeProps: [
21
+ ["isolate", -2, 6, 11, ""],
22
+ ["openedBy", 7, "{", 14, "["],
23
+ ["closedBy", 8, "}", 15, "]"]
24
+ ],
25
+ propSources: [g],
26
+ skippedNodes: [0],
27
+ repeatNodeCount: 2,
28
+ 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~",
29
+ tokenizers: [0],
30
+ topRules: { JsonText: [0, 1] },
31
+ tokenPrec: 0
32
+ }), T = () => (t) => {
33
+ try {
34
+ JSON.parse(t.state.doc.toString());
35
+ } catch (O) {
36
+ if (!(O instanceof SyntaxError))
37
+ throw O;
38
+ const e = l(O, t.state.doc);
39
+ return [{
40
+ from: e,
41
+ message: O.message,
42
+ severity: "error",
43
+ to: e
44
+ }];
45
+ }
46
+ return [];
47
+ };
48
+ function l(t, O) {
49
+ let e;
50
+ 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;
51
+ }
52
+ const m = /* @__PURE__ */ s.define({
53
+ name: "json",
54
+ parser: /* @__PURE__ */ p.configure({
55
+ props: [
56
+ /* @__PURE__ */ Q.add({
57
+ Object: /* @__PURE__ */ a({ except: /^\s*\}/ }),
58
+ Array: /* @__PURE__ */ a({ except: /^\s*\]/ })
59
+ }),
60
+ /* @__PURE__ */ i.add({
61
+ "Object Array": c
62
+ })
63
+ ]
64
+ }),
65
+ languageData: {
66
+ closeBrackets: { brackets: ["[", "{", '"'] },
67
+ indentOnInput: /^\s*[\}\]]$/
68
+ }
69
+ });
70
+ function f() {
71
+ return new P(m);
72
+ }
73
+ export {
74
+ f as json,
75
+ m as jsonLanguage,
76
+ T as jsonParseLinter
77
+ };