@baishuyun/ui-base 6.2.0 → 6.3.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 (37) hide show
  1. package/dist/Amap/AmapProvider/index.js +3 -3
  2. package/dist/Amap/{AmapProvider-BgGnih_w.js → AmapProvider-CTn2CH8s.js} +1 -1
  3. package/dist/Amap/index.js +3 -3
  4. package/dist/Calendar/{Calendar-CAG1Fxlh.js → Calendar-BIjk9zys.js} +2 -2
  5. package/dist/Calendar/index.js +4 -4
  6. package/dist/ColorPicker/{ColorPicker-CKqNqAsK.js → ColorPicker-BNPxmfw_.js} +1 -1
  7. package/dist/ColorPicker/index.js +3 -3
  8. package/dist/ConfigProvider/index.js +2 -2
  9. package/dist/DatePicker/{DatePicker-BIxiJQ_W.js → DatePicker-B2skjsiQ.js} +2 -2
  10. package/dist/DatePicker/{DatePickerPanel-CsiEGC-1.js → DatePickerPanel-BaVC1tq2.js} +2 -2
  11. package/dist/DatePicker/index.js +3 -3
  12. package/dist/DropDown/{DropDown-BR-Tz58r.js → DropDown-m3HT_eex.js} +59 -53
  13. package/dist/DropDown/index.js +4 -4
  14. package/dist/Editor/{Buttons-DdZg3jAa.js → Buttons-Dmb3qUhz.js} +80 -78
  15. package/dist/Editor/ToolbarPlugin/Buttons/index.js +6 -6
  16. package/dist/Editor/index.js +6 -6
  17. package/dist/Select/{Select-BGsQ-PVq.js → Select-DbfUK3Dg.js} +3 -3
  18. package/dist/Select/{SelectInputSearch-CraymTXM.js → SelectInputSearch-GHYAmQ3A.js} +1 -1
  19. package/dist/Select/index.js +5 -5
  20. package/dist/Tree/index.js +1 -1
  21. package/dist/components/Calendar/context/CalendarContext.d.ts +2 -2
  22. package/dist/components/Calendar/utils/dateUtils.d.ts +14 -11
  23. package/dist/components/Calendar/utils/eventUtils.d.ts +2 -2
  24. package/dist/components/Calendar/utils/timeUtils.d.ts +3 -2
  25. package/dist/components/DatePicker/utils/pickerLocale.d.ts +1 -1
  26. package/dist/components/DropDown/interface.d.ts +4 -0
  27. package/dist/index.js +11 -11
  28. package/dist/style.css +1 -1
  29. package/dist/vendors/{ConfigProvider-aWr8b3e3.js → ConfigProvider-DCm-93oJ.js} +1 -1
  30. package/dist/vendors/{LocaleContext-CuXR7Y03.js → LocaleContext-CRlzP8UO.js} +11 -10
  31. package/dist/vendors/{Tree-BTQ25Pi7.js → Tree-CbuDVBfV.js} +61 -56
  32. package/dist/vendors/{useLocale-DvdSwM9e.js → useLocale-D9kAzQlB.js} +1 -1
  33. package/package.json +5 -2
  34. package/dist/components/DatePicker/__tests__/DatePicker.theme.test.d.ts +0 -1
  35. package/dist/components/DatePicker/__tests__/DatePickerPanel.styles.test.d.ts +0 -1
  36. package/dist/components/Segmented/__tests__/Segmented.theme.test.d.ts +0 -1
  37. /package/dist/components/{Calendar/shared/CurrentTimeIndicator/__tests__/CurrentTimeIndicator.test.d.ts → DropDown/__tests__/DropDown.test.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import "../../vendors/LocaleContext-CuXR7Y03.js";
2
- import "../../vendors/ConfigProvider-aWr8b3e3.js";
1
+ import "../../vendors/LocaleContext-CRlzP8UO.js";
2
+ import "../../vendors/ConfigProvider-DCm-93oJ.js";
3
3
  import "../AmapContext-JaYk1a3H.js";
4
- import { t as e } from "../AmapProvider-BgGnih_w.js";
4
+ import { t as e } from "../AmapProvider-CTn2CH8s.js";
5
5
  export { e as AmapProvider, e as default };
@@ -1,4 +1,4 @@
1
- import { n as e } from "../vendors/ConfigProvider-aWr8b3e3.js";
1
+ import { n as e } from "../vendors/ConfigProvider-DCm-93oJ.js";
2
2
  import { n as t } from "./AmapContext-JaYk1a3H.js";
3
3
  import { Fragment as n, jsx as r } from "react/jsx-runtime";
4
4
  import { useEffect as i, useState as a } from "react";
@@ -1,7 +1,7 @@
1
- import "../vendors/LocaleContext-CuXR7Y03.js";
2
- import "../vendors/ConfigProvider-aWr8b3e3.js";
1
+ import "../vendors/LocaleContext-CRlzP8UO.js";
2
+ import "../vendors/ConfigProvider-DCm-93oJ.js";
3
3
  import "./AmapContext-JaYk1a3H.js";
4
- import { t as e } from "./AmapProvider-BgGnih_w.js";
4
+ import { t as e } from "./AmapProvider-CTn2CH8s.js";
5
5
  import { t } from "./Amap-DL5dLiUm.js";
6
6
  import { n, t as r } from "./hooks-D1m8KgVM.js";
7
7
  import { t as i } from "./AmapCircle-mh92P2l6.js";
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
- import { t } from "../vendors/useLocale-DvdSwM9e.js";
2
+ import { t } from "../vendors/useLocale-D9kAzQlB.js";
3
3
  import { t as n } from "../Segmented/Segmented-BTW445jc.js";
4
4
  import { t as r } from "../Tooltip/Tooltip-RkD8fs0B.js";
5
5
  import { i, n as a, r as o, t as s } from "./context-DNOJ9LW_.js";
6
- import { t as c } from "../DatePicker/DatePicker-BIxiJQ_W.js";
6
+ import { t as c } from "../DatePicker/DatePicker-B2skjsiQ.js";
7
7
  import { C as l, S as u, _ as d, a as f, b as p, d as m, i as h, o as g, p as _, r as v, s as y, t as b, x, y as S } from "./layout-DvWx_7gn.js";
8
8
  import { addDays as C, addMonths as ee, addWeeks as te, formatCalendarDayNumber as ne, formatFullDate as w, formatWeekEndDate as T, formatYearMonth as E, getCurrentTimeInTZ as D, getDynamicMonthViewDates as O, getTimeZoneLabel as k, getTotalHeight as A, getVisibleRangeByMode as re, getWeekEnd as ie, getWeekStart as j, getZoomConfig as M, isCurrentMonth as N, layoutTimedEventsForWeek as P } from "./utils/index.js";
9
9
  import { t as F } from "./TimeAxis-gKb8dTwY.js";
@@ -1,12 +1,12 @@
1
1
  import "../Icon/Icon-BQ3Whub2.js";
2
- import "../vendors/LocaleContext-CuXR7Y03.js";
2
+ import "../vendors/LocaleContext-CRlzP8UO.js";
3
3
  import "../vendors/useFloatingOverlay-uxlI1G-V.js";
4
- import "../vendors/useLocale-DvdSwM9e.js";
4
+ import "../vendors/useLocale-D9kAzQlB.js";
5
5
  import "../Segmented/Segmented-BTW445jc.js";
6
6
  import "../Tooltip/Tooltip-RkD8fs0B.js";
7
7
  import "./context-DNOJ9LW_.js";
8
- import { t as e } from "./Calendar-CAG1Fxlh.js";
9
- import "../DatePicker/DatePicker-BIxiJQ_W.js";
8
+ import { t as e } from "./Calendar-BIjk9zys.js";
9
+ import "../DatePicker/DatePicker-B2skjsiQ.js";
10
10
  import "../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
11
11
  import "../DatePicker/pickerLocale-VqSP_iIm.js";
12
12
  import "../DatePicker/style-DZaSSoNs.js";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { t } from "../vendors/useFloatingOverlay-uxlI1G-V.js";
3
- import { t as n } from "../vendors/useLocale-DvdSwM9e.js";
3
+ import { t as n } from "../vendors/useLocale-D9kAzQlB.js";
4
4
  import { t as r } from "../vendors/color-BeQo449h.js";
5
5
  import { n as i } from "../vendors/animations-BmT0HT5q.js";
6
6
  import { isArray as a } from "lodash-es";
@@ -1,7 +1,7 @@
1
1
  import "../Icon/Icon-BQ3Whub2.js";
2
- import "../vendors/LocaleContext-CuXR7Y03.js";
3
- import { n as e, t } from "./ColorPicker-CKqNqAsK.js";
2
+ import "../vendors/LocaleContext-CRlzP8UO.js";
3
+ import { n as e, t } from "./ColorPicker-BNPxmfw_.js";
4
4
  import "../vendors/useFloatingOverlay-uxlI1G-V.js";
5
- import "../vendors/useLocale-DvdSwM9e.js";
5
+ import "../vendors/useLocale-D9kAzQlB.js";
6
6
  import "../vendors/color-BeQo449h.js";
7
7
  export { e as COLOR_OPTIONS_RGBA, t as default };
@@ -1,3 +1,3 @@
1
- import "../vendors/LocaleContext-CuXR7Y03.js";
2
- import { n as e, t } from "../vendors/ConfigProvider-aWr8b3e3.js";
1
+ import "../vendors/LocaleContext-CRlzP8UO.js";
2
+ import { n as e, t } from "../vendors/ConfigProvider-DCm-93oJ.js";
3
3
  export { t as ConfigProvider, t as default, e as useConfig };
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "../vendors/useFloatingOverlay-uxlI1G-V.js";
2
- import { t } from "../vendors/useLocale-DvdSwM9e.js";
2
+ import { t } from "../vendors/useLocale-D9kAzQlB.js";
3
3
  import { n } from "../vendors/animations-BmT0HT5q.js";
4
4
  import { t as r } from "./ensureDayjsPlugins-DZjJnZgo.js";
5
5
  import { n as i } from "./pickerLocale-VqSP_iIm.js";
@@ -36,7 +36,7 @@ var b = {
36
36
  "bsy-date-picker__content": "_bsy-date-picker__content_legiv_33",
37
37
  "bsy-date-picker__divider": "_bsy-date-picker__divider_legiv_43",
38
38
  "bsy-date-picker__panel-loading": "_bsy-date-picker__panel-loading_legiv_49"
39
- }, w = f(() => import("./DatePickerPanel-CsiEGC-1.js"));
39
+ }, w = f(() => import("./DatePickerPanel-BaVC1tq2.js"));
40
40
  r();
