@baishuyun/ui-base 6.9.0 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/Amap/AmapCircle/index.js +1 -1
  2. package/dist/Amap/AmapMarker/index.js +1 -1
  3. package/dist/Amap/AmapMarkerCluster/index.js +1 -1
  4. package/dist/Amap/AmapProvider/index.js +1 -1
  5. package/dist/Amap/hooks/index.js +1 -1
  6. package/dist/Amap/index.js +1 -1
  7. package/dist/Calendar/{AllDaySection-a96dIzs3.js → AllDaySection-DNsVyixx.js} +3 -3
  8. package/dist/Calendar/{Calendar-MghsGFZ0.js → Calendar-DL2X3z_z.js} +11 -11
  9. package/dist/Calendar/{CurrentTimeIndicator-CNKsVEXH.js → CurrentTimeIndicator-twXtFHIp.js} +1 -1
  10. package/dist/Calendar/{EventCard-B1LoBxth.js → EventCard-CvEnWcKd.js} +3 -3
  11. package/dist/Calendar/{TimeGrid-DIw8oCqY.js → TimeGrid-D62R57Bo.js} +1 -1
  12. package/dist/Calendar/context/index.js +2 -2
  13. package/dist/Calendar/index.js +17 -17
  14. package/dist/Calendar/subcomponents/AllDaySection/index.js +7 -7
  15. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +5 -5
  16. package/dist/Calendar/subcomponents/EventCard/index.js +6 -6
  17. package/dist/Calendar/subcomponents/TimeAxis/index.js +4 -4
  18. package/dist/Calendar/subcomponents/TimeGrid/index.js +3 -3
  19. package/dist/Calendar/{theme-xnrMsnkg.js → theme-BRVmxhqD.js} +2 -2
  20. package/dist/Calendar/utils/index.js +4 -4
  21. package/dist/Calendar/utils/layout/index.js +3 -3
  22. package/dist/Calendar/utils/theme/index.js +2 -2
  23. package/dist/Card/index.js +1 -1
  24. package/dist/CheckBox/{CheckBox-nBm0u6zX.js → CheckBox-CcM19LnP.js} +1 -1
  25. package/dist/CheckBox/index.js +3 -3
  26. package/dist/ColorPicker/ColorPicker-D3JuQ7a7.js +153 -0
  27. package/dist/ColorPicker/index.js +3 -4
  28. package/dist/ConfigProvider/index.js +1 -1
  29. package/dist/DatePicker/{DatePicker-uizefM92.js → DatePicker-Dah_CjYG.js} +5 -5
  30. package/dist/DatePicker/{DatePickerPanel-bbGVwlo7.js → DatePickerPanel-Bz3uvbYF.js} +3 -3
  31. package/dist/DatePicker/index.js +6 -6
  32. package/dist/DatePicker/style/index.js +2 -2
  33. package/dist/DatePicker/{style-CNtPPsZp.js → style-BwmM26RP.js} +1 -1
  34. package/dist/DropDown/{DropDown-yDH9V_9Y.js → DropDown-Daxr9BYf.js} +7 -7
  35. package/dist/DropDown/index.js +8 -8
  36. package/dist/DropDown/style/index.js +2 -2
  37. package/dist/DropDown/{style-Fdp-U4md.js → style-BSgosymi.js} +1 -1
  38. package/dist/Editor/Buttons-DG_-Sg_C.js +600 -0
  39. package/dist/Editor/ToolbarPlugin/Buttons/index.js +12 -13
  40. package/dist/Editor/constants/index.js +1 -1
  41. package/dist/Editor/index.js +194 -180
  42. package/dist/Gantt/GanttChart/index.js +15 -15
  43. package/dist/Gantt/{GanttChart-CDw1IQ4F.js → GanttChart-6gpw5vi6.js} +22 -24
  44. package/dist/Gantt/GanttTable/index.js +9 -9
  45. package/dist/Gantt/{GanttTable-xbXD_PWI.js → GanttTable-lVu-YUtt.js} +5 -5
  46. package/dist/Gantt/GanttToolBar/index.js +11 -11
  47. package/dist/Gantt/{GanttToolBar-BTeTsR6Z.js → GanttToolBar-CarBWZg-.js} +2 -2
  48. package/dist/Gantt/{collapseKeys-B4SOVHjd.js → collapseKeys-_ShTXPKt.js} +2 -2
  49. package/dist/Gantt/index.js +23 -23
  50. package/dist/Gantt/{theme-DLNvgM9X.js → theme-CiMD9Y6i.js} +1 -1
  51. package/dist/Gantt/{timelineViewConfig-9HArvbmb.js → timelineViewConfig-CLIpppp0.js} +1 -1
  52. package/dist/Gantt/utils/index.js +6 -6
  53. package/dist/Gantt/utils/theme/index.js +2 -2
  54. package/dist/Icon/index.js +1 -1
  55. package/dist/InputTag/{InputTag-hzCCJQ1z.js → InputTag-DxPO0DwD.js} +1 -1
  56. package/dist/InputTag/index.js +3 -3
  57. package/dist/Loading/index.js +2 -2
  58. package/dist/Modal/index.js +1 -1
  59. package/dist/NotFoundContent/index.js +2 -2
  60. package/dist/Radio/index.js +2 -2
  61. package/dist/ScrollBar/{ScrollBar-QhXVe8zd.js → ScrollBar-CnwYQfXM.js} +1 -1
  62. package/dist/ScrollBar/index.js +2 -2
  63. package/dist/Segmented/{Segmented-BDz1hMDT.js → Segmented-Ck2ZmfF7.js} +1 -1
  64. package/dist/Segmented/index.js +2 -2
  65. package/dist/Select/{Select-D6EK7whJ.js → Select-CBI5PgeQ.js} +10 -8
  66. package/dist/Select/index.js +11 -11
  67. package/dist/Table/{Table-yQXQEk6d.js → Table-CL-KfNY3.js} +4 -4
  68. package/dist/Table/hooks/index.js +2 -2
  69. package/dist/Table/{hooks-BceUZQQm.js → hooks-uCDY9dqx.js} +1 -1
  70. package/dist/Table/index.js +6 -6
  71. package/dist/Table/{processRowspan-B0WELhG2.js → processRowspan-nIGqGyHh.js} +1 -1
  72. package/dist/Table/style/index.js +2 -2
  73. package/dist/Table/{style-DgiPEsSp.js → style-x9xfw6te.js} +1 -1
  74. package/dist/Table/utils/index.js +2 -2
  75. package/dist/Tabs/Tabs-B1RsYb2W.js +409 -0
  76. package/dist/Tabs/index.js +3 -4
  77. package/dist/Tooltip/{Tooltip-Ch9lti_7.js → Tooltip-DWWWYn1a.js} +1 -1
  78. package/dist/Tooltip/index.js +2 -2
  79. package/dist/Tree/index.js +4 -4
  80. package/dist/Tree/utils/index.js +1 -1
  81. package/dist/components/ColorPicker/ColorPalettes.d.ts +1 -8
  82. package/dist/components/ColorPicker/ColorPicker.type.d.ts +5 -2
  83. package/dist/components/ColorPicker/constants.d.ts +3 -1
  84. package/dist/components/ColorPicker/index.d.ts +1 -1
  85. package/dist/components/Editor/ToolbarPlugin/Buttons/PictureButton/UploadImage.d.ts +5 -4
  86. package/dist/components/Editor/plugins/LinkColorPlugin.d.ts +2 -0
  87. package/dist/index.js +36 -37
  88. package/dist/style.css +1 -1
  89. package/dist/vendors/{Tree-DXmVRDn0.js → Tree-D1s-eADo.js} +2 -2
  90. package/dist/vendors/{version-D76DufO-.js → version-L-kG2La0.js} +1 -1
  91. package/package.json +1 -1
  92. package/dist/ColorPicker/ColorPicker-t1uBeATW.js +0 -155
  93. package/dist/Editor/Buttons-BhStZyIa.js +0 -620
  94. package/dist/Tabs/Tabs-BiKW70CL.js +0 -398
  95. package/dist/vendors/color-D6XBXROa.js +0 -12
  96. /package/dist/Calendar/{TimeAxis-C9e2BdYs.js → TimeAxis-D7bgZDKs.js} +0 -0
  97. /package/dist/Calendar/{colorUtils-CBLTsDX0.js → colorUtils-lXNjGoCk.js} +0 -0
  98. /package/dist/Calendar/{context-4tCN5X33.js → context-CBJnz0IH.js} +0 -0
  99. /package/dist/Calendar/{layout-Dz-grtu9.js → layout-BglMom3m.js} +0 -0
  100. /package/dist/CheckBox/{CheckBox-ByWSy9Yr.js → CheckBox-Bb0UuX1Y.js} +0 -0
  101. /package/dist/DatePicker/{ensureDayjsPlugins-Cn9Bkjkj.js → ensureDayjsPlugins-CVL-fnAl.js} +0 -0
  102. /package/dist/DatePicker/{pickerLocale-BRnNjLcv.js → pickerLocale-BeMlfhKu.js} +0 -0
  103. /package/dist/Gantt/{GanttHighlightContext-ChThr8ia.js → GanttHighlightContext-grda5bhd.js} +0 -0
  104. /package/dist/Gantt/{columnResize-jG0Wy2PC.js → columnResize-DV1tSBx_.js} +0 -0
  105. /package/dist/Gantt/{constants-LIz5jwed.js → constants-BObDP0h6.js} +0 -0
  106. /package/dist/Gantt/{highlightTarget-BpkYTonb.js → highlightTarget-DrP0_NrM.js} +0 -0
  107. /package/dist/Loading/{Loading-DiywS7ex.js → Loading-CVyzO5-s.js} +0 -0
  108. /package/dist/NotFoundContent/{NotFoundContent-BLmzWNBi.js → NotFoundContent-J-TEnljc.js} +0 -0
  109. /package/dist/Radio/{Radio-CX9cUqb7.js → Radio-CBUZ7DB5.js} +0 -0
  110. /package/dist/Select/{SelectInputSearch-COUzreau.js → SelectInputSearch-CrGW_eVo.js} +0 -0
  111. /package/dist/Table/{constants-kRpjsoet.js → constants-CcwjDbe7.js} +0 -0
  112. /package/dist/vendors/{animations-rwUbyoT0.js → animations-Mlw78WYo.js} +0 -0
  113. /package/dist/vendors/{cssVars-BYg1matG.js → cssVars-B8o94Yao.js} +0 -0
  114. /package/dist/vendors/{mergeRefs-Bsywq1Vo.js → mergeRefs-Bai1cIzv.js} +0 -0
  115. /package/dist/vendors/{useFloatingPortal-CmVJbuRm.js → useFloatingPortal-C8V67X0v.js} +0 -0
  116. /package/dist/vendors/{useLatchedPopupPortalRoot-4fVhqVT4.js → useLatchedPopupPortalRoot-hwf14FJ5.js} +0 -0
