@layers-app/editor 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  import { jsx as g, jsxs as $, Fragment as F } from "react/jsx-runtime";
2
2
  import { useState as U, useEffect as b, useMemo as V, Suspense as q, useLayoutEffect as Y, useRef as W } from "react";
3
- import { N as T, D as G, R as a, o as c, p as u, q as J, s as Q, v as A, x as Z, A as ee, z as te, H as ne, d as oe, y as M, e as re, E as S, k as se, G as ie, I as O, J as X, M as ae, O as ce, P as le, Q as ue, S as de, T as me, U as fe, V as ge, b as B, W as pe, X as Ce, Y as he, Z as ve, _ as ye, a0 as Ee, a1 as we, m as ke, a2 as De, a3 as be, a4 as Le, g as Re, i as Se, C as x, a5 as P } from "./DSD.BSMoqlgJ.js";
4
- import { d as xe, P as Pe } from "./DSD.wx0g6wlB.js";
3
+ import { N as T, D as G, R as a, o as c, p as u, q as J, s as Q, v as A, x as Z, A as ee, z as te, H as ne, d as re, y as M, e as oe, E as S, k as se, G as ie, I as O, J as X, M as ae, O as ce, P as le, Q as ue, S as de, T as fe, U as me, V as ge, b as B, W as pe, X as Ce, Y as he, Z as ye, _ as ve, a0 as Ee, a1 as we, m as ke, a2 as De, a3 as be, a4 as Le, g as Re, i as Se, C as x, a5 as P } from "./DSD.NL0fFbop.js";
4
+ import { d as xe, P as Pe } from "./DSD.CaG79eSb.js";
5
5
  import { flushSync as $e, createPortal as Ne } from "react-dom";
6
6
  const E = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Te = E && "documentMode" in document ? document.documentMode : null, Be = !(!E || !("InputEvent" in window) || Te) && "getTargetRanges" in new window.InputEvent("input"), _e = E && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), z = E && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, We = E && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ae = E && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !We;
