@uva-glass/component-library 3.33.1 → 3.33.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.
Files changed (72) hide show
  1. package/dist/{Lexical.prod-B84LhBo3.js → Lexical.prod-BjpEXQJZ.js} +1440 -1365
  2. package/dist/Lexical.prod-BjpEXQJZ.js.map +1 -0
  3. package/dist/LexicalClipboard.prod-B4j0EyWx.js +276 -0
  4. package/dist/LexicalClipboard.prod-B4j0EyWx.js.map +1 -0
  5. package/dist/{LexicalLink.prod-DoU9RL94.js → LexicalLink.prod-CYNCWmMx.js} +38 -38
  6. package/dist/{LexicalLink.prod-DoU9RL94.js.map → LexicalLink.prod-CYNCWmMx.js.map} +1 -1
  7. package/dist/{LexicalList.prod-Cw2TK1jY.js → LexicalList.prod-BRwEushm.js} +189 -204
  8. package/dist/LexicalList.prod-BRwEushm.js.map +1 -0
  9. package/dist/{LexicalSelection.prod-TB5pn9xc.js → LexicalSelection.prod-DYo5_Y2k.js} +25 -25
  10. package/dist/{LexicalSelection.prod-TB5pn9xc.js.map → LexicalSelection.prod-DYo5_Y2k.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-9xjyWB0C.js → LexicalTable.prod-BArw8Dt5.js} +458 -457
  12. package/dist/LexicalTable.prod-BArw8Dt5.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-CD3xGFhm.js → LexicalUtils.prod-DJRX2pwP.js} +48 -48
  14. package/dist/{LexicalUtils.prod-CD3xGFhm.js.map → LexicalUtils.prod-DJRX2pwP.js.map} +1 -1
  15. package/dist/Sortable.module-B6I6E9un.js +26 -0
  16. package/dist/Sortable.module-B6I6E9un.js.map +1 -0
  17. package/dist/{SortableProvider-DisCfTTN.js → SortableProvider-l8-7ClBJ.js} +2 -2
  18. package/dist/{SortableProvider-DisCfTTN.js.map → SortableProvider-l8-7ClBJ.js.map} +1 -1
  19. package/dist/{TablePlugin-oF-gInNx.js → TablePlugin-BagQHe1w.js} +64 -64
  20. package/dist/{TablePlugin-oF-gInNx.js.map → TablePlugin-BagQHe1w.js.map} +1 -1
  21. package/dist/assets/Sortable.css +1 -1
  22. package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
  23. package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
  24. package/dist/components/FormInput/FormInput.js +2 -2
  25. package/dist/components/InputField/InputField.stories.js +2 -2
  26. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  28. package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
  29. package/dist/components/MultiSelect/index.js +1 -1
  30. package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
  31. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
  32. package/dist/components/RadioTabSelector/RadioTabSelector.js +2 -2
  33. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
  34. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +9 -9
  35. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +9 -9
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -3
  37. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  38. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +41 -41
  39. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  40. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  41. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
  42. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
  43. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  44. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +8 -8
  45. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  46. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +14 -14
  47. package/dist/components/RteEditor/Plugins/index.js +1 -1
  48. package/dist/components/RteEditor/RteEditor.js +172 -172
  49. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  50. package/dist/components/RteEditor/helpers.js +6 -6
  51. package/dist/components/Sortable/Sortable.js +1 -1
  52. package/dist/components/Sortable/SortableProvider.js +1 -1
  53. package/dist/components/Sortable/components/SortableContainer.js +2 -2
  54. package/dist/components/Sortable/components/SortableHandle.js +1 -1
  55. package/dist/components/Sortable/components/SortableItem.js +2 -2
  56. package/dist/components/index.js +1 -1
  57. package/dist/{helpers-CMG0anwr.js → helpers-DM8qHaKY.js} +54 -54
  58. package/dist/helpers-DM8qHaKY.js.map +1 -0
  59. package/dist/{index-KJPw-7za.js → index-Ccsg2cb2.js} +285 -284
  60. package/dist/index-Ccsg2cb2.js.map +1 -0
  61. package/dist/index.js +1 -1
  62. package/dist/storybook__react.d.js +1 -1
  63. package/package.json +14 -14
  64. package/dist/Lexical.prod-B84LhBo3.js.map +0 -1
  65. package/dist/LexicalClipboard.prod-DLgWWXys.js +0 -255
  66. package/dist/LexicalClipboard.prod-DLgWWXys.js.map +0 -1
  67. package/dist/LexicalList.prod-Cw2TK1jY.js.map +0 -1
  68. package/dist/LexicalTable.prod-9xjyWB0C.js.map +0 -1
  69. package/dist/Sortable.module--kgnzOjW.js +0 -26
  70. package/dist/Sortable.module--kgnzOjW.js.map +0 -1
  71. package/dist/helpers-CMG0anwr.js.map +0 -1
  72. package/dist/index-KJPw-7za.js.map +0 -1
@@ -1,22 +1,22 @@
1
- import { jsx as h, jsxs as K, Fragment as Re } from "react/jsx-runtime";
2
- import { t as Xe, r as Ge, o as T } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
- import { aG as Ie, af as A, P as Fe, N as p, aH as de, am as W, d as J, F as Qe, Q as F, c as g, Y as Ze, L as m, aI as et, ae as Me, o as tt, s as Oe, aJ as rt, aK as nt, U as ot, g as P, aD as at, aL as st, aM as it, aN as lt, l as te, aO as ut, aP as ct, a1 as dt, v as ft, m as mt, O as pt, aQ as gt, aR as me, b as pe, M as ht, E as re, H as vt, a2 as Ke, aS as ge, B as Ct, T as yt, z as Et, aT as he, A as wt, aU as bt, aV as _t, aW as St, aC as kt, S as xt, R as Nt, aX as Lt, W as Dt, D as $t, C as Pt, q as Tt, I as ve, aY as Rt, u as It, as as X, ar as G, aZ as Ft, a_ as Mt, au as Ot, a$ as se, at as Kt, b0 as zt } from "../../Lexical.prod-B84LhBo3.js";
1
+ import { jsx as h, jsxs as A, Fragment as Re } from "react/jsx-runtime";
2
+ import { t as Ye, r as Ge, o as P } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
+ import { aJ as Ie, ag as z, R as Me, D as p, aK as de, an as W, m as H, B as Qe, i as M, g, X as Ze, W as m, aL as et, af as Fe, f as tt, o as Oe, aM as rt, aN as nt, O as ot, p as T, aF as at, aO as st, aP as it, aQ as lt, T as te, aR as ut, aS as ct, a2 as dt, w as ft, E as mt, I as pt, aT as gt, aU as me, a as pe, N as ht, _ as re, K as vt, a3 as Ae, aV as ge, x as Ct, t as yt, q as Et, aW as he, A as wt, aX as bt, aY as St, aZ as _t, aE as kt, $ as xt, Q as Nt, a_ as Dt, V as Lt, G as $t, F as Tt, l as Pt, J as ve, a$ as Rt, c as It, at as Y, as as G, b0 as Mt, b1 as Ft, av as Ot, b2 as se, au as At, b3 as Kt } from "../../Lexical.prod-BjpEXQJZ.js";
4
4
  import * as ne from "react";
