@uva-glass/component-library 3.45.4 → 3.45.6

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 (51) hide show
  1. package/dist/{LexicalClipboard.prod-BP8LNbol.js → LexicalClipboard.prod-pXq91TBU.js} +2 -2
  2. package/dist/{LexicalClipboard.prod-BP8LNbol.js.map → LexicalClipboard.prod-pXq91TBU.js.map} +1 -1
  3. package/dist/{LexicalList.prod-D6IAptR7.js → LexicalList.prod--mkvX0uW.js} +2 -2
  4. package/dist/{LexicalList.prod-D6IAptR7.js.map → LexicalList.prod--mkvX0uW.js.map} +1 -1
  5. package/dist/{LexicalSelection.prod-ZvNRDI9l.js → LexicalSelection.prod-Ct4PZOht.js} +5 -5
  6. package/dist/{LexicalSelection.prod-ZvNRDI9l.js.map → LexicalSelection.prod-Ct4PZOht.js.map} +1 -1
  7. package/dist/{LexicalTable.prod-DJktN6jF.js → LexicalTable.prod-Bexd4dGG.js} +2 -2
  8. package/dist/{LexicalTable.prod-DJktN6jF.js.map → LexicalTable.prod-Bexd4dGG.js.map} +1 -1
  9. package/dist/{TableCellResizerPlugin-DFzNK-ve.js → TableCellResizerPlugin-Cpbankb8.js} +2 -2
  10. package/dist/{TableCellResizerPlugin-DFzNK-ve.js.map → TableCellResizerPlugin-Cpbankb8.js.map} +1 -1
  11. package/dist/{TablePlugin-4Zj0xZie.js → TablePlugin-FTN9oxnI.js} +2 -2
  12. package/dist/{TablePlugin-4Zj0xZie.js.map → TablePlugin-FTN9oxnI.js.map} +1 -1
  13. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.d.ts +3 -1
  14. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +45 -44
  15. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
  16. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  17. package/dist/components/FormInput/FormInput.js +1 -1
  18. package/dist/components/InputField/InputField.stories.js +1 -1
  19. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  20. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  21. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  22. package/dist/components/MultiSelect/index.js +1 -1
  23. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  24. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  25. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  26. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  27. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
  28. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  29. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
  30. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +43 -49
  31. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  32. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
  33. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +2 -2
  34. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  35. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  36. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +2 -2
  37. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +1 -1
  38. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  39. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +2 -2
  40. package/dist/components/RteEditor/Plugins/index.js +2 -2
  41. package/dist/components/RteEditor/RteEditor.js +303 -312
  42. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  43. package/dist/components/RteEditor/RteEditor.stories.js +29 -29
  44. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  45. package/dist/components/RteEditor/helpers.d.ts +0 -1
  46. package/dist/components/RteEditor/helpers.js +18 -19
  47. package/dist/components/RteEditor/helpers.js.map +1 -1
  48. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +1 -1
  49. package/dist/components/index.js +1 -1
  50. package/dist/index.js +1 -1
  51. package/package.json +7 -7
@@ -1,23 +1,23 @@
1
- import { jsx as h, jsxs as z, Fragment as Ie } from "react/jsx-runtime";
2
- import { t as Ge, r as Qe, o as M } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { aK as Me, ah as F, F as Ke, w as p, aL as de, ao as H, h as J, L as Ve, Z as I, a as g, a0 as Ze, I as m, aM as et, af as Oe, o as tt, x as ze, aN as rt, aO as nt, S as ot, f as T, aG as at, aP as st, aQ as it, aR as lt, n as ee, aS as ut, aT as ct, a5 as dt, g as ft, k as mt, G as pt, aU as gt, aV as me, b as pe, P as ht, N as re, O as vt, a6 as Ae, aW as ge, C as Ct, B as yt, z as Et, aX as he, A as wt, aY as bt, aZ as St, a_ as _t, aF as kt, X as xt, U as Nt, a$ as Lt, Y as Dt, J as $t, H as Tt, u as Pt, K as ve, b0 as Rt, e as It, au as X, at as G, b1 as Mt, b2 as Kt, aw as Ot, b3 as se, av as zt, b4 as At } from "../../Lexical.prod-nXWuyOKD.js";
4
- import * as ne from "react";
5
- import { useMemo as te, useLayoutEffect as W, useEffect as k, useState as K, Suspense as Ft, forwardRef as Fe, useCallback as Bt, useRef as Ut } from "react";
6
- import { a as jt, T as Ht } from "../../TableCellResizerPlugin-DFzNK-ve.js";
7
- import { j as U, L as A, y as Jt, w as fe } from "../../LexicalUtils.prod-Ckfw0Hjt.js";
1
+ import { jsx as h, jsxs as O, Fragment as Re } from "react/jsx-runtime";
2
+ import { t as Ve, r as Ge, o as I } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
+ import { aK as Ie, ah as A, F as Qe, w as p, aL as ue, ao as U, h as j, L as Ze, Z as R, a as g, a0 as et, I as m, aM as tt, af as Me, o as rt, x as Ke, aN as nt, aO as ot, S as at, f as $, aG as st, aP as it, aQ as lt, aR as ut, n as G, aS as ct, aT as dt, a5 as ft, g as mt, k as pt, G as gt, aU as ht, aV as fe, b as me, P as vt, N as ee, O as Ct, a6 as Oe, aW as pe, C as yt, B as Et, z as wt, aX as ge, A as bt, aY as _t, aZ as St, a_ as ze, aF as kt, X as xt, U as Nt, a$ as Lt, Y as Dt, J as $t, H as Tt, u as Pt, K as he, b0 as Rt, e as It, au as W, at as Y, b1 as Mt, b2 as Kt, aw as Ot, b3 as oe, av as zt, b4 as At } from "../../Lexical.prod-nXWuyOKD.js";
4
+ import * as te from "react";
5
+ import { useMemo as Q, useLayoutEffect as H, useEffect as k, useState as K, Suspense as Ft, forwardRef as Ae, useCallback as Bt, useRef as Ut } from "react";
6
+ import { a as jt, T as Ht } from "../../TableCellResizerPlugin-Cpbankb8.js";
7
+ import { j as F, L as z, y as Jt, w as ce } from "../../LexicalUtils.prod-Ckfw0Hjt.js";
8
8
  import { flushSync as Wt, createPortal as Yt } from "react-dom";
9
- import { A as Ce, F as ye, m as qt, g as Xt } from "../../LexicalClipboard.prod-BP8LNbol.js";
10
- import { R as Ee, Q as we, e as be } from "../../LexicalSelection.prod-ZvNRDI9l.js";
11
- import { r as Be, Y as Ue, v as Gt, S as Qt } from "../../LexicalList.prod-D6IAptR7.js";
12
- import { g as je, k as Se, v as oe, p as Vt, m as Zt } from "../../LexicalLink.prod-Brzpgs_K.js";
13
- import { s as er, d as tr, b as He, e as rr, w as nr, S as or, y as Je, O as ar } from "../../LexicalTable.prod-DJktN6jF.js";
9
+ import { A as ve, F as Ce, m as qt, g as Xt } from "../../LexicalClipboard.prod-pXq91TBU.js";
10
+ import { R as ye, Q as Ee, e as we } from "../../LexicalSelection.prod-Ct4PZOht.js";
11
+ import { r as Fe, Y as Be, v as Vt, S as Gt } from "../../LexicalList.prod--mkvX0uW.js";
12
+ import { g as Ue, k as be, v as re, p as Qt, m as Zt } from "../../LexicalLink.prod-Brzpgs_K.js";
13
+ import { s as er, d as tr, b as je, e as rr, w as nr, S as or, y as He, O as ar } from "../../LexicalTable.prod-Bexd4dGG.js";
14
14
  import { a as sr, w as ir, M as lr } from "../../helpers-mE437H2Y.js";
15
15
  import { c as ur } from "../../clsx-OuTLNxxd.js";
