@code0-tech/pictor 0.18.2 → 0.18.3
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/components/form/EditorInput.js +490 -460
- package/package.json +1 -1
|
@@ -1,557 +1,587 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { createEditor as
|
|
5
|
-
import { withReact as
|
|
6
|
-
import { withHistory as
|
|
7
|
-
import { InputWrapper as
|
|
1
|
+
import { jsx as S, jsxs as Ne } from "react/jsx-runtime";
|
|
2
|
+
import { c as ve } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import oe, { useMemo as Ie, useRef as q, useState as ae, useEffect as te, useCallback as I } from "react";
|
|
4
|
+
import { createEditor as je, Editor as ye, Transforms as le, Text as be, Range as Pe, Node as Be } from "slate";
|
|
5
|
+
import { withReact as Ke, ReactEditor as ne, Slate as Ue, Editable as We } from "slate-react";
|
|
6
|
+
import { withHistory as Ge } from "slate-history";
|
|
7
|
+
import { InputWrapper as qe } from "./InputWrapper.js";
|
|
8
8
|
import "../../utils/contextStore.js";
|
|
9
|
-
import { mergeComponentProps as
|
|
9
|
+
import { mergeComponentProps as Ve } from "../../utils/component.js";
|
|
10
10
|
import "js-md5";
|
|
11
|
-
import { Menu as
|
|
11
|
+
import { Menu as ze, MenuPortal as Je, MenuContent as Qe, MenuItem as Xe, MenuSubContent as Ye, MenuTrigger as Ze, MenuSubTrigger as et, MenuSub as tt } from "../menu/Menu.js";
|
|
12
12
|
import '../../assets/components/form/EditorInput.style.css';/* empty css */
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
e.forEach((
|
|
16
|
-
if (!
|
|
17
|
-
const
|
|
18
|
-
let
|
|
19
|
-
for (; (
|
|
20
|
-
|
|
21
|
-
start:
|
|
22
|
-
end:
|
|
23
|
-
ruleIndex:
|
|
24
|
-
token:
|
|
25
|
-
match:
|
|
13
|
+
const re = (r) => r?.type === "token", nt = (r, e) => {
|
|
14
|
+
const c = [];
|
|
15
|
+
e.forEach((l, g) => {
|
|
16
|
+
if (!l.void) return;
|
|
17
|
+
const p = new RegExp(l.pattern.source, l.pattern.flags.includes("g") ? l.pattern.flags : l.pattern.flags + "g");
|
|
18
|
+
let a;
|
|
19
|
+
for (; (a = p.exec(r)) !== null && a[0].length; )
|
|
20
|
+
c.push({
|
|
21
|
+
start: a.index,
|
|
22
|
+
end: a.index + a[0].length,
|
|
23
|
+
ruleIndex: g,
|
|
24
|
+
token: a[0],
|
|
25
|
+
match: a
|
|
26
26
|
});
|
|
27
|
-
}),
|
|
28
|
-
const
|
|
29
|
-
let
|
|
30
|
-
return
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
text:
|
|
34
|
-
}) :
|
|
27
|
+
}), c.sort((l, g) => l.start - g.start);
|
|
28
|
+
const o = [];
|
|
29
|
+
let i = 0;
|
|
30
|
+
return c.forEach((l) => {
|
|
31
|
+
if (l.start < i) return;
|
|
32
|
+
l.start > i ? o.push({
|
|
33
|
+
text: r.slice(i, l.start)
|
|
34
|
+
}) : o.length && re(o[o.length - 1]) && o.push({
|
|
35
35
|
text: ""
|
|
36
36
|
});
|
|
37
|
-
const
|
|
37
|
+
const g = {
|
|
38
38
|
type: "token",
|
|
39
|
-
ruleIndex:
|
|
40
|
-
token:
|
|
41
|
-
match:
|
|
39
|
+
ruleIndex: l.ruleIndex,
|
|
40
|
+
token: l.token,
|
|
41
|
+
match: l.match,
|
|
42
42
|
children: [{
|
|
43
43
|
text: ""
|
|
44
44
|
}]
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
text:
|
|
49
|
-
}), (!
|
|
46
|
+
o.push(g), i = l.end;
|
|
47
|
+
}), i < r.length && o.push({
|
|
48
|
+
text: r.slice(i)
|
|
49
|
+
}), (!o.length || re(o[0])) && o.unshift({
|
|
50
50
|
text: ""
|
|
51
|
-
}),
|
|
51
|
+
}), re(o[o.length - 1]) && o.push({
|
|
52
52
|
text: ""
|
|
53
|
-
}),
|
|
54
|
-
},
|
|
55
|
-
`).map((
|
|
53
|
+
}), o;
|
|
54
|
+
}, _e = (r, e) => (r || "").split(`
|
|
55
|
+
`).map((c) => ({
|
|
56
56
|
type: "paragraph",
|
|
57
|
-
children:
|
|
58
|
-
})),
|
|
59
|
-
`),
|
|
60
|
-
const
|
|
61
|
-
if (!
|
|
57
|
+
children: nt(c, e)
|
|
58
|
+
})), Fe = (r) => be.isText(r) ? r.text : re(r) ? r.token : r.children.map(Fe).join(""), Ae = (r) => r.map(Fe).join(`
|
|
59
|
+
`), Le = oe.createContext(null), Ce = oe.createContext(null), fe = () => {
|
|
60
|
+
const r = oe.useContext(Le);
|
|
61
|
+
if (!r)
|
|
62
62
|
throw new Error("EditorInput.* components must be used inside <EditorInput>");
|
|
63
|
-
return
|
|
64
|
-
},
|
|
63
|
+
return r;
|
|
64
|
+
}, Tt = (r) => {
|
|
65
65
|
const {
|
|
66
66
|
title: e,
|
|
67
|
-
right:
|
|
68
|
-
left:
|
|
69
|
-
rightType:
|
|
70
|
-
leftType:
|
|
71
|
-
description:
|
|
72
|
-
wrapperComponent:
|
|
73
|
-
tokenRules:
|
|
74
|
-
onSelect:
|
|
75
|
-
search:
|
|
76
|
-
formValidation:
|
|
77
|
-
onChange:
|
|
78
|
-
disabled:
|
|
79
|
-
readonly:
|
|
80
|
-
singleLine:
|
|
81
|
-
placeholder:
|
|
82
|
-
value:
|
|
83
|
-
initialValue:
|
|
84
|
-
defaultValue:
|
|
85
|
-
children:
|
|
86
|
-
} =
|
|
87
|
-
const t =
|
|
88
|
-
isInline:
|
|
89
|
-
isVoid:
|
|
67
|
+
right: c,
|
|
68
|
+
left: o,
|
|
69
|
+
rightType: i,
|
|
70
|
+
leftType: l,
|
|
71
|
+
description: g,
|
|
72
|
+
wrapperComponent: p,
|
|
73
|
+
tokenRules: a = [],
|
|
74
|
+
onSelect: f,
|
|
75
|
+
search: k,
|
|
76
|
+
formValidation: D,
|
|
77
|
+
onChange: w,
|
|
78
|
+
disabled: T = !1,
|
|
79
|
+
readonly: s = !1,
|
|
80
|
+
singleLine: E = !1,
|
|
81
|
+
placeholder: m,
|
|
82
|
+
value: M,
|
|
83
|
+
initialValue: O,
|
|
84
|
+
defaultValue: G,
|
|
85
|
+
children: _
|
|
86
|
+
} = r, F = String(M ?? O ?? G ?? ""), v = E ? F.replace(/\n/g, " ") : F, d = Ie(() => {
|
|
87
|
+
const t = Ge(Ke(je())), {
|
|
88
|
+
isInline: n,
|
|
89
|
+
isVoid: x
|
|
90
90
|
} = t;
|
|
91
|
-
return t.isInline = (
|
|
92
|
-
}, []),
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
const t =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
|
|
91
|
+
return t.isInline = (h) => re(h) || n(h), t.isVoid = (h) => re(h) || x(h), t;
|
|
92
|
+
}, []), y = Ie(() => _e(v, a), []), L = q(v), [B, W] = ae(v);
|
|
93
|
+
te(() => {
|
|
94
|
+
if (v === L.current || (L.current = v, W(v), Ae(d.children) === v)) return;
|
|
95
|
+
const t = _e(v, a);
|
|
96
|
+
ye.withoutNormalizing(d, () => {
|
|
97
|
+
le.deselect(d);
|
|
98
|
+
const n = d.children.length;
|
|
99
|
+
le.insertNodes(d, t, {
|
|
100
100
|
at: [0]
|
|
101
101
|
});
|
|
102
|
-
for (let
|
|
102
|
+
for (let x = 0; x < n; x++) le.removeNodes(d, {
|
|
103
103
|
at: [t.length]
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
106
|
try {
|
|
107
|
-
|
|
107
|
+
le.select(d, ye.end(d, []));
|
|
108
108
|
} catch {
|
|
109
109
|
}
|
|
110
|
-
}, [
|
|
111
|
-
const [
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
const t =
|
|
115
|
-
if (!t || !
|
|
116
|
-
let
|
|
110
|
+
}, [v, d, a]);
|
|
111
|
+
const [b, A] = ae(!1), [K, $] = ae("shortcut"), J = q(K);
|
|
112
|
+
J.current = K;
|
|
113
|
+
const se = q(null), Z = q(null), U = q(void 0), H = I(() => {
|
|
114
|
+
const t = Z.current, n = se.current, x = n?.parentElement;
|
|
115
|
+
if (!t || !n || !x) return;
|
|
116
|
+
let h = null;
|
|
117
117
|
try {
|
|
118
|
-
|
|
118
|
+
d.selection && (h = ne.toDOMRange(d, d.selection).getBoundingClientRect());
|
|
119
119
|
} catch {
|
|
120
|
-
|
|
120
|
+
h = null;
|
|
121
121
|
}
|
|
122
|
-
(!
|
|
123
|
-
const
|
|
124
|
-
t.style.left = `${
|
|
125
|
-
}, [
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
}, [
|
|
130
|
-
|
|
131
|
-
}, [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, [
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
}, []),
|
|
138
|
-
|
|
139
|
-
}, []),
|
|
140
|
-
|
|
141
|
-
}, []), [
|
|
142
|
-
|
|
143
|
-
}, []),
|
|
144
|
-
|
|
145
|
-
}), [
|
|
146
|
-
|
|
122
|
+
(!h || !h.width && !h.height && !h.left && !h.top) && (h = n.getBoundingClientRect());
|
|
123
|
+
const me = x.getBoundingClientRect();
|
|
124
|
+
t.style.left = `${h.left - me.left}px`, t.style.top = `${h.top - me.top}px`, t.style.width = "0px", t.style.height = `${h.height || parseFloat(getComputedStyle(n).lineHeight) || 16}px`;
|
|
125
|
+
}, [d]), ee = D?.setValue, u = I((t) => {
|
|
126
|
+
b && H();
|
|
127
|
+
const n = Ae(t);
|
|
128
|
+
n !== L.current && (L.current = n, W(n), ee?.(n), w?.(n));
|
|
129
|
+
}, [b, H, ee, w]), j = I(() => {
|
|
130
|
+
Z.current && (U.current && clearTimeout(U.current), H(), A(!0));
|
|
131
|
+
}, [H]);
|
|
132
|
+
te(() => {
|
|
133
|
+
b && H();
|
|
134
|
+
}, [b, H]);
|
|
135
|
+
const N = I(() => {
|
|
136
|
+
U.current && clearTimeout(U.current), U.current = setTimeout(() => A(!1), 150);
|
|
137
|
+
}, []), P = I(() => {
|
|
138
|
+
U.current && clearTimeout(U.current);
|
|
139
|
+
}, []), C = q(/* @__PURE__ */ new Map()), [V, xe] = ae(null), Q = q(null), R = I((t) => {
|
|
140
|
+
Q.current = t, xe(t);
|
|
141
|
+
}, []), [Se, $e] = ae([]), X = q([]), ce = I((t) => {
|
|
142
|
+
X.current = t, $e(t);
|
|
143
|
+
}, []), Te = I((t, n) => (C.current.set(t, n), () => {
|
|
144
|
+
C.current.delete(t), Q.current === t && R(null);
|
|
145
|
+
}), [R]), ie = I(() => Array.from(C.current.entries()).filter(([, t]) => t.el.current && t.parentId === (X.current[X.current.length - 1] ?? null)).sort((t, n) => t[1].el.current.compareDocumentPosition(n[1].el.current) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1).map(([t]) => t), []), Y = I((t) => {
|
|
146
|
+
R(t), t && C.current.get(t)?.el.current?.scrollIntoView({
|
|
147
147
|
block: "nearest"
|
|
148
148
|
});
|
|
149
|
-
}, [
|
|
150
|
-
const t =
|
|
149
|
+
}, [R]), De = I(() => {
|
|
150
|
+
const t = ie();
|
|
151
151
|
if (!t.length) return;
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
}, [
|
|
155
|
-
const t =
|
|
152
|
+
const n = Q.current, x = n === null ? -1 : t.indexOf(n);
|
|
153
|
+
Y(t[Math.min(x + 1, t.length - 1)] ?? t[0]);
|
|
154
|
+
}, [ie, Y]), we = I(() => {
|
|
155
|
+
const t = ie();
|
|
156
156
|
if (!t.length) return;
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
}, [
|
|
160
|
-
const t =
|
|
161
|
-
t.length &&
|
|
162
|
-
}, [
|
|
163
|
-
|
|
164
|
-
}, [
|
|
165
|
-
const t =
|
|
157
|
+
const n = Q.current, x = n === null ? t.length : t.indexOf(n);
|
|
158
|
+
Y(t[Math.max(x - 1, 0)] ?? t[t.length - 1]);
|
|
159
|
+
}, [ie, Y]), Oe = I(() => {
|
|
160
|
+
const t = ie();
|
|
161
|
+
t.length && Y(t[0]);
|
|
162
|
+
}, [ie, Y]), pe = I((t, n) => {
|
|
163
|
+
f?.(t, n), J.current !== "focus" && A(!1);
|
|
164
|
+
}, [f]), ke = I(() => {
|
|
165
|
+
const t = Q.current;
|
|
166
166
|
if (!t) return !1;
|
|
167
|
-
const
|
|
168
|
-
return
|
|
169
|
-
}, [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
167
|
+
const n = C.current.get(t);
|
|
168
|
+
return n ? n.onActivate ? (n.onActivate(), !0) : (setTimeout(() => pe(n.getValue(), n.getData()), 0), !0) : !1;
|
|
169
|
+
}, [pe]), de = q(void 0), z = I(() => {
|
|
170
|
+
de.current && clearTimeout(de.current), de.current = void 0;
|
|
171
|
+
}, []), he = I((t) => {
|
|
172
|
+
if (t === null) return 0;
|
|
173
|
+
const n = X.current.indexOf(t);
|
|
174
|
+
return n < 0 ? -1 : n + 1;
|
|
175
|
+
}, []), ge = I((t, n) => {
|
|
176
|
+
const x = X.current;
|
|
177
|
+
return x.length === n + 1 && x[n] === t;
|
|
178
|
+
}, []), ue = I((t) => {
|
|
179
|
+
z();
|
|
180
|
+
const n = he(C.current.get(t)?.parentId ?? null);
|
|
181
|
+
n < 0 || ge(t, n) || (ce([...X.current.slice(0, n), t]), setTimeout(() => {
|
|
182
|
+
const x = Array.from(C.current.entries()).filter(([, h]) => h.el.current && h.parentId === t).sort((h, me) => h[1].el.current.compareDocumentPosition(me[1].el.current) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1).map(([h]) => h);
|
|
183
|
+
x.length && Y(x[0]);
|
|
184
|
+
}, 20));
|
|
185
|
+
}, [z, he, ge, ce, Y]), Me = I((t) => {
|
|
186
|
+
z();
|
|
187
|
+
const n = he(C.current.get(t)?.parentId ?? null);
|
|
188
|
+
if (!(n < 0 || ge(t, n))) {
|
|
189
|
+
if (X.current.length <= n) {
|
|
190
|
+
ue(t);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
de.current = setTimeout(() => ue(t), 60);
|
|
194
|
+
}
|
|
195
|
+
}, [z, he, ge, ue]), Re = I((t) => {
|
|
196
|
+
const n = X.current, x = t === void 0 ? n.length - 1 : n.indexOf(t);
|
|
197
|
+
x < 0 || (ce(n.slice(0, x)), R(n[x]));
|
|
198
|
+
}, [ce, R]), Ee = I(() => {
|
|
199
|
+
const t = Q.current;
|
|
179
200
|
if (!t) return !1;
|
|
180
|
-
const
|
|
181
|
-
return
|
|
201
|
+
const n = C.current.get(t);
|
|
202
|
+
return n?.onActivate ? (n.onActivate(), !0) : !1;
|
|
182
203
|
}, []);
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}, [
|
|
186
|
-
const
|
|
187
|
-
editor:
|
|
188
|
-
tokenRules:
|
|
189
|
-
singleLine:
|
|
190
|
-
disabled:
|
|
191
|
-
readonly:
|
|
192
|
-
placeholder:
|
|
193
|
-
search:
|
|
194
|
-
documentText:
|
|
195
|
-
open:
|
|
196
|
-
setOpen:
|
|
197
|
-
openMenu:
|
|
198
|
-
menuOpenMode:
|
|
199
|
-
setMenuOpenMode:
|
|
200
|
-
editorContainerRef:
|
|
201
|
-
triggerRef:
|
|
202
|
-
updateTriggerPosition:
|
|
203
|
-
scheduleClose:
|
|
204
|
-
cancelClose:
|
|
205
|
-
registerItem:
|
|
206
|
-
activeId:
|
|
207
|
-
setActiveId:
|
|
208
|
-
highlightNext:
|
|
209
|
-
highlightPrevious:
|
|
210
|
-
focusFirst:
|
|
211
|
-
selectActive:
|
|
212
|
-
select:
|
|
213
|
-
|
|
214
|
-
enterSub:
|
|
215
|
-
exitSub:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
204
|
+
te(() => {
|
|
205
|
+
b || (z(), R(null), ce([]));
|
|
206
|
+
}, [b, z, R, ce]), te(() => z, [z]);
|
|
207
|
+
const He = Ie(() => ({
|
|
208
|
+
editor: d,
|
|
209
|
+
tokenRules: a,
|
|
210
|
+
singleLine: E,
|
|
211
|
+
disabled: T,
|
|
212
|
+
readonly: s,
|
|
213
|
+
placeholder: m,
|
|
214
|
+
search: k,
|
|
215
|
+
documentText: B,
|
|
216
|
+
open: b,
|
|
217
|
+
setOpen: A,
|
|
218
|
+
openMenu: j,
|
|
219
|
+
menuOpenMode: K,
|
|
220
|
+
setMenuOpenMode: $,
|
|
221
|
+
editorContainerRef: se,
|
|
222
|
+
triggerRef: Z,
|
|
223
|
+
updateTriggerPosition: H,
|
|
224
|
+
scheduleClose: N,
|
|
225
|
+
cancelClose: P,
|
|
226
|
+
registerItem: Te,
|
|
227
|
+
activeId: V,
|
|
228
|
+
setActiveId: R,
|
|
229
|
+
highlightNext: De,
|
|
230
|
+
highlightPrevious: we,
|
|
231
|
+
focusFirst: Oe,
|
|
232
|
+
selectActive: ke,
|
|
233
|
+
select: pe,
|
|
234
|
+
openSubPath: Se,
|
|
235
|
+
enterSub: ue,
|
|
236
|
+
exitSub: Re,
|
|
237
|
+
hoverSub: Me,
|
|
238
|
+
cancelHoverSub: z,
|
|
239
|
+
openActiveSub: Ee
|
|
240
|
+
}), [d, a, E, T, s, m, k, B, b, j, K, H, N, P, Te, V, R, De, we, Oe, ke, pe, Se, ue, Re, Me, z, Ee]);
|
|
241
|
+
return /* @__PURE__ */ S(Ue, { editor: d, initialValue: y, onChange: u, children: /* @__PURE__ */ S(Le.Provider, { value: He, children: /* @__PURE__ */ S(ze, { open: b, modal: !1, onOpenChange: (t) => !t && A(!1), children: /* @__PURE__ */ S(qe, { title: e, description: g, right: c, left: o, rightType: i, leftType: l, formValidation: D, ...p ?? {}, style: {
|
|
219
242
|
position: "relative",
|
|
220
|
-
...
|
|
221
|
-
}, children:
|
|
222
|
-
},
|
|
223
|
-
const e =
|
|
224
|
-
editor:
|
|
225
|
-
tokenRules:
|
|
226
|
-
singleLine:
|
|
227
|
-
disabled:
|
|
228
|
-
readonly:
|
|
229
|
-
placeholder:
|
|
230
|
-
open:
|
|
231
|
-
openMenu:
|
|
232
|
-
setOpen:
|
|
233
|
-
menuOpenMode:
|
|
234
|
-
editorContainerRef:
|
|
235
|
-
scheduleClose:
|
|
236
|
-
cancelClose:
|
|
237
|
-
highlightNext:
|
|
238
|
-
highlightPrevious:
|
|
239
|
-
focusFirst:
|
|
240
|
-
selectActive:
|
|
241
|
-
|
|
242
|
-
exitSub:
|
|
243
|
-
openActiveSub:
|
|
244
|
-
} =
|
|
245
|
-
let
|
|
246
|
-
e[0] !==
|
|
247
|
-
|
|
248
|
-
}, e[0] =
|
|
249
|
-
const
|
|
250
|
-
let
|
|
251
|
-
e[4] !==
|
|
252
|
-
const [
|
|
253
|
-
if (!
|
|
254
|
-
return
|
|
243
|
+
...p?.style
|
|
244
|
+
}, children: _ }) }) }) });
|
|
245
|
+
}, Dt = (r) => {
|
|
246
|
+
const e = ve.c(44), {
|
|
247
|
+
editor: c,
|
|
248
|
+
tokenRules: o,
|
|
249
|
+
singleLine: i,
|
|
250
|
+
disabled: l,
|
|
251
|
+
readonly: g,
|
|
252
|
+
placeholder: p,
|
|
253
|
+
open: a,
|
|
254
|
+
openMenu: f,
|
|
255
|
+
setOpen: k,
|
|
256
|
+
menuOpenMode: D,
|
|
257
|
+
editorContainerRef: w,
|
|
258
|
+
scheduleClose: T,
|
|
259
|
+
cancelClose: s,
|
|
260
|
+
highlightNext: E,
|
|
261
|
+
highlightPrevious: m,
|
|
262
|
+
focusFirst: M,
|
|
263
|
+
selectActive: O,
|
|
264
|
+
openSubPath: G,
|
|
265
|
+
exitSub: _,
|
|
266
|
+
openActiveSub: F
|
|
267
|
+
} = fe();
|
|
268
|
+
let v;
|
|
269
|
+
e[0] !== s || e[1] !== D || e[2] !== f ? (v = () => {
|
|
270
|
+
s(), D === "focus" && f();
|
|
271
|
+
}, e[0] = s, e[1] = D, e[2] = f, e[3] = v) : v = e[3];
|
|
272
|
+
const d = v;
|
|
273
|
+
let y;
|
|
274
|
+
e[4] !== o ? (y = (u) => {
|
|
275
|
+
const [j, N] = u, P = [];
|
|
276
|
+
if (!be.isText(j) || !o.length)
|
|
277
|
+
return P;
|
|
255
278
|
const {
|
|
256
|
-
text:
|
|
257
|
-
} =
|
|
258
|
-
return
|
|
259
|
-
if (
|
|
279
|
+
text: C
|
|
280
|
+
} = j;
|
|
281
|
+
return o.forEach((V, xe) => {
|
|
282
|
+
if (V.void)
|
|
260
283
|
return;
|
|
261
|
-
const
|
|
262
|
-
let
|
|
263
|
-
for (; (
|
|
264
|
-
|
|
284
|
+
const Q = new RegExp(V.pattern.source, V.pattern.flags.includes("g") ? V.pattern.flags : V.pattern.flags + "g");
|
|
285
|
+
let R;
|
|
286
|
+
for (; (R = Q.exec(C)) !== null && R[0].length; )
|
|
287
|
+
P.push({
|
|
265
288
|
anchor: {
|
|
266
|
-
path:
|
|
267
|
-
offset:
|
|
289
|
+
path: N,
|
|
290
|
+
offset: R.index
|
|
268
291
|
},
|
|
269
292
|
focus: {
|
|
270
|
-
path:
|
|
271
|
-
offset:
|
|
293
|
+
path: N,
|
|
294
|
+
offset: R.index + R[0].length
|
|
272
295
|
},
|
|
273
|
-
tokenRuleIndex:
|
|
274
|
-
tokenText:
|
|
275
|
-
tokenMatch:
|
|
296
|
+
tokenRuleIndex: xe,
|
|
297
|
+
tokenText: R[0],
|
|
298
|
+
tokenMatch: R
|
|
276
299
|
});
|
|
277
|
-
}),
|
|
278
|
-
}, e[4] =
|
|
279
|
-
const
|
|
280
|
-
let
|
|
281
|
-
e[6] !==
|
|
300
|
+
}), P;
|
|
301
|
+
}, e[4] = o, e[5] = y) : y = e[5];
|
|
302
|
+
const L = y;
|
|
303
|
+
let B;
|
|
304
|
+
e[6] !== o ? (B = (u) => {
|
|
282
305
|
const {
|
|
283
|
-
attributes:
|
|
284
|
-
children:
|
|
285
|
-
leaf:
|
|
286
|
-
} =
|
|
287
|
-
if (
|
|
288
|
-
const
|
|
289
|
-
if (
|
|
290
|
-
return
|
|
306
|
+
attributes: j,
|
|
307
|
+
children: N,
|
|
308
|
+
leaf: P
|
|
309
|
+
} = u, C = P;
|
|
310
|
+
if (C.tokenRuleIndex !== void 0) {
|
|
311
|
+
const V = o[C.tokenRuleIndex];
|
|
312
|
+
if (V)
|
|
313
|
+
return V.wrap ? /* @__PURE__ */ S("span", { ...j, children: V.wrap(C.tokenText ?? "", N, C.tokenMatch ?? []) }) : /* @__PURE__ */ S("span", { ...j, children: /* @__PURE__ */ S("span", { style: V.style, className: V.className, children: N }) });
|
|
291
314
|
}
|
|
292
|
-
return /* @__PURE__ */
|
|
293
|
-
}, e[6] =
|
|
294
|
-
const
|
|
295
|
-
let
|
|
296
|
-
e[8] !==
|
|
315
|
+
return /* @__PURE__ */ S("span", { ...j, children: N });
|
|
316
|
+
}, e[6] = o, e[7] = B) : B = e[7];
|
|
317
|
+
const W = B;
|
|
318
|
+
let b;
|
|
319
|
+
e[8] !== o ? (b = (u) => {
|
|
297
320
|
const {
|
|
298
|
-
attributes:
|
|
299
|
-
children:
|
|
300
|
-
element:
|
|
301
|
-
} =
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
304
|
-
return /* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
321
|
+
attributes: j,
|
|
322
|
+
children: N,
|
|
323
|
+
element: P
|
|
324
|
+
} = u;
|
|
325
|
+
if (re(P)) {
|
|
326
|
+
const C = o[P.ruleIndex], V = C?.wrap ? C.wrap(P.token, null, P.match ?? []) : /* @__PURE__ */ S("span", { style: C?.style, className: C?.className, children: P.token });
|
|
327
|
+
return /* @__PURE__ */ Ne("span", { ...j, children: [
|
|
328
|
+
/* @__PURE__ */ S("span", { contentEditable: !1, className: "editor-input__token", style: {
|
|
306
329
|
userSelect: "none"
|
|
307
|
-
}, children:
|
|
308
|
-
|
|
330
|
+
}, children: V }),
|
|
331
|
+
N
|
|
309
332
|
] });
|
|
310
333
|
}
|
|
311
|
-
return /* @__PURE__ */
|
|
334
|
+
return /* @__PURE__ */ S("div", { ...j, style: {
|
|
312
335
|
position: "relative"
|
|
313
|
-
}, children:
|
|
314
|
-
}, e[8] =
|
|
315
|
-
const
|
|
316
|
-
let
|
|
317
|
-
e[10] !==
|
|
318
|
-
if (
|
|
319
|
-
|
|
336
|
+
}, children: N });
|
|
337
|
+
}, e[8] = o, e[9] = b) : b = e[9];
|
|
338
|
+
const A = b;
|
|
339
|
+
let K;
|
|
340
|
+
e[10] !== c || e[11] !== _ || e[12] !== M || e[13] !== E || e[14] !== m || e[15] !== a || e[16] !== F || e[17] !== f || e[18] !== G || e[19] !== O || e[20] !== k || e[21] !== i || e[22] !== o ? (K = (u) => {
|
|
341
|
+
if (i && u.key === "Enter" && u.preventDefault(), u.ctrlKey && u.code === "Space") {
|
|
342
|
+
u.preventDefault(), a ? M() : f();
|
|
320
343
|
return;
|
|
321
344
|
}
|
|
322
|
-
if (
|
|
323
|
-
if (
|
|
324
|
-
|
|
345
|
+
if (a) {
|
|
346
|
+
if (u.key === "ArrowDown") {
|
|
347
|
+
u.preventDefault(), E();
|
|
325
348
|
return;
|
|
326
349
|
}
|
|
327
|
-
if (
|
|
328
|
-
|
|
350
|
+
if (u.key === "ArrowUp") {
|
|
351
|
+
u.preventDefault(), m();
|
|
329
352
|
return;
|
|
330
353
|
}
|
|
331
|
-
if (
|
|
332
|
-
|
|
354
|
+
if (u.key === "ArrowRight" && F()) {
|
|
355
|
+
u.preventDefault();
|
|
333
356
|
return;
|
|
334
357
|
}
|
|
335
|
-
if (
|
|
336
|
-
|
|
358
|
+
if (u.key === "ArrowLeft" && G.length > 0) {
|
|
359
|
+
u.preventDefault(), _();
|
|
337
360
|
return;
|
|
338
361
|
}
|
|
339
|
-
if (
|
|
340
|
-
|
|
362
|
+
if (u.key === "Enter") {
|
|
363
|
+
O() && u.preventDefault();
|
|
341
364
|
return;
|
|
342
365
|
}
|
|
343
|
-
if (
|
|
344
|
-
|
|
366
|
+
if (u.key === "Escape") {
|
|
367
|
+
u.preventDefault(), G.length > 0 ? _() : k(!1);
|
|
345
368
|
return;
|
|
346
369
|
}
|
|
347
370
|
}
|
|
348
|
-
if ((
|
|
349
|
-
|
|
350
|
-
const
|
|
351
|
-
|
|
371
|
+
if ((u.key === "ArrowLeft" || u.key === "ArrowRight") && !u.shiftKey && o.some(rt) && c.selection && Pe.isCollapsed(c.selection)) {
|
|
372
|
+
u.preventDefault();
|
|
373
|
+
const j = u.key === "ArrowLeft";
|
|
374
|
+
le.move(c, {
|
|
352
375
|
unit: "offset",
|
|
353
|
-
reverse:
|
|
376
|
+
reverse: j
|
|
354
377
|
});
|
|
355
|
-
const
|
|
356
|
-
if (
|
|
357
|
-
const
|
|
358
|
-
!
|
|
378
|
+
const N = c.selection;
|
|
379
|
+
if (N && Pe.isCollapsed(N)) {
|
|
380
|
+
const P = Be.parent(c, N.anchor.path);
|
|
381
|
+
!be.isText(P) && ye.isVoid(c, P) && le.move(c, {
|
|
359
382
|
unit: "offset",
|
|
360
|
-
reverse:
|
|
383
|
+
reverse: j
|
|
361
384
|
});
|
|
362
385
|
}
|
|
363
386
|
}
|
|
364
|
-
}, e[10] =
|
|
365
|
-
const
|
|
366
|
-
let
|
|
367
|
-
e[24] !==
|
|
368
|
-
const
|
|
369
|
-
let
|
|
370
|
-
e[26] !==
|
|
371
|
-
|
|
372
|
-
} : void 0, e[26] =
|
|
373
|
-
let
|
|
374
|
-
e[29] !==
|
|
375
|
-
let
|
|
376
|
-
return e[40] !==
|
|
377
|
-
},
|
|
378
|
-
const e =
|
|
379
|
-
triggerRef:
|
|
380
|
-
} =
|
|
381
|
-
let
|
|
382
|
-
e[0] !==
|
|
383
|
-
let
|
|
384
|
-
return e[2] !==
|
|
385
|
-
},
|
|
386
|
-
const e =
|
|
387
|
-
editor:
|
|
388
|
-
editorContainerRef:
|
|
389
|
-
setMenuOpenMode:
|
|
390
|
-
} =
|
|
391
|
-
let
|
|
392
|
-
e[0] !==
|
|
393
|
-
children:
|
|
394
|
-
openOn:
|
|
395
|
-
...
|
|
396
|
-
} =
|
|
397
|
-
const
|
|
398
|
-
let
|
|
399
|
-
e[4] !==
|
|
400
|
-
let
|
|
401
|
-
e[8] !==
|
|
402
|
-
|
|
403
|
-
},
|
|
404
|
-
let
|
|
405
|
-
e[11] !==
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
}, e[11] =
|
|
409
|
-
let
|
|
410
|
-
e[13] !==
|
|
387
|
+
}, e[10] = c, e[11] = _, e[12] = M, e[13] = E, e[14] = m, e[15] = a, e[16] = F, e[17] = f, e[18] = G, e[19] = O, e[20] = k, e[21] = i, e[22] = o, e[23] = K) : K = e[23];
|
|
388
|
+
const $ = K;
|
|
389
|
+
let J;
|
|
390
|
+
e[24] !== r ? (J = Ve("editor-input", r), e[24] = r, e[25] = J) : J = e[25];
|
|
391
|
+
const se = i ? "input-wrapper__control input-wrapper__control--single-line" : "input-wrapper__control", Z = l || g;
|
|
392
|
+
let U;
|
|
393
|
+
e[26] !== c || e[27] !== i ? (U = i ? (u) => {
|
|
394
|
+
u.preventDefault(), c.insertText(u.clipboardData.getData("text/plain").replace(/\r?\n/g, " "));
|
|
395
|
+
} : void 0, e[26] = c, e[27] = i, e[28] = U) : U = e[28];
|
|
396
|
+
let H;
|
|
397
|
+
e[29] !== L || e[30] !== d || e[31] !== $ || e[32] !== p || e[33] !== A || e[34] !== W || e[35] !== T || e[36] !== se || e[37] !== Z || e[38] !== U ? (H = /* @__PURE__ */ S(We, { className: se, decorate: L, renderLeaf: W, renderElement: A, readOnly: Z, spellCheck: !1, placeholder: p, onBlur: T, onFocus: d, onKeyDown: $, onPaste: U }), e[29] = L, e[30] = d, e[31] = $, e[32] = p, e[33] = A, e[34] = W, e[35] = T, e[36] = se, e[37] = Z, e[38] = U, e[39] = H) : H = e[39];
|
|
398
|
+
let ee;
|
|
399
|
+
return e[40] !== w || e[41] !== J || e[42] !== H ? (ee = /* @__PURE__ */ S("div", { ...J, ref: w, children: H }), e[40] = w, e[41] = J, e[42] = H, e[43] = ee) : ee = e[43], ee;
|
|
400
|
+
}, wt = (r) => {
|
|
401
|
+
const e = ve.c(5), {
|
|
402
|
+
triggerRef: c
|
|
403
|
+
} = fe();
|
|
404
|
+
let o;
|
|
405
|
+
e[0] !== r ? (o = Ve("editor-input__menu-anchor", r), e[0] = r, e[1] = o) : o = e[1];
|
|
406
|
+
let i;
|
|
407
|
+
return e[2] !== o || e[3] !== c ? (i = /* @__PURE__ */ S(Ze, { asChild: !0, children: /* @__PURE__ */ S("button", { ref: c, type: "button", tabIndex: -1, "aria-hidden": !0, onMouseDown: ot, ...o }) }), e[2] = o, e[3] = c, e[4] = i) : i = e[4], i;
|
|
408
|
+
}, Ot = (r) => {
|
|
409
|
+
const e = ve.c(21), {
|
|
410
|
+
editor: c,
|
|
411
|
+
editorContainerRef: o,
|
|
412
|
+
setMenuOpenMode: i
|
|
413
|
+
} = fe();
|
|
414
|
+
let l, g, p;
|
|
415
|
+
e[0] !== r ? ({
|
|
416
|
+
children: l,
|
|
417
|
+
openOn: p,
|
|
418
|
+
...g
|
|
419
|
+
} = r, e[0] = r, e[1] = l, e[2] = g, e[3] = p) : (l = e[1], g = e[2], p = e[3]);
|
|
420
|
+
const a = p === void 0 ? "shortcut" : p;
|
|
421
|
+
let f, k;
|
|
422
|
+
e[4] !== a || e[5] !== i ? (f = () => i(a), k = [a, i], e[4] = a, e[5] = i, e[6] = f, e[7] = k) : (f = e[6], k = e[7]), te(f, k);
|
|
423
|
+
let D, w;
|
|
424
|
+
e[8] !== c ? (D = (M) => {
|
|
425
|
+
M.preventDefault(), ne.focus(c);
|
|
426
|
+
}, w = () => ne.focus(c), e[8] = c, e[9] = D, e[10] = w) : (D = e[9], w = e[10]);
|
|
427
|
+
let T;
|
|
428
|
+
e[11] !== o ? (T = (M) => {
|
|
429
|
+
const O = M.target;
|
|
430
|
+
O && o.current?.contains(O) && M.preventDefault();
|
|
431
|
+
}, e[11] = o, e[12] = T) : T = e[12];
|
|
432
|
+
let s;
|
|
433
|
+
e[13] !== g || e[14] !== D || e[15] !== w || e[16] !== T ? (s = {
|
|
411
434
|
color: "primary",
|
|
412
435
|
align: "start",
|
|
413
436
|
sideOffset: 8,
|
|
414
|
-
onContextMenuCapture:
|
|
415
|
-
onCloseAutoFocus:
|
|
416
|
-
onOpenAutoFocus:
|
|
417
|
-
onFocusCapture:
|
|
418
|
-
onInteractOutside:
|
|
419
|
-
...
|
|
420
|
-
}, e[13] =
|
|
421
|
-
const
|
|
422
|
-
let
|
|
423
|
-
return e[18] !==
|
|
424
|
-
},
|
|
437
|
+
onContextMenuCapture: st,
|
|
438
|
+
onCloseAutoFocus: ct,
|
|
439
|
+
onOpenAutoFocus: D,
|
|
440
|
+
onFocusCapture: w,
|
|
441
|
+
onInteractOutside: T,
|
|
442
|
+
...g
|
|
443
|
+
}, e[13] = g, e[14] = D, e[15] = w, e[16] = T, e[17] = s) : s = e[17];
|
|
444
|
+
const E = s;
|
|
445
|
+
let m;
|
|
446
|
+
return e[18] !== l || e[19] !== E ? (m = /* @__PURE__ */ S(Je, { children: /* @__PURE__ */ S(Qe, { ...E, children: l }) }), e[18] = l, e[19] = E, e[20] = m) : m = e[20], m;
|
|
447
|
+
}, kt = (r) => {
|
|
425
448
|
const {
|
|
426
449
|
value: e,
|
|
427
|
-
data:
|
|
428
|
-
children:
|
|
429
|
-
onlyOnce:
|
|
430
|
-
aliases:
|
|
431
|
-
...
|
|
432
|
-
} =
|
|
433
|
-
editor:
|
|
434
|
-
registerItem:
|
|
435
|
-
activeId:
|
|
436
|
-
setActiveId:
|
|
437
|
-
select:
|
|
438
|
-
search:
|
|
439
|
-
documentText:
|
|
440
|
-
|
|
450
|
+
data: c,
|
|
451
|
+
children: o,
|
|
452
|
+
onlyOnce: i,
|
|
453
|
+
aliases: l,
|
|
454
|
+
...g
|
|
455
|
+
} = r, {
|
|
456
|
+
editor: p,
|
|
457
|
+
registerItem: a,
|
|
458
|
+
activeId: f,
|
|
459
|
+
setActiveId: k,
|
|
460
|
+
select: D,
|
|
461
|
+
search: w,
|
|
462
|
+
documentText: T,
|
|
463
|
+
cancelHoverSub: s
|
|
464
|
+
} = fe(), E = oe.useContext(Ce), m = oe.useId(), M = q(null), O = q({
|
|
441
465
|
value: e,
|
|
442
|
-
data:
|
|
466
|
+
data: c
|
|
443
467
|
});
|
|
444
|
-
|
|
468
|
+
O.current = {
|
|
445
469
|
value: e,
|
|
446
|
-
data:
|
|
470
|
+
data: c
|
|
447
471
|
};
|
|
448
|
-
const
|
|
449
|
-
return
|
|
450
|
-
if (!
|
|
451
|
-
return
|
|
452
|
-
getValue: () =>
|
|
453
|
-
getData: () =>
|
|
454
|
-
el:
|
|
455
|
-
parentId:
|
|
472
|
+
const G = !!i && T.includes(String(e)), _ = w?.trim().toLowerCase() ?? "", F = !_ || [typeof o == "string" ? o : String(e), ...l ?? []].some((y) => y.toLowerCase().includes(_)), v = G || !F;
|
|
473
|
+
return te(() => {
|
|
474
|
+
if (!v)
|
|
475
|
+
return a(m, {
|
|
476
|
+
getValue: () => O.current.value,
|
|
477
|
+
getData: () => O.current.data,
|
|
478
|
+
el: M,
|
|
479
|
+
parentId: E
|
|
456
480
|
});
|
|
457
|
-
}, [
|
|
458
|
-
|
|
459
|
-
}, textValue: "", "data-focus":
|
|
460
|
-
|
|
461
|
-
}, onPointerMove: (
|
|
462
|
-
|
|
463
|
-
}, onSelect: () => setTimeout(() =>
|
|
464
|
-
},
|
|
465
|
-
const e =
|
|
466
|
-
label:
|
|
467
|
-
children:
|
|
468
|
-
} =
|
|
469
|
-
editor:
|
|
470
|
-
registerItem:
|
|
471
|
-
activeId:
|
|
472
|
-
setActiveId:
|
|
473
|
-
|
|
474
|
-
enterSub:
|
|
475
|
-
exitSub:
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
e[
|
|
487
|
-
|
|
488
|
-
|
|
481
|
+
}, [m, a, E, v]), v ? null : /* @__PURE__ */ S(Xe, { ...g, ref: (y) => {
|
|
482
|
+
M.current = y;
|
|
483
|
+
}, textValue: "", "data-focus": f === m || void 0, onPointerDown: (y) => {
|
|
484
|
+
y.preventDefault(), k(m), ne.focus(p);
|
|
485
|
+
}, onPointerMove: (y) => {
|
|
486
|
+
y.preventDefault(), s(), f !== m && k(m);
|
|
487
|
+
}, onSelect: () => setTimeout(() => D(O.current.value, O.current.data), 0), children: o });
|
|
488
|
+
}, Mt = (r) => {
|
|
489
|
+
const e = ve.c(47), {
|
|
490
|
+
label: c,
|
|
491
|
+
children: o
|
|
492
|
+
} = r, {
|
|
493
|
+
editor: i,
|
|
494
|
+
registerItem: l,
|
|
495
|
+
activeId: g,
|
|
496
|
+
setActiveId: p,
|
|
497
|
+
openSubPath: a,
|
|
498
|
+
enterSub: f,
|
|
499
|
+
exitSub: k,
|
|
500
|
+
hoverSub: D,
|
|
501
|
+
cancelHoverSub: w
|
|
502
|
+
} = fe(), T = oe.useContext(Ce), s = oe.useId(), E = q(null);
|
|
503
|
+
let m, M;
|
|
504
|
+
e[0] !== f || e[1] !== s || e[2] !== T || e[3] !== l ? (m = () => l(s, {
|
|
505
|
+
getValue: it,
|
|
506
|
+
getData: lt,
|
|
507
|
+
el: E,
|
|
508
|
+
parentId: T,
|
|
509
|
+
onActivate: () => f(s)
|
|
510
|
+
}), M = [s, l, T, f], e[0] = f, e[1] = s, e[2] = T, e[3] = l, e[4] = m, e[5] = M) : (m = e[4], M = e[5]), te(m, M);
|
|
511
|
+
let O;
|
|
512
|
+
e[6] !== i ? (O = {
|
|
513
|
+
onOpenAutoFocus: ($) => {
|
|
514
|
+
$.preventDefault(), ne.focus(i);
|
|
489
515
|
},
|
|
490
|
-
onFocusCapture: () =>
|
|
491
|
-
onCloseAutoFocus:
|
|
492
|
-
onFocusOutside:
|
|
493
|
-
onInteractOutside:
|
|
494
|
-
}, e[6] =
|
|
495
|
-
const
|
|
496
|
-
let
|
|
497
|
-
e[8] !==
|
|
498
|
-
|
|
499
|
-
|
|
516
|
+
onFocusCapture: () => ne.focus(i),
|
|
517
|
+
onCloseAutoFocus: ut,
|
|
518
|
+
onFocusOutside: at,
|
|
519
|
+
onInteractOutside: ft
|
|
520
|
+
}, e[6] = i, e[7] = O) : O = e[7];
|
|
521
|
+
const G = O;
|
|
522
|
+
let _;
|
|
523
|
+
e[8] !== s || e[9] !== a ? (_ = a.includes(s), e[8] = s, e[9] = a, e[10] = _) : _ = e[10];
|
|
524
|
+
let F;
|
|
525
|
+
e[11] !== f || e[12] !== k || e[13] !== s ? (F = ($) => $ ? f(s) : k(s), e[11] = f, e[12] = k, e[13] = s, e[14] = F) : F = e[14];
|
|
526
|
+
let v;
|
|
527
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = ($) => {
|
|
528
|
+
E.current = $;
|
|
529
|
+
}, e[15] = v) : v = e[15];
|
|
530
|
+
const d = g === s || void 0;
|
|
531
|
+
let y;
|
|
532
|
+
e[16] !== i || e[17] !== f || e[18] !== s || e[19] !== p ? (y = ($) => {
|
|
533
|
+
$.preventDefault(), p(s), f(s), ne.focus(i);
|
|
534
|
+
}, e[16] = i, e[17] = f, e[18] = s, e[19] = p, e[20] = y) : y = e[20];
|
|
535
|
+
let L;
|
|
536
|
+
e[21] !== D || e[22] !== s || e[23] !== p ? (L = () => {
|
|
537
|
+
p(s), D(s);
|
|
538
|
+
}, e[21] = D, e[22] = s, e[23] = p, e[24] = L) : L = e[24];
|
|
500
539
|
let B;
|
|
501
|
-
e[
|
|
502
|
-
|
|
503
|
-
}, e[
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
e[18] !== d || e[19] !== o || e[20] !== h ? (c = () => {
|
|
511
|
-
d !== o && h(o);
|
|
512
|
-
}, e[18] = d, e[19] = o, e[20] = h, e[21] = c) : c = e[21];
|
|
540
|
+
e[25] !== g || e[26] !== s || e[27] !== p ? (B = ($) => {
|
|
541
|
+
$.preventDefault(), g !== s && p(s);
|
|
542
|
+
}, e[25] = g, e[26] = s, e[27] = p, e[28] = B) : B = e[28];
|
|
543
|
+
let W;
|
|
544
|
+
e[29] !== w || e[30] !== c || e[31] !== B || e[32] !== d || e[33] !== y || e[34] !== L ? (W = /* @__PURE__ */ S(et, { ref: v, "data-focus": d, onPointerDown: y, onPointerEnter: L, onPointerMove: B, onPointerLeave: w, children: c }), e[29] = w, e[30] = c, e[31] = B, e[32] = d, e[33] = y, e[34] = L, e[35] = W) : W = e[35];
|
|
545
|
+
let b;
|
|
546
|
+
e[36] !== o || e[37] !== s ? (b = /* @__PURE__ */ S(Ce.Provider, { value: s, children: o }), e[36] = o, e[37] = s, e[38] = b) : b = e[38];
|
|
547
|
+
let A;
|
|
548
|
+
e[39] !== G || e[40] !== b ? (A = /* @__PURE__ */ S(Ye, { color: "primary", ...G, children: b }), e[39] = G, e[40] = b, e[41] = A) : A = e[41];
|
|
513
549
|
let K;
|
|
514
|
-
e[
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
e[30] !== y || e[31] !== P ? ($ = /* @__PURE__ */ v(qe, { color: "primary", ...y, children: P }), e[30] = y, e[31] = P, e[32] = $) : $ = e[32];
|
|
519
|
-
let U;
|
|
520
|
-
return e[33] !== K || e[34] !== $ || e[35] !== F || e[36] !== E ? (U = /* @__PURE__ */ Re(Qe, { open: F, onOpenChange: E, children: [
|
|
521
|
-
K,
|
|
522
|
-
$
|
|
523
|
-
] }), e[33] = K, e[34] = $, e[35] = F, e[36] = E, e[37] = U) : U = e[37], U;
|
|
550
|
+
return e[42] !== W || e[43] !== A || e[44] !== _ || e[45] !== F ? (K = /* @__PURE__ */ Ne(tt, { open: _, onOpenChange: F, children: [
|
|
551
|
+
W,
|
|
552
|
+
A
|
|
553
|
+
] }), e[42] = W, e[43] = A, e[44] = _, e[45] = F, e[46] = K) : K = e[46], K;
|
|
524
554
|
};
|
|
525
|
-
function
|
|
526
|
-
return
|
|
555
|
+
function rt(r) {
|
|
556
|
+
return r.void;
|
|
527
557
|
}
|
|
528
|
-
function
|
|
529
|
-
return
|
|
558
|
+
function ot(r) {
|
|
559
|
+
return r.preventDefault();
|
|
530
560
|
}
|
|
531
|
-
function
|
|
532
|
-
return
|
|
561
|
+
function st(r) {
|
|
562
|
+
return r.stopPropagation();
|
|
533
563
|
}
|
|
534
|
-
function
|
|
535
|
-
return
|
|
564
|
+
function ct(r) {
|
|
565
|
+
return r.preventDefault();
|
|
536
566
|
}
|
|
537
|
-
function
|
|
567
|
+
function it() {
|
|
538
568
|
}
|
|
539
|
-
function
|
|
569
|
+
function lt() {
|
|
540
570
|
}
|
|
541
|
-
function
|
|
542
|
-
return
|
|
571
|
+
function ut(r) {
|
|
572
|
+
return r.preventDefault();
|
|
543
573
|
}
|
|
544
|
-
function
|
|
545
|
-
return
|
|
574
|
+
function at(r) {
|
|
575
|
+
return r.preventDefault();
|
|
546
576
|
}
|
|
547
|
-
function
|
|
548
|
-
return
|
|
577
|
+
function ft(r) {
|
|
578
|
+
return r.preventDefault();
|
|
549
579
|
}
|
|
550
580
|
export {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
581
|
+
Tt as EditorInput,
|
|
582
|
+
Ot as EditorInputMenu,
|
|
583
|
+
kt as EditorInputMenuItem,
|
|
584
|
+
Mt as EditorInputSubMenu,
|
|
585
|
+
wt as EditorInputTrigger,
|
|
586
|
+
Dt as EditorInputValue
|
|
557
587
|
};
|