5
- import { useMemo as q, useLayoutEffect as U, useEffect as S, useState as M, useRef as ze, Suspense as At, forwardRef as Ae, useCallback as Bt } from "react";
6
- import { j, L as z, y as Ut, w as fe } from "../../LexicalUtils.prod-CD3xGFhm.js";
7
- import { flushSync as jt, createPortal as Ht } from "react-dom";
8
- import { D as Ce, _ as ye, h as Wt, m as Jt } from "../../LexicalClipboard.prod-DLgWWXys.js";
9
- import { X as Ee, J as we } from "../../LexicalSelection.prod-TB5pn9xc.js";
10
- import { t as Be, j as Ue, y as qt, _ as Vt } from "../../LexicalList.prod-Cw2TK1jY.js";
11
- import { g as je, k as be, v as oe, p as Yt, m as Xt } from "../../LexicalLink.prod-DoU9RL94.js";
12
- import { s as Gt, c as Qt, a as He, b as Zt, w as er, S as tr, y as We, O as rr } from "../../LexicalTable.prod-9xjyWB0C.js";
13
- import { a as nr, w as or, M as ar } from "../../helpers-CMG0anwr.js";
5
+ import { useMemo as q, useLayoutEffect as U, useEffect as _, useState as F, useRef as Ke, Suspense as zt, forwardRef as ze, useCallback as Bt } from "react";
6
+ import { j, L as K, y as Ut, w as fe } from "../../LexicalUtils.prod-DJRX2pwP.js";
7
+ import { flushSync as jt, createPortal as Jt } from "react-dom";
8
+ import { A as Ce, F as ye, m as Wt, g as Ht } from "../../LexicalClipboard.prod-B4j0EyWx.js";
9
+ import { X as Ee, J as we } from "../../LexicalSelection.prod-DYo5_Y2k.js";
10
+ import { r as Be, Y as Ue, v as qt, S as Xt } from "../../LexicalList.prod-BRwEushm.js";
11
+ import { g as je, k as be, v as oe, p as Vt, m as Yt } from "../../LexicalLink.prod-CYNCWmMx.js";
12
+ import { s as Gt, c as Qt, a as Je, b as Zt, w as er, S as tr, y as We, O as rr } from "../../LexicalTable.prod-BArw8Dt5.js";
13
+ import { a as nr, w as or, M as ar } from "../../helpers-DM8qHaKY.js";
14
14
  import { c as sr } from "../../clsx-OuTLNxxd.js";
15
15
  import { exportMap as ir, isStartingWithHtmlTag as lr, mergeBoldStrongTags as ur } from "./helpers.js";
16
16
  import { s as I } from "../../RteEditor.module-B_3uFnFu.js";