16
- import { exportMap as cr, isStartingWithHtmlTag as dr, mergeBoldStrongTags as fr, cleanUpTable as mr } from "./helpers.js";
17
- import { s as R } from "../../RteEditor.module-CovRFt0S.js";
18
- import { ToolBarPlugin as pr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
19
- import { useTranslation as gr } from "./hooks/useTranslation.js";
20
- import "../../TablePlugin-4Zj0xZie.js";
16
+ import { exportMap as cr, mergeBoldStrongTags as dr, cleanUpTable as fr } from "./helpers.js";
17
+ import { s as P } from "../../RteEditor.module-CovRFt0S.js";
18
+ import { ToolBarPlugin as mr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
19
+ import { useTranslation as pr } from "./hooks/useTranslation.js";
20
+ import "../../TablePlugin-FTN9oxnI.js";
21
21
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
22
22
  import "./hooks/components/Flyout.js";
23
23
  import "../Accordion/Accordion.js";
@@ -25,7 +25,7 @@ import "../Buttons/Button.js";
25
25
  import "../Buttons/LinkButton.js";
26
26
  import "@react-aria/button";
27
27
  import "../Checkbox/Checkbox.js";
28
- import { FeedbackBox as hr } from "../FeedbackBox/FeedbackBox.js";
28
+ import { FeedbackBox as gr } from "../FeedbackBox/FeedbackBox.js";
29
29
  import "@react-aria/dialog";
30
30
  import "@react-aria/focus";
31
31
  import "@react-aria/overlays";
@@ -40,78 +40,78 @@ import "../SelectListbox/SelectListbox.js";
40
40
  import "../SelectListbox/SelectProvider.js";
41
41
  import "../Sortable/components/SortableItem.js";
42
42
  import "../../SortableProvider-l8-7ClBJ.js";
43
- import { PasteHandlerPlugin as vr } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
- import { UvaTheme as Cr } from "./UvaTheme/UvaTheme.js";
45
- import { EditorHeader as yr } from "./EditorHeader/EditorHeader.js";
46
- import { LanguageProvider as Er, useLanguage as wr } from "./Providers/LanguageProvider.js";
47
- import { TableWrapperNode as br } from "./nodes/TableWrapperNode/TableWrapperNode.js";
48
- const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Sr = We ? W : k, Q = { tag: de };
43
+ import { PasteHandlerPlugin as hr } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
+ import { UvaTheme as vr } from "./UvaTheme/UvaTheme.js";
45
+ import { EditorHeader as Cr } from "./EditorHeader/EditorHeader.js";
46
+ import { LanguageProvider as yr, useLanguage as Er } from "./Providers/LanguageProvider.js";
47
+ import { TableWrapperNode as wr } from "./nodes/TableWrapperNode/TableWrapperNode.js";
48
+ const Je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, br = Je ? H : k, q = { tag: ue };
49
49
  function _r({ initialConfig: r, children: e }) {
50
- const t = te((() => {
51
- const { theme: o, namespace: a, nodes: n, onError: s, editorState: i, html: l } = r, c = Ge(null, o), u = Me({ editable: r.editable, html: l, namespace: a, nodes: n, onError: (d) => s(d, u), theme: o });
50
+ const t = Q((() => {
51
+ const { theme: o, namespace: a, nodes: n, onError: s, editorState: i, html: l } = r, c = Ve(null, o), u = Ie({ editable: r.editable, html: l, namespace: a, nodes: n, onError: (d) => s(d, u), theme: o });
52
52
  return (function(d, f) {
53
53
  if (f !== null) {
54
54
  if (f === void 0) d.update((() => {
55
- const v = F();
55
+ const v = A();
56
56
  if (v.isEmpty()) {
57
- const C = Ke();
57
+ const C = Qe();
58
58
  v.append(C);
59
- const w = We ? document.activeElement : null;
59
+ const w = Je ? document.activeElement : null;
60
60
  (p() !== null || w !== null && w === d.getRootElement()) && C.select();
61
61
  }
62
- }), Q);
62
+ }), q);
63
63
  else if (f !== null) switch (typeof f) {
64
64
  case "string": {
65
65
  const v = d.parseEditorState(f);
66
- d.setEditorState(v, Q);
66
+ d.setEditorState(v, q);
67
67
  break;
68
68
  }
69
69
  case "object":
70
- d.setEditorState(f, Q);
70
+ d.setEditorState(f, q);
71
71
  break;
72
72
  case "function":
73
73
  d.update((() => {
74
- F().isEmpty() && f(d);
75
- }), Q);
74
+ A().isEmpty() && f(d);
75
+ }), q);
76
76
  }
77
77
  }
78
78
  })(u, i), [u, c];
79
79
  }), []);
80
- return Sr((() => {
80
+ return br((() => {
81
81
  const o = r.editable, [a] = t;
82
82
  a.setEditable(o === void 0 || o);
83
- }), []), h(Qe.Provider, { value: t, children: e });
83
+ }), []), h(Ge.Provider, { value: t, children: e });
84
84
  }
