@marimo-team/islands 0.17.5 → 0.17.6

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 (68) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DGGP9Mxg.js → ConnectedDataExplorerComponent-BC1bAfWX.js} +3 -3
  2. package/dist/{any-language-editor-Bs2c1bKU.js → any-language-editor-BpWjHMW2.js} +22 -22
  3. package/dist/{dist-DlSZED-1.js → dist-1NPzctn9.js} +2 -2
  4. package/dist/{dist-qGpLTiEi.js → dist-59eZyXwa.js} +3 -3
  5. package/dist/dist-8Gr13wFT.js +6 -0
  6. package/dist/{dist-D4LUTYHc.js → dist-8IZEIZE_.js} +2 -2
  7. package/dist/dist-BA1Ol0Yn.js +6 -0
  8. package/dist/{dist-DzKKEoge.js → dist-BGBHvY7x.js} +3 -3
  9. package/dist/{dist-8v4BI_h_.js → dist-BJKL0WEK.js} +1 -1
  10. package/dist/{dist-B3CNaJau.js → dist-BPwzuLH_.js} +119 -119
  11. package/dist/{dist-D08oiinq.js → dist-BRfGeCYG.js} +77 -77
  12. package/dist/{dist-CxRajUZ6.js → dist-BXNAv-Y6.js} +1 -1
  13. package/dist/{dist-7CqcJssH.js → dist-BZrCuBDi.js} +6 -6
  14. package/dist/{dist-C02gS--y.js → dist-Bevt_gzr.js} +41 -41
  15. package/dist/{dist-DGKjHTv9.js → dist-C1xRKkqR.js} +5 -5
  16. package/dist/{dist-DSDOMDNR.js → dist-C8SV9SiM.js} +4 -4
  17. package/dist/{dist-HKzG1oF6.js → dist-CCFXVP1F.js} +1 -1
  18. package/dist/{dist-BgsDu-bU.js → dist-CLkbwjpG.js} +1 -1
  19. package/dist/{dist-BMhv6XDi.js → dist-CP1MdHH-.js} +27 -27
  20. package/dist/{dist-Dh7gw0Ay.js → dist-CWyLmhAN.js} +2 -2
  21. package/dist/{dist-CXimnGhI.js → dist-C_BPvPwx.js} +2 -2
  22. package/dist/dist-CbNrcsEy.js +10 -0
  23. package/dist/{dist-DiO9ni9a.js → dist-Cba8uTcG.js} +2 -2
  24. package/dist/{dist-C5Ns3q-m.js → dist-Cf1Q6zai.js} +31 -31
  25. package/dist/{dist-_tHnp24J.js → dist-CiMy2-5u.js} +3 -3
  26. package/dist/dist-CkXa7yhd.js +10 -0
  27. package/dist/dist-CoHj7yHI.js +6 -0
  28. package/dist/{dist-XkGsOiy0.js → dist-CqG4DwQn.js} +2 -2
  29. package/dist/{dist-owpR56zn.js → dist-Ct4F6_s2.js} +1 -1
  30. package/dist/{dist-DTNqkRGE.js → dist-DG9oMdD2.js} +3 -3
  31. package/dist/{dist-CawOxmKh.js → dist-DKdtgJ4Q.js} +5 -5
  32. package/dist/{dist-K_AqLCfS.js → dist-DQOkkAzs.js} +3 -3
  33. package/dist/dist-DVuYVZws.js +6 -0
  34. package/dist/{dist-DvsjKDQ4.js → dist-DgnYtm7R.js} +1 -1
  35. package/dist/dist-DjH2J8yO.js +6 -0
  36. package/dist/{dist-DGnWQOnS.js → dist-Djl1P_Vh.js} +3 -3
  37. package/dist/{dist-DbHWFmjZ.js → dist-Kh7kDIJB.js} +1 -1
  38. package/dist/dist-MCqj0bEP.js +12 -0
  39. package/dist/{dist-eSnWVS11.js → dist-k6dhIy0O.js} +3 -3
  40. package/dist/dist-l9YJLCkC.js +6 -0
  41. package/dist/{dist-BYS0EtbC.js → dist-m4uUGntS.js} +2 -2
  42. package/dist/{dist-D_GkrgWD.js → dist-qXlX_Isq.js} +2 -2
  43. package/dist/{dist-CBu8cgzz.js → dist-t5bQPtMZ.js} +43 -45
  44. package/dist/{esm-CQIOyi5v.js → esm-HxIp3fzy.js} +1387 -1435
  45. package/dist/{formats-kyFd0DPJ.js → formats-b5g0iERd.js} +1 -1
  46. package/dist/{glide-data-editor-1bUl_mRe.js → glide-data-editor-hF8NzJm2.js} +2 -2
  47. package/dist/main.js +64 -1053
  48. package/dist/{mermaid-DIjoC4T4.js → mermaid-BAe4A_1z.js} +2 -2
  49. package/dist/{spec-rqRnkIf4.js → spec-9eipa51K.js} +1 -1
  50. package/dist/{types-Bt7p5SYB.js → types-O1gHduIo.js} +1 -1
  51. package/dist/{useAsyncData-Dp2V69OV.js → useAsyncData-D8_fNj6a.js} +1 -1
  52. package/dist/{useTheme-D7vlj42b.js → useTheme-BzICL4qs.js} +23 -24
  53. package/dist/{vega-component-_Sq_uxzm.js → vega-component-B26vOtT-.js} +3 -3
  54. package/package.json +1 -1
  55. package/src/components/app-config/data-form.tsx +3 -3
  56. package/src/core/codemirror/language/languages/sql/sql.ts +2 -1
  57. package/dist/dist-B9JCXzyv.js +0 -6
  58. package/dist/dist-C6QrJGYr.js +0 -10
  59. package/dist/dist-CFZ32udY.js +0 -6
  60. package/dist/dist-CmgxQNWN.js +0 -10
  61. package/dist/dist-Cr6Cu8sC.js +0 -6
  62. package/dist/dist-NxHLuq7w.js +0 -6
  63. package/dist/dist-S2JcqPPB.js +0 -12
  64. package/dist/dist-hcPlrsR9.js +0 -6
  65. package/dist/dist-poXa8G8m.js +0 -6
  66. package/dist/node-sql-parser-IKID_dZE.js +0 -70437
  67. /package/dist/{esm-CopBBL2y.js → esm-CS8JKDQL.js} +0 -0
  68. /package/dist/{react-plotly-Cs07wkly.js → react-plotly-YQqow0sD.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { $ as ViewPlugin, At as RangeSet, Ct as CharCategory, Dt as Facet, Ft as Text, Ht as fromCodePoint, I as syntaxTree, It as Transaction, Lt as codePointAt, Mt as RangeValue, Nt as StateEffect, Ot as MapMode, Pt as StateField, Rt as codePointSize, Tt as EditorSelection, X as Direction, Y as Decoration, Z as EditorView, at as getTooltip, bt as Annotation, dt as keymap, et as WidgetType, j as indentUnit, kt as Prec, pt as logException, vt as showTooltip, zt as combineConfig } from "./dist-CBu8cgzz.js";
1
+ import { $ as WidgetType, At as RangeValue, Bt as fromCodePoint, Ct as EditorSelection, Dt as Prec, Et as MapMode, Ft as codePointAt, I as syntaxTree, It as codePointSize, Lt as combineConfig, Mt as StateField, Nt as Text, Ot as RangeSet, Pt as Transaction, Q as ViewPlugin, Tt as Facet, X as Direction, Y as Decoration, Z as EditorView, dt as logException, gt as showTooltip, it as getTooltip, j as indentUnit, jt as StateEffect, lt as keymap, vt as Annotation, xt as CharCategory } from "./dist-t5bQPtMZ.js";
2
2
  var CompletionContext = class {
3
3
  constructor(r8, M, N, P) {
4
4
  this.state = r8, this.pos = M, this.explicit = N, this.view = P, this.abortListeners = [], this.abortOnDocChange = false;
@@ -74,19 +74,19 @@ function ensureAnchor(r8, M) {
74
74
  return !P && !F ? r8 : RegExp(`${P ? "^" : ""}(?:${N})${F ? "$" : ""}`, r8.flags ?? (r8.ignoreCase ? "i" : ""));
75
75
  }
76
76
  var pickedCompletion = /* @__PURE__ */ Annotation.define();
77
- function insertCompletionText(r8, M, N, P) {
78
- let { main: F } = r8.selection, I = N - F.from, L = P - F.from;
77
+ function insertCompletionText(r8, M, N, F) {
78
+ let { main: I } = r8.selection, L = N - I.from, R = F - I.from;
79
79
  return {
80
- ...r8.changeByRange((R) => {
81
- if (R != F && N != P && r8.sliceDoc(R.from + I, R.from + L) != r8.sliceDoc(N, P)) return { range: R };
82
- let z = r8.toText(M);
80
+ ...r8.changeByRange((z) => {
81
+ if (z != I && N != F && r8.sliceDoc(z.from + L, z.from + R) != r8.sliceDoc(N, F)) return { range: z };
82
+ let B = r8.toText(M);
83
83
  return {
84
84
  changes: {
85
- from: R.from + I,
86
- to: P == F.from ? R.to : R.from + L,
87
- insert: z
85
+ from: z.from + L,
86
+ to: F == I.from ? z.to : z.from + R,
87
+ insert: B
88
88
  },
89
- range: EditorSelection.cursor(R.from + I + z.length)
89
+ range: EditorSelection.cursor(z.from + L + B.length)
90
90
  };
91
91
  }),
92
92
  scrollIntoView: true,
@@ -116,31 +116,31 @@ var startCompletionEffect = /* @__PURE__ */ StateEffect.define(), closeCompletio
116
116
  match(r8) {
117
117
  if (this.pattern.length == 0) return this.ret(-100, []);
118
118
  if (r8.length < this.pattern.length) return null;
119
- let { chars: M, folded: N, any: P, precise: F, byWord: L } = this;
119
+ let { chars: M, folded: P, any: F, precise: I, byWord: R } = this;
120
120
  if (M.length == 1) {
121
- let P2 = codePointAt(r8, 0), F2 = codePointSize(P2), I = F2 == r8.length ? 0 : -100;
122
- if (P2 != M[0]) if (P2 == N[0]) I += -200;
121
+ let N = codePointAt(r8, 0), F2 = codePointSize(N), I2 = F2 == r8.length ? 0 : -100;
122
+ if (N != M[0]) if (N == P[0]) I2 += -200;
123
123
  else return null;
124
- return this.ret(I, [0, F2]);
124
+ return this.ret(I2, [0, F2]);
125
125
  }
126
- let R = r8.indexOf(this.pattern);
127
- if (R == 0) return this.ret(r8.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
128
- let B = M.length, V = 0;
129
- if (R < 0) {
130
- for (let F2 = 0, I = Math.min(r8.length, 200); F2 < I && V < B; ) {
131
- let I2 = codePointAt(r8, F2);
132
- (I2 == M[V] || I2 == N[V]) && (P[V++] = F2), F2 += codePointSize(I2);
126
+ let B = r8.indexOf(this.pattern);
127
+ if (B == 0) return this.ret(r8.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
128
+ let V = M.length, H = 0;
129
+ if (B < 0) {
130
+ for (let N = 0, I2 = Math.min(r8.length, 200); N < I2 && H < V; ) {
131
+ let I3 = codePointAt(r8, N);
132
+ (I3 == M[H] || I3 == P[H]) && (F[H++] = N), N += codePointSize(I3);
133
133
  }
134
- if (V < B) return null;
134
+ if (H < V) return null;
135
135
  }
136
- let H = 0, U = 0, G = false, K = 0, q = -1, J = -1, Y = /[a-z]/.test(r8), X = true;
137
- for (let P2 = 0, V2 = Math.min(r8.length, 200), Z = 0; P2 < V2 && U < B; ) {
138
- let V3 = codePointAt(r8, P2);
139
- R < 0 && (H < B && V3 == M[H] && (F[H++] = P2), K < B && (V3 == M[K] || V3 == N[K] ? (K == 0 && (q = P2), J = P2 + 1, K++) : K = 0));
140
- let Q, $ = V3 < 255 ? V3 >= 48 && V3 <= 57 || V3 >= 97 && V3 <= 122 ? 2 : V3 >= 65 && V3 <= 90 ? 1 : 0 : (Q = fromCodePoint(V3)) == Q.toLowerCase() ? Q == Q.toUpperCase() ? 0 : 2 : 1;
141
- (!P2 || $ == 1 && Y || Z == 0 && $ != 0) && (M[U] == V3 || N[U] == V3 && (G = true) ? L[U++] = P2 : L.length && (X = false)), Z = $, P2 += codePointSize(V3);
136
+ let U = 0, W = 0, G = false, K = 0, q = -1, J = -1, Y = /[a-z]/.test(r8), X = true;
137
+ for (let F2 = 0, H2 = Math.min(r8.length, 200), Z = 0; F2 < H2 && W < V; ) {
138
+ let H3 = codePointAt(r8, F2);
139
+ B < 0 && (U < V && H3 == M[U] && (I[U++] = F2), K < V && (H3 == M[K] || H3 == P[K] ? (K == 0 && (q = F2), J = F2 + 1, K++) : K = 0));
140
+ let Q, $ = H3 < 255 ? H3 >= 48 && H3 <= 57 || H3 >= 97 && H3 <= 122 ? 2 : H3 >= 65 && H3 <= 90 ? 1 : 0 : (Q = fromCodePoint(H3)) == Q.toLowerCase() ? Q == Q.toUpperCase() ? 0 : 2 : 1;
141
+ (!F2 || $ == 1 && Y || Z == 0 && $ != 0) && (M[W] == H3 || P[W] == H3 && (G = true) ? R[W++] = F2 : R.length && (X = false)), Z = $, F2 += codePointSize(H3);
142
142
  }
143
- return U == B && L[0] == 0 && X ? this.result(-100 + (G ? -200 : 0), L, r8) : K == B && q == 0 ? this.ret(-200 - r8.length + (J == r8.length ? 0 : -100), [0, J]) : R > -1 ? this.ret(-700 - r8.length, [R, R + this.pattern.length]) : K == B ? this.ret(-900 - r8.length, [q, J]) : U == B ? this.result(-100 + (G ? -200 : 0) + -700 + (X ? 0 : -1100), L, r8) : M.length == 2 ? null : this.result((P[0] ? -700 : 0) + -200 + -1100, P, r8);
143
+ return W == V && R[0] == 0 && X ? this.result(-100 + (G ? -200 : 0), R, r8) : K == V && q == 0 ? this.ret(-200 - r8.length + (J == r8.length ? 0 : -100), [0, J]) : B > -1 ? this.ret(-700 - r8.length, [B, B + this.pattern.length]) : K == V ? this.ret(-900 - r8.length, [q, J]) : W == V ? this.result(-100 + (G ? -200 : 0) + -700 + (X ? 0 : -1100), R, r8) : M.length == 2 ? null : this.result((F[0] ? -700 : 0) + -200 + -1100, F, r8);
144
144
  }
145
145
  result(r8, M, N) {
146
146
  let P = [], F = 0;
@@ -193,12 +193,12 @@ function joinClass(r8, M) {
193
193
  return r8 ? M ? r8 + " " + M : r8 : M;
194
194
  }
195
195
  function defaultPositionInfo(r8, M, N, P, F, I) {
196
- let L = r8.textDirection == Direction.RTL, R = L, z = false, B = "top", V, H, U = M.left - F.left, W = F.right - M.right, G = P.right - P.left, q = P.bottom - P.top;
197
- if (R && U < Math.min(G, W) ? R = false : !R && W < Math.min(G, U) && (R = true), G <= (R ? U : W)) V = Math.max(F.top, Math.min(N.top, F.bottom - q)) - M.top, H = Math.min(400, R ? U : W);
196
+ let L = r8.textDirection == Direction.RTL, R = L, z = false, B = "top", V, H, U = M.left - F.left, W = F.right - M.right, G = P.right - P.left, K = P.bottom - P.top;
197
+ if (R && U < Math.min(G, W) ? R = false : !R && W < Math.min(G, U) && (R = true), G <= (R ? U : W)) V = Math.max(F.top, Math.min(N.top, F.bottom - K)) - M.top, H = Math.min(400, R ? U : W);
198
198
  else {
199
199
  z = true, H = Math.min(400, (L ? M.right : F.right - M.left) - 30);
200
200
  let r9 = F.bottom - M.bottom;
201
- r9 >= q || r9 > M.top ? V = N.bottom - M.top : (B = "bottom", V = M.bottom - N.top);
201
+ r9 >= K || r9 > M.top ? V = N.bottom - M.top : (B = "bottom", V = M.bottom - N.top);
202
202
  }
203
203
  let J = (M.bottom - M.top) / I.offsetHeight, Y = (M.right - M.left) / I.offsetWidth;
204
204
  return {
@@ -895,18 +895,18 @@ function fieldSelection(r8, M) {
895
895
  }
896
896
  function snippet(r8) {
897
897
  let M = Snippet.parse(r8);
898
- return (r9, N, P, I) => {
899
- let { text: L, ranges: z } = M.instantiate(r9.state, P), { main: B } = r9.state.selection, H = {
898
+ return (r9, N, P, F) => {
899
+ let { text: I, ranges: L } = M.instantiate(r9.state, P), { main: R } = r9.state.selection, z = {
900
900
  changes: {
901
901
  from: P,
902
- to: I == B.from ? B.to : I,
903
- insert: Text.of(L)
902
+ to: F == R.from ? R.to : F,
903
+ insert: Text.of(I)
904
904
  },
905
905
  scrollIntoView: true,
906
906
  annotations: N ? [pickedCompletion.of(N), Transaction.userEvent.of("input.complete")] : void 0
907
907
  };
908
- if (z.length && (H.selection = fieldSelection(z, 0)), z.some((r10) => r10.field > 0)) {
909
- let M2 = new ActiveSnippet(z, 0), N2 = H.effects = [setActive.of(M2)];
908
+ if (L.length && (z.selection = fieldSelection(L, 0)), L.some((r10) => r10.field > 0)) {
909
+ let M2 = new ActiveSnippet(L, 0), N2 = z.effects = [setActive.of(M2)];
910
910
  r9.state.field(snippetState, false) === void 0 && N2.push(StateEffect.appendConfig.of([
911
911
  snippetState,
912
912
  addSnippetKeymap,
@@ -914,7 +914,7 @@ function snippet(r8) {
914
914
  baseTheme
915
915
  ]));
916
916
  }
917
- r9.dispatch(r9.state.update(H));
917
+ r9.dispatch(r9.state.update(z));
918
918
  };
919
919
  }
920
920
  function moveField(r8) {
@@ -1006,23 +1006,23 @@ var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(n
1006
1006
  key: "Backspace",
1007
1007
  run: ({ state: r8, dispatch: M }) => {
1008
1008
  if (r8.readOnly) return false;
1009
- let N = config(r8, r8.selection.main.head).brackets || defaults.brackets, P = null, F = r8.changeByRange((M2) => {
1009
+ let N = config(r8, r8.selection.main.head).brackets || defaults.brackets, F = null, I = r8.changeByRange((M2) => {
1010
1010
  if (M2.empty) {
1011
- let P2 = prevChar(r8.doc, M2.head);
1012
- for (let F2 of N) if (F2 == P2 && nextChar(r8.doc, M2.head) == closing(codePointAt(F2, 0))) return {
1011
+ let F2 = prevChar(r8.doc, M2.head);
1012
+ for (let I2 of N) if (I2 == F2 && nextChar(r8.doc, M2.head) == closing(codePointAt(I2, 0))) return {
1013
1013
  changes: {
1014
- from: M2.head - F2.length,
1015
- to: M2.head + F2.length
1014
+ from: M2.head - I2.length,
1015
+ to: M2.head + I2.length
1016
1016
  },
1017
- range: EditorSelection.cursor(M2.head - F2.length)
1017
+ range: EditorSelection.cursor(M2.head - I2.length)
1018
1018
  };
1019
1019
  }
1020
- return { range: P = M2 };
1020
+ return { range: F = M2 };
1021
1021
  });
1022
- return P || M(r8.update(F, {
1022
+ return F || M(r8.update(I, {
1023
1023
  scrollIntoView: true,
1024
1024
  userEvent: "delete.backward"
1025
- })), !P;
1025
+ })), !F;
1026
1026
  }
1027
1027
  }];
1028
1028
  function insertBracket(r8, M) {
@@ -1048,49 +1048,49 @@ function prevChar(r8, M) {
1048
1048
  let N = r8.sliceString(M - 2, M);
1049
1049
  return codePointSize(codePointAt(N, 0)) == N.length ? N : N.slice(1);
1050
1050
  }
1051
- function handleOpen(r8, M, N, P) {
1052
- let F = null, I = r8.changeByRange((I2) => {
1053
- if (!I2.empty) return {
1051
+ function handleOpen(r8, M, N, F) {
1052
+ let I = null, L = r8.changeByRange((L2) => {
1053
+ if (!L2.empty) return {
1054
1054
  changes: [{
1055
1055
  insert: M,
1056
- from: I2.from
1056
+ from: L2.from
1057
1057
  }, {
1058
1058
  insert: N,
1059
- from: I2.to
1059
+ from: L2.to
1060
1060
  }],
1061
- effects: closeBracketEffect.of(I2.to + M.length),
1062
- range: EditorSelection.range(I2.anchor + M.length, I2.head + M.length)
1061
+ effects: closeBracketEffect.of(L2.to + M.length),
1062
+ range: EditorSelection.range(L2.anchor + M.length, L2.head + M.length)
1063
1063
  };
1064
- let L = nextChar(r8.doc, I2.head);
1065
- return !L || /\s/.test(L) || P.indexOf(L) > -1 ? {
1064
+ let R = nextChar(r8.doc, L2.head);
1065
+ return !R || /\s/.test(R) || F.indexOf(R) > -1 ? {
1066
1066
  changes: {
1067
1067
  insert: M + N,
1068
- from: I2.head
1068
+ from: L2.head
1069
1069
  },
1070
- effects: closeBracketEffect.of(I2.head + M.length),
1071
- range: EditorSelection.cursor(I2.head + M.length)
1072
- } : { range: F = I2 };
1070
+ effects: closeBracketEffect.of(L2.head + M.length),
1071
+ range: EditorSelection.cursor(L2.head + M.length)
1072
+ } : { range: I = L2 };
1073
1073
  });
1074
- return F ? null : r8.update(I, {
1074
+ return I ? null : r8.update(L, {
1075
1075
  scrollIntoView: true,
1076
1076
  userEvent: "input.type"
1077
1077
  });
1078
1078
  }
1079
1079
  function handleClose(r8, M, N) {
1080
- let P = null, F = r8.changeByRange((M2) => M2.empty && nextChar(r8.doc, M2.head) == N ? {
1080
+ let F = null, I = r8.changeByRange((M2) => M2.empty && nextChar(r8.doc, M2.head) == N ? {
1081
1081
  changes: {
1082
1082
  from: M2.head,
1083
1083
  to: M2.head + N.length,
1084
1084
  insert: N
1085
1085
  },
1086
1086
  range: EditorSelection.cursor(M2.head + N.length)
1087
- } : P = { range: M2 });
1088
- return P ? null : r8.update(F, {
1087
+ } : F = { range: M2 });
1088
+ return F ? null : r8.update(I, {
1089
1089
  scrollIntoView: true,
1090
1090
  userEvent: "input.type"
1091
1091
  });
1092
1092
  }
1093
- function handleSame(r8, M, P, F) {
1093
+ function handleSame(r8, M, N, F) {
1094
1094
  let I = F.stringPrefixes || defaults.stringPrefixes, L = null, R = r8.changeByRange((F2) => {
1095
1095
  if (!F2.empty) return {
1096
1096
  changes: [{
@@ -1114,17 +1114,17 @@ function handleSame(r8, M, P, F) {
1114
1114
  range: EditorSelection.cursor(R2 + M.length)
1115
1115
  };
1116
1116
  if (closedBracketAt(r8, R2)) {
1117
- let N = P && r8.sliceDoc(R2, R2 + M.length * 3) == M + M + M ? M + M + M : M;
1117
+ let F3 = N && r8.sliceDoc(R2, R2 + M.length * 3) == M + M + M ? M + M + M : M;
1118
1118
  return {
1119
1119
  changes: {
1120
1120
  from: R2,
1121
- to: R2 + N.length,
1122
- insert: N
1121
+ to: R2 + F3.length,
1122
+ insert: F3
1123
1123
  },
1124
- range: EditorSelection.cursor(R2 + N.length)
1124
+ range: EditorSelection.cursor(R2 + F3.length)
1125
1125
  };
1126
1126
  }
1127
- } else if (P && r8.sliceDoc(R2 - 2 * M.length, R2) == M + M && (B = canStartStringAt(r8, R2 - 2 * M.length, I)) > -1 && nodeStart(r8, B)) return {
1127
+ } else if (N && r8.sliceDoc(R2 - 2 * M.length, R2) == M + M && (B = canStartStringAt(r8, R2 - 2 * M.length, I)) > -1 && nodeStart(r8, B)) return {
1128
1128
  changes: {
1129
1129
  insert: M + M + M + M,
1130
1130
  from: R2
@@ -1169,12 +1169,12 @@ function probablyInString(r8, M, N, P) {
1169
1169
  }
1170
1170
  return false;
1171
1171
  }
1172
- function canStartStringAt(r8, M, P) {
1173
- let F = r8.charCategorizer(M);
1174
- if (F(r8.sliceDoc(M - 1, M)) != CharCategory.Word) return M;
1175
- for (let I of P) {
1176
- let P2 = M - I.length;
1177
- if (r8.sliceDoc(P2, M) == I && F(r8.sliceDoc(P2 - 1, P2)) != CharCategory.Word) return P2;
1172
+ function canStartStringAt(r8, M, N) {
1173
+ let P = r8.charCategorizer(M);
1174
+ if (P(r8.sliceDoc(M - 1, M)) != CharCategory.Word) return M;
1175
+ for (let F of N) {
1176
+ let N2 = M - F.length;
1177
+ if (r8.sliceDoc(N2, M) == F && P(r8.sliceDoc(N2 - 1, N2)) != CharCategory.Word) return N2;
1178
1178
  }
1179
1179
  return -1;
1180
1180
  }
@@ -1,4 +1,4 @@
1
- import { B as tags$1, G as NodeWeakMap, I as syntaxTree, O as indentNodeProp, S as foldInside, V as IterMode, h as continuedIndent, i as LocalTokenGroup, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-CBu8cgzz.js";
1
+ import { B as tags$1, G as NodeWeakMap, I as syntaxTree, O as indentNodeProp, S as foldInside, V as IterMode, h as continuedIndent, i as LocalTokenGroup, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
2
2
  var descendantOp = 122, Unit = 1, identifier$1 = 123, callee = 124, VariableName = 2, queryIdentifier = 125, queryVariableName = 3, QueryCallee = 4, space = [
3
3
  9,
4
4
  10,
@@ -1,9 +1,9 @@
1
- import "./dist-CBu8cgzz.js";
2
- import "./dist-D08oiinq.js";
3
- import { a as markdownKeymap, i as markdown, n as deleteMarkupBackward, o as markdownLanguage, r as insertNewlineContinueMarkup, s as pasteURLAsLink, t as commonmarkLanguage } from "./dist-C02gS--y.js";
4
- import "./dist-C5Ns3q-m.js";
5
- import "./dist-CxRajUZ6.js";
6
- import "./dist-B3CNaJau.js";
1
+ import "./dist-t5bQPtMZ.js";
2
+ import "./dist-BRfGeCYG.js";
3
+ import { a as markdownKeymap, i as markdown, n as deleteMarkupBackward, o as markdownLanguage, r as insertNewlineContinueMarkup, s as pasteURLAsLink, t as commonmarkLanguage } from "./dist-Bevt_gzr.js";
4
+ import "./dist-Cf1Q6zai.js";
5
+ import "./dist-BXNAv-Y6.js";
6
+ import "./dist-BPwzuLH_.js";
7
7
  export {
8
8
  commonmarkLanguage,
9
9
  deleteMarkupBackward,
@@ -1,6 +1,6 @@
1
- import { B as tags, Bt as countColumn, Et as EditorState, H as NodeProp, I as syntaxTree, J as parseMixed, K as Parser, M as languageDataProp, O as indentNodeProp, R as Tag, T as foldService, Tt as EditorSelection, U as NodeSet, W as NodeType, Z as EditorView, _ as defineLanguageFacet, c as Language, d as ParseContext, dt as keymap, j as indentUnit, kt as Prec, l as LanguageDescription, q as Tree, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-CBu8cgzz.js";
2
- import { t as CompletionContext } from "./dist-D08oiinq.js";
3
- import { n as html, r as htmlCompletionSource } from "./dist-C5Ns3q-m.js";
1
+ import { B as tags, Ct as EditorSelection, Dt as Prec, H as NodeProp, I as syntaxTree, J as parseMixed, K as Parser, M as languageDataProp, O as indentNodeProp, R as Tag, Rt as countColumn, T as foldService, U as NodeSet, W as NodeType, Z as EditorView, _ as defineLanguageFacet, c as Language, d as ParseContext, j as indentUnit, l as LanguageDescription, lt as keymap, q as Tree, u as LanguageSupport, w as foldNodeProp, wt as EditorState, z as styleTags } from "./dist-t5bQPtMZ.js";
2
+ import { t as CompletionContext } from "./dist-BRfGeCYG.js";
3
+ import { n as html, r as htmlCompletionSource } from "./dist-Cf1Q6zai.js";
4
4
  var CompositeBlock = class u {
5
5
  static create(z, B, V, H, U) {
6
6
  return new u(z, B, V, H + (H << 8) + z + (B << 4) | 0, U, [], []);
@@ -1353,12 +1353,12 @@ function renumberList(u3, z, B, V = 0) {
1353
1353
  U = u4;
1354
1354
  }
1355
1355
  }
1356
- function normalizeIndent(u3, B) {
1357
- let V = /^[ \t]*/.exec(u3)[0].length;
1358
- if (!V || B.facet(indentUnit) != " ") return u3;
1359
- let H = countColumn(u3, 4, V), U = "";
1360
- for (let u4 = H; u4 > 0; ) u4 >= 4 ? (U += " ", u4 -= 4) : (U += " ", u4--);
1361
- return U + u3.slice(V);
1356
+ function normalizeIndent(u3, z) {
1357
+ let B = /^[ \t]*/.exec(u3)[0].length;
1358
+ if (!B || z.facet(indentUnit) != " ") return u3;
1359
+ let V = countColumn(u3, 4, B), H = "";
1360
+ for (let u4 = V; u4 > 0; ) u4 >= 4 ? (H += " ", u4 -= 4) : (H += " ", u4--);
1361
+ return H + u3.slice(B);
1362
1362
  }
1363
1363
  var insertNewlineContinueMarkup = ({ state: u3, dispatch: B }) => {
1364
1364
  let V = syntaxTree(u3), { doc: U } = u3, W = null, G = u3.changeByRange((B2) => {
@@ -1368,33 +1368,33 @@ var insertNewlineContinueMarkup = ({ state: u3, dispatch: B }) => {
1368
1368
  if (!K.length) return W = { range: B2 };
1369
1369
  let q = K[K.length - 1];
1370
1370
  if (q.to - q.spaceAfter.length > H - G2.from) return W = { range: B2 };
1371
- let J = H >= q.to - q.spaceAfter.length && !/\S/.test(G2.text.slice(q.to));
1372
- if (q.item && J) {
1373
- let z = q.node.firstChild, B3 = q.node.getChild("ListItem", "ListItem");
1374
- if (z.to >= H || B3 && B3.to < H || G2.from > 0 && !/[^\s>]/.test(U.lineAt(G2.from - 1).text)) {
1375
- let u4 = K.length > 1 ? K[K.length - 2] : null, z2, B4 = "";
1376
- u4 && u4.item ? (z2 = G2.from + u4.from, B4 = u4.marker(U, 1)) : z2 = G2.from + (u4 ? u4.to : 0);
1377
- let V2 = [{
1378
- from: z2,
1371
+ let Y = H >= q.to - q.spaceAfter.length && !/\S/.test(G2.text.slice(q.to));
1372
+ if (q.item && Y) {
1373
+ let B3 = q.node.firstChild, V2 = q.node.getChild("ListItem", "ListItem");
1374
+ if (B3.to >= H || V2 && V2.to < H || G2.from > 0 && !/[^\s>]/.test(U.lineAt(G2.from - 1).text)) {
1375
+ let u4 = K.length > 1 ? K[K.length - 2] : null, B4, V3 = "";
1376
+ u4 && u4.item ? (B4 = G2.from + u4.from, V3 = u4.marker(U, 1)) : B4 = G2.from + (u4 ? u4.to : 0);
1377
+ let W2 = [{
1378
+ from: B4,
1379
1379
  to: H,
1380
- insert: B4
1380
+ insert: V3
1381
1381
  }];
1382
- return q.node.name == "OrderedList" && renumberList(q.item, U, V2, -2), u4 && u4.node.name == "OrderedList" && renumberList(u4.item, U, V2), {
1383
- range: EditorSelection.cursor(z2 + B4.length),
1384
- changes: V2
1382
+ return q.node.name == "OrderedList" && renumberList(q.item, U, W2, -2), u4 && u4.node.name == "OrderedList" && renumberList(u4.item, U, W2), {
1383
+ range: EditorSelection.cursor(B4 + V3.length),
1384
+ changes: W2
1385
1385
  };
1386
1386
  } else {
1387
- let z2 = blankLine(K, u3, G2);
1387
+ let B4 = blankLine(K, u3, G2);
1388
1388
  return {
1389
- range: EditorSelection.cursor(H + z2.length + 1),
1389
+ range: EditorSelection.cursor(H + B4.length + 1),
1390
1390
  changes: {
1391
1391
  from: G2.from,
1392
- insert: z2 + u3.lineBreak
1392
+ insert: B4 + u3.lineBreak
1393
1393
  }
1394
1394
  };
1395
1395
  }
1396
1396
  }
1397
- if (q.node.name == "Blockquote" && J && G2.from) {
1397
+ if (q.node.name == "Blockquote" && Y && G2.from) {
1398
1398
  let z = U.lineAt(G2.from - 1), V2 = />\s*$/.exec(z.text);
1399
1399
  if (V2 && V2.index == q.from) {
1400
1400
  let H2 = u3.changes([{
@@ -1413,7 +1413,7 @@ var insertNewlineContinueMarkup = ({ state: u3, dispatch: B }) => {
1413
1413
  let X = [];
1414
1414
  q.node.name == "OrderedList" && renumberList(q.item, U, X);
1415
1415
  let Z = q.item && q.item.from < G2.from, Q = "";
1416
- if (!Z || /^[\s\d.)\-+*>]*/.exec(G2.text)[0].length >= q.to) for (let u4 = 0, B3 = K.length - 1; u4 <= B3; u4++) Q += u4 == B3 && !Z ? K[u4].marker(U, 1) : K[u4].blank(u4 < B3 ? countColumn(G2.text, 4, K[u4 + 1].from) - Q.length : null);
1416
+ if (!Z || /^[\s\d.)\-+*>]*/.exec(G2.text)[0].length >= q.to) for (let u4 = 0, z = K.length - 1; u4 <= z; u4++) Q += u4 == z && !Z ? K[u4].marker(U, 1) : K[u4].blank(u4 < z ? countColumn(G2.text, 4, K[u4 + 1].from) - Q.length : null);
1417
1417
  let $ = H;
1418
1418
  for (; $ > G2.from && /\s/.test(G2.text.charAt($ - G2.from - 1)); ) $--;
1419
1419
  return Q = normalizeIndent(Q, u3), nonTightList(q.node, u3.doc) && (Q = blankLine(K, u3, G2) + u3.lineBreak + Q), X.push({
@@ -1440,10 +1440,10 @@ function nonTightList(u3, z) {
1440
1440
  let H = z.lineAt(B.to), U = z.lineAt(V.from), W = /^[\s>]*$/.test(H.text);
1441
1441
  return H.number + (W ? 0 : 1) < U.number;
1442
1442
  }
1443
- function blankLine(u3, B, V) {
1444
- let H = "";
1445
- for (let B2 = 0, U = u3.length - 2; B2 <= U; B2++) H += u3[B2].blank(B2 < U ? countColumn(V.text, 4, u3[B2 + 1].from) - H.length : null, B2 < U);
1446
- return normalizeIndent(H, B);
1443
+ function blankLine(u3, z, B) {
1444
+ let V = "";
1445
+ for (let z2 = 0, H = u3.length - 2; z2 <= H; z2++) V += u3[z2].blank(z2 < H ? countColumn(B.text, 4, u3[z2 + 1].from) - V.length : null, z2 < H);
1446
+ return normalizeIndent(V, z);
1447
1447
  }
1448
1448
  function contextNodeForDelete(u3, z) {
1449
1449
  let B = u3.resolveInner(z, -1), V = z;
@@ -1504,17 +1504,17 @@ var deleteMarkupBackward = ({ state: u3, dispatch: B }) => {
1504
1504
  run: deleteMarkupBackward
1505
1505
  }], htmlNoMatch = /* @__PURE__ */ html({ matchClosingTags: false });
1506
1506
  function markdown(u3 = {}) {
1507
- let { codeLanguages: z, defaultCodeLanguage: B, addKeymap: V = true, base: { parser: H } = commonmarkLanguage, completeHTMLTags: U = true, pasteURLAsLink: W = true, htmlTagLanguage: G = htmlNoMatch } = u3;
1508
- if (!(H instanceof MarkdownParser)) throw RangeError("Base parser provided to `markdown` should be a Markdown parser");
1509
- let K = u3.extensions ? [u3.extensions] : [], q = [G.support, headerIndent], J;
1510
- W && q.push(pasteURLAsLink), B instanceof LanguageSupport ? (q.push(B.support), J = B.language) : B && (J = B);
1511
- let Y = z || J ? getCodeParser(z, J) : void 0;
1512
- K.push(parseCode({
1513
- codeParser: Y,
1514
- htmlParser: G.language.parser
1515
- })), V && q.push(Prec.high(keymap.of(markdownKeymap)));
1516
- let X = mkLang(H.configure(K));
1517
- return U && q.push(X.data.of({ autocomplete: htmlTagCompletion })), new LanguageSupport(X, q);
1507
+ let { codeLanguages: z, defaultCodeLanguage: V, addKeymap: H = true, base: { parser: U } = commonmarkLanguage, completeHTMLTags: W = true, pasteURLAsLink: G = true, htmlTagLanguage: K = htmlNoMatch } = u3;
1508
+ if (!(U instanceof MarkdownParser)) throw RangeError("Base parser provided to `markdown` should be a Markdown parser");
1509
+ let q = u3.extensions ? [u3.extensions] : [], J = [K.support, headerIndent], Y;
1510
+ G && J.push(pasteURLAsLink), V instanceof LanguageSupport ? (J.push(V.support), Y = V.language) : V && (Y = V);
1511
+ let X = z || Y ? getCodeParser(z, Y) : void 0;
1512
+ q.push(parseCode({
1513
+ codeParser: X,
1514
+ htmlParser: K.language.parser
1515
+ })), H && J.push(Prec.high(keymap.of(markdownKeymap)));
1516
+ let Z = mkLang(U.configure(q));
1517
+ return W && J.push(Z.data.of({ autocomplete: htmlTagCompletion })), new LanguageSupport(Z, J);
1518
1518
  }
1519
1519
  function htmlTagCompletion(u3) {
1520
1520
  let { state: z, pos: B } = u3, V = /<[:\-\.\w\u00b7-\uffff]*$/.exec(z.sliceDoc(B - 25, B));
@@ -1,8 +1,8 @@
1
- import "./dist-CBu8cgzz.js";
2
- import "./dist-D08oiinq.js";
3
- import { a as htmlLanguage, i as htmlCompletionSourceWith, n as html, o as htmlPlain, r as htmlCompletionSource, t as autoCloseTags } from "./dist-C5Ns3q-m.js";
4
- import "./dist-CxRajUZ6.js";
5
- import "./dist-B3CNaJau.js";
1
+ import "./dist-t5bQPtMZ.js";
2
+ import "./dist-BRfGeCYG.js";
3
+ import { a as htmlLanguage, i as htmlCompletionSourceWith, n as html, o as htmlPlain, r as htmlCompletionSource, t as autoCloseTags } from "./dist-Cf1Q6zai.js";
4
+ import "./dist-BXNAv-Y6.js";
5
+ import "./dist-BPwzuLH_.js";
6
6
  export {
7
7
  autoCloseTags,
8
8
  html,
@@ -1,5 +1,5 @@
1
- import { B as tags, I as syntaxTree, J as parseMixed, O as indentNodeProp, Tt as EditorSelection, Z as EditorView, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-CBu8cgzz.js";
2
- import { n as html } from "./dist-C5Ns3q-m.js";
1
+ import { B as tags, Ct as EditorSelection, I as syntaxTree, J as parseMixed, O as indentNodeProp, Z as EditorView, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
2
+ import { n as html } from "./dist-Cf1Q6zai.js";
3
3
  var interpolationStart = 1, tagStart = 2, endTagStart = 3, text = 180, endrawTagStart = 4, rawText = 181, endcommentTagStart = 5, commentText = 182, InlineComment = 6;
4
4
  function wordChar(_) {
5
5
  return _ >= 65 && _ <= 90 || _ >= 97 && _ <= 122;
@@ -220,7 +220,7 @@ function completions(_, V) {
220
220
  var Filters = /* @__PURE__ */ completions("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where", "function"), Tags = /* @__PURE__ */ completions("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include", "keyword"), Expressions = /* @__PURE__ */ completions("empty forloop tablerowloop in with as contains", "keyword"), forloop = /* @__PURE__ */ completions("first index index0 last length rindex", "property"), tablerowloop = /* @__PURE__ */ completions("col col0 col_first col_last first index index0 last length rindex rindex0 row", "property");
221
221
  function findContext(_) {
222
222
  var _a;
223
- let { state: H, pos: U } = _, W = syntaxTree(H).resolveInner(U, -1).enterUnfinishedNodesBefore(U), G = ((_a = W.childBefore(U)) == null ? void 0 : _a.name) || W.name;
223
+ let { state: V, pos: U } = _, W = syntaxTree(V).resolveInner(U, -1).enterUnfinishedNodesBefore(U), G = ((_a = W.childBefore(U)) == null ? void 0 : _a.name) || W.name;
224
224
  if (W.name == "FilterName") return {
225
225
  type: "filter",
226
226
  node: W
@@ -284,7 +284,7 @@ function liquidCompletionSource(_ = {}) {
284
284
  } : null;
285
285
  };
286
286
  }
287
- var closePercentBrace = /* @__PURE__ */ EditorView.inputHandler.of((_, V, H, U) => U != "%" || V != H || _.state.doc.sliceString(V - 1, H + 1) != "{}" ? false : (_.dispatch(_.state.changeByRange((_2) => ({
287
+ var closePercentBrace = /* @__PURE__ */ EditorView.inputHandler.of((_, H, U, W) => W != "%" || H != U || _.state.doc.sliceString(H - 1, U + 1) != "{}" ? false : (_.dispatch(_.state.changeByRange((_2) => ({
288
288
  changes: {
289
289
  from: _2.from,
290
290
  to: _2.to,
@@ -1,4 +1,4 @@
1
- import { B as tags, O as indentNodeProp, S as foldInside, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-CBu8cgzz.js";
1
+ import { B as tags, O as indentNodeProp, S as foldInside, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
2
2
  var spec_Keyword = {
3
3
  __proto__: null,
4
4
  anyref: 34,
@@ -1,4 +1,4 @@
1
- import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-CBu8cgzz.js";
1
+ import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
2
2
  var jsonHighlighting = styleTags({
3
3
  String: tags.string,
4
4
  Number: tags.number,
@@ -1,4 +1,4 @@
1
- import { B as tags, I as syntaxTree, O as indentNodeProp, Tt as EditorSelection, Z as EditorView, m as bracketMatchingHandle, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-CBu8cgzz.js";
1
+ import { B as tags, Ct as EditorSelection, I as syntaxTree, O as indentNodeProp, Z as EditorView, m as bracketMatchingHandle, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
2
2
  var StartTag = 1, StartCloseTag = 2, MissingCloseTag = 3, mismatchedStartCloseTag = 4, incompleteStartCloseTag = 5, commentContent$1 = 36, piContent$1 = 37, cdataContent$1 = 38, Element$1 = 11, OpenTag = 13;
3
3
  function nameChar(m) {
4
4
  return m == 45 || m == 46 || m == 58 || m >= 65 && m <= 90 || m == 95 || m >= 97 && m <= 122 || m >= 161;
@@ -141,11 +141,11 @@ function findParentElement(m) {
141
141
  for (let V = m && m.parent; V; V = V.parent) if (V.name == "Element") return V;
142
142
  return null;
143
143
  }
144
- function findLocation(m, H) {
144
+ function findLocation(m, V) {
145
145
  var _a;
146
- let U = syntaxTree(m).resolveInner(H, -1), W = null;
146
+ let U = syntaxTree(m).resolveInner(V, -1), W = null;
147
147
  for (let m2 = U; !W && m2.parent; m2 = m2.parent) (m2.name == "OpenTag" || m2.name == "CloseTag" || m2.name == "SelfClosingTag" || m2.name == "MismatchedCloseTag") && (W = m2);
148
- if (W && (W.to > H || W.lastChild.type.isError)) {
148
+ if (W && (W.to > V || W.lastChild.type.isError)) {
149
149
  let m2 = W.parent;
150
150
  if (U.name == "TagName") return W.name == "CloseTag" || W.name == "MismatchedCloseTag" ? {
151
151
  type: "closeTag",
@@ -166,33 +166,33 @@ function findLocation(m, H) {
166
166
  from: U.from,
167
167
  context: W
168
168
  };
169
- let V = U == W || U.name == "Attribute" ? U.childBefore(H) : U;
170
- return (V == null ? void 0 : V.name) == "StartTag" ? {
169
+ let H = U == W || U.name == "Attribute" ? U.childBefore(V) : U;
170
+ return (H == null ? void 0 : H.name) == "StartTag" ? {
171
171
  type: "openTag",
172
- from: H,
172
+ from: V,
173
173
  context: findParentElement(m2)
174
- } : (V == null ? void 0 : V.name) == "StartCloseTag" && V.to <= H ? {
174
+ } : (H == null ? void 0 : H.name) == "StartCloseTag" && H.to <= V ? {
175
175
  type: "closeTag",
176
- from: H,
176
+ from: V,
177
177
  context: m2
178
- } : (V == null ? void 0 : V.name) == "Is" ? {
178
+ } : (H == null ? void 0 : H.name) == "Is" ? {
179
179
  type: "attrValue",
180
- from: H,
180
+ from: V,
181
181
  context: W
182
- } : V ? {
182
+ } : H ? {
183
183
  type: "attrName",
184
- from: H,
184
+ from: V,
185
185
  context: W
186
186
  } : null;
187
187
  } else if (U.name == "StartCloseTag") return {
188
188
  type: "closeTag",
189
- from: H,
189
+ from: V,
190
190
  context: U.parent
191
191
  };
192
- for (; U.parent && U.to == H && !((_a = U.lastChild) == null ? void 0 : _a.type.isError); ) U = U.parent;
192
+ for (; U.parent && U.to == V && !((_a = U.lastChild) == null ? void 0 : _a.type.isError); ) U = U.parent;
193
193
  return U.name == "Element" || U.name == "Text" || U.name == "Document" ? {
194
194
  type: "tag",
195
- from: H,
195
+ from: V,
196
196
  context: U.name == "Element" ? U : findParentElement(U)
197
197
  } : null;
198
198
  }
@@ -334,31 +334,31 @@ function elementName(m, V, H = m.length) {
334
334
  let U = V.firstChild, W = U && U.getChild("TagName");
335
335
  return W ? m.sliceString(W.from, Math.min(W.to, H)) : "";
336
336
  }
337
- var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((m, H, W, G, K) => {
338
- if (m.composing || m.state.readOnly || H != W || G != ">" && G != "/" || !xmlLanguage.isActiveAt(m.state, H, -1)) return false;
337
+ var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((m, U, W, G, K) => {
338
+ if (m.composing || m.state.readOnly || U != W || G != ">" && G != "/" || !xmlLanguage.isActiveAt(m.state, U, -1)) return false;
339
339
  let q = K(), { state: J } = q, Y = J.changeByRange((m2) => {
340
340
  var _a, _b, _c;
341
- let { head: H2 } = m2, W2 = J.doc.sliceString(H2 - 1, H2) == G, K2 = syntaxTree(J).resolveInner(H2, -1), q2;
341
+ let { head: U2 } = m2, W2 = J.doc.sliceString(U2 - 1, U2) == G, K2 = syntaxTree(J).resolveInner(U2, -1), q2;
342
342
  if (W2 && G == ">" && K2.name == "EndTag") {
343
343
  let V = K2.parent;
344
- if (((_b = (_a = V.parent) == null ? void 0 : _a.lastChild) == null ? void 0 : _b.name) != "CloseTag" && (q2 = elementName(J.doc, V.parent, H2))) return {
344
+ if (((_b = (_a = V.parent) == null ? void 0 : _a.lastChild) == null ? void 0 : _b.name) != "CloseTag" && (q2 = elementName(J.doc, V.parent, U2))) return {
345
345
  range: m2,
346
346
  changes: {
347
- from: H2,
348
- to: H2 + (J.doc.sliceString(H2, H2 + 1) === ">" ? 1 : 0),
347
+ from: U2,
348
+ to: U2 + (J.doc.sliceString(U2, U2 + 1) === ">" ? 1 : 0),
349
349
  insert: `</${q2}>`
350
350
  }
351
351
  };
352
352
  } else if (W2 && G == "/" && K2.name == "StartCloseTag") {
353
353
  let m3 = K2.parent;
354
- if (K2.from == H2 - 2 && ((_c = m3.lastChild) == null ? void 0 : _c.name) != "CloseTag" && (q2 = elementName(J.doc, m3, H2))) {
355
- let m4 = H2 + (J.doc.sliceString(H2, H2 + 1) === ">" ? 1 : 0), V = `${q2}>`;
354
+ if (K2.from == U2 - 2 && ((_c = m3.lastChild) == null ? void 0 : _c.name) != "CloseTag" && (q2 = elementName(J.doc, m3, U2))) {
355
+ let m4 = U2 + (J.doc.sliceString(U2, U2 + 1) === ">" ? 1 : 0), H = `${q2}>`;
356
356
  return {
357
- range: EditorSelection.cursor(H2 + V.length, -1),
357
+ range: EditorSelection.cursor(U2 + H.length, -1),
358
358
  changes: {
359
- from: H2,
359
+ from: U2,
360
360
  to: m4,
361
- insert: V
361
+ insert: H
362
362
  }
363
363
  };
364
364
  }
@@ -1,5 +1,5 @@
1
- import "./dist-CBu8cgzz.js";
2
- import { i as defineCSSCompletionSource, n as cssCompletionSource, r as cssLanguage, t as css } from "./dist-CxRajUZ6.js";
1
+ import "./dist-t5bQPtMZ.js";
2
+ import { i as defineCSSCompletionSource, n as cssCompletionSource, r as cssLanguage, t as css } from "./dist-BXNAv-Y6.js";
3
3
  export {
4
4
  css,
5
5
  cssCompletionSource,