@uva-glass/component-library 3.53.0 → 3.53.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 (142) hide show
  1. package/dist/{Lexical.prod-DH2XfwvA.js → Lexical.prod-Dgzi-S1E.js} +1427 -1409
  2. package/dist/Lexical.prod-Dgzi-S1E.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-DTuNvXAS.js → LexicalClipboard.prod-Dxc8c2F_.js} +86 -86
  4. package/dist/{LexicalClipboard.prod-DTuNvXAS.js.map → LexicalClipboard.prod-Dxc8c2F_.js.map} +1 -1
  5. package/dist/LexicalExtension.prod-CNBWjmfs.js +551 -0
  6. package/dist/LexicalExtension.prod-CNBWjmfs.js.map +1 -0
  7. package/dist/LexicalLink.prod-EEOzXxej.js +502 -0
  8. package/dist/LexicalLink.prod-EEOzXxej.js.map +1 -0
  9. package/dist/{LexicalList.prod-DA9du3qx.js → LexicalList.prod-DADZlhem.js} +65 -65
  10. package/dist/LexicalList.prod-DADZlhem.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-mQk00-U_.js → LexicalSelection.prod-B0uiXGSS.js} +44 -44
  12. package/dist/LexicalSelection.prod-B0uiXGSS.js.map +1 -0
  13. package/dist/{LexicalTable.prod-RGq0GKAR.js → LexicalTable.prod-QpQxZNNH.js} +331 -319
  14. package/dist/LexicalTable.prod-QpQxZNNH.js.map +1 -0
  15. package/dist/{LexicalUtils.prod-DU4QwthB.js → LexicalUtils.prod-D1mwAww-.js} +39 -39
  16. package/dist/LexicalUtils.prod-D1mwAww-.js.map +1 -0
  17. package/dist/{TableCellResizerPlugin-DRwI83s2.js → TableCellResizerPlugin-9kvw_LpH.js} +57 -57
  18. package/dist/{TableCellResizerPlugin-DRwI83s2.js.map → TableCellResizerPlugin-9kvw_LpH.js.map} +1 -1
  19. package/dist/{TablePlugin-DmE96vN7.js → TablePlugin-Culqb83M.js} +67 -67
  20. package/dist/{TablePlugin-DmE96vN7.js.map → TablePlugin-Culqb83M.js.map} +1 -1
  21. package/dist/{chunk-SS2NHR7W-qmI2h7CJ.js → chunk-GPBRNGY5-BSRMHXbx.js} +3 -3
  22. package/dist/chunk-GPBRNGY5-BSRMHXbx.js.map +1 -0
  23. package/dist/{client-D4oO7Spw.js → client-DdSuZDnt.js} +93 -95
  24. package/dist/{client-D4oO7Spw.js.map → client-DdSuZDnt.js.map} +1 -1
  25. package/dist/components/Accordion/Accordion.test.js +2 -2
  26. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  27. package/dist/components/ActionList/ActionList.d.ts +1 -1
  28. package/dist/components/ActionList/ActionList.test.js +2 -2
  29. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  30. package/dist/components/Attention/Attention.test.js +1 -1
  31. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  32. package/dist/components/Buttons/Button.stories.js +1 -1
  33. package/dist/components/Buttons/Button.test.js +1 -1
  34. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  35. package/dist/components/Buttons/LinkButton.test.js +1 -1
  36. package/dist/components/Buttons/MenuButton.d.ts +1 -1
  37. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  38. package/dist/components/Buttons/MenuButton.test.js +1 -1
  39. package/dist/components/Card/Card.test.js +1 -1
  40. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  41. package/dist/components/Checkbox/Checkbox.test.js +2 -2
  42. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  43. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  44. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  45. package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
  46. package/dist/components/Chip/Chip.stories.js +1 -1
  47. package/dist/components/ControlsButton/ControlsButton.d.ts +1 -1
  48. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  49. package/dist/components/Drawer/Drawer.stories.js +1 -1
  50. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  51. package/dist/components/FormInput/FormInput.js +1 -1
  52. package/dist/components/FormInput/FormInput.stories.js +1 -1
  53. package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
  54. package/dist/components/IconButton/IconButton.stories.js +1 -1
  55. package/dist/components/InfoBanner/InfoBanner.d.ts +1 -1
  56. package/dist/components/InfoBanner/InfoBanner.stories.d.ts +1 -1
  57. package/dist/components/InputField/InputField.stories.js +2 -2
  58. package/dist/components/Label/Label.test.js +1 -1
  59. package/dist/components/MetaDataBar/MetaDataBar.d.ts +1 -1
  60. package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
  61. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  62. package/dist/components/MultiSelect/MultiSelect.d.ts +2 -2
  63. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  64. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  65. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  66. package/dist/components/MultiSelect/index.js +1 -1
  67. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  68. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
  69. package/dist/components/Notification/Notification.stories.js +1 -1
  70. package/dist/components/Notification/Notification.test.js +1 -1
  71. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  72. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  73. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  74. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  75. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  76. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  77. package/dist/components/RadioTabSelector/RadioTabSelector.d.ts +1 -1
  78. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  79. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  80. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  81. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  82. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +63 -63
  83. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
  84. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +7 -7
  85. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.d.ts +1 -1
  86. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  87. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +64 -64
  88. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  89. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +21 -21
  90. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
  91. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  92. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  93. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  94. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.d.ts +1 -1
  95. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  96. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +29 -29
  97. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  98. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.d.ts +1 -1
  99. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +15 -15
  100. package/dist/components/RteEditor/Plugins/index.js +2 -2
  101. package/dist/components/RteEditor/RteEditor.js +218 -215
  102. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  103. package/dist/components/RteEditor/helpers.js +5 -5
  104. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +12 -12
  105. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +14 -14
  106. package/dist/components/SectionNotification/SectionNotification.stories.d.ts +1 -1
  107. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  108. package/dist/components/SelectListbox/components/SelectButton.d.ts +1 -1
  109. package/dist/components/SelectListbox/components/SelectOption.d.ts +1 -1
  110. package/dist/components/Sortable/Sortable.stories.js +1 -1
  111. package/dist/components/Sortable/components/SortableItem.d.ts +1 -1
  112. package/dist/components/StatusBadge/StatusBadge.stories.d.ts +1 -1
  113. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  114. package/dist/components/TextArea/TextArea.stories.js +1 -1
  115. package/dist/components/TextArea/TextArea.test.js +2 -2
  116. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  117. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  118. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  119. package/dist/components/WeekSelector/WeekSelector.stories.d.ts +1 -1
  120. package/dist/components/WeekSelector/components/WeekSelectorOption.d.ts +1 -1
  121. package/dist/components/index.js +1 -1
  122. package/dist/{index-B4NxQN5d.js → index-Cfzi-sRQ.js} +333 -332
  123. package/dist/index-Cfzi-sRQ.js.map +1 -0
  124. package/dist/{index-ZQcmo1D_.js → index-DcECbqp4.js} +12 -12
  125. package/dist/{index-ZQcmo1D_.js.map → index-DcECbqp4.js.map} +1 -1
  126. package/dist/index.js +1 -1
  127. package/dist/{react-18-BczhA0zC.js → react-18-plvLTuyc.js} +2 -2
  128. package/dist/{react-18-BczhA0zC.js.map → react-18-plvLTuyc.js.map} +1 -1
  129. package/dist/{react.esm-BDo_tPxu.js → react.esm-BpII5CMY.js} +712 -733
  130. package/dist/{react.esm-BDo_tPxu.js.map → react.esm-BpII5CMY.js.map} +1 -1
  131. package/dist/storybook__react.d.js +8 -8
  132. package/dist/storybook__react.d.js.map +1 -1
  133. package/package.json +26 -26
  134. package/dist/Lexical.prod-DH2XfwvA.js.map +0 -1
  135. package/dist/LexicalLink.prod-BV5Y2RYj.js +0 -1046
  136. package/dist/LexicalLink.prod-BV5Y2RYj.js.map +0 -1
  137. package/dist/LexicalList.prod-DA9du3qx.js.map +0 -1
  138. package/dist/LexicalSelection.prod-mQk00-U_.js.map +0 -1
  139. package/dist/LexicalTable.prod-RGq0GKAR.js.map +0 -1
  140. package/dist/LexicalUtils.prod-DU4QwthB.js.map +0 -1
  141. package/dist/chunk-SS2NHR7W-qmI2h7CJ.js.map +0 -1
  142. package/dist/index-B4NxQN5d.js.map +0 -1
