@aiao/code-editor-react 0.0.9 → 0.0.11

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 +5 -5
  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-4oLq9F9B-CiG9J_wS.js +0 -944
  39. package/dist/index-9NH8hlZ--ZzqmPLCF.js +0 -342
  40. package/dist/index-BFXNCCbG-LloeVRnr.js +0 -253
  41. package/dist/index-BLHYcXXK-BxaAXMNw.js +0 -101
  42. package/dist/index-BQU3Rb2C-DeyQP3x_.js +0 -290
  43. package/dist/index-Bg18ePld-Di0FNEJ4.js +0 -157
  44. package/dist/index-Bp5lqnbN-BM2h2Xfi.js +0 -555
  45. package/dist/index-Bqzq8A1N-Dn1yj5KO.js +0 -59
  46. package/dist/index-Bx-s4g99-QIFA9lMK.js +0 -76
  47. package/dist/index-BxX25QmV-Cnf0cb51.js +0 -248
  48. package/dist/index-CFCzgc33-MPwtm3eY.js +0 -1917
  49. package/dist/index-CL7JTU9M-Bl8j0-fU.js +0 -136
  50. package/dist/index-CgClvcTI.js +0 -35617
  51. package/dist/index-CipmEceX-D1vXXSTd.js +0 -74
  52. package/dist/index-Cv4vvpa2-B8Ojlo_m.js +0 -1305
  53. package/dist/index-D4hhdPbZ-DXEZQFco.js +0 -6152
  54. package/dist/index-DhNQ8g9I-CjBYiskZ.js +0 -270
  55. package/dist/index-Djp53tAP-DnPgUG4S.js +0 -94
  56. package/dist/index-KlsAFhIj-Dzil0Vr8.js +0 -566
  57. package/dist/index-OntZqtu6-DPgaaGGJ.js +0 -305
  58. package/dist/index-PGnZjMCR-BPDty4q0.js +0 -301
  59. package/dist/index-TyYoYgss-BIjAZ6j1.js +0 -613
  60. package/dist/index-oMSPmlXA-CoPtKzNe.js +0 -960
  61. package/dist/index-rQC6Gbk0-BZ6M0IzM.js +0 -138
  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,305 +0,0 @@
