@uva-glass/component-library 3.54.3 → 3.55.0

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 (69) hide show
  1. package/dist/{Lexical.prod-A4JuKqM3.js → Lexical.prod-o6Eq_uLx.js} +27 -27
  2. package/dist/{Lexical.prod-A4JuKqM3.js.map → Lexical.prod-o6Eq_uLx.js.map} +1 -1
  3. package/dist/{LexicalClipboard.prod-CoyZP29w.js → LexicalClipboard.prod-CnUrf2_p.js} +20 -20
  4. package/dist/{LexicalClipboard.prod-CoyZP29w.js.map → LexicalClipboard.prod-CnUrf2_p.js.map} +1 -1
  5. package/dist/{LexicalExtension.prod-DFPuTMk1.js → LexicalExtension.prod-CanXuzFO.js} +19 -19
  6. package/dist/{LexicalExtension.prod-DFPuTMk1.js.map → LexicalExtension.prod-CanXuzFO.js.map} +1 -1
  7. package/dist/{LexicalLink.prod-Dp06n3Hn.js → LexicalLink.prod-DAVbKER8.js} +4 -4
  8. package/dist/{LexicalLink.prod-Dp06n3Hn.js.map → LexicalLink.prod-DAVbKER8.js.map} +1 -1
  9. package/dist/{LexicalList.prod-D3TdO_Pq.js → LexicalList.prod-C6cknPBV.js} +4 -4
  10. package/dist/{LexicalList.prod-D3TdO_Pq.js.map → LexicalList.prod-C6cknPBV.js.map} +1 -1
  11. package/dist/{LexicalSelection.prod-BapitO0n.js → LexicalSelection.prod-B8GGrzJ3.js} +18 -18
  12. package/dist/{LexicalSelection.prod-BapitO0n.js.map → LexicalSelection.prod-B8GGrzJ3.js.map} +1 -1
  13. package/dist/{LexicalTable.prod-bzYpvqMi.js → LexicalTable.prod-upbwOtcE.js} +5 -5
  14. package/dist/{LexicalTable.prod-bzYpvqMi.js.map → LexicalTable.prod-upbwOtcE.js.map} +1 -1
  15. package/dist/{LexicalUtils.prod-CAsHFX57.js → LexicalUtils.prod-CF7x-KWm.js} +5 -5
  16. package/dist/{LexicalUtils.prod-CAsHFX57.js.map → LexicalUtils.prod-CF7x-KWm.js.map} +1 -1
  17. package/dist/RteEditor.module-CoTOIw5i.js +41 -0
  18. package/dist/RteEditor.module-CoTOIw5i.js.map +1 -0
  19. package/dist/{TableCellResizerPlugin-ffA1s2mD.js → TableCellResizerPlugin-qMtSAoKT.js} +4 -4
  20. package/dist/{TableCellResizerPlugin-ffA1s2mD.js.map → TableCellResizerPlugin-qMtSAoKT.js.map} +1 -1
  21. package/dist/{TablePlugin-CzmrXpxk.js → TablePlugin-BRZcXq73.js} +28 -28
  22. package/dist/{TablePlugin-CzmrXpxk.js.map → TablePlugin-BRZcXq73.js.map} +1 -1
  23. package/dist/assets/RteEditor.css +1 -1
  24. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  25. package/dist/components/FormInput/FormInput.js +1 -1
  26. package/dist/components/InputField/InputField.stories.js +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  28. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  29. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  30. package/dist/components/MultiSelect/index.js +1 -1
  31. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  32. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  33. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  34. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  35. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
  36. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +108 -105
  37. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
  38. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +3 -3
  39. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  40. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +35 -31
  41. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
  42. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +121 -118
  43. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  44. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  45. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +12 -12
  46. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
  47. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  48. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  49. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  50. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -5
  51. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
  52. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  53. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +70 -65
  54. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  55. package/dist/components/RteEditor/Plugins/index.js +2 -2
  56. package/dist/components/RteEditor/RteEditor.d.ts +4 -2
  57. package/dist/components/RteEditor/RteEditor.js +218 -215
  58. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  59. package/dist/components/RteEditor/RteEditor.stories.js +23 -19
  60. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  61. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
  62. package/dist/components/RteEditor/helpers.js +4 -4
  63. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +2 -2
  64. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +3 -3
  65. package/dist/components/index.js +1 -1
  66. package/dist/index.js +1 -1
  67. package/package.json +18 -18
  68. package/dist/RteEditor.module-DaBh86FK.js +0 -41
  69. package/dist/RteEditor.module-DaBh86FK.js.map +0 -1
@@ -1,24 +1,24 @@
1
- import { jsx as f, jsxs as A, Fragment as Pe } from "react/jsx-runtime";
1
+ import { jsx as f, jsxs as M, Fragment as Pe } from "react/jsx-runtime";
2
2
  import { t as We, r as Ve, o as D } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { az as Le, K, V as Ge, $ as g, aI as oe, aC as ae, aJ as q, P as De, Y as Xe, y as B, w as h, e as H, ab as Qe, E as c, b4 as Ze, o as et, n as tt, f as rt, b5 as nt, b6 as ot, a7 as at, i as T, aP as st, U as it, b7 as lt, b8 as ut, D as re, b9 as dt, ba as ct, ag as ft, c as mt, m as Te, a1 as pt, bb as gt, bc as le, d as ue, a6 as ht, a4 as Q, a5 as vt, ah as Re, bd as de, X as yt, W as Ct, N as bt, be as ce, R as Et, bf as wt, bg as St, b0 as xt, ar as Ie, a9 as Nt, q as _t, a8 as $t, bh as kt, aa as Pt, a3 as Lt, a2 as Dt, B as Tt, aR as Y, aQ as W, bi as Rt, bj as It, aT as Bt, bk as ne, aS as Ft, bl as Mt, bm as At, bn as Kt, bo as zt, aG as Ut } from "../../Lexical.prod-A4JuKqM3.js";
