ct-rich-text-editor 1.1.7 → 1.1.8

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.
@@ -1,632 +0,0 @@
1
- import { u as q, L as F, c as ae, j as i, a as he, b as be, $ as Y, R as Ce, C as xe, d as _e, O as ye, H as ve, e as Ee, i as we } from "./index-80d463b1.js";
2
- import { CodeNode as Me } from "@lexical/code";
3
- import { LinkNode as Ne } from "@lexical/link";
4
- import { useEffect as A, createContext as ce, useContext as B, useRef as $, useMemo as ue, useState as G, useCallback as I, Suspense as Se } from "react";
5
- import { calculateZoomLevel as J, mergeRegister as De } from "@lexical/utils";
6
- import { $getSelection as K, $isNodeSelection as k, $setSelection as Q, $isRangeSelection as Pe, SELECTION_CHANGE_COMMAND as je, COMMAND_PRIORITY_LOW as L, CLICK_COMMAND as Re, DRAGSTART_COMMAND as Oe, KEY_DELETE_COMMAND as ze, KEY_BACKSPACE_COMMAND as Le, KEY_ENTER_COMMAND as $e, KEY_ESCAPE_COMMAND as Ae, RootNode as Te, TextNode as We, LineBreakNode as Ie, ParagraphNode as ke, createCommand as He, $getNodeByKey as ee } from "lexical";
7
- import "axios";
8
- import "@emotion/styled";
9
- import "react-dom";
10
- import "@lexical/table";
11
- import "@emotion/react";
12
- import "emoji-picker-react";
13
- function Ke({
14
- defaultSelection: e
15
- }) {
16
- const [n] = q();
17
- return A(() => {
18
- n.focus(() => {
19
- const o = document.activeElement, h = n.getRootElement();
20
- h !== null && (o === null || !h.contains(o)) && h.focus({
21
- preventScroll: !0
22
- });
23
- }, {
24
- defaultSelection: e
25
- });
26
- }, [e, n]), null;
27
- }
28
- const Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29
- __proto__: null,
30
- AutoFocusPlugin: Ke
31
- }, Symbol.toStringTag, { value: "Module" }));
32
- function Be({ defaultSelection: e }) {
33
- const [n] = q();
34
- return A(() => {
35
- n.focus(() => {
36
- const o = document.activeElement, h = n.getRootElement();
37
- h === null || o !== null && h.contains(o) || h.focus({ preventScroll: !0 });
38
- }, { defaultSelection: e });
39
- }, [e, n]), null;
40
- }
41
- const Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42
- __proto__: null,
43
- AutoFocusPlugin: Be
44
- }, Symbol.toStringTag, { value: "Module" })), Ge = process.env.NODE_ENV !== "production" ? Fe : Ye, Xe = Ge.AutoFocusPlugin, te = [["Cat", "rgb(125, 50, 0)"], ["Dog", "rgb(100, 0, 0)"], ["Rabbit", "rgb(150, 0, 0)"], ["Frog", "rgb(200, 0, 0)"], ["Fox", "rgb(200, 75, 0)"], ["Hedgehog", "rgb(0, 75, 0)"], ["Pigeon", "rgb(0, 125, 0)"], ["Squirrel", "rgb(75, 100, 0)"], ["Bear", "rgb(125, 100, 0)"], ["Tiger", "rgb(0, 0, 150)"], ["Leopard", "rgb(0, 0, 200)"], ["Zebra", "rgb(0, 0, 250)"], ["Wolf", "rgb(0, 100, 150)"], ["Owl", "rgb(0, 100, 100)"], ["Gull", "rgb(100, 0, 100)"], ["Squid", "rgb(150, 0, 150)"]], oe = te[Math.floor(Math.random() * te.length)], de = /* @__PURE__ */ ce({
45
- clientID: 0,
46
- color: oe[1],
47
- isCollabActive: !1,
48
- name: oe[0],
49
- yjsDocMap: /* @__PURE__ */ new Map()
50
- });
51
- function Ve(e, n) {
52
- const o = B(de);
53
- return e != null && (o.name = e), n != null && (o.color = n), o;
54
- }
55
- const qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
56
- __proto__: null,
57
- CollaborationContext: de,
58
- useCollaborationContext: Ve
59
- }, Symbol.toStringTag, { value: "Module" })), ne = [["Cat", "rgb(125, 50, 0)"], ["Dog", "rgb(100, 0, 0)"], ["Rabbit", "rgb(150, 0, 0)"], ["Frog", "rgb(200, 0, 0)"], ["Fox", "rgb(200, 75, 0)"], ["Hedgehog", "rgb(0, 75, 0)"], ["Pigeon", "rgb(0, 125, 0)"], ["Squirrel", "rgb(75, 100, 0)"], ["Bear", "rgb(125, 100, 0)"], ["Tiger", "rgb(0, 0, 150)"], ["Leopard", "rgb(0, 0, 200)"], ["Zebra", "rgb(0, 0, 250)"], ["Wolf", "rgb(0, 100, 150)"], ["Owl", "rgb(0, 100, 100)"], ["Gull", "rgb(100, 0, 100)"], ["Squid", "rgb(150, 0, 150)"]], re = ne[Math.floor(Math.random() * ne.length)], ge = ce({ clientID: 0, color: re[1], isCollabActive: !1, name: re[0], yjsDocMap: /* @__PURE__ */ new Map() });
60
- function Ue(e, n) {
61
- const o = B(ge);
62
- return e != null && (o.name = e), n != null && (o.color = n), o;
63
- }
64
- const Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
65
- __proto__: null,
66
- CollaborationContext: ge,
67
- useCollaborationContext: Ue
68
- }, Symbol.toStringTag, { value: "Module" })), Je = process.env.NODE_ENV !== "production" ? qe : Ze, U = Je.useCollaborationContext;
69
- function se(e) {
70
- const n = e.transform();
71
- return n !== null ? /* @__PURE__ */ new Set([n]) : /* @__PURE__ */ new Set();
72
- }
73
- function Qe({
74
- initialEditor: e,
75
- children: n,
76
- initialNodes: o,
77
- initialTheme: h,
78
- skipCollabChecks: P
79
- }) {
80
- const v = $(!1), _ = B(F);
81
- if (_ == null)
82
- throw Error("Unexpected parent context null on a nested composer");
83
- const [g, {
84
- getTheme: M
85
- }] = _, R = ue(
86
- () => {
87
- const m = h || M() || void 0, O = ae(_, m);
88
- if (m !== void 0 && (e._config.theme = m), e._parentEditor = g, o)
89
- for (let l of o) {
90
- let y = null, t = null;
91
- if (typeof l != "function") {
92
- const C = l;
93
- l = C.replace, y = C.with, t = C.withKlass || null;
94
- }
95
- const S = e._nodes.get(l.getType());
96
- e._nodes.set(l.getType(), {
97
- exportDOM: S ? S.exportDOM : void 0,
98
- klass: l,
99
- replace: y,
100
- replaceWithKlass: t,
101
- transforms: se(l)
102
- });
103
- }
104
- else {
105
- const l = e._nodes = new Map(g._nodes);
106
- for (const [y, t] of l)
107
- e._nodes.set(y, {
108
- exportDOM: t.exportDOM,
109
- klass: t.klass,
110
- replace: t.replace,
111
- replaceWithKlass: t.replaceWithKlass,
112
- transforms: se(t.klass)
113
- });
114
- }
115
- return e._config.namespace = g._config.namespace, e._editable = g._editable, [e, O];
116
- },
117
- // We only do this for init
118
- // eslint-disable-next-line react-hooks/exhaustive-deps
119
- []
120
- ), {
121
- isCollabActive: E,
122
- yjsDocMap: N
123
- } = U(), c = P || v.current || N.has(e.getKey());
124
- return A(() => {
125
- c && (v.current = !0);
126
- }, [c]), A(() => g.registerEditableListener((m) => {
127
- e.setEditable(m);
128
- }), [e, g]), /* @__PURE__ */ i.jsx(F.Provider, {
129
- value: R,
130
- children: !E || c ? n : null
131
- });
132
- }
133
- const et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
134
- __proto__: null,
135
- LexicalNestedComposer: Qe
136
- }, Symbol.toStringTag, { value: "Module" }));
137
- function tt(e) {
138
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
139
- }
140
- var ot = tt(function(e) {
141
- const n = new URLSearchParams();
142
- n.append("code", e);
143
- for (let o = 1; o < arguments.length; o++)
144
- n.append("v", arguments[o]);
145
- throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${n} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
146
- });
147
- function ie(e) {
148
- const n = e.transform();
149
- return n !== null ? /* @__PURE__ */ new Set([n]) : /* @__PURE__ */ new Set();
150
- }
151
- function nt({ initialEditor: e, children: n, initialNodes: o, initialTheme: h, skipCollabChecks: P }) {
152
- const v = $(!1), _ = B(F);
153
- _ == null && ot(9);
154
- const [g, { getTheme: M }] = _, R = ue(() => {
155
- const m = h || M() || void 0, O = ae(_, m);
156
- if (m !== void 0 && (e._config.theme = m), e._parentEditor = g, o)
157
- for (let l of o) {
158
- let y = null, t = null;
159
- if (typeof l != "function") {
160
- const C = l;
161
- l = C.replace, y = C.with, t = C.withKlass || null;
162
- }
163
- const S = e._nodes.get(l.getType());
164
- e._nodes.set(l.getType(), { exportDOM: S ? S.exportDOM : void 0, klass: l, replace: y, replaceWithKlass: t, transforms: ie(l) });
165
- }
166
- else {
167
- const l = e._nodes = new Map(g._nodes);
168
- for (const [y, t] of l)
169
- e._nodes.set(y, { exportDOM: t.exportDOM, klass: t.klass, replace: t.replace, replaceWithKlass: t.replaceWithKlass, transforms: ie(t.klass) });
170
- }
171
- return e._config.namespace = g._config.namespace, e._editable = g._editable, [e, O];
172
- }, []), { isCollabActive: E, yjsDocMap: N } = U(), c = P || v.current || N.has(e.getKey());
173
- return A(() => {
174
- c && (v.current = !0);
175
- }, [c]), A(() => g.registerEditableListener((m) => {
176
- e.setEditable(m);
177
- }), [e, g]), i.jsx(F.Provider, { value: R, children: !E || c ? n : null });
178
- }
179
- const rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
180
- __proto__: null,
181
- LexicalNestedComposer: nt
182
- }, Symbol.toStringTag, { value: "Module" })), st = process.env.NODE_ENV !== "production" ? et : rt, it = st.LexicalNestedComposer;
183
- function X(e, n, o) {
184
- return Math.min(Math.max(e, n), o);
185
- }
186
- const a = {
187
- east: 1,
188
- north: 8,
189
- south: 2,
190
- west: 4
191
- };
192
- function lt({
193
- onResizeStart: e,
194
- onResizeEnd: n,
195
- buttonRef: o,
196
- imageRef: h,
197
- maxWidth: P,
198
- editor: v,
199
- showCaption: _,
200
- setShowCaption: g,
201
- captionsEnabled: M
202
- }) {
203
- const R = $(null), E = $({
204
- priority: "",
205
- value: "default"
206
- }), N = $({
207
- currentHeight: 0,
208
- currentWidth: 0,
209
- direction: 0,
210
- isResizing: !1,
211
- ratio: 0,
212
- startHeight: 0,
213
- startWidth: 0,
214
- startX: 0,
215
- startY: 0
216
- }), c = v.getRootElement(), m = P || (c !== null ? c.getBoundingClientRect().width - 20 : 100), O = c !== null ? c.getBoundingClientRect().height - 20 : 100, l = 100, y = 100, t = (r) => {
217
- const u = r === a.east || r === a.west, s = r === a.north || r === a.south, D = r & a.north && r & a.west || r & a.south && r & a.east, x = u ? "ew" : s ? "ns" : D ? "nwse" : "nesw";
218
- c !== null && c.style.setProperty(
219
- "cursor",
220
- `${x}-resize`,
221
- "important"
222
- ), document.body !== null && (document.body.style.setProperty(
223
- "cursor",
224
- `${x}-resize`,
225
- "important"
226
- ), E.current.value = document.body.style.getPropertyValue(
227
- "-webkit-user-select"
228
- ), E.current.priority = document.body.style.getPropertyPriority(
229
- "-webkit-user-select"
230
- ), document.body.style.setProperty(
231
- "-webkit-user-select",
232
- "none",
233
- "important"
234
- ));
235
- }, S = () => {
236
- c !== null && c.style.setProperty("cursor", "text"), document.body !== null && (document.body.style.setProperty("cursor", "default"), document.body.style.setProperty(
237
- "-webkit-user-select",
238
- E.current.value,
239
- E.current.priority
240
- ));
241
- }, C = (r, u) => {
242
- if (!v.isEditable())
243
- return;
244
- const s = h.current, D = R.current;
245
- if (s !== null && D !== null) {
246
- r.preventDefault();
247
- const { width: x, height: w } = s.getBoundingClientRect(), p = J(s), f = N.current;
248
- f.startWidth = x, f.startHeight = w, f.ratio = x / w, f.currentWidth = x, f.currentHeight = w, f.startX = r.clientX / p, f.startY = r.clientY / p, f.isResizing = !0, f.direction = u, t(u), e(), D.classList.add("image-control-wrapper--resizing"), s.style.height = `${w}px`, s.style.width = `${x}px`, document.addEventListener("pointermove", T), document.addEventListener("pointerup", W);
249
- }
250
- }, T = (r) => {
251
- const u = h.current, s = N.current, D = s.direction & (a.east | a.west), x = s.direction & (a.south | a.north);
252
- if (u !== null && s.isResizing) {
253
- const w = J(u);
254
- if (D && x) {
255
- let p = Math.floor(s.startX - r.clientX / w);
256
- p = s.direction & a.east ? -p : p;
257
- const f = X(
258
- s.startWidth + p,
259
- l,
260
- m
261
- ), H = f / s.ratio;
262
- u.style.width = `${f}px`, u.style.height = `${H}px`, s.currentHeight = H, s.currentWidth = f;
263
- } else if (x) {
264
- let p = Math.floor(s.startY - r.clientY / w);
265
- p = s.direction & a.south ? -p : p;
266
- const f = X(
267
- s.startHeight + p,
268
- y,
269
- O
270
- );
271
- u.style.height = `${f}px`, s.currentHeight = f;
272
- } else {
273
- let p = Math.floor(s.startX - r.clientX / w);
274
- p = s.direction & a.east ? -p : p;
275
- const f = X(
276
- s.startWidth + p,
277
- l,
278
- m
279
- );
280
- u.style.width = `${f}px`, s.currentWidth = f;
281
- }
282
- }
283
- }, W = () => {
284
- const r = h.current, u = N.current, s = R.current;
285
- if (r !== null && s !== null && u.isResizing) {
286
- const D = u.currentWidth, x = u.currentHeight;
287
- u.startWidth = 0, u.startHeight = 0, u.ratio = 0, u.startX = 0, u.startY = 0, u.currentWidth = 0, u.currentHeight = 0, u.isResizing = !1, s.classList.remove("image-control-wrapper--resizing"), S(), n(D, x), document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", W);
288
- }
289
- };
290
- return /* @__PURE__ */ i.jsxs("div", { ref: R, children: [
291
- !_ && M && /* @__PURE__ */ i.jsx(
292
- "button",
293
- {
294
- className: "image-caption-button",
295
- ref: o,
296
- onClick: () => {
297
- g(!_);
298
- },
299
- children: "Add Caption"
300
- }
301
- ),
302
- /* @__PURE__ */ i.jsx(
303
- "div",
304
- {
305
- className: "image-resizer image-resizer-n",
306
- onPointerDown: (r) => {
307
- C(r, a.north);
308
- }
309
- }
310
- ),
311
- /* @__PURE__ */ i.jsx(
312
- "div",
313
- {
314
- className: "image-resizer image-resizer-ne",
315
- onPointerDown: (r) => {
316
- C(r, a.north | a.east);
317
- }
318
- }
319
- ),
320
- /* @__PURE__ */ i.jsx(
321
- "div",
322
- {
323
- className: "image-resizer image-resizer-e",
324
- onPointerDown: (r) => {
325
- C(r, a.east);
326
- }
327
- }
328
- ),
329
- /* @__PURE__ */ i.jsx(
330
- "div",
331
- {
332
- className: "image-resizer image-resizer-se",
333
- onPointerDown: (r) => {
334
- C(r, a.south | a.east);
335
- }
336
- }
337
- ),
338
- /* @__PURE__ */ i.jsx(
339
- "div",
340
- {
341
- className: "image-resizer image-resizer-s",
342
- onPointerDown: (r) => {
343
- C(r, a.south);
344
- }
345
- }
346
- ),
347
- /* @__PURE__ */ i.jsx(
348
- "div",
349
- {
350
- className: "image-resizer image-resizer-sw",
351
- onPointerDown: (r) => {
352
- C(r, a.south | a.west);
353
- }
354
- }
355
- ),
356
- /* @__PURE__ */ i.jsx(
357
- "div",
358
- {
359
- className: "image-resizer image-resizer-w",
360
- onPointerDown: (r) => {
361
- C(r, a.west);
362
- }
363
- }
364
- ),
365
- /* @__PURE__ */ i.jsx(
366
- "div",
367
- {
368
- className: "image-resizer image-resizer-nw",
369
- onPointerDown: (r) => {
370
- C(r, a.north | a.west);
371
- }
372
- }
373
- )
374
- ] });
375
- }
376
- const V = /* @__PURE__ */ new Set(), le = He("RIGHT_CLICK_IMAGE_COMMAND");
377
- function at(e) {
378
- if (!V.has(e))
379
- throw new Promise((n) => {
380
- const o = new Image();
381
- o.src = e, o.onload = () => {
382
- V.add(e), n(null);
383
- }, o.onerror = () => {
384
- V.add(e);
385
- };
386
- });
387
- }
388
- function ct({
389
- altText: e,
390
- className: n,
391
- imageRef: o,
392
- src: h,
393
- width: P,
394
- height: v,
395
- maxWidth: _,
396
- onError: g
397
- }) {
398
- return at(h), /* @__PURE__ */ i.jsx(
399
- "img",
400
- {
401
- className: n || void 0,
402
- src: h,
403
- alt: e,
404
- ref: o,
405
- style: {
406
- height: v,
407
- maxWidth: _,
408
- width: P
409
- },
410
- onError: g,
411
- draggable: "false"
412
- }
413
- );
414
- }
415
- function ut() {
416
- return /* @__PURE__ */ i.jsx(
417
- "img",
418
- {
419
- src: "",
420
- style: {
421
- height: 200,
422
- opacity: 0.2,
423
- width: 200
424
- },
425
- draggable: "false"
426
- }
427
- );
428
- }
429
- function Et({
430
- src: e,
431
- altText: n,
432
- nodeKey: o,
433
- width: h,
434
- height: P,
435
- maxWidth: v,
436
- resizable: _,
437
- showCaption: g,
438
- caption: M,
439
- captionsEnabled: R
440
- }) {
441
- const E = $(null), N = $(null), [c, m, O] = he(o), [l, y] = G(!1);
442
- U();
443
- const [t] = q(), [S, C] = G(null), T = $(null), [W, r] = G(!1), u = be(), s = I(
444
- (b) => {
445
- const d = K();
446
- return c && k(d) && (b.preventDefault(), t.update(() => {
447
- d.getNodes().forEach((z) => {
448
- Y(z) && z.remove();
449
- });
450
- })), !1;
451
- },
452
- [t, c]
453
- ), D = I(
454
- (b) => {
455
- const d = K(), j = N.current;
456
- if (c && k(d) && d.getNodes().length === 1) {
457
- if (g)
458
- return Q(null), b.preventDefault(), M.focus(), !0;
459
- if (j !== null && j !== document.activeElement)
460
- return b.preventDefault(), j.focus(), !0;
461
- }
462
- return !1;
463
- },
464
- [M, c, g]
465
- ), x = I(
466
- (b) => T.current === M || N.current === b.target ? (Q(null), t.update(() => {
467
- m(!0);
468
- const d = t.getRootElement();
469
- d !== null && d.focus();
470
- }), !0) : !1,
471
- [M, t, m]
472
- ), w = I(
473
- (b) => {
474
- const d = b;
475
- return l ? !0 : d.target === E.current ? (d.shiftKey ? m(!c) : (O(), m(!0)), !0) : !1;
476
- },
477
- [l, c, m, O]
478
- ), p = I(
479
- (b) => {
480
- t.getEditorState().read(() => {
481
- const d = K();
482
- b.target.tagName === "IMG" && Pe(d) && d.getNodes().length === 1 && t.dispatchCommand(
483
- le,
484
- b
485
- );
486
- });
487
- },
488
- [t]
489
- );
490
- A(() => {
491
- let b = !0;
492
- const d = t.getRootElement(), j = De(
493
- t.registerUpdateListener(({ editorState: z }) => {
494
- b && C(z.read(() => K()));
495
- }),
496
- t.registerCommand(
497
- je,
498
- (z, fe) => (T.current = fe, !1),
499
- L
500
- ),
501
- t.registerCommand(
502
- Re,
503
- w,
504
- L
505
- ),
506
- t.registerCommand(
507
- le,
508
- w,
509
- L
510
- ),
511
- t.registerCommand(
512
- Oe,
513
- (z) => z.target === E.current ? (alert("s"), z.preventDefault(), !0) : !1,
514
- L
515
- ),
516
- t.registerCommand(
517
- ze,
518
- s,
519
- L
520
- ),
521
- t.registerCommand(
522
- Le,
523
- s,
524
- L
525
- ),
526
- t.registerCommand($e, D, L),
527
- t.registerCommand(
528
- Ae,
529
- x,
530
- L
531
- )
532
- );
533
- return d == null || d.addEventListener("contextmenu", p), () => {
534
- b = !1, j(), d == null || d.removeEventListener("contextmenu", p);
535
- };
536
- }, [
537
- O,
538
- t,
539
- l,
540
- c,
541
- o,
542
- s,
543
- D,
544
- x,
545
- w,
546
- p,
547
- m
548
- ]);
549
- const f = () => {
550
- t.update(() => {
551
- const b = ee(o);
552
- Y(b) && b.setShowCaption(!0);
553
- });
554
- }, H = (b, d) => {
555
- setTimeout(() => {
556
- y(!1);
557
- }, 200), t.update(() => {
558
- const j = ee(o);
559
- Y(j) && j.setWidthAndHeight(b, d);
560
- });
561
- }, me = () => {
562
- y(!0);
563
- }, pe = c && k(S) && !l, Z = (c || l) && u;
564
- return /* @__PURE__ */ i.jsx(Se, { fallback: null, children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
565
- /* @__PURE__ */ i.jsx("div", { draggable: pe, children: W ? /* @__PURE__ */ i.jsx(ut, {}) : /* @__PURE__ */ i.jsx(
566
- ct,
567
- {
568
- className: Z ? `focused ${k(S) ? "draggable" : ""}` : null,
569
- src: e,
570
- altText: n,
571
- imageRef: E,
572
- width: h,
573
- height: P,
574
- maxWidth: v,
575
- onError: () => r(!0)
576
- }
577
- ) }),
578
- g && /* @__PURE__ */ i.jsx("div", { className: "image-caption-container", children: /* @__PURE__ */ i.jsxs(
579
- it,
580
- {
581
- initialEditor: M,
582
- initialNodes: [
583
- Te,
584
- We,
585
- Ie,
586
- ke,
587
- Ne,
588
- Me
589
- ],
590
- children: [
591
- /* @__PURE__ */ i.jsx(Xe, {}),
592
- /* @__PURE__ */ i.jsx(
593
- Ce,
594
- {
595
- contentEditable: /* @__PURE__ */ i.jsx(
596
- xe,
597
- {
598
- "aria-placeholder": "Enter a caption...",
599
- placeholder: () => /* @__PURE__ */ i.jsx("span", { children: "Enter a caption..." }),
600
- className: "ImageNode__contentEditable"
601
- }
602
- ),
603
- ErrorBoundary: _e
604
- }
605
- ),
606
- /* @__PURE__ */ i.jsx(ye, { onChange: (b) => console.log("e") }),
607
- /* @__PURE__ */ i.jsx(ve, {}),
608
- /* @__PURE__ */ i.jsx(Ee, { namespace: we.namespace })
609
- ]
610
- }
611
- ) }),
612
- _ && k(S) && Z && /* @__PURE__ */ i.jsx(
613
- lt,
614
- {
615
- showCaption: g,
616
- setShowCaption: f,
617
- editor: t,
618
- buttonRef: N,
619
- imageRef: E,
620
- maxWidth: v,
621
- onResizeStart: me,
622
- onResizeEnd: H,
623
- captionsEnabled: !W && R
624
- }
625
- )
626
- ] }) });
627
- }
628
- export {
629
- le as RIGHT_CLICK_IMAGE_COMMAND,
630
- Et as default
631
- };
632
- //# sourceMappingURL=index-ab50d7ce.js.map