eddyter 1.3.63 → 1.3.64
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/LICENSE +24 -24
- package/README.md +493 -493
- package/dist/ImageResizer-CbtUYHip.js +199 -0
- package/dist/api/auth.d.ts +4 -2
- package/dist/assets/style.css +1 -1
- package/dist/{babel-B9hn44Wo.js → babel-CCPWkrf4.js} +1302 -726
- package/dist/components/LockedFeature/LockedFeature.d.ts +23 -0
- package/dist/components/LockedFeature/index.d.ts +2 -0
- package/dist/components/UnifiedColorPicker/UnifiedColorPicker.d.ts +14 -0
- package/dist/components/VideoView/index.d.ts +13 -0
- package/dist/constants.d.ts +3 -1
- package/dist/editorConfig.d.ts +2 -3
- package/dist/{estree-CocPn_Md.js → estree-CxUPh9wa.js} +917 -529
- package/dist/{html-CxCicOef.js → html-CmniStvG.js} +589 -350
- package/dist/{html2pdf.bundle-Bc2h6DHT.js → html2pdf.bundle-C1B1lr_T.js} +3796 -2777
- package/dist/{html2pdf.bundle.min-BvakEXhX.js → html2pdf.bundle.min-kPviTsNx.js} +5223 -3407
- package/dist/index-BL8HWCRw.js +816 -0
- package/dist/index-BpsoOKOs.js +274 -0
- package/dist/{index-C2a6-XFM.js → index-DHKx5grA.js} +4 -4
- package/dist/{index-DoJIKSPF.js → index-FZVNbwSO.js} +12356 -11290
- package/dist/index.js +3 -3
- package/dist/{markdown-BUjgWFLu.js → markdown-B0mEGGfQ.js} +1015 -578
- package/dist/nodes/UploadingVideoNode.d.ts +30 -0
- package/dist/nodes/VideoNode.d.ts +47 -0
- package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +2 -1
- package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -1
- package/dist/plugins/VideoPlugin.d.ts +17 -0
- package/dist/{postcss-CGIcwj_g.js → postcss-B0bxXf7u.js} +1065 -615
- package/dist/{standalone-C0qguT38.js → standalone-DmuJV5rn.js} +596 -350
- package/dist/types.d.ts +4 -6
- package/dist/{typescript-BM7wk6k-.js → typescript-DZlC_9M8.js} +1805 -1113
- package/dist/ui/Icons.d.ts +2 -1
- package/dist/utils/uploadManager.d.ts +17 -0
- package/package.json +151 -151
- package/dist/index-B0VTEqfr.js +0 -985
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
import { jsx as t, jsxs as n, Fragment as ot } from "react/jsx-runtime";
|
|
2
|
+
import { I as it } from "./ImageResizer-CbtUYHip.js";
|
|
3
|
+
import { CodeNode as xe } from "@lexical/code";
|
|
4
|
+
import { LinkNode as Ce } from "@lexical/link";
|
|
5
|
+
import { AutoFocusPlugin as nt } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
6
|
+
import { useCollaborationContext as ct } from "@lexical/react/LexicalCollaborationContext";
|
|
7
|
+
import { useLexicalComposerContext as at } from "@lexical/react/LexicalComposerContext";
|
|
8
|
+
import { ContentEditable as ye } from "@lexical/react/LexicalContentEditable";
|
|
9
|
+
import { LexicalErrorBoundary as Ne } from "@lexical/react/LexicalErrorBoundary";
|
|
10
|
+
import { HistoryPlugin as we } from "@lexical/react/LexicalHistoryPlugin";
|
|
11
|
+
import { LexicalNestedComposer as ve } from "@lexical/react/LexicalNestedComposer";
|
|
12
|
+
import { OnChangePlugin as Ee } from "@lexical/react/LexicalOnChangePlugin";
|
|
13
|
+
import { RichTextPlugin as ke } from "@lexical/react/LexicalRichTextPlugin";
|
|
14
|
+
import { useLexicalEditable as dt } from "@lexical/react/useLexicalEditable";
|
|
15
|
+
import { useLexicalNodeSelection as st } from "@lexical/react/useLexicalNodeSelection";
|
|
16
|
+
import { mergeRegister as lt } from "@lexical/utils";
|
|
17
|
+
import { RootNode as Ie, TextNode as Re, LineBreakNode as Pe, ParagraphNode as Se, $getSelection as _, $isNodeSelection as L, $isParagraphNode as pe, $setSelection as Q, $isRangeSelection as mt, SELECTION_CHANGE_COMMAND as ut, COMMAND_PRIORITY_LOW as w, CLICK_COMMAND as gt, DRAGSTART_COMMAND as ft, KEY_DELETE_COMMAND as pt, KEY_BACKSPACE_COMMAND as ht, KEY_ENTER_COMMAND as bt, KEY_ESCAPE_COMMAND as xt, createCommand as Ct, $getNodeByKey as $ } from "lexical";
|
|
18
|
+
import { useRef as G, useState as f, useEffect as U, useCallback as C, Suspense as yt } from "react";
|
|
19
|
+
import { a as Nt, D as wt, b as vt, d as Et, e as kt, f as It, h as Rt, B as he, L as De, i as Ae, u as Pt, $ as M, W as St, j as Dt, A as At, k as Lt, l as Mt, T as Ot, m as _t, S as $t, E as zt, n as Wt, t as v, o as jt, p as Kt, C as Tt } from "./index-FZVNbwSO.js";
|
|
20
|
+
const Bt = Nt("Link2", [
|
|
21
|
+
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
22
|
+
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
23
|
+
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
24
|
+
]), Gt = ({
|
|
25
|
+
open: l,
|
|
26
|
+
onOpenChange: c,
|
|
27
|
+
oldImageUrl: u,
|
|
28
|
+
newImageUrl: b,
|
|
29
|
+
onReplace: y,
|
|
30
|
+
onCancel: N
|
|
31
|
+
}) => /* @__PURE__ */ t(wt, { open: l, onOpenChange: c, children: /* @__PURE__ */ n(vt, { className: "sm:max-w-[800px] max-h-[90vh] overflow-y-auto", children: [
|
|
32
|
+
/* @__PURE__ */ n(Et, { children: [
|
|
33
|
+
/* @__PURE__ */ n(kt, { className: "flex items-center gap-2 text-xl", children: [
|
|
34
|
+
/* @__PURE__ */ t("span", { className: "text-2xl", children: "🔄" }),
|
|
35
|
+
"Compare Images"
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ t(It, { className: "text-sm pt-1", children: "Choose whether to replace the original image with the refined version." })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ n("div", { className: "space-y-4 py-4", children: [
|
|
40
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
41
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
42
|
+
/* @__PURE__ */ t("span", { className: "text-sm font-semibold text-gray-700 dark:text-gray-300", children: "Refined Image" }),
|
|
43
|
+
/* @__PURE__ */ t("span", { className: "text-xs px-2 py-1 rounded-full bg-blue-100 dark:bg-blue-950/30 text-blue-600 dark:text-blue-400", children: "New" })
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ t("div", { className: "relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800 border-2 border-blue-500 dark:border-blue-600", children: /* @__PURE__ */ t(
|
|
46
|
+
"img",
|
|
47
|
+
{
|
|
48
|
+
src: b,
|
|
49
|
+
alt: "Refined",
|
|
50
|
+
className: "w-full h-full object-contain"
|
|
51
|
+
}
|
|
52
|
+
) })
|
|
53
|
+
] }) }),
|
|
54
|
+
/* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800", children: /* @__PURE__ */ n("p", { className: "text-sm text-blue-800 dark:text-blue-200", children: [
|
|
55
|
+
/* @__PURE__ */ t("span", { className: "font-semibold", children: "Note:" }),
|
|
56
|
+
' Clicking "Replace" will update the image in your document. This action cannot be undone.'
|
|
57
|
+
] }) })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ n(Rt, { className: "gap-2", children: [
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
he,
|
|
62
|
+
{
|
|
63
|
+
variant: "outline",
|
|
64
|
+
onClick: N,
|
|
65
|
+
children: "Keep Original"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ n(
|
|
69
|
+
he,
|
|
70
|
+
{
|
|
71
|
+
onClick: y,
|
|
72
|
+
className: "bg-blue-500 hover:bg-blue-600 text-white",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ t("span", { className: "mr-2", children: "✓" }),
|
|
75
|
+
"Replace Image"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
] }) });
|
|
81
|
+
function Yt({
|
|
82
|
+
caption: l
|
|
83
|
+
}) {
|
|
84
|
+
return /* @__PURE__ */ t("div", { className: "signature-caption-container", children: /* @__PURE__ */ n(
|
|
85
|
+
ve,
|
|
86
|
+
{
|
|
87
|
+
initialEditor: l,
|
|
88
|
+
initialNodes: [
|
|
89
|
+
Ie,
|
|
90
|
+
Re,
|
|
91
|
+
Pe,
|
|
92
|
+
Se,
|
|
93
|
+
Ce,
|
|
94
|
+
xe
|
|
95
|
+
],
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ t(
|
|
98
|
+
ke,
|
|
99
|
+
{
|
|
100
|
+
contentEditable: /* @__PURE__ */ t(
|
|
101
|
+
ye,
|
|
102
|
+
{
|
|
103
|
+
"aria-placeholder": "Enter signature name...",
|
|
104
|
+
placeholder: /* @__PURE__ */ t("div", { style: {
|
|
105
|
+
position: "absolute",
|
|
106
|
+
top: "4px",
|
|
107
|
+
left: "8px",
|
|
108
|
+
right: "8px",
|
|
109
|
+
textAlign: "center",
|
|
110
|
+
pointerEvents: "none",
|
|
111
|
+
color: "hsla(var(--cteditorf47ac10b-foreground) / 0.4)",
|
|
112
|
+
fontStyle: "italic"
|
|
113
|
+
}, children: "Enter signature name..." }),
|
|
114
|
+
className: "signature-caption-editable"
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
ErrorBoundary: Ne
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ t(Ee, { onChange: () => {
|
|
121
|
+
} }),
|
|
122
|
+
/* @__PURE__ */ t(we, {}),
|
|
123
|
+
/* @__PURE__ */ t(De, { namespace: Ae.namespace })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
) });
|
|
127
|
+
}
|
|
128
|
+
const Z = /* @__PURE__ */ new Set(), be = Ct("RIGHT_CLICK_IMAGE_COMMAND");
|
|
129
|
+
function Ft(l) {
|
|
130
|
+
if (!Z.has(l))
|
|
131
|
+
throw new Promise((c) => {
|
|
132
|
+
const u = new Image();
|
|
133
|
+
u.src = l, u.onload = () => {
|
|
134
|
+
Z.add(l), c(null);
|
|
135
|
+
}, u.onerror = () => {
|
|
136
|
+
Z.add(l);
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function Ht({
|
|
141
|
+
altText: l,
|
|
142
|
+
className: c,
|
|
143
|
+
imageRef: u,
|
|
144
|
+
src: b,
|
|
145
|
+
width: y,
|
|
146
|
+
height: N,
|
|
147
|
+
maxWidth: ee,
|
|
148
|
+
onError: I
|
|
149
|
+
}) {
|
|
150
|
+
return Ft(b), /* @__PURE__ */ t(
|
|
151
|
+
"img",
|
|
152
|
+
{
|
|
153
|
+
className: c || void 0,
|
|
154
|
+
src: b,
|
|
155
|
+
alt: l,
|
|
156
|
+
ref: u,
|
|
157
|
+
style: typeof y == "number" && typeof N == "number" ? {
|
|
158
|
+
// User has set a numeric size or original dimensions are provided
|
|
159
|
+
width: typeof y == "number" ? y : "auto",
|
|
160
|
+
height: typeof N == "number" ? N : "auto",
|
|
161
|
+
maxWidth: "100%"
|
|
162
|
+
} : {
|
|
163
|
+
// No dimensions specified - use original image size
|
|
164
|
+
maxWidth: "100%",
|
|
165
|
+
height: "auto"
|
|
166
|
+
},
|
|
167
|
+
onError: I,
|
|
168
|
+
draggable: "false"
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
function qt() {
|
|
173
|
+
return /* @__PURE__ */ t(
|
|
174
|
+
"img",
|
|
175
|
+
{
|
|
176
|
+
src: "",
|
|
177
|
+
style: {
|
|
178
|
+
height: 200,
|
|
179
|
+
opacity: 0.2,
|
|
180
|
+
width: 200
|
|
181
|
+
},
|
|
182
|
+
draggable: "false"
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
function Cr({
|
|
187
|
+
src: l,
|
|
188
|
+
altText: c,
|
|
189
|
+
nodeKey: u,
|
|
190
|
+
width: b,
|
|
191
|
+
height: y,
|
|
192
|
+
maxWidth: N,
|
|
193
|
+
resizable: ee,
|
|
194
|
+
showCaption: I,
|
|
195
|
+
caption: E,
|
|
196
|
+
captionsEnabled: te,
|
|
197
|
+
originalPrompt: R,
|
|
198
|
+
position: a = "none",
|
|
199
|
+
linkUrl: p
|
|
200
|
+
}) {
|
|
201
|
+
const g = G(null), Y = G(null), [s, x, O] = st(u), [k, re] = f(!1), { isCollabActive: Xt } = ct(), [o] = at(), [z, Le] = f(null), oe = G(null), [W, Me] = f(!1), Oe = dt(), [ie, j] = f(!1), [P, K] = f(""), [S, ne] = f(!1), [_e, T] = f(!1), [ce, F] = f(""), [$e, H] = f(""), [ze, ae] = f(!1), D = G(null), [de, We] = f(0), je = Pt()?.apiKey, Ke = de > 0 && de < 350;
|
|
202
|
+
U(() => {
|
|
203
|
+
if (g.current) {
|
|
204
|
+
const e = () => {
|
|
205
|
+
g.current && We(g.current.offsetWidth);
|
|
206
|
+
};
|
|
207
|
+
e();
|
|
208
|
+
const r = new ResizeObserver(e);
|
|
209
|
+
return r.observe(g.current), () => r.disconnect();
|
|
210
|
+
}
|
|
211
|
+
}, [b, y, s]);
|
|
212
|
+
const q = C(
|
|
213
|
+
(e) => {
|
|
214
|
+
const r = _();
|
|
215
|
+
return s && L(r) && (e.preventDefault(), o.update(() => {
|
|
216
|
+
r.getNodes().forEach((d) => {
|
|
217
|
+
if (M(d)) {
|
|
218
|
+
const m = d.getParent();
|
|
219
|
+
d.remove(), m && pe(m) && m.getChildrenSize() === 0 && m.setFormat("left");
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
})), !1;
|
|
223
|
+
},
|
|
224
|
+
[o, s]
|
|
225
|
+
), se = C(
|
|
226
|
+
(e) => {
|
|
227
|
+
const r = _(), i = Y.current;
|
|
228
|
+
if (s && L(r) && r.getNodes().length === 1) {
|
|
229
|
+
if (I)
|
|
230
|
+
return Q(null), e.preventDefault(), E.focus(), !0;
|
|
231
|
+
if (i !== null && i !== document.activeElement)
|
|
232
|
+
return e.preventDefault(), i.focus(), !0;
|
|
233
|
+
}
|
|
234
|
+
return !1;
|
|
235
|
+
},
|
|
236
|
+
[E, s, I]
|
|
237
|
+
), le = C(
|
|
238
|
+
(e) => oe.current === E || Y.current === e.target ? (Q(null), o.update(() => {
|
|
239
|
+
x(!0);
|
|
240
|
+
const r = o.getRootElement();
|
|
241
|
+
r !== null && r.focus();
|
|
242
|
+
}), !0) : !1,
|
|
243
|
+
[E, o, x]
|
|
244
|
+
), X = C(
|
|
245
|
+
(e) => {
|
|
246
|
+
const r = e;
|
|
247
|
+
if (k)
|
|
248
|
+
return !0;
|
|
249
|
+
const d = r.target === g.current;
|
|
250
|
+
let m = !1;
|
|
251
|
+
if (!d && g.current) {
|
|
252
|
+
const h = g.current.getBoundingClientRect();
|
|
253
|
+
m = r.clientX >= h.left && r.clientX <= h.right && r.clientY >= h.top && r.clientY <= h.bottom;
|
|
254
|
+
}
|
|
255
|
+
return d || m ? (r.shiftKey ? x(!s) : (O(), x(!0)), !0) : !1;
|
|
256
|
+
},
|
|
257
|
+
[k, s, x, O]
|
|
258
|
+
), V = C(
|
|
259
|
+
(e) => {
|
|
260
|
+
o.getEditorState().read(() => {
|
|
261
|
+
const r = _();
|
|
262
|
+
e.target.tagName === "IMG" && mt(r) && r.getNodes().length === 1 && o.dispatchCommand(
|
|
263
|
+
be,
|
|
264
|
+
e
|
|
265
|
+
);
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
[o]
|
|
269
|
+
);
|
|
270
|
+
U(() => {
|
|
271
|
+
let e = !0;
|
|
272
|
+
const r = o.getRootElement(), i = lt(
|
|
273
|
+
o.registerUpdateListener(({ editorState: d }) => {
|
|
274
|
+
e && Le(d.read(() => _()));
|
|
275
|
+
}),
|
|
276
|
+
o.registerCommand(
|
|
277
|
+
ut,
|
|
278
|
+
(d, m) => (oe.current = m, !1),
|
|
279
|
+
w
|
|
280
|
+
),
|
|
281
|
+
o.registerCommand(
|
|
282
|
+
gt,
|
|
283
|
+
X,
|
|
284
|
+
w
|
|
285
|
+
),
|
|
286
|
+
o.registerCommand(
|
|
287
|
+
be,
|
|
288
|
+
X,
|
|
289
|
+
w
|
|
290
|
+
),
|
|
291
|
+
o.registerCommand(
|
|
292
|
+
ft,
|
|
293
|
+
(d) => d.target === g.current ? (d.preventDefault(), !0) : !1,
|
|
294
|
+
w
|
|
295
|
+
),
|
|
296
|
+
o.registerCommand(
|
|
297
|
+
pt,
|
|
298
|
+
q,
|
|
299
|
+
w
|
|
300
|
+
),
|
|
301
|
+
o.registerCommand(
|
|
302
|
+
ht,
|
|
303
|
+
q,
|
|
304
|
+
w
|
|
305
|
+
),
|
|
306
|
+
o.registerCommand(bt, se, w),
|
|
307
|
+
o.registerCommand(
|
|
308
|
+
xt,
|
|
309
|
+
le,
|
|
310
|
+
w
|
|
311
|
+
)
|
|
312
|
+
);
|
|
313
|
+
return r?.addEventListener("contextmenu", V), () => {
|
|
314
|
+
e = !1, i(), r?.removeEventListener("contextmenu", V);
|
|
315
|
+
};
|
|
316
|
+
}, [
|
|
317
|
+
O,
|
|
318
|
+
o,
|
|
319
|
+
k,
|
|
320
|
+
s,
|
|
321
|
+
u,
|
|
322
|
+
q,
|
|
323
|
+
se,
|
|
324
|
+
le,
|
|
325
|
+
X,
|
|
326
|
+
V,
|
|
327
|
+
x
|
|
328
|
+
]);
|
|
329
|
+
const Te = () => {
|
|
330
|
+
o.update(() => {
|
|
331
|
+
const e = $(u);
|
|
332
|
+
M(e) && e.setShowCaption(!0);
|
|
333
|
+
});
|
|
334
|
+
}, Be = (e, r) => {
|
|
335
|
+
setTimeout(() => {
|
|
336
|
+
re(!1);
|
|
337
|
+
}, 200), o.update(() => {
|
|
338
|
+
const i = $(u);
|
|
339
|
+
M(i) && i.setWidthAndHeight(e, r);
|
|
340
|
+
});
|
|
341
|
+
}, Ge = () => {
|
|
342
|
+
re(!0);
|
|
343
|
+
}, Ye = (e) => {
|
|
344
|
+
if (e.preventDefault(), e.stopPropagation(), l.startsWith("data:")) {
|
|
345
|
+
const r = window.open("", "_blank");
|
|
346
|
+
r && (r.document.write(`
|
|
347
|
+
<!DOCTYPE html>
|
|
348
|
+
<html>
|
|
349
|
+
<head>
|
|
350
|
+
<title>${c || "Image"}</title>
|
|
351
|
+
<style>
|
|
352
|
+
body {
|
|
353
|
+
margin: 0;
|
|
354
|
+
display: flex;
|
|
355
|
+
justify-content: center;
|
|
356
|
+
align-items: center;
|
|
357
|
+
min-height: 100vh;
|
|
358
|
+
background-color: #1a1a1a;
|
|
359
|
+
}
|
|
360
|
+
img {
|
|
361
|
+
max-width: 100%;
|
|
362
|
+
max-height: 100vh;
|
|
363
|
+
object-fit: contain;
|
|
364
|
+
}
|
|
365
|
+
</style>
|
|
366
|
+
</head>
|
|
367
|
+
<body>
|
|
368
|
+
<img src="${l}" alt="${c || "Image"}" />
|
|
369
|
+
</body>
|
|
370
|
+
</html>
|
|
371
|
+
`), r.document.close());
|
|
372
|
+
} else
|
|
373
|
+
window.open(l, "_blank");
|
|
374
|
+
}, Fe = (e) => {
|
|
375
|
+
e.preventDefault(), e.stopPropagation(), o.update(() => {
|
|
376
|
+
const r = $(u);
|
|
377
|
+
if (M(r)) {
|
|
378
|
+
const i = r.getParent();
|
|
379
|
+
r.remove(), i && pe(i) && i.getChildrenSize() === 0 && i.setFormat("left");
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
}, A = (e, r) => {
|
|
383
|
+
e.preventDefault(), e.stopPropagation(), o.update(() => {
|
|
384
|
+
const i = $(u);
|
|
385
|
+
M(i) && i.setPosition(r);
|
|
386
|
+
});
|
|
387
|
+
}, He = (e) => {
|
|
388
|
+
e.preventDefault(), e.stopPropagation(), j(!ie);
|
|
389
|
+
}, qe = C(() => {
|
|
390
|
+
p && !s && (D.current = setTimeout(() => {
|
|
391
|
+
ae(!0);
|
|
392
|
+
}, 300));
|
|
393
|
+
}, [p, s]), Xe = C(() => {
|
|
394
|
+
D.current && (clearTimeout(D.current), D.current = null), ae(!1);
|
|
395
|
+
}, []), me = C((e) => {
|
|
396
|
+
e.preventDefault(), e.stopPropagation(), p && window.open(p, "_blank", "noopener,noreferrer");
|
|
397
|
+
}, [p]);
|
|
398
|
+
U(() => () => {
|
|
399
|
+
D.current && clearTimeout(D.current);
|
|
400
|
+
}, []);
|
|
401
|
+
const ue = async () => {
|
|
402
|
+
if (!P.trim() || S)
|
|
403
|
+
return;
|
|
404
|
+
ne(!0);
|
|
405
|
+
const e = v.loading("Refining image...", {
|
|
406
|
+
description: "This may take 10-30 seconds. Please wait."
|
|
407
|
+
});
|
|
408
|
+
try {
|
|
409
|
+
let r = P.trim();
|
|
410
|
+
const d = P.trim().replace(/^(add|also add|include|with|and)\s+(some|a|an)\s+/gi, "").replace(/^(add|also add|include|with|and)\s+/gi, "").trim(), m = (B) => {
|
|
411
|
+
const tt = B.toLowerCase();
|
|
412
|
+
return [
|
|
413
|
+
"article",
|
|
414
|
+
"write",
|
|
415
|
+
"blog",
|
|
416
|
+
"post",
|
|
417
|
+
"essay",
|
|
418
|
+
"content",
|
|
419
|
+
"generate an article",
|
|
420
|
+
"create an article",
|
|
421
|
+
"write about",
|
|
422
|
+
"and add some pictures",
|
|
423
|
+
"with pictures",
|
|
424
|
+
"with images",
|
|
425
|
+
"add some images",
|
|
426
|
+
"include images",
|
|
427
|
+
"include pictures"
|
|
428
|
+
].some((rt) => tt.includes(rt));
|
|
429
|
+
};
|
|
430
|
+
let h = "";
|
|
431
|
+
if (R && R.trim()) {
|
|
432
|
+
const B = R.trim();
|
|
433
|
+
m(B) && c && c !== "Generated image" && c.trim() ? h = c.trim() : h = B;
|
|
434
|
+
} else
|
|
435
|
+
c && c !== "Generated image" && c.trim() && (h = c.trim());
|
|
436
|
+
h ? r = `${h} with ${d}` : r = d;
|
|
437
|
+
const fe = (await jt({
|
|
438
|
+
content: `Generate Image: ${r}`,
|
|
439
|
+
apiKey: je || void 0
|
|
440
|
+
}))?.data;
|
|
441
|
+
if (!fe)
|
|
442
|
+
throw new Error("Failed to generate image - empty response");
|
|
443
|
+
const J = new DOMParser().parseFromString(fe, "text/html").querySelector("img");
|
|
444
|
+
if (!J || !J.src)
|
|
445
|
+
throw new Error("No image found in response");
|
|
446
|
+
const et = J.src;
|
|
447
|
+
v.dismiss(e), v.success("Image refined successfully!", {
|
|
448
|
+
description: "Compare the images and choose which to keep."
|
|
449
|
+
}), F(et), H(r), T(!0), K(""), j(!1);
|
|
450
|
+
} catch (r) {
|
|
451
|
+
if (v.dismiss(e), r instanceof Kt) {
|
|
452
|
+
const i = r.code === "API_KEYS_DISABLED" ? "API Keys Disabled" : "API Key Required";
|
|
453
|
+
v.error(i, {
|
|
454
|
+
description: r.message,
|
|
455
|
+
duration: 8e3
|
|
456
|
+
});
|
|
457
|
+
} else
|
|
458
|
+
r instanceof Tt ? v.error("Credits Issue", {
|
|
459
|
+
description: r.message,
|
|
460
|
+
duration: 8e3
|
|
461
|
+
}) : v.error("Failed to refine image", {
|
|
462
|
+
description: r instanceof Error ? r.message : "Unknown error. Please try again."
|
|
463
|
+
});
|
|
464
|
+
} finally {
|
|
465
|
+
ne(!1);
|
|
466
|
+
}
|
|
467
|
+
}, Ve = () => {
|
|
468
|
+
o.update(() => {
|
|
469
|
+
const e = $(u);
|
|
470
|
+
if (M(e)) {
|
|
471
|
+
e.setSrc(ce), e.setOriginalPrompt($e);
|
|
472
|
+
const r = _();
|
|
473
|
+
r && Q(r.clone());
|
|
474
|
+
}
|
|
475
|
+
}), T(!1), F(""), H(""), v.success("Image replaced successfully!", {
|
|
476
|
+
description: "The image has been updated with the refined version."
|
|
477
|
+
});
|
|
478
|
+
}, Je = () => {
|
|
479
|
+
T(!1), F(""), H("");
|
|
480
|
+
}, Qe = s && L(z) && !k, ge = (s || k) && Oe, Ue = () => a === "left" || a === "right" ? {
|
|
481
|
+
position: "relative",
|
|
482
|
+
display: "block",
|
|
483
|
+
width: "100%"
|
|
484
|
+
// Fill the floated container
|
|
485
|
+
} : a === "full" ? {
|
|
486
|
+
position: "relative",
|
|
487
|
+
display: "inline-block"
|
|
488
|
+
// Use inline-block to respect text-align: center from parent
|
|
489
|
+
} : a === "inline-left" || a === "inline-center" || a === "inline-right" ? {
|
|
490
|
+
position: "relative",
|
|
491
|
+
display: "inline-block"
|
|
492
|
+
// Use inline-block to respect text-align from parent
|
|
493
|
+
} : {
|
|
494
|
+
position: "relative",
|
|
495
|
+
display: "inline-block"
|
|
496
|
+
}, Ze = C(
|
|
497
|
+
(e) => {
|
|
498
|
+
if (k || e.target.closest("button"))
|
|
499
|
+
return;
|
|
500
|
+
const i = e.target === g.current;
|
|
501
|
+
let d = !1;
|
|
502
|
+
if (!i && g.current) {
|
|
503
|
+
const m = g.current.getBoundingClientRect();
|
|
504
|
+
d = e.clientX >= m.left && e.clientX <= m.right && e.clientY >= m.top && e.clientY <= m.bottom;
|
|
505
|
+
}
|
|
506
|
+
!i && !d || (e.stopPropagation(), e.shiftKey ? x(!s) : (O(), x(!0)));
|
|
507
|
+
},
|
|
508
|
+
[k, s, x, O]
|
|
509
|
+
);
|
|
510
|
+
return /* @__PURE__ */ t(yt, { fallback: null, children: /* @__PURE__ */ n(ot, { children: [
|
|
511
|
+
/* @__PURE__ */ n(
|
|
512
|
+
"div",
|
|
513
|
+
{
|
|
514
|
+
draggable: Qe,
|
|
515
|
+
style: Ue(),
|
|
516
|
+
onClick: Ze,
|
|
517
|
+
onMouseEnter: qe,
|
|
518
|
+
onMouseLeave: Xe,
|
|
519
|
+
children: [
|
|
520
|
+
W ? /* @__PURE__ */ t(qt, {}) : /* @__PURE__ */ t(
|
|
521
|
+
Ht,
|
|
522
|
+
{
|
|
523
|
+
className: ge ? `focused ${L(z) ? "draggable" : ""}` : p ? "cteditor-cursor-pointer" : null,
|
|
524
|
+
src: l,
|
|
525
|
+
altText: c,
|
|
526
|
+
imageRef: g,
|
|
527
|
+
width: b,
|
|
528
|
+
height: y,
|
|
529
|
+
maxWidth: N,
|
|
530
|
+
onError: () => Me(!0)
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
ze && p && !s && /* @__PURE__ */ n(
|
|
534
|
+
"div",
|
|
535
|
+
{
|
|
536
|
+
className: "cteditor-absolute cteditor-bottom-2 cteditor-left-2 cteditor-right-2 cteditor-bg-background cteditor-rounded-lg cteditor-shadow-lg cteditor-border cteditor-border-border cteditor-p-2 cteditor-flex cteditor-items-center cteditor-gap-2",
|
|
537
|
+
style: { zIndex: 10 },
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ t(Bt, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-muted-foreground cteditor-flex-shrink-0" }),
|
|
540
|
+
/* @__PURE__ */ t("span", { className: "cteditor-text-sm cteditor-text-foreground cteditor-truncate cteditor-flex-1", children: p }),
|
|
541
|
+
/* @__PURE__ */ t(
|
|
542
|
+
"button",
|
|
543
|
+
{
|
|
544
|
+
onClick: me,
|
|
545
|
+
className: "cteditor-px-2 cteditor-py-1.5 cteditor-text-xs cteditor-rounded cteditor-bg-primary cteditor-text-primary-foreground hover:cteditor-bg-primary/90 cteditor-transition-colors cteditor-flex-shrink-0",
|
|
546
|
+
children: "Open"
|
|
547
|
+
}
|
|
548
|
+
)
|
|
549
|
+
]
|
|
550
|
+
}
|
|
551
|
+
),
|
|
552
|
+
s && L(z) && !W && /* @__PURE__ */ n(
|
|
553
|
+
"div",
|
|
554
|
+
{
|
|
555
|
+
className: `cteditor-absolute cteditor-flex cteditor-gap-1 z-10 ${Ke ? "cteditor-left-1/2 cteditor--translate-x-1/2 cteditor-bottom-0 cteditor-translate-y-full cteditor-mt-1" : "cteditor-top-2 cteditor-right-2"}`,
|
|
556
|
+
children: [
|
|
557
|
+
/* @__PURE__ */ n("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-0.5 cteditor-bg-background/80 cteditor-rounded-md cteditor-shadow-md cteditor-border cteditor-border-border cteditor-p-0.5", children: [
|
|
558
|
+
/* @__PURE__ */ t(
|
|
559
|
+
"button",
|
|
560
|
+
{
|
|
561
|
+
onClick: (e) => A(e, "left"),
|
|
562
|
+
className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${a === "left" ? "cteditor-bg-accent" : ""}`,
|
|
563
|
+
"aria-label": "Wrap text left",
|
|
564
|
+
title: "Wrap text left",
|
|
565
|
+
children: /* @__PURE__ */ t(St, {})
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ t(
|
|
569
|
+
"button",
|
|
570
|
+
{
|
|
571
|
+
onClick: (e) => A(e, "right"),
|
|
572
|
+
className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${a === "right" ? "cteditor-bg-accent" : ""}`,
|
|
573
|
+
"aria-label": "Wrap text right",
|
|
574
|
+
title: "Wrap text right",
|
|
575
|
+
children: /* @__PURE__ */ t(Dt, {})
|
|
576
|
+
}
|
|
577
|
+
),
|
|
578
|
+
/* @__PURE__ */ t("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-border cteditor-mx-0.5" }),
|
|
579
|
+
/* @__PURE__ */ t(
|
|
580
|
+
"button",
|
|
581
|
+
{
|
|
582
|
+
onClick: (e) => A(e, "inline-left"),
|
|
583
|
+
className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${a === "inline-left" ? "cteditor-bg-accent" : ""}`,
|
|
584
|
+
"aria-label": "Align left",
|
|
585
|
+
title: "Align left (no text wrap)",
|
|
586
|
+
children: /* @__PURE__ */ t(At, {})
|
|
587
|
+
}
|
|
588
|
+
),
|
|
589
|
+
/* @__PURE__ */ t(
|
|
590
|
+
"button",
|
|
591
|
+
{
|
|
592
|
+
onClick: (e) => A(e, "inline-center"),
|
|
593
|
+
className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${a === "inline-center" || a === "full" ? "cteditor-bg-accent" : ""}`,
|
|
594
|
+
"aria-label": "Align center",
|
|
595
|
+
title: "Align center (no text wrap)",
|
|
596
|
+
children: /* @__PURE__ */ t(Lt, {})
|
|
597
|
+
}
|
|
598
|
+
),
|
|
599
|
+
/* @__PURE__ */ t(
|
|
600
|
+
"button",
|
|
601
|
+
{
|
|
602
|
+
onClick: (e) => A(e, "inline-right"),
|
|
603
|
+
className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${a === "inline-right" ? "cteditor-bg-accent" : ""}`,
|
|
604
|
+
"aria-label": "Align right",
|
|
605
|
+
title: "Align right (no text wrap)",
|
|
606
|
+
children: /* @__PURE__ */ t(Mt, {})
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
/* @__PURE__ */ t("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-border cteditor-mx-0.5" }),
|
|
610
|
+
/* @__PURE__ */ t(
|
|
611
|
+
"button",
|
|
612
|
+
{
|
|
613
|
+
onClick: (e) => A(e, "none"),
|
|
614
|
+
className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${a === "none" ? "cteditor-bg-accent" : ""}`,
|
|
615
|
+
"aria-label": "Inline",
|
|
616
|
+
title: "Inline with text",
|
|
617
|
+
children: /* @__PURE__ */ t(Ot, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
|
|
618
|
+
}
|
|
619
|
+
)
|
|
620
|
+
] }),
|
|
621
|
+
p && /* @__PURE__ */ t(
|
|
622
|
+
"button",
|
|
623
|
+
{
|
|
624
|
+
onClick: me,
|
|
625
|
+
className: " cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-accent cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
|
|
626
|
+
"aria-label": "Visit link",
|
|
627
|
+
title: `Visit: ${p}`,
|
|
628
|
+
children: /* @__PURE__ */ t(_t, {})
|
|
629
|
+
}
|
|
630
|
+
),
|
|
631
|
+
R && /* @__PURE__ */ t(
|
|
632
|
+
"button",
|
|
633
|
+
{
|
|
634
|
+
onClick: (e) => {
|
|
635
|
+
e.stopPropagation(), He(e);
|
|
636
|
+
},
|
|
637
|
+
className: " cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-accent cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
|
|
638
|
+
"aria-label": "Refine image",
|
|
639
|
+
title: "Refine image",
|
|
640
|
+
children: /* @__PURE__ */ t($t, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
|
|
641
|
+
}
|
|
642
|
+
),
|
|
643
|
+
/* @__PURE__ */ t(
|
|
644
|
+
"button",
|
|
645
|
+
{
|
|
646
|
+
onClick: (e) => {
|
|
647
|
+
e.stopPropagation(), Ye(e);
|
|
648
|
+
},
|
|
649
|
+
className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-accent cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
|
|
650
|
+
"aria-label": "Open image in new tab",
|
|
651
|
+
title: "Open in new tab",
|
|
652
|
+
children: /* @__PURE__ */ t(zt, {})
|
|
653
|
+
}
|
|
654
|
+
),
|
|
655
|
+
/* @__PURE__ */ t(
|
|
656
|
+
"button",
|
|
657
|
+
{
|
|
658
|
+
onClick: (e) => {
|
|
659
|
+
e.stopPropagation(), Fe(e);
|
|
660
|
+
},
|
|
661
|
+
className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-destructive hover:cteditor-text-destructive-foreground cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
|
|
662
|
+
"aria-label": "Delete image",
|
|
663
|
+
title: "Delete image",
|
|
664
|
+
children: /* @__PURE__ */ t(Wt, {})
|
|
665
|
+
}
|
|
666
|
+
)
|
|
667
|
+
]
|
|
668
|
+
}
|
|
669
|
+
),
|
|
670
|
+
ie && s && !W && R && /* @__PURE__ */ t(
|
|
671
|
+
"div",
|
|
672
|
+
{
|
|
673
|
+
className: "cteditor-absolute cteditor-bottom-2 cteditor-left-2 cteditor-right-2 cteditor-bg-background cteditor-rounded-lg cteditor-shadow-xl cteditor-border cteditor-border-border cteditor-p-3",
|
|
674
|
+
style: { zIndex: 10 },
|
|
675
|
+
onClick: (e) => e.stopPropagation(),
|
|
676
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
677
|
+
onKeyUp: (e) => e.stopPropagation(),
|
|
678
|
+
children: /* @__PURE__ */ n("div", { className: "cteditor-flex cteditor-flex-col cteditor-gap-2", children: [
|
|
679
|
+
/* @__PURE__ */ t("label", { className: "cteditor-text-xs cteditor-font-medium cteditor-text-foreground", children: "What else do you want in this scene?" }),
|
|
680
|
+
/* @__PURE__ */ t(
|
|
681
|
+
"input",
|
|
682
|
+
{
|
|
683
|
+
type: "text",
|
|
684
|
+
value: P,
|
|
685
|
+
onChange: (e) => K(e.target.value),
|
|
686
|
+
onKeyDown: (e) => {
|
|
687
|
+
e.stopPropagation(), e.key === "Enter" && P.trim() && !S && ue(), e.key === "Escape" && (j(!1), K(""));
|
|
688
|
+
},
|
|
689
|
+
onKeyUp: (e) => {
|
|
690
|
+
e.stopPropagation();
|
|
691
|
+
},
|
|
692
|
+
onClick: (e) => {
|
|
693
|
+
e.stopPropagation();
|
|
694
|
+
},
|
|
695
|
+
placeholder: "e.g., flying birds, golden sunset, stormy clouds...",
|
|
696
|
+
className: "cteditor-w-full cteditor-px-3 cteditor-py-2 cteditor-text-sm cteditor-border cteditor-border-border cteditor-rounded-md cteditor-bg-background cteditor-text-foreground focus:cteditor-outline-none focus:cteditor-ring-2 focus:cteditor-ring-blue-500",
|
|
697
|
+
disabled: S,
|
|
698
|
+
autoFocus: !0
|
|
699
|
+
}
|
|
700
|
+
),
|
|
701
|
+
/* @__PURE__ */ n("div", { className: "cteditor-flex cteditor-gap-2", children: [
|
|
702
|
+
/* @__PURE__ */ t(
|
|
703
|
+
"button",
|
|
704
|
+
{
|
|
705
|
+
onClick: (e) => {
|
|
706
|
+
e.stopPropagation(), ue();
|
|
707
|
+
},
|
|
708
|
+
disabled: S || !P.trim(),
|
|
709
|
+
className: "cteditor-flex-1 cteditor-px-3 cteditor-py-2 cteditor-text-sm cteditor-rounded-md cteditor-bg-blue-500 cteditor-text-white hover:cteditor-bg-blue-600 disabled:cteditor-opacity-50 disabled:cteditor-cursor-not-allowed cteditor-transition-colors",
|
|
710
|
+
children: S ? /* @__PURE__ */ n("span", { className: "cteditor-flex cteditor-items-center cteditor-justify-center cteditor-gap-2", children: [
|
|
711
|
+
/* @__PURE__ */ t("span", { className: "cteditor-inline-block cteditor-w-4 cteditor-h-4 cteditor-border-2 cteditor-border-white cteditor-border-t-transparent cteditor-rounded-full cteditor-animate-spin" }),
|
|
712
|
+
"Refining..."
|
|
713
|
+
] }) : "Refine Image"
|
|
714
|
+
}
|
|
715
|
+
),
|
|
716
|
+
/* @__PURE__ */ t(
|
|
717
|
+
"button",
|
|
718
|
+
{
|
|
719
|
+
onClick: (e) => {
|
|
720
|
+
e.stopPropagation(), j(!1), K("");
|
|
721
|
+
},
|
|
722
|
+
disabled: S,
|
|
723
|
+
className: "cteditor-px-3 cteditor-py-2 cteditor-text-sm cteditor-rounded-md cteditor-bg-background cteditor-border cteditor-border-border cteditor-text-foreground hover:cteditor-bg-accent disabled:cteditor-opacity-50 disabled:cteditor-cursor-not-allowed cteditor-transition-colors",
|
|
724
|
+
children: "Cancel"
|
|
725
|
+
}
|
|
726
|
+
)
|
|
727
|
+
] })
|
|
728
|
+
] })
|
|
729
|
+
}
|
|
730
|
+
),
|
|
731
|
+
ee && L(z) && ge && /* @__PURE__ */ t(
|
|
732
|
+
it,
|
|
733
|
+
{
|
|
734
|
+
showCaption: I,
|
|
735
|
+
setShowCaption: Te,
|
|
736
|
+
editor: o,
|
|
737
|
+
buttonRef: Y,
|
|
738
|
+
imageRef: g,
|
|
739
|
+
maxWidth: N,
|
|
740
|
+
onResizeStart: Ge,
|
|
741
|
+
onResizeEnd: Be,
|
|
742
|
+
captionsEnabled: !W && te
|
|
743
|
+
}
|
|
744
|
+
)
|
|
745
|
+
]
|
|
746
|
+
}
|
|
747
|
+
),
|
|
748
|
+
I && (c.startsWith("Signature by") ? /* @__PURE__ */ t(Yt, { caption: E }) : /* @__PURE__ */ t(
|
|
749
|
+
"div",
|
|
750
|
+
{
|
|
751
|
+
className: "image-caption-container",
|
|
752
|
+
style: {
|
|
753
|
+
width: typeof b == "number" ? `${b}px` : "100%",
|
|
754
|
+
maxWidth: "100%",
|
|
755
|
+
// Match the image's alignment
|
|
756
|
+
...a === "inline-center" || a === "full" ? { margin: "0 auto" } : a === "inline-right" ? { marginLeft: "auto" } : a === "left" ? { float: "left", clear: "left" } : a === "right" ? { float: "right", clear: "right" } : {}
|
|
757
|
+
},
|
|
758
|
+
children: /* @__PURE__ */ n(
|
|
759
|
+
ve,
|
|
760
|
+
{
|
|
761
|
+
initialEditor: E,
|
|
762
|
+
initialNodes: [
|
|
763
|
+
Ie,
|
|
764
|
+
Re,
|
|
765
|
+
Pe,
|
|
766
|
+
Se,
|
|
767
|
+
Ce,
|
|
768
|
+
xe
|
|
769
|
+
],
|
|
770
|
+
children: [
|
|
771
|
+
/* @__PURE__ */ t(nt, {}),
|
|
772
|
+
/* @__PURE__ */ t(
|
|
773
|
+
ke,
|
|
774
|
+
{
|
|
775
|
+
contentEditable: /* @__PURE__ */ t(
|
|
776
|
+
ye,
|
|
777
|
+
{
|
|
778
|
+
"aria-placeholder": "Enter a caption...",
|
|
779
|
+
placeholder: () => /* @__PURE__ */ t("span", { className: "cteditor-text-xs", children: "Enter a caption..." }),
|
|
780
|
+
className: "ImageNode__contentEditable"
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
ErrorBoundary: Ne
|
|
784
|
+
}
|
|
785
|
+
),
|
|
786
|
+
/* @__PURE__ */ t(
|
|
787
|
+
Ee,
|
|
788
|
+
{
|
|
789
|
+
onChange: () => {
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
),
|
|
793
|
+
/* @__PURE__ */ t(we, {}),
|
|
794
|
+
/* @__PURE__ */ t(De, { namespace: Ae.namespace })
|
|
795
|
+
]
|
|
796
|
+
}
|
|
797
|
+
)
|
|
798
|
+
}
|
|
799
|
+
)),
|
|
800
|
+
/* @__PURE__ */ t(
|
|
801
|
+
Gt,
|
|
802
|
+
{
|
|
803
|
+
open: _e,
|
|
804
|
+
onOpenChange: T,
|
|
805
|
+
oldImageUrl: l,
|
|
806
|
+
newImageUrl: ce,
|
|
807
|
+
onReplace: Ve,
|
|
808
|
+
onCancel: Je
|
|
809
|
+
}
|
|
810
|
+
)
|
|
811
|
+
] }) });
|
|
812
|
+
}
|
|
813
|
+
export {
|
|
814
|
+
be as RIGHT_CLICK_IMAGE_COMMAND,
|
|
815
|
+
Cr as default
|
|
816
|
+
};
|