zs_library 0.3.21 → 0.3.23

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.
package/dist/index.es.js CHANGED
@@ -3,7 +3,7 @@ var Xe = (a, e, r) => e in a ? He(a, e, { enumerable: !0, configurable: !0, writ
3
3
  var ie = (a, e, r) => Xe(a, typeof e != "symbol" ? e + "" : e, r);
4
4
  import "./zs_library.css";
5
5
  import { jsx as o, jsxs as G, Fragment as de } from "react/jsx-runtime";
6
- import { cx as T, css as i } from "@emotion/css";
6
+ import { cx as T, css as l } from "@emotion/css";
7
7
  import { createContext as be, useMemo as ae, useContext as ke, useState as X, useRef as te, useEffect as oe } from "react";
8
8
  import Fe from "react-slick";
9
9
  import { ReactSortable as ge } from "react-sortablejs";
@@ -14,7 +14,7 @@ import Oe from "rc-tooltip";
14
14
  import { RiPencilRuler2Line as Ue, RiShareLine as Ve, RiInformationLine as _e, RiCloseCircleLine as We, RiAnticlockwise2Line as Je, RiClockwise2Line as Ke, RiZoomInLine as Ze, RiZoomOutLine as Qe, RiCloseLine as eo, RiArrowLeftLine as oo, RiArrowRightLine as to, RiArrowLeftRightLine as ro, RiArrowUpDownLine as no, RiMoreLine as ao } from "@remixicon/react";
15
15
  import ve from "rc-dialog";
16
16
  import lo from "react-json-view";
17
- import { MDXEditor as io, toolbarPlugin as so, DiffSourceToggleWrapper as co, UndoRedo as go, Separator as J, BoldItalicUnderlineToggles as uo, CodeToggle as mo, StrikeThroughSupSubToggles as po, ListsToggle as ho, CreateLink as fo, InsertImage as bo, InsertTable as ko, InsertThematicBreak as vo, InsertCodeBlock as xo, InsertFrontmatter as yo, diffSourcePlugin as wo, listsPlugin as Co, quotePlugin as Io, headingsPlugin as Mo, linkPlugin as So, linkDialogPlugin as To, imagePlugin as No, tablePlugin as Bo, thematicBreakPlugin as Do, frontmatterPlugin as Ro, codeBlockPlugin as Lo, codeMirrorPlugin as $o, markdownShortcutPlugin as Po, directivesPlugin as zo, AdmonitionDirectiveDescriptor as Ao } from "@mdxeditor/editor";
17
+ import { MDXEditor as io, toolbarPlugin as so, DiffSourceToggleWrapper as co, UndoRedo as go, Separator as J, BoldItalicUnderlineToggles as uo, CodeToggle as mo, StrikeThroughSupSubToggles as po, ListsToggle as ho, CreateLink as fo, InsertImage as bo, InsertTable as ko, InsertThematicBreak as vo, InsertCodeBlock as xo, InsertFrontmatter as yo, diffSourcePlugin as wo, listsPlugin as Co, quotePlugin as Io, headingsPlugin as Mo, linkPlugin as So, linkDialogPlugin as To, imagePlugin as Bo, tablePlugin as No, thematicBreakPlugin as Do, frontmatterPlugin as Ro, codeBlockPlugin as Lo, codeMirrorPlugin as Po, markdownShortcutPlugin as $o, directivesPlugin as zo, AdmonitionDirectiveDescriptor as Ao } from "@mdxeditor/editor";
18
18
  import Eo from "react-markdown";
19
19
  import jo from "remark-gfm";
20
20
  import Ho from "remark-emoji";
@@ -52,8 +52,8 @@ const xe = {
52
52
  }, we = be(
53
53
  {}
54
54
  ), Oo = (a) => {
55
- const { children: e, theme: r, ...t } = a, l = ae(() => r === "light" ? xe : r === "dark" ? ye : r, [r]);
56
- return /* @__PURE__ */ o(we.Provider, { value: { theme: l, ...t }, children: e });
55
+ const { children: e, theme: r, ...t } = a, i = ae(() => r === "light" ? xe : r === "dark" ? ye : r, [r]);
56
+ return /* @__PURE__ */ o(we.Provider, { value: { theme: i, ...t }, children: e });
57
57
  }, K = () => ke(we), Ce = {
58
58
  maxRow: 2,
59
59
  maxCol: 2
@@ -67,8 +67,8 @@ class Y {
67
67
  }
68
68
  /** 清理重复id */
69
69
  ie(Y, "uniqueArray", (e) => e.reduce((r, t) => r.find((n) => n.id === t.id) ? r : r.concat([t]), [])), ie(Y, "getTheme", (e) => {
70
- const r = xe.token, t = ye.token, l = { ...r, ...e == null ? void 0 : e.token }, n = { ...t, ...e == null ? void 0 : e.token };
71
- return { light: l, dark: n };
70
+ const r = xe.token, t = ye.token, i = { ...r, ...e == null ? void 0 : e.token }, n = { ...t, ...e == null ? void 0 : e.token };
71
+ return { light: i, dark: n };
72
72
  });
73
73
  const Me = be({
74
74
  list: [],
@@ -110,47 +110,47 @@ const Me = be({
110
110
  children: e,
111
111
  list: r = [],
112
112
  onChange: t,
113
- storageKey: l = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
113
+ storageKey: i = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
114
114
  enableCaching: n = !0
115
- } = a, [c, p] = X(), [s, x] = X(), [y, $] = X(null), N = te(y), [A, P] = X(null), [g, d] = X([]), [w, h] = X(
115
+ } = a, [c, g] = X(), [s, y] = X(), [x, B] = X(null), N = te(x), [A, $] = X(null), [u, d] = X([]), [w, h] = X(
116
116
  null
117
- ), [R, u] = X(
117
+ ), [L, m] = X(
118
118
  null
119
- ), [I, C] = X(!1), [m, f] = X(null), [E, V] = X(
119
+ ), [I, C] = X(!1), [p, f] = X(null), [E, V] = X(
120
120
  null
121
- ), [j, le] = X(!1), [_, Q] = Ye(l, {
121
+ ), [j, le] = X(!1), [_, Q] = Ye(i, {
122
122
  defaultValue: [],
123
123
  listenStorageChange: !0
124
124
  }), re = () => {
125
- P(null), clearTimeout(c), p(void 0), N.current = null;
126
- }, B = (k, F) => {
127
- P({ ...k, pageX: k.pageX, pageY: k.pageY, data: F }), clearTimeout(c);
125
+ $(null), clearTimeout(c), g(void 0), N.current = null;
126
+ }, D = (k, F) => {
127
+ $({ ...k, pageX: k.pageX, pageY: k.pageY, data: F }), clearTimeout(c);
128
128
  }, O = (k, F = !0) => {
129
129
  const { config: H = {} } = k;
130
130
  return H.allowContextMenu === !1 ? {} : {
131
131
  onMouseDown: (M) => {
132
- p(
132
+ g(
133
133
  setTimeout(() => {
134
- F && N.current === null && B(M, k);
134
+ F && N.current === null && D(M, k);
135
135
  }, 800)
136
- ), C(!1), x(
136
+ ), C(!1), y(
137
137
  setTimeout(() => {
138
138
  C(!0);
139
139
  }, 800)
140
140
  );
141
141
  },
142
142
  onMouseUp: () => {
143
- clearTimeout(s), x(void 0), clearTimeout(c), p(void 0);
143
+ clearTimeout(s), y(void 0), clearTimeout(c), g(void 0);
144
144
  },
145
145
  onContextMenu: (M) => {
146
- F && (M.preventDefault(), B(M, k));
146
+ F && (M.preventDefault(), D(M, k));
147
147
  }
148
148
  };
149
149
  }, W = (k, F) => {
150
150
  const H = [...F || []];
151
151
  if (H.length > 0)
152
152
  d((M) => {
153
- const L = [...M], D = (v) => {
153
+ const P = [...M], R = (v) => {
154
154
  var pe, he;
155
155
  const S = H.shift(), z = v.find((U) => U.id === S), q = v.findIndex((U) => U.id === S);
156
156
  if (H.length && z) {
@@ -160,7 +160,7 @@ const Me = be({
160
160
  const U = { ...k[0] };
161
161
  return v.splice(q, 1, U), t == null || t(v), v;
162
162
  }
163
- return z.children = D(z.children || []), v.splice(q, 1, z), t == null || t(v), v;
163
+ return z.children = R(z.children || []), v.splice(q, 1, z), t == null || t(v), v;
164
164
  }
165
165
  if (z) {
166
166
  if (!((he = z.children) != null && he.length) && k.length) {
@@ -171,54 +171,54 @@ const Me = be({
171
171
  }
172
172
  return Y.uniqueArray(k);
173
173
  };
174
- return Y.uniqueArray(D(L));
174
+ return Y.uniqueArray(R(P));
175
175
  });
176
176
  else {
177
177
  const M = Y.uniqueArray(k);
178
178
  t == null || t(M), d(M);
179
179
  }
180
- }, Pe = (k, F) => {
180
+ }, $e = (k, F) => {
181
181
  d((H) => {
182
- const M = [...H], L = (D) => {
182
+ const M = [...H], P = (R) => {
183
183
  var v;
184
- for (let S = 0; S < D.length; S++)
185
- if (D[S].id === k) {
186
- D[S].config = F;
184
+ for (let S = 0; S < R.length; S++)
185
+ if (R[S].id === k) {
186
+ R[S].config = F;
187
187
  break;
188
- } else ((v = D[S].children) == null ? void 0 : v.length) !== void 0 && L(D[S].children);
188
+ } else ((v = R[S].children) == null ? void 0 : v.length) !== void 0 && P(R[S].children);
189
189
  };
190
- return L(M), t == null || t(M), M;
190
+ return P(M), t == null || t(M), M;
191
191
  });
192
192
  }, ze = (k, F) => {
193
193
  d((H) => {
194
- const M = [...H], L = (D) => {
194
+ const M = [...H], P = (R) => {
195
195
  var v;
196
- for (let S = 0; S < D.length; S++)
197
- if (D[S].id === k) {
198
- D[S].data = F;
196
+ for (let S = 0; S < R.length; S++)
197
+ if (R[S].id === k) {
198
+ R[S].data = F;
199
199
  break;
200
- } else ((v = D[S].children) == null ? void 0 : v.length) !== void 0 && L(D[S].children);
200
+ } else ((v = R[S].children) == null ? void 0 : v.length) !== void 0 && P(R[S].children);
201
201
  };
202
- return L(M), t == null || t(M), M;
202
+ return P(M), t == null || t(M), M;
203
203
  });
204
204
  }, Ae = (k) => {
205
205
  d((F) => {
206
- const H = [...F], M = (L) => {
207
- var D;
208
- for (let v = 0; v < L.length; v++)
209
- if (L[v].id === k) {
210
- L.splice(v, 1);
206
+ const H = [...F], M = (P) => {
207
+ var R;
208
+ for (let v = 0; v < P.length; v++)
209
+ if (P[v].id === k) {
210
+ P.splice(v, 1);
211
211
  break;
212
- } else ((D = L[v].children) == null ? void 0 : D.length) !== void 0 && M(L[v].children);
212
+ } else ((R = P[v].children) == null ? void 0 : R.length) !== void 0 && M(P[v].children);
213
213
  };
214
214
  return M(H), t == null || t(H), H;
215
215
  });
216
216
  }, Ee = (k, F) => {
217
- const H = [...g], M = (L, D) => {
218
- const v = D.shift(), S = L.find((q) => q.id === v), z = L.findIndex((q) => q.id === v);
217
+ const H = [...u], M = (P, R) => {
218
+ const v = R.shift(), S = P.find((q) => q.id === v), z = P.findIndex((q) => q.id === v);
219
219
  if (S) {
220
- if (D.length)
221
- S.children = M(S.children || [], D);
220
+ if (R.length)
221
+ S.children = M(S.children || [], R);
222
222
  else {
223
223
  const q = (k == null ? void 0 : k.type) ?? "app";
224
224
  S.children = [
@@ -230,23 +230,23 @@ const Me = be({
230
230
  }
231
231
  ];
232
232
  }
233
- return L.splice(z, 1, S), L;
233
+ return P.splice(z, 1, S), P;
234
234
  } else
235
- return L;
235
+ return P;
236
236
  };
237
237
  d(M(H, F));
238
238
  };
239
239
  return oe(() => {
240
- (r == null ? void 0 : r.length) > 0 && g.length === 0 && W(r);
240
+ (r == null ? void 0 : r.length) > 0 && u.length === 0 && W(r);
241
241
  }, [r]), oe(() => {
242
- N.current = y, y !== null && re();
243
- }, [y]), oe(() => {
242
+ N.current = x, x !== null && re();
243
+ }, [x]), oe(() => {
244
244
  n && _ != null && _.length && !j && (W(_), le(!0));
245
245
  }, [_, j, n]), qe(
246
246
  () => {
247
- n && Q(g);
247
+ n && Q(u);
248
248
  },
249
- [g, n],
249
+ [u, n],
250
250
  {
251
251
  wait: 1e3
252
252
  }
@@ -254,24 +254,24 @@ const Me = be({
254
254
  Me.Provider,
255
255
  {
256
256
  value: {
257
- list: g,
257
+ list: u,
258
258
  setList: W,
259
259
  contextMenu: A,
260
- setContextMenu: P,
261
- listStatus: y,
262
- setListStatus: $,
260
+ setContextMenu: $,
261
+ listStatus: x,
262
+ setListStatus: B,
263
263
  contextMenuFuns: O,
264
264
  hideContextMenu: re,
265
265
  showInfoItemData: w,
266
266
  setShowInfoItemData: h,
267
- openGroupItemData: R,
268
- setOpenGroupItemData: u,
267
+ openGroupItemData: L,
268
+ setOpenGroupItemData: m,
269
269
  longPressTriggered: I,
270
- updateItemConfig: Pe,
270
+ updateItemConfig: $e,
271
271
  updateItem: ze,
272
272
  removeItem: Ae,
273
273
  addItem: Ee,
274
- moveItemId: m,
274
+ moveItemId: p,
275
275
  setMoveItemId: f,
276
276
  moveTargetId: E,
277
277
  setMoveTargetId: V
@@ -287,11 +287,11 @@ const Me = be({
287
287
  },
288
288
  menuHide: { opacity: 0, y: 20, transition: { duration: 0.2 } }
289
289
  }, se = (a) => {
290
- const { icon: e, title: r, onClick: t } = a, { theme: l } = K(), { light: n, dark: c } = Y.getTheme(l);
290
+ const { icon: e, title: r, onClick: t } = a, { theme: i } = K(), { light: n, dark: c } = Y.getTheme(i);
291
291
  return /* @__PURE__ */ o(
292
292
  b.div,
293
293
  {
294
- className: i`
294
+ className: l`
295
295
  &:hover {
296
296
  background-color: ${n.contextMenuActiveColor};
297
297
  @media (prefers-color-scheme: dark) {
@@ -308,8 +308,8 @@ const Me = be({
308
308
  user-select: none;
309
309
  border-radius: 0.5rem;
310
310
  `,
311
- onClick: (p) => {
312
- p.stopPropagation(), t == null || t();
311
+ onClick: (g) => {
312
+ g.stopPropagation(), t == null || t();
313
313
  },
314
314
  variants: _o,
315
315
  children: /* @__PURE__ */ G(
@@ -317,7 +317,7 @@ const Me = be({
317
317
  {
318
318
  className: T(
319
319
  "py-1.5 px-3 rounded-lg",
320
- i`
320
+ l`
321
321
  padding-top: 0.375rem;
322
322
  padding-bottom: 0.375rem;
323
323
  padding-left: 0.75rem;
@@ -331,7 +331,7 @@ const Me = be({
331
331
  b.div,
332
332
  {
333
333
  className: T(
334
- i`
334
+ l`
335
335
  margin-bottom: 0.375rem;
336
336
  display: flex;
337
337
  justify-content: center;
@@ -351,23 +351,23 @@ const Me = be({
351
351
  showInfoButton: e = !0,
352
352
  showRemoveButton: r = !0,
353
353
  showShareButton: t = !0,
354
- showSizeButton: l = !0,
354
+ showSizeButton: i = !0,
355
355
  onInfoClick: n,
356
356
  onShareClick: c,
357
- onRemoveClick: p
357
+ onRemoveClick: g
358
358
  } = a, {
359
359
  contextMenu: s,
360
- setContextMenu: x,
361
- hideContextMenu: y,
362
- setShowInfoItemData: $,
360
+ setContextMenu: y,
361
+ hideContextMenu: x,
362
+ setShowInfoItemData: B,
363
363
  removeItem: N,
364
364
  updateItemConfig: A
365
- } = Z(), { theme: P } = K(), { light: g, dark: d } = Y.getTheme(P), { data: w } = s ?? {}, { config: h = {} } = w ?? {}, R = () => {
365
+ } = Z(), { theme: $ } = K(), { light: u, dark: d } = Y.getTheme($), { data: w } = s ?? {}, { config: h = {} } = w ?? {}, L = () => {
366
366
  var C;
367
- const u = Ie[(C = s == null ? void 0 : s.data) == null ? void 0 : C.type], I = [];
368
- for (let m = 1; m <= ((u == null ? void 0 : u.maxRow) ?? 2); m++)
369
- for (let f = 1; f <= ((u == null ? void 0 : u.maxCol) ?? 2); f++)
370
- I.push(`${m}x${f}`);
367
+ const m = Ie[(C = s == null ? void 0 : s.data) == null ? void 0 : C.type], I = [];
368
+ for (let p = 1; p <= ((m == null ? void 0 : m.maxRow) ?? 2); p++)
369
+ for (let f = 1; f <= ((m == null ? void 0 : m.maxCol) ?? 2); f++)
370
+ I.push(`${p}x${f}`);
371
371
  return I;
372
372
  };
373
373
  return /* @__PURE__ */ o(ue, { children: s && /* @__PURE__ */ G(
@@ -376,29 +376,29 @@ const Me = be({
376
376
  initial: { opacity: 0 },
377
377
  animate: { opacity: 1 },
378
378
  exit: { opacity: 0 },
379
- onMouseDown: (u) => {
380
- u.stopPropagation(), u.preventDefault();
379
+ onMouseDown: (m) => {
380
+ m.stopPropagation(), m.preventDefault();
381
381
  },
382
382
  children: [
383
383
  /* @__PURE__ */ o(
384
384
  b.div,
385
385
  {
386
386
  className: T(
387
- i`
387
+ l`
388
388
  border-radius: 0.5rem;
389
389
  overflow: hidden;
390
- background-color: ${g.contextMenuBackgroundColor};
391
- box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
390
+ background-color: ${u.contextMenuBackgroundColor};
391
+ box-shadow: 0 0 0.5rem ${u.contextMenuShadowColor};
392
392
  @media (prefers-color-scheme: dark) {
393
393
  background-color: ${d.contextMenuBackgroundColor};
394
394
  box-shadow: 0 0 0.5rem ${d.contextMenuShadowColor};
395
395
  }
396
396
  `
397
397
  ),
398
- children: l && h.allowResize !== !1 && /* @__PURE__ */ o(
398
+ children: i && h.allowResize !== !1 && /* @__PURE__ */ o(
399
399
  b.ul,
400
400
  {
401
- className: i`
401
+ className: l`
402
402
  background-color: white;
403
403
  padding: 0.25rem;
404
404
  margin: 0;
@@ -408,11 +408,11 @@ const Me = be({
408
408
  label: "修改大小",
409
409
  key: "size",
410
410
  icon: /* @__PURE__ */ o(Ue, { size: 14 }),
411
- items: R().map((u) => ({
412
- label: u,
413
- key: u,
411
+ items: L().map((m) => ({
412
+ label: m,
413
+ key: m,
414
414
  onClick: () => {
415
- const [I, C] = u.split("x").map(Number);
415
+ const [I, C] = m.split("x").map(Number);
416
416
  A(s.data.id, {
417
417
  row: I,
418
418
  col: C
@@ -420,10 +420,10 @@ const Me = be({
420
420
  }
421
421
  }))
422
422
  }
423
- ].map((u) => /* @__PURE__ */ G(
423
+ ].map((m) => /* @__PURE__ */ G(
424
424
  b.li,
425
425
  {
426
- className: i`
426
+ className: l`
427
427
  padding-top: 0.5rem;
428
428
  padding-bottom: 0.5rem;
429
429
  padding-left: 0.75rem;
@@ -433,7 +433,7 @@ const Me = be({
433
433
  /* @__PURE__ */ G(
434
434
  b.p,
435
435
  {
436
- className: i`
436
+ className: l`
437
437
  display: flex;
438
438
  align-items: center;
439
439
  font-size: 0.875rem;
@@ -443,26 +443,26 @@ const Me = be({
443
443
  margin: 0;
444
444
  `,
445
445
  children: [
446
- u.icon,
446
+ m.icon,
447
447
  " ",
448
- u.label
448
+ m.label
449
449
  ]
450
450
  }
451
451
  ),
452
452
  /* @__PURE__ */ o(
453
453
  b.div,
454
454
  {
455
- className: i`
455
+ className: l`
456
456
  display: grid;
457
457
  grid-template-columns: repeat(2, minmax(0, 1fr));
458
458
  gap: 0.25rem;
459
459
  `,
460
- children: u.items.map((I) => /* @__PURE__ */ o(
460
+ children: m.items.map((I) => /* @__PURE__ */ o(
461
461
  b.div,
462
462
  {
463
463
  className: T(
464
464
  "py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",
465
- i`
465
+ l`
466
466
  padding-top: 0.25rem;
467
467
  padding-bottom: 0.25rem;
468
468
  padding-left: 0.5rem;
@@ -473,19 +473,19 @@ const Me = be({
473
473
  line-height: 1.25rem;
474
474
  cursor: pointer;
475
475
  text-align: center;
476
- color: ${g.contextMenuTextColor};
476
+ color: ${u.contextMenuTextColor};
477
477
  @media (prefers-color-scheme: dark) {
478
478
  color: ${d.contextMenuTextColor};
479
479
  }
480
480
  &:hover {
481
- background-color: ${g.contextMenuActiveColor};
481
+ background-color: ${u.contextMenuActiveColor};
482
482
  @media (prefers-color-scheme: dark) {
483
483
  background-color: ${d.contextMenuActiveColor};
484
484
  }
485
485
  }
486
486
  `,
487
- `${h.row}x${h.col}` === I.key && i`
488
- background-color: ${g.contextMenuActiveColor};
487
+ `${h.row}x${h.col}` === I.key && l`
488
+ background-color: ${u.contextMenuActiveColor};
489
489
  @media (prefers-color-scheme: dark) {
490
490
  background-color: ${d.contextMenuActiveColor};
491
491
  }
@@ -500,7 +500,7 @@ const Me = be({
500
500
  )
501
501
  ]
502
502
  },
503
- u.key
503
+ m.key
504
504
  ))
505
505
  }
506
506
  )
@@ -510,9 +510,9 @@ const Me = be({
510
510
  b.div,
511
511
  {
512
512
  className: T(
513
- i`
514
- background-color: ${g.contextMenuBackgroundColor};
515
- box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
513
+ l`
514
+ background-color: ${u.contextMenuBackgroundColor};
515
+ box-shadow: 0 0 0.5rem ${u.contextMenuShadowColor};
516
516
  @media (prefers-color-scheme: dark) {
517
517
  background-color: ${d.contextMenuBackgroundColor};
518
518
  box-shadow: 0 0 0.5rem ${d.contextMenuShadowColor};
@@ -550,11 +550,11 @@ const Me = be({
550
550
  n(s.data);
551
551
  return;
552
552
  }
553
- $({
553
+ B({
554
554
  ...s.data,
555
555
  pageX: s.pageX,
556
556
  pageY: s.pageY
557
- }), y();
557
+ }), x();
558
558
  }
559
559
  }
560
560
  ),
@@ -564,11 +564,11 @@ const Me = be({
564
564
  icon: /* @__PURE__ */ o(We, { size: 20 }),
565
565
  title: "移除",
566
566
  onClick: () => {
567
- if (p) {
568
- p(s.data, N);
567
+ if (g) {
568
+ g(s.data, N);
569
569
  return;
570
570
  }
571
- x(null), N(s.data.id);
571
+ y(null), N(s.data.id);
572
572
  }
573
573
  }
574
574
  )
@@ -579,17 +579,17 @@ const Me = be({
579
579
  }
580
580
  ) });
581
581
  }, Jo = (a) => {
582
- const { data: e, noLetters: r = !1 } = a, { contextMenuFuns: t } = Z(), { itemIconBuilder: l, theme: n, contextMenu: c } = K(), { light: p, dark: s } = Y.getTheme(n), { data: x = {} } = e, { name: y } = x;
582
+ const { data: e, noLetters: r = !1 } = a, { contextMenuFuns: t } = Z(), { itemIconBuilder: i, theme: n, contextMenu: c } = K(), { light: g, dark: s } = Y.getTheme(n), { data: y = {} } = e, { name: x } = y;
583
583
  return /* @__PURE__ */ G(de, { children: [
584
584
  /* @__PURE__ */ o(
585
585
  b.div,
586
586
  {
587
- className: i`
587
+ className: l`
588
588
  width: 4rem;
589
589
  height: 4rem;
590
- background-color: ${p.itemIconBackgroundColor};
590
+ background-color: ${g.itemIconBackgroundColor};
591
591
  border-radius: 0.75rem;
592
- box-shadow: 0 0 0.5rem ${p.itemIconShadowColor};
592
+ box-shadow: 0 0 0.5rem ${g.itemIconShadowColor};
593
593
  cursor: pointer;
594
594
  position: relative;
595
595
  overflow: hidden;
@@ -602,19 +602,19 @@ const Me = be({
602
602
  children: /* @__PURE__ */ o(
603
603
  "div",
604
604
  {
605
- className: i`
605
+ className: l`
606
606
  position: absolute;
607
607
  left: 0;
608
608
  top: 0;
609
609
  width: 100%;
610
610
  height: 100%;
611
- color: ${p.itemNameColor};
611
+ color: ${g.itemNameColor};
612
612
  @media (prefers-color-scheme: dark) {
613
613
  color: ${s.itemNameColor};
614
614
  }
615
615
  `,
616
616
  ...t(e, c !== !1),
617
- children: l == null ? void 0 : l(e)
617
+ children: i == null ? void 0 : i(e)
618
618
  }
619
619
  )
620
620
  }
@@ -623,20 +623,20 @@ const Me = be({
623
623
  b.p,
624
624
  {
625
625
  className: T(
626
- i`
626
+ l`
627
627
  text-align: center;
628
628
  margin-top: 0.25rem;
629
629
  margin-bottom: 0;
630
- color: ${p.itemNameColor};
630
+ color: ${g.itemNameColor};
631
631
  @media (prefers-color-scheme: dark) {
632
632
  color: ${s.itemNameColor};
633
633
  }
634
634
  `,
635
- r && i`
635
+ r && l`
636
636
  color: transparent;
637
637
  `
638
638
  ),
639
- children: y
639
+ children: x
640
640
  }
641
641
  )
642
642
  ] });
@@ -645,17 +645,17 @@ const Me = be({
645
645
  data: e,
646
646
  className: r,
647
647
  itemIndex: t,
648
- onClick: l,
648
+ onClick: i,
649
649
  disabledDrag: n = !1,
650
650
  children: c,
651
- parentIds: p,
651
+ parentIds: g,
652
652
  childrenLength: s
653
- } = a, { contextMenu: x, setContextMenu: y } = Z(), { contextMenu: $ } = K();
653
+ } = a, { contextMenu: y, setContextMenu: x } = Z(), { contextMenu: B } = K();
654
654
  return /* @__PURE__ */ o(
655
655
  Oe,
656
656
  {
657
657
  placement: "bottom",
658
- overlayClassName: i`
658
+ overlayClassName: l`
659
659
  background-color: transparent;
660
660
  .rc-tooltip-inner {
661
661
  background-color: transparent;
@@ -663,10 +663,10 @@ const Me = be({
663
663
  border: none;
664
664
  }
665
665
  `,
666
- overlay: /* @__PURE__ */ o(Wo, { ...$ }),
667
- visible: (x == null ? void 0 : x.data.id) === e.id,
666
+ overlay: /* @__PURE__ */ o(Wo, { ...B }),
667
+ visible: (y == null ? void 0 : y.data.id) === e.id,
668
668
  onVisibleChange: (N) => {
669
- N || y(null);
669
+ N || x(null);
670
670
  },
671
671
  destroyTooltipOnHide: !0,
672
672
  children: /* @__PURE__ */ o(
@@ -674,9 +674,9 @@ const Me = be({
674
674
  {
675
675
  "data-id": e.id,
676
676
  "data-index": t,
677
- "data-parent-ids": p == null ? void 0 : p.join(","),
677
+ "data-parent-ids": g == null ? void 0 : g.join(","),
678
678
  "data-children-length": s,
679
- onClick: () => l == null ? void 0 : l(e),
679
+ onClick: () => i == null ? void 0 : i(e),
680
680
  className: T(n && "drag-disabled", r),
681
681
  children: c ?? /* @__PURE__ */ o(Jo, { ...a })
682
682
  }
@@ -688,29 +688,29 @@ const Me = be({
688
688
  data: e,
689
689
  className: r,
690
690
  parentIds: t,
691
- itemIndex: l,
691
+ itemIndex: i,
692
692
  onClick: n,
693
693
  noLetters: c = !1
694
694
  } = a, {
695
- contextMenuFuns: p,
695
+ contextMenuFuns: g,
696
696
  setList: s,
697
- setOpenGroupItemData: x,
698
- longPressTriggered: y,
699
- moveItemId: $,
697
+ setOpenGroupItemData: y,
698
+ longPressTriggered: x,
699
+ moveItemId: B,
700
700
  moveTargetId: N,
701
701
  setMoveTargetId: A,
702
- listStatus: P
703
- } = Z(), { itemIconBuilder: g, theme: d, contextMenu: w } = K(), { light: h, dark: R } = Y.getTheme(d), { children: u, data: I, config: C } = e, { row: m = 1, col: f = 1 } = C ?? {}, E = {
702
+ listStatus: $
703
+ } = Z(), { itemIconBuilder: u, theme: d, contextMenu: w } = K(), { light: h, dark: L } = Y.getTheme(d), { children: m, data: I, config: C } = e, { row: p = 1, col: f = 1 } = C ?? {}, E = {
704
704
  visible: { opacity: 1, scale: 1 },
705
705
  hidden: { opacity: 0, scale: 0.95 }
706
- }, V = ((u == null ? void 0 : u.length) ?? 0) === 0, j = V ? [e] : [...u ?? []].slice(0, 9), le = ae(() => $ === e.id.toString(), [e.id, $]), _ = ae(() => N === e.id, [e.id, N]), Q = i`
706
+ }, V = ((m == null ? void 0 : m.length) ?? 0) === 0, j = V ? [e] : [...m ?? []].slice(0, 9), le = ae(() => B === e.id.toString(), [e.id, B]), _ = ae(() => N === e.id, [e.id, N]), Q = l`
707
707
  overflow: hidden;
708
708
  cursor: pointer;
709
709
  background-color: ${h.itemIconBackgroundColor};
710
710
  box-shadow: 0 0 0.5rem ${h.itemIconShadowColor};
711
711
  @media (prefers-color-scheme: dark) {
712
- background-color: ${R.itemIconBackgroundColor};
713
- box-shadow: 0 0 0.5rem ${R.itemIconShadowColor};
712
+ background-color: ${L.itemIconBackgroundColor};
713
+ box-shadow: 0 0 0.5rem ${L.itemIconShadowColor};
714
714
  }
715
715
  `, re = () => {
716
716
  if (V)
@@ -719,7 +719,7 @@ const Me = be({
719
719
  {
720
720
  className: T(
721
721
  "sortable-group-item",
722
- i`
722
+ l`
723
723
  overflow: hidden;
724
724
  cursor: pointer;
725
725
  width: 100%;
@@ -730,21 +730,21 @@ const Me = be({
730
730
  top: 0;
731
731
  border-radius: 0.75rem;
732
732
  @media (prefers-color-scheme: dark) {
733
- background-color: ${R.itemIconBackgroundColor};
733
+ background-color: ${L.itemIconBackgroundColor};
734
734
  }
735
735
  `
736
736
  ),
737
- onClick: (B) => {
738
- B.stopPropagation(), n == null || n(e);
737
+ onClick: (D) => {
738
+ D.stopPropagation(), n == null || n(e);
739
739
  },
740
- children: g == null ? void 0 : g(e)
740
+ children: u == null ? void 0 : u(e)
741
741
  }
742
742
  );
743
- if (m === 1 && f === 1 || m === 2 && f === 2)
743
+ if (p === 1 && f === 1 || p === 2 && f === 2)
744
744
  return /* @__PURE__ */ o(
745
745
  b.div,
746
746
  {
747
- className: i`
747
+ className: l`
748
748
  display: grid;
749
749
  width: 100%;
750
750
  height: 100%;
@@ -754,31 +754,31 @@ const Me = be({
754
754
  gap: ${f === 1 ? "0.125rem" : "0.5rem"};
755
755
  place-items: center;
756
756
  `,
757
- children: j == null ? void 0 : j.slice(0, 9).map((B) => /* @__PURE__ */ o(
757
+ children: j == null ? void 0 : j.slice(0, 9).map((D) => /* @__PURE__ */ o(
758
758
  b.div,
759
759
  {
760
760
  className: T(
761
761
  Q,
762
- i`
762
+ l`
763
763
  border-radius: ${f === 1 ? "0.25rem" : "0.5rem"};
764
764
  width: 100%;
765
765
  height: 100%;
766
766
  `
767
767
  ),
768
768
  onClick: (O) => {
769
- O.stopPropagation(), n == null || n(B);
769
+ O.stopPropagation(), n == null || n(D);
770
770
  },
771
- children: g == null ? void 0 : g(B)
771
+ children: u == null ? void 0 : u(D)
772
772
  },
773
- B.id
773
+ D.id
774
774
  ))
775
775
  }
776
776
  );
777
- if (m === 1 && f === 2)
777
+ if (p === 1 && f === 2)
778
778
  return /* @__PURE__ */ o(
779
779
  b.div,
780
780
  {
781
- className: i`
781
+ className: l`
782
782
  display: grid;
783
783
  grid-template-columns: repeat(10, minmax(0, 1fr));
784
784
  grid-template-rows: repeat(4, minmax(0, 1fr));
@@ -788,18 +788,18 @@ const Me = be({
788
788
  height: 52px;
789
789
  place-items: center;
790
790
  `,
791
- children: j == null ? void 0 : j.slice(0, 4).map((B, O) => /* @__PURE__ */ o(
791
+ children: j == null ? void 0 : j.slice(0, 4).map((D, O) => /* @__PURE__ */ o(
792
792
  b.div,
793
793
  {
794
794
  className: T(
795
795
  Q,
796
- O < 2 ? i`
796
+ O < 2 ? l`
797
797
  width: 52px;
798
798
  height: 52px;
799
799
  border-radius: 0.5rem;
800
800
  grid-column: span 4 / span 4;
801
801
  grid-row: span 4 / span 4;
802
- ` : i`
802
+ ` : l`
803
803
  width: 1.5rem;
804
804
  height: 1.5rem;
805
805
  border-radius: 0.375rem;
@@ -808,19 +808,19 @@ const Me = be({
808
808
  `
809
809
  ),
810
810
  onClick: (W) => {
811
- O > 2 || (W.stopPropagation(), n == null || n(B));
811
+ O > 2 || (W.stopPropagation(), n == null || n(D));
812
812
  },
813
- children: g == null ? void 0 : g(B)
813
+ children: u == null ? void 0 : u(D)
814
814
  },
815
- B.id
815
+ D.id
816
816
  ))
817
817
  }
818
818
  );
819
- if (m === 2 && f === 1)
819
+ if (p === 2 && f === 1)
820
820
  return /* @__PURE__ */ o(
821
821
  b.div,
822
822
  {
823
- className: i`
823
+ className: l`
824
824
  display: grid;
825
825
  grid-template-columns: repeat(4, minmax(0, 1fr));
826
826
  grid-template-rows: repeat(10, minmax(0, 1fr));
@@ -830,18 +830,18 @@ const Me = be({
830
830
  height: 144px;
831
831
  place-items: center;
832
832
  `,
833
- children: j == null ? void 0 : j.slice(0, 4).map((B, O) => /* @__PURE__ */ o(
833
+ children: j == null ? void 0 : j.slice(0, 4).map((D, O) => /* @__PURE__ */ o(
834
834
  b.div,
835
835
  {
836
836
  className: T(
837
837
  Q,
838
- O < 2 ? i`
838
+ O < 2 ? l`
839
839
  width: 52px;
840
840
  height: 52px;
841
841
  border-radius: 0.5rem;
842
842
  grid-column: span 4 / span 4;
843
843
  grid-row: span 4 / span 4;
844
- ` : i`
844
+ ` : l`
845
845
  width: 1.5rem;
846
846
  height: 1.5rem;
847
847
  grid-column: span 2 / span 2;
@@ -849,11 +849,11 @@ const Me = be({
849
849
  `
850
850
  ),
851
851
  onClick: (W) => {
852
- O > 2 || (W.stopPropagation(), n == null || n(B));
852
+ O > 2 || (W.stopPropagation(), n == null || n(D));
853
853
  },
854
- children: g == null ? void 0 : g(B)
854
+ children: u == null ? void 0 : u(D)
855
855
  },
856
- B.id
856
+ D.id
857
857
  ))
858
858
  }
859
859
  );
@@ -862,12 +862,12 @@ const Me = be({
862
862
  me,
863
863
  {
864
864
  data: e,
865
- itemIndex: l,
865
+ itemIndex: i,
866
866
  parentIds: t,
867
- childrenLength: u == null ? void 0 : u.length,
867
+ childrenLength: m == null ? void 0 : m.length,
868
868
  className: T(
869
- i`
870
- grid-row: span ${m};
869
+ l`
870
+ grid-row: span ${p};
871
871
  grid-column: span ${f};
872
872
  `,
873
873
  r
@@ -879,31 +879,31 @@ const Me = be({
879
879
  whileTap: { scale: 0.9 },
880
880
  className: T(
881
881
  _ ? "!scale-110" : "",
882
- i`
882
+ l`
883
883
  cursor: pointer;
884
884
  position: relative;
885
885
  border-radius: 0.75rem;
886
886
  background-color: ${h.groupItemIconBackgroundColor};
887
887
  box-shadow: 0 0 0.5rem ${h.groupItemIconShadowColor};
888
888
  @media (prefers-color-scheme: dark) {
889
- background-color: ${R.groupItemIconBackgroundColor};
890
- box-shadow: 0 0 0.5rem ${R.groupItemIconShadowColor};
889
+ background-color: ${L.groupItemIconBackgroundColor};
890
+ box-shadow: 0 0 0.5rem ${L.groupItemIconShadowColor};
891
891
  }
892
892
  /* overflow: hidden; */
893
893
  transition: all 0.3s;
894
894
  margin: 0 auto;
895
895
  width: ${f * 64 + 32 * (f - 1)}px;
896
- height: ${m * 64 + 32 * (m - 1)}px;
896
+ height: ${p * 64 + 32 * (p - 1)}px;
897
897
  `
898
898
  ),
899
- onClick: (B) => {
900
- !V && !y && (e.parentIds = t, e.pageX = B.pageX, e.pageY = B.pageY, x(e));
899
+ onClick: (D) => {
900
+ !V && !x && (e.parentIds = t, e.pageX = D.pageX, e.pageY = D.pageY, y(e));
901
901
  },
902
- ...p(e, w !== !1),
902
+ ...g(e, w !== !1),
903
903
  children: /* @__PURE__ */ G(
904
904
  b.div,
905
905
  {
906
- className: i`
906
+ className: l`
907
907
  position: relative;
908
908
  width: 100%;
909
909
  height: 100%;
@@ -919,14 +919,14 @@ const Me = be({
919
919
  {
920
920
  className: T(
921
921
  "sortable-group-item",
922
- i`
922
+ l`
923
923
  position: absolute;
924
924
  cursor: pointer;
925
925
  left: 0.375rem;
926
926
  top: 0.375rem;
927
927
  width: calc(100% - 0.75rem);
928
928
  height: calc(100% - 0.75rem);
929
- pointer-events: ${P === null ? "none" : "auto"};
929
+ pointer-events: ${$ === null ? "none" : "auto"};
930
930
  > * {
931
931
  opacity: 0;
932
932
  }
@@ -935,8 +935,8 @@ const Me = be({
935
935
  group: { name: "nested", pull: !1, put: !0 },
936
936
  animation: 150,
937
937
  fallbackOnBody: !0,
938
- list: u ?? [],
939
- setList: (B) => s(B, t),
938
+ list: m ?? [],
939
+ setList: (D) => s(D, t),
940
940
  filter: () => !0,
941
941
  "data-id": e.id,
942
942
  onChange: () => {
@@ -953,16 +953,16 @@ const Me = be({
953
953
  b.p,
954
954
  {
955
955
  className: T(
956
- i`
956
+ l`
957
957
  text-align: center;
958
958
  margin-top: 0.25rem;
959
959
  margin-bottom: 0;
960
960
  color: ${h.itemNameColor};
961
961
  @media (prefers-color-scheme: dark) {
962
- color: ${R.itemNameColor};
962
+ color: ${L.itemNameColor};
963
963
  }
964
964
  `,
965
- c && i`
965
+ c && l`
966
966
  color: transparent;
967
967
  `
968
968
  ),
@@ -974,7 +974,7 @@ const Me = be({
974
974
  ]
975
975
  }
976
976
  );
977
- }, Se = i`
977
+ }, Se = l`
978
978
  padding: 8px;
979
979
  transition: all 0.2s;
980
980
  > div {
@@ -988,16 +988,16 @@ const Me = be({
988
988
  }
989
989
  `, Zo = (a) => {
990
990
  const { data: e, onClose: r, onItemClick: t } = a, {
991
- list: l,
991
+ list: i,
992
992
  setList: n,
993
993
  setListStatus: c,
994
- setMoveItemId: p,
994
+ setMoveItemId: g,
995
995
  setMoveTargetId: s,
996
- updateItem: x
997
- } = Z(), { theme: y } = K(), { light: $, dark: N } = Y.getTheme(y), [A, P] = X("文件夹"), g = [...(e == null ? void 0 : e.children) ?? []];
996
+ updateItem: y
997
+ } = Z(), { theme: x } = K(), { light: B, dark: N } = Y.getTheme(x), [A, $] = X("文件夹"), u = [...(e == null ? void 0 : e.children) ?? []];
998
998
  return oe(() => {
999
999
  var d;
1000
- e && P((d = e.data) == null ? void 0 : d.name);
1000
+ e && $((d = e.data) == null ? void 0 : d.name);
1001
1001
  }, [e]), /* @__PURE__ */ o(
1002
1002
  ve,
1003
1003
  {
@@ -1014,7 +1014,7 @@ const Me = be({
1014
1014
  title: /* @__PURE__ */ o(
1015
1015
  "input",
1016
1016
  {
1017
- className: i`
1017
+ className: l`
1018
1018
  background-color: transparent;
1019
1019
  border-style: none;
1020
1020
  text-align: center;
@@ -1030,10 +1030,10 @@ const Me = be({
1030
1030
  `,
1031
1031
  value: A,
1032
1032
  onChange: (d) => {
1033
- P(d.target.value);
1033
+ $(d.target.value);
1034
1034
  },
1035
1035
  onBlur: () => {
1036
- e && x(e.id, {
1036
+ e && y(e.id, {
1037
1037
  ...e.data,
1038
1038
  name: A
1039
1039
  });
@@ -1044,7 +1044,7 @@ const Me = be({
1044
1044
  closable: !1,
1045
1045
  className: T(
1046
1046
  "group-item-modal",
1047
- i`
1047
+ l`
1048
1048
  .rc-dialog-content {
1049
1049
  background-color: transparent;
1050
1050
  box-shadow: none;
@@ -1059,7 +1059,7 @@ const Me = be({
1059
1059
  }
1060
1060
  }
1061
1061
  .rc-dialog-body {
1062
- background-color: ${$.groupItemModalBackgroundColor};
1062
+ background-color: ${B.groupItemModalBackgroundColor};
1063
1063
  @media (prefers-color-scheme: dark) {
1064
1064
  background-color: ${N.groupItemModalBackgroundColor};
1065
1065
  }
@@ -1074,7 +1074,7 @@ const Me = be({
1074
1074
  children: /* @__PURE__ */ o(
1075
1075
  "div",
1076
1076
  {
1077
- className: i`
1077
+ className: l`
1078
1078
  overflow-y: auto;
1079
1079
  max-height: 60vh;
1080
1080
  padding: 1.25rem 0;
@@ -1088,7 +1088,7 @@ const Me = be({
1088
1088
  children: /* @__PURE__ */ o(
1089
1089
  ge,
1090
1090
  {
1091
- className: i`
1091
+ className: l`
1092
1092
  display: grid;
1093
1093
  gap: 1rem;
1094
1094
  place-items: center;
@@ -1101,20 +1101,20 @@ const Me = be({
1101
1101
  fallbackOnBody: !0,
1102
1102
  list: (e == null ? void 0 : e.children) ?? [],
1103
1103
  setList: (d) => {
1104
- var R, u;
1105
- const w = d.map((I) => I.id), h = (u = (R = l.find((I) => I.id === (e == null ? void 0 : e.id))) == null ? void 0 : R.children) == null ? void 0 : u.map((I) => I.id);
1104
+ var L, m;
1105
+ const w = d.map((I) => I.id), h = (m = (L = i.find((I) => I.id === (e == null ? void 0 : e.id))) == null ? void 0 : L.children) == null ? void 0 : m.map((I) => I.id);
1106
1106
  w.length === (h == null ? void 0 : h.length) && w.every((I, C) => I === h[C]) || w.length < ((h == null ? void 0 : h.length) ?? 0) || n(d, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
1107
1107
  },
1108
1108
  onMove: () => (s(null), c("onMove"), !0),
1109
1109
  onStart: (d) => {
1110
1110
  const w = d.item.dataset;
1111
- w != null && w.id && p(w.id), c("onMove");
1111
+ w != null && w.id && g(w.id), c("onMove");
1112
1112
  },
1113
1113
  onEnd: () => {
1114
- p(null), s(null), c(null);
1114
+ g(null), s(null), c(null);
1115
1115
  },
1116
1116
  ghostClass: Se,
1117
- children: g.map((d, w) => /* @__PURE__ */ o(
1117
+ children: u.map((d, w) => /* @__PURE__ */ o(
1118
1118
  me,
1119
1119
  {
1120
1120
  data: d,
@@ -1158,21 +1158,21 @@ const Me = be({
1158
1158
  pagination: e = { position: "bottom" },
1159
1159
  className: r,
1160
1160
  sliderProps: t,
1161
- sliderRef: l,
1161
+ sliderRef: i,
1162
1162
  onItemClick: n
1163
- } = a, c = te(null), p = te(null), {
1163
+ } = a, c = te(null), g = te(null), {
1164
1164
  list: s,
1165
- setList: x,
1166
- setListStatus: y,
1167
- showInfoItemData: $,
1165
+ setList: y,
1166
+ setListStatus: x,
1167
+ showInfoItemData: B,
1168
1168
  setShowInfoItemData: N,
1169
1169
  openGroupItemData: A,
1170
- setOpenGroupItemData: P,
1171
- setMoveItemId: g,
1170
+ setOpenGroupItemData: $,
1171
+ setMoveItemId: u,
1172
1172
  setMoveTargetId: d,
1173
1173
  addItem: w
1174
- } = Z(), { pagingDotBuilder: h, pagingDotsBuilder: R, itemBuilder: u } = K(), I = ae(() => e === !1 ? {} : {
1175
- top: i`
1174
+ } = Z(), { pagingDotBuilder: h, pagingDotsBuilder: L, itemBuilder: m } = K(), I = ae(() => e === !1 ? {} : {
1175
+ top: l`
1176
1176
  display: flex;
1177
1177
  flex-direction: column;
1178
1178
  .slick-list {
@@ -1182,12 +1182,12 @@ const Me = be({
1182
1182
  position: static;
1183
1183
  }
1184
1184
  `,
1185
- bottom: i`
1185
+ bottom: l`
1186
1186
  .slick-dots {
1187
1187
  position: static;
1188
1188
  }
1189
1189
  `,
1190
- left: i`
1190
+ left: l`
1191
1191
  .slick-dots {
1192
1192
  position: absolute;
1193
1193
  width: auto;
@@ -1203,7 +1203,7 @@ const Me = be({
1203
1203
  }
1204
1204
  }
1205
1205
  `,
1206
- right: i`
1206
+ right: l`
1207
1207
  .slick-dots {
1208
1208
  position: absolute;
1209
1209
  width: auto;
@@ -1227,14 +1227,14 @@ const Me = be({
1227
1227
  useCSS: !0,
1228
1228
  useTransform: !0,
1229
1229
  arrows: !1,
1230
- ref: l ?? c,
1230
+ ref: i ?? c,
1231
1231
  infinite: !1,
1232
1232
  dots: !0,
1233
1233
  touchMove: !1,
1234
1234
  lazyLoad: "anticipated",
1235
1235
  className: T(
1236
1236
  I,
1237
- i`
1237
+ l`
1238
1238
  .slick-track {
1239
1239
  display: flex;
1240
1240
  align-items: stretch;
@@ -1253,25 +1253,25 @@ const Me = be({
1253
1253
  r
1254
1254
  ),
1255
1255
  customPaging: (C) => {
1256
- var m, f;
1256
+ var p, f;
1257
1257
  return h ? h(s[C], C) : /* @__PURE__ */ o(
1258
1258
  "div",
1259
1259
  {
1260
1260
  onDragEnter: () => {
1261
1261
  var E;
1262
- (E = (l ?? c).current) == null || E.slickGoTo(C);
1262
+ (E = (i ?? c).current) == null || E.slickGoTo(C);
1263
1263
  },
1264
- children: (f = (m = s[C]) == null ? void 0 : m.data) == null ? void 0 : f.name
1264
+ children: (f = (p = s[C]) == null ? void 0 : p.data) == null ? void 0 : f.name
1265
1265
  }
1266
1266
  );
1267
1267
  },
1268
- appendDots: (C) => R ? R(C) : e === !1 ? /* @__PURE__ */ o("div", {}) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
1268
+ appendDots: (C) => L ? L(C) : e === !1 ? /* @__PURE__ */ o("div", {}) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
1269
1269
  "ul",
1270
1270
  {
1271
- ref: p,
1271
+ ref: g,
1272
1272
  className: T(
1273
1273
  "slick-dots-default",
1274
- i`
1274
+ l`
1275
1275
  padding: 0.5rem;
1276
1276
  display: inline-flex;
1277
1277
  justify-content: center;
@@ -1299,9 +1299,9 @@ const Me = be({
1299
1299
  children: s.map((C) => /* @__PURE__ */ o(
1300
1300
  "div",
1301
1301
  {
1302
- onDrop: (m) => {
1303
- m.preventDefault();
1304
- const f = m.dataTransfer.getData("text/plain");
1302
+ onDrop: (p) => {
1303
+ p.preventDefault();
1304
+ const f = p.dataTransfer.getData("text/plain");
1305
1305
  if (f !== "")
1306
1306
  try {
1307
1307
  w(JSON.parse(f), [C.id]);
@@ -1309,14 +1309,14 @@ const Me = be({
1309
1309
  console.log("drag error", E);
1310
1310
  }
1311
1311
  },
1312
- onDragOver: (m) => {
1313
- m.preventDefault();
1312
+ onDragOver: (p) => {
1313
+ p.preventDefault();
1314
1314
  },
1315
1315
  children: /* @__PURE__ */ o(
1316
1316
  ge,
1317
1317
  {
1318
1318
  className: T(
1319
- i`
1319
+ l`
1320
1320
  display: grid;
1321
1321
  transition: all 0.3s;
1322
1322
  grid-template-columns: repeat(auto-fill, 96px);
@@ -1332,48 +1332,48 @@ const Me = be({
1332
1332
  swapThreshold: 0.65,
1333
1333
  group: "nested",
1334
1334
  list: C.children ?? [],
1335
- setList: (m) => x(m, [C.id]),
1335
+ setList: (p) => y(p, [C.id]),
1336
1336
  filter: ".drag-disabled",
1337
- onMove: (m) => {
1338
- y("onMove");
1339
- const { dragged: f, related: E } = m, V = f.dataset, j = E.dataset;
1337
+ onMove: (p) => {
1338
+ x("onMove");
1339
+ const { dragged: f, related: E } = p, V = f.dataset, j = E.dataset;
1340
1340
  return d(null), !((Object.keys(j).length === 0 || j.parentIds) && Number(V.childrenLength) > 0 && E.classList.contains("sortable-group-item"));
1341
1341
  },
1342
- onStart: (m) => {
1343
- const f = m.item.dataset;
1344
- f != null && f.id && g(f.id), y("onMove");
1342
+ onStart: (p) => {
1343
+ const f = p.item.dataset;
1344
+ f != null && f.id && u(f.id), x("onMove");
1345
1345
  },
1346
1346
  onEnd: () => {
1347
- g(null), d(null), y(null);
1347
+ u(null), d(null), x(null);
1348
1348
  },
1349
1349
  ghostClass: Se,
1350
- children: (C.children ?? []).map((m, f) => {
1350
+ children: (C.children ?? []).map((p, f) => {
1351
1351
  let E;
1352
- if (u)
1353
- return u(m);
1354
- switch (m.type) {
1352
+ if (m)
1353
+ return m(p);
1354
+ switch (p.type) {
1355
1355
  case "group":
1356
1356
  case "app":
1357
1357
  E = /* @__PURE__ */ o(
1358
1358
  Ko,
1359
1359
  {
1360
- data: m,
1360
+ data: p,
1361
1361
  itemIndex: f,
1362
- parentIds: [C.id, m.id],
1362
+ parentIds: [C.id, p.id],
1363
1363
  onClick: n
1364
1364
  },
1365
- m.id
1365
+ p.id
1366
1366
  );
1367
1367
  break;
1368
1368
  default:
1369
1369
  E = /* @__PURE__ */ o(
1370
1370
  me,
1371
1371
  {
1372
- data: m,
1372
+ data: p,
1373
1373
  itemIndex: f,
1374
1374
  onClick: n
1375
1375
  },
1376
- m.id
1376
+ p.id
1377
1377
  );
1378
1378
  break;
1379
1379
  }
@@ -1389,7 +1389,7 @@ const Me = be({
1389
1389
  /* @__PURE__ */ o(
1390
1390
  Qo,
1391
1391
  {
1392
- data: $,
1392
+ data: B,
1393
1393
  onClose: () => {
1394
1394
  N(null);
1395
1395
  }
@@ -1400,25 +1400,25 @@ const Me = be({
1400
1400
  {
1401
1401
  data: A,
1402
1402
  onClose: () => {
1403
- P(null);
1403
+ $(null);
1404
1404
  },
1405
1405
  onItemClick: n
1406
1406
  }
1407
1407
  )
1408
1408
  ] });
1409
- }, Pt = (a) => {
1409
+ }, $t = (a) => {
1410
1410
  const {
1411
1411
  list: e,
1412
1412
  onChange: r,
1413
1413
  storageKey: t,
1414
- enableCaching: l,
1414
+ enableCaching: i,
1415
1415
  theme: n,
1416
1416
  noLetters: c,
1417
- contextMenu: p,
1417
+ contextMenu: g,
1418
1418
  contextMenuBuilder: s,
1419
- itemBuilder: x,
1420
- itemIconBuilder: y,
1421
- pagingDotBuilder: $,
1419
+ itemBuilder: y,
1420
+ itemIconBuilder: x,
1421
+ pagingDotBuilder: B,
1422
1422
  pagingDotsBuilder: N,
1423
1423
  ...A
1424
1424
  } = a;
@@ -1426,15 +1426,15 @@ const Me = be({
1426
1426
  list: e,
1427
1427
  onChange: r,
1428
1428
  storageKey: t,
1429
- enableCaching: l
1429
+ enableCaching: i
1430
1430
  }, children: /* @__PURE__ */ o(Oo, { ...{
1431
1431
  theme: n,
1432
1432
  noLetters: c,
1433
- contextMenu: p,
1433
+ contextMenu: g,
1434
1434
  pagingDotsBuilder: N,
1435
- pagingDotBuilder: $,
1436
- itemBuilder: x,
1437
- itemIconBuilder: y,
1435
+ pagingDotBuilder: B,
1436
+ itemBuilder: y,
1437
+ itemIconBuilder: x,
1438
1438
  contextMenuBuilder: s
1439
1439
  }, children: /* @__PURE__ */ o(et, { ...A }) }) });
1440
1440
  }, ot = {
@@ -1555,12 +1555,12 @@ const Me = be({
1555
1555
  delete: "删除图片"
1556
1556
  }
1557
1557
  }, tt = (a, e, r) => {
1558
- const l = a.split(".").reduce(
1558
+ const i = a.split(".").reduce(
1559
1559
  (n, c) => typeof n == "string" ? n : n[c],
1560
1560
  ot
1561
1561
  );
1562
- return typeof l != "string" ? e : r ? l.replace(/{{(.*?)}}/g, (n, c) => r[c]) : l;
1563
- }, rt = i`
1562
+ return typeof i != "string" ? e : r ? i.replace(/{{(.*?)}}/g, (n, c) => r[c]) : i;
1563
+ }, rt = l`
1564
1564
  --accentBase: var(--tomato-1);
1565
1565
  --accentBgSubtle: var(--tomato-2);
1566
1566
  --accentBg: var(--tomato-3);
@@ -1614,7 +1614,7 @@ const Me = be({
1614
1614
  rgba(255, 255, 255, 0.05),
1615
1615
  rgba(255, 255, 255, 0.05)
1616
1616
  );
1617
- `, nt = i`
1617
+ `, nt = l`
1618
1618
  [class*="_toolbarRoot"] {
1619
1619
  flex-wrap: wrap;
1620
1620
  transition: all 0.3s;
@@ -1686,7 +1686,7 @@ const Me = be({
1686
1686
  }
1687
1687
  `, Te = T(
1688
1688
  "markdown-body",
1689
- i`
1689
+ l`
1690
1690
  p {
1691
1691
  margin-bottom: 8px;
1692
1692
  }
@@ -1707,7 +1707,7 @@ const Me = be({
1707
1707
  }
1708
1708
  }
1709
1709
  `
1710
- ), Ne = i`
1710
+ ), Be = l`
1711
1711
  .markdown-body {
1712
1712
  /* light */
1713
1713
  color-scheme: light;
@@ -1762,7 +1762,7 @@ const Me = be({
1762
1762
  --color-prettylights-syntax-meta-diff-range: #8250df;
1763
1763
  --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
1764
1764
  }
1765
- `, Be = i`
1765
+ `, Ne = l`
1766
1766
  .markdown-body {
1767
1767
  /* dark */
1768
1768
  color-scheme: dark;
@@ -1825,19 +1825,19 @@ const Me = be({
1825
1825
  value: e,
1826
1826
  onChange: r,
1827
1827
  translation: t,
1828
- pluginConfig: l,
1828
+ pluginConfig: i,
1829
1829
  className: n,
1830
1830
  theme: c = "auto",
1831
- ...p
1831
+ ...g
1832
1832
  } = a, s = te(null), {
1833
- image: x,
1834
- diffSource: y = {
1833
+ image: y,
1834
+ diffSource: x = {
1835
1835
  viewMode: "rich-text"
1836
1836
  },
1837
- headings: $,
1837
+ headings: B,
1838
1838
  link: N,
1839
1839
  codeBlock: A,
1840
- codeMirror: P = {
1840
+ codeMirror: $ = {
1841
1841
  codeBlockLanguages: {
1842
1842
  js: "JavaScript",
1843
1843
  css: "CSS",
@@ -1846,10 +1846,10 @@ const Me = be({
1846
1846
  "": "Unspecified"
1847
1847
  }
1848
1848
  },
1849
- directives: g = {
1849
+ directives: u = {
1850
1850
  directiveDescriptors: [Ao]
1851
1851
  }
1852
- } = l ?? {}, [d, w] = X("");
1852
+ } = i ?? {}, [d, w] = X("");
1853
1853
  return oe(() => {
1854
1854
  var h;
1855
1855
  e !== void 0 && s.current && ((h = s.current) == null || h.setMarkdown(e), w(e));
@@ -1860,7 +1860,7 @@ const Me = be({
1860
1860
  className: T(
1861
1861
  nt,
1862
1862
  ce(c) ? rt : "",
1863
- ce(c) ? Be : Ne,
1863
+ ce(c) ? Ne : Be,
1864
1864
  n
1865
1865
  ),
1866
1866
  contentEditableClassName: Te,
@@ -1892,22 +1892,22 @@ const Me = be({
1892
1892
  /* @__PURE__ */ o(yo, {})
1893
1893
  ] })
1894
1894
  }),
1895
- wo(y),
1895
+ wo(x),
1896
1896
  Co(),
1897
1897
  Io(),
1898
- Mo($),
1898
+ Mo(B),
1899
1899
  So(N),
1900
1900
  To(),
1901
- No(x),
1902
- Bo(),
1901
+ Bo(y),
1902
+ No(),
1903
1903
  Do(),
1904
1904
  Ro(),
1905
1905
  Lo(A),
1906
- $o(P),
1907
- Po(),
1908
- zo(g)
1906
+ Po($),
1907
+ $o(),
1908
+ zo(u)
1909
1909
  ],
1910
- ...p
1910
+ ...g
1911
1911
  }
1912
1912
  );
1913
1913
  }, lt = {
@@ -2399,11 +2399,11 @@ const Me = be({
2399
2399
  stroke: "hsl(230, 8%, 24%)"
2400
2400
  }
2401
2401
  }, it = (a) => {
2402
- const { children: e = "", className: r, theme: t = "auto" } = a;
2402
+ const { children: e = "", className: r, theme: t = "auto", imageProps: i } = a;
2403
2403
  return /* @__PURE__ */ o(
2404
2404
  "div",
2405
2405
  {
2406
- className: ce(t) ? Be : Ne,
2406
+ className: ce(t) ? Ne : Be,
2407
2407
  children: /* @__PURE__ */ o(
2408
2408
  Eo,
2409
2409
  {
@@ -2411,25 +2411,26 @@ const Me = be({
2411
2411
  remarkPlugins: [jo, Ho],
2412
2412
  rehypePlugins: [Xo],
2413
2413
  components: {
2414
- code(l) {
2415
- const { children: n, className: c, node: p, ref: s, ...x } = l, y = /language-(\w+)/.exec(c || "");
2416
- return y ? /* @__PURE__ */ o(
2414
+ code(n) {
2415
+ const { children: c, className: g, node: s, ref: y, ...x } = n, B = /language-(\w+)/.exec(g || "");
2416
+ return B ? /* @__PURE__ */ o(
2417
2417
  Fo,
2418
2418
  {
2419
2419
  ...x,
2420
2420
  PreTag: "div",
2421
- children: String(n).replace(/\n$/, ""),
2422
- language: y[1],
2421
+ children: String(c).replace(/\n$/, ""),
2422
+ language: B[1],
2423
2423
  style: lt
2424
2424
  }
2425
- ) : /* @__PURE__ */ o("code", { ...x, className: c, children: n });
2425
+ ) : /* @__PURE__ */ o("code", { ...x, className: g, children: c });
2426
2426
  },
2427
- img(l) {
2428
- return console.log("🚀 ~ image ~ props:", l), /* @__PURE__ */ o(
2427
+ img(n) {
2428
+ const { preview: c, ...g } = i ?? {};
2429
+ return /* @__PURE__ */ o(
2429
2430
  Go,
2430
2431
  {
2431
- ...l,
2432
- preview: {
2432
+ ...n,
2433
+ preview: c instanceof Boolean ? c : {
2433
2434
  icons: {
2434
2435
  rotateLeft: /* @__PURE__ */ o(Je, {}),
2435
2436
  rotateRight: /* @__PURE__ */ o(Ke, {}),
@@ -2441,15 +2442,14 @@ const Me = be({
2441
2442
  flipX: /* @__PURE__ */ o(ro, {}),
2442
2443
  flipY: /* @__PURE__ */ o(no, {})
2443
2444
  },
2444
- onVisibleChange: (n) => {
2445
- console.log("visible", n);
2446
- },
2447
2445
  zIndex: 9999,
2448
- mask: ""
2446
+ mask: " ",
2447
+ ...c
2449
2448
  },
2450
- className: i`
2449
+ className: l`
2451
2450
  cursor: zoom-in;
2452
- `
2451
+ `,
2452
+ ...g
2453
2453
  }
2454
2454
  );
2455
2455
  }
@@ -2465,19 +2465,19 @@ function De(...a) {
2465
2465
  return qo(Yo(a));
2466
2466
  }
2467
2467
  const ct = (a) => {
2468
- const { mouseX: e, title: r, icon: t, href: l } = a, n = te(null), c = ee(e, (w) => {
2469
- var R;
2470
- const h = ((R = n.current) == null ? void 0 : R.getBoundingClientRect()) ?? { x: 0, width: 0 };
2468
+ const { mouseX: e, title: r, icon: t, href: i } = a, n = te(null), c = ee(e, (w) => {
2469
+ var L;
2470
+ const h = ((L = n.current) == null ? void 0 : L.getBoundingClientRect()) ?? { x: 0, width: 0 };
2471
2471
  return w - h.x - h.width / 2;
2472
- }), p = ee(c, [-150, 0, 150], [40, 80, 40]), s = ee(c, [-150, 0, 150], [40, 80, 40]), x = ee(
2472
+ }), g = ee(c, [-150, 0, 150], [40, 80, 40]), s = ee(c, [-150, 0, 150], [40, 80, 40]), y = ee(
2473
2473
  c,
2474
2474
  [-150, 0, 150],
2475
2475
  [20, 40, 20]
2476
- ), y = ee(
2476
+ ), x = ee(
2477
2477
  c,
2478
2478
  [-150, 0, 150],
2479
2479
  [20, 40, 20]
2480
- ), $ = ne(p, {
2480
+ ), B = ne(g, {
2481
2481
  mass: 0.1,
2482
2482
  stiffness: 150,
2483
2483
  damping: 12
@@ -2485,25 +2485,25 @@ const ct = (a) => {
2485
2485
  mass: 0.1,
2486
2486
  stiffness: 150,
2487
2487
  damping: 12
2488
- }), A = ne(x, {
2488
+ }), A = ne(y, {
2489
2489
  mass: 0.1,
2490
2490
  stiffness: 150,
2491
2491
  damping: 12
2492
- }), P = ne(y, {
2492
+ }), $ = ne(x, {
2493
2493
  mass: 0.1,
2494
2494
  stiffness: 150,
2495
2495
  damping: 12
2496
- }), [g, d] = X(!1);
2497
- return /* @__PURE__ */ o("a", { href: l, children: /* @__PURE__ */ G(
2496
+ }), [u, d] = X(!1);
2497
+ return /* @__PURE__ */ o("a", { href: i, children: /* @__PURE__ */ G(
2498
2498
  b.div,
2499
2499
  {
2500
2500
  ref: n,
2501
- style: { width: $, height: N },
2501
+ style: { width: B, height: N },
2502
2502
  onMouseEnter: () => d(!0),
2503
2503
  onMouseLeave: () => d(!1),
2504
2504
  className: "aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",
2505
2505
  children: [
2506
- /* @__PURE__ */ o(ue, { children: g && /* @__PURE__ */ o(
2506
+ /* @__PURE__ */ o(ue, { children: u && /* @__PURE__ */ o(
2507
2507
  b.div,
2508
2508
  {
2509
2509
  initial: { opacity: 0, y: 10, x: "-50%" },
@@ -2516,7 +2516,7 @@ const ct = (a) => {
2516
2516
  /* @__PURE__ */ o(
2517
2517
  b.div,
2518
2518
  {
2519
- style: { width: A, height: P },
2519
+ style: { width: A, height: $ },
2520
2520
  className: "flex items-center justify-center",
2521
2521
  children: t
2522
2522
  }
@@ -2529,17 +2529,17 @@ const ct = (a) => {
2529
2529
  return /* @__PURE__ */ o(
2530
2530
  b.div,
2531
2531
  {
2532
- onMouseMove: (l) => t.set(l.pageX),
2532
+ onMouseMove: (i) => t.set(i.pageX),
2533
2533
  onMouseLeave: () => t.set(1 / 0),
2534
2534
  className: De(
2535
2535
  "mx-auto hidden md:flex h-16 gap-4 items-end rounded-2xl bg-gray-50 dark:bg-neutral-900 px-4 pb-3",
2536
2536
  r
2537
2537
  ),
2538
- children: e.map((l) => /* @__PURE__ */ o(ct, { mouseX: t, ...l }, l.title))
2538
+ children: e.map((i) => /* @__PURE__ */ o(ct, { mouseX: t, ...i }, i.title))
2539
2539
  }
2540
2540
  );
2541
2541
  }, Le = (a) => {
2542
- const { items: e, className: r, collapseIcon: t, autoHidden: l = !1 } = a, [n, c] = X(!1), p = () => {
2542
+ const { items: e, className: r, collapseIcon: t, autoHidden: i = !1 } = a, [n, c] = X(!1), g = () => {
2543
2543
  c(!n);
2544
2544
  };
2545
2545
  return /* @__PURE__ */ G(
@@ -2547,7 +2547,7 @@ const ct = (a) => {
2547
2547
  {
2548
2548
  className: De(
2549
2549
  "relative block",
2550
- l ? "md:hidden" : "",
2550
+ i ? "md:hidden" : "",
2551
2551
  r
2552
2552
  ),
2553
2553
  children: [
@@ -2556,7 +2556,7 @@ const ct = (a) => {
2556
2556
  {
2557
2557
  layoutId: "nav",
2558
2558
  className: "absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",
2559
- children: e.map((s, x) => /* @__PURE__ */ o(
2559
+ children: e.map((s, y) => /* @__PURE__ */ o(
2560
2560
  b.div,
2561
2561
  {
2562
2562
  initial: { opacity: 0, y: 10 },
@@ -2568,10 +2568,10 @@ const ct = (a) => {
2568
2568
  opacity: 0,
2569
2569
  y: 10,
2570
2570
  transition: {
2571
- delay: x * 0.05
2571
+ delay: y * 0.05
2572
2572
  }
2573
2573
  },
2574
- transition: { delay: (e.length - 1 - x) * 0.05 },
2574
+ transition: { delay: (e.length - 1 - y) * 0.05 },
2575
2575
  children: /* @__PURE__ */ o(
2576
2576
  "a",
2577
2577
  {
@@ -2589,7 +2589,7 @@ const ct = (a) => {
2589
2589
  /* @__PURE__ */ o(
2590
2590
  "button",
2591
2591
  {
2592
- onClick: p,
2592
+ onClick: g,
2593
2593
  className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",
2594
2594
  children: t || /* @__PURE__ */ o(ao, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
2595
2595
  }
@@ -2598,24 +2598,25 @@ const ct = (a) => {
2598
2598
  }
2599
2599
  );
2600
2600
  }, dt = (a) => {
2601
- const { items: e, desktopClassName: r, mobileClassName: t, ...l } = a;
2601
+ const { items: e, desktopClassName: r, mobileClassName: t, ...i } = a;
2602
2602
  return /* @__PURE__ */ G(de, { children: [
2603
- /* @__PURE__ */ o(Re, { items: e, className: r, ...l }),
2603
+ /* @__PURE__ */ o(Re, { items: e, className: r, ...i }),
2604
2604
  /* @__PURE__ */ o(
2605
2605
  Le,
2606
2606
  {
2607
2607
  items: e,
2608
2608
  className: t,
2609
2609
  autoHidden: !0,
2610
- ...l
2610
+ ...i
2611
2611
  }
2612
2612
  )
2613
2613
  ] });
2614
- }, $e = dt;
2615
- $e.Desktop = Re;
2616
- $e.Mobile = Le;
2614
+ }, Pe = dt;
2615
+ Pe.Desktop = Re;
2616
+ Pe.Mobile = Le;
2617
2617
  export {
2618
- Pt as Desktop,
2619
- $e as Dock,
2618
+ $t as Desktop,
2619
+ Pe as Dock,
2620
+ it as Markdown,
2620
2621
  st as MdEditor
2621
2622
  };