@uva-glass/component-library 1.64.0 → 1.64.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 (65) hide show
  1. package/dist/Lexical.prod-DSqOWcE1.js +4072 -0
  2. package/dist/Lexical.prod-DSqOWcE1.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-C6LsK5E6.js → LexicalClipboard.prod-DP0us-xV.js} +107 -107
  4. package/dist/{LexicalClipboard.prod-C6LsK5E6.js.map → LexicalClipboard.prod-DP0us-xV.js.map} +1 -1
  5. package/dist/LexicalLink.prod-DWrTW8iE.js +208 -0
  6. package/dist/LexicalLink.prod-DWrTW8iE.js.map +1 -0
  7. package/dist/LexicalList.prod-Cg8npow-.js +564 -0
  8. package/dist/LexicalList.prod-Cg8npow-.js.map +1 -0
  9. package/dist/LexicalTable.prod-DEA4KRzX.js +1221 -0
  10. package/dist/LexicalTable.prod-DEA4KRzX.js.map +1 -0
  11. package/dist/{LexicalUtils.prod-BTFNWAMw.js → LexicalUtils.prod-CicP_X7u.js} +44 -35
  12. package/dist/{LexicalUtils.prod-BTFNWAMw.js.map → LexicalUtils.prod-CicP_X7u.js.map} +1 -1
  13. package/dist/{TablePlugin-BLzR0g93.js → TablePlugin-BBOjr3TX.js} +56 -58
  14. package/dist/{TablePlugin-BLzR0g93.js.map → TablePlugin-BBOjr3TX.js.map} +1 -1
  15. package/dist/components/CheckboxTree/CheckboxTree.js +18 -21
  16. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  17. package/dist/components/FormInput/FormInput.js +12 -15
  18. package/dist/components/FormInput/FormInput.js.map +1 -1
  19. package/dist/components/InputField/InputField.stories.js +13 -16
  20. package/dist/components/InputField/InputField.stories.js.map +1 -1
  21. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  22. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  23. package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -6
  24. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
  25. package/dist/components/MultiSelect/index.js +1 -1
  26. package/dist/components/PeriodSelector/PeriodSelector.js +19 -22
  27. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  28. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +17 -20
  29. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  30. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +4 -7
  31. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
  32. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +16 -16
  33. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +26 -28
  34. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  35. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +4 -7
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
  37. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  38. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +100 -101
  39. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  40. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  41. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +35 -35
  42. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  43. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +15 -15
  44. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
  45. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -6
  46. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
  47. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -7
  48. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
  49. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +12 -12
  50. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  51. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +34 -34
  52. package/dist/components/RteEditor/Plugins/index.js +1 -1
  53. package/dist/components/RteEditor/RteEditor.js +354 -354
  54. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  55. package/dist/components/RteEditor/helpers.js +27 -27
  56. package/dist/components/index.js +1 -1
  57. package/dist/helpers-BuSJOvGF.js +168 -0
  58. package/dist/{helpers-B-pdj8pq.js.map → helpers-BuSJOvGF.js.map} +1 -1
  59. package/dist/index-DPQ9bZx5.js +231 -0
  60. package/dist/index-DPQ9bZx5.js.map +1 -0
  61. package/dist/index.js +1 -1
  62. package/package.json +8 -6
  63. package/dist/LexicalTable.prod-DqzrJuYr.js +0 -1221
  64. package/dist/LexicalTable.prod-DqzrJuYr.js.map +0 -1
  65. package/dist/helpers-B-pdj8pq.js +0 -168
@@ -1,45 +1,45 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import { u as D } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
3
- import { REMOVE_LIST_COMMAND as c, INSERT_ORDERED_LIST_COMMAND as N, INSERT_UNORDERED_LIST_COMMAND as g, $isListNode as O } from "@lexical/list";
4
- import { useState as d, useEffect as L } from "react";
2
+ import { u as N } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
3
+ import { Y as c, Q as _, G as L, H as k } from "../../../../LexicalList.prod-Cg8npow-.js";
4
+ import { useState as d, useEffect as C } from "react";
5
5
  import { c as I } from "../../../../clsx-OuTLNxxd.js";
