@baishuyun/ui-base 6.10.0 → 6.10.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 (163) hide show
  1. package/dist/Amap/{Amap-BNnmSPnl.js → Amap-BLSziesG.js} +1 -1
  2. package/dist/Amap/AmapCircle/index.js +4 -4
  3. package/dist/Amap/{AmapCircle-BDW6pnNR.js → AmapCircle-2qupysHe.js} +1 -1
  4. package/dist/Amap/AmapMarker/index.js +5 -5
  5. package/dist/Amap/{AmapMarker-CdoPWdff.js → AmapMarker-xEqoVnFR.js} +2 -2
  6. package/dist/Amap/AmapMarkerCluster/index.js +5 -5
  7. package/dist/Amap/{AmapMarkerCluster-CSIxiVC5.js → AmapMarkerCluster-CvEQa3o9.js} +2 -2
  8. package/dist/Amap/AmapProvider/index.js +6 -5
  9. package/dist/Amap/{AmapProvider-Cwi6WOe0.js → AmapProvider-DqFp3DZ5.js} +2 -2
  10. package/dist/Amap/hooks/index.js +3 -3
  11. package/dist/Amap/{hooks-DAN31s_-.js → hooks-BTcFpdd0.js} +1 -1
  12. package/dist/Amap/index.js +12 -11
  13. package/dist/Calendar/{AllDaySection-DNsVyixx.js → AllDaySection-BqbcPQls.js} +3 -3
  14. package/dist/Calendar/{Calendar-DL2X3z_z.js → Calendar-gEtuBW7Y.js} +12 -13
  15. package/dist/Calendar/{CurrentTimeIndicator-twXtFHIp.js → CurrentTimeIndicator-dRYot1Rk.js} +24 -18
  16. package/dist/Calendar/{EventCard-CvEnWcKd.js → EventCard-Di5UX4pB.js} +3 -4
  17. package/dist/Calendar/{TimeGrid-D62R57Bo.js → TimeGrid-CBpDFAM4.js} +1 -1
  18. package/dist/Calendar/context/index.js +2 -2
  19. package/dist/Calendar/index.js +21 -20
  20. package/dist/Calendar/subcomponents/AllDaySection/index.js +8 -7
  21. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +6 -5
  22. package/dist/Calendar/subcomponents/EventCard/index.js +7 -6
  23. package/dist/Calendar/subcomponents/TimeAxis/index.js +4 -4
  24. package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -3
  25. package/dist/Calendar/{theme-BRVmxhqD.js → theme-i60ueO92.js} +2 -2
  26. package/dist/Calendar/utils/index.js +4 -4
  27. package/dist/Calendar/utils/layout/index.js +3 -3
  28. package/dist/Calendar/utils/theme/index.js +2 -2
  29. package/dist/Card/index.js +2 -2
  30. package/dist/CheckBox/{CheckBox-CcM19LnP.js → CheckBox-nBm0u6zX.js} +1 -1
  31. package/dist/CheckBox/index.js +3 -3
  32. package/dist/ColorPicker/ColorPicker-CYlrnMwM.js +174 -0
  33. package/dist/ColorPicker/index.js +7 -6
  34. package/dist/ConfigProvider/index.js +4 -3
  35. package/dist/DatePicker/DatePicker-CagGt_f0.js +101 -0
  36. package/dist/DatePicker/{DatePickerPanel-Bz3uvbYF.js → DatePickerPanel-CaDZzxMD.js} +5 -5
  37. package/dist/DatePicker/index.js +10 -9
  38. package/dist/DatePicker/style/index.js +2 -2
  39. package/dist/DatePicker/{style-BwmM26RP.js → style-UKXn1N_p.js} +1 -1
  40. package/dist/DropDown/DropDown-CLuQf970.js +178 -0
  41. package/dist/DropDown/index.js +11 -10
  42. package/dist/DropDown/style/index.js +2 -2
  43. package/dist/DropDown/{style-BSgosymi.js → style-LLDVPpPa.js} +1 -1
  44. package/dist/Editor/Buttons-ByO5rS19.js +937 -0
  45. package/dist/Editor/ToolbarPlugin/Buttons/index.js +17 -16
  46. package/dist/Editor/constants/index.js +3 -3
  47. package/dist/Editor/index.js +593 -238
  48. package/dist/Gantt/GanttChart/index.js +18 -17
  49. package/dist/Gantt/{GanttChart-6gpw5vi6.js → GanttChart-DvCAp8Dk.js} +8 -10
  50. package/dist/Gantt/GanttTable/index.js +11 -11
  51. package/dist/Gantt/{GanttTable-lVu-YUtt.js → GanttTable-DyVJOVo3.js} +5 -5
  52. package/dist/Gantt/GanttToolBar/index.js +14 -13
  53. package/dist/Gantt/{GanttToolBar-CarBWZg-.js → GanttToolBar-CxT68kmT.js} +3 -4
  54. package/dist/Gantt/{collapseKeys-_ShTXPKt.js → collapseKeys-B4SOVHjd.js} +2 -2
  55. package/dist/Gantt/index.js +26 -25
  56. package/dist/Gantt/{theme-CiMD9Y6i.js → theme-2LyXJRDe.js} +1 -1
  57. package/dist/Gantt/{timelineViewConfig-CLIpppp0.js → timelineViewConfig-9HArvbmb.js} +1 -1
  58. package/dist/Gantt/utils/index.js +6 -6
  59. package/dist/Gantt/utils/theme/index.js +2 -2
  60. package/dist/Icon/index.js +1 -1
  61. package/dist/InputTag/{InputTag-DxPO0DwD.js → InputTag-yRPO90Ku.js} +2 -2
  62. package/dist/InputTag/index.js +5 -5
  63. package/dist/Loading/{Loading-CVyzO5-s.js → Loading-BF_dtuLc.js} +1 -1
  64. package/dist/Loading/index.js +4 -4
  65. package/dist/Modal/Modal-Cb7Msq26.js +96 -0
  66. package/dist/Modal/index.js +3 -2
  67. package/dist/NotFoundContent/index.js +2 -2
  68. package/dist/Overlay/OverlayContext-CVSFoyqN.js +23 -0
  69. package/dist/Overlay/index.js +3 -0
  70. package/dist/Radio/index.js +2 -2
  71. package/dist/ScrollBar/{ScrollBar-CnwYQfXM.js → ScrollBar-N2pOLv-8.js} +1 -1
  72. package/dist/ScrollBar/index.js +2 -2
  73. package/dist/Segmented/{Segmented-Ck2ZmfF7.js → Segmented-BCQRrc65.js} +1 -1
  74. package/dist/Segmented/index.js +2 -2
  75. package/dist/Select/Select-iwzfNy9d.js +753 -0
  76. package/dist/Select/{SelectInputSearch-CrGW_eVo.js → SelectInputSearch-Bc_aPNbG.js} +1 -1
  77. package/dist/Select/index.js +14 -13
  78. package/dist/Table/{Table-CL-KfNY3.js → Table-Cm8zFl2G.js} +5 -5
  79. package/dist/Table/hooks/index.js +2 -2
  80. package/dist/Table/{hooks-uCDY9dqx.js → hooks-BceUZQQm.js} +1 -1
  81. package/dist/Table/index.js +8 -8
  82. package/dist/Table/{processRowspan-nIGqGyHh.js → processRowspan-B0WELhG2.js} +1 -1
  83. package/dist/Table/style/index.js +2 -2
  84. package/dist/Table/{style-x9xfw6te.js → style-C4wp0IOM.js} +1 -1
  85. package/dist/Table/utils/index.js +2 -2
  86. package/dist/Tabs/Tabs-BPWRIwtD.js +413 -0
  87. package/dist/Tabs/index.js +6 -5
  88. package/dist/Tooltip/Tooltip-Bb3Jx-If.js +172 -0
  89. package/dist/Tooltip/index.js +3 -2
  90. package/dist/Tree/index.js +4 -4
  91. package/dist/Tree/utils/index.js +1 -1
  92. package/dist/components/ColorPicker/ColorPalettes.d.ts +2 -0
  93. package/dist/components/ColorPicker/ColorPicker.type.d.ts +1 -7
  94. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +2 -0
  95. package/dist/components/DatePicker/interface.d.ts +2 -0
  96. package/dist/components/Editor/ToolbarPlugin/Buttons/BulletListButton.d.ts +2 -0
  97. package/dist/components/Editor/ToolbarPlugin/Buttons/CodeButton.d.ts +2 -0
  98. package/dist/components/Editor/ToolbarPlugin/Buttons/CodeLanguageButton.d.ts +2 -0
  99. package/dist/components/Editor/ToolbarPlugin/Buttons/IndentButton.d.ts +2 -0
  100. package/dist/components/Editor/ToolbarPlugin/Buttons/NumberListButton.d.ts +2 -0
  101. package/dist/components/Editor/ToolbarPlugin/Buttons/OutdentButton.d.ts +2 -0
  102. package/dist/components/Editor/ToolbarPlugin/Buttons/RedoButton.d.ts +2 -0
  103. package/dist/components/Editor/ToolbarPlugin/Buttons/StrikeThroughButton.d.ts +2 -0
  104. package/dist/components/Editor/ToolbarPlugin/Buttons/SubscriptButton.d.ts +2 -0
  105. package/dist/components/Editor/ToolbarPlugin/Buttons/SuperscriptButton.d.ts +2 -0
  106. package/dist/components/Editor/ToolbarPlugin/Buttons/UndoButton.d.ts +2 -0
  107. package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +10 -0
  108. package/dist/components/Editor/ToolbarPlugin/context/HistoryStateProvider.d.ts +8 -0
  109. package/dist/components/Editor/ToolbarPlugin/context/TextFormatsContext.d.ts +8 -1
  110. package/dist/components/Editor/ToolbarPlugin/icons/ToolbarIcon.d.ts +13 -0
  111. package/dist/components/Editor/constants/codeLanguages.d.ts +69 -0
  112. package/dist/components/Editor/constants/index.d.ts +2 -0
  113. package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +1 -0
  114. package/dist/components/Editor/plugins/PasteStripImagePlugin.d.ts +1 -0
  115. package/dist/components/Editor/utils/codeHighlighter.d.ts +12 -0
  116. package/dist/components/Editor/utils/formatTruncatedFilename.d.ts +4 -0
  117. package/dist/components/Editor/utils/stripImagesFromHtml.d.ts +1 -0
  118. package/dist/components/Overlay/OverlayContext.d.ts +16 -0
  119. package/dist/components/Overlay/index.d.ts +2 -0
  120. package/dist/components/Tooltip/Tooltip.type.d.ts +1 -1
  121. package/dist/components/index.d.ts +2 -0
  122. package/dist/index.js +53 -51
  123. package/dist/locale/lang/en-US.json.d.ts +14 -2
  124. package/dist/locale/lang/zh-CN.json.d.ts +14 -2
  125. package/dist/locale/lang/zh-TW.json.d.ts +14 -2
  126. package/dist/style.css +1 -1
  127. package/dist/vendors/{ConfigProvider-DxrZpdIb.js → ConfigProvider-vPuwReNX.js} +70 -36
  128. package/dist/vendors/{LocaleContext-Dcw6C1LX.js → LocaleContext-CN9doEXT.js} +14 -2
  129. package/dist/vendors/{Tree-D1s-eADo.js → Tree-B09frqQX.js} +3 -2
  130. package/dist/vendors/{useLocale-BKZX2_zw.js → useLocale-sawv8CEL.js} +1 -1
  131. package/dist/vendors/{version-L-kG2La0.js → version-DdQLttdL.js} +1 -1
  132. package/package.json +7 -1
  133. package/dist/ColorPicker/ColorPicker-D3JuQ7a7.js +0 -153
  134. package/dist/DatePicker/DatePicker-Dah_CjYG.js +0 -96
  135. package/dist/DropDown/DropDown-Daxr9BYf.js +0 -171
  136. package/dist/Editor/Buttons-DG_-Sg_C.js +0 -600
  137. package/dist/Modal/Modal-LiztSF7x.js +0 -92
  138. package/dist/Select/Select-CBI5PgeQ.js +0 -746
  139. package/dist/Tabs/Tabs-B1RsYb2W.js +0 -409
  140. package/dist/Tooltip/Tooltip-DWWWYn1a.js +0 -168
  141. /package/dist/Amap/{AmapContext-D7Njjm5a.js → AmapContext-CJBe6lld.js} +0 -0
  142. /package/dist/Amap/{useMarkerInfoWindowController-BQmhR0N7.js → useMarkerInfoWindowController-Cjx0xQXw.js} +0 -0
  143. /package/dist/Calendar/{TimeAxis-D7bgZDKs.js → TimeAxis-C9e2BdYs.js} +0 -0
  144. /package/dist/Calendar/{colorUtils-lXNjGoCk.js → colorUtils-CBLTsDX0.js} +0 -0
  145. /package/dist/Calendar/{context-CBJnz0IH.js → context-4tCN5X33.js} +0 -0
  146. /package/dist/Calendar/{layout-BglMom3m.js → layout-Dz-grtu9.js} +0 -0
  147. /package/dist/Card/{Card-CtKLNh3n.js → Card-Ds5Rpq--.js} +0 -0
  148. /package/dist/CheckBox/{CheckBox-Bb0UuX1Y.js → CheckBox-ByWSy9Yr.js} +0 -0
  149. /package/dist/DatePicker/{ensureDayjsPlugins-CVL-fnAl.js → ensureDayjsPlugins-Cn9Bkjkj.js} +0 -0
  150. /package/dist/DatePicker/{pickerLocale-BeMlfhKu.js → pickerLocale-BRnNjLcv.js} +0 -0
  151. /package/dist/Gantt/{GanttHighlightContext-grda5bhd.js → GanttHighlightContext-ChThr8ia.js} +0 -0
  152. /package/dist/Gantt/{columnResize-DV1tSBx_.js → columnResize-jG0Wy2PC.js} +0 -0
  153. /package/dist/Gantt/{constants-BObDP0h6.js → constants-LIz5jwed.js} +0 -0
  154. /package/dist/Gantt/{highlightTarget-DrP0_NrM.js → highlightTarget-BpkYTonb.js} +0 -0
  155. /package/dist/NotFoundContent/{NotFoundContent-J-TEnljc.js → NotFoundContent-BLmzWNBi.js} +0 -0
  156. /package/dist/Radio/{Radio-CBUZ7DB5.js → Radio-CX9cUqb7.js} +0 -0
  157. /package/dist/Table/{constants-CcwjDbe7.js → constants-kRpjsoet.js} +0 -0
  158. /package/dist/vendors/{animations-Mlw78WYo.js → animations-rwUbyoT0.js} +0 -0
  159. /package/dist/vendors/{cssVars-B8o94Yao.js → cssVars-l4-kP_14.js} +0 -0
  160. /package/dist/vendors/{mergeRefs-Bai1cIzv.js → mergeRefs-TiJ0xjUN.js} +0 -0
  161. /package/dist/vendors/{useFloatingOverlay-BApqkHSu.js → useFloatingOverlay-B3M9k8nj.js} +0 -0
  162. /package/dist/vendors/{useFloatingPortal-C8V67X0v.js → useFloatingPortal-CmVJbuRm.js} +0 -0
  163. /package/dist/vendors/{useLatchedPopupPortalRoot-hwf14FJ5.js → useLatchedPopupPortalRoot-4fVhqVT4.js} +0 -0