@@ -1,23 +1,24 @@
1
- import { jsx as f, jsxs as M, Fragment as ke } from "react/jsx-runtime";
2
- import { t as Ge, r as Xe, o as D } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { aL as Pe, ai as F, L as Ye, b as p, aT as oe, aN as ae, ao as O, S as se, I as Ze, l as I, y as g, Y as Qe, K as c, aX as Ve, ad as et, r as tt, u as rt, aY as nt, aZ as ot, U as at, aW as $, au as st, a_ as it, a$ as lt, b0 as ut, v as re, b1 as dt, b2 as ct, a3 as ft, o as mt, a0 as De, J as pt, b3 as gt, b4 as ue, c as de, Q as ht, O as Q, P as vt, a4 as Te, b5 as ce, G as yt, F as Ct, T as bt, b6 as fe, B as Et, b7 as wt, b8 as St, ag as $e, aH as xt, V as Nt, d as Be, _ as _t, b9 as Lt, W as kt, N as Pt, M as Dt, p as Tt, aw as q, av as G, ba as $t, bb as Bt, ay as It, bc as ne, ax as Rt, bd as At, be as Mt, aR as Ft } from "../../Lexical.prod-DH2XfwvA.js";
4
- import * as Kt from "react";
5
- import { useMemo as Z, useLayoutEffect as H, useEffect as b, useState as A, Suspense as Ut, forwardRef as Ie, useCallback as zt, Component as Ot, createElement as me, createContext as Ht, useId as jt } from "react";
6
- import { a as Wt, T as Jt } from "../../TableCellResizerPlugin-DRwI83s2.js";
7
- import { B as qt, y as Re, F as Gt, a as ie, A as Ae, l as Xt, z as Yt, G as Zt, d as Me, b as Qt } from "../../LexicalLink.prod-BV5Y2RYj.js";
8
- import { flushSync as Vt, createPortal as er } from "react-dom";
9
- import { U as j, L as U, x as tr } from "../../LexicalUtils.prod-DU4QwthB.js";
10
- import { R as pe, F as ge, m as rr, g as nr } from "../../LexicalClipboard.prod-DTuNvXAS.js";
11
- import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-mQk00-U_.js";
12
- import { l as Fe, n as Ke, L as or, b as ar } from "../../LexicalList.prod-DA9du3qx.js";
13
- import { b as sr, u as ir, h as Ue, N as lr, y as ur, c as dr, x as ze, E as cr } from "../../LexicalTable.prod-RGq0GKAR.js";
1
+ import { jsx as f, jsxs as A, Fragment as Le } from "react/jsx-runtime";
2
+ import { t as Ye, r as qe, o as D } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
+ import { ar as Pe, al as F, $ as Ge, c as p, az as oe, at as ae, aA as H, M as se, U as Ve, p as I, b as g, a2 as Ze, V as c, aX as Qe, n as et, r as tt, i as rt, aY as nt, aZ as ot, X as at, k as $, aG as st, a_ as it, a$ as lt, b0 as ut, A as re, b1 as dt, b2 as ct, a7 as ft, S as mt, l as De, P as pt, b3 as gt, b4 as ue, h as de, W as ht, G as Z, T as vt, a8 as Te, b5 as ce, B as yt, N as Ct, y as bt, b6 as fe, z as Et, b7 as wt, b8 as St, aj as $e, aT as xt, a0 as Nt, d as Be, Z as _t, b9 as kt, a1 as Lt, F as Pt, D as Dt, u as Tt, aI as Y, aH as q, ba as $t, bb as Bt, aK as It, bc as ne, aJ as Rt, bd as Mt, be as At, ax as Ft } from "../../Lexical.prod-Dgzi-S1E.js";
4
+ import * as Ut from "react";
5
+ import { useMemo as O, useLayoutEffect as j, useEffect as b, useState as M, Suspense as zt, forwardRef as Ie, useCallback as Kt, Component as Ht, createElement as me, createContext as Ot, useId as jt } from "react";
6
+ import { a as Wt, T as Jt } from "../../TableCellResizerPlugin-9kvw_LpH.js";
7
+ import { B as Xt, a as ie, G as Yt, d as Re, F as qt, X as Gt } from "../../LexicalExtension.prod-CNBWjmfs.js";
8
+ import { flushSync as Vt, createPortal as Zt } from "react-dom";
9
+ import { U as W, P as z, E as Qt } from "../../LexicalUtils.prod-D1mwAww-.js";
10
+ import { R as pe, F as ge, m as er, g as tr } from "../../LexicalClipboard.prod-Dxc8c2F_.js";
11
+ import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-B0uiXGSS.js";
12
+ import { l as Me, n as Ae, L as rr, b as nr } from "../../LexicalList.prod-DADZlhem.js";
13
+ import { y as Fe, F as or, A as Ue, l as ar, z as sr } from "../../LexicalLink.prod-EEOzXxej.js";
14
+ import { u as ir, h as lr, d as ze, N as ur, y as dr, b as cr, T as Ke, E as fr } from "../../LexicalTable.prod-QpQxZNNH.js";
14
15
  import { c as Ce } from "../../clsx-OuTLNxxd.js";
15
- import { exportMap as fr, mergeBoldStrongTags as mr, cleanUpTable as pr } from "./helpers.js";
16
- import { validateUrl as gr, MATCHERS as hr } from "./Plugins/LinkPlugin/helpers.js";
16
+ import { exportMap as mr, mergeBoldStrongTags as pr, cleanUpTable as gr } from "./helpers.js";
17
+ import { validateUrl as hr, MATCHERS as vr } from "./Plugins/LinkPlugin/helpers.js";
17
18
  import { s as B } from "../../RteEditor.module-DaBh86FK.js";