6
- import { KEY_DOWN_COMMAND as E, COMMAND_PRIORITY_EDITOR as S, $getSelection as M, $isRangeSelection as R } from "lexical";
7
- import { Icon as v } from "../../../Icon/Icon.js";
8
- import { s as i } from "../../../../RteEditor.module-DcvGRx3a.js";
9
- import { useTranslation as k } from "../../hooks/useTranslation.js";
10
- const K = {
6
+ import { $ as K, a0 as S, M as D, v as O } from "../../../../Lexical.prod-DSqOWcE1.js";
7
+ import { Icon as x } from "../../../Icon/Icon.js";
8
+ import { s } from "../../../../RteEditor.module-DcvGRx3a.js";
9
+ import { useTranslation as y } from "../../hooks/useTranslation.js";
10
+ const P = {
11
11
  bullet: "BulletList",
12
12
  number: "NumberedList"
13
- }, T = ["bullet", "number"], w = () => {
14
- const n = k(), [o] = D(), [f, r] = d("paragraph"), [l, b] = d(!1), [m, p] = d(!1), C = (t) => {
15
- t === "number" && f !== "number" ? (o.dispatchCommand(N, void 0), r("number")) : t === "bullet" && f !== "bullet" ? (o.dispatchCommand(g, void 0), r("bullet")) : (o.dispatchCommand(c, void 0), r("paragraph"));
13
+ }, U = ["bullet", "number"], H = () => {
14
+ const n = y(), [o] = N(), [f, e] = d("paragraph"), [l, b] = d(!1), [m, p] = d(!1), v = (t) => {
15
+ t === "number" && f !== "number" ? (o.dispatchCommand(_, void 0), e("number")) : t === "bullet" && f !== "bullet" ? (o.dispatchCommand(L, void 0), e("bullet")) : (o.dispatchCommand(c, void 0), e("paragraph"));
16
16
  };
17
- return L(() => {
17
+ return C(() => {
18
18
  const t = o.registerCommand(
19
- E,
20
- (e) => e.ctrlKey && e.shiftKey && e.code === "Digit7" ? (e.preventDefault(), m ? o.dispatchCommand(c, void 0) : o.dispatchCommand(N, void 0), !0) : e.ctrlKey && e.shiftKey && e.code === "Digit8" ? (e.preventDefault(), l ? o.dispatchCommand(c, void 0) : o.dispatchCommand(g, void 0), !0) : !1,
19
+ K,
20
+ (r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? o.dispatchCommand(c, void 0) : o.dispatchCommand(_, void 0), !0) : r.ctrlKey && r.shiftKey && r.code === "Digit8" ? (r.preventDefault(), l ? o.dispatchCommand(c, void 0) : o.dispatchCommand(L, void 0), !0) : !1,
21
21
  S
22
22
  );
23
23
  return () => {
24
24
  t();
25
25
  };
26
- }, [o, m, l]), L(() => {
27
- const t = o.registerUpdateListener(({ editorState: e }) => {
28
- e.read(() => {
29
- const _ = M();
30
- if (R(_)) {
31
- let a = _.anchor.getNode();
26
+ }, [o, m, l]), C(() => {
27
+ const t = o.registerUpdateListener(({ editorState: r }) => {
28
+ r.read(() => {
29
+ const h = D();
30
+ if (O(h)) {
31
+ let a = h.anchor.getNode();
32
32
  for (; a !== null; ) {
33
- if (O(a)) {
34
- const s = a.getTag();
35
- b(s === "ul"), p(s === "ol"), s === "ul" && r("bullet"), s === "ol" && r("number");
33
+ if (k(a)) {
34
+ const i = a.getTag();
35
+ b(i === "ul"), p(i === "ol"), i === "ul" && e("bullet"), i === "ol" && e("number");
36
36
  return;
37
37
  }
38
- const h = a.getParent();
39
- if (h === null) break;
40
- a = h;
38
+ const g = a.getParent();
39
+ if (g === null) break;
40
+ a = g;
41
41
  }
42
- b(!1), p(!1), r("paragraph");
42
+ b(!1), p(!1), e("paragraph");
43
43
  }
44
44
  return !1;
45
45
  });
@@ -47,26 +47,26 @@ const K = {
47
47
  return () => {
48
48
  t();
49
49
  };
50
- }, [o]), /* @__PURE__ */ u("div", { className: i["editor__toolbar-button-group"], children: T.map((t) => /* @__PURE__ */ u(
50
+ }, [o]), /* @__PURE__ */ u("div", { className: s["editor__toolbar-button-group"], children: U.map((t) => /* @__PURE__ */ u(
51
51
  "button",
52
52
  {
53
- onClick: () => C(t),
53
+ onClick: () => v(t),
54
54
  title: n.format[`${t}Tooltip`],
55
55
  className: I(
56
- i["editor__toolbar-button"],
57
- i[`editor__toolbar-button--${t}`],
58
- t === "bullet" && l && i["editor__toolbar-button--active"],
59
- t === "number" && m && i["editor__toolbar-button--active"]
56
+ s["editor__toolbar-button"],
57
+ s[`editor__toolbar-button--${t}`],
58
+ t === "bullet" && l && s["editor__toolbar-button--active"],
59
+ t === "number" && m && s["editor__toolbar-button--active"]
60
60
  ),
61
61
  "aria-label": n.aria.labels[t],
62
62
  "aria-keyshortcuts": n.aria.keyshortcuts[t],
63
63
  type: "button",
64
- children: /* @__PURE__ */ u(v, { name: K[t], size: 24 })
64
+ children: /* @__PURE__ */ u(x, { name: P[t], size: 24 })
65
65
  },
66
66
  t
67
67
  )) });
68
68
  };
69
69
  export {
70
- w as ListPlugin
70
+ H as ListPlugin
71
71
  };
72
72
  //# sourceMappingURL=ListPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/ListPlugin/ListPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport {\n $isListNode,\n INSERT_ORDERED_LIST_COMMAND,\n INSERT_UNORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from '@lexical/list';\nimport { useEffect, useState } from 'react';\nimport clsx from 'clsx';\nimport { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, KEY_DOWN_COMMAND } from 'lexical';\n\nimport type { ElementNode } from 'lexical';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ntype ListTypesType = 'bullet' | 'number' | 'paragraph';\nconst LIST_TYPE_ICONS = {\n bullet: 'BulletList',\n number: 'NumberedList',\n};\n\nconst ListTypes = ['bullet', 'number'];\n\nexport const ListPlugin = () => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const [blockType, setBlockType] = useState<ListTypesType>('paragraph');\n const [isUList, setIsUList] = useState<boolean>(false);\n const [isOList, setIsOList] = useState<boolean>(false);\n\n const formatList = (listType: ListTypesType): void => {\n if (listType === 'number' && blockType !== 'number') {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);\n setBlockType('number');\n } else if (listType === 'bullet' && blockType !== 'bullet') {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);\n setBlockType('bullet');\n } else {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n setBlockType('paragraph');\n }\n };\n\n useEffect(() => {\n const removeKeyboardShortcut = editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event: KeyboardEvent) => {\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit7') {\n event.preventDefault();\n if (isOList) {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n } else {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);\n }\n return true;\n }\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit8') {\n event.preventDefault();\n if (isUList) {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n } else {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);\n }\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_EDITOR\n );\n\n return () => {\n removeKeyboardShortcut();\n };\n }, [editor, isOList, isUList]);\n\n useEffect(() => {\n const removeStatusListener = editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n let anchorNode = selection.anchor.getNode() as ElementNode;\n while (anchorNode !== null) {\n if ($isListNode(anchorNode)) {\n const tag = anchorNode.getTag();\n setIsUList(tag === 'ul');\n setIsOList(tag === 'ol');\n if (tag === 'ul') {\n setBlockType('bullet');\n }\n if (tag === 'ol') {\n setBlockType('number');\n }\n return;\n }\n const parentNode = anchorNode.getParent();\n if (parentNode === null) break;\n anchorNode = parentNode;\n }\n setIsUList(false);\n setIsOList(false);\n setBlockType('paragraph');\n }\n return false;\n });\n });\n\n return () => {\n removeStatusListener();\n };\n }, [editor]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n {ListTypes.map((listType) => (\n <button\n onClick={() => formatList(listType as ListTypesType)}\n key={listType}\n title={t.format[`${listType}Tooltip` as keyof typeof t.format]}\n className={clsx(\n styles['editor__toolbar-button'],\n styles[`editor__toolbar-button--${listType}`],\n listType === 'bullet' && isUList && styles['editor__toolbar-button--active'],\n listType === 'number' && isOList && styles['editor__toolbar-button--active']\n )}\n aria-label={t.aria.labels[listType as keyof typeof t.aria.labels]}\n aria-keyshortcuts={t.aria.keyshortcuts[listType as keyof typeof t.aria.keyshortcuts]}\n type=\"button\"\n >\n <Icon name={LIST_TYPE_ICONS[listType as keyof typeof Icon]} size={24} />\n </button>\n ))}\n </div>\n );\n};\n"],"names":["LIST_TYPE_ICONS","ListTypes","ListPlugin","t","useTranslation","editor","useLexicalComposerContext","blockType","setBlockType","useState","isUList","setIsUList","isOList","setIsOList","formatList","listType","INSERT_ORDERED_LIST_COMMAND","INSERT_UNORDERED_LIST_COMMAND","REMOVE_LIST_COMMAND","useEffect","removeKeyboardShortcut","KEY_DOWN_COMMAND","event","COMMAND_PRIORITY_EDITOR","removeStatusListener","editorState","selection","$getSelection","$isRangeSelection","anchorNode","$isListNode","tag","parentNode","jsx","styles","clsx","Icon"],"mappings":";;;;;;;;;AAkBA,MAAMA,IAAkB;AAAA,EACtB,QAAQ;AAAA,EACR,QAAQ;AACV,GAEMC,IAAY,CAAC,UAAU,QAAQ,GAExBC,IAAa,MAAM;AAC9B,QAAMC,IAAIC,KACJ,CAACC,CAAM,IAAIC,KACX,CAACC,GAAWC,CAAY,IAAIC,EAAwB,WAAW,GAC/D,CAACC,GAASC,CAAU,IAAIF,EAAkB,EAAK,GAC/C,CAACG,GAASC,CAAU,IAAIJ,EAAkB,EAAK,GAE/CK,IAAa,CAACC,MAAkC;AAChD,IAAAA,MAAa,YAAYR,MAAc,YAClCF,EAAA,gBAAgBW,GAA6B,MAAS,GAC7DR,EAAa,QAAQ,KACZO,MAAa,YAAYR,MAAc,YACzCF,EAAA,gBAAgBY,GAA+B,MAAS,GAC/DT,EAAa,QAAQ,MAEdH,EAAA,gBAAgBa,GAAqB,MAAS,GACrDV,EAAa,WAAW;AAAA,EAC1B;AAGF,SAAAW,EAAU,MAAM;AACd,UAAMC,IAAyBf,EAAO;AAAA,MACpCgB;AAAA,MACA,CAACC,MACKA,EAAM,WAAWA,EAAM,YAAYA,EAAM,SAAS,YACpDA,EAAM,eAAe,GACjBV,IACKP,EAAA,gBAAgBa,GAAqB,MAAS,IAE9Cb,EAAA,gBAAgBW,GAA6B,MAAS,GAExD,MAELM,EAAM,WAAWA,EAAM,YAAYA,EAAM,SAAS,YACpDA,EAAM,eAAe,GACjBZ,IACKL,EAAA,gBAAgBa,GAAqB,MAAS,IAE9Cb,EAAA,gBAAgBY,GAA+B,MAAS,GAE1D,MAEF;AAAA,MAETM;AAAA,IAAA;AAGF,WAAO,MAAM;AACY,MAAAH;IAAA;AAAA,EAExB,GAAA,CAACf,GAAQO,GAASF,CAAO,CAAC,GAE7BS,EAAU,MAAM;AACd,UAAMK,IAAuBnB,EAAO,uBAAuB,CAAC,EAAE,aAAAoB,QAAkB;AAC9E,MAAAA,EAAY,KAAK,MAAM;AACrB,cAAMC,IAAYC;AACd,YAAAC,EAAkBF,CAAS,GAAG;AAC5B,cAAAG,IAAaH,EAAU,OAAO,QAAQ;AAC1C,iBAAOG,MAAe,QAAM;AACtB,gBAAAC,EAAYD,CAAU,GAAG;AACrB,oBAAAE,IAAMF,EAAW;AACvB,cAAAlB,EAAWoB,MAAQ,IAAI,GACvBlB,EAAWkB,MAAQ,IAAI,GACnBA,MAAQ,QACVvB,EAAa,QAAQ,GAEnBuB,MAAQ,QACVvB,EAAa,QAAQ;AAEvB;AAAA,YACF;AACM,kBAAAwB,IAAaH,EAAW;AAC9B,gBAAIG,MAAe,KAAM;AACZ,YAAAH,IAAAG;AAAA,UACf;AACA,UAAArB,EAAW,EAAK,GAChBE,EAAW,EAAK,GAChBL,EAAa,WAAW;AAAA,QAC1B;AACO,eAAA;AAAA,MAAA,CACR;AAAA,IAAA,CACF;AAED,WAAO,MAAM;AACU,MAAAgB;IAAA;AAAA,EACvB,GACC,CAACnB,CAAM,CAAC,GAGT,gBAAA4B,EAAC,SAAI,WAAWC,EAAO,8BAA8B,GAClD,UAAAjC,EAAU,IAAI,CAACc,MACd,gBAAAkB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAS,MAAMnB,EAAWC,CAAyB;AAAA,MAEnD,OAAOZ,EAAE,OAAO,GAAGY,CAAQ,SAAkC;AAAA,MAC7D,WAAWoB;AAAA,QACTD,EAAO,wBAAwB;AAAA,QAC/BA,EAAO,2BAA2BnB,CAAQ,EAAE;AAAA,QAC5CA,MAAa,YAAYL,KAAWwB,EAAO,gCAAgC;AAAA,QAC3EnB,MAAa,YAAYH,KAAWsB,EAAO,gCAAgC;AAAA,MAC7E;AAAA,MACA,cAAY/B,EAAE,KAAK,OAAOY,CAAsC;AAAA,MAChE,qBAAmBZ,EAAE,KAAK,aAAaY,CAA4C;AAAA,MACnF,MAAK;AAAA,MAEL,4BAACqB,GAAK,EAAA,MAAMpC,EAAgBe,CAA6B,GAAG,MAAM,IAAI;AAAA,IAAA;AAAA,IAZjEA;AAAA,EAcR,CAAA,EACH,CAAA;AAEJ;"}
1
+ {"version":3,"file":"ListPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/ListPlugin/ListPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport {\n $isListNode,\n INSERT_ORDERED_LIST_COMMAND,\n INSERT_UNORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from '@lexical/list';\nimport { useEffect, useState } from 'react';\nimport clsx from 'clsx';\nimport { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, KEY_DOWN_COMMAND } from 'lexical';\n\nimport type { ElementNode } from 'lexical';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ntype ListTypesType = 'bullet' | 'number' | 'paragraph';\nconst LIST_TYPE_ICONS = {\n bullet: 'BulletList',\n number: 'NumberedList',\n};\n\nconst ListTypes = ['bullet', 'number'];\n\nexport const ListPlugin = () => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const [blockType, setBlockType] = useState<ListTypesType>('paragraph');\n const [isUList, setIsUList] = useState<boolean>(false);\n const [isOList, setIsOList] = useState<boolean>(false);\n\n const formatList = (listType: ListTypesType): void => {\n if (listType === 'number' && blockType !== 'number') {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);\n setBlockType('number');\n } else if (listType === 'bullet' && blockType !== 'bullet') {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);\n setBlockType('bullet');\n } else {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n setBlockType('paragraph');\n }\n };\n\n useEffect(() => {\n const removeKeyboardShortcut = editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event: KeyboardEvent) => {\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit7') {\n event.preventDefault();\n if (isOList) {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n } else {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);\n }\n return true;\n }\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit8') {\n event.preventDefault();\n if (isUList) {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n } else {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);\n }\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_EDITOR\n );\n\n return () => {\n removeKeyboardShortcut();\n };\n }, [editor, isOList, isUList]);\n\n useEffect(() => {\n const removeStatusListener = editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n let anchorNode = selection.anchor.getNode() as ElementNode;\n while (anchorNode !== null) {\n if ($isListNode(anchorNode)) {\n const tag = anchorNode.getTag();\n setIsUList(tag === 'ul');\n setIsOList(tag === 'ol');\n if (tag === 'ul') {\n setBlockType('bullet');\n }\n if (tag === 'ol') {\n setBlockType('number');\n }\n return;\n }\n const parentNode = anchorNode.getParent();\n if (parentNode === null) break;\n anchorNode = parentNode;\n }\n setIsUList(false);\n setIsOList(false);\n setBlockType('paragraph');\n }\n return false;\n });\n });\n\n return () => {\n removeStatusListener();\n };\n }, [editor]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n {ListTypes.map((listType) => (\n <button\n onClick={() => formatList(listType as ListTypesType)}\n key={listType}\n title={t.format[`${listType}Tooltip` as keyof typeof t.format]}\n className={clsx(\n styles['editor__toolbar-button'],\n styles[`editor__toolbar-button--${listType}`],\n listType === 'bullet' && isUList && styles['editor__toolbar-button--active'],\n listType === 'number' && isOList && styles['editor__toolbar-button--active']\n )}\n aria-label={t.aria.labels[listType as keyof typeof t.aria.labels]}\n aria-keyshortcuts={t.aria.keyshortcuts[listType as keyof typeof t.aria.keyshortcuts]}\n type=\"button\"\n >\n <Icon name={LIST_TYPE_ICONS[listType as keyof typeof Icon]} size={24} />\n </button>\n ))}\n </div>\n );\n};\n"],"names":["LIST_TYPE_ICONS","ListTypes","ListPlugin","t","useTranslation","editor","useLexicalComposerContext","blockType","setBlockType","useState","isUList","setIsUList","isOList","setIsOList","formatList","listType","INSERT_ORDERED_LIST_COMMAND","INSERT_UNORDERED_LIST_COMMAND","REMOVE_LIST_COMMAND","useEffect","removeKeyboardShortcut","KEY_DOWN_COMMAND","event","COMMAND_PRIORITY_EDITOR","removeStatusListener","editorState","selection","$getSelection","$isRangeSelection","anchorNode","$isListNode","tag","parentNode","jsx","styles","clsx","Icon"],"mappings":"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"}
@@ -1,31 +1,31 @@
1
1
  import { u as m } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
2
2
  import { useEffect as c } from "react";
3
- import { PASTE_COMMAND as f, COMMAND_PRIORITY_CRITICAL as u, $getSelection as p } from "lexical";
4
- import { i as l } from "../../../../LexicalUtils.prod-BTFNWAMw.js";
5
- import { _ as d } from "../../../../LexicalClipboard.prod-C6LsK5E6.js";
6
- import { MSWordNormalizer as D } from "@staartwind.nl/lexical-paste-from-word";
7
- const M = () => {
8
- const [r] = m(), s = (t) => {
9
- t.preventDefault(), r.update(() => {
10
- const e = p(), n = l(t, InputEvent) || l(t, KeyboardEvent) ? null : t.clipboardData;
11
- if (n != null && e !== null) {
12
- const o = n.getData("text/html"), a = new DataTransfer(), i = new D();
13
- a.setData("text/html", o), i.isActive(o) && a.setData("text/html", i.normalize(o)), d(a, e, r);
3
+ import { Y as f, z as u, M as d } from "../../../../Lexical.prod-DSqOWcE1.js";
4
+ import { i } from "../../../../LexicalUtils.prod-CicP_X7u.js";
5
+ import { _ as p } from "../../../../LexicalClipboard.prod-DP0us-xV.js";
6
+ import { d as D } from "../../../../index-DPQ9bZx5.js";
7
+ const P = () => {
8
+ const [e] = m(), l = (t) => {
9
+ t.preventDefault(), e.update(() => {
10
+ const r = d(), n = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
11
+ if (n != null && r !== null) {
12
+ const a = n.getData("text/html"), o = new DataTransfer(), s = new D.MSWordNormalizer();
13
+ o.setData("text/html", a), s.isActive(a) && o.setData("text/html", s.normalize(a)), p(o, r, e);
14
14
  }
15
15
  });
16
16
  };
17
17
  return c(() => {
18
- const t = r.registerCommand(
18
+ const t = e.registerCommand(
19
19
  f,
20
- (e) => e instanceof ClipboardEvent ? (s(e), !0) : !1,
20
+ (r) => r instanceof ClipboardEvent ? (l(r), !0) : !1,
21
21
  u
22
22
  );
23
23
  return () => {
24
24
  t();
25
25
  };
26
- }, [r]), null;
26
+ }, [e]), null;
27
27
  };
28
28
  export {
29
- M as PasteHandlerPlugin
29
+ P as PasteHandlerPlugin
30
30
  };
31
31
  //# sourceMappingURL=PasteHandlerPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PasteHandlerPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { useEffect } from 'react';\nimport { $getSelection, COMMAND_PRIORITY_CRITICAL, type CommandPayloadType, PASTE_COMMAND } from 'lexical';\nimport { objectKlassEquals } from '@lexical/utils';\nimport { $insertDataTransferForRichText } from '@lexical/clipboard';\nimport { MSWordNormalizer } from '@staartwind.nl/lexical-paste-from-word';\n\nexport const PasteHandlerPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n const handlePaste = (event: CommandPayloadType<typeof PASTE_COMMAND>) => {\n event.preventDefault();\n editor.update(() => {\n const selection = $getSelection();\n const clipboardData =\n objectKlassEquals(event, InputEvent) || objectKlassEquals(event, KeyboardEvent)\n ? null\n : (event as ClipboardEvent).clipboardData;\n if (clipboardData != null && selection !== null) {\n const html = clipboardData.getData('text/html');\n const newData = new DataTransfer();\n const wordNormalizer = new MSWordNormalizer();\n newData.setData('text/html', html);\n if (wordNormalizer.isActive(html)) {\n newData.setData('text/html', wordNormalizer.normalize(html));\n }\n $insertDataTransferForRichText(newData, selection, editor);\n }\n });\n };\n\n useEffect(() => {\n const removePasteListener = editor.registerCommand(\n PASTE_COMMAND,\n (event) => {\n if (event instanceof ClipboardEvent) {\n handlePaste(event);\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n );\n\n return () => {\n removePasteListener();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n\n return null;\n};\n"],"names":["PasteHandlerPlugin","editor","useLexicalComposerContext","handlePaste","event","selection","$getSelection","clipboardData","objectKlassEquals","html","newData","wordNormalizer","MSWordNormalizer","$insertDataTransferForRichText","useEffect","removePasteListener","PASTE_COMMAND","COMMAND_PRIORITY_CRITICAL"],"mappings":";;;;;;AAOO,MAAMA,IAAqB,MAAM;AAChC,QAAA,CAACC,CAAM,IAAIC,KAEXC,IAAc,CAACC,MAAoD;AACvE,IAAAA,EAAM,eAAe,GACrBH,EAAO,OAAO,MAAM;AAClB,YAAMI,IAAYC,KACZC,IACJC,EAAkBJ,GAAO,UAAU,KAAKI,EAAkBJ,GAAO,aAAa,IAC1E,OACCA,EAAyB;AAC5B,UAAAG,KAAiB,QAAQF,MAAc,MAAM;AACzC,cAAAI,IAAOF,EAAc,QAAQ,WAAW,GACxCG,IAAU,IAAI,gBACdC,IAAiB,IAAIC;AACnB,QAAAF,EAAA,QAAQ,aAAaD,CAAI,GAC7BE,EAAe,SAASF,CAAI,KAC9BC,EAAQ,QAAQ,aAAaC,EAAe,UAAUF,CAAI,CAAC,GAE9BI,EAAAH,GAASL,GAAWJ,CAAM;AAAA,MAC3D;AAAA,IAAA,CACD;AAAA,EAAA;AAGH,SAAAa,EAAU,MAAM;AACd,UAAMC,IAAsBd,EAAO;AAAA,MACjCe;AAAA,MACA,CAACZ,MACKA,aAAiB,kBACnBD,EAAYC,CAAK,GACV,MAEF;AAAA,MAETa;AAAA,IAAA;AAGF,WAAO,MAAM;AACS,MAAAF;IAAA;AAAA,EACtB,GAEC,CAACd,CAAM,CAAC,GAEJ;AACT;"}
1
+ {"version":3,"file":"PasteHandlerPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { useEffect } from 'react';\nimport { $getSelection, COMMAND_PRIORITY_CRITICAL, type CommandPayloadType, PASTE_COMMAND } from 'lexical';\nimport { objectKlassEquals } from '@lexical/utils';\nimport { $insertDataTransferForRichText } from '@lexical/clipboard';\nimport { MSWordNormalizer } from '@staartwind.nl/lexical-paste-from-word';\n\nexport const PasteHandlerPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n const handlePaste = (event: CommandPayloadType<typeof PASTE_COMMAND>) => {\n event.preventDefault();\n editor.update(() => {\n const selection = $getSelection();\n const clipboardData =\n objectKlassEquals(event, InputEvent) || objectKlassEquals(event, KeyboardEvent)\n ? null\n : (event as ClipboardEvent).clipboardData;\n if (clipboardData != null && selection !== null) {\n const html = clipboardData.getData('text/html');\n const newData = new DataTransfer();\n const wordNormalizer = new MSWordNormalizer();\n newData.setData('text/html', html);\n if (wordNormalizer.isActive(html)) {\n newData.setData('text/html', wordNormalizer.normalize(html));\n }\n $insertDataTransferForRichText(newData, selection, editor);\n }\n });\n };\n\n useEffect(() => {\n const removePasteListener = editor.registerCommand(\n PASTE_COMMAND,\n (event) => {\n if (event instanceof ClipboardEvent) {\n handlePaste(event);\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n );\n\n return () => {\n removePasteListener();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n\n return null;\n};\n"],"names":["PasteHandlerPlugin","editor","useLexicalComposerContext","handlePaste","event","selection","$getSelection","clipboardData","objectKlassEquals","html","newData","wordNormalizer","MSWordNormalizer","$insertDataTransferForRichText","useEffect","removePasteListener","PASTE_COMMAND","COMMAND_PRIORITY_CRITICAL"],"mappings":";;;;;;AAOO,MAAMA,IAAqB,MAAM;AAChC,QAAA,CAACC,CAAM,IAAIC,KAEXC,IAAc,CAACC,MAAoD;AACvE,IAAAA,EAAM,eAAe,GACrBH,EAAO,OAAO,MAAM;AAClB,YAAMI,IAAYC,KACZC,IACJC,EAAkBJ,GAAO,UAAU,KAAKI,EAAkBJ,GAAO,aAAa,IAC1E,OACCA,EAAyB;AAC5B,UAAAG,KAAiB,QAAQF,MAAc,MAAM;AACzC,cAAAI,IAAOF,EAAc,QAAQ,WAAW,GACxCG,IAAU,IAAI,gBACdC,IAAiB,IAAIC,EAAAA;AACnB,QAAAF,EAAA,QAAQ,aAAaD,CAAI,GAC7BE,EAAe,SAASF,CAAI,KAC9BC,EAAQ,QAAQ,aAAaC,EAAe,UAAUF,CAAI,CAAC,GAE9BI,EAAAH,GAASL,GAAWJ,CAAM;AAAA,MAC3D;AAAA,IAAA,CACD;AAAA,EAAA;AAGH,SAAAa,EAAU,MAAM;AACd,UAAMC,IAAsBd,EAAO;AAAA,MACjCe;AAAAA,MACA,CAACZ,MACKA,aAAiB,kBACnBD,EAAYC,CAAK,GACV,MAEF;AAAA,MAETa;AAAAA,IAAA;AAGF,WAAO,MAAM;AACS,MAAAF;IAAA;AAAA,EACtB,GAEC,CAACd,CAAM,CAAC,GAEJ;AACT;"}
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { b as D } from "../../../../TablePlugin-BLzR0g93.js";
3
+ import { b as z } from "../../../../TablePlugin-BBOjr3TX.js";
4
4
  import "../../../Buttons/Button.js";
5
5
  import "../../../Buttons/LinkButton.js";
6
6
  import "@react-aria/button";
@@ -15,20 +15,17 @@ import "../../../IconButton/IconButton.js";
15
15
  import "../../../Input/Input.js";
16
16
  import "../../../InputField/InputField.js";
17
17
  import "react-router-dom";
18
- import "lexical";
19
- import "@lexical/list";
20
- import "@lexical/link";
21
18
  import "../../helpers.js";
22
19
  import "../../hooks/useTranslation.js";
23
20
  import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
24
21
  import "../../hooks/components/Flyout.js";
25
22
  import "../../Providers/LanguageProvider.js";
26
- import "@staartwind.nl/lexical-paste-from-word";
23
+ import "../../../../index-DPQ9bZx5.js";
27
24
  import "../../../SelectListbox/SelectListbox.js";
28
25
  import "../../../SelectListbox/SelectProvider.js";
29
26
  import "../../../Sortable/components/SortableItem.js";
30
27
  import "../../../../SortableProvider-BUsvniX7.js";
31
28
  export {
32
- D as AddTableForm
29
+ z as AddTableForm
33
30
  };
34
31
  //# sourceMappingURL=AddTableFrom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddTableFrom.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"AddTableFrom.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
3
3
  import "../../../../clsx-OuTLNxxd.js";
4
- import "../../../../LexicalTable.prod-DqzrJuYr.js";
5
- import "lexical";
4
+ import "../../../../LexicalTable.prod-DEA4KRzX.js";
5
+ import "../../../../Lexical.prod-DSqOWcE1.js";
6
6
  import "react";
7
- import { T as G } from "../../../../TablePlugin-BLzR0g93.js";
7
+ import { T as E } from "../../../../TablePlugin-BBOjr3TX.js";
8
8
  import "./helpers.js";
9
9
  import "../../hooks/useFlyout.js";
10
10
  import "../../../Icon/Icon.js";
@@ -20,18 +20,16 @@ import "../../../IconButton/IconButton.js";
20
20
  import "../../../Input/Input.js";
21
21
  import "../../../InputField/InputField.js";
22
22
  import "react-router-dom";
23
- import "@lexical/list";
24
- import "@lexical/link";
25
23
  import "../../../../RteEditor.module-DcvGRx3a.js";
26
24
  import "../../hooks/useTranslation.js";
27
25
  import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
28
26
  import "../../Providers/LanguageProvider.js";
29
- import "@staartwind.nl/lexical-paste-from-word";
27
+ import "../../../../index-DPQ9bZx5.js";
30
28
  import "../../../SelectListbox/SelectListbox.js";
31
29
  import "../../../SelectListbox/SelectProvider.js";
32
30
  import "../../../Sortable/components/SortableItem.js";
33
31
  import "../../../../SortableProvider-BUsvniX7.js";
34
32
  export {
35
- G as TablePlugin
33
+ E as TablePlugin
36
34
  };
37
35
  //# sourceMappingURL=TablePlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TablePlugin.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"TablePlugin.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import { d as S, a as h, n as d, f as C, p as w, o as m, m as E, C as p, T as I } from "../../../../LexicalTable.prod-DqzrJuYr.js";
2
- import { $createParagraphNode as u } from "lexical";
1
+ import { d as S, a as h, n as d, f as C, p as w, o as m, m as D, C as p, T as E } from "../../../../LexicalTable.prod-DEA4KRzX.js";
2
+ import { D as u } from "../../../../Lexical.prod-DSqOWcE1.js";
3
3
  const b = 100, O = (e, n) => {
4
4
  const t = S(0, 0, !1);
5
5
  for (let o = 0; o < e; o++) {
@@ -11,15 +11,15 @@ const b = 100, O = (e, n) => {
11
11
  t.append(r);
12
12
  }
13
13
  return t;
14
- }, P = (e) => {
14
+ }, z = (e) => {
15
15
  const n = C(e), t = n.getNextSibling() || n.getPreviousSibling(), o = n.getParentOrThrow();
16
16
  if (o.getChildrenSize() > 1 ? n.remove() : o.remove(), t !== null) {
17
17
  const r = t.getFirstDescendant();
18
18
  r && r.select();
19
19
  }
20
- }, v = (e) => {
20
+ }, I = (e) => {
21
21
  w(e).remove();
22
- }, z = (e, n) => {
22
+ }, F = (e, n) => {
23
23
  const t = h(), o = C(e), r = o.getChildrenSize();
24
24
  for (let s = 0; s < r; s++) {
25
25
  const c = d(0);
@@ -28,11 +28,11 @@ const b = 100, O = (e, n) => {
28
28
  n === "insertRowAbove" ? o.insertBefore(t) : o.insertAfter(t);
29
29
  const l = t.getFirstDescendant();
30
30
  l && l.select();
31
- }, F = (e, n) => {
31
+ }, P = (e, n) => {
32
32
  const t = C(e);
33
33
  if (!m(e))
34
34
  throw new Error("Selected node is not a TableCellNode");
35
- const o = E(e), r = t.getChildren().length, l = w(e);
35
+ const o = D(e), r = t.getChildren().length, l = w(e);
36
36
  let s = p(e);
37
37
  const c = l.getChildren(), T = c.length;
38
38
  for (let i = 0; i < T; i++) {
@@ -53,14 +53,14 @@ const b = 100, O = (e, n) => {
53
53
  if (!m(e))
54
54
  throw new Error("Selected node is not a TableCellNode");
55
55
  const n = w(e), t = ((r = n.getFirstChild()) == null ? void 0 : r.getChildrenSize()) || 0, o = p(e);
56
- t === 1 ? v(e) : I(n, o);
56
+ t === 1 ? I(e) : E(n, o);
57
57
  };
58
58
  export {
59
59
  O as createTable,
60
60
  B as deleteColumn,
61
- P as deleteRow,
62
- v as deleteTable,
63
- F as insertColumn,
64
- z as insertRow
61
+ z as deleteRow,
62
+ I as deleteTable,
63
+ P as insertColumn,
64
+ F as insertRow
65
65
  };
66
66
  //# sourceMappingURL=helpers.js.map
@@ -1,4 +1,4 @@
1
- import { T as o } from "../../../../TablePlugin-BLzR0g93.js";
1
+ import { T as o } from "../../../../TablePlugin-BBOjr3TX.js";
2
2
  import { TableCellContextMenu as t } from "./TableCellContextMenu/TableCellContextMenu.js";
3
3
  export {
4
4
  t as TableCellContextMenu,
@@ -1,36 +1,36 @@
1
1
  import { jsxs as P, jsx as n } from "react/jsx-runtime";
2
2
  import { u as y } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
3
- import { $getSelection as p, $isRangeSelection as h, $setSelection as C } from "lexical";
4
- import { useState as L, useRef as E, useCallback as S, useEffect as m } from "react";
5
- import { g as b } from "../../../../LexicalTable.prod-DqzrJuYr.js";
6
- import { BlockFormatPlugin as T } from "../BlockFormatPlugin/BlockFormatPlugin.js";
7
- import { ListPlugin as N } from "../ListPlugin/ListPlugin.js";
8
- import { LinkPlugin as k } from "../LinkPlugin/LinkPlugin.js";
9
- import { HistoryPlugin as x } from "../HistoryPlugin/HistoryPlugin.js";
10
- import { T as B } from "../../../../TablePlugin-BLzR0g93.js";
11
- import { TableCellContextMenu as R } from "../TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
12
- import { s as z } from "../../../../RteEditor.module-DcvGRx3a.js";
13
- import { setScrollableContainers as w, removeScrollableContainers as A } from "../../helpers.js";
14
- const O = ({ editorScrollPosition: d }) => {
15
- const [t] = y(), [i, l] = L(null), u = E(null), f = S(() => {
16
- const e = p();
3
+ import { M as g, v as h, F as C } from "../../../../Lexical.prod-DSqOWcE1.js";
4
+ import { useState as E, useRef as L, useCallback as T, useEffect as m } from "react";
5
+ import { g as b } from "../../../../LexicalTable.prod-DEA4KRzX.js";
6
+ import { BlockFormatPlugin as N } from "../BlockFormatPlugin/BlockFormatPlugin.js";
7
+ import { ListPlugin as k } from "../ListPlugin/ListPlugin.js";
8
+ import { LinkPlugin as x } from "../LinkPlugin/LinkPlugin.js";
9
+ import { HistoryPlugin as B } from "../HistoryPlugin/HistoryPlugin.js";
10
+ import { T as S } from "../../../../TablePlugin-BBOjr3TX.js";
11
+ import { TableCellContextMenu as z } from "../TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
12
+ import { s as A } from "../../../../RteEditor.module-DcvGRx3a.js";
13
+ import { setScrollableContainers as v, removeScrollableContainers as K } from "../../helpers.js";
14
+ const Q = ({ editorScrollPosition: d }) => {
15
+ const [t] = y(), [i, s] = E(null), u = L(null), f = T(() => {
16
+ const e = g();
17
17
  if (h(e)) {
18
- const s = e.anchor.getNode(), c = b(s);
19
- if (c) {
20
- const g = t.getElementByKey(c.getKey()), a = g ? g.getBoundingClientRect() : { right: 0, bottom: 0, height: 0 };
21
- l({ xPos: a.right, yPos: a.bottom, height: a.height });
18
+ const l = e.anchor.getNode(), a = b(l);
19
+ if (a) {
20
+ const p = t.getElementByKey(a.getKey()), c = p ? p.getBoundingClientRect() : { right: 0, bottom: 0, height: 0 };
21
+ s({ xPos: c.right, yPos: c.bottom, height: c.height });
22
22
  } else
23
- l(null);
23
+ s(null);
24
24
  }
25
- }, [t]), v = (e) => {
25
+ }, [t]), w = (e) => {
26
26
  var r;
27
27
  (r = u.current) == null || r.mutateTable(e);
28
28
  }, o = () => {
29
29
  t.update(() => {
30
- const e = p();
30
+ const e = g();
31
31
  if (h(e)) {
32
- const s = e.anchor.getNode();
33
- b(s) && (C(null), l(null));
32
+ const l = e.anchor.getNode();
33
+ b(l) && (C(null), s(null));
34
34
  }
35
35
  });
36
36
  };
@@ -40,32 +40,32 @@ const O = ({ editorScrollPosition: d }) => {
40
40
  f();
41
41
  });
42
42
  });
43
- }, [t, f]), m(() => (w(o), window.addEventListener("scroll", o), window.addEventListener("resize", o), () => {
44
- window.removeEventListener("scroll", o), window.removeEventListener("resize", o), A(o);
43
+ }, [t, f]), m(() => (v(o), window.addEventListener("scroll", o), window.addEventListener("resize", o), () => {
44
+ window.removeEventListener("scroll", o), window.removeEventListener("resize", o), K(o);
45
45
  }), [t]), m(() => {
46
46
  const e = () => {
47
- w(o);
47
+ v(o);
48
48
  };
49
49
  return window.addEventListener("keydown", e, { capture: !0 }), () => {
50
50
  window.removeEventListener("keydown", e);
51
51
  };
52
- }, []), /* @__PURE__ */ P("div", { className: z.editor__toolbar, children: [
53
- /* @__PURE__ */ n(T, {}),
52
+ }, []), /* @__PURE__ */ P("div", { className: A.editor__toolbar, children: [
54
53
  /* @__PURE__ */ n(N, {}),
55
- /* @__PURE__ */ n(B, { isActive: !!i, ref: u }),
54
+ /* @__PURE__ */ n(k, {}),
55
+ /* @__PURE__ */ n(S, { isActive: !!i, ref: u }),
56
56
  i && /* @__PURE__ */ n(
57
- R,
57
+ z,
58
58
  {
59
59
  position: i,
60
60
  parentScrollPosition: d,
61
- onAction: v
61
+ onAction: w
62
62
  }
63
63
  ),
64
- /* @__PURE__ */ n(k, { parentScrollPosition: d }),
65
- /* @__PURE__ */ n(x, {})
64
+ /* @__PURE__ */ n(x, { parentScrollPosition: d }),
65
+ /* @__PURE__ */ n(B, {})
66
66
  ] });
67
67
  };
68
68
  export {
69
- O as ToolBarPlugin
69
+ Q as ToolBarPlugin
70
70
  };
71
71
  //# sourceMappingURL=ToolbarPlugin.js.map
@@ -3,7 +3,7 @@ import { BlockFormatPlugin as l } from "./BlockFormatPlugin/BlockFormatPlugin.js
3
3
  import { ListPlugin as n } from "./ListPlugin/ListPlugin.js";
4
4
  import { LinkPlugin as m, getLinkNodeTag as x } from "./LinkPlugin/LinkPlugin.js";
5
5
  import { HistoryPlugin as p } from "./HistoryPlugin/HistoryPlugin.js";
6
- import { T as a } from "../../../TablePlugin-BLzR0g93.js";
6
+ import { T as a } from "../../../TablePlugin-BBOjr3TX.js";
7
7
  import { TableCellContextMenu as T } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
8
8
  export {
9
9
  l as BlockFormatPlugin,