zs_library 0.3.21 → 0.3.22
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/components/md-editor/preview.d.ts +2 -0
- package/dist/index.es.js +318 -317
- package/dist/index.umd.js +45 -45
- package/package.json +1 -1
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
|
|
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
|
|
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 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,
|
|
56
|
-
return /* @__PURE__ */ o(we.Provider, { value: { theme:
|
|
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,
|
|
71
|
-
return { light:
|
|
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:
|
|
113
|
+
storageKey: i = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
|
|
114
114
|
enableCaching: n = !0
|
|
115
|
-
} = a, [c,
|
|
115
|
+
} = a, [c, u] = X(), [s, y] = X(), [x, N] = X(null), B = te(x), [A, $] = X(null), [g, d] = X([]), [w, h] = X(
|
|
116
116
|
null
|
|
117
|
-
), [
|
|
117
|
+
), [L, m] = X(
|
|
118
118
|
null
|
|
119
|
-
), [I, C] = X(!1), [
|
|
119
|
+
), [I, C] = X(!1), [p, f] = X(null), [E, V] = X(
|
|
120
120
|
null
|
|
121
|
-
), [j, le] = X(!1), [_, Q] = Ye(
|
|
121
|
+
), [j, le] = X(!1), [_, Q] = Ye(i, {
|
|
122
122
|
defaultValue: [],
|
|
123
123
|
listenStorageChange: !0
|
|
124
124
|
}), re = () => {
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
|
|
125
|
+
$(null), clearTimeout(c), u(void 0), B.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
|
-
|
|
132
|
+
u(
|
|
133
133
|
setTimeout(() => {
|
|
134
|
-
F &&
|
|
134
|
+
F && B.current === null && D(M, k);
|
|
135
135
|
}, 800)
|
|
136
|
-
), C(!1),
|
|
136
|
+
), C(!1), y(
|
|
137
137
|
setTimeout(() => {
|
|
138
138
|
C(!0);
|
|
139
139
|
}, 800)
|
|
140
140
|
);
|
|
141
141
|
},
|
|
142
142
|
onMouseUp: () => {
|
|
143
|
-
clearTimeout(s),
|
|
143
|
+
clearTimeout(s), y(void 0), clearTimeout(c), u(void 0);
|
|
144
144
|
},
|
|
145
145
|
onContextMenu: (M) => {
|
|
146
|
-
F && (M.preventDefault(),
|
|
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
|
|
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 =
|
|
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(
|
|
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
|
-
},
|
|
180
|
+
}, $e = (k, F) => {
|
|
181
181
|
d((H) => {
|
|
182
|
-
const M = [...H],
|
|
182
|
+
const M = [...H], P = (R) => {
|
|
183
183
|
var v;
|
|
184
|
-
for (let S = 0; S <
|
|
185
|
-
if (
|
|
186
|
-
|
|
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 =
|
|
188
|
+
} else ((v = R[S].children) == null ? void 0 : v.length) !== void 0 && P(R[S].children);
|
|
189
189
|
};
|
|
190
|
-
return
|
|
190
|
+
return P(M), t == null || t(M), M;
|
|
191
191
|
});
|
|
192
192
|
}, ze = (k, F) => {
|
|
193
193
|
d((H) => {
|
|
194
|
-
const M = [...H],
|
|
194
|
+
const M = [...H], P = (R) => {
|
|
195
195
|
var v;
|
|
196
|
-
for (let S = 0; S <
|
|
197
|
-
if (
|
|
198
|
-
|
|
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 =
|
|
200
|
+
} else ((v = R[S].children) == null ? void 0 : v.length) !== void 0 && P(R[S].children);
|
|
201
201
|
};
|
|
202
|
-
return
|
|
202
|
+
return P(M), t == null || t(M), M;
|
|
203
203
|
});
|
|
204
204
|
}, Ae = (k) => {
|
|
205
205
|
d((F) => {
|
|
206
|
-
const H = [...F], M = (
|
|
207
|
-
var
|
|
208
|
-
for (let v = 0; v <
|
|
209
|
-
if (
|
|
210
|
-
|
|
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 ((
|
|
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 = (
|
|
218
|
-
const v =
|
|
217
|
+
const H = [...g], 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 (
|
|
221
|
-
S.children = M(S.children || [],
|
|
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,17 +230,17 @@ const Me = be({
|
|
|
230
230
|
}
|
|
231
231
|
];
|
|
232
232
|
}
|
|
233
|
-
return
|
|
233
|
+
return P.splice(z, 1, S), P;
|
|
234
234
|
} else
|
|
235
|
-
return
|
|
235
|
+
return P;
|
|
236
236
|
};
|
|
237
237
|
d(M(H, F));
|
|
238
238
|
};
|
|
239
239
|
return oe(() => {
|
|
240
240
|
(r == null ? void 0 : r.length) > 0 && g.length === 0 && W(r);
|
|
241
241
|
}, [r]), oe(() => {
|
|
242
|
-
|
|
243
|
-
}, [
|
|
242
|
+
B.current = x, x !== null && re();
|
|
243
|
+
}, [x]), oe(() => {
|
|
244
244
|
n && _ != null && _.length && !j && (W(_), le(!0));
|
|
245
245
|
}, [_, j, n]), qe(
|
|
246
246
|
() => {
|
|
@@ -257,21 +257,21 @@ const Me = be({
|
|
|
257
257
|
list: g,
|
|
258
258
|
setList: W,
|
|
259
259
|
contextMenu: A,
|
|
260
|
-
setContextMenu:
|
|
261
|
-
listStatus:
|
|
262
|
-
setListStatus:
|
|
260
|
+
setContextMenu: $,
|
|
261
|
+
listStatus: x,
|
|
262
|
+
setListStatus: N,
|
|
263
263
|
contextMenuFuns: O,
|
|
264
264
|
hideContextMenu: re,
|
|
265
265
|
showInfoItemData: w,
|
|
266
266
|
setShowInfoItemData: h,
|
|
267
|
-
openGroupItemData:
|
|
268
|
-
setOpenGroupItemData:
|
|
267
|
+
openGroupItemData: L,
|
|
268
|
+
setOpenGroupItemData: m,
|
|
269
269
|
longPressTriggered: I,
|
|
270
|
-
updateItemConfig:
|
|
270
|
+
updateItemConfig: $e,
|
|
271
271
|
updateItem: ze,
|
|
272
272
|
removeItem: Ae,
|
|
273
273
|
addItem: Ee,
|
|
274
|
-
moveItemId:
|
|
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:
|
|
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:
|
|
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: (
|
|
312
|
-
|
|
311
|
+
onClick: (u) => {
|
|
312
|
+
u.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
|
-
|
|
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
|
-
|
|
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:
|
|
354
|
+
showSizeButton: i = !0,
|
|
355
355
|
onInfoClick: n,
|
|
356
356
|
onShareClick: c,
|
|
357
|
-
onRemoveClick:
|
|
357
|
+
onRemoveClick: u
|
|
358
358
|
} = a, {
|
|
359
359
|
contextMenu: s,
|
|
360
|
-
setContextMenu:
|
|
361
|
-
hideContextMenu:
|
|
362
|
-
setShowInfoItemData:
|
|
363
|
-
removeItem:
|
|
360
|
+
setContextMenu: y,
|
|
361
|
+
hideContextMenu: x,
|
|
362
|
+
setShowInfoItemData: N,
|
|
363
|
+
removeItem: B,
|
|
364
364
|
updateItemConfig: A
|
|
365
|
-
} = Z(), { theme:
|
|
365
|
+
} = Z(), { theme: $ } = K(), { light: g, dark: d } = Y.getTheme($), { data: w } = s ?? {}, { config: h = {} } = w ?? {}, L = () => {
|
|
366
366
|
var C;
|
|
367
|
-
const
|
|
368
|
-
for (let
|
|
369
|
-
for (let f = 1; f <= ((
|
|
370
|
-
I.push(`${
|
|
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,15 +376,15 @@ const Me = be({
|
|
|
376
376
|
initial: { opacity: 0 },
|
|
377
377
|
animate: { opacity: 1 },
|
|
378
378
|
exit: { opacity: 0 },
|
|
379
|
-
onMouseDown: (
|
|
380
|
-
|
|
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
|
-
|
|
387
|
+
l`
|
|
388
388
|
border-radius: 0.5rem;
|
|
389
389
|
overflow: hidden;
|
|
390
390
|
background-color: ${g.contextMenuBackgroundColor};
|
|
@@ -395,10 +395,10 @@ const Me = be({
|
|
|
395
395
|
}
|
|
396
396
|
`
|
|
397
397
|
),
|
|
398
|
-
children:
|
|
398
|
+
children: i && h.allowResize !== !1 && /* @__PURE__ */ o(
|
|
399
399
|
b.ul,
|
|
400
400
|
{
|
|
401
|
-
className:
|
|
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:
|
|
412
|
-
label:
|
|
413
|
-
key:
|
|
411
|
+
items: L().map((m) => ({
|
|
412
|
+
label: m,
|
|
413
|
+
key: m,
|
|
414
414
|
onClick: () => {
|
|
415
|
-
const [I, C] =
|
|
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((
|
|
423
|
+
].map((m) => /* @__PURE__ */ G(
|
|
424
424
|
b.li,
|
|
425
425
|
{
|
|
426
|
-
className:
|
|
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:
|
|
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
|
-
|
|
446
|
+
m.icon,
|
|
447
447
|
" ",
|
|
448
|
-
|
|
448
|
+
m.label
|
|
449
449
|
]
|
|
450
450
|
}
|
|
451
451
|
),
|
|
452
452
|
/* @__PURE__ */ o(
|
|
453
453
|
b.div,
|
|
454
454
|
{
|
|
455
|
-
className:
|
|
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:
|
|
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
|
-
|
|
465
|
+
l`
|
|
466
466
|
padding-top: 0.25rem;
|
|
467
467
|
padding-bottom: 0.25rem;
|
|
468
468
|
padding-left: 0.5rem;
|
|
@@ -484,7 +484,7 @@ const Me = be({
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
`,
|
|
487
|
-
`${h.row}x${h.col}` === I.key &&
|
|
487
|
+
`${h.row}x${h.col}` === I.key && l`
|
|
488
488
|
background-color: ${g.contextMenuActiveColor};
|
|
489
489
|
@media (prefers-color-scheme: dark) {
|
|
490
490
|
background-color: ${d.contextMenuActiveColor};
|
|
@@ -500,7 +500,7 @@ const Me = be({
|
|
|
500
500
|
)
|
|
501
501
|
]
|
|
502
502
|
},
|
|
503
|
-
|
|
503
|
+
m.key
|
|
504
504
|
))
|
|
505
505
|
}
|
|
506
506
|
)
|
|
@@ -510,7 +510,7 @@ const Me = be({
|
|
|
510
510
|
b.div,
|
|
511
511
|
{
|
|
512
512
|
className: T(
|
|
513
|
-
|
|
513
|
+
l`
|
|
514
514
|
background-color: ${g.contextMenuBackgroundColor};
|
|
515
515
|
box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
|
|
516
516
|
@media (prefers-color-scheme: dark) {
|
|
@@ -550,11 +550,11 @@ const Me = be({
|
|
|
550
550
|
n(s.data);
|
|
551
551
|
return;
|
|
552
552
|
}
|
|
553
|
-
|
|
553
|
+
N({
|
|
554
554
|
...s.data,
|
|
555
555
|
pageX: s.pageX,
|
|
556
556
|
pageY: s.pageY
|
|
557
|
-
}),
|
|
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 (
|
|
568
|
-
|
|
567
|
+
if (u) {
|
|
568
|
+
u(s.data, B);
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
|
-
|
|
571
|
+
y(null), B(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:
|
|
582
|
+
const { data: e, noLetters: r = !1 } = a, { contextMenuFuns: t } = Z(), { itemIconBuilder: i, theme: n, contextMenu: c } = K(), { light: u, 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:
|
|
587
|
+
className: l`
|
|
588
588
|
width: 4rem;
|
|
589
589
|
height: 4rem;
|
|
590
|
-
background-color: ${
|
|
590
|
+
background-color: ${u.itemIconBackgroundColor};
|
|
591
591
|
border-radius: 0.75rem;
|
|
592
|
-
box-shadow: 0 0 0.5rem ${
|
|
592
|
+
box-shadow: 0 0 0.5rem ${u.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:
|
|
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: ${
|
|
611
|
+
color: ${u.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:
|
|
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
|
-
|
|
626
|
+
l`
|
|
627
627
|
text-align: center;
|
|
628
628
|
margin-top: 0.25rem;
|
|
629
629
|
margin-bottom: 0;
|
|
630
|
-
color: ${
|
|
630
|
+
color: ${u.itemNameColor};
|
|
631
631
|
@media (prefers-color-scheme: dark) {
|
|
632
632
|
color: ${s.itemNameColor};
|
|
633
633
|
}
|
|
634
634
|
`,
|
|
635
|
-
r &&
|
|
635
|
+
r && l`
|
|
636
636
|
color: transparent;
|
|
637
637
|
`
|
|
638
638
|
),
|
|
639
|
-
children:
|
|
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:
|
|
648
|
+
onClick: i,
|
|
649
649
|
disabledDrag: n = !1,
|
|
650
650
|
children: c,
|
|
651
|
-
parentIds:
|
|
651
|
+
parentIds: u,
|
|
652
652
|
childrenLength: s
|
|
653
|
-
} = a, { contextMenu:
|
|
653
|
+
} = a, { contextMenu: y, setContextMenu: x } = Z(), { contextMenu: N } = K();
|
|
654
654
|
return /* @__PURE__ */ o(
|
|
655
655
|
Oe,
|
|
656
656
|
{
|
|
657
657
|
placement: "bottom",
|
|
658
|
-
overlayClassName:
|
|
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: (
|
|
668
|
-
onVisibleChange: (
|
|
669
|
-
|
|
666
|
+
overlay: /* @__PURE__ */ o(Wo, { ...N }),
|
|
667
|
+
visible: (y == null ? void 0 : y.data.id) === e.id,
|
|
668
|
+
onVisibleChange: (B) => {
|
|
669
|
+
B || 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":
|
|
677
|
+
"data-parent-ids": u == null ? void 0 : u.join(","),
|
|
678
678
|
"data-children-length": s,
|
|
679
|
-
onClick: () =>
|
|
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:
|
|
691
|
+
itemIndex: i,
|
|
692
692
|
onClick: n,
|
|
693
693
|
noLetters: c = !1
|
|
694
694
|
} = a, {
|
|
695
|
-
contextMenuFuns:
|
|
695
|
+
contextMenuFuns: u,
|
|
696
696
|
setList: s,
|
|
697
|
-
setOpenGroupItemData:
|
|
698
|
-
longPressTriggered:
|
|
699
|
-
moveItemId:
|
|
700
|
-
moveTargetId:
|
|
697
|
+
setOpenGroupItemData: y,
|
|
698
|
+
longPressTriggered: x,
|
|
699
|
+
moveItemId: N,
|
|
700
|
+
moveTargetId: B,
|
|
701
701
|
setMoveTargetId: A,
|
|
702
|
-
listStatus:
|
|
703
|
-
} = Z(), { itemIconBuilder: g, theme: d, contextMenu: w } = K(), { light: h, dark:
|
|
702
|
+
listStatus: $
|
|
703
|
+
} = Z(), { itemIconBuilder: g, 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 = ((
|
|
706
|
+
}, V = ((m == null ? void 0 : m.length) ?? 0) === 0, j = V ? [e] : [...m ?? []].slice(0, 9), le = ae(() => N === e.id.toString(), [e.id, N]), _ = ae(() => B === e.id, [e.id, B]), 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: ${
|
|
713
|
-
box-shadow: 0 0 0.5rem ${
|
|
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
|
-
|
|
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: ${
|
|
733
|
+
background-color: ${L.itemIconBackgroundColor};
|
|
734
734
|
}
|
|
735
735
|
`
|
|
736
736
|
),
|
|
737
|
-
onClick: (
|
|
738
|
-
|
|
737
|
+
onClick: (D) => {
|
|
738
|
+
D.stopPropagation(), n == null || n(e);
|
|
739
739
|
},
|
|
740
740
|
children: g == null ? void 0 : g(e)
|
|
741
741
|
}
|
|
742
742
|
);
|
|
743
|
-
if (
|
|
743
|
+
if (p === 1 && f === 1 || p === 2 && f === 2)
|
|
744
744
|
return /* @__PURE__ */ o(
|
|
745
745
|
b.div,
|
|
746
746
|
{
|
|
747
|
-
className:
|
|
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((
|
|
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
|
-
|
|
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(
|
|
769
|
+
O.stopPropagation(), n == null || n(D);
|
|
770
770
|
},
|
|
771
|
-
children: g == null ? void 0 : g(
|
|
771
|
+
children: g == null ? void 0 : g(D)
|
|
772
772
|
},
|
|
773
|
-
|
|
773
|
+
D.id
|
|
774
774
|
))
|
|
775
775
|
}
|
|
776
776
|
);
|
|
777
|
-
if (
|
|
777
|
+
if (p === 1 && f === 2)
|
|
778
778
|
return /* @__PURE__ */ o(
|
|
779
779
|
b.div,
|
|
780
780
|
{
|
|
781
|
-
className:
|
|
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((
|
|
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 ?
|
|
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
|
-
` :
|
|
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(
|
|
811
|
+
O > 2 || (W.stopPropagation(), n == null || n(D));
|
|
812
812
|
},
|
|
813
|
-
children: g == null ? void 0 : g(
|
|
813
|
+
children: g == null ? void 0 : g(D)
|
|
814
814
|
},
|
|
815
|
-
|
|
815
|
+
D.id
|
|
816
816
|
))
|
|
817
817
|
}
|
|
818
818
|
);
|
|
819
|
-
if (
|
|
819
|
+
if (p === 2 && f === 1)
|
|
820
820
|
return /* @__PURE__ */ o(
|
|
821
821
|
b.div,
|
|
822
822
|
{
|
|
823
|
-
className:
|
|
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((
|
|
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 ?
|
|
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
|
-
` :
|
|
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(
|
|
852
|
+
O > 2 || (W.stopPropagation(), n == null || n(D));
|
|
853
853
|
},
|
|
854
|
-
children: g == null ? void 0 : g(
|
|
854
|
+
children: g == null ? void 0 : g(D)
|
|
855
855
|
},
|
|
856
|
-
|
|
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:
|
|
865
|
+
itemIndex: i,
|
|
866
866
|
parentIds: t,
|
|
867
|
-
childrenLength:
|
|
867
|
+
childrenLength: m == null ? void 0 : m.length,
|
|
868
868
|
className: T(
|
|
869
|
-
|
|
870
|
-
grid-row: span ${
|
|
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
|
-
|
|
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: ${
|
|
890
|
-
box-shadow: 0 0 0.5rem ${
|
|
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: ${
|
|
896
|
+
height: ${p * 64 + 32 * (p - 1)}px;
|
|
897
897
|
`
|
|
898
898
|
),
|
|
899
|
-
onClick: (
|
|
900
|
-
!V && !
|
|
899
|
+
onClick: (D) => {
|
|
900
|
+
!V && !x && (e.parentIds = t, e.pageX = D.pageX, e.pageY = D.pageY, y(e));
|
|
901
901
|
},
|
|
902
|
-
...
|
|
902
|
+
...u(e, w !== !1),
|
|
903
903
|
children: /* @__PURE__ */ G(
|
|
904
904
|
b.div,
|
|
905
905
|
{
|
|
906
|
-
className:
|
|
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
|
-
|
|
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: ${
|
|
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:
|
|
939
|
-
setList: (
|
|
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
|
-
|
|
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: ${
|
|
962
|
+
color: ${L.itemNameColor};
|
|
963
963
|
}
|
|
964
964
|
`,
|
|
965
|
-
c &&
|
|
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 =
|
|
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:
|
|
991
|
+
list: i,
|
|
992
992
|
setList: n,
|
|
993
993
|
setListStatus: c,
|
|
994
|
-
setMoveItemId:
|
|
994
|
+
setMoveItemId: u,
|
|
995
995
|
setMoveTargetId: s,
|
|
996
|
-
updateItem:
|
|
997
|
-
} = Z(), { theme:
|
|
996
|
+
updateItem: y
|
|
997
|
+
} = Z(), { theme: x } = K(), { light: N, dark: B } = Y.getTheme(x), [A, $] = X("文件夹"), g = [...(e == null ? void 0 : e.children) ?? []];
|
|
998
998
|
return oe(() => {
|
|
999
999
|
var d;
|
|
1000
|
-
e &&
|
|
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:
|
|
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
|
-
|
|
1033
|
+
$(d.target.value);
|
|
1034
1034
|
},
|
|
1035
1035
|
onBlur: () => {
|
|
1036
|
-
e &&
|
|
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
|
-
|
|
1047
|
+
l`
|
|
1048
1048
|
.rc-dialog-content {
|
|
1049
1049
|
background-color: transparent;
|
|
1050
1050
|
box-shadow: none;
|
|
@@ -1059,9 +1059,9 @@ const Me = be({
|
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
1061
|
.rc-dialog-body {
|
|
1062
|
-
background-color: ${
|
|
1062
|
+
background-color: ${N.groupItemModalBackgroundColor};
|
|
1063
1063
|
@media (prefers-color-scheme: dark) {
|
|
1064
|
-
background-color: ${
|
|
1064
|
+
background-color: ${B.groupItemModalBackgroundColor};
|
|
1065
1065
|
}
|
|
1066
1066
|
border-radius: 0.5rem;
|
|
1067
1067
|
overflow: hidden;
|
|
@@ -1074,7 +1074,7 @@ const Me = be({
|
|
|
1074
1074
|
children: /* @__PURE__ */ o(
|
|
1075
1075
|
"div",
|
|
1076
1076
|
{
|
|
1077
|
-
className:
|
|
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:
|
|
1091
|
+
className: l`
|
|
1092
1092
|
display: grid;
|
|
1093
1093
|
gap: 1rem;
|
|
1094
1094
|
place-items: center;
|
|
@@ -1101,17 +1101,17 @@ const Me = be({
|
|
|
1101
1101
|
fallbackOnBody: !0,
|
|
1102
1102
|
list: (e == null ? void 0 : e.children) ?? [],
|
|
1103
1103
|
setList: (d) => {
|
|
1104
|
-
var
|
|
1105
|
-
const w = d.map((I) => I.id), h = (
|
|
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 &&
|
|
1111
|
+
w != null && w.id && u(w.id), c("onMove");
|
|
1112
1112
|
},
|
|
1113
1113
|
onEnd: () => {
|
|
1114
|
-
|
|
1114
|
+
u(null), s(null), c(null);
|
|
1115
1115
|
},
|
|
1116
1116
|
ghostClass: Se,
|
|
1117
1117
|
children: g.map((d, w) => /* @__PURE__ */ o(
|
|
@@ -1158,21 +1158,21 @@ const Me = be({
|
|
|
1158
1158
|
pagination: e = { position: "bottom" },
|
|
1159
1159
|
className: r,
|
|
1160
1160
|
sliderProps: t,
|
|
1161
|
-
sliderRef:
|
|
1161
|
+
sliderRef: i,
|
|
1162
1162
|
onItemClick: n
|
|
1163
|
-
} = a, c = te(null),
|
|
1163
|
+
} = a, c = te(null), u = te(null), {
|
|
1164
1164
|
list: s,
|
|
1165
|
-
setList:
|
|
1166
|
-
setListStatus:
|
|
1167
|
-
showInfoItemData:
|
|
1168
|
-
setShowInfoItemData:
|
|
1165
|
+
setList: y,
|
|
1166
|
+
setListStatus: x,
|
|
1167
|
+
showInfoItemData: N,
|
|
1168
|
+
setShowInfoItemData: B,
|
|
1169
1169
|
openGroupItemData: A,
|
|
1170
|
-
setOpenGroupItemData:
|
|
1170
|
+
setOpenGroupItemData: $,
|
|
1171
1171
|
setMoveItemId: g,
|
|
1172
1172
|
setMoveTargetId: d,
|
|
1173
1173
|
addItem: w
|
|
1174
|
-
} = Z(), { pagingDotBuilder: h, pagingDotsBuilder:
|
|
1175
|
-
top:
|
|
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:
|
|
1185
|
+
bottom: l`
|
|
1186
1186
|
.slick-dots {
|
|
1187
1187
|
position: static;
|
|
1188
1188
|
}
|
|
1189
1189
|
`,
|
|
1190
|
-
left:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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
|
|
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 = (
|
|
1262
|
+
(E = (i ?? c).current) == null || E.slickGoTo(C);
|
|
1263
1263
|
},
|
|
1264
|
-
children: (f = (
|
|
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) =>
|
|
1268
|
+
appendDots: (C) => L ? L(C) : e === !1 ? /* @__PURE__ */ o("div", {}) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
1269
1269
|
"ul",
|
|
1270
1270
|
{
|
|
1271
|
-
ref:
|
|
1271
|
+
ref: u,
|
|
1272
1272
|
className: T(
|
|
1273
1273
|
"slick-dots-default",
|
|
1274
|
-
|
|
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: (
|
|
1303
|
-
|
|
1304
|
-
const f =
|
|
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: (
|
|
1313
|
-
|
|
1312
|
+
onDragOver: (p) => {
|
|
1313
|
+
p.preventDefault();
|
|
1314
1314
|
},
|
|
1315
1315
|
children: /* @__PURE__ */ o(
|
|
1316
1316
|
ge,
|
|
1317
1317
|
{
|
|
1318
1318
|
className: T(
|
|
1319
|
-
|
|
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: (
|
|
1335
|
+
setList: (p) => y(p, [C.id]),
|
|
1336
1336
|
filter: ".drag-disabled",
|
|
1337
|
-
onMove: (
|
|
1338
|
-
|
|
1339
|
-
const { dragged: f, related: E } =
|
|
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: (
|
|
1343
|
-
const f =
|
|
1344
|
-
f != null && f.id && g(f.id),
|
|
1342
|
+
onStart: (p) => {
|
|
1343
|
+
const f = p.item.dataset;
|
|
1344
|
+
f != null && f.id && g(f.id), x("onMove");
|
|
1345
1345
|
},
|
|
1346
1346
|
onEnd: () => {
|
|
1347
|
-
g(null), d(null),
|
|
1347
|
+
g(null), d(null), x(null);
|
|
1348
1348
|
},
|
|
1349
1349
|
ghostClass: Se,
|
|
1350
|
-
children: (C.children ?? []).map((
|
|
1350
|
+
children: (C.children ?? []).map((p, f) => {
|
|
1351
1351
|
let E;
|
|
1352
|
-
if (
|
|
1353
|
-
return
|
|
1354
|
-
switch (
|
|
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:
|
|
1360
|
+
data: p,
|
|
1361
1361
|
itemIndex: f,
|
|
1362
|
-
parentIds: [C.id,
|
|
1362
|
+
parentIds: [C.id, p.id],
|
|
1363
1363
|
onClick: n
|
|
1364
1364
|
},
|
|
1365
|
-
|
|
1365
|
+
p.id
|
|
1366
1366
|
);
|
|
1367
1367
|
break;
|
|
1368
1368
|
default:
|
|
1369
1369
|
E = /* @__PURE__ */ o(
|
|
1370
1370
|
me,
|
|
1371
1371
|
{
|
|
1372
|
-
data:
|
|
1372
|
+
data: p,
|
|
1373
1373
|
itemIndex: f,
|
|
1374
1374
|
onClick: n
|
|
1375
1375
|
},
|
|
1376
|
-
|
|
1376
|
+
p.id
|
|
1377
1377
|
);
|
|
1378
1378
|
break;
|
|
1379
1379
|
}
|
|
@@ -1389,9 +1389,9 @@ const Me = be({
|
|
|
1389
1389
|
/* @__PURE__ */ o(
|
|
1390
1390
|
Qo,
|
|
1391
1391
|
{
|
|
1392
|
-
data:
|
|
1392
|
+
data: N,
|
|
1393
1393
|
onClose: () => {
|
|
1394
|
-
|
|
1394
|
+
B(null);
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
),
|
|
@@ -1400,41 +1400,41 @@ const Me = be({
|
|
|
1400
1400
|
{
|
|
1401
1401
|
data: A,
|
|
1402
1402
|
onClose: () => {
|
|
1403
|
-
|
|
1403
|
+
$(null);
|
|
1404
1404
|
},
|
|
1405
1405
|
onItemClick: n
|
|
1406
1406
|
}
|
|
1407
1407
|
)
|
|
1408
1408
|
] });
|
|
1409
|
-
},
|
|
1409
|
+
}, $t = (a) => {
|
|
1410
1410
|
const {
|
|
1411
1411
|
list: e,
|
|
1412
1412
|
onChange: r,
|
|
1413
1413
|
storageKey: t,
|
|
1414
|
-
enableCaching:
|
|
1414
|
+
enableCaching: i,
|
|
1415
1415
|
theme: n,
|
|
1416
1416
|
noLetters: c,
|
|
1417
|
-
contextMenu:
|
|
1417
|
+
contextMenu: u,
|
|
1418
1418
|
contextMenuBuilder: s,
|
|
1419
|
-
itemBuilder:
|
|
1420
|
-
itemIconBuilder:
|
|
1421
|
-
pagingDotBuilder:
|
|
1422
|
-
pagingDotsBuilder:
|
|
1419
|
+
itemBuilder: y,
|
|
1420
|
+
itemIconBuilder: x,
|
|
1421
|
+
pagingDotBuilder: N,
|
|
1422
|
+
pagingDotsBuilder: B,
|
|
1423
1423
|
...A
|
|
1424
1424
|
} = a;
|
|
1425
1425
|
return /* @__PURE__ */ o(Vo, { ...{
|
|
1426
1426
|
list: e,
|
|
1427
1427
|
onChange: r,
|
|
1428
1428
|
storageKey: t,
|
|
1429
|
-
enableCaching:
|
|
1429
|
+
enableCaching: i
|
|
1430
1430
|
}, children: /* @__PURE__ */ o(Oo, { ...{
|
|
1431
1431
|
theme: n,
|
|
1432
1432
|
noLetters: c,
|
|
1433
|
-
contextMenu:
|
|
1434
|
-
pagingDotsBuilder:
|
|
1435
|
-
pagingDotBuilder:
|
|
1436
|
-
itemBuilder:
|
|
1437
|
-
itemIconBuilder:
|
|
1433
|
+
contextMenu: u,
|
|
1434
|
+
pagingDotsBuilder: B,
|
|
1435
|
+
pagingDotBuilder: N,
|
|
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
|
|
1558
|
+
const i = a.split(".").reduce(
|
|
1559
1559
|
(n, c) => typeof n == "string" ? n : n[c],
|
|
1560
1560
|
ot
|
|
1561
1561
|
);
|
|
1562
|
-
return typeof
|
|
1563
|
-
}, rt =
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
1710
|
+
), Ne = 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 =
|
|
1765
|
+
`, Be = 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:
|
|
1828
|
+
pluginConfig: i,
|
|
1829
1829
|
className: n,
|
|
1830
1830
|
theme: c = "auto",
|
|
1831
|
-
...
|
|
1831
|
+
...u
|
|
1832
1832
|
} = a, s = te(null), {
|
|
1833
|
-
image:
|
|
1834
|
-
diffSource:
|
|
1833
|
+
image: y,
|
|
1834
|
+
diffSource: x = {
|
|
1835
1835
|
viewMode: "rich-text"
|
|
1836
1836
|
},
|
|
1837
|
-
headings:
|
|
1838
|
-
link:
|
|
1837
|
+
headings: N,
|
|
1838
|
+
link: B,
|
|
1839
1839
|
codeBlock: A,
|
|
1840
|
-
codeMirror:
|
|
1840
|
+
codeMirror: $ = {
|
|
1841
1841
|
codeBlockLanguages: {
|
|
1842
1842
|
js: "JavaScript",
|
|
1843
1843
|
css: "CSS",
|
|
@@ -1849,7 +1849,7 @@ const Me = be({
|
|
|
1849
1849
|
directives: g = {
|
|
1850
1850
|
directiveDescriptors: [Ao]
|
|
1851
1851
|
}
|
|
1852
|
-
} =
|
|
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));
|
|
@@ -1892,22 +1892,22 @@ const Me = be({
|
|
|
1892
1892
|
/* @__PURE__ */ o(yo, {})
|
|
1893
1893
|
] })
|
|
1894
1894
|
}),
|
|
1895
|
-
wo(
|
|
1895
|
+
wo(x),
|
|
1896
1896
|
Co(),
|
|
1897
1897
|
Io(),
|
|
1898
|
-
Mo(
|
|
1899
|
-
So(
|
|
1898
|
+
Mo(N),
|
|
1899
|
+
So(B),
|
|
1900
1900
|
To(),
|
|
1901
|
-
No(
|
|
1901
|
+
No(y),
|
|
1902
1902
|
Bo(),
|
|
1903
1903
|
Do(),
|
|
1904
1904
|
Ro(),
|
|
1905
1905
|
Lo(A),
|
|
1906
|
-
$
|
|
1907
|
-
|
|
1906
|
+
Po($),
|
|
1907
|
+
$o(),
|
|
1908
1908
|
zo(g)
|
|
1909
1909
|
],
|
|
1910
|
-
...
|
|
1910
|
+
...u
|
|
1911
1911
|
}
|
|
1912
1912
|
);
|
|
1913
1913
|
}, lt = {
|
|
@@ -2399,7 +2399,7 @@ 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
|
{
|
|
@@ -2411,24 +2411,24 @@ const Me = be({
|
|
|
2411
2411
|
remarkPlugins: [jo, Ho],
|
|
2412
2412
|
rehypePlugins: [Xo],
|
|
2413
2413
|
components: {
|
|
2414
|
-
code(
|
|
2415
|
-
const { children:
|
|
2416
|
-
return
|
|
2414
|
+
code(n) {
|
|
2415
|
+
const { children: c, className: u, node: s, ref: y, ...x } = n, N = /language-(\w+)/.exec(u || "");
|
|
2416
|
+
return N ? /* @__PURE__ */ o(
|
|
2417
2417
|
Fo,
|
|
2418
2418
|
{
|
|
2419
2419
|
...x,
|
|
2420
2420
|
PreTag: "div",
|
|
2421
|
-
children: String(
|
|
2422
|
-
language:
|
|
2421
|
+
children: String(c).replace(/\n$/, ""),
|
|
2422
|
+
language: N[1],
|
|
2423
2423
|
style: lt
|
|
2424
2424
|
}
|
|
2425
|
-
) : /* @__PURE__ */ o("code", { ...x, className:
|
|
2425
|
+
) : /* @__PURE__ */ o("code", { ...x, className: u, children: c });
|
|
2426
2426
|
},
|
|
2427
|
-
img(
|
|
2428
|
-
return
|
|
2427
|
+
img(n) {
|
|
2428
|
+
return /* @__PURE__ */ o(
|
|
2429
2429
|
Go,
|
|
2430
2430
|
{
|
|
2431
|
-
...
|
|
2431
|
+
...n,
|
|
2432
2432
|
preview: {
|
|
2433
2433
|
icons: {
|
|
2434
2434
|
rotateLeft: /* @__PURE__ */ o(Je, {}),
|
|
@@ -2441,15 +2441,16 @@ const Me = be({
|
|
|
2441
2441
|
flipX: /* @__PURE__ */ o(ro, {}),
|
|
2442
2442
|
flipY: /* @__PURE__ */ o(no, {})
|
|
2443
2443
|
},
|
|
2444
|
-
onVisibleChange: (
|
|
2445
|
-
console.log("visible",
|
|
2444
|
+
onVisibleChange: (c) => {
|
|
2445
|
+
console.log("visible", c);
|
|
2446
2446
|
},
|
|
2447
2447
|
zIndex: 9999,
|
|
2448
2448
|
mask: ""
|
|
2449
2449
|
},
|
|
2450
|
-
className:
|
|
2450
|
+
className: l`
|
|
2451
2451
|
cursor: zoom-in;
|
|
2452
|
-
|
|
2452
|
+
`,
|
|
2453
|
+
...i
|
|
2453
2454
|
}
|
|
2454
2455
|
);
|
|
2455
2456
|
}
|
|
@@ -2465,40 +2466,40 @@ function De(...a) {
|
|
|
2465
2466
|
return qo(Yo(a));
|
|
2466
2467
|
}
|
|
2467
2468
|
const ct = (a) => {
|
|
2468
|
-
const { mouseX: e, title: r, icon: t, href:
|
|
2469
|
-
var
|
|
2470
|
-
const h = ((
|
|
2469
|
+
const { mouseX: e, title: r, icon: t, href: i } = a, n = te(null), c = ee(e, (w) => {
|
|
2470
|
+
var L;
|
|
2471
|
+
const h = ((L = n.current) == null ? void 0 : L.getBoundingClientRect()) ?? { x: 0, width: 0 };
|
|
2471
2472
|
return w - h.x - h.width / 2;
|
|
2472
|
-
}),
|
|
2473
|
+
}), u = ee(c, [-150, 0, 150], [40, 80, 40]), s = ee(c, [-150, 0, 150], [40, 80, 40]), y = ee(
|
|
2473
2474
|
c,
|
|
2474
2475
|
[-150, 0, 150],
|
|
2475
2476
|
[20, 40, 20]
|
|
2476
|
-
),
|
|
2477
|
+
), x = ee(
|
|
2477
2478
|
c,
|
|
2478
2479
|
[-150, 0, 150],
|
|
2479
2480
|
[20, 40, 20]
|
|
2480
|
-
),
|
|
2481
|
+
), N = ne(u, {
|
|
2481
2482
|
mass: 0.1,
|
|
2482
2483
|
stiffness: 150,
|
|
2483
2484
|
damping: 12
|
|
2484
|
-
}),
|
|
2485
|
+
}), B = ne(s, {
|
|
2485
2486
|
mass: 0.1,
|
|
2486
2487
|
stiffness: 150,
|
|
2487
2488
|
damping: 12
|
|
2488
|
-
}), A = ne(
|
|
2489
|
+
}), A = ne(y, {
|
|
2489
2490
|
mass: 0.1,
|
|
2490
2491
|
stiffness: 150,
|
|
2491
2492
|
damping: 12
|
|
2492
|
-
}),
|
|
2493
|
+
}), $ = ne(x, {
|
|
2493
2494
|
mass: 0.1,
|
|
2494
2495
|
stiffness: 150,
|
|
2495
2496
|
damping: 12
|
|
2496
2497
|
}), [g, d] = X(!1);
|
|
2497
|
-
return /* @__PURE__ */ o("a", { href:
|
|
2498
|
+
return /* @__PURE__ */ o("a", { href: i, children: /* @__PURE__ */ G(
|
|
2498
2499
|
b.div,
|
|
2499
2500
|
{
|
|
2500
2501
|
ref: n,
|
|
2501
|
-
style: { width:
|
|
2502
|
+
style: { width: N, height: B },
|
|
2502
2503
|
onMouseEnter: () => d(!0),
|
|
2503
2504
|
onMouseLeave: () => d(!1),
|
|
2504
2505
|
className: "aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",
|
|
@@ -2516,7 +2517,7 @@ const ct = (a) => {
|
|
|
2516
2517
|
/* @__PURE__ */ o(
|
|
2517
2518
|
b.div,
|
|
2518
2519
|
{
|
|
2519
|
-
style: { width: A, height:
|
|
2520
|
+
style: { width: A, height: $ },
|
|
2520
2521
|
className: "flex items-center justify-center",
|
|
2521
2522
|
children: t
|
|
2522
2523
|
}
|
|
@@ -2529,17 +2530,17 @@ const ct = (a) => {
|
|
|
2529
2530
|
return /* @__PURE__ */ o(
|
|
2530
2531
|
b.div,
|
|
2531
2532
|
{
|
|
2532
|
-
onMouseMove: (
|
|
2533
|
+
onMouseMove: (i) => t.set(i.pageX),
|
|
2533
2534
|
onMouseLeave: () => t.set(1 / 0),
|
|
2534
2535
|
className: De(
|
|
2535
2536
|
"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
2537
|
r
|
|
2537
2538
|
),
|
|
2538
|
-
children: e.map((
|
|
2539
|
+
children: e.map((i) => /* @__PURE__ */ o(ct, { mouseX: t, ...i }, i.title))
|
|
2539
2540
|
}
|
|
2540
2541
|
);
|
|
2541
2542
|
}, Le = (a) => {
|
|
2542
|
-
const { items: e, className: r, collapseIcon: t, autoHidden:
|
|
2543
|
+
const { items: e, className: r, collapseIcon: t, autoHidden: i = !1 } = a, [n, c] = X(!1), u = () => {
|
|
2543
2544
|
c(!n);
|
|
2544
2545
|
};
|
|
2545
2546
|
return /* @__PURE__ */ G(
|
|
@@ -2547,7 +2548,7 @@ const ct = (a) => {
|
|
|
2547
2548
|
{
|
|
2548
2549
|
className: De(
|
|
2549
2550
|
"relative block",
|
|
2550
|
-
|
|
2551
|
+
i ? "md:hidden" : "",
|
|
2551
2552
|
r
|
|
2552
2553
|
),
|
|
2553
2554
|
children: [
|
|
@@ -2556,7 +2557,7 @@ const ct = (a) => {
|
|
|
2556
2557
|
{
|
|
2557
2558
|
layoutId: "nav",
|
|
2558
2559
|
className: "absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",
|
|
2559
|
-
children: e.map((s,
|
|
2560
|
+
children: e.map((s, y) => /* @__PURE__ */ o(
|
|
2560
2561
|
b.div,
|
|
2561
2562
|
{
|
|
2562
2563
|
initial: { opacity: 0, y: 10 },
|
|
@@ -2568,10 +2569,10 @@ const ct = (a) => {
|
|
|
2568
2569
|
opacity: 0,
|
|
2569
2570
|
y: 10,
|
|
2570
2571
|
transition: {
|
|
2571
|
-
delay:
|
|
2572
|
+
delay: y * 0.05
|
|
2572
2573
|
}
|
|
2573
2574
|
},
|
|
2574
|
-
transition: { delay: (e.length - 1 -
|
|
2575
|
+
transition: { delay: (e.length - 1 - y) * 0.05 },
|
|
2575
2576
|
children: /* @__PURE__ */ o(
|
|
2576
2577
|
"a",
|
|
2577
2578
|
{
|
|
@@ -2589,7 +2590,7 @@ const ct = (a) => {
|
|
|
2589
2590
|
/* @__PURE__ */ o(
|
|
2590
2591
|
"button",
|
|
2591
2592
|
{
|
|
2592
|
-
onClick:
|
|
2593
|
+
onClick: u,
|
|
2593
2594
|
className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",
|
|
2594
2595
|
children: t || /* @__PURE__ */ o(ao, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
|
|
2595
2596
|
}
|
|
@@ -2598,24 +2599,24 @@ const ct = (a) => {
|
|
|
2598
2599
|
}
|
|
2599
2600
|
);
|
|
2600
2601
|
}, dt = (a) => {
|
|
2601
|
-
const { items: e, desktopClassName: r, mobileClassName: t, ...
|
|
2602
|
+
const { items: e, desktopClassName: r, mobileClassName: t, ...i } = a;
|
|
2602
2603
|
return /* @__PURE__ */ G(de, { children: [
|
|
2603
|
-
/* @__PURE__ */ o(Re, { items: e, className: r, ...
|
|
2604
|
+
/* @__PURE__ */ o(Re, { items: e, className: r, ...i }),
|
|
2604
2605
|
/* @__PURE__ */ o(
|
|
2605
2606
|
Le,
|
|
2606
2607
|
{
|
|
2607
2608
|
items: e,
|
|
2608
2609
|
className: t,
|
|
2609
2610
|
autoHidden: !0,
|
|
2610
|
-
...
|
|
2611
|
+
...i
|
|
2611
2612
|
}
|
|
2612
2613
|
)
|
|
2613
2614
|
] });
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2616
|
-
|
|
2615
|
+
}, Pe = dt;
|
|
2616
|
+
Pe.Desktop = Re;
|
|
2617
|
+
Pe.Mobile = Le;
|
|
2617
2618
|
export {
|
|
2618
|
-
|
|
2619
|
-
|
|
2619
|
+
$t as Desktop,
|
|
2620
|
+
Pe as Dock,
|
|
2620
2621
|
st as MdEditor
|
|
2621
2622
|
};
|