4
- import * as Ht from "react";
5
- import { useMemo as X, useLayoutEffect as J, useEffect as b, useState as F, Suspense as Ot, forwardRef as Be, useCallback as qt, Component as Jt, createElement as fe, createContext as jt, useId as Yt } from "react";
6
- import { a as Wt, T as Vt } from "../../TableCellResizerPlugin-ffA1s2mD.js";
7
- import { n as Gt, p as se, a as Xt, g as Fe, H as Qt, o as Zt } from "../../LexicalExtension.prod-DFPuTMk1.js";
3
+ import { aA as Le, K as z, V as Xe, $ as g, aJ as oe, aD as ae, aK as J, P as De, Y as Ge, y as A, w as h, e as q, ab as Qe, E as c, b4 as Ze, o as et, n as tt, f as rt, b5 as nt, b6 as ot, a7 as at, i as T, aP as st, U as it, b7 as lt, b8 as ut, D as re, b9 as dt, ba as ct, ag as ft, c as mt, m as Te, a1 as pt, bb as gt, bc as le, d as ue, a6 as ht, a4 as Q, a5 as vt, ah as Re, bd as de, X as yt, W as Ct, N as bt, be as ce, R as Et, bf as wt, bg as St, b0 as xt, as as Be, a9 as Nt, q as _t, a8 as $t, bh as kt, aa as Pt, a3 as Lt, a2 as Dt, B as Tt, aR as Y, aQ as W, bi as Rt, bj as Bt, aT as It, bk as ne, aS as At, bl as Ft, bm as Kt, bn as Mt, bo as zt, aH as Ht } from "../../Lexical.prod-o6Eq_uLx.js";
4
+ import * as Ut from "react";
5
+ import { useMemo as G, useLayoutEffect as j, useEffect as E, useState as F, Suspense as Ot, forwardRef as Ie, useCallback as qt, Component as Jt, createElement as fe, createContext as jt, useId as Yt } from "react";
6
+ import { a as Wt, T as Vt } from "../../TableCellResizerPlugin-qMtSAoKT.js";
7
+ import { n as Xt, p as se, a as Gt, g as Ae, H as Qt, o as Zt } from "../../LexicalExtension.prod-CanXuzFO.js";
8
8
  import { flushSync as er, createPortal as tr } from "react-dom";
9
- import { R as me, F as pe, m as rr, g as nr } from "../../LexicalClipboard.prod-CoyZP29w.js";
10
- import { A as ge, Z as he, n as ve } from "../../LexicalSelection.prod-BapitO0n.js";
11
- import { A as U, y as or, b as ye } from "../../LexicalUtils.prod-CAsHFX57.js";
12
- import { u as Me, s as Ae, N as ar, L as Ce } from "../../LexicalList.prod-D3TdO_Pq.js";
13
- import { E as Ke, V as sr, $ as ze, p as ir, Y as lr } from "../../LexicalLink.prod-Dp06n3Hn.js";
14
- import { m as ur, C as dr, _ as Ue, a as cr, A as fr, F as mr, K as He, z as pr } from "../../LexicalTable.prod-bzYpvqMi.js";
9
+ import { R as me, F as pe, m as rr, g as nr } from "../../LexicalClipboard.prod-CnUrf2_p.js";
10
+ import { A as ge, Z as he, n as ve } from "../../LexicalSelection.prod-B8GGrzJ3.js";
11
+ import { A as O, y as or, b as ye } from "../../LexicalUtils.prod-CF7x-KWm.js";
12
+ import { u as Fe, s as Ke, N as ar, L as Ce } from "../../LexicalList.prod-C6cknPBV.js";
13
+ import { E as Me, V as sr, $ as ze, p as ir, Y as lr } from "../../LexicalLink.prod-DAVbKER8.js";
14
+ import { m as ur, C as dr, _ as He, a as cr, A as fr, F as mr, K as Ue, z as pr } from "../../LexicalTable.prod-upbwOtcE.js";
15
15
  import { c as be } from "../../clsx-OuTLNxxd.js";
16
16
  import { exportMap as gr, mergeBoldStrongTags as hr, cleanUpTable as vr } from "./helpers.js";
17
17
  import { validateUrl as yr, MATCHERS as Cr } from "./Plugins/LinkPlugin/helpers.js";
18
- import { s as R } from "../../RteEditor.module-DaBh86FK.js";
18
+ import { s as R } from "../../RteEditor.module-CoTOIw5i.js";
19
19
  import { ToolBarPlugin as br } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
20
20
  import { useTranslation as Er } from "./hooks/useTranslation.js";
21
- import "../../TablePlugin-CzmrXpxk.js";
21
+ import "../../TablePlugin-BRZcXq73.js";
22
22
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
23
23
  import "./hooks/components/Flyout.js";
24
24
  import "../Accordion/Accordion.js";
@@ -48,25 +48,25 @@ import { EditorHeader as Nr } from "./EditorHeader/EditorHeader.js";
48
48
  import { LanguageProvider as _r, useLanguage as $r } from "./Providers/LanguageProvider.js";
49
49
  import { TableWrapperNode as kr } from "./nodes/TableWrapperNode/TableWrapperNode.js";
50
50
  import { CourseCatalogueNode as Pr, CourseCatalogueLinkPlugin as Lr } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
