@solibo/solibo-ui 2.3.2 → 2.3.4
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/assets/index.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index52.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/assets/index55.css +1 -1
- package/dist/assets/index59.css +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +7 -7
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +31 -31
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +9 -9
- package/dist/components/branding/index.cjs +13 -2
- package/dist/components/branding/index.js +20 -8
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +26 -26
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +170 -177
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +169 -169
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +9 -9
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +22 -22
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +15 -15
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +16 -16
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.js +22 -21
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/widget/index.cjs +1 -1
- package/dist/components/widget/index.js +16 -16
- package/dist/index-CFMWBY53.cjs +1 -0
- package/dist/index-DBjIWUDE.cjs +1 -0
- package/dist/index-DJDY6iu6.js +48 -0
- package/dist/index-DO_phxRs.js +92 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +2 -2
- package/dist/tokens.css +55 -55
- package/dist/tokens.json +258 -462
- package/package.json +1 -1
- package/dist/index-CWeknFzO.js +0 -74
- package/dist/index-Ct84TXGv.cjs +0 -1
- package/dist/index-D3gtJMYv.cjs +0 -1
- package/dist/index-DpkXKD1Z.js +0 -87
|
@@ -4,10 +4,10 @@ var J = (a, e, t) => Ot(a, typeof e != "symbol" ? e + "" : e, t);
|
|
|
4
4
|
import { jsxs as U, jsx as s, Fragment as ht } from "react/jsx-runtime";
|
|
5
5
|
import { $generateHtmlFromNodes as $t, $generateNodesFromDOM as Ut } from "@lexical/html";
|
|
6
6
|
import { TOGGLE_LINK_COMMAND as _t, $isLinkNode as st, AutoLinkNode as zt, LinkNode as Ht } from "@lexical/link";
|
|
7
|
-
import { $isListNode as bt, $isListItemNode as
|
|
7
|
+
import { $isListNode as bt, $isListItemNode as vt, REMOVE_LIST_COMMAND as Bt, INSERT_UNORDERED_LIST_COMMAND as Ft, ListNode as Wt, ListItemNode as jt } from "@lexical/list";
|
|
8
8
|
import { AutoFocusPlugin as Kt } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
9
9
|
import { AutoLinkPlugin as Gt } from "@lexical/react/LexicalAutoLinkPlugin";
|
|
10
|
-
import { useLexicalComposerContext as
|
|
10
|
+
import { useLexicalComposerContext as At } from "@lexical/react/LexicalComposerContext";
|
|
11
11
|
import { ContentEditable as qt } from "@lexical/react/LexicalContentEditable";
|
|
12
12
|
import { LexicalErrorBoundary as Yt } from "@lexical/react/LexicalErrorBoundary";
|
|
13
13
|
import { LexicalExtensionComposer as Zt } from "@lexical/react/LexicalExtensionComposer";
|
|
@@ -17,39 +17,39 @@ import { ListPlugin as Jt } from "@lexical/react/LexicalListPlugin";
|
|
|
17
17
|
import { OnChangePlugin as Qt } from "@lexical/react/LexicalOnChangePlugin";
|
|
18
18
|
import { RichTextPlugin as te } from "@lexical/react/LexicalRichTextPlugin";
|
|
19
19
|
import lt from "classix";
|
|
20
|
-
import { $getNodeByKey as
|
|
21
|
-
import { useRef as
|
|
22
|
-
import
|
|
20
|
+
import { $getNodeByKey as ft, $isParagraphNode as xt, DecoratorNode as ee, $applyNodeReplacement as re, createCommand as St, COMMAND_PRIORITY_HIGH as Mt, PASTE_COMMAND as ie, $insertNodes as Lt, $isRangeSelection as Dt, $setSelection as Pt, $getSelection as It, $isTextNode as at, $createTextNode as ne, $isNodeSelection as oe, COMMAND_PRIORITY_LOW as yt, SELECTION_CHANGE_COMMAND as se, FORMAT_TEXT_COMMAND as wt, defineExtension as ae, $getRoot as le, CLEAR_HISTORY_COMMAND as ce } from "lexical";
|
|
21
|
+
import { useRef as L, useState as w, useEffect as Z, useCallback as k, useId as ue } from "react";
|
|
22
|
+
import Ct from "sanitize-html";
|
|
23
23
|
import { Button as T } from "../button/index.js";
|
|
24
24
|
import { File as de } from "../file/index.js";
|
|
25
25
|
import { Icon as E } from "../icon/index.js";
|
|
26
26
|
import { mergeRegister as me } from "@lexical/utils";
|
|
27
|
-
import { I as
|
|
27
|
+
import { I as Nt } from "../../index-DO_phxRs.js";
|
|
28
28
|
import { Toolbar as he } from "../toolbar/index.js";
|
|
29
|
-
const
|
|
30
|
-
field:
|
|
31
|
-
editor:
|
|
29
|
+
const fe = "_field_1vfh5_3", ge = "_editor_1vfh5_8", pe = "_submit_1vfh5_23", _e = "_resizable_1vfh5_68", be = "_resized_1vfh5_72", ve = "_invalid_1vfh5_98", De = "_error_1vfh5_102", Ie = "_dragging_1vfh5_108", we = "_content_1vfh5_112", Ce = "_embedded_1vfh5_124", ke = "_files_1vfh5_144", Ae = "_placeholder_1vfh5_154", Le = "_fill_1vfh5_162", Me = "_meta_1vfh5_194", ye = "_active_1vfh5_203", Ne = "_bold_1vfh5_272", xe = "_italic_1vfh5_276", Se = "_underline_1vfh5_280", Pe = "_link_1vfh5_284", Te = "_list_1vfh5_290", Ee = "_paragraph_1vfh5_291", f = {
|
|
30
|
+
field: fe,
|
|
31
|
+
editor: ge,
|
|
32
32
|
submit: pe,
|
|
33
|
-
"image-resize-handle": "_image-resize-
|
|
34
|
-
"with-controls": "_with-
|
|
33
|
+
"image-resize-handle": "_image-resize-handle_1vfh5_47",
|
|
34
|
+
"with-controls": "_with-controls_1vfh5_53",
|
|
35
35
|
resizable: _e,
|
|
36
36
|
resized: be,
|
|
37
|
-
"resize-handle": "_resize-
|
|
38
|
-
invalid:
|
|
39
|
-
error:
|
|
37
|
+
"resize-handle": "_resize-handle_1vfh5_76",
|
|
38
|
+
invalid: ve,
|
|
39
|
+
error: De,
|
|
40
40
|
dragging: Ie,
|
|
41
|
-
content:
|
|
42
|
-
embedded:
|
|
43
|
-
"has-files": "_has-
|
|
44
|
-
files:
|
|
45
|
-
placeholder:
|
|
46
|
-
fill:
|
|
47
|
-
"fill-editor": "_fill-
|
|
48
|
-
meta:
|
|
49
|
-
active:
|
|
50
|
-
"inline-image": "_inline-
|
|
51
|
-
bold:
|
|
52
|
-
italic:
|
|
41
|
+
content: we,
|
|
42
|
+
embedded: Ce,
|
|
43
|
+
"has-files": "_has-files_1vfh5_140",
|
|
44
|
+
files: ke,
|
|
45
|
+
placeholder: Ae,
|
|
46
|
+
fill: Le,
|
|
47
|
+
"fill-editor": "_fill-editor_1vfh5_170",
|
|
48
|
+
meta: Me,
|
|
49
|
+
active: ye,
|
|
50
|
+
"inline-image": "_inline-image_1vfh5_215",
|
|
51
|
+
bold: Ne,
|
|
52
|
+
italic: xe,
|
|
53
53
|
underline: Se,
|
|
54
54
|
link: Pe,
|
|
55
55
|
list: Te,
|
|
@@ -60,31 +60,31 @@ function Re({
|
|
|
60
60
|
editor: e,
|
|
61
61
|
height: t,
|
|
62
62
|
nodeKey: c,
|
|
63
|
-
soliboDocumentId:
|
|
63
|
+
soliboDocumentId: g,
|
|
64
64
|
soliboDocumentSlot: h,
|
|
65
65
|
src: b,
|
|
66
66
|
width: n
|
|
67
67
|
}) {
|
|
68
|
-
const l =
|
|
68
|
+
const l = L(null), p = L(null), [S, C] = w(), D = () => {
|
|
69
69
|
const o = e.getRootElement();
|
|
70
70
|
if (!o) return 1 / 0;
|
|
71
71
|
const u = getComputedStyle(o);
|
|
72
72
|
return Math.max(1, o.clientWidth - (parseFloat(u.paddingLeft) || 0) - (parseFloat(u.paddingRight) || 0));
|
|
73
|
-
},
|
|
73
|
+
}, M = (o, u = D()) => Math.round(Math.min(u, Math.max(Math.min(32, u), o))), z = (o) => {
|
|
74
74
|
e.update(() => {
|
|
75
|
-
const u =
|
|
75
|
+
const u = ft(c);
|
|
76
76
|
pt(u) && u.setWidth(o);
|
|
77
|
-
}),
|
|
77
|
+
}), C(void 0);
|
|
78
78
|
};
|
|
79
|
-
return /* @__PURE__ */ U("span", { className:
|
|
79
|
+
return /* @__PURE__ */ U("span", { className: f["inline-image"], contentEditable: !1, tabIndex: h ? 0 : void 0, onKeyDown: (o) => {
|
|
80
80
|
!h || o.target !== o.currentTarget || !["Backspace", "Delete"].includes(o.key) || (o.preventDefault(), o.stopPropagation(), e.update(() => {
|
|
81
|
-
const u =
|
|
81
|
+
const u = ft(c);
|
|
82
82
|
if (!pt(u)) return;
|
|
83
|
-
const
|
|
84
|
-
|
|
83
|
+
const v = u.getParent();
|
|
84
|
+
xt(v) && v.getChildrenSize() === 1 ? v.remove() : u.remove(), e.dispatchCommand(Tt, h);
|
|
85
85
|
}), e.focus());
|
|
86
86
|
}, "data-component": "editorimage", children: [
|
|
87
|
-
/* @__PURE__ */ s("img", { alt: a, "data-solibo-document-id":
|
|
87
|
+
/* @__PURE__ */ s("img", { alt: a, "data-solibo-document-id": g, "data-solibo-document-slot": h, draggable: !1, height: S === void 0 ? t : void 0, ref: l, src: b, width: S ?? n, onClick: (o) => {
|
|
88
88
|
var u;
|
|
89
89
|
o.preventDefault(), h && ((u = o.currentTarget.parentElement) == null || u.focus()), e.dispatchCommand(Et, {
|
|
90
90
|
key: c,
|
|
@@ -93,14 +93,14 @@ function Re({
|
|
|
93
93
|
width: n
|
|
94
94
|
});
|
|
95
95
|
} }),
|
|
96
|
-
/* @__PURE__ */ s("button", { type: "button", "aria-label": `Resize image${a ? `: ${a}` : ""}`, title: "Drag to resize; use arrow keys to adjust width", className:
|
|
96
|
+
/* @__PURE__ */ s("button", { type: "button", "aria-label": `Resize image${a ? `: ${a}` : ""}`, title: "Drag to resize; use arrow keys to adjust width", className: f["image-resize-handle"], tabIndex: 0, onClick: (o) => {
|
|
97
97
|
o.preventDefault(), o.stopPropagation();
|
|
98
98
|
}, onKeyDown: (o) => {
|
|
99
|
-
var
|
|
99
|
+
var v;
|
|
100
100
|
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(o.key)) return;
|
|
101
101
|
o.preventDefault(), o.stopPropagation();
|
|
102
|
-
const u = ((
|
|
103
|
-
z(
|
|
102
|
+
const u = ((v = l.current) == null ? void 0 : v.getBoundingClientRect().width) ?? n ?? 32;
|
|
103
|
+
z(M(u + (["ArrowRight", "ArrowUp"].includes(o.key) ? 10 : -10)));
|
|
104
104
|
}, onPointerDown: (o) => {
|
|
105
105
|
o.button !== 0 || !l.current || (o.preventDefault(), o.stopPropagation(), o.currentTarget.focus({
|
|
106
106
|
preventScroll: !0
|
|
@@ -108,24 +108,24 @@ function Re({
|
|
|
108
108
|
pointerId: o.pointerId,
|
|
109
109
|
x: o.clientX,
|
|
110
110
|
width: l.current.getBoundingClientRect().width,
|
|
111
|
-
maximum:
|
|
111
|
+
maximum: D()
|
|
112
112
|
});
|
|
113
113
|
}, onPointerMove: (o) => {
|
|
114
114
|
const u = p.current;
|
|
115
|
-
!u || u.pointerId !== o.pointerId ||
|
|
115
|
+
!u || u.pointerId !== o.pointerId || C(M(u.width + o.clientX - u.x, u.maximum));
|
|
116
116
|
}, onPointerUp: (o) => {
|
|
117
117
|
const u = p.current;
|
|
118
|
-
!u || u.pointerId !== o.pointerId || (p.current = null, z(
|
|
118
|
+
!u || u.pointerId !== o.pointerId || (p.current = null, z(M(u.width + o.clientX - u.x, u.maximum)), o.currentTarget.releasePointerCapture(o.pointerId));
|
|
119
119
|
}, onPointerCancel: () => {
|
|
120
|
-
p.current = null,
|
|
120
|
+
p.current = null, C(void 0);
|
|
121
121
|
}, onLostPointerCapture: () => {
|
|
122
|
-
p.current = null,
|
|
122
|
+
p.current = null, C(void 0);
|
|
123
123
|
} })
|
|
124
124
|
] });
|
|
125
125
|
}
|
|
126
126
|
const Tt = St(), Et = St();
|
|
127
127
|
class ct extends ee {
|
|
128
|
-
constructor(t, c,
|
|
128
|
+
constructor(t, c, g, h, b, n, l) {
|
|
129
129
|
super(b);
|
|
130
130
|
J(this, "__src");
|
|
131
131
|
J(this, "__alt");
|
|
@@ -133,7 +133,7 @@ class ct extends ee {
|
|
|
133
133
|
J(this, "__height");
|
|
134
134
|
J(this, "__soliboDocumentId");
|
|
135
135
|
J(this, "__soliboDocumentSlot");
|
|
136
|
-
this.__src = t, this.__alt = c, this.__width =
|
|
136
|
+
this.__src = t, this.__alt = c, this.__width = g, this.__height = h, this.__soliboDocumentId = n, this.__soliboDocumentSlot = l;
|
|
137
137
|
}
|
|
138
138
|
static getType() {
|
|
139
139
|
return "image";
|
|
@@ -142,7 +142,7 @@ class ct extends ee {
|
|
|
142
142
|
return new ct(t.__src, t.__alt, t.__width, t.__height, t.__key, t.__soliboDocumentId, t.__soliboDocumentSlot);
|
|
143
143
|
}
|
|
144
144
|
static importJSON(t) {
|
|
145
|
-
return
|
|
145
|
+
return gt({
|
|
146
146
|
alt: t.alt,
|
|
147
147
|
height: t.height,
|
|
148
148
|
soliboDocumentId: t.soliboDocumentId,
|
|
@@ -174,17 +174,17 @@ class ct extends ee {
|
|
|
174
174
|
conversion: (c) => {
|
|
175
175
|
if (!(c instanceof HTMLImageElement))
|
|
176
176
|
return null;
|
|
177
|
-
const
|
|
178
|
-
if (!
|
|
177
|
+
const g = c.getAttribute("src") ?? "";
|
|
178
|
+
if (!g)
|
|
179
179
|
return null;
|
|
180
180
|
const h = c.getAttribute("width"), b = c.getAttribute("height");
|
|
181
181
|
return {
|
|
182
|
-
node:
|
|
182
|
+
node: gt({
|
|
183
183
|
alt: c.getAttribute("alt") ?? "",
|
|
184
184
|
height: b ? Number(b) : void 0,
|
|
185
185
|
soliboDocumentId: c.getAttribute("data-solibo-document-id") ?? void 0,
|
|
186
186
|
soliboDocumentSlot: c.getAttribute("data-solibo-document-slot") ?? void 0,
|
|
187
|
-
src:
|
|
187
|
+
src: g,
|
|
188
188
|
width: h ? Number(h) : void 0
|
|
189
189
|
})
|
|
190
190
|
};
|
|
@@ -223,15 +223,15 @@ class ct extends ee {
|
|
|
223
223
|
return /* @__PURE__ */ s(Re, { alt: this.__alt, editor: t, height: this.__height, nodeKey: this.getKey(), soliboDocumentId: this.__soliboDocumentId, soliboDocumentSlot: this.__soliboDocumentSlot, src: this.__src, width: this.__width });
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function gt({
|
|
227
227
|
alt: a = "",
|
|
228
228
|
height: e,
|
|
229
229
|
soliboDocumentId: t,
|
|
230
230
|
soliboDocumentSlot: c,
|
|
231
|
-
src:
|
|
231
|
+
src: g,
|
|
232
232
|
width: h
|
|
233
233
|
}) {
|
|
234
|
-
return re(new ct(
|
|
234
|
+
return re(new ct(g, a, h, e, void 0, t, c));
|
|
235
235
|
}
|
|
236
236
|
function pt(a) {
|
|
237
237
|
return a instanceof ct;
|
|
@@ -240,22 +240,22 @@ const Oe = ({
|
|
|
240
240
|
createImages: a,
|
|
241
241
|
onRemove: e
|
|
242
242
|
}) => {
|
|
243
|
-
const [t] =
|
|
244
|
-
return Z(() => t.registerCommand(Tt, (c) => (e(c), !0),
|
|
243
|
+
const [t] = At();
|
|
244
|
+
return Z(() => t.registerCommand(Tt, (c) => (e(c), !0), Mt), [t, e]), Z(() => t.registerCommand(ie, (c) => {
|
|
245
245
|
var n;
|
|
246
246
|
if (!("clipboardData" in c)) return !1;
|
|
247
|
-
const
|
|
247
|
+
const g = c, h = Array.from(((n = g.clipboardData) == null ? void 0 : n.items) ?? []).flatMap((l) => {
|
|
248
248
|
if (l.kind !== "file" || !l.type.startsWith("image/")) return [];
|
|
249
249
|
const p = l.getAsFile();
|
|
250
250
|
return p ? [p] : [];
|
|
251
251
|
});
|
|
252
252
|
if (h.length === 0) return !1;
|
|
253
|
-
|
|
253
|
+
g.preventDefault();
|
|
254
254
|
const b = a(h);
|
|
255
255
|
return t.update(() => {
|
|
256
|
-
|
|
256
|
+
Lt(b.map((l) => gt(l)));
|
|
257
257
|
}), !0;
|
|
258
|
-
},
|
|
258
|
+
}, Mt), [a, t]), null;
|
|
259
259
|
}, $e = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, Ue = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/, ze = [(a) => {
|
|
260
260
|
const e = $e.exec(a);
|
|
261
261
|
return e != null && e.length ? {
|
|
@@ -273,7 +273,7 @@ const Oe = ({
|
|
|
273
273
|
url: e[0].startsWith("http") ? e[0] : `https://${e[0]}`
|
|
274
274
|
} : null;
|
|
275
275
|
}];
|
|
276
|
-
function
|
|
276
|
+
function kt(a) {
|
|
277
277
|
try {
|
|
278
278
|
const e = new URL(a);
|
|
279
279
|
return e.protocol === "http:" || e.protocol === "https:";
|
|
@@ -284,7 +284,7 @@ function xt(a) {
|
|
|
284
284
|
function He({
|
|
285
285
|
editableRef: a
|
|
286
286
|
}) {
|
|
287
|
-
const e =
|
|
287
|
+
const e = L(null), [t, c] = w(0), [g, h] = w(0);
|
|
288
288
|
Z(() => {
|
|
289
289
|
const n = a.current;
|
|
290
290
|
if (!n) return;
|
|
@@ -301,7 +301,7 @@ function He({
|
|
|
301
301
|
const p = parseFloat(getComputedStyle(l).minHeight) || 0;
|
|
302
302
|
l.style.height = `${Math.max(p, n)}px`;
|
|
303
303
|
};
|
|
304
|
-
return /* @__PURE__ */ s("div", { "aria-label": "Resize editor", "aria-orientation": "horizontal", "aria-valuemin":
|
|
304
|
+
return /* @__PURE__ */ s("div", { "aria-label": "Resize editor", "aria-orientation": "horizontal", "aria-valuemin": g, "aria-valuenow": t, "aria-valuetext": `${t} pixels`, className: f["resize-handle"], role: "separator", tabIndex: 0, onDoubleClick: () => {
|
|
305
305
|
var n;
|
|
306
306
|
return (n = a.current) == null ? void 0 : n.style.removeProperty("height");
|
|
307
307
|
}, onKeyDown: (n) => {
|
|
@@ -330,9 +330,9 @@ const Be = ({
|
|
|
330
330
|
onFilesSelected: a,
|
|
331
331
|
onInlineImageRemove: e
|
|
332
332
|
}) => {
|
|
333
|
-
const [t] =
|
|
334
|
-
O.current =
|
|
335
|
-
}, []), V =
|
|
333
|
+
const [t] = At(), [c, g] = w(!1), [h, b] = w(!1), [n, l] = w(!1), [p, S] = w(!1), [C, D] = w(!1), [M, z] = w(!1), [o, u] = w(""), [v, W] = w(null), [H, j] = w(null), [B, R] = w(""), K = kt(B.trim()), it = L(null), Q = L(null), nt = L(null), O = L(null), G = L(!1), tt = (r) => r.preventDefault(), et = k((r) => {
|
|
334
|
+
O.current = Dt(r) ? r.clone() : null;
|
|
335
|
+
}, []), V = k((r) => {
|
|
336
336
|
t.update(() => {
|
|
337
337
|
O.current && Pt(O.current), r();
|
|
338
338
|
}), O.current = null;
|
|
@@ -343,33 +343,33 @@ const Be = ({
|
|
|
343
343
|
G.current = !1;
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
|
-
|
|
347
|
-
},
|
|
346
|
+
A();
|
|
347
|
+
}, y = k(() => {
|
|
348
348
|
b(!1), u(""), W(null), j(null);
|
|
349
|
-
}, []), $ =
|
|
350
|
-
|
|
351
|
-
}, []), dt =
|
|
349
|
+
}, []), $ = k(() => {
|
|
350
|
+
D(!1), R("");
|
|
351
|
+
}, []), dt = k((r) => {
|
|
352
352
|
b(!0), u((r == null ? void 0 : r.src) ?? ""), W((r == null ? void 0 : r.key) ?? null), j((r == null ? void 0 : r.soliboDocumentSlot) ?? null), $(), r != null && r.soliboDocumentSlot || setTimeout(() => {
|
|
353
353
|
var _;
|
|
354
354
|
return (_ = Q.current) == null ? void 0 : _.focus();
|
|
355
355
|
}, 0);
|
|
356
|
-
}, [$]), mt =
|
|
356
|
+
}, [$]), mt = k((r) => {
|
|
357
357
|
t.getEditorState().read(() => {
|
|
358
358
|
et(It());
|
|
359
|
-
}),
|
|
359
|
+
}), D(!0), R(r), y(), setTimeout(() => {
|
|
360
360
|
var _;
|
|
361
361
|
return (_ = nt.current) == null ? void 0 : _.focus();
|
|
362
362
|
}, 0);
|
|
363
|
-
}, [
|
|
363
|
+
}, [y, t, et]), N = k(() => {
|
|
364
364
|
const r = B.trim();
|
|
365
|
-
|
|
365
|
+
kt(r) && (V(() => {
|
|
366
366
|
t.dispatchCommand(_t, {
|
|
367
367
|
url: r,
|
|
368
368
|
target: "_blank"
|
|
369
369
|
});
|
|
370
370
|
const _ = It();
|
|
371
|
-
if (!
|
|
372
|
-
const
|
|
371
|
+
if (!Dt(_)) return;
|
|
372
|
+
const x = _.getNodes().at(-1) ?? null, F = (x == null ? void 0 : x.getParent()) ?? null, I = st(x) ? x : st(F) ? F : null;
|
|
373
373
|
if (I) {
|
|
374
374
|
const i = I.getLastChild();
|
|
375
375
|
if (at(i)) {
|
|
@@ -385,61 +385,61 @@ const Be = ({
|
|
|
385
385
|
I.insertAfter(d), d.selectEnd();
|
|
386
386
|
}
|
|
387
387
|
}), $());
|
|
388
|
-
}, [$, t, B, V]),
|
|
388
|
+
}, [$, t, B, V]), A = k(() => {
|
|
389
389
|
const r = o.trim();
|
|
390
390
|
if (!r) {
|
|
391
|
-
|
|
391
|
+
y();
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
394
|
t.update(() => {
|
|
395
|
-
if (
|
|
396
|
-
const _ =
|
|
395
|
+
if (v) {
|
|
396
|
+
const _ = ft(v);
|
|
397
397
|
pt(_) && _.setSrc(r);
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
|
|
400
|
+
Lt([gt({
|
|
401
401
|
src: r
|
|
402
402
|
})]);
|
|
403
|
-
}),
|
|
404
|
-
}, [
|
|
405
|
-
if (!
|
|
406
|
-
|
|
403
|
+
}), y();
|
|
404
|
+
}, [y, t, v, o]), q = k(() => {
|
|
405
|
+
if (!v) {
|
|
406
|
+
y();
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
t.update(() => {
|
|
410
|
-
const r =
|
|
410
|
+
const r = ft(v);
|
|
411
411
|
if (pt(r)) {
|
|
412
412
|
const _ = r.getParent();
|
|
413
|
-
|
|
413
|
+
xt(_) && _.getChildrenSize() === 1 ? _.remove() : r.remove(), H && (e == null || e(H));
|
|
414
414
|
}
|
|
415
|
-
}),
|
|
416
|
-
}, [
|
|
415
|
+
}), y();
|
|
416
|
+
}, [y, t, v, H, e]), rt = k(() => {
|
|
417
417
|
V(() => {
|
|
418
418
|
t.dispatchCommand(_t, null);
|
|
419
419
|
}), $();
|
|
420
|
-
}, [$, t, V]), Y =
|
|
420
|
+
}, [$, t, V]), Y = k(() => {
|
|
421
421
|
const r = It();
|
|
422
|
-
if (!
|
|
422
|
+
if (!Dt(r)) {
|
|
423
423
|
if (oe(r)) {
|
|
424
424
|
const F = r.getNodes(), I = F[0] ?? null, i = (I == null ? void 0 : I.getParent()) ?? null;
|
|
425
|
-
|
|
425
|
+
g(F.some((d) => at(d) && d.hasFormat("bold"))), l(F.some((d) => at(d) && d.hasFormat("italic"))), S(F.some((d) => at(d) && d.hasFormat("underline"))), z(bt(i) || vt(i) || bt(I) || vt(I));
|
|
426
426
|
const m = st(I) ? I : st(i) ? i : null;
|
|
427
427
|
if (m) {
|
|
428
|
-
|
|
428
|
+
D(!0), R(m.getURL());
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
|
-
|
|
431
|
+
D(!1), R(""), O.current = null;
|
|
432
432
|
return;
|
|
433
433
|
}
|
|
434
|
-
|
|
434
|
+
g(!1), l(!1), S(!1), z(!1), D(!1), R(""), O.current = null;
|
|
435
435
|
return;
|
|
436
436
|
}
|
|
437
|
-
const [_] = r.getNodes(),
|
|
438
|
-
if (
|
|
439
|
-
|
|
437
|
+
const [_] = r.getNodes(), x = (_ == null ? void 0 : _.getParent()) ?? null;
|
|
438
|
+
if (g(r.hasFormat("bold")), l(r.hasFormat("italic")), S(r.hasFormat("underline")), z(bt(x) || vt(x)), st(x)) {
|
|
439
|
+
D(!0), R(x.getURL()), et(r);
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
D(!1), R(""), O.current = null;
|
|
443
443
|
}, [et]);
|
|
444
444
|
return Z(() => me(t.registerUpdateListener(({
|
|
445
445
|
editorState: r
|
|
@@ -447,23 +447,23 @@ const Be = ({
|
|
|
447
447
|
r.read(() => {
|
|
448
448
|
Y();
|
|
449
449
|
});
|
|
450
|
-
}), t.registerCommand(Et, (r) => (r.soliboDocumentSlot ? (
|
|
450
|
+
}), t.registerCommand(Et, (r) => (r.soliboDocumentSlot ? (y(), $()) : dt(r), !0), yt), t.registerCommand(se, () => (t.getEditorState().read(() => {
|
|
451
451
|
Y();
|
|
452
|
-
}), !1),
|
|
452
|
+
}), !1), yt)), [y, $, t, dt, Y]), /* @__PURE__ */ U(he, { variant: "editor", "data-component": "editortoolbar", children: [
|
|
453
453
|
/* @__PURE__ */ s(T, { "aria-label": "Bold", "data-active": c, onClick: () => {
|
|
454
|
-
t.dispatchCommand(
|
|
454
|
+
t.dispatchCommand(wt, "bold");
|
|
455
455
|
}, title: "Bold", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "TextB" }) }),
|
|
456
456
|
/* @__PURE__ */ s(T, { "aria-label": "Italic", "data-active": n, onClick: () => {
|
|
457
|
-
t.dispatchCommand(
|
|
457
|
+
t.dispatchCommand(wt, "italic");
|
|
458
458
|
}, title: "Italic", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "TextItalic" }) }),
|
|
459
459
|
/* @__PURE__ */ s(T, { "aria-label": "Underline", "data-active": p, onClick: () => {
|
|
460
|
-
t.dispatchCommand(
|
|
460
|
+
t.dispatchCommand(wt, "underline");
|
|
461
461
|
}, title: "Underline", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "TextUnderline" }) }),
|
|
462
|
-
/* @__PURE__ */ s(T, { "aria-label": "List", "data-active":
|
|
463
|
-
|
|
462
|
+
/* @__PURE__ */ s(T, { "aria-label": "List", "data-active": M, onClick: () => {
|
|
463
|
+
M ? t.dispatchCommand(Bt, void 0) : t.dispatchCommand(Ft, void 0);
|
|
464
464
|
}, title: "List", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "ListBullets" }) }),
|
|
465
|
-
/* @__PURE__ */ s(T, { "aria-label": "Link", "data-active":
|
|
466
|
-
|
|
465
|
+
/* @__PURE__ */ s(T, { "aria-label": "Link", "data-active": C, onClick: () => {
|
|
466
|
+
C ? mt(B) : (t.dispatchCommand(_t, {
|
|
467
467
|
url: "https://"
|
|
468
468
|
}), mt("https://"));
|
|
469
469
|
}, title: "Link", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Link" }) }),
|
|
@@ -476,22 +476,22 @@ const Be = ({
|
|
|
476
476
|
return (r = it.current) == null ? void 0 : r.click();
|
|
477
477
|
}, title: "Upload files", variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Paperclip" }) })
|
|
478
478
|
] }),
|
|
479
|
-
/* @__PURE__ */ U("div", { className: lt(
|
|
480
|
-
|
|
481
|
-
/* @__PURE__ */ s(
|
|
482
|
-
r.key === "Enter" && (r.preventDefault(),
|
|
479
|
+
/* @__PURE__ */ U("div", { className: lt(f.meta, C || h ? f.active : ""), children: [
|
|
480
|
+
C && /* @__PURE__ */ U(ht, { children: [
|
|
481
|
+
/* @__PURE__ */ s(Nt, { "aria-invalid": !K, onBlur: () => N(), onChange: (r) => R(r.target.value), onKeyDown: (r) => {
|
|
482
|
+
r.key === "Enter" && (r.preventDefault(), N());
|
|
483
483
|
}, ref: nt, value: B }),
|
|
484
484
|
/* @__PURE__ */ s(T, { "aria-label": "Apply link", disabled: !K, onClick: () => {
|
|
485
|
-
|
|
485
|
+
N();
|
|
486
486
|
}, onMouseDown: tt, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Check" }) }),
|
|
487
487
|
/* @__PURE__ */ s(T, { "aria-label": "Remove link", onClick: () => rt(), onMouseDown: tt, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Trash", variant: "danger" }) })
|
|
488
488
|
] }),
|
|
489
489
|
h && /* @__PURE__ */ U(ht, { children: [
|
|
490
490
|
!H && /* @__PURE__ */ U(ht, { children: [
|
|
491
|
-
/* @__PURE__ */ s(
|
|
492
|
-
r.key === "Enter" && (r.preventDefault(), G.current = !0,
|
|
491
|
+
/* @__PURE__ */ s(Nt, { className: lt(f.active), onBlur: X, onChange: (r) => u(r.target.value), onKeyDown: (r) => {
|
|
492
|
+
r.key === "Enter" && (r.preventDefault(), G.current = !0, A());
|
|
493
493
|
}, ref: Q, value: o }),
|
|
494
|
-
/* @__PURE__ */ s(T, { "aria-label": "Apply image", onClick: () =>
|
|
494
|
+
/* @__PURE__ */ s(T, { "aria-label": "Apply image", onClick: () => A(), onMouseDown: ut, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Check" }) })
|
|
495
495
|
] }),
|
|
496
496
|
/* @__PURE__ */ s(T, { "aria-label": "Remove image", onClick: () => q(), onMouseDown: ut, variant: "tertiary", children: /* @__PURE__ */ s(E, { name: "Trash", variant: "danger" }) })
|
|
497
497
|
] })
|
|
@@ -505,16 +505,16 @@ const Be = ({
|
|
|
505
505
|
throw a;
|
|
506
506
|
},
|
|
507
507
|
theme: {
|
|
508
|
-
link:
|
|
508
|
+
link: f.link,
|
|
509
509
|
list: {
|
|
510
|
-
ol:
|
|
511
|
-
ul:
|
|
510
|
+
ol: f.list,
|
|
511
|
+
ul: f.list
|
|
512
512
|
},
|
|
513
|
-
paragraph:
|
|
513
|
+
paragraph: f.paragraph,
|
|
514
514
|
text: {
|
|
515
|
-
bold:
|
|
516
|
-
italic:
|
|
517
|
-
underline:
|
|
515
|
+
bold: f.bold,
|
|
516
|
+
italic: f.italic,
|
|
517
|
+
underline: f.underline
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
});
|
|
@@ -523,43 +523,43 @@ function We({
|
|
|
523
523
|
content: e = "",
|
|
524
524
|
sessionKey: t,
|
|
525
525
|
lastEmittedContentRef: c,
|
|
526
|
-
imagePreviews:
|
|
526
|
+
imagePreviews: g
|
|
527
527
|
}) {
|
|
528
|
-
const [h] =
|
|
528
|
+
const [h] = At(), b = L(t);
|
|
529
529
|
return Z(() => {
|
|
530
530
|
const n = b.current !== t;
|
|
531
531
|
b.current = t, !(!n && c.current === e) && (h.update(() => {
|
|
532
532
|
const p = new DOMParser().parseFromString(e, "text/html");
|
|
533
|
-
p.querySelectorAll("img[data-solibo-document-slot]").forEach((
|
|
534
|
-
const
|
|
535
|
-
|
|
533
|
+
p.querySelectorAll("img[data-solibo-document-slot]").forEach((D) => {
|
|
534
|
+
const M = g.get(D.getAttribute("data-solibo-document-slot"));
|
|
535
|
+
M && D.setAttribute("src", M);
|
|
536
536
|
});
|
|
537
|
-
const S = Ut(h, p),
|
|
538
|
-
|
|
537
|
+
const S = Ut(h, p), C = le();
|
|
538
|
+
C.clear().select(), Lt(S), a || n ? C.selectEnd() : Pt(null);
|
|
539
539
|
}, {
|
|
540
540
|
discrete: !0
|
|
541
541
|
}), n && h.dispatchCommand(ce, void 0));
|
|
542
|
-
}, [a, e, h,
|
|
542
|
+
}, [a, e, h, g, c, t]), null;
|
|
543
543
|
}
|
|
544
544
|
const pr = ({
|
|
545
545
|
autofocus: a = !1,
|
|
546
546
|
attachmentsEnabled: e = !0,
|
|
547
547
|
sessionKey: t,
|
|
548
548
|
autolink: c = !1,
|
|
549
|
-
content:
|
|
549
|
+
content: g,
|
|
550
550
|
controls: h,
|
|
551
551
|
disabled: b = !1,
|
|
552
552
|
errorMessage: n,
|
|
553
553
|
fill: l = !1,
|
|
554
554
|
files: p,
|
|
555
555
|
inline: S = !1,
|
|
556
|
-
inlineImages:
|
|
557
|
-
invalid:
|
|
558
|
-
isSubmitting:
|
|
556
|
+
inlineImages: C,
|
|
557
|
+
invalid: D = !1,
|
|
558
|
+
isSubmitting: M = !1,
|
|
559
559
|
maxRows: z = 12,
|
|
560
560
|
minRows: o = 1,
|
|
561
561
|
onChange: u,
|
|
562
|
-
onFilesChange:
|
|
562
|
+
onFilesChange: v,
|
|
563
563
|
onInlineImagesChange: W,
|
|
564
564
|
onSubmit: H,
|
|
565
565
|
onUpload: j,
|
|
@@ -569,7 +569,7 @@ const pr = ({
|
|
|
569
569
|
submitLabel: it = "Submit",
|
|
570
570
|
variant: Q = "default"
|
|
571
571
|
}) => {
|
|
572
|
-
const nt = ue(), O =
|
|
572
|
+
const nt = ue(), O = L(void 0), G = L(!1), tt = L(null), [et, V] = w(!1), [ut, X] = w(!1), [y, $] = w([]), [dt, mt] = w([]), N = L(/* @__PURE__ */ new Map()), A = p ?? y, q = C ?? dt;
|
|
573
573
|
Z(() => {
|
|
574
574
|
const i = tt.current;
|
|
575
575
|
if (!i) return;
|
|
@@ -584,13 +584,13 @@ const pr = ({
|
|
|
584
584
|
}), m(), () => d.disconnect();
|
|
585
585
|
}, [l, K]);
|
|
586
586
|
const rt = (i) => {
|
|
587
|
-
p === void 0 && $(i),
|
|
588
|
-
}, Y =
|
|
589
|
-
|
|
590
|
-
}, [
|
|
587
|
+
p === void 0 && $(i), v == null || v(i);
|
|
588
|
+
}, Y = k((i) => {
|
|
589
|
+
C === void 0 && mt(i), W == null || W(i);
|
|
590
|
+
}, [C, W]), r = k((i) => {
|
|
591
591
|
const m = i.map((d) => {
|
|
592
592
|
const P = `pasted-${crypto.randomUUID()}`, ot = URL.createObjectURL(d);
|
|
593
|
-
return
|
|
593
|
+
return N.current.set(P, ot), {
|
|
594
594
|
image: {
|
|
595
595
|
alt: d.name,
|
|
596
596
|
soliboDocumentSlot: P,
|
|
@@ -607,20 +607,20 @@ const pr = ({
|
|
|
607
607
|
}) => d)]), m.map(({
|
|
608
608
|
image: d
|
|
609
609
|
}) => d);
|
|
610
|
-
}, [q, Y]), _ =
|
|
610
|
+
}, [q, Y]), _ = k((i) => {
|
|
611
611
|
Y(q.filter((d) => d.slot !== i));
|
|
612
|
-
const m =
|
|
613
|
-
m && URL.revokeObjectURL(m),
|
|
612
|
+
const m = N.current.get(i);
|
|
613
|
+
m && URL.revokeObjectURL(m), N.current.delete(i);
|
|
614
614
|
}, [q, Y]);
|
|
615
615
|
Z(() => () => {
|
|
616
|
-
|
|
616
|
+
N.current.forEach((i) => URL.revokeObjectURL(i)), N.current.clear();
|
|
617
617
|
}, []), Z(() => {
|
|
618
618
|
const i = new Set(q.map((m) => m.slot));
|
|
619
|
-
|
|
620
|
-
i.has(d) || (URL.revokeObjectURL(m),
|
|
619
|
+
N.current.forEach((m, d) => {
|
|
620
|
+
i.has(d) || (URL.revokeObjectURL(m), N.current.delete(d));
|
|
621
621
|
});
|
|
622
622
|
}, [q]);
|
|
623
|
-
const
|
|
623
|
+
const x = (i) => {
|
|
624
624
|
if (typeof DataTransfer < "u") {
|
|
625
625
|
const m = new DataTransfer();
|
|
626
626
|
return i.forEach((d) => m.items.add(d)), m.files;
|
|
@@ -629,10 +629,10 @@ const pr = ({
|
|
|
629
629
|
item: (m) => i[m] ?? null
|
|
630
630
|
});
|
|
631
631
|
}, F = async () => {
|
|
632
|
-
if (!(b ||
|
|
632
|
+
if (!(b || M || G.current)) {
|
|
633
633
|
G.current = !0;
|
|
634
634
|
try {
|
|
635
|
-
e &&
|
|
635
|
+
e && A.length > 0 && await (j == null ? void 0 : j(x(A))), await (H == null ? void 0 : H()), e && A.length > 0 && rt([]);
|
|
636
636
|
} catch {
|
|
637
637
|
return;
|
|
638
638
|
} finally {
|
|
@@ -642,43 +642,43 @@ const pr = ({
|
|
|
642
642
|
}, I = (i) => {
|
|
643
643
|
i.preventDefault(), i.stopPropagation();
|
|
644
644
|
};
|
|
645
|
-
return /* @__PURE__ */ U("div", { className: lt(
|
|
646
|
-
I(i), X(e && !!
|
|
645
|
+
return /* @__PURE__ */ U("div", { className: lt(f.field, l && f.fill), "data-max-rows": z, "data-min-rows": o, onDragEnter: (i) => {
|
|
646
|
+
I(i), X(e && !!v);
|
|
647
647
|
}, onDragOver: (i) => {
|
|
648
|
-
I(i), X(e && !!
|
|
648
|
+
I(i), X(e && !!v);
|
|
649
649
|
}, onDragLeave: (i) => {
|
|
650
650
|
I(i), X(!1);
|
|
651
651
|
}, onDropCapture: (i) => {
|
|
652
652
|
var d;
|
|
653
653
|
const m = (d = i.dataTransfer) == null ? void 0 : d.files;
|
|
654
|
-
m != null && m.length && (I(i), e && (
|
|
654
|
+
m != null && m.length && (I(i), e && (v || j) && rt([...A, ...Array.from(m)]), X(!1));
|
|
655
655
|
}, onDrop: (i) => {
|
|
656
656
|
i.preventDefault(), X(!1);
|
|
657
657
|
}, "data-component": "editor", children: [
|
|
658
658
|
K === "top" && !l && /* @__PURE__ */ s(He, { editableRef: tt }),
|
|
659
|
-
/* @__PURE__ */ s("div", { className: lt(
|
|
659
|
+
/* @__PURE__ */ s("div", { className: lt(f.editor, !!h && f["with-controls"], Q === "embedded" && f.embedded, l && f["fill-editor"], K === !0 && !l && f.resizable, K && !l && et && f.resized, D && f.invalid, A.length > 0 && f["has-files"]), style: {
|
|
660
660
|
"--editor-max-height": `calc(${z * 1.25}em + (2 * var(--scale-8)))`,
|
|
661
661
|
"--editor-min-height": `calc(${o * 1.25}em + (2 * var(--scale-8)))`
|
|
662
662
|
}, children: /* @__PURE__ */ U(Zt, { contentEditable: null, extension: Fe, children: [
|
|
663
|
-
!S && Q !== "embedded" && /* @__PURE__ */ s(Be, { onInlineImageRemove: e ? _ : void 0, onFilesSelected: e && (j ||
|
|
664
|
-
rt([...
|
|
663
|
+
!S && Q !== "embedded" && /* @__PURE__ */ s(Be, { onInlineImageRemove: e ? _ : void 0, onFilesSelected: e && (j || v) ? (i) => {
|
|
664
|
+
rt([...A, ...Array.from(i)]);
|
|
665
665
|
} : void 0 }),
|
|
666
|
-
/* @__PURE__ */ s("div", { className: lt(
|
|
667
|
-
!S && Q !== "embedded" && (h || H) && /* @__PURE__ */ s("div", { className:
|
|
668
|
-
e &&
|
|
666
|
+
/* @__PURE__ */ s("div", { className: lt(f.content, ut && f.dragging), children: /* @__PURE__ */ s(te, { contentEditable: /* @__PURE__ */ s(qt, { ref: tt, "aria-placeholder": B ?? "", ariaErrorMessage: D && n ? nt : void 0, ariaInvalid: D || void 0, ariaRequired: R || void 0, placeholder: () => B ? /* @__PURE__ */ s("div", { className: f.placeholder, children: B }) : null }), ErrorBoundary: Yt }) }),
|
|
667
|
+
!S && Q !== "embedded" && (h || H) && /* @__PURE__ */ s("div", { className: f.submit, children: h ?? /* @__PURE__ */ s(T, { "aria-label": it, "data-cy": "toolbar-submit-button", disabled: b, icon: "PaperPlaneTilt", isLoading: M, onClick: () => void F(), variant: "primary", children: /* @__PURE__ */ s("span", { children: it }) }) }),
|
|
668
|
+
e && A.length > 0 && /* @__PURE__ */ s("div", { "aria-label": "Files to upload", className: f.files, role: "region", children: A.map((i, m) => /* @__PURE__ */ s(de, { deleteAccessibleLabel: `Remove ${i.name} from upload queue`, name: i.name, onDelete: () => rt(A.filter((d, P) => P !== m)) }, `${i.name}-${i.size}-${i.lastModified}-${m}`)) }),
|
|
669
669
|
a && /* @__PURE__ */ s(Kt, {}),
|
|
670
670
|
c && /* @__PURE__ */ s(Gt, { matchers: ze }),
|
|
671
671
|
/* @__PURE__ */ s(Vt, {}),
|
|
672
672
|
e && W && /* @__PURE__ */ s(Oe, { createImages: r, onRemove: _ }),
|
|
673
|
-
|
|
674
|
-
/* @__PURE__ */ s(Xt, { validateUrl:
|
|
673
|
+
g !== void 0 && /* @__PURE__ */ s(We, { autofocus: a, content: g, sessionKey: t, lastEmittedContentRef: O, imagePreviews: N.current }),
|
|
674
|
+
/* @__PURE__ */ s(Xt, { validateUrl: kt }),
|
|
675
675
|
/* @__PURE__ */ s(Jt, {}),
|
|
676
676
|
u && /* @__PURE__ */ s(Qt, { ignoreHistoryMergeTagChange: !1, onChange: (i, m) => {
|
|
677
677
|
i.read(() => {
|
|
678
|
-
const d = $t(m, null), P =
|
|
678
|
+
const d = $t(m, null), P = Ct(d, {
|
|
679
679
|
allowedAttributes: {
|
|
680
|
-
...
|
|
681
|
-
img: [...
|
|
680
|
+
...Ct.defaults.allowedAttributes,
|
|
681
|
+
img: [...Ct.defaults.allowedAttributes.img ?? [], "data-solibo-document-id", "data-solibo-document-slot"]
|
|
682
682
|
},
|
|
683
683
|
allowedTags: ["a", "b", "br", "i", "img", "li", "ol", "p", "u", "ul"]
|
|
684
684
|
});
|
|
@@ -686,7 +686,7 @@ const pr = ({
|
|
|
686
686
|
});
|
|
687
687
|
} })
|
|
688
688
|
] }) }),
|
|
689
|
-
|
|
689
|
+
D && n && /* @__PURE__ */ U("div", { className: f.error, id: nt, children: [
|
|
690
690
|
/* @__PURE__ */ s(E, { name: "Warning", gap: "right", size: "small" }),
|
|
691
691
|
n
|
|
692
692
|
] })
|