@@ -1,23 +1,22 @@
1
- import "../vendors/version-D76DufO-.js";
1
+ import "../vendors/version-L-kG2La0.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-BBDcb-yw.js";
4
4
  import "../vendors/LocaleContext-Dcw6C1LX.js";
5
5
  import "../Modal/Modal-LiztSF7x.js";
6
- import "../ColorPicker/ColorPicker-t1uBeATW.js";
6
+ import "../ColorPicker/ColorPicker-D3JuQ7a7.js";
7
7
  import "../vendors/useFloatingOverlay-BApqkHSu.js";
8
8
  import "../vendors/useLocale-BKZX2_zw.js";
9
- import "../vendors/color-D6XBXROa.js";
10
- import "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
11
- import { t as e } from "../vendors/cssVars-BYg1matG.js";
12
- import "../Select/SelectInputSearch-COUzreau.js";
13
- import "../CheckBox/CheckBox-ByWSy9Yr.js";
14
- import "../CheckBox/CheckBox-nBm0u6zX.js";
15
- import "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
16
- import "../ScrollBar/ScrollBar-QhXVe8zd.js";
17
- import "../vendors/useFloatingPortal-CmVJbuRm.js";
18
- import "../DropDown/DropDown-yDH9V_9Y.js";
19
- import "../DropDown/style-Fdp-U4md.js";
20
- 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-BhStZyIa.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";
21
20
  import { DEFAULT_BACKGROUND_COLOR as d, DEFAULT_FONT_COLOR as f, DEFAULT_FONT_SIZE as p } from "./constants/index.js";
