@uva-glass/component-library 3.5.0 → 3.6.1

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 (82) hide show
  1. package/dist/{Lexical.prod-CniF7zEE.js → Lexical.prod-CWyHQUEM.js} +738 -736
  2. package/dist/Lexical.prod-CWyHQUEM.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-BXVNkwwS.js → LexicalClipboard.prod-DbqSWANZ.js} +41 -41
  4. package/dist/{LexicalClipboard.prod-BXVNkwwS.js.map → LexicalClipboard.prod-DbqSWANZ.js.map} +1 -1
  5. package/dist/LexicalLink.prod-DbxnRszt.js +275 -0
  6. package/dist/LexicalLink.prod-DbxnRszt.js.map +1 -0
  7. package/dist/{LexicalList.prod-BUcoZhe4.js → LexicalList.prod-pZmYrwOC.js} +212 -172
  8. package/dist/LexicalList.prod-pZmYrwOC.js.map +1 -0
  9. package/dist/{LexicalSelection.prod-BfAlhGGm.js → LexicalSelection.prod-DkvWlcln.js} +14 -14
  10. package/dist/{LexicalSelection.prod-BfAlhGGm.js.map → LexicalSelection.prod-DkvWlcln.js.map} +1 -1
  11. package/dist/LexicalTable.prod-C6duSS2P.js +1720 -0
  12. package/dist/LexicalTable.prod-C6duSS2P.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-DVr8VsHc.js → LexicalUtils.prod-Dny9Fu94.js} +43 -43
  14. package/dist/{LexicalUtils.prod-DVr8VsHc.js.map → LexicalUtils.prod-Dny9Fu94.js.map} +1 -1
  15. package/dist/{TablePlugin-MjKuocl4.js → TablePlugin-Ba6PaBhf.js} +28 -28
  16. package/dist/{TablePlugin-MjKuocl4.js.map → TablePlugin-Ba6PaBhf.js.map} +1 -1
  17. package/dist/components/Accordion/Accordion.test.js +2 -2
  18. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  19. package/dist/components/ActionList/ActionList.test.js +2 -2
  20. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  21. package/dist/components/Attention/Attention.test.js +1 -1
  22. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  23. package/dist/components/Buttons/Button.test.js +1 -1
  24. package/dist/components/Buttons/LinkButton.test.js +1 -1
  25. package/dist/components/Buttons/MenuButton.test.js +1 -1
  26. package/dist/components/Card/Card.test.js +1 -1
  27. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  28. package/dist/components/CheckboxButton/CheckboxButton.test.js +1 -1
  29. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  30. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  31. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  32. package/dist/components/FormInput/FormInput.js +1 -1
  33. package/dist/components/Icon/icons/index.d.ts +12 -0
  34. package/dist/components/Icon/icons/index.js +163 -153
  35. package/dist/components/Icon/icons/index.js.map +1 -1
  36. package/dist/components/InputField/InputField.stories.js +1 -1
  37. package/dist/components/Label/Label.test.js +1 -1
  38. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  39. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  40. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  41. package/dist/components/MultiSelect/index.js +1 -1
  42. package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
  43. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  44. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  45. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  46. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  47. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  48. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  49. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  50. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  51. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +35 -35
  52. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  53. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  54. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
  55. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  56. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  57. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +11 -11
  58. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  59. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +7 -7
  60. package/dist/components/RteEditor/Plugins/index.js +1 -1
  61. package/dist/components/RteEditor/RteEditor.js +237 -235
  62. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  63. package/dist/components/RteEditor/helpers.js +4 -4
  64. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  65. package/dist/components/TextArea/TextArea.test.js +1 -1
  66. package/dist/components/Timeline/Timeline.test.js +2 -2
  67. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  68. package/dist/components/index.js +1 -1
  69. package/dist/{helpers-ChM6xtQG.js → helpers-BUwfVZhW.js} +15 -15
  70. package/dist/{helpers-ChM6xtQG.js.map → helpers-BUwfVZhW.js.map} +1 -1
  71. package/dist/{index-hwMTfLfH.js → index-Ck15_vKo.js} +2 -2
  72. package/dist/{index-hwMTfLfH.js.map → index-Ck15_vKo.js.map} +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/{react.esm-DI5ilWeT.js → react.esm-CMg7bmSn.js} +372 -366
  75. package/dist/{react.esm-DI5ilWeT.js.map → react.esm-CMg7bmSn.js.map} +1 -1
  76. package/package.json +28 -28
  77. package/dist/Lexical.prod-CniF7zEE.js.map +0 -1
  78. package/dist/LexicalLink.prod-Du8ZoNsh.js +0 -259
  79. package/dist/LexicalLink.prod-Du8ZoNsh.js.map +0 -1
  80. package/dist/LexicalList.prod-BUcoZhe4.js.map +0 -1
  81. package/dist/LexicalTable.prod-CYafu_j9.js +0 -1555
  82. package/dist/LexicalTable.prod-CYafu_j9.js.map +0 -1