51
- const Oe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Dr = Oe ? J : b, V = { tag: oe };
51
+ const Oe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Dr = Oe ? j : E, V = { tag: oe };
52
52
  function Tr({ initialConfig: r, children: e }) {
53
- const t = X(() => {
53
+ const t = G(() => {
54
54
  const { theme: n, namespace: o, nodes: s, onError: a, editorState: i, html: l } = r, d = We(null, n), u = Le({ editable: r.editable, html: l, namespace: o, nodes: s, onError: (m) => a(m, u), theme: n });
55
55
  return (function(m, p) {
56
56
  if (p !== null) {
57
57
  if (p === void 0) m.update(() => {
58
- const w = K();
59
- if (w.isEmpty()) {
60
- const v = Ge();
61
- w.append(v);
58
+ const C = z();
59
+ if (C.isEmpty()) {
60
+ const v = Xe();
61
+ C.append(v);
62
62
  const N = Oe ? document.activeElement : null;
63
63
  (g() !== null || N !== null && N === m.getRootElement()) && v.select();
64
64
  }
65
65
  }, V);
66
66
  else if (p !== null) switch (typeof p) {
67
67
  case "string": {
68
- const w = m.parseEditorState(p);
69
- m.setEditorState(w, V);
68
+ const C = m.parseEditorState(p);
69
+ m.setEditorState(C, V);
70
70
  break;
71
71
  }
72
72
  case "object":
@@ -74,7 +74,7 @@ function Tr({ initialConfig: r, children: e }) {
74
74
  break;
75
75
  case "function":
76
76
  m.update(() => {
77
- K().isEmpty() && p(m);
77
+ z().isEmpty() && p(m);
78
78
  }, V);
79
79
  }
80
80
  }
@@ -86,36 +86,36 @@ function Tr({ initialConfig: r, children: e }) {
86
86
  }, []), f(Ve.Provider, { value: t, children: e });
87
87
  }
88
88
  const Rr = ae({ name: "@lexical/react/ReactProvider" });
89
- function Ir() {
90
- return K().getTextContent();
89
+ function Br() {
90
+ return z().getTextContent();
91
91
  }
92
- function Br(r, e = !0) {
92
+ function Ir(r, e = !0) {
93
93
  if (r) return !1;
94
- let t = Ir();
94
+ let t = Br();
95
95
  return e && (t = t.trim()), t === "";
96
96
  }
97
- function Fr(r) {
98
- if (!Br(r, !1)) return !1;
99
- const e = K().getChildren(), t = e.length;
97
+ function Ar(r) {
98
+ if (!Ir(r, !1)) return !1;
99
+ const e = z().getChildren(), t = e.length;
100
100
  if (t > 1) return !1;
101
101
  for (let n = 0; n < t; n++) {
102
102
  const o = e[n];
103
- if (q(o)) return !1;
103
+ if (J(o)) return !1;
104
104
  if (De(o)) {
105
- if (!Xe(o) || o.__indent !== 0) return !1;
105
+ if (!Ge(o) || o.__indent !== 0) return !1;
106
106
  const s = o.getChildren(), a = s.length;
107
107
  for (let i = 0; i < a; i++) {
108
108
  const l = s[n];
109
- if (!B(l)) return !1;
109
+ if (!A(l)) return !1;
110
110
  }
111
111
  }
112
112
  }
113
113
  return !0;
114
114
  }
115
115
  function qe(r) {
116
- return () => Fr(r);
116
+ return () => Ar(r);
117
117
  }
118
- function Mr(r) {
118
+ function Fr(r) {
119
119
  const e = window.location.origin, t = (n) => {
120
120
  if (n.origin !== e) return;
121
121
  const o = r.getRootElement();
@@ -133,16 +133,16 @@ function Mr(r) {
133
133
  if (i && i.functionId === "makeChanges") {
134
134
  const l = i.args;
135
135
  if (l) {
136
- const [d, u, m, p, w] = l;
136
+ const [d, u, m, p, C] = l;
137
137
  r.update(() => {
138
138
  const v = g();
139
139
  if (h(v)) {
140
140
  const N = v.anchor;
141
- let E = N.getNode(), C = 0, y = 0;
142
- if (B(E) && d >= 0 && u >= 0 && (C = d, y = d + u, v.setTextNodeRange(E, C, E, y)), C === y && m === "" || (v.insertRawText(m), E = N.getNode()), B(E)) {
143
- C = p, y = p + w;
144
- const $ = E.getTextContentSize();
145
- C = C > $ ? $ : C, y = y > $ ? $ : y, v.setTextNodeRange(E, C, E, y);
141
+ let b = N.getNode(), w = 0, y = 0;
142
+ if (A(b) && d >= 0 && u >= 0 && (w = d, y = d + u, v.setTextNodeRange(b, w, b, y)), w === y && m === "" || (v.insertRawText(m), b = N.getNode()), A(b)) {
143
+ w = p, y = p + C;
144
+ const _ = b.getTextContentSize();
145
+ w = w > _ ? _ : w, y = y > _ ? _ : y, v.setTextNodeRange(b, w, b, y);
146
146
  }
147
147
  n.stopImmediatePropagation();
148
148
  }
@@ -167,22 +167,22 @@ function Ee(r, e) {
167
167
  }
168
168
  return null;
169
169
  }
170
- const z = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Ar = z && "documentMode" in document ? document.documentMode : null, Kr = z && /Mac|iPod|iPhone|iPad/.test(navigator.platform), zr = !(!z || !("InputEvent" in window) || Ar) && "getTargetRanges" in new window.InputEvent("input"), Ur = z && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), we = z && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Hr = z && /^(?=.*Chrome).*/i.test(navigator.userAgent), Or = z && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Kr && !Hr, Se = tt("DRAG_DROP_PASTE_FILE");
171
- function G(r) {
170
+ const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Kr = H && "documentMode" in document ? document.documentMode : null, Mr = H && /Mac|iPod|iPhone|iPad/.test(navigator.platform), zr = !(!H || !("InputEvent" in window) || Kr) && "getTargetRanges" in new window.InputEvent("input"), Hr = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), we = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ur = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), Or = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Mr && !Ur, Se = tt("DRAG_DROP_PASTE_FILE");
171
+ function X(r) {
172
172
  let e = null;
173
- if (U(r, DragEvent) ? e = r.dataTransfer : U(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
173
+ if (O(r, DragEvent) ? e = r.dataTransfer : O(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
174
174
  const t = e.types, n = t.includes("Files"), o = t.includes("text/html") || t.includes("text/plain");
175
175
  return [n, Array.from(e.files), o];
176
176
  }
177
177
  function xe(r) {
178
178
  const e = re(r);
179
- return q(e);
179
+ return J(e);
180
180
  }
181
181
  function Z(r) {
182
182
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
183
183
  }
184
184
  function qr(r) {
185
- return H(r.registerCommand(Tt, (e) => {
185
+ return q(r.registerCommand(Tt, (e) => {
186
186
  const t = g();
187
187
  return !!T(t) && (t.clear(), !0);
188
188
  }, c), r.registerCommand(Q, (e) => {
@@ -230,7 +230,7 @@ function qr(r) {
230
230
  return !!h(e) && (e.insertParagraph(), !0);
231
231
  }, c), r.registerCommand(St, () => {
232
232
  const e = xt(), t = g();
233
- return h(t) && (e.setFormat(t.format), e.setStyle(t.style)), Ie([e]), !0;
233
+ return h(t) && (e.setFormat(t.format), e.setStyle(t.style)), Be([e]), !0;
234
234
  }, c), r.registerCommand(wt, () => ye((e) => {
235
235
  const t = e.getIndent();
236
236
  e.setIndent(t + 1);
@@ -244,7 +244,7 @@ function qr(r) {
244
244
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
245
245
  } else if (h(t)) {
246
246
  const n = ce(t.focus, !0);
247
- if (!e.shiftKey && q(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
247
+ if (!e.shiftKey && J(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
248
248
  }
249
249
  return !1;
250
250
  }, c), r.registerCommand(bt, (e) => {
@@ -255,10 +255,10 @@ function qr(r) {
255
255
  } else if (h(t)) {
256
256
  if ((function(o) {
257
257
  const s = o.focus;
258
- return s.key === "root" && s.offset === K().getChildrenSize();
258
+ return s.key === "root" && s.offset === z().getChildrenSize();
259
259
  })(t)) return e.preventDefault(), !0;
260
260
  const n = ce(t.focus, !1);
261
- if (!e.shiftKey && q(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
261
+ if (!e.shiftKey && J(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
262
262
  }
263
263
  return !1;
264
264
  }, c), r.registerCommand(Ct, (e) => {
@@ -306,7 +306,7 @@ function qr(r) {
306
306
  const t = g();
307
307
  if (!h(t)) return !1;
308
308
  if (Z(t), e !== null) {
309
- if ((we || Ur || Or) && zr) return !1;
309
+ if ((we || Hr || Or) && zr) return !1;
310
310
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(le, !1);
311
311
  }
312
312
  return r.dispatchCommand(ue, void 0);
@@ -314,14 +314,14 @@ function qr(r) {
314
314
  const e = g();
315
315
  return !!h(e) && (r.blur(), !0);
316
316
  }, c), r.registerCommand(ct, (e) => {
317
- const [, t] = G(e);
317
+ const [, t] = X(e);
318
318
  if (t.length > 0) {
319
319
  const o = Ee(e.clientX, e.clientY);
320
320
  if (o !== null) {
321
321
  const { offset: s, node: a } = o, i = re(a);
322
322
  if (i !== null) {
323
323
  const l = ft();
324
- if (B(i)) l.anchor.set(i.getKey(), s, "text"), l.focus.set(i.getKey(), s, "text");
324
+ if (A(i)) l.anchor.set(i.getKey(), s, "text"), l.focus.set(i.getKey(), s, "text");
325
325
  else {
326
326
  const u = i.getParentOrThrow().getKey(), m = i.getIndexWithinParent() + 1;
327
327
  l.anchor.set(u, m, "element"), l.focus.set(u, m, "element");
@@ -336,27 +336,27 @@ function qr(r) {
336
336
  const n = g();
337
337
  return !!h(n);
338
338
  }, c), r.registerCommand(dt, (e) => {
339
- const [t] = G(e), n = g();
339
+ const [t] = X(e), n = g();
340
340
  return !(t && !h(n));
341
341
  }, c), r.registerCommand(ut, (e) => {
342
- const [t] = G(e), n = g();
342
+ const [t] = X(e), n = g();
343
343
  if (t && !h(n)) return !1;
344
344
  const o = Ee(e.clientX, e.clientY);
345
345
  if (o !== null) {
346
346
  const s = re(o.node);
347
- q(s) && e.preventDefault();
347
+ J(s) && e.preventDefault();
348
348
  }
349
349
  return !0;
350
- }, c), r.registerCommand(it, () => (lt(), !0), c), r.registerCommand(st, (e) => (pe(r, U(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(at, (e) => ((async function(t, n) {
351
- await pe(n, U(t, ClipboardEvent) ? t : null), n.update(() => {
350
+ }, c), r.registerCommand(it, () => (lt(), !0), c), r.registerCommand(st, (e) => (pe(r, O(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(at, (e) => ((async function(t, n) {
351
+ await pe(n, O(t, ClipboardEvent) ? t : null), n.update(() => {
352
352
  const o = g();
353
353
  h(o) ? o.removeText() : T(o) && o.getNodes().forEach((s) => s.remove());
354
354
  });
355
355
  })(e, r), !0), c), r.registerCommand(et, (e) => {
356
- const [, t, n] = G(e);
356
+ const [, t, n] = X(e);
357
357
  return t.length > 0 && !n ? (r.dispatchCommand(Se, t), !0) : rt(e.target) && nt(e.target) ? !1 : g() !== null && ((function(o, s) {
358
358
  o.preventDefault(), s.update(() => {
359
- const a = g(), i = U(o, InputEvent) || U(o, KeyboardEvent) ? null : o.clipboardData;
359
+ const a = g(), i = O(o, InputEvent) || O(o, KeyboardEvent) ? null : o.clipboardData;
360
360
  i != null && a !== null && me(i, a, s);
361
361
  }, { tag: ot });
362
362
  })(e, r), !0);
@@ -374,7 +374,7 @@ function Jr(r, ...e) {
374
374
  for (const o of e) n.append("v", o);
375
375
  throw t.search = n.toString(), Error(`Minified Lexical error #${r}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
376
376
  }
377
- const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : b;
377
+ const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : E;
378
378
  function jr({ editor: r, ErrorBoundary: e }) {
379
379
  return (function(t, n) {
380
380
  const [o, s] = F(() => t.getDecorators());
@@ -382,9 +382,9 @@ function jr({ editor: r, ErrorBoundary: e }) {
382
382
  er(() => {
383
383
  s(a);
384
384
  });
385
- }), [t]), b(() => {
385
+ }), [t]), E(() => {
386
386
  s(t.getDecorators());
387
- }, [t]), X(() => {
387
+ }, [t]), G(() => {
388
388
  const a = [], i = Object.keys(o);
389
389
  for (let l = 0; l < i.length; l++) {
390
390
  const d = i[l], u = f(n, { onError: (p) => t._onError(p), children: f(Ot, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
@@ -396,7 +396,7 @@ function jr({ editor: r, ErrorBoundary: e }) {
396
396
  }
397
397
  function Yr({ editor: r, ErrorBoundary: e }) {
398
398
  return (function(t) {
399
- const n = Gt.maybeFromEditor(t);
399
+ const n = Xt.maybeFromEditor(t);
400
400
  if (n && n.hasExtensionByName(Rr.name)) {
401
401
  for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && Jr(320, o);
402
402
  return !0;
@@ -410,8 +410,8 @@ function Ne(r) {
410
410
  function Wr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
411
411
  const [n] = D();
412
412
  return (function(o) {
413
- ie(() => H(qr(o), Mr(o)), [o]);
414
- })(n), A(Pe, { children: [r, f(Vr, { content: e }), f(Yr, { editor: n, ErrorBoundary: t })] });
413
+ ie(() => q(qr(o), Fr(o)), [o]);
414
+ })(n), M(Pe, { children: [r, f(Vr, { content: e }), f(Yr, { editor: n, ErrorBoundary: t })] });
415
415
  }
416
416
  function Vr({ content: r }) {
417
417
  const [e] = D(), t = (function(o) {
@@ -421,7 +421,7 @@ function Vr({ content: r }) {
421
421
  const l = Ne(o);
422
422
  a(l);
423
423
  }
424
- return i(), H(o.registerUpdateListener(() => {
424
+ return i(), q(o.registerUpdateListener(() => {
425
425
  i();
426
426
  }), o.registerEditableListener(() => {
427
427
  i();
@@ -430,27 +430,27 @@ function Vr({ content: r }) {
430
430
  })(e), n = Wt();
431
431
  return t ? typeof r == "function" ? r(n) : r : null;
432
432
  }
433
- const Je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : b;
434
- function Gr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: s, ariaExpanded: a, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: p, autoCapitalize: w, className: v, id: N, role: E = "textbox", spellCheck: C = !0, style: y, tabIndex: $, "data-testid": I, ...L }, k) {
435
- const [S, P] = F(r.isEditable()), x = qt((_) => {
436
- _ && _.ownerDocument && _.ownerDocument.defaultView ? r.setRootElement(_) : r.setRootElement(null);
437
- }, [r]), M = X(() => /* @__PURE__ */ (function(..._) {
438
- return (j) => {
439
- for (const O of _) typeof O == "function" ? O(j) : O != null && (O.current = j);
433
+ const Je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : E;
434
+ function Xr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: s, ariaExpanded: a, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: p, autoCapitalize: C, className: v, id: N, role: b = "textbox", spellCheck: w = !0, style: y, tabIndex: _, "data-testid": B, ...P }, k) {
435
+ const [S, $] = F(r.isEditable()), K = qt((L) => {
436
+ L && L.ownerDocument && L.ownerDocument.defaultView ? r.setRootElement(L) : r.setRootElement(null);
437
+ }, [r]), x = G(() => /* @__PURE__ */ (function(...L) {
438
+ return (I) => {
439
+ for (const U of L) typeof U == "function" ? U(I) : U != null && (U.current = I);
440
440
  };
441
- })(k, x), [x, k]);
442
- return Je(() => (P(r.isEditable()), r.registerEditableListener((_) => {
443
- P(_);
444
- })), [r]), f("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? n : void 0, "aria-describedby": o, ...s != null ? { "aria-errormessage": s } : {}, "aria-expanded": S && E === "combobox" ? !!a : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": S ? m : void 0, "aria-readonly": !S || void 0, "aria-required": p, autoCapitalize: w, className: v, contentEditable: S, "data-testid": I, id: N, ref: M, role: E, spellCheck: C, style: y, tabIndex: $, ...L });
441
+ })(k, K), [K, k]);
442
+ return Je(() => ($(r.isEditable()), r.registerEditableListener((L) => {
443
+ $(L);
444
+ })), [r]), f("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? n : void 0, "aria-describedby": o, ...s != null ? { "aria-errormessage": s } : {}, "aria-expanded": S && b === "combobox" ? !!a : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": S ? m : void 0, "aria-readonly": !S || void 0, "aria-required": p, autoCapitalize: C, className: v, contentEditable: S, "data-testid": B, id: N, ref: x, role: b, spellCheck: w, style: y, tabIndex: _, ...P });
445
445
  }
446
- const Xr = Be(Gr);
446
+ const Gr = Ie(Xr);
447
447
  function _e(r) {
448
448
  return r.getEditorState().read(qe(r.isComposing()));
449
449
  }
450
- const Qr = Be(Zr);
450
+ const Qr = Ie(Zr);
451
451
  function Zr(r, e) {
452
452
  const { placeholder: t, ...n } = r, [o] = D();
453
- return A(Pe, { children: [f(Xr, { editor: o, ...n, ref: e }), t != null && f(en, { editor: o, content: t })] });
453
+ return M(Pe, { children: [f(Gr, { editor: o, ...n, ref: e }), t != null && f(en, { editor: o, content: t })] });
454
454
  }
455
455
  function en({ content: r, editor: e }) {
456
456
  const t = (function(a) {
@@ -460,14 +460,14 @@ function en({ content: r, editor: e }) {
460
460
  const u = _e(a);
461
461
  l(u);
462
462
  }
463
- return d(), H(a.registerUpdateListener(() => {
463
+ return d(), q(a.registerUpdateListener(() => {
464
464
  d();
465
465
  }), a.registerEditableListener(() => {
466
466
  d();
467
467
  }));
468
468
  }, [a]), i;
469
469
  })(e), [n, o] = F(e.isEditable());
470
- if (J(() => (o(e.isEditable()), e.registerEditableListener((a) => {
470
+ if (j(() => (o(e.isEditable()), e.registerEditableListener((a) => {
471
471
  o(a);
472
472
  })), [e]), !t) return null;
473
473
  let s = null;
@@ -538,7 +538,7 @@ function nn(r = [], e = []) {
538
538
  function on({ children: r, onError: e }) {
539
539
  return f(rn, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
540
540
  }
541
- const an = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : b;
541
+ const an = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : E;
542
542
  function sn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
543
543
  const [n] = D();
544
544
  return an(() => {
@@ -549,28 +549,28 @@ function sn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1
549
549
  }
550
550
  function ln({ hasStrictIndent: r = !1, shouldPreserveNumbering: e = !1 }) {
551
551
  const [t] = D();
552
- return b(() => {
553
- if (!t.hasNodes([Me, Ae])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
554
- }, [t]), b(() => H(Ce(t, { restoreNumbering: e }), r ? ar(t) : () => {
552
+ return E(() => {
553
+ if (!t.hasNodes([Fe, Ke])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
554
+ }, [t]), E(() => q(Ce(t, { restoreNumbering: e }), r ? ar(t) : () => {
555
555
  }), [t, r, e]), (function(n) {
556
- b(() => Ce(n), [n]);
556
+ E(() => Ce(n), [n]);
557
557
  })(t), null;
558
558
  }
559
559
  function un({ validateUrl: r, attributes: e }) {
560
560
  const [t] = D();
561
- return b(() => {
562
- if (!t.hasNodes([Ke])) throw new Error("LinkPlugin: LinkNode not registered on editor");
563
- }), b(() => sr(t, se({ attributes: e, validateUrl: r })), [t, r, e]), null;
561
+ return E(() => {
562
+ if (!t.hasNodes([Me])) throw new Error("LinkPlugin: LinkNode not registered on editor");
563
+ }), E(() => sr(t, se({ attributes: e, validateUrl: r })), [t, r, e]), null;
564
564
  }
565
565
  function dn(r, e, t, n) {
566
- b(() => {
566
+ E(() => {
567
567
  r.hasNodes([ze]) || (function(o, ...s) {
568
568
  const a = new URL("https://lexical.dev/docs/error"), i = new URLSearchParams();
569
569
  i.append("code", o);
570
570
  for (const l of s) i.append("v", l);
571
571
  throw a.search = i.toString(), Error(`Minified Lexical error #${o}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
572
572
  })(77);
573
- }), b(() => ir(r, { changeHandlers: t ? [t] : [], excludeParents: n ?? [], matchers: e }), [r, e, t, n]);
573
+ }), E(() => ir(r, { changeHandlers: t ? [t] : [], excludeParents: n ?? [], matchers: e }), [r, e, t, n]);
574
574
  }
575
575
  function cn({ matchers: r, onChange: e, excludeParents: t }) {
576
576
  const [n] = D();
@@ -578,60 +578,60 @@ function cn({ matchers: r, onChange: e, excludeParents: t }) {
578
578
  }
579
579
  function fn({ newTab: r = !0, disabled: e = !1 }) {
580
580
  const [t] = D();
581
- return b(() => lr(t, se({ disabled: e, newTab: r })), [t, r, e]), null;
581
+ return E(() => lr(t, se({ disabled: e, newTab: r })), [t, r, e]), null;
582
582
  }
583
583
  function mn(r, e, t, n, o) {
584
584
  if (r === null || t.size === 0 && n.size === 0 && !o) return 0;
585
585
  const s = e._selection, a = r._selection;
586
586
  if (o) return 1;
587
587
  if (!(h(s) && h(a) && a.isCollapsed() && s.isCollapsed())) return 0;
588
- const i = (function(C, y, $) {
589
- const I = C._nodeMap, L = [];
588
+ const i = (function(w, y, _) {
589
+ const B = w._nodeMap, P = [];
590
590
  for (const k of y) {
591
- const S = I.get(k);
592
- S !== void 0 && L.push(S);
591
+ const S = B.get(k);
592
+ S !== void 0 && P.push(S);
593
593
  }
594
- for (const [k, S] of $) {
594
+ for (const [k, S] of _) {
595
595
  if (!S) continue;
596
- const P = I.get(k);
597
- P === void 0 || Re(P) || L.push(P);
596
+ const $ = B.get(k);
597
+ $ === void 0 || Re($) || P.push($);
598
598
  }
599
- return L;
599
+ return P;
600
600
  })(e, t, n);
601
601
  if (i.length === 0) return 0;
602
602
  if (i.length > 1) {
603
- const C = e._nodeMap, y = C.get(s.anchor.key), $ = C.get(a.anchor.key);
604
- return y && $ && !r._nodeMap.has(y.__key) && B(y) && y.__text.length === 1 && s.anchor.offset === 1 ? 2 : 0;
603
+ const w = e._nodeMap, y = w.get(s.anchor.key), _ = w.get(a.anchor.key);
604
+ return y && _ && !r._nodeMap.has(y.__key) && A(y) && y.__text.length === 1 && s.anchor.offset === 1 ? 2 : 0;
605
605
  }
606
606
  const l = i[0], d = r._nodeMap.get(l.__key);
607
- if (!B(d) || !B(l) || d.__mode !== l.__mode) return 0;
607
+ if (!A(d) || !A(l) || d.__mode !== l.__mode) return 0;
608
608
  const u = d.__text, m = l.__text;
609
609
  if (u === m) return 0;
610
- const p = s.anchor, w = a.anchor;
611
- if (p.key !== w.key || p.type !== "text") return 0;
612
- const v = p.offset, N = w.offset, E = m.length - u.length;
613
- return E === 1 && N === v - 1 ? 2 : E === -1 && N === v + 1 ? 3 : E === -1 && N === v ? 4 : 0;
610
+ const p = s.anchor, C = a.anchor;
611
+ if (p.key !== C.key || p.type !== "text") return 0;
612
+ const v = p.offset, N = C.offset, b = m.length - u.length;
613
+ return b === 1 && N === v - 1 ? 2 : b === -1 && N === v + 1 ? 3 : b === -1 && N === v ? 4 : 0;
614
614
  }
615
615
  function pn(r, e) {
616
616
  let t = Date.now(), n = 0, o = Date.now(), s = 0, a = null;
617
617
  return (i, l, d, u, m, p) => {
618
- const w = Date.now();
619
- if (p.has(Mt) && (o = t, s = n, a = i), p.has(ne)) return n = 0, t = w, 2;
620
- p.has(At) && a && (t = o, n = s, i = a);
618
+ const C = Date.now();
619
+ if (p.has(Ft) && (o = t, s = n, a = i), p.has(ne)) return n = 0, t = C, 2;
620
+ p.has(Kt) && a && (t = o, n = s, i = a);
621
621
  const v = mn(i, l, u, m, r.isComposing()), N = (() => {
622
- const E = d === null || d.editor === r, C = p.has(Kt);
623
- if (!C && E && p.has(oe)) return 0;
622
+ const b = d === null || d.editor === r, w = p.has(Mt);
623
+ if (!w && b && p.has(oe)) return 0;
624
624
  if (v === 1) return 2;
625
625
  if (i === null) return 1;
626
626
  const y = l._selection;
627
627
  if (!(u.size > 0 || m.size > 0)) return y !== null ? 0 : 2;
628
- const $ = typeof e == "number" ? e : e.peek();
629
- return C === !1 && v !== 0 && v === n && w < t + $ && E || u.size === 1 && (function(I, L, k) {
630
- const S = L._nodeMap.get(I), P = k._nodeMap.get(I), x = L._selection, M = k._selection;
631
- return !(h(x) && h(M) && x.anchor.type === "element" && x.focus.type === "element" && M.anchor.type === "text" && M.focus.type === "text" || !B(S) || !B(P) || S.__parent !== P.__parent) && JSON.stringify(L.read(() => S.exportJSON())) === JSON.stringify(k.read(() => P.exportJSON()));
628
+ const _ = typeof e == "number" ? e : e.peek();
629
+ return w === !1 && v !== 0 && v === n && C < t + _ && b || u.size === 1 && (function(B, P, k) {
630
+ const S = P._nodeMap.get(B), $ = k._nodeMap.get(B), K = P._selection, x = k._selection;
631
+ return !(h(K) && h(x) && K.anchor.type === "element" && K.focus.type === "element" && x.anchor.type === "text" && x.focus.type === "text" || !A(S) || !A($) || S.__parent !== $.__parent) && JSON.stringify(P.read(() => S.exportJSON())) === JSON.stringify(k.read(() => $.exportJSON()));
632
632
  })(Array.from(u)[0], i, l) ? 0 : 1;
633
633
  })();
634
- return t = w, n = v, N;
634
+ return t = C, n = v, N;
635
635
  };
636
636
  }
637
637
  function $e(r) {
@@ -639,13 +639,13 @@ function $e(r) {
639
639
  }
640
640
  function je(r, e, t) {
641
641
  const n = pn(r, t);
642
- return H(r.registerCommand(Ft, () => ((function(s, a) {
642
+ return q(r.registerCommand(At, () => ((function(s, a) {
643
643
  const i = a.redoStack, l = a.undoStack;
644
644
  if (l.length !== 0) {
645
645
  const d = a.current, u = l.pop();
646
646
  d !== null && (i.push(d), s.dispatchCommand(Y, !0)), l.length === 0 && s.dispatchCommand(W, !1), a.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
647
647
  }
648
- })(r, e), !0), c), r.registerCommand(Bt, () => ((function(s, a) {
648
+ })(r, e), !0), c), r.registerCommand(It, () => ((function(s, a) {
649
649
  const i = a.redoStack, l = a.undoStack;
650
650
  if (i.length !== 0) {
651
651
  const d = a.current;
@@ -653,9 +653,9 @@ function je(r, e, t) {
653
653
  const u = i.pop();
654
654
  i.length === 0 && s.dispatchCommand(Y, !1), a.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
655
655
  }
656
- })(r, e), !0), c), r.registerCommand(It, () => ($e(e), !1), c), r.registerCommand(Rt, () => ($e(e), r.dispatchCommand(Y, !1), r.dispatchCommand(W, !1), !0), c), r.registerUpdateListener(({ editorState: s, prevEditorState: a, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
657
- const u = e.current, m = e.redoStack, p = e.undoStack, w = u === null ? null : u.editorState;
658
- if (u !== null && s === w) return;
656
+ })(r, e), !0), c), r.registerCommand(Bt, () => ($e(e), !1), c), r.registerCommand(Rt, () => ($e(e), r.dispatchCommand(Y, !1), r.dispatchCommand(W, !1), !0), c), r.registerUpdateListener(({ editorState: s, prevEditorState: a, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
657
+ const u = e.current, m = e.redoStack, p = e.undoStack, C = u === null ? null : u.editorState;
658
+ if (u !== null && s === C) return;
659
659
  const v = n(a, s, u, i, l, d);
660
660
  if (v === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), u !== null && (p.push({ ...u }), r.dispatchCommand(W, !0));
661
661
  else if (v === 2) return;
@@ -665,41 +665,41 @@ function je(r, e, t) {
665
665
  function Ye() {
666
666
  return { current: null, redoStack: [], undoStack: [] };
667
667
  }
668
- const te = ae({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => se({ delay: e, disabled: n, historyState: t(r) }), config: Ut({ createInitialHistoryState: Ye, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
668
+ const te = ae({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => se({ delay: e, disabled: n, historyState: t(r) }), config: Ht({ createInitialHistoryState: Ye, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
669
669
  const n = t.getOutput();
670
- return Fe(() => n.disabled.value ? void 0 : je(r, n.historyState.value, n.delay));
670
+ return Ae(() => n.disabled.value ? void 0 : je(r, n.historyState.value, n.delay));
671
671
  } });
672
672
  ae({ dependencies: [zt(te, { createInitialHistoryState: () => {
673
673
  throw new Error("SharedHistory did not inherit parent history");
674
674
  }, disabled: !0 })], name: "@lexical/history/SharedHistory", register(r, e, t) {
675
675
  const { output: n } = t.getDependency(te), o = (function(a) {
676
- return a ? Xt(a, te.name) : null;
676
+ return a ? Gt(a, te.name) : null;
677
677
  })(r._parentEditor);
678
678
  if (!o) return () => {
679
679
  };
680
680
  const s = o.output;
681
- return Fe(() => Qt(() => {
681
+ return Ae(() => Qt(() => {
682
682
  n.delay.value = s.delay.value, n.historyState.value = s.historyState.value, n.disabled.value = s.disabled.value;
683
683
  }));
684
684
  } });
685
685
  function gn({ delay: r, externalHistoryState: e }) {
686
686
  const [t] = D();
687
687
  return (function(n, o, s = 1e3) {
688
- const a = X(() => o || Ye(), [o]);
689
- b(() => je(n, a, s), [s, n, a]);
688
+ const a = G(() => o || Ye(), [o]);
689
+ E(() => je(n, a, s), [s, n, a]);
690
690
  })(t, e, r), null;
691
691
  }
692
692
  function hn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1, hasNestedTables: o = !1, hasFitNestedTables: s = !1 }) {
693
693
  const [a] = D();
694
- b(() => {
695
- ur(a) !== n && (dr(a, n), a.registerNodeTransform(Ue, () => {
694
+ E(() => {
695
+ ur(a) !== n && (dr(a, n), a.registerNodeTransform(He, () => {
696
696
  })());
697
697
  }, [a, n]);
698
698
  const i = ke(o), l = ke(s);
699
- return b(() => cr(a, { hasFitNestedTables: l, hasNestedTables: i }), [a, i, l]), b(() => fr(a, t), [a, t]), b(() => {
699
+ return E(() => cr(a, { hasFitNestedTables: l, hasNestedTables: i }), [a, i, l]), E(() => fr(a, t), [a, t]), E(() => {
700
700
  if (!r) return mr(a);
701
- }, [a, r]), b(() => {
702
- if (!e) return a.registerNodeTransform(He, (d) => {
701
+ }, [a, r]), E(() => {
702
+ if (!e) return a.registerNodeTransform(Ue, (d) => {
703
703
  d.getBackgroundColor() !== null && d.setBackgroundColor(null);
704
704
  });
705
705
  }, [a, e, r]), null;
@@ -710,87 +710,88 @@ function ke(r) {
710
710
  }
711
711
  function vn({ editorRef: r }) {
712
712
  const [e] = D();
713
- return Ht.useEffect(() => {
713
+ return Ut.useEffect(() => {
714
714
  typeof r == "function" ? r(e) : typeof r == "object" && (r.current = e);
715
715
  }, [e]), null;
716
716
  }
717
717
  const yn = ({
718
718
  currentLanguage: r = "NL",
719
- initialValue: e = "",
720
- placeholder: t = "",
721
- label: n = "",
722
- info: o = "",
723
- required: s = !1,
724
- notValid: a = !1,
725
- notValidatedText: i = "",
726
- maxHeightInRem: l = "20rem",
727
- maxWords: d,
728
- rteRef: u = null,
729
- onChange: m,
730
- onCatalogueLinkSearch: p,
731
- catalogueSearchResponse: w = { state: "idle", results: [] }
719
+ editorId: e,
720
+ initialValue: t = "",
721
+ placeholder: n = "",
722
+ label: o = "",
723
+ info: s = "",
724
+ required: a = !1,
725
+ notValid: i = !1,
726
+ notValidatedText: l = "",
727
+ maxHeightInRem: d = "20rem",
728
+ maxWords: u,
729
+ rteRef: m = null,
730
+ onChange: p,
731
+ onCatalogueLinkSearch: C,
732
+ catalogueSearchResponse: v = { state: "idle", results: [] }
732
733
  }) => {
733
- const { switchLanguage: v } = $r(), N = Er(), [E] = F(() => Le()), [C, y] = F(0), [$, I] = F(0), L = Yt(), k = {
734
+ const { switchLanguage: N } = $r(), b = Er(), [w] = F(() => Le()), [y, _] = F(0), [B, P] = F(0), k = Yt(), S = {
734
735
  html: {
735
736
  export: gr
736
737
  },
737
- namespace: "UvaRte",
738
- editor: E,
738
+ namespace: `UvaRte-${e.replace(/\s+/g, "-").toLowerCase()}`,
739
+ editor: w,
739
740
  theme: xr,
740
741
  onError(x) {
741
742
  throw x;
742
743
  },
743
744
  nodes: [
744
- Me,
745
- Ae,
745
+ Fe,
746
746
  Ke,
747
+ Me,
747
748
  ze,
748
- He,
749
- pr,
750
749
  Ue,
750
+ pr,
751
+ He,
751
752
  kr,
752
753
  Pr
753
754
  ],
754
755
  editorState: (x) => {
755
- const _ = new DOMParser().parseFromString(e, "text/html"), j = rr(x, _);
756
- K().clear(), Ie(j), Te(null);
756
+ const I = new DOMParser().parseFromString(t, "text/html"), U = rr(x, I);
757
+ z().clear(), Be(U), Te(null);
757
758
  }
758
- }, S = (x) => x.trim().length === 0 ? 0 : x.split(" ").length, P = (x, M) => {
759
+ }, $ = (x) => x.trim().length === 0 ? 0 : x.split(" ").length, K = (x, L) => {
759
760
  x.read(() => {
760
- let _ = "";
761
- y(S(K().getTextContent().replace(/\s+/g, " ").trim())), _ = hr(nr(M)), _ = vr(_), m(_);
761
+ let I = "";
762
+ _($(z().getTextContent().replace(/\s+/g, " ").trim())), I = hr(nr(L)), I = vr(I), p(I);
762
763
  });
763
764
  };
764
- return b(() => {
765
- v(r.toUpperCase());
766
- }, [r, v]), b(() => {
767
- const x = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
768
- y(S(x));
769
- }, [e]), /* @__PURE__ */ A("div", { className: R.editor__container, children: [
770
- (n || o || d) && /* @__PURE__ */ A("div", { className: R.editor__header, children: [
771
- /* @__PURE__ */ f(Nr, { label: n, info: o, required: s }),
772
- d && d > 0 && /* @__PURE__ */ A("div", { className: R["editor__header-word-count"], children: [
773
- /* @__PURE__ */ f("span", { className: be({ [R["editor__header-word-count--alert"]]: C > d }), children: C }),
765
+ return E(() => {
766
+ N(r.toUpperCase());
767
+ }, [r, N]), E(() => {
768
+ const x = t.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
769
+ _($(x));
770
+ }, [t]), /* @__PURE__ */ M("div", { className: R.editor__container, children: [
771
+ (o || s || u) && /* @__PURE__ */ M("div", { className: R.editor__header, children: [
772
+ /* @__PURE__ */ f(Nr, { label: o, info: s, required: a }),
773
+ u && u > 0 && /* @__PURE__ */ M("div", { className: R["editor__header-word-count"], children: [
774
+ /* @__PURE__ */ f("span", { className: be({ [R["editor__header-word-count--alert"]]: y > u }), children: y }),
774
775
  " / ",
775
- d
776
+ u
776
777
  ] })
777
778
  ] }),
778
779
  /* @__PURE__ */ f(
779
780
  "div",
780
781
  {
781
782
  className: be(R.editor, {
782
- [R["not-valid"]]: a
783
+ [R["not-valid"]]: i
783
784
  }),
784
- children: /* @__PURE__ */ A(Tr, { initialConfig: k, children: [
785
+ children: /* @__PURE__ */ M(Tr, { initialConfig: S, children: [
785
786
  /* @__PURE__ */ f(
786
787
  br,
787
788
  {
788
- editorScrollPosition: $,
789
- onCatalogueLinkSearch: p,
790
- catalogueSearchResponse: w
789
+ editorScrollPosition: B,
790
+ onCatalogueLinkSearch: C,
791
+ catalogueSearchResponse: v
791
792
  }
792
793
  ),
793
- /* @__PURE__ */ A("div", { className: R["editor__field-wrapper"], children: [
794
+ /* @__PURE__ */ M("div", { className: R["editor__field-wrapper"], children: [
794
795
  /* @__PURE__ */ f(
795
796
  Wr,
796
797
  {
@@ -798,17 +799,17 @@ const yn = ({
798
799
  Qr,
799
800
  {
800
801
  className: R.editor__field,
801
- "aria-label": N.common.rteAriaLabel,
802
- "aria-placeholder": t,
803
- title: N.common.rteTitle,
804
- placeholder: /* @__PURE__ */ f("div", { className: R.editor__placeholder, children: t }),
802
+ "aria-label": b.common.rteAriaLabel,
803
+ "aria-placeholder": n,
804
+ title: b.common.rteTitle,
805
+ placeholder: /* @__PURE__ */ f("div", { className: R.editor__placeholder, children: n }),
805
806
  spellCheck: !1,
806
- id: `${L}_rteEditor`,
807
- style: { height: `${l}`, maxHeight: `${l}` },
808
- onScroll: (x) => I(x.currentTarget.scrollTop)
807
+ id: `${k}_rteEditor`,
808
+ style: { height: `${d}`, maxHeight: `${d}` },
809
+ onScroll: (x) => P(x.currentTarget.scrollTop)
809
810
  }
810
811
  ),
811
- placeholder: /* @__PURE__ */ f("div", { className: R.editor__placeholder, children: t }),
812
+ placeholder: /* @__PURE__ */ f("div", { className: R.editor__placeholder, children: n }),
812
813
  ErrorBoundary: on
813
814
  }
814
815
  ),
@@ -819,50 +820,52 @@ const yn = ({
819
820
  /* @__PURE__ */ f(un, { validateUrl: yr }),
820
821
  /* @__PURE__ */ f(cn, { matchers: Cr }),
821
822
  /* @__PURE__ */ f(fn, {}),
822
- /* @__PURE__ */ f(sn, { onChange: P }),
823
+ /* @__PURE__ */ f(sn, { onChange: K }),
823
824
  /* @__PURE__ */ f(Sr, {}),
824
825
  /* @__PURE__ */ f(Lr, {}),
825
- u && /* @__PURE__ */ f(vn, { editorRef: u })
826
+ m && /* @__PURE__ */ f(vn, { editorRef: m })
826
827
  ] })
827
828
  ] })
828
829
  }
829
830
  ),
830
- i !== "" && /* @__PURE__ */ f(wr, { level: "error", feedback: i })
831
+ l !== "" && /* @__PURE__ */ f(wr, { level: "error", feedback: l })
831
832
  ] });
832
- }, ho = ({
833
+ }, vo = ({
833
834
  currentLanguage: r = "NL",
834
- initialValue: e = "",
835
- placeholder: t = "",
836
- label: n = "",
837
- info: o = "",
838
- required: s = !1,
839
- notValid: a = !1,
840
- notValidatedText: i = "",
841
- maxWords: l,
842
- rteRef: d,
843
- onChange: u,
844
- onCatalogueLinkSearch: m,
845
- catalogueSearchResponse: p = { state: "idle", results: [] }
835
+ editorId: e,
836
+ initialValue: t = "",
837
+ placeholder: n = "",
838
+ label: o = "",
839
+ info: s = "",
840
+ required: a = !1,
841
+ notValid: i = !1,
842
+ notValidatedText: l = "",
843
+ maxWords: d,
844
+ rteRef: u,
845
+ onChange: m,
846
+ onCatalogueLinkSearch: p,
847
+ catalogueSearchResponse: C = { state: "idle", results: [] }
846
848
  }) => /* @__PURE__ */ f(_r, { children: /* @__PURE__ */ f(
847
849
  yn,
848
850
  {
849
851
  currentLanguage: r.toUpperCase(),
850
- initialValue: e,
851
- placeholder: t,
852
- label: n,
853
- info: o,
854
- required: s,
855
- notValid: a,
856
- notValidatedText: i,
857
- maxWords: l,
858
- rteRef: d,
859
- onChange: u,
860
- onCatalogueLinkSearch: m,
861
- catalogueSearchResponse: p
852
+ editorId: e,
853
+ initialValue: t,
854
+ placeholder: n,
855
+ label: o,
856
+ info: s,
857
+ required: a,
858
+ notValid: i,
859
+ notValidatedText: l,
860
+ maxWords: d,
861
+ rteRef: u,
862
+ onChange: m,
863
+ onCatalogueLinkSearch: p,
864
+ catalogueSearchResponse: C
862
865
  }
863
866
  ) });
864
867
  export {
865
868
  yn as Rte,
866
- ho as RteEditor
869
+ vo as RteEditor
867
870
  };
868
871
  //# sourceMappingURL=RteEditor.js.map