22
21
  import { omit as m } from "lodash-es";
23
22
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
@@ -30,11 +29,11 @@ import { HistoryPlugin as te } from "@lexical/react/LexicalHistoryPlugin";
30
29
  import { OnChangePlugin as ne } from "@lexical/react/LexicalOnChangePlugin";
31
30
  import { LexicalErrorBoundary as D } from "@lexical/react/LexicalErrorBoundary";
32
31
  import { $generateHtmlFromNodes as re, $generateNodesFromDOM as ie } from "@lexical/html";
33
- import { $applyNodeReplacement as O, $createParagraphNode as k, $getNodeByKey as A, $getRoot as j, $getRoot as M, $getSelection as N, $insertNodes as P, $isElementNode as ae, $isRangeSelection as F, $isRootOrShadowRoot as oe, $isTextNode as se, COMMAND_PRIORITY_EDITOR as ce, COMMAND_PRIORITY_LOW as le, DecoratorNode as ue, KEY_ENTER_COMMAND as de, RootNode as fe, TextNode as I } from "lexical";
34
- import { useLexicalComposerContext as pe, useLexicalComposerContext as L } from "@lexical/react/LexicalComposerContext";
35
- import { $getSelectionStyleValueForProperty as R, $patchStyleText as z, $trimTextContentFromAnchor as B } from "@lexical/selection";
36
- import { $findMatchingParent as V, $restoreEditorState as me } from "@lexical/utils";
37
- import { $isLinkNode as he, AutoLinkNode as ge, LinkNode as _e } from "@lexical/link";
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";
38
37
  import { useLexicalEditable as ve } from "@lexical/react/useLexicalEditable";
39
38
  import { LinkPlugin as ye } from "@lexical/react/LexicalLinkPlugin";
40
39
  //#region src/components/Editor/utils/resolveEditorToolbarThemeVars.ts
