@uva-glass/component-library 3.52.11 → 3.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/{Lexical.prod-sd_e2sqT.js → Lexical.prod-CNQPQ6W-.js} +1428 -1410
  2. package/dist/Lexical.prod-CNQPQ6W-.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-Co2PF1UJ.js → LexicalClipboard.prod-BdghxvkJ.js} +75 -75
  4. package/dist/{LexicalClipboard.prod-Co2PF1UJ.js.map → LexicalClipboard.prod-BdghxvkJ.js.map} +1 -1
  5. package/dist/LexicalExtension.prod-qYTg6Mah.js +551 -0
  6. package/dist/LexicalExtension.prod-qYTg6Mah.js.map +1 -0
  7. package/dist/LexicalLink.prod-DjG5QZHP.js +502 -0
  8. package/dist/LexicalLink.prod-DjG5QZHP.js.map +1 -0
  9. package/dist/{LexicalList.prod-CIB0K0ja.js → LexicalList.prod-CzxWmBG3.js} +65 -65
  10. package/dist/LexicalList.prod-CzxWmBG3.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-CCmcTP6S.js → LexicalSelection.prod-CqTp0hfr.js} +44 -44
  12. package/dist/LexicalSelection.prod-CqTp0hfr.js.map +1 -0
  13. package/dist/{LexicalTable.prod-Oa2YPHLl.js → LexicalTable.prod-C97KnedB.js} +331 -319
  14. package/dist/LexicalTable.prod-C97KnedB.js.map +1 -0
  15. package/dist/{LexicalUtils.prod-CjKjgnmx.js → LexicalUtils.prod-lqA_upYF.js} +39 -39
  16. package/dist/LexicalUtils.prod-lqA_upYF.js.map +1 -0
  17. package/dist/RteEditor.module-DaBh86FK.js +41 -0
  18. package/dist/RteEditor.module-DaBh86FK.js.map +1 -0
  19. package/dist/{TableCellResizerPlugin-DATbSzfg.js → TableCellResizerPlugin-BdgrIlKp.js} +57 -57
  20. package/dist/{TableCellResizerPlugin-DATbSzfg.js.map → TableCellResizerPlugin-BdgrIlKp.js.map} +1 -1
  21. package/dist/{TablePlugin-CqCjNBW_.js → TablePlugin-DBKzGTIm.js} +70 -70
  22. package/dist/{TablePlugin-CqCjNBW_.js.map → TablePlugin-DBKzGTIm.js.map} +1 -1
  23. package/dist/assets/AddCatalogueLinkForm.css +1 -0
  24. package/dist/assets/Flyout.css +1 -1
  25. package/dist/assets/RteEditor.css +1 -1
  26. package/dist/assets/variables.css +72 -72
  27. package/dist/chunk-GPBRNGY5-UqVYj0H5.js +4507 -0
  28. package/dist/chunk-GPBRNGY5-UqVYj0H5.js.map +1 -0
  29. package/dist/{client-CFLMKOFW.js → client-DkvV9jg_.js} +90 -90
  30. package/dist/{client-CFLMKOFW.js.map → client-DkvV9jg_.js.map} +1 -1
  31. package/dist/components/Accordion/Accordion.test.js +2 -2
  32. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  33. package/dist/components/ActionList/ActionList.test.js +2 -2
  34. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  35. package/dist/components/Attention/Attention.test.js +1 -1
  36. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  37. package/dist/components/Buttons/Button.stories.js +1 -1
  38. package/dist/components/Buttons/Button.test.js +1 -1
  39. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  40. package/dist/components/Buttons/LinkButton.test.js +1 -1
  41. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  42. package/dist/components/Buttons/MenuButton.test.js +1 -1
  43. package/dist/components/Card/Card.test.js +1 -1
  44. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  45. package/dist/components/Checkbox/Checkbox.test.js +2 -2
  46. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  47. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  48. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  49. package/dist/components/CheckboxTree/CheckboxTree.stories.js +111 -55
  50. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  51. package/dist/components/Chip/Chip.stories.js +1 -1
  52. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  53. package/dist/components/Drawer/Drawer.stories.js +1 -1
  54. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  55. package/dist/components/FormInput/FormInput.js +1 -1
  56. package/dist/components/FormInput/FormInput.stories.js +1 -1
  57. package/dist/components/IconButton/IconButton.stories.js +1 -1
  58. package/dist/components/InputField/InputField.stories.js +2 -2
  59. package/dist/components/Label/Label.test.js +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.js +1 -1
  63. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  64. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  65. package/dist/components/MultiSelect/index.js +1 -1
  66. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  67. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
  68. package/dist/components/Notification/Notification.stories.js +1 -1
  69. package/dist/components/Notification/Notification.test.js +1 -1
  70. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  71. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  72. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  73. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  74. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  75. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  76. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  77. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  78. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  79. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
  80. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.d.ts +22 -0
  81. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js +108 -0
  82. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js.map +1 -0
  83. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.d.ts +1 -0
  84. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js +5 -0
  85. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js.map +1 -0
  86. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.d.ts +8 -0
  87. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +182 -0
  88. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -0
  89. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.d.ts +1 -0
  90. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js +5 -0
  91. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js.map +1 -0
  92. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +6 -6
  93. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  94. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.d.ts +0 -2
  95. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +108 -128
  96. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  97. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  98. package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +2 -3
  99. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +52 -57
  100. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  101. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
  102. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  103. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  104. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
  105. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +6 -6
  106. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +25 -24
  107. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
  108. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  109. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.d.ts +4 -1
  110. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +66 -53
  111. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  112. package/dist/components/RteEditor/Plugins/index.js +8 -9
  113. package/dist/components/RteEditor/Providers/LanguageProvider.d.ts +2 -2
  114. package/dist/components/RteEditor/Providers/LanguageProvider.js +4 -4
  115. package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
  116. package/dist/components/RteEditor/RteEditor.d.ts +8 -3
  117. package/dist/components/RteEditor/RteEditor.js +375 -347
  118. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  119. package/dist/components/RteEditor/RteEditor.stories.js +69 -33
  120. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  121. package/dist/components/RteEditor/UvaTheme/UvaTheme.d.ts +1 -0
  122. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +3 -2
  123. package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
  124. package/dist/components/RteEditor/helpers.js +26 -23
  125. package/dist/components/RteEditor/helpers.js.map +1 -1
  126. package/dist/components/RteEditor/hooks/components/Flyout.js +6 -16
  127. package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
  128. package/dist/components/RteEditor/hooks/useTranslation.d.ts +39 -1
  129. package/dist/components/RteEditor/hooks/useTranslation.js +6 -6
  130. package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
  131. package/dist/components/RteEditor/mockCatalogueSearchData.d.ts +18 -0
  132. package/dist/components/RteEditor/mockCatalogueSearchData.js +485 -0
  133. package/dist/components/RteEditor/mockCatalogueSearchData.js.map +1 -0
  134. package/dist/components/RteEditor/mockRteContent.d.ts +1 -1
  135. package/dist/components/RteEditor/mockRteContent.js +8 -6
  136. package/dist/components/RteEditor/mockRteContent.js.map +1 -1
  137. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.d.ts +29 -0
  138. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +126 -0
  139. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -0
  140. package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.d.ts +1 -0
  141. package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js +11 -0
  142. package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js.map +1 -0
  143. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +58 -52
  144. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
  145. package/dist/components/RteEditor/nodes/index.d.ts +1 -0
  146. package/dist/components/RteEditor/nodes/index.js +14 -6
  147. package/dist/components/RteEditor/nodes/index.js.map +1 -1
  148. package/dist/components/RteEditor/translations.d.ts +41 -3
  149. package/dist/components/RteEditor/translations.js +44 -6
  150. package/dist/components/RteEditor/translations.js.map +1 -1
  151. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  152. package/dist/components/Sortable/Sortable.stories.js +1 -1
  153. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  154. package/dist/components/TextArea/TextArea.stories.js +1 -1
  155. package/dist/components/TextArea/TextArea.test.js +2 -2
  156. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  157. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  158. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  159. package/dist/components/index.js +1 -1
  160. package/dist/{index-DRQMriwT.js → index-BmvI9fji.js} +8665 -10000
  161. package/dist/index-BmvI9fji.js.map +1 -0
  162. package/dist/{index-BKK3EWVW.js → index-Daa6JVq6.js} +2 -2
  163. package/dist/{index-BKK3EWVW.js.map → index-Daa6JVq6.js.map} +1 -1
  164. package/dist/index.js +1 -1
  165. package/dist/react-18-vQ75Numl.js +41 -0
  166. package/dist/react-18-vQ75Numl.js.map +1 -0
  167. package/dist/{react.esm-BjO203QT.js → react.esm-CzkD5JmE.js} +2 -2
  168. package/dist/{react.esm-BjO203QT.js.map → react.esm-CzkD5JmE.js.map} +1 -1
  169. package/dist/storybook__react.d.js +4252 -4509
  170. package/dist/storybook__react.d.js.map +1 -1
  171. package/package.json +27 -27
  172. package/dist/Lexical.prod-sd_e2sqT.js.map +0 -1
  173. package/dist/LexicalLink.prod-BCE6Bg2N.js +0 -1047
  174. package/dist/LexicalLink.prod-BCE6Bg2N.js.map +0 -1
  175. package/dist/LexicalList.prod-CIB0K0ja.js.map +0 -1
  176. package/dist/LexicalSelection.prod-CCmcTP6S.js.map +0 -1
  177. package/dist/LexicalTable.prod-Oa2YPHLl.js.map +0 -1
  178. package/dist/LexicalUtils.prod-CjKjgnmx.js.map +0 -1
  179. package/dist/RteEditor.module-CUi7Vqe8.js +0 -37
  180. package/dist/RteEditor.module-CUi7Vqe8.js.map +0 -1
  181. package/dist/chunk-HERDX7MO-DaYu-eWo.js +0 -11320
  182. package/dist/chunk-HERDX7MO-DaYu-eWo.js.map +0 -1
  183. package/dist/index-DRQMriwT.js.map +0 -1
  184. package/dist/react-18-C6foUf2n.js +0 -42
  185. package/dist/react-18-C6foUf2n.js.map +0 -1
