@baishuyun/ui-base 6.7.3 → 6.8.2

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 (102) 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 +4 -4
  5. package/dist/Amap/{AmapProvider-DSjQj2oA.js → AmapProvider-Cwi6WOe0.js} +1 -1
  6. package/dist/Amap/hooks/index.js +1 -1
  7. package/dist/Amap/index.js +4 -4
  8. package/dist/Calendar/{Calendar-C2iO_3cX.js → Calendar-DnQrN8KB.js} +2 -2
  9. package/dist/Calendar/context/index.js +1 -1
  10. package/dist/Calendar/index.js +5 -5
  11. package/dist/Calendar/subcomponents/AllDaySection/index.js +1 -1
  12. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +1 -1
  13. package/dist/Calendar/subcomponents/EventCard/index.js +1 -1
  14. package/dist/Calendar/subcomponents/TimeAxis/index.js +1 -1
  15. package/dist/Calendar/subcomponents/TimeGrid/index.js +1 -1
  16. package/dist/Calendar/utils/index.js +1 -1
  17. package/dist/Calendar/utils/layout/index.js +1 -1
  18. package/dist/Calendar/utils/theme/index.js +1 -1
  19. package/dist/Card/index.js +1 -1
  20. package/dist/CheckBox/index.js +1 -1
  21. package/dist/ColorPicker/{ColorPicker-BtTIb9tX.js → ColorPicker-CL57cSDG.js} +2 -1
  22. package/dist/ColorPicker/index.js +4 -4
  23. package/dist/ConfigProvider/index.js +3 -3
  24. package/dist/DatePicker/{DatePicker-BMTK0Phw.js → DatePicker-C0XbZmrZ.js} +2 -2
  25. package/dist/DatePicker/{DatePickerPanel-BH_Z4e88.js → DatePickerPanel-BEn16cat.js} +3 -3
  26. package/dist/DatePicker/index.js +4 -4
  27. package/dist/DatePicker/style/index.js +1 -1
  28. package/dist/DropDown/{DropDown-CdTjlySd.js → DropDown-yDH9V_9Y.js} +2 -2
  29. package/dist/DropDown/index.js +5 -5
  30. package/dist/DropDown/style/index.js +1 -1
  31. package/dist/Editor/{Buttons-BcP66z6E.js → Buttons-BivKInBV.js} +144 -124
  32. package/dist/Editor/ToolbarPlugin/Buttons/index.js +7 -7
  33. package/dist/Editor/constants/index.js +1 -1
  34. package/dist/Editor/index.js +274 -164
  35. package/dist/Gantt/GanttChart/index.js +7 -7
  36. package/dist/Gantt/{GanttChart-BYzMKcZ2.js → GanttChart-CDw1IQ4F.js} +2 -2
  37. package/dist/Gantt/GanttTable/index.js +5 -5
  38. package/dist/Gantt/{GanttTable-DqJziqML.js → GanttTable-xbXD_PWI.js} +1 -1
  39. package/dist/Gantt/GanttToolBar/index.js +6 -6
  40. package/dist/Gantt/{GanttToolBar-C50n7PD9.js → GanttToolBar-BTeTsR6Z.js} +2 -2
  41. package/dist/Gantt/index.js +9 -9
  42. package/dist/Gantt/utils/index.js +1 -1
  43. package/dist/Gantt/utils/theme/index.js +1 -1
  44. package/dist/Icon/index.js +1 -1
  45. package/dist/InputTag/InputTag-hzCCJQ1z.js +144 -0
  46. package/dist/InputTag/index.js +4 -2
  47. package/dist/Loading/Loading-DiywS7ex.js +19 -0
  48. package/dist/Loading/index.js +4 -2
  49. package/dist/Modal/index.js +1 -1
  50. package/dist/NotFoundContent/index.js +1 -1
  51. package/dist/Radio/{Radio-DSoZotcs.js → Radio-CX9cUqb7.js} +12 -12
  52. package/dist/Radio/index.js +2 -2
  53. package/dist/ScrollBar/index.js +1 -1
  54. package/dist/Segmented/index.js +1 -1
  55. package/dist/Select/{Select-DujgkkUp.js → Select-D6EK7whJ.js} +195 -194
  56. package/dist/Select/{SelectInputSearch-Bikrj3FI.js → SelectInputSearch-COUzreau.js} +1 -1
  57. package/dist/Select/index.js +7 -7
  58. package/dist/Table/{Table-k9wdWm6V.js → Table-yQXQEk6d.js} +1 -1
  59. package/dist/Table/hooks/index.js +1 -1
  60. package/dist/Table/index.js +4 -4
  61. package/dist/Table/style/index.js +1 -1
  62. package/dist/Table/utils/index.js +1 -1
  63. package/dist/Tabs/Tabs-BiKW70CL.js +398 -0
  64. package/dist/Tabs/index.js +4 -2
  65. package/dist/Tooltip/index.js +1 -1
  66. package/dist/Tree/index.js +3 -3
  67. package/dist/Tree/utils/index.js +1 -1
  68. package/dist/components/DropDown/interface.d.ts +167 -169
  69. package/dist/components/Editor/LengthBadge.d.ts +6 -0
  70. package/dist/components/Editor/ToolbarPlugin/BaseButton/BaseButton.d.ts +1 -1
  71. package/dist/components/Editor/ToolbarPlugin/ToolbarPlugin.d.ts +5 -1
  72. package/dist/components/Editor/ToolbarPlugin/context/EditorToolbarThemeContext.d.ts +6 -0
  73. package/dist/components/Editor/ToolbarPlugin/interface.d.ts +30 -32
  74. package/dist/components/Editor/index.d.ts +1 -1
  75. package/dist/components/Editor/interface.d.ts +118 -60
  76. package/dist/components/Editor/plugins/MaxLengthPlugin.d.ts +7 -0
  77. package/dist/components/Editor/utils/resolveEditorToolbarThemeVars.d.ts +5 -0
  78. package/dist/components/Editor/utils/textLength.d.ts +4 -0
  79. package/dist/components/InputTag/interface.d.ts +32 -32
  80. package/dist/components/Radio/interface.d.ts +95 -97
  81. package/dist/components/Tabs/TabSelect/interface.d.ts +23 -25
  82. package/dist/components/Tabs/interface.d.ts +58 -60
  83. package/dist/components/Tree/types/node.d.ts +19 -19
  84. package/dist/components/Tree/types/tree.d.ts +81 -83
  85. package/dist/components/index.d.ts +2 -0
  86. package/dist/index.js +18 -18
  87. package/dist/locale/index.d.ts +1 -1
  88. package/dist/locale/lang/en-US.json.d.ts +177 -166
  89. package/dist/locale/lang/zh-CN.json.d.ts +177 -166
  90. package/dist/locale/lang/zh-TW.json.d.ts +177 -166
  91. package/dist/style.css +1 -1
  92. package/dist/vendors/{ConfigProvider-C3Uwzinj.js → ConfigProvider-DxrZpdIb.js} +23 -1
  93. package/dist/vendors/{LocaleContext-B1HuhJc-.js → LocaleContext-Dcw6C1LX.js} +11 -0
  94. package/dist/vendors/{Tree-DQkpLl6f.js → Tree-DXmVRDn0.js} +8 -7
  95. package/dist/vendors/{useLocale-BYtF5pxt.js → useLocale-BKZX2_zw.js} +1 -1
  96. package/dist/vendors/{version-Dkos5Cha.js → version-4HBYLKDL.js} +1 -1
  97. package/dist/vite-env.d.ts +13 -13
  98. package/dist/vitest-matchers.d.ts +0 -1
  99. package/package.json +8 -8
  100. package/dist/InputTag/InputTag-LnUqz0Hz.js +0 -143
  101. package/dist/Loading/Loading-CcTZogVx.js +0 -15
  102. package/dist/Tabs/Tabs-Ctgg45Ox.js +0 -410