@@ -70,7 +69,7 @@ var H = (e) => {
70
69
  //#endregion
71
70
  //#region src/components/Editor/hooks/useTextFormatsState.ts
72
71
  function Ce() {
73
- let [e] = L(), [t, n] = C({
72
+ let [e] = I(), [t, n] = C({
74
73
  bold: !1,
75
74
  italic: !1,
76
75
  underline: !1,
@@ -82,14 +81,14 @@ function Ce() {
82
81
  });
83
82
  return b(() => e.registerUpdateListener(({ editorState: e }) => {
84
83
  e.read(() => {
85
- let e = N();
86
- if (F(e)) {
87
- let t = R(e, "font-size", p), r = R(e, "color", f), i = R(e, "background-color", d), a = e.anchor.getNode(), o = a.getKey() === "root" ? a : V(a, (e) => {
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) => {
88
87
  let t = e.getParent();
89
- return t !== null && oe(t);
88
+ return t !== null && se(t);
90
89
  });
91
90
  o === null && (o = a.getTopLevelElementOrThrow());
92
- let s = {}, c = V(a, he);
91
+ let s = {}, c = B(a, V);
93
92
  c ? (s.link = c.getURL(), s.linkText = c.getTextContent(), s.newBlank = c.getTarget() === "_blank") : s.linkText = e.getTextContent(), n({
94
93
  bold: e.hasFormat("bold"),
95
94
  italic: e.hasFormat("italic"),
@@ -97,7 +96,7 @@ function Ce() {
97
96
  fontSize: t,
98
97
  fontColor: r,
99
98
  backgroundColor: i,
100
- align: ae(o) ? o.getFormatType() : "left",
99
+ align: oe(o) ? o.getFormatType() : "left",
101
100
  link: s
102
101
  });
103
102
  }
@@ -145,13 +144,106 @@ var we = (e) => {
145
144
  }) })
146
145
  });
147
146
  }, W = {
148
- "bsy-lexical-editor": "_bsy-lexical-editor_jbc8k_1",
149
- "bsy-lexical-editor--floating": "_bsy-lexical-editor--floating_jbc8k_7",
150
- "bsy-lexical-editor__content-editable": "_bsy-lexical-editor__content-editable_jbc8k_10",
151
- "bsy-lexical-editor__content-editable--with-length-badge": "_bsy-lexical-editor__content-editable--with-length-badge_jbc8k_17",
152
- "bsy-lexical-editor__length-badge": "_bsy-lexical-editor__length-badge_jbc8k_20",
153
- "bsy-lexical-editor__length-badge--exceeded": "_bsy-lexical-editor__length-badge--exceeded_jbc8k_36"
154
- }, G = {
147
+ "bsy-lexical-editor": "_bsy-lexical-editor_1bhfo_1",
148
+ "bsy-lexical-editor--floating": "_bsy-lexical-editor--floating_1bhfo_7",
149
+ "bsy-lexical-editor__content-editable": "_bsy-lexical-editor__content-editable_1bhfo_10",
150
+ "bsy-lexical-editor__content-editable--with-length-badge": "_bsy-lexical-editor__content-editable--with-length-badge_1bhfo_17",
151
+ "bsy-lexical-editor__length-badge": "_bsy-lexical-editor__length-badge_1bhfo_20",
152
+ "bsy-lexical-editor__length-badge--exceeded": "_bsy-lexical-editor__length-badge--exceeded_1bhfo_36"
153
+ }, G = class e extends F {
154
+ constructor(e, t) {
155
+ super(e, t);
156
+ }
157
+ static getType() {
158
+ return "extended-text";
159
+ }
160
+ static clone(t) {
161
+ return new e(t.__text, t.__key);
162
+ }
163
+ static importDOM() {
164
+ let e = F.importDOM();
165
+ return {
166
+ ...e,
167
+ code: () => ({
168
+ conversion: K(e?.code),
169
+ priority: 1
170
+ }),
171
+ em: () => ({
172
+ conversion: K(e?.em),
173
+ priority: 1
174
+ }),
175
+ span: () => ({
176
+ conversion: K(e?.span),
177
+ priority: 1
178
+ }),
179
+ strong: () => ({
180
+ conversion: K(e?.strong),
181
+ priority: 1
182
+ }),
183
+ sub: () => ({
184
+ conversion: K(e?.sub),
185
+ priority: 1
186
+ }),
187
+ sup: () => ({
188
+ conversion: K(e?.sup),
189
+ priority: 1
190
+ })
191
+ };
192
+ }
193
+ static importJSON(e) {
194
+ return Ee().updateFromJSON(e);
195
+ }
196
+ isSimpleText() {
197
+ return this.__type === "extended-text" && this.__mode === 0;
198
+ }
199
+ };
200
+ function Ee(e = "") {
201
+ return O(new G(e));
202
+ }
203
+ function K(e) {
204
+ return (t) => {
205
+ let n = e?.(t);
206
+ if (!n) return null;
207
+ let r = n.conversion(t);
208
+ if (!r) return r;
209
+ let i = t.style.backgroundColor, a = t.style.color, o = t.style.fontFamily, s = t.style.fontWeight, c = t.style.fontSize, l = t.style.textDecoration;
210
+ return {
211
+ ...r,
212
+ forChild: (e, t) => {
213
+ let n = (r?.forChild ?? ((e) => e))(e, t);
214
+ if (ce(n)) {
215
+ let e = [
216
+ i ? `background-color: ${i}` : null,
217
+ a ? `color: ${a}` : null,
218
+ o ? `font-family: ${o}` : null,
219
+ s ? `font-weight: ${s}` : null,
220
+ c ? `font-size: ${c}` : null,
221
+ l ? `text-decoration: ${l}` : null
222
+ ].filter((e) => e !== null).join("; ");
223
+ if (e.length) return n.setStyle(e);
224
+ }
225
+ return n;
226
+ }
227
+ };
228
+ };
229
+ }
230
+ //#endregion
231
+ //#region src/components/Editor/plugins/LinkColorPlugin.tsx
232
+ function De(e) {
233
+ return e.split(";").map((e) => e.trim()).filter((e) => e && e.split(":")[0].trim().toLowerCase() !== "color").join("; ");
234
+ }
235
+ function Oe(e) {
236
+ if (!B(e, V)) return;
237
+ let t = e.getStyle();
238
+ if (!t) return;
239
+ let n = De(t);
240
+ n !== t && e.setStyle(n);
241
+ }
242
+ function ke() {
243
+ let [e] = I();
244
+ return b(() => e.registerNodeTransform(G, Oe), [e]), null;
245
+ }
246
+ var q = {
155
247
  imageWrapper: "_imageWrapper_y06h3_1",
156
248
  selected: "_selected_y06h3_8",
157
249
  resizing: "_resizing_y06h3_12",
@@ -161,8 +253,8 @@ var we = (e) => {
161
253
  topRight: "_topRight_y06h3_49",
162
254
  bottomLeft: "_bottomLeft_y06h3_54",
163
255
  bottomRight: "_bottomRight_y06h3_59"
164
- }, Ee = ({ src: e, altText: t, width: n, height: r, nodeKey: i }) => {
165
- let [a] = L(), [o, s] = C(!1), [c, l] = C(null), u = S(null), [d, f] = C({
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({
166
258
  width: n || void 0,
167
259
  height: r || void 0
168
260
  }), p = y(() => {
@@ -211,7 +303,7 @@ var we = (e) => {
211
303
  }, [c]), T = y(() => {
212
304
  c?.isResizing && (a.update(() => {
213
305
  let e = A(i);
214
- De(e) && e.setWidthAndHeight(d.width, d.height);
306
+ je(e) && e.setWidthAndHeight(d.width, d.height);
215
307
  }), l(null));
216
308
  }, [
217
309
  a,
@@ -233,8 +325,8 @@ var we = (e) => {
233
325
  }, []);
234
326
  return b(() => a.registerUpdateListener(({ editorState: e }) => {
235
327
  e.read(() => {
236
- let e = N();
237
- F(e) && !e.getNodes().some((e) => e.getKey() === i || e.getParent() && e.getParent()?.getKey() === i) && o && s(!1);
328
+ let e = M();
329
+ P(e) && !e.getNodes().some((e) => e.getKey() === i || e.getParent() && e.getParent()?.getKey() === i) && o && s(!1);
238
330
  });
239
331
  }), [
240
332
  a,
@@ -248,15 +340,15 @@ var we = (e) => {
248
340
  document.removeEventListener("mousedown", e);
249
341
  };
250
342
  }, [o]), /* @__PURE__ */ _("div", {
251
- className: w(G.imageWrapper, {
252
- [G.selected]: o,
253
- [G.resizing]: c?.isResizing
343
+ className: w(q.imageWrapper, {
344
+ [q.selected]: o,
345
+ [q.resizing]: c?.isResizing
254
346
  }),
255
347
  children: [/* @__PURE__ */ g("img", {
256
348
  ref: u,
257
349
  src: e,
258
350
  alt: t,
259
- className: G.image,
351
+ className: q.image,
260
352
  style: {
261
353
  width: d.width,
262
354
  height: d.height
@@ -266,24 +358,24 @@ var we = (e) => {
266
358
  draggable: !1
267
359
  }), o && /* @__PURE__ */ _(h, { children: [
268
360
  /* @__PURE__ */ g("div", {
269
- className: w(G.resizeHandle, G.bottomRight),
361
+ className: w(q.resizeHandle, q.bottomRight),
270
362
  onMouseDown: (e) => m(e, "bottom-right")
271
363
  }),
272
364
  /* @__PURE__ */ g("div", {
273
- className: w(G.resizeHandle, G.bottomLeft),
365
+ className: w(q.resizeHandle, q.bottomLeft),
274
366
  onMouseDown: (e) => m(e, "bottom-left")
275
367
  }),
276
368
  /* @__PURE__ */ g("div", {
277
- className: w(G.resizeHandle, G.topRight),
369
+ className: w(q.resizeHandle, q.topRight),
278
370
  onMouseDown: (e) => m(e, "top-right")
279
371
  }),
280
372
  /* @__PURE__ */ g("div", {
281
- className: w(G.resizeHandle, G.topLeft),
373
+ className: w(q.resizeHandle, q.topLeft),
282
374
  onMouseDown: (e) => m(e, "top-left")
283
375
  })
284
376
  ] })]
285
377
  });
286
- }, K = class e extends ue {
378
+ }, J = class e extends de {
287
379
  static getType() {
288
380
  return "image";
289
381
  }
@@ -329,7 +421,7 @@ var we = (e) => {
329
421
  n.__width = e, n.__height = t;
330
422
  }
331
423
  decorate() {
332
- return /* @__PURE__ */ g(Ee, {
424
+ return /* @__PURE__ */ g(Ae, {
333
425
  src: this.__src,
334
426
  altText: this.__altText,
335
427
  width: this.__width,
@@ -339,13 +431,13 @@ var we = (e) => {
339
431
  }
340
432
  static importDOM() {
341
433
  return { img: () => ({
342
- conversion: Oe,
434
+ conversion: Me,
343
435
  priority: 0
344
436
  }) };
345
437
  }
346
438
  static importJSON(e) {
347
439
  let { src: t, altText: n, width: r, height: i } = e;
348
- return q({
440
+ return Y({
349
441
  src: t,
350
442
  altText: n,
351
443
  width: r,
@@ -366,13 +458,13 @@ var we = (e) => {
366
458
  return !0;
367
459
  }
368
460
  };
369
- function q({ src: e, altText: t, width: n, height: r, key: i }) {
370
- return new K(e, t, n, r, i);
461
+ function Y({ src: e, altText: t, width: n, height: r, key: i }) {
462
+ return new J(e, t, n, r, i);
371
463
  }
372
- function De(e) {
373
- return e instanceof K;
464
+ function je(e) {
465
+ return e instanceof J;
374
466
  }
375
- function Oe(e) {
467
+ function Me(e) {
376
468
  if (e instanceof HTMLImageElement) {
377
469
  let { src: t, alt: n, style: r } = e, i, a;
378
470
  if (r.width) {
@@ -383,7 +475,7 @@ function Oe(e) {
383
475
  let e = parseInt(r.height, 10);
384
476
  isNaN(e) || (a = e);
385
477
  }
386
- return i === void 0 && e.width && (i = e.width), a === void 0 && e.height && (a = e.height), { node: q({
478
+ return i === void 0 && e.width && (i = e.width), a === void 0 && e.height && (a = e.height), { node: Y({
387
479
  src: t,
388
480
  altText: n,
389
481
  width: i,
@@ -394,23 +486,23 @@ function Oe(e) {
394
486
  }
395
487
  //#endregion
396
488
  //#region src/components/Editor/plugins/ImagePlugin.tsx
397
- function ke() {
398
- let [e] = L();
399
- return b(() => e.registerCommand(s, (e) => (P([q(e)]), !0), ce), [e]), null;
489
+ function Ne() {
490
+ let [e] = I();
491
+ return b(() => e.registerCommand(s, (e) => (N([Y(e)]), !0), le), [e]), null;
400
492
  }
401
493
  //#endregion
402
494
  //#region src/components/Editor/plugins/EnterKeyPlugin.tsx
403
- function Ae() {
404
- let [e] = L(), t = S(0);
405
- return b(() => e.registerCommand(de, (n) => {
495
+ function X() {
496
+ let [e] = I(), t = S(0);
497
+ return b(() => e.registerCommand(fe, (n) => {
406
498
  let r = Date.now(), i = r - t.current;
407
499
  return t.current = r, i < 250 && i > 0 ? (e.update(() => {
408
- let e = N();
409
- if (F(e)) {
500
+ let e = M();
501
+ if (P(e)) {
410
502
  let t = e.anchor.getNode().getTopLevelElement();
411
503
  if (t && t.getTextContent().trim() === "") {
412
504
  let n = k();
413
- z(e, {
505
+ R(e, {
414
506
  "background-color": "",
415
507
  color: "",
416
508
  "font-size": "",
@@ -423,35 +515,35 @@ function Ae() {
423
515
  }
424
516
  }
425
517
  }), n?.preventDefault(), !0) : !1;
426
- }, le), [e]), null;
518
+ }, ue), [e]), null;
427
519
  }
428
520
  //#endregion
429
521
  //#region src/components/Editor/plugins/MaxLengthPlugin.tsx
430
- function je({ maxLength: e, onMaxLengthExceed: t }) {
431
- let [n] = L(), r = S(t);
522
+ function Pe({ maxLength: e, onMaxLengthExceed: t }) {
523
+ let [n] = I(), r = S(t);
432
524
  return r.current = t, b(() => {
433
525
  let t = null;
434
- return n.registerNodeTransform(fe, (i) => {
526
+ return n.registerNodeTransform(pe, (i) => {
435
527
  let a = i.getTextContentSize();
436
528
  if (a <= e) return;
437
- let o = n.getEditorState(), s = o.read(() => i.getTextContentSize()), c = a - e, l = N();
529
+ let o = n.getEditorState(), s = o.read(() => i.getTextContentSize()), c = a - e, l = M();
438
530
  if (s === e && t !== o) {
439
- t = o, me(n, o), r.current?.();
531
+ t = o, he(n, o), r.current?.();
440
532
  return;
441
533
  }
442
- if (F(l) && l.isCollapsed()) {
443
- B(n, l.anchor, c), r.current?.();
534
+ if (P(l) && l.isCollapsed()) {
535
+ z(n, l.anchor, c), r.current?.();
444
536
  return;
445
537
  }
446
538
  i.selectEnd();
447
- let u = N();
448
- F(u) && (B(n, u.anchor, c), r.current?.());
539
+ let u = M();
540
+ P(u) && (z(n, u.anchor, c), r.current?.());
449
541
  });
450
542
  }, [n, e]), null;
451
543
  }
452
544
  //#endregion
453
545
  //#region src/components/Editor/LengthBadge.tsx
454
- var J = ({ current: e, maxLength: t }) => {
546
+ var Z = ({ current: e, maxLength: t }) => {
455
547
  let n = e > t;
456
548
  return /* @__PURE__ */ _("div", {
457
549
  className: w(W["bsy-lexical-editor__length-badge"], n && W["bsy-lexical-editor__length-badge--exceeded"]),
@@ -463,22 +555,22 @@ var J = ({ current: e, maxLength: t }) => {
463
555
  ]
464
556
  });
465
557
  };
466
- J.displayName = "BsyLexicalEditorLengthBadge";
558
+ Z.displayName = "BsyLexicalEditorLengthBadge";
467
559
  //#endregion
468
560
  //#region src/components/Editor/utils/textLength.ts
469
- function Y(e) {
561
+ function Fe(e) {
470
562
  return typeof e == "number" && Number.isFinite(e) && e > 0;
471
563
  }
472
- function Me(e, t) {
473
- let n = M(), r = n.getTextContentSize();
564
+ function Ie(e, t) {
565
+ let n = j(), r = n.getTextContentSize();
474
566
  if (r <= t) return !1;
475
567
  let i = r - t;
476
568
  n.selectEnd();
477
- let a = N();
478
- return F(a) ? B(e, a.anchor, i) : Ne(i), !0;
569
+ let a = M();
570
+ return P(a) ? z(e, a.anchor, i) : Le(i), !0;
479
571
  }
480
- function Ne(e) {
481
- let t = e, n = M().getAllTextNodes();
572
+ function Le(e) {
573
+ let t = e, n = j().getAllTextNodes();
482
574
  for (let e = n.length - 1; e >= 0 && t > 0; e--) {
483
575
  let r = n[e], i = r.getTextContent();
484
576
  i.length !== 0 && (i.length <= t ? (t -= i.length, r.remove()) : (r.setTextContent(i.slice(0, i.length - t)), t = 0));
@@ -486,16 +578,16 @@ function Ne(e) {
486
578
  }
487
579
  //#endregion
488
580
  //#region src/components/Editor/EditorCore.tsx
489
- var X = (e) => {
490
- let { height: t = 126, onChange: n, toolbar: r, theme: i, maxLength: a, onMaxLengthExceed: o } = e, [s] = L(), c = S(null), u = S(null), d = S(null), f = S(o);
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);
491
583
  f.current = o;
492
- let p = Y(a) ? a : void 0, [m, h] = C(0), v = r?.mode === "floating", T = x(() => ({
584
+ let p = Fe(a) ? a : void 0, [m, h] = C(0), v = r?.mode === "floating", T = x(() => ({
493
585
  containerRef: c,
494
586
  toolbarRef: u,
495
587
  getPopupContainer: () => v && u.current ? u.current : c.current || document.body
496
588
  }), [v]), O = y((e) => {
497
589
  e.read(() => {
498
- let t = M().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;
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;
499
591
  d.current = i, p !== void 0 && h(t.length), n({
500
592
  text: t,
501
593
  html: i
@@ -508,13 +600,13 @@ var X = (e) => {
508
600
  ]);
509
601
  b(() => {
510
602
  p !== void 0 && s.getEditorState().read(() => {
511
- h(M().getTextContentSize());
603
+ h(j().getTextContentSize());
512
604
  }, { editor: s });
513
605
  }, [s, p]), b(() => {
514
606
  if (e.value !== void 0 && e.value !== d.current) {
515
607
  let t = !1;
516
608
  s.update(() => {
517
- M().clear(), e.value && e.value.trim() && (P(ie(s, new DOMParser().parseFromString(e.value, "text/html"))), p !== void 0 && (t = Me(s, p)));
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)));
518
610
  }), t && f.current?.();
519
611
  }
520
612
  }, [
@@ -552,14 +644,15 @@ var X = (e) => {
552
644
  }),
553
645
  /* @__PURE__ */ g(ye, {}),
554
646
  /* @__PURE__ */ g(ke, {}),
555
- /* @__PURE__ */ g(Ae, {}),
556
- p !== void 0 && /* @__PURE__ */ g(je, {
647
+ /* @__PURE__ */ g(Ne, {}),
648
+ /* @__PURE__ */ g(X, {}),
649
+ p !== void 0 && /* @__PURE__ */ g(Pe, {
557
650
  maxLength: p,
558
651
  onMaxLengthExceed: o
559
652
  }),
560
653
  /* @__PURE__ */ g(te, {}),
561
654
  /* @__PURE__ */ g(ne, { onChange: O }),
562
- p !== void 0 && /* @__PURE__ */ g(J, {
655
+ p !== void 0 && /* @__PURE__ */ g(Z, {
563
656
  current: m,
564
657
  maxLength: p
565
658
  })
@@ -567,86 +660,7 @@ var X = (e) => {
567
660
  })
568
661
  });
569
662
  };
570
- X.displayName = "BsyLexicalEditorCore";
571
- //#endregion
572
- //#region src/components/Editor/nodes/ExtendedTextNode.tsx
573
- var Z = class e extends I {
574
- constructor(e, t) {
575
- super(e, t);
576
- }
577
- static getType() {
578
- return "extended-text";
579
- }
580
- static clone(t) {
581
- return new e(t.__text, t.__key);
582
- }
583
- static importDOM() {
584
- let e = I.importDOM();
585
- return {
586
- ...e,
587
- code: () => ({
588
- conversion: Q(e?.code),
589
- priority: 1
590
- }),
591
- em: () => ({
592
- conversion: Q(e?.em),
593
- priority: 1
594
- }),
595
- span: () => ({
596
- conversion: Q(e?.span),
597
- priority: 1
598
- }),
599
- strong: () => ({
600
- conversion: Q(e?.strong),
601
- priority: 1
602
- }),
603
- sub: () => ({
604
- conversion: Q(e?.sub),
605
- priority: 1
606
- }),
607
- sup: () => ({
608
- conversion: Q(e?.sup),
609
- priority: 1
610
- })
611
- };
612
- }
613
- static importJSON(e) {
614
- return Pe().updateFromJSON(e);
615
- }
616
- isSimpleText() {
617
- return this.__type === "extended-text" && this.__mode === 0;
618
- }
619
- };
620
- function Pe(e = "") {
621
- return O(new Z(e));
622
- }
623
- function Q(e) {
624
- return (t) => {
625
- let n = e?.(t);
626
- if (!n) return null;
627
- let r = n.conversion(t);
628
- if (!r) return r;
629
- let i = t.style.backgroundColor, a = t.style.color, o = t.style.fontFamily, s = t.style.fontWeight, c = t.style.fontSize, l = t.style.textDecoration;
630
- return {
631
- ...r,
632
- forChild: (e, t) => {
633
- let n = (r?.forChild ?? ((e) => e))(e, t);
634
- if (se(n)) {
635
- let e = [
636
- i ? `background-color: ${i}` : null,
637
- a ? `color: ${a}` : null,
638
- o ? `font-family: ${o}` : null,
639
- s ? `font-weight: ${s}` : null,
640
- c ? `font-size: ${c}` : null,
641
- l ? `text-decoration: ${l}` : null
642
- ].filter((e) => e !== null).join("; ");
643
- if (e.length) return n.setStyle(e);
644
- }
645
- return n;
646
- }
647
- };
648
- };
649
- }
663
+ Q.displayName = "BsyLexicalEditorCore";
650
664
  //#endregion
651
665
  //#region src/components/Editor/Editor.tsx
652
666
  var $ = (e) => {
@@ -669,18 +683,18 @@ var $ = (e) => {
669
683
  nodes: [
670
684
  _e,
671
685
  ge,
672
- K,
673
- Z,
686
+ J,
687
+ G,
674
688
  {
675
- replace: I,
676
- with: (e) => new Z(e.__text),
677
- withKlass: Z
689
+ replace: F,
690
+ with: (e) => new G(e.__text),
691
+ withKlass: G
678
692
  }
679
693
  ]
680
694
  }), [t]),
681
- children: /* @__PURE__ */ g(X, { ...e })
695
+ children: /* @__PURE__ */ g(Q, { ...e })
682
696
  });
683
697
  };
684
698
  $.displayName = "BsyLexicalEditor";
685
699
  //#endregion
686
- export { j as $getRoot, a as BaseButton, $ as default, c as listRegisteredToolbarButtons, i as registerToolbarButton, t as unregisterToolbarButton, pe as useLexicalComposerContext };
700
+ export { ae as $getRoot, a as BaseButton, $ as default, c as listRegisteredToolbarButtons, i as registerToolbarButton, t as unregisterToolbarButton, me as useLexicalComposerContext };
@@ -1,20 +1,20 @@
1
- import "../../vendors/version-D76DufO-.js";
1
+ import "../../vendors/version-L-kG2La0.js";
2
2
  import "../../ScrollBar/style-D26azwz6.js";
3
3
  import "../../Icon/Icon-BBDcb-yw.js";
4
4
  import "../../vendors/LocaleContext-Dcw6C1LX.js";
5
5
  import "../../vendors/useLocale-BKZX2_zw.js";
6
- import "../../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
7
- import "../../Tooltip/Tooltip-Ch9lti_7.js";
8
- import "../../Select/SelectInputSearch-COUzreau.js";
9
- import "../../NotFoundContent/NotFoundContent-BLmzWNBi.js";
10
- import "../../ScrollBar/ScrollBar-QhXVe8zd.js";
11
- import "../../vendors/useFloatingPortal-CmVJbuRm.js";
12
- import "../../DropDown/DropDown-yDH9V_9Y.js";
13
- import "../../DropDown/style-Fdp-U4md.js";
14
- import "../constants-LIz5jwed.js";
15
- import "../GanttHighlightContext-ChThr8ia.js";
16
- import "../timelineViewConfig-9HArvbmb.js";
17
- import "../collapseKeys-B4SOVHjd.js";
18
- import { t as e } from "../GanttChart-CDw1IQ4F.js";
19
- import "../GanttToolBar-BTeTsR6Z.js";
6
+ import "../../vendors/useLatchedPopupPortalRoot-hwf14FJ5.js";
7
+ import "../../Tooltip/Tooltip-DWWWYn1a.js";
8
+ import "../../Select/SelectInputSearch-CrGW_eVo.js";
9
+ import "../../NotFoundContent/NotFoundContent-J-TEnljc.js";
10
+ import "../../ScrollBar/ScrollBar-CnwYQfXM.js";
11
+ import "../../vendors/useFloatingPortal-C8V67X0v.js";
12
+ import "../../DropDown/DropDown-Daxr9BYf.js";
13
+ import "../../DropDown/style-BSgosymi.js";
14
+ import "../constants-BObDP0h6.js";
15
+ import "../GanttHighlightContext-grda5bhd.js";
16
+ import "../timelineViewConfig-CLIpppp0.js";
17
+ import "../collapseKeys-_ShTXPKt.js";
18
+ import { t as e } from "../GanttChart-6gpw5vi6.js";
19
+ import "../GanttToolBar-CarBWZg-.js";
20
20
  export { e as default };