17
17
  import { ToolBarPlugin as cr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
18
  import { useTranslation as dr } from "./hooks/useTranslation.js";
19
- import "../../TablePlugin-oF-gInNx.js";
19
+ import "../../TablePlugin-BagQHe1w.js";
20
20
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
21
  import "./hooks/components/Flyout.js";
22
22
  import "../Buttons/Button.js";
@@ -36,23 +36,23 @@ import "react-router";
36
36
  import "../SelectListbox/SelectListbox.js";
37
37
  import "../SelectListbox/SelectProvider.js";
38
38
  import "../Sortable/components/SortableItem.js";
39
- import "../../SortableProvider-DisCfTTN.js";
39
+ import "../../SortableProvider-l8-7ClBJ.js";
40
40
  import { UvaTheme as mr } from "./UvaTheme/UvaTheme.js";
41
41
  import { EditorHeader as pr } from "./EditorHeader/EditorHeader.js";
42
42
  import { LanguageProvider as gr, useLanguage as hr } from "./Providers/LanguageProvider.js";
43
43
  import { PasteHandlerPlugin as vr } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
- const Je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Cr = Je ? U : S, Q = { tag: de };
44
+ const He = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Cr = He ? U : _, Q = { tag: de };
45
45
  function yr({ initialConfig: r, children: e }) {
46
46
  const t = q(() => {
47
- const { theme: o, namespace: a, nodes: n, onError: s, editorState: i, html: l } = r, u = Xe(null, o), c = Ie({ editable: r.editable, html: l, namespace: a, nodes: n, onError: (d) => s(d, c), theme: o });
47
+ const { theme: o, namespace: a, nodes: n, onError: s, editorState: i, html: l } = r, u = Ye(null, o), c = Ie({ editable: r.editable, html: l, namespace: a, nodes: n, onError: (d) => s(d, c), theme: o });
48
48
  return function(d, f) {
49
49
  if (f !== null) {
50
50
  if (f === void 0) d.update(() => {
51
- const v = A();
51
+ const v = z();
52
52
  if (v.isEmpty()) {
53
- const C = Fe();
53
+ const C = Me();
54
54
  v.append(C);
55
- const w = Je ? document.activeElement : null;
55
+ const w = He ? document.activeElement : null;
56
56
  (p() !== null || w !== null && w === d.getRootElement()) && C.select();
57
57
  }
58
58
  }, Q);
@@ -67,7 +67,7 @@ function yr({ initialConfig: r, children: e }) {
67
67
  break;
68
68
  case "function":
69
69
  d.update(() => {
70
- A().isEmpty() && f(d);
70
+ z().isEmpty() && f(d);
71
71
  }, Q);
72
72
  }
73
73
  }
@@ -78,13 +78,13 @@ function yr({ initialConfig: r, children: e }) {
78
78
  a.setEditable(o === void 0 || o);
79
79
  }, []), h(Ge.Provider, { value: t, children: e });
80
80
  }
81
- const Er = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
81
+ const Er = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
82
82
  function wr(r) {
83
83
  return { initialValueFn: () => r.isEditable(), subscribe: (e) => r.registerEditableListener(e) };
84
84
  }
85
85
  function br() {
86
86
  return function(r) {
87
- const [e] = T(), t = q(() => r(e), [e, r]), [o, a] = M(() => t.initialValueFn()), n = ze(o);
87
+ const [e] = P(), t = q(() => r(e), [e, r]), [o, a] = F(() => t.initialValueFn()), n = Ke(o);
88
88
  return Er(() => {
89
89
  const { initialValueFn: s, subscribe: i } = t, l = s();
90
90
  return n.current !== l && (n.current = l, a(l)), i((u) => {
@@ -93,27 +93,27 @@ function br() {
93
93
  }, [t, r]), o;
94
94
  }(wr);
95
95
  }
96
- function _r() {
97
- return A().getTextContent();
96
+ function Sr() {
97
+ return z().getTextContent();
98
98
  }
99
- function Sr(r, e = !0) {
99
+ function _r(r, e = !0) {
100
100
  if (r) return !1;
101
- let t = _r();
101
+ let t = Sr();
102
102
  return e && (t = t.trim()), t === "";
103
103
  }
104
104
  function kr(r) {
105
- if (!Sr(r, !1)) return !1;
106
- const e = A().getChildren(), t = e.length;
105
+ if (!_r(r, !1)) return !1;
106
+ const e = z().getChildren(), t = e.length;
107
107
  if (t > 1) return !1;
108
108
  for (let o = 0; o < t; o++) {
109
109
  const a = e[o];
110
110
  if (W(a)) return !1;
111
- if (J(a)) {
111
+ if (H(a)) {
112
112
  if (!Qe(a) || a.__indent !== 0) return !1;
113
113
  const n = a.getChildren(), s = n.length;
114
114
  for (let i = 0; i < s; i++) {
115
115
  const l = n[o];
116
- if (!F(l)) return !1;
116
+ if (!M(l)) return !1;
117
117
  }
118
118
  }
119
119
  }
@@ -145,11 +145,11 @@ function xr(r) {
145
145
  const w = p();
146
146
  if (g(w)) {
147
147
  const x = w.anchor;
148
- let y = x.getNode(), E = 0, _ = 0;
149
- if (F(y) && u >= 0 && c >= 0 && (E = u, _ = u + c, w.setTextNodeRange(y, E, y, _)), E === _ && d === "" || (w.insertRawText(d), y = x.getNode()), F(y)) {
150
- E = f, _ = f + v;
148
+ let y = x.getNode(), E = 0, S = 0;
149
+ if (M(y) && u >= 0 && c >= 0 && (E = u, S = u + c, w.setTextNodeRange(y, E, y, S)), E === S && d === "" || (w.insertRawText(d), y = x.getNode()), M(y)) {
150
+ E = f, S = f + v;
151
151
  const N = y.getTextContentSize();
152
- E = E > N ? N : E, _ = _ > N ? N : _, w.setTextNodeRange(y, E, y, _);
152
+ E = E > N ? N : E, S = S > N ? N : S, w.setTextNodeRange(y, E, y, S);
153
153
  }
154
154
  o.stopImmediatePropagation();
155
155
  }
@@ -163,7 +163,7 @@ function xr(r) {
163
163
  window.removeEventListener("message", t, !0);
164
164
  };
165
165
  }
166
- function _e(r, e) {
166
+ function Se(r, e) {
167
167
  if (document.caretRangeFromPoint !== void 0) {
168
168
  const t = document.caretRangeFromPoint(r, e);
169
169
  return t === null ? null : { node: t.startContainer, offset: t.startOffset };
@@ -174,10 +174,10 @@ function _e(r, e) {
174
174
  }
175
175
  return null;
176
176
  }
177
- const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = H && "documentMode" in document ? document.documentMode : null, Lr = !(!H || !("InputEvent" in window) || Nr) && "getTargetRanges" in new window.InputEvent("input"), Dr = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Se = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $r = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), Pr = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, ke = tt("DRAG_DROP_PASTE_FILE");
177
+ const J = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = J && "documentMode" in document ? document.documentMode : null, Dr = !(!J || !("InputEvent" in window) || Nr) && "getTargetRanges" in new window.InputEvent("input"), Lr = J && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), _e = J && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $r = J && /^(?=.*Chrome).*/i.test(navigator.userAgent), Tr = J && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, ke = tt("DRAG_DROP_PASTE_FILE");
178
178
  function Z(r) {
179
179
  let e = null;
180
- if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
180
+ if (K(r, DragEvent) ? e = r.dataTransfer : K(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
181
181
  const t = e.types, o = t.includes("Files"), a = t.includes("text/html") || t.includes("text/plain");
182
182
  return [o, Array.from(e.files), a];
183
183
  }
@@ -188,7 +188,7 @@ function xe(r) {
188
188
  for (let a = 0; a < o.length; a++) {
189
189
  const n = o[a], s = n.getKey();
190
190
  if (t.has(s)) continue;
191
- const i = fe(n, (u) => J(u) && !u.isInline());
191
+ const i = fe(n, (u) => H(u) && !u.isInline());
192
192
  if (i === null) continue;
193
193
  const l = i.getKey();
194
194
  i.canIndent() && !t.has(l) && (t.add(l), r(i));
@@ -202,20 +202,20 @@ function Ne(r) {
202
202
  function ae(r) {
203
203
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
204
204
  }
205
- function Tr(r) {
206
- return j(r.registerCommand(Tt, (e) => {
205
+ function Pr(r) {
206
+ return j(r.registerCommand(Pt, (e) => {
207
207
  const t = p();
208
- return !!P(t) && (t.clear(), !0);
208
+ return !!T(t) && (t.clear(), !0);
209
209
  }, m), r.registerCommand(re, (e) => {
210
210
  const t = p();
211
- return g(t) ? (t.deleteCharacter(e), !0) : !!P(t) && (t.deleteNodes(), !0);
212
- }, m), r.registerCommand(Pt, (e) => {
211
+ return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
212
+ }, m), r.registerCommand(Tt, (e) => {
213
213
  const t = p();
214
214
  return !!g(t) && (t.deleteWord(e), !0);
215
215
  }, m), r.registerCommand($t, (e) => {
216
216
  const t = p();
217
217
  return !!g(t) && (t.deleteLine(e), !0);
218
- }, m), r.registerCommand(Dt, (e) => {
218
+ }, m), r.registerCommand(Lt, (e) => {
219
219
  const t = p();
220
220
  if (typeof e == "string") t !== null && t.insertText(e);
221
221
  else {
@@ -228,7 +228,7 @@ function Tr(r) {
228
228
  }
229
229
  }
230
230
  return !0;
231
- }, m), r.registerCommand(Lt, () => {
231
+ }, m), r.registerCommand(Dt, () => {
232
232
  const e = p();
233
233
  return !!g(e) && (e.removeText(), !0);
234
234
  }, m), r.registerCommand(Nt, (e) => {
@@ -236,10 +236,10 @@ function Tr(r) {
236
236
  return !!g(t) && (t.formatText(e), !0);
237
237
  }, m), r.registerCommand(xt, (e) => {
238
238
  const t = p();
239
- if (!g(t) && !P(t)) return !1;
239
+ if (!g(t) && !T(t)) return !1;
240
240
  const o = t.getNodes();
241
241
  for (const a of o) {
242
- const n = fe(a, (s) => J(s) && !s.isInline());
242
+ const n = fe(a, (s) => H(s) && !s.isInline());
243
243
  n !== null && n.setFormat(e);
244
244
  }
245
245
  return !0;
@@ -249,7 +249,7 @@ function Tr(r) {
249
249
  }, m), r.registerCommand(pe, () => {
250
250
  const e = p();
251
251
  return !!g(e) && (e.insertParagraph(), !0);
252
- }, m), r.registerCommand(_t, () => (St([kt()]), !0), m), r.registerCommand(bt, () => xe((e) => {
252
+ }, m), r.registerCommand(St, () => (_t([kt()]), !0), m), r.registerCommand(bt, () => xe((e) => {
253
253
  const t = e.getIndent();
254
254
  e.setIndent(t + 1);
255
255
  }), m), r.registerCommand(ge, () => xe((e) => {
@@ -257,7 +257,7 @@ function Tr(r) {
257
257
  t > 0 && e.setIndent(Math.max(0, t - 1));
258
258
  }), m), r.registerCommand(wt, (e) => {
259
259
  const t = p();
260
- if (P(t)) {
260
+ if (T(t)) {
261
261
  const o = t.getNodes();
262
262
  if (o.length > 0) return o[0].selectPrevious(), !0;
263
263
  } else if (g(t)) {
@@ -267,13 +267,13 @@ function Tr(r) {
267
267
  return !1;
268
268
  }, m), r.registerCommand(Et, (e) => {
269
269
  const t = p();
270
- if (P(t)) {
270
+ if (T(t)) {
271
271
  const o = t.getNodes();
272
272
  if (o.length > 0) return o[0].selectNext(0, 0), !0;
273
273
  } else if (g(t)) {
274
274
  if (function(a) {
275
275
  const n = a.focus;
276
- return n.key === "root" && n.offset === A().getChildrenSize();
276
+ return n.key === "root" && n.offset === z().getChildrenSize();
277
277
  }(t)) return e.preventDefault(), !0;
278
278
  const o = he(t.focus, !1);
279
279
  if (!e.shiftKey && W(o) && !o.isIsolated() && !o.isInline()) return o.selectNext(), e.preventDefault(), !0;
@@ -281,7 +281,7 @@ function Tr(r) {
281
281
  return !1;
282
282
  }, m), r.registerCommand(yt, (e) => {
283
283
  const t = p();
284
- if (P(t)) {
284
+ if (T(t)) {
285
285
  const o = t.getNodes();
286
286
  if (o.length > 0) return e.preventDefault(), o[0].selectPrevious(), !0;
287
287
  }
@@ -293,7 +293,7 @@ function Tr(r) {
293
293
  return !1;
294
294
  }, m), r.registerCommand(Ct, (e) => {
295
295
  const t = p();
296
- if (P(t)) {
296
+ if (T(t)) {
297
297
  const a = t.getNodes();
298
298
  if (a.length > 0) return e.preventDefault(), a[0].selectNext(0, 0), !0;
299
299
  }
@@ -309,22 +309,22 @@ function Tr(r) {
309
309
  const { anchor: a } = o;
310
310
  if (a.offset !== 0) return !1;
311
311
  const n = a.getNode();
312
- if (Ke(n)) return !1;
312
+ if (Ae(n)) return !1;
313
313
  const s = Ut(n);
314
314
  return s.getIndent() > 0 && (s.is(n) || n.is(s.getFirstDescendant()));
315
315
  }(t)) return e.preventDefault(), r.dispatchCommand(ge, void 0);
316
- if (Se && navigator.language === "ko-KR") return !1;
317
- } else if (!P(t)) return !1;
316
+ if (_e && navigator.language === "ko-KR") return !1;
317
+ } else if (!T(t)) return !1;
318
318
  return e.preventDefault(), r.dispatchCommand(re, !0);
319
319
  }, m), r.registerCommand(ht, (e) => {
320
320
  if (Ne(e.target)) return !1;
321
321
  const t = p();
322
- return !(!g(t) && !P(t)) && (e.preventDefault(), r.dispatchCommand(re, !1));
322
+ return !(!g(t) && !T(t)) && (e.preventDefault(), r.dispatchCommand(re, !1));
323
323
  }, m), r.registerCommand(gt, (e) => {
324
324
  const t = p();
325
325
  if (!g(t)) return !1;
326
326
  if (ae(t), e !== null) {
327
- if ((Se || Dr || Pr) && Lr) return !1;
327
+ if ((_e || Lr || Tr) && Dr) return !1;
328
328
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(me, !1);
329
329
  }
330
330
  return r.dispatchCommand(pe, void 0);
@@ -334,12 +334,12 @@ function Tr(r) {
334
334
  }, m), r.registerCommand(ct, (e) => {
335
335
  const [, t] = Z(e);
336
336
  if (t.length > 0) {
337
- const a = _e(e.clientX, e.clientY);
337
+ const a = Se(e.clientX, e.clientY);
338
338
  if (a !== null) {
339
339
  const { offset: n, node: s } = a, i = te(s);
340
340
  if (i !== null) {
341
341
  const l = dt();
342
- if (F(i)) l.anchor.set(i.getKey(), n, "text"), l.focus.set(i.getKey(), n, "text");
342
+ if (M(i)) l.anchor.set(i.getKey(), n, "text"), l.focus.set(i.getKey(), n, "text");
343
343
  else {
344
344
  const c = i.getParentOrThrow().getKey(), d = i.getIndexWithinParent() + 1;
345
345
  l.anchor.set(c, d, "element"), l.focus.set(c, d, "element");
@@ -359,22 +359,22 @@ function Tr(r) {
359
359
  }, m), r.registerCommand(lt, (e) => {
360
360
  const [t] = Z(e), o = p();
361
361
  if (t && !g(o)) return !1;
362
- const a = _e(e.clientX, e.clientY);
362
+ const a = Se(e.clientX, e.clientY);
363
363
  if (a !== null) {
364
364
  const n = te(a.node);
365
365
  W(n) && e.preventDefault();
366
366
  }
367
367
  return !0;
368
- }, m), r.registerCommand(st, () => (it(), !0), m), r.registerCommand(at, (e) => (ye(r, z(e, ClipboardEvent) ? e : null), !0), m), r.registerCommand(ot, (e) => (async function(t, o) {
369
- await ye(o, z(t, ClipboardEvent) ? t : null), o.update(() => {
368
+ }, m), r.registerCommand(st, () => (it(), !0), m), r.registerCommand(at, (e) => (ye(r, K(e, ClipboardEvent) ? e : null), !0), m), r.registerCommand(ot, (e) => (async function(t, o) {
369
+ await ye(o, K(t, ClipboardEvent) ? t : null), o.update(() => {
370
370
  const a = p();
371
- g(a) ? a.removeText() : P(a) && a.getNodes().forEach((n) => n.remove());
371
+ g(a) ? a.removeText() : T(a) && a.getNodes().forEach((n) => n.remove());
372
372
  });
373
- }(e, r), !0), m), r.registerCommand(Me, (e) => {
373
+ }(e, r), !0), m), r.registerCommand(Fe, (e) => {
374
374
  const [, t, o] = Z(e);
375
375
  return t.length > 0 && !o ? (r.dispatchCommand(ke, t), !0) : Oe(e.target) && rt(e.target) ? !1 : p() !== null && (function(a, n) {
376
376
  a.preventDefault(), n.update(() => {
377
- const s = p(), i = z(a, InputEvent) || z(a, KeyboardEvent) ? null : a.clipboardData;
377
+ const s = p(), i = K(a, InputEvent) || K(a, KeyboardEvent) ? null : a.clipboardData;
378
378
  i != null && s !== null && Ce(i, s, n);
379
379
  }, { tag: nt });
380
380
  }(e, r), !0);
@@ -386,38 +386,38 @@ function Tr(r) {
386
386
  return g(t) && ae(t), !1;
387
387
  }, m));
388
388
  }
389
- const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
390
- function Le(r) {
389
+ const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
390
+ function De(r) {
391
391
  return r.getEditorState().read(qe(r.isComposing()));
392
392
  }
393
393
  function Rr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
394
- const [o] = T(), a = function(n, s) {
395
- const [i, l] = M(() => n.getDecorators());
394
+ const [o] = P(), a = function(n, s) {
395
+ const [i, l] = F(() => n.getDecorators());
396
396
  return ie(() => n.registerDecoratorListener((u) => {
397
397
  jt(() => {
398
398
  l(u);
399
399
  });
400
- }), [n]), S(() => {
400
+ }), [n]), _(() => {
401
401
  l(n.getDecorators());
402
402
  }, [n]), q(() => {
403
403
  const u = [], c = Object.keys(i);
404
404
  for (let d = 0; d < c.length; d++) {
405
- const f = c[d], v = h(s, { onError: (w) => n._onError(w), children: h(At, { fallback: null, children: i[f] }) }), C = n.getElementByKey(f);
406
- C !== null && u.push(Ht(v, C, f));
405
+ const f = c[d], v = h(s, { onError: (w) => n._onError(w), children: h(zt, { fallback: null, children: i[f] }) }), C = n.getElementByKey(f);
406
+ C !== null && u.push(Jt(v, C, f));
407
407
  }
408
408
  return u;
409
409
  }, [s, i, n]);
410
410
  }(o, t);
411
411
  return function(n) {
412
- ie(() => j(Tr(n), xr(n)), [n]);
413
- }(o), K(Re, { children: [r, h(Ir, { content: e }), a] });
412
+ ie(() => j(Pr(n), xr(n)), [n]);
413
+ }(o), A(Re, { children: [r, h(Ir, { content: e }), a] });
414
414
  }
415
415
  function Ir({ content: r }) {
416
- const [e] = T(), t = function(a) {
417
- const [n, s] = M(() => Le(a));
416
+ const [e] = P(), t = function(a) {
417
+ const [n, s] = F(() => De(a));
418
418
  return ie(() => {
419
419
  function i() {
420
- const l = Le(a);
420
+ const l = De(a);
421
421
  s(l);
422
422
  }
423
423
  return i(), j(a.registerUpdateListener(() => {
@@ -429,36 +429,36 @@ function Ir({ content: r }) {
429
429
  }(e), o = br();
430
430
  return t ? typeof r == "function" ? r(o) : r : null;
431
431
  }
432
- const Ve = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
433
- function Fr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: a, ariaErrorMessage: n, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: _, "data-testid": N, ...b }, L) {
434
- const [k, R] = M(r.isEditable()), O = Bt((D) => {
435
- D && D.ownerDocument && D.ownerDocument.defaultView ? r.setRootElement(D) : r.setRootElement(null);
436
- }, [r]), B = q(() => /* @__PURE__ */ function(...D) {
437
- return (V) => {
438
- D.forEach((Y) => {
439
- typeof Y == "function" ? Y(V) : Y != null && (Y.current = V);
432
+ const Xe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
433
+ function Mr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: a, ariaErrorMessage: n, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: S, "data-testid": N, ...b }, D) {
434
+ const [k, R] = F(r.isEditable()), O = Bt((L) => {
435
+ L && L.ownerDocument && L.ownerDocument.defaultView ? r.setRootElement(L) : r.setRootElement(null);
436
+ }, [r]), B = q(() => /* @__PURE__ */ function(...L) {
437
+ return (X) => {
438
+ L.forEach((V) => {
439
+ typeof V == "function" ? V(X) : V != null && (V.current = X);
440
440
  });
441
441
  };
442
- }(L, O), [O, L]);
443
- return Ve(() => (R(r.isEditable()), r.registerEditableListener((D) => {
444
- R(D);
445
- })), [r]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ? o : void 0, "aria-describedby": a, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": k && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": k ? d : void 0, "aria-readonly": !k || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: k, "data-testid": N, id: w, ref: B, role: k ? x : void 0, spellCheck: y, style: E, tabIndex: _, ...b });
442
+ }(D, O), [O, D]);
443
+ return Xe(() => (R(r.isEditable()), r.registerEditableListener((L) => {
444
+ R(L);
445
+ })), [r]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ? o : void 0, "aria-describedby": a, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": k && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": k ? d : void 0, "aria-readonly": !k || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: k, "data-testid": N, id: w, ref: B, role: x, spellCheck: y, style: E, tabIndex: S, ...b });
446
446
  }
447
- const Mr = Ae(Fr);
448
- function De(r) {
447
+ const Fr = ze(Mr);
448
+ function Le(r) {
449
449
  return r.getEditorState().read(qe(r.isComposing()));
450
450
  }
451
- const Or = Ae(Kr);
452
- function Kr(r, e) {
453
- const { placeholder: t, ...o } = r, [a] = T();
454
- return K(Re, { children: [h(Mr, { editor: a, ...o, ref: e }), t != null && h(zr, { editor: a, content: t })] });
451
+ const Or = ze(Ar);
452
+ function Ar(r, e) {
453
+ const { placeholder: t, ...o } = r, [a] = P();
454
+ return A(Re, { children: [h(Fr, { editor: a, ...o, ref: e }), t != null && h(Kr, { editor: a, content: t })] });
455
455
  }
456
- function zr({ content: r, editor: e }) {
456
+ function Kr({ content: r, editor: e }) {
457
457
  const t = function(s) {
458
- const [i, l] = M(() => De(s));
459
- return Ve(() => {
458
+ const [i, l] = F(() => Le(s));
459
+ return Xe(() => {
460
460
  function u() {
461
- const c = De(s);
461
+ const c = Le(s);
462
462
  l(c);
463
463
  }
464
464
  return u(), j(s.registerUpdateListener(() => {
@@ -467,7 +467,7 @@ function zr({ content: r, editor: e }) {
467
467
  u();
468
468
  }));
469
469
  }, [s]), i;
470
- }(e), [o, a] = M(e.isEditable());
470
+ }(e), [o, a] = F(e.isEditable());
471
471
  if (U(() => (a(e.isEditable()), e.registerEditableListener((s) => {
472
472
  a(s);
473
473
  })), [e]), !t) return null;
@@ -479,7 +479,7 @@ function le(r, e) {
479
479
  return t.__proto__ = o, t;
480
480
  }, le(r, e);
481
481
  }
482
- var $e = { error: null }, Ar = function(r) {
482
+ var $e = { error: null }, zr = function(r) {
483
483
  var e, t;
484
484
  function o() {
485
485
  for (var n, s = arguments.length, i = new Array(s), l = 0; l < s; l++) i[l] = arguments[l];
@@ -515,30 +515,30 @@ var $e = { error: null }, Ar = function(r) {
515
515
  }, o;
516
516
  }(ne.Component);
517
517
  function Br({ children: r, onError: e }) {
518
- return h(Ar, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
518
+ return h(zr, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
519
519
  }
520
- const Ur = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
520
+ const Ur = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
521
521
  function jr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
522
- const [o] = T();
522
+ const [o] = P();
523
523
  return Ur(() => {
524
524
  if (t) return o.registerUpdateListener(({ editorState: a, dirtyElements: n, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
525
525
  e && n.size === 0 && s.size === 0 || r && l.has(de) || i.isEmpty() || t(a, o, l);
526
526
  });
527
527
  }, [o, r, e, t]), null;
528
528
  }
529
- function Hr({ hasStrictIndent: r = !1 }) {
530
- const [e] = T();
531
- return S(() => {
529
+ function Jr({ hasStrictIndent: r = !1 }) {
530
+ const [e] = P();
531
+ return _(() => {
532
532
  if (!e.hasNodes([Be, Ue])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
533
- }, [e]), S(() => {
533
+ }, [e]), _(() => {
534
534
  if (r) return qt(e);
535
535
  }, [e, r]), function(t) {
536
- S(() => Vt(t), [t]);
536
+ _(() => Xt(t), [t]);
537
537
  }(e), null;
538
538
  }
539
539
  function Wr({ validateUrl: r, attributes: e }) {
540
- const [t] = T();
541
- return S(() => {
540
+ const [t] = P();
541
+ return _(() => {
542
542
  if (!t.hasNodes([je])) throw new Error("LinkPlugin: LinkNode not registered on editor");
543
543
  return j(t.registerCommand(be, (o) => {
544
544
  if (o === null) return oe(o), !0;
@@ -547,18 +547,18 @@ function Wr({ validateUrl: r, attributes: e }) {
547
547
  const { url: a, target: n, rel: s, title: i } = o;
548
548
  return oe(a, { ...e, rel: s, target: n, title: i }), !0;
549
549
  }
550
- }, ve), r !== void 0 ? t.registerCommand(Me, (o) => {
550
+ }, ve), r !== void 0 ? t.registerCommand(Fe, (o) => {
551
551
  const a = p();
552
- if (!g(a) || a.isCollapsed() || !z(o, ClipboardEvent) || o.clipboardData === null) return !1;
552
+ if (!g(a) || a.isCollapsed() || !K(o, ClipboardEvent) || o.clipboardData === null) return !1;
553
553
  const n = o.clipboardData.getData("text");
554
- return !!r(n) && !a.getNodes().some((s) => J(s)) && (t.dispatchCommand(be, { ...e, url: n }), o.preventDefault(), !0);
554
+ return !!r(n) && !a.getNodes().some((s) => H(s)) && (t.dispatchCommand(be, { ...e, url: n }), o.preventDefault(), !0);
555
555
  }, ve) : () => {
556
556
  });
557
557
  }, [t, r, e]), null;
558
558
  }
559
- function Jr({ newTab: r = !0, disabled: e = !1 }) {
560
- const [t] = T();
561
- return S(() => {
559
+ function Hr({ newTab: r = !0, disabled: e = !1 }) {
560
+ const [t] = P();
561
+ return _(() => {
562
562
  const o = (n) => {
563
563
  const s = n.target;
564
564
  if (!Oe(s)) return;
@@ -568,8 +568,8 @@ function Jr({ newTab: r = !0, disabled: e = !1 }) {
568
568
  if (i.update(() => {
569
569
  const f = te(s);
570
570
  if (f !== null) {
571
- const v = fe(f, J);
572
- if (!e) if (Yt(v)) l = v.sanitizeUrl(v.getURL()), u = v.getTarget();
571
+ const v = fe(f, H);
572
+ if (!e) if (Vt(v)) l = v.sanitizeUrl(v.getURL()), u = v.getTarget();
573
573
  else {
574
574
  const C = function(w, x) {
575
575
  let y = w;
@@ -595,67 +595,67 @@ function Jr({ newTab: r = !0, disabled: e = !1 }) {
595
595
  });
596
596
  }, [t, r, e]), null;
597
597
  }
598
- const ee = 0, ue = 1, ce = 2, $ = 0, qr = 1, Pe = 2, Vr = 3, Yr = 4;
599
- function Xr(r, e, t, o, a) {
598
+ const ee = 0, ue = 1, ce = 2, $ = 0, qr = 1, Te = 2, Xr = 3, Vr = 4;
599
+ function Yr(r, e, t, o, a) {
600
600
  if (r === null || t.size === 0 && o.size === 0 && !a) return $;
601
601
  const n = e._selection, s = r._selection;
602
602
  if (a) return qr;
603
603
  if (!(g(n) && g(s) && s.isCollapsed() && n.isCollapsed())) return $;
604
- const i = function(y, E, _) {
604
+ const i = function(y, E, S) {
605
605
  const N = y._nodeMap, b = [];
606
- for (const L of E) {
607
- const k = N.get(L);
606
+ for (const D of E) {
607
+ const k = N.get(D);
608
608
  k !== void 0 && b.push(k);
609
609
  }
610
- for (const [L, k] of _) {
610
+ for (const [D, k] of S) {
611
611
  if (!k) continue;
612
- const R = N.get(L);
613
- R === void 0 || Ke(R) || b.push(R);
612
+ const R = N.get(D);
613
+ R === void 0 || Ae(R) || b.push(R);
614
614
  }
615
615
  return b;
616
616
  }(e, t, o);
617
617
  if (i.length === 0) return $;
618
618
  if (i.length > 1) {
619
- const y = e._nodeMap, E = y.get(n.anchor.key), _ = y.get(s.anchor.key);
620
- return E && _ && !r._nodeMap.has(E.__key) && F(E) && E.__text.length === 1 && n.anchor.offset === 1 ? Pe : $;
619
+ const y = e._nodeMap, E = y.get(n.anchor.key), S = y.get(s.anchor.key);
620
+ return E && S && !r._nodeMap.has(E.__key) && M(E) && E.__text.length === 1 && n.anchor.offset === 1 ? Te : $;
621
621
  }
622
622
  const l = i[0], u = r._nodeMap.get(l.__key);
623
- if (!F(u) || !F(l) || u.__mode !== l.__mode) return $;
623
+ if (!M(u) || !M(l) || u.__mode !== l.__mode) return $;
624
624
  const c = u.__text, d = l.__text;
625
625
  if (c === d) return $;
626
626
  const f = n.anchor, v = s.anchor;
627
627
  if (f.key !== v.key || f.type !== "text") return $;
628
628
  const C = f.offset, w = v.offset, x = d.length - c.length;
629
- return x === 1 && w === C - 1 ? Pe : x === -1 && w === C + 1 ? Vr : x === -1 && w === C ? Yr : $;
629
+ return x === 1 && w === C - 1 ? Te : x === -1 && w === C + 1 ? Xr : x === -1 && w === C ? Vr : $;
630
630
  }
631
631
  function Gr(r, e) {
632
632
  let t = Date.now(), o = $;
633
633
  return (a, n, s, i, l, u) => {
634
634
  const c = Date.now();
635
635
  if (u.has(se)) return o = $, t = c, ce;
636
- const d = Xr(a, n, i, l, r.isComposing()), f = (() => {
637
- const v = s === null || s.editor === r, C = u.has(zt);
636
+ const d = Yr(a, n, i, l, r.isComposing()), f = (() => {
637
+ const v = s === null || s.editor === r, C = u.has(Kt);
638
638
  if (!C && v && u.has(de)) return ee;
639
639
  if (a === null) return ue;
640
640
  const w = n._selection;
641
641
  return i.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === o && c < t + e && v || i.size === 1 && function(x, y, E) {
642
- const _ = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, L = E._selection;
643
- return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !F(_) || !F(N) || _.__parent !== N.__parent) && JSON.stringify(y.read(() => _.exportJSON())) === JSON.stringify(E.read(() => N.exportJSON()));
642
+ const S = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, D = E._selection;
643
+ return !(g(b) && g(D) && b.anchor.type === "element" && b.focus.type === "element" && D.anchor.type === "text" && D.focus.type === "text" || !M(S) || !M(N) || S.__parent !== N.__parent) && JSON.stringify(y.read(() => S.exportJSON())) === JSON.stringify(E.read(() => N.exportJSON()));
644
644
  }(Array.from(i)[0], a, n) ? ee : ue : w !== null ? ee : ce;
645
645
  })();
646
646
  return t = c, o = d, f;
647
647
  };
648
648
  }
649
- function Te(r) {
649
+ function Pe(r) {
650
650
  r.undoStack = [], r.redoStack = [], r.current = null;
651
651
  }
652
652
  function Qr(r, e, t) {
653
653
  const o = Gr(r, t);
654
- return j(r.registerCommand(Kt, () => (function(n, s) {
654
+ return j(r.registerCommand(At, () => (function(n, s) {
655
655
  const i = s.redoStack, l = s.undoStack;
656
656
  if (l.length !== 0) {
657
657
  const u = s.current, c = l.pop();
658
- u !== null && (i.push(u), n.dispatchCommand(X, !0)), l.length === 0 && n.dispatchCommand(G, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
658
+ u !== null && (i.push(u), n.dispatchCommand(Y, !0)), l.length === 0 && n.dispatchCommand(G, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
659
659
  }
660
660
  }(r, e), !0), m), r.registerCommand(Ot, () => (function(n, s) {
661
661
  const i = s.redoStack, l = s.undoStack;
@@ -663,13 +663,13 @@ function Qr(r, e, t) {
663
663
  const u = s.current;
664
664
  u !== null && (l.push(u), n.dispatchCommand(G, !0));
665
665
  const c = i.pop();
666
- i.length === 0 && n.dispatchCommand(X, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
666
+ i.length === 0 && n.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
667
667
  }
668
- }(r, e), !0), m), r.registerCommand(Mt, () => (Te(e), !1), m), r.registerCommand(Ft, () => (Te(e), r.dispatchCommand(X, !1), r.dispatchCommand(G, !1), !0), m), r.registerUpdateListener(({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
668
+ }(r, e), !0), m), r.registerCommand(Ft, () => (Pe(e), !1), m), r.registerCommand(Mt, () => (Pe(e), r.dispatchCommand(Y, !1), r.dispatchCommand(G, !1), !0), m), r.registerUpdateListener(({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
669
669
  const c = e.current, d = e.redoStack, f = e.undoStack, v = c === null ? null : c.editorState;
670
670
  if (c !== null && n === v) return;
671
671
  const C = o(s, n, c, i, l, u);
672
- if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(X, !1)), c !== null && (f.push({ ...c }), r.dispatchCommand(G, !0));
672
+ if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), c !== null && (f.push({ ...c }), r.dispatchCommand(G, !0));
673
673
  else if (C === ce) return;
674
674
  e.current = { editor: r, editorState: n };
675
675
  }));
@@ -678,26 +678,26 @@ function Zr() {
678
678
  return { current: null, redoStack: [], undoStack: [] };
679
679
  }
680
680
  function en({ delay: r, externalHistoryState: e }) {
681
- const [t] = T();
681
+ const [t] = P();
682
682
  return function(o, a, n = 1e3) {
683
683
  const s = q(() => a || Zr(), [a]);
684
- S(() => Qr(o, s, n), [n, o, s]);
684
+ _(() => Qr(o, s, n), [n, o, s]);
685
685
  }(t, e, r), null;
686
686
  }
687
687
  function tn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
688
- const [a] = T();
689
- return S(() => {
690
- Gt(a) !== o && (Qt(a, o), a.registerNodeTransform(He, () => {
688
+ const [a] = P();
689
+ return _(() => {
690
+ Gt(a) !== o && (Qt(a, o), a.registerNodeTransform(Je, () => {
691
691
  })());
692
- }, [a, o]), S(() => Zt(a), [a]), S(() => er(a, t), [a, t]), S(() => {
692
+ }, [a, o]), _(() => Zt(a), [a]), _(() => er(a, t), [a, t]), _(() => {
693
693
  if (!r) return tr(a);
694
- }, [a, r]), S(() => {
694
+ }, [a, r]), _(() => {
695
695
  if (!e) return a.registerNodeTransform(We, (n) => {
696
696
  n.getBackgroundColor() !== null && n.setBackgroundColor(null);
697
697
  });
698
698
  }, [a, e, r]), null;
699
699
  }
700
- const Ye = 200, rn = ({
700
+ const Ve = 200, rn = ({
701
701
  currentLanguage: r = "NL",
702
702
  initialValue: e = "",
703
703
  placeholder: t = "",
@@ -706,10 +706,10 @@ const Ye = 200, rn = ({
706
706
  required: n = !1,
707
707
  notValidatedText: s = "",
708
708
  maxHeightInRem: i = "20rem",
709
- maxWords: l = Ye,
709
+ maxWords: l = Ve,
710
710
  onChange: u
711
711
  }) => {
712
- const { switchLanguage: c } = hr(), d = dr(), [f] = M(() => Ie()), [v, C] = M(0), [w, x] = M(0), y = ze(null), E = {
712
+ const { switchLanguage: c } = hr(), d = dr(), [f] = F(() => Ie()), [v, C] = F(0), [w, x] = F(0), y = Ke(null), E = {
713
713
  html: {
714
714
  export: ir
715
715
  },
@@ -719,43 +719,43 @@ const Ye = 200, rn = ({
719
719
  onError(b) {
720
720
  throw b;
721
721
  },
722
- nodes: [Be, Ue, je, Xt, We, rr, He],
722
+ nodes: [Be, Ue, je, Yt, We, rr, Je],
723
723
  editorState: (b) => {
724
- const k = new DOMParser().parseFromString(e, "text/html"), R = Wt(b, k), O = A();
724
+ const k = new DOMParser().parseFromString(e, "text/html"), R = Wt(b, k), O = z();
725
725
  if (O.clear(), lr(e))
726
726
  R.forEach((B) => {
727
727
  O.append(B);
728
728
  });
729
729
  else {
730
- const B = Fe();
731
- R.forEach((D, V) => {
732
- V === 0 ? (B.append(D), O.append(B)) : O.append(D);
730
+ const B = Me();
731
+ R.forEach((L, X) => {
732
+ X === 0 ? (B.append(L), O.append(B)) : O.append(L);
733
733
  });
734
734
  }
735
735
  }
736
- }, _ = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, L) => {
736
+ }, S = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, D) => {
737
737
  b.read(() => {
738
738
  let k = "";
739
- C(_(A().getTextContent().replace(/\s+/g, " ").trim())), k = ur(Jt(L)), u(k);
739
+ C(S(z().getTextContent().replace(/\s+/g, " ").trim())), k = ur(Ht(D)), u(k);
740
740
  });
741
741
  };
742
- return S(() => {
742
+ return _(() => {
743
743
  c(r.toLocaleLowerCase());
744
- }, [r, c]), S(() => {
744
+ }, [r, c]), _(() => {
745
745
  const b = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
746
- C(_(b));
747
- }, []), /* @__PURE__ */ K("div", { className: I.editor__container, children: [
748
- /* @__PURE__ */ K("div", { className: I.editor__header, children: [
746
+ C(S(b));
747
+ }, []), /* @__PURE__ */ A("div", { className: I.editor__container, children: [
748
+ /* @__PURE__ */ A("div", { className: I.editor__header, children: [
749
749
  /* @__PURE__ */ h(pr, { label: o, info: a, required: n }),
750
- /* @__PURE__ */ K("div", { className: I["editor__header-word-count"], children: [
750
+ /* @__PURE__ */ A("div", { className: I["editor__header-word-count"], children: [
751
751
  /* @__PURE__ */ h("span", { className: sr({ [I["editor__header-word-count--alert"]]: v > l }), children: v }),
752
752
  " / ",
753
753
  l
754
754
  ] })
755
755
  ] }),
756
- /* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ K(yr, { initialConfig: E, children: [
756
+ /* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ A(yr, { initialConfig: E, children: [
757
757
  /* @__PURE__ */ h(cr, { editorScrollPosition: w }),
758
- /* @__PURE__ */ K("div", { className: I["editor__field-wrapper"], children: [
758
+ /* @__PURE__ */ A("div", { className: I["editor__field-wrapper"], children: [
759
759
  /* @__PURE__ */ h(
760
760
  Rr,
761
761
  {
@@ -780,17 +780,17 @@ const Ye = 200, rn = ({
780
780
  ),
781
781
  /* @__PURE__ */ h(tn, {}),
782
782
  /* @__PURE__ */ h(en, {}),
783
- /* @__PURE__ */ h(Hr, {}),
783
+ /* @__PURE__ */ h(Jr, {}),
784
784
  /* @__PURE__ */ h(Wr, { validateUrl: nr }),
785
785
  /* @__PURE__ */ h(or, { matchers: ar }),
786
- /* @__PURE__ */ h(Jr, {}),
786
+ /* @__PURE__ */ h(Hr, {}),
787
787
  /* @__PURE__ */ h(jr, { onChange: N }),
788
788
  /* @__PURE__ */ h(vr, {})
789
789
  ] })
790
790
  ] }) }),
791
791
  s !== "" && /* @__PURE__ */ h(fr, { level: "error", feedback: s })
792
792
  ] });
793
- }, Jn = ({
793
+ }, Hn = ({
794
794
  currentLanguage: r = "NL",
795
795
  initialValue: e = "",
796
796
  placeholder: t = "",
@@ -798,7 +798,7 @@ const Ye = 200, rn = ({
798
798
  info: a = "",
799
799
  required: n = !1,
800
800
  notValidatedText: s = "",
801
- maxWords: i = Ye,
801
+ maxWords: i = Ve,
802
802
  onChange: l
803
803
  }) => /* @__PURE__ */ h(gr, { children: /* @__PURE__ */ h(
804
804
  rn,
@@ -816,6 +816,6 @@ const Ye = 200, rn = ({
816
816
  ) });
817
817
  export {
818
818
  rn as Rte,
819
- Jn as RteEditor
819
+ Hn as RteEditor
820
820
  };
821
821
  //# sourceMappingURL=RteEditor.js.map