@@ -1,23 +1,24 @@
1
- import { jsx as f, jsxs as A, Fragment as ke } from "react/jsx-runtime";
2
- import { t as Ge, r as Xe, o as k } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { aK as De, ah as F, L as Ye, b as g, aS as ne, aM as oe, an as U, S as ae, I as Qe, l as R, y as h, Y as Ve, K as c, aW as Ze, ad as et, r as tt, u as rt, aX as nt, aY as ot, U as at, aV as P, aG as st, aZ as it, a_ as lt, a$ as ut, v as te, b0 as dt, b1 as ct, a3 as ft, o as mt, a0 as Pe, J as pt, b2 as gt, b3 as ue, c as de, Q as ht, O as Q, P as vt, a4 as $e, b4 as ce, G as yt, F as Ct, T as bt, b5 as fe, B as Et, b6 as wt, b7 as St, b8 as Te, aF as xt, V as Nt, d as Be, _ as _t, b9 as Lt, W as kt, N as Dt, M as Pt, p as $t, au as W, at as J, ba as Tt, bb as Bt, aw as It, bc as re, av as Rt, bd as Mt, be as At, aQ as Ft } from "../../Lexical.prod-sd_e2sqT.js";
4
- import * as Kt from "react";
5
- import { useMemo as X, useLayoutEffect as O, useEffect as b, useState as M, Suspense as zt, forwardRef as Ie, useCallback as Ut, Component as Ot, createElement as me, createContext as Ht, useId as jt } from "react";
6
- import { a as Wt, T as Jt } from "../../TableCellResizerPlugin-DATbSzfg.js";
7
- import { B as qt, y as Re, F as Gt, a as se, A as Me, l as Xt, z as Yt, G as Qt, d as Ae, b as Vt } from "../../LexicalLink.prod-BCE6Bg2N.js";
8
- import { flushSync as Zt, createPortal as er } from "react-dom";
9
- import { U as H, L as z, x as tr } from "../../LexicalUtils.prod-CjKjgnmx.js";
10
- import { R as pe, F as ge, m as rr, g as nr } from "../../LexicalClipboard.prod-Co2PF1UJ.js";
11
- import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-CCmcTP6S.js";
12
- import { l as Fe, n as Ke, L as or, b as ar } from "../../LexicalList.prod-CIB0K0ja.js";
13
- import { b as sr, u as ir, h as ze, N as lr, y as ur, c as dr, x as Ue, E as cr } from "../../LexicalTable.prod-Oa2YPHLl.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-CNQPQ6W-.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-BdgrIlKp.js";
7
+ import { B as Xt, a as ie, G as Yt, d as Re, F as qt, X as Gt } from "../../LexicalExtension.prod-qYTg6Mah.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-lqA_upYF.js";
10
+ import { R as pe, F as ge, m as er, g as tr } from "../../LexicalClipboard.prod-BdghxvkJ.js";
11
+ import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-CqTp0hfr.js";
12
+ import { l as Me, n as Ae, L as rr, b as nr } from "../../LexicalList.prod-CzxWmBG3.js";
13
+ import { y as Fe, F as or, A as Ue, l as ar, z as sr } from "../../LexicalLink.prod-DjG5QZHP.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-C97KnedB.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";
17
- import { s as $ } from "../../RteEditor.module-CUi7Vqe8.js";
18
- import { ToolBarPlugin as vr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
19
- import { useTranslation as yr } from "./hooks/useTranslation.js";
20
- import "../../TablePlugin-CqCjNBW_.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";
18
+ import { s as B } from "../../RteEditor.module-DaBh86FK.js";
19
+ import { ToolBarPlugin as yr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
20
+ import { useTranslation as Cr } from "./hooks/useTranslation.js";
21
+ import "../../TablePlugin-DBKzGTIm.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,79 +42,80 @@ 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
- const Oe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, _r = Oe ? O : b, q = { tag: ne };
50
- function Lr({ initialConfig: r, children: e }) {
51
- const t = X(() => {
52
- const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Ge(null, n), u = De({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
53
- return (function(m, v) {
54
- if (v !== null) {
55
- if (v === void 0) m.update(() => {
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 });
55
+ return (function(m, h) {
56
+ if (h !== null) {
57
+ if (h === void 0) m.update(() => {
56
58
  const S = F();
57
59
  if (S.isEmpty()) {
58
- const C = Ye();
59
- S.append(C);
60
- const x = Oe ? document.activeElement : null;
61
- (g() !== null || x !== null && x === m.getRootElement()) && C.select();
60
+ const y = Ge();
61
+ S.append(y);
62
+ const x = He ? document.activeElement : null;
63
+ (p() !== null || x !== null && x === m.getRootElement()) && y.select();
62
64
  }
63
- }, q);
64
- else if (v !== null) switch (typeof v) {
65
+ }, G);
66
+ else if (h !== null) switch (typeof h) {
65
67
  case "string": {
66
- const S = m.parseEditorState(v);
67
- m.setEditorState(S, q);
68
+ const S = m.parseEditorState(h);
69
+ m.setEditorState(S, G);
68
70
  break;
69
71
  }
70
72
  case "object":
71
- m.setEditorState(v, q);
73
+ m.setEditorState(h, G);
72
74
  break;
73
75
  case "function":
74
76
  m.update(() => {
75
- F().isEmpty() && v(m);
76
- }, q);
77
+ F().isEmpty() && h(m);
78
+ }, G);
77
79
  }
78
80
  }
79
81
  })(u, i), [u, d];
80
82
  }, []);
81
- return _r(() => {
83
+ return Pr(() => {
82
84
  const n = r.editable, [o] = t;
83
85
  o.setEditable(n === void 0 || n);
84
- }, []), f(Xe.Provider, { value: t, children: e });
86
+ }, []), f(qe.Provider, { value: t, children: e });
85
87
  }
86
- const kr = oe({ name: "@lexical/react/ReactProvider" });
87
- function Dr() {
88
+ const Tr = ae({ name: "@lexical/react/ReactProvider" });
89
+ function $r() {
88
90
  return F().getTextContent();
89
91
  }
90
- function Pr(r, e = !0) {
92
+ function Br(r, e = !0) {
91
93
  if (r) return !1;
92
- let t = Dr();
94
+ let t = $r();
93
95
  return e && (t = t.trim()), t === "";
94
96
  }
95
- function $r(r) {
96
- if (!Pr(r, !1)) return !1;
97
+ function Ir(r) {
98
+ if (!Br(r, !1)) return !1;
97
99
  const e = F().getChildren(), t = e.length;
98
100
  if (t > 1) return !1;
99
101
  for (let n = 0; n < t; n++) {
100
102
  const o = e[n];
101
- if (U(o)) return !1;
102
- if (ae(o)) {
103
- if (!Qe(o) || o.__indent !== 0) return !1;
103
+ if (H(o)) return !1;
104
+ if (se(o)) {
105
+ if (!Ve(o) || o.__indent !== 0) return !1;
104
106
  const a = o.getChildren(), s = a.length;
105
107
  for (let i = 0; i < s; i++) {
106
108
  const l = a[n];
107
- if (!R(l)) return !1;
109
+ if (!I(l)) return !1;
108
110
  }
109
111
  }
110
112
  }
111
113
  return !0;
112
114
  }
113
- function He(r) {
114
- return () => $r(r);
115
+ function Oe(r) {
116
+ return () => Ir(r);
115
117
  }
116
- function Tr(r) {
118
+ function Rr(r) {
117
119
  const e = window.location.origin, t = (n) => {
118
120
  if (n.origin !== e) return;
119
121
  const o = r.getRootElement();
@@ -131,16 +133,16 @@ function Tr(r) {
131
133
  if (i && i.functionId === "makeChanges") {
132
134
  const l = i.args;
133
135
  if (l) {
134
- const [d, u, m, v, S] = l;
136
+ const [d, u, m, h, S] = l;
135
137
  r.update(() => {
136
- const C = g();
137
- if (h(C)) {
138
- const x = C.anchor;
139
- let E = x.getNode(), w = 0, y = 0;
140
- if (R(E) && d >= 0 && u >= 0 && (w = d, y = d + u, C.setTextNodeRange(E, w, E, y)), w === y && m === "" || (C.insertRawText(m), E = x.getNode()), R(E)) {
141
- w = v, y = v + S;
138
+ const y = p();
139
+ if (g(y)) {
140
+ const x = y.anchor;
141
+ let E = x.getNode(), C = 0, v = 0;
142
+ if (I(E) && d >= 0 && u >= 0 && (C = d, v = d + u, y.setTextNodeRange(E, C, E, v)), C === v && m === "" || (y.insertRawText(m), E = x.getNode()), I(E)) {
143
+ C = h, v = h + S;
142
144
  const N = E.getTextContentSize();
143
- w = w > N ? N : w, y = y > N ? N : y, C.setTextNodeRange(E, w, E, y);
145
+ C = C > N ? N : C, v = v > N ? N : v, y.setTextNodeRange(E, C, E, v);
144
146
  }
145
147
  n.stopImmediatePropagation();
146
148
  }
@@ -165,21 +167,21 @@ function be(r, e) {
165
167
  }
166
168
  return null;
167
169
  }
168
- const K = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Br = K && "documentMode" in document ? document.documentMode : null, Ir = K && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Rr = !(!K || !("InputEvent" in window) || Br) && "getTargetRanges" in new window.InputEvent("input"), Mr = K && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = K && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ar = K && /^(?=.*Chrome).*/i.test(navigator.userAgent), Fr = K && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Ir && !Ar, we = tt("DRAG_DROP_PASTE_FILE");
169
- function G(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) {
170
172
  let e = null;
171
173
  if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
172
174
  const t = e.types, n = t.includes("Files"), o = t.includes("text/html") || t.includes("text/plain");
173
175
  return [n, Array.from(e.files), o];
174
176
  }
175
177
  function Se(r) {
176
- const e = g();
177
- if (!h(e)) return !1;
178
+ const e = p();
179
+ if (!g(e)) return !1;
178
180
  const t = /* @__PURE__ */ new Set(), n = e.getNodes();
179
181
  for (let o = 0; o < n.length; o++) {
180
182
  const a = n[o], s = a.getKey();
181
183
  if (t.has(s)) continue;
182
- const i = Be(a, (d) => ae(d) && !d.isInline());
184
+ const i = Be(a, (d) => se(d) && !d.isInline());
183
185
  if (i === null) continue;
184
186
  const l = i.getKey();
185
187
  i.canIndent() && !t.has(l) && (t.add(l), r(i));
@@ -187,250 +189,250 @@ function Se(r) {
187
189
  return t.size > 0;
188
190
  }
189
191
  function xe(r) {
190
- const e = te(r);
191
- return U(e);
192
+ const e = re(r);
193
+ return H(e);
192
194
  }
193
- function V(r) {
195
+ function Q(r) {
194
196
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
195
197
  }
196
- function Kr(r) {
197
- return H(r.registerCommand($t, (e) => {
198
- const t = g();
199
- return !!P(t) && (t.clear(), !0);
200
- }, c), r.registerCommand(Q, (e) => {
201
- const t = g();
202
- return h(t) ? (t.deleteCharacter(e), !0) : !!P(t) && (t.deleteNodes(), !0);
203
- }, c), r.registerCommand(Pt, (e) => {
204
- const t = g();
205
- return !!h(t) && (t.deleteWord(e), !0);
198
+ function Hr(r) {
199
+ return W(r.registerCommand(Tt, (e) => {
200
+ const t = p();
201
+ return !!$(t) && (t.clear(), !0);
202
+ }, c), r.registerCommand(Z, (e) => {
203
+ const t = p();
204
+ return g(t) ? (t.deleteCharacter(e), !0) : !!$(t) && (t.deleteNodes(), !0);
206
205
  }, c), r.registerCommand(Dt, (e) => {
207
- const t = g();
208
- return !!h(t) && (t.deleteLine(e), !0);
209
- }, c), r.registerCommand(kt, (e) => {
210
- const t = g();
206
+ const t = p();
207
+ return !!g(t) && (t.deleteWord(e), !0);
208
+ }, c), r.registerCommand(Pt, (e) => {
209
+ const t = p();
210
+ return !!g(t) && (t.deleteLine(e), !0);
211
+ }, c), r.registerCommand(Lt, (e) => {
212
+ const t = p();
211
213
  if (typeof e == "string") t !== null && t.insertText(e);
212
214
  else {
213
215
  if (t === null) return !1;
214
216
  const n = e.dataTransfer;
215
217
  if (n != null) pe(n, t, r);
216
- else if (h(t)) {
218
+ else if (g(t)) {
217
219
  const o = e.data;
218
220
  return o && t.insertText(o), !0;
219
221
  }
220
222
  }
221
223
  return !0;
222
- }, c), r.registerCommand(Lt, () => {
223
- const e = g();
224
- return !!h(e) && (e.removeText(), !0);
224
+ }, c), r.registerCommand(kt, () => {
225
+ const e = p();
226
+ return !!g(e) && (e.removeText(), !0);
225
227
  }, c), r.registerCommand(_t, (e) => {
226
- const t = g();
227
- return !!h(t) && (t.formatText(e), !0);
228
+ const t = p();
229
+ return !!g(t) && (t.formatText(e), !0);
228
230
  }, c), r.registerCommand(Nt, (e) => {
229
- const t = g();
230
- if (!h(t) && !P(t)) return !1;
231
+ const t = p();
232
+ if (!g(t) && !$(t)) return !1;
231
233
  const n = t.getNodes();
232
234
  for (const o of n) {
233
- const a = Be(o, (s) => ae(s) && !s.isInline());
235
+ const a = Be(o, (s) => se(s) && !s.isInline());
234
236
  a !== null && a.setFormat(e);
235
237
  }
236
238
  return !0;
237
239
  }, c), r.registerCommand(ue, (e) => {
238
- const t = g();
239
- return !!h(t) && (t.insertLineBreak(e), !0);
240
+ const t = p();
241
+ return !!g(t) && (t.insertLineBreak(e), !0);
240
242
  }, c), r.registerCommand(de, () => {
241
- const e = g();
242
- return !!h(e) && (e.insertParagraph(), !0);
243
- }, c), r.registerCommand(St, () => (Te([xt()]), !0), c), r.registerCommand(wt, () => Se((e) => {
243
+ const e = p();
244
+ return !!g(e) && (e.insertParagraph(), !0);
245
+ }, c), r.registerCommand(St, () => ($e([xt()]), !0), c), r.registerCommand(wt, () => Se((e) => {
244
246
  const t = e.getIndent();
245
247
  e.setIndent(t + 1);
246
248
  }), c), r.registerCommand(ce, () => Se((e) => {
247
249
  const t = e.getIndent();
248
250
  t > 0 && e.setIndent(Math.max(0, t - 1));
249
251
  }), c), r.registerCommand(Et, (e) => {
250
- const t = g();
251
- if (P(t)) {
252
+ const t = p();
253
+ if ($(t)) {
252
254
  const n = t.getNodes();
253
255
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
254
- } else if (h(t)) {
256
+ } else if (g(t)) {
255
257
  const n = fe(t.focus, !0);
256
- if (!e.shiftKey && U(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;
257
259
  }
258
260
  return !1;
259
261
  }, c), r.registerCommand(bt, (e) => {
260
- const t = g();
261
- if (P(t)) {
262
+ const t = p();
263
+ if ($(t)) {
262
264
  const n = t.getNodes();
263
265
  if (n.length > 0) return e.preventDefault(), n[0].selectNext(0, 0), !0;
264
- } else if (h(t)) {
266
+ } else if (g(t)) {
265
267
  if ((function(o) {
266
268
  const a = o.focus;
267
269
  return a.key === "root" && a.offset === F().getChildrenSize();
268
270
  })(t)) return e.preventDefault(), !0;
269
271
  const n = fe(t.focus, !1);
270
- if (!e.shiftKey && U(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;
271
273
  }
272
274
  return !1;
273
275
  }, c), r.registerCommand(Ct, (e) => {
274
- const t = g();
275
- if (P(t)) {
276
+ const t = p();
277
+ if ($(t)) {
276
278
  const n = t.getNodes();
277
279
  if (n.length > 0) return e.preventDefault(), he(n[0]) ? n[0].selectNext(0, 0) : n[0].selectPrevious(), !0;
278
280
  }
279
- if (!h(t)) return !1;
281
+ if (!g(t)) return !1;
280
282
  if (ve(t, !0)) {
281
283
  const n = e.shiftKey;
282
284
  return e.preventDefault(), ye(t, n, !0), !0;
283
285
  }
284
286
  return !1;
285
287
  }, c), r.registerCommand(yt, (e) => {
286
- const t = g();
287
- if (P(t)) {
288
+ const t = p();
289
+ if ($(t)) {
288
290
  const o = t.getNodes();
289
291
  if (o.length > 0) return e.preventDefault(), he(o[0]) ? o[0].selectPrevious() : o[0].selectNext(0, 0), !0;
290
292
  }
291
- if (!h(t)) return !1;
293
+ if (!g(t)) return !1;
292
294
  const n = e.shiftKey;
293
295
  return !!ve(t, !1) && (e.preventDefault(), ye(t, n, !1), !0);
294
296
  }, c), r.registerCommand(vt, (e) => {
295
297
  if (xe(e.target)) return !1;
296
- const t = g();
297
- if (h(t)) {
298
+ const t = p();
299
+ if (g(t)) {
298
300
  if ((function(n) {
299
301
  if (!n.isCollapsed()) return !1;
300
302
  const { anchor: o } = n;
301
303
  if (o.offset !== 0) return !1;
302
304
  const a = o.getNode();
303
- if ($e(a)) return !1;
304
- const s = tr(a);
305
+ if (Te(a)) return !1;
306
+ const s = Qt(a);
305
307
  return s.getIndent() > 0 && (s.is(a) || a.is(s.getFirstDescendant()));
306
308
  })(t)) return e.preventDefault(), r.dispatchCommand(ce, void 0);
307
309
  if (Ee && navigator.language === "ko-KR") return !1;
308
- } else if (!P(t)) return !1;
309
- return e.preventDefault(), r.dispatchCommand(Q, !0);
310
+ } else if (!$(t)) return !1;
311
+ return e.preventDefault(), r.dispatchCommand(Z, !0);
310
312
  }, c), r.registerCommand(ht, (e) => {
311
313
  if (xe(e.target)) return !1;
312
- const t = g();
313
- return !(!h(t) && !P(t)) && (e.preventDefault(), r.dispatchCommand(Q, !1));
314
+ const t = p();
315
+ return !(!g(t) && !$(t)) && (e.preventDefault(), r.dispatchCommand(Z, !1));
314
316
  }, c), r.registerCommand(gt, (e) => {
315
- const t = g();
316
- if (!h(t)) return !1;
317
- if (V(t), e !== null) {
318
- if ((Ee || Mr || Fr) && Rr) return !1;
317
+ const t = p();
318
+ if (!g(t)) return !1;
319
+ if (Q(t), e !== null) {
320
+ if ((Ee || Ur || Kr) && Fr) return !1;
319
321
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(ue, !1);
320
322
  }
321
323
  return r.dispatchCommand(de, void 0);
322
324
  }, c), r.registerCommand(pt, () => {
323
- const e = g();
324
- return !!h(e) && (r.blur(), !0);
325
+ const e = p();
326
+ return !!g(e) && (r.blur(), !0);
325
327
  }, c), r.registerCommand(ct, (e) => {
326
- const [, t] = G(e);
328
+ const [, t] = V(e);
327
329
  if (t.length > 0) {
328
330
  const o = be(e.clientX, e.clientY);
329
331
  if (o !== null) {
330
- const { offset: a, node: s } = o, i = te(s);
332
+ const { offset: a, node: s } = o, i = re(s);
331
333
  if (i !== null) {
332
334
  const l = ft();
333
- if (R(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
335
+ if (I(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
334
336
  else {
335
337
  const u = i.getParentOrThrow().getKey(), m = i.getIndexWithinParent() + 1;
336
338
  l.anchor.set(u, m, "element"), l.focus.set(u, m, "element");
337
339
  }
338
340
  const d = mt(l);
339
- Pe(d);
341
+ De(d);
340
342
  }
341
343
  r.dispatchCommand(we, t);
342
344
  }
343
345
  return e.preventDefault(), !0;
344
346
  }
345
- const n = g();
346
- return !!h(n);
347
+ const n = p();
348
+ return !!g(n);
347
349
  }, c), r.registerCommand(dt, (e) => {
348
- const [t] = G(e), n = g();
349
- return !(t && !h(n));
350
+ const [t] = V(e), n = p();
351
+ return !(t && !g(n));
350
352
  }, c), r.registerCommand(ut, (e) => {
351
- const [t] = G(e), n = g();
352
- if (t && !h(n)) return !1;
353
+ const [t] = V(e), n = p();
354
+ if (t && !g(n)) return !1;
353
355
  const o = be(e.clientX, e.clientY);
354
356
  if (o !== null) {
355
- const a = te(o.node);
356
- U(a) && e.preventDefault();
357
+ const a = re(o.node);
358
+ H(a) && e.preventDefault();
357
359
  }
358
360
  return !0;
359
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) {
360
362
  await ge(n, z(t, ClipboardEvent) ? t : null), n.update(() => {
361
- const o = g();
362
- h(o) ? o.removeText() : P(o) && o.getNodes().forEach((a) => a.remove());
363
+ const o = p();
364
+ g(o) ? o.removeText() : $(o) && o.getNodes().forEach((a) => a.remove());
363
365
  });
364
366
  })(e, r), !0), c), r.registerCommand(et, (e) => {
365
- const [, t, n] = G(e);
366
- return t.length > 0 && !n ? (r.dispatchCommand(we, t), !0) : rt(e.target) && nt(e.target) ? !1 : g() !== null && ((function(o, a) {
367
+ const [, t, n] = V(e);
368
+ return t.length > 0 && !n ? (r.dispatchCommand(we, t), !0) : rt(e.target) && nt(e.target) ? !1 : p() !== null && ((function(o, a) {
367
369
  o.preventDefault(), a.update(() => {
368
- const s = g(), i = z(o, InputEvent) || z(o, KeyboardEvent) ? null : o.clipboardData;
370
+ const s = p(), i = z(o, InputEvent) || z(o, KeyboardEvent) ? null : o.clipboardData;
369
371
  i != null && s !== null && pe(i, s, a);
370
372
  }, { tag: ot });
371
373
  })(e, r), !0);
374
+ }, c), r.registerCommand(Qe, (e) => {
375
+ const t = p();
376
+ return g(t) && Q(t), !1;
372
377
  }, c), r.registerCommand(Ze, (e) => {
373
- const t = g();
374
- return h(t) && V(t), !1;
375
- }, c), r.registerCommand(Ve, (e) => {
376
- const t = g();
377
- return h(t) && V(t), !1;
378
+ const t = p();
379
+ return g(t) && Q(t), !1;
378
380
  }, c));
379
381
  }
380
- function zr(r, ...e) {
382
+ function Or(r, ...e) {
381
383
  const t = new URL("https://lexical.dev/docs/error"), n = new URLSearchParams();
382
384
  n.append("code", r);
383
385
  for (const o of e) n.append("v", o);
384
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.`);
385
387
  }
386
- const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
387
- function Ur({ 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 }) {
388
390
  return (function(t, n) {
389
391
  const [o, a] = M(() => t.getDecorators());
390
- return ie(() => t.registerDecoratorListener((s) => {
391
- Zt(() => {
392
+ return le(() => t.registerDecoratorListener((s) => {
393
+ Vt(() => {
392
394
  a(s);
393
395
  });
394
396
  }), [t]), b(() => {
395
397
  a(t.getDecorators());
396
- }, [t]), X(() => {
398
+ }, [t]), O(() => {
397
399
  const s = [], i = Object.keys(o);
398
400
  for (let l = 0; l < i.length; l++) {
399
- const d = i[l], u = f(n, { onError: (v) => t._onError(v), children: f(zt, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
400
- 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));
401
403
  }
402
404
  return s;
403
405
  }, [n, o, t]);
404
406
  })(r, e);
405
407
  }
406
- function Or({ editor: r, ErrorBoundary: e }) {
408
+ function Wr({ editor: r, ErrorBoundary: e }) {
407
409
  return (function(t) {
408
- const n = qt.maybeFromEditor(t);
409
- if (n && n.hasExtensionByName(kr.name)) {
410
- for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && zr(320, o);
410
+ const n = Xt.maybeFromEditor(t);
411
+ if (n && n.hasExtensionByName(Tr.name)) {
412
+ for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && Or(320, o);
411
413
  return !0;
412
414
  }
413
415
  return !1;
414
- })(r) ? null : f(Ur, { editor: r, ErrorBoundary: e });
416
+ })(r) ? null : f(jr, { editor: r, ErrorBoundary: e });
415
417
  }
416
418
  function Ne(r) {
417
- return r.getEditorState().read(He(r.isComposing()));
419
+ return r.getEditorState().read(Oe(r.isComposing()));
418
420
  }
419
- function Hr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
420
- const [n] = k();
421
+ function Jr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
422
+ const [n] = D();
421
423
  return (function(o) {
422
- ie(() => H(Kr(o), Tr(o)), [o]);
423
- })(n), A(ke, { children: [r, f(jr, { content: e }), f(Or, { 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 })] });
424
426
  }
425
- function jr({ content: r }) {
426
- const [e] = k(), t = (function(o) {
427
+ function Xr({ content: r }) {
428
+ const [e] = D(), t = (function(o) {
427
429
  const [a, s] = M(() => Ne(o));
428
- return ie(() => {
430
+ return le(() => {
429
431
  function i() {
430
432
  const l = Ne(o);
431
433
  s(l);
432
434
  }
433
- return i(), H(o.registerUpdateListener(() => {
435
+ return i(), W(o.registerUpdateListener(() => {
434
436
  i();
435
437
  }), o.registerEditableListener(() => {
436
438
  i();
@@ -439,29 +441,29 @@ function jr({ content: r }) {
439
441
  })(e), n = Wt();
440
442
  return t ? typeof r == "function" ? r(n) : r : null;
441
443
  }
442
- const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
443
- function Wr({ 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: v, autoCapitalize: S, className: C, id: x, role: E = "textbox", spellCheck: w = !0, style: y, tabIndex: N, "data-testid": D, ..._ }, L) {
444
- const [p, T] = M(r.isEditable()), B = Ut((I) => {
445
- I && I.ownerDocument && I.ownerDocument.defaultView ? r.setRootElement(I) : r.setRootElement(null);
446
- }, [r]), Y = X(() => /* @__PURE__ */ (function(...I) {
447
- return (le) => {
448
- for (const j of I) typeof j == "function" ? j(le) : j != null && (j.current = le);
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);
449
451
  };
450
- })(L, B), [B, L]);
451
- return je(() => (T(r.isEditable()), r.registerEditableListener((I) => {
452
- T(I);
453
- })), [r]), f("div", { "aria-activedescendant": p ? e : void 0, "aria-autocomplete": p ? t : "none", "aria-controls": p ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": p && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": p ? m : void 0, "aria-readonly": !p || void 0, "aria-required": v, autoCapitalize: S, className: C, contentEditable: p, "data-testid": D, id: x, ref: Y, role: E, spellCheck: w, style: y, tabIndex: N, ..._ });
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 });
454
456
  }
455
- const Jr = Ie(Wr);
457
+ const qr = Ie(Yr);
456
458
  function _e(r) {
457
- return r.getEditorState().read(He(r.isComposing()));
459
+ return r.getEditorState().read(Oe(r.isComposing()));
458
460
  }
459
- const qr = Ie(Gr);
460
- function Gr(r, e) {
461
- const { placeholder: t, ...n } = r, [o] = k();
462
- return A(ke, { children: [f(Jr, { editor: o, ...n, ref: e }), t != null && f(Xr, { editor: o, content: t })] });
461
+ const Gr = Ie(Vr);
462
+ function Vr(r, e) {
463
+ const { placeholder: t, ...n } = r, [o] = D();
464
+ return A(Le, { children: [f(qr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
463
465
  }
464
- function Xr({ content: r, editor: e }) {
466
+ function Zr({ content: r, editor: e }) {
465
467
  const t = (function(s) {
466
468
  const [i, l] = M(() => _e(s));
467
469
  return je(() => {
@@ -469,26 +471,26 @@ function Xr({ content: r, editor: e }) {
469
471
  const u = _e(s);
470
472
  l(u);
471
473
  }
472
- return d(), H(s.registerUpdateListener(() => {
474
+ return d(), W(s.registerUpdateListener(() => {
473
475
  d();
474
476
  }), s.registerEditableListener(() => {
475
477
  d();
476
478
  }));
477
479
  }, [s]), i;
478
480
  })(e), [n, o] = M(e.isEditable());
479
- if (O(() => (o(e.isEditable()), e.registerEditableListener((s) => {
481
+ if (j(() => (o(e.isEditable()), e.registerEditableListener((s) => {
480
482
  o(s);
481
483
  })), [e]), !t) return null;
482
484
  let a = null;
483
485
  return typeof r == "function" ? a = r(n) : r !== null && (a = r), a === null ? null : f("div", { "aria-hidden": !0, children: a });
484
486
  }
485
- const Yr = Ht(null), Z = {
487
+ const Qr = Ot(null), ee = {
486
488
  didCatch: !1,
487
489
  error: null
488
490
  };
489
- class Qr extends Ot {
491
+ class en extends Ht {
490
492
  constructor(e) {
491
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Z;
493
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ee;
492
494
  }
493
495
  static getDerivedStateFromError(e) {
494
496
  return {
@@ -506,7 +508,7 @@ class Qr extends Ot {
506
508
  (t = (n = this.props).onReset) === null || t === void 0 || t.call(n, {
507
509
  args: a,
508
510
  reason: "imperative-api"
509
- }), this.setState(Z);
511
+ }), this.setState(ee);
510
512
  }
511
513
  }
512
514
  componentDidCatch(e, t) {
@@ -519,13 +521,13 @@ class Qr extends Ot {
519
521
  } = this.state, {
520
522
  resetKeys: o
521
523
  } = this.props;
522
- if (n && t.error !== null && Vr(e.resetKeys, o)) {
524
+ if (n && t.error !== null && tn(e.resetKeys, o)) {
523
525
  var a, s;
524
526
  (a = (s = this.props).onReset) === null || a === void 0 || a.call(s, {
525
527
  next: o,
526
528
  prev: e.resetKeys,
527
529
  reason: "keys"
528
- }), this.setState(Z);
530
+ }), this.setState(ee);
529
531
  }
530
532
  }
531
533
  render() {
@@ -553,7 +555,7 @@ class Qr extends Ot {
553
555
  else
554
556
  throw s;
555
557
  }
556
- return me(Yr.Provider, {
558
+ return me(Qr.Provider, {
557
559
  value: {
558
560
  didCatch: a,
559
561
  error: s,
@@ -562,183 +564,185 @@ class Qr extends Ot {
562
564
  }, i);
563
565
  }
564
566
  }
565
- function Vr() {
567
+ function tn() {
566
568
  let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
567
569
  return r.length !== e.length || r.some((t, n) => !Object.is(t, e[n]));
568
570
  }
569
- function Zr({ children: r, onError: e }) {
570
- return f(Qr, { 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 });
571
573
  }
572
- const en = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
573
- function tn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
574
- const [n] = k();
575
- return en(() => {
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 }) {
576
+ const [n] = D();
577
+ return nn(() => {
576
578
  if (t) return n.registerUpdateListener(({ editorState: o, dirtyElements: a, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
577
- e && a.size === 0 && s.size === 0 || r && l.has(ne) || i.isEmpty() || t(o, n, l);
579
+ e && a.size === 0 && s.size === 0 || r && l.has(oe) || i.isEmpty() || t(o, n, l);
578
580
  });
579
581
  }, [n, r, e, t]), null;
580
582
  }
581
- function rn({ hasStrictIndent: r = !1 }) {
582
- const [e] = k();
583
+ function an({ hasStrictIndent: r = !1 }) {
584
+ const [e] = D();
583
585
  return b(() => {
584
- 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");
585
587
  }, [e]), b(() => {
586
- if (r) return or(e);
588
+ if (r) return rr(e);
587
589
  }, [e, r]), (function(t) {
588
- b(() => ar(t), [t]);
590
+ b(() => nr(t), [t]);
589
591
  })(e), null;
590
592
  }
591
- function nn({ validateUrl: r, attributes: e }) {
592
- const [t] = k();
593
+ function sn({ validateUrl: r, attributes: e }) {
594
+ const [t] = D();
593
595
  return b(() => {
594
- if (!t.hasNodes([Re])) throw new Error("LinkPlugin: LinkNode not registered on editor");
595
- }), b(() => Gt(t, se({ 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;
596
598
  }
597
- function on(r, e, t) {
599
+ function ln(r, e, t) {
598
600
  b(() => {
599
- r.hasNodes([Me]) || (function(n, ...o) {
601
+ r.hasNodes([Ue]) || (function(n, ...o) {
600
602
  const a = new URL("https://lexical.dev/docs/error"), s = new URLSearchParams();
601
603
  s.append("code", n);
602
604
  for (const i of o) s.append("v", i);
603
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.`);
604
606
  })(77);
605
- }), b(() => Xt(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
607
+ }), b(() => ar(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
606
608
  }
607
- function an({ matchers: r, onChange: e }) {
608
- const [t] = k();
609
- return on(t, r, e), null;
609
+ function un({ matchers: r, onChange: e }) {
610
+ const [t] = D();
611
+ return ln(t, r, e), null;
610
612
  }
611
- function sn({ newTab: r = !0, disabled: e = !1 }) {
612
- const [t] = k();
613
- return b(() => Yt(t, se({ disabled: e, newTab: r })), [t, r, e]), null;
613
+ function dn({ newTab: r = !0, disabled: e = !1 }) {
614
+ const [t] = D();
615
+ return b(() => sr(t, ie({ disabled: e, newTab: r })), [t, r, e]), null;
614
616
  }
615
- function ln(r, e, t, n, o) {
617
+ function cn(r, e, t, n, o) {
616
618
  if (r === null || t.size === 0 && n.size === 0 && !o) return 0;
617
619
  const a = e._selection, s = r._selection;
618
620
  if (o) return 1;
619
- if (!(h(a) && h(s) && s.isCollapsed() && a.isCollapsed())) return 0;
620
- const i = (function(w, y, N) {
621
- const D = w._nodeMap, _ = [];
622
- for (const L of y) {
623
- const p = D.get(L);
624
- p !== void 0 && _.push(p);
621
+ if (!(g(a) && g(s) && s.isCollapsed() && a.isCollapsed())) return 0;
622
+ const i = (function(C, v, N) {
623
+ const T = C._nodeMap, P = [];
624
+ for (const L of v) {
625
+ const w = T.get(L);
626
+ w !== void 0 && P.push(w);
625
627
  }
626
- for (const [L, p] of N) {
627
- if (!p) continue;
628
- const T = D.get(L);
629
- T === void 0 || $e(T) || _.push(T);
628
+ for (const [L, w] of N) {
629
+ if (!w) continue;
630
+ const R = T.get(L);
631
+ R === void 0 || Te(R) || P.push(R);
630
632
  }
631
- return _;
633
+ return P;
632
634
  })(e, t, n);
633
635
  if (i.length === 0) return 0;
634
636
  if (i.length > 1) {
635
- const w = e._nodeMap, y = w.get(a.anchor.key), N = w.get(s.anchor.key);
636
- return y && N && !r._nodeMap.has(y.__key) && R(y) && y.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
637
+ const C = e._nodeMap, v = C.get(a.anchor.key), N = C.get(s.anchor.key);
638
+ return v && N && !r._nodeMap.has(v.__key) && I(v) && v.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
637
639
  }
638
640
  const l = i[0], d = r._nodeMap.get(l.__key);
639
- if (!R(d) || !R(l) || d.__mode !== l.__mode) return 0;
641
+ if (!I(d) || !I(l) || d.__mode !== l.__mode) return 0;
640
642
  const u = d.__text, m = l.__text;
641
643
  if (u === m) return 0;
642
- const v = a.anchor, S = s.anchor;
643
- if (v.key !== S.key || v.type !== "text") return 0;
644
- const C = v.offset, x = S.offset, E = m.length - u.length;
645
- return E === 1 && x === C - 1 ? 2 : E === -1 && x === C + 1 ? 3 : E === -1 && x === C ? 4 : 0;
644
+ const h = a.anchor, S = s.anchor;
645
+ if (h.key !== S.key || h.type !== "text") return 0;
646
+ const y = h.offset, x = S.offset, E = m.length - u.length;
647
+ return E === 1 && x === y - 1 ? 2 : E === -1 && x === y + 1 ? 3 : E === -1 && x === y ? 4 : 0;
646
648
  }
647
- function un(r, e) {
649
+ function fn(r, e) {
648
650
  let t = Date.now(), n = 0;
649
651
  return (o, a, s, i, l, d) => {
650
652
  const u = Date.now();
651
- if (d.has(re)) return n = 0, t = u, 2;
652
- const m = ln(o, a, i, l, r.isComposing()), v = (() => {
653
- const S = s === null || s.editor === r, C = d.has(Mt);
654
- if (!C && S && d.has(ne)) return 0;
653
+ if (d.has(ne)) return n = 0, t = u, 2;
654
+ const m = cn(o, a, i, l, r.isComposing()), h = (() => {
655
+ const S = s === null || s.editor === r, y = d.has(Mt);
656
+ if (!y && S && d.has(oe)) return 0;
655
657
  if (o === null) return 1;
656
658
  const x = a._selection;
657
659
  if (!(i.size > 0 || l.size > 0)) return x !== null ? 0 : 2;
658
660
  const E = typeof e == "number" ? e : e.peek();
659
- return C === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(w, y, N) {
660
- const D = y._nodeMap.get(w), _ = N._nodeMap.get(w), L = y._selection, p = N._selection;
661
- return !(h(L) && h(p) && L.anchor.type === "element" && L.focus.type === "element" && p.anchor.type === "text" && p.focus.type === "text" || !R(D) || !R(_) || D.__parent !== _.__parent) && JSON.stringify(y.read(() => D.exportJSON())) === JSON.stringify(N.read(() => _.exportJSON()));
661
+ return y === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(C, v, N) {
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()));
662
664
  })(Array.from(i)[0], o, a) ? 0 : 1;
663
665
  })();
664
- return t = u, n = m, v;
666
+ return t = u, n = m, h;
665
667
  };
666
668
  }
667
- function Le(r) {
669
+ function ke(r) {
668
670
  r.undoStack = [], r.redoStack = [], r.current = null;
669
671
  }
670
672
  function We(r, e, t) {
671
- const n = un(r, t);
672
- return H(r.registerCommand(Rt, () => ((function(a, s) {
673
+ const n = fn(r, t);
674
+ return W(r.registerCommand(Rt, () => ((function(a, s) {
673
675
  const i = s.redoStack, l = s.undoStack;
674
676
  if (l.length !== 0) {
675
677
  const d = s.current, u = l.pop();
676
- d !== null && (i.push(d), a.dispatchCommand(W, !0)), l.length === 0 && a.dispatchCommand(J, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
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 });
677
679
  }
678
680
  })(r, e), !0), c), r.registerCommand(It, () => ((function(a, s) {
679
681
  const i = s.redoStack, l = s.undoStack;
680
682
  if (i.length !== 0) {
681
683
  const d = s.current;
682
- d !== null && (l.push(d), a.dispatchCommand(J, !0));
684
+ d !== null && (l.push(d), a.dispatchCommand(q, !0));
683
685
  const u = i.pop();
684
- i.length === 0 && a.dispatchCommand(W, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
686
+ i.length === 0 && a.dispatchCommand(Y, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
685
687
  }
686
- })(r, e), !0), c), r.registerCommand(Bt, () => (Le(e), !1), c), r.registerCommand(Tt, () => (Le(e), r.dispatchCommand(W, !1), r.dispatchCommand(J, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
687
- const u = e.current, m = e.redoStack, v = e.undoStack, S = u === null ? null : u.editorState;
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 }) => {
689
+ const u = e.current, m = e.redoStack, h = e.undoStack, S = u === null ? null : u.editorState;
688
690
  if (u !== null && a === S) return;
689
- const C = n(s, a, u, i, l, d);
690
- if (C === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(W, !1)), u !== null && (v.push({ ...u }), r.dispatchCommand(J, !0));
691
- else if (C === 2) return;
691
+ const y = n(s, a, u, i, l, d);
692
+ if (y === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), u !== null && (h.push({ ...u }), r.dispatchCommand(q, !0));
693
+ else if (y === 2) return;
692
694
  e.current = { editor: r, editorState: a };
693
695
  }));
694
696
  }
695
697
  function Je() {
696
698
  return { current: null, redoStack: [], undoStack: [] };
697
699
  }
698
- const ee = oe({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => se({ 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
+ 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) => {
699
701
  const n = t.getOutput();
700
- return Ae(() => 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));
701
703
  } });
702
- oe({ dependencies: [At(ee, { createInitialHistoryState: () => {
704
+ ae({ dependencies: [At(te, { createInitialHistoryState: () => {
703
705
  throw new Error("SharedHistory did not inherit parent history");
704
706
  }, disabled: !0 })], name: "@lexical/history/SharedHistory", register(r, e, t) {
705
- const { output: n } = t.getDependency(ee), o = (function(s) {
706
- return s ? Qt(s, ee.name) : null;
707
+ const { output: n } = t.getDependency(te), o = (function(s) {
708
+ return s ? Yt(s, te.name) : null;
707
709
  })(r._parentEditor);
708
710
  if (!o) return () => {
709
711
  };
710
712
  const a = o.output;
711
- return Ae(() => Vt(() => {
713
+ return Re(() => qt(() => {
712
714
  n.delay.value = a.delay.value, n.historyState.value = a.historyState.value, n.disabled.value = a.disabled.value;
713
715
  }));
714
716
  } });
715
- function dn({ delay: r, externalHistoryState: e }) {
716
- const [t] = k();
717
+ function mn({ delay: r, externalHistoryState: e }) {
718
+ const [t] = D();
717
719
  return (function(n, o, a = 1e3) {
718
- const s = X(() => o || Je(), [o]);
720
+ const s = O(() => o || Je(), [o]);
719
721
  b(() => We(n, s, a), [a, n, s]);
720
722
  })(t, e, r), null;
721
723
  }
722
- function cn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1 }) {
723
- const [o] = k();
724
- return b(() => {
725
- sr(o) !== n && (ir(o, n), o.registerNodeTransform(ze, () => {
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, () => {
726
728
  })());
727
- }, [o, n]), b(() => lr(o), [o]), b(() => ur(o, t), [o, t]), b(() => {
728
- if (!r) return dr(o);
729
- }, [o, r]), b(() => {
730
- if (!e) return o.registerNodeTransform(Ue, (a) => {
731
- 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);
732
736
  });
733
- }, [o, e, r]), null;
737
+ }, [a, e, r]), null;
734
738
  }
735
- function fn({ editorRef: r }) {
736
- const [e] = k();
737
- return Kt.useEffect(() => {
739
+ function gn({ editorRef: r }) {
740
+ const [e] = D();
741
+ return Ut.useEffect(() => {
738
742
  typeof r == "function" ? r(e) : typeof r == "object" && (r.current = e);
739
743
  }, [e]), null;
740
744
  }
741
- const qe = 200, mn = ({
745
+ const Xe = 200, hn = ({
742
746
  currentLanguage: r = "NL",
743
747
  initialValue: e = "",
744
748
  placeholder: t = "",
@@ -748,41 +752,53 @@ const qe = 200, mn = ({
748
752
  notValid: s = !1,
749
753
  notValidatedText: i = "",
750
754
  maxHeightInRem: l = "20rem",
751
- maxWords: d = qe,
755
+ maxWords: d = Xe,
752
756
  rteRef: u = null,
753
- onChange: m
757
+ onChange: m,
758
+ onCatalogueLinkSearch: h,
759
+ catalogueSearchResponse: S = { state: "idle", results: [] }
754
760
  }) => {
755
- const { switchLanguage: v } = xr(), S = yr(), [C] = M(() => De()), [x, E] = M(0), [w, y] = M(0), N = jt(), D = {
761
+ const { switchLanguage: y } = Nr(), x = Cr(), [E] = M(() => Pe()), [C, v] = M(0), [N, T] = M(0), P = jt(), L = {
756
762
  html: {
757
- export: fr
763
+ export: mr
758
764
  },
759
765
  namespace: "UvaRte",
760
- editor: C,
761
- theme: Er,
762
- onError(p) {
763
- throw p;
766
+ editor: E,
767
+ theme: wr,
768
+ onError(_) {
769
+ throw _;
764
770
  },
765
- nodes: [Fe, Ke, Re, Me, Ue, cr, ze, Nr],
766
- editorState: (p) => {
767
- const B = new DOMParser().parseFromString(e, "text/html"), Y = rr(p, B);
768
- F().clear(), Te(Y), Pe(null);
771
+ nodes: [
772
+ Me,
773
+ Ae,
774
+ Fe,
775
+ Ue,
776
+ Ke,
777
+ fr,
778
+ ze,
779
+ _r,
780
+ kr
781
+ ],
782
+ editorState: (_) => {
783
+ const k = new DOMParser().parseFromString(e, "text/html"), X = er(_, k);
784
+ F().clear(), $e(X), De(null);
769
785
  }
770
- }, _ = (p) => p.trim().length === 0 ? 0 : p.split(" ").length, L = (p, T) => {
771
- p.read(() => {
772
- let B = "";
773
- E(_(F().getTextContent().replace(/\s+/g, " ").trim())), B = mr(nr(T)), B = pr(B), m(B);
786
+ }, w = (_) => _.trim().length === 0 ? 0 : _.split(" ").length, R = (_, J) => {
787
+ _.read(() => {
788
+ let k = "";
789
+ v(w(F().getTextContent().replace(/\s+/g, " ").trim())), k = pr(tr(J)), k = gr(k), m(k);
774
790
  });
775
791
  };
776
792
  return b(() => {
777
- v(r.toLocaleLowerCase());
778
- }, [r, v]), b(() => {
779
- const p = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
780
- E(_(p));
781
- }, [e]), /* @__PURE__ */ A("div", { className: $.editor__container, children: [
782
- /* @__PURE__ */ A("div", { className: $.editor__header, children: [
783
- /* @__PURE__ */ f(wr, { label: n, info: o, required: a }),
784
- /* @__PURE__ */ A("div", { className: $["editor__header-word-count"], children: [
785
- /* @__PURE__ */ f("span", { className: Ce({ [$["editor__header-word-count--alert"]]: x > d }), children: x }),
793
+ y(r.toUpperCase());
794
+ }, [r, y]), b(() => {
795
+ const _ = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
796
+ v(w(_));
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: [
801
+ /* @__PURE__ */ f("span", { className: Ce({ [B["editor__header-word-count--alert"]]: C > d }), children: C }),
786
802
  " / ",
787
803
  d
788
804
  ] })
@@ -790,50 +806,58 @@ const qe = 200, mn = ({
790
806
  /* @__PURE__ */ f(
791
807
  "div",
792
808
  {
793
- className: Ce($.editor, {
794
- [$["not-valid"]]: s
809
+ className: Ce(B.editor, {
810
+ [B["not-valid"]]: s
795
811
  }),
796
- children: /* @__PURE__ */ A(Lr, { initialConfig: D, children: [
797
- /* @__PURE__ */ f(vr, { editorScrollPosition: w }),
798
- /* @__PURE__ */ A("div", { className: $["editor__field-wrapper"], children: [
812
+ children: /* @__PURE__ */ A(Dr, { initialConfig: L, children: [
813
+ /* @__PURE__ */ f(
814
+ yr,
815
+ {
816
+ editorScrollPosition: N,
817
+ onCatalogueLinkSearch: h,
818
+ catalogueSearchResponse: S
819
+ }
820
+ ),
821
+ /* @__PURE__ */ A("div", { className: B["editor__field-wrapper"], children: [
799
822
  /* @__PURE__ */ f(
800
- Hr,
823
+ Jr,
801
824
  {
802
825
  contentEditable: /* @__PURE__ */ f(
803
- qr,
826
+ Gr,
804
827
  {
805
- className: $.editor__field,
806
- "aria-label": S.common.rteAriaLabel,
828
+ className: B.editor__field,
829
+ "aria-label": x.common.rteAriaLabel,
807
830
  "aria-placeholder": t,
808
- title: S.common.rteTitle,
809
- placeholder: /* @__PURE__ */ f("div", { className: $.editor__placeholder, children: t }),
831
+ title: x.common.rteTitle,
832
+ placeholder: /* @__PURE__ */ f("div", { className: B.editor__placeholder, children: t }),
810
833
  spellCheck: !1,
811
- id: `${N}_rteEditor`,
834
+ id: `${P}_rteEditor`,
812
835
  style: { height: `${l}`, maxHeight: `${l}` },
813
- onScroll: (p) => y(p.currentTarget.scrollTop)
836
+ onScroll: (_) => T(_.currentTarget.scrollTop)
814
837
  }
815
838
  ),
816
- placeholder: /* @__PURE__ */ f("div", { className: $.editor__placeholder, children: t }),
817
- ErrorBoundary: Zr
839
+ placeholder: /* @__PURE__ */ f("div", { className: B.editor__placeholder, children: t }),
840
+ ErrorBoundary: rn
818
841
  }
819
842
  ),
820
- /* @__PURE__ */ f(cn, {}),
843
+ /* @__PURE__ */ f(pn, {}),
821
844
  /* @__PURE__ */ f(Jt, {}),
845
+ /* @__PURE__ */ f(mn, {}),
846
+ /* @__PURE__ */ f(an, {}),
847
+ /* @__PURE__ */ f(sn, { validateUrl: hr }),
848
+ /* @__PURE__ */ f(un, { matchers: vr }),
822
849
  /* @__PURE__ */ f(dn, {}),
823
- /* @__PURE__ */ f(rn, {}),
824
- /* @__PURE__ */ f(nn, { validateUrl: gr }),
825
- /* @__PURE__ */ f(an, { matchers: hr }),
826
- /* @__PURE__ */ f(sn, {}),
827
- /* @__PURE__ */ f(tn, { onChange: L }),
828
- /* @__PURE__ */ f(br, {}),
829
- u && /* @__PURE__ */ f(fn, { editorRef: u })
850
+ /* @__PURE__ */ f(on, { onChange: R }),
851
+ /* @__PURE__ */ f(Er, {}),
852
+ /* @__PURE__ */ f(Lr, {}),
853
+ u && /* @__PURE__ */ f(gn, { editorRef: u })
830
854
  ] })
831
855
  ] })
832
856
  }
833
857
  ),
834
- i !== "" && /* @__PURE__ */ f(Cr, { level: "error", feedback: i })
858
+ i !== "" && /* @__PURE__ */ f(br, { level: "error", feedback: i })
835
859
  ] });
836
- }, io = ({
860
+ }, mo = ({
837
861
  currentLanguage: r = "NL",
838
862
  initialValue: e = "",
839
863
  placeholder: t = "",
@@ -842,13 +866,15 @@ const qe = 200, mn = ({
842
866
  required: a = !1,
843
867
  notValid: s = !1,
844
868
  notValidatedText: i = "",
845
- maxWords: l = qe,
869
+ maxWords: l = Xe,
846
870
  rteRef: d,
847
- onChange: u
848
- }) => /* @__PURE__ */ f(Sr, { children: /* @__PURE__ */ f(
849
- mn,
871
+ onChange: u,
872
+ onCatalogueLinkSearch: m,
873
+ catalogueSearchResponse: h = { state: "idle", results: [] }
874
+ }) => /* @__PURE__ */ f(xr, { children: /* @__PURE__ */ f(
875
+ hn,
850
876
  {
851
- currentLanguage: r,
877
+ currentLanguage: r.toUpperCase(),
852
878
  initialValue: e,
853
879
  placeholder: t,
854
880
  label: n,
@@ -858,11 +884,13 @@ const qe = 200, mn = ({
858
884
  notValidatedText: i,
859
885
  maxWords: l,
860
886
  rteRef: d,
861
- onChange: u
887
+ onChange: u,
888
+ onCatalogueLinkSearch: m,
889
+ catalogueSearchResponse: h
862
890
  }
863
891
  ) });
864
892
  export {
865
- mn as Rte,
866
- io as RteEditor
893
+ hn as Rte,
894
+ mo as RteEditor
867
895
  };
868
896
  //# sourceMappingURL=RteEditor.js.map