@uva-glass/component-library 2.0.0 → 2.0.2

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 (70) hide show
  1. package/dist/{Lexical.prod-DeeCy7Xd.js → Lexical.prod-Bzma_w4s.js} +2 -2
  2. package/dist/{Lexical.prod-DeeCy7Xd.js.map → Lexical.prod-Bzma_w4s.js.map} +1 -1
  3. package/dist/{LexicalClipboard.prod-CayrMfkI.js → LexicalClipboard.prod-Dg23ixPD.js} +4 -4
  4. package/dist/{LexicalClipboard.prod-CayrMfkI.js.map → LexicalClipboard.prod-Dg23ixPD.js.map} +1 -1
  5. package/dist/{LexicalLink.prod-Biaqry-c.js → LexicalLink.prod-C1RDJLfo.js} +3 -3
  6. package/dist/{LexicalLink.prod-Biaqry-c.js.map → LexicalLink.prod-C1RDJLfo.js.map} +1 -1
  7. package/dist/{LexicalList.prod-Uk8UObU7.js → LexicalList.prod-BGzfDPU0.js} +3 -3
  8. package/dist/{LexicalList.prod-Uk8UObU7.js.map → LexicalList.prod-BGzfDPU0.js.map} +1 -1
  9. package/dist/{LexicalSelection.prod-C1TEIGhq.js → LexicalSelection.prod-CNWFGVlh.js} +2 -2
  10. package/dist/{LexicalSelection.prod-C1TEIGhq.js.map → LexicalSelection.prod-CNWFGVlh.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-hx6rW3fc.js → LexicalTable.prod-D-4NN9o5.js} +500 -472
  12. package/dist/LexicalTable.prod-D-4NN9o5.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-CCjlRAc-.js → LexicalUtils.prod-Cg2siy-c.js} +2 -2
  14. package/dist/{LexicalUtils.prod-CCjlRAc-.js.map → LexicalUtils.prod-Cg2siy-c.js.map} +1 -1
  15. package/dist/{TablePlugin-ByeOn0Zf.js → TablePlugin-E6UFlCgy.js} +31 -30
  16. package/dist/{TablePlugin-ByeOn0Zf.js.map → TablePlugin-E6UFlCgy.js.map} +1 -1
  17. package/dist/components/Buttons/LinkButton.d.ts +2 -2
  18. package/dist/components/Buttons/LinkButton.js +1 -1
  19. package/dist/components/Buttons/LinkButton.js.map +1 -1
  20. package/dist/components/Buttons/LinkButton.stories.js +5 -5
  21. package/dist/components/CheckboxTree/CheckboxTree.js +7 -6
  22. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  23. package/dist/components/FormInput/FormInput.js +9 -8
  24. package/dist/components/FormInput/FormInput.js.map +1 -1
  25. package/dist/components/InputField/InputField.stories.js +4 -3
  26. package/dist/components/InputField/InputField.stories.js.map +1 -1
  27. package/dist/components/MenuLink/MenuLink.js +5 -5
  28. package/dist/components/MenuLink/MenuLink.stories.js +2 -2
  29. package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
  30. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  31. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  32. package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -2
  33. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
  34. package/dist/components/MultiSelect/index.js +1 -1
  35. package/dist/components/PeriodSelector/PeriodSelector.js +4 -3
  36. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  37. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +4 -3
  38. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  39. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +4 -3
  40. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
  41. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  42. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +5 -4
  43. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  44. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +4 -3
  45. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
  46. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  47. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +7 -6
  48. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  49. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  50. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
  51. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
  52. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -2
  53. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
  54. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -4
  55. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
  56. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +10 -10
  57. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  58. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +19 -19
  59. package/dist/components/RteEditor/Plugins/index.js +1 -1
  60. package/dist/components/RteEditor/RteEditor.js +78 -77
  61. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  62. package/dist/components/RteEditor/helpers.js +4 -4
  63. package/dist/components/index.js +1 -1
  64. package/dist/{helpers-CgzuKnuq.js → helpers-BVGma1u6.js} +4 -4
  65. package/dist/{helpers-CgzuKnuq.js.map → helpers-BVGma1u6.js.map} +1 -1
  66. package/dist/index.js +1 -1
  67. package/package.json +6 -6
  68. package/dist/LexicalTable.prod-hx6rW3fc.js.map +0 -1
  69. package/dist/chunk-7R3XDUXW-C-tvzxWq.js +0 -1685
  70. package/dist/chunk-7R3XDUXW-C-tvzxWq.js.map +0 -1
@@ -3,7 +3,7 @@ import { BlockFormatPlugin as l } from "./BlockFormatPlugin/BlockFormatPlugin.js
3
3
  import { ListPlugin as n } from "./ListPlugin/ListPlugin.js";
4
4
  import { LinkPlugin as m, getLinkNodeTag as x } from "./LinkPlugin/LinkPlugin.js";
