@baishuyun/ui-base 2.2.3 → 2.2.5

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 (35) hide show
  1. package/dist/Card/Card-Y1ISqAp9.js +86 -0
  2. package/dist/Card/index.js +1 -1
  3. package/dist/CheckBox/{CheckBox-VlP6u_-s.js → CheckBox-C9sXWSA5.js} +1 -1
  4. package/dist/CheckBox/index.js +1 -1
  5. package/dist/ColorPicker/{ColorPicker-049kyJn6.js → ColorPicker-DNIXPakN.js} +70 -64
  6. package/dist/ColorPicker/index.js +1 -1
  7. package/dist/DropDown/{DropDown-BkTY-3y0.js → DropDown-DGkSeXQT.js} +1 -1
  8. package/dist/DropDown/index.js +1 -1
  9. package/dist/Editor/ToolbarPlugin/Buttons/index.js +6 -2
  10. package/dist/Editor/{index-C0MY9j94.js → index-CCq3AgcW.js} +426 -412
  11. package/dist/Editor/index.js +115 -108
  12. package/dist/Icon/Icon-CBlIwtp2.js +24 -0
  13. package/dist/Icon/index.js +1 -1
  14. package/dist/InputTag/{InputTag-S9hHXsyQ.js → InputTag-C6MbuO-e.js} +1 -1
  15. package/dist/InputTag/index.js +1 -1
  16. package/dist/Modal/{Modal-oRJ-Almn.js → Modal-z3TvEXwN.js} +1 -1
  17. package/dist/Modal/index.js +1 -1
  18. package/dist/Select/{Select-BiARGTPz.js → Select-hwXXDuLU.js} +3 -3
  19. package/dist/Select/{SelectInputSearch-DigfTvpo.js → SelectInputSearch-ChUpUgxa.js} +1 -1
  20. package/dist/Select/index.js +1 -1
  21. package/dist/Tabs/{TabSelect-bKB0Qe9F.js → TabSelect-DL8Bhehc.js} +1 -1
  22. package/dist/Tabs/index.js +1 -1
  23. package/dist/Tree/index.js +1 -1
  24. package/dist/components/Card/Card.type.d.ts +9 -1
  25. package/dist/components/ColorPicker/ColorPicker.type.d.ts +11 -0
  26. package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +6 -3
  27. package/dist/components/Editor/ToolbarPlugin/Buttons/registry.d.ts +6 -0
  28. package/dist/components/Editor/ToolbarPlugin/interface.d.ts +4 -3
  29. package/dist/components/Editor/index.d.ts +5 -0
  30. package/dist/index.js +9 -9
  31. package/dist/vendors/{Tree-CjrhMBFX.js → Tree-CLEy-xqz.js} +2 -2
  32. package/dist/vendors/{lexical-DdSmj_Kv.js → lexical-DO7eMeC2.js} +7 -7
  33. package/package.json +2 -2
  34. package/dist/Card/Card-DHOMkrEE.js +0 -74
  35. package/dist/Icon/Icon-CkHAU1fA.js +0 -24
@@ -1,15 +1,16 @@
1
1
  import { jsx as u, jsxs as W, Fragment as et } from "react/jsx-runtime";
2
- import { o as N, P as F, _ as M, Y as $, w as U, f as nt, x as G, j as it, C as ot, L as rt, $ as z, S as st, a as at, W as V, J as lt, F as ct, B as ut, M as dt, b as J, g as ht, m as gt, h as mt, c as _t, d as ft, e as pt, n as bt, q as O, s as yt, i as xt, k as vt } from "../vendors/lexical-DdSmj_Kv.js";
3
- import wt, { useState as S, useEffect as x, useRef as A, useCallback as E, useMemo as Ct } from "react";
4
- import { p as Tt, T as Et, B as Lt, g as Z, k as X, v as H, I as Nt, m as kt } from "./index-C0MY9j94.js";
2
+ import { o as N, P as F, _ as $, Y as M, w as U, f as nt, x as G, j as it, C as ot, L as rt, $ as B, S as st, a as at, W as V, J as lt, F as ct, B as ut, M as dt, b as J, g as ht, m as gt, h as mt, c as ft, d as _t, e as bt, n as pt, q as z, s as xt, i as yt, k as vt } from "../vendors/lexical-DO7eMeC2.js";
3
+ import wt, { useState as S, useEffect as y, useRef as O, useCallback as E, useMemo as Tt } from "react";
4
+ import { p as Ct, T as Et, g as Lt, a as Z, k as X, v as H, I as Nt, m as kt } from "./index-CCq3AgcW.js";
5
+ import { B as ie, l as oe, r as re, u as se } from "./index-CCq3AgcW.js";
5
6
  import { DEFAULT_BACKGROUND_COLOR as j, DEFAULT_FONT_COLOR as K, DEFAULT_FONT_SIZE as Y } from "./constants/index.js";