@@ -1,77 +1,78 @@
1
1
  import { t as e } from "../Icon/Icon-BBDcb-yw.js";
2
2
  import { t } from "../Modal/Modal-LiztSF7x.js";
3
- import { t as n } from "../ColorPicker/ColorPicker-BtTIb9tX.js";
4
- import { t as r } from "../vendors/useLocale-BYtF5pxt.js";
3
+ import { t as n } from "../ColorPicker/ColorPicker-CL57cSDG.js";
4
+ import { t as r } from "../vendors/useLocale-BKZX2_zw.js";
5
5
  import { t as i } from "../CheckBox/CheckBox-nBm0u6zX.js";
6
- import { t as a } from "../DropDown/DropDown-CdTjlySd.js";
6
+ import { t as a } from "../DropDown/DropDown-yDH9V_9Y.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 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";
13
+ import { AnimatePresence as D, motion as O } from "motion/react";
14
+ import { $createParagraphNode as ee, $createTextNode as k, $getRoot as A, $getSelection as j, $isElementNode as te, $isRangeSelection as M, $isTextNode as N, $setSelection as P, FORMAT_ELEMENT_COMMAND as F, FORMAT_TEXT_COMMAND as I, createCommand as ne } from "lexical";
15
+ import { useLexicalComposerContext as L } from "@lexical/react/LexicalComposerContext";
16
+ import { $patchStyleText as R } from "@lexical/selection";
17
+ import { $createLinkNode as z, $toggleLink as re, TOGGLE_LINK_COMMAND as ie } from "@lexical/link";
18
18
  //#region src/components/Editor/ToolbarPlugin/context/TextFormatsContext.tsx