5
5
  import { HistoryPlugin as p } from "./HistoryPlugin/HistoryPlugin.js";
6
- import { T as a } from "../../../TablePlugin-ByeOn0Zf.js";
6
+ import { T as a } from "../../../TablePlugin-E6UFlCgy.js";
7
7
  import { TableCellContextMenu as T } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
8
8
  export {
9
9
  l as BlockFormatPlugin,
@@ -1,22 +1,22 @@
1
- import { jsx as y, jsxs as A, Fragment as Ie } from "react/jsx-runtime";
1
+ import { jsx as y, jsxs as F, Fragment as Ke } from "react/jsx-runtime";
2
2
  import { l as Ze, o as Ge, u as R } from "../../LexicalComposerContext.prod-Dyvim1tK.js";
3
- import { ao as Ae, u as z, z as me, R as v, E as W, b as J, W as Qe, h as P, a as C, a0 as Ke, ap as et, a6 as g, B as tt, an as I, al as nt, aq as rt, ar as ot, as as it, f as ie, at as st, au as at, A as lt, V as ct, F as dt, l as ut, av as ft, aw as ge, o as he, M as mt, J as se, L as pt, a4 as ze, ax as ve, y as gt, x as ht, S as vt, a3 as Ce, w as Ct, ay as yt, az as Et, aA as wt, aj as bt, O as St, m as $t, aB as _t, n as xt, H as kt, D as Nt, a7 as Lt, e as Dt, K as ye, aC as Pt, C as Rt, a9 as Y, a8 as Z, aD as Tt, aE as Mt, ab as Ft, aa as Ot } from "../../Lexical.prod-DeeCy7Xd.js";
3
+ import { ao as Fe, u as z, z as me, R as v, E as W, b as J, W as Qe, h as P, a as C, a0 as Ae, ap as et, a6 as g, B as tt, an as K, al as nt, aq as rt, ar as ot, as as it, f as ie, at as st, au as at, A as lt, V as ct, F as dt, l as ut, av as ft, aw as ge, o as he, M as mt, J as se, L as pt, a4 as ze, ax as ve, y as gt, x as ht, S as vt, a3 as Ce, w as Ct, ay as yt, az as Et, aA as wt, aj as bt, O as St, m as $t, aB as _t, n as xt, H as kt, D as Nt, a7 as Lt, e as Dt, K as ye, aC as Pt, C as Rt, a9 as Y, a8 as Z, aD as Tt, aE as Mt, ab as Ot, aa as It } from "../../Lexical.prod-Bzma_w4s.js";
4
4
  import * as ae from "react";
5
- import { useMemo as q, useLayoutEffect as j, useEffect as x, useState as F, useRef as Be, Suspense as It, forwardRef as Ue, useCallback as At } from "react";
6
- import { N as B, u as K, n as Kt, o as pe, i as zt, d as Bt } from "../../LexicalUtils.prod-CCjlRAc-.js";
5
+ import { useMemo as q, useLayoutEffect as H, useEffect as x, useState as O, useRef as Be, Suspense as Kt, forwardRef as Ue, useCallback as Ft } from "react";
6
+ import { N as B, u as A, n as At, o as pe, i as zt, d as Bt } from "../../LexicalUtils.prod-Cg2siy-c.js";
7
7
  import { r as Ut } from "../../index-B9BWML6P.js";
8
- import { N as Ee, O as we, h as jt, m as Ht } from "../../LexicalClipboard.prod-CayrMfkI.js";
9
- import { L as be, $ as Se } from "../../LexicalSelection.prod-C1TEIGhq.js";
10
- import { J as je, I as He, Z as Wt } from "../../LexicalList.prod-Uk8UObU7.js";
11
- import { a as We, U as $e, m as le, g as Jt, f as qt } from "../../LexicalLink.prod-Biaqry-c.js";
12
- import { F as Vt, k as re, o as oe, g as Je, B as Xt, l as _e, i as Yt, C as Zt, X as Gt, H as Qt, P as en, p as xe, s as tn, j as nn, t as rn } from "../../LexicalTable.prod-hx6rW3fc.js";
13
- import { a as on, F as sn, M as an } from "../../helpers-CgzuKnuq.js";
8
+ import { N as Ee, O as we, h as Ht, m as jt } from "../../LexicalClipboard.prod-Dg23ixPD.js";
9
+ import { L as be, $ as Se } from "../../LexicalSelection.prod-CNWFGVlh.js";
10
+ import { J as He, I as je, Z as Wt } from "../../LexicalList.prod-BGzfDPU0.js";
11
+ import { a as We, U as $e, m as le, g as Jt, f as qt } from "../../LexicalLink.prod-C1RDJLfo.js";
12
+ import { k as Vt, K as re, r as oe, f as Je, P as Xt, s as _e, c as Yt, S as Zt, X as Gt, B as Qt, H as en, C as xe, i as tn, V as nn, n as rn } from "../../LexicalTable.prod-D-4NN9o5.js";
13
+ import { a as on, F as sn, M as an } from "../../helpers-BVGma1u6.js";
14
14
  import { c as ln } from "../../clsx-OuTLNxxd.js";
15
15
  import { exportMap as cn, isStartingWithHtmlTag as dn, mergeBoldStrongTags as un } from "./helpers.js";
16
16
  import { s as M } from "../../RteEditor.module-oFMKEW6f.js";
17
17
  import { ToolBarPlugin as fn } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
18
  import { useTranslation as mn } from "./hooks/useTranslation.js";
19
- import "../../TablePlugin-ByeOn0Zf.js";
19
+ import "../../TablePlugin-E6UFlCgy.js";
20
20
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
21
  import "./hooks/components/Flyout.js";
22
22
  import "../Buttons/Button.js";
@@ -31,6 +31,7 @@ import "../GridRow/GridRow.js";
31
31
  import "../IconButton/IconButton.js";
32
32
  import "../Input/Input.js";
33
33
  import "../InputField/InputField.js";
34
+ import "react-router";
34
35
  import "../SelectListbox/SelectListbox.js";
35
36
  import "../SelectListbox/SelectProvider.js";
36
37
  import "../Sortable/components/SortableItem.js";
@@ -39,10 +40,10 @@ import { UvaTheme as gn } from "./UvaTheme/UvaTheme.js";
39
40
  import { EditorHeader as hn } from "./EditorHeader/EditorHeader.js";
40
41
  import { useLanguage as vn, LanguageProvider as Cn } from "./Providers/LanguageProvider.js";
41
42
  import { PasteHandlerPlugin as yn } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
42
- const qe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, En = qe ? j : x, G = { tag: "history-merge" };
43
+ const qe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, En = qe ? H : x, G = { tag: "history-merge" };
43
44
  function wn({ initialConfig: t, children: e }) {
44
45
  const n = q(() => {
45
- const { theme: o, namespace: i, nodes: r, onError: s, editorState: a, html: l } = t, c = Ge(null, o), d = Ae({ editable: t.editable, html: l, namespace: i, nodes: r, onError: (f) => s(f, d), theme: o });
46
+ const { theme: o, namespace: i, nodes: r, onError: s, editorState: a, html: l } = t, c = Ge(null, o), d = Fe({ editable: t.editable, html: l, namespace: i, nodes: r, onError: (f) => s(f, d), theme: o });
46
47
  return function(f, u) {
47
48
  if (u !== null) {
48
49
  if (u === void 0) f.update(() => {
@@ -76,13 +77,13 @@ function wn({ initialConfig: t, children: e }) {
76
77
  i.setEditable(o === void 0 || o);
77
78
  }, []), y(Ze.Provider, { value: n, children: e });
78
79
  }
79
- const bn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : x;
80
+ const bn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
80
81
  function Sn(t) {
81
82
  return { initialValueFn: () => t.isEditable(), subscribe: (e) => t.registerEditableListener(e) };
82
83
  }
83
84
  function $n() {
84
85
  return function(t) {
85
- const [e] = R(), n = q(() => t(e), [e, t]), [o, i] = F(() => n.initialValueFn()), r = Be(o);
86
+ const [e] = R(), n = q(() => t(e), [e, t]), [o, i] = O(() => n.initialValueFn()), r = Be(o);
86
87
  return bn(() => {
87
88
  const { initialValueFn: s, subscribe: a } = n, l = s();
88
89
  return r.current !== l && (r.current = l, i(l)), a((c) => {
@@ -182,10 +183,10 @@ function Ne(t, e) {
182
183
  }
183
184
  return null;
184
185
  }
185
- const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Dn = H && "documentMode" in document ? document.documentMode : null, Pn = !(!H || !("InputEvent" in window) || Dn) && "getTargetRanges" in new window.InputEvent("input"), Rn = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Le = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Tn = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), Mn = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Tn, De = Dt();
186
+ const j = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Dn = j && "documentMode" in document ? document.documentMode : null, Pn = !(!j || !("InputEvent" in window) || Dn) && "getTargetRanges" in new window.InputEvent("input"), Rn = j && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Le = j && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Tn = j && /^(?=.*Chrome).*/i.test(navigator.userAgent), Mn = j && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Tn, De = Dt();
186
187
  function Q(t) {
187
188
  let e = null;
188
- if (K(t, DragEvent) ? e = t.dataTransfer : K(t, ClipboardEvent) && (e = t.clipboardData), e === null) return [!1, [], !1];
189
+ if (A(t, DragEvent) ? e = t.dataTransfer : A(t, ClipboardEvent) && (e = t.clipboardData), e === null) return [!1, [], !1];
189
190
  const n = e.types, o = n.includes("Files"), i = n.includes("text/html") || n.includes("text/plain");
190
191
  return [o, Array.from(e.files), i];
191
192
  }
@@ -207,10 +208,10 @@ function ee(t) {
207
208
  const e = ie(t);
208
209
  return W(e);
209
210
  }
210
- function Fn(t) {
211
+ function On(t) {
211
212
  return B(t.registerCommand(Lt, (e) => {
212
213
  const n = v();
213
- return !!I(n) && (n.clear(), !0);
214
+ return !!K(n) && (n.clear(), !0);
214
215
  }, 0), t.registerCommand(se, (e) => {
215
216
  const n = v();
216
217
  return !!C(n) && (n.deleteCharacter(e), !0);
@@ -241,7 +242,7 @@ function Fn(t) {
241
242
  return !!C(n) && (n.formatText(e), !0);
242
243
  }, g), t.registerCommand(St, (e) => {
243
244
  const n = v();
244
- if (!C(n) && !I(n)) return !1;
245
+ if (!C(n) && !K(n)) return !1;
245
246
  const o = n.getNodes();
246
247
  for (const i of o) {
247
248
  const r = pe(i, (s) => J(s) && !s.isInline());
@@ -262,7 +263,7 @@ function Fn(t) {
262
263
  n > 0 && e.setIndent(n - 1);
263
264
  }), g), t.registerCommand(Ct, (e) => {
264
265
  const n = v();
265
- if (I(n) && !ee(e.target)) {
266
+ if (K(n) && !ee(e.target)) {
266
267
  const o = n.getNodes();
267
268
  if (o.length > 0) return o[0].selectPrevious(), !0;
268
269
  } else if (C(n)) {
@@ -272,7 +273,7 @@ function Fn(t) {
272
273
  return !1;
273
274
  }, g), t.registerCommand(vt, (e) => {
274
275
  const n = v();
275
- if (I(n)) {
276
+ if (K(n)) {
276
277
  const o = n.getNodes();
277
278
  if (o.length > 0) return o[0].selectNext(0, 0), !0;
278
279
  } else if (C(n)) {
@@ -286,7 +287,7 @@ function Fn(t) {
286
287
  return !1;
287
288
  }, g), t.registerCommand(ht, (e) => {
288
289
  const n = v();
289
- if (I(n)) {
290
+ if (K(n)) {
290
291
  const o = n.getNodes();
291
292
  if (o.length > 0) return e.preventDefault(), o[0].selectPrevious(), !0;
292
293
  }
@@ -298,7 +299,7 @@ function Fn(t) {
298
299
  return !1;
299
300
  }, g), t.registerCommand(gt, (e) => {
300
301
  const n = v();
301
- if (I(n) && !ee(e.target)) {
302
+ if (K(n) && !ee(e.target)) {
302
303
  const i = n.getNodes();
303
304
  if (i.length > 0) return e.preventDefault(), i[0].selectNext(0, 0), !0;
304
305
  }
@@ -310,7 +311,7 @@ function Fn(t) {
310
311
  const n = v();
311
312
  if (!C(n)) return !1;
312
313
  const { anchor: o } = n, i = o.getNode();
313
- return n.isCollapsed() && o.offset === 0 && !ze(i) && Kt(i).getIndent() > 0 ? (e.preventDefault(), t.dispatchCommand(ve, void 0)) : (!Le || navigator.language !== "ko-KR") && (e.preventDefault(), t.dispatchCommand(se, !0));
314
+ return n.isCollapsed() && o.offset === 0 && !ze(i) && At(i).getIndent() > 0 ? (e.preventDefault(), t.dispatchCommand(ve, void 0)) : (!Le || navigator.language !== "ko-KR") && (e.preventDefault(), t.dispatchCommand(se, !0));
314
315
  }, g), t.registerCommand(mt, (e) => {
315
316
  if (ee(e.target)) return !1;
316
317
  const n = v();
@@ -360,28 +361,28 @@ function Fn(t) {
360
361
  W(r) && e.preventDefault();
361
362
  }
362
363
  return !0;
363
- }, g), t.registerCommand(rt, () => (ot(), !0), g), t.registerCommand(nt, (e) => (we(t, K(e, ClipboardEvent) ? e : null), !0), g), t.registerCommand(tt, (e) => (async function(n, o) {
364
- await we(o, K(n, ClipboardEvent) ? n : null), o.update(() => {
364
+ }, g), t.registerCommand(rt, () => (ot(), !0), g), t.registerCommand(nt, (e) => (we(t, A(e, ClipboardEvent) ? e : null), !0), g), t.registerCommand(tt, (e) => (async function(n, o) {
365
+ await we(o, A(n, ClipboardEvent) ? n : null), o.update(() => {
365
366
  const i = v();
366
- C(i) ? i.removeText() : I(i) && i.getNodes().forEach((r) => r.remove());
367
+ C(i) ? i.removeText() : K(i) && i.getNodes().forEach((r) => r.remove());
367
368
  });
368
- }(e, t), !0), g), t.registerCommand(Ke, (e) => {
369
+ }(e, t), !0), g), t.registerCommand(Ae, (e) => {
369
370
  const [, n, o] = Q(e);
370
371
  return n.length > 0 && !o ? (t.dispatchCommand(De, n), !0) : et(e.target) ? !1 : v() !== null && (function(i, r) {
371
372
  i.preventDefault(), r.update(() => {
372
- const s = v(), a = K(i, InputEvent) || K(i, KeyboardEvent) ? null : i.clipboardData;
373
+ const s = v(), a = A(i, InputEvent) || A(i, KeyboardEvent) ? null : i.clipboardData;
373
374
  a != null && s !== null && Ee(a, s, r);
374
375
  }, { tag: "paste" });
375
376
  }(e, t), !0);
376
377
  }, g));
377
378
  }
378
- const ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : x;
379
+ const ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
379
380
  function Re(t) {
380
381
  return t.getEditorState().read(Ve(t.isComposing()));
381
382
  }
382
- function On({ contentEditable: t, placeholder: e = null, ErrorBoundary: n }) {
383
+ function In({ contentEditable: t, placeholder: e = null, ErrorBoundary: n }) {
383
384
  const [o] = R(), i = function(r, s) {
384
- const [a, l] = F(() => r.getDecorators());
385
+ const [a, l] = O(() => r.getDecorators());
385
386
  return ce(() => r.registerDecoratorListener((c) => {
386
387
  ke.flushSync(() => {
387
388
  l(c);
@@ -391,19 +392,19 @@ function On({ contentEditable: t, placeholder: e = null, ErrorBoundary: n }) {
391
392
  }, [r]), q(() => {
392
393
  const c = [], d = Object.keys(a);
393
394
  for (let f = 0; f < d.length; f++) {
394
- const u = d[f], m = y(s, { onError: (E) => r._onError(E), children: y(It, { fallback: null, children: a[u] }) }), p = r.getElementByKey(u);
395
+ const u = d[f], m = y(s, { onError: (E) => r._onError(E), children: y(Kt, { fallback: null, children: a[u] }) }), p = r.getElementByKey(u);
395
396
  p !== null && c.push(ke.createPortal(m, p, u));
396
397
  }
397
398
  return c;
398
399
  }, [s, a, r]);
399
400
  }(o, n);
400
401
  return function(r) {
401
- ce(() => B(Fn(r), Ln(r)), [r]);
402
- }(o), A(Ie, { children: [t, y(In, { content: e }), i] });
402
+ ce(() => B(On(r), Ln(r)), [r]);
403
+ }(o), F(Ke, { children: [t, y(Kn, { content: e }), i] });
403
404
  }
404
- function In({ content: t }) {
405
+ function Kn({ content: t }) {
405
406
  const [e] = R(), n = function(i) {
406
- const [r, s] = F(() => Re(i));
407
+ const [r, s] = O(() => Re(i));
407
408
  return ce(() => {
408
409
  function a() {
409
410
  const l = Re(i);
@@ -418,9 +419,9 @@ function In({ content: t }) {
418
419
  }(e), o = $n();
419
420
  return n ? typeof t == "function" ? t(o) : t : null;
420
421
  }
421
- const Xe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : x;
422
- function An({ editor: t, ariaActiveDescendant: e, ariaAutoComplete: n, ariaControls: o, ariaDescribedBy: i, ariaErrorMessage: r, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: d, ariaOwns: f, ariaRequired: u, autoCapitalize: m, className: p, id: E, role: w = "textbox", spellCheck: h = !0, style: b, tabIndex: $, "data-testid": k, ...S }, N) {
423
- const [_, T] = F(t.isEditable()), O = At((L) => {
422
+ const Xe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
423
+ function Fn({ editor: t, ariaActiveDescendant: e, ariaAutoComplete: n, ariaControls: o, ariaDescribedBy: i, ariaErrorMessage: r, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: d, ariaOwns: f, ariaRequired: u, autoCapitalize: m, className: p, id: E, role: w = "textbox", spellCheck: h = !0, style: b, tabIndex: $, "data-testid": k, ...S }, N) {
424
+ const [_, T] = O(t.isEditable()), I = Ft((L) => {
424
425
  L && L.ownerDocument && L.ownerDocument.defaultView ? t.setRootElement(L) : t.setRootElement(null);
425
426
  }, [t]), U = q(() => /* @__PURE__ */ function(...L) {
426
427
  return (V) => {
@@ -428,23 +429,23 @@ function An({ editor: t, ariaActiveDescendant: e, ariaAutoComplete: n, ariaContr
428
429
  typeof X == "function" ? X(V) : X != null && (X.current = V);
429
430
  });
430
431
  };
431
- }(N, O), [O, N]);
432
+ }(N, I), [I, N]);
432
433
  return Xe(() => (T(t.isEditable()), t.registerEditableListener((L) => {
433
434
  T(L);
434
435
  })), [t]), y("div", { "aria-activedescendant": _ ? e : void 0, "aria-autocomplete": _ ? n : "none", "aria-controls": _ ? o : void 0, "aria-describedby": i, ...r != null ? { "aria-errormessage": r } : {}, "aria-expanded": _ && w === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": d, "aria-owns": _ ? f : void 0, "aria-readonly": !_ || void 0, "aria-required": u, autoCapitalize: m, className: p, contentEditable: _, "data-testid": k, id: E, ref: U, role: _ ? w : void 0, spellCheck: h, style: b, tabIndex: $, ...S });
435
436
  }
436
- const Kn = Ue(An);
437
+ const An = Ue(Fn);
437
438
  function Te(t) {
438
439
  return t.getEditorState().read(Ve(t.isComposing()));
439
440
  }
440
441
  const zn = Ue(Bn);
441
442
  function Bn(t, e) {
442
443
  const { placeholder: n, ...o } = t, [i] = R();
443
- return A(Ie, { children: [y(Kn, { editor: i, ...o, ref: e }), n != null && y(Un, { editor: i, content: n })] });
444
+ return F(Ke, { children: [y(An, { editor: i, ...o, ref: e }), n != null && y(Un, { editor: i, content: n })] });
444
445
  }
445
446
  function Un({ content: t, editor: e }) {
446
447
  const n = function(s) {
447
- const [a, l] = F(() => Te(s));
448
+ const [a, l] = O(() => Te(s));
448
449
  return Xe(() => {
449
450
  function c() {
450
451
  const d = Te(s);
@@ -456,8 +457,8 @@ function Un({ content: t, editor: e }) {
456
457
  c();
457
458
  }));
458
459
  }, [s]), a;
459
- }(e), [o, i] = F(e.isEditable());
460
- if (j(() => (i(e.isEditable()), e.registerEditableListener((s) => {
460
+ }(e), [o, i] = O(e.isEditable());
461
+ if (H(() => (i(e.isEditable()), e.registerEditableListener((s) => {
461
462
  i(s);
462
463
  })), [e]), !n) return null;
463
464
  let r = null;
@@ -468,7 +469,7 @@ function de(t, e) {
468
469
  return n.__proto__ = o, n;
469
470
  }, de(t, e);
470
471
  }
471
- var Me = { error: null }, jn = function(t) {
472
+ var Me = { error: null }, Hn = function(t) {
472
473
  var e, n;
473
474
  function o() {
474
475
  for (var r, s = arguments.length, a = new Array(s), l = 0; l < s; l++) a[l] = arguments[l];
@@ -503,10 +504,10 @@ var Me = { error: null }, jn = function(t) {
503
504
  return this.props.children;
504
505
  }, o;
505
506
  }(ae.Component);
506
- function Hn({ children: t, onError: e }) {
507
- return y(jn, { fallback: y("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: t });
507
+ function jn({ children: t, onError: e }) {
508
+ return y(Hn, { fallback: y("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: t });
508
509
  }
509
- const Wn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : x;
510
+ const Wn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : x;
510
511
  function Jn({ ignoreHistoryMergeTagChange: t = !0, ignoreSelectionChange: e = !1, onChange: n }) {
511
512
  const [o] = R();
512
513
  return Wn(() => {
@@ -518,7 +519,7 @@ function Jn({ ignoreHistoryMergeTagChange: t = !0, ignoreSelectionChange: e = !1
518
519
  function qn() {
519
520
  const [t] = R();
520
521
  return x(() => {
521
- if (!t.hasNodes([je, He])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
522
+ if (!t.hasNodes([He, je])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
522
523
  }, [t]), function(e) {
523
524
  x(() => Wt(e), [e]);
524
525
  }(t), null;
@@ -534,9 +535,9 @@ function Vn({ validateUrl: t, attributes: e }) {
534
535
  const { url: i, target: r, rel: s, title: a } = o;
535
536
  return le(i, { ...e, rel: s, target: r, title: a }), !0;
536
537
  }
537
- }, ye), t !== void 0 ? n.registerCommand(Ke, (o) => {
538
+ }, ye), t !== void 0 ? n.registerCommand(Ae, (o) => {
538
539
  const i = v();
539
- if (!C(i) || i.isCollapsed() || !K(o, ClipboardEvent)) return !1;
540
+ if (!C(i) || i.isCollapsed() || !A(o, ClipboardEvent)) return !1;
540
541
  const r = o;
541
542
  if (r.clipboardData === null) return !1;
542
543
  const s = r.clipboardData.getData("text");
@@ -584,7 +585,7 @@ function Xn({ newTab: t = !0, disabled: e = !1 }) {
584
585
  });
585
586
  }, [n, t, e]), null;
586
587
  }
587
- const te = 0, ue = 1, fe = 2, D = 0, Yn = 1, Fe = 2, Zn = 3, Gn = 4;
588
+ const te = 0, ue = 1, fe = 2, D = 0, Yn = 1, Oe = 2, Zn = 3, Gn = 4;
588
589
  function Qn(t, e, n, o, i) {
589
590
  if (t === null || n.size === 0 && o.size === 0 && !i) return D;
590
591
  const r = e._selection, s = t._selection;
@@ -606,7 +607,7 @@ function Qn(t, e, n, o, i) {
606
607
  if (a.length === 0) return D;
607
608
  if (a.length > 1) {
608
609
  const h = e._nodeMap, b = h.get(r.anchor.key), $ = h.get(s.anchor.key);
609
- return b && $ && !t._nodeMap.has(b.__key) && P(b) && b.__text.length === 1 && r.anchor.offset === 1 ? Fe : D;
610
+ return b && $ && !t._nodeMap.has(b.__key) && P(b) && b.__text.length === 1 && r.anchor.offset === 1 ? Oe : D;
610
611
  }
611
612
  const l = a[0], c = t._nodeMap.get(l.__key);
612
613
  if (!P(c) || !P(l) || c.__mode !== l.__mode) return D;
@@ -615,7 +616,7 @@ function Qn(t, e, n, o, i) {
615
616
  const u = r.anchor, m = s.anchor;
616
617
  if (u.key !== m.key || u.type !== "text") return D;
617
618
  const p = u.offset, E = m.offset, w = f.length - d.length;
618
- return w === 1 && E === p - 1 ? Fe : w === -1 && E === p + 1 ? Zn : w === -1 && E === p ? Gn : D;
619
+ return w === 1 && E === p - 1 ? Oe : w === -1 && E === p + 1 ? Zn : w === -1 && E === p ? Gn : D;
619
620
  }
620
621
  function er(t, e) {
621
622
  let n = Date.now(), o = D;
@@ -635,18 +636,18 @@ function er(t, e) {
635
636
  return n = d, o = f, u;
636
637
  };
637
638
  }
638
- function Oe(t) {
639
+ function Ie(t) {
639
640
  t.undoStack = [], t.redoStack = [], t.current = null;
640
641
  }
641
642
  function tr(t, e, n) {
642
643
  const o = er(t, n);
643
- return B(t.registerCommand(Ot, () => (function(r, s) {
644
+ return B(t.registerCommand(It, () => (function(r, s) {
644
645
  const a = s.redoStack, l = s.undoStack;
645
646
  if (l.length !== 0) {
646
647
  const c = s.current, d = l.pop();
647
648
  c !== null && (a.push(c), r.dispatchCommand(Y, !0)), l.length === 0 && r.dispatchCommand(Z, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: "historic" });
648
649
  }
649
- }(t, e), !0), g), t.registerCommand(Ft, () => (function(r, s) {
650
+ }(t, e), !0), g), t.registerCommand(Ot, () => (function(r, s) {
650
651
  const a = s.redoStack, l = s.undoStack;
651
652
  if (a.length !== 0) {
652
653
  const c = s.current;
@@ -654,7 +655,7 @@ function tr(t, e, n) {
654
655
  const d = a.pop();
655
656
  a.length === 0 && r.dispatchCommand(Y, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: "historic" });
656
657
  }
657
- }(t, e), !0), g), t.registerCommand(Mt, () => (Oe(e), !1), g), t.registerCommand(Tt, () => (Oe(e), t.dispatchCommand(Y, !1), t.dispatchCommand(Z, !1), !0), g), t.registerUpdateListener(({ editorState: r, prevEditorState: s, dirtyLeaves: a, dirtyElements: l, tags: c }) => {
658
+ }(t, e), !0), g), t.registerCommand(Mt, () => (Ie(e), !1), g), t.registerCommand(Tt, () => (Ie(e), t.dispatchCommand(Y, !1), t.dispatchCommand(Z, !1), !0), g), t.registerUpdateListener(({ editorState: r, prevEditorState: s, dirtyLeaves: a, dirtyElements: l, tags: c }) => {
658
659
  const d = e.current, f = e.redoStack, u = e.undoStack, m = d === null ? null : d.editorState;
659
660
  if (d !== null && r === m) return;
660
661
  const p = o(s, r, d, a, l, c);
@@ -762,7 +763,7 @@ const Ye = 200, sr = ({
762
763
  maxWords: l = Ye,
763
764
  onChange: c
764
765
  }) => {
765
- const { switchLanguage: d } = vn(), f = mn(), [u] = F(() => Ae()), [m, p] = F(0), [E, w] = F(0), h = Be(null), b = {
766
+ const { switchLanguage: d } = vn(), f = mn(), [u] = O(() => Fe()), [m, p] = O(0), [E, w] = O(0), h = Be(null), b = {
766
767
  html: {
767
768
  export: cn
768
769
  },
@@ -772,24 +773,24 @@ const Ye = 200, sr = ({
772
773
  onError(S) {
773
774
  throw S;
774
775
  },
775
- nodes: [je, He, We, qt, oe, Je, re],
776
+ nodes: [He, je, We, qt, oe, Je, re],
776
777
  editorState: (S) => {
777
- const _ = new DOMParser().parseFromString(e, "text/html"), T = jt(S, _), O = z();
778
- if (O.clear(), dn(e))
778
+ const _ = new DOMParser().parseFromString(e, "text/html"), T = Ht(S, _), I = z();
779
+ if (I.clear(), dn(e))
779
780
  T.forEach((U) => {
780
- O.append(U);
781
+ I.append(U);
781
782
  });
782
783
  else {
783
784
  const U = me();
784
785
  T.forEach((L, V) => {
785
- V === 0 ? (U.append(L), O.append(U)) : O.append(L);
786
+ V === 0 ? (U.append(L), I.append(U)) : I.append(L);
786
787
  });
787
788
  }
788
789
  }
789
790
  }, $ = (S) => S.trim().length === 0 ? 0 : S.split(" ").length, k = (S, N) => {
790
791
  S.read(() => {
791
792
  let _ = "";
792
- p($(z().getTextContent().replace(/\s+/g, " ").trim())), _ = un(Ht(N)), c(_);
793
+ p($(z().getTextContent().replace(/\s+/g, " ").trim())), _ = un(jt(N)), c(_);
793
794
  });
794
795
  };
795
796
  return x(() => {
@@ -797,20 +798,20 @@ const Ye = 200, sr = ({
797
798
  }, [t, d]), x(() => {
798
799
  const S = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
799
800
  p($(S));
800
- }, []), /* @__PURE__ */ A("div", { className: M.editor__container, children: [
801
- /* @__PURE__ */ A("div", { className: M.editor__header, children: [
801
+ }, []), /* @__PURE__ */ F("div", { className: M.editor__container, children: [
802
+ /* @__PURE__ */ F("div", { className: M.editor__header, children: [
802
803
  /* @__PURE__ */ y(hn, { label: o, info: i, required: r }),
803
- /* @__PURE__ */ A("div", { className: M["editor__header-word-count"], children: [
804
+ /* @__PURE__ */ F("div", { className: M["editor__header-word-count"], children: [
804
805
  /* @__PURE__ */ y("span", { className: ln({ [M["editor__header-word-count--alert"]]: m > l }), children: m }),
805
806
  " / ",
806
807
  l
807
808
  ] })
808
809
  ] }),
809
- /* @__PURE__ */ y("div", { className: M.editor, children: /* @__PURE__ */ A(wn, { initialConfig: b, children: [
810
+ /* @__PURE__ */ y("div", { className: M.editor, children: /* @__PURE__ */ F(wn, { initialConfig: b, children: [
810
811
  /* @__PURE__ */ y(fn, { editorScrollPosition: E }),
811
- /* @__PURE__ */ A("div", { className: M["editor__field-wrapper"], children: [
812
+ /* @__PURE__ */ F("div", { className: M["editor__field-wrapper"], children: [
812
813
  /* @__PURE__ */ y(
813
- On,
814
+ In,
814
815
  {
815
816
  contentEditable: /* @__PURE__ */ y(
816
817
  zn,
@@ -828,7 +829,7 @@ const Ye = 200, sr = ({
828
829
  }
829
830
  ),
830
831
  placeholder: /* @__PURE__ */ y("div", { className: M.editor__placeholder, children: n }),
831
- ErrorBoundary: Hn
832
+ ErrorBoundary: jn
832
833
  }
833
834
  ),
834
835
  /* @__PURE__ */ y(ir, {}),
@@ -843,7 +844,7 @@ const Ye = 200, sr = ({
843
844
  ] }) }),
844
845
  s !== "" && /* @__PURE__ */ y(pn, { level: "error", feedback: s })
845
846
  ] });
846
- }, qr = ({
847
+ }, Vr = ({
847
848
  currentLanguage: t = "NL",
848
849
  initialValue: e = "",
849
850
  placeholder: n = "",
@@ -869,6 +870,6 @@ const Ye = 200, sr = ({
869
870
  ) });
870
871
  export {
871
872
  sr as Rte,
872
- qr as RteEditor
873
+ Vr as RteEditor
873
874
  };
874
875
  //# sourceMappingURL=RteEditor.js.map