6
- import { c as D } from "../vendors/clsx-OuTLNxxd.js";
7
+ import { c as R } from "../vendors/clsx-OuTLNxxd.js";
7
8
  const I = {
8
9
  "bsy-lexical__toolbar": "_bsy-lexical__toolbar_n60av_1",
9
10
  "bsy-lexical__toolbar-group": "_bsy-lexical__toolbar-group_n60av_9",
10
11
  "bsy-lexical__toolbar-divider": "_bsy-lexical__toolbar-divider_n60av_15"
11
12
  };
12
- function Dt() {
13
+ function Rt() {
13
14
  const [i] = N(), [t, o] = S({
14
15
  bold: !1,
15
16
  italic: !1,
@@ -20,30 +21,30 @@ function Dt() {
20
21
  align: "left",
21
22
  link: void 0
22
23
  });
23
- return x(() => i.registerUpdateListener(({ editorState: e }) => {
24
+ return y(() => i.registerUpdateListener(({ editorState: e }) => {
24
25
  e.read(() => {
25
26
  const n = F();
26
- if (M(n)) {
27
- const s = $(
27
+ if ($(n)) {
28
+ const s = M(
28
29
  n,
29
30
  "font-size",
30
31
  Y
31
- ), a = $(
32
+ ), a = M(
32
33
  n,
33
34
  "color",
34
35
  K
35
- ), l = $(
36
+ ), l = M(
36
37
  n,
37
38
  "background-color",
38
39
  j
39
40
  ), r = n.anchor.getNode();
40
- let m = r.getKey() === "root" ? r : U(r, (f) => {
41
- const h = f.getParent();
41
+ let m = r.getKey() === "root" ? r : U(r, (_) => {
42
+ const h = _.getParent();
42
43
  return h !== null && nt(h);
43
44
  });
44
45
  m === null && (m = r.getTopLevelElementOrThrow());
45
- const d = {}, _ = U(r, Tt);
46
- _ ? (d.link = _.getURL(), d.linkText = _.getTextContent(), d.newBlank = _.getTarget() === "_blank") : d.linkText = n.getTextContent(), o({
46
+ const d = {}, f = U(r, Ct);
47
+ f ? (d.link = f.getURL(), d.linkText = f.getTextContent(), d.newBlank = f.getTarget() === "_blank") : d.linkText = n.getTextContent(), o({
47
48
  bold: n.hasFormat("bold"),
48
49
  italic: n.hasFormat("italic"),
49
50
  underline: n.hasFormat("underline"),
@@ -57,15 +58,15 @@ function Dt() {
57
58
  });
58
59
  }), [i]), t;
59
60
  }
60
- const Rt = (i) => {
61
- const t = Dt();
61
+ const Dt = (i) => {
62
+ const t = Rt();
62
63
  return /* @__PURE__ */ u(Et.Provider, { value: t, children: i.children });
63
64
  }, St = (i) => {
64
65
  const { config: t = [], style: o } = i, e = (n, s) => {
65
- const a = typeof n == "string" ? n : n.name, l = Lt[a];
66
- return typeof n == "string" ? /* @__PURE__ */ u(l, {}, `${a}-${s}`) : /* @__PURE__ */ u(l, { ...n.props }, `${a}-${s}`);
66
+ const a = typeof n == "string" ? n : n.name, l = Lt(a);
67
+ return l ? typeof n == "string" ? /* @__PURE__ */ u(l, {}, `${a}-${s}`) : /* @__PURE__ */ u(l, { ...n.props }, `${a}-${s}`) : (console.warn(`[ToolbarPlugin] Button "${a}" is not registered.`), null);
67
68
  };
68
- return /* @__PURE__ */ u(Rt, { children: /* @__PURE__ */ u("div", { className: I["bsy-lexical__toolbar"], style: o, children: t.map((n, s) => /* @__PURE__ */ W(
69
+ return /* @__PURE__ */ u(Dt, { children: /* @__PURE__ */ u("div", { className: I["bsy-lexical__toolbar"], style: o, children: t.map((n, s) => /* @__PURE__ */ W(
69
70
  "div",
70
71
  {
71
72
  className: I["bsy-lexical__toolbar-group"],
@@ -83,7 +84,7 @@ const Rt = (i) => {
83
84
  };
84
85
  function Wt({ validateUrl: i, attributes: t }) {
85
86
  const [o] = N();
86
- return x((() => {
87
+ return y((() => {
87
88
  if (!o.hasNodes([Z])) throw new Error("LinkPlugin: LinkNode not registered on editor");
88
89
  return it(o.registerCommand(X, ((e) => {
89
90
  if (e === null) return H(e), !0;
@@ -92,75 +93,75 @@ function Wt({ validateUrl: i, attributes: t }) {
92
93
  const { url: n, target: s, rel: a, title: l } = e;
93
94
  return H(n, { ...t, rel: a, target: s, title: l }), !0;
94
95
  }
95
- }), z), i !== void 0 ? o.registerCommand(ot, ((e) => {
96
+ }), B), i !== void 0 ? o.registerCommand(ot, ((e) => {
96
97
  const n = F();
97
- if (!M(n) || n.isCollapsed() || !rt(e, ClipboardEvent) || e.clipboardData === null) return !1;
98
+ if (!$(n) || n.isCollapsed() || !rt(e, ClipboardEvent) || e.clipboardData === null) return !1;
98
99
  const s = e.clipboardData.getData("text");
99
100
  return !!i(s) && !n.getNodes().some(((a) => G(a))) && (o.dispatchCommand(X, { ...t, url: s }), e.preventDefault(), !0);
100
- }), z) : () => {
101
+ }), B) : () => {
101
102
  });
102
103
  }), [o, i, t]), null;
103
104
  }
104
- const Ft = "_imageWrapper_y06h3_1", Mt = "_selected_y06h3_8", $t = "_resizing_y06h3_12", Ht = "_image_y06h3_1", It = "_resizeHandle_y06h3_30", zt = "_topLeft_y06h3_44", Ot = "_topRight_y06h3_49", At = "_bottomLeft_y06h3_54", Pt = "_bottomRight_y06h3_59", y = {
105
+ const Ft = "_imageWrapper_y06h3_1", $t = "_selected_y06h3_8", Mt = "_resizing_y06h3_12", Ht = "_image_y06h3_1", It = "_resizeHandle_y06h3_30", Bt = "_topLeft_y06h3_44", zt = "_topRight_y06h3_49", Ot = "_bottomLeft_y06h3_54", At = "_bottomRight_y06h3_59", x = {
105
106
  imageWrapper: Ft,
106
- selected: Mt,
107
- resizing: $t,
107
+ selected: $t,
108
+ resizing: Mt,
108
109
  image: Ht,
109
110
  resizeHandle: It,
110
- topLeft: zt,
111
- topRight: Ot,
112
- bottomLeft: At,
113
- bottomRight: Pt
114
- }, Bt = ({
111
+ topLeft: Bt,
112
+ topRight: zt,
113
+ bottomLeft: Ot,
114
+ bottomRight: At
115
+ }, Pt = ({
115
116
  src: i,
116
117
  altText: t,
117
118
  width: o,
118
119
  height: e,
119
120
  nodeKey: n
120
121
  }) => {
121
- const [s] = N(), [a, l] = S(!1), [r, m] = S(null), d = A(null), [g, _] = S({
122
+ const [s] = N(), [a, l] = S(!1), [r, m] = S(null), d = O(null), [g, f] = S({
122
123
  width: o || void 0,
123
124
  height: e || void 0
124
- }), f = E(() => {
125
- o && e && _({ width: o, height: e });
125
+ }), _ = E(() => {
126
+ o && e && f({ width: o, height: e });
126
127
  }, [o, e]), h = E(
127
- (c, p) => {
128
+ (c, b) => {
128
129
  if (c.preventDefault(), c.stopPropagation(), !d.current) return;
129
- const b = g.width || d.current.offsetWidth, C = g.height || d.current.offsetHeight, k = b / C;
130
- (!g.width || !g.height) && _({ width: b, height: C }), m({
130
+ const p = g.width || d.current.offsetWidth, T = g.height || d.current.offsetHeight, k = p / T;
131
+ (!g.width || !g.height) && f({ width: p, height: T }), m({
131
132
  isResizing: !0,
132
133
  startX: c.clientX,
133
134
  startY: c.clientY,
134
- startWidth: b,
135
- startHeight: C,
135
+ startWidth: p,
136
+ startHeight: T,
136
137
  aspectRatio: k,
137
- direction: p
138
+ direction: b
138
139
  });
139
140
  },
140
141
  [g]
141
142
  ), v = E(
142
143
  (c) => {
143
144
  if (!(r != null && r.isResizing)) return;
144
- const p = c.clientX - r.startX;
145
- let b;
145
+ const b = c.clientX - r.startX;
146
+ let p;
146
147
  switch (r.direction) {
147
148
  case "bottom-right":
148
- b = Math.max(50, r.startWidth + p);
149
+ p = Math.max(50, r.startWidth + b);
149
150
  break;
150
151
  case "bottom-left":
151
- b = Math.max(50, r.startWidth - p);
152
+ p = Math.max(50, r.startWidth - b);
152
153
  break;
153
154
  case "top-right":
154
- b = Math.max(50, r.startWidth + p);
155
+ p = Math.max(50, r.startWidth + b);
155
156
  break;
156
157
  case "top-left":
157
- b = Math.max(50, r.startWidth - p);
158
+ p = Math.max(50, r.startWidth - b);
158
159
  break;
159
160
  default:
160
- b = Math.max(50, r.startWidth + p);
161
+ p = Math.max(50, r.startWidth + b);
161
162
  }
162
- const C = b / r.aspectRatio;
163
- _({ width: b, height: C });
163
+ const T = p / r.aspectRatio;
164
+ f({ width: p, height: T });
164
165
  },
165
166
  [r]
166
167
  ), w = E(() => {
@@ -178,17 +179,17 @@ const Ft = "_imageWrapper_y06h3_1", Mt = "_selected_y06h3_8", $t = "_resizing_y0
178
179
  const tt = E(() => {
179
180
  l(!0);
180
181
  }, []);
181
- return x(() => s.registerUpdateListener(({ editorState: c }) => {
182
+ return y(() => s.registerUpdateListener(({ editorState: c }) => {
182
183
  c.read(() => {
183
- const p = F();
184
- M(p) && !p.getNodes().some((k) => {
185
- var B;
186
- return k.getKey() === n || k.getParent() && ((B = k.getParent()) == null ? void 0 : B.getKey()) === n;
184
+ const b = F();
185
+ $(b) && !b.getNodes().some((k) => {
186
+ var P;
187
+ return k.getKey() === n || k.getParent() && ((P = k.getParent()) == null ? void 0 : P.getKey()) === n;
187
188
  }) && a && l(!1);
188
189
  });
189
- }), [s, n, a]), x(() => {
190
- const c = (p) => {
191
- a && d.current && !d.current.contains(p.target) && l(!1);
190
+ }), [s, n, a]), y(() => {
191
+ const c = (b) => {
192
+ a && d.current && !d.current.contains(b.target) && l(!1);
192
193
  };
193
194
  if (a)
194
195
  return document.addEventListener("mousedown", c), () => {
@@ -197,9 +198,9 @@ const Ft = "_imageWrapper_y06h3_1", Mt = "_selected_y06h3_8", $t = "_resizing_y0
197
198
  }, [a]), /* @__PURE__ */ W(
198
199
  "div",
199
200
  {
200
- className: D(y.imageWrapper, {
201
- [y.selected]: a,
202
- [y.resizing]: r == null ? void 0 : r.isResizing
201
+ className: R(x.imageWrapper, {
202
+ [x.selected]: a,
203
+ [x.resizing]: r == null ? void 0 : r.isResizing
203
204
  }),
204
205
  children: [
205
206
  /* @__PURE__ */ u(
@@ -208,12 +209,12 @@ const Ft = "_imageWrapper_y06h3_1", Mt = "_selected_y06h3_8", $t = "_resizing_y0
208
209
  ref: d,
209
210
  src: i,
210
211
  alt: t,
211
- className: y.image,
212
+ className: x.image,
212
213
  style: {
213
214
  width: g.width,
214
215
  height: g.height
215
216
  },
216
- onLoad: f,
217
+ onLoad: _,
217
218
  onClick: tt,
218
219
  draggable: !1
219
220
  }
@@ -222,28 +223,28 @@ const Ft = "_imageWrapper_y06h3_1", Mt = "_selected_y06h3_8", $t = "_resizing_y0
222
223
  /* @__PURE__ */ u(
223
224
  "div",
224
225
  {
225
- className: D(y.resizeHandle, y.bottomRight),
226
+ className: R(x.resizeHandle, x.bottomRight),
226
227
  onMouseDown: (c) => h(c, "bottom-right")
227
228
  }
228
229
  ),
229
230
  /* @__PURE__ */ u(
230
231
  "div",
231
232
  {
232
- className: D(y.resizeHandle, y.bottomLeft),
233
+ className: R(x.resizeHandle, x.bottomLeft),
233
234
  onMouseDown: (c) => h(c, "bottom-left")
234
235
  }
235
236
  ),
236
237
  /* @__PURE__ */ u(
237
238
  "div",
238
239
  {
239
- className: D(y.resizeHandle, y.topRight),
240
+ className: R(x.resizeHandle, x.topRight),
240
241
  onMouseDown: (c) => h(c, "top-right")
241
242
  }
242
243
  ),
243
244
  /* @__PURE__ */ u(
244
245
  "div",
245
246
  {
246
- className: D(y.resizeHandle, y.topLeft),
247
+ className: R(x.resizeHandle, x.topLeft),
247
248
  onMouseDown: (c) => h(c, "top-left")
248
249
  }
249
250
  )
@@ -252,12 +253,12 @@ const Ft = "_imageWrapper_y06h3_1", Mt = "_selected_y06h3_8", $t = "_resizing_y0
252
253
  }
253
254
  );
254
255
  };
255
- class R extends at {
256
+ class D extends at {
256
257
  static getType() {
257
258
  return "image";
258
259
  }
259
260
  static clone(t) {
260
- return new R(t.__src, t.__altText, t.__width, t.__height, t.__key);
261
+ return new D(t.__src, t.__altText, t.__width, t.__height, t.__key);
261
262
  }
262
263
  constructor(t, o, e, n, s) {
263
264
  super(s), this.__src = t, this.__altText = o || "", this.__width = e, this.__height = n;
@@ -299,7 +300,7 @@ class R extends at {
299
300
  }
300
301
  decorate() {
301
302
  return /* @__PURE__ */ u(
302
- Bt,
303
+ Pt,
303
304
  {
304
305
  src: this.__src,
305
306
  altText: this.__altText,
@@ -319,7 +320,7 @@ class R extends at {
319
320
  }
320
321
  static importJSON(t) {
321
322
  const { src: o, altText: e, width: n, height: s } = t;
322
- return P({ src: o, altText: e, width: n, height: s });
323
+ return A({ src: o, altText: e, width: n, height: s });
323
324
  }
324
325
  exportJSON() {
325
326
  return {
@@ -335,11 +336,11 @@ class R extends at {
335
336
  return !0;
336
337
  }
337
338
  }
338
- function P({ src: i, altText: t, width: o, height: e, key: n }) {
339
- return new R(i, t, o, e, n);
339
+ function A({ src: i, altText: t, width: o, height: e, key: n }) {
340
+ return new D(i, t, o, e, n);
340
341
  }
341
342
  function Ut(i) {
342
- return i instanceof R;
343
+ return i instanceof D;
343
344
  }
344
345
  function Jt(i) {
345
346
  if (i instanceof HTMLImageElement) {
@@ -353,7 +354,7 @@ function Jt(i) {
353
354
  const l = parseInt(e.height, 10);
354
355
  isNaN(l) || (s = l);
355
356
  }
356
- return n === void 0 && i.width && (n = i.width), s === void 0 && i.height && (s = i.height), { node: P({
357
+ return n === void 0 && i.width && (n = i.width), s === void 0 && i.height && (s = i.height), { node: A({
357
358
  src: t,
358
359
  altText: o,
359
360
  width: n,
@@ -364,24 +365,24 @@ function Jt(i) {
364
365
  }
365
366
  function Xt() {
366
367
  const [i] = N();
367
- return x(() => i.registerCommand(
368
+ return y(() => i.registerCommand(
368
369
  Nt,
369
370
  (t) => {
370
- const o = P(t);
371
+ const o = A(t);
371
372
  return V([o]), !0;
372
373
  },
373
374
  lt
374
375
  ), [i]), null;
375
376
  }
376
377
  function jt() {
377
- const [i] = N(), t = A(0), o = 250;
378
- return x(() => i.registerCommand(
378
+ const [i] = N(), t = O(0), o = 250;
379
+ return y(() => i.registerCommand(
379
380
  ct,
380
381
  (e) => {
381
382
  const n = Date.now(), s = n - t.current;
382
383
  return t.current = n, s < o && s > 0 ? (i.update(() => {
383
384
  const a = F();
384
- if (M(a)) {
385
+ if ($(a)) {
385
386
  const r = a.anchor.getNode().getTopLevelElement();
386
387
  if (r && r.getTextContent().trim() === "") {
387
388
  const m = ut();
@@ -399,18 +400,18 @@ function jt() {
399
400
  }
400
401
  }), e == null || e.preventDefault(), !0) : !1;
401
402
  },
402
- z
403
+ B
403
404
  ), [i]), null;
404
405
  }
405
406
  const Q = (i) => {
406
407
  var d;
407
- const { height: t = 126, onChange: o, toolbar: e } = i, [n] = N(), s = A(null), a = E(
408
+ const { height: t = 126, onChange: o, toolbar: e } = i, [n] = N(), s = O(null), a = E(
408
409
  (g) => {
409
410
  g.read(() => {
410
- const f = J().getTextContent(), h = ht(n, null), w = !f.trim() && (h === "<p><br></p>" || h === "<p></p>" || h === "" || /^<p>\s*<br>\s*<\/p>$/.test(h)) ? null : h;
411
+ const _ = J().getTextContent(), h = ht(n, null), w = !_.trim() && (h === "<p><br></p>" || h === "<p></p>" || h === "" || /^<p>\s*<br>\s*<\/p>$/.test(h)) ? null : h;
411
412
  s.current = w, o(
412
413
  {
413
- text: f,
414
+ text: _,
414
415
  html: w
415
416
  },
416
417
  g
@@ -419,11 +420,11 @@ const Q = (i) => {
419
420
  },
420
421
  [o, n]
421
422
  );
422
- x(() => {
423
+ y(() => {
423
424
  i.value !== void 0 && i.value !== s.current && n.update(() => {
424
425
  if (J().clear(), i.value && i.value.trim()) {
425
- const _ = new DOMParser().parseFromString(i.value, "text/html"), f = gt(n, _);
426
- V(f);
426
+ const f = new DOMParser().parseFromString(i.value, "text/html"), _ = gt(n, f);
427
+ V(_);
427
428
  }
428
429
  });
429
430
  }, [i.value, n]);
@@ -445,7 +446,7 @@ const Q = (i) => {
445
446
  mt,
446
447
  {
447
448
  contentEditable: /* @__PURE__ */ u(
448
- ft,
449
+ _t,
449
450
  {
450
451
  className: q["bsy-lexical-editor__content-editable"],
451
452
  style: {
@@ -454,18 +455,18 @@ const Q = (i) => {
454
455
  }
455
456
  }
456
457
  ),
457
- ErrorBoundary: _t
458
+ ErrorBoundary: ft
458
459
  }
459
460
  ),
460
461
  /* @__PURE__ */ u(Wt, {}),
461
462
  /* @__PURE__ */ u(Xt, {}),
462
463
  /* @__PURE__ */ u(jt, {}),
463
- /* @__PURE__ */ u(pt, {}),
464
- /* @__PURE__ */ u(bt, { onChange: a })
464
+ /* @__PURE__ */ u(bt, {}),
465
+ /* @__PURE__ */ u(pt, { onChange: a })
465
466
  ] });
466
467
  };
467
468
  Q.displayName = "BsyLexicalEditorCore";
468
- class L extends O {
469
+ class L extends z {
469
470
  constructor(t, o) {
470
471
  super(t, o);
471
472
  }
@@ -476,31 +477,31 @@ class L extends O {
476
477
  return new L(t.__text, t.__key);
477
478
  }
478
479
  static importDOM() {
479
- const t = O.importDOM();
480
+ const t = z.importDOM();
480
481
  return {
481
482
  ...t,
482
483
  code: () => ({
483
- conversion: T(t == null ? void 0 : t.code),
484
+ conversion: C(t == null ? void 0 : t.code),
484
485
  priority: 1
485
486
  }),
486
487
  em: () => ({
487
- conversion: T(t == null ? void 0 : t.em),
488
+ conversion: C(t == null ? void 0 : t.em),
488
489
  priority: 1
489
490
  }),
490
491
  span: () => ({
491
- conversion: T(t == null ? void 0 : t.span),
492
+ conversion: C(t == null ? void 0 : t.span),
492
493
  priority: 1
493
494
  }),
494
495
  strong: () => ({
495
- conversion: T(t == null ? void 0 : t.strong),
496
+ conversion: C(t == null ? void 0 : t.strong),
496
497
  priority: 1
497
498
  }),
498
499
  sub: () => ({
499
- conversion: T(t == null ? void 0 : t.sub),
500
+ conversion: C(t == null ? void 0 : t.sub),
500
501
  priority: 1
501
502
  }),
502
503
  sup: () => ({
503
- conversion: T(t == null ? void 0 : t.sup),
504
+ conversion: C(t == null ? void 0 : t.sup),
504
505
  priority: 1
505
506
  })
506
507
  };
@@ -514,9 +515,9 @@ class L extends O {
514
515
  // no need to add exportJSON here, since we are not adding any new properties
515
516
  }
516
517
  function Kt(i = "") {
517
- return xt(new L(i));
518
+ return yt(new L(i));
518
519
  }
519
- function T(i) {
520
+ function C(i) {
520
521
  return (t) => {
521
522
  const o = i == null ? void 0 : i(t);
522
523
  if (!o)
@@ -528,8 +529,8 @@ function T(i) {
528
529
  return {
529
530
  ...e,
530
531
  forChild: (d, g) => {
531
- const f = ((e == null ? void 0 : e.forChild) ?? ((h) => h))(d, g);
532
- if (yt(f)) {
532
+ const _ = ((e == null ? void 0 : e.forChild) ?? ((h) => h))(d, g);
533
+ if (xt(_)) {
533
534
  const h = [
534
535
  n ? `background-color: ${n}` : null,
535
536
  s ? `color: ${s}` : null,
@@ -539,15 +540,15 @@ function T(i) {
539
540
  m ? `text-decoration: ${m}` : null
540
541
  ].filter((v) => v !== null).join("; ");
541
542
  if (h.length)
542
- return f.setStyle(h);
543
+ return _.setStyle(h);
543
544
  }
544
- return f;
545
+ return _;
545
546
  }
546
547
  };
547
548
  };
548
549
  }
549
550
  const Yt = (i) => {
550
- const { autoFocus: t = !1 } = i, o = Ct(() => ({
551
+ const { autoFocus: t = !1 } = i, o = Tt(() => ({
551
552
  namespace: "bsyLexicalEditor",
552
553
  onError: (e) => {
553
554
  console.error("Lexical error", e);
@@ -564,10 +565,10 @@ const Yt = (i) => {
564
565
  nodes: [
565
566
  Z,
566
567
  kt,
567
- R,
568
+ D,
568
569
  L,
569
570
  {
570
- replace: O,
571
+ replace: z,
571
572
  with: (e) => new L(e.__text),
572
573
  withKlass: L
573
574
  }
@@ -577,5 +578,11 @@ const Yt = (i) => {
577
578
  };
578
579
  Yt.displayName = "BsyLexicalEditor";
579
580
  export {
580
- Yt as default
581
+ J as $getRoot,
582
+ ie as BaseButton,
583
+ Yt as default,
584
+ oe as listRegisteredToolbarButtons,
585
+ re as registerToolbarButton,
586
+ se as unregisterToolbarButton,
587
+ N as useLexicalComposerContext
581
588
  };
@@ -0,0 +1,24 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { createFromIconfontCN as e } from "@ant-design/icons";
3
+ import { b as a } from "../vendors/lodash-es-DFpaJB4Y.js";
4
+ const f = e({
5
+ scriptUrl: "https://at.alicdn.com/t/c/font_4786625_djm4gsgobsp.js"
6
+ }), b = ({ name: t, style: n, className: r, onClick: c, color: s, size: o = 16 }) => {
7
+ const m = {
8
+ color: s,
9
+ fontSize: a(o) ? `${o}px` : o,
10
+ ...n
11
+ };
12
+ return /* @__PURE__ */ p(
13
+ f,
14
+ {
15
+ onClick: c,
16
+ type: `icon-${t}`,
17
+ style: m,
18
+ className: `${r || ""}`
19
+ }
20
+ );
21
+ };
22
+ export {
23
+ b as I
24
+ };
@@ -1,4 +1,4 @@
1
- import { I as f } from "./Icon-CkHAU1fA.js";
1
+ import { I as f } from "./Icon-CBlIwtp2.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -2,7 +2,7 @@ import { jsxs as C, jsx as l } from "react/jsx-runtime";
2
2
  import { useControllableValue as A } from "ahooks";
3
3
  import { useState as S, useLayoutEffect as k, useRef as p, useEffect as D } from "react";
4
4
  import { c as h } from "../vendors/clsx-OuTLNxxd.js";
5
- import { I as M } from "../Icon/Icon-CkHAU1fA.js";
5
+ import { I as M } from "../Icon/Icon-CBlIwtp2.js";
6
6
  import { motion as O } from "motion/react";
7
7
  import { S as V } from "../vendors/simplebar-react-D68KzE44.js";
8
8
  const g = {
@@ -1,4 +1,4 @@
1
- import { I as t } from "./InputTag-S9hHXsyQ.js";
1
+ import { I as t } from "./InputTag-C6MbuO-e.js";
2
2
  export {
3
3
  t as default
4
4
  };
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
2
  import { useControllableValue as c } from "ahooks";
3
3
  import { Modal as r } from "antd";
4
4
  import { useState as u } from "react";
5
- import { I as n } from "../Icon/Icon-CkHAU1fA.js";
5
+ import { I as n } from "../Icon/Icon-CBlIwtp2.js";
6
6
  const f = "_modal__title_klsxr_1", b = "_modal__button_groups_klsxr_18", h = "_modal__button_klsxr_18", g = "_modal__icon_klsxr_38", l = {
7
7
  modal__title: f,
8
8
  modal__button_groups: b,
@@ -1,4 +1,4 @@
1
- import { M as f } from "./Modal-oRJ-Almn.js";
1
+ import { M as f } from "./Modal-z3TvEXwN.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,13 +1,13 @@
1
1
  import { jsx as t, jsxs as I, Fragment as ce } from "react/jsx-runtime";
2
2
  import { createContext as ae, useContext as ue, memo as de, forwardRef as be, useState as se, useRef as z, useLayoutEffect as ze, useDeferredValue as ve, useMemo as B, useCallback as D, Suspense as je, useId as qe, useImperativeHandle as Ke } from "react";
3
3
  import { c as L } from "../vendors/clsx-OuTLNxxd.js";
4
- import { I as X } from "../Icon/Icon-CkHAU1fA.js";
4
+ import { I as X } from "../Icon/Icon-CBlIwtp2.js";
5
5
  import { useHover as Je, useControllableValue as Qe, useToggle as Xe } from "ahooks";
6
6
  import { AnimatePresence as Ne, motion as ie } from "motion/react";
7
7
  import { n as _e, h as Ye, e as Ze, c as et, a as ge } from "../vendors/lodash-es-DFpaJB4Y.js";
8
8
  import { I as ye, P as tt } from "../vendors/index-MTmG1Ezy.js";
9
- import { S as nt } from "./SelectInputSearch-DigfTvpo.js";
10
- import { H as xe, T as lt } from "../vendors/Tree-CjrhMBFX.js";
9
+ import { S as nt } from "./SelectInputSearch-ChUpUgxa.js";
10
+ import { H as xe, T as lt } from "../vendors/Tree-CLEy-xqz.js";
11
11
  import { Input as st } from "antd";
12
12
  import le from "../CheckBox/index.js";
13
13
  import { u as Y } from "../vendors/useLocale-DgqW9M3h.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { I as t } from "../Icon/Icon-CkHAU1fA.js";
2
+ import { I as t } from "../Icon/Icon-CBlIwtp2.js";
3
3
  import { u as o } from "../vendors/useLocale-DgqW9M3h.js";
4
4
  const p = (r) => {
5
5
  const { t: a } = o(), { searchPlaceholder: l = a("search"), value: c = "", onChange: s } = r;
@@ -1,4 +1,4 @@
1
- import { M as o, S as s, a as t } from "./Select-BiARGTPz.js";
1
+ import { M as o, S as s, a as t } from "./Select-hwXXDuLU.js";
2
2
  export {
3
3
  o as Mode,
4
4
  s as Select,
@@ -7,7 +7,7 @@ import { createContext as J, useContext as W, useRef as P, useState as A, useCal
7
7
  import { c as m } from "../vendors/clsx-OuTLNxxd.js";
8
8
  import { h as Q } from "../vendors/color-VzwvCPhF.js";
9
9
  import { i as U } from "../vendors/lodash-es-DFpaJB4Y.js";
10
- import { I as Z } from "../Icon/Icon-CkHAU1fA.js";
10
+ import { I as Z } from "../Icon/Icon-CBlIwtp2.js";
11
11
  import { P as ee } from "../vendors/index-MTmG1Ezy.js";
12
12
  const c = {
13
13
  LINE: "line",
@@ -1,4 +1,4 @@
1
- import { c as T, b as s, a as b, T as l } from "./TabSelect-bKB0Qe9F.js";
1
+ import { c as T, b as s, a as b, T as l } from "./TabSelect-DL8Bhehc.js";
2
2
  export {
3
3
  T as TABS_TYPE,
4
4
  s as TabPanel,
@@ -1,4 +1,4 @@
1
- import { T as o } from "../vendors/Tree-CjrhMBFX.js";
1
+ import { T as o } from "../vendors/Tree-CLEy-xqz.js";
2
2
  export {
3
3
  o as Tree
4
4
  };