zs_library 0.3.19 → 0.3.21
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/index.d.ts +1 -0
- package/dist/components/md-editor/editor.d.ts +76 -0
- package/dist/components/md-editor/index.d.ts +7 -55
- package/dist/index.es.js +428 -398
- package/dist/index.umd.js +50 -48
- package/dist/zs_library.css +1 -1
- package/package.json +7 -5
package/dist/index.es.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
var He = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var ie = (a, e, r) =>
|
|
2
|
+
var Xe = (a, e, r) => e in a ? He(a, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[e] = r;
|
|
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
|
|
7
|
-
import { createContext as be, useMemo as ae, useContext as ke, useState as
|
|
8
|
-
import
|
|
6
|
+
import { cx as T, css as i } from "@emotion/css";
|
|
7
|
+
import { createContext as be, useMemo as ae, useContext as ke, useState as X, useRef as te, useEffect as oe } from "react";
|
|
8
|
+
import Fe from "react-slick";
|
|
9
9
|
import { ReactSortable as ge } from "react-sortablejs";
|
|
10
10
|
import { AnimatePresence as ue, motion as b, useMotionValue as Ge, useTransform as ee, useSpring as ne } from "framer-motion";
|
|
11
|
-
import { useLocalStorageState as
|
|
11
|
+
import { useLocalStorageState as Ye, useDebounceEffect as qe } from "ahooks";
|
|
12
12
|
import { v4 as fe } from "uuid";
|
|
13
13
|
import Oe from "rc-tooltip";
|
|
14
|
-
import { RiPencilRuler2Line as Ue, RiShareLine as Ve, RiInformationLine as _e, RiCloseCircleLine as We,
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { MDXEditor as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { Prism as
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
|
|
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
|
+
import ve from "rc-dialog";
|
|
16
|
+
import lo from "react-json-view";
|
|
17
|
+
import { MDXEditor as io, toolbarPlugin as so, DiffSourceToggleWrapper as co, UndoRedo as go, Separator as J, BoldItalicUnderlineToggles as uo, CodeToggle as mo, StrikeThroughSupSubToggles as po, ListsToggle as ho, CreateLink as fo, InsertImage as bo, InsertTable as ko, InsertThematicBreak as vo, InsertCodeBlock as xo, InsertFrontmatter as yo, diffSourcePlugin as wo, listsPlugin as Co, quotePlugin as Io, headingsPlugin as Mo, linkPlugin as So, linkDialogPlugin as To, imagePlugin as No, tablePlugin as Bo, thematicBreakPlugin as Do, frontmatterPlugin as Ro, codeBlockPlugin as Lo, codeMirrorPlugin as $o, markdownShortcutPlugin as Po, directivesPlugin as zo, AdmonitionDirectiveDescriptor as Ao } from "@mdxeditor/editor";
|
|
18
|
+
import Eo from "react-markdown";
|
|
19
|
+
import jo from "remark-gfm";
|
|
20
|
+
import Ho from "remark-emoji";
|
|
21
|
+
import Xo from "rehype-raw";
|
|
22
|
+
import { Prism as Fo } from "react-syntax-highlighter";
|
|
23
|
+
import Go from "rc-image";
|
|
24
|
+
import { clsx as Yo } from "clsx";
|
|
25
|
+
import { twMerge as qo } from "tailwind-merge";
|
|
26
|
+
const xe = {
|
|
26
27
|
token: {
|
|
27
28
|
itemNameColor: "#1a1a1a",
|
|
28
29
|
itemIconBackgroundColor: "white",
|
|
@@ -35,7 +36,7 @@ const ve = {
|
|
|
35
36
|
contextMenuBackgroundColor: "white",
|
|
36
37
|
contextMenuShadowColor: "rgba(0, 0, 0, 0.1)"
|
|
37
38
|
}
|
|
38
|
-
},
|
|
39
|
+
}, ye = {
|
|
39
40
|
token: {
|
|
40
41
|
itemNameColor: "white",
|
|
41
42
|
itemIconBackgroundColor: "#1f2937",
|
|
@@ -50,24 +51,24 @@ const ve = {
|
|
|
50
51
|
}
|
|
51
52
|
}, we = be(
|
|
52
53
|
{}
|
|
53
|
-
),
|
|
54
|
-
const { children: e, theme: r, ...t } = a,
|
|
55
|
-
return /* @__PURE__ */ o(we.Provider, { value: { theme:
|
|
54
|
+
), Oo = (a) => {
|
|
55
|
+
const { children: e, theme: r, ...t } = a, l = ae(() => r === "light" ? xe : r === "dark" ? ye : r, [r]);
|
|
56
|
+
return /* @__PURE__ */ o(we.Provider, { value: { theme: l, ...t }, children: e });
|
|
56
57
|
}, K = () => ke(we), Ce = {
|
|
57
58
|
maxRow: 2,
|
|
58
59
|
maxCol: 2
|
|
59
|
-
},
|
|
60
|
+
}, Uo = {
|
|
60
61
|
...Ce
|
|
61
62
|
}, Ie = {
|
|
62
63
|
app: Ce,
|
|
63
|
-
group:
|
|
64
|
+
group: Uo
|
|
64
65
|
};
|
|
65
|
-
class
|
|
66
|
+
class Y {
|
|
66
67
|
}
|
|
67
68
|
/** 清理重复id */
|
|
68
|
-
ie(
|
|
69
|
-
const r =
|
|
70
|
-
return { light:
|
|
69
|
+
ie(Y, "uniqueArray", (e) => e.reduce((r, t) => r.find((n) => n.id === t.id) ? r : r.concat([t]), [])), ie(Y, "getTheme", (e) => {
|
|
70
|
+
const r = xe.token, t = ye.token, l = { ...r, ...e == null ? void 0 : e.token }, n = { ...t, ...e == null ? void 0 : e.token };
|
|
71
|
+
return { light: l, dark: n };
|
|
71
72
|
});
|
|
72
73
|
const Me = be({
|
|
73
74
|
list: [],
|
|
@@ -104,144 +105,144 @@ const Me = be({
|
|
|
104
105
|
moveTargetId: null,
|
|
105
106
|
setMoveTargetId: () => {
|
|
106
107
|
}
|
|
107
|
-
}),
|
|
108
|
+
}), Vo = (a) => {
|
|
108
109
|
const {
|
|
109
110
|
children: e,
|
|
110
111
|
list: r = [],
|
|
111
112
|
onChange: t,
|
|
112
|
-
storageKey:
|
|
113
|
+
storageKey: l = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
|
|
113
114
|
enableCaching: n = !0
|
|
114
|
-
} = a, [c, p] =
|
|
115
|
+
} = a, [c, p] = X(), [s, x] = X(), [y, $] = X(null), N = te(y), [A, P] = X(null), [g, d] = X([]), [w, h] = X(
|
|
115
116
|
null
|
|
116
|
-
), [
|
|
117
|
+
), [R, u] = X(
|
|
117
118
|
null
|
|
118
|
-
), [I, C] =
|
|
119
|
+
), [I, C] = X(!1), [m, f] = X(null), [E, V] = X(
|
|
119
120
|
null
|
|
120
|
-
), [j, le] =
|
|
121
|
+
), [j, le] = X(!1), [_, Q] = Ye(l, {
|
|
121
122
|
defaultValue: [],
|
|
122
123
|
listenStorageChange: !0
|
|
123
124
|
}), re = () => {
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
}, O = (k,
|
|
125
|
+
P(null), clearTimeout(c), p(void 0), N.current = null;
|
|
126
|
+
}, B = (k, F) => {
|
|
127
|
+
P({ ...k, pageX: k.pageX, pageY: k.pageY, data: F }), clearTimeout(c);
|
|
128
|
+
}, O = (k, F = !0) => {
|
|
128
129
|
const { config: H = {} } = k;
|
|
129
130
|
return H.allowContextMenu === !1 ? {} : {
|
|
130
131
|
onMouseDown: (M) => {
|
|
131
132
|
p(
|
|
132
133
|
setTimeout(() => {
|
|
133
|
-
|
|
134
|
+
F && N.current === null && B(M, k);
|
|
134
135
|
}, 800)
|
|
135
|
-
), C(!1),
|
|
136
|
+
), C(!1), x(
|
|
136
137
|
setTimeout(() => {
|
|
137
138
|
C(!0);
|
|
138
139
|
}, 800)
|
|
139
140
|
);
|
|
140
141
|
},
|
|
141
142
|
onMouseUp: () => {
|
|
142
|
-
clearTimeout(s),
|
|
143
|
+
clearTimeout(s), x(void 0), clearTimeout(c), p(void 0);
|
|
143
144
|
},
|
|
144
145
|
onContextMenu: (M) => {
|
|
145
|
-
|
|
146
|
+
F && (M.preventDefault(), B(M, k));
|
|
146
147
|
}
|
|
147
148
|
};
|
|
148
|
-
}, W = (k,
|
|
149
|
-
const H = [...
|
|
149
|
+
}, W = (k, F) => {
|
|
150
|
+
const H = [...F || []];
|
|
150
151
|
if (H.length > 0)
|
|
151
152
|
d((M) => {
|
|
152
|
-
const
|
|
153
|
+
const L = [...M], D = (v) => {
|
|
153
154
|
var pe, he;
|
|
154
|
-
const S = H.shift(), z =
|
|
155
|
+
const S = H.shift(), z = v.find((U) => U.id === S), q = v.findIndex((U) => U.id === S);
|
|
155
156
|
if (H.length && z) {
|
|
156
157
|
if (((pe = z.children) == null ? void 0 : pe.filter(
|
|
157
158
|
(U) => !k.some((je) => je.id === U.id)
|
|
158
159
|
).length) === 1 && k.length === 1) {
|
|
159
160
|
const U = { ...k[0] };
|
|
160
|
-
return
|
|
161
|
+
return v.splice(q, 1, U), t == null || t(v), v;
|
|
161
162
|
}
|
|
162
|
-
return z.children = D(z.children || []),
|
|
163
|
+
return z.children = D(z.children || []), v.splice(q, 1, z), t == null || t(v), v;
|
|
163
164
|
}
|
|
164
165
|
if (z) {
|
|
165
166
|
if (!((he = z.children) != null && he.length) && k.length) {
|
|
166
167
|
const U = { ...z };
|
|
167
|
-
return z.data = { name: "文件夹" }, z.type = "group", z.children = [U, ...k], z.id = fe(),
|
|
168
|
+
return z.data = { name: "文件夹" }, z.type = "group", z.children = [U, ...k], z.id = fe(), v.splice(q, 1, z), t == null || t(v), v;
|
|
168
169
|
}
|
|
169
|
-
return z.children =
|
|
170
|
+
return z.children = Y.uniqueArray(k), v.splice(q, 1, z), t == null || t(v), v;
|
|
170
171
|
}
|
|
171
|
-
return
|
|
172
|
+
return Y.uniqueArray(k);
|
|
172
173
|
};
|
|
173
|
-
return
|
|
174
|
+
return Y.uniqueArray(D(L));
|
|
174
175
|
});
|
|
175
176
|
else {
|
|
176
|
-
const M =
|
|
177
|
+
const M = Y.uniqueArray(k);
|
|
177
178
|
t == null || t(M), d(M);
|
|
178
179
|
}
|
|
179
|
-
},
|
|
180
|
+
}, Pe = (k, F) => {
|
|
180
181
|
d((H) => {
|
|
181
|
-
const M = [...H],
|
|
182
|
-
var
|
|
182
|
+
const M = [...H], L = (D) => {
|
|
183
|
+
var v;
|
|
183
184
|
for (let S = 0; S < D.length; S++)
|
|
184
185
|
if (D[S].id === k) {
|
|
185
|
-
D[S].config =
|
|
186
|
+
D[S].config = F;
|
|
186
187
|
break;
|
|
187
|
-
} else ((
|
|
188
|
+
} else ((v = D[S].children) == null ? void 0 : v.length) !== void 0 && L(D[S].children);
|
|
188
189
|
};
|
|
189
|
-
return
|
|
190
|
+
return L(M), t == null || t(M), M;
|
|
190
191
|
});
|
|
191
|
-
}, ze = (k,
|
|
192
|
+
}, ze = (k, F) => {
|
|
192
193
|
d((H) => {
|
|
193
|
-
const M = [...H],
|
|
194
|
-
var
|
|
194
|
+
const M = [...H], L = (D) => {
|
|
195
|
+
var v;
|
|
195
196
|
for (let S = 0; S < D.length; S++)
|
|
196
197
|
if (D[S].id === k) {
|
|
197
|
-
D[S].data =
|
|
198
|
+
D[S].data = F;
|
|
198
199
|
break;
|
|
199
|
-
} else ((
|
|
200
|
+
} else ((v = D[S].children) == null ? void 0 : v.length) !== void 0 && L(D[S].children);
|
|
200
201
|
};
|
|
201
|
-
return
|
|
202
|
+
return L(M), t == null || t(M), M;
|
|
202
203
|
});
|
|
203
204
|
}, Ae = (k) => {
|
|
204
|
-
d((
|
|
205
|
-
const H = [...
|
|
205
|
+
d((F) => {
|
|
206
|
+
const H = [...F], M = (L) => {
|
|
206
207
|
var D;
|
|
207
|
-
for (let
|
|
208
|
-
if (
|
|
209
|
-
|
|
208
|
+
for (let v = 0; v < L.length; v++)
|
|
209
|
+
if (L[v].id === k) {
|
|
210
|
+
L.splice(v, 1);
|
|
210
211
|
break;
|
|
211
|
-
} else ((D =
|
|
212
|
+
} else ((D = L[v].children) == null ? void 0 : D.length) !== void 0 && M(L[v].children);
|
|
212
213
|
};
|
|
213
214
|
return M(H), t == null || t(H), H;
|
|
214
215
|
});
|
|
215
|
-
}, Ee = (k,
|
|
216
|
-
const H = [...g], M = (
|
|
217
|
-
const
|
|
216
|
+
}, Ee = (k, F) => {
|
|
217
|
+
const H = [...g], M = (L, D) => {
|
|
218
|
+
const v = D.shift(), S = L.find((q) => q.id === v), z = L.findIndex((q) => q.id === v);
|
|
218
219
|
if (S) {
|
|
219
220
|
if (D.length)
|
|
220
221
|
S.children = M(S.children || [], D);
|
|
221
222
|
else {
|
|
222
|
-
const
|
|
223
|
+
const q = (k == null ? void 0 : k.type) ?? "app";
|
|
223
224
|
S.children = [
|
|
224
225
|
...S.children ?? [],
|
|
225
226
|
{
|
|
226
227
|
...k,
|
|
227
228
|
id: fe(),
|
|
228
|
-
config: (k == null ? void 0 : k.config) ?? Ie[
|
|
229
|
+
config: (k == null ? void 0 : k.config) ?? Ie[q]
|
|
229
230
|
}
|
|
230
231
|
];
|
|
231
232
|
}
|
|
232
|
-
return
|
|
233
|
+
return L.splice(z, 1, S), L;
|
|
233
234
|
} else
|
|
234
|
-
return
|
|
235
|
+
return L;
|
|
235
236
|
};
|
|
236
|
-
d(M(H,
|
|
237
|
+
d(M(H, F));
|
|
237
238
|
};
|
|
238
239
|
return oe(() => {
|
|
239
240
|
(r == null ? void 0 : r.length) > 0 && g.length === 0 && W(r);
|
|
240
241
|
}, [r]), oe(() => {
|
|
241
|
-
|
|
242
|
-
}, [
|
|
242
|
+
N.current = y, y !== null && re();
|
|
243
|
+
}, [y]), oe(() => {
|
|
243
244
|
n && _ != null && _.length && !j && (W(_), le(!0));
|
|
244
|
-
}, [_, j, n]),
|
|
245
|
+
}, [_, j, n]), qe(
|
|
245
246
|
() => {
|
|
246
247
|
n && Q(g);
|
|
247
248
|
},
|
|
@@ -256,17 +257,17 @@ const Me = be({
|
|
|
256
257
|
list: g,
|
|
257
258
|
setList: W,
|
|
258
259
|
contextMenu: A,
|
|
259
|
-
setContextMenu:
|
|
260
|
-
listStatus:
|
|
261
|
-
setListStatus:
|
|
260
|
+
setContextMenu: P,
|
|
261
|
+
listStatus: y,
|
|
262
|
+
setListStatus: $,
|
|
262
263
|
contextMenuFuns: O,
|
|
263
264
|
hideContextMenu: re,
|
|
264
265
|
showInfoItemData: w,
|
|
265
266
|
setShowInfoItemData: h,
|
|
266
|
-
openGroupItemData:
|
|
267
|
+
openGroupItemData: R,
|
|
267
268
|
setOpenGroupItemData: u,
|
|
268
269
|
longPressTriggered: I,
|
|
269
|
-
updateItemConfig:
|
|
270
|
+
updateItemConfig: Pe,
|
|
270
271
|
updateItem: ze,
|
|
271
272
|
removeItem: Ae,
|
|
272
273
|
addItem: Ee,
|
|
@@ -278,7 +279,7 @@ const Me = be({
|
|
|
278
279
|
children: e
|
|
279
280
|
}
|
|
280
281
|
);
|
|
281
|
-
}, Z = () => ke(Me),
|
|
282
|
+
}, Z = () => ke(Me), _o = {
|
|
282
283
|
menuShow: {
|
|
283
284
|
opacity: 1,
|
|
284
285
|
y: 0,
|
|
@@ -286,11 +287,11 @@ const Me = be({
|
|
|
286
287
|
},
|
|
287
288
|
menuHide: { opacity: 0, y: 20, transition: { duration: 0.2 } }
|
|
288
289
|
}, se = (a) => {
|
|
289
|
-
const { icon: e, title: r, onClick: t } = a, { theme:
|
|
290
|
+
const { icon: e, title: r, onClick: t } = a, { theme: l } = K(), { light: n, dark: c } = Y.getTheme(l);
|
|
290
291
|
return /* @__PURE__ */ o(
|
|
291
292
|
b.div,
|
|
292
293
|
{
|
|
293
|
-
className:
|
|
294
|
+
className: i`
|
|
294
295
|
&:hover {
|
|
295
296
|
background-color: ${n.contextMenuActiveColor};
|
|
296
297
|
@media (prefers-color-scheme: dark) {
|
|
@@ -310,13 +311,13 @@ const Me = be({
|
|
|
310
311
|
onClick: (p) => {
|
|
311
312
|
p.stopPropagation(), t == null || t();
|
|
312
313
|
},
|
|
313
|
-
variants:
|
|
314
|
+
variants: _o,
|
|
314
315
|
children: /* @__PURE__ */ G(
|
|
315
316
|
b.div,
|
|
316
317
|
{
|
|
317
318
|
className: T(
|
|
318
319
|
"py-1.5 px-3 rounded-lg",
|
|
319
|
-
|
|
320
|
+
i`
|
|
320
321
|
padding-top: 0.375rem;
|
|
321
322
|
padding-bottom: 0.375rem;
|
|
322
323
|
padding-left: 0.75rem;
|
|
@@ -330,7 +331,7 @@ const Me = be({
|
|
|
330
331
|
b.div,
|
|
331
332
|
{
|
|
332
333
|
className: T(
|
|
333
|
-
|
|
334
|
+
i`
|
|
334
335
|
margin-bottom: 0.375rem;
|
|
335
336
|
display: flex;
|
|
336
337
|
justify-content: center;
|
|
@@ -345,23 +346,23 @@ const Me = be({
|
|
|
345
346
|
)
|
|
346
347
|
}
|
|
347
348
|
);
|
|
348
|
-
},
|
|
349
|
+
}, Wo = (a) => {
|
|
349
350
|
const {
|
|
350
351
|
showInfoButton: e = !0,
|
|
351
352
|
showRemoveButton: r = !0,
|
|
352
353
|
showShareButton: t = !0,
|
|
353
|
-
showSizeButton:
|
|
354
|
+
showSizeButton: l = !0,
|
|
354
355
|
onInfoClick: n,
|
|
355
356
|
onShareClick: c,
|
|
356
357
|
onRemoveClick: p
|
|
357
358
|
} = a, {
|
|
358
359
|
contextMenu: s,
|
|
359
|
-
setContextMenu:
|
|
360
|
-
hideContextMenu:
|
|
361
|
-
setShowInfoItemData:
|
|
362
|
-
removeItem:
|
|
360
|
+
setContextMenu: x,
|
|
361
|
+
hideContextMenu: y,
|
|
362
|
+
setShowInfoItemData: $,
|
|
363
|
+
removeItem: N,
|
|
363
364
|
updateItemConfig: A
|
|
364
|
-
} = Z(), { theme:
|
|
365
|
+
} = Z(), { theme: P } = K(), { light: g, dark: d } = Y.getTheme(P), { data: w } = s ?? {}, { config: h = {} } = w ?? {}, R = () => {
|
|
365
366
|
var C;
|
|
366
367
|
const u = Ie[(C = s == null ? void 0 : s.data) == null ? void 0 : C.type], I = [];
|
|
367
368
|
for (let m = 1; m <= ((u == null ? void 0 : u.maxRow) ?? 2); m++)
|
|
@@ -383,7 +384,7 @@ const Me = be({
|
|
|
383
384
|
b.div,
|
|
384
385
|
{
|
|
385
386
|
className: T(
|
|
386
|
-
|
|
387
|
+
i`
|
|
387
388
|
border-radius: 0.5rem;
|
|
388
389
|
overflow: hidden;
|
|
389
390
|
background-color: ${g.contextMenuBackgroundColor};
|
|
@@ -394,10 +395,10 @@ const Me = be({
|
|
|
394
395
|
}
|
|
395
396
|
`
|
|
396
397
|
),
|
|
397
|
-
children:
|
|
398
|
+
children: l && h.allowResize !== !1 && /* @__PURE__ */ o(
|
|
398
399
|
b.ul,
|
|
399
400
|
{
|
|
400
|
-
className:
|
|
401
|
+
className: i`
|
|
401
402
|
background-color: white;
|
|
402
403
|
padding: 0.25rem;
|
|
403
404
|
margin: 0;
|
|
@@ -407,7 +408,7 @@ const Me = be({
|
|
|
407
408
|
label: "修改大小",
|
|
408
409
|
key: "size",
|
|
409
410
|
icon: /* @__PURE__ */ o(Ue, { size: 14 }),
|
|
410
|
-
items:
|
|
411
|
+
items: R().map((u) => ({
|
|
411
412
|
label: u,
|
|
412
413
|
key: u,
|
|
413
414
|
onClick: () => {
|
|
@@ -422,7 +423,7 @@ const Me = be({
|
|
|
422
423
|
].map((u) => /* @__PURE__ */ G(
|
|
423
424
|
b.li,
|
|
424
425
|
{
|
|
425
|
-
className:
|
|
426
|
+
className: i`
|
|
426
427
|
padding-top: 0.5rem;
|
|
427
428
|
padding-bottom: 0.5rem;
|
|
428
429
|
padding-left: 0.75rem;
|
|
@@ -432,7 +433,7 @@ const Me = be({
|
|
|
432
433
|
/* @__PURE__ */ G(
|
|
433
434
|
b.p,
|
|
434
435
|
{
|
|
435
|
-
className:
|
|
436
|
+
className: i`
|
|
436
437
|
display: flex;
|
|
437
438
|
align-items: center;
|
|
438
439
|
font-size: 0.875rem;
|
|
@@ -451,7 +452,7 @@ const Me = be({
|
|
|
451
452
|
/* @__PURE__ */ o(
|
|
452
453
|
b.div,
|
|
453
454
|
{
|
|
454
|
-
className:
|
|
455
|
+
className: i`
|
|
455
456
|
display: grid;
|
|
456
457
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
457
458
|
gap: 0.25rem;
|
|
@@ -461,7 +462,7 @@ const Me = be({
|
|
|
461
462
|
{
|
|
462
463
|
className: T(
|
|
463
464
|
"py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",
|
|
464
|
-
|
|
465
|
+
i`
|
|
465
466
|
padding-top: 0.25rem;
|
|
466
467
|
padding-bottom: 0.25rem;
|
|
467
468
|
padding-left: 0.5rem;
|
|
@@ -483,7 +484,7 @@ const Me = be({
|
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
486
|
`,
|
|
486
|
-
`${h.row}x${h.col}` === I.key &&
|
|
487
|
+
`${h.row}x${h.col}` === I.key && i`
|
|
487
488
|
background-color: ${g.contextMenuActiveColor};
|
|
488
489
|
@media (prefers-color-scheme: dark) {
|
|
489
490
|
background-color: ${d.contextMenuActiveColor};
|
|
@@ -509,7 +510,7 @@ const Me = be({
|
|
|
509
510
|
b.div,
|
|
510
511
|
{
|
|
511
512
|
className: T(
|
|
512
|
-
|
|
513
|
+
i`
|
|
513
514
|
background-color: ${g.contextMenuBackgroundColor};
|
|
514
515
|
box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
|
|
515
516
|
@media (prefers-color-scheme: dark) {
|
|
@@ -549,11 +550,11 @@ const Me = be({
|
|
|
549
550
|
n(s.data);
|
|
550
551
|
return;
|
|
551
552
|
}
|
|
552
|
-
|
|
553
|
+
$({
|
|
553
554
|
...s.data,
|
|
554
555
|
pageX: s.pageX,
|
|
555
556
|
pageY: s.pageY
|
|
556
|
-
}),
|
|
557
|
+
}), y();
|
|
557
558
|
}
|
|
558
559
|
}
|
|
559
560
|
),
|
|
@@ -564,10 +565,10 @@ const Me = be({
|
|
|
564
565
|
title: "移除",
|
|
565
566
|
onClick: () => {
|
|
566
567
|
if (p) {
|
|
567
|
-
p(s.data,
|
|
568
|
+
p(s.data, N);
|
|
568
569
|
return;
|
|
569
570
|
}
|
|
570
|
-
|
|
571
|
+
x(null), N(s.data.id);
|
|
571
572
|
}
|
|
572
573
|
}
|
|
573
574
|
)
|
|
@@ -577,13 +578,13 @@ const Me = be({
|
|
|
577
578
|
]
|
|
578
579
|
}
|
|
579
580
|
) });
|
|
580
|
-
},
|
|
581
|
-
const { data: e, noLetters: r = !1 } = a, { contextMenuFuns: t } = Z(), { itemIconBuilder:
|
|
581
|
+
}, Jo = (a) => {
|
|
582
|
+
const { data: e, noLetters: r = !1 } = a, { contextMenuFuns: t } = Z(), { itemIconBuilder: l, theme: n, contextMenu: c } = K(), { light: p, dark: s } = Y.getTheme(n), { data: x = {} } = e, { name: y } = x;
|
|
582
583
|
return /* @__PURE__ */ G(de, { children: [
|
|
583
584
|
/* @__PURE__ */ o(
|
|
584
585
|
b.div,
|
|
585
586
|
{
|
|
586
|
-
className:
|
|
587
|
+
className: i`
|
|
587
588
|
width: 4rem;
|
|
588
589
|
height: 4rem;
|
|
589
590
|
background-color: ${p.itemIconBackgroundColor};
|
|
@@ -601,7 +602,7 @@ const Me = be({
|
|
|
601
602
|
children: /* @__PURE__ */ o(
|
|
602
603
|
"div",
|
|
603
604
|
{
|
|
604
|
-
className:
|
|
605
|
+
className: i`
|
|
605
606
|
position: absolute;
|
|
606
607
|
left: 0;
|
|
607
608
|
top: 0;
|
|
@@ -613,7 +614,7 @@ const Me = be({
|
|
|
613
614
|
}
|
|
614
615
|
`,
|
|
615
616
|
...t(e, c !== !1),
|
|
616
|
-
children:
|
|
617
|
+
children: l == null ? void 0 : l(e)
|
|
617
618
|
}
|
|
618
619
|
)
|
|
619
620
|
}
|
|
@@ -622,7 +623,7 @@ const Me = be({
|
|
|
622
623
|
b.p,
|
|
623
624
|
{
|
|
624
625
|
className: T(
|
|
625
|
-
|
|
626
|
+
i`
|
|
626
627
|
text-align: center;
|
|
627
628
|
margin-top: 0.25rem;
|
|
628
629
|
margin-bottom: 0;
|
|
@@ -631,11 +632,11 @@ const Me = be({
|
|
|
631
632
|
color: ${s.itemNameColor};
|
|
632
633
|
}
|
|
633
634
|
`,
|
|
634
|
-
r &&
|
|
635
|
+
r && i`
|
|
635
636
|
color: transparent;
|
|
636
637
|
`
|
|
637
638
|
),
|
|
638
|
-
children:
|
|
639
|
+
children: y
|
|
639
640
|
}
|
|
640
641
|
)
|
|
641
642
|
] });
|
|
@@ -644,17 +645,17 @@ const Me = be({
|
|
|
644
645
|
data: e,
|
|
645
646
|
className: r,
|
|
646
647
|
itemIndex: t,
|
|
647
|
-
onClick:
|
|
648
|
+
onClick: l,
|
|
648
649
|
disabledDrag: n = !1,
|
|
649
650
|
children: c,
|
|
650
651
|
parentIds: p,
|
|
651
652
|
childrenLength: s
|
|
652
|
-
} = a, { contextMenu:
|
|
653
|
+
} = a, { contextMenu: x, setContextMenu: y } = Z(), { contextMenu: $ } = K();
|
|
653
654
|
return /* @__PURE__ */ o(
|
|
654
655
|
Oe,
|
|
655
656
|
{
|
|
656
657
|
placement: "bottom",
|
|
657
|
-
overlayClassName:
|
|
658
|
+
overlayClassName: i`
|
|
658
659
|
background-color: transparent;
|
|
659
660
|
.rc-tooltip-inner {
|
|
660
661
|
background-color: transparent;
|
|
@@ -662,10 +663,10 @@ const Me = be({
|
|
|
662
663
|
border: none;
|
|
663
664
|
}
|
|
664
665
|
`,
|
|
665
|
-
overlay: /* @__PURE__ */ o(
|
|
666
|
-
visible: (
|
|
667
|
-
onVisibleChange: (
|
|
668
|
-
|
|
666
|
+
overlay: /* @__PURE__ */ o(Wo, { ...$ }),
|
|
667
|
+
visible: (x == null ? void 0 : x.data.id) === e.id,
|
|
668
|
+
onVisibleChange: (N) => {
|
|
669
|
+
N || y(null);
|
|
669
670
|
},
|
|
670
671
|
destroyTooltipOnHide: !0,
|
|
671
672
|
children: /* @__PURE__ */ o(
|
|
@@ -675,41 +676,41 @@ const Me = be({
|
|
|
675
676
|
"data-index": t,
|
|
676
677
|
"data-parent-ids": p == null ? void 0 : p.join(","),
|
|
677
678
|
"data-children-length": s,
|
|
678
|
-
onClick: () =>
|
|
679
|
+
onClick: () => l == null ? void 0 : l(e),
|
|
679
680
|
className: T(n && "drag-disabled", r),
|
|
680
|
-
children: c ?? /* @__PURE__ */ o(
|
|
681
|
+
children: c ?? /* @__PURE__ */ o(Jo, { ...a })
|
|
681
682
|
}
|
|
682
683
|
)
|
|
683
684
|
}
|
|
684
685
|
);
|
|
685
|
-
},
|
|
686
|
+
}, Ko = (a) => {
|
|
686
687
|
const {
|
|
687
688
|
data: e,
|
|
688
689
|
className: r,
|
|
689
690
|
parentIds: t,
|
|
690
|
-
itemIndex:
|
|
691
|
+
itemIndex: l,
|
|
691
692
|
onClick: n,
|
|
692
693
|
noLetters: c = !1
|
|
693
694
|
} = a, {
|
|
694
695
|
contextMenuFuns: p,
|
|
695
696
|
setList: s,
|
|
696
|
-
setOpenGroupItemData:
|
|
697
|
-
longPressTriggered:
|
|
698
|
-
moveItemId:
|
|
699
|
-
moveTargetId:
|
|
697
|
+
setOpenGroupItemData: x,
|
|
698
|
+
longPressTriggered: y,
|
|
699
|
+
moveItemId: $,
|
|
700
|
+
moveTargetId: N,
|
|
700
701
|
setMoveTargetId: A,
|
|
701
|
-
listStatus:
|
|
702
|
-
} = Z(), { itemIconBuilder: g, theme: d, contextMenu: w } = K(), { light: h, dark:
|
|
702
|
+
listStatus: P
|
|
703
|
+
} = Z(), { itemIconBuilder: g, theme: d, contextMenu: w } = K(), { light: h, dark: R } = Y.getTheme(d), { children: u, data: I, config: C } = e, { row: m = 1, col: f = 1 } = C ?? {}, E = {
|
|
703
704
|
visible: { opacity: 1, scale: 1 },
|
|
704
705
|
hidden: { opacity: 0, scale: 0.95 }
|
|
705
|
-
}, V = ((u == null ? void 0 : u.length) ?? 0) === 0, j = V ? [e] : [...u ?? []].slice(0, 9), le = ae(() =>
|
|
706
|
+
}, V = ((u == null ? void 0 : u.length) ?? 0) === 0, j = V ? [e] : [...u ?? []].slice(0, 9), le = ae(() => $ === e.id.toString(), [e.id, $]), _ = ae(() => N === e.id, [e.id, N]), Q = i`
|
|
706
707
|
overflow: hidden;
|
|
707
708
|
cursor: pointer;
|
|
708
709
|
background-color: ${h.itemIconBackgroundColor};
|
|
709
710
|
box-shadow: 0 0 0.5rem ${h.itemIconShadowColor};
|
|
710
711
|
@media (prefers-color-scheme: dark) {
|
|
711
|
-
background-color: ${
|
|
712
|
-
box-shadow: 0 0 0.5rem ${
|
|
712
|
+
background-color: ${R.itemIconBackgroundColor};
|
|
713
|
+
box-shadow: 0 0 0.5rem ${R.itemIconShadowColor};
|
|
713
714
|
}
|
|
714
715
|
`, re = () => {
|
|
715
716
|
if (V)
|
|
@@ -718,7 +719,7 @@ const Me = be({
|
|
|
718
719
|
{
|
|
719
720
|
className: T(
|
|
720
721
|
"sortable-group-item",
|
|
721
|
-
|
|
722
|
+
i`
|
|
722
723
|
overflow: hidden;
|
|
723
724
|
cursor: pointer;
|
|
724
725
|
width: 100%;
|
|
@@ -729,12 +730,12 @@ const Me = be({
|
|
|
729
730
|
top: 0;
|
|
730
731
|
border-radius: 0.75rem;
|
|
731
732
|
@media (prefers-color-scheme: dark) {
|
|
732
|
-
background-color: ${
|
|
733
|
+
background-color: ${R.itemIconBackgroundColor};
|
|
733
734
|
}
|
|
734
735
|
`
|
|
735
736
|
),
|
|
736
|
-
onClick: (
|
|
737
|
-
|
|
737
|
+
onClick: (B) => {
|
|
738
|
+
B.stopPropagation(), n == null || n(e);
|
|
738
739
|
},
|
|
739
740
|
children: g == null ? void 0 : g(e)
|
|
740
741
|
}
|
|
@@ -743,7 +744,7 @@ const Me = be({
|
|
|
743
744
|
return /* @__PURE__ */ o(
|
|
744
745
|
b.div,
|
|
745
746
|
{
|
|
746
|
-
className:
|
|
747
|
+
className: i`
|
|
747
748
|
display: grid;
|
|
748
749
|
width: 100%;
|
|
749
750
|
height: 100%;
|
|
@@ -753,23 +754,23 @@ const Me = be({
|
|
|
753
754
|
gap: ${f === 1 ? "0.125rem" : "0.5rem"};
|
|
754
755
|
place-items: center;
|
|
755
756
|
`,
|
|
756
|
-
children: j == null ? void 0 : j.slice(0, 9).map((
|
|
757
|
+
children: j == null ? void 0 : j.slice(0, 9).map((B) => /* @__PURE__ */ o(
|
|
757
758
|
b.div,
|
|
758
759
|
{
|
|
759
760
|
className: T(
|
|
760
761
|
Q,
|
|
761
|
-
|
|
762
|
+
i`
|
|
762
763
|
border-radius: ${f === 1 ? "0.25rem" : "0.5rem"};
|
|
763
764
|
width: 100%;
|
|
764
765
|
height: 100%;
|
|
765
766
|
`
|
|
766
767
|
),
|
|
767
768
|
onClick: (O) => {
|
|
768
|
-
O.stopPropagation(), n == null || n(
|
|
769
|
+
O.stopPropagation(), n == null || n(B);
|
|
769
770
|
},
|
|
770
|
-
children: g == null ? void 0 : g(
|
|
771
|
+
children: g == null ? void 0 : g(B)
|
|
771
772
|
},
|
|
772
|
-
|
|
773
|
+
B.id
|
|
773
774
|
))
|
|
774
775
|
}
|
|
775
776
|
);
|
|
@@ -777,7 +778,7 @@ const Me = be({
|
|
|
777
778
|
return /* @__PURE__ */ o(
|
|
778
779
|
b.div,
|
|
779
780
|
{
|
|
780
|
-
className:
|
|
781
|
+
className: i`
|
|
781
782
|
display: grid;
|
|
782
783
|
grid-template-columns: repeat(10, minmax(0, 1fr));
|
|
783
784
|
grid-template-rows: repeat(4, minmax(0, 1fr));
|
|
@@ -787,18 +788,18 @@ const Me = be({
|
|
|
787
788
|
height: 52px;
|
|
788
789
|
place-items: center;
|
|
789
790
|
`,
|
|
790
|
-
children: j == null ? void 0 : j.slice(0, 4).map((
|
|
791
|
+
children: j == null ? void 0 : j.slice(0, 4).map((B, O) => /* @__PURE__ */ o(
|
|
791
792
|
b.div,
|
|
792
793
|
{
|
|
793
794
|
className: T(
|
|
794
795
|
Q,
|
|
795
|
-
O < 2 ?
|
|
796
|
+
O < 2 ? i`
|
|
796
797
|
width: 52px;
|
|
797
798
|
height: 52px;
|
|
798
799
|
border-radius: 0.5rem;
|
|
799
800
|
grid-column: span 4 / span 4;
|
|
800
801
|
grid-row: span 4 / span 4;
|
|
801
|
-
` :
|
|
802
|
+
` : i`
|
|
802
803
|
width: 1.5rem;
|
|
803
804
|
height: 1.5rem;
|
|
804
805
|
border-radius: 0.375rem;
|
|
@@ -807,11 +808,11 @@ const Me = be({
|
|
|
807
808
|
`
|
|
808
809
|
),
|
|
809
810
|
onClick: (W) => {
|
|
810
|
-
O > 2 || (W.stopPropagation(), n == null || n(
|
|
811
|
+
O > 2 || (W.stopPropagation(), n == null || n(B));
|
|
811
812
|
},
|
|
812
|
-
children: g == null ? void 0 : g(
|
|
813
|
+
children: g == null ? void 0 : g(B)
|
|
813
814
|
},
|
|
814
|
-
|
|
815
|
+
B.id
|
|
815
816
|
))
|
|
816
817
|
}
|
|
817
818
|
);
|
|
@@ -819,7 +820,7 @@ const Me = be({
|
|
|
819
820
|
return /* @__PURE__ */ o(
|
|
820
821
|
b.div,
|
|
821
822
|
{
|
|
822
|
-
className:
|
|
823
|
+
className: i`
|
|
823
824
|
display: grid;
|
|
824
825
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
825
826
|
grid-template-rows: repeat(10, minmax(0, 1fr));
|
|
@@ -829,18 +830,18 @@ const Me = be({
|
|
|
829
830
|
height: 144px;
|
|
830
831
|
place-items: center;
|
|
831
832
|
`,
|
|
832
|
-
children: j == null ? void 0 : j.slice(0, 4).map((
|
|
833
|
+
children: j == null ? void 0 : j.slice(0, 4).map((B, O) => /* @__PURE__ */ o(
|
|
833
834
|
b.div,
|
|
834
835
|
{
|
|
835
836
|
className: T(
|
|
836
837
|
Q,
|
|
837
|
-
O < 2 ?
|
|
838
|
+
O < 2 ? i`
|
|
838
839
|
width: 52px;
|
|
839
840
|
height: 52px;
|
|
840
841
|
border-radius: 0.5rem;
|
|
841
842
|
grid-column: span 4 / span 4;
|
|
842
843
|
grid-row: span 4 / span 4;
|
|
843
|
-
` :
|
|
844
|
+
` : i`
|
|
844
845
|
width: 1.5rem;
|
|
845
846
|
height: 1.5rem;
|
|
846
847
|
grid-column: span 2 / span 2;
|
|
@@ -848,11 +849,11 @@ const Me = be({
|
|
|
848
849
|
`
|
|
849
850
|
),
|
|
850
851
|
onClick: (W) => {
|
|
851
|
-
O > 2 || (W.stopPropagation(), n == null || n(
|
|
852
|
+
O > 2 || (W.stopPropagation(), n == null || n(B));
|
|
852
853
|
},
|
|
853
|
-
children: g == null ? void 0 : g(
|
|
854
|
+
children: g == null ? void 0 : g(B)
|
|
854
855
|
},
|
|
855
|
-
|
|
856
|
+
B.id
|
|
856
857
|
))
|
|
857
858
|
}
|
|
858
859
|
);
|
|
@@ -861,11 +862,11 @@ const Me = be({
|
|
|
861
862
|
me,
|
|
862
863
|
{
|
|
863
864
|
data: e,
|
|
864
|
-
itemIndex:
|
|
865
|
+
itemIndex: l,
|
|
865
866
|
parentIds: t,
|
|
866
867
|
childrenLength: u == null ? void 0 : u.length,
|
|
867
868
|
className: T(
|
|
868
|
-
|
|
869
|
+
i`
|
|
869
870
|
grid-row: span ${m};
|
|
870
871
|
grid-column: span ${f};
|
|
871
872
|
`,
|
|
@@ -878,15 +879,15 @@ const Me = be({
|
|
|
878
879
|
whileTap: { scale: 0.9 },
|
|
879
880
|
className: T(
|
|
880
881
|
_ ? "!scale-110" : "",
|
|
881
|
-
|
|
882
|
+
i`
|
|
882
883
|
cursor: pointer;
|
|
883
884
|
position: relative;
|
|
884
885
|
border-radius: 0.75rem;
|
|
885
886
|
background-color: ${h.groupItemIconBackgroundColor};
|
|
886
887
|
box-shadow: 0 0 0.5rem ${h.groupItemIconShadowColor};
|
|
887
888
|
@media (prefers-color-scheme: dark) {
|
|
888
|
-
background-color: ${
|
|
889
|
-
box-shadow: 0 0 0.5rem ${
|
|
889
|
+
background-color: ${R.groupItemIconBackgroundColor};
|
|
890
|
+
box-shadow: 0 0 0.5rem ${R.groupItemIconShadowColor};
|
|
890
891
|
}
|
|
891
892
|
/* overflow: hidden; */
|
|
892
893
|
transition: all 0.3s;
|
|
@@ -895,14 +896,14 @@ const Me = be({
|
|
|
895
896
|
height: ${m * 64 + 32 * (m - 1)}px;
|
|
896
897
|
`
|
|
897
898
|
),
|
|
898
|
-
onClick: (
|
|
899
|
-
!V && !
|
|
899
|
+
onClick: (B) => {
|
|
900
|
+
!V && !y && (e.parentIds = t, e.pageX = B.pageX, e.pageY = B.pageY, x(e));
|
|
900
901
|
},
|
|
901
902
|
...p(e, w !== !1),
|
|
902
903
|
children: /* @__PURE__ */ G(
|
|
903
904
|
b.div,
|
|
904
905
|
{
|
|
905
|
-
className:
|
|
906
|
+
className: i`
|
|
906
907
|
position: relative;
|
|
907
908
|
width: 100%;
|
|
908
909
|
height: 100%;
|
|
@@ -918,14 +919,14 @@ const Me = be({
|
|
|
918
919
|
{
|
|
919
920
|
className: T(
|
|
920
921
|
"sortable-group-item",
|
|
921
|
-
|
|
922
|
+
i`
|
|
922
923
|
position: absolute;
|
|
923
924
|
cursor: pointer;
|
|
924
925
|
left: 0.375rem;
|
|
925
926
|
top: 0.375rem;
|
|
926
927
|
width: calc(100% - 0.75rem);
|
|
927
928
|
height: calc(100% - 0.75rem);
|
|
928
|
-
pointer-events: ${
|
|
929
|
+
pointer-events: ${P === null ? "none" : "auto"};
|
|
929
930
|
> * {
|
|
930
931
|
opacity: 0;
|
|
931
932
|
}
|
|
@@ -935,7 +936,7 @@ const Me = be({
|
|
|
935
936
|
animation: 150,
|
|
936
937
|
fallbackOnBody: !0,
|
|
937
938
|
list: u ?? [],
|
|
938
|
-
setList: (
|
|
939
|
+
setList: (B) => s(B, t),
|
|
939
940
|
filter: () => !0,
|
|
940
941
|
"data-id": e.id,
|
|
941
942
|
onChange: () => {
|
|
@@ -952,16 +953,16 @@ const Me = be({
|
|
|
952
953
|
b.p,
|
|
953
954
|
{
|
|
954
955
|
className: T(
|
|
955
|
-
|
|
956
|
+
i`
|
|
956
957
|
text-align: center;
|
|
957
958
|
margin-top: 0.25rem;
|
|
958
959
|
margin-bottom: 0;
|
|
959
960
|
color: ${h.itemNameColor};
|
|
960
961
|
@media (prefers-color-scheme: dark) {
|
|
961
|
-
color: ${
|
|
962
|
+
color: ${R.itemNameColor};
|
|
962
963
|
}
|
|
963
964
|
`,
|
|
964
|
-
c &&
|
|
965
|
+
c && i`
|
|
965
966
|
color: transparent;
|
|
966
967
|
`
|
|
967
968
|
),
|
|
@@ -973,7 +974,7 @@ const Me = be({
|
|
|
973
974
|
]
|
|
974
975
|
}
|
|
975
976
|
);
|
|
976
|
-
}, Se =
|
|
977
|
+
}, Se = i`
|
|
977
978
|
padding: 8px;
|
|
978
979
|
transition: all 0.2s;
|
|
979
980
|
> div {
|
|
@@ -985,20 +986,20 @@ const Me = be({
|
|
|
985
986
|
transition: all 0.2s;
|
|
986
987
|
}
|
|
987
988
|
}
|
|
988
|
-
`,
|
|
989
|
+
`, Zo = (a) => {
|
|
989
990
|
const { data: e, onClose: r, onItemClick: t } = a, {
|
|
990
|
-
list:
|
|
991
|
+
list: l,
|
|
991
992
|
setList: n,
|
|
992
993
|
setListStatus: c,
|
|
993
994
|
setMoveItemId: p,
|
|
994
995
|
setMoveTargetId: s,
|
|
995
|
-
updateItem:
|
|
996
|
-
} = Z(), { theme:
|
|
996
|
+
updateItem: x
|
|
997
|
+
} = Z(), { theme: y } = K(), { light: $, dark: N } = Y.getTheme(y), [A, P] = X("文件夹"), g = [...(e == null ? void 0 : e.children) ?? []];
|
|
997
998
|
return oe(() => {
|
|
998
999
|
var d;
|
|
999
|
-
e &&
|
|
1000
|
+
e && P((d = e.data) == null ? void 0 : d.name);
|
|
1000
1001
|
}, [e]), /* @__PURE__ */ o(
|
|
1001
|
-
|
|
1002
|
+
ve,
|
|
1002
1003
|
{
|
|
1003
1004
|
visible: !!e,
|
|
1004
1005
|
onClose: () => {
|
|
@@ -1013,7 +1014,7 @@ const Me = be({
|
|
|
1013
1014
|
title: /* @__PURE__ */ o(
|
|
1014
1015
|
"input",
|
|
1015
1016
|
{
|
|
1016
|
-
className:
|
|
1017
|
+
className: i`
|
|
1017
1018
|
background-color: transparent;
|
|
1018
1019
|
border-style: none;
|
|
1019
1020
|
text-align: center;
|
|
@@ -1029,10 +1030,10 @@ const Me = be({
|
|
|
1029
1030
|
`,
|
|
1030
1031
|
value: A,
|
|
1031
1032
|
onChange: (d) => {
|
|
1032
|
-
|
|
1033
|
+
P(d.target.value);
|
|
1033
1034
|
},
|
|
1034
1035
|
onBlur: () => {
|
|
1035
|
-
e &&
|
|
1036
|
+
e && x(e.id, {
|
|
1036
1037
|
...e.data,
|
|
1037
1038
|
name: A
|
|
1038
1039
|
});
|
|
@@ -1043,7 +1044,7 @@ const Me = be({
|
|
|
1043
1044
|
closable: !1,
|
|
1044
1045
|
className: T(
|
|
1045
1046
|
"group-item-modal",
|
|
1046
|
-
|
|
1047
|
+
i`
|
|
1047
1048
|
.rc-dialog-content {
|
|
1048
1049
|
background-color: transparent;
|
|
1049
1050
|
box-shadow: none;
|
|
@@ -1058,9 +1059,9 @@ const Me = be({
|
|
|
1058
1059
|
}
|
|
1059
1060
|
}
|
|
1060
1061
|
.rc-dialog-body {
|
|
1061
|
-
background-color: ${
|
|
1062
|
+
background-color: ${$.groupItemModalBackgroundColor};
|
|
1062
1063
|
@media (prefers-color-scheme: dark) {
|
|
1063
|
-
background-color: ${
|
|
1064
|
+
background-color: ${N.groupItemModalBackgroundColor};
|
|
1064
1065
|
}
|
|
1065
1066
|
border-radius: 0.5rem;
|
|
1066
1067
|
overflow: hidden;
|
|
@@ -1073,7 +1074,7 @@ const Me = be({
|
|
|
1073
1074
|
children: /* @__PURE__ */ o(
|
|
1074
1075
|
"div",
|
|
1075
1076
|
{
|
|
1076
|
-
className:
|
|
1077
|
+
className: i`
|
|
1077
1078
|
overflow-y: auto;
|
|
1078
1079
|
max-height: 60vh;
|
|
1079
1080
|
padding: 1.25rem 0;
|
|
@@ -1087,7 +1088,7 @@ const Me = be({
|
|
|
1087
1088
|
children: /* @__PURE__ */ o(
|
|
1088
1089
|
ge,
|
|
1089
1090
|
{
|
|
1090
|
-
className:
|
|
1091
|
+
className: i`
|
|
1091
1092
|
display: grid;
|
|
1092
1093
|
gap: 1rem;
|
|
1093
1094
|
place-items: center;
|
|
@@ -1100,8 +1101,8 @@ const Me = be({
|
|
|
1100
1101
|
fallbackOnBody: !0,
|
|
1101
1102
|
list: (e == null ? void 0 : e.children) ?? [],
|
|
1102
1103
|
setList: (d) => {
|
|
1103
|
-
var
|
|
1104
|
-
const w = d.map((I) => I.id), h = (u = (
|
|
1104
|
+
var R, u;
|
|
1105
|
+
const w = d.map((I) => I.id), h = (u = (R = l.find((I) => I.id === (e == null ? void 0 : e.id))) == null ? void 0 : R.children) == null ? void 0 : u.map((I) => I.id);
|
|
1105
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]);
|
|
1106
1107
|
},
|
|
1107
1108
|
onMove: () => (s(null), c("onMove"), !0),
|
|
@@ -1128,11 +1129,11 @@ const Me = be({
|
|
|
1128
1129
|
)
|
|
1129
1130
|
}
|
|
1130
1131
|
);
|
|
1131
|
-
},
|
|
1132
|
+
}, Qo = (a) => {
|
|
1132
1133
|
var t;
|
|
1133
1134
|
const { data: e, onClose: r } = a;
|
|
1134
1135
|
return /* @__PURE__ */ o(
|
|
1135
|
-
|
|
1136
|
+
ve,
|
|
1136
1137
|
{
|
|
1137
1138
|
visible: !!e,
|
|
1138
1139
|
onClose: () => {
|
|
@@ -1148,30 +1149,30 @@ const Me = be({
|
|
|
1148
1149
|
title: ((t = e == null ? void 0 : e.data) == null ? void 0 : t.name) ?? "信息",
|
|
1149
1150
|
children: e && /* @__PURE__ */ G("div", { children: [
|
|
1150
1151
|
/* @__PURE__ */ o("div", { className: "mb-2", children: "开发者信息" }),
|
|
1151
|
-
/* @__PURE__ */ o("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ o(
|
|
1152
|
+
/* @__PURE__ */ o("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ o(lo, { src: e, theme: "monokai" }) })
|
|
1152
1153
|
] })
|
|
1153
1154
|
}
|
|
1154
1155
|
);
|
|
1155
|
-
},
|
|
1156
|
+
}, et = (a) => {
|
|
1156
1157
|
const {
|
|
1157
1158
|
pagination: e = { position: "bottom" },
|
|
1158
1159
|
className: r,
|
|
1159
1160
|
sliderProps: t,
|
|
1160
|
-
sliderRef:
|
|
1161
|
+
sliderRef: l,
|
|
1161
1162
|
onItemClick: n
|
|
1162
1163
|
} = a, c = te(null), p = te(null), {
|
|
1163
1164
|
list: s,
|
|
1164
|
-
setList:
|
|
1165
|
-
setListStatus:
|
|
1166
|
-
showInfoItemData:
|
|
1167
|
-
setShowInfoItemData:
|
|
1165
|
+
setList: x,
|
|
1166
|
+
setListStatus: y,
|
|
1167
|
+
showInfoItemData: $,
|
|
1168
|
+
setShowInfoItemData: N,
|
|
1168
1169
|
openGroupItemData: A,
|
|
1169
|
-
setOpenGroupItemData:
|
|
1170
|
+
setOpenGroupItemData: P,
|
|
1170
1171
|
setMoveItemId: g,
|
|
1171
1172
|
setMoveTargetId: d,
|
|
1172
1173
|
addItem: w
|
|
1173
|
-
} = Z(), { pagingDotBuilder: h, pagingDotsBuilder:
|
|
1174
|
-
top:
|
|
1174
|
+
} = Z(), { pagingDotBuilder: h, pagingDotsBuilder: R, itemBuilder: u } = K(), I = ae(() => e === !1 ? {} : {
|
|
1175
|
+
top: i`
|
|
1175
1176
|
display: flex;
|
|
1176
1177
|
flex-direction: column;
|
|
1177
1178
|
.slick-list {
|
|
@@ -1181,12 +1182,12 @@ const Me = be({
|
|
|
1181
1182
|
position: static;
|
|
1182
1183
|
}
|
|
1183
1184
|
`,
|
|
1184
|
-
bottom:
|
|
1185
|
+
bottom: i`
|
|
1185
1186
|
.slick-dots {
|
|
1186
1187
|
position: static;
|
|
1187
1188
|
}
|
|
1188
1189
|
`,
|
|
1189
|
-
left:
|
|
1190
|
+
left: i`
|
|
1190
1191
|
.slick-dots {
|
|
1191
1192
|
position: absolute;
|
|
1192
1193
|
width: auto;
|
|
@@ -1202,7 +1203,7 @@ const Me = be({
|
|
|
1202
1203
|
}
|
|
1203
1204
|
}
|
|
1204
1205
|
`,
|
|
1205
|
-
right:
|
|
1206
|
+
right: i`
|
|
1206
1207
|
.slick-dots {
|
|
1207
1208
|
position: absolute;
|
|
1208
1209
|
width: auto;
|
|
@@ -1221,19 +1222,19 @@ const Me = be({
|
|
|
1221
1222
|
}[e.position ?? "bottom"], [e]);
|
|
1222
1223
|
return /* @__PURE__ */ G(de, { children: [
|
|
1223
1224
|
/* @__PURE__ */ o(
|
|
1224
|
-
|
|
1225
|
+
Fe,
|
|
1225
1226
|
{
|
|
1226
1227
|
useCSS: !0,
|
|
1227
1228
|
useTransform: !0,
|
|
1228
1229
|
arrows: !1,
|
|
1229
|
-
ref:
|
|
1230
|
+
ref: l ?? c,
|
|
1230
1231
|
infinite: !1,
|
|
1231
1232
|
dots: !0,
|
|
1232
1233
|
touchMove: !1,
|
|
1233
1234
|
lazyLoad: "anticipated",
|
|
1234
1235
|
className: T(
|
|
1235
1236
|
I,
|
|
1236
|
-
|
|
1237
|
+
i`
|
|
1237
1238
|
.slick-track {
|
|
1238
1239
|
display: flex;
|
|
1239
1240
|
align-items: stretch;
|
|
@@ -1258,19 +1259,19 @@ const Me = be({
|
|
|
1258
1259
|
{
|
|
1259
1260
|
onDragEnter: () => {
|
|
1260
1261
|
var E;
|
|
1261
|
-
(E = (
|
|
1262
|
+
(E = (l ?? c).current) == null || E.slickGoTo(C);
|
|
1262
1263
|
},
|
|
1263
1264
|
children: (f = (m = s[C]) == null ? void 0 : m.data) == null ? void 0 : f.name
|
|
1264
1265
|
}
|
|
1265
1266
|
);
|
|
1266
1267
|
},
|
|
1267
|
-
appendDots: (C) =>
|
|
1268
|
+
appendDots: (C) => R ? R(C) : e === !1 ? /* @__PURE__ */ o("div", {}) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
1268
1269
|
"ul",
|
|
1269
1270
|
{
|
|
1270
1271
|
ref: p,
|
|
1271
1272
|
className: T(
|
|
1272
1273
|
"slick-dots-default",
|
|
1273
|
-
|
|
1274
|
+
i`
|
|
1274
1275
|
padding: 0.5rem;
|
|
1275
1276
|
display: inline-flex;
|
|
1276
1277
|
justify-content: center;
|
|
@@ -1315,7 +1316,7 @@ const Me = be({
|
|
|
1315
1316
|
ge,
|
|
1316
1317
|
{
|
|
1317
1318
|
className: T(
|
|
1318
|
-
|
|
1319
|
+
i`
|
|
1319
1320
|
display: grid;
|
|
1320
1321
|
transition: all 0.3s;
|
|
1321
1322
|
grid-template-columns: repeat(auto-fill, 96px);
|
|
@@ -1331,19 +1332,19 @@ const Me = be({
|
|
|
1331
1332
|
swapThreshold: 0.65,
|
|
1332
1333
|
group: "nested",
|
|
1333
1334
|
list: C.children ?? [],
|
|
1334
|
-
setList: (m) =>
|
|
1335
|
+
setList: (m) => x(m, [C.id]),
|
|
1335
1336
|
filter: ".drag-disabled",
|
|
1336
1337
|
onMove: (m) => {
|
|
1337
|
-
|
|
1338
|
+
y("onMove");
|
|
1338
1339
|
const { dragged: f, related: E } = m, V = f.dataset, j = E.dataset;
|
|
1339
1340
|
return d(null), !((Object.keys(j).length === 0 || j.parentIds) && Number(V.childrenLength) > 0 && E.classList.contains("sortable-group-item"));
|
|
1340
1341
|
},
|
|
1341
1342
|
onStart: (m) => {
|
|
1342
1343
|
const f = m.item.dataset;
|
|
1343
|
-
f != null && f.id && g(f.id),
|
|
1344
|
+
f != null && f.id && g(f.id), y("onMove");
|
|
1344
1345
|
},
|
|
1345
1346
|
onEnd: () => {
|
|
1346
|
-
g(null), d(null),
|
|
1347
|
+
g(null), d(null), y(null);
|
|
1347
1348
|
},
|
|
1348
1349
|
ghostClass: Se,
|
|
1349
1350
|
children: (C.children ?? []).map((m, f) => {
|
|
@@ -1354,7 +1355,7 @@ const Me = be({
|
|
|
1354
1355
|
case "group":
|
|
1355
1356
|
case "app":
|
|
1356
1357
|
E = /* @__PURE__ */ o(
|
|
1357
|
-
|
|
1358
|
+
Ko,
|
|
1358
1359
|
{
|
|
1359
1360
|
data: m,
|
|
1360
1361
|
itemIndex: f,
|
|
@@ -1386,57 +1387,57 @@ const Me = be({
|
|
|
1386
1387
|
}
|
|
1387
1388
|
),
|
|
1388
1389
|
/* @__PURE__ */ o(
|
|
1389
|
-
|
|
1390
|
+
Qo,
|
|
1390
1391
|
{
|
|
1391
|
-
data:
|
|
1392
|
+
data: $,
|
|
1392
1393
|
onClose: () => {
|
|
1393
|
-
|
|
1394
|
+
N(null);
|
|
1394
1395
|
}
|
|
1395
1396
|
}
|
|
1396
1397
|
),
|
|
1397
1398
|
/* @__PURE__ */ o(
|
|
1398
|
-
|
|
1399
|
+
Zo,
|
|
1399
1400
|
{
|
|
1400
1401
|
data: A,
|
|
1401
1402
|
onClose: () => {
|
|
1402
|
-
|
|
1403
|
+
P(null);
|
|
1403
1404
|
},
|
|
1404
1405
|
onItemClick: n
|
|
1405
1406
|
}
|
|
1406
1407
|
)
|
|
1407
1408
|
] });
|
|
1408
|
-
},
|
|
1409
|
+
}, Pt = (a) => {
|
|
1409
1410
|
const {
|
|
1410
1411
|
list: e,
|
|
1411
1412
|
onChange: r,
|
|
1412
1413
|
storageKey: t,
|
|
1413
|
-
enableCaching:
|
|
1414
|
+
enableCaching: l,
|
|
1414
1415
|
theme: n,
|
|
1415
1416
|
noLetters: c,
|
|
1416
1417
|
contextMenu: p,
|
|
1417
1418
|
contextMenuBuilder: s,
|
|
1418
|
-
itemBuilder:
|
|
1419
|
-
itemIconBuilder:
|
|
1420
|
-
pagingDotBuilder:
|
|
1421
|
-
pagingDotsBuilder:
|
|
1419
|
+
itemBuilder: x,
|
|
1420
|
+
itemIconBuilder: y,
|
|
1421
|
+
pagingDotBuilder: $,
|
|
1422
|
+
pagingDotsBuilder: N,
|
|
1422
1423
|
...A
|
|
1423
1424
|
} = a;
|
|
1424
|
-
return /* @__PURE__ */ o(
|
|
1425
|
+
return /* @__PURE__ */ o(Vo, { ...{
|
|
1425
1426
|
list: e,
|
|
1426
1427
|
onChange: r,
|
|
1427
1428
|
storageKey: t,
|
|
1428
|
-
enableCaching:
|
|
1429
|
-
}, children: /* @__PURE__ */ o(
|
|
1429
|
+
enableCaching: l
|
|
1430
|
+
}, children: /* @__PURE__ */ o(Oo, { ...{
|
|
1430
1431
|
theme: n,
|
|
1431
1432
|
noLetters: c,
|
|
1432
1433
|
contextMenu: p,
|
|
1433
|
-
pagingDotsBuilder:
|
|
1434
|
-
pagingDotBuilder:
|
|
1435
|
-
itemBuilder:
|
|
1436
|
-
itemIconBuilder:
|
|
1434
|
+
pagingDotsBuilder: N,
|
|
1435
|
+
pagingDotBuilder: $,
|
|
1436
|
+
itemBuilder: x,
|
|
1437
|
+
itemIconBuilder: y,
|
|
1437
1438
|
contextMenuBuilder: s
|
|
1438
|
-
}, children: /* @__PURE__ */ o(
|
|
1439
|
-
},
|
|
1439
|
+
}, children: /* @__PURE__ */ o(et, { ...A }) }) });
|
|
1440
|
+
}, ot = {
|
|
1440
1441
|
frontmatterEditor: {
|
|
1441
1442
|
title: "编辑前置元数据",
|
|
1442
1443
|
key: "键",
|
|
@@ -1553,13 +1554,13 @@ const Me = be({
|
|
|
1553
1554
|
image: {
|
|
1554
1555
|
delete: "删除图片"
|
|
1555
1556
|
}
|
|
1556
|
-
},
|
|
1557
|
-
const
|
|
1557
|
+
}, tt = (a, e, r) => {
|
|
1558
|
+
const l = a.split(".").reduce(
|
|
1558
1559
|
(n, c) => typeof n == "string" ? n : n[c],
|
|
1559
|
-
|
|
1560
|
+
ot
|
|
1560
1561
|
);
|
|
1561
|
-
return typeof
|
|
1562
|
-
},
|
|
1562
|
+
return typeof l != "string" ? e : r ? l.replace(/{{(.*?)}}/g, (n, c) => r[c]) : l;
|
|
1563
|
+
}, rt = i`
|
|
1563
1564
|
--accentBase: var(--tomato-1);
|
|
1564
1565
|
--accentBgSubtle: var(--tomato-2);
|
|
1565
1566
|
--accentBg: var(--tomato-3);
|
|
@@ -1613,7 +1614,7 @@ const Me = be({
|
|
|
1613
1614
|
rgba(255, 255, 255, 0.05),
|
|
1614
1615
|
rgba(255, 255, 255, 0.05)
|
|
1615
1616
|
);
|
|
1616
|
-
`,
|
|
1617
|
+
`, nt = i`
|
|
1617
1618
|
[class*="_toolbarRoot"] {
|
|
1618
1619
|
flex-wrap: wrap;
|
|
1619
1620
|
transition: all 0.3s;
|
|
@@ -1685,7 +1686,7 @@ const Me = be({
|
|
|
1685
1686
|
}
|
|
1686
1687
|
`, Te = T(
|
|
1687
1688
|
"markdown-body",
|
|
1688
|
-
|
|
1689
|
+
i`
|
|
1689
1690
|
p {
|
|
1690
1691
|
margin-bottom: 8px;
|
|
1691
1692
|
}
|
|
@@ -1706,7 +1707,7 @@ const Me = be({
|
|
|
1706
1707
|
}
|
|
1707
1708
|
}
|
|
1708
1709
|
`
|
|
1709
|
-
),
|
|
1710
|
+
), Ne = i`
|
|
1710
1711
|
.markdown-body {
|
|
1711
1712
|
/* light */
|
|
1712
1713
|
color-scheme: light;
|
|
@@ -1761,7 +1762,7 @@ const Me = be({
|
|
|
1761
1762
|
--color-prettylights-syntax-meta-diff-range: #8250df;
|
|
1762
1763
|
--color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
|
|
1763
1764
|
}
|
|
1764
|
-
`,
|
|
1765
|
+
`, Be = i`
|
|
1765
1766
|
.markdown-body {
|
|
1766
1767
|
/* dark */
|
|
1767
1768
|
color-scheme: dark;
|
|
@@ -1816,7 +1817,100 @@ const Me = be({
|
|
|
1816
1817
|
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
|
|
1817
1818
|
--color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;
|
|
1818
1819
|
}
|
|
1819
|
-
`,
|
|
1820
|
+
`, ce = (a) => {
|
|
1821
|
+
var e, r;
|
|
1822
|
+
return a === "dark" ? !0 : a === "light" ? !1 : (e = document.documentElement.getAttribute("style")) != null && e.includes("color-scheme: dark;") ? !0 : (r = document.documentElement.getAttribute("style")) != null && r.includes("color-scheme: light;") ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1823
|
+
}, at = (a) => {
|
|
1824
|
+
const {
|
|
1825
|
+
value: e,
|
|
1826
|
+
onChange: r,
|
|
1827
|
+
translation: t,
|
|
1828
|
+
pluginConfig: l,
|
|
1829
|
+
className: n,
|
|
1830
|
+
theme: c = "auto",
|
|
1831
|
+
...p
|
|
1832
|
+
} = a, s = te(null), {
|
|
1833
|
+
image: x,
|
|
1834
|
+
diffSource: y = {
|
|
1835
|
+
viewMode: "rich-text"
|
|
1836
|
+
},
|
|
1837
|
+
headings: $,
|
|
1838
|
+
link: N,
|
|
1839
|
+
codeBlock: A,
|
|
1840
|
+
codeMirror: P = {
|
|
1841
|
+
codeBlockLanguages: {
|
|
1842
|
+
js: "JavaScript",
|
|
1843
|
+
css: "CSS",
|
|
1844
|
+
txt: "Plain Text",
|
|
1845
|
+
tsx: "TypeScript",
|
|
1846
|
+
"": "Unspecified"
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
directives: g = {
|
|
1850
|
+
directiveDescriptors: [Ao]
|
|
1851
|
+
}
|
|
1852
|
+
} = l ?? {}, [d, w] = X("");
|
|
1853
|
+
return oe(() => {
|
|
1854
|
+
var h;
|
|
1855
|
+
e !== void 0 && s.current && ((h = s.current) == null || h.setMarkdown(e), w(e));
|
|
1856
|
+
}, [e, s]), /* @__PURE__ */ o(
|
|
1857
|
+
io,
|
|
1858
|
+
{
|
|
1859
|
+
ref: s,
|
|
1860
|
+
className: T(
|
|
1861
|
+
nt,
|
|
1862
|
+
ce(c) ? rt : "",
|
|
1863
|
+
ce(c) ? Be : Ne,
|
|
1864
|
+
n
|
|
1865
|
+
),
|
|
1866
|
+
contentEditableClassName: Te,
|
|
1867
|
+
markdown: d,
|
|
1868
|
+
onChange: (h) => {
|
|
1869
|
+
!e && !r && w(h), r && r(h);
|
|
1870
|
+
},
|
|
1871
|
+
translation: t ?? tt,
|
|
1872
|
+
plugins: [
|
|
1873
|
+
so({
|
|
1874
|
+
toolbarContents: () => /* @__PURE__ */ G(co, { options: ["rich-text", "source"], children: [
|
|
1875
|
+
/* @__PURE__ */ o(go, {}),
|
|
1876
|
+
/* @__PURE__ */ o(J, {}),
|
|
1877
|
+
/* @__PURE__ */ o(uo, {}),
|
|
1878
|
+
/* @__PURE__ */ o(mo, {}),
|
|
1879
|
+
/* @__PURE__ */ o(J, {}),
|
|
1880
|
+
/* @__PURE__ */ o(po, {}),
|
|
1881
|
+
/* @__PURE__ */ o(J, {}),
|
|
1882
|
+
/* @__PURE__ */ o(ho, {}),
|
|
1883
|
+
/* @__PURE__ */ o(J, {}),
|
|
1884
|
+
/* @__PURE__ */ o(fo, {}),
|
|
1885
|
+
/* @__PURE__ */ o(bo, {}),
|
|
1886
|
+
/* @__PURE__ */ o(J, {}),
|
|
1887
|
+
/* @__PURE__ */ o(ko, {}),
|
|
1888
|
+
/* @__PURE__ */ o(vo, {}),
|
|
1889
|
+
/* @__PURE__ */ o(J, {}),
|
|
1890
|
+
/* @__PURE__ */ o(xo, {}),
|
|
1891
|
+
/* @__PURE__ */ o(J, {}),
|
|
1892
|
+
/* @__PURE__ */ o(yo, {})
|
|
1893
|
+
] })
|
|
1894
|
+
}),
|
|
1895
|
+
wo(y),
|
|
1896
|
+
Co(),
|
|
1897
|
+
Io(),
|
|
1898
|
+
Mo($),
|
|
1899
|
+
So(N),
|
|
1900
|
+
To(),
|
|
1901
|
+
No(x),
|
|
1902
|
+
Bo(),
|
|
1903
|
+
Do(),
|
|
1904
|
+
Ro(),
|
|
1905
|
+
Lo(A),
|
|
1906
|
+
$o(P),
|
|
1907
|
+
Po(),
|
|
1908
|
+
zo(g)
|
|
1909
|
+
],
|
|
1910
|
+
...p
|
|
1911
|
+
}
|
|
1912
|
+
);
|
|
1913
|
+
}, lt = {
|
|
1820
1914
|
'code[class*="language-"]': {
|
|
1821
1915
|
background: "hsl(230, 1%, 98%)",
|
|
1822
1916
|
color: "hsl(230, 8%, 24%)",
|
|
@@ -2304,34 +2398,60 @@ const Me = be({
|
|
|
2304
2398
|
".prism-previewer-easing.prism-previewer-easing line": {
|
|
2305
2399
|
stroke: "hsl(230, 8%, 24%)"
|
|
2306
2400
|
}
|
|
2307
|
-
},
|
|
2308
|
-
var e, r;
|
|
2309
|
-
return a === "dark" ? !0 : a === "light" ? !1 : (e = document.documentElement.getAttribute("style")) != null && e.includes("color-scheme: dark;") ? !0 : (r = document.documentElement.getAttribute("style")) != null && r.includes("color-scheme: light;") ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2310
|
-
}, Jo = (a) => {
|
|
2401
|
+
}, it = (a) => {
|
|
2311
2402
|
const { children: e = "", className: r, theme: t = "auto" } = a;
|
|
2312
2403
|
return /* @__PURE__ */ o(
|
|
2313
2404
|
"div",
|
|
2314
2405
|
{
|
|
2315
|
-
className: ce(t) ?
|
|
2406
|
+
className: ce(t) ? Be : Ne,
|
|
2316
2407
|
children: /* @__PURE__ */ o(
|
|
2317
|
-
|
|
2408
|
+
Eo,
|
|
2318
2409
|
{
|
|
2319
2410
|
className: T(Te, r),
|
|
2320
|
-
remarkPlugins: [
|
|
2321
|
-
rehypePlugins: [
|
|
2411
|
+
remarkPlugins: [jo, Ho],
|
|
2412
|
+
rehypePlugins: [Xo],
|
|
2322
2413
|
components: {
|
|
2323
|
-
code(
|
|
2324
|
-
const { children: n, className: c, node: p, ref: s, ...
|
|
2325
|
-
return
|
|
2326
|
-
|
|
2414
|
+
code(l) {
|
|
2415
|
+
const { children: n, className: c, node: p, ref: s, ...x } = l, y = /language-(\w+)/.exec(c || "");
|
|
2416
|
+
return y ? /* @__PURE__ */ o(
|
|
2417
|
+
Fo,
|
|
2327
2418
|
{
|
|
2328
|
-
...
|
|
2419
|
+
...x,
|
|
2329
2420
|
PreTag: "div",
|
|
2330
2421
|
children: String(n).replace(/\n$/, ""),
|
|
2331
|
-
language:
|
|
2332
|
-
style:
|
|
2422
|
+
language: y[1],
|
|
2423
|
+
style: lt
|
|
2333
2424
|
}
|
|
2334
|
-
) : /* @__PURE__ */ o("code", { ...
|
|
2425
|
+
) : /* @__PURE__ */ o("code", { ...x, className: c, children: n });
|
|
2426
|
+
},
|
|
2427
|
+
img(l) {
|
|
2428
|
+
return console.log("🚀 ~ image ~ props:", l), /* @__PURE__ */ o(
|
|
2429
|
+
Go,
|
|
2430
|
+
{
|
|
2431
|
+
...l,
|
|
2432
|
+
preview: {
|
|
2433
|
+
icons: {
|
|
2434
|
+
rotateLeft: /* @__PURE__ */ o(Je, {}),
|
|
2435
|
+
rotateRight: /* @__PURE__ */ o(Ke, {}),
|
|
2436
|
+
zoomIn: /* @__PURE__ */ o(Ze, {}),
|
|
2437
|
+
zoomOut: /* @__PURE__ */ o(Qe, {}),
|
|
2438
|
+
close: /* @__PURE__ */ o(eo, {}),
|
|
2439
|
+
left: /* @__PURE__ */ o(oo, {}),
|
|
2440
|
+
right: /* @__PURE__ */ o(to, {}),
|
|
2441
|
+
flipX: /* @__PURE__ */ o(ro, {}),
|
|
2442
|
+
flipY: /* @__PURE__ */ o(no, {})
|
|
2443
|
+
},
|
|
2444
|
+
onVisibleChange: (n) => {
|
|
2445
|
+
console.log("visible", n);
|
|
2446
|
+
},
|
|
2447
|
+
zIndex: 9999,
|
|
2448
|
+
mask: ""
|
|
2449
|
+
},
|
|
2450
|
+
className: i`
|
|
2451
|
+
cursor: zoom-in;
|
|
2452
|
+
`
|
|
2453
|
+
}
|
|
2454
|
+
);
|
|
2335
2455
|
}
|
|
2336
2456
|
},
|
|
2337
2457
|
children: e
|
|
@@ -2339,136 +2459,46 @@ const Me = be({
|
|
|
2339
2459
|
)
|
|
2340
2460
|
}
|
|
2341
2461
|
);
|
|
2342
|
-
},
|
|
2343
|
-
|
|
2344
|
-
value: e,
|
|
2345
|
-
onChange: r,
|
|
2346
|
-
translation: t,
|
|
2347
|
-
pluginConfig: i,
|
|
2348
|
-
className: n,
|
|
2349
|
-
theme: c = "auto",
|
|
2350
|
-
...p
|
|
2351
|
-
} = a, s = te(null), {
|
|
2352
|
-
image: v,
|
|
2353
|
-
diffSource: x = {
|
|
2354
|
-
viewMode: "rich-text"
|
|
2355
|
-
},
|
|
2356
|
-
headings: R,
|
|
2357
|
-
link: B,
|
|
2358
|
-
codeBlock: A,
|
|
2359
|
-
codeMirror: L = {
|
|
2360
|
-
codeBlockLanguages: {
|
|
2361
|
-
js: "JavaScript",
|
|
2362
|
-
css: "CSS",
|
|
2363
|
-
txt: "Plain Text",
|
|
2364
|
-
tsx: "TypeScript",
|
|
2365
|
-
"": "Unspecified"
|
|
2366
|
-
}
|
|
2367
|
-
},
|
|
2368
|
-
directives: g = {
|
|
2369
|
-
directiveDescriptors: [To]
|
|
2370
|
-
}
|
|
2371
|
-
} = i ?? {}, [d, w] = F("");
|
|
2372
|
-
return oe(() => {
|
|
2373
|
-
var h;
|
|
2374
|
-
e !== void 0 && s.current && ((h = s.current) == null || h.setMarkdown(e), w(e));
|
|
2375
|
-
}, [e, s]), /* @__PURE__ */ o(
|
|
2376
|
-
Ze,
|
|
2377
|
-
{
|
|
2378
|
-
ref: s,
|
|
2379
|
-
className: T(
|
|
2380
|
-
_o,
|
|
2381
|
-
ce(c) ? Vo : "",
|
|
2382
|
-
ce(c) ? Ne : Be,
|
|
2383
|
-
n
|
|
2384
|
-
),
|
|
2385
|
-
contentEditableClassName: Te,
|
|
2386
|
-
markdown: d,
|
|
2387
|
-
onChange: (h) => {
|
|
2388
|
-
!e && !r && w(h), r && r(h);
|
|
2389
|
-
},
|
|
2390
|
-
translation: t ?? Uo,
|
|
2391
|
-
plugins: [
|
|
2392
|
-
Qe({
|
|
2393
|
-
toolbarContents: () => /* @__PURE__ */ G(eo, { options: ["rich-text", "source"], children: [
|
|
2394
|
-
/* @__PURE__ */ o(oo, {}),
|
|
2395
|
-
/* @__PURE__ */ o(J, {}),
|
|
2396
|
-
/* @__PURE__ */ o(to, {}),
|
|
2397
|
-
/* @__PURE__ */ o(ro, {}),
|
|
2398
|
-
/* @__PURE__ */ o(J, {}),
|
|
2399
|
-
/* @__PURE__ */ o(no, {}),
|
|
2400
|
-
/* @__PURE__ */ o(J, {}),
|
|
2401
|
-
/* @__PURE__ */ o(ao, {}),
|
|
2402
|
-
/* @__PURE__ */ o(J, {}),
|
|
2403
|
-
/* @__PURE__ */ o(lo, {}),
|
|
2404
|
-
/* @__PURE__ */ o(io, {}),
|
|
2405
|
-
/* @__PURE__ */ o(J, {}),
|
|
2406
|
-
/* @__PURE__ */ o(so, {}),
|
|
2407
|
-
/* @__PURE__ */ o(co, {}),
|
|
2408
|
-
/* @__PURE__ */ o(J, {}),
|
|
2409
|
-
/* @__PURE__ */ o(go, {}),
|
|
2410
|
-
/* @__PURE__ */ o(J, {}),
|
|
2411
|
-
/* @__PURE__ */ o(uo, {})
|
|
2412
|
-
] })
|
|
2413
|
-
}),
|
|
2414
|
-
mo(x),
|
|
2415
|
-
po(),
|
|
2416
|
-
ho(),
|
|
2417
|
-
fo(R),
|
|
2418
|
-
bo(B),
|
|
2419
|
-
ko(),
|
|
2420
|
-
yo(v),
|
|
2421
|
-
vo(),
|
|
2422
|
-
xo(),
|
|
2423
|
-
wo(),
|
|
2424
|
-
Co(A),
|
|
2425
|
-
Io(L),
|
|
2426
|
-
Mo(),
|
|
2427
|
-
So(g)
|
|
2428
|
-
],
|
|
2429
|
-
...p
|
|
2430
|
-
}
|
|
2431
|
-
);
|
|
2432
|
-
}, Zo = Ko;
|
|
2433
|
-
Zo.Preview = Jo;
|
|
2462
|
+
}, st = at;
|
|
2463
|
+
st.Preview = it;
|
|
2434
2464
|
function De(...a) {
|
|
2435
|
-
return
|
|
2465
|
+
return qo(Yo(a));
|
|
2436
2466
|
}
|
|
2437
|
-
const
|
|
2438
|
-
const { mouseX: e, title: r, icon: t, href:
|
|
2439
|
-
var
|
|
2440
|
-
const h = ((
|
|
2467
|
+
const ct = (a) => {
|
|
2468
|
+
const { mouseX: e, title: r, icon: t, href: l } = a, n = te(null), c = ee(e, (w) => {
|
|
2469
|
+
var R;
|
|
2470
|
+
const h = ((R = n.current) == null ? void 0 : R.getBoundingClientRect()) ?? { x: 0, width: 0 };
|
|
2441
2471
|
return w - h.x - h.width / 2;
|
|
2442
|
-
}), p = ee(c, [-150, 0, 150], [40, 80, 40]), s = ee(c, [-150, 0, 150], [40, 80, 40]),
|
|
2472
|
+
}), p = ee(c, [-150, 0, 150], [40, 80, 40]), s = ee(c, [-150, 0, 150], [40, 80, 40]), x = ee(
|
|
2443
2473
|
c,
|
|
2444
2474
|
[-150, 0, 150],
|
|
2445
2475
|
[20, 40, 20]
|
|
2446
|
-
),
|
|
2476
|
+
), y = ee(
|
|
2447
2477
|
c,
|
|
2448
2478
|
[-150, 0, 150],
|
|
2449
2479
|
[20, 40, 20]
|
|
2450
|
-
),
|
|
2480
|
+
), $ = ne(p, {
|
|
2451
2481
|
mass: 0.1,
|
|
2452
2482
|
stiffness: 150,
|
|
2453
2483
|
damping: 12
|
|
2454
|
-
}),
|
|
2484
|
+
}), N = ne(s, {
|
|
2455
2485
|
mass: 0.1,
|
|
2456
2486
|
stiffness: 150,
|
|
2457
2487
|
damping: 12
|
|
2458
|
-
}), A = ne(
|
|
2488
|
+
}), A = ne(x, {
|
|
2459
2489
|
mass: 0.1,
|
|
2460
2490
|
stiffness: 150,
|
|
2461
2491
|
damping: 12
|
|
2462
|
-
}),
|
|
2492
|
+
}), P = ne(y, {
|
|
2463
2493
|
mass: 0.1,
|
|
2464
2494
|
stiffness: 150,
|
|
2465
2495
|
damping: 12
|
|
2466
|
-
}), [g, d] =
|
|
2467
|
-
return /* @__PURE__ */ o("a", { href:
|
|
2496
|
+
}), [g, d] = X(!1);
|
|
2497
|
+
return /* @__PURE__ */ o("a", { href: l, children: /* @__PURE__ */ G(
|
|
2468
2498
|
b.div,
|
|
2469
2499
|
{
|
|
2470
2500
|
ref: n,
|
|
2471
|
-
style: { width:
|
|
2501
|
+
style: { width: $, height: N },
|
|
2472
2502
|
onMouseEnter: () => d(!0),
|
|
2473
2503
|
onMouseLeave: () => d(!1),
|
|
2474
2504
|
className: "aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",
|
|
@@ -2486,7 +2516,7 @@ const Qo = (a) => {
|
|
|
2486
2516
|
/* @__PURE__ */ o(
|
|
2487
2517
|
b.div,
|
|
2488
2518
|
{
|
|
2489
|
-
style: { width: A, height:
|
|
2519
|
+
style: { width: A, height: P },
|
|
2490
2520
|
className: "flex items-center justify-center",
|
|
2491
2521
|
children: t
|
|
2492
2522
|
}
|
|
@@ -2494,22 +2524,22 @@ const Qo = (a) => {
|
|
|
2494
2524
|
]
|
|
2495
2525
|
}
|
|
2496
2526
|
) });
|
|
2497
|
-
},
|
|
2527
|
+
}, Re = (a) => {
|
|
2498
2528
|
const { items: e, className: r } = a, t = Ge(1 / 0);
|
|
2499
2529
|
return /* @__PURE__ */ o(
|
|
2500
2530
|
b.div,
|
|
2501
2531
|
{
|
|
2502
|
-
onMouseMove: (
|
|
2532
|
+
onMouseMove: (l) => t.set(l.pageX),
|
|
2503
2533
|
onMouseLeave: () => t.set(1 / 0),
|
|
2504
2534
|
className: De(
|
|
2505
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",
|
|
2506
2536
|
r
|
|
2507
2537
|
),
|
|
2508
|
-
children: e.map((
|
|
2538
|
+
children: e.map((l) => /* @__PURE__ */ o(ct, { mouseX: t, ...l }, l.title))
|
|
2509
2539
|
}
|
|
2510
2540
|
);
|
|
2511
|
-
},
|
|
2512
|
-
const { items: e, className: r, collapseIcon: t, autoHidden:
|
|
2541
|
+
}, Le = (a) => {
|
|
2542
|
+
const { items: e, className: r, collapseIcon: t, autoHidden: l = !1 } = a, [n, c] = X(!1), p = () => {
|
|
2513
2543
|
c(!n);
|
|
2514
2544
|
};
|
|
2515
2545
|
return /* @__PURE__ */ G(
|
|
@@ -2517,7 +2547,7 @@ const Qo = (a) => {
|
|
|
2517
2547
|
{
|
|
2518
2548
|
className: De(
|
|
2519
2549
|
"relative block",
|
|
2520
|
-
|
|
2550
|
+
l ? "md:hidden" : "",
|
|
2521
2551
|
r
|
|
2522
2552
|
),
|
|
2523
2553
|
children: [
|
|
@@ -2526,7 +2556,7 @@ const Qo = (a) => {
|
|
|
2526
2556
|
{
|
|
2527
2557
|
layoutId: "nav",
|
|
2528
2558
|
className: "absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",
|
|
2529
|
-
children: e.map((s,
|
|
2559
|
+
children: e.map((s, x) => /* @__PURE__ */ o(
|
|
2530
2560
|
b.div,
|
|
2531
2561
|
{
|
|
2532
2562
|
initial: { opacity: 0, y: 10 },
|
|
@@ -2538,10 +2568,10 @@ const Qo = (a) => {
|
|
|
2538
2568
|
opacity: 0,
|
|
2539
2569
|
y: 10,
|
|
2540
2570
|
transition: {
|
|
2541
|
-
delay:
|
|
2571
|
+
delay: x * 0.05
|
|
2542
2572
|
}
|
|
2543
2573
|
},
|
|
2544
|
-
transition: { delay: (e.length - 1 -
|
|
2574
|
+
transition: { delay: (e.length - 1 - x) * 0.05 },
|
|
2545
2575
|
children: /* @__PURE__ */ o(
|
|
2546
2576
|
"a",
|
|
2547
2577
|
{
|
|
@@ -2561,31 +2591,31 @@ const Qo = (a) => {
|
|
|
2561
2591
|
{
|
|
2562
2592
|
onClick: p,
|
|
2563
2593
|
className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",
|
|
2564
|
-
children: t || /* @__PURE__ */ o(
|
|
2594
|
+
children: t || /* @__PURE__ */ o(ao, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
|
|
2565
2595
|
}
|
|
2566
2596
|
)
|
|
2567
2597
|
]
|
|
2568
2598
|
}
|
|
2569
2599
|
);
|
|
2570
|
-
},
|
|
2571
|
-
const { items: e, desktopClassName: r, mobileClassName: t, ...
|
|
2600
|
+
}, dt = (a) => {
|
|
2601
|
+
const { items: e, desktopClassName: r, mobileClassName: t, ...l } = a;
|
|
2572
2602
|
return /* @__PURE__ */ G(de, { children: [
|
|
2573
|
-
/* @__PURE__ */ o(
|
|
2603
|
+
/* @__PURE__ */ o(Re, { items: e, className: r, ...l }),
|
|
2574
2604
|
/* @__PURE__ */ o(
|
|
2575
|
-
|
|
2605
|
+
Le,
|
|
2576
2606
|
{
|
|
2577
2607
|
items: e,
|
|
2578
2608
|
className: t,
|
|
2579
2609
|
autoHidden: !0,
|
|
2580
|
-
...
|
|
2610
|
+
...l
|
|
2581
2611
|
}
|
|
2582
2612
|
)
|
|
2583
2613
|
] });
|
|
2584
|
-
},
|
|
2585
|
-
|
|
2586
|
-
|
|
2614
|
+
}, $e = dt;
|
|
2615
|
+
$e.Desktop = Re;
|
|
2616
|
+
$e.Mobile = Le;
|
|
2587
2617
|
export {
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2618
|
+
Pt as Desktop,
|
|
2619
|
+
$e as Dock,
|
|
2620
|
+
st as MdEditor
|
|
2591
2621
|
};
|