@marimo-team/islands 0.25.3-dev264 → 0.25.3-dev266
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.
- package/dist/{ConnectedDataExplorerComponent-DjlwdMQT.js → ConnectedDataExplorerComponent-C_hj7Poi.js} +6 -6
- package/dist/{ErrorBoundary-CkJTXbwo.js → ErrorBoundary-CvxlC3F1.js} +13 -13
- package/dist/{any-language-editor-Be7dA2VK.js → any-language-editor-CFeWfC3o.js} +2 -2
- package/dist/{chat-ui-Bl_I-evE.js → chat-ui-DFxNgzXF.js} +10 -10
- package/dist/{check-CSvxZk5I.js → check-gUSZbRsl.js} +1 -1
- package/dist/{code-visibility-C0pJwuZV.js → code-visibility-SRM1JiD_.js} +3 -3
- package/dist/{common-rfCPrF-Z.js → common-yiRhZ6ZZ.js} +15 -15
- package/dist/{config-mwEjAmvP.js → config-CmeG_Pb6.js} +1 -1
- package/dist/{copy-icon-DD8bdw4L.js → copy-icon-C2I8sw4h.js} +2 -2
- package/dist/{data-grid-overlay-editor-DNf3djiK.js → data-grid-overlay-editor-DLTzcQ4O.js} +1 -1
- package/dist/{dialog-BHYPX87J.js → dialog-BtprQCUw.js} +1 -1
- package/dist/{objectWithoutPropertiesLoose-ai5NUqGa.js → dist-X9CsotJl.js} +1 -23
- package/dist/{dropdown-menu-Blu7V6Mk.js → dropdown-menu-CkJ7ErY6.js} +10 -10
- package/dist/{error-entries-DFhMo601.js → error-entries-CMoaUX9V.js} +5 -5
- package/dist/{esm-CHjVSexr.js → esm-BDqqT86j.js} +123 -122
- package/dist/{feedback-button-C1D8YBQZ.js → feedback-button-DBUrE4OL.js} +6 -6
- package/dist/{glide-data-editor-Dte9bKog.js → glide-data-editor-Cfv4HeOh.js} +6723 -2940
- package/dist/{glide-utils-qbkRZpEy.js → glide-utils-Ba9WD2IN.js} +78 -33
- package/dist/{globals-Df-1D3Gq.js → globals-dIbBIR5-.js} +2 -2
- package/dist/{html-to-image-BPs9Vo-H.js → html-to-image-D_5CMreP.js} +4415 -4415
- package/dist/main.js +5513 -5504
- package/dist/{number-overlay-editor-BZYA5liM.js → number-overlay-editor-CTiJp5Mj.js} +1 -1
- package/dist/objectWithoutPropertiesLoose-BRDcTsfB.js +23 -0
- package/dist/{process-output-c6xaHokq.js → process-output-CGFNVC60.js} +4 -4
- package/dist/{reveal-component-BMQZBAE1.js → reveal-component-DH09ygHo.js} +6 -6
- package/dist/{select-CcidPqlM.js → select-C33FVPPN.js} +9 -9
- package/dist/{spec-ZwfZcgsm.js → spec-DH1lmF7Q.js} +4 -4
- package/dist/{strings-BYJNyKmg.js → strings-BCKpLFNU.js} +1 -1
- package/dist/{toast-CkB5Jq9K.js → toast-CY1_Qv41.js} +2 -2
- package/dist/{tooltip-Bzl4k00l.js → tooltip-BfcDQd2j.js} +1 -1
- package/dist/{useDateFormatter-CYo5fm8s.js → useDateFormatter-Dk_xFci4.js} +2 -2
- package/dist/{useLifecycle-GNgvNwI-.js → useLifecycle-JjxCC7Vu.js} +1 -1
- package/dist/{vega-component-DOtem7Hf.js → vega-component-C-lqjV0q.js} +2 -2
- package/package.json +2 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +33 -8
- package/src/plugins/impl/__tests__/DataEditorPlugin.test.ts +93 -4
- package/src/plugins/impl/data-editor/__tests__/column-types.test.ts +37 -0
- package/src/plugins/impl/data-editor/__tests__/editor-state.test.ts +52 -1
- package/src/plugins/impl/data-editor/__tests__/glide-data-editor.test.tsx +113 -1
- package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +116 -0
- package/src/plugins/impl/data-editor/column-types.ts +52 -0
- package/src/plugins/impl/data-editor/editor-state.ts +18 -2
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +66 -8
- package/src/plugins/impl/data-editor/glide-utils.ts +30 -9
- package/src/plugins/impl/data-editor/types.ts +7 -0
|
@@ -2,16 +2,17 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
|
2
2
|
import { t } from "./react-sHtZdjeP.js";
|
|
3
3
|
import { t as n } from "./jsx-runtime-3BD1kT0s.js";
|
|
4
4
|
import { $ as r, At as i, D as a, Dt as o, Et as s, Ft as c, J as l, K as u, Mt as d, Pt as f, R as p, St as m, T as ee, U as h, V as g, X as _, Y as v, _ as y, bt as b, ct as te, et as x, f as S, ft as C, gt as w, it as ne, j as T, jt as E, l as D, lt as O, ot as k, pt as A, q as j, rt as M, st as re, t as N, tt as ie, ut as P, vt as F, wt as ae, y as I, yt as L, z as R } from "./dist-CYeqK4Xw.js";
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
5
|
+
import { a as z, c as B, l as oe, n as V, o as H } from "./dist-X9CsotJl.js";
|
|
6
|
+
import { a as se, c as ce, i as le, r as U } from "./dist-BX1mn8na.js";
|
|
7
|
+
import { n as ue, t as de } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
7
8
|
//#region ../node_modules/.pnpm/@codemirror+search@6.7.2/node_modules/@codemirror/search/dist/index.js
|
|
8
|
-
var
|
|
9
|
+
var W = /* @__PURE__ */ e(t()), fe = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFKD") : (e) => e, G = class {
|
|
9
10
|
constructor(e, t, n = 0, r = e.length, i, a) {
|
|
10
11
|
this.test = a, this.value = {
|
|
11
12
|
from: 0,
|
|
12
13
|
to: 0,
|
|
13
14
|
precise: !1
|
|
14
|
-
}, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, r), this.bufferStart = n, this.normalize = i ? (e) => i(
|
|
15
|
+
}, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, r), this.bufferStart = n, this.normalize = i ? (e) => i(fe(e)) : fe, this.query = this.normalize(t);
|
|
15
16
|
}
|
|
16
17
|
peek() {
|
|
17
18
|
if (this.bufferPos == this.buffer.length) {
|
|
@@ -60,20 +61,20 @@ var U = /* @__PURE__ */ e(t()), pe = typeof String.prototype.normalize == "funct
|
|
|
60
61
|
})), a && this.test && !this.test(a.from, a.to, this.buffer, this.bufferStart) && (a = null), a;
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
|
-
typeof Symbol < "u" && (
|
|
64
|
+
typeof Symbol < "u" && (G.prototype[Symbol.iterator] = function() {
|
|
64
65
|
return this;
|
|
65
66
|
});
|
|
66
|
-
var
|
|
67
|
+
var pe = {
|
|
67
68
|
from: -1,
|
|
68
69
|
to: -1,
|
|
69
70
|
match: /*@__PURE__*/ /.*/.exec(""),
|
|
70
71
|
precise: !0
|
|
71
|
-
},
|
|
72
|
+
}, me = "gm" + (/x/.unicode == null ? "" : "u"), he = class {
|
|
72
73
|
constructor(e, t, n, r = 0, i = e.length) {
|
|
73
|
-
if (this.text = e, this.to = i, this.curLine = "", this.done = !1, this.value =
|
|
74
|
-
this.re = new RegExp(t,
|
|
74
|
+
if (this.text = e, this.to = i, this.curLine = "", this.done = !1, this.value = pe, /\\[sWDnr]|\n|\r|\[\^/.test(t)) return new ve(e, t, n, r, i);
|
|
75
|
+
this.re = new RegExp(t, me + (n?.ignoreCase ? "i" : "")), this.test = n?.test, this.iter = e.iter();
|
|
75
76
|
let a = e.lineAt(r);
|
|
76
|
-
this.curLineStart = a.from, this.matchPos =
|
|
77
|
+
this.curLineStart = a.from, this.matchPos = K(e, r), this.getLine(this.curLineStart);
|
|
77
78
|
}
|
|
78
79
|
getLine(e) {
|
|
79
80
|
this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
|
|
@@ -87,7 +88,7 @@ var me = {
|
|
|
87
88
|
let t = this.matchPos <= this.to && this.re.exec(this.curLine);
|
|
88
89
|
if (t) {
|
|
89
90
|
let n = this.curLineStart + t.index, r = n + t[0].length;
|
|
90
|
-
if (this.matchPos =
|
|
91
|
+
if (this.matchPos = K(this.text, r + +(n == r)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < r || n > this.value.to) && (!this.test || this.test(n, r, t))) return this.value = {
|
|
91
92
|
from: n,
|
|
92
93
|
to: r,
|
|
93
94
|
precise: !0,
|
|
@@ -98,7 +99,7 @@ var me = {
|
|
|
98
99
|
else return this.done = !0, this;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
},
|
|
102
|
+
}, ge = /*@__PURE__*/ new WeakMap(), _e = class e {
|
|
102
103
|
constructor(e, t) {
|
|
103
104
|
this.from = e, this.text = t;
|
|
104
105
|
}
|
|
@@ -106,18 +107,18 @@ var me = {
|
|
|
106
107
|
return this.from + this.text.length;
|
|
107
108
|
}
|
|
108
109
|
static get(t, n, r) {
|
|
109
|
-
let i =
|
|
110
|
+
let i = ge.get(t);
|
|
110
111
|
if (!i || i.from >= r || i.to <= n) {
|
|
111
112
|
let i = new e(n, t.sliceString(n, r));
|
|
112
|
-
return
|
|
113
|
+
return ge.set(t, i), i;
|
|
113
114
|
}
|
|
114
115
|
if (i.from == n && i.to == r) return i;
|
|
115
116
|
let { text: a, from: o } = i;
|
|
116
|
-
return o > n && (a = t.sliceString(n, o) + a, o = n), i.to < r && (a += t.sliceString(i.to, r)),
|
|
117
|
+
return o > n && (a = t.sliceString(n, o) + a, o = n), i.to < r && (a += t.sliceString(i.to, r)), ge.set(t, new e(o, a)), new e(n, a.slice(n - o, r - o));
|
|
117
118
|
}
|
|
118
|
-
},
|
|
119
|
+
}, ve = class {
|
|
119
120
|
constructor(e, t, n, r, i) {
|
|
120
|
-
this.text = e, this.to = i, this.done = !1, this.value =
|
|
121
|
+
this.text = e, this.to = i, this.done = !1, this.value = pe, this.matchPos = K(e, r), this.re = new RegExp(t, me + (n?.ignoreCase ? "i" : "")), this.test = n?.test, this.flat = _e.get(e, r, this.chunkEnd(r + 5e3));
|
|
121
122
|
}
|
|
122
123
|
chunkEnd(e) {
|
|
123
124
|
return e >= this.to ? this.to : this.text.lineAt(e).to;
|
|
@@ -132,30 +133,30 @@ var me = {
|
|
|
132
133
|
to: n,
|
|
133
134
|
precise: !0,
|
|
134
135
|
match: t
|
|
135
|
-
}, this.matchPos =
|
|
136
|
+
}, this.matchPos = K(this.text, n + +(e == n)), this;
|
|
136
137
|
}
|
|
137
138
|
if (this.flat.to == this.to) return this.done = !0, this;
|
|
138
|
-
this.flat =
|
|
139
|
+
this.flat = _e.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
};
|
|
142
|
-
typeof Symbol < "u" && (
|
|
143
|
+
typeof Symbol < "u" && (he.prototype[Symbol.iterator] = ve.prototype[Symbol.iterator] = function() {
|
|
143
144
|
return this;
|
|
144
145
|
});
|
|
145
|
-
function
|
|
146
|
+
function ye(e) {
|
|
146
147
|
try {
|
|
147
|
-
return new RegExp(e,
|
|
148
|
+
return new RegExp(e, me), !0;
|
|
148
149
|
} catch {
|
|
149
150
|
return !1;
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
|
-
function
|
|
153
|
+
function K(e, t) {
|
|
153
154
|
if (t >= e.length) return t;
|
|
154
155
|
let n = e.lineAt(t), r;
|
|
155
156
|
for (; t < n.to && (r = n.text.charCodeAt(t - n.from)) >= 56320 && r < 57344;) t++;
|
|
156
157
|
return t;
|
|
157
158
|
}
|
|
158
|
-
var
|
|
159
|
+
var be = (e) => {
|
|
159
160
|
let t = v(e, "cm-goto-line");
|
|
160
161
|
if (t) {
|
|
161
162
|
let e = t.dom.querySelector("input[type=text]");
|
|
@@ -189,30 +190,30 @@ var xe = (e) => {
|
|
|
189
190
|
selection: p
|
|
190
191
|
});
|
|
191
192
|
}), !0;
|
|
192
|
-
},
|
|
193
|
+
}, xe = {
|
|
193
194
|
highlightWordAroundCursor: !1,
|
|
194
195
|
minSelectionLength: 1,
|
|
195
196
|
maxMatches: 100,
|
|
196
197
|
wholeWords: !1
|
|
197
|
-
},
|
|
198
|
-
return d(e,
|
|
198
|
+
}, Se = /*@__PURE__*/ b.define({ combine(e) {
|
|
199
|
+
return d(e, xe, {
|
|
199
200
|
highlightWordAroundCursor: (e, t) => e || t,
|
|
200
201
|
minSelectionLength: Math.min,
|
|
201
202
|
maxMatches: Math.min
|
|
202
203
|
});
|
|
203
204
|
} });
|
|
204
|
-
function
|
|
205
|
-
let t = [
|
|
206
|
-
return e && t.push(
|
|
205
|
+
function Ce(e) {
|
|
206
|
+
let t = [ke, Oe];
|
|
207
|
+
return e && t.push(Se.of(e)), t;
|
|
207
208
|
}
|
|
208
|
-
var
|
|
209
|
-
function
|
|
209
|
+
var we = /*@__PURE__*/ R.mark({ class: "cm-selectionMatch" }), Te = /*@__PURE__*/ R.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
|
210
|
+
function Ee(e, t, n, r) {
|
|
210
211
|
return (n == 0 || e(t.sliceDoc(n - 1, n)) != w.Word) && (r == t.doc.length || e(t.sliceDoc(r, r + 1)) != w.Word);
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function De(e, t, n, r) {
|
|
213
214
|
return e(t.sliceDoc(n, n + 1)) == w.Word && e(t.sliceDoc(r - 1, r)) == w.Word;
|
|
214
215
|
}
|
|
215
|
-
var
|
|
216
|
+
var Oe = /*@__PURE__*/ h.fromClass(class {
|
|
216
217
|
constructor(e) {
|
|
217
218
|
this.decorations = this.getDeco(e);
|
|
218
219
|
}
|
|
@@ -220,7 +221,7 @@ var ke = /*@__PURE__*/ h.fromClass(class {
|
|
|
220
221
|
(e.selectionSet || e.docChanged || e.viewportChanged) && (this.decorations = this.getDeco(e.view));
|
|
221
222
|
}
|
|
222
223
|
getDeco(e) {
|
|
223
|
-
let t = e.state.facet(
|
|
224
|
+
let t = e.state.facet(Se), { state: n } = e, r = n.selection;
|
|
224
225
|
if (r.ranges.length > 1) return R.none;
|
|
225
226
|
let i = r.main, a, o = null;
|
|
226
227
|
if (i.empty) {
|
|
@@ -232,31 +233,31 @@ var ke = /*@__PURE__*/ h.fromClass(class {
|
|
|
232
233
|
let e = i.to - i.from;
|
|
233
234
|
if (e < t.minSelectionLength || e > 200) return R.none;
|
|
234
235
|
if (t.wholeWords) {
|
|
235
|
-
if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(
|
|
236
|
+
if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(Ee(o, n, i.from, i.to) && De(o, n, i.from, i.to))) return R.none;
|
|
236
237
|
} else if (a = n.sliceDoc(i.from, i.to), !a) return R.none;
|
|
237
238
|
}
|
|
238
239
|
let s = [];
|
|
239
240
|
for (let r of e.visibleRanges) {
|
|
240
|
-
let e = new
|
|
241
|
+
let e = new G(n.doc, a, r.from, r.to);
|
|
241
242
|
for (; !e.next().done;) {
|
|
242
243
|
let { from: r, to: a } = e.value;
|
|
243
|
-
if ((!o ||
|
|
244
|
+
if ((!o || Ee(o, n, r, a)) && (i.empty && r <= i.from && a >= i.to ? s.push(Te.range(r, a)) : (r >= i.to || a <= i.from) && s.push(we.range(r, a)), s.length > t.maxMatches)) return R.none;
|
|
244
245
|
}
|
|
245
246
|
}
|
|
246
247
|
return R.set(s);
|
|
247
248
|
}
|
|
248
|
-
}, { decorations: (e) => e.decorations }),
|
|
249
|
+
}, { decorations: (e) => e.decorations }), ke = /*@__PURE__*/ g.baseTheme({
|
|
249
250
|
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
|
250
251
|
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
|
251
|
-
}),
|
|
252
|
+
}), Ae = ({ state: e, dispatch: t }) => {
|
|
252
253
|
let { selection: n } = e, r = F.create(n.ranges.map((t) => e.wordAt(t.head) || F.cursor(t.head)), n.mainIndex);
|
|
253
254
|
return !r.eq(n) && (t(e.update({ selection: r })), !0);
|
|
254
255
|
};
|
|
255
|
-
function
|
|
256
|
+
function je(e, t) {
|
|
256
257
|
let { main: n, ranges: r } = e.selection, i = e.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
|
|
257
|
-
for (let n = !1, i = new
|
|
258
|
+
for (let n = !1, i = new G(e.doc, t, r[r.length - 1].to);;) if (i.next(), i.done) {
|
|
258
259
|
if (n) return null;
|
|
259
|
-
i = new
|
|
260
|
+
i = new G(e.doc, t, 0, Math.max(0, r[r.length - 1].from - 1)), n = !0;
|
|
260
261
|
} else {
|
|
261
262
|
if (n && r.some((e) => e.from == i.value.from)) continue;
|
|
262
263
|
if (a) {
|
|
@@ -266,20 +267,20 @@ function Me(e, t) {
|
|
|
266
267
|
return i.value;
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
|
-
var
|
|
270
|
+
var Me = ({ state: e, dispatch: t }) => {
|
|
270
271
|
let { ranges: n } = e.selection;
|
|
271
|
-
if (n.some((e) => e.from === e.to)) return
|
|
272
|
+
if (n.some((e) => e.from === e.to)) return Ae({
|
|
272
273
|
state: e,
|
|
273
274
|
dispatch: t
|
|
274
275
|
});
|
|
275
276
|
let r = e.sliceDoc(n[0].from, n[0].to);
|
|
276
277
|
if (e.selection.ranges.some((t) => e.sliceDoc(t.from, t.to) != r)) return !1;
|
|
277
|
-
let i =
|
|
278
|
+
let i = je(e, r);
|
|
278
279
|
return i ? (t(e.update({
|
|
279
280
|
selection: e.selection.addRange(F.range(i.from, i.to), !1),
|
|
280
281
|
effects: g.scrollIntoView(i.to)
|
|
281
282
|
})), !0) : !1;
|
|
282
|
-
},
|
|
283
|
+
}, q = /*@__PURE__*/ b.define({ combine(e) {
|
|
283
284
|
return d(e, {
|
|
284
285
|
top: !1,
|
|
285
286
|
caseSensitive: !1,
|
|
@@ -289,9 +290,9 @@ var Ne = ({ state: e, dispatch: t }) => {
|
|
|
289
290
|
createPanel: (e) => new st(e),
|
|
290
291
|
scrollToMatch: (e) => g.scrollIntoView(e)
|
|
291
292
|
});
|
|
292
|
-
} }),
|
|
293
|
+
} }), Ne = class {
|
|
293
294
|
constructor(e) {
|
|
294
|
-
this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp ||
|
|
295
|
+
this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || ye(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord, this.test = e.test;
|
|
295
296
|
}
|
|
296
297
|
unquote(e) {
|
|
297
298
|
return this.literal ? e : e.replace(/\\([nrt\\])/g, (e, t) => t == "n" ? "\n" : t == "r" ? "\r" : t == "t" ? " " : "\\");
|
|
@@ -300,42 +301,42 @@ var Ne = ({ state: e, dispatch: t }) => {
|
|
|
300
301
|
return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord && this.test == e.test;
|
|
301
302
|
}
|
|
302
303
|
create() {
|
|
303
|
-
return this.regexp ? new He(this) : new
|
|
304
|
+
return this.regexp ? new He(this) : new Le(this);
|
|
304
305
|
}
|
|
305
306
|
getCursor(e, t = 0, n) {
|
|
306
307
|
let r = e.doc ? e : L.create({ doc: e });
|
|
307
|
-
return n ??= r.doc.length, this.regexp ?
|
|
308
|
+
return n ??= r.doc.length, this.regexp ? Y(this, r, t, n) : J(this, r, t, n);
|
|
308
309
|
}
|
|
309
|
-
},
|
|
310
|
+
}, Pe = class {
|
|
310
311
|
constructor(e) {
|
|
311
312
|
this.spec = e;
|
|
312
313
|
}
|
|
313
314
|
};
|
|
314
|
-
function
|
|
315
|
+
function Fe(e, t, n) {
|
|
315
316
|
return (r, i, a, o) => n && !n(r, i, a, o) ? !1 : e(r >= o && i <= o + a.length ? a.slice(r - o, i - o) : t.doc.sliceString(r, i), t, r, i);
|
|
316
317
|
}
|
|
317
|
-
function
|
|
318
|
+
function J(e, t, n, r) {
|
|
318
319
|
let i;
|
|
319
|
-
return e.wholeWord && (i =
|
|
320
|
+
return e.wholeWord && (i = Ie(t.doc, t.charCategorizer(t.selection.main.head))), e.test && (i = Fe(e.test, t, i)), new G(t.doc, e.unquoted, n, r, e.caseSensitive ? void 0 : (e) => e.toLowerCase(), i);
|
|
320
321
|
}
|
|
321
|
-
function
|
|
322
|
-
return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = e.sliceString(a, Math.min(e.length, r + 2))), (t(
|
|
322
|
+
function Ie(e, t) {
|
|
323
|
+
return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = e.sliceString(a, Math.min(e.length, r + 2))), (t(ze(i, n - a)) != w.Word || t(Be(i, n - a)) != w.Word) && (t(Be(i, r - a)) != w.Word || t(ze(i, r - a)) != w.Word));
|
|
323
324
|
}
|
|
324
|
-
var
|
|
325
|
+
var Le = class extends Pe {
|
|
325
326
|
constructor(e) {
|
|
326
327
|
super(e);
|
|
327
328
|
}
|
|
328
329
|
nextMatch(e, t, n) {
|
|
329
|
-
let r =
|
|
330
|
+
let r = J(this.spec, e, n, e.doc.length).nextOverlapping();
|
|
330
331
|
if (r.done) {
|
|
331
332
|
let n = Math.min(e.doc.length, t + this.spec.unquoted.length);
|
|
332
|
-
r =
|
|
333
|
+
r = J(this.spec, e, 0, n).nextOverlapping();
|
|
333
334
|
}
|
|
334
335
|
return r.done || r.value.from == t && r.value.to == n ? null : r.value;
|
|
335
336
|
}
|
|
336
337
|
prevMatchInRange(e, t, n) {
|
|
337
338
|
for (let r = n;;) {
|
|
338
|
-
let n = Math.max(t, r - 1e4 - this.spec.unquoted.length), i =
|
|
339
|
+
let n = Math.max(t, r - 1e4 - this.spec.unquoted.length), i = J(this.spec, e, n, r), a = null;
|
|
339
340
|
for (; !i.nextOverlapping().done;) a = i.value;
|
|
340
341
|
if (a) return a;
|
|
341
342
|
if (n == t) return null;
|
|
@@ -350,7 +351,7 @@ var Re = class extends Fe {
|
|
|
350
351
|
return this.spec.unquote(this.spec.replace);
|
|
351
352
|
}
|
|
352
353
|
matchAll(e, t) {
|
|
353
|
-
let n =
|
|
354
|
+
let n = J(this.spec, e, 0, e.doc.length), r = [];
|
|
354
355
|
for (; !n.next().done;) {
|
|
355
356
|
if (r.length >= t) return null;
|
|
356
357
|
r.push(n.value);
|
|
@@ -358,37 +359,37 @@ var Re = class extends Fe {
|
|
|
358
359
|
return r;
|
|
359
360
|
}
|
|
360
361
|
highlight(e, t, n, r) {
|
|
361
|
-
let i =
|
|
362
|
+
let i = J(this.spec, e, Math.max(0, t - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, e.doc.length));
|
|
362
363
|
for (; !i.next().done;) r(i.value.from, i.value.to);
|
|
363
364
|
}
|
|
364
365
|
};
|
|
365
|
-
function
|
|
366
|
+
function Re(e, t, n) {
|
|
366
367
|
return (r, i, a) => (!n || n(r, i, a)) && e(a[0], t, r, i);
|
|
367
368
|
}
|
|
368
|
-
function
|
|
369
|
+
function Y(e, t, n, r) {
|
|
369
370
|
let i;
|
|
370
|
-
return e.wholeWord && (i = Ve(t.charCategorizer(t.selection.main.head))), e.test && (i =
|
|
371
|
+
return e.wholeWord && (i = Ve(t.charCategorizer(t.selection.main.head))), e.test && (i = Re(e.test, t, i)), new he(t.doc, e.search, {
|
|
371
372
|
ignoreCase: !e.caseSensitive,
|
|
372
373
|
test: i
|
|
373
374
|
}, n, r);
|
|
374
375
|
}
|
|
375
|
-
function
|
|
376
|
+
function ze(e, t) {
|
|
376
377
|
return e.slice(f(e, t, !1), t);
|
|
377
378
|
}
|
|
378
379
|
function Be(e, t) {
|
|
379
380
|
return e.slice(t, f(e, t));
|
|
380
381
|
}
|
|
381
382
|
function Ve(e) {
|
|
382
|
-
return (t, n, r) => !r[0].length || (e(
|
|
383
|
+
return (t, n, r) => !r[0].length || (e(ze(r.input, r.index)) != w.Word || e(Be(r.input, r.index)) != w.Word) && (e(Be(r.input, r.index + r[0].length)) != w.Word || e(ze(r.input, r.index + r[0].length)) != w.Word);
|
|
383
384
|
}
|
|
384
|
-
var He = class extends
|
|
385
|
+
var He = class extends Pe {
|
|
385
386
|
nextMatch(e, t, n) {
|
|
386
|
-
let r =
|
|
387
|
-
return r.done && (r =
|
|
387
|
+
let r = Y(this.spec, e, n, e.doc.length).next();
|
|
388
|
+
return r.done && (r = Y(this.spec, e, 0, t).next()), r.done ? null : r.value;
|
|
388
389
|
}
|
|
389
390
|
prevMatchInRange(e, t, n) {
|
|
390
391
|
for (let r = 1;; r++) {
|
|
391
|
-
let i = Math.max(t, n - r * 1e4), a =
|
|
392
|
+
let i = Math.max(t, n - r * 1e4), a = Y(this.spec, e, i, n), o = null;
|
|
392
393
|
for (; !a.next().done;) o = a.value;
|
|
393
394
|
if (o && (i == t || o.from > i + 10)) return o;
|
|
394
395
|
if (i == t) return null;
|
|
@@ -409,7 +410,7 @@ var He = class extends Fe {
|
|
|
409
410
|
});
|
|
410
411
|
}
|
|
411
412
|
matchAll(e, t) {
|
|
412
|
-
let n =
|
|
413
|
+
let n = Y(this.spec, e, 0, e.doc.length), r = [];
|
|
413
414
|
for (; !n.next().done;) {
|
|
414
415
|
if (r.length >= t) return null;
|
|
415
416
|
r.push(n.value);
|
|
@@ -417,7 +418,7 @@ var He = class extends Fe {
|
|
|
417
418
|
return r;
|
|
418
419
|
}
|
|
419
420
|
highlight(e, t, n, r) {
|
|
420
|
-
let i =
|
|
421
|
+
let i = Y(this.spec, e, Math.max(0, t - 250), Math.min(n + 250, e.doc.length));
|
|
421
422
|
for (; !i.next().done;) r(i.value.from, i.value.to);
|
|
422
423
|
}
|
|
423
424
|
}, X = /*@__PURE__*/ s.define(), Ue = /*@__PURE__*/ s.define(), Z = /*@__PURE__*/ o.define({
|
|
@@ -464,7 +465,7 @@ function Q(e) {
|
|
|
464
465
|
var Je = /*@__PURE__*/ Q((e, { query: t }) => {
|
|
465
466
|
let { to: n } = e.state.selection.main, r = t.nextMatch(e.state, n, n);
|
|
466
467
|
if (!r) return !1;
|
|
467
|
-
let i = F.single(r.from, r.to), a = e.state.facet(
|
|
468
|
+
let i = F.single(r.from, r.to), a = e.state.facet(q);
|
|
468
469
|
return e.dispatch({
|
|
469
470
|
selection: i,
|
|
470
471
|
effects: [ut(e, r), a.scrollToMatch(i.main, e)],
|
|
@@ -473,7 +474,7 @@ var Je = /*@__PURE__*/ Q((e, { query: t }) => {
|
|
|
473
474
|
}), Ye = /*@__PURE__*/ Q((e, { query: t }) => {
|
|
474
475
|
let { state: n } = e, { from: r } = n.selection.main, i = t.prevMatch(n, r, r);
|
|
475
476
|
if (!i) return !1;
|
|
476
|
-
let a = F.single(i.from, i.to), o = e.state.facet(
|
|
477
|
+
let a = F.single(i.from, i.to), o = e.state.facet(q);
|
|
477
478
|
return e.dispatch({
|
|
478
479
|
selection: a,
|
|
479
480
|
effects: [ut(e, i), o.scrollToMatch(a.main, e)],
|
|
@@ -489,7 +490,7 @@ var Je = /*@__PURE__*/ Q((e, { query: t }) => {
|
|
|
489
490
|
let n = e.selection;
|
|
490
491
|
if (n.ranges.length > 1 || n.main.empty) return !1;
|
|
491
492
|
let { from: r, to: i } = n.main, a = [], o = 0;
|
|
492
|
-
for (let t = new
|
|
493
|
+
for (let t = new G(e.doc, e.sliceDoc(r, i)); !t.next().done;) {
|
|
493
494
|
if (a.length > 1e3) return !1;
|
|
494
495
|
t.value.from == r && (o = a.length), a.push(F.range(t.value.from, t.value.to));
|
|
495
496
|
}
|
|
@@ -509,7 +510,7 @@ var Je = /*@__PURE__*/ Q((e, { query: t }) => {
|
|
|
509
510
|
insert: l
|
|
510
511
|
}), o = t.nextMatch(n, o.from, o.to), u.push(g.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))) : o = t.nextMatch(n, o.from, o.to);
|
|
511
512
|
let d = e.state.changes(s);
|
|
512
|
-
return o && (c = F.single(o.from, o.to).map(d), u.push(ut(e, o)), u.push(n.facet(
|
|
513
|
+
return o && (c = F.single(o.from, o.to).map(d), u.push(ut(e, o)), u.push(n.facet(q).scrollToMatch(c.main, e))), e.dispatch({
|
|
513
514
|
changes: d,
|
|
514
515
|
selection: c,
|
|
515
516
|
effects: u,
|
|
@@ -535,13 +536,13 @@ var Je = /*@__PURE__*/ Q((e, { query: t }) => {
|
|
|
535
536
|
}), !0;
|
|
536
537
|
});
|
|
537
538
|
function et(e) {
|
|
538
|
-
return e.state.facet(
|
|
539
|
+
return e.state.facet(q).createPanel(e);
|
|
539
540
|
}
|
|
540
541
|
function tt(e, t) {
|
|
541
542
|
let n = e.selection.main, r = n.empty || n.to > n.from + 100 ? "" : e.sliceDoc(n.from, n.to);
|
|
542
543
|
if (t && !r) return t;
|
|
543
|
-
let i = e.facet(
|
|
544
|
-
return new
|
|
544
|
+
let i = e.facet(q);
|
|
545
|
+
return new Ne({
|
|
545
546
|
search: t?.literal ?? i.literal ? r : r.replace(/\n/g, "\\n"),
|
|
546
547
|
caseSensitive: t?.caseSensitive ?? i.caseSensitive,
|
|
547
548
|
literal: t?.literal ?? i.literal,
|
|
@@ -603,11 +604,11 @@ var it = (e) => {
|
|
|
603
604
|
},
|
|
604
605
|
{
|
|
605
606
|
key: "Mod-Alt-g",
|
|
606
|
-
run:
|
|
607
|
+
run: be
|
|
607
608
|
},
|
|
608
609
|
{
|
|
609
610
|
key: "Mod-d",
|
|
610
|
-
run:
|
|
611
|
+
run: Me,
|
|
611
612
|
preventDefault: !0
|
|
612
613
|
}
|
|
613
614
|
], st = class {
|
|
@@ -686,7 +687,7 @@ var it = (e) => {
|
|
|
686
687
|
]);
|
|
687
688
|
}
|
|
688
689
|
commit() {
|
|
689
|
-
let e = new
|
|
690
|
+
let e = new Ne({
|
|
690
691
|
search: this.searchField.value,
|
|
691
692
|
caseSensitive: this.caseField.checked,
|
|
692
693
|
regexp: this.reField.checked,
|
|
@@ -711,7 +712,7 @@ var it = (e) => {
|
|
|
711
712
|
return 80;
|
|
712
713
|
}
|
|
713
714
|
get top() {
|
|
714
|
-
return this.view.state.facet(
|
|
715
|
+
return this.view.state.facet(q).top;
|
|
715
716
|
}
|
|
716
717
|
};
|
|
717
718
|
function $(e, t) {
|
|
@@ -766,15 +767,15 @@ var dt = /*@__PURE__*/ g.baseTheme({
|
|
|
766
767
|
], pt = function(e) {
|
|
767
768
|
e === void 0 && (e = {});
|
|
768
769
|
var t = e.crosshairCursor, n = t !== void 0 && t, i = [];
|
|
769
|
-
e.closeBracketsKeymap !== !1 && (i = i.concat(
|
|
770
|
+
e.closeBracketsKeymap !== !1 && (i = i.concat(se)), e.defaultKeymap !== !1 && (i = i.concat(z)), e.searchKeymap !== !1 && (i = i.concat(ot)), e.historyKeymap !== !1 && (i = i.concat(B)), e.foldKeymap !== !1 && (i = i.concat(I)), e.completionKeymap !== !1 && (i = i.concat(ce)), e.lintKeymap !== !1 && (i = i.concat(V));
|
|
770
771
|
var o = [];
|
|
771
|
-
return e.lineNumbers !== !1 && o.push(ne()), e.highlightActiveLineGutter !== !1 && o.push(x()), e.highlightSpecialChars !== !1 && o.push(ie()), e.history !== !1 && o.push(
|
|
772
|
+
return e.lineNumbers !== !1 && o.push(ne()), e.highlightActiveLineGutter !== !1 && o.push(x()), e.highlightSpecialChars !== !1 && o.push(ie()), e.history !== !1 && o.push(H()), e.foldGutter !== !1 && o.push(y()), e.drawSelection !== !1 && o.push(j()), e.dropCursor !== !1 && o.push(l()), e.allowMultipleSelections !== !1 && o.push(L.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(ee()), e.syntaxHighlighting !== !1 && o.push(T(S, { fallback: !0 })), e.bracketMatching !== !1 && o.push(D()), e.closeBrackets !== !1 && o.push(le()), e.autocompletion !== !1 && o.push(U()), e.rectangularSelection !== !1 && o.push(re()), n !== !1 && o.push(u()), e.highlightActiveLine !== !1 && o.push(r()), e.highlightSelectionMatches !== !1 && o.push(Ce()), e.tabSize && typeof e.tabSize == "number" && o.push(a.of(" ".repeat(e.tabSize))), o.concat([M.of(i.flat())]).filter(Boolean);
|
|
772
773
|
}, mt = function(e) {
|
|
773
774
|
e === void 0 && (e = {});
|
|
774
775
|
var t = [];
|
|
775
|
-
e.defaultKeymap !== !1 && (t = t.concat(
|
|
776
|
+
e.defaultKeymap !== !1 && (t = t.concat(z)), e.historyKeymap !== !1 && (t = t.concat(B));
|
|
776
777
|
var n = [];
|
|
777
|
-
return e.highlightSpecialChars !== !1 && n.push(ie()), e.history !== !1 && n.push(
|
|
778
|
+
return e.highlightSpecialChars !== !1 && n.push(ie()), e.history !== !1 && n.push(H()), e.drawSelection !== !1 && n.push(j()), e.syntaxHighlighting !== !1 && n.push(T(S, { fallback: !0 })), n.concat([M.of(t.flat())]).filter(Boolean);
|
|
778
779
|
}, ht = "#e5c07b", gt = "#e06c75", _t = "#56b6c2", vt = "#ffffff", yt = "#abb2bf", bt = "#7d8799", xt = "#61afef", St = "#98c379", Ct = "#d19a66", wt = "#c678dd", Tt = "#21252b", Et = "#2c313a", Dt = "#282c34", Ot = "#353a42", kt = "#3E4451", At = "#528bff", jt = /*@__PURE__*/ g.theme({
|
|
779
780
|
"&": {
|
|
780
781
|
color: yt,
|
|
@@ -1023,35 +1024,35 @@ function Wt(e, t, n, r, i, a) {
|
|
|
1023
1024
|
//#region ../node_modules/.pnpm/@uiw+react-codemirror@4.25.11_@babel+runtime@7.27.6_@codemirror+autocomplete@6.20.3_@co_49c708f5e8044c3002cd598e6281e94d/node_modules/@uiw/react-codemirror/esm/useCodeMirror.js
|
|
1024
1025
|
var Gt = A.define(), Kt = 200, qt = [];
|
|
1025
1026
|
function Jt(e) {
|
|
1026
|
-
var t = e.value, n = e.selection, r = e.onChange, i = e.onStatistics, a = e.onCreateEditor, o = e.onUpdate, c = e.extensions, l = c === void 0 ? qt : c, u = e.autoFocus, d = e.theme, f = d === void 0 ? "light" : d, p = e.height, m = p === void 0 ? null : p, ee = e.minHeight, h = ee === void 0 ? null : ee, _ = e.maxHeight, v = _ === void 0 ? null : _, y = e.width, b = y === void 0 ? null : y, te = e.minWidth, x = te === void 0 ? null : te, S = e.maxWidth, C = S === void 0 ? null : S, w = e.placeholder, ne = w === void 0 ? "" : w, T = e.editable, E = T === void 0 || T, D = e.readOnly, O = D !== void 0 && D, k = e.indentWithTab, A = k === void 0 || k, j = e.basicSetup, M = j === void 0 || j, re = e.root, N = e.initialState, ie = (0,
|
|
1027
|
-
e.docChanged && typeof r == "function" && !e.transactions.some((e) => e.annotation(Gt)) && (
|
|
1028
|
-
if (
|
|
1029
|
-
var e =
|
|
1030
|
-
|
|
1027
|
+
var t = e.value, n = e.selection, r = e.onChange, i = e.onStatistics, a = e.onCreateEditor, o = e.onUpdate, c = e.extensions, l = c === void 0 ? qt : c, u = e.autoFocus, d = e.theme, f = d === void 0 ? "light" : d, p = e.height, m = p === void 0 ? null : p, ee = e.minHeight, h = ee === void 0 ? null : ee, _ = e.maxHeight, v = _ === void 0 ? null : _, y = e.width, b = y === void 0 ? null : y, te = e.minWidth, x = te === void 0 ? null : te, S = e.maxWidth, C = S === void 0 ? null : S, w = e.placeholder, ne = w === void 0 ? "" : w, T = e.editable, E = T === void 0 || T, D = e.readOnly, O = D !== void 0 && D, k = e.indentWithTab, A = k === void 0 || k, j = e.basicSetup, M = j === void 0 || j, re = e.root, N = e.initialState, ie = (0, W.useState)(), P = ie[0], F = ie[1], ae = (0, W.useState)(), I = ae[0], R = ae[1], z = (0, W.useState)(), B = z[0], oe = z[1], V = (0, W.useState)(() => ({ current: null }))[0], H = (0, W.useState)(() => ({ current: null }))[0], se = Wt(m, h, v, b, x, C), ce = g.updateListener.of((e) => {
|
|
1028
|
+
e.docChanged && typeof r == "function" && !e.transactions.some((e) => e.annotation(Gt)) && (V.current ? V.current.reset() : (V.current = new Lt(() => {
|
|
1029
|
+
if (H.current) {
|
|
1030
|
+
var e = H.current;
|
|
1031
|
+
H.current = null, e();
|
|
1031
1032
|
}
|
|
1032
|
-
|
|
1033
|
-
}, Kt), Bt().add(
|
|
1034
|
-
}),
|
|
1033
|
+
V.current = null;
|
|
1034
|
+
}, Kt), Bt().add(V.current)), r(e.state.doc.toString(), e)), i && i(It(e));
|
|
1035
|
+
}), le = Ft({
|
|
1035
1036
|
theme: f,
|
|
1036
1037
|
editable: E,
|
|
1037
1038
|
readOnly: O,
|
|
1038
1039
|
placeholder: ne,
|
|
1039
1040
|
indentWithTab: A,
|
|
1040
1041
|
basicSetup: M
|
|
1041
|
-
}),
|
|
1042
|
-
|
|
1043
|
-
...
|
|
1042
|
+
}), U = [
|
|
1043
|
+
ce,
|
|
1044
|
+
...se ? [se] : [],
|
|
1044
1045
|
Vt,
|
|
1045
|
-
...
|
|
1046
|
+
...le
|
|
1046
1047
|
];
|
|
1047
|
-
return o && typeof o == "function" &&
|
|
1048
|
-
if (P && !
|
|
1048
|
+
return o && typeof o == "function" && U.push(g.updateListener.of(o)), U = U.concat(l), (0, W.useLayoutEffect)(() => {
|
|
1049
|
+
if (P && !B) {
|
|
1049
1050
|
var e = {
|
|
1050
1051
|
doc: t,
|
|
1051
1052
|
selection: n,
|
|
1052
|
-
extensions:
|
|
1053
|
+
extensions: U
|
|
1053
1054
|
}, r = N ? L.fromJSON(N.json, e, N.fields) : L.create(e);
|
|
1054
|
-
if (
|
|
1055
|
+
if (oe(r), !I) {
|
|
1055
1056
|
var i = new g({
|
|
1056
1057
|
state: r,
|
|
1057
1058
|
parent: P,
|
|
@@ -1061,16 +1062,16 @@ function Jt(e) {
|
|
|
1061
1062
|
}
|
|
1062
1063
|
}
|
|
1063
1064
|
return () => {
|
|
1064
|
-
I && (
|
|
1065
|
+
I && (oe(void 0), R(void 0));
|
|
1065
1066
|
};
|
|
1066
|
-
}, [P,
|
|
1067
|
+
}, [P, B]), (0, W.useEffect)(() => {
|
|
1067
1068
|
e.container && F(e.container);
|
|
1068
|
-
}, [e.container]), (0,
|
|
1069
|
-
I && (I.destroy(), R(void 0)),
|
|
1070
|
-
}, [I]), (0,
|
|
1069
|
+
}, [e.container]), (0, W.useEffect)(() => () => {
|
|
1070
|
+
I && (I.destroy(), R(void 0)), V.current &&= (V.current.cancel(), null);
|
|
1071
|
+
}, [I]), (0, W.useEffect)(() => {
|
|
1071
1072
|
u && I && I.focus();
|
|
1072
|
-
}, [u, I]), (0,
|
|
1073
|
-
I && I.dispatch({ effects: s.reconfigure.of(
|
|
1073
|
+
}, [u, I]), (0, W.useEffect)(() => {
|
|
1074
|
+
I && I.dispatch({ effects: s.reconfigure.of(U) });
|
|
1074
1075
|
}, [
|
|
1075
1076
|
f,
|
|
1076
1077
|
l,
|
|
@@ -1087,11 +1088,11 @@ function Jt(e) {
|
|
|
1087
1088
|
M,
|
|
1088
1089
|
r,
|
|
1089
1090
|
o
|
|
1090
|
-
]), (0,
|
|
1091
|
+
]), (0, W.useEffect)(() => {
|
|
1091
1092
|
if (t !== void 0) {
|
|
1092
1093
|
var e = I ? I.state.doc.toString() : "";
|
|
1093
1094
|
if (I && t !== e) {
|
|
1094
|
-
var n =
|
|
1095
|
+
var n = V.current && !V.current.isDone, r = () => {
|
|
1095
1096
|
I && t !== I.state.doc.toString() && I.dispatch({
|
|
1096
1097
|
changes: {
|
|
1097
1098
|
from: 0,
|
|
@@ -1101,12 +1102,12 @@ function Jt(e) {
|
|
|
1101
1102
|
annotations: [Gt.of(!0)]
|
|
1102
1103
|
});
|
|
1103
1104
|
};
|
|
1104
|
-
n ?
|
|
1105
|
+
n ? H.current = r : r();
|
|
1105
1106
|
}
|
|
1106
1107
|
}
|
|
1107
1108
|
}, [t, I]), {
|
|
1108
|
-
state:
|
|
1109
|
-
setState:
|
|
1109
|
+
state: B,
|
|
1110
|
+
setState: oe,
|
|
1110
1111
|
view: I,
|
|
1111
1112
|
setView: R,
|
|
1112
1113
|
container: P,
|
|
@@ -1139,8 +1140,8 @@ var Yt = n(), Xt = [
|
|
|
1139
1140
|
"readOnly",
|
|
1140
1141
|
"root",
|
|
1141
1142
|
"initialState"
|
|
1142
|
-
], Zt = /*#__PURE__*/ (0,
|
|
1143
|
-
var n = e.className, r = e.value, i = r === void 0 ? "" : r, a = e.selection, o = e.extensions, s = o === void 0 ? [] : o, c = e.onChange, l = e.onStatistics, u = e.onCreateEditor, d = e.onUpdate, f = e.autoFocus, p = e.theme, m = p === void 0 ? "light" : p, ee = e.height, h = e.minHeight, g = e.maxHeight, _ = e.width, v = e.minWidth, y = e.maxWidth, b = e.basicSetup, te = e.placeholder, x = e.indentWithTab, S = e.editable, C = e.readOnly, w = e.root, ne = e.initialState, T =
|
|
1143
|
+
], Zt = /*#__PURE__*/ (0, W.forwardRef)((e, t) => {
|
|
1144
|
+
var n = e.className, r = e.value, i = r === void 0 ? "" : r, a = e.selection, o = e.extensions, s = o === void 0 ? [] : o, c = e.onChange, l = e.onStatistics, u = e.onCreateEditor, d = e.onUpdate, f = e.autoFocus, p = e.theme, m = p === void 0 ? "light" : p, ee = e.height, h = e.minHeight, g = e.maxHeight, _ = e.width, v = e.minWidth, y = e.maxWidth, b = e.basicSetup, te = e.placeholder, x = e.indentWithTab, S = e.editable, C = e.readOnly, w = e.root, ne = e.initialState, T = de(e, Xt), E = (0, W.useRef)(null), D = Jt({
|
|
1144
1145
|
root: w,
|
|
1145
1146
|
value: i,
|
|
1146
1147
|
autoFocus: f,
|
|
@@ -1164,7 +1165,7 @@ var Yt = n(), Xt = [
|
|
|
1164
1165
|
extensions: s,
|
|
1165
1166
|
initialState: ne
|
|
1166
1167
|
}), O = D.state, k = D.view, A = D.container, j = D.setContainer;
|
|
1167
|
-
(0,
|
|
1168
|
+
(0, W.useImperativeHandle)(t, () => ({
|
|
1168
1169
|
editor: E.current,
|
|
1169
1170
|
state: O,
|
|
1170
1171
|
view: k
|
|
@@ -1174,12 +1175,12 @@ var Yt = n(), Xt = [
|
|
|
1174
1175
|
O,
|
|
1175
1176
|
k
|
|
1176
1177
|
]);
|
|
1177
|
-
var M = (0,
|
|
1178
|
+
var M = (0, W.useCallback)((e) => {
|
|
1178
1179
|
E.current = e, j(e);
|
|
1179
1180
|
}, [j]);
|
|
1180
1181
|
if (typeof i != "string") throw Error("value must be typeof string but got " + typeof i);
|
|
1181
1182
|
var re = typeof m == "string" ? "cm-theme-" + m : "cm-theme";
|
|
1182
|
-
return /*#__PURE__*/ (0, Yt.jsx)("div",
|
|
1183
|
+
return /*#__PURE__*/ (0, Yt.jsx)("div", ue({
|
|
1183
1184
|
ref: M,
|
|
1184
1185
|
className: "" + re + (n ? " " + n : "")
|
|
1185
1186
|
}, T));
|
|
@@ -2,15 +2,15 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
|
2
2
|
import { h as t, t as n } from "./button-0-RqY1DW.js";
|
|
3
3
|
import { t as r } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
-
import { t as a } from "./copy-icon-
|
|
6
|
-
import { A as o, E as s, I as c, K as l, P as u, T as d, i as f, n as p, zt as m } from "./error-entries-
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
8
|
-
import { t as g } from "./strings-
|
|
5
|
+
import { t as a } from "./copy-icon-C2I8sw4h.js";
|
|
6
|
+
import { A as o, E as s, I as c, K as l, P as u, T as d, i as f, n as p, zt as m } from "./error-entries-CMoaUX9V.js";
|
|
7
|
+
import { n as h, t as ee } from "./globals-dIbBIR5-.js";
|
|
8
|
+
import { t as g } from "./strings-BCKpLFNU.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-3BD1kT0s.js";
|
|
10
10
|
import { l as te, r as v, x as ne } from "./utils-DXkj82sK.js";
|
|
11
|
-
import { a as re, i as ie, n as ae, r as oe } from "./dialog-
|
|
11
|
+
import { a as re, i as ie, n as ae, r as oe } from "./dialog-BtprQCUw.js";
|
|
12
12
|
import { t as se } from "./useAsyncData-DsZMvNXn.js";
|
|
13
|
-
import { t as ce } from "./code-visibility-
|
|
13
|
+
import { t as ce } from "./code-visibility-SRM1JiD_.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var y = /* @__PURE__ */ e(r(), 1), b = i(), x = _(), le = (e) => {
|
|
16
16
|
let n = (0, b.c)(8), r, i;
|