@@ -1,56 +1,61 @@
1
- import "../vendors/version-L-kG2La0.js";
1
+ import "../vendors/version-DdQLttdL.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
- import "../Icon/Icon-BBDcb-yw.js";
4
- import "../vendors/LocaleContext-Dcw6C1LX.js";
5
- import "../Modal/Modal-LiztSF7x.js";
6
- import "../ColorPicker/ColorPicker-D3JuQ7a7.js";
7
- import "../vendors/useFloatingOverlay-BApqkHSu.js";
8
- import "../vendors/useLocale-BKZX2_zw.js";
9
- import "../vendors/useLatchedPopupPortalRoot-hwf14FJ5.js";
10
- import { t as e } from "../vendors/cssVars-B8o94Yao.js";
11
- import "../Select/SelectInputSearch-CrGW_eVo.js";
12
- import "../CheckBox/CheckBox-Bb0UuX1Y.js";
13
- import "../CheckBox/CheckBox-CcM19LnP.js";
14
- import "../NotFoundContent/NotFoundContent-J-TEnljc.js";
15
- import "../ScrollBar/ScrollBar-CnwYQfXM.js";
16
- import "../vendors/useFloatingPortal-C8V67X0v.js";
17
- import "../DropDown/DropDown-Daxr9BYf.js";
18
- import "../DropDown/style-BSgosymi.js";
19
- import { a as t, c as n, d as r, i, l as a, n as o, o as s, r as c, s as l, u } from "./Buttons-DG_-Sg_C.js";
20
- import { DEFAULT_BACKGROUND_COLOR as d, DEFAULT_FONT_COLOR as f, DEFAULT_FONT_SIZE as p } from "./constants/index.js";
21
- import { omit as m } from "lodash-es";
22
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
23
- import v, { useCallback as y, useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
24
- import w from "clsx";
25
- import { LexicalComposer as T } from "@lexical/react/LexicalComposer";
26
- import { RichTextPlugin as E } from "@lexical/react/LexicalRichTextPlugin";
27
- import { ContentEditable as ee } from "@lexical/react/LexicalContentEditable";
28
- import { HistoryPlugin as te } from "@lexical/react/LexicalHistoryPlugin";
29
- import { OnChangePlugin as ne } from "@lexical/react/LexicalOnChangePlugin";
30
- import { LexicalErrorBoundary as D } from "@lexical/react/LexicalErrorBoundary";
31
- import { $generateHtmlFromNodes as re, $generateNodesFromDOM as ie } from "@lexical/html";
32
- import { $applyNodeReplacement as O, $createParagraphNode as k, $getNodeByKey as A, $getRoot as ae, $getRoot as j, $getSelection as M, $insertNodes as N, $isElementNode as oe, $isRangeSelection as P, $isRootOrShadowRoot as se, $isTextNode as ce, COMMAND_PRIORITY_EDITOR as le, COMMAND_PRIORITY_LOW as ue, DecoratorNode as de, KEY_ENTER_COMMAND as fe, RootNode as pe, TextNode as F } from "lexical";
33
- import { useLexicalComposerContext as me, useLexicalComposerContext as I } from "@lexical/react/LexicalComposerContext";
34
- import { $getSelectionStyleValueForProperty as L, $patchStyleText as R, $trimTextContentFromAnchor as z } from "@lexical/selection";
35
- import { $findMatchingParent as B, $restoreEditorState as he } from "@lexical/utils";
36
- import { $isLinkNode as V, AutoLinkNode as ge, LinkNode as _e } from "@lexical/link";
37
- import { useLexicalEditable as ve } from "@lexical/react/useLexicalEditable";
38
- import { LinkPlugin as ye } from "@lexical/react/LexicalLinkPlugin";
3
+ import { t as e } from "../Icon/Icon-BBDcb-yw.js";
4
+ import "../vendors/LocaleContext-CN9doEXT.js";
5
+ import "../Overlay/OverlayContext-CVSFoyqN.js";
6
+ import "../Modal/Modal-Cb7Msq26.js";
7
+ import "../ColorPicker/ColorPicker-CYlrnMwM.js";
8
+ import "../vendors/useFloatingOverlay-B3M9k8nj.js";
9
+ import { t } from "../vendors/useLocale-sawv8CEL.js";
10
+ import "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
11
+ import { t as n } from "../vendors/cssVars-l4-kP_14.js";
12
+ import "../Select/SelectInputSearch-Bc_aPNbG.js";
13
+ import "../CheckBox/CheckBox-ByWSy9Yr.js";
14
+ import "../CheckBox/CheckBox-nBm0u6zX.js";
15
+ import "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
16
+ import "../ScrollBar/ScrollBar-N2pOLv-8.js";
17
+ import "../vendors/useFloatingPortal-CmVJbuRm.js";
18
+ import { t as r } from "../DropDown/DropDown-CLuQf970.js";
19
+ import "../DropDown/style-LLDVPpPa.js";
20
+ import { _ as i, a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as ee, u as v, v as y, y as te } from "./Buttons-ByO5rS19.js";
21
+ import { DEFAULT_BACKGROUND_COLOR as ne, DEFAULT_FONT_COLOR as re, DEFAULT_FONT_SIZE as ie } from "./constants/index.js";
22
+ import { omit as ae } from "lodash-es";
23
+ import { Fragment as oe, jsx as b, jsxs as x } from "react/jsx-runtime";
24
+ import se, { useCallback as S, useEffect as C, useMemo as w, useRef as T, useState as E } from "react";
25
+ import D from "clsx";
26
+ import { AnimatePresence as ce, motion as le, useReducedMotion as ue } from "motion/react";
27
+ import { LexicalComposer as de } from "@lexical/react/LexicalComposer";
28
+ import { RichTextPlugin as fe } from "@lexical/react/LexicalRichTextPlugin";
29
+ import { ContentEditable as pe } from "@lexical/react/LexicalContentEditable";
30
+ import { HistoryPlugin as me } from "@lexical/react/LexicalHistoryPlugin";
31
+ import { OnChangePlugin as he } from "@lexical/react/LexicalOnChangePlugin";
32
+ import { LexicalErrorBoundary as ge } from "@lexical/react/LexicalErrorBoundary";
33
+ import { $generateHtmlFromNodes as _e, $generateNodesFromDOM as ve } from "@lexical/html";
34
+ import { $applyNodeReplacement as ye, $createLineBreakNode as be, $createParagraphNode as xe, $createTabNode as Se, $createTextNode as Ce, $getNodeByKey as O, $getRoot as we, $getRoot as k, $getSelection as A, $insertNodes as j, $isElementNode as Te, $isLineBreakNode as M, $isRangeSelection as N, $isRootOrShadowRoot as Ee, $isTabNode as De, $isTextNode as Oe, $onUpdate as ke, COMMAND_PRIORITY_EDITOR as Ae, COMMAND_PRIORITY_HIGH as je, COMMAND_PRIORITY_LOW as Me, DROP_COMMAND as Ne, DecoratorNode as Pe, KEY_ENTER_COMMAND as Fe, PASTE_COMMAND as Ie, PASTE_TAG as Le, RootNode as Re, TextNode as P, mergeRegister as ze } from "lexical";
35
+ import { useLexicalComposerContext as Be, useLexicalComposerContext as F } from "@lexical/react/LexicalComposerContext";
36
+ import { $getSelectionStyleValueForProperty as I, $patchStyleText as Ve, $trimTextContentFromAnchor as L } from "@lexical/selection";
37
+ import { $findMatchingParent as R, $restoreEditorState as He, mergeRegister as Ue } from "@lexical/utils";
38
+ import { $isLinkNode as We, AutoLinkNode as Ge, LinkNode as Ke } from "@lexical/link";
39
+ import { $isListItemNode as z, $isListNode as qe, ListItemNode as Je, ListNode as Ye } from "@lexical/list";
40
+ import { $createCodeHighlightNode as Xe, $isCodeHighlightNode as B, $isCodeNode as V, $plainifyCodeContent as Ze, CodeHighlightNode as H, CodeNode as U, registerCodeIndentation as Qe } from "@lexical/code-core";
41
+ import { useLexicalEditable as $e } from "@lexical/react/useLexicalEditable";
42
+ import { LinkPlugin as et } from "@lexical/react/LexicalLinkPlugin";
43
+ import { ListPlugin as tt } from "@lexical/react/LexicalListPlugin";
39
44
  //#region src/components/Editor/utils/resolveEditorToolbarThemeVars.ts
40
- var H = (e) => {
45
+ var W = (e) => {
41
46
  if (!(e === void 0 || e === "")) return typeof e == "number" ? `${e}px` : e;
42
- }, be = (t) => {
43
- if (!t) return {};
44
- let n = {};
45
- return e(n, "--bsy-editor-toolbar-bg", t.bg), e(n, "--bsy-editor-toolbar-border-color", t.borderColor), e(n, "--bsy-editor-toolbar-padding", t.padding), e(n, "--bsy-editor-toolbar-gap", H(t.gap)), e(n, "--bsy-editor-toolbar-group-gap", H(t.groupGap)), e(n, "--bsy-editor-toolbar-divider-color", t.dividerColor), e(n, "--bsy-editor-toolbar-divider-size", H(t.dividerSize)), e(n, "--bsy-editor-toolbar-divider-margin", H(t.dividerMargin)), e(n, "--bsy-editor-toolbar-color-icon", t.colorIcon), e(n, "--bsy-editor-toolbar-item-hover-bg", t.itemHoverBg), e(n, "--bsy-editor-toolbar-item-hover-color", t.itemHoverColor), e(n, "--bsy-editor-toolbar-item-active-bg", t.itemActiveBg), e(n, "--bsy-editor-toolbar-item-active-color", t.itemActiveColor), e(n, "--bsy-editor-toolbar-item-padding", H(t.itemPadding)), e(n, "--bsy-editor-toolbar-item-border-radius", H(t.itemBorderRadius)), e(n, "--bsy-editor-toolbar-icon-size", H(t.iconSize)), n;
46
- }, xe = (e) => {
47
+ }, nt = (e) => {
48
+ if (!e) return {};
49
+ let t = {};
50
+ return n(t, "--bsy-editor-toolbar-bg", e.bg), n(t, "--bsy-editor-toolbar-border-color", e.borderColor), n(t, "--bsy-editor-toolbar-padding", e.padding), n(t, "--bsy-editor-toolbar-gap", W(e.gap)), n(t, "--bsy-editor-toolbar-group-gap", W(e.groupGap)), n(t, "--bsy-editor-toolbar-divider-color", e.dividerColor), n(t, "--bsy-editor-toolbar-divider-size", W(e.dividerSize)), n(t, "--bsy-editor-toolbar-divider-margin", W(e.dividerMargin)), n(t, "--bsy-editor-toolbar-color-icon", e.colorIcon), n(t, "--bsy-editor-toolbar-item-hover-bg", e.itemHoverBg), n(t, "--bsy-editor-toolbar-item-hover-color", e.itemHoverColor), n(t, "--bsy-editor-toolbar-item-active-bg", e.itemActiveBg), n(t, "--bsy-editor-toolbar-item-active-color", e.itemActiveColor), n(t, "--bsy-editor-toolbar-item-padding", W(e.itemPadding)), n(t, "--bsy-editor-toolbar-item-border-radius", W(e.itemBorderRadius)), n(t, "--bsy-editor-toolbar-icon-size", W(e.iconSize)), t;
51
+ }, rt = (e) => {
47
52
  if (typeof e == "number" && Number.isFinite(e)) return e;
48
53
  if (typeof e == "string") {
49
54
  let t = Number.parseFloat(e);
50
55
  if (Number.isFinite(t)) return t;
51
56
  }
52
57
  return 14;
53
- }, Se = (e) => {
58
+ }, it = (e) => {
54
59
  let t = e?.placement ?? "top", n = e?.offset, r = typeof n == "number" ? 0 : n?.x ?? 0, i = typeof n == "number" ? n : n?.y ?? 0, a = t === "top", o = {
55
60
  position: "absolute",
56
61
  [a ? "bottom" : "top"]: "100%",
@@ -60,43 +65,72 @@ var H = (e) => {
60
65
  width: "100%"
61
66
  };
62
67
  return r && (o.transform = `translateX(${r}px)`), o;
63
- }, U = {
64
- "bsy-lexical__toolbar": "_bsy-lexical__toolbar_3xekt_1",
65
- "bsy-lexical__toolbar--floating": "_bsy-lexical__toolbar--floating_3xekt_10",
66
- "bsy-lexical__toolbar-group": "_bsy-lexical__toolbar-group_3xekt_16",
67
- "bsy-lexical__toolbar-divider": "_bsy-lexical__toolbar-divider_3xekt_22"
68
+ }, G = {
69
+ "bsy-lexical__toolbar": "_bsy-lexical__toolbar_se2wg_1",
70
+ "bsy-lexical__toolbar--floating": "_bsy-lexical__toolbar--floating_se2wg_12",
71
+ "bsy-lexical__toolbar-item": "_bsy-lexical__toolbar-item_se2wg_18",
72
+ "bsy-lexical__toolbar-group": "_bsy-lexical__toolbar-group_se2wg_24",
73
+ "bsy-lexical__toolbar-divider": "_bsy-lexical__toolbar-divider_se2wg_30",
74
+ "bsy-lexical__code-language": "_bsy-lexical__code-language_se2wg_37",
75
+ "bsy-lexical__code-language-label": "_bsy-lexical__code-language-label_se2wg_54",
76
+ "bsy-lexical__code-language-arrow": "_bsy-lexical__code-language-arrow_se2wg_65"
68
77
  };
69
78
  //#endregion
70
79
  //#region src/components/Editor/hooks/useTextFormatsState.ts
71
- function Ce() {
72
- let [e] = I(), [t, n] = C({
80
+ function at() {
81
+ let [e] = F(), [t, n] = E({
73
82
  bold: !1,
74
83
  italic: !1,
75
84
  underline: !1,
76
- fontSize: p,
77
- fontColor: f,
78
- backgroundColor: d,
85
+ strikethrough: !1,
86
+ superscript: !1,
87
+ subscript: !1,
88
+ fontSize: ie,
89
+ fontColor: re,
90
+ backgroundColor: ne,
79
91
  align: "left",
92
+ listType: !1,
93
+ canOutdent: !1,
94
+ isCodeBlock: !1,
95
+ codeLanguage: i,
80
96
  link: void 0
81
97
  });
82
- return b(() => e.registerUpdateListener(({ editorState: e }) => {
98
+ return C(() => e.registerUpdateListener(({ editorState: e }) => {
83
99
  e.read(() => {
84
- let e = M();
85
- if (P(e)) {
86
- let t = L(e, "font-size", p), r = L(e, "color", f), i = L(e, "background-color", d), a = e.anchor.getNode(), o = a.getKey() === "root" ? a : B(a, (e) => {
100
+ let e = A();
101
+ if (N(e)) {
102
+ let t = I(e, "font-size", ie), r = I(e, "color", re), i = I(e, "background-color", ne), a = e.anchor.getNode(), o = a.getKey() === "root" ? a : R(a, (e) => {
87
103
  let t = e.getParent();
88
- return t !== null && se(t);
104
+ return t !== null && Ee(t);
89
105
  });
90
106
  o === null && (o = a.getTopLevelElementOrThrow());
91
- let s = {}, c = B(a, V);
92
- c ? (s.link = c.getURL(), s.linkText = c.getTextContent(), s.newBlank = c.getTarget() === "_blank") : s.linkText = e.getTextContent(), n({
107
+ let s = {}, c = R(a, We);
108
+ c ? (s.link = c.getURL(), s.linkText = c.getTextContent(), s.newBlank = c.getTarget() === "_blank") : s.linkText = e.getTextContent();
109
+ let l = R(a, z), u = !1, d = Te(o) ? o.getIndent() : 0;
110
+ if (z(l)) {
111
+ d = l.getIndent();
112
+ let e = l.getParent();
113
+ if (qe(e)) {
114
+ let t = e.getListType();
115
+ u = t === "number" || t === "bullet" ? t : !1;
116
+ }
117
+ }
118
+ let f = R(a, V);
119
+ n({
93
120
  bold: e.hasFormat("bold"),
94
121
  italic: e.hasFormat("italic"),
95
122
  underline: e.hasFormat("underline"),
123
+ strikethrough: e.hasFormat("strikethrough"),
124
+ superscript: e.hasFormat("superscript"),
125
+ subscript: e.hasFormat("subscript"),
96
126
  fontSize: t,
97
127
  fontColor: r,
98
128
  backgroundColor: i,
99
- align: oe(o) ? o.getFormatType() : "left",
129
+ align: Te(o) ? o.getFormatType() : "left",
130
+ listType: u,
131
+ canOutdent: d > 0 || u !== !1,
132
+ isCodeBlock: !!f,
133
+ codeLanguage: y(f?.getLanguage()),
100
134
  link: s
101
135
  });
102
136
  }
@@ -105,14 +139,129 @@ function Ce() {
105
139
  }
106
140
  //#endregion
107
141
  //#region src/components/Editor/ToolbarPlugin/context/TextFormatProvider.tsx
108
- var we = (e) => {
109
- let t = Ce();
110
- return /* @__PURE__ */ g(r.Provider, {
142
+ var ot = (e) => {
143
+ let t = at();
144
+ return /* @__PURE__ */ b(te.Provider, {
111
145
  value: t,
112
146
  children: e.children
113
147
  });
114
- }, Te = (e) => {
115
- let { config: t = [], style: r, theme: i, mode: a, floating: s } = e, { toolbarRef: c } = n(), l = a === "floating", d = x(() => be(i), [i]), f = x(() => ({ iconSize: xe(i?.iconSize) }), [i?.iconSize]), p = l ? Se(s) : void 0, h = l ? m(r, [
148
+ }, st = u.map((e) => ({
149
+ key: e.id,
150
+ label: e.label
151
+ })), ct = () => {
152
+ let [n] = F(), { codeLanguage: i } = f(), { t: a } = t(), { getPopupContainer: s } = o(), { iconSize: u } = c(), d = S((e) => {
153
+ let t = e.key;
154
+ n.update(() => {
155
+ let e = A();
156
+ N(e) && R(e.anchor.getNode(), V)?.setLanguage(t);
157
+ });
158
+ }, [n]), p = l[i].label;
159
+ return /* @__PURE__ */ b(r, {
160
+ menus: st,
161
+ onClick: d,
162
+ activeKey: [i],
163
+ showSearch: !1,
164
+ getPopupContainer: s,
165
+ style: {
166
+ width: 120,
167
+ minWidth: 120
168
+ },
169
+ children: /* @__PURE__ */ b("div", {
170
+ className: G["bsy-lexical__code-language"],
171
+ children: /* @__PURE__ */ b(v, {
172
+ icon: /* @__PURE__ */ x(oe, { children: [/* @__PURE__ */ b("span", {
173
+ className: G["bsy-lexical__code-language-label"],
174
+ children: p
175
+ }), /* @__PURE__ */ b(e, {
176
+ name: "arrow-down",
177
+ size: u,
178
+ className: G["bsy-lexical__code-language-arrow"]
179
+ })] }),
180
+ tooltip: a("editor.codeLanguage")
181
+ })
182
+ })
183
+ });
184
+ }, lt = {
185
+ initial: {
186
+ opacity: 0,
187
+ x: 6
188
+ },
189
+ animate: {
190
+ opacity: 1,
191
+ x: 0
192
+ },
193
+ exit: {
194
+ opacity: 0,
195
+ x: -6
196
+ }
197
+ }, ut = (e) => typeof e == "string" ? e : e.name, dt = (e, t) => {
198
+ if (t) return [
199
+ {
200
+ kind: "button",
201
+ key: "undo",
202
+ name: "undo"
203
+ },
204
+ {
205
+ kind: "button",
206
+ key: "redo",
207
+ name: "redo"
208
+ },
209
+ {
210
+ kind: "divider",
211
+ key: "divider-code"
212
+ },
213
+ {
214
+ kind: "button",
215
+ key: "code-block-toggle",
216
+ name: "code"
217
+ },
218
+ {
219
+ kind: "language",
220
+ key: "code-language"
221
+ }
222
+ ];
223
+ let n = [];
224
+ return e.forEach((t, r) => {
225
+ t.buttons.forEach((e) => {
226
+ let t = ut(e);
227
+ n.push({
228
+ kind: "button",
229
+ key: t,
230
+ name: t,
231
+ props: typeof e == "string" ? void 0 : e.props
232
+ });
233
+ }), r < e.length - 1 && n.push({
234
+ kind: "divider",
235
+ key: `divider-${t.key}`
236
+ });
237
+ }), n;
238
+ }, ft = (e, t) => {
239
+ let n = m(e);
240
+ return n ? /* @__PURE__ */ b(n, { ...t }) : (console.warn(`[ToolbarPlugin] Button "${e}" is not registered.`), null);
241
+ }, pt = ({ config: e }) => {
242
+ let { isCodeBlock: t } = f(), n = ue(), r = dt(e, t), i = {
243
+ duration: n ? 0 : .16,
244
+ ease: "easeOut"
245
+ }, a = n ? {} : lt;
246
+ return /* @__PURE__ */ b(ce, {
247
+ initial: !1,
248
+ mode: "popLayout",
249
+ children: r.map((e) => {
250
+ let t = null;
251
+ return t = e.kind === "divider" ? /* @__PURE__ */ b("div", { className: G["bsy-lexical__toolbar-divider"] }) : e.kind === "language" ? /* @__PURE__ */ b(ct, {}) : ft(e.name, e.props), t === null ? null : /* @__PURE__ */ b(le.div, {
252
+ className: G["bsy-lexical__toolbar-item"],
253
+ layout: "position",
254
+ transition: i,
255
+ ...a,
256
+ children: t
257
+ }, e.key);
258
+ })
259
+ });
260
+ }, mt = (e) => {
261
+ let { config: t = [], style: n, theme: r, mode: i, floating: a } = e, { toolbarRef: c } = o(), l = i === "floating", u = ue(), d = {
262
+ duration: u ? 0 : .16,
263
+ ease: "easeOut"
264
+ }, f = w(() => nt(r), [r]), p = w(() => ({ iconSize: rt(r?.iconSize) }), [r?.iconSize]), m = l ? it(a) : void 0, h = l ? ae(n, [
116
265
  "position",
117
266
  "left",
118
267
  "top",
@@ -122,35 +271,30 @@ var we = (e) => {
122
271
  "transform",
123
272
  "marginTop",
124
273
  "marginBottom"
125
- ]) : r, v = (e, t) => {
126
- let n = typeof e == "string" ? e : e.name, r = o(n);
127
- return r ? typeof e == "string" ? /* @__PURE__ */ g(r, {}, `${n}-${t}`) : /* @__PURE__ */ g(r, { ...e.props }, `${n}-${t}`) : (console.warn(`[ToolbarPlugin] Button "${n}" is not registered.`), null);
128
- };
129
- return /* @__PURE__ */ g(u, {
130
- value: f,
131
- children: /* @__PURE__ */ g(we, { children: /* @__PURE__ */ g("div", {
274
+ ]) : n;
275
+ return /* @__PURE__ */ b(s, {
276
+ value: p,
277
+ children: /* @__PURE__ */ b(g, { children: /* @__PURE__ */ b(ot, { children: /* @__PURE__ */ b(le.div, {
132
278
  ref: c,
133
- className: w(U["bsy-lexical__toolbar"], l && U["bsy-lexical__toolbar--floating"]),
279
+ layout: !u,
280
+ transition: d,
281
+ className: D(G["bsy-lexical__toolbar"], l && G["bsy-lexical__toolbar--floating"]),
134
282
  style: {
135
- ...d,
136
- ...p,
283
+ ...f,
284
+ ...m,
137
285
  ...h
138
286
  },
139
- children: t.map((e, n) => /* @__PURE__ */ _("div", {
140
- className: U["bsy-lexical__toolbar-group"],
141
- "data-group": e.key,
142
- children: [e.buttons.map((e, t) => v(e, t)), n < t.length - 1 && /* @__PURE__ */ g("div", { className: U["bsy-lexical__toolbar-divider"] })]
143
- }, e.key + n))
144
- }) })
287
+ children: /* @__PURE__ */ b(pt, { config: t })
288
+ }) }) })
145
289
  });
146
- }, W = {
290
+ }, K = {
147
291
  "bsy-lexical-editor": "_bsy-lexical-editor_1bhfo_1",
148
292
  "bsy-lexical-editor--floating": "_bsy-lexical-editor--floating_1bhfo_7",
149
293
  "bsy-lexical-editor__content-editable": "_bsy-lexical-editor__content-editable_1bhfo_10",
150
294
  "bsy-lexical-editor__content-editable--with-length-badge": "_bsy-lexical-editor__content-editable--with-length-badge_1bhfo_17",
151
295
  "bsy-lexical-editor__length-badge": "_bsy-lexical-editor__length-badge_1bhfo_20",
152
296
  "bsy-lexical-editor__length-badge--exceeded": "_bsy-lexical-editor__length-badge--exceeded_1bhfo_36"
153
- }, G = class e extends F {
297
+ }, q = class e extends P {
154
298
  constructor(e, t) {
155
299
  super(e, t);
156
300
  }
@@ -161,46 +305,46 @@ var we = (e) => {
161
305
  return new e(t.__text, t.__key);
162
306
  }
163
307
  static importDOM() {
164
- let e = F.importDOM();
308
+ let e = P.importDOM();
165
309
  return {
166
310
  ...e,
167
311
  code: () => ({
168
- conversion: K(e?.code),
312
+ conversion: J(e?.code),
169
313
  priority: 1
170
314
  }),
171
315
  em: () => ({
172
- conversion: K(e?.em),
316
+ conversion: J(e?.em),
173
317
  priority: 1
174
318
  }),
175
319
  span: () => ({
176
- conversion: K(e?.span),
320
+ conversion: J(e?.span),
177
321
  priority: 1
178
322
  }),
179
323
  strong: () => ({
180
- conversion: K(e?.strong),
324
+ conversion: J(e?.strong),
181
325
  priority: 1
182
326
  }),
183
327
  sub: () => ({
184
- conversion: K(e?.sub),
328
+ conversion: J(e?.sub),
185
329
  priority: 1
186
330
  }),
187
331
  sup: () => ({
188
- conversion: K(e?.sup),
332
+ conversion: J(e?.sup),
189
333
  priority: 1
190
334
  })
191
335
  };
192
336
  }
193
337
  static importJSON(e) {
194
- return Ee().updateFromJSON(e);
338
+ return ht().updateFromJSON(e);
195
339
  }
196
340
  isSimpleText() {
197
341
  return this.__type === "extended-text" && this.__mode === 0;
198
342
  }
199
343
  };
200
- function Ee(e = "") {
201
- return O(new G(e));
344
+ function ht(e = "") {
345
+ return ye(new q(e));
202
346
  }
203
- function K(e) {
347
+ function J(e) {
204
348
  return (t) => {
205
349
  let n = e?.(t);
206
350
  if (!n) return null;
@@ -211,7 +355,7 @@ function K(e) {
211
355
  ...r,
212
356
  forChild: (e, t) => {
213
357
  let n = (r?.forChild ?? ((e) => e))(e, t);
214
- if (ce(n)) {
358
+ if (Oe(n)) {
215
359
  let e = [
216
360
  i ? `background-color: ${i}` : null,
217
361
  a ? `color: ${a}` : null,
@@ -229,21 +373,21 @@ function K(e) {
229
373
  }
230
374
  //#endregion
231
375
  //#region src/components/Editor/plugins/LinkColorPlugin.tsx
232
- function De(e) {
376
+ function gt(e) {
233
377
  return e.split(";").map((e) => e.trim()).filter((e) => e && e.split(":")[0].trim().toLowerCase() !== "color").join("; ");
234
378
  }
235
- function Oe(e) {
236
- if (!B(e, V)) return;
379
+ function _t(e) {
380
+ if (!R(e, We)) return;
237
381
  let t = e.getStyle();
238
382
  if (!t) return;
239
- let n = De(t);
383
+ let n = gt(t);
240
384
  n !== t && e.setStyle(n);
241
385
  }
242
- function ke() {
243
- let [e] = I();
244
- return b(() => e.registerNodeTransform(G, Oe), [e]), null;
386
+ function vt() {
387
+ let [e] = F();
388
+ return C(() => e.registerNodeTransform(q, _t), [e]), null;
245
389
  }
246
- var q = {
390
+ var Y = {
247
391
  imageWrapper: "_imageWrapper_y06h3_1",
248
392
  selected: "_selected_y06h3_8",
249
393
  resizing: "_resizing_y06h3_12",
@@ -253,16 +397,16 @@ var q = {
253
397
  topRight: "_topRight_y06h3_49",
254
398
  bottomLeft: "_bottomLeft_y06h3_54",
255
399
  bottomRight: "_bottomRight_y06h3_59"
256
- }, Ae = ({ src: e, altText: t, width: n, height: r, nodeKey: i }) => {
257
- let [a] = I(), [o, s] = C(!1), [c, l] = C(null), u = S(null), [d, f] = C({
400
+ }, yt = ({ src: e, altText: t, width: n, height: r, nodeKey: i }) => {
401
+ let [a] = F(), [o, s] = E(!1), [c, l] = E(null), u = T(null), [d, f] = E({
258
402
  width: n || void 0,
259
403
  height: r || void 0
260
- }), p = y(() => {
404
+ }), p = S(() => {
261
405
  n && r && f({
262
406
  width: n,
263
407
  height: r
264
408
  });
265
- }, [n, r]), m = y((e, t) => {
409
+ }, [n, r]), m = S((e, t) => {
266
410
  if (e.preventDefault(), e.stopPropagation(), !u.current) return;
267
411
  let n = d.width || u.current.offsetWidth, r = d.height || u.current.offsetHeight, i = n / r;
268
412
  (!d.width || !d.height) && f({
@@ -277,7 +421,7 @@ var q = {
277
421
  aspectRatio: i,
278
422
  direction: t
279
423
  });
280
- }, [d]), x = y((e) => {
424
+ }, [d]), h = S((e) => {
281
425
  if (!c?.isResizing) return;
282
426
  let t = e.clientX - c.startX, n;
283
427
  switch (c.direction) {
@@ -300,10 +444,10 @@ var q = {
300
444
  width: n,
301
445
  height: r
302
446
  });
303
- }, [c]), T = y(() => {
447
+ }, [c]), g = S(() => {
304
448
  c?.isResizing && (a.update(() => {
305
- let e = A(i);
306
- je(e) && e.setWidthAndHeight(d.width, d.height);
449
+ let e = O(i);
450
+ bt(e) && e.setWidthAndHeight(d.width, d.height);
307
451
  }), l(null));
308
452
  }, [
309
453
  a,
@@ -311,71 +455,71 @@ var q = {
311
455
  d,
312
456
  c
313
457
  ]);
314
- v.useEffect(() => {
315
- if (c?.isResizing) return document.addEventListener("mousemove", x), document.addEventListener("mouseup", T), () => {
316
- document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", T);
458
+ se.useEffect(() => {
459
+ if (c?.isResizing) return document.addEventListener("mousemove", h), document.addEventListener("mouseup", g), () => {
460
+ document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", g);
317
461
  };
318
462
  }, [
319
463
  c,
320
- x,
321
- T
464
+ h,
465
+ g
322
466
  ]);
323
- let E = y(() => {
467
+ let _ = S(() => {
324
468
  s(!0);
325
469
  }, []);
326
- return b(() => a.registerUpdateListener(({ editorState: e }) => {
470
+ return C(() => a.registerUpdateListener(({ editorState: e }) => {
327
471
  e.read(() => {
328
- let e = M();
329
- P(e) && !e.getNodes().some((e) => e.getKey() === i || e.getParent() && e.getParent()?.getKey() === i) && o && s(!1);
472
+ let e = A();
473
+ N(e) && !e.getNodes().some((e) => e.getKey() === i || e.getParent() && e.getParent()?.getKey() === i) && o && s(!1);
330
474
  });
331
475
  }), [
332
476
  a,
333
477
  i,
334
478
  o
335
- ]), b(() => {
479
+ ]), C(() => {
336
480
  let e = (e) => {
337
481
  o && u.current && !u.current.contains(e.target) && s(!1);
338
482
  };
339
483
  if (o) return document.addEventListener("mousedown", e), () => {
340
484
  document.removeEventListener("mousedown", e);
341
485
  };
342
- }, [o]), /* @__PURE__ */ _("div", {
343
- className: w(q.imageWrapper, {
344
- [q.selected]: o,
345
- [q.resizing]: c?.isResizing
486
+ }, [o]), /* @__PURE__ */ x("div", {
487
+ className: D(Y.imageWrapper, {
488
+ [Y.selected]: o,
489
+ [Y.resizing]: c?.isResizing
346
490
  }),
347
- children: [/* @__PURE__ */ g("img", {
491
+ children: [/* @__PURE__ */ b("img", {
348
492
  ref: u,
349
493
  src: e,
350
494
  alt: t,
351
- className: q.image,
495
+ className: Y.image,
352
496
  style: {
353
497
  width: d.width,
354
498
  height: d.height
355
499
  },
356
500
  onLoad: p,
357
- onClick: E,
501
+ onClick: _,
358
502
  draggable: !1
359
- }), o && /* @__PURE__ */ _(h, { children: [
360
- /* @__PURE__ */ g("div", {
361
- className: w(q.resizeHandle, q.bottomRight),
503
+ }), o && /* @__PURE__ */ x(oe, { children: [
504
+ /* @__PURE__ */ b("div", {
505
+ className: D(Y.resizeHandle, Y.bottomRight),
362
506
  onMouseDown: (e) => m(e, "bottom-right")
363
507
  }),
364
- /* @__PURE__ */ g("div", {
365
- className: w(q.resizeHandle, q.bottomLeft),
508
+ /* @__PURE__ */ b("div", {
509
+ className: D(Y.resizeHandle, Y.bottomLeft),
366
510
  onMouseDown: (e) => m(e, "bottom-left")
367
511
  }),
368
- /* @__PURE__ */ g("div", {
369
- className: w(q.resizeHandle, q.topRight),
512
+ /* @__PURE__ */ b("div", {
513
+ className: D(Y.resizeHandle, Y.topRight),
370
514
  onMouseDown: (e) => m(e, "top-right")
371
515
  }),
372
- /* @__PURE__ */ g("div", {
373
- className: w(q.resizeHandle, q.topLeft),
516
+ /* @__PURE__ */ b("div", {
517
+ className: D(Y.resizeHandle, Y.topLeft),
374
518
  onMouseDown: (e) => m(e, "top-left")
375
519
  })
376
520
  ] })]
377
521
  });
378
- }, J = class e extends de {
522
+ }, X = class e extends Pe {
379
523
  static getType() {
380
524
  return "image";
381
525
  }
@@ -421,7 +565,7 @@ var q = {
421
565
  n.__width = e, n.__height = t;
422
566
  }
423
567
  decorate() {
424
- return /* @__PURE__ */ g(Ae, {
568
+ return /* @__PURE__ */ b(yt, {
425
569
  src: this.__src,
426
570
  altText: this.__altText,
427
571
  width: this.__width,
@@ -431,13 +575,13 @@ var q = {
431
575
  }
432
576
  static importDOM() {
433
577
  return { img: () => ({
434
- conversion: Me,
578
+ conversion: xt,
435
579
  priority: 0
436
580
  }) };
437
581
  }
438
582
  static importJSON(e) {
439
583
  let { src: t, altText: n, width: r, height: i } = e;
440
- return Y({
584
+ return Z({
441
585
  src: t,
442
586
  altText: n,
443
587
  width: r,
@@ -458,13 +602,13 @@ var q = {
458
602
  return !0;
459
603
  }
460
604
  };
461
- function Y({ src: e, altText: t, width: n, height: r, key: i }) {
462
- return new J(e, t, n, r, i);
605
+ function Z({ src: e, altText: t, width: n, height: r, key: i }) {
606
+ return new X(e, t, n, r, i);
463
607
  }
464
- function je(e) {
465
- return e instanceof J;
608
+ function bt(e) {
609
+ return e instanceof X;
466
610
  }
467
- function Me(e) {
611
+ function xt(e) {
468
612
  if (e instanceof HTMLImageElement) {
469
613
  let { src: t, alt: n, style: r } = e, i, a;
470
614
  if (r.width) {
@@ -475,7 +619,7 @@ function Me(e) {
475
619
  let e = parseInt(r.height, 10);
476
620
  isNaN(e) || (a = e);
477
621
  }
478
- return i === void 0 && e.width && (i = e.width), a === void 0 && e.height && (a = e.height), { node: Y({
622
+ return i === void 0 && e.width && (i = e.width), a === void 0 && e.height && (a = e.height), { node: Z({
479
623
  src: t,
480
624
  altText: n,
481
625
  width: i,
@@ -486,23 +630,62 @@ function Me(e) {
486
630
  }
487
631
  //#endregion
488
632
  //#region src/components/Editor/plugins/ImagePlugin.tsx
489
- function Ne() {
490
- let [e] = I();
491
- return b(() => e.registerCommand(s, (e) => (N([Y(e)]), !0), le), [e]), null;
633
+ function St() {
634
+ let [e] = F();
635
+ return C(() => e.registerCommand(h, (e) => (j([Z(e)]), !0), Ae), [e]), null;
636
+ }
637
+ //#endregion
638
+ //#region src/components/Editor/utils/stripImagesFromHtml.ts
639
+ function Ct(e) {
640
+ let t = new DOMParser().parseFromString(e, "text/html");
641
+ return t.querySelectorAll("img, picture").forEach((e) => e.remove()), t.body.innerHTML;
642
+ }
643
+ //#endregion
644
+ //#region src/components/Editor/plugins/PasteStripImagePlugin.tsx
645
+ var wt = /<img\b|<picture\b/i;
646
+ function Tt() {
647
+ let [e] = F();
648
+ return C(() => {
649
+ let t = (t) => {
650
+ let n = "clipboardData" in t ? t.clipboardData : "dataTransfer" in t ? t.dataTransfer : null;
651
+ if (!n || n.getData("application/x-lexical-editor") || n.getData("application/x-lexical-drag")) return !1;
652
+ let r = n.getData("text/html");
653
+ if (!(Array.from(n.files).some((e) => e.type.startsWith("image/")) || Array.from(n.items).some((e) => e.type.startsWith("image/")) || wt.test(r))) return !1;
654
+ t.preventDefault();
655
+ let i = n.getData("text/plain");
656
+ return !wt.test(r) && !i || e.update(() => {
657
+ let t = A();
658
+ if (t === null) return;
659
+ let n = r ? Ct(r) : "", a = document.createElement("div");
660
+ if (a.innerHTML = n, n && a.textContent?.trim()) {
661
+ let t = ve(e, new DOMParser().parseFromString(n, "text/html"));
662
+ if (t.length) {
663
+ j(t);
664
+ return;
665
+ }
666
+ }
667
+ i && t.insertRawText(i);
668
+ }, { tag: Le }), !0;
669
+ };
670
+ return Ue(e.registerCommand(Ie, (e) => t(e), je), e.registerCommand(Ne, (e) => t(e), je));
671
+ }, [e]), null;
492
672
  }
493
673
  //#endregion
494
674
  //#region src/components/Editor/plugins/EnterKeyPlugin.tsx
495
- function X() {
496
- let [e] = I(), t = S(0);
497
- return b(() => e.registerCommand(fe, (n) => {
675
+ function Et() {
676
+ let [e] = F(), t = T(0);
677
+ return C(() => e.registerCommand(Fe, (n) => {
498
678
  let r = Date.now(), i = r - t.current;
499
- return t.current = r, i < 250 && i > 0 ? (e.update(() => {
500
- let e = M();
501
- if (P(e)) {
679
+ return t.current = r, i < 250 && i > 0 ? e.getEditorState().read(() => {
680
+ let e = A();
681
+ return N(e) ? !!R(e.anchor.getNode(), (e) => z(e) || V(e)) : !1;
682
+ }, { editor: e }) ? !1 : (e.update(() => {
683
+ let e = A();
684
+ if (N(e)) {
502
685
  let t = e.anchor.getNode().getTopLevelElement();
503
686
  if (t && t.getTextContent().trim() === "") {
504
- let n = k();
505
- R(e, {
687
+ let n = xe();
688
+ Ve(e, {
506
689
  "background-color": "",
507
690
  color: "",
508
691
  "font-size": "",
@@ -515,38 +698,195 @@ function X() {
515
698
  }
516
699
  }
517
700
  }), n?.preventDefault(), !0) : !1;
518
- }, ue), [e]), null;
701
+ }, Me), [e]), null;
702
+ }
703
+ //#endregion
704
+ //#region src/components/Editor/utils/codeHighlighter.ts
705
+ var Dt = {
706
+ css: () => import("@shikijs/langs/css"),
707
+ html: () => import("@shikijs/langs/html"),
708
+ xml: () => import("@shikijs/langs/xml"),
709
+ javascript: () => import("@shikijs/langs/javascript"),
710
+ typescript: () => import("@shikijs/langs/typescript"),
711
+ jsx: () => import("@shikijs/langs/jsx"),
712
+ go: () => import("@shikijs/langs/go"),
713
+ php: () => import("@shikijs/langs/php"),
714
+ c: () => import("@shikijs/langs/c"),
715
+ python: () => import("@shikijs/langs/python"),
716
+ java: () => import("@shikijs/langs/java"),
717
+ cpp: () => import("@shikijs/langs/cpp"),
718
+ csharp: () => import("@shikijs/langs/csharp"),
719
+ vb: () => import("@shikijs/langs/vb"),
720
+ sql: () => import("@shikijs/langs/sql"),
721
+ ruby: () => import("@shikijs/langs/ruby"),
722
+ swift: () => import("@shikijs/langs/swift"),
723
+ bash: () => import("@shikijs/langs/shellscript"),
724
+ lua: () => import("@shikijs/langs/lua"),
725
+ markdown: () => import("@shikijs/langs/markdown")
726
+ }, Q = (e) => e === "bash" ? "shellscript" : e, Ot = (e) => e in Dt, $ = null, kt = null, At = /* @__PURE__ */ new Map(), jt = () => ($ ||= Promise.all([import("@shikijs/core"), import("@shikijs/engine-javascript")]).then(([{ createHighlighterCoreSync: e }, { createJavaScriptRegexEngine: t }]) => e({
727
+ engine: t(),
728
+ langs: [],
729
+ themes: []
730
+ })).catch((e) => {
731
+ throw $ = null, e;
732
+ }), $), Mt = (e, t) => Ot(t) && e.getLoadedLanguages().includes(Q(t)), Nt = (e) => {
733
+ let t = At.get(e);
734
+ return t || (t = jt().then(async (t) => {
735
+ let n = Q(e);
736
+ if (!t.getLoadedLanguages().includes(n)) {
737
+ let n = await Dt[e]();
738
+ await t.loadLanguage(n.default);
739
+ }
740
+ return t;
741
+ }).catch((t) => {
742
+ throw At.delete(e), t;
743
+ }), At.set(e, t)), t;
744
+ }, Pt = () => (kt ||= jt().then(async (e) => {
745
+ if (!e.getLoadedThemes().includes("github-light")) {
746
+ let t = await import("@shikijs/themes/github-light");
747
+ await e.loadTheme(t.default);
748
+ }
749
+ return e;
750
+ }).catch((e) => {
751
+ throw kt = null, e;
752
+ }), kt), Ft = (e, t, n) => {
753
+ let r = e.getTextContent();
754
+ if (e.getStyle() && e.setStyle(""), !n || !Mt(n, t)) return Ze(r);
755
+ let i = Q(t), a = n.codeToTokens(r, {
756
+ lang: i,
757
+ theme: p
758
+ }), o = [];
759
+ return a.tokens.forEach((e, t) => {
760
+ t && o.push(be()), e.forEach((e) => {
761
+ e.content.split(" ").forEach((t, n) => {
762
+ if (n && o.push(Se()), t === "") return;
763
+ let r = Xe(t), i = typeof e.htmlStyle == "string" ? e.htmlStyle : e.htmlStyle ? Object.entries(e.htmlStyle).map(([e, t]) => `${e}:${t}`).join(";") : e.color ? `color: ${e.color}` : "";
764
+ i && r.setStyle(i), o.push(r);
765
+ });
766
+ });
767
+ }), o;
768
+ }, It = (e, t) => {
769
+ let n = O(e);
770
+ if (!V(n) || !n.isAttached()) return;
771
+ let r = A();
772
+ if (!N(r)) {
773
+ t();
774
+ return;
775
+ }
776
+ let { anchor: i } = r, a = i.offset, o = i.type === "element" && M(n.getChildAtIndex(i.offset - 1)), s = 0;
777
+ if (o || (s = a + i.getNode().getPreviousSiblings().reduce((e, t) => e + t.getTextContentSize(), 0)), t()) {
778
+ if (o) {
779
+ i.getNode().select(a, a);
780
+ return;
781
+ }
782
+ n.getChildren().some((e) => {
783
+ let t = Oe(e);
784
+ if (t || M(e)) {
785
+ let n = e.getTextContentSize();
786
+ if (t && n >= s) return e.select(s, s), !0;
787
+ s -= n;
788
+ }
789
+ return !1;
790
+ });
791
+ }
792
+ }, Lt = (e, t) => B(e) && B(t) && e.__text === t.__text && e.__highlightType === t.__highlightType && e.__style === t.__style || De(e) && De(t) || M(e) && M(t), Rt = (e, t) => {
793
+ let n = 0;
794
+ for (; n < e.length && Lt(e[n], t[n]);) n++;
795
+ let r = e.length, i = t.length, a = Math.min(r, i) - n, o = 0;
796
+ for (; o < a;) if (o++, !Lt(e[r - o], t[i - o])) {
797
+ o--;
798
+ break;
799
+ }
800
+ return {
801
+ from: n,
802
+ to: r - o,
803
+ nodesForReplacement: t.slice(n, i - o)
804
+ };
805
+ }, zt = (e, t, n, r, i) => {
806
+ let a = i.getKey(), o = y(i.getLanguage());
807
+ if (i.getLanguage() !== o && i.setLanguage(o), o === "plaintext") i.getIsSyntaxHighlightSupported() && i.setIsSyntaxHighlightSupported(!1);
808
+ else {
809
+ i.getTheme() !== "github-light" && i.setTheme(p);
810
+ let s = t ? t.getLoadedThemes().includes("github-light") ? Ot(o) && !Mt(t, o) ? Nt(o) : null : Pt() : jt();
811
+ if (s) {
812
+ i.getIsSyntaxHighlightSupported() && i.setIsSyntaxHighlightSupported(!1), n.pendingKeys.add(a), n.loading !== s && (n.loading = s, s.then((t) => {
813
+ r(t);
814
+ let i = [...n.pendingKeys];
815
+ n.pendingKeys.clear(), n.loading = null, e.update(() => {
816
+ i.forEach((e) => {
817
+ O(e)?.markDirty();
818
+ });
819
+ });
820
+ }, () => {
821
+ n.pendingKeys.clear(), n.loading = null;
822
+ }));
823
+ return;
824
+ }
825
+ i.getIsSyntaxHighlightSupported() || i.setIsSyntaxHighlightSupported(!0);
826
+ }
827
+ n.nodesCurrentlyHighlighting.has(a) || (n.nodesCurrentlyHighlighting.add(a), n.didTransform || (n.didTransform = !0, ke(() => {
828
+ n.didTransform = !1, n.nodesCurrentlyHighlighting.clear();
829
+ })), It(a, () => {
830
+ let e = O(a);
831
+ if (!V(e) || !e.isAttached()) return !1;
832
+ let n = Ft(e, y(e.getLanguage()), t), { from: r, to: i, nodesForReplacement: o } = Rt(e.getChildren(), n);
833
+ return r !== i || o.length ? (e.splice(r, i - r, o), !0) : !1;
834
+ }));
835
+ }, Bt = (e, t, n, r, i) => {
836
+ let a = i.getParent();
837
+ V(a) ? zt(e, t, n, r, a) : B(i) && i.replace(Ce(i.__text));
838
+ };
839
+ function Vt() {
840
+ let [e] = F();
841
+ return C(() => {
842
+ if (!e.hasNodes([U, H])) throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");
843
+ let t = null, n = {
844
+ didTransform: !1,
845
+ nodesCurrentlyHighlighting: /* @__PURE__ */ new Set(),
846
+ pendingKeys: /* @__PURE__ */ new Set(),
847
+ loading: null
848
+ }, r = (e) => {
849
+ t = e;
850
+ };
851
+ return ze(Qe(e), e.registerNodeTransform(U, (i) => {
852
+ zt(e, t, n, r, i);
853
+ }), e.registerNodeTransform(P, (i) => {
854
+ Bt(e, t, n, r, i);
855
+ }), e.registerNodeTransform(H, (i) => {
856
+ Bt(e, t, n, r, i);
857
+ }));
858
+ }, [e]), null;
519
859
  }
520
860
  //#endregion
521
861
  //#region src/components/Editor/plugins/MaxLengthPlugin.tsx
522
- function Pe({ maxLength: e, onMaxLengthExceed: t }) {
523
- let [n] = I(), r = S(t);
524
- return r.current = t, b(() => {
862
+ function Ht({ maxLength: e, onMaxLengthExceed: t }) {
863
+ let [n] = F(), r = T(t);
864
+ return r.current = t, C(() => {
525
865
  let t = null;
526
- return n.registerNodeTransform(pe, (i) => {
866
+ return n.registerNodeTransform(Re, (i) => {
527
867
  let a = i.getTextContentSize();
528
868
  if (a <= e) return;
529
- let o = n.getEditorState(), s = o.read(() => i.getTextContentSize()), c = a - e, l = M();
869
+ let o = n.getEditorState(), s = o.read(() => i.getTextContentSize()), c = a - e, l = A();
530
870
  if (s === e && t !== o) {
531
- t = o, he(n, o), r.current?.();
871
+ t = o, He(n, o), r.current?.();
532
872
  return;
533
873
  }
534
- if (P(l) && l.isCollapsed()) {
535
- z(n, l.anchor, c), r.current?.();
874
+ if (N(l) && l.isCollapsed()) {
875
+ L(n, l.anchor, c), r.current?.();
536
876
  return;
537
877
  }
538
878
  i.selectEnd();
539
- let u = M();
540
- P(u) && (z(n, u.anchor, c), r.current?.());
879
+ let u = A();
880
+ N(u) && (L(n, u.anchor, c), r.current?.());
541
881
  });
542
882
  }, [n, e]), null;
543
883
  }
544
884
  //#endregion
545
885
  //#region src/components/Editor/LengthBadge.tsx
546
- var Z = ({ current: e, maxLength: t }) => {
886
+ var Ut = ({ current: e, maxLength: t }) => {
547
887
  let n = e > t;
548
- return /* @__PURE__ */ _("div", {
549
- className: w(W["bsy-lexical-editor__length-badge"], n && W["bsy-lexical-editor__length-badge--exceeded"]),
888
+ return /* @__PURE__ */ x("div", {
889
+ className: D(K["bsy-lexical-editor__length-badge"], n && K["bsy-lexical-editor__length-badge--exceeded"]),
550
890
  "aria-live": "polite",
551
891
  children: [
552
892
  e,
@@ -555,22 +895,22 @@ var Z = ({ current: e, maxLength: t }) => {
555
895
  ]
556
896
  });
557
897
  };
558
- Z.displayName = "BsyLexicalEditorLengthBadge";
898
+ Ut.displayName = "BsyLexicalEditorLengthBadge";
559
899
  //#endregion
560
900
  //#region src/components/Editor/utils/textLength.ts
561
- function Fe(e) {
901
+ function Wt(e) {
562
902
  return typeof e == "number" && Number.isFinite(e) && e > 0;
563
903
  }
564
- function Ie(e, t) {
565
- let n = j(), r = n.getTextContentSize();
904
+ function Gt(e, t) {
905
+ let n = k(), r = n.getTextContentSize();
566
906
  if (r <= t) return !1;
567
907
  let i = r - t;
568
908
  n.selectEnd();
569
- let a = M();
570
- return P(a) ? z(e, a.anchor, i) : Le(i), !0;
909
+ let a = A();
910
+ return N(a) ? L(e, a.anchor, i) : Kt(i), !0;
571
911
  }
572
- function Le(e) {
573
- let t = e, n = j().getAllTextNodes();
912
+ function Kt(e) {
913
+ let t = e, n = k().getAllTextNodes();
574
914
  for (let e = n.length - 1; e >= 0 && t > 0; e--) {
575
915
  let r = n[e], i = r.getTextContent();
576
916
  i.length !== 0 && (i.length <= t ? (t -= i.length, r.remove()) : (r.setTextContent(i.slice(0, i.length - t)), t = 0));
@@ -578,17 +918,17 @@ function Le(e) {
578
918
  }
579
919
  //#endregion
580
920
  //#region src/components/Editor/EditorCore.tsx
581
- var Q = (e) => {
582
- let { height: t = 126, onChange: n, toolbar: r, theme: i, maxLength: a, onMaxLengthExceed: o } = e, [s] = I(), c = S(null), u = S(null), d = S(null), f = S(o);
583
- f.current = o;
584
- let p = Fe(a) ? a : void 0, [m, h] = C(0), v = r?.mode === "floating", T = x(() => ({
921
+ var qt = (e) => {
922
+ let { height: t = 126, onChange: n, toolbar: r, theme: i, maxLength: a, onMaxLengthExceed: o } = e, [s] = F(), c = T(null), l = T(null), u = T(null), d = T(o);
923
+ d.current = o;
924
+ let f = Wt(a) ? a : void 0, [p, m] = E(0), h = r?.mode === "floating", g = w(() => ({
585
925
  containerRef: c,
586
- toolbarRef: u,
587
- getPopupContainer: () => v && u.current ? u.current : c.current || document.body
588
- }), [v]), O = y((e) => {
926
+ toolbarRef: l,
927
+ getPopupContainer: () => h && l.current ? l.current : c.current || document.body
928
+ }), [h]), _ = S((e) => {
589
929
  e.read(() => {
590
- let t = j().getTextContent(), r = re(s, null), i = !t.trim() && (r === "<p><br></p>" || r === "<p></p>" || r === "" || /^<p>\s*<br>\s*<\/p>$/.test(r)) ? null : r;
591
- d.current = i, p !== void 0 && h(t.length), n({
930
+ let t = k().getTextContent(), r = _e(s, null), i = !t.trim() && (r === "<p><br></p>" || r === "<p></p>" || r === "" || /^<p>\s*<br>\s*<\/p>$/.test(r)) ? null : r;
931
+ u.current = i, f !== void 0 && m(t.length), n({
592
932
  text: t,
593
933
  html: i
594
934
  }, e);
@@ -596,77 +936,80 @@ var Q = (e) => {
596
936
  }, [
597
937
  n,
598
938
  s,
599
- p
939
+ f
600
940
  ]);
601
- b(() => {
602
- p !== void 0 && s.getEditorState().read(() => {
603
- h(j().getTextContentSize());
941
+ C(() => {
942
+ f !== void 0 && s.getEditorState().read(() => {
943
+ m(k().getTextContentSize());
604
944
  }, { editor: s });
605
- }, [s, p]), b(() => {
606
- if (e.value !== void 0 && e.value !== d.current) {
945
+ }, [s, f]), C(() => {
946
+ if (e.value !== void 0 && e.value !== u.current) {
607
947
  let t = !1;
608
948
  s.update(() => {
609
- j().clear(), e.value && e.value.trim() && (N(ie(s, new DOMParser().parseFromString(e.value, "text/html"))), p !== void 0 && (t = Ie(s, p)));
610
- }), t && f.current?.();
949
+ k().clear(), e.value && e.value.trim() && (j(ve(s, new DOMParser().parseFromString(e.value, "text/html"))), f !== void 0 && (t = Gt(s, f)));
950
+ }), t && d.current?.();
611
951
  }
612
952
  }, [
613
953
  e.value,
614
954
  s,
615
- p
955
+ f
616
956
  ]);
617
- let k = r?.config?.length ? r?.config : [], A = ve();
618
- return /* @__PURE__ */ g(l.Provider, {
619
- value: T,
620
- children: /* @__PURE__ */ _("div", {
957
+ let v = r?.config?.length ? r?.config : [], y = $e();
958
+ return /* @__PURE__ */ b(ee.Provider, {
959
+ value: g,
960
+ children: /* @__PURE__ */ x("div", {
621
961
  ref: c,
622
- className: w(W["bsy-lexical-editor"], v && W["bsy-lexical-editor--floating"]),
962
+ className: D(K["bsy-lexical-editor"], h && K["bsy-lexical-editor--floating"]),
623
963
  onClick: (e) => {
624
964
  let t = s.getRootElement(), n = e.target;
625
965
  !t || !n || !t.contains(n) || s.isEditable() || s.setEditable(!0);
626
966
  },
627
967
  children: [
628
- k.length > 0 && /* @__PURE__ */ g(Te, {
629
- config: k,
968
+ v.length > 0 && /* @__PURE__ */ b(mt, {
969
+ config: v,
630
970
  theme: i?.toolbar,
631
971
  style: r?.style,
632
972
  mode: r?.mode,
633
973
  floating: r?.floating
634
974
  }),
635
- /* @__PURE__ */ g(E, {
636
- contentEditable: /* @__PURE__ */ g(ee, {
637
- className: w(W["bsy-lexical-editor__content-editable"], p !== void 0 && W["bsy-lexical-editor__content-editable--with-length-badge"]),
975
+ /* @__PURE__ */ b(fe, {
976
+ contentEditable: /* @__PURE__ */ b(pe, {
977
+ className: D(K["bsy-lexical-editor__content-editable"], f !== void 0 && K["bsy-lexical-editor__content-editable--with-length-badge"]),
638
978
  style: {
639
979
  height: t,
640
- cursor: A ? "auto" : "text"
980
+ cursor: y ? "auto" : "text"
641
981
  }
642
982
  }),
643
- ErrorBoundary: D
983
+ ErrorBoundary: ge
644
984
  }),
645
- /* @__PURE__ */ g(ye, {}),
646
- /* @__PURE__ */ g(ke, {}),
647
- /* @__PURE__ */ g(Ne, {}),
648
- /* @__PURE__ */ g(X, {}),
649
- p !== void 0 && /* @__PURE__ */ g(Pe, {
650
- maxLength: p,
985
+ /* @__PURE__ */ b(et, {}),
986
+ /* @__PURE__ */ b(tt, {}),
987
+ /* @__PURE__ */ b(vt, {}),
988
+ /* @__PURE__ */ b(St, {}),
989
+ /* @__PURE__ */ b(Tt, {}),
990
+ /* @__PURE__ */ b(Et, {}),
991
+ /* @__PURE__ */ b(Vt, {}),
992
+ f !== void 0 && /* @__PURE__ */ b(Ht, {
993
+ maxLength: f,
651
994
  onMaxLengthExceed: o
652
995
  }),
653
- /* @__PURE__ */ g(te, {}),
654
- /* @__PURE__ */ g(ne, { onChange: O }),
655
- p !== void 0 && /* @__PURE__ */ g(Z, {
656
- current: m,
657
- maxLength: p
996
+ /* @__PURE__ */ b(me, {}),
997
+ /* @__PURE__ */ b(he, { onChange: _ }),
998
+ f !== void 0 && /* @__PURE__ */ b(Ut, {
999
+ current: p,
1000
+ maxLength: f
658
1001
  })
659
1002
  ]
660
1003
  })
661
1004
  });
662
1005
  };
663
- Q.displayName = "BsyLexicalEditorCore";
1006
+ qt.displayName = "BsyLexicalEditorCore";
664
1007
  //#endregion
665
1008
  //#region src/components/Editor/Editor.tsx
666
- var $ = (e) => {
1009
+ var Jt = (e) => {
667
1010
  let { autoFocus: t = !1 } = e;
668
- return /* @__PURE__ */ g(T, {
669
- initialConfig: x(() => ({
1011
+ return /* @__PURE__ */ b(de, {
1012
+ initialConfig: w(() => ({
670
1013
  namespace: "bsyLexicalEditor",
671
1014
  onError: (e) => {
672
1015
  console.error("Lexical error", e);
@@ -676,25 +1019,37 @@ var $ = (e) => {
676
1019
  text: {
677
1020
  bold: "editor-text-bold",
678
1021
  italic: "editor-text-italic",
679
- underline: "editor-text-underline"
1022
+ underline: "editor-text-underline",
1023
+ strikethrough: "editor-text-strikethrough",
1024
+ underlineStrikethrough: "editor-text-underline-strikethrough"
1025
+ },
1026
+ list: {
1027
+ ul: "editor-list-ul",
1028
+ ol: "editor-list-ol",
1029
+ listitem: "editor-listitem"
680
1030
  },
1031
+ code: "editor-code",
681
1032
  link: "editor-link"
682
1033
  },
683
1034
  nodes: [
684
- _e,
685
- ge,
686
- J,
687
- G,
1035
+ Ke,
1036
+ Ge,
1037
+ Ye,
1038
+ Je,
1039
+ U,
1040
+ H,
1041
+ X,
1042
+ q,
688
1043
  {
689
- replace: F,
690
- with: (e) => new G(e.__text),
691
- withKlass: G
1044
+ replace: P,
1045
+ with: (e) => new q(e.__text),
1046
+ withKlass: q
692
1047
  }
693
1048
  ]
694
1049
  }), [t]),
695
- children: /* @__PURE__ */ g(Q, { ...e })
1050
+ children: /* @__PURE__ */ b(qt, { ...e })
696
1051
  });
697
1052
  };
698
- $.displayName = "BsyLexicalEditor";
1053
+ Jt.displayName = "BsyLexicalEditor";
699
1054
  //#endregion
700
- export { ae as $getRoot, a as BaseButton, $ as default, c as listRegisteredToolbarButtons, i as registerToolbarButton, t as unregisterToolbarButton, me as useLexicalComposerContext };
1055
+ export { we as $getRoot, v as BaseButton, Jt as default, _ as listRegisteredToolbarButtons, d as registerToolbarButton, a as unregisterToolbarButton, Be as useLexicalComposerContext };