19
- var I = m(null), L = {
20
- "lexical-editor__toolbar-button": "_lexical-editor__toolbar-button_1y192_1",
21
- "lexical-editor__toolbar-button-active": "_lexical-editor__toolbar-button-active_1y192_7"
22
- }, R = (t) => {
23
- let { icon: n, tooltip: r, onClick: i, disabled: a = !1, active: o = !1, size: s = 14 } = t;
19
+ var B = m(null), V = m({ iconSize: 14 }), ae = V.Provider, oe = () => _(V), H = {
20
+ "lexical-editor__toolbar-button": "_lexical-editor__toolbar-button_gbe3v_1",
21
+ "lexical-editor__toolbar-button-active": "_lexical-editor__toolbar-button-active_gbe3v_12"
22
+ }, U = (t) => {
23
+ let { icon: n, tooltip: r, onClick: i, disabled: a = !1, active: o = !1, size: s } = t, { iconSize: c } = oe(), l = s ?? c;
24
24
  return /* @__PURE__ */ d("button", {
25
- className: E(L["lexical-editor__toolbar-button"], { [L["lexical-editor__toolbar-button-active"]]: o }),
25
+ className: E(H["lexical-editor__toolbar-button"], { [H["lexical-editor__toolbar-button-active"]]: o }),
26
26
  type: "button",
27
27
  onClick: i,
28
+ onMouseDown: (e) => e.preventDefault(),
28
29
  disabled: a,
29
30
  title: r,
30
31
  children: p.isValidElement(n) ? n : /* @__PURE__ */ d(e, {
31
32
  name: n,
32
- size: s
33
+ size: l
33
34
  })
34
35
  });
35
- }, z = () => {
36
- let e = _(I);
36
+ }, W = () => {
37
+ let e = _(B);
37
38
  if (!e) throw Error("useTextFormatsContext must be used within TextFormatsProvider");
38
39
  return e;
39
- }, B = () => {
40
- let [e] = N(), t = z(), { t: n } = r(), i = t.bold;
41
- return /* @__PURE__ */ d(R, {
40
+ }, se = () => {
41
+ let [e] = L(), t = W(), { t: n } = r(), i = t.bold;
42
+ return /* @__PURE__ */ d(U, {
42
43
  icon: "bold",
43
44
  tooltip: n("editor.bold"),
44
45
  active: i,
45
46
  onClick: () => {
46
- e.dispatchCommand(M, "bold");
47
+ e.dispatchCommand(I, "bold");
47
48
  }
48
49
  });
49
- }, V = () => {
50
- let [e] = N(), t = z(), { t: n } = r(), i = t.underline;
51
- return /* @__PURE__ */ d(R, {
50
+ }, ce = () => {
51
+ let [e] = L(), t = W(), { t: n } = r(), i = t.underline;
52
+ return /* @__PURE__ */ d(U, {
52
53
  icon: "underline",
53
54
  tooltip: n("editor.underline"),
54
55
  active: i,
55
56
  onClick: () => {
56
- e.dispatchCommand(M, "underline");
57
+ e.dispatchCommand(I, "underline");
57
58
  }
58
59
  });
59
- }, H = () => {
60
- let [e] = N(), t = z(), { t: n } = r(), i = t.italic;
61
- return /* @__PURE__ */ d(R, {
60
+ }, le = () => {
61
+ let [e] = L(), t = W(), { t: n } = r(), i = t.italic;
62
+ return /* @__PURE__ */ d(U, {
62
63
  icon: "italic",
63
64
  tooltip: n("editor.italic"),
64
65
  active: i,
65
66
  onClick: () => {
66
- e.dispatchCommand(M, "italic");
67
+ e.dispatchCommand(I, "italic");
67
68
  }
68
69
  });
69
- }, U = m(null), W = () => {
70
- let e = _(U);
70
+ }, G = m(null), K = () => {
71
+ let e = _(G);
71
72
  if (!e) throw Error("useEditorContainer must be used within EditorContainerProvider");
72
73
  return e;
73
- }, G = () => {
74
- let [e] = N(), t = z(), { getPopupContainer: n } = W();
74
+ }, ue = () => {
75
+ let [e] = L(), { t } = r(), n = W(), { getPopupContainer: i } = K();
75
76
  return /* @__PURE__ */ d(a, {
76
77
  menus: y(() => o.map((e) => ({
77
78
  key: e.value,
@@ -80,31 +81,31 @@ var I = m(null), L = {
80
81
  onClick: g((t) => {
81
82
  let n = t.key;
82
83
  e.update(() => {
83
- let e = k();
84
- j(e) && P(e, { "font-size": n });
84
+ let e = j();
85
+ M(e) && R(e, { "font-size": n });
85
86
  });
86
87
  }, [e]),
87
- activeKey: [t.fontSize],
88
+ activeKey: [n.fontSize],
88
89
  showSearch: !1,
89
- getPopupContainer: n,
90
+ getPopupContainer: i,
90
91
  style: {
91
92
  width: "60px",
92
93
  minWidth: "60px"
93
94
  },
94
95
  children: /* @__PURE__ */ d("div", {
95
96
  className: "dropdown__trigger inline-flex",
96
- children: /* @__PURE__ */ d(R, {
97
+ children: /* @__PURE__ */ d(U, {
97
98
  icon: "fontsize",
98
- tooltip: "字号",
99
+ tooltip: t("editor.fontSize"),
99
100
  active: !1
100
101
  })
101
102
  })
102
103
  });
103
- }, K = () => {
104
- let [e] = N(), t = z(), { t: i } = r(), { getPopupContainer: a } = W(), o = g((t) => {
104
+ }, de = () => {
105
+ let [e] = L(), t = W(), { t: i } = r(), { getPopupContainer: a } = K(), o = g((t) => {
105
106
  e.update(() => {
106
- let e = k();
107
- j(e) && P(e, { color: t });
107
+ let e = j();
108
+ M(e) && R(e, { color: t });
108
109
  });
109
110
  }, [e]);
110
111
  return /* @__PURE__ */ d(n, {
@@ -114,7 +115,7 @@ var I = m(null), L = {
114
115
  getPopupContainer: a,
115
116
  children: /* @__PURE__ */ d("div", {
116
117
  className: "trigger-picker inline-flex",
117
- children: /* @__PURE__ */ d(R, {
118
+ children: /* @__PURE__ */ d(U, {
118
119
  icon: "fontcolor",
119
120
  tooltip: i("editor.fontColor"),
120
121
  onClick: () => {},
@@ -122,11 +123,11 @@ var I = m(null), L = {
122
123
  })
123
124
  })
124
125
  });
125
- }, se = () => {
126
- let [e] = N(), t = z(), { t: i } = r(), { getPopupContainer: a } = W(), o = g((t) => {
126
+ }, fe = () => {
127
+ let [e] = L(), t = W(), { t: i } = r(), { getPopupContainer: a } = K(), o = g((t) => {
127
128
  e.update(() => {
128
- let e = k();
129
- j(e) && P(e, { "background-color": t });
129
+ let e = j();
130
+ M(e) && R(e, { "background-color": t });
130
131
  });
131
132
  }, [e]);
132
133
  return /* @__PURE__ */ d(n, {
@@ -136,7 +137,7 @@ var I = m(null), L = {
136
137
  getPopupContainer: a,
137
138
  children: /* @__PURE__ */ d("div", {
138
139
  className: "trigger-picker inline-flex",
139
- children: /* @__PURE__ */ d(R, {
140
+ children: /* @__PURE__ */ d(U, {
140
141
  icon: "fill",
141
142
  tooltip: i("editor.fill"),
142
143
  onClick: () => {},
@@ -144,8 +145,8 @@ var I = m(null), L = {
144
145
  })
145
146
  })
146
147
  });
147
- }, ce = () => {
148
- let [e] = N(), { align: t } = z(), { t: n } = r(), { getPopupContainer: i } = W(), o = [
148
+ }, pe = () => {
149
+ let [e] = L(), { align: t } = W(), { t: n } = r(), { getPopupContainer: i } = K(), o = [
149
150
  {
150
151
  key: "left",
151
152
  label: n("leftAlign"),
@@ -162,7 +163,7 @@ var I = m(null), L = {
162
163
  icon: /* @__PURE__ */ d(l, {})
163
164
  }
164
165
  ], u = g((t) => {
165
- e.dispatchCommand(re, t);
166
+ e.dispatchCommand(F, t);
166
167
  }, [e]), p = o.map((e) => ({
167
168
  key: e.key,
168
169
  label: /* @__PURE__ */ f("div", {
@@ -184,7 +185,7 @@ var I = m(null), L = {
184
185
  },
185
186
  children: /* @__PURE__ */ d("div", {
186
187
  className: "trigger-dropdown inline-flex text-sm",
187
- children: /* @__PURE__ */ d(R, {
188
+ children: /* @__PURE__ */ d(U, {
188
189
  icon: h,
189
190
  tooltip: n("editor.alignment"),
190
191
  onClick: () => {},
@@ -192,45 +193,68 @@ var I = m(null), L = {
192
193
  })
193
194
  })
194
195
  });
195
- }, le = () => {
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 = () => {
196
+ };
197
+ //#endregion
198
+ //#region src/components/Editor/ToolbarPlugin/Buttons/LinkButton.tsx
199
+ function me(e) {
200
+ return e ? e.startsWith("@") ? "javascript:void(0);" : e.match(/^https?:\/\//) ? e : `http://${e}` : "";
201
+ }
202
+ var he = () => {
203
+ let [e] = L(), { link: n } = W(), { t: a } = r(), [o, s] = x(!1), [c, l] = x(""), [p, m] = x(""), [h, _] = x(!0), [v, y] = T.useMessage(), C = b(null), E = g((t) => {
204
+ s(t), t || e.setEditable(!0);
205
+ }, [e]), D = () => {
197
206
  if (!c) {
198
207
  v.warning(a("editor.linkAddressEmpty"));
199
208
  return;
200
209
  }
201
- let t = b(c);
202
- e.update(() => {
210
+ let t = me(c);
211
+ e.setEditable(!0), e.update(() => {
203
212
  let e = h ? {
204
213
  target: "_blank",
205
214
  rel: "noopener noreferrer",
206
215
  title: c
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);
209
- else {
210
- r.append(i);
211
- let e = ne(), t = e.getLastChild();
212
- if (A(t) && t.isEmpty()) t.append(r);
216
+ } : { title: c }, n = C.current;
217
+ n !== null && P(n);
218
+ let r = j();
219
+ if (M(r)) {
220
+ let n = p || c, i = r.getTextContent();
221
+ if (!r.isCollapsed() && n === i) re(t, e);
213
222
  else {
214
- let t = te();
215
- t.append(r), e.append(t);
223
+ let i = r.anchor.getNode(), a = N(i) ? i : null, o = r.style || r.getNodes().find(N)?.getStyle() || a?.getStyle() || "", s = r.format || a?.getFormat() || 0, c = z(t, e), l = k(n);
224
+ l.setFormat(s), l.setStyle(o), c.append(l), r.insertNodes([c]);
225
+ }
226
+ } else {
227
+ let n = z(t, e);
228
+ n.append(k(p || c));
229
+ let r = A(), i = r.getLastChild();
230
+ if (te(i) && i.isEmpty()) i.append(n);
231
+ else {
232
+ let e = ee();
233
+ e.append(n), r.append(e);
216
234
  }
217
235
  }
218
- }), l(""), m(""), s(!1);
219
- }, E = g(() => {
220
- n ? (l(n.link === "javascript:void(0);" ? "" : n.link), m(n.linkText)) : (l(""), m("")), s(!0);
221
- }, [n]);
236
+ }), C.current = null, l(""), m(""), E(!1);
237
+ }, O = g(() => {
238
+ let t = "";
239
+ e.getEditorState().read(() => {
240
+ let e = j();
241
+ C.current = e ? e.clone() : null, M(e) && !e.isCollapsed() && (t = e.getTextContent());
242
+ }), e.setEditable(!1), e.update(() => {
243
+ P(null);
244
+ }), window.getSelection()?.removeAllRanges(), e.getRootElement()?.blur(), n ? (l(n.link === "javascript:void(0);" ? "" : n.link ?? ""), m(n.linkText ?? "")) : (l(""), m(t)), s(!0);
245
+ }, [n, e]);
222
246
  return /* @__PURE__ */ f(u, { children: [
223
- /* @__PURE__ */ d(R, {
247
+ /* @__PURE__ */ d(U, {
224
248
  icon: "Insertlink",
225
249
  tooltip: a("link"),
226
- onClick: E,
250
+ onClick: O,
227
251
  active: !!n?.link
228
252
  }),
229
253
  y,
230
254
  /* @__PURE__ */ d(t, {
231
255
  title: a("link"),
232
256
  open: o,
233
- onOpenChange: s,
257
+ onOpenChange: E,
234
258
  children: /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("div", {
235
259
  className: "px-[20px] pb-[60px] pt-[40px]",
236
260
  children: [/* @__PURE__ */ f("div", {
@@ -249,7 +273,7 @@ var I = m(null), L = {
249
273
  className: "absolute bottom-[-30px] left-[80px]",
250
274
  children: /* @__PURE__ */ d("p", {
251
275
  className: "text-[#999]",
252
- children: "链接可用 @表单别名,用于应用内表单跳转"
276
+ children: a("editor.linkAliasTip")
253
277
  })
254
278
  })
255
279
  ]
@@ -272,47 +296,47 @@ var I = m(null), L = {
272
296
  }) }), /* @__PURE__ */ f("div", {
273
297
  className: "flex gap-[15px]",
274
298
  children: [/* @__PURE__ */ d(S, {
275
- onClick: () => s(!1),
299
+ onClick: () => E(!1),
276
300
  children: a("cancel")
277
301
  }), /* @__PURE__ */ d(S, {
278
302
  type: "primary",
279
- onClick: C,
303
+ onClick: D,
280
304
  children: a("confirm")
281
305
  })]
282
306
  })]
283
307
  })] })
284
308
  })
285
309
  ] });
286
- }, ue = () => {
287
- let [e] = N(), { link: t } = z(), { t: n } = r();
288
- return /* @__PURE__ */ d(R, {
310
+ }, ge = () => {
311
+ let [e] = L(), { link: t } = W(), { t: n } = r();
312
+ return /* @__PURE__ */ d(U, {
289
313
  icon: "cancellink",
290
314
  tooltip: n("cancelLink"),
291
315
  onClick: () => {
292
- t && e.dispatchCommand(oe, null);
316
+ t && e.dispatchCommand(ie, null);
293
317
  }
294
318
  });
295
319
  }, q = {
296
- "picture-modal__container": "_picture-modal__container_qyj1h_1",
297
- "picture-modal__sidebar": "_picture-modal__sidebar_qyj1h_4",
298
- "picture-modal__menu-list": "_picture-modal__menu-list_qyj1h_9",
299
- "picture-modal__menu-item": "_picture-modal__menu-item_qyj1h_14",
300
- "picture-modal__slider": "_picture-modal__slider_qyj1h_24",
301
- "picture-modal__content": "_picture-modal__content_qyj1h_35",
302
- "picture-modal__content-wrapper": "_picture-modal__content-wrapper_qyj1h_41",
303
- "picture-modal__content-container": "_picture-modal__content-container_qyj1h_45",
304
- "picture-modal__content-page": "_picture-modal__content-page_qyj1h_48",
305
- "picture-modal__content-title": "_picture-modal__content-title_qyj1h_51",
306
- "picture-modal__upload-area": "_picture-modal__upload-area_qyj1h_62",
307
- "picture-modal__upload-area--dragging": "_picture-modal__upload-area--dragging_qyj1h_77",
308
- "picture-modal__preview": "_picture-modal__preview_qyj1h_83",
309
- "picture-modal__preview-image": "_picture-modal__preview-image_qyj1h_92",
310
- "picture-modal__preview-info": "_picture-modal__preview-info_qyj1h_99",
311
- "picture-modal__preview-filename": "_picture-modal__preview-filename_qyj1h_103",
312
- "picture-modal__preview-size": "_picture-modal__preview-size_qyj1h_109",
313
- "picture-modal__preview-delete": "_picture-modal__preview-delete_qyj1h_113",
314
- "picture-modal__upload-text": "_picture-modal__upload-text_qyj1h_121",
315
- "picture-modal__footer": "_picture-modal__footer_qyj1h_125"
320
+ "picture-modal__container": "_picture-modal__container_1lb4d_1",
321
+ "picture-modal__sidebar": "_picture-modal__sidebar_1lb4d_4",
322
+ "picture-modal__menu-list": "_picture-modal__menu-list_1lb4d_9",
323
+ "picture-modal__menu-item": "_picture-modal__menu-item_1lb4d_14",
324
+ "picture-modal__slider": "_picture-modal__slider_1lb4d_24",
325
+ "picture-modal__content": "_picture-modal__content_1lb4d_35",
326
+ "picture-modal__content-wrapper": "_picture-modal__content-wrapper_1lb4d_41",
327
+ "picture-modal__content-container": "_picture-modal__content-container_1lb4d_45",
328
+ "picture-modal__content-page": "_picture-modal__content-page_1lb4d_48",
329
+ "picture-modal__content-title": "_picture-modal__content-title_1lb4d_51",
330
+ "picture-modal__upload-area": "_picture-modal__upload-area_1lb4d_62",
331
+ "picture-modal__upload-area--dragging": "_picture-modal__upload-area--dragging_1lb4d_77",
332
+ "picture-modal__preview": "_picture-modal__preview_1lb4d_83",
333
+ "picture-modal__preview-image": "_picture-modal__preview-image_1lb4d_92",
334
+ "picture-modal__preview-info": "_picture-modal__preview-info_1lb4d_102",
335
+ "picture-modal__preview-filename": "_picture-modal__preview-filename_1lb4d_106",
336
+ "picture-modal__preview-size": "_picture-modal__preview-size_1lb4d_112",
337
+ "picture-modal__preview-delete": "_picture-modal__preview-delete_1lb4d_116",
338
+ "picture-modal__upload-text": "_picture-modal__upload-text_1lb4d_124",
339
+ "picture-modal__footer": "_picture-modal__footer_1lb4d_128"
316
340
  }, J = h((e, t) => {
317
341
  let [n] = C.useForm(), [i, a] = x(""), { t: o } = r(), s = (e) => /^https?:\/\/.+/i.test(e);
318
342
  return v(t, () => ({ getValue: async () => {
@@ -393,9 +417,9 @@ var Y = h((t, n) => {
393
417
  children: h("editor.clickOrDragToUpload")
394
418
  })]
395
419
  }),
396
- /* @__PURE__ */ d(ee, {
420
+ /* @__PURE__ */ d(D, {
397
421
  mode: "wait",
398
- children: i && c && /* @__PURE__ */ f(D.div, {
422
+ children: i && c && /* @__PURE__ */ f(O.div, {
399
423
  className: q["picture-modal__preview"],
400
424
  initial: {
401
425
  opacity: 0,
@@ -422,7 +446,7 @@ var Y = h((t, n) => {
422
446
  ]
423
447
  },
424
448
  children: [
425
- /* @__PURE__ */ d(D.div, {
449
+ /* @__PURE__ */ d(O.div, {
426
450
  className: q["picture-modal__preview-image"],
427
451
  initial: {
428
452
  opacity: 0,
@@ -438,14 +462,10 @@ var Y = h((t, n) => {
438
462
  },
439
463
  children: /* @__PURE__ */ d("img", {
440
464
  src: i,
441
- style: {
442
- maxWidth: "120px",
443
- height: "80px"
444
- },
445
465
  alt: h("editor.previewImage")
446
466
  })
447
467
  }),
448
- /* @__PURE__ */ f(D.div, {
468
+ /* @__PURE__ */ f(O.div, {
449
469
  className: q["picture-modal__preview-info"],
450
470
  initial: {
451
471
  opacity: 0,
@@ -467,7 +487,7 @@ var Y = h((t, n) => {
467
487
  children: g(c.size)
468
488
  })]
469
489
  }),
470
- /* @__PURE__ */ d(D.div, {
490
+ /* @__PURE__ */ d(O.div, {
471
491
  className: q["picture-modal__preview-delete"],
472
492
  role: "button",
473
493
  onClick: () => {
@@ -506,8 +526,8 @@ var Y = h((t, n) => {
506
526
  Y.displayName = "UploadImage";
507
527
  //#endregion
508
528
  //#region src/components/Editor/commands/ImageCommands.ts
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 = [{
529
+ var X = ne("INSERT_INLINE_IMAGE_COMMAND"), _e = () => {
530
+ let { t: n } = r(), [i] = L(), [a, o] = x(!1), s = b(null), c = b(null), l = [{
511
531
  key: "upload",
512
532
  title: n("editor.uploadImage"),
513
533
  icon: /* @__PURE__ */ d(e, { name: "picture" })
@@ -533,7 +553,7 @@ var X = ie("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
533
553
  upload: /* @__PURE__ */ d(Y, { ref: c }),
534
554
  url: /* @__PURE__ */ d(J, { ref: s })
535
555
  };
536
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(R, {
556
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(U, {
537
557
  icon: "picture",
538
558
  tooltip: n("picture"),
539
559
  onClick: () => o(!0)
@@ -579,22 +599,22 @@ var X = ie("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
579
599
  }, Z = /* @__PURE__ */ new Map(), Q = (e, t) => {
580
600
  if (!e) throw Error("registerToolbarButton: name is required");
581
601
  Z.set(e, t);
582
- }, fe = (e) => {
602
+ }, ve = (e) => {
583
603
  Z.delete(e);
584
- }, pe = (e) => Z.get(e), me = () => Array.from(Z.keys()), $ = {
585
- bold: B,
586
- underline: V,
587
- italic: H,
588
- fontSize: G,
589
- fontColor: K,
590
- fill: se,
591
- align: ce,
592
- link: le,
593
- unLink: ue,
594
- picture: de
604
+ }, ye = (e) => Z.get(e), be = () => Array.from(Z.keys()), $ = {
605
+ bold: se,
606
+ underline: ce,
607
+ italic: le,
608
+ fontSize: ue,
609
+ fontColor: de,
610
+ fill: fe,
611
+ align: pe,
612
+ link: he,
613
+ unLink: ge,
614
+ picture: _e
595
615
  };
596
616
  Object.entries($).forEach(([e, t]) => {
597
617
  Q(e, t);
598
618
  });
599
619
  //#endregion
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 };
620
+ export { ve as a, U as c, Q as i, ae as l, ye as n, X as o, be as r, G as s, $ as t, B as u };
@@ -1,20 +1,20 @@
1
- import "../../../vendors/version-Dkos5Cha.js";
1
+ import "../../../vendors/version-4HBYLKDL.js";
2
2
  import "../../../ScrollBar/style-D26azwz6.js";
3
3
  import "../../../Icon/Icon-BBDcb-yw.js";
4
- import "../../../vendors/LocaleContext-B1HuhJc-.js";
4
+ import "../../../vendors/LocaleContext-Dcw6C1LX.js";
5
5
  import "../../../Modal/Modal-LiztSF7x.js";
6
- import "../../../ColorPicker/ColorPicker-BtTIb9tX.js";
6
+ import "../../../ColorPicker/ColorPicker-CL57cSDG.js";
7
7
  import "../../../vendors/useFloatingOverlay-BApqkHSu.js";
8
- import "../../../vendors/useLocale-BYtF5pxt.js";
8
+ import "../../../vendors/useLocale-BKZX2_zw.js";
9
9
  import "../../../vendors/color-D6XBXROa.js";
10
10
  import "../../../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
11
- import "../../../Select/SelectInputSearch-Bikrj3FI.js";
11
+ import "../../../Select/SelectInputSearch-COUzreau.js";
12
12
  import "../../../CheckBox/CheckBox-ByWSy9Yr.js";
13
13
  import "../../../CheckBox/CheckBox-nBm0u6zX.js";
14
14
  import "../../../NotFoundContent/NotFoundContent-BLmzWNBi.js";
15
15
  import "../../../ScrollBar/ScrollBar-QhXVe8zd.js";
16
16
  import "../../../vendors/useFloatingPortal-CmVJbuRm.js";
17
- import "../../../DropDown/DropDown-CdTjlySd.js";
17
+ import "../../../DropDown/DropDown-yDH9V_9Y.js";
18
18
  import "../../../DropDown/style-Fdp-U4md.js";
19
- import { a as e, i as t, n, r, t as i } from "../../Buttons-BcP66z6E.js";
19
+ import { a as e, i as t, n, r, t as i } from "../../Buttons-BivKInBV.js";
20
20
  export { i as default, n as getToolbarButton, r as listRegisteredToolbarButtons, t as registerToolbarButton, e as unregisterToolbarButton };
@@ -1,4 +1,4 @@
1
- import "../../vendors/version-Dkos5Cha.js";
1
+ import "../../vendors/version-4HBYLKDL.js";
2
2
  //#region src/components/Editor/constants/index.ts
3
3
  var e = [
4
4
  {