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/components/md-editor/preview.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +331 -330
- package/dist/index.umd.js +54 -54
- 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
|
|
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,
|
|
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, 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
|
-
), [
|
|
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), 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
|
-
|
|
132
|
+
g(
|
|
133
133
|
setTimeout(() => {
|
|
134
|
-
F && N.current === null &&
|
|
134
|
+
F && N.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), g(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 = [...
|
|
218
|
-
const 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 (
|
|
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,23 +230,23 @@ 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
|
-
(r == null ? void 0 : r.length) > 0 &&
|
|
240
|
+
(r == null ? void 0 : r.length) > 0 && u.length === 0 && W(r);
|
|
241
241
|
}, [r]), oe(() => {
|
|
242
|
-
N.current =
|
|
243
|
-
}, [
|
|
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(
|
|
247
|
+
n && Q(u);
|
|
248
248
|
},
|
|
249
|
-
[
|
|
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:
|
|
257
|
+
list: u,
|
|
258
258
|
setList: W,
|
|
259
259
|
contextMenu: A,
|
|
260
|
-
setContextMenu:
|
|
261
|
-
listStatus:
|
|
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:
|
|
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: (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
|
-
|
|
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: g
|
|
358
358
|
} = a, {
|
|
359
359
|
contextMenu: s,
|
|
360
|
-
setContextMenu:
|
|
361
|
-
hideContextMenu:
|
|
362
|
-
setShowInfoItemData:
|
|
360
|
+
setContextMenu: y,
|
|
361
|
+
hideContextMenu: x,
|
|
362
|
+
setShowInfoItemData: B,
|
|
363
363
|
removeItem: N,
|
|
364
364
|
updateItemConfig: A
|
|
365
|
-
} = Z(), { theme:
|
|
365
|
+
} = Z(), { theme: $ } = K(), { light: u, 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,29 +376,29 @@ 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
|
-
background-color: ${
|
|
391
|
-
box-shadow: 0 0 0.5rem ${
|
|
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:
|
|
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;
|
|
@@ -473,19 +473,19 @@ const Me = be({
|
|
|
473
473
|
line-height: 1.25rem;
|
|
474
474
|
cursor: pointer;
|
|
475
475
|
text-align: center;
|
|
476
|
-
color: ${
|
|
476
|
+
color: ${u.contextMenuTextColor};
|
|
477
477
|
@media (prefers-color-scheme: dark) {
|
|
478
478
|
color: ${d.contextMenuTextColor};
|
|
479
479
|
}
|
|
480
480
|
&:hover {
|
|
481
|
-
background-color: ${
|
|
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 &&
|
|
488
|
-
background-color: ${
|
|
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
|
-
|
|
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
|
-
|
|
514
|
-
background-color: ${
|
|
515
|
-
box-shadow: 0 0 0.5rem ${
|
|
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
|
-
}),
|
|
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 (g) {
|
|
568
|
+
g(s.data, N);
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
|
-
|
|
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:
|
|
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:
|
|
587
|
+
className: l`
|
|
588
588
|
width: 4rem;
|
|
589
589
|
height: 4rem;
|
|
590
|
-
background-color: ${
|
|
590
|
+
background-color: ${g.itemIconBackgroundColor};
|
|
591
591
|
border-radius: 0.75rem;
|
|
592
|
-
box-shadow: 0 0 0.5rem ${
|
|
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:
|
|
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: ${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:
|
|
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: ${g.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: g,
|
|
652
652
|
childrenLength: s
|
|
653
|
-
} = a, { contextMenu:
|
|
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:
|
|
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: (
|
|
666
|
+
overlay: /* @__PURE__ */ o(Wo, { ...B }),
|
|
667
|
+
visible: (y == null ? void 0 : y.data.id) === e.id,
|
|
668
668
|
onVisibleChange: (N) => {
|
|
669
|
-
N ||
|
|
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":
|
|
677
|
+
"data-parent-ids": g == null ? void 0 : g.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: g,
|
|
696
696
|
setList: s,
|
|
697
|
-
setOpenGroupItemData:
|
|
698
|
-
longPressTriggered:
|
|
699
|
-
moveItemId:
|
|
697
|
+
setOpenGroupItemData: y,
|
|
698
|
+
longPressTriggered: x,
|
|
699
|
+
moveItemId: B,
|
|
700
700
|
moveTargetId: N,
|
|
701
701
|
setMoveTargetId: A,
|
|
702
|
-
listStatus:
|
|
703
|
-
} = Z(), { itemIconBuilder:
|
|
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 = ((
|
|
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: ${
|
|
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
|
-
children:
|
|
740
|
+
children: u == null ? void 0 : u(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:
|
|
771
|
+
children: u == null ? void 0 : u(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:
|
|
813
|
+
children: u == null ? void 0 : u(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:
|
|
854
|
+
children: u == null ? void 0 : u(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
|
+
...g(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: g,
|
|
995
995
|
setMoveTargetId: s,
|
|
996
|
-
updateItem:
|
|
997
|
-
} = Z(), { theme:
|
|
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 &&
|
|
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,7 +1059,7 @@ const Me = be({
|
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
1061
|
.rc-dialog-body {
|
|
1062
|
-
background-color: ${
|
|
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:
|
|
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,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
|
|
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 && g(w.id), c("onMove");
|
|
1112
1112
|
},
|
|
1113
1113
|
onEnd: () => {
|
|
1114
|
-
|
|
1114
|
+
g(null), s(null), c(null);
|
|
1115
1115
|
},
|
|
1116
1116
|
ghostClass: Se,
|
|
1117
|
-
children:
|
|
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:
|
|
1161
|
+
sliderRef: i,
|
|
1162
1162
|
onItemClick: n
|
|
1163
|
-
} = a, c = te(null),
|
|
1163
|
+
} = a, c = te(null), g = te(null), {
|
|
1164
1164
|
list: s,
|
|
1165
|
-
setList:
|
|
1166
|
-
setListStatus:
|
|
1167
|
-
showInfoItemData:
|
|
1165
|
+
setList: y,
|
|
1166
|
+
setListStatus: x,
|
|
1167
|
+
showInfoItemData: B,
|
|
1168
1168
|
setShowInfoItemData: N,
|
|
1169
1169
|
openGroupItemData: A,
|
|
1170
|
-
setOpenGroupItemData:
|
|
1171
|
-
setMoveItemId:
|
|
1170
|
+
setOpenGroupItemData: $,
|
|
1171
|
+
setMoveItemId: u,
|
|
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: g,
|
|
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 &&
|
|
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
|
-
|
|
1347
|
+
u(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,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
|
-
|
|
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: g,
|
|
1418
1418
|
contextMenuBuilder: s,
|
|
1419
|
-
itemBuilder:
|
|
1420
|
-
itemIconBuilder:
|
|
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:
|
|
1429
|
+
enableCaching: i
|
|
1430
1430
|
}, children: /* @__PURE__ */ o(Oo, { ...{
|
|
1431
1431
|
theme: n,
|
|
1432
1432
|
noLetters: c,
|
|
1433
|
-
contextMenu:
|
|
1433
|
+
contextMenu: g,
|
|
1434
1434
|
pagingDotsBuilder: N,
|
|
1435
|
-
pagingDotBuilder:
|
|
1436
|
-
itemBuilder:
|
|
1437
|
-
itemIconBuilder:
|
|
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
|
|
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
|
-
),
|
|
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
|
-
`,
|
|
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:
|
|
1828
|
+
pluginConfig: i,
|
|
1829
1829
|
className: n,
|
|
1830
1830
|
theme: c = "auto",
|
|
1831
|
-
...
|
|
1831
|
+
...g
|
|
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:
|
|
1837
|
+
headings: B,
|
|
1838
1838
|
link: N,
|
|
1839
1839
|
codeBlock: A,
|
|
1840
|
-
codeMirror:
|
|
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:
|
|
1849
|
+
directives: u = {
|
|
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));
|
|
@@ -1860,7 +1860,7 @@ const Me = be({
|
|
|
1860
1860
|
className: T(
|
|
1861
1861
|
nt,
|
|
1862
1862
|
ce(c) ? rt : "",
|
|
1863
|
-
ce(c) ?
|
|
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(
|
|
1895
|
+
wo(x),
|
|
1896
1896
|
Co(),
|
|
1897
1897
|
Io(),
|
|
1898
|
-
Mo(
|
|
1898
|
+
Mo(B),
|
|
1899
1899
|
So(N),
|
|
1900
1900
|
To(),
|
|
1901
|
-
|
|
1902
|
-
|
|
1901
|
+
Bo(y),
|
|
1902
|
+
No(),
|
|
1903
1903
|
Do(),
|
|
1904
1904
|
Ro(),
|
|
1905
1905
|
Lo(A),
|
|
1906
|
-
$
|
|
1907
|
-
|
|
1908
|
-
zo(
|
|
1906
|
+
Po($),
|
|
1907
|
+
$o(),
|
|
1908
|
+
zo(u)
|
|
1909
1909
|
],
|
|
1910
|
-
...
|
|
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) ?
|
|
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(
|
|
2415
|
-
const { children:
|
|
2416
|
-
return
|
|
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(
|
|
2422
|
-
language:
|
|
2421
|
+
children: String(c).replace(/\n$/, ""),
|
|
2422
|
+
language: B[1],
|
|
2423
2423
|
style: lt
|
|
2424
2424
|
}
|
|
2425
|
-
) : /* @__PURE__ */ o("code", { ...x, className:
|
|
2425
|
+
) : /* @__PURE__ */ o("code", { ...x, className: g, children: c });
|
|
2426
2426
|
},
|
|
2427
|
-
img(
|
|
2428
|
-
|
|
2427
|
+
img(n) {
|
|
2428
|
+
const { preview: c, ...g } = i ?? {};
|
|
2429
|
+
return /* @__PURE__ */ o(
|
|
2429
2430
|
Go,
|
|
2430
2431
|
{
|
|
2431
|
-
...
|
|
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:
|
|
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:
|
|
2469
|
-
var
|
|
2470
|
-
const h = ((
|
|
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
|
-
}),
|
|
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
|
-
),
|
|
2476
|
+
), x = ee(
|
|
2477
2477
|
c,
|
|
2478
2478
|
[-150, 0, 150],
|
|
2479
2479
|
[20, 40, 20]
|
|
2480
|
-
),
|
|
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(
|
|
2488
|
+
}), A = ne(y, {
|
|
2489
2489
|
mass: 0.1,
|
|
2490
2490
|
stiffness: 150,
|
|
2491
2491
|
damping: 12
|
|
2492
|
-
}),
|
|
2492
|
+
}), $ = ne(x, {
|
|
2493
2493
|
mass: 0.1,
|
|
2494
2494
|
stiffness: 150,
|
|
2495
2495
|
damping: 12
|
|
2496
|
-
}), [
|
|
2497
|
-
return /* @__PURE__ */ o("a", { href:
|
|
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:
|
|
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:
|
|
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:
|
|
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: (
|
|
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((
|
|
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:
|
|
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
|
-
|
|
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,
|
|
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:
|
|
2571
|
+
delay: y * 0.05
|
|
2572
2572
|
}
|
|
2573
2573
|
},
|
|
2574
|
-
transition: { delay: (e.length - 1 -
|
|
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:
|
|
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, ...
|
|
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, ...
|
|
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
|
-
...
|
|
2610
|
+
...i
|
|
2611
2611
|
}
|
|
2612
2612
|
)
|
|
2613
2613
|
] });
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2616
|
-
|
|
2614
|
+
}, Pe = dt;
|
|
2615
|
+
Pe.Desktop = Re;
|
|
2616
|
+
Pe.Mobile = Le;
|
|
2617
2617
|
export {
|
|
2618
|
-
|
|
2619
|
-
|
|
2618
|
+
$t as Desktop,
|
|
2619
|
+
Pe as Dock,
|
|
2620
|
+
it as Markdown,
|
|
2620
2621
|
st as MdEditor
|
|
2621
2622
|
};
|