@aiao/code-editor-react 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 +118 -2
  2. package/package.json +7 -4
  3. package/dist/apl-B2DGVGxc-Dd6D39pP.js +0 -76
  4. package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +0 -34
  5. package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +0 -95
  6. package/dist/asterisk-DS281yxp-B5eTWk_B.js +0 -271
  7. package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +0 -34
  8. package/dist/clike-BMALKCNj-Ck7Gc35_.js +0 -620
  9. package/dist/clojure-CCKyeQKf-N9sg777Z.js +0 -800
  10. package/dist/cmake-CuaCgAKt-BbEgXraO.js +0 -28
  11. package/dist/cobol-BlTKFDRj-CHCoWafp.js +0 -72
  12. package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +0 -179
  13. package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +0 -75
  14. package/dist/crystal-D309uH6_-DS6LrXoE.js +0 -217
  15. package/dist/css-BkF-NPzE-DiJu9Nkd.js +0 -1553
  16. package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +0 -68
  17. package/dist/d-BZcgY6La-KCW6-bIm.js +0 -127
  18. package/dist/diff-Cg9d_RX2-C01qBVFc.js +0 -18
  19. package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +0 -194
  20. package/dist/dtd-CtLokQ-U-DCbNdeIA.js +0 -84
  21. package/dist/dylan-QYeExnWK-DIUVpsct.js +0 -234
  22. package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +0 -78
  23. package/dist/ecl-CiXN-g_D-DOI-W0if.js +0 -121
  24. package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +0 -110
  25. package/dist/elm-CNT9vbN0-BcYlydpO.js +0 -108
  26. package/dist/erlang-CFOYdy9e-DULXsFZl.js +0 -487
  27. package/dist/factor-Clf6BoVk-DBb2EHMF.js +0 -65
  28. package/dist/fcl-CPC2WYrI-CuXG3fcK.js +0 -103
  29. package/dist/forth-BmxRyE9S-BcFwWpeL.js +0 -60
  30. package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +0 -442
  31. package/dist/gas-cpmYfFX2-sZgGhMxB.js +0 -183
  32. package/dist/gherkin-CJuwpceU-BRrr8yjO.js +0 -34
  33. package/dist/groovy-DZeT_VM--CmF8wcSo.js +0 -146
  34. package/dist/haskell-CxiO_7JL-BuULsXvv.js +0 -375
  35. package/dist/haxe-70NVW1pR-CM27SfgM.js +0 -359
  36. package/dist/http-D9LttvKF-j9E8oQ7o.js +0 -44
  37. package/dist/idl-B6TRFYjl-B6TRFYjl.js +0 -947
  38. package/dist/index-BMiCCEB1-CFMNJD60.js +0 -305
  39. package/dist/index-BNuasEBW-DZ41gDvf.js +0 -94
  40. package/dist/index-Bg1KDWyt-C0dA4q7z.js +0 -290
  41. package/dist/index-BuVm7ZG6-CVgdIGdI.js +0 -1305
  42. package/dist/index-BvS1cnHq-CvzF_kJP.js +0 -613
  43. package/dist/index-C44L0DmY-y7wRzM46.js +0 -138
  44. package/dist/index-C71CZfUx-BtWSxfva.js +0 -247
  45. package/dist/index-CGKWrtgc.js +0 -29766
  46. package/dist/index-CQ6JWNwi-DowNkPcb.js +0 -566
  47. package/dist/index-CpRVx97--DylNh-Zi.js +0 -342
  48. package/dist/index-CqvQj6d--nBAN1vpF.js +0 -270
  49. package/dist/index-CrbQBmWq-DmiRVF9u.js +0 -157
  50. package/dist/index-CzovO10m-DDglzqnG.js +0 -301
  51. package/dist/index-D0BZOY-S-rNSlBO9l.js +0 -101
  52. package/dist/index-D0svJS59-f8ZA2hgC.js +0 -555
  53. package/dist/index-D93XVMi1-CZ_Q2QZM.js +0 -136
  54. package/dist/index-DEB5VK0f-iiwOciBu.js +0 -252
  55. package/dist/index-Dp8osI_J-DDFW8XvK.js +0 -960
  56. package/dist/index-Ds4AioqO-Cg_BlAEI.js +0 -1917
  57. package/dist/index-Dy-OpkyQ-DcLuBsQT.js +0 -76
  58. package/dist/index-Dyi9rNIT-B7p7Dpus.js +0 -391
  59. package/dist/index-ZJkjD9tT-DJQk0ayW.js +0 -74
  60. package/dist/index-qH2lMs0G-Co53S8h3.js +0 -944
  61. package/dist/index-srIksFxX-BLrX1cGK.js +0 -59
  62. package/dist/javascript-DOuB9oqA-BxiygWgm.js +0 -691
  63. package/dist/julia-DpvXAuO6-Bk_IfD8X.js +0 -241
  64. package/dist/livescript-CanGTf8u-Cx6PrvS4.js +0 -272
  65. package/dist/lua-XplVlWi_-8f8obHzY.js +0 -217
  66. package/dist/mathematica-jaRHnSxC-B83gQsL2.js +0 -35
  67. package/dist/mbox-BctzC1hL-Hg5U2B4l.js +0 -76
  68. package/dist/mirc-CFBPAOaF-CfzSSk9W.js +0 -72
  69. package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +0 -272
  70. package/dist/modelica-vUgVs--1-BObVpYBg.js +0 -93
  71. package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +0 -104
  72. package/dist/mumps-CQoS1kWX-CkTUOQnt.js +0 -25
  73. package/dist/nginx-zDPm3Z74-DJk4KP7N.js +0 -87
  74. package/dist/nsis-BCLyjY7m-C2MffOQ3.js +0 -62
  75. package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +0 -79
  76. package/dist/octave-C8PmmSRH-DM5vTWlU.js +0 -143
  77. package/dist/oz-Ce8aN8oE-BcJM4SVy.js +0 -151
  78. package/dist/pascal-De0D6mP7-D7DGFFKL.js +0 -77
  79. package/dist/perl-B4bSCe1C-6aIa2glS.js +0 -915
  80. package/dist/pig-D24Z8EXi-BD-qt5FU.js +0 -54
  81. package/dist/powershell-DkYVfTzP-Blt1Rodi.js +0 -249
  82. package/dist/properties-Dn9wna3M-EOOwnCnk.js +0 -26
  83. package/dist/protobuf-BPIjwpzm-DAButU8_.js +0 -49
  84. package/dist/pug-TGXr6c5j-C9HfQ86E.js +0 -248
  85. package/dist/puppet-nyd4dhjf-CGzH5dsa.js +0 -45
  86. package/dist/python-BkR3uSy8-CjDnyp3B.js +0 -313
  87. package/dist/q-DyHZGnqm-DGuqeH_T.js +0 -86
  88. package/dist/r-LKEuhEGI-BFQhJnTP.js +0 -104
  89. package/dist/rpm-IznJm2Xc-CbZqrWCM.js +0 -57
  90. package/dist/ruby-CcYfvIk6-DzPSfSGo.js +0 -228
  91. package/dist/sas-7E8yHoCW-D726Uzkw.js +0 -105
  92. package/dist/scheme-DjibxsNh-Bp5gVFkm.js +0 -124
  93. package/dist/shell-C0C2sNA_-BTeYg6ir.js +0 -182
  94. package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +0 -72
  95. package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +0 -89
  96. package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +0 -48
  97. package/dist/solr-BNlsLglM-BM2OpfTI.js +0 -41
  98. package/dist/sparql-FarWu_Gb-FN_uQNd4.js +0 -197
  99. package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +0 -49
  100. package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +0 -278
  101. package/dist/stex-Du4h4KAU-QOov_zHj.js +0 -129
  102. package/dist/stylus-CAdqWld3-BcRBbBxD.js +0 -250
  103. package/dist/swift-DSxqR9R6-2Hz4NOoF.js +0 -230
  104. package/dist/tcl-xfoLljhY-DAZBRGQI.js +0 -81
  105. package/dist/textile-D1AWE-pc-DuiIfEnb.js +0 -295
  106. package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +0 -155
  107. package/dist/tiki-__Kn3CeS-CWcR9ib_.js +0 -181
  108. package/dist/toml-DWAmxCjl-CyJoDzs6.js +0 -56
  109. package/dist/troff-D2UO-fKf-DVoIzS-O.js +0 -35
  110. package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +0 -123
  111. package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +0 -88
  112. package/dist/turtle-xwJUxoPV-fs94wdNM.js +0 -80
  113. package/dist/vb-c2kQGd6--DU726qF0.js +0 -74
  114. package/dist/vbscript-1f_Dhg5H-DriA32xD.js +0 -324
  115. package/dist/velocity-DJd0pTTC-BG368IR6.js +0 -96
  116. package/dist/verilog-CiS1jyi5-giQA8J-e.js +0 -259
  117. package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +0 -106
  118. package/dist/webidl-CjfDENEo-BM8KXKJ5.js +0 -155
  119. package/dist/xquery-Ct6lEb4B-C5KDc61l.js +0 -422
  120. package/dist/yacas-C0absKBh-B82QJ76F.js +0 -73
  121. package/dist/z80-Pki2zAjW-B0IQoIbR.js +0 -61