1
- import { w as k, Y as G, Z as Y } from "./index-Cv4vvpa2-B8Ojlo_m.js";
2
- import { a as I, E as j, x as N, R as A, S as U, b as Z, n as B, r as D, u as F, P as g } from "./index-CgClvcTI.js";
3
- const b = 1, M = 2, K = 3, J = 4, H = 5, L = 36, OO = 37, eO = 38, tO = 11, oO = 13;
4
- function rO(O) {
5
- return O == 45 || O == 46 || O == 58 || O >= 65 && O <= 90 || O == 95 || O >= 97 && O <= 122 || O >= 161;
6
- }
7
- function nO(O) {
8
- return O == 9 || O == 10 || O == 13 || O == 32;
9
- }
10
- let y = null, X = null, V = 0;
11
- function W(O, e) {
12
- let o = O.pos + e;
13
- if (X == O && V == o) return y;
14
- for (; nO(O.peek(e)); ) e++;
15
- let t = "";
16
- for (; ; ) {
17
- let r = O.peek(e);
18
- if (!rO(r)) break;
19
- t += String.fromCharCode(r), e++;
20
- }
21
- return X = O, V = o, y = t || null;
22
- }
23
- function _(O, e) {
24
- this.name = O, this.parent = e;
25
- }
26
- const aO = new Y({
27
- start: null,
28
- shift(O, e, o, t) {
29
- return e == b ? new _(W(t, 1) || "", O) : O;
30
- },
31
- reduce(O, e) {
32
- return e == tO && O ? O.parent : O;
33
- },
34
- reuse(O, e, o, t) {
35
- let r = e.type.id;
36
- return r == b || r == oO ? new _(W(t, 1) || "", O) : O;
37
- },
38
- strict: !1
39
- }), lO = new G((O, e) => {
40
- if (O.next == 60) {
41
- if (O.advance(), O.next == 47) {
42
- O.advance();
43
- let o = W(O, 0);
44
- if (!o) return O.acceptToken(H);
45
- if (e.context && o == e.context.name) return O.acceptToken(M);
46
- for (let t = e.context; t; t = t.parent) if (t.name == o) return O.acceptToken(K, -2);
47
- O.acceptToken(J);
48
- } else if (O.next != 33 && O.next != 63)
49
- return O.acceptToken(b);
50
- }
51
- }, { contextual: !0 });
52
- function Q(O, e) {
53
- return new G((o) => {
54
- let t = 0, r = e.charCodeAt(0);
55
- O: for (; !(o.next < 0); o.advance(), t++)
56
- if (o.next == r) {
57
- for (let a = 1; a < e.length; a++)
58
- if (o.peek(a) != e.charCodeAt(a)) continue O;
59
- break;
60
- }
61
- t && o.acceptToken(O);
62
- });
63
- }
64
- const sO = Q(L, "-->"), iO = Q(OO, "?>"), cO = Q(eO, "]]>"), $O = F({
65
- Text: g.content,
66
- "StartTag StartCloseTag EndTag SelfCloseEndTag": g.angleBracket,
67
- TagName: g.tagName,
68
- "MismatchedCloseTag/TagName": [g.tagName, g.invalid],
69
- AttributeName: g.attributeName,
70
- AttributeValue: g.attributeValue,
71
- Is: g.definitionOperator,
72
- "EntityReference CharacterReference": g.character,
73
- Comment: g.blockComment,
74
- ProcessingInst: g.processingInstruction,
75
- DoctypeDecl: g.documentMeta,
76
- Cdata: g.special(g.string)
77
- }), SO = k.deserialize({
78
- version: 14,
79
- states: ",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dO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~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",
81
- goto: "%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",
82
- nodeNames: "⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",
83
- maxTerm: 50,
84
- context: aO,
85
- nodeProps: [
86
- ["closedBy", 1, "SelfCloseEndTag EndTag", 13, "CloseTag MissingCloseTag"],
87
- ["openedBy", 12, "StartTag StartCloseTag", 19, "OpenTag", 20, "StartTag"],
88
- ["isolate", -6, 13, 18, 19, 21, 22, 24, ""]
89
- ],
90
- propSources: [$O],
91
- skippedNodes: [0],
92
- repeatNodeCount: 9,
93
- tokenData: "!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q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k!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",
94
- tokenizers: [lO, sO, iO, cO, 0, 1, 2, 3, 4],
95
- topRules: { Document: [0, 6] },
96
- tokenPrec: 0
97
- });
98
- function P(O, e) {
99
- let o = e && e.getChild("TagName");
100
- return o ? O.sliceString(o.from, o.to) : "";
101
- }
102
- function v(O, e) {
103
- let o = e && e.firstChild;
104
- return !o || o.name != "OpenTag" ? "" : P(O, o);
105
- }
106
- function pO(O, e, o) {
107
- let t = e && e.getChildren("Attribute").find((a) => a.from <= o && a.to >= o), r = t && t.getChild("AttributeName");
108
- return r ? O.sliceString(r.from, r.to) : "";
109
- }
110
- function h(O) {
111
- for (let e = O && O.parent; e; e = e.parent)
112
- if (e.name == "Element")
113
- return e;
114
- return null;
115
- }
116
- function uO(O, e) {
117
- var o;
118
- let t = A(O).resolveInner(e, -1), r = null;
119
- for (let a = t; !r && a.parent; a = a.parent)
120
- (a.name == "OpenTag" || a.name == "CloseTag" || a.name == "SelfClosingTag" || a.name == "MismatchedCloseTag") && (r = a);
121
- if (r && (r.to > e || r.lastChild.type.isError)) {
122
- let a = r.parent;
123
- if (t.name == "TagName")
124
- return r.name == "CloseTag" || r.name == "MismatchedCloseTag" ? { type: "closeTag", from: t.from, context: a } : { type: "openTag", from: t.from, context: h(a) };
125
- if (t.name == "AttributeName")
126
- return { type: "attrName", from: t.from, context: r };
127
- if (t.name == "AttributeValue")
128
- return { type: "attrValue", from: t.from, context: r };
129
- let c = t == r || t.name == "Attribute" ? t.childBefore(e) : t;
130
- return c?.name == "StartTag" ? { type: "openTag", from: e, context: h(a) } : c?.name == "StartCloseTag" && c.to <= e ? { type: "closeTag", from: e, context: a } : c?.name == "Is" ? { type: "attrValue", from: e, context: r } : c ? { type: "attrName", from: e, context: r } : null;
131
- } else if (t.name == "StartCloseTag")
132
- return { type: "closeTag", from: e, context: t.parent };
133
- for (; t.parent && t.to == e && !(!((o = t.lastChild) === null || o === void 0) && o.type.isError); )
134
- t = t.parent;
135
- return t.name == "Element" || t.name == "Text" || t.name == "Document" ? { type: "tag", from: e, context: t.name == "Element" ? t : h(t) } : null;
136
- }
137
- class gO {
138
- constructor(e, o, t) {
139
- this.attrs = o, this.attrValues = t, this.children = [], this.name = e.name, this.completion = Object.assign(Object.assign({ type: "type" }, e.completion || {}), { label: this.name }), this.openCompletion = Object.assign(Object.assign({}, this.completion), { label: "<" + this.name }), this.closeCompletion = Object.assign(Object.assign({}, this.completion), { label: "</" + this.name + ">", boost: 2 }), this.closeNameCompletion = Object.assign(Object.assign({}, this.completion), { label: this.name + ">" }), this.text = e.textContent ? e.textContent.map((r) => ({ label: r, type: "text" })) : [];
140
- }
141
- }
142
- const C = /^[:\-\.\w\u00b7-\uffff]*$/;
143
- function R(O) {
144
- return Object.assign(Object.assign({ type: "property" }, O.completion || {}), { label: O.name });
145
- }
146
- function E(O) {
147
- return typeof O == "string" ? { label: `"${O}"`, type: "constant" } : /^"/.test(O.label) ? O : Object.assign(Object.assign({}, O), { label: `"${O.label}"` });
148
- }
149
- function mO(O, e) {
150
- let o = [], t = [], r = /* @__PURE__ */ Object.create(null);
151
- for (let n of e) {
152
- let $ = R(n);
153
- o.push($), n.global && t.push($), n.values && (r[n.name] = n.values.map(E));
154
- }
155
- let a = [], c = [], x = /* @__PURE__ */ Object.create(null);
156
- for (let n of O) {
157
- let $ = t, s = r;
158
- n.attributes && ($ = $.concat(n.attributes.map((l) => typeof l == "string" ? o.find((f) => f.label == l) || { label: l, type: "property" } : (l.values && (s == r && (s = Object.create(s)), s[l.name] = l.values.map(E)), R(l)))));
159
- let u = new gO(n, $, s);
160
- x[u.name] = u, a.push(u), n.top && c.push(u);
161
- }
162
- c.length || (c = a);
163
- for (let n = 0; n < a.length; n++) {
164
- let $ = O[n], s = a[n];
165
- if ($.children)
166
- for (let u of $.children)
167
- x[u] && s.children.push(x[u]);
168
- else
169
- s.children = a;
170
- }
171
- return (n) => {
172
- var $;
173
- let { doc: s } = n.state, u = uO(n.state, n.pos);
174
- if (!u || u.type == "tag" && !n.explicit)
175
- return null;
176
- let { type: l, from: f, context: S } = u;
177
- if (l == "openTag") {
178
- let i = c, p = v(s, S);
179
- return p && (i = x[p]?.children || a), {
180
- from: f,
181
- options: i.map((m) => m.completion),
182
- validFor: C
183
- };
184
- } else if (l == "closeTag") {
185
- let i = v(s, S);
186
- return i ? {
187
- from: f,
188
- to: n.pos + (s.sliceString(n.pos, n.pos + 1) == ">" ? 1 : 0),
189
- options: [(($ = x[i]) === null || $ === void 0 ? void 0 : $.closeNameCompletion) || { label: i + ">", type: "type" }],
190
- validFor: C
191
- } : null;
192
- } else if (l == "attrName") {
193
- let i = x[P(s, S)];
194
- return {
195
- from: f,
196
- options: i?.attrs || t,
197
- validFor: C
198
- };
199
- } else if (l == "attrValue") {
200
- let i = pO(s, S, f);
201
- if (!i)
202
- return null;
203
- let p = x[P(s, S)], m = (p?.attrValues || r)[i];
204
- return !m || !m.length ? null : {
205
- from: f,
206
- to: n.pos + (s.sliceString(n.pos, n.pos + 1) == '"' ? 1 : 0),
207
- options: m,
208
- validFor: /^"[^"]*"?$/
209
- };
210
- } else if (l == "tag") {
211
- let i = v(s, S), p = x[i], m = [], q = S && S.lastChild;
212
- i && (!q || q.name != "CloseTag" || P(s, q) != i) && m.push(p ? p.closeCompletion : { label: "</" + i + ">", type: "type", boost: 2 });
213
- let T = m.concat((p?.children || (S ? a : c)).map((d) => d.openCompletion));
214
- if (S && p?.text.length) {
215
- let d = S.firstChild;
216
- d.to > n.pos - 20 && !/\S/.test(n.state.sliceDoc(d.to, n.pos)) && (T = T.concat(p.text));
217
- }
218
- return {
219
- from: f,
220
- options: T,
221
- validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/
222
- };
223
- } else
224
- return null;
225
- };
226
- }
227
- const w = /* @__PURE__ */ j.define({
228
- name: "xml",
229
- parser: /* @__PURE__ */ SO.configure({
230
- props: [
231
- /* @__PURE__ */ Z.add({
232
- Element(O) {
233
- let e = /^\s*<\//.test(O.textAfter);
234
- return O.lineIndent(O.node.from) + (e ? 0 : O.unit);
235
- },
236
- "OpenTag CloseTag SelfClosingTag"(O) {
237
- return O.column(O.node.from) + O.unit;
238
- }
239
- }),
240
- /* @__PURE__ */ B.add({
241
- Element(O) {
242
- let e = O.firstChild, o = O.lastChild;
243
- return !e || e.name != "OpenTag" ? null : { from: e.to, to: o.name == "CloseTag" ? o.from : O.to };
244
- }
245
- }),
246
- /* @__PURE__ */ D.add({
247
- "OpenTag CloseTag": (O) => O.getChild("TagName")
248
- })
249
- ]
250
- }),
251
- languageData: {
252
- commentTokens: { block: { open: "<!--", close: "-->" } },
253
- indentOnInput: /^\s*<\/$/
254
- }
255
- });
256
- function dO(O = {}) {
257
- let e = [w.data.of({
258
- autocomplete: mO(O.elements || [], O.attributes || [])
259
- })];
260
- return O.autoCloseTags !== !1 && e.push(xO), new N(w, e);
261
- }
262
- function z(O, e, o = O.length) {
263
- if (!e)
264
- return "";
265
- let t = e.firstChild, r = t && t.getChild("TagName");
266
- return r ? O.sliceString(r.from, Math.min(r.to, o)) : "";
267
- }
268
- const xO = /* @__PURE__ */ I.inputHandler.of((O, e, o, t, r) => {
269
- if (O.composing || O.state.readOnly || e != o || t != ">" && t != "/" || !w.isActiveAt(O.state, e, -1))
270
- return !1;
271
- let a = r(), { state: c } = a, x = c.changeByRange((n) => {
272
- var $, s, u;
273
- let { head: l } = n, f = c.doc.sliceString(l - 1, l) == t, S = A(c).resolveInner(l, -1), i;
274
- if (f && t == ">" && S.name == "EndTag") {
275
- let p = S.parent;
276
- if (((s = ($ = p.parent) === null || $ === void 0 ? void 0 : $.lastChild) === null || s === void 0 ? void 0 : s.name) != "CloseTag" && (i = z(c.doc, p.parent, l))) {
277
- let m = l + (c.doc.sliceString(l, l + 1) === ">" ? 1 : 0), q = `</${i}>`;
278
- return { range: n, changes: { from: l, to: m, insert: q } };
279
- }
280
- } else if (f && t == "/" && S.name == "StartCloseTag") {
281
- let p = S.parent;
282
- if (S.from == l - 2 && ((u = p.lastChild) === null || u === void 0 ? void 0 : u.name) != "CloseTag" && (i = z(c.doc, p, l))) {
283
- let m = l + (c.doc.sliceString(l, l + 1) === ">" ? 1 : 0), q = `${i}>`;
284
- return {
285
- range: U.cursor(l + q.length, -1),
286
- changes: { from: l, to: m, insert: q }
287
- };
288
- }
289
- }
290
- return { range: n };
291
- });
292
- return x.changes.empty ? !1 : (O.dispatch([
293
- a,
294
- c.update(x, {
295
- userEvent: "input.complete",
296
- scrollIntoView: !0
297
- })
298
- ]), !0);
299
- });
300
- export {
301
- xO as autoCloseTags,
302
- mO as completeFromSchema,
303
- dO as xml,
304
- w as xmlLanguage
305
- };