@aiao/code-editor 0.0.8 → 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.
Files changed (121) hide show
  1. package/dist/index.js +101 -17
  2. package/package.json +4 -1
  3. package/dist/apl-B2DGVGxc.js +0 -76
  4. package/dist/asciiarmor-2LVJmxlE.js +0 -34
  5. package/dist/asn1-jKiBa2Ya.js +0 -95
  6. package/dist/asterisk-DS281yxp.js +0 -271
  7. package/dist/brainfuck-C_p9pTT8.js +0 -34
  8. package/dist/clike-BMALKCNj.js +0 -620
  9. package/dist/clojure-CCKyeQKf.js +0 -800
  10. package/dist/cmake-CuaCgAKt.js +0 -28
  11. package/dist/cobol-BlTKFDRj.js +0 -72
  12. package/dist/coffeescript-BVCvwO8I.js +0 -179
  13. package/dist/commonlisp-D_kxz07b.js +0 -75
  14. package/dist/crystal-D309uH6_.js +0 -217
  15. package/dist/css-BkF-NPzE.js +0 -1553
  16. package/dist/cypher-BMq4Fwjl.js +0 -68
  17. package/dist/d-BZcgY6La.js +0 -127
  18. package/dist/diff-Cg9d_RX2.js +0 -18
  19. package/dist/dockerfile-DFX8bq9N.js +0 -194
  20. package/dist/dtd-CtLokQ-U.js +0 -84
  21. package/dist/dylan-QYeExnWK.js +0 -234
  22. package/dist/ebnf-DUPDuY4r.js +0 -78
  23. package/dist/ecl-CiXN-g_D.js +0 -121
  24. package/dist/eiffel-yQhjl4T1.js +0 -110
  25. package/dist/elm-CNT9vbN0.js +0 -108
  26. package/dist/erlang-CFOYdy9e.js +0 -487
  27. package/dist/factor-Clf6BoVk.js +0 -65
  28. package/dist/fcl-CPC2WYrI.js +0 -103
  29. package/dist/forth-BmxRyE9S.js +0 -60
  30. package/dist/fortran-9bvPyrOW.js +0 -442
  31. package/dist/gas-cpmYfFX2.js +0 -183
  32. package/dist/gherkin-CJuwpceU.js +0 -34
  33. package/dist/groovy-DZeT_VM-.js +0 -146
  34. package/dist/haskell-CxiO_7JL.js +0 -375
  35. package/dist/haxe-70NVW1pR.js +0 -359
  36. package/dist/http-D9LttvKF.js +0 -44
  37. package/dist/idl-B6TRFYjl.js +0 -947
  38. package/dist/index-BMiCCEB1.js +0 -309
  39. package/dist/index-BNuasEBW.js +0 -94
  40. package/dist/index-Bg1KDWyt.js +0 -290
  41. package/dist/index-BuVm7ZG6.js +0 -1305
  42. package/dist/index-BvS1cnHq.js +0 -613
  43. package/dist/index-C44L0DmY.js +0 -138
  44. package/dist/index-C71CZfUx.js +0 -247
  45. package/dist/index-CQ6JWNwi.js +0 -566
  46. package/dist/index-CpRVx97-.js +0 -342
  47. package/dist/index-CqvQj6d-.js +0 -270
  48. package/dist/index-CrbQBmWq.js +0 -157
  49. package/dist/index-CzovO10m.js +0 -302
  50. package/dist/index-D0BZOY-S.js +0 -101
  51. package/dist/index-D0svJS59.js +0 -555
  52. package/dist/index-D93XVMi1.js +0 -136
  53. package/dist/index-DEB5VK0f.js +0 -252
  54. package/dist/index-DIaXGPFp.js +0 -12936
  55. package/dist/index-Dp8osI_J.js +0 -960
  56. package/dist/index-Ds4AioqO.js +0 -1918
  57. package/dist/index-Dy-OpkyQ.js +0 -76
  58. package/dist/index-Dyi9rNIT.js +0 -391
  59. package/dist/index-ZJkjD9tT.js +0 -74
  60. package/dist/index-qH2lMs0G.js +0 -945
  61. package/dist/index-srIksFxX.js +0 -59
  62. package/dist/javascript-DOuB9oqA.js +0 -691
  63. package/dist/julia-DpvXAuO6.js +0 -241
  64. package/dist/livescript-CanGTf8u.js +0 -272
  65. package/dist/lua-XplVlWi_.js +0 -217
  66. package/dist/mathematica-jaRHnSxC.js +0 -35
  67. package/dist/mbox-BctzC1hL.js +0 -76
  68. package/dist/mirc-CFBPAOaF.js +0 -72
  69. package/dist/mllike-BSnXJBGA.js +0 -272
  70. package/dist/modelica-vUgVs--1.js +0 -93
  71. package/dist/mscgen-Cpl0NYLN.js +0 -104
  72. package/dist/mumps-CQoS1kWX.js +0 -25
  73. package/dist/nginx-zDPm3Z74.js +0 -89
  74. package/dist/nsis-BCLyjY7m.js +0 -62
  75. package/dist/ntriples-CsNjv2QF.js +0 -79
  76. package/dist/octave-C8PmmSRH.js +0 -143
  77. package/dist/oz-Ce8aN8oE.js +0 -151
  78. package/dist/pascal-De0D6mP7.js +0 -77
  79. package/dist/perl-B4bSCe1C.js +0 -915
  80. package/dist/pig-D24Z8EXi.js +0 -54
  81. package/dist/powershell-DkYVfTzP.js +0 -249
  82. package/dist/properties-Dn9wna3M.js +0 -26
  83. package/dist/protobuf-BPIjwpzm.js +0 -49
  84. package/dist/pug-TGXr6c5j.js +0 -248
  85. package/dist/puppet-nyd4dhjf.js +0 -45
  86. package/dist/python-BkR3uSy8.js +0 -313
  87. package/dist/q-DyHZGnqm.js +0 -86
  88. package/dist/r-LKEuhEGI.js +0 -104
  89. package/dist/rpm-IznJm2Xc.js +0 -57
  90. package/dist/ruby-CcYfvIk6.js +0 -228
  91. package/dist/sas-7E8yHoCW.js +0 -105
  92. package/dist/scheme-DjibxsNh.js +0 -124
  93. package/dist/shell-C0C2sNA_.js +0 -182
  94. package/dist/sieve-Bwz7vjP5.js +0 -72
  95. package/dist/simple-mode-mNVtnu0l.js +0 -89
  96. package/dist/smalltalk-Bhddl2pB.js +0 -48
  97. package/dist/solr-BNlsLglM.js +0 -41
  98. package/dist/sparql-FarWu_Gb.js +0 -197
  99. package/dist/spreadsheet-C-cy4P5N.js +0 -49
  100. package/dist/sql-CfG5lQ3l.js +0 -282
  101. package/dist/stex-Du4h4KAU.js +0 -129
  102. package/dist/stylus-CAdqWld3.js +0 -250
  103. package/dist/swift-DSxqR9R6.js +0 -230
  104. package/dist/tcl-xfoLljhY.js +0 -81
  105. package/dist/textile-D1AWE-pc.js +0 -295
  106. package/dist/tiddlywiki-5wqsXtSk.js +0 -155
  107. package/dist/tiki-__Kn3CeS.js +0 -181
  108. package/dist/toml-DWAmxCjl.js +0 -58
  109. package/dist/troff-D2UO-fKf.js +0 -35
  110. package/dist/ttcn-Bsa4sfRm.js +0 -123
  111. package/dist/ttcn-cfg-Bac_acMi.js +0 -88
  112. package/dist/turtle-xwJUxoPV.js +0 -80
  113. package/dist/vb-c2kQGd6-.js +0 -74
  114. package/dist/vbscript-1f_Dhg5H.js +0 -324
  115. package/dist/velocity-DJd0pTTC.js +0 -96
  116. package/dist/verilog-CiS1jyi5.js +0 -262
  117. package/dist/vhdl-T9HkrbI2.js +0 -106
  118. package/dist/webidl-CjfDENEo.js +0 -155
  119. package/dist/xquery-Ct6lEb4B.js +0 -422
  120. package/dist/yacas-C0absKBh.js +0 -73
  121. package/dist/z80-Pki2zAjW.js +0 -61