@@ -1,22 +1,22 @@
1
- import { jsx as h, jsxs as F, Fragment as Pe } from "react/jsx-runtime";
2
- import { t as Je, r as Ve, o as T } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
- import { aF as Te, ae as z, w as Re, a as p, al as W, h as q, N as Xe, Y as M, c as g, T as Ye, E as m, aG as Ge, ad as Ie, o as Qe, j as Me, aH as Ze, K as et, aE as P, aB as tt, aI as nt, aJ as rt, aK as ot, s as ne, aL as it, aM as st, a0 as at, C as lt, u as ut, y as ct, aN as dt, aO as fe, b as me, I as ft, F as re, G as mt, a1 as Oe, aP as pe, x as pt, v as gt, p as ht, aQ as ge, q as Ct, aR as yt, aS as Et, aT as wt, aA as vt, R as bt, O as St, aU as _t, S as kt, D as xt, z as Nt, g as Lt, P as he, aV as Dt, n as $t, aq as Y, ap as G, aW as Pt, aX as Tt, as as Rt, ar as It } from "../../Lexical.prod-CniF7zEE.js";
4
- import * as oe from "react";
5
- import { useMemo as J, useLayoutEffect as j, useEffect as k, useState as O, useRef as Ke, Suspense as Mt, forwardRef as Fe, useCallback as Ot } from "react";
6
- import { j as U, L as A, y as Kt, w as de } from "../../LexicalUtils.prod-DVr8VsHc.js";
7
- import { flushSync as Ft, createPortal as At } from "react-dom";
8
- import { D as Ce, _ as ye, h as zt, m as Bt } from "../../LexicalClipboard.prod-BXVNkwwS.js";
9
- import { W as Ee, G as we } from "../../LexicalSelection.prod-BfAlhGGm.js";
10
- import { j as Ae, K as ze, i as jt } from "../../LexicalList.prod-BUcoZhe4.js";
11
- import { h as Be, O as ve, N as ie, d as Ut, p as Ht } from "../../LexicalLink.prod-Du8ZoNsh.js";
12
- import { Q as Wt, d as qt, h as Jt, u as Vt, y as je, O as Xt, Z as Yt } from "../../LexicalTable.prod-CYafu_j9.js";
13
- import { a as Gt, w as Qt, M as Zt } from "../../helpers-ChM6xtQG.js";
14
- import { c as en } from "../../clsx-OuTLNxxd.js";
15
- import { exportMap as tn, isStartingWithHtmlTag as nn, mergeBoldStrongTags as rn } from "./helpers.js";
1
+ import { jsx as h, jsxs as K, Fragment as Te } from "react/jsx-runtime";
2
+ import { t as qe, r as Ve, o as P } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
+ import { aF as Pe, af as z, T as Re, a as p, am as W, d as J, w as Ge, Y as M, c as g, S as Xe, N as m, aG as Ye, ae as Ie, o as Qe, r as Me, aH as Ze, O as et, u as T, aC as tt, aI as nt, aJ as rt, aK as ot, i as te, aL as it, aM as st, a1 as at, C as lt, g as ut, L as ct, aN as dt, aO as de, b as fe, K as ft, D as ne, I as mt, a2 as Oe, aP as me, y as pt, x as gt, t as ht, aQ as pe, v as Ct, aR as yt, aS as Et, aT as wt, aB as vt, Q as bt, P as St, aU as _t, R as kt, B as xt, A as Nt, j as Lt, E as ge, aV as Dt, e as $t, ar as X, aq as Y, aW as Tt, aX as Pt, at as Rt, as as It } from "../../Lexical.prod-CWyHQUEM.js";
4
+ import * as re from "react";
5
+ import { useMemo as q, useLayoutEffect as U, useEffect as _, useState as O, useRef as Fe, Suspense as Mt, forwardRef as Ke, useCallback as Ot } from "react";
6
+ import { j, L as A, y as Ft, w as ce } from "../../LexicalUtils.prod-Dny9Fu94.js";
7
+ import { flushSync as Kt, createPortal as At } from "react-dom";
8
+ import { D as he, _ as Ce, h as zt, m as Bt } from "../../LexicalClipboard.prod-DbqSWANZ.js";
9
+ import { W as ye, G as Ee } from "../../LexicalSelection.prod-DkvWlcln.js";
10
+ import { r as Ae, G as ze, v as Ut, T as jt } from "../../LexicalList.prod-pZmYrwOC.js";
11
+ import { g as Be, k as we, N as oe, p as Ht, m as Wt } from "../../LexicalLink.prod-DbxnRszt.js";
12
+ import { c as Jt, b as qt, w as Vt, S as Gt, y as Ue, O as Xt, a as Yt } from "../../LexicalTable.prod-C6duSS2P.js";
13
+ import { a as Qt, w as Zt, M as en } from "../../helpers-BUwfVZhW.js";
14
+ import { c as tn } from "../../clsx-OuTLNxxd.js";
15
+ import { exportMap as nn, isStartingWithHtmlTag as rn, mergeBoldStrongTags as on } from "./helpers.js";
16
16
  import { s as I } from "../../RteEditor.module-oFMKEW6f.js";
17
- import { ToolBarPlugin as on } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
- import { useTranslation as sn } from "./hooks/useTranslation.js";
19
- import "../../TablePlugin-MjKuocl4.js";
17
+ import { ToolBarPlugin as sn } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
+ import { useTranslation as an } from "./hooks/useTranslation.js";
19
+ import "../../TablePlugin-Ba6PaBhf.js";
20
20
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
21
  import "./hooks/components/Flyout.js";
22
22
  import "../Buttons/Button.js";
@@ -27,7 +27,7 @@ import "@react-aria/dialog";
27
27
  import "@react-aria/focus";
28
28
  import "@react-aria/overlays";
29
29
  import "../OverlayCloseButton/OverlayCloseButton.js";
30
- import { FeedbackBox as an } from "../FeedbackBox/FeedbackBox.js";
30
+ import { FeedbackBox as ln } from "../FeedbackBox/FeedbackBox.js";
31
31
  import "../GridRow/GridRow.js";
32
32
  import "../IconButton/IconButton.js";
33
33
  import "../Input/Input.js";
@@ -37,14 +37,14 @@ import "../SelectListbox/SelectListbox.js";
37
37
  import "../SelectListbox/SelectProvider.js";
38
38
  import "../Sortable/components/SortableItem.js";
39
39
  import "../../SortableProvider-Ck_XnBVq.js";