7
7
  function I(n, t) {
8
8
  t.update(() => {
9
9
  if (n !== null) {
10
- const e = fe(n, KeyboardEvent) ? null : n.clipboardData, s = a();
10
+ const e = me(n, KeyboardEvent) ? null : n.clipboardData, s = a();
11
11
  if (s !== null && e != null) {
12
12
  n.preventDefault();
13
13
  const i = ge(t);
@@ -20,7 +20,7 @@ function Me(n) {
20
20
  return T(n.registerCommand(S, (t) => {
21
21
  const e = a();
22
22
  return !!c(e) && (e.deleteCharacter(t), !0);
23
- }, u), n.registerCommand(me, (t) => {
23
+ }, u), n.registerCommand(fe, (t) => {
24
24
  const e = a();
25
25
  return !!c(e) && (e.deleteWord(t), !0);
26
26
  }, u), n.registerCommand(de, (t) => {
@@ -61,10 +61,10 @@ function Me(n) {
61
61
  }, u), n.registerCommand(se, (t) => {
62
62
  const e = a();
63
63
  return !!c(e) && (!z || navigator.language !== "ko-KR") && (t.preventDefault(), n.dispatchCommand(S, !0));
64
- }, u), n.registerCommand(re, (t) => {
64
+ }, u), n.registerCommand(oe, (t) => {
65
65
  const e = a();
66
66
  return !!c(e) && (t.preventDefault(), n.dispatchCommand(S, !1));
67
- }, u), n.registerCommand(oe, (t) => {
67
+ }, u), n.registerCommand(re, (t) => {
68
68
  const e = a();
69
69
  if (!c(e)) return !1;
70
70
  if (t !== null) {
@@ -79,16 +79,16 @@ function Me(n) {
79
79
  const e = a();
80
80
  return !!c(e) && (function(s, i) {
81
81
  I(s, i), i.update(() => {
82
- const r = a();
83
- c(r) && r.removeText();
82
+ const o = a();
83
+ c(o) && o.removeText();
84
84
  });
85
85
  }(t, n), !0);
86
86
  }, u), n.registerCommand(Q, (t) => {
87
87
  const e = a();
88
88
  return !!c(e) && (function(s, i) {
89
89
  s.preventDefault(), i.update(() => {
90
- const r = a(), { clipboardData: d } = s;
91
- d != null && c(r) && A(d, r);
90
+ const o = a(), { clipboardData: d } = s;
91
+ d != null && c(o) && A(d, o);
92
92
  }, { tag: "paste" });
93
93
  }(t, n), !0);
94
94
  }, u), n.registerCommand(J, (t) => {
@@ -104,41 +104,41 @@ function K(n) {
104
104
  return n.getEditorState().read(he(n.isComposing()));
105
105
  }
106
106
  function Oe({ contentEditable: n, placeholder: t = null, ErrorBoundary: e }) {
107
- const [s] = B(), i = function(r, d) {
108
- const [f, y] = U(() => r.getDecorators());
109
- return N(() => r.registerDecoratorListener((v) => {
107
+ const [s] = B(), i = function(o, d) {
108
+ const [m, v] = U(() => o.getDecorators());
109
+ return N(() => o.registerDecoratorListener((y) => {
110
110
  $e(() => {
111
- y(v);
111
+ v(y);
112
112
  });
113
- }), [r]), b(() => {
114
- y(r.getDecorators());
115
- }, [r]), V(() => {
116
- const v = [], w = Object.keys(f);
113
+ }), [o]), b(() => {
114
+ v(o.getDecorators());
115
+ }, [o]), V(() => {
116
+ const y = [], w = Object.keys(m);
117
117
  for (let k = 0; k < w.length; k++) {
118
- const D = w[k], R = g(d, { onError: (l) => r._onError(l), children: g(q, { fallback: null, children: f[D] }) }), o = r.getElementByKey(D);
119
- o !== null && v.push(Ne(R, o, D));
118
+ const D = w[k], R = g(d, { onError: (l) => o._onError(l), children: g(q, { fallback: null, children: m[D] }) }), r = o.getElementByKey(D);
119
+ r !== null && y.push(Ne(R, r, D));
120
120
  }
121
- return v;
122
- }, [d, f, r]);
121
+ return y;
122
+ }, [d, m, o]);
123
123
  }(s, e);
124
- return function(r) {
125
- N(() => T(Me(r), pe(r)), [r]);
124
+ return function(o) {
125
+ N(() => T(Me(o), pe(o)), [o]);
126
126
  }(s), $(F, { children: [n, g(Xe, { content: t }), i] });
127
127
  }
128
128
  function Xe({ content: n }) {
129
129
  const [t] = B(), e = function(i) {
130
- const [r, d] = U(() => K(i));
130
+ const [o, d] = U(() => K(i));
131
131
  return N(() => {
132
- function f() {
133
- const y = K(i);
134
- d(y);
132
+ function m() {
133
+ const v = K(i);
134
+ d(v);
135
135
  }
136
- return f(), T(i.registerUpdateListener(() => {
137
- f();
136
+ return m(), T(i.registerUpdateListener(() => {
137
+ m();
138
138
  }), i.registerEditableListener(() => {
139
- f();
139
+ m();
140
140
  }));
141
- }, [i]), r;
141
+ }, [i]), o;
142
142
  }(t), s = Ce();
143
143
  return e ? typeof n == "function" ? n(s) : n : null;
144
144
  }
@@ -147,7 +147,7 @@ new URLSearchParams(ze.search);
147
147
  const Ie = "https://wss.dudoc.io";
148
148
  function Ke(n, t) {
149
149
  let e = t.get(n);
150
- return e === void 0 ? (e = new ve(), t.set(n, e)) : e.load(), new ye(Ie, "/" + n, e, {
150
+ return e === void 0 ? (e = new ye(), t.set(n, e)) : e.load(), new ve(Ie, "/" + n, e, {
151
151
  connect: !1
152
152
  });
153
153
  }
@@ -156,8 +156,8 @@ const Ue = Ee ? Y : b, Ye = {
156
156
  paragraph: "StickyEditorTheme__paragraph"
157
157
  };
158
158
  function L(n, t) {
159
- const e = n.style, s = t.rootElementRect, i = s !== null ? s.left : 0, r = s !== null ? s.top : 0;
160
- e.top = r + t.y + "px", e.left = i + t.x + "px";
159
+ const e = n.style, s = t.rootElementRect, i = s !== null ? s.left : 0, o = s !== null ? s.top : 0;
160
+ e.top = o + t.y + "px", e.left = i + t.x + "px";
161
161
  }
162
162
  function Ge({
163
163
  x: n,
@@ -166,74 +166,79 @@ function Ge({
166
166
  color: s,
167
167
  caption: i
168
168
  }) {
169
- const [r] = B(), d = W(null), f = W({
169
+ const [o] = B(), d = W(null), m = W({
170
170
  isDragging: !1,
171
171
  offsetX: 0,
172
172
  offsetY: 0,
173
173
  rootElementRect: null,
174
174
  x: 0,
175
175
  y: 0
176
- }), { isCollabActive: y } = ke();
176
+ }), { isCollabActive: v } = ke();
177
177
  b(() => {
178
- const o = f.current;
179
- o.x = n, o.y = t;
178
+ const r = m.current;
179
+ r.x = n, r.y = t;
180
180
  const l = d.current;
181
- l !== null && L(l, o);
181
+ l !== null && L(l, r);
182
182
  }, [n, t]), Ue(() => {
183
- const o = f.current, l = new ResizeObserver((h) => {
183
+ const r = m.current, l = new ResizeObserver((h) => {
184
184
  for (let p = 0; p < h.length; p++) {
185
185
  const H = h[p], { target: j } = H;
186
- o.rootElementRect = j.getBoundingClientRect();
186
+ r.rootElementRect = j.getBoundingClientRect();
187
187
  const _ = d.current;
188
- _ !== null && L(_, o);
188
+ _ !== null && L(_, r);
189
+ }
190
+ }), f = o.registerRootListener(
191
+ (h, p) => {
192
+ p !== null && l.unobserve(p), h !== null && l.observe(h);
189
193
  }
190
- }), m = r.registerRootListener((h, p) => {
191
- p !== null && l.unobserve(p), h !== null && l.observe(h);
192
- }), C = () => {
193
- const h = r.getRootElement(), p = d.current;
194
- h !== null && p !== null && (o.rootElementRect = h.getBoundingClientRect(), L(p, o));
194
+ ), C = () => {
195
+ const h = o.getRootElement(), p = d.current;
196
+ h !== null && p !== null && (r.rootElementRect = h.getBoundingClientRect(), L(p, r));
195
197
  };
196
198
  return window.addEventListener("resize", C), () => {
197
- window.removeEventListener("resize", C), m();
199
+ window.removeEventListener("resize", C), f();
198
200
  };
199
- }, [r]), b(() => {
200
- const o = d.current;
201
- o !== null && setTimeout(() => {
202
- o.style.setProperty("transition", "top 0.3s ease 0s, left 0.3s ease 0s");
201
+ }, [o]), b(() => {
202
+ const r = d.current;
203
+ r !== null && setTimeout(() => {
204
+ r.style.setProperty(
205
+ "transition",
206
+ "top 0.3s ease 0s, left 0.3s ease 0s"
207
+ );
203
208
  }, 500);
204
209
  }, []);
205
- const v = (o) => {
206
- const l = d.current, m = f.current, C = m.rootElementRect;
207
- l !== null && m.isDragging && C !== null && (m.x = o.pageX - m.offsetX - C.left, m.y = o.pageY - m.offsetY - C.top, L(l, m));
210
+ const y = (r) => {
211
+ const l = d.current, f = m.current, C = f.rootElementRect;
212
+ l !== null && f.isDragging && C !== null && (f.x = r.pageX - f.offsetX - C.left, f.y = r.pageY - f.offsetY - C.top, L(l, f));
208
213
  }, w = () => {
209
- const o = d.current, l = f.current;
210
- o !== null && (l.isDragging = !1, o.classList.remove("dragging"), r.update(() => {
211
- const m = x(e);
212
- P(m) && m.setPosition(l.x, l.y);
213
- })), document.removeEventListener("pointermove", v), document.removeEventListener("pointerup", w);
214
+ const r = d.current, l = m.current;
215
+ r !== null && (l.isDragging = !1, r.classList.remove("dragging"), o.update(() => {
216
+ const f = x(e);
217
+ P(f) && f.setPosition(l.x, l.y);
218
+ })), document.removeEventListener("pointermove", y), document.removeEventListener("pointerup", w);
214
219
  }, k = () => {
215
- r.update(() => {
216
- const o = x(e);
217
- P(o) && o.remove();
220
+ o.update(() => {
221
+ const r = x(e);
222
+ P(r) && r.remove();
218
223
  });
219
224
  }, D = () => {
220
- r.update(() => {
221
- const o = x(e);
222
- P(o) && o.toggleColor();
225
+ o.update(() => {
226
+ const r = x(e);
227
+ P(r) && r.toggleColor();
223
228
  });
224
229
  }, { historyState: R } = De();
225
230
  return /* @__PURE__ */ g("div", { ref: d, className: "sticky-note-container", children: /* @__PURE__ */ $(
226
231
  "div",
227
232
  {
228
233
  className: `sticky-note ${s}`,
229
- onPointerDown: (o) => {
234
+ onPointerDown: (r) => {
230
235
  const l = d.current;
231
- if (l == null || o.button === 2 || o.target !== l.firstChild)
236
+ if (l == null || r.button === 2 || r.target !== l.firstChild)
232
237
  return;
233
- const m = l, C = f.current;
234
- if (m !== null) {
235
- const { top: h, left: p } = m.getBoundingClientRect();
236
- C.offsetX = o.clientX - p, C.offsetY = o.clientY - h, C.isDragging = !0, m.classList.add("dragging"), document.addEventListener("pointermove", v), document.addEventListener("pointerup", w), o.preventDefault();
238
+ const f = l, C = m.current;
239
+ if (f !== null) {
240
+ const { top: h, left: p } = f.getBoundingClientRect();
241
+ C.offsetX = r.clientX - p, C.offsetY = r.clientY - h, C.isDragging = !0, f.classList.add("dragging"), document.addEventListener("pointermove", y), document.addEventListener("pointerup", w), r.preventDefault();
237
242
  }
238
243
  },
239
244
  children: [
@@ -258,7 +263,7 @@ function Ge({
258
263
  }
259
264
  ),
260
265
  /* @__PURE__ */ $(xe, { initialEditor: i, initialTheme: Ye, children: [
261
- y ? /* @__PURE__ */ g(
266
+ v ? /* @__PURE__ */ g(
262
267
  be,
263
268
  {
264
269
  id: i.getKey(),
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as f, Fragment as L } from "react/jsx-runtime";
2
- import { u as j, a as M, b as U, w, R as _, C as B, $ as z, F as D, N as O, c as W, K as h, d as q, k as G, e as H, D as J, r as Q, t as V, L as X, f as Y, h as Z, g as K, i as ee, j as te, B as ne } from "./DSD.BSMoqlgJ.js";
3
- import { d as ae, P as le } from "./DSD.wx0g6wlB.js";
4
- import { useRef as k, useState as E, useCallback as F, useEffect as oe, Suspense as ie } from "react";
2
+ import { useRef as w, useState as E, useCallback as _, useEffect as j, Suspense as M } from "react";
3
+ import { u as U, a as z, b as O, w as k, R as F, C as B, $ as W, F as D, N as q, c as G, K as h, d as H, k as J, e as Q, D as V, r as X, t as Y, L as Z, f as K, h as ee, g as te, i as ne, j as ae, B as le } from "./DSD.NL0fFbop.js";
4
+ import { d as oe, P as ie } from "./DSD.CaG79eSb.js";
5
5
  import { TextInput as re } from "@mantine/core";
6
6
  function se({
7
7
  label: n,
@@ -26,7 +26,12 @@ function se({
26
26
  }
27
27
  );
28
28
  }
29
- function ce({ children: n, label: o, className: t, ...u }) {
29
+ function ce({
30
+ children: n,
31
+ label: o,
32
+ className: t,
33
+ ...u
34
+ }) {
30
35
  return /* @__PURE__ */ f("div", { className: "Input__wrapper", children: [
31
36
  /* @__PURE__ */ e("label", { style: { marginTop: "-1em" }, className: "Input__label", children: o }),
32
37
  /* @__PURE__ */ e("select", { ...u, className: t || "select", children: n })
@@ -73,12 +78,14 @@ function me({
73
78
  nodeKey: o,
74
79
  onClose: t
75
80
  }) {
76
- const i = n.getEditorState().read(() => B(o)), [c, r] = E(i.getAltText()), [v, x] = E(i.getShowCaption()), [I, C] = E(i.getPosition()), b = (m) => {
81
+ const i = n.getEditorState().read(
82
+ () => B(o)
83
+ ), [c, r] = E(i.getAltText()), [I, x] = E(i.getShowCaption()), [v, C] = E(i.getPosition()), b = (m) => {
77
84
  x(m.target.checked);
78
85
  }, d = (m) => {
79
86
  C(m.target.value);
80
87
  }, p = () => {
81
- const m = { altText: c, position: I, showCaption: v };
88
+ const m = { altText: c, position: v, showCaption: I };
82
89
  i && n.update(() => {
83
90
  i.update(m);
84
91
  }), t();
@@ -98,7 +105,7 @@ function me({
98
105
  ce,
99
106
  {
100
107
  style: { marginBottom: "1em", width: "208px" },
101
- value: I,
108
+ value: v,
102
109
  label: "Position",
103
110
  name: "position",
104
111
  id: "position-select",
@@ -116,16 +123,23 @@ function me({
116
123
  {
117
124
  id: "caption",
118
125
  type: "checkbox",
119
- checked: v,
126
+ checked: I,
120
127
  onChange: b
121
128
  }
122
129
  ),
123
130
  /* @__PURE__ */ e("label", { htmlFor: "caption", children: "Show Caption" })
124
131
  ] }),
125
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(ne, { "data-test-id": "image-modal-file-upload-btn", onClick: () => p(), children: "Применить" }) })
132
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
133
+ le,
134
+ {
135
+ "data-test-id": "image-modal-file-upload-btn",
136
+ onClick: () => p(),
137
+ children: "Применить"
138
+ }
139
+ ) })
126
140
  ] });
127
141
  }
128
- function ve({
142
+ function Ie({
129
143
  src: n,
130
144
  altText: o,
131
145
  nodeKey: t,
@@ -133,22 +147,22 @@ function ve({
133
147
  height: i,
134
148
  showCaption: c,
135
149
  caption: r,
136
- position: v
150
+ position: I
137
151
  }) {
138
- const [x, I] = j(), C = k(null), b = k(null), [d, p, m] = M(t), [l] = U(), [$, A] = E(null), P = k(null), N = F(
152
+ const [x, v] = U(), C = w(null), b = w(null), [d, p, m] = z(t), [l] = O(), [$, A] = E(null), P = w(null), N = _(
139
153
  (s) => {
140
- if (d && w(_())) {
154
+ if (d && k(F())) {
141
155
  s.preventDefault();
142
156
  const a = B(t);
143
- z(a) && a.remove();
157
+ W(a) && a.remove();
144
158
  }
145
159
  return !1;
146
160
  },
147
161
  [d, t]
148
- ), R = F(
162
+ ), R = _(
149
163
  (s) => {
150
- const g = _(), a = b.current;
151
- if (d && w(g) && g.getNodes().length === 1) {
164
+ const g = F(), a = b.current;
165
+ if (d && k(g) && g.getNodes().length === 1) {
152
166
  if (c)
153
167
  return D(null), s.preventDefault(), r.focus(), !0;
154
168
  if (a !== null && a !== document.activeElement)
@@ -157,7 +171,7 @@ function ve({
157
171
  return !1;
158
172
  },
159
173
  [r, d, c]
160
- ), T = F(
174
+ ), T = _(
161
175
  (s) => P.current === r || b.current === s.target ? (D(null), l.update(() => {
162
176
  p(!0);
163
177
  const g = l.getRootElement();
@@ -165,19 +179,19 @@ function ve({
165
179
  }), !0) : !1,
166
180
  [r, l, p]
167
181
  );
168
- return oe(() => {
182
+ return j(() => {
169
183
  let s = !0;
170
- const g = O(
184
+ const g = q(
171
185
  l.registerUpdateListener(({ editorState: a }) => {
172
- s && A(a.read(() => _()));
186
+ s && A(a.read(() => F()));
173
187
  }),
174
188
  l.registerCommand(
175
- V,
189
+ Y,
176
190
  (a, S) => (P.current = S, !1),
177
191
  h
178
192
  ),
179
193
  l.registerCommand(
180
- Q,
194
+ X,
181
195
  (a) => {
182
196
  const S = a;
183
197
  return S.target === C.current ? (S.shiftKey ? p(!d) : (m(), p(!0)), !0) : !1;
@@ -185,19 +199,40 @@ function ve({
185
199
  h
186
200
  ),
187
201
  l.registerCommand(
188
- J,
202
+ V,
189
203
  (a) => a.target === C.current ? (a.preventDefault(), !0) : !1,
190
204
  h
191
205
  ),
192
- l.registerCommand(H, N, h),
193
- l.registerCommand(G, N, h),
194
- l.registerCommand(q, R, h),
195
- l.registerCommand(W, T, h)
206
+ l.registerCommand(
207
+ Q,
208
+ N,
209
+ h
210
+ ),
211
+ l.registerCommand(
212
+ J,
213
+ N,
214
+ h
215
+ ),
216
+ l.registerCommand(H, R, h),
217
+ l.registerCommand(
218
+ G,
219
+ T,
220
+ h
221
+ )
196
222
  );
197
223
  return () => {
198
224
  s = !1, g();
199
225
  };
200
- }, [m, l, d, t, N, R, T, p]), /* @__PURE__ */ f(ie, { fallback: null, children: [
226
+ }, [
227
+ m,
228
+ l,
229
+ d,
230
+ t,
231
+ N,
232
+ R,
233
+ T,
234
+ p
235
+ ]), /* @__PURE__ */ f(M, { fallback: null, children: [
201
236
  /* @__PURE__ */ f(L, { children: [
202
237
  /* @__PURE__ */ f("div", { draggable: !1, children: [
203
238
  /* @__PURE__ */ e(
@@ -206,7 +241,7 @@ function ve({
206
241
  className: "image-edit-button",
207
242
  ref: b,
208
243
  onClick: () => {
209
- I("Update Inline Image", (s) => /* @__PURE__ */ e(
244
+ v("Update Inline Image", (s) => /* @__PURE__ */ e(
210
245
  me,
211
246
  {
212
247
  activeEditor: l,
@@ -221,25 +256,25 @@ function ve({
221
256
  /* @__PURE__ */ e(
222
257
  de,
223
258
  {
224
- className: d ? `focused ${w($) ? "draggable" : ""}` : null,
259
+ className: d ? `focused ${k($) ? "draggable" : ""}` : null,
225
260
  src: n,
226
261
  altText: o,
227
262
  imageRef: C,
228
263
  width: u,
229
264
  height: i,
230
- position: v
265
+ position: I
231
266
  }
232
267
  )
233
268
  ] }),
234
- c && /* @__PURE__ */ e("div", { className: "image-caption-container", children: /* @__PURE__ */ f(ae, { initialEditor: r, children: [
235
- /* @__PURE__ */ e(X, {}),
236
- /* @__PURE__ */ e(Y, {}),
269
+ c && /* @__PURE__ */ e("div", { className: "image-caption-container", children: /* @__PURE__ */ f(oe, { initialEditor: r, children: [
270
+ /* @__PURE__ */ e(Z, {}),
271
+ /* @__PURE__ */ e(K, {}),
237
272
  /* @__PURE__ */ e(
238
- Z,
273
+ ee,
239
274
  {
240
- contentEditable: /* @__PURE__ */ e(K, { className: "InlineImageNode__contentEditable" }),
241
- placeholder: /* @__PURE__ */ e(le, { className: "InlineImageNode__placeholder", children: "Enter a caption..." }),
242
- ErrorBoundary: ee
275
+ contentEditable: /* @__PURE__ */ e(te, { className: "InlineImageNode__contentEditable" }),
276
+ placeholder: /* @__PURE__ */ e(ie, { className: "InlineImageNode__placeholder", children: "Enter a caption..." }),
277
+ ErrorBoundary: ne
243
278
  }
244
279
  )
245
280
  ] }) })
@@ -249,5 +284,5 @@ function ve({
249
284
  }
250
285
  export {
251
286
  me as UpdateInlineImageDialog,
252
- ve as default
287
+ Ie as default
253
288
  };
@@ -1,36 +1,36 @@
1
- import { a6 as u, a7 as k, m as E } from "./DSD.BSMoqlgJ.js";
1
+ import { a6 as p, a7 as k, m as E } from "./DSD.NL0fFbop.js";
2
2
  import { useRef as O, useContext as P, useMemo as D, useEffect as h } from "react";
3
3
  import { jsx as _ } from "react/jsx-runtime";
4
4
  function K(e) {
5
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
+ return e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
6
  }
7
7
  var C = K(function(e) {
8
8
  const t = new URLSearchParams();
9
9
  t.append("code", e);
10
- for (let n = 1; n < arguments.length; n++) t.append("v", arguments[n]);
10
+ for (let o = 1; o < arguments.length; o++) t.append("v", arguments[o]);
11
11
  throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
12
12
  });
13
13
  function m(e) {
14
14
  const t = e.transform();
15
15
  return t !== null ? /* @__PURE__ */ new Set([t]) : /* @__PURE__ */ new Set();
16
16
  }
17
- function S({ initialEditor: e, children: t, initialNodes: n, initialTheme: g, skipCollabChecks: v }) {
18
- const f = O(!1), i = P(u);
17
+ function S({ initialEditor: e, children: t, initialNodes: o, initialTheme: g, skipCollabChecks: v }) {
18
+ const f = O(!1), i = P(p);
19
19
  i == null && C(9);
20
20
  const [l, { getTheme: w }] = i, x = D(() => {
21
21
  const a = g || w() || void 0, y = k(i, a);
22
- if (a !== void 0 && (e._config.theme = a), e._parentEditor = l, n) for (let r of n) {
23
- let s = null, o = null;
22
+ if (a !== void 0 && (e._config.theme = a), e._parentEditor = l, o) for (let r of o) {
23
+ let s = null, n = null;
24
24
  if (typeof r != "function") {
25
25
  const d = r;
26
- r = d.replace, s = d.with, o = d.withKlass || null;
26
+ r = d.replace, s = d.with, n = d.withKlass || null;
27
27
  }
28
- const p = e._nodes.get(r.getType());
29
- e._nodes.set(r.getType(), { exportDOM: p ? p.exportDOM : void 0, klass: r, replace: s, replaceWithKlass: o, transforms: m(r) });
28
+ const u = e._nodes.get(r.getType());
29
+ e._nodes.set(r.getType(), { exportDOM: u ? u.exportDOM : void 0, klass: r, replace: s, replaceWithKlass: n, transforms: m(r) });
30
30
  }
31
31
  else {
32
32
  const r = e._nodes = new Map(l._nodes);
33
- for (const [s, o] of r) e._nodes.set(s, { exportDOM: o.exportDOM, klass: o.klass, replace: o.replace, replaceWithKlass: o.replaceWithKlass, transforms: m(o.klass) });
33
+ for (const [s, n] of r) e._nodes.set(s, { exportDOM: n.exportDOM, klass: n.klass, replace: n.replace, replaceWithKlass: n.replaceWithKlass, transforms: m(n.klass) });
34
34
  }
35
35
  return e._config.namespace = l._config.namespace, e._editable = l._editable, [e, y];
36
36
  }, []), { isCollabActive: M, yjsDocMap: b } = E(), c = v || f.current || b.has(e.getKey());
@@ -38,7 +38,7 @@ function S({ initialEditor: e, children: t, initialNodes: n, initialTheme: g, sk
38
38
  c && (f.current = !0);
39
39
  }, [c]), h(() => l.registerEditableListener((a) => {
40
40
  e.setEditable(a);
41
- }), [e, l]), _(u.Provider, { value: x, children: !M || c ? t : null });
41
+ }), [e, l]), _(p.Provider, { value: x, children: !M || c ? t : null });
42
42
  }
43
43
  function W({
44
44
  children: e,