41
41
  var T = (r) => {
42
42
  let { children: f, picker: b = "date", theme: T } = r, { locale: E } = t(), [D, O] = h(r, {
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
- import "../vendors/LocaleContext-CuXR7Y03.js";
3
- import { t } from "../vendors/useLocale-DvdSwM9e.js";
2
+ import "../vendors/LocaleContext-CRlzP8UO.js";
3
+ import { t } from "../vendors/useLocale-D9kAzQlB.js";
4
4
  import { t as n } from "./pickerLocale-VqSP_iIm.js";
5
5
  import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import { useCallback as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
@@ -1,7 +1,7 @@
1
- import "../vendors/LocaleContext-CuXR7Y03.js";
1
+ import "../vendors/LocaleContext-CRlzP8UO.js";
2
2
  import "../vendors/useFloatingOverlay-uxlI1G-V.js";
3
- import "../vendors/useLocale-DvdSwM9e.js";
4
- import { t as e } from "./DatePicker-BIxiJQ_W.js";
3
+ import "../vendors/useLocale-D9kAzQlB.js";
4
+ import { t as e } from "./DatePicker-B2skjsiQ.js";
5
5
  import "./ensureDayjsPlugins-DZjJnZgo.js";
6
6
  import "./pickerLocale-VqSP_iIm.js";
7
7
  import "./style-DZaSSoNs.js";
@@ -1,6 +1,6 @@
1
- import { t as e } from "../vendors/useLocale-DvdSwM9e.js";
1
+ import { t as e } from "../vendors/useLocale-D9kAzQlB.js";
2
2
  import { n as t } from "../vendors/animations-BmT0HT5q.js";
3
- import { t as n } from "../Select/SelectInputSearch-CraymTXM.js";
3
+ import { t as n } from "../Select/SelectInputSearch-GHYAmQ3A.js";
4
4
  import { t as r } from "../NotFoundContent/NotFoundContent-7xV-zOG2.js";
5
5
  import { t as i } from "../vendors/useFloatingPortal-DsEtsAGW.js";
6
6
  import { isEmpty as a, isNumber as o } from "lodash-es";
@@ -92,70 +92,76 @@ k.displayName = "BsyDropDownMenuList";
92
92
  //#endregion
93
93
  //#region src/components/DropDown/DropDown.tsx
94
94
  var A = (r) => {
95
- let { t: a } = e(), { children: f, menus: p, onClick: h, onSearch: b, searchKey: C = "label", showSearch: w = !0, closeOnSelect: T = !0, searchPlaceholder: E = a("search"), offset: O = {
95
+ let { t: a } = e(), { children: f, menus: h, onClick: b, onSearch: C, searchKey: w = "label", showSearch: T = !0, closeOnSelect: E = !0, searchPlaceholder: O = a("search"), offset: A = {
96
96
  x: 0,
97
97
  y: 0
98
- }, zIndex: A = 1101, style: j, activeKey: M = [] } = r, [N, P] = g(r, {
98
+ }, zIndex: j = 1101, style: M, activeKey: N = [], getPopupContainer: P } = r, [F, I] = g(r, {
99
99
  valuePropName: "visible",
100
100
  defaultValue: !1,
101
101
  trigger: "onOpenChange"
102
- }), [F, I] = m(""), L = () => {
103
- P(!N);
104
- }, R = () => {
105
- P(!1);
106
- }, z = (e) => {
107
- e.disabled || (h?.(e), T && R());
108
- }, B = (e) => {
109
- I(e), b?.(e);
110
- }, { filteredMenus: V, hasNoResults: H } = S({
111
- menus: p,
112
- searchValue: F,
113
- enableInternalFilter: !b,
114
- searchKey: C
115
- }), { refs: U, floatingStyles: W, getReferenceProps: G, getFloatingProps: K } = i({
116
- isOpen: N,
117
- close: R,
102
+ }), [L, R] = m(""), z = () => {
103
+ I(!F);
104
+ }, B = () => {
105
+ I(!1);
106
+ }, V = (e) => {
107
+ e.disabled || (b?.(e), E && B());
108
+ }, H = (e) => {
109
+ R(e), C?.(e);
110
+ }, { filteredMenus: U, hasNoResults: W } = S({
111
+ menus: h,
112
+ searchValue: L,
113
+ enableInternalFilter: !C,
114
+ searchKey: w
115
+ }), { refs: G, floatingStyles: K, getReferenceProps: q, getFloatingProps: J } = i({
116
+ isOpen: F,
117
+ close: B,
118
118
  showMask: !1,
119
- zIndex: A,
119
+ zIndex: j,
120
120
  offset: {
121
- x: o(O.x) ? O.x : 0,
122
- y: o(O.y) ? O.y : 0
121
+ x: o(A.x) ? A.x : 0,
122
+ y: o(A.y) ? A.y : 0
123
123
  }
124
124
  });
125
125
  return /* @__PURE__ */ l(s, { children: [d(f) ? u(f, {
126
- ...G(),
127
- ref: U.setReference,
126
+ ...q(),
127
+ ref: G.setReference,
128
128
  onClick: (e) => {
129
- L(), f.props.onClick?.(e);
129
+ z(), f.props.onClick?.(e);
130
130
  }
131
- }) : f, /* @__PURE__ */ c(y, { children: /* @__PURE__ */ c(_, { children: N && /* @__PURE__ */ c("div", {
132
- ref: U.setFloating,
133
- ...K(),
134
- style: W,
135
- children: /* @__PURE__ */ c(v.div, {
136
- ...t,
137
- children: /* @__PURE__ */ l("div", {
138
- className: D.dropdown__panel,
139
- style: j,
140
- children: [w && /* @__PURE__ */ c("div", {
141
- className: D.dropdown__search,
142
- children: /* @__PURE__ */ c(n, {
143
- value: F,
144
- onChange: B,
145
- searchPlaceholder: E
146
- })
147
- }), /* @__PURE__ */ c(x, {
148
- style: { maxHeight: 300 },
149
- children: /* @__PURE__ */ c(k, {
150
- menus: V,
151
- onClick: z,
152
- hasNoResults: H,
153
- activeKey: M
154
- })
155
- })]
131
+ }) : f, /* @__PURE__ */ c(y, {
132
+ root: p(() => {
133
+ let e = F ? P?.() : void 0;
134
+ return e?.nodeType === 1 ? e : void 0;
135
+ }, [F, P]),
136
+ children: /* @__PURE__ */ c(_, { children: F && /* @__PURE__ */ c("div", {
137
+ ref: G.setFloating,
138
+ ...J(),
139
+ style: K,
140
+ children: /* @__PURE__ */ c(v.div, {
141
+ ...t,
142
+ children: /* @__PURE__ */ l("div", {
143
+ className: D.dropdown__panel,
144
+ style: M,
145
+ children: [T && /* @__PURE__ */ c("div", {
146
+ className: D.dropdown__search,
147
+ children: /* @__PURE__ */ c(n, {
148
+ value: L,
149
+ onChange: H,
150
+ searchPlaceholder: O
151
+ })
152
+ }), /* @__PURE__ */ c(x, {
153
+ style: { maxHeight: 300 },
154
+ children: /* @__PURE__ */ c(k, {
155
+ menus: U,
156
+ onClick: V,
157
+ hasNoResults: W,
158
+ activeKey: N
159
+ })
160
+ })]
161
+ })
156
162
  })
157
- })
158
- }) }) })] });
163
+ }) })
164
+ })] });
159
165
  };
160
166
  A.displayName = "BsyDropDown";
161
167
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import "../Icon/Icon-BQ3Whub2.js";
2
- import "../vendors/LocaleContext-CuXR7Y03.js";
3
- import "../vendors/useLocale-DvdSwM9e.js";
4
- import "../Select/SelectInputSearch-CraymTXM.js";
2
+ import "../vendors/LocaleContext-CRlzP8UO.js";
3
+ import "../vendors/useLocale-D9kAzQlB.js";
4
+ import "../Select/SelectInputSearch-GHYAmQ3A.js";
5
5
  import "../NotFoundContent/NotFoundContent-7xV-zOG2.js";
6
6
  import "../vendors/useFloatingPortal-DsEtsAGW.js";
7
- import { t as e } from "./DropDown-BR-Tz58r.js";
7
+ import { t as e } from "./DropDown-m3HT_eex.js";
8
8
  export { e as default };
@@ -1,28 +1,28 @@
1
1
  import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { t } from "../Modal/Modal-B5AW5GKt.js";
3
- import { t as n } from "../ColorPicker/ColorPicker-CKqNqAsK.js";
4
- import { t as r } from "../vendors/useLocale-DvdSwM9e.js";
3
+ import { t as n } from "../ColorPicker/ColorPicker-BNPxmfw_.js";
4
+ import { t as r } from "../vendors/useLocale-D9kAzQlB.js";
5
5
  import { t as i } from "../CheckBox/CheckBox-DIunYcfS.js";
6
- import { t as a } from "../DropDown/DropDown-BR-Tz58r.js";
6
+ import { t as a } from "../DropDown/DropDown-m3HT_eex.js";
7
7
  import { FONT_SIZES as o } from "./constants/index.js";
8
8
  import { AlignCenterOutlined as s, AlignLeftOutlined as c, AlignRightOutlined as l } from "@ant-design/icons";
9
9
  import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
10
10
  import p, { createContext as m, forwardRef as h, useCallback as g, useContext as _, useImperativeHandle as v, useMemo as y, useRef as b, useState as x } from "react";
11
11
  import { Button as S, Form as C, Input as w, message as T } from "antd";
12
12
  import E from "clsx";
13
- import { AnimatePresence as D, motion as O } from "motion/react";
14
- import { $createParagraphNode as k, $createTextNode as ee, $getRoot as te, $getSelection as A, $isElementNode as j, $isRangeSelection as M, FORMAT_ELEMENT_COMMAND as N, FORMAT_TEXT_COMMAND as P, createCommand as ne } from "lexical";
15
- import { useLexicalComposerContext as F } from "@lexical/react/LexicalComposerContext";
16
- import { $patchStyleText as I } from "@lexical/selection";
17
- import { $createLinkNode as L, $toggleLink as R, TOGGLE_LINK_COMMAND as z } from "@lexical/link";
13
+ import { AnimatePresence as ee, motion as D } from "motion/react";
14
+ import { $createParagraphNode as te, $createTextNode as O, $getRoot as ne, $getSelection as k, $isElementNode as A, $isRangeSelection as j, FORMAT_ELEMENT_COMMAND as re, FORMAT_TEXT_COMMAND as M, createCommand as ie } from "lexical";
15
+ import { useLexicalComposerContext as N } from "@lexical/react/LexicalComposerContext";
16
+ import { $patchStyleText as P } from "@lexical/selection";
17
+ import { $createLinkNode as F, $toggleLink as ae, TOGGLE_LINK_COMMAND as oe } from "@lexical/link";
18
18
  //#region src/components/Editor/ToolbarPlugin/context/TextFormatsContext.tsx
19
- var B = m(null), V = {
19
+ var I = m(null), L = {
20
20
  "lexical-editor__toolbar-button": "_lexical-editor__toolbar-button_1y192_1",
21
21
  "lexical-editor__toolbar-button-active": "_lexical-editor__toolbar-button-active_1y192_7"
22
- }, H = (t) => {
22
+ }, R = (t) => {
23
23
  let { icon: n, tooltip: r, onClick: i, disabled: a = !1, active: o = !1, size: s = 14 } = t;
24
24
  return /* @__PURE__ */ d("button", {
25
- className: E(V["lexical-editor__toolbar-button"], { [V["lexical-editor__toolbar-button-active"]]: o }),
25
+ className: E(L["lexical-editor__toolbar-button"], { [L["lexical-editor__toolbar-button-active"]]: o }),
26
26
  type: "button",
27
27
  onClick: i,
28
28
  disabled: a,
@@ -32,42 +32,46 @@ var B = m(null), V = {
32
32
  size: s
33
33
  })
34
34
  });
35
- }, U = () => {
36
- let e = _(B);
35
+ }, z = () => {
36
+ let e = _(I);
37
37
  if (!e) throw Error("useTextFormatsContext must be used within TextFormatsProvider");
38
38
  return e;
39
- }, W = () => {
40
- let [e] = F(), t = U(), { t: n } = r(), i = t.bold;
41
- return /* @__PURE__ */ d(H, {
39
+ }, B = () => {
40
+ let [e] = N(), t = z(), { t: n } = r(), i = t.bold;
41
+ return /* @__PURE__ */ d(R, {
42
42
  icon: "bold",
43
43
  tooltip: n("editor.bold"),
44
44
  active: i,
45
45
  onClick: () => {
46
- e.dispatchCommand(P, "bold");
46
+ e.dispatchCommand(M, "bold");
47
47
  }
48
48
  });
49
- }, re = () => {
50
- let [e] = F(), t = U(), { t: n } = r(), i = t.underline;
51
- return /* @__PURE__ */ d(H, {
49
+ }, V = () => {
50
+ let [e] = N(), t = z(), { t: n } = r(), i = t.underline;
51
+ return /* @__PURE__ */ d(R, {
52
52
  icon: "underline",
53
53
  tooltip: n("editor.underline"),
54
54
  active: i,
55
55
  onClick: () => {
56
- e.dispatchCommand(P, "underline");
56
+ e.dispatchCommand(M, "underline");
57
57
  }
58
58
  });
59
- }, ie = () => {
60
- let [e] = F(), t = U(), { t: n } = r(), i = t.italic;
61
- return /* @__PURE__ */ d(H, {
59
+ }, H = () => {
60
+ let [e] = N(), t = z(), { t: n } = r(), i = t.italic;
61
+ return /* @__PURE__ */ d(R, {
62
62
  icon: "italic",
63
63
  tooltip: n("editor.italic"),
64
64
  active: i,
65
65
  onClick: () => {
66
- e.dispatchCommand(P, "italic");
66
+ e.dispatchCommand(M, "italic");
67
67
  }
68
68
  });
69
- }, ae = () => {
70
- let [e] = F(), t = U();
69
+ }, U = m(null), W = () => {
70
+ let e = _(U);
71
+ if (!e) throw Error("useEditorContainer must be used within EditorContainerProvider");
72
+ return e;
73
+ }, G = () => {
74
+ let [e] = N(), t = z(), { getPopupContainer: n } = W();
71
75
  return /* @__PURE__ */ d(a, {
72
76
  menus: y(() => o.map((e) => ({
73
77
  key: e.value,
@@ -76,34 +80,31 @@ var B = m(null), V = {
76
80
  onClick: g((t) => {
77
81
  let n = t.key;
78
82
  e.update(() => {
79
- let e = A();
80
- M(e) && I(e, { "font-size": n });
83
+ let e = k();
84
+ j(e) && P(e, { "font-size": n });
81
85
  });
82
86
  }, [e]),
83
87
  activeKey: [t.fontSize],
84
88
  showSearch: !1,
89
+ getPopupContainer: n,
85
90
  style: {
86
91
  width: "60px",
87
92
  minWidth: "60px"
88
93
  },
89
94
  children: /* @__PURE__ */ d("div", {
90
95
  className: "dropdown__trigger inline-flex",
91
- children: /* @__PURE__ */ d(H, {
96
+ children: /* @__PURE__ */ d(R, {
92
97
  icon: "fontsize",
93
98
  tooltip: "字号",
94
99
  active: !1
95
100
  })
96
101
  })
97
102
  });
98
- }, G = m(null), K = () => {
99
- let e = _(G);
100
- if (!e) throw Error("useEditorContainer must be used within EditorContainerProvider");
101
- return e;
102
- }, oe = () => {
103
- let [e] = F(), t = U(), { t: i } = r(), { getPopupContainer: a } = K(), o = g((t) => {
103
+ }, K = () => {
104
+ let [e] = N(), t = z(), { t: i } = r(), { getPopupContainer: a } = W(), o = g((t) => {
104
105
  e.update(() => {
105
- let e = A();
106
- M(e) && I(e, { color: t });
106
+ let e = k();
107
+ j(e) && P(e, { color: t });
107
108
  });
108
109
  }, [e]);
109
110
  return /* @__PURE__ */ d(n, {
@@ -113,7 +114,7 @@ var B = m(null), V = {
113
114
  getPopupContainer: a,
114
115
  children: /* @__PURE__ */ d("div", {
115
116
  className: "trigger-picker inline-flex",
116
- children: /* @__PURE__ */ d(H, {
117
+ children: /* @__PURE__ */ d(R, {
117
118
  icon: "fontcolor",
118
119
  tooltip: i("editor.fontColor"),
119
120
  onClick: () => {},
@@ -122,10 +123,10 @@ var B = m(null), V = {
122
123
  })
123
124
  });
124
125
  }, se = () => {
125
- let [e] = F(), t = U(), { t: i } = r(), { getPopupContainer: a } = K(), o = g((t) => {
126
+ let [e] = N(), t = z(), { t: i } = r(), { getPopupContainer: a } = W(), o = g((t) => {
126
127
  e.update(() => {
127
- let e = A();
128
- M(e) && I(e, { "background-color": t });
128
+ let e = k();
129
+ j(e) && P(e, { "background-color": t });
129
130
  });
130
131
  }, [e]);
131
132
  return /* @__PURE__ */ d(n, {
@@ -135,7 +136,7 @@ var B = m(null), V = {
135
136
  getPopupContainer: a,
136
137
  children: /* @__PURE__ */ d("div", {
137
138
  className: "trigger-picker inline-flex",
138
- children: /* @__PURE__ */ d(H, {
139
+ children: /* @__PURE__ */ d(R, {
139
140
  icon: "fill",
140
141
  tooltip: i("editor.fill"),
141
142
  onClick: () => {},
@@ -144,7 +145,7 @@ var B = m(null), V = {
144
145
  })
145
146
  });
146
147
  }, ce = () => {
147
- let [e] = F(), { align: t } = U(), { t: n } = r(), i = [
148
+ let [e] = N(), { align: t } = z(), { t: n } = r(), { getPopupContainer: i } = W(), o = [
148
149
  {
149
150
  key: "left",
150
151
  label: n("leftAlign"),
@@ -160,30 +161,31 @@ var B = m(null), V = {
160
161
  label: n("editor.rightAlign"),
161
162
  icon: /* @__PURE__ */ d(l, {})
162
163
  }
163
- ], o = g((t) => {
164
- e.dispatchCommand(N, t);
165
- }, [e]), u = i.map((e) => ({
164
+ ], u = g((t) => {
165
+ e.dispatchCommand(re, t);
166
+ }, [e]), p = o.map((e) => ({
166
167
  key: e.key,
167
168
  label: /* @__PURE__ */ f("div", {
168
169
  className: "flex items-center gap-2",
169
170
  children: [e.icon, /* @__PURE__ */ d("span", { children: e.label })]
170
171
  })
171
- })), p = g((e) => {
172
- o(e.key);
173
- }, [o]), m = i.find((e) => e.key === t)?.icon || /* @__PURE__ */ d(c, {});
172
+ })), m = g((e) => {
173
+ u(e.key);
174
+ }, [u]), h = o.find((e) => e.key === t)?.icon || /* @__PURE__ */ d(c, {});
174
175
  return /* @__PURE__ */ d(a, {
175
- menus: u,
176
- onClick: p,
176
+ menus: p,
177
+ onClick: m,
177
178
  showSearch: !1,
178
179
  activeKey: [t],
180
+ getPopupContainer: i,
179
181
  style: {
180
182
  width: "110px",
181
183
  minWidth: "110px"
182
184
  },
183
185
  children: /* @__PURE__ */ d("div", {
184
186
  className: "trigger-dropdown inline-flex text-sm",
185
- children: /* @__PURE__ */ d(H, {
186
- icon: m,
187
+ children: /* @__PURE__ */ d(R, {
188
+ icon: h,
187
189
  tooltip: n("editor.alignment"),
188
190
  onClick: () => {},
189
191
  active: !1
@@ -191,7 +193,7 @@ var B = m(null), V = {
191
193
  })
192
194
  });
193
195
  }, le = () => {
194
- let [e] = F(), { link: n } = U(), { t: a } = r(), [o, s] = x(!1), [c, l] = x(""), [p, m] = x(""), [h, _] = x(!0), [v, y] = T.useMessage(), b = g((e) => e ? e.startsWith("@") ? "javascript:void(0);" : e.match(/^https?:\/\//) ? e : `http://${e}` : "", []), C = () => {
196
+ let [e] = N(), { link: n } = z(), { t: a } = r(), [o, s] = x(!1), [c, l] = x(""), [p, m] = x(""), [h, _] = x(!0), [v, y] = T.useMessage(), b = g((e) => e ? e.startsWith("@") ? "javascript:void(0);" : e.match(/^https?:\/\//) ? e : `http://${e}` : "", []), C = () => {
195
197
  if (!c) {
196
198
  v.warning(a("editor.linkAddressEmpty"));
197
199
  return;
@@ -202,14 +204,14 @@ var B = m(null), V = {
202
204
  target: "_blank",
203
205
  rel: "noopener noreferrer",
204
206
  title: c
205
- } : { title: c }, n = A(), r = L(t, e), i = ee(p || c);
206
- if (M(n)) n.isCollapsed() ? (r.append(i), n.insertNodes([r])) : R(t);
207
+ } : { title: c }, n = k(), r = F(t, e), i = O(p || c);
208
+ if (j(n)) n.isCollapsed() ? (r.append(i), n.insertNodes([r])) : ae(t);
207
209
  else {
208
210
  r.append(i);
209
- let e = te(), t = e.getLastChild();
210
- if (j(t) && t.isEmpty()) t.append(r);
211
+ let e = ne(), t = e.getLastChild();
212
+ if (A(t) && t.isEmpty()) t.append(r);
211
213
  else {
212
- let t = k();
214
+ let t = te();
213
215
  t.append(r), e.append(t);
214
216
  }
215
217
  }
@@ -218,7 +220,7 @@ var B = m(null), V = {
218
220
  n ? (l(n.link === "javascript:void(0);" ? "" : n.link), m(n.linkText)) : (l(""), m("")), s(!0);
219
221
  }, [n]);
220
222
  return /* @__PURE__ */ f(u, { children: [
221
- /* @__PURE__ */ d(H, {
223
+ /* @__PURE__ */ d(R, {
222
224
  icon: "Insertlink",
223
225
  tooltip: a("link"),
224
226
  onClick: E,
@@ -282,12 +284,12 @@ var B = m(null), V = {
282
284
  })
283
285
  ] });
284
286
  }, ue = () => {
285
- let [e] = F(), { link: t } = U(), { t: n } = r();
286
- return /* @__PURE__ */ d(H, {
287
+ let [e] = N(), { link: t } = z(), { t: n } = r();
288
+ return /* @__PURE__ */ d(R, {
287
289
  icon: "cancellink",
288
290
  tooltip: n("cancelLink"),
289
291
  onClick: () => {
290
- t && e.dispatchCommand(z, null);
292
+ t && e.dispatchCommand(oe, null);
291
293
  }
292
294
  });
293
295
  }, q = {
@@ -391,9 +393,9 @@ var Y = h((t, n) => {
391
393
  children: h("editor.clickOrDragToUpload")
392
394
  })]
393
395
  }),
394
- /* @__PURE__ */ d(D, {
396
+ /* @__PURE__ */ d(ee, {
395
397
  mode: "wait",
396
- children: i && c && /* @__PURE__ */ f(O.div, {
398
+ children: i && c && /* @__PURE__ */ f(D.div, {
397
399
  className: q["picture-modal__preview"],
398
400
  initial: {
399
401
  opacity: 0,
@@ -420,7 +422,7 @@ var Y = h((t, n) => {
420
422
  ]
421
423
  },
422
424
  children: [
423
- /* @__PURE__ */ d(O.div, {
425
+ /* @__PURE__ */ d(D.div, {
424
426
  className: q["picture-modal__preview-image"],
425
427
  initial: {
426
428
  opacity: 0,
@@ -443,7 +445,7 @@ var Y = h((t, n) => {
443
445
  alt: h("editor.previewImage")
444
446
  })
445
447
  }),
446
- /* @__PURE__ */ f(O.div, {
448
+ /* @__PURE__ */ f(D.div, {
447
449
  className: q["picture-modal__preview-info"],
448
450
  initial: {
449
451
  opacity: 0,
@@ -465,7 +467,7 @@ var Y = h((t, n) => {
465
467
  children: g(c.size)
466
468
  })]
467
469
  }),
468
- /* @__PURE__ */ d(O.div, {
470
+ /* @__PURE__ */ d(D.div, {
469
471
  className: q["picture-modal__preview-delete"],
470
472
  role: "button",
471
473
  onClick: () => {
@@ -504,8 +506,8 @@ var Y = h((t, n) => {
504
506
  Y.displayName = "UploadImage";
505
507
  //#endregion
506
508
  //#region src/components/Editor/commands/ImageCommands.ts
507
- var X = ne("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
508
- let { t: n } = r(), [i] = F(), [a, o] = x(!1), s = b(null), c = b(null), l = [{
509
+ var X = ie("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
510
+ let { t: n } = r(), [i] = N(), [a, o] = x(!1), s = b(null), c = b(null), l = [{
509
511
  key: "upload",
510
512
  title: n("editor.uploadImage"),
511
513
  icon: /* @__PURE__ */ d(e, { name: "picture" })
@@ -531,7 +533,7 @@ var X = ne("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
531
533
  upload: /* @__PURE__ */ d(Y, { ref: c }),
532
534
  url: /* @__PURE__ */ d(J, { ref: s })
533
535
  };
534
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(H, {
536
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(R, {
535
537
  icon: "picture",
536
538
  tooltip: n("picture"),
537
539
  onClick: () => o(!0)
@@ -580,11 +582,11 @@ var X = ne("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
580
582
  }, fe = (e) => {
581
583
  Z.delete(e);
582
584
  }, pe = (e) => Z.get(e), me = () => Array.from(Z.keys()), $ = {
583
- bold: W,
584
- underline: re,
585
- italic: ie,
586
- fontSize: ae,
587
- fontColor: oe,
585
+ bold: B,
586
+ underline: V,
587
+ italic: H,
588
+ fontSize: G,
589
+ fontColor: K,
588
590
  fill: se,
589
591
  align: ce,
590
592
  link: le,
@@ -595,4 +597,4 @@ Object.entries($).forEach(([e, t]) => {
595
597
  Q(e, t);
596
598
  });
597
599
  //#endregion
598
- export { fe as a, H as c, Q as i, B as l, pe as n, X as o, me as r, G as s, $ as t };
600
+ export { fe as a, R as c, Q as i, I as l, pe as n, X as o, me as r, U as s, $ as t };