@@ -1,76 +0,0 @@
1
- import { w as s } from "./index-BuVm7ZG6-CVgdIGdI.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-CGKWrtgc.js";
3
- const g = i({
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
- }), T = () => (a) => {
32
- try {
33
- JSON.parse(a.state.doc.toString());
34
- } catch (O) {
35
- if (!(O instanceof SyntaxError))
36
- throw O;
37
- const e = l(O, a.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(a, O) {
48
- let 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
- }
51
- const m = /* @__PURE__ */ P.define({
52
- name: "json",
53
- parser: /* @__PURE__ */ p.configure({
54
- props: [
55
- /* @__PURE__ */ o.add({
56
- Object: /* @__PURE__ */ t({ except: /^\s*\}/ }),
57
- Array: /* @__PURE__ */ t({ except: /^\s*\]/ })
58
- }),
59
- /* @__PURE__ */ Q.add({
60
- "Object Array": c
61
- })
62
- ]
63
- }),
64
- languageData: {
65
- closeBrackets: { brackets: ["[", "{", '"'] },
66
- indentOnInput: /^\s*[\}\]]$/
67
- }
68
- });
69
- function d() {
70
- return new n(m);
71
- }
72
- export {
73
- d as json,
74
- m as jsonLanguage,
75
- T as jsonParseLinter
76
- };
@@ -1,391 +0,0 @@
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-CGKWrtgc.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
- };
@@ -1,74 +0,0 @@
1
- import { E as l, x as p, J as n, u, P as e } from "./index-CGKWrtgc.js";
2
- import { html as m } from "./index-qH2lMs0G-Co53S8h3.js";
3
- import { javascriptLanguage as S } from "./index-D0svJS59-f8ZA2hgC.js";
4
- import { w as b, H as r } from "./index-BuVm7ZG6-CVgdIGdI.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
- };