18
- import { ToolBarPlugin as vr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
19
- import { useTranslation as yr } from "./hooks/useTranslation.js";
20
- import "../../TablePlugin-DmE96vN7.js";
19
+ import { ToolBarPlugin as yr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
20
+ import { useTranslation as Cr } from "./hooks/useTranslation.js";
21
+ import "../../TablePlugin-Culqb83M.js";
21
22
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
22
23
  import "./hooks/components/Flyout.js";
23
24
  import "../Accordion/Accordion.js";
@@ -25,7 +26,7 @@ import "../Buttons/Button.js";
25
26
  import "../Buttons/LinkButton.js";
26
27
  import "@react-aria/button";
27
28
  import "../Checkbox/Checkbox.js";
28
- import { FeedbackBox as Cr } from "../FeedbackBox/FeedbackBox.js";
29
+ import { FeedbackBox as br } from "../FeedbackBox/FeedbackBox.js";
29
30
  import "@react-aria/dialog";
30
31
  import "@react-aria/focus";
31
32
  import "@react-aria/overlays";
@@ -41,67 +42,67 @@ import "../SelectListbox/SelectProvider.js";
41
42
  import "../Sortable/components/SortableItem.js";
42
43
  import "../../SortableProvider-BbwlEPIr.js";
43
44
  import "../WeekSelector/components/WeekSelectorOptionContainer.js";
44
- import { PasteHandlerPlugin as br } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
45
- import { UvaTheme as Er } from "./UvaTheme/UvaTheme.js";
46
- import { EditorHeader as wr } from "./EditorHeader/EditorHeader.js";
47
- import { LanguageProvider as Sr, useLanguage as xr } from "./Providers/LanguageProvider.js";
48
- import { TableWrapperNode as Nr } from "./nodes/TableWrapperNode/TableWrapperNode.js";
49
- import { CourseCatalogueNode as _r, CourseCatalogueLinkPlugin as Lr } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
50
- const Oe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, kr = Oe ? H : b, X = { tag: oe };
51
- function Pr({ initialConfig: r, children: e }) {
52
- const t = Z(() => {
53
- const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Ge(null, n), u = Pe({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
45
+ import { PasteHandlerPlugin as Er } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
46
+ import { UvaTheme as wr } from "./UvaTheme/UvaTheme.js";
47
+ import { EditorHeader as Sr } from "./EditorHeader/EditorHeader.js";
48
+ import { LanguageProvider as xr, useLanguage as Nr } from "./Providers/LanguageProvider.js";
49
+ import { TableWrapperNode as _r } from "./nodes/TableWrapperNode/TableWrapperNode.js";
50
+ import { CourseCatalogueNode as kr, CourseCatalogueLinkPlugin as Lr } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
51
+ const He = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Pr = He ? j : b, G = { tag: oe };
52
+ function Dr({ initialConfig: r, children: e }) {
53
+ const t = O(() => {
54
+ const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Ye(null, n), u = Pe({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
54
55
  return (function(m, h) {
55
56
  if (h !== null) {
56
57
  if (h === void 0) m.update(() => {
57
58
  const S = F();
58
59
  if (S.isEmpty()) {
59
- const y = Ye();
60
+ const y = Ge();
60
61
  S.append(y);
61
- const x = Oe ? document.activeElement : null;
62
+ const x = He ? document.activeElement : null;
62
63
  (p() !== null || x !== null && x === m.getRootElement()) && y.select();
63
64
  }
64
- }, X);
65
+ }, G);
65
66
  else if (h !== null) switch (typeof h) {
66
67
  case "string": {
67
68
  const S = m.parseEditorState(h);
68
- m.setEditorState(S, X);
69
+ m.setEditorState(S, G);
69
70
  break;
70
71
  }
71
72
  case "object":
72
- m.setEditorState(h, X);
73
+ m.setEditorState(h, G);
73
74
  break;
74
75
  case "function":
75
76
  m.update(() => {
76
77
  F().isEmpty() && h(m);
77
- }, X);
78
+ }, G);
78
79
  }
79
80
  }
80
81
  })(u, i), [u, d];
81
82
  }, []);
82
- return kr(() => {
83
+ return Pr(() => {
83
84
  const n = r.editable, [o] = t;
84
85
  o.setEditable(n === void 0 || n);
85
- }, []), f(Xe.Provider, { value: t, children: e });
86
+ }, []), f(qe.Provider, { value: t, children: e });
86
87
  }
87
- const Dr = ae({ name: "@lexical/react/ReactProvider" });
88
- function Tr() {
88
+ const Tr = ae({ name: "@lexical/react/ReactProvider" });
89
+ function $r() {
89
90
  return F().getTextContent();
90
91
  }
91
- function $r(r, e = !0) {
92
+ function Br(r, e = !0) {
92
93
  if (r) return !1;
93
- let t = Tr();
94
+ let t = $r();
94
95
  return e && (t = t.trim()), t === "";
95
96
  }
96
- function Br(r) {
97
- if (!$r(r, !1)) return !1;
97
+ function Ir(r) {
98
+ if (!Br(r, !1)) return !1;
98
99
  const e = F().getChildren(), t = e.length;
99
100
  if (t > 1) return !1;
100
101
  for (let n = 0; n < t; n++) {
101
102
  const o = e[n];
102
- if (O(o)) return !1;
103
+ if (H(o)) return !1;
103
104
  if (se(o)) {
104
- if (!Ze(o) || o.__indent !== 0) return !1;
105
+ if (!Ve(o) || o.__indent !== 0) return !1;
105
106
  const a = o.getChildren(), s = a.length;
106
107
  for (let i = 0; i < s; i++) {
107
108
  const l = a[n];
@@ -111,10 +112,10 @@ function Br(r) {
111
112
  }
112
113
  return !0;
113
114
  }
114
- function He(r) {
115
- return () => Br(r);
115
+ function Oe(r) {
116
+ return () => Ir(r);
116
117
  }
117
- function Ir(r) {
118
+ function Rr(r) {
118
119
  const e = window.location.origin, t = (n) => {
119
120
  if (n.origin !== e) return;
120
121
  const o = r.getRootElement();
@@ -166,10 +167,10 @@ function be(r, e) {
166
167
  }
167
168
  return null;
168
169
  }
169
- const K = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Rr = K && "documentMode" in document ? document.documentMode : null, Ar = K && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Mr = !(!K || !("InputEvent" in window) || Rr) && "getTargetRanges" in new window.InputEvent("input"), Fr = K && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = K && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Kr = K && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ur = K && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Ar && !Kr, we = tt("DRAG_DROP_PASTE_FILE");
170
- function Y(r) {
170
+ const U = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Mr = U && "documentMode" in document ? document.documentMode : null, Ar = U && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Fr = !(!U || !("InputEvent" in window) || Mr) && "getTargetRanges" in new window.InputEvent("input"), Ur = U && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = U && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, zr = U && /^(?=.*Chrome).*/i.test(navigator.userAgent), Kr = U && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Ar && !zr, we = tt("DRAG_DROP_PASTE_FILE");
171
+ function V(r) {
171
172
  let e = null;
172
- if (U(r, DragEvent) ? e = r.dataTransfer : U(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
173
+ if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
173
174
  const t = e.types, n = t.includes("Files"), o = t.includes("text/html") || t.includes("text/plain");
174
175
  return [n, Array.from(e.files), o];
175
176
  }
@@ -189,16 +190,16 @@ function Se(r) {
189
190
  }
190
191
  function xe(r) {
191
192
  const e = re(r);
192
- return O(e);
193
+ return H(e);
193
194
  }
194
- function V(r) {
195
+ function Q(r) {
195
196
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
196
197
  }
197
- function zr(r) {
198
- return j(r.registerCommand(Tt, (e) => {
198
+ function Hr(r) {
199
+ return W(r.registerCommand(Tt, (e) => {
199
200
  const t = p();
200
201
  return !!$(t) && (t.clear(), !0);
201
- }, c), r.registerCommand(Q, (e) => {
202
+ }, c), r.registerCommand(Z, (e) => {
202
203
  const t = p();
203
204
  return g(t) ? (t.deleteCharacter(e), !0) : !!$(t) && (t.deleteNodes(), !0);
204
205
  }, c), r.registerCommand(Dt, (e) => {
@@ -207,7 +208,7 @@ function zr(r) {
207
208
  }, c), r.registerCommand(Pt, (e) => {
208
209
  const t = p();
209
210
  return !!g(t) && (t.deleteLine(e), !0);
210
- }, c), r.registerCommand(kt, (e) => {
211
+ }, c), r.registerCommand(Lt, (e) => {
211
212
  const t = p();
212
213
  if (typeof e == "string") t !== null && t.insertText(e);
213
214
  else {
@@ -220,7 +221,7 @@ function zr(r) {
220
221
  }
221
222
  }
222
223
  return !0;
223
- }, c), r.registerCommand(Lt, () => {
224
+ }, c), r.registerCommand(kt, () => {
224
225
  const e = p();
225
226
  return !!g(e) && (e.removeText(), !0);
226
227
  }, c), r.registerCommand(_t, (e) => {
@@ -254,7 +255,7 @@ function zr(r) {
254
255
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
255
256
  } else if (g(t)) {
256
257
  const n = fe(t.focus, !0);
257
- if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
258
+ if (!e.shiftKey && H(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
258
259
  }
259
260
  return !1;
260
261
  }, c), r.registerCommand(bt, (e) => {
@@ -268,7 +269,7 @@ function zr(r) {
268
269
  return a.key === "root" && a.offset === F().getChildrenSize();
269
270
  })(t)) return e.preventDefault(), !0;
270
271
  const n = fe(t.focus, !1);
271
- if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
272
+ if (!e.shiftKey && H(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
272
273
  }
273
274
  return !1;
274
275
  }, c), r.registerCommand(Ct, (e) => {
@@ -302,21 +303,21 @@ function zr(r) {
302
303
  if (o.offset !== 0) return !1;
303
304
  const a = o.getNode();
304
305
  if (Te(a)) return !1;
305
- const s = tr(a);
306
+ const s = Qt(a);
306
307
  return s.getIndent() > 0 && (s.is(a) || a.is(s.getFirstDescendant()));
307
308
  })(t)) return e.preventDefault(), r.dispatchCommand(ce, void 0);
308
309
  if (Ee && navigator.language === "ko-KR") return !1;
309
310
  } else if (!$(t)) return !1;
310
- return e.preventDefault(), r.dispatchCommand(Q, !0);
311
+ return e.preventDefault(), r.dispatchCommand(Z, !0);
311
312
  }, c), r.registerCommand(ht, (e) => {
312
313
  if (xe(e.target)) return !1;
313
314
  const t = p();
314
- return !(!g(t) && !$(t)) && (e.preventDefault(), r.dispatchCommand(Q, !1));
315
+ return !(!g(t) && !$(t)) && (e.preventDefault(), r.dispatchCommand(Z, !1));
315
316
  }, c), r.registerCommand(gt, (e) => {
316
317
  const t = p();
317
318
  if (!g(t)) return !1;
318
- if (V(t), e !== null) {
319
- if ((Ee || Fr || Ur) && Mr) return !1;
319
+ if (Q(t), e !== null) {
320
+ if ((Ee || Ur || Kr) && Fr) return !1;
320
321
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(ue, !1);
321
322
  }
322
323
  return r.dispatchCommand(de, void 0);
@@ -324,7 +325,7 @@ function zr(r) {
324
325
  const e = p();
325
326
  return !!g(e) && (r.blur(), !0);
326
327
  }, c), r.registerCommand(ct, (e) => {
327
- const [, t] = Y(e);
328
+ const [, t] = V(e);
328
329
  if (t.length > 0) {
329
330
  const o = be(e.clientX, e.clientY);
330
331
  if (o !== null) {
@@ -346,36 +347,36 @@ function zr(r) {
346
347
  const n = p();
347
348
  return !!g(n);
348
349
  }, c), r.registerCommand(dt, (e) => {
349
- const [t] = Y(e), n = p();
350
+ const [t] = V(e), n = p();
350
351
  return !(t && !g(n));
351
352
  }, c), r.registerCommand(ut, (e) => {
352
- const [t] = Y(e), n = p();
353
+ const [t] = V(e), n = p();
353
354
  if (t && !g(n)) return !1;
354
355
  const o = be(e.clientX, e.clientY);
355
356
  if (o !== null) {
356
357
  const a = re(o.node);
357
- O(a) && e.preventDefault();
358
+ H(a) && e.preventDefault();
358
359
  }
359
360
  return !0;
360
- }, c), r.registerCommand(it, () => (lt(), !0), c), r.registerCommand(st, (e) => (ge(r, U(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(at, (e) => ((async function(t, n) {
361
- await ge(n, U(t, ClipboardEvent) ? t : null), n.update(() => {
361
+ }, c), r.registerCommand(it, () => (lt(), !0), c), r.registerCommand(st, (e) => (ge(r, z(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(at, (e) => ((async function(t, n) {
362
+ await ge(n, z(t, ClipboardEvent) ? t : null), n.update(() => {
362
363
  const o = p();
363
364
  g(o) ? o.removeText() : $(o) && o.getNodes().forEach((a) => a.remove());
364
365
  });
365
366
  })(e, r), !0), c), r.registerCommand(et, (e) => {
366
- const [, t, n] = Y(e);
367
+ const [, t, n] = V(e);
367
368
  return t.length > 0 && !n ? (r.dispatchCommand(we, t), !0) : rt(e.target) && nt(e.target) ? !1 : p() !== null && ((function(o, a) {
368
369
  o.preventDefault(), a.update(() => {
369
- const s = p(), i = U(o, InputEvent) || U(o, KeyboardEvent) ? null : o.clipboardData;
370
+ const s = p(), i = z(o, InputEvent) || z(o, KeyboardEvent) ? null : o.clipboardData;
370
371
  i != null && s !== null && pe(i, s, a);
371
372
  }, { tag: ot });
372
373
  })(e, r), !0);
373
- }, c), r.registerCommand(Ve, (e) => {
374
- const t = p();
375
- return g(t) && V(t), !1;
376
374
  }, c), r.registerCommand(Qe, (e) => {
377
375
  const t = p();
378
- return g(t) && V(t), !1;
376
+ return g(t) && Q(t), !1;
377
+ }, c), r.registerCommand(Ze, (e) => {
378
+ const t = p();
379
+ return g(t) && Q(t), !1;
379
380
  }, c));
380
381
  }
381
382
  function Or(r, ...e) {
@@ -384,54 +385,54 @@ function Or(r, ...e) {
384
385
  for (const o of e) n.append("v", o);
385
386
  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.`);
386
387
  }
387
- const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : b;
388
- function Hr({ editor: r, ErrorBoundary: e }) {
388
+ const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
389
+ function jr({ editor: r, ErrorBoundary: e }) {
389
390
  return (function(t, n) {
390
- const [o, a] = A(() => t.getDecorators());
391
+ const [o, a] = M(() => t.getDecorators());
391
392
  return le(() => t.registerDecoratorListener((s) => {
392
393
  Vt(() => {
393
394
  a(s);
394
395
  });
395
396
  }), [t]), b(() => {
396
397
  a(t.getDecorators());
397
- }, [t]), Z(() => {
398
+ }, [t]), O(() => {
398
399
  const s = [], i = Object.keys(o);
399
400
  for (let l = 0; l < i.length; l++) {
400
- const d = i[l], u = f(n, { onError: (h) => t._onError(h), children: f(Ut, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
401
- m !== null && s.push(er(u, m, d));
401
+ const d = i[l], u = f(n, { onError: (h) => t._onError(h), children: f(zt, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
402
+ m !== null && s.push(Zt(u, m, d));
402
403
  }
403
404
  return s;
404
405
  }, [n, o, t]);
405
406
  })(r, e);
406
407
  }
407
- function jr({ editor: r, ErrorBoundary: e }) {
408
+ function Wr({ editor: r, ErrorBoundary: e }) {
408
409
  return (function(t) {
409
- const n = qt.maybeFromEditor(t);
410
- if (n && n.hasExtensionByName(Dr.name)) {
410
+ const n = Xt.maybeFromEditor(t);
411
+ if (n && n.hasExtensionByName(Tr.name)) {
411
412
  for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && Or(320, o);
412
413
  return !0;
413
414
  }
414
415
  return !1;
415
- })(r) ? null : f(Hr, { editor: r, ErrorBoundary: e });
416
+ })(r) ? null : f(jr, { editor: r, ErrorBoundary: e });
416
417
  }
417
418
  function Ne(r) {
418
- return r.getEditorState().read(He(r.isComposing()));
419
+ return r.getEditorState().read(Oe(r.isComposing()));
419
420
  }
420
- function Wr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
421
+ function Jr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
421
422
  const [n] = D();
422
423
  return (function(o) {
423
- le(() => j(zr(o), Ir(o)), [o]);
424
- })(n), M(ke, { children: [r, f(Jr, { content: e }), f(jr, { editor: n, ErrorBoundary: t })] });
424
+ le(() => W(Hr(o), Rr(o)), [o]);
425
+ })(n), A(Le, { children: [r, f(Xr, { content: e }), f(Wr, { editor: n, ErrorBoundary: t })] });
425
426
  }
426
- function Jr({ content: r }) {
427
+ function Xr({ content: r }) {
427
428
  const [e] = D(), t = (function(o) {
428
- const [a, s] = A(() => Ne(o));
429
+ const [a, s] = M(() => Ne(o));
429
430
  return le(() => {
430
431
  function i() {
431
432
  const l = Ne(o);
432
433
  s(l);
433
434
  }
434
- return i(), j(o.registerUpdateListener(() => {
435
+ return i(), W(o.registerUpdateListener(() => {
435
436
  i();
436
437
  }), o.registerEditableListener(() => {
437
438
  i();
@@ -440,54 +441,54 @@ function Jr({ content: r }) {
440
441
  })(e), n = Wt();
441
442
  return t ? typeof r == "function" ? r(n) : r : null;
442
443
  }
443
- const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : b;
444
- function qr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: h, autoCapitalize: S, className: y, id: x, role: E = "textbox", spellCheck: C = !0, style: v, tabIndex: N, "data-testid": T, ...P }, k) {
445
- const [w, R] = A(r.isEditable()), _ = zt((L) => {
446
- L && L.ownerDocument && L.ownerDocument.defaultView ? r.setRootElement(L) : r.setRootElement(null);
447
- }, [r]), W = Z(() => /* @__PURE__ */ (function(...L) {
448
- return (J) => {
449
- for (const z of L) typeof z == "function" ? z(J) : z != null && (z.current = J);
444
+ const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
445
+ function Yr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: h, autoCapitalize: S, className: y, id: x, role: E = "textbox", spellCheck: C = !0, style: v, tabIndex: N, "data-testid": T, ...P }, L) {
446
+ const [w, R] = M(r.isEditable()), _ = Kt((k) => {
447
+ k && k.ownerDocument && k.ownerDocument.defaultView ? r.setRootElement(k) : r.setRootElement(null);
448
+ }, [r]), J = O(() => /* @__PURE__ */ (function(...k) {
449
+ return (X) => {
450
+ for (const K of k) typeof K == "function" ? K(X) : K != null && (K.current = X);
450
451
  };
451
- })(k, _), [_, k]);
452
- return je(() => (R(r.isEditable()), r.registerEditableListener((L) => {
453
- R(L);
454
- })), [r]), f("div", { "aria-activedescendant": w ? e : void 0, "aria-autocomplete": w ? t : "none", "aria-controls": w ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": w && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": w ? m : void 0, "aria-readonly": !w || void 0, "aria-required": h, autoCapitalize: S, className: y, contentEditable: w, "data-testid": T, id: x, ref: W, role: E, spellCheck: C, style: v, tabIndex: N, ...P });
452
+ })(L, _), [_, L]);
453
+ return je(() => (R(r.isEditable()), r.registerEditableListener((k) => {
454
+ R(k);
455
+ })), [r]), f("div", { "aria-activedescendant": w ? e : void 0, "aria-autocomplete": w ? t : "none", "aria-controls": w ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": w && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": w ? m : void 0, "aria-readonly": !w || void 0, "aria-required": h, autoCapitalize: S, className: y, contentEditable: w, "data-testid": T, id: x, ref: J, role: E, spellCheck: C, style: v, tabIndex: N, ...P });
455
456
  }
456
- const Gr = Ie(qr);
457
+ const qr = Ie(Yr);
457
458
  function _e(r) {
458
- return r.getEditorState().read(He(r.isComposing()));
459
+ return r.getEditorState().read(Oe(r.isComposing()));
459
460
  }
460
- const Xr = Ie(Yr);
461
- function Yr(r, e) {
461
+ const Gr = Ie(Vr);
462
+ function Vr(r, e) {
462
463
  const { placeholder: t, ...n } = r, [o] = D();
463
- return M(ke, { children: [f(Gr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
464
+ return A(Le, { children: [f(qr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
464
465
  }
465
466
  function Zr({ content: r, editor: e }) {
466
467
  const t = (function(s) {
467
- const [i, l] = A(() => _e(s));
468
+ const [i, l] = M(() => _e(s));
468
469
  return je(() => {
469
470
  function d() {
470
471
  const u = _e(s);
471
472
  l(u);
472
473
  }
473
- return d(), j(s.registerUpdateListener(() => {
474
+ return d(), W(s.registerUpdateListener(() => {
474
475
  d();
475
476
  }), s.registerEditableListener(() => {
476
477
  d();
477
478
  }));
478
479
  }, [s]), i;
479
- })(e), [n, o] = A(e.isEditable());
480
- if (H(() => (o(e.isEditable()), e.registerEditableListener((s) => {
480
+ })(e), [n, o] = M(e.isEditable());
481
+ if (j(() => (o(e.isEditable()), e.registerEditableListener((s) => {
481
482
  o(s);
482
483
  })), [e]), !t) return null;
483
484
  let a = null;
484
485
  return typeof r == "function" ? a = r(n) : r !== null && (a = r), a === null ? null : f("div", { "aria-hidden": !0, children: a });
485
486
  }
486
- const Qr = Ht(null), ee = {
487
+ const Qr = Ot(null), ee = {
487
488
  didCatch: !1,
488
489
  error: null
489
490
  };
490
- class Vr extends Ot {
491
+ class en extends Ht {
491
492
  constructor(e) {
492
493
  super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ee;
493
494
  }
@@ -520,7 +521,7 @@ class Vr extends Ot {
520
521
  } = this.state, {
521
522
  resetKeys: o
522
523
  } = this.props;
523
- if (n && t.error !== null && en(e.resetKeys, o)) {
524
+ if (n && t.error !== null && tn(e.resetKeys, o)) {
524
525
  var a, s;
525
526
  (a = (s = this.props).onReset) === null || a === void 0 || a.call(s, {
526
527
  next: o,
@@ -563,70 +564,70 @@ class Vr extends Ot {
563
564
  }, i);
564
565
  }
565
566
  }
566
- function en() {
567
+ function tn() {
567
568
  let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
568
569
  return r.length !== e.length || r.some((t, n) => !Object.is(t, e[n]));
569
570
  }
570
- function tn({ children: r, onError: e }) {
571
- return f(Vr, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
571
+ function rn({ children: r, onError: e }) {
572
+ return f(en, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
572
573
  }
573
- const rn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? H : b;
574
- function nn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
574
+ const nn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
575
+ function on({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
575
576
  const [n] = D();
576
- return rn(() => {
577
+ return nn(() => {
577
578
  if (t) return n.registerUpdateListener(({ editorState: o, dirtyElements: a, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
578
579
  e && a.size === 0 && s.size === 0 || r && l.has(oe) || i.isEmpty() || t(o, n, l);
579
580
  });
580
581
  }, [n, r, e, t]), null;
581
582
  }
582
- function on({ hasStrictIndent: r = !1 }) {
583
+ function an({ hasStrictIndent: r = !1 }) {
583
584
  const [e] = D();
584
585
  return b(() => {
585
- if (!e.hasNodes([Fe, Ke])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
586
+ if (!e.hasNodes([Me, Ae])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
586
587
  }, [e]), b(() => {
587
- if (r) return or(e);
588
+ if (r) return rr(e);
588
589
  }, [e, r]), (function(t) {
589
- b(() => ar(t), [t]);
590
+ b(() => nr(t), [t]);
590
591
  })(e), null;
591
592
  }
592
- function an({ validateUrl: r, attributes: e }) {
593
+ function sn({ validateUrl: r, attributes: e }) {
593
594
  const [t] = D();
594
595
  return b(() => {
595
- if (!t.hasNodes([Re])) throw new Error("LinkPlugin: LinkNode not registered on editor");
596
- }), b(() => Gt(t, ie({ attributes: e, validateUrl: r })), [t, r, e]), null;
596
+ if (!t.hasNodes([Fe])) throw new Error("LinkPlugin: LinkNode not registered on editor");
597
+ }), b(() => or(t, ie({ attributes: e, validateUrl: r })), [t, r, e]), null;
597
598
  }
598
- function sn(r, e, t) {
599
+ function ln(r, e, t) {
599
600
  b(() => {
600
- r.hasNodes([Ae]) || (function(n, ...o) {
601
+ r.hasNodes([Ue]) || (function(n, ...o) {
601
602
  const a = new URL("https://lexical.dev/docs/error"), s = new URLSearchParams();
602
603
  s.append("code", n);
603
604
  for (const i of o) s.append("v", i);
604
605
  throw a.search = s.toString(), Error(`Minified Lexical error #${n}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
605
606
  })(77);
606
- }), b(() => Xt(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
607
+ }), b(() => ar(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
607
608
  }
608
- function ln({ matchers: r, onChange: e }) {
609
+ function un({ matchers: r, onChange: e }) {
609
610
  const [t] = D();
610
- return sn(t, r, e), null;
611
+ return ln(t, r, e), null;
611
612
  }
612
- function un({ newTab: r = !0, disabled: e = !1 }) {
613
+ function dn({ newTab: r = !0, disabled: e = !1 }) {
613
614
  const [t] = D();
614
- return b(() => Yt(t, ie({ disabled: e, newTab: r })), [t, r, e]), null;
615
+ return b(() => sr(t, ie({ disabled: e, newTab: r })), [t, r, e]), null;
615
616
  }
616
- function dn(r, e, t, n, o) {
617
+ function cn(r, e, t, n, o) {
617
618
  if (r === null || t.size === 0 && n.size === 0 && !o) return 0;
618
619
  const a = e._selection, s = r._selection;
619
620
  if (o) return 1;
620
621
  if (!(g(a) && g(s) && s.isCollapsed() && a.isCollapsed())) return 0;
621
622
  const i = (function(C, v, N) {
622
623
  const T = C._nodeMap, P = [];
623
- for (const k of v) {
624
- const w = T.get(k);
624
+ for (const L of v) {
625
+ const w = T.get(L);
625
626
  w !== void 0 && P.push(w);
626
627
  }
627
- for (const [k, w] of N) {
628
+ for (const [L, w] of N) {
628
629
  if (!w) continue;
629
- const R = T.get(k);
630
+ const R = T.get(L);
630
631
  R === void 0 || Te(R) || P.push(R);
631
632
  }
632
633
  return P;
@@ -645,50 +646,50 @@ function dn(r, e, t, n, o) {
645
646
  const y = h.offset, x = S.offset, E = m.length - u.length;
646
647
  return E === 1 && x === y - 1 ? 2 : E === -1 && x === y + 1 ? 3 : E === -1 && x === y ? 4 : 0;
647
648
  }
648
- function cn(r, e) {
649
+ function fn(r, e) {
649
650
  let t = Date.now(), n = 0;
650
651
  return (o, a, s, i, l, d) => {
651
652
  const u = Date.now();
652
653
  if (d.has(ne)) return n = 0, t = u, 2;
653
- const m = dn(o, a, i, l, r.isComposing()), h = (() => {
654
- const S = s === null || s.editor === r, y = d.has(At);
654
+ const m = cn(o, a, i, l, r.isComposing()), h = (() => {
655
+ const S = s === null || s.editor === r, y = d.has(Mt);
655
656
  if (!y && S && d.has(oe)) return 0;
656
657
  if (o === null) return 1;
657
658
  const x = a._selection;
658
659
  if (!(i.size > 0 || l.size > 0)) return x !== null ? 0 : 2;
659
660
  const E = typeof e == "number" ? e : e.peek();
660
661
  return y === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(C, v, N) {
661
- const T = v._nodeMap.get(C), P = N._nodeMap.get(C), k = v._selection, w = N._selection;
662
- return !(g(k) && g(w) && k.anchor.type === "element" && k.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !I(T) || !I(P) || T.__parent !== P.__parent) && JSON.stringify(v.read(() => T.exportJSON())) === JSON.stringify(N.read(() => P.exportJSON()));
662
+ const T = v._nodeMap.get(C), P = N._nodeMap.get(C), L = v._selection, w = N._selection;
663
+ return !(g(L) && g(w) && L.anchor.type === "element" && L.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !I(T) || !I(P) || T.__parent !== P.__parent) && JSON.stringify(v.read(() => T.exportJSON())) === JSON.stringify(N.read(() => P.exportJSON()));
663
664
  })(Array.from(i)[0], o, a) ? 0 : 1;
664
665
  })();
665
666
  return t = u, n = m, h;
666
667
  };
667
668
  }
668
- function Le(r) {
669
+ function ke(r) {
669
670
  r.undoStack = [], r.redoStack = [], r.current = null;
670
671
  }
671
672
  function We(r, e, t) {
672
- const n = cn(r, t);
673
- return j(r.registerCommand(Rt, () => ((function(a, s) {
673
+ const n = fn(r, t);
674
+ return W(r.registerCommand(Rt, () => ((function(a, s) {
674
675
  const i = s.redoStack, l = s.undoStack;
675
676
  if (l.length !== 0) {
676
677
  const d = s.current, u = l.pop();
677
- d !== null && (i.push(d), a.dispatchCommand(q, !0)), l.length === 0 && a.dispatchCommand(G, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
678
+ d !== null && (i.push(d), a.dispatchCommand(Y, !0)), l.length === 0 && a.dispatchCommand(q, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
678
679
  }
679
680
  })(r, e), !0), c), r.registerCommand(It, () => ((function(a, s) {
680
681
  const i = s.redoStack, l = s.undoStack;
681
682
  if (i.length !== 0) {
682
683
  const d = s.current;
683
- d !== null && (l.push(d), a.dispatchCommand(G, !0));
684
+ d !== null && (l.push(d), a.dispatchCommand(q, !0));
684
685
  const u = i.pop();
685
- i.length === 0 && a.dispatchCommand(q, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
686
+ i.length === 0 && a.dispatchCommand(Y, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
686
687
  }
687
- })(r, e), !0), c), r.registerCommand(Bt, () => (Le(e), !1), c), r.registerCommand($t, () => (Le(e), r.dispatchCommand(q, !1), r.dispatchCommand(G, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
688
+ })(r, e), !0), c), r.registerCommand(Bt, () => (ke(e), !1), c), r.registerCommand($t, () => (ke(e), r.dispatchCommand(Y, !1), r.dispatchCommand(q, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
688
689
  const u = e.current, m = e.redoStack, h = e.undoStack, S = u === null ? null : u.editorState;
689
690
  if (u !== null && a === S) return;
690
691
  const y = n(s, a, u, i, l, d);
691
- if (y === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(q, !1)), u !== null && (h.push({ ...u }), r.dispatchCommand(G, !0));
692
+ if (y === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), u !== null && (h.push({ ...u }), r.dispatchCommand(q, !0));
692
693
  else if (y === 2) return;
693
694
  e.current = { editor: r, editorState: a };
694
695
  }));
@@ -698,48 +699,50 @@ function Je() {
698
699
  }
699
700
  const te = ae({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => ie({ delay: e, disabled: n, historyState: t(r) }), config: Ft({ createInitialHistoryState: Je, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
700
701
  const n = t.getOutput();
701
- return Me(() => n.disabled.value ? void 0 : We(r, n.historyState.value, n.delay));
702
+ return Re(() => n.disabled.value ? void 0 : We(r, n.historyState.value, n.delay));
702
703
  } });
703
- ae({ dependencies: [Mt(te, { createInitialHistoryState: () => {
704
+ ae({ dependencies: [At(te, { createInitialHistoryState: () => {
704
705
  throw new Error("SharedHistory did not inherit parent history");
705
706
  }, disabled: !0 })], name: "@lexical/history/SharedHistory", register(r, e, t) {
706
707
  const { output: n } = t.getDependency(te), o = (function(s) {
707
- return s ? Zt(s, te.name) : null;
708
+ return s ? Yt(s, te.name) : null;
708
709
  })(r._parentEditor);
709
710
  if (!o) return () => {
710
711
  };
711
712
  const a = o.output;
712
- return Me(() => Qt(() => {
713
+ return Re(() => qt(() => {
713
714
  n.delay.value = a.delay.value, n.historyState.value = a.historyState.value, n.disabled.value = a.disabled.value;
714
715
  }));
715
716
  } });
716
- function fn({ delay: r, externalHistoryState: e }) {
717
+ function mn({ delay: r, externalHistoryState: e }) {
717
718
  const [t] = D();
718
719
  return (function(n, o, a = 1e3) {
719
- const s = Z(() => o || Je(), [o]);
720
+ const s = O(() => o || Je(), [o]);
720
721
  b(() => We(n, s, a), [a, n, s]);
721
722
  })(t, e, r), null;
722
723
  }
723
- function mn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1 }) {
724
- const [o] = D();
725
- return b(() => {
726
- sr(o) !== n && (ir(o, n), o.registerNodeTransform(Ue, () => {
724
+ function pn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1, hasNestedTables: o = !1 }) {
725
+ const [a] = D();
726
+ b(() => {
727
+ ir(a) !== n && (lr(a, n), a.registerNodeTransform(ze, () => {
727
728
  })());
728
- }, [o, n]), b(() => lr(o), [o]), b(() => ur(o, t), [o, t]), b(() => {
729
- if (!r) return dr(o);
730
- }, [o, r]), b(() => {
731
- if (!e) return o.registerNodeTransform(ze, (a) => {
732
- a.getBackgroundColor() !== null && a.setBackgroundColor(null);
729
+ }, [a, n]);
730
+ const s = O(() => Gt(!1), []);
731
+ return s.peek() !== o && (s.value = o), b(() => ur(a, { hasNestedTables: s }), [a, s]), b(() => dr(a, t), [a, t]), b(() => {
732
+ if (!r) return cr(a);
733
+ }, [a, r]), b(() => {
734
+ if (!e) return a.registerNodeTransform(Ke, (i) => {
735
+ i.getBackgroundColor() !== null && i.setBackgroundColor(null);
733
736
  });
734
- }, [o, e, r]), null;
737
+ }, [a, e, r]), null;
735
738
  }
736
- function pn({ editorRef: r }) {
739
+ function gn({ editorRef: r }) {
737
740
  const [e] = D();
738
- return Kt.useEffect(() => {
741
+ return Ut.useEffect(() => {
739
742
  typeof r == "function" ? r(e) : typeof r == "object" && (r.current = e);
740
743
  }, [e]), null;
741
744
  }
742
- const qe = 200, gn = ({
745
+ const Xe = 200, hn = ({
743
746
  currentLanguage: r = "NL",
744
747
  initialValue: e = "",
745
748
  placeholder: t = "",
@@ -749,41 +752,41 @@ const qe = 200, gn = ({
749
752
  notValid: s = !1,
750
753
  notValidatedText: i = "",
751
754
  maxHeightInRem: l = "20rem",
752
- maxWords: d = qe,
755
+ maxWords: d = Xe,
753
756
  rteRef: u = null,
754
757
  onChange: m,
755
758
  onCatalogueLinkSearch: h,
756
759
  catalogueSearchResponse: S = { state: "idle", results: [] }
757
760
  }) => {
758
- const { switchLanguage: y } = xr(), x = yr(), [E] = A(() => Pe()), [C, v] = A(0), [N, T] = A(0), P = jt(), k = {
761
+ const { switchLanguage: y } = Nr(), x = Cr(), [E] = M(() => Pe()), [C, v] = M(0), [N, T] = M(0), P = jt(), L = {
759
762
  html: {
760
- export: fr
763
+ export: mr
761
764
  },
762
765
  namespace: "UvaRte",
763
766
  editor: E,
764
- theme: Er,
767
+ theme: wr,
765
768
  onError(_) {
766
769
  throw _;
767
770
  },
768
771
  nodes: [
772
+ Me,
773
+ Ae,
769
774
  Fe,
775
+ Ue,
770
776
  Ke,
771
- Re,
772
- Ae,
777
+ fr,
773
778
  ze,
774
- cr,
775
- Ue,
776
- Nr,
777
- _r
779
+ _r,
780
+ kr
778
781
  ],
779
782
  editorState: (_) => {
780
- const L = new DOMParser().parseFromString(e, "text/html"), J = rr(_, L);
781
- F().clear(), $e(J), De(null);
783
+ const k = new DOMParser().parseFromString(e, "text/html"), X = er(_, k);
784
+ F().clear(), $e(X), De(null);
782
785
  }
783
- }, w = (_) => _.trim().length === 0 ? 0 : _.split(" ").length, R = (_, W) => {
786
+ }, w = (_) => _.trim().length === 0 ? 0 : _.split(" ").length, R = (_, J) => {
784
787
  _.read(() => {
785
- let L = "";
786
- v(w(F().getTextContent().replace(/\s+/g, " ").trim())), L = mr(nr(W)), L = pr(L), m(L);
788
+ let k = "";
789
+ v(w(F().getTextContent().replace(/\s+/g, " ").trim())), k = pr(tr(J)), k = gr(k), m(k);
787
790
  });
788
791
  };
789
792
  return b(() => {
@@ -791,10 +794,10 @@ const qe = 200, gn = ({
791
794
  }, [r, y]), b(() => {
792
795
  const _ = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
793
796
  v(w(_));
794
- }, [e]), /* @__PURE__ */ M("div", { className: B.editor__container, children: [
795
- /* @__PURE__ */ M("div", { className: B.editor__header, children: [
796
- /* @__PURE__ */ f(wr, { label: n, info: o, required: a }),
797
- /* @__PURE__ */ M("div", { className: B["editor__header-word-count"], children: [
797
+ }, [e]), /* @__PURE__ */ A("div", { className: B.editor__container, children: [
798
+ /* @__PURE__ */ A("div", { className: B.editor__header, children: [
799
+ /* @__PURE__ */ f(Sr, { label: n, info: o, required: a }),
800
+ /* @__PURE__ */ A("div", { className: B["editor__header-word-count"], children: [
798
801
  /* @__PURE__ */ f("span", { className: Ce({ [B["editor__header-word-count--alert"]]: C > d }), children: C }),
799
802
  " / ",
800
803
  d
@@ -806,21 +809,21 @@ const qe = 200, gn = ({
806
809
  className: Ce(B.editor, {
807
810
  [B["not-valid"]]: s
808
811
  }),
809
- children: /* @__PURE__ */ M(Pr, { initialConfig: k, children: [
812
+ children: /* @__PURE__ */ A(Dr, { initialConfig: L, children: [
810
813
  /* @__PURE__ */ f(
811
- vr,
814
+ yr,
812
815
  {
813
816
  editorScrollPosition: N,
814
817
  onCatalogueLinkSearch: h,
815
818
  catalogueSearchResponse: S
816
819
  }
817
820
  ),
818
- /* @__PURE__ */ M("div", { className: B["editor__field-wrapper"], children: [
821
+ /* @__PURE__ */ A("div", { className: B["editor__field-wrapper"], children: [
819
822
  /* @__PURE__ */ f(
820
- Wr,
823
+ Jr,
821
824
  {
822
825
  contentEditable: /* @__PURE__ */ f(
823
- Xr,
826
+ Gr,
824
827
  {
825
828
  className: B.editor__field,
826
829
  "aria-label": x.common.rteAriaLabel,
@@ -834,27 +837,27 @@ const qe = 200, gn = ({
834
837
  }
835
838
  ),
836
839
  placeholder: /* @__PURE__ */ f("div", { className: B.editor__placeholder, children: t }),
837
- ErrorBoundary: tn
840
+ ErrorBoundary: rn
838
841
  }
839
842
  ),
840
- /* @__PURE__ */ f(mn, {}),
843
+ /* @__PURE__ */ f(pn, {}),
841
844
  /* @__PURE__ */ f(Jt, {}),
842
- /* @__PURE__ */ f(fn, {}),
843
- /* @__PURE__ */ f(on, {}),
844
- /* @__PURE__ */ f(an, { validateUrl: gr }),
845
- /* @__PURE__ */ f(ln, { matchers: hr }),
846
- /* @__PURE__ */ f(un, {}),
847
- /* @__PURE__ */ f(nn, { onChange: R }),
848
- /* @__PURE__ */ f(br, {}),
845
+ /* @__PURE__ */ f(mn, {}),
846
+ /* @__PURE__ */ f(an, {}),
847
+ /* @__PURE__ */ f(sn, { validateUrl: hr }),
848
+ /* @__PURE__ */ f(un, { matchers: vr }),
849
+ /* @__PURE__ */ f(dn, {}),
850
+ /* @__PURE__ */ f(on, { onChange: R }),
851
+ /* @__PURE__ */ f(Er, {}),
849
852
  /* @__PURE__ */ f(Lr, {}),
850
- u && /* @__PURE__ */ f(pn, { editorRef: u })
853
+ u && /* @__PURE__ */ f(gn, { editorRef: u })
851
854
  ] })
852
855
  ] })
853
856
  }
854
857
  ),
855
- i !== "" && /* @__PURE__ */ f(Cr, { level: "error", feedback: i })
858
+ i !== "" && /* @__PURE__ */ f(br, { level: "error", feedback: i })
856
859
  ] });
857
- }, co = ({
860
+ }, mo = ({
858
861
  currentLanguage: r = "NL",
859
862
  initialValue: e = "",
860
863
  placeholder: t = "",
@@ -863,13 +866,13 @@ const qe = 200, gn = ({
863
866
  required: a = !1,
864
867
  notValid: s = !1,
865
868
  notValidatedText: i = "",
866
- maxWords: l = qe,
869
+ maxWords: l = Xe,
867
870
  rteRef: d,
868
871
  onChange: u,
869
872
  onCatalogueLinkSearch: m,
870
873
  catalogueSearchResponse: h = { state: "idle", results: [] }
871
- }) => /* @__PURE__ */ f(Sr, { children: /* @__PURE__ */ f(
872
- gn,
874
+ }) => /* @__PURE__ */ f(xr, { children: /* @__PURE__ */ f(
875
+ hn,
873
876
  {
874
877
  currentLanguage: r.toUpperCase(),
875
878
  initialValue: e,
@@ -887,7 +890,7 @@ const qe = 200, gn = ({
887
890
  }
888
891
  ) });
889
892
  export {
890
- gn as Rte,
891
- co as RteEditor
893
+ hn as Rte,
894
+ mo as RteEditor
892
895
  };
893
896
  //# sourceMappingURL=RteEditor.js.map