@@ -1,76 +0,0 @@
1
- import { L as s } from "./index-BuVm7ZG6.js";
2
- import { s as n, t as r, a as o, L as P, i as Q, f as i, c as a, d as c } from "./index-DIaXGPFp.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
- }), R = () => (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
- R as jsonParseLinter
76
- };
@@ -1,391 +0,0 @@
1
- import { b as E, C as T, F as L, G as A, S as x, H as D, o as O, E as w, w as P, e as k, J as g, q as M, K as R, M as v, W as B, R as W } from "./index-DIaXGPFp.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 = E(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(q(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 S(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 = S(t) + S(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 = E(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 q(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 H = /* @__PURE__ */ T.define(), V = /* @__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 z {
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, v.TrackDel), n = t.mapPos(this.to, 1, v.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 r of this.lines) {
240
- if (n.length) {
241
- let a = f, c = /^\t*/.exec(r)[0].length;
242
- for (let s = 0; s < c; s++)
243
- a += t.facet(P);
244
- i.push(e + a.length - c), r = a + r.slice(c);
245
- }
246
- n.push(r), e += r.length + 1;
247
- }
248
- let p = this.fieldPositions.map((r) => new b(r.field, i[r.line] + r.from, i[r.line] + r.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, r = l[2] || l[3] || "", a = -1, c = r.replace(/\\[{}]/g, (s) => s[1]);
256
- for (let s = 0; s < e.length; s++)
257
- (p != null ? e[s].seq == p : c && e[s].name == c) && (a = s);
258
- if (a < 0) {
259
- let s = 0;
260
- for (; s < e.length && (p == null || e[s].seq != null && e[s].seq < p); )
261
- s++;
262
- e.splice(s, 0, { seq: p, name: c }), a = s;
263
- for (let d of i)
264
- d.field >= a && d.field++;
265
- }
266
- for (let s of i)
267
- if (s.line == n.length && s.from > l.index) {
268
- let d = l[2] ? 3 + (l[1] || "").length : 2;
269
- s.from -= d, s.to -= d;
270
- }
271
- i.push(new z(a, n.length, l.index, l.index + c.length)), f = f.slice(0, l.index) + r + f.slice(l.index + l[0].length);
272
- }
273
- f = f.replace(/\\([{}])/g, (p, r, a) => {
274
- for (let c of i)
275
- c.line == n.length && c.from > a && (c.from--, c.to--);
276
- return r;
277
- }), n.push(f);
278
- }
279
- return new I(n, i);
280
- }
281
- }
282
- let K = /* @__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 ? K : 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
- }), X = /* @__PURE__ */ x.define(), u = /* @__PURE__ */ D.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(X) && 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 y(o, t) {
329
- return k.create(o.filter((e) => e.field == t).map((e) => k.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: r } = e.state.selection, a = {
335
- changes: { from: i, to: l == r.from ? r.to : l, insert: A.of(f) },
336
- scrollIntoView: !0,
337
- annotations: n ? [H.of(n), L.userEvent.of("input.complete")] : void 0
338
- };
339
- if (p.length && (a.selection = y(p, 0)), p.some((c) => c.field > 0)) {
340
- let c = new m(p, 0), s = a.effects = [h.of(c)];
341
- e.state.field(u, !1) === void 0 && s.push(x.appendConfig.of([u, Z, _, V]));
342
- }
343
- e.dispatch(e.state.update(a));
344
- };
345
- }
346
- function $(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: y(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, U = /* @__PURE__ */ $(1), Y = /* @__PURE__ */ $(-1), Q = [
360
- { key: "Tab", run: U, shift: Y },
361
- { key: "Escape", run: J }
362
- ], F = /* @__PURE__ */ R.define({
363
- combine(o) {
364
- return o.length ? o[0] : Q;
365
- }
366
- }), Z = /* @__PURE__ */ O.highest(/* @__PURE__ */ M.compute([F], (o) => o.facet(F)));
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: y(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
- }), C = /* @__PURE__ */ new class extends W {
383
- }();
384
- C.startSide = 1;
385
- C.endSide = -1;
386
- export {
387
- te as C,
388
- ne as c,
389
- oe as i,
390
- ie as s
391
- };
@@ -1,74 +0,0 @@
1
- import { a as p, L as u, p as n, s as l, t as e } from "./index-DIaXGPFp.js";
2
- import { html as m } from "./index-qH2lMs0G.js";
3
- import { javascriptLanguage as b } from "./index-D0svJS59.js";
4
- import { L as S, a as r } from "./index-BuVm7ZG6.js";
5
- const c = /* @__PURE__ */ S.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__ */ b.parser.configure({
22
- top: "SingleExpression"
23
- }), o = /* @__PURE__ */ c.configure({
24
- props: [
25
- /* @__PURE__ */ l({
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
- }), s = { parser: P }, Q = /* @__PURE__ */ o.configure({
38
- wrap: /* @__PURE__ */ n((O, t) => O.name == "InterpolationContent" ? s : null)
39
- }), g = /* @__PURE__ */ o.configure({
40
- wrap: /* @__PURE__ */ n((O, t) => O.name == "AttributeScript" ? s : null),
41
- top: "Attribute"
42
- }), y = { parser: Q }, R = { parser: g }, a = /* @__PURE__ */ m();
43
- function i(O) {
44
- return O.configure({
45
- dialect: "selfClosing",
46
- wrap: n(X)
47
- }, "vue");
48
- }
49
- const T = /* @__PURE__ */ i(a.language);
50
- function X(O, t) {
51
- switch (O.name) {
52
- case "Attribute":
53
- return /^(@|:|v-)/.test(t.read(O.from, O.from + 2)) ? R : null;
54
- case "Text":
55
- return y;
56
- }
57
- return null;
58
- }
59
- function d(O = {}) {
60
- let t = a;
61
- if (O.base) {
62
- if (O.base.language.name != "html" || !(O.base.language instanceof p))
63
- throw new RangeError("The base option must be the result of calling html(...)");
64
- t = O.base;
65
- }
66
- return new u(t.language == a.language ? T : i(t.language), [
67
- t.support,
68
- t.language.data.of({ closeBrackets: { brackets: ["{", '"'] } })
69
- ]);
70
- }
71
- export {
72
- d as vue,
73
- T as vueLanguage
74
- };