40
- import { UvaTheme as ln } from "./UvaTheme/UvaTheme.js";
41
- import { EditorHeader as un } from "./EditorHeader/EditorHeader.js";
42
- import { LanguageProvider as cn, useLanguage as dn } from "./Providers/LanguageProvider.js";
43
- import { PasteHandlerPlugin as fn } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
- const Ue = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, mn = Ue ? j : k, Q = { tag: "history-merge" };
45
- function pn({ initialConfig: n, children: e }) {
46
- const t = J(() => {
47
- const { theme: o, namespace: i, nodes: r, onError: s, editorState: a, html: l } = n, u = Je(null, o), c = Te({ editable: n.editable, html: l, namespace: i, nodes: r, onError: (d) => s(d, c), theme: o });
40
+ import { UvaTheme as un } from "./UvaTheme/UvaTheme.js";
41
+ import { EditorHeader as cn } from "./EditorHeader/EditorHeader.js";
42
+ import { LanguageProvider as dn, useLanguage as fn } from "./Providers/LanguageProvider.js";
43
+ import { PasteHandlerPlugin as mn } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
+ const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, pn = je ? U : _, Q = { tag: "history-merge" };
45
+ function gn({ initialConfig: n, children: e }) {
46
+ const t = q(() => {
47
+ const { theme: o, namespace: i, nodes: r, onError: s, editorState: a, html: l } = n, u = qe(null, o), c = Pe({ editable: n.editable, html: l, namespace: i, nodes: r, 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(() => {
@@ -52,7 +52,7 @@ function pn({ initialConfig: n, children: e }) {
52
52
  if (C.isEmpty()) {
53
53
  const y = Re();
54
54
  C.append(y);
55
- const v = Ue ? document.activeElement : null;
55
+ const v = je ? document.activeElement : null;
56
56
  (p() !== null || v !== null && v === d.getRootElement()) && y.select();
57
57
  }
58
58
  }, Q);
@@ -73,43 +73,43 @@ function pn({ initialConfig: n, children: e }) {
73
73
  }
74
74
  }(c, a), [c, u];
75
75
  }, []);
76
- return mn(() => {
76
+ return pn(() => {
77
77
  const o = n.editable, [i] = t;
78
78
  i.setEditable(o === void 0 || o);
79
79
  }, []), h(Ve.Provider, { value: t, children: e });
80
80
  }
81
- const gn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : k;
82
- function hn(n) {
81
+ const hn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
82
+ function Cn(n) {
83
83
  return { initialValueFn: () => n.isEditable(), subscribe: (e) => n.registerEditableListener(e) };
84
84
  }
85
- function Cn() {
85
+ function yn() {
86
86
  return function(n) {
87
- const [e] = T(), t = J(() => n(e), [e, n]), [o, i] = O(() => t.initialValueFn()), r = Ke(o);
88
- return gn(() => {
87
+ const [e] = P(), t = q(() => n(e), [e, n]), [o, i] = O(() => t.initialValueFn()), r = Fe(o);
88
+ return hn(() => {
89
89
  const { initialValueFn: s, subscribe: a } = t, l = s();
90
90
  return r.current !== l && (r.current = l, i(l)), a((u) => {
91
91
  r.current = u, i(u);
92
92
  });
93
93
  }, [t, n]), o;
94
- }(hn);
94
+ }(Cn);
95
95
  }
96
- function yn() {
96
+ function En() {
97
97
  return z().getTextContent();
98
98
  }
99
- function En(n, e = !0) {
99
+ function wn(n, e = !0) {
100
100
  if (n) return !1;
101
- let t = yn();
101
+ let t = En();
102
102
  return e && (t = t.trim()), t === "";
103
103
  }
104
- function wn(n) {
105
- if (!En(n, !1)) return !1;
104
+ function vn(n) {
105
+ if (!wn(n, !1)) return !1;
106
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 i = e[o];
110
110
  if (W(i)) return !1;
111
- if (q(i)) {
112
- if (!Xe(i) || i.__indent !== 0) return !1;
111
+ if (J(i)) {
112
+ if (!Ge(i) || i.__indent !== 0) return !1;
113
113
  const r = i.getChildren(), s = r.length;
114
114
  for (let a = 0; a < s; a++) {
115
115
  const l = r[o];
@@ -120,9 +120,9 @@ function wn(n) {
120
120
  return !0;
121
121
  }
122
122
  function He(n) {
123
- return () => wn(n);
123
+ return () => vn(n);
124
124
  }
125
- function vn(n) {
125
+ function bn(n) {
126
126
  const e = window.location.origin, t = (o) => {
127
127
  if (o.origin !== e) return;
128
128
  const i = n.getRootElement();
@@ -163,7 +163,7 @@ function vn(n) {
163
163
  window.removeEventListener("message", t, !0);
164
164
  };
165
165
  }
166
- function be(n, e) {
166
+ function ve(n, e) {
167
167
  if (document.caretRangeFromPoint !== void 0) {
168
168
  const t = document.caretRangeFromPoint(n, e);
169
169
  return t === null ? null : { node: t.startContainer, offset: t.startOffset };
@@ -174,41 +174,41 @@ function be(n, e) {
174
174
  }
175
175
  return null;
176
176
  }
177
- const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, bn = H && "documentMode" in document ? document.documentMode : null, Sn = !(!H || !("InputEvent" in window) || bn) && "getTargetRanges" in new window.InputEvent("input"), _n = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Se = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, kn = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), xn = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !kn, _e = Qe();
177
+ const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Sn = H && "documentMode" in document ? document.documentMode : null, _n = !(!H || !("InputEvent" in window) || Sn) && "getTargetRanges" in new window.InputEvent("input"), kn = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), be = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, xn = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), Nn = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !xn, Se = Qe();
178
178
  function Z(n) {
179
179
  let e = null;
180
180
  if (A(n, DragEvent) ? e = n.dataTransfer : A(n, ClipboardEvent) && (e = n.clipboardData), e === null) return [!1, [], !1];
181
181
  const t = e.types, o = t.includes("Files"), i = t.includes("text/html") || t.includes("text/plain");
182
182
  return [o, Array.from(e.files), i];
183
183
  }
184
- function ke(n) {
184
+ function _e(n) {
185
185
  const e = p();
186
186
  if (!g(e)) return !1;
187
187
  const t = /* @__PURE__ */ new Set(), o = e.getNodes();
188
188
  for (let i = 0; i < o.length; i++) {
189
189
  const r = o[i], s = r.getKey();
190
190
  if (t.has(s)) continue;
191
- const a = de(r, (u) => q(u) && !u.isInline());
191
+ const a = ce(r, (u) => J(u) && !u.isInline());
192
192
  if (a === null) continue;
193
193
  const l = a.getKey();
194
194
  a.canIndent() && !t.has(l) && (t.add(l), n(a));
195
195
  }
196
196
  return t.size > 0;
197
197
  }
198
- function ee(n) {
199
- const e = ne(n);
198
+ function ke(n) {
199
+ const e = te(n);
200
200
  return W(e);
201
201
  }
202
- function se(n) {
202
+ function ie(n) {
203
203
  for (const e of ["lowercase", "uppercase", "capitalize"]) n.hasFormat(e) && n.toggleFormat(e);
204
204
  }
205
- function Nn(n) {
206
- return U(n.registerCommand(Lt, (e) => {
205
+ function Ln(n) {
206
+ return j(n.registerCommand(Lt, (e) => {
207
207
  const t = p();
208
- return !!P(t) && (t.clear(), !0);
209
- }, 0), n.registerCommand(re, (e) => {
208
+ return !!T(t) && (t.clear(), !0);
209
+ }, 0), n.registerCommand(ne, (e) => {
210
210
  const t = p();
211
- return g(t) ? (t.deleteCharacter(e), !0) : !!P(t) && (t.deleteNodes(), !0);
211
+ return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
212
212
  }, m), n.registerCommand(Nt, (e) => {
213
213
  const t = p();
214
214
  return !!g(t) && (t.deleteWord(e), !0);
@@ -221,7 +221,7 @@ function Nn(n) {
221
221
  else {
222
222
  if (t === null) return !1;
223
223
  const o = e.dataTransfer;
224
- if (o != null) Ce(o, t, n);
224
+ if (o != null) he(o, t, n);
225
225
  else if (g(t)) {
226
226
  const i = e.data;
227
227
  return i && t.insertText(i), !0;
@@ -236,38 +236,38 @@ function Nn(n) {
236
236
  return !!g(t) && (t.formatText(e), !0);
237
237
  }, m), n.registerCommand(bt, (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 i of o) {
242
- const r = de(i, (s) => q(s) && !s.isInline());
242
+ const r = ce(i, (s) => J(s) && !s.isInline());
243
243
  r !== null && r.setFormat(e);
244
244
  }
245
245
  return !0;
246
- }, m), n.registerCommand(fe, (e) => {
246
+ }, m), n.registerCommand(de, (e) => {
247
247
  const t = p();
248
248
  return !!g(t) && (t.insertLineBreak(e), !0);
249
- }, m), n.registerCommand(me, () => {
249
+ }, m), n.registerCommand(fe, () => {
250
250
  const e = p();
251
251
  return !!g(e) && (e.insertParagraph(), !0);
252
- }, m), n.registerCommand(Et, () => (wt([vt()]), !0), m), n.registerCommand(yt, () => ke((e) => {
252
+ }, m), n.registerCommand(Et, () => (wt([vt()]), !0), m), n.registerCommand(yt, () => _e((e) => {
253
253
  const t = e.getIndent();
254
254
  e.setIndent(t + 1);
255
- }), m), n.registerCommand(pe, () => ke((e) => {
255
+ }), m), n.registerCommand(me, () => _e((e) => {
256
256
  const t = e.getIndent();
257
- t > 0 && e.setIndent(t - 1);
257
+ t > 0 && e.setIndent(Math.max(0, t - 1));
258
258
  }), m), n.registerCommand(Ct, (e) => {
259
259
  const t = p();
260
- if (P(t) && !ee(e.target)) {
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)) {
264
- const o = ge(t.focus, !0);
264
+ const o = pe(t.focus, !0);
265
265
  if (!e.shiftKey && W(o) && !o.isIsolated() && !o.isInline()) return o.selectPrevious(), e.preventDefault(), !0;
266
266
  }
267
267
  return !1;
268
268
  }, m), n.registerCommand(ht, (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)) {
@@ -275,62 +275,62 @@ function Nn(n) {
275
275
  const r = i.focus;
276
276
  return r.key === "root" && r.offset === z().getChildrenSize();
277
277
  }(t)) return e.preventDefault(), !0;
278
- const o = ge(t.focus, !1);
278
+ const o = pe(t.focus, !1);
279
279
  if (!e.shiftKey && W(o) && !o.isIsolated() && !o.isInline()) return o.selectNext(), e.preventDefault(), !0;
280
280
  }
281
281
  return !1;
282
282
  }, m), n.registerCommand(gt, (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
  }
288
288
  if (!g(t)) return !1;
289
- if (Ee(t, !0)) {
289
+ if (ye(t, !0)) {
290
290
  const o = e.shiftKey;
291
- return e.preventDefault(), we(t, o, !0), !0;
291
+ return e.preventDefault(), Ee(t, o, !0), !0;
292
292
  }
293
293
  return !1;
294
294
  }, m), n.registerCommand(pt, (e) => {
295
295
  const t = p();
296
- if (P(t) && !ee(e.target)) {
296
+ if (T(t)) {
297
297
  const i = t.getNodes();
298
298
  if (i.length > 0) return e.preventDefault(), i[0].selectNext(0, 0), !0;
299
299
  }
300
300
  if (!g(t)) return !1;
301
301
  const o = e.shiftKey;
302
- return !!Ee(t, !1) && (e.preventDefault(), we(t, o, !1), !0);
302
+ return !!ye(t, !1) && (e.preventDefault(), Ee(t, o, !1), !0);
303
303
  }, m), n.registerCommand(mt, (e) => {
304
- if (ee(e.target)) return !1;
304
+ if (ke(e.target)) return !1;
305
305
  const t = p();
306
306
  if (g(t)) {
307
307
  const { anchor: o } = t, i = o.getNode();
308
- if (t.isCollapsed() && o.offset === 0 && !Oe(i) && Kt(i).getIndent() > 0)
309
- return e.preventDefault(), n.dispatchCommand(pe, void 0);
310
- if (Se && navigator.language === "ko-KR") return !1;
311
- } else if (!P(t)) return !1;
312
- return e.preventDefault(), n.dispatchCommand(re, !0);
308
+ if (t.isCollapsed() && o.offset === 0 && !Oe(i) && Ft(i).getIndent() > 0)
309
+ return e.preventDefault(), n.dispatchCommand(me, void 0);
310
+ if (be && navigator.language === "ko-KR") return !1;
311
+ } else if (!T(t)) return !1;
312
+ return e.preventDefault(), n.dispatchCommand(ne, !0);
313
313
  }, m), n.registerCommand(ft, (e) => {
314
- if (ee(e.target)) return !1;
314
+ if (ke(e.target)) return !1;
315
315
  const t = p();
316
- return !(!g(t) && !P(t)) && (e.preventDefault(), n.dispatchCommand(re, !1));
316
+ return !(!g(t) && !T(t)) && (e.preventDefault(), n.dispatchCommand(ne, !1));
317
317
  }, m), n.registerCommand(dt, (e) => {
318
318
  const t = p();
319
319
  if (!g(t)) return !1;
320
- if (se(t), e !== null) {
321
- if ((Se || _n || xn) && Sn) return !1;
322
- if (e.preventDefault(), e.shiftKey) return n.dispatchCommand(fe, !1);
320
+ if (ie(t), e !== null) {
321
+ if ((be || kn || Nn) && _n) return !1;
322
+ if (e.preventDefault(), e.shiftKey) return n.dispatchCommand(de, !1);
323
323
  }
324
- return n.dispatchCommand(me, void 0);
324
+ return n.dispatchCommand(fe, void 0);
325
325
  }, m), n.registerCommand(ct, () => {
326
326
  const e = p();
327
327
  return !!g(e) && (n.blur(), !0);
328
328
  }, m), n.registerCommand(st, (e) => {
329
329
  const [, t] = Z(e);
330
330
  if (t.length > 0) {
331
- const i = be(e.clientX, e.clientY);
331
+ const i = ve(e.clientX, e.clientY);
332
332
  if (i !== null) {
333
- const { offset: r, node: s } = i, a = ne(s);
333
+ const { offset: r, node: s } = i, a = te(s);
334
334
  if (a !== null) {
335
335
  const l = at();
336
336
  if (M(a)) l.anchor.set(a.getKey(), r, "text"), l.focus.set(a.getKey(), r, "text");
@@ -341,7 +341,7 @@ function Nn(n) {
341
341
  const u = lt(l);
342
342
  ut(u);
343
343
  }
344
- n.dispatchCommand(_e, t);
344
+ n.dispatchCommand(Se, t);
345
345
  }
346
346
  return e.preventDefault(), !0;
347
347
  }
@@ -353,47 +353,47 @@ function Nn(n) {
353
353
  }, m), n.registerCommand(ot, (e) => {
354
354
  const [t] = Z(e), o = p();
355
355
  if (t && !g(o)) return !1;
356
- const i = be(e.clientX, e.clientY);
356
+ const i = ve(e.clientX, e.clientY);
357
357
  if (i !== null) {
358
- const r = ne(i.node);
358
+ const r = te(i.node);
359
359
  W(r) && e.preventDefault();
360
360
  }
361
361
  return !0;
362
- }, m), n.registerCommand(nt, () => (rt(), !0), m), n.registerCommand(tt, (e) => (ye(n, A(e, ClipboardEvent) ? e : null), !0), m), n.registerCommand(et, (e) => (async function(t, o) {
363
- await ye(o, A(t, ClipboardEvent) ? t : null), o.update(() => {
362
+ }, m), n.registerCommand(nt, () => (rt(), !0), m), n.registerCommand(tt, (e) => (Ce(n, A(e, ClipboardEvent) ? e : null), !0), m), n.registerCommand(et, (e) => (async function(t, o) {
363
+ await Ce(o, A(t, ClipboardEvent) ? t : null), o.update(() => {
364
364
  const i = p();
365
- g(i) ? i.removeText() : P(i) && i.getNodes().forEach((r) => r.remove());
365
+ g(i) ? i.removeText() : T(i) && i.getNodes().forEach((r) => r.remove());
366
366
  });
367
367
  }(e, n), !0), m), n.registerCommand(Ie, (e) => {
368
368
  const [, t, o] = Z(e);
369
- return t.length > 0 && !o ? (n.dispatchCommand(_e, t), !0) : Me(e.target) && Ze(e.target) ? !1 : p() !== null && (function(i, r) {
369
+ return t.length > 0 && !o ? (n.dispatchCommand(Se, t), !0) : Me(e.target) && Ze(e.target) ? !1 : p() !== null && (function(i, r) {
370
370
  i.preventDefault(), r.update(() => {
371
371
  const s = p(), a = A(i, InputEvent) || A(i, KeyboardEvent) ? null : i.clipboardData;
372
- a != null && s !== null && Ce(a, s, r);
372
+ a != null && s !== null && he(a, s, r);
373
373
  }, { tag: "paste" });
374
374
  }(e, n), !0);
375
- }, m), n.registerCommand(Ge, (e) => {
376
- const t = p();
377
- return g(t) && se(t), !1;
378
375
  }, m), n.registerCommand(Ye, (e) => {
379
376
  const t = p();
380
- return g(t) && se(t), !1;
377
+ return g(t) && ie(t), !1;
378
+ }, m), n.registerCommand(Xe, (e) => {
379
+ const t = p();
380
+ return g(t) && ie(t), !1;
381
381
  }, m));
382
382
  }
383
- const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : k;
383
+ const se = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
384
384
  function xe(n) {
385
385
  return n.getEditorState().read(He(n.isComposing()));
386
386
  }
387
- function Ln({ contentEditable: n, placeholder: e = null, ErrorBoundary: t }) {
388
- const [o] = T(), i = function(r, s) {
387
+ function Dn({ contentEditable: n, placeholder: e = null, ErrorBoundary: t }) {
388
+ const [o] = P(), i = function(r, s) {
389
389
  const [a, l] = O(() => r.getDecorators());
390
- return ae(() => r.registerDecoratorListener((u) => {
391
- Ft(() => {
390
+ return se(() => r.registerDecoratorListener((u) => {
391
+ Kt(() => {
392
392
  l(u);
393
393
  });
394
- }), [r]), k(() => {
394
+ }), [r]), _(() => {
395
395
  l(r.getDecorators());
396
- }, [r]), J(() => {
396
+ }, [r]), q(() => {
397
397
  const u = [], c = Object.keys(a);
398
398
  for (let d = 0; d < c.length; d++) {
399
399
  const f = c[d], C = h(s, { onError: (v) => r._onError(v), children: h(Mt, { fallback: null, children: a[f] }) }), y = r.getElementByKey(f);
@@ -403,51 +403,51 @@ function Ln({ contentEditable: n, placeholder: e = null, ErrorBoundary: t }) {
403
403
  }, [s, a, r]);
404
404
  }(o, t);
405
405
  return function(r) {
406
- ae(() => U(Nn(r), vn(r)), [r]);
407
- }(o), F(Pe, { children: [n, h(Dn, { content: e }), i] });
406
+ se(() => j(Ln(r), bn(r)), [r]);
407
+ }(o), K(Te, { children: [n, h($n, { content: e }), i] });
408
408
  }
409
- function Dn({ content: n }) {
410
- const [e] = T(), t = function(i) {
409
+ function $n({ content: n }) {
410
+ const [e] = P(), t = function(i) {
411
411
  const [r, s] = O(() => xe(i));
412
- return ae(() => {
412
+ return se(() => {
413
413
  function a() {
414
414
  const l = xe(i);
415
415
  s(l);
416
416
  }
417
- return a(), U(i.registerUpdateListener(() => {
417
+ return a(), j(i.registerUpdateListener(() => {
418
418
  a();
419
419
  }), i.registerEditableListener(() => {
420
420
  a();
421
421
  }));
422
422
  }, [i]), r;
423
- }(e), o = Cn();
423
+ }(e), o = yn();
424
424
  return t ? typeof n == "function" ? n(o) : n : null;
425
425
  }
426
- const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : k;
427
- function $n({ editor: n, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: i, ariaErrorMessage: r, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: C, className: y, id: v, role: x = "textbox", spellCheck: E = !0, style: w, tabIndex: S, "data-testid": N, ...b }, L) {
428
- const [_, R] = O(n.isEditable()), K = Ot((D) => {
426
+ const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
427
+ function Tn({ editor: n, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: i, ariaErrorMessage: r, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: C, className: y, id: v, role: x = "textbox", spellCheck: E = !0, style: w, tabIndex: S, "data-testid": N, ...b }, L) {
428
+ const [k, R] = O(n.isEditable()), F = Ot((D) => {
429
429
  D && D.ownerDocument && D.ownerDocument.defaultView ? n.setRootElement(D) : n.setRootElement(null);
430
- }, [n]), B = J(() => /* @__PURE__ */ function(...D) {
430
+ }, [n]), B = q(() => /* @__PURE__ */ function(...D) {
431
431
  return (V) => {
432
- D.forEach((X) => {
433
- typeof X == "function" ? X(V) : X != null && (X.current = V);
432
+ D.forEach((G) => {
433
+ typeof G == "function" ? G(V) : G != null && (G.current = V);
434
434
  });
435
435
  };
436
- }(L, K), [K, L]);
436
+ }(L, F), [F, L]);
437
437
  return We(() => (R(n.isEditable()), n.registerEditableListener((D) => {
438
438
  R(D);
439
- })), [n]), h("div", { "aria-activedescendant": _ ? e : void 0, "aria-autocomplete": _ ? t : "none", "aria-controls": _ ? o : void 0, "aria-describedby": i, ...r != null ? { "aria-errormessage": r } : {}, "aria-expanded": _ && x === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": _ ? d : void 0, "aria-readonly": !_ || void 0, "aria-required": f, autoCapitalize: C, className: y, contentEditable: _, "data-testid": N, id: v, ref: B, role: _ ? x : void 0, spellCheck: E, style: w, tabIndex: S, ...b });
439
+ })), [n]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ? o : void 0, "aria-describedby": i, ...r != null ? { "aria-errormessage": r } : {}, "aria-expanded": k && x === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": k ? d : void 0, "aria-readonly": !k || void 0, "aria-required": f, autoCapitalize: C, className: y, contentEditable: k, "data-testid": N, id: v, ref: B, role: k ? x : void 0, spellCheck: E, style: w, tabIndex: S, ...b });
440
440
  }
441
- const Pn = Fe($n);
441
+ const Pn = Ke(Tn);
442
442
  function Ne(n) {
443
443
  return n.getEditorState().read(He(n.isComposing()));
444
444
  }
445
- const Tn = Fe(Rn);
446
- function Rn(n, e) {
447
- const { placeholder: t, ...o } = n, [i] = T();
448
- return F(Pe, { children: [h(Pn, { editor: i, ...o, ref: e }), t != null && h(In, { editor: i, content: t })] });
445
+ const Rn = Ke(In);
446
+ function In(n, e) {
447
+ const { placeholder: t, ...o } = n, [i] = P();
448
+ return K(Te, { children: [h(Pn, { editor: i, ...o, ref: e }), t != null && h(Mn, { editor: i, content: t })] });
449
449
  }
450
- function In({ content: n, editor: e }) {
450
+ function Mn({ content: n, editor: e }) {
451
451
  const t = function(s) {
452
452
  const [a, l] = O(() => Ne(s));
453
453
  return We(() => {
@@ -455,25 +455,25 @@ function In({ content: n, editor: e }) {
455
455
  const c = Ne(s);
456
456
  l(c);
457
457
  }
458
- return u(), U(s.registerUpdateListener(() => {
458
+ return u(), j(s.registerUpdateListener(() => {
459
459
  u();
460
460
  }), s.registerEditableListener(() => {
461
461
  u();
462
462
  }));
463
463
  }, [s]), a;
464
464
  }(e), [o, i] = O(e.isEditable());
465
- if (j(() => (i(e.isEditable()), e.registerEditableListener((s) => {
465
+ if (U(() => (i(e.isEditable()), e.registerEditableListener((s) => {
466
466
  i(s);
467
467
  })), [e]), !t) return null;
468
468
  let r = null;
469
469
  return typeof n == "function" ? r = n(o) : n !== null && (r = n), r === null ? null : h("div", { "aria-hidden": !0, children: r });
470
470
  }
471
- function le(n, e) {
472
- return le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
471
+ function ae(n, e) {
472
+ return ae = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
473
473
  return t.__proto__ = o, t;
474
- }, le(n, e);
474
+ }, ae(n, e);
475
475
  }
476
- var Le = { error: null }, Mn = function(n) {
476
+ var Le = { error: null }, On = function(n) {
477
477
  var e, t;
478
478
  function o() {
479
479
  for (var r, s = arguments.length, a = new Array(s), l = 0; l < s; l++) a[l] = arguments[l];
@@ -482,7 +482,7 @@ var Le = { error: null }, Mn = function(n) {
482
482
  r.props.onReset == null || (u = r.props).onReset.apply(u, d), r.reset();
483
483
  }, r;
484
484
  }
485
- t = n, (e = o).prototype = Object.create(t.prototype), e.prototype.constructor = e, le(e, t), o.getDerivedStateFromError = function(r) {
485
+ t = n, (e = o).prototype = Object.create(t.prototype), e.prototype.constructor = e, ae(e, t), o.getDerivedStateFromError = function(r) {
486
486
  return { error: r };
487
487
  };
488
488
  var i = o.prototype;
@@ -500,57 +500,59 @@ var Le = { error: null }, Mn = function(n) {
500
500
  var r = this.state.error, s = this.props, a = s.fallbackRender, l = s.FallbackComponent, u = s.fallback;
501
501
  if (r !== null) {
502
502
  var c = { error: r, resetErrorBoundary: this.resetErrorBoundary };
503
- if (oe.isValidElement(u)) return u;
503
+ if (re.isValidElement(u)) return u;
504
504
  if (typeof a == "function") return a(c);
505
- if (l) return oe.createElement(l, c);
505
+ if (l) return re.createElement(l, c);
506
506
  throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");
507
507
  }
508
508
  return this.props.children;
509
509
  }, o;
510
- }(oe.Component);
511
- function On({ children: n, onError: e }) {
512
- return h(Mn, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: n });
510
+ }(re.Component);
511
+ function Fn({ children: n, onError: e }) {
512
+ return h(On, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: n });
513
513
  }
514
- const Kn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : k;
515
- function Fn({ ignoreHistoryMergeTagChange: n = !0, ignoreSelectionChange: e = !1, onChange: t }) {
516
- const [o] = T();
514
+ const Kn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
515
+ function An({ ignoreHistoryMergeTagChange: n = !0, ignoreSelectionChange: e = !1, onChange: t }) {
516
+ const [o] = P();
517
517
  return Kn(() => {
518
518
  if (t) return o.registerUpdateListener(({ editorState: i, dirtyElements: r, dirtyLeaves: s, prevEditorState: a, tags: l }) => {
519
519
  e && r.size === 0 && s.size === 0 || n && l.has("history-merge") || a.isEmpty() || t(i, o, l);
520
520
  });
521
521
  }, [o, n, e, t]), null;
522
522
  }
523
- function An() {
524
- const [n] = T();
525
- return k(() => {
526
- if (!n.hasNodes([Ae, ze])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
527
- }, [n]), function(e) {
528
- k(() => jt(e), [e]);
529
- }(n), null;
530
- }
531
- function zn({ validateUrl: n, attributes: e }) {
532
- const [t] = T();
533
- return k(() => {
523
+ function zn({ hasStrictIndent: n = !1 }) {
524
+ const [e] = P();
525
+ return _(() => {
526
+ if (!e.hasNodes([Ae, ze])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
527
+ }, [e]), _(() => {
528
+ if (n) return Ut(e);
529
+ }, [e, n]), function(t) {
530
+ _(() => jt(t), [t]);
531
+ }(e), null;
532
+ }
533
+ function Bn({ validateUrl: n, attributes: e }) {
534
+ const [t] = P();
535
+ return _(() => {
534
536
  if (!t.hasNodes([Be])) throw new Error("LinkPlugin: LinkNode not registered on editor");
535
- return U(t.registerCommand(ve, (o) => {
536
- if (o === null) return ie(o), !0;
537
- if (typeof o == "string") return !(n !== void 0 && !n(o)) && (ie(o, e), !0);
537
+ return j(t.registerCommand(we, (o) => {
538
+ if (o === null) return oe(o), !0;
539
+ if (typeof o == "string") return !(n !== void 0 && !n(o)) && (oe(o, e), !0);
538
540
  {
539
541
  const { url: i, target: r, rel: s, title: a } = o;
540
- return ie(i, { ...e, rel: s, target: r, title: a }), !0;
542
+ return oe(i, { ...e, rel: s, target: r, title: a }), !0;
541
543
  }
542
- }, he), n !== void 0 ? t.registerCommand(Ie, (o) => {
544
+ }, ge), n !== void 0 ? t.registerCommand(Ie, (o) => {
543
545
  const i = p();
544
546
  if (!g(i) || i.isCollapsed() || !A(o, ClipboardEvent) || o.clipboardData === null) return !1;
545
547
  const r = o.clipboardData.getData("text");
546
- return !!n(r) && !i.getNodes().some((s) => q(s)) && (t.dispatchCommand(ve, { ...e, url: r }), o.preventDefault(), !0);
547
- }, he) : () => {
548
+ return !!n(r) && !i.getNodes().some((s) => J(s)) && (t.dispatchCommand(we, { ...e, url: r }), o.preventDefault(), !0);
549
+ }, ge) : () => {
548
550
  });
549
551
  }, [t, n, e]), null;
550
552
  }
551
- function Bn({ newTab: n = !0, disabled: e = !1 }) {
552
- const [t] = T();
553
- return k(() => {
553
+ function Un({ newTab: n = !0, disabled: e = !1 }) {
554
+ const [t] = P();
555
+ return _(() => {
554
556
  const o = (r) => {
555
557
  const s = r.target;
556
558
  if (!Me(s)) return;
@@ -558,10 +560,10 @@ function Bn({ newTab: n = !0, disabled: e = !1 }) {
558
560
  if (a === null) return;
559
561
  let l = null, u = null;
560
562
  if (a.update(() => {
561
- const f = ne(s);
563
+ const f = te(s);
562
564
  if (f !== null) {
563
- const C = de(f, q);
564
- if (!e) if (Ut(C)) l = C.sanitizeUrl(C.getURL()), u = C.getTarget();
565
+ const C = ce(f, J);
566
+ if (!e) if (Ht(C)) l = C.sanitizeUrl(C.getURL()), u = C.getTarget();
565
567
  else {
566
568
  const y = function(v, x) {
567
569
  let E = v;
@@ -587,8 +589,8 @@ function Bn({ newTab: n = !0, disabled: e = !1 }) {
587
589
  });
588
590
  }, [t, n, e]), null;
589
591
  }
590
- const te = 0, ue = 1, ce = 2, $ = 0, jn = 1, De = 2, Un = 3, Hn = 4;
591
- function Wn(n, e, t, o, i) {
592
+ const ee = 0, le = 1, ue = 2, $ = 0, jn = 1, De = 2, Hn = 3, Wn = 4;
593
+ function Jn(n, e, t, o, i) {
592
594
  if (n === null || t.size === 0 && o.size === 0 && !i) return $;
593
595
  const r = e._selection, s = n._selection;
594
596
  if (i) return jn;
@@ -596,11 +598,11 @@ function Wn(n, e, t, o, i) {
596
598
  const a = function(E, w, S) {
597
599
  const N = E._nodeMap, b = [];
598
600
  for (const L of w) {
599
- const _ = N.get(L);
600
- _ !== void 0 && b.push(_);
601
+ const k = N.get(L);
602
+ k !== void 0 && b.push(k);
601
603
  }
602
- for (const [L, _] of S) {
603
- if (!_) continue;
604
+ for (const [L, k] of S) {
605
+ if (!k) continue;
604
606
  const R = N.get(L);
605
607
  R === void 0 || Oe(R) || b.push(R);
606
608
  }
@@ -618,22 +620,22 @@ function Wn(n, e, t, o, i) {
618
620
  const f = r.anchor, C = s.anchor;
619
621
  if (f.key !== C.key || f.type !== "text") return $;
620
622
  const y = f.offset, v = C.offset, x = d.length - c.length;
621
- return x === 1 && v === y - 1 ? De : x === -1 && v === y + 1 ? Un : x === -1 && v === y ? Hn : $;
623
+ return x === 1 && v === y - 1 ? De : x === -1 && v === y + 1 ? Hn : x === -1 && v === y ? Wn : $;
622
624
  }
623
625
  function qn(n, e) {
624
626
  let t = Date.now(), o = $;
625
627
  return (i, r, s, a, l, u) => {
626
628
  const c = Date.now();
627
- if (u.has("historic")) return o = $, t = c, ce;
628
- const d = Wn(i, r, a, l, n.isComposing()), f = (() => {
629
+ if (u.has("historic")) return o = $, t = c, ue;
630
+ const d = Jn(i, r, a, l, n.isComposing()), f = (() => {
629
631
  const C = s === null || s.editor === n, y = u.has("history-push");
630
- if (!y && C && u.has("history-merge")) return te;
631
- if (i === null) return ue;
632
+ if (!y && C && u.has("history-merge")) return ee;
633
+ if (i === null) return le;
632
634
  const v = r._selection;
633
635
  return a.size > 0 || l.size > 0 ? y === !1 && d !== $ && d === o && c < t + e && C || a.size === 1 && function(x, E, w) {
634
636
  const S = E._nodeMap.get(x), N = w._nodeMap.get(x), b = E._selection, L = w._selection;
635
637
  return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !M(S) || !M(N) || S.__parent !== N.__parent) && JSON.stringify(E.read(() => S.exportJSON())) === JSON.stringify(w.read(() => N.exportJSON()));
636
- }(Array.from(a)[0], i, r) ? te : ue : v !== null ? te : ce;
638
+ }(Array.from(a)[0], i, r) ? ee : le : v !== null ? ee : ue;
637
639
  })();
638
640
  return t = c, o = d, f;
639
641
  };
@@ -641,54 +643,54 @@ function qn(n, e) {
641
643
  function $e(n) {
642
644
  n.undoStack = [], n.redoStack = [], n.current = null;
643
645
  }
644
- function Jn(n, e, t) {
646
+ function Vn(n, e, t) {
645
647
  const o = qn(n, t);
646
- return U(n.registerCommand(It, () => (function(r, s) {
648
+ return j(n.registerCommand(It, () => (function(r, s) {
647
649
  const a = s.redoStack, l = s.undoStack;
648
650
  if (l.length !== 0) {
649
651
  const u = s.current, c = l.pop();
650
- u !== null && (a.push(u), r.dispatchCommand(Y, !0)), l.length === 0 && r.dispatchCommand(G, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
652
+ u !== null && (a.push(u), r.dispatchCommand(X, !0)), l.length === 0 && r.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
651
653
  }
652
654
  }(n, e), !0), m), n.registerCommand(Rt, () => (function(r, s) {
653
655
  const a = s.redoStack, l = s.undoStack;
654
656
  if (a.length !== 0) {
655
657
  const u = s.current;
656
- u !== null && (l.push(u), r.dispatchCommand(G, !0));
658
+ u !== null && (l.push(u), r.dispatchCommand(Y, !0));
657
659
  const c = a.pop();
658
- a.length === 0 && r.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
660
+ a.length === 0 && r.dispatchCommand(X, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
659
661
  }
660
- }(n, e), !0), m), n.registerCommand(Tt, () => ($e(e), !1), m), n.registerCommand(Pt, () => ($e(e), n.dispatchCommand(Y, !1), n.dispatchCommand(G, !1), !0), m), n.registerUpdateListener(({ editorState: r, prevEditorState: s, dirtyLeaves: a, dirtyElements: l, tags: u }) => {
662
+ }(n, e), !0), m), n.registerCommand(Pt, () => ($e(e), !1), m), n.registerCommand(Tt, () => ($e(e), n.dispatchCommand(X, !1), n.dispatchCommand(Y, !1), !0), m), n.registerUpdateListener(({ editorState: r, prevEditorState: s, dirtyLeaves: a, dirtyElements: l, tags: u }) => {
661
663
  const c = e.current, d = e.redoStack, f = e.undoStack, C = c === null ? null : c.editorState;
662
664
  if (c !== null && r === C) return;
663
665
  const y = o(s, r, c, a, l, u);
664
- if (y === ue) d.length !== 0 && (e.redoStack = [], n.dispatchCommand(Y, !1)), c !== null && (f.push({ ...c }), n.dispatchCommand(G, !0));
665
- else if (y === ce) return;
666
+ if (y === le) d.length !== 0 && (e.redoStack = [], n.dispatchCommand(X, !1)), c !== null && (f.push({ ...c }), n.dispatchCommand(Y, !0));
667
+ else if (y === ue) return;
666
668
  e.current = { editor: n, editorState: r };
667
669
  }));
668
670
  }
669
- function Vn() {
671
+ function Gn() {
670
672
  return { current: null, redoStack: [], undoStack: [] };
671
673
  }
672
674
  function Xn({ delay: n, externalHistoryState: e }) {
673
- const [t] = T();
675
+ const [t] = P();
674
676
  return function(o, i, r = 1e3) {
675
- const s = J(() => i || Vn(), [i]);
676
- k(() => Jn(o, s, r), [r, o, s]);
677
+ const s = q(() => i || Gn(), [i]);
678
+ _(() => Vn(o, s, r), [r, o, s]);
677
679
  }(t, e, n), null;
678
680
  }
679
681
  function Yn({ hasCellMerge: n = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
680
- const [i] = T();
681
- return k(() => {
682
- Wt(i, o);
683
- }, [i, o]), k(() => qt(i), [i]), k(() => Jt(i, t), [i, t]), k(() => {
684
- if (!n) return Vt(i);
685
- }, [i, n]), k(() => {
686
- if (!e) return i.registerNodeTransform(je, (r) => {
682
+ const [i] = P();
683
+ return _(() => {
684
+ Jt(i, o);
685
+ }, [i, o]), _(() => qt(i), [i]), _(() => Vt(i, t), [i, t]), _(() => {
686
+ if (!n) return Gt(i);
687
+ }, [i, n]), _(() => {
688
+ if (!e) return i.registerNodeTransform(Ue, (r) => {
687
689
  r.getBackgroundColor() !== null && r.setBackgroundColor(null);
688
690
  });
689
691
  }, [i, e, n]), null;
690
692
  }
691
- const qe = 200, Gn = ({
693
+ const Je = 200, Qn = ({
692
694
  currentLanguage: n = "NL",
693
695
  initialValue: e = "",
694
696
  placeholder: t = "",
@@ -697,61 +699,61 @@ const qe = 200, Gn = ({
697
699
  required: r = !1,
698
700
  notValidatedText: s = "",
699
701
  maxHeightInRem: a = "20rem",
700
- maxWords: l = qe,
702
+ maxWords: l = Je,
701
703
  onChange: u
702
704
  }) => {
703
- const { switchLanguage: c } = dn(), d = sn(), [f] = O(() => Te()), [C, y] = O(0), [v, x] = O(0), E = Ke(null), w = {
705
+ const { switchLanguage: c } = fn(), d = an(), [f] = O(() => Pe()), [C, y] = O(0), [v, x] = O(0), E = Fe(null), w = {
704
706
  html: {
705
- export: tn
707
+ export: nn
706
708
  },
707
709
  namespace: "UvaRte",
708
710
  editor: f,
709
- theme: ln,
711
+ theme: un,
710
712
  onError(b) {
711
713
  throw b;
712
714
  },
713
- nodes: [Ae, ze, Be, Ht, je, Xt, Yt],
715
+ nodes: [Ae, ze, Be, Wt, Ue, Xt, Yt],
714
716
  editorState: (b) => {
715
- const _ = new DOMParser().parseFromString(e, "text/html"), R = zt(b, _), K = z();
716
- if (K.clear(), nn(e))
717
+ const k = new DOMParser().parseFromString(e, "text/html"), R = zt(b, k), F = z();
718
+ if (F.clear(), rn(e))
717
719
  R.forEach((B) => {
718
- K.append(B);
720
+ F.append(B);
719
721
  });
720
722
  else {
721
723
  const B = Re();
722
724
  R.forEach((D, V) => {
723
- V === 0 ? (B.append(D), K.append(B)) : K.append(D);
725
+ V === 0 ? (B.append(D), F.append(B)) : F.append(D);
724
726
  });
725
727
  }
726
728
  }
727
729
  }, S = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, L) => {
728
730
  b.read(() => {
729
- let _ = "";
730
- y(S(z().getTextContent().replace(/\s+/g, " ").trim())), _ = rn(Bt(L)), u(_);
731
+ let k = "";
732
+ y(S(z().getTextContent().replace(/\s+/g, " ").trim())), k = on(Bt(L)), u(k);
731
733
  });
732
734
  };
733
- return k(() => {
735
+ return _(() => {
734
736
  c(n.toLocaleLowerCase());
735
- }, [n, c]), k(() => {
737
+ }, [n, c]), _(() => {
736
738
  const b = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
737
739
  y(S(b));
738
- }, []), /* @__PURE__ */ F("div", { className: I.editor__container, children: [
739
- /* @__PURE__ */ F("div", { className: I.editor__header, children: [
740
- /* @__PURE__ */ h(un, { label: o, info: i, required: r }),
741
- /* @__PURE__ */ F("div", { className: I["editor__header-word-count"], children: [
742
- /* @__PURE__ */ h("span", { className: en({ [I["editor__header-word-count--alert"]]: C > l }), children: C }),
740
+ }, []), /* @__PURE__ */ K("div", { className: I.editor__container, children: [
741
+ /* @__PURE__ */ K("div", { className: I.editor__header, children: [
742
+ /* @__PURE__ */ h(cn, { label: o, info: i, required: r }),
743
+ /* @__PURE__ */ K("div", { className: I["editor__header-word-count"], children: [
744
+ /* @__PURE__ */ h("span", { className: tn({ [I["editor__header-word-count--alert"]]: C > l }), children: C }),
743
745
  " / ",
744
746
  l
745
747
  ] })
746
748
  ] }),
747
- /* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ F(pn, { initialConfig: w, children: [
748
- /* @__PURE__ */ h(on, { editorScrollPosition: v }),
749
- /* @__PURE__ */ F("div", { className: I["editor__field-wrapper"], children: [
749
+ /* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ K(gn, { initialConfig: w, children: [
750
+ /* @__PURE__ */ h(sn, { editorScrollPosition: v }),
751
+ /* @__PURE__ */ K("div", { className: I["editor__field-wrapper"], children: [
750
752
  /* @__PURE__ */ h(
751
- Ln,
753
+ Dn,
752
754
  {
753
755
  contentEditable: /* @__PURE__ */ h(
754
- Tn,
756
+ Rn,
755
757
  {
756
758
  className: I.editor__field,
757
759
  "aria-label": d.common.rteAriaLabel,
@@ -766,22 +768,22 @@ const qe = 200, Gn = ({
766
768
  }
767
769
  ),
768
770
  placeholder: /* @__PURE__ */ h("div", { className: I.editor__placeholder, children: t }),
769
- ErrorBoundary: On
771
+ ErrorBoundary: Fn
770
772
  }
771
773
  ),
772
774
  /* @__PURE__ */ h(Yn, {}),
773
775
  /* @__PURE__ */ h(Xn, {}),
774
- /* @__PURE__ */ h(An, {}),
775
- /* @__PURE__ */ h(zn, { validateUrl: Gt }),
776
- /* @__PURE__ */ h(Qt, { matchers: Zt }),
777
- /* @__PURE__ */ h(Bn, {}),
778
- /* @__PURE__ */ h(Fn, { onChange: N }),
779
- /* @__PURE__ */ h(fn, {})
776
+ /* @__PURE__ */ h(zn, {}),
777
+ /* @__PURE__ */ h(Bn, { validateUrl: Qt }),
778
+ /* @__PURE__ */ h(Zt, { matchers: en }),
779
+ /* @__PURE__ */ h(Un, {}),
780
+ /* @__PURE__ */ h(An, { onChange: N }),
781
+ /* @__PURE__ */ h(mn, {})
780
782
  ] })
781
783
  ] }) }),
782
- s !== "" && /* @__PURE__ */ h(an, { level: "error", feedback: s })
784
+ s !== "" && /* @__PURE__ */ h(ln, { level: "error", feedback: s })
783
785
  ] });
784
- }, zr = ({
786
+ }, Br = ({
785
787
  currentLanguage: n = "NL",
786
788
  initialValue: e = "",
787
789
  placeholder: t = "",
@@ -789,10 +791,10 @@ const qe = 200, Gn = ({
789
791
  info: i = "",
790
792
  required: r = !1,
791
793
  notValidatedText: s = "",
792
- maxWords: a = qe,
794
+ maxWords: a = Je,
793
795
  onChange: l
794
- }) => /* @__PURE__ */ h(cn, { children: /* @__PURE__ */ h(
795
- Gn,
796
+ }) => /* @__PURE__ */ h(dn, { children: /* @__PURE__ */ h(
797
+ Qn,
796
798
  {
797
799
  currentLanguage: n,
798
800
  initialValue: e,
@@ -806,7 +808,7 @@ const qe = 200, Gn = ({
806
808
  }
807
809
  ) });
808
810
  export {
809
- Gn as Rte,
810
- zr as RteEditor
811
+ Qn as Rte,
812
+ Br as RteEditor
811
813
  };
812
814
  //# sourceMappingURL=RteEditor.js.map