@uva-glass/component-library 3.52.11 → 3.53.0

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