85
- function kr() {
86
- return F().getTextContent();
85
+ function Sr() {
86
+ return A().getTextContent();
87
87
  }
88
- function xr(r, e = !0) {
88
+ function kr(r, e = !0) {
89
89
  if (r) return !1;
90
- let t = kr();
90
+ let t = Sr();
91
91
  return e && (t = t.trim()), t === "";
92
92
  }
93
- function Nr(r) {
94
- if (!xr(r, !1)) return !1;
95
- const e = F().getChildren(), t = e.length;
93
+ function xr(r) {
94
+ if (!kr(r, !1)) return !1;
95
+ const e = A().getChildren(), t = e.length;
96
96
  if (t > 1) return !1;
97
97
  for (let o = 0; o < t; o++) {
98
98
  const a = e[o];
99
- if (H(a)) return !1;
100
- if (J(a)) {
101
- if (!Ve(a) || a.__indent !== 0) return !1;
99
+ if (U(a)) return !1;
100
+ if (j(a)) {
101
+ if (!Ze(a) || a.__indent !== 0) return !1;
102
102
  const n = a.getChildren(), s = n.length;
103
103
  for (let i = 0; i < s; i++) {
104
104
  const l = n[o];
105
- if (!I(l)) return !1;
105
+ if (!R(l)) return !1;
106
106
  }
107
107
  }
108
108
  }
109
109
  return !0;
110
110
  }
111
- function Ye(r) {
112
- return () => Nr(r);
111
+ function We(r) {
112
+ return () => xr(r);
113
113
  }
114
- function Lr(r) {
114
+ function Nr(r) {
115
115
  const e = window.location.origin, t = (o) => {
116
116
  if (o.origin !== e) return;
117
117
  const a = r.getRootElement();
@@ -134,11 +134,11 @@ function Lr(r) {
134
134
  const w = p();
135
135
  if (g(w)) {
136
136
  const x = w.anchor;
137
- let y = x.getNode(), E = 0, S = 0;
138
- if (I(y) && c >= 0 && u >= 0 && (E = c, S = c + u, w.setTextNodeRange(y, E, y, S)), E === S && d === "" || (w.insertRawText(d), y = x.getNode()), I(y)) {
139
- E = f, S = f + v;
137
+ let y = x.getNode(), E = 0, _ = 0;
138
+ if (R(y) && c >= 0 && u >= 0 && (E = c, _ = c + u, w.setTextNodeRange(y, E, y, _)), E === _ && d === "" || (w.insertRawText(d), y = x.getNode()), R(y)) {
139
+ E = f, _ = f + v;
140
140
  const N = y.getTextContentSize();
141
- E = E > N ? N : E, S = S > N ? N : S, w.setTextNodeRange(y, E, y, S);
141
+ E = E > N ? N : E, _ = _ > N ? N : _, w.setTextNodeRange(y, E, y, _);
142
142
  }
143
143
  o.stopImmediatePropagation();
144
144
  }
@@ -163,41 +163,41 @@ function _e(r, e) {
163
163
  }
164
164
  return null;
165
165
  }
166
- const j = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Dr = j && "documentMode" in document ? document.documentMode : null, $r = !(!j || !("InputEvent" in window) || Dr) && "getTargetRanges" in new window.InputEvent("input"), Tr = j && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), ke = j && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Pr = j && /^(?=.*Chrome).*/i.test(navigator.userAgent), Rr = j && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Pr, xe = tt("DRAG_DROP_PASTE_FILE");
167
- function V(r) {
166
+ const B = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Lr = B && "documentMode" in document ? document.documentMode : null, Dr = !(!B || !("InputEvent" in window) || Lr) && "getTargetRanges" in new window.InputEvent("input"), $r = B && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Se = B && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Tr = B && /^(?=.*Chrome).*/i.test(navigator.userAgent), Pr = B && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Tr, ke = rt("DRAG_DROP_PASTE_FILE");
167
+ function X(r) {
168
168
  let e = null;
169
- if (A(r, DragEvent) ? e = r.dataTransfer : A(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
169
+ if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
170
170
  const t = e.types, o = t.includes("Files"), a = t.includes("text/html") || t.includes("text/plain");
171
171
  return [o, Array.from(e.files), a];
172
172
  }
173
- function Ne(r) {
173
+ function xe(r) {
174
174
  const e = p();
175
175
  if (!g(e)) return !1;
176
176
  const t = /* @__PURE__ */ new Set(), o = e.getNodes();
177
177
  for (let a = 0; a < o.length; a++) {
178
178
  const n = o[a], s = n.getKey();
179
179
  if (t.has(s)) continue;
180
- const i = fe(n, ((c) => J(c) && !c.isInline()));
180
+ const i = ce(n, ((c) => j(c) && !c.isInline()));
181
181
  if (i === null) continue;
182
182
  const l = i.getKey();
183
183
  i.canIndent() && !t.has(l) && (t.add(l), r(i));
184
184
  }
185
185
  return t.size > 0;
186
186
  }
187
- function Le(r) {
188
- const e = ee(r);
189
- return H(e);
187
+ function Ne(r) {
188
+ const e = G(r);
189
+ return U(e);
190
190
  }
191
- function ae(r) {
191
+ function ne(r) {
192
192
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
193
193
  }
194
- function Ir(r) {
195
- return U(r.registerCommand(Pt, ((e) => {
194
+ function Rr(r) {
195
+ return F(r.registerCommand(Pt, ((e) => {
196
196
  const t = p();
197
- return !!T(t) && (t.clear(), !0);
198
- }), m), r.registerCommand(re, ((e) => {
197
+ return !!$(t) && (t.clear(), !0);
198
+ }), m), r.registerCommand(ee, ((e) => {
199
199
  const t = p();
200
- return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
200
+ return g(t) ? (t.deleteCharacter(e), !0) : !!$(t) && (t.deleteNodes(), !0);
201
201
  }), m), r.registerCommand(Tt, ((e) => {
202
202
  const t = p();
203
203
  return !!g(t) && (t.deleteWord(e), !0);
@@ -210,7 +210,7 @@ function Ir(r) {
210
210
  else {
211
211
  if (t === null) return !1;
212
212
  const o = e.dataTransfer;
213
- if (o != null) Ce(o, t, r);
213
+ if (o != null) ve(o, t, r);
214
214
  else if (g(t)) {
215
215
  const a = e.data;
216
216
  return a && t.insertText(a), !0;
@@ -225,72 +225,72 @@ function Ir(r) {
225
225
  return !!g(t) && (t.formatText(e), !0);
226
226
  }), m), r.registerCommand(xt, ((e) => {
227
227
  const t = p();
228
- if (!g(t) && !T(t)) return !1;
228
+ if (!g(t) && !$(t)) return !1;
229
229
  const o = t.getNodes();
230
230
  for (const a of o) {
231
- const n = fe(a, ((s) => J(s) && !s.isInline()));
231
+ const n = ce(a, ((s) => j(s) && !s.isInline()));
232
232
  n !== null && n.setFormat(e);
233
233
  }
234
234
  return !0;
235
- }), m), r.registerCommand(me, ((e) => {
235
+ }), m), r.registerCommand(fe, ((e) => {
236
236
  const t = p();
237
237
  return !!g(t) && (t.insertLineBreak(e), !0);
238
- }), m), r.registerCommand(pe, (() => {
238
+ }), m), r.registerCommand(me, (() => {
239
239
  const e = p();
240
240
  return !!g(e) && (e.insertParagraph(), !0);
241
- }), m), r.registerCommand(St, (() => (_t([kt()]), !0)), m), r.registerCommand(bt, (() => Ne(((e) => {
241
+ }), m), r.registerCommand(St, (() => (ze([kt()]), !0)), m), r.registerCommand(_t, (() => xe(((e) => {
242
242
  const t = e.getIndent();
243
243
  e.setIndent(t + 1);
244
- }))), m), r.registerCommand(ge, (() => Ne(((e) => {
244
+ }))), m), r.registerCommand(pe, (() => xe(((e) => {
245
245
  const t = e.getIndent();
246
246
  t > 0 && e.setIndent(Math.max(0, t - 1));
247
- }))), m), r.registerCommand(wt, ((e) => {
247
+ }))), m), r.registerCommand(bt, ((e) => {
248
248
  const t = p();
249
- if (T(t)) {
249
+ if ($(t)) {
250
250
  const o = t.getNodes();
251
251
  if (o.length > 0) return o[0].selectPrevious(), !0;
252
252
  } else if (g(t)) {
253
- const o = he(t.focus, !0);
254
- if (!e.shiftKey && H(o) && !o.isIsolated() && !o.isInline()) return o.selectPrevious(), e.preventDefault(), !0;
253
+ const o = ge(t.focus, !0);
254
+ if (!e.shiftKey && U(o) && !o.isIsolated() && !o.isInline()) return o.selectPrevious(), e.preventDefault(), !0;
255
255
  }
256
256
  return !1;
257
- }), m), r.registerCommand(Et, ((e) => {
257
+ }), m), r.registerCommand(wt, ((e) => {
258
258
  const t = p();
259
- if (T(t)) {
259
+ if ($(t)) {
260
260
  const o = t.getNodes();
261
261
  if (o.length > 0) return o[0].selectNext(0, 0), !0;
262
262
  } else if (g(t)) {
263
263
  if ((function(a) {
264
264
  const n = a.focus;
265
- return n.key === "root" && n.offset === F().getChildrenSize();
265
+ return n.key === "root" && n.offset === A().getChildrenSize();
266
266
  })(t)) return e.preventDefault(), !0;
267
- const o = he(t.focus, !1);
268
- if (!e.shiftKey && H(o) && !o.isIsolated() && !o.isInline()) return o.selectNext(), e.preventDefault(), !0;
267
+ const o = ge(t.focus, !1);
268
+ if (!e.shiftKey && U(o) && !o.isIsolated() && !o.isInline()) return o.selectNext(), e.preventDefault(), !0;
269
269
  }
270
270
  return !1;
271
- }), m), r.registerCommand(yt, ((e) => {
271
+ }), m), r.registerCommand(Et, ((e) => {
272
272
  const t = p();
273
- if (T(t)) {
273
+ if ($(t)) {
274
274
  const o = t.getNodes();
275
- if (o.length > 0) return e.preventDefault(), Ee(o[0]) ? o[0].selectNext(0, 0) : o[0].selectPrevious(), !0;
275
+ if (o.length > 0) return e.preventDefault(), ye(o[0]) ? o[0].selectNext(0, 0) : o[0].selectPrevious(), !0;
276
276
  }
277
277
  if (!g(t)) return !1;
278
- if (we(t, !0)) {
278
+ if (Ee(t, !0)) {
279
279
  const o = e.shiftKey;
280
- return e.preventDefault(), be(t, o, !0), !0;
280
+ return e.preventDefault(), we(t, o, !0), !0;
281
281
  }
282
282
  return !1;
283
- }), m), r.registerCommand(Ct, ((e) => {
283
+ }), m), r.registerCommand(yt, ((e) => {
284
284
  const t = p();
285
- if (T(t)) {
285
+ if ($(t)) {
286
286
  const a = t.getNodes();
287
- if (a.length > 0) return e.preventDefault(), Ee(a[0]) ? a[0].selectPrevious() : a[0].selectNext(0, 0), !0;
287
+ if (a.length > 0) return e.preventDefault(), ye(a[0]) ? a[0].selectPrevious() : a[0].selectNext(0, 0), !0;
288
288
  }
289
289
  if (!g(t)) return !1;
290
290
  const o = e.shiftKey;
291
- return !!we(t, !1) && (e.preventDefault(), be(t, o, !1), !0);
292
- }), m), r.registerCommand(vt, ((e) => {
293
- if (Le(e.target)) return !1;
291
+ return !!Ee(t, !1) && (e.preventDefault(), we(t, o, !1), !0);
292
+ }), m), r.registerCommand(Ct, ((e) => {
293
+ if (Ne(e.target)) return !1;
294
294
  const t = p();
295
295
  if (g(t)) {
296
296
  if ((function(o) {
@@ -298,97 +298,97 @@ function Ir(r) {
298
298
  const { anchor: a } = o;
299
299
  if (a.offset !== 0) return !1;
300
300
  const n = a.getNode();
301
- if (Ae(n)) return !1;
301
+ if (Oe(n)) return !1;
302
302
  const s = Jt(n);
303
303
  return s.getIndent() > 0 && (s.is(n) || n.is(s.getFirstDescendant()));
304
- })(t)) return e.preventDefault(), r.dispatchCommand(ge, void 0);
305
- if (ke && navigator.language === "ko-KR") return !1;
306
- } else if (!T(t)) return !1;
307
- return e.preventDefault(), r.dispatchCommand(re, !0);
308
- }), m), r.registerCommand(ht, ((e) => {
309
- if (Le(e.target)) return !1;
304
+ })(t)) return e.preventDefault(), r.dispatchCommand(pe, void 0);
305
+ if (Se && navigator.language === "ko-KR") return !1;
306
+ } else if (!$(t)) return !1;
307
+ return e.preventDefault(), r.dispatchCommand(ee, !0);
308
+ }), m), r.registerCommand(vt, ((e) => {
309
+ if (Ne(e.target)) return !1;
310
310
  const t = p();
311
- return !(!g(t) && !T(t)) && (e.preventDefault(), r.dispatchCommand(re, !1));
312
- }), m), r.registerCommand(gt, ((e) => {
311
+ return !(!g(t) && !$(t)) && (e.preventDefault(), r.dispatchCommand(ee, !1));
312
+ }), m), r.registerCommand(ht, ((e) => {
313
313
  const t = p();
314
314
  if (!g(t)) return !1;
315
- if (ae(t), e !== null) {
316
- if ((ke || Tr || Rr) && $r) return !1;
317
- if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(me, !1);
315
+ if (ne(t), e !== null) {
316
+ if ((Se || $r || Pr) && Dr) return !1;
317
+ if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(fe, !1);
318
318
  }
319
- return r.dispatchCommand(pe, void 0);
320
- }), m), r.registerCommand(pt, (() => {
319
+ return r.dispatchCommand(me, void 0);
320
+ }), m), r.registerCommand(gt, (() => {
321
321
  const e = p();
322
322
  return !!g(e) && (r.blur(), !0);
323
- }), m), r.registerCommand(ct, ((e) => {
324
- const [, t] = V(e);
323
+ }), m), r.registerCommand(dt, ((e) => {
324
+ const [, t] = X(e);
325
325
  if (t.length > 0) {
326
326
  const a = _e(e.clientX, e.clientY);
327
327
  if (a !== null) {
328
- const { offset: n, node: s } = a, i = ee(s);
328
+ const { offset: n, node: s } = a, i = G(s);
329
329
  if (i !== null) {
330
- const l = dt();
331
- if (I(i)) l.anchor.set(i.getKey(), n, "text"), l.focus.set(i.getKey(), n, "text");
330
+ const l = ft();
331
+ if (R(i)) l.anchor.set(i.getKey(), n, "text"), l.focus.set(i.getKey(), n, "text");
332
332
  else {
333
333
  const u = i.getParentOrThrow().getKey(), d = i.getIndexWithinParent() + 1;
334
334
  l.anchor.set(u, d, "element"), l.focus.set(u, d, "element");
335
335
  }
336
- const c = ft(l);
337
- mt(c);
336
+ const c = mt(l);
337
+ pt(c);
338
338
  }
339
- r.dispatchCommand(xe, t);
339
+ r.dispatchCommand(ke, t);
340
340
  }
341
341
  return e.preventDefault(), !0;
342
342
  }
343
343
  const o = p();
344
344
  return !!g(o);
345
- }), m), r.registerCommand(ut, ((e) => {
346
- const [t] = V(e), o = p();
345
+ }), m), r.registerCommand(ct, ((e) => {
346
+ const [t] = X(e), o = p();
347
347
  return !(t && !g(o));
348
- }), m), r.registerCommand(lt, ((e) => {
349
- const [t] = V(e), o = p();
348
+ }), m), r.registerCommand(ut, ((e) => {
349
+ const [t] = X(e), o = p();
350
350
  if (t && !g(o)) return !1;
351
351
  const a = _e(e.clientX, e.clientY);
352
352
  if (a !== null) {
353
- const n = ee(a.node);
354
- H(n) && e.preventDefault();
353
+ const n = G(a.node);
354
+ U(n) && e.preventDefault();
355
355
  }
356
356
  return !0;
357
- }), m), r.registerCommand(st, (() => (it(), !0)), m), r.registerCommand(at, ((e) => (ye(r, A(e, ClipboardEvent) ? e : null), !0)), m), r.registerCommand(ot, ((e) => ((async function(t, o) {
358
- await ye(o, A(t, ClipboardEvent) ? t : null), o.update((() => {
357
+ }), m), r.registerCommand(it, (() => (lt(), !0)), m), r.registerCommand(st, ((e) => (Ce(r, z(e, ClipboardEvent) ? e : null), !0)), m), r.registerCommand(at, ((e) => ((async function(t, o) {
358
+ await Ce(o, z(t, ClipboardEvent) ? t : null), o.update((() => {
359
359
  const a = p();
360
- g(a) ? a.removeText() : T(a) && a.getNodes().forEach(((n) => n.remove()));
360
+ g(a) ? a.removeText() : $(a) && a.getNodes().forEach(((n) => n.remove()));
361
361
  }));
362
- })(e, r), !0)), m), r.registerCommand(Oe, ((e) => {
363
- const [, t, o] = V(e);
364
- return t.length > 0 && !o ? (r.dispatchCommand(xe, t), !0) : ze(e.target) && rt(e.target) ? !1 : p() !== null && ((function(a, n) {
362
+ })(e, r), !0)), m), r.registerCommand(Me, ((e) => {
363
+ const [, t, o] = X(e);
364
+ return t.length > 0 && !o ? (r.dispatchCommand(ke, t), !0) : Ke(e.target) && nt(e.target) ? !1 : p() !== null && ((function(a, n) {
365
365
  a.preventDefault(), n.update((() => {
366
- const s = p(), i = A(a, InputEvent) || A(a, KeyboardEvent) ? null : a.clipboardData;
367
- i != null && s !== null && Ce(i, s, n);
368
- }), { tag: nt });
366
+ const s = p(), i = z(a, InputEvent) || z(a, KeyboardEvent) ? null : a.clipboardData;
367
+ i != null && s !== null && ve(i, s, n);
368
+ }), { tag: ot });
369
369
  })(e, r), !0);
370
- }), m), r.registerCommand(et, ((e) => {
370
+ }), m), r.registerCommand(tt, ((e) => {
371
371
  const t = p();
372
- return g(t) && ae(t), !1;
373
- }), m), r.registerCommand(Ze, ((e) => {
372
+ return g(t) && ne(t), !1;
373
+ }), m), r.registerCommand(et, ((e) => {
374
374
  const t = p();
375
- return g(t) && ae(t), !1;
375
+ return g(t) && ne(t), !1;
376
376
  }), m));
377
377
  }
378
- const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? W : k;
379
- function De(r) {
380
- return r.getEditorState().read(Ye(r.isComposing()));
378
+ const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : k;
379
+ function Le(r) {
380
+ return r.getEditorState().read(We(r.isComposing()));
381
381
  }
382
- function Mr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
383
- const [o] = M(), a = (function(n, s) {
382
+ function Ir({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
383
+ const [o] = I(), a = (function(n, s) {
384
384
  const [i, l] = K((() => n.getDecorators()));
385
- return ie((() => n.registerDecoratorListener(((c) => {
385
+ return ae((() => n.registerDecoratorListener(((c) => {
386
386
  Wt((() => {
387
387
  l(c);
388
388
  }));
389
389
  }))), [n]), k((() => {
390
390
  l(n.getDecorators());
391
- }), [n]), te((() => {
391
+ }), [n]), Q((() => {
392
392
  const c = [], u = Object.keys(i);
393
393
  for (let d = 0; d < u.length; d++) {
394
394
  const f = u[d], v = h(s, { onError: (w) => n._onError(w), children: h(Ft, { fallback: null, children: i[f] }) }), C = n.getElementByKey(f);
@@ -398,18 +398,18 @@ function Mr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
398
398
  }), [s, i, n]);
399
399
  })(o, t);
400
400
  return (function(n) {
401
- ie((() => U(Ir(n), Lr(n))), [n]);
402
- })(o), z(Ie, { children: [r, h(Kr, { content: e }), a] });
401
+ ae((() => F(Rr(n), Nr(n))), [n]);
402
+ })(o), O(Re, { children: [r, h(Mr, { content: e }), a] });
403
403
  }
404
- function Kr({ content: r }) {
405
- const [e] = M(), t = (function(a) {
406
- const [n, s] = K((() => De(a)));
407
- return ie((() => {
404
+ function Mr({ content: r }) {
405
+ const [e] = I(), t = (function(a) {
406
+ const [n, s] = K((() => Le(a)));
407
+ return ae((() => {
408
408
  function i() {
409
- const l = De(a);
409
+ const l = Le(a);
410
410
  s(l);
411
411
  }
412
- return i(), U(a.registerUpdateListener((() => {
412
+ return i(), F(a.registerUpdateListener((() => {
413
413
  i();
414
414
  })), a.registerEditableListener((() => {
415
415
  i();
@@ -418,71 +418,71 @@ function Kr({ content: r }) {
418
418
  })(e), o = jt();
419
419
  return t ? typeof r == "function" ? r(o) : r : null;
420
420
  }
421
- const qe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? W : k;
422
- function Or({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: a, ariaErrorMessage: n, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: u, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: S, "data-testid": N, ...b }, L) {
423
- const [_, P] = K(r.isEditable()), O = Bt(((D) => {
424
- D && D.ownerDocument && D.ownerDocument.defaultView ? r.setRootElement(D) : r.setRootElement(null);
425
- }), [r]), B = te((() => /* @__PURE__ */ (function(...D) {
426
- return (Y) => {
427
- D.forEach(((q) => {
428
- typeof q == "function" ? q(Y) : q != null && (q.current = Y);
421
+ const Ye = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : k;
422
+ function Kr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: a, ariaErrorMessage: n, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: u, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: _, "data-testid": N, ...b }, L) {
423
+ const [S, T] = K(r.isEditable()), Z = Bt(((M) => {
424
+ M && M.ownerDocument && M.ownerDocument.defaultView ? r.setRootElement(M) : r.setRootElement(null);
425
+ }), [r]), Xe = Q((() => /* @__PURE__ */ (function(...M) {
426
+ return (de) => {
427
+ M.forEach(((J) => {
428
+ typeof J == "function" ? J(de) : J != null && (J.current = de);
429
429
  }));
430
430
  };
431
- })(L, O)), [O, L]);
432
- return qe((() => (P(r.isEditable()), r.registerEditableListener(((D) => {
433
- P(D);
434
- })))), [r]), h("div", { "aria-activedescendant": _ ? e : void 0, "aria-autocomplete": _ ? t : "none", "aria-controls": _ ? o : void 0, "aria-describedby": a, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": _ && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": u, "aria-owns": _ ? d : void 0, "aria-readonly": !_ || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: _, "data-testid": N, id: w, ref: B, role: x, spellCheck: y, style: E, tabIndex: S, ...b });
431
+ })(L, Z)), [Z, L]);
432
+ return Ye((() => (T(r.isEditable()), r.registerEditableListener(((M) => {
433
+ T(M);
434
+ })))), [r]), h("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? o : void 0, "aria-describedby": a, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": S && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": u, "aria-owns": S ? d : void 0, "aria-readonly": !S || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: S, "data-testid": N, id: w, ref: Xe, role: x, spellCheck: y, style: E, tabIndex: _, ...b });
435
435
  }
436
- const zr = Fe(Or);
437
- function $e(r) {
438
- return r.getEditorState().read(Ye(r.isComposing()));
436
+ const Or = Ae(Kr);
437
+ function De(r) {
438
+ return r.getEditorState().read(We(r.isComposing()));
439
439
  }
440
- const Ar = Fe(Fr);
441
- function Fr(r, e) {
442
- const { placeholder: t, ...o } = r, [a] = M();
443
- return z(Ie, { children: [h(zr, { editor: a, ...o, ref: e }), t != null && h(Br, { editor: a, content: t })] });
440
+ const zr = Ae(Ar);
441
+ function Ar(r, e) {
442
+ const { placeholder: t, ...o } = r, [a] = I();
443
+ return O(Re, { children: [h(Or, { editor: a, ...o, ref: e }), t != null && h(Fr, { editor: a, content: t })] });
444
444
  }
445
- function Br({ content: r, editor: e }) {
445
+ function Fr({ content: r, editor: e }) {
446
446
  const t = (function(s) {
447
- const [i, l] = K((() => $e(s)));
448
- return qe((() => {
447
+ const [i, l] = K((() => De(s)));
448
+ return Ye((() => {
449
449
  function c() {
450
- const u = $e(s);
450
+ const u = De(s);
451
451
  l(u);
452
452
  }
453
- return c(), U(s.registerUpdateListener((() => {
453
+ return c(), F(s.registerUpdateListener((() => {
454
454
  c();
455
455
  })), s.registerEditableListener((() => {
456
456
  c();
457
457
  })));
458
458
  }), [s]), i;
459
459
  })(e), [o, a] = K(e.isEditable());
460
- if (W((() => (a(e.isEditable()), e.registerEditableListener(((s) => {
460
+ if (H((() => (a(e.isEditable()), e.registerEditableListener(((s) => {
461
461
  a(s);
462
462
  })))), [e]), !t) return null;
463
463
  let n = null;
464
464
  return typeof r == "function" ? n = r(o) : r !== null && (n = r), n === null ? null : h("div", { "aria-hidden": !0, children: n });
465
465
  }
466
- function le(r, e) {
467
- return le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
466
+ function se(r, e) {
467
+ return se = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
468
468
  return t.__proto__ = o, t;
469
- }, le(r, e);
469
+ }, se(r, e);
470
470
  }
471
- var Te = { error: null }, Ur = (function(r) {
471
+ var $e = { error: null }, Br = (function(r) {
472
472
  var e, t;
473
473
  function o() {
474
474
  for (var n, s = arguments.length, i = new Array(s), l = 0; l < s; l++) i[l] = arguments[l];
475
- return (n = r.call.apply(r, [this].concat(i)) || this).state = Te, n.resetErrorBoundary = function() {
475
+ return (n = r.call.apply(r, [this].concat(i)) || this).state = $e, n.resetErrorBoundary = function() {
476
476
  for (var c, u = arguments.length, d = new Array(u), f = 0; f < u; f++) d[f] = arguments[f];
477
477
  n.props.onReset == null || (c = n.props).onReset.apply(c, d), n.reset();
478
478
  }, n;
479
479
  }
480
- t = r, (e = o).prototype = Object.create(t.prototype), e.prototype.constructor = e, le(e, t), o.getDerivedStateFromError = function(n) {
480
+ t = r, (e = o).prototype = Object.create(t.prototype), e.prototype.constructor = e, se(e, t), o.getDerivedStateFromError = function(n) {
481
481
  return { error: n };
482
482
  };
483
483
  var a = o.prototype;
484
484
  return a.reset = function() {
485
- this.setState(Te);
485
+ this.setState($e);
486
486
  }, a.componentDidCatch = function(n, s) {
487
487
  var i, l;
488
488
  (i = (l = this.props).onError) == null || i.call(l, n, s);
@@ -495,70 +495,70 @@ var Te = { error: null }, Ur = (function(r) {
495
495
  var n = this.state.error, s = this.props, i = s.fallbackRender, l = s.FallbackComponent, c = s.fallback;
496
496
  if (n !== null) {
497
497
  var u = { error: n, resetErrorBoundary: this.resetErrorBoundary };
498
- if (ne.isValidElement(c)) return c;
498
+ if (te.isValidElement(c)) return c;
499
499
  if (typeof i == "function") return i(u);
500
- if (l) return ne.createElement(l, u);
500
+ if (l) return te.createElement(l, u);
501
501
  throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");
502
502
  }
503
503
  return this.props.children;
504
504
  }, o;
505
- })(ne.Component);
506
- function jr({ children: r, onError: e }) {
507
- return h(Ur, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
508
- }
509
- const Hr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? W : k;
510
- function Jr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
511
- const [o] = M();
512
- return Hr((() => {
505
+ })(te.Component);
506
+ function Ur({ children: r, onError: e }) {
507
+ return h(Br, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
508
+ }
509
+ const jr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : k;
510
+ function Hr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
511
+ const [o] = I();
512
+ return jr((() => {
513
513
  if (t) return o.registerUpdateListener((({ editorState: a, dirtyElements: n, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
514
- e && n.size === 0 && s.size === 0 || r && l.has(de) || i.isEmpty() || t(a, o, l);
514
+ e && n.size === 0 && s.size === 0 || r && l.has(ue) || i.isEmpty() || t(a, o, l);
515
515
  }));
516
516
  }), [o, r, e, t]), null;
517
517
  }
518
- function Wr({ hasStrictIndent: r = !1 }) {
519
- const [e] = M();
518
+ function Jr({ hasStrictIndent: r = !1 }) {
519
+ const [e] = I();
520
520
  return k((() => {
521
- if (!e.hasNodes([Be, Ue])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
521
+ if (!e.hasNodes([Fe, Be])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
522
522
  }), [e]), k((() => {
523
- if (r) return Gt(e);
523
+ if (r) return Vt(e);
524
524
  }), [e, r]), (function(t) {
525
- k((() => Qt(t)), [t]);
525
+ k((() => Gt(t)), [t]);
526
526
  })(e), null;
527
527
  }
528
- function Yr({ validateUrl: r, attributes: e }) {
529
- const [t] = M();
528
+ function Wr({ validateUrl: r, attributes: e }) {
529
+ const [t] = I();
530
530
  return k((() => {
531
- if (!t.hasNodes([je])) throw new Error("LinkPlugin: LinkNode not registered on editor");
532
- return U(t.registerCommand(Se, ((o) => {
533
- if (o === null) return oe(o), !0;
534
- if (typeof o == "string") return !(r !== void 0 && !r(o)) && (oe(o, e), !0);
531
+ if (!t.hasNodes([Ue])) throw new Error("LinkPlugin: LinkNode not registered on editor");
532
+ return F(t.registerCommand(be, ((o) => {
533
+ if (o === null) return re(o), !0;
534
+ if (typeof o == "string") return !(r !== void 0 && !r(o)) && (re(o, e), !0);
535
535
  {
536
536
  const { url: a, target: n, rel: s, title: i } = o;
537
- return oe(a, { ...e, rel: s, target: n, title: i }), !0;
537
+ return re(a, { ...e, rel: s, target: n, title: i }), !0;
538
538
  }
539
- }), ve), r !== void 0 ? t.registerCommand(Oe, ((o) => {
539
+ }), he), r !== void 0 ? t.registerCommand(Me, ((o) => {
540
540
  const a = p();
541
- if (!g(a) || a.isCollapsed() || !A(o, ClipboardEvent) || o.clipboardData === null) return !1;
541
+ if (!g(a) || a.isCollapsed() || !z(o, ClipboardEvent) || o.clipboardData === null) return !1;
542
542
  const n = o.clipboardData.getData("text");
543
- return !!r(n) && !a.getNodes().some(((s) => J(s))) && (t.dispatchCommand(Se, { ...e, url: n }), o.preventDefault(), !0);
544
- }), ve) : () => {
543
+ return !!r(n) && !a.getNodes().some(((s) => j(s))) && (t.dispatchCommand(be, { ...e, url: n }), o.preventDefault(), !0);
544
+ }), he) : () => {
545
545
  });
546
546
  }), [t, r, e]), null;
547
547
  }
548
- function qr({ newTab: r = !0, disabled: e = !1 }) {
549
- const [t] = M();
548
+ function Yr({ newTab: r = !0, disabled: e = !1 }) {
549
+ const [t] = I();
550
550
  return k((() => {
551
551
  const o = (n) => {
552
552
  const s = n.target;
553
- if (!ze(s)) return;
553
+ if (!Ke(s)) return;
554
554
  const i = Rt(s);
555
555
  if (i === null) return;
556
556
  let l = null, c = null;
557
557
  if (i.update((() => {
558
- const f = ee(s);
558
+ const f = G(s);
559
559
  if (f !== null) {
560
- const v = fe(f, J);
561
- if (!e) if (Vt(v)) l = v.sanitizeUrl(v.getURL()), c = v.getTarget();
560
+ const v = ce(f, j);
561
+ if (!e) if (Qt(v)) l = v.sanitizeUrl(v.getURL()), c = v.getTarget();
562
562
  else {
563
563
  const C = (function(w, x) {
564
564
  let y = w;
@@ -584,109 +584,109 @@ function qr({ newTab: r = !0, disabled: e = !1 }) {
584
584
  }));
585
585
  }), [t, r, e]), null;
586
586
  }
587
- const Z = 0, ue = 1, ce = 2, $ = 0, Xr = 1, Pe = 2, Gr = 3, Qr = 4;
588
- function Vr(r, e, t, o, a) {
589
- if (r === null || t.size === 0 && o.size === 0 && !a) return $;
587
+ const V = 0, ie = 1, le = 2, D = 0, qr = 1, Te = 2, Xr = 3, Vr = 4;
588
+ function Gr(r, e, t, o, a) {
589
+ if (r === null || t.size === 0 && o.size === 0 && !a) return D;
590
590
  const n = e._selection, s = r._selection;
591
- if (a) return Xr;
592
- if (!(g(n) && g(s) && s.isCollapsed() && n.isCollapsed())) return $;
593
- const i = (function(y, E, S) {
591
+ if (a) return qr;
592
+ if (!(g(n) && g(s) && s.isCollapsed() && n.isCollapsed())) return D;
593
+ const i = (function(y, E, _) {
594
594
  const N = y._nodeMap, b = [];
595
595
  for (const L of E) {
596
- const _ = N.get(L);
597
- _ !== void 0 && b.push(_);
596
+ const S = N.get(L);
597
+ S !== void 0 && b.push(S);
598
598
  }
599
- for (const [L, _] of S) {
600
- if (!_) continue;
601
- const P = N.get(L);
602
- P === void 0 || Ae(P) || b.push(P);
599
+ for (const [L, S] of _) {
600
+ if (!S) continue;
601
+ const T = N.get(L);
602
+ T === void 0 || Oe(T) || b.push(T);
603
603
  }
604
604
  return b;
605
605
  })(e, t, o);
606
- if (i.length === 0) return $;
606
+ if (i.length === 0) return D;
607
607
  if (i.length > 1) {
608
- const y = e._nodeMap, E = y.get(n.anchor.key), S = y.get(s.anchor.key);
609
- return E && S && !r._nodeMap.has(E.__key) && I(E) && E.__text.length === 1 && n.anchor.offset === 1 ? Pe : $;
608
+ const y = e._nodeMap, E = y.get(n.anchor.key), _ = y.get(s.anchor.key);
609
+ return E && _ && !r._nodeMap.has(E.__key) && R(E) && E.__text.length === 1 && n.anchor.offset === 1 ? Te : D;
610
610
  }
611
611
  const l = i[0], c = r._nodeMap.get(l.__key);
612
- if (!I(c) || !I(l) || c.__mode !== l.__mode) return $;
612
+ if (!R(c) || !R(l) || c.__mode !== l.__mode) return D;
613
613
  const u = c.__text, d = l.__text;
614
- if (u === d) return $;
614
+ if (u === d) return D;
615
615
  const f = n.anchor, v = s.anchor;
616
- if (f.key !== v.key || f.type !== "text") return $;
616
+ if (f.key !== v.key || f.type !== "text") return D;
617
617
  const C = f.offset, w = v.offset, x = d.length - u.length;
618
- return x === 1 && w === C - 1 ? Pe : x === -1 && w === C + 1 ? Gr : x === -1 && w === C ? Qr : $;
618
+ return x === 1 && w === C - 1 ? Te : x === -1 && w === C + 1 ? Xr : x === -1 && w === C ? Vr : D;
619
619
  }
620
- function Zr(r, e) {
621
- let t = Date.now(), o = $;
620
+ function Qr(r, e) {
621
+ let t = Date.now(), o = D;
622
622
  return (a, n, s, i, l, c) => {
623
623
  const u = Date.now();
624
- if (c.has(se)) return o = $, t = u, ce;
625
- const d = Vr(a, n, i, l, r.isComposing()), f = (() => {
624
+ if (c.has(oe)) return o = D, t = u, le;
625
+ const d = Gr(a, n, i, l, r.isComposing()), f = (() => {
626
626
  const v = s === null || s.editor === r, C = c.has(At);
627
- if (!C && v && c.has(de)) return Z;
628
- if (a === null) return ue;
627
+ if (!C && v && c.has(ue)) return V;
628
+ if (a === null) return ie;
629
629
  const w = n._selection;
630
- return i.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === o && u < t + e && v || i.size === 1 && (function(x, y, E) {
631
- const S = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, L = E._selection;
632
- return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !I(S) || !I(N) || S.__parent !== N.__parent) && JSON.stringify(y.read((() => S.exportJSON()))) === JSON.stringify(E.read((() => N.exportJSON())));
633
- })(Array.from(i)[0], a, n) ? Z : ue : w !== null ? Z : ce;
630
+ return i.size > 0 || l.size > 0 ? C === !1 && d !== D && d === o && u < t + e && v || i.size === 1 && (function(x, y, E) {
631
+ const _ = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, L = E._selection;
632
+ return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !R(_) || !R(N) || _.__parent !== N.__parent) && JSON.stringify(y.read((() => _.exportJSON()))) === JSON.stringify(E.read((() => N.exportJSON())));
633
+ })(Array.from(i)[0], a, n) ? V : ie : w !== null ? V : le;
634
634
  })();
635
635
  return t = u, o = d, f;
636
636
  };
637
637
  }
638
- function Re(r) {
638
+ function Pe(r) {
639
639
  r.undoStack = [], r.redoStack = [], r.current = null;
640
640
  }
641
- function en(r, e, t) {
642
- const o = Zr(r, t);
643
- return U(r.registerCommand(zt, (() => ((function(n, s) {
641
+ function Zr(r, e, t) {
642
+ const o = Qr(r, t);
643
+ return F(r.registerCommand(zt, (() => ((function(n, s) {
644
644
  const i = s.redoStack, l = s.undoStack;
645
645
  if (l.length !== 0) {
646
646
  const c = s.current, u = l.pop();
647
- c !== null && (i.push(c), n.dispatchCommand(X, !0)), l.length === 0 && n.dispatchCommand(G, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: se });
647
+ c !== null && (i.push(c), n.dispatchCommand(W, !0)), l.length === 0 && n.dispatchCommand(Y, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: oe });
648
648
  }
649
649
  })(r, e), !0)), m), r.registerCommand(Ot, (() => ((function(n, s) {
650
650
  const i = s.redoStack, l = s.undoStack;
651
651
  if (i.length !== 0) {
652
652
  const c = s.current;
653
- c !== null && (l.push(c), n.dispatchCommand(G, !0));
653
+ c !== null && (l.push(c), n.dispatchCommand(Y, !0));
654
654
  const u = i.pop();
655
- i.length === 0 && n.dispatchCommand(X, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: se });
655
+ i.length === 0 && n.dispatchCommand(W, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: oe });
656
656
  }
657
- })(r, e), !0)), m), r.registerCommand(Kt, (() => (Re(e), !1)), m), r.registerCommand(Mt, (() => (Re(e), r.dispatchCommand(X, !1), r.dispatchCommand(G, !1), !0)), m), r.registerUpdateListener((({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: c }) => {
657
+ })(r, e), !0)), m), r.registerCommand(Kt, (() => (Pe(e), !1)), m), r.registerCommand(Mt, (() => (Pe(e), r.dispatchCommand(W, !1), r.dispatchCommand(Y, !1), !0)), m), r.registerUpdateListener((({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: c }) => {
658
658
  const u = e.current, d = e.redoStack, f = e.undoStack, v = u === null ? null : u.editorState;
659
659
  if (u !== null && n === v) return;
660
660
  const C = o(s, n, u, i, l, c);
661
- if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(X, !1)), u !== null && (f.push({ ...u }), r.dispatchCommand(G, !0));
662
- else if (C === ce) return;
661
+ if (C === ie) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(W, !1)), u !== null && (f.push({ ...u }), r.dispatchCommand(Y, !0));
662
+ else if (C === le) return;
663
663
  e.current = { editor: r, editorState: n };
664
664
  })));
665
665
  }
666
- function tn() {
666
+ function en() {
667
667
  return { current: null, redoStack: [], undoStack: [] };
668
668
  }
669
- function rn({ delay: r, externalHistoryState: e }) {
670
- const [t] = M();
669
+ function tn({ delay: r, externalHistoryState: e }) {
670
+ const [t] = I();
671
671
  return (function(o, a, n = 1e3) {
672
- const s = te((() => a || tn()), [a]);
673
- k((() => en(o, s, n)), [n, o, s]);
672
+ const s = Q((() => a || en()), [a]);
673
+ k((() => Zr(o, s, n)), [n, o, s]);
674
674
  })(t, e, r), null;
675
675
  }
676
- function nn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
677
- const [a] = M();
676
+ function rn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
677
+ const [a] = I();
678
678
  return k((() => {
679
- er(a) !== o && (tr(a, o), a.registerNodeTransform(He, (() => {
679
+ er(a) !== o && (tr(a, o), a.registerNodeTransform(je, (() => {
680
680
  }))());
681
681
  }), [a, o]), k((() => rr(a)), [a]), k((() => nr(a, t)), [a, t]), k((() => {
682
682
  if (!r) return or(a);
683
683
  }), [a, r]), k((() => {
684
- if (!e) return a.registerNodeTransform(Je, ((n) => {
684
+ if (!e) return a.registerNodeTransform(He, ((n) => {
685
685
  n.getBackgroundColor() !== null && n.setBackgroundColor(null);
686
686
  }));
687
687
  }), [a, e, r]), null;
688
688
  }
689
- const Xe = 200, on = ({
689
+ const qe = 200, nn = ({
690
690
  currentLanguage: r = "NL",
691
691
  initialValue: e = "",
692
692
  placeholder: t = "",
@@ -695,67 +695,58 @@ const Xe = 200, on = ({
695
695
  required: n = !1,
696
696
  notValidatedText: s = "",
697
697
  maxHeightInRem: i = "20rem",
698
- maxWords: l = Xe,
698
+ maxWords: l = qe,
699
699
  onChange: c
700
700
  }) => {
701
- const { switchLanguage: u } = wr(), d = gr(), [f] = K(() => Me()), [v, C] = K(0), [w, x] = K(0), y = Ut(null), E = {
701
+ const { switchLanguage: u } = Er(), d = pr(), [f] = K(() => Ie()), [v, C] = K(0), [w, x] = K(0), y = Ut(null), E = {
702
702
  html: {
703
703
  export: cr
704
704
  },
705
705
  namespace: "UvaRte",
706
706
  editor: f,
707
- theme: Cr,
707
+ theme: vr,
708
708
  onError(b) {
709
709
  throw b;
710
710
  },
711
- nodes: [Be, Ue, je, Zt, Je, ar, He, br],
711
+ nodes: [Fe, Be, Ue, Zt, He, ar, je, wr],
712
712
  editorState: (b) => {
713
- const _ = new DOMParser().parseFromString(e, "text/html"), P = qt(b, _), O = F();
714
- if (O.clear(), dr(e))
715
- P.forEach((B) => {
716
- O.append(B);
717
- });
718
- else {
719
- const B = Ke();
720
- P.forEach((D, Y) => {
721
- Y === 0 ? (B.append(D), O.append(B)) : O.append(D);
722
- });
723
- }
713
+ const S = new DOMParser().parseFromString(e, "text/html"), T = qt(b, S);
714
+ A().clear(), console.log(T), ze(T);
724
715
  }
725
- }, S = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, L) => {
716
+ }, _ = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, L) => {
726
717
  b.read(() => {
727
- let _ = "";
728
- C(S(F().getTextContent().replace(/\s+/g, " ").trim())), _ = fr(Xt(L)), _ = mr(_), c(_);
718
+ let S = "";
719
+ C(_(A().getTextContent().replace(/\s+/g, " ").trim())), S = dr(Xt(L)), S = fr(S), c(S);
729
720
  });
730
721
  };
731
722
  return k(() => {
732
723
  u(r.toLocaleLowerCase());
733
724
  }, [r, u]), k(() => {
734
725
  const b = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
735
- C(S(b));
736
- }, []), /* @__PURE__ */ z("div", { className: R.editor__container, children: [
737
- /* @__PURE__ */ z("div", { className: R.editor__header, children: [
738
- /* @__PURE__ */ h(yr, { label: o, info: a, required: n }),
739
- /* @__PURE__ */ z("div", { className: R["editor__header-word-count"], children: [
740
- /* @__PURE__ */ h("span", { className: ur({ [R["editor__header-word-count--alert"]]: v > l }), children: v }),
726
+ C(_(b));
727
+ }, []), /* @__PURE__ */ O("div", { className: P.editor__container, children: [
728
+ /* @__PURE__ */ O("div", { className: P.editor__header, children: [
729
+ /* @__PURE__ */ h(Cr, { label: o, info: a, required: n }),
730
+ /* @__PURE__ */ O("div", { className: P["editor__header-word-count"], children: [
731
+ /* @__PURE__ */ h("span", { className: ur({ [P["editor__header-word-count--alert"]]: v > l }), children: v }),
741
732
  " / ",
742
733
  l
743
734
  ] })
744
735
  ] }),
745
- /* @__PURE__ */ h("div", { className: R.editor, children: /* @__PURE__ */ z(_r, { initialConfig: E, children: [
746
- /* @__PURE__ */ h(pr, { editorScrollPosition: w }),
747
- /* @__PURE__ */ z("div", { className: R["editor__field-wrapper"], children: [
736
+ /* @__PURE__ */ h("div", { className: P.editor, children: /* @__PURE__ */ O(_r, { initialConfig: E, children: [
737
+ /* @__PURE__ */ h(mr, { editorScrollPosition: w }),
738
+ /* @__PURE__ */ O("div", { className: P["editor__field-wrapper"], children: [
748
739
  /* @__PURE__ */ h(
749
- Mr,
740
+ Ir,
750
741
  {
751
742
  contentEditable: /* @__PURE__ */ h(
752
- Ar,
743
+ zr,
753
744
  {
754
- className: R.editor__field,
745
+ className: P.editor__field,
755
746
  "aria-label": d.common.rteAriaLabel,
756
747
  "aria-placeholder": t,
757
748
  title: d.common.rteTitle,
758
- placeholder: /* @__PURE__ */ h("div", { className: R.editor__placeholder, children: t }),
749
+ placeholder: /* @__PURE__ */ h("div", { className: P.editor__placeholder, children: t }),
759
750
  spellCheck: !1,
760
751
  id: "rteEditor",
761
752
  style: { height: `${i}`, maxHeight: `${i}` },
@@ -763,24 +754,24 @@ const Xe = 200, on = ({
763
754
  ref: y
764
755
  }
765
756
  ),
766
- placeholder: /* @__PURE__ */ h("div", { className: R.editor__placeholder, children: t }),
767
- ErrorBoundary: jr
757
+ placeholder: /* @__PURE__ */ h("div", { className: P.editor__placeholder, children: t }),
758
+ ErrorBoundary: Ur
768
759
  }
769
760
  ),
770
- /* @__PURE__ */ h(nn, {}),
771
- /* @__PURE__ */ h(Ht, {}),
772
761
  /* @__PURE__ */ h(rn, {}),
773
- /* @__PURE__ */ h(Wr, {}),
774
- /* @__PURE__ */ h(Yr, { validateUrl: sr }),
762
+ /* @__PURE__ */ h(Ht, {}),
763
+ /* @__PURE__ */ h(tn, {}),
764
+ /* @__PURE__ */ h(Jr, {}),
765
+ /* @__PURE__ */ h(Wr, { validateUrl: sr }),
775
766
  /* @__PURE__ */ h(ir, { matchers: lr }),
776
- /* @__PURE__ */ h(qr, {}),
777
- /* @__PURE__ */ h(Jr, { onChange: N }),
778
- /* @__PURE__ */ h(vr, {})
767
+ /* @__PURE__ */ h(Yr, {}),
768
+ /* @__PURE__ */ h(Hr, { onChange: N }),
769
+ /* @__PURE__ */ h(hr, {})
779
770
  ] })
780
771
  ] }) }),
781
- s !== "" && /* @__PURE__ */ h(hr, { level: "error", feedback: s })
772
+ s !== "" && /* @__PURE__ */ h(gr, { level: "error", feedback: s })
782
773
  ] });
783
- }, Vn = ({
774
+ }, Gn = ({
784
775
  currentLanguage: r = "NL",
785
776
  initialValue: e = "",
786
777
  placeholder: t = "",
@@ -788,10 +779,10 @@ const Xe = 200, on = ({
788
779
  info: a = "",
789
780
  required: n = !1,
790
781
  notValidatedText: s = "",
791
- maxWords: i = Xe,
782
+ maxWords: i = qe,
792
783
  onChange: l
793
- }) => /* @__PURE__ */ h(Er, { children: /* @__PURE__ */ h(
794
- on,
784
+ }) => /* @__PURE__ */ h(yr, { children: /* @__PURE__ */ h(
785
+ nn,
795
786
  {
796
787
  currentLanguage: r,
797
788
  initialValue: e,
@@ -805,7 +796,7 @@ const Xe = 200, on = ({
805
796
  }
806
797
  ) });
807
798
  export {
808
- on as Rte,
809
- Vn as RteEditor
799
+ nn as Rte,
800
+ Gn as RteEditor
810
801
  };
811
802
  //# sourceMappingURL=RteEditor.js.map