zs_library 0.3.16 → 0.3.17
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/index.d.ts +3 -1
- package/dist/components/md-editor/style.d.ts +3 -0
- package/dist/index.es.js +628 -449
- package/dist/index.umd.js +231 -70
- package/package.json +21 -21
package/dist/index.es.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var Ae = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var ie = (
|
|
2
|
+
var Ee = (s, e, r) => e in s ? Ae(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r;
|
|
3
|
+
var ie = (s, e, r) => Ee(s, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import "./zs_library.css";
|
|
5
|
-
import { jsx as o, jsxs as
|
|
6
|
-
import { cx as
|
|
7
|
-
import { createContext as fe, useMemo as
|
|
8
|
-
import
|
|
5
|
+
import { jsx as o, jsxs as G, Fragment as ce } from "react/jsx-runtime";
|
|
6
|
+
import { cx as B, css as a } from "@emotion/css";
|
|
7
|
+
import { createContext as fe, useMemo as ae, useContext as be, useState as F, useRef as te, useEffect as oe } from "react";
|
|
8
|
+
import je from "react-slick";
|
|
9
9
|
import { ReactSortable as de } from "react-sortablejs";
|
|
10
|
-
import { AnimatePresence as
|
|
11
|
-
import { useLocalStorageState as Fe, useDebounceEffect as
|
|
10
|
+
import { AnimatePresence as ge, motion as f, useMotionValue as He, useTransform as ee, useSpring as ne } from "framer-motion";
|
|
11
|
+
import { useLocalStorageState as Fe, useDebounceEffect as Xe } from "ahooks";
|
|
12
12
|
import { v4 as he } from "uuid";
|
|
13
|
-
import
|
|
14
|
-
import { RiPencilRuler2Line as qe, RiShareLine as Ye, RiInformationLine as
|
|
13
|
+
import Ge from "rc-tooltip";
|
|
14
|
+
import { RiPencilRuler2Line as qe, RiShareLine as Ye, RiInformationLine as Oe, RiCloseCircleLine as Ue, RiMoreLine as Ve } from "@remixicon/react";
|
|
15
15
|
import ke from "rc-dialog";
|
|
16
|
-
import
|
|
17
|
-
import { MDXEditor as We, toolbarPlugin as Je, DiffSourceToggleWrapper as Ke, UndoRedo as Ze, Separator as J, BoldItalicUnderlineToggles as Qe, CodeToggle as eo, StrikeThroughSupSubToggles as oo, ListsToggle as to, CreateLink as ro, InsertImage as no, InsertTable as
|
|
16
|
+
import _e from "react-json-view";
|
|
17
|
+
import { MDXEditor as We, toolbarPlugin as Je, DiffSourceToggleWrapper as Ke, UndoRedo as Ze, Separator as J, BoldItalicUnderlineToggles as Qe, CodeToggle as eo, StrikeThroughSupSubToggles as oo, ListsToggle as to, CreateLink as ro, InsertImage as no, InsertTable as ao, InsertThematicBreak as lo, InsertCodeBlock as io, InsertFrontmatter as so, diffSourcePlugin as co, listsPlugin as go, quotePlugin as uo, headingsPlugin as mo, linkPlugin as po, linkDialogPlugin as ho, imagePlugin as fo, tablePlugin as bo, thematicBreakPlugin as ko, frontmatterPlugin as xo, codeBlockPlugin as vo, codeMirrorPlugin as yo, markdownShortcutPlugin as wo, directivesPlugin as Co, AdmonitionDirectiveDescriptor as Io } from "@mdxeditor/editor";
|
|
18
18
|
import Mo from "react-markdown";
|
|
19
19
|
import So from "remark-gfm";
|
|
20
20
|
import To from "remark-emoji";
|
|
21
|
-
import
|
|
22
|
-
import { Prism as
|
|
21
|
+
import Bo from "rehype-raw";
|
|
22
|
+
import { Prism as No } from "react-syntax-highlighter";
|
|
23
23
|
import { clsx as Do } from "clsx";
|
|
24
24
|
import { twMerge as $o } from "tailwind-merge";
|
|
25
|
-
const
|
|
25
|
+
const xe = {
|
|
26
26
|
token: {
|
|
27
27
|
itemNameColor: "#1a1a1a",
|
|
28
28
|
itemIconBackgroundColor: "white",
|
|
@@ -35,7 +35,7 @@ const ve = {
|
|
|
35
35
|
contextMenuBackgroundColor: "white",
|
|
36
36
|
contextMenuShadowColor: "rgba(0, 0, 0, 0.1)"
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ve = {
|
|
39
39
|
token: {
|
|
40
40
|
itemNameColor: "white",
|
|
41
41
|
itemIconBackgroundColor: "#1f2937",
|
|
@@ -48,25 +48,25 @@ const ve = {
|
|
|
48
48
|
contextMenuBackgroundColor: "#1a1a1a",
|
|
49
49
|
contextMenuShadowColor: "rgba(255, 255, 255, 0.1)"
|
|
50
50
|
}
|
|
51
|
-
},
|
|
51
|
+
}, ye = fe(
|
|
52
52
|
{}
|
|
53
|
-
), Po = (
|
|
54
|
-
const { children: e, theme: r, ...t } =
|
|
55
|
-
return /* @__PURE__ */ o(
|
|
56
|
-
}, K = () => be(
|
|
53
|
+
), Po = (s) => {
|
|
54
|
+
const { children: e, theme: r, ...t } = s, l = ae(() => r === "light" ? xe : r === "dark" ? ve : r, [r]);
|
|
55
|
+
return /* @__PURE__ */ o(ye.Provider, { value: { theme: l, ...t }, children: e });
|
|
56
|
+
}, K = () => be(ye), we = {
|
|
57
57
|
maxRow: 2,
|
|
58
58
|
maxCol: 2
|
|
59
59
|
}, Ro = {
|
|
60
|
-
...
|
|
61
|
-
},
|
|
62
|
-
app:
|
|
60
|
+
...we
|
|
61
|
+
}, Ce = {
|
|
62
|
+
app: we,
|
|
63
63
|
group: Ro
|
|
64
64
|
};
|
|
65
65
|
class q {
|
|
66
66
|
}
|
|
67
67
|
/** 清理重复id */
|
|
68
68
|
ie(q, "uniqueArray", (e) => e.reduce((r, t) => r.find((n) => n.id === t.id) ? r : r.concat([t]), [])), ie(q, "getTheme", (e) => {
|
|
69
|
-
const r =
|
|
69
|
+
const r = xe.token, t = ve.token, l = { ...r, ...e == null ? void 0 : e.token }, n = { ...t, ...e == null ? void 0 : e.token };
|
|
70
70
|
return { light: l, dark: n };
|
|
71
71
|
});
|
|
72
72
|
const Ie = fe({
|
|
@@ -104,144 +104,144 @@ const Ie = fe({
|
|
|
104
104
|
moveTargetId: null,
|
|
105
105
|
setMoveTargetId: () => {
|
|
106
106
|
}
|
|
107
|
-
}), Lo = (
|
|
107
|
+
}), Lo = (s) => {
|
|
108
108
|
const {
|
|
109
109
|
children: e,
|
|
110
110
|
list: r = [],
|
|
111
111
|
onChange: t,
|
|
112
112
|
storageKey: l = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
|
|
113
113
|
enableCaching: n = !0
|
|
114
|
-
} =
|
|
114
|
+
} = s, [d, p] = F(), [i, v] = F(), [I, R] = F(null), N = te(I), [A, L] = F(null), [u, c] = F([]), [w, x] = F(
|
|
115
115
|
null
|
|
116
|
-
), [
|
|
116
|
+
), [y, g] = F(
|
|
117
117
|
null
|
|
118
|
-
), [
|
|
118
|
+
), [M, C] = F(!1), [m, h] = F(null), [E, V] = F(
|
|
119
119
|
null
|
|
120
|
-
), [
|
|
120
|
+
), [j, le] = F(!1), [_, Q] = Fe(l, {
|
|
121
121
|
defaultValue: [],
|
|
122
122
|
listenStorageChange: !0
|
|
123
123
|
}), re = () => {
|
|
124
|
-
L(null), clearTimeout(d), p(void 0),
|
|
125
|
-
},
|
|
126
|
-
L({ ...b, pageX: b.pageX, pageY: b.pageY, data:
|
|
127
|
-
},
|
|
128
|
-
const { config:
|
|
129
|
-
return
|
|
130
|
-
onMouseDown: (
|
|
124
|
+
L(null), clearTimeout(d), p(void 0), N.current = null;
|
|
125
|
+
}, D = (b, X) => {
|
|
126
|
+
L({ ...b, pageX: b.pageX, pageY: b.pageY, data: X }), clearTimeout(d);
|
|
127
|
+
}, O = (b, X = !0) => {
|
|
128
|
+
const { config: H = {} } = b;
|
|
129
|
+
return H.allowContextMenu === !1 ? {} : {
|
|
130
|
+
onMouseDown: (S) => {
|
|
131
131
|
p(
|
|
132
132
|
setTimeout(() => {
|
|
133
|
-
|
|
133
|
+
X && N.current === null && D(S, b);
|
|
134
134
|
}, 800)
|
|
135
|
-
),
|
|
135
|
+
), C(!1), v(
|
|
136
136
|
setTimeout(() => {
|
|
137
|
-
|
|
137
|
+
C(!0);
|
|
138
138
|
}, 800)
|
|
139
139
|
);
|
|
140
140
|
},
|
|
141
141
|
onMouseUp: () => {
|
|
142
|
-
clearTimeout(
|
|
142
|
+
clearTimeout(i), v(void 0), clearTimeout(d), p(void 0);
|
|
143
143
|
},
|
|
144
|
-
onContextMenu: (
|
|
145
|
-
|
|
144
|
+
onContextMenu: (S) => {
|
|
145
|
+
X && (S.preventDefault(), D(S, b));
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
|
-
}, W = (b,
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
c((
|
|
152
|
-
const P = [...
|
|
153
|
-
var
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
if (((
|
|
157
|
-
(
|
|
148
|
+
}, W = (b, X) => {
|
|
149
|
+
const H = [...X || []];
|
|
150
|
+
if (H.length > 0)
|
|
151
|
+
c((S) => {
|
|
152
|
+
const P = [...S], $ = (k) => {
|
|
153
|
+
var me, pe;
|
|
154
|
+
const T = H.shift(), z = k.find((U) => U.id === T), Y = k.findIndex((U) => U.id === T);
|
|
155
|
+
if (H.length && z) {
|
|
156
|
+
if (((me = z.children) == null ? void 0 : me.filter(
|
|
157
|
+
(U) => !b.some((ze) => ze.id === U.id)
|
|
158
158
|
).length) === 1 && b.length === 1) {
|
|
159
|
-
const
|
|
160
|
-
return k.splice(Y, 1,
|
|
159
|
+
const U = { ...b[0] };
|
|
160
|
+
return k.splice(Y, 1, U), t == null || t(k), k;
|
|
161
161
|
}
|
|
162
|
-
return z.children =
|
|
162
|
+
return z.children = $(z.children || []), k.splice(Y, 1, z), t == null || t(k), k;
|
|
163
163
|
}
|
|
164
164
|
if (z) {
|
|
165
165
|
if (!((pe = z.children) != null && pe.length) && b.length) {
|
|
166
|
-
const
|
|
167
|
-
return z.data = { name: "文件夹" }, z.type = "group", z.children = [
|
|
166
|
+
const U = { ...z };
|
|
167
|
+
return z.data = { name: "文件夹" }, z.type = "group", z.children = [U, ...b], z.id = he(), k.splice(Y, 1, z), t == null || t(k), k;
|
|
168
168
|
}
|
|
169
169
|
return z.children = q.uniqueArray(b), k.splice(Y, 1, z), t == null || t(k), k;
|
|
170
170
|
}
|
|
171
171
|
return q.uniqueArray(b);
|
|
172
172
|
};
|
|
173
|
-
return q.uniqueArray(
|
|
173
|
+
return q.uniqueArray($(P));
|
|
174
174
|
});
|
|
175
175
|
else {
|
|
176
|
-
const
|
|
177
|
-
t == null || t(
|
|
176
|
+
const S = q.uniqueArray(b);
|
|
177
|
+
t == null || t(S), c(S);
|
|
178
178
|
}
|
|
179
|
-
}, $e = (b,
|
|
180
|
-
c((
|
|
181
|
-
const
|
|
179
|
+
}, $e = (b, X) => {
|
|
180
|
+
c((H) => {
|
|
181
|
+
const S = [...H], P = ($) => {
|
|
182
182
|
var k;
|
|
183
|
-
for (let
|
|
184
|
-
if (
|
|
185
|
-
|
|
183
|
+
for (let T = 0; T < $.length; T++)
|
|
184
|
+
if ($[T].id === b) {
|
|
185
|
+
$[T].config = X;
|
|
186
186
|
break;
|
|
187
|
-
} else ((k =
|
|
187
|
+
} else ((k = $[T].children) == null ? void 0 : k.length) !== void 0 && P($[T].children);
|
|
188
188
|
};
|
|
189
|
-
return P(
|
|
189
|
+
return P(S), t == null || t(S), S;
|
|
190
190
|
});
|
|
191
|
-
}, Pe = (b,
|
|
192
|
-
c((
|
|
193
|
-
const
|
|
191
|
+
}, Pe = (b, X) => {
|
|
192
|
+
c((H) => {
|
|
193
|
+
const S = [...H], P = ($) => {
|
|
194
194
|
var k;
|
|
195
|
-
for (let
|
|
196
|
-
if (
|
|
197
|
-
|
|
195
|
+
for (let T = 0; T < $.length; T++)
|
|
196
|
+
if ($[T].id === b) {
|
|
197
|
+
$[T].data = X;
|
|
198
198
|
break;
|
|
199
|
-
} else ((k =
|
|
199
|
+
} else ((k = $[T].children) == null ? void 0 : k.length) !== void 0 && P($[T].children);
|
|
200
200
|
};
|
|
201
|
-
return P(
|
|
201
|
+
return P(S), t == null || t(S), S;
|
|
202
202
|
});
|
|
203
203
|
}, Re = (b) => {
|
|
204
|
-
c((
|
|
205
|
-
const
|
|
206
|
-
var
|
|
204
|
+
c((X) => {
|
|
205
|
+
const H = [...X], S = (P) => {
|
|
206
|
+
var $;
|
|
207
207
|
for (let k = 0; k < P.length; k++)
|
|
208
208
|
if (P[k].id === b) {
|
|
209
209
|
P.splice(k, 1);
|
|
210
210
|
break;
|
|
211
|
-
} else ((
|
|
211
|
+
} else (($ = P[k].children) == null ? void 0 : $.length) !== void 0 && S(P[k].children);
|
|
212
212
|
};
|
|
213
|
-
return
|
|
213
|
+
return S(H), t == null || t(H), H;
|
|
214
214
|
});
|
|
215
|
-
}, Le = (b,
|
|
216
|
-
const
|
|
217
|
-
const k =
|
|
218
|
-
if (
|
|
219
|
-
if (
|
|
220
|
-
|
|
215
|
+
}, Le = (b, X) => {
|
|
216
|
+
const H = [...u], S = (P, $) => {
|
|
217
|
+
const k = $.shift(), T = P.find((Y) => Y.id === k), z = P.findIndex((Y) => Y.id === k);
|
|
218
|
+
if (T) {
|
|
219
|
+
if ($.length)
|
|
220
|
+
T.children = S(T.children || [], $);
|
|
221
221
|
else {
|
|
222
222
|
const Y = (b == null ? void 0 : b.type) ?? "app";
|
|
223
|
-
|
|
224
|
-
...
|
|
223
|
+
T.children = [
|
|
224
|
+
...T.children ?? [],
|
|
225
225
|
{
|
|
226
226
|
...b,
|
|
227
227
|
id: he(),
|
|
228
|
-
config: (b == null ? void 0 : b.config) ??
|
|
228
|
+
config: (b == null ? void 0 : b.config) ?? Ce[Y]
|
|
229
229
|
}
|
|
230
230
|
];
|
|
231
231
|
}
|
|
232
|
-
return P.splice(z, 1,
|
|
232
|
+
return P.splice(z, 1, T), P;
|
|
233
233
|
} else
|
|
234
234
|
return P;
|
|
235
235
|
};
|
|
236
|
-
c(
|
|
236
|
+
c(S(H, X));
|
|
237
237
|
};
|
|
238
238
|
return oe(() => {
|
|
239
239
|
(r == null ? void 0 : r.length) > 0 && u.length === 0 && W(r);
|
|
240
240
|
}, [r]), oe(() => {
|
|
241
|
-
|
|
242
|
-
}, [
|
|
243
|
-
n &&
|
|
244
|
-
}, [
|
|
241
|
+
N.current = I, I !== null && re();
|
|
242
|
+
}, [I]), oe(() => {
|
|
243
|
+
n && _ != null && _.length && !j && (W(_), le(!0));
|
|
244
|
+
}, [_, j, n]), Xe(
|
|
245
245
|
() => {
|
|
246
246
|
n && Q(u);
|
|
247
247
|
},
|
|
@@ -257,23 +257,23 @@ const Ie = fe({
|
|
|
257
257
|
setList: W,
|
|
258
258
|
contextMenu: A,
|
|
259
259
|
setContextMenu: L,
|
|
260
|
-
listStatus:
|
|
260
|
+
listStatus: I,
|
|
261
261
|
setListStatus: R,
|
|
262
|
-
contextMenuFuns:
|
|
262
|
+
contextMenuFuns: O,
|
|
263
263
|
hideContextMenu: re,
|
|
264
|
-
showInfoItemData:
|
|
264
|
+
showInfoItemData: w,
|
|
265
265
|
setShowInfoItemData: x,
|
|
266
|
-
openGroupItemData:
|
|
267
|
-
setOpenGroupItemData:
|
|
268
|
-
longPressTriggered:
|
|
266
|
+
openGroupItemData: y,
|
|
267
|
+
setOpenGroupItemData: g,
|
|
268
|
+
longPressTriggered: M,
|
|
269
269
|
updateItemConfig: $e,
|
|
270
270
|
updateItem: Pe,
|
|
271
271
|
removeItem: Re,
|
|
272
272
|
addItem: Le,
|
|
273
|
-
moveItemId:
|
|
273
|
+
moveItemId: m,
|
|
274
274
|
setMoveItemId: h,
|
|
275
|
-
moveTargetId:
|
|
276
|
-
setMoveTargetId:
|
|
275
|
+
moveTargetId: E,
|
|
276
|
+
setMoveTargetId: V
|
|
277
277
|
},
|
|
278
278
|
children: e
|
|
279
279
|
}
|
|
@@ -285,12 +285,12 @@ const Ie = fe({
|
|
|
285
285
|
transition: { type: "spring", stiffness: 300, damping: 24 }
|
|
286
286
|
},
|
|
287
287
|
menuHide: { opacity: 0, y: 20, transition: { duration: 0.2 } }
|
|
288
|
-
}, se = (
|
|
289
|
-
const { icon: e, title: r, onClick: t } =
|
|
288
|
+
}, se = (s) => {
|
|
289
|
+
const { icon: e, title: r, onClick: t } = s, { theme: l } = K(), { light: n, dark: d } = q.getTheme(l);
|
|
290
290
|
return /* @__PURE__ */ o(
|
|
291
291
|
f.div,
|
|
292
292
|
{
|
|
293
|
-
className:
|
|
293
|
+
className: a`
|
|
294
294
|
&:hover {
|
|
295
295
|
background-color: ${n.contextMenuActiveColor};
|
|
296
296
|
@media (prefers-color-scheme: dark) {
|
|
@@ -311,12 +311,12 @@ const Ie = fe({
|
|
|
311
311
|
p.stopPropagation(), t == null || t();
|
|
312
312
|
},
|
|
313
313
|
variants: zo,
|
|
314
|
-
children: /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ G(
|
|
315
315
|
f.div,
|
|
316
316
|
{
|
|
317
|
-
className:
|
|
317
|
+
className: B(
|
|
318
318
|
"py-1.5 px-3 rounded-lg",
|
|
319
|
-
|
|
319
|
+
a`
|
|
320
320
|
padding-top: 0.375rem;
|
|
321
321
|
padding-bottom: 0.375rem;
|
|
322
322
|
padding-left: 0.75rem;
|
|
@@ -329,8 +329,8 @@ const Ie = fe({
|
|
|
329
329
|
/* @__PURE__ */ o(
|
|
330
330
|
f.div,
|
|
331
331
|
{
|
|
332
|
-
className:
|
|
333
|
-
|
|
332
|
+
className: B(
|
|
333
|
+
a`
|
|
334
334
|
margin-bottom: 0.375rem;
|
|
335
335
|
display: flex;
|
|
336
336
|
justify-content: center;
|
|
@@ -345,7 +345,7 @@ const Ie = fe({
|
|
|
345
345
|
)
|
|
346
346
|
}
|
|
347
347
|
);
|
|
348
|
-
}, Ao = (
|
|
348
|
+
}, Ao = (s) => {
|
|
349
349
|
const {
|
|
350
350
|
showInfoButton: e = !0,
|
|
351
351
|
showRemoveButton: r = !0,
|
|
@@ -354,36 +354,36 @@ const Ie = fe({
|
|
|
354
354
|
onInfoClick: n,
|
|
355
355
|
onShareClick: d,
|
|
356
356
|
onRemoveClick: p
|
|
357
|
-
} =
|
|
358
|
-
contextMenu:
|
|
357
|
+
} = s, {
|
|
358
|
+
contextMenu: i,
|
|
359
359
|
setContextMenu: v,
|
|
360
|
-
hideContextMenu:
|
|
360
|
+
hideContextMenu: I,
|
|
361
361
|
setShowInfoItemData: R,
|
|
362
|
-
removeItem:
|
|
362
|
+
removeItem: N,
|
|
363
363
|
updateItemConfig: A
|
|
364
|
-
} = Z(), { theme: L } = K(), { light: u, dark: c } = q.getTheme(L), { data:
|
|
365
|
-
var
|
|
366
|
-
const
|
|
367
|
-
for (let
|
|
368
|
-
for (let h = 1; h <= ((
|
|
369
|
-
|
|
370
|
-
return
|
|
364
|
+
} = Z(), { theme: L } = K(), { light: u, dark: c } = q.getTheme(L), { data: w } = i ?? {}, { config: x = {} } = w ?? {}, y = () => {
|
|
365
|
+
var C;
|
|
366
|
+
const g = Ce[(C = i == null ? void 0 : i.data) == null ? void 0 : C.type], M = [];
|
|
367
|
+
for (let m = 1; m <= ((g == null ? void 0 : g.maxRow) ?? 2); m++)
|
|
368
|
+
for (let h = 1; h <= ((g == null ? void 0 : g.maxCol) ?? 2); h++)
|
|
369
|
+
M.push(`${m}x${h}`);
|
|
370
|
+
return M;
|
|
371
371
|
};
|
|
372
|
-
return /* @__PURE__ */ o(
|
|
372
|
+
return /* @__PURE__ */ o(ge, { children: i && /* @__PURE__ */ G(
|
|
373
373
|
f.div,
|
|
374
374
|
{
|
|
375
375
|
initial: { opacity: 0 },
|
|
376
376
|
animate: { opacity: 1 },
|
|
377
377
|
exit: { opacity: 0 },
|
|
378
|
-
onMouseDown: (
|
|
379
|
-
|
|
378
|
+
onMouseDown: (g) => {
|
|
379
|
+
g.stopPropagation(), g.preventDefault();
|
|
380
380
|
},
|
|
381
381
|
children: [
|
|
382
382
|
/* @__PURE__ */ o(
|
|
383
383
|
f.div,
|
|
384
384
|
{
|
|
385
|
-
className:
|
|
386
|
-
|
|
385
|
+
className: B(
|
|
386
|
+
a`
|
|
387
387
|
border-radius: 0.5rem;
|
|
388
388
|
overflow: hidden;
|
|
389
389
|
background-color: ${u.contextMenuBackgroundColor};
|
|
@@ -397,7 +397,7 @@ const Ie = fe({
|
|
|
397
397
|
children: l && x.allowResize !== !1 && /* @__PURE__ */ o(
|
|
398
398
|
f.ul,
|
|
399
399
|
{
|
|
400
|
-
className:
|
|
400
|
+
className: a`
|
|
401
401
|
background-color: white;
|
|
402
402
|
padding: 0.25rem;
|
|
403
403
|
margin: 0;
|
|
@@ -407,32 +407,32 @@ const Ie = fe({
|
|
|
407
407
|
label: "修改大小",
|
|
408
408
|
key: "size",
|
|
409
409
|
icon: /* @__PURE__ */ o(qe, { size: 14 }),
|
|
410
|
-
items:
|
|
411
|
-
label:
|
|
412
|
-
key:
|
|
410
|
+
items: y().map((g) => ({
|
|
411
|
+
label: g,
|
|
412
|
+
key: g,
|
|
413
413
|
onClick: () => {
|
|
414
|
-
const [
|
|
415
|
-
A(
|
|
416
|
-
row:
|
|
417
|
-
col:
|
|
414
|
+
const [M, C] = g.split("x").map(Number);
|
|
415
|
+
A(i.data.id, {
|
|
416
|
+
row: M,
|
|
417
|
+
col: C
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
}))
|
|
421
421
|
}
|
|
422
|
-
].map((
|
|
422
|
+
].map((g) => /* @__PURE__ */ G(
|
|
423
423
|
f.li,
|
|
424
424
|
{
|
|
425
|
-
className:
|
|
425
|
+
className: a`
|
|
426
426
|
padding-top: 0.5rem;
|
|
427
427
|
padding-bottom: 0.5rem;
|
|
428
428
|
padding-left: 0.75rem;
|
|
429
429
|
padding-right: 0.75rem;
|
|
430
430
|
`,
|
|
431
431
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ G(
|
|
433
433
|
f.p,
|
|
434
434
|
{
|
|
435
|
-
className:
|
|
435
|
+
className: a`
|
|
436
436
|
display: flex;
|
|
437
437
|
align-items: center;
|
|
438
438
|
font-size: 0.875rem;
|
|
@@ -442,26 +442,26 @@ const Ie = fe({
|
|
|
442
442
|
margin: 0;
|
|
443
443
|
`,
|
|
444
444
|
children: [
|
|
445
|
-
|
|
445
|
+
g.icon,
|
|
446
446
|
" ",
|
|
447
|
-
|
|
447
|
+
g.label
|
|
448
448
|
]
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
451
|
/* @__PURE__ */ o(
|
|
452
452
|
f.div,
|
|
453
453
|
{
|
|
454
|
-
className:
|
|
454
|
+
className: a`
|
|
455
455
|
display: grid;
|
|
456
456
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
457
457
|
gap: 0.25rem;
|
|
458
458
|
`,
|
|
459
|
-
children:
|
|
459
|
+
children: g.items.map((M) => /* @__PURE__ */ o(
|
|
460
460
|
f.div,
|
|
461
461
|
{
|
|
462
|
-
className:
|
|
462
|
+
className: B(
|
|
463
463
|
"py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",
|
|
464
|
-
|
|
464
|
+
a`
|
|
465
465
|
padding-top: 0.25rem;
|
|
466
466
|
padding-bottom: 0.25rem;
|
|
467
467
|
padding-left: 0.5rem;
|
|
@@ -483,33 +483,33 @@ const Ie = fe({
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
`,
|
|
486
|
-
`${x.row}x${x.col}` ===
|
|
486
|
+
`${x.row}x${x.col}` === M.key && a`
|
|
487
487
|
background-color: ${u.contextMenuActiveColor};
|
|
488
488
|
@media (prefers-color-scheme: dark) {
|
|
489
489
|
background-color: ${c.contextMenuActiveColor};
|
|
490
490
|
}
|
|
491
491
|
`
|
|
492
492
|
),
|
|
493
|
-
onClick:
|
|
494
|
-
children:
|
|
493
|
+
onClick: M.onClick,
|
|
494
|
+
children: M.label
|
|
495
495
|
},
|
|
496
|
-
|
|
496
|
+
M.key
|
|
497
497
|
))
|
|
498
498
|
}
|
|
499
499
|
)
|
|
500
500
|
]
|
|
501
501
|
},
|
|
502
|
-
|
|
502
|
+
g.key
|
|
503
503
|
))
|
|
504
504
|
}
|
|
505
505
|
)
|
|
506
506
|
}
|
|
507
507
|
),
|
|
508
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ G(
|
|
509
509
|
f.div,
|
|
510
510
|
{
|
|
511
|
-
className:
|
|
512
|
-
|
|
511
|
+
className: B(
|
|
512
|
+
a`
|
|
513
513
|
background-color: ${u.contextMenuBackgroundColor};
|
|
514
514
|
box-shadow: 0 0 0.5rem ${u.contextMenuShadowColor};
|
|
515
515
|
@media (prefers-color-scheme: dark) {
|
|
@@ -533,7 +533,7 @@ const Ie = fe({
|
|
|
533
533
|
title: "分享",
|
|
534
534
|
onClick: () => {
|
|
535
535
|
if (d) {
|
|
536
|
-
d(
|
|
536
|
+
d(i.data);
|
|
537
537
|
return;
|
|
538
538
|
}
|
|
539
539
|
}
|
|
@@ -542,32 +542,32 @@ const Ie = fe({
|
|
|
542
542
|
e && /* @__PURE__ */ o(
|
|
543
543
|
se,
|
|
544
544
|
{
|
|
545
|
-
icon: /* @__PURE__ */ o(
|
|
545
|
+
icon: /* @__PURE__ */ o(Oe, { size: 20 }),
|
|
546
546
|
title: "信息",
|
|
547
547
|
onClick: () => {
|
|
548
548
|
if (n) {
|
|
549
|
-
n(
|
|
549
|
+
n(i.data);
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
552
|
R({
|
|
553
|
-
...
|
|
554
|
-
pageX:
|
|
555
|
-
pageY:
|
|
556
|
-
}),
|
|
553
|
+
...i.data,
|
|
554
|
+
pageX: i.pageX,
|
|
555
|
+
pageY: i.pageY
|
|
556
|
+
}), I();
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
),
|
|
560
560
|
r && /* @__PURE__ */ o(
|
|
561
561
|
se,
|
|
562
562
|
{
|
|
563
|
-
icon: /* @__PURE__ */ o(
|
|
563
|
+
icon: /* @__PURE__ */ o(Ue, { size: 20 }),
|
|
564
564
|
title: "移除",
|
|
565
565
|
onClick: () => {
|
|
566
566
|
if (p) {
|
|
567
|
-
p(
|
|
567
|
+
p(i.data, N);
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
|
-
v(null),
|
|
570
|
+
v(null), N(i.data.id);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
)
|
|
@@ -577,13 +577,13 @@ const Ie = fe({
|
|
|
577
577
|
]
|
|
578
578
|
}
|
|
579
579
|
) });
|
|
580
|
-
},
|
|
581
|
-
const { data: e, noLetters: r = !1 } =
|
|
582
|
-
return /* @__PURE__ */
|
|
580
|
+
}, Eo = (s) => {
|
|
581
|
+
const { data: e, noLetters: r = !1 } = s, { contextMenuFuns: t } = Z(), { itemIconBuilder: l, theme: n, contextMenu: d } = K(), { light: p, dark: i } = q.getTheme(n), { data: v = {} } = e, { name: I } = v;
|
|
582
|
+
return /* @__PURE__ */ G(ce, { children: [
|
|
583
583
|
/* @__PURE__ */ o(
|
|
584
584
|
f.div,
|
|
585
585
|
{
|
|
586
|
-
className:
|
|
586
|
+
className: a`
|
|
587
587
|
width: 4rem;
|
|
588
588
|
height: 4rem;
|
|
589
589
|
background-color: ${p.itemIconBackgroundColor};
|
|
@@ -593,15 +593,15 @@ const Ie = fe({
|
|
|
593
593
|
position: relative;
|
|
594
594
|
overflow: hidden;
|
|
595
595
|
@media (prefers-color-scheme: dark) {
|
|
596
|
-
background-color: ${
|
|
597
|
-
box-shadow: 0 0 0.5rem ${
|
|
596
|
+
background-color: ${i.itemIconBackgroundColor};
|
|
597
|
+
box-shadow: 0 0 0.5rem ${i.itemIconShadowColor};
|
|
598
598
|
}
|
|
599
599
|
`,
|
|
600
600
|
whileTap: { scale: 0.9 },
|
|
601
601
|
children: /* @__PURE__ */ o(
|
|
602
602
|
"div",
|
|
603
603
|
{
|
|
604
|
-
className:
|
|
604
|
+
className: a`
|
|
605
605
|
position: absolute;
|
|
606
606
|
left: 0;
|
|
607
607
|
top: 0;
|
|
@@ -609,7 +609,7 @@ const Ie = fe({
|
|
|
609
609
|
height: 100%;
|
|
610
610
|
color: ${p.itemNameColor};
|
|
611
611
|
@media (prefers-color-scheme: dark) {
|
|
612
|
-
color: ${
|
|
612
|
+
color: ${i.itemNameColor};
|
|
613
613
|
}
|
|
614
614
|
`,
|
|
615
615
|
...t(e, d !== !1),
|
|
@@ -621,25 +621,25 @@ const Ie = fe({
|
|
|
621
621
|
/* @__PURE__ */ o(
|
|
622
622
|
f.p,
|
|
623
623
|
{
|
|
624
|
-
className:
|
|
625
|
-
|
|
624
|
+
className: B(
|
|
625
|
+
a`
|
|
626
626
|
text-align: center;
|
|
627
627
|
margin-top: 0.25rem;
|
|
628
628
|
margin-bottom: 0;
|
|
629
629
|
color: ${p.itemNameColor};
|
|
630
630
|
@media (prefers-color-scheme: dark) {
|
|
631
|
-
color: ${
|
|
631
|
+
color: ${i.itemNameColor};
|
|
632
632
|
}
|
|
633
633
|
`,
|
|
634
|
-
r &&
|
|
634
|
+
r && a`
|
|
635
635
|
color: transparent;
|
|
636
636
|
`
|
|
637
637
|
),
|
|
638
|
-
children:
|
|
638
|
+
children: I
|
|
639
639
|
}
|
|
640
640
|
)
|
|
641
641
|
] });
|
|
642
|
-
},
|
|
642
|
+
}, ue = (s) => {
|
|
643
643
|
const {
|
|
644
644
|
data: e,
|
|
645
645
|
className: r,
|
|
@@ -648,13 +648,13 @@ const Ie = fe({
|
|
|
648
648
|
disabledDrag: n = !1,
|
|
649
649
|
children: d,
|
|
650
650
|
parentIds: p,
|
|
651
|
-
childrenLength:
|
|
652
|
-
} =
|
|
651
|
+
childrenLength: i
|
|
652
|
+
} = s, { contextMenu: v, setContextMenu: I } = Z(), { contextMenu: R } = K();
|
|
653
653
|
return /* @__PURE__ */ o(
|
|
654
|
-
|
|
654
|
+
Ge,
|
|
655
655
|
{
|
|
656
656
|
placement: "bottom",
|
|
657
|
-
overlayClassName:
|
|
657
|
+
overlayClassName: a`
|
|
658
658
|
background-color: transparent;
|
|
659
659
|
.rc-tooltip-inner {
|
|
660
660
|
background-color: transparent;
|
|
@@ -664,8 +664,8 @@ const Ie = fe({
|
|
|
664
664
|
`,
|
|
665
665
|
overlay: /* @__PURE__ */ o(Ao, { ...R }),
|
|
666
666
|
visible: (v == null ? void 0 : v.data.id) === e.id,
|
|
667
|
-
onVisibleChange: (
|
|
668
|
-
|
|
667
|
+
onVisibleChange: (N) => {
|
|
668
|
+
N || I(null);
|
|
669
669
|
},
|
|
670
670
|
destroyTooltipOnHide: !0,
|
|
671
671
|
children: /* @__PURE__ */ o(
|
|
@@ -674,15 +674,15 @@ const Ie = fe({
|
|
|
674
674
|
"data-id": e.id,
|
|
675
675
|
"data-index": t,
|
|
676
676
|
"data-parent-ids": p == null ? void 0 : p.join(","),
|
|
677
|
-
"data-children-length":
|
|
677
|
+
"data-children-length": i,
|
|
678
678
|
onClick: () => l == null ? void 0 : l(e),
|
|
679
|
-
className:
|
|
680
|
-
children: d ?? /* @__PURE__ */ o(
|
|
679
|
+
className: B(n && "drag-disabled", r),
|
|
680
|
+
children: d ?? /* @__PURE__ */ o(Eo, { ...s })
|
|
681
681
|
}
|
|
682
682
|
)
|
|
683
683
|
}
|
|
684
684
|
);
|
|
685
|
-
},
|
|
685
|
+
}, jo = (s) => {
|
|
686
686
|
const {
|
|
687
687
|
data: e,
|
|
688
688
|
className: r,
|
|
@@ -690,35 +690,35 @@ const Ie = fe({
|
|
|
690
690
|
itemIndex: l,
|
|
691
691
|
onClick: n,
|
|
692
692
|
noLetters: d = !1
|
|
693
|
-
} =
|
|
693
|
+
} = s, {
|
|
694
694
|
contextMenuFuns: p,
|
|
695
|
-
setList:
|
|
695
|
+
setList: i,
|
|
696
696
|
setOpenGroupItemData: v,
|
|
697
|
-
longPressTriggered:
|
|
697
|
+
longPressTriggered: I,
|
|
698
698
|
moveItemId: R,
|
|
699
|
-
moveTargetId:
|
|
699
|
+
moveTargetId: N,
|
|
700
700
|
setMoveTargetId: A,
|
|
701
701
|
listStatus: L
|
|
702
|
-
} = Z(), { itemIconBuilder: u, theme: c, contextMenu:
|
|
702
|
+
} = Z(), { itemIconBuilder: u, theme: c, contextMenu: w } = K(), { light: x, dark: y } = q.getTheme(c), { children: g, data: M, config: C } = e, { row: m = 1, col: h = 1 } = C ?? {}, E = {
|
|
703
703
|
visible: { opacity: 1, scale: 1 },
|
|
704
704
|
hidden: { opacity: 0, scale: 0.95 }
|
|
705
|
-
},
|
|
705
|
+
}, V = ((g == null ? void 0 : g.length) ?? 0) === 0, j = V ? [e] : [...g ?? []].slice(0, 9), le = ae(() => R === e.id.toString(), [e.id, R]), _ = ae(() => N === e.id, [e.id, N]), Q = a`
|
|
706
706
|
overflow: hidden;
|
|
707
707
|
cursor: pointer;
|
|
708
708
|
background-color: ${x.itemIconBackgroundColor};
|
|
709
709
|
box-shadow: 0 0 0.5rem ${x.itemIconShadowColor};
|
|
710
710
|
@media (prefers-color-scheme: dark) {
|
|
711
|
-
background-color: ${
|
|
712
|
-
box-shadow: 0 0 0.5rem ${
|
|
711
|
+
background-color: ${y.itemIconBackgroundColor};
|
|
712
|
+
box-shadow: 0 0 0.5rem ${y.itemIconShadowColor};
|
|
713
713
|
}
|
|
714
714
|
`, re = () => {
|
|
715
|
-
if (
|
|
715
|
+
if (V)
|
|
716
716
|
return /* @__PURE__ */ o(
|
|
717
717
|
f.div,
|
|
718
718
|
{
|
|
719
|
-
className:
|
|
719
|
+
className: B(
|
|
720
720
|
"sortable-group-item",
|
|
721
|
-
|
|
721
|
+
a`
|
|
722
722
|
overflow: hidden;
|
|
723
723
|
cursor: pointer;
|
|
724
724
|
width: 100%;
|
|
@@ -729,21 +729,21 @@ const Ie = fe({
|
|
|
729
729
|
top: 0;
|
|
730
730
|
border-radius: 0.75rem;
|
|
731
731
|
@media (prefers-color-scheme: dark) {
|
|
732
|
-
background-color: ${
|
|
732
|
+
background-color: ${y.itemIconBackgroundColor};
|
|
733
733
|
}
|
|
734
734
|
`
|
|
735
735
|
),
|
|
736
|
-
onClick: (
|
|
737
|
-
|
|
736
|
+
onClick: (D) => {
|
|
737
|
+
D.stopPropagation(), n == null || n(e);
|
|
738
738
|
},
|
|
739
739
|
children: u == null ? void 0 : u(e)
|
|
740
740
|
}
|
|
741
741
|
);
|
|
742
|
-
if (
|
|
742
|
+
if (m === 1 && h === 1 || m === 2 && h === 2)
|
|
743
743
|
return /* @__PURE__ */ o(
|
|
744
744
|
f.div,
|
|
745
745
|
{
|
|
746
|
-
className:
|
|
746
|
+
className: a`
|
|
747
747
|
display: grid;
|
|
748
748
|
width: 100%;
|
|
749
749
|
height: 100%;
|
|
@@ -753,31 +753,31 @@ const Ie = fe({
|
|
|
753
753
|
gap: ${h === 1 ? "0.125rem" : "0.5rem"};
|
|
754
754
|
place-items: center;
|
|
755
755
|
`,
|
|
756
|
-
children:
|
|
756
|
+
children: j == null ? void 0 : j.slice(0, 9).map((D) => /* @__PURE__ */ o(
|
|
757
757
|
f.div,
|
|
758
758
|
{
|
|
759
|
-
className:
|
|
759
|
+
className: B(
|
|
760
760
|
Q,
|
|
761
|
-
|
|
761
|
+
a`
|
|
762
762
|
border-radius: ${h === 1 ? "0.25rem" : "0.5rem"};
|
|
763
763
|
width: 100%;
|
|
764
764
|
height: 100%;
|
|
765
765
|
`
|
|
766
766
|
),
|
|
767
|
-
onClick: (
|
|
768
|
-
|
|
767
|
+
onClick: (O) => {
|
|
768
|
+
O.stopPropagation(), n == null || n(D);
|
|
769
769
|
},
|
|
770
|
-
children: u == null ? void 0 : u(
|
|
770
|
+
children: u == null ? void 0 : u(D)
|
|
771
771
|
},
|
|
772
|
-
|
|
772
|
+
D.id
|
|
773
773
|
))
|
|
774
774
|
}
|
|
775
775
|
);
|
|
776
|
-
if (
|
|
776
|
+
if (m === 1 && h === 2)
|
|
777
777
|
return /* @__PURE__ */ o(
|
|
778
778
|
f.div,
|
|
779
779
|
{
|
|
780
|
-
className:
|
|
780
|
+
className: a`
|
|
781
781
|
display: grid;
|
|
782
782
|
grid-template-columns: repeat(10, minmax(0, 1fr));
|
|
783
783
|
grid-template-rows: repeat(4, minmax(0, 1fr));
|
|
@@ -787,18 +787,18 @@ const Ie = fe({
|
|
|
787
787
|
height: 52px;
|
|
788
788
|
place-items: center;
|
|
789
789
|
`,
|
|
790
|
-
children:
|
|
790
|
+
children: j == null ? void 0 : j.slice(0, 4).map((D, O) => /* @__PURE__ */ o(
|
|
791
791
|
f.div,
|
|
792
792
|
{
|
|
793
|
-
className:
|
|
793
|
+
className: B(
|
|
794
794
|
Q,
|
|
795
|
-
|
|
795
|
+
O < 2 ? a`
|
|
796
796
|
width: 52px;
|
|
797
797
|
height: 52px;
|
|
798
798
|
border-radius: 0.5rem;
|
|
799
799
|
grid-column: span 4 / span 4;
|
|
800
800
|
grid-row: span 4 / span 4;
|
|
801
|
-
` :
|
|
801
|
+
` : a`
|
|
802
802
|
width: 1.5rem;
|
|
803
803
|
height: 1.5rem;
|
|
804
804
|
border-radius: 0.375rem;
|
|
@@ -807,19 +807,19 @@ const Ie = fe({
|
|
|
807
807
|
`
|
|
808
808
|
),
|
|
809
809
|
onClick: (W) => {
|
|
810
|
-
|
|
810
|
+
O > 2 || (W.stopPropagation(), n == null || n(D));
|
|
811
811
|
},
|
|
812
|
-
children: u == null ? void 0 : u(
|
|
812
|
+
children: u == null ? void 0 : u(D)
|
|
813
813
|
},
|
|
814
|
-
|
|
814
|
+
D.id
|
|
815
815
|
))
|
|
816
816
|
}
|
|
817
817
|
);
|
|
818
|
-
if (
|
|
818
|
+
if (m === 2 && h === 1)
|
|
819
819
|
return /* @__PURE__ */ o(
|
|
820
820
|
f.div,
|
|
821
821
|
{
|
|
822
|
-
className:
|
|
822
|
+
className: a`
|
|
823
823
|
display: grid;
|
|
824
824
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
825
825
|
grid-template-rows: repeat(10, minmax(0, 1fr));
|
|
@@ -829,18 +829,18 @@ const Ie = fe({
|
|
|
829
829
|
height: 144px;
|
|
830
830
|
place-items: center;
|
|
831
831
|
`,
|
|
832
|
-
children:
|
|
832
|
+
children: j == null ? void 0 : j.slice(0, 4).map((D, O) => /* @__PURE__ */ o(
|
|
833
833
|
f.div,
|
|
834
834
|
{
|
|
835
|
-
className:
|
|
835
|
+
className: B(
|
|
836
836
|
Q,
|
|
837
|
-
|
|
837
|
+
O < 2 ? a`
|
|
838
838
|
width: 52px;
|
|
839
839
|
height: 52px;
|
|
840
840
|
border-radius: 0.5rem;
|
|
841
841
|
grid-column: span 4 / span 4;
|
|
842
842
|
grid-row: span 4 / span 4;
|
|
843
|
-
` :
|
|
843
|
+
` : a`
|
|
844
844
|
width: 1.5rem;
|
|
845
845
|
height: 1.5rem;
|
|
846
846
|
grid-column: span 2 / span 2;
|
|
@@ -848,25 +848,25 @@ const Ie = fe({
|
|
|
848
848
|
`
|
|
849
849
|
),
|
|
850
850
|
onClick: (W) => {
|
|
851
|
-
|
|
851
|
+
O > 2 || (W.stopPropagation(), n == null || n(D));
|
|
852
852
|
},
|
|
853
|
-
children: u == null ? void 0 : u(
|
|
853
|
+
children: u == null ? void 0 : u(D)
|
|
854
854
|
},
|
|
855
|
-
|
|
855
|
+
D.id
|
|
856
856
|
))
|
|
857
857
|
}
|
|
858
858
|
);
|
|
859
859
|
};
|
|
860
|
-
return /* @__PURE__ */
|
|
861
|
-
|
|
860
|
+
return /* @__PURE__ */ G(
|
|
861
|
+
ue,
|
|
862
862
|
{
|
|
863
863
|
data: e,
|
|
864
864
|
itemIndex: l,
|
|
865
865
|
parentIds: t,
|
|
866
|
-
childrenLength:
|
|
867
|
-
className:
|
|
868
|
-
|
|
869
|
-
grid-row: span ${
|
|
866
|
+
childrenLength: g == null ? void 0 : g.length,
|
|
867
|
+
className: B(
|
|
868
|
+
a`
|
|
869
|
+
grid-row: span ${m};
|
|
870
870
|
grid-column: span ${h};
|
|
871
871
|
`,
|
|
872
872
|
r
|
|
@@ -876,33 +876,33 @@ const Ie = fe({
|
|
|
876
876
|
f.div,
|
|
877
877
|
{
|
|
878
878
|
whileTap: { scale: 0.9 },
|
|
879
|
-
className:
|
|
880
|
-
|
|
881
|
-
|
|
879
|
+
className: B(
|
|
880
|
+
_ ? "!scale-110" : "",
|
|
881
|
+
a`
|
|
882
882
|
cursor: pointer;
|
|
883
883
|
position: relative;
|
|
884
884
|
border-radius: 0.75rem;
|
|
885
885
|
background-color: ${x.groupItemIconBackgroundColor};
|
|
886
886
|
box-shadow: 0 0 0.5rem ${x.groupItemIconShadowColor};
|
|
887
887
|
@media (prefers-color-scheme: dark) {
|
|
888
|
-
background-color: ${
|
|
889
|
-
box-shadow: 0 0 0.5rem ${
|
|
888
|
+
background-color: ${y.groupItemIconBackgroundColor};
|
|
889
|
+
box-shadow: 0 0 0.5rem ${y.groupItemIconShadowColor};
|
|
890
890
|
}
|
|
891
891
|
/* overflow: hidden; */
|
|
892
892
|
transition: all 0.3s;
|
|
893
893
|
margin: 0 auto;
|
|
894
894
|
width: ${h * 64 + 32 * (h - 1)}px;
|
|
895
|
-
height: ${
|
|
895
|
+
height: ${m * 64 + 32 * (m - 1)}px;
|
|
896
896
|
`
|
|
897
897
|
),
|
|
898
|
-
onClick: (
|
|
899
|
-
!
|
|
898
|
+
onClick: (D) => {
|
|
899
|
+
!V && !I && (e.parentIds = t, e.pageX = D.pageX, e.pageY = D.pageY, v(e));
|
|
900
900
|
},
|
|
901
|
-
...p(e,
|
|
902
|
-
children: /* @__PURE__ */
|
|
901
|
+
...p(e, w !== !1),
|
|
902
|
+
children: /* @__PURE__ */ G(
|
|
903
903
|
f.div,
|
|
904
904
|
{
|
|
905
|
-
className:
|
|
905
|
+
className: a`
|
|
906
906
|
position: relative;
|
|
907
907
|
width: 100%;
|
|
908
908
|
height: 100%;
|
|
@@ -916,9 +916,9 @@ const Ie = fe({
|
|
|
916
916
|
/* @__PURE__ */ o(
|
|
917
917
|
de,
|
|
918
918
|
{
|
|
919
|
-
className:
|
|
919
|
+
className: B(
|
|
920
920
|
"sortable-group-item",
|
|
921
|
-
|
|
921
|
+
a`
|
|
922
922
|
position: absolute;
|
|
923
923
|
cursor: pointer;
|
|
924
924
|
left: 0.375rem;
|
|
@@ -934,8 +934,8 @@ const Ie = fe({
|
|
|
934
934
|
group: { name: "nested", pull: !1, put: !0 },
|
|
935
935
|
animation: 150,
|
|
936
936
|
fallbackOnBody: !0,
|
|
937
|
-
list:
|
|
938
|
-
setList: (
|
|
937
|
+
list: g ?? [],
|
|
938
|
+
setList: (D) => i(D, t),
|
|
939
939
|
filter: () => !0,
|
|
940
940
|
"data-id": e.id,
|
|
941
941
|
onChange: () => {
|
|
@@ -951,29 +951,29 @@ const Ie = fe({
|
|
|
951
951
|
/* @__PURE__ */ o(
|
|
952
952
|
f.p,
|
|
953
953
|
{
|
|
954
|
-
className:
|
|
955
|
-
|
|
954
|
+
className: B(
|
|
955
|
+
a`
|
|
956
956
|
text-align: center;
|
|
957
957
|
margin-top: 0.25rem;
|
|
958
958
|
margin-bottom: 0;
|
|
959
959
|
color: ${x.itemNameColor};
|
|
960
960
|
@media (prefers-color-scheme: dark) {
|
|
961
|
-
color: ${
|
|
961
|
+
color: ${y.itemNameColor};
|
|
962
962
|
}
|
|
963
963
|
`,
|
|
964
|
-
d &&
|
|
964
|
+
d && a`
|
|
965
965
|
color: transparent;
|
|
966
966
|
`
|
|
967
967
|
),
|
|
968
|
-
variants:
|
|
969
|
-
animate:
|
|
970
|
-
children: (
|
|
968
|
+
variants: E,
|
|
969
|
+
animate: le ? "hidden" : "visible",
|
|
970
|
+
children: (M == null ? void 0 : M.name) ?? "文件夹"
|
|
971
971
|
}
|
|
972
972
|
)
|
|
973
973
|
]
|
|
974
974
|
}
|
|
975
975
|
);
|
|
976
|
-
}, Me =
|
|
976
|
+
}, Me = a`
|
|
977
977
|
padding: 8px;
|
|
978
978
|
transition: all 0.2s;
|
|
979
979
|
> div {
|
|
@@ -985,15 +985,15 @@ const Ie = fe({
|
|
|
985
985
|
transition: all 0.2s;
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
`,
|
|
989
|
-
const { data: e, onClose: r, onItemClick: t } =
|
|
988
|
+
`, Ho = (s) => {
|
|
989
|
+
const { data: e, onClose: r, onItemClick: t } = s, {
|
|
990
990
|
list: l,
|
|
991
991
|
setList: n,
|
|
992
992
|
setListStatus: d,
|
|
993
993
|
setMoveItemId: p,
|
|
994
|
-
setMoveTargetId:
|
|
994
|
+
setMoveTargetId: i,
|
|
995
995
|
updateItem: v
|
|
996
|
-
} = Z(), { theme:
|
|
996
|
+
} = Z(), { theme: I } = K(), { light: R, dark: N } = q.getTheme(I), [A, L] = F("文件夹"), u = [...(e == null ? void 0 : e.children) ?? []];
|
|
997
997
|
return oe(() => {
|
|
998
998
|
var c;
|
|
999
999
|
e && L((c = e.data) == null ? void 0 : c.name);
|
|
@@ -1013,7 +1013,7 @@ const Ie = fe({
|
|
|
1013
1013
|
title: /* @__PURE__ */ o(
|
|
1014
1014
|
"input",
|
|
1015
1015
|
{
|
|
1016
|
-
className:
|
|
1016
|
+
className: a`
|
|
1017
1017
|
background-color: transparent;
|
|
1018
1018
|
border-style: none;
|
|
1019
1019
|
text-align: center;
|
|
@@ -1041,9 +1041,9 @@ const Ie = fe({
|
|
|
1041
1041
|
),
|
|
1042
1042
|
footer: null,
|
|
1043
1043
|
closable: !1,
|
|
1044
|
-
className:
|
|
1044
|
+
className: B(
|
|
1045
1045
|
"group-item-modal",
|
|
1046
|
-
|
|
1046
|
+
a`
|
|
1047
1047
|
.rc-dialog-content {
|
|
1048
1048
|
background-color: transparent;
|
|
1049
1049
|
box-shadow: none;
|
|
@@ -1060,7 +1060,7 @@ const Ie = fe({
|
|
|
1060
1060
|
.rc-dialog-body {
|
|
1061
1061
|
background-color: ${R.groupItemModalBackgroundColor};
|
|
1062
1062
|
@media (prefers-color-scheme: dark) {
|
|
1063
|
-
background-color: ${
|
|
1063
|
+
background-color: ${N.groupItemModalBackgroundColor};
|
|
1064
1064
|
}
|
|
1065
1065
|
border-radius: 0.5rem;
|
|
1066
1066
|
overflow: hidden;
|
|
@@ -1073,21 +1073,21 @@ const Ie = fe({
|
|
|
1073
1073
|
children: /* @__PURE__ */ o(
|
|
1074
1074
|
"div",
|
|
1075
1075
|
{
|
|
1076
|
-
className:
|
|
1076
|
+
className: a`
|
|
1077
1077
|
overflow-y: auto;
|
|
1078
1078
|
max-height: 60vh;
|
|
1079
1079
|
padding: 1.25rem 0;
|
|
1080
1080
|
`,
|
|
1081
1081
|
onDragLeave: (c) => {
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1082
|
+
const w = c.relatedTarget;
|
|
1083
|
+
w && (c.currentTarget.contains(w) || setTimeout(() => {
|
|
1084
1084
|
r();
|
|
1085
1085
|
}, 500));
|
|
1086
1086
|
},
|
|
1087
1087
|
children: /* @__PURE__ */ o(
|
|
1088
1088
|
de,
|
|
1089
1089
|
{
|
|
1090
|
-
className:
|
|
1090
|
+
className: a`
|
|
1091
1091
|
display: grid;
|
|
1092
1092
|
gap: 1rem;
|
|
1093
1093
|
place-items: center;
|
|
@@ -1100,24 +1100,24 @@ const Ie = fe({
|
|
|
1100
1100
|
fallbackOnBody: !0,
|
|
1101
1101
|
list: (e == null ? void 0 : e.children) ?? [],
|
|
1102
1102
|
setList: (c) => {
|
|
1103
|
-
var
|
|
1104
|
-
const
|
|
1105
|
-
|
|
1103
|
+
var y, g;
|
|
1104
|
+
const w = c.map((M) => M.id), x = (g = (y = l.find((M) => M.id === (e == null ? void 0 : e.id))) == null ? void 0 : y.children) == null ? void 0 : g.map((M) => M.id);
|
|
1105
|
+
w.length === (x == null ? void 0 : x.length) && w.every((M, C) => M === x[C]) || w.length < ((x == null ? void 0 : x.length) ?? 0) || n(c, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
|
|
1106
1106
|
},
|
|
1107
|
-
onMove: () => (
|
|
1107
|
+
onMove: () => (i(null), d("onMove"), !0),
|
|
1108
1108
|
onStart: (c) => {
|
|
1109
|
-
const
|
|
1110
|
-
|
|
1109
|
+
const w = c.item.dataset;
|
|
1110
|
+
w != null && w.id && p(w.id), d("onMove");
|
|
1111
1111
|
},
|
|
1112
1112
|
onEnd: () => {
|
|
1113
|
-
p(null),
|
|
1113
|
+
p(null), i(null), d(null);
|
|
1114
1114
|
},
|
|
1115
1115
|
ghostClass: Me,
|
|
1116
|
-
children: u.map((c,
|
|
1117
|
-
|
|
1116
|
+
children: u.map((c, w) => /* @__PURE__ */ o(
|
|
1117
|
+
ue,
|
|
1118
1118
|
{
|
|
1119
1119
|
data: c,
|
|
1120
|
-
itemIndex:
|
|
1120
|
+
itemIndex: w,
|
|
1121
1121
|
onClick: t
|
|
1122
1122
|
},
|
|
1123
1123
|
c.id
|
|
@@ -1128,9 +1128,9 @@ const Ie = fe({
|
|
|
1128
1128
|
)
|
|
1129
1129
|
}
|
|
1130
1130
|
);
|
|
1131
|
-
}, Fo = (
|
|
1131
|
+
}, Fo = (s) => {
|
|
1132
1132
|
var t;
|
|
1133
|
-
const { data: e, onClose: r } =
|
|
1133
|
+
const { data: e, onClose: r } = s;
|
|
1134
1134
|
return /* @__PURE__ */ o(
|
|
1135
1135
|
ke,
|
|
1136
1136
|
{
|
|
@@ -1146,32 +1146,32 @@ const Ie = fe({
|
|
|
1146
1146
|
} : null,
|
|
1147
1147
|
footer: null,
|
|
1148
1148
|
title: ((t = e == null ? void 0 : e.data) == null ? void 0 : t.name) ?? "信息",
|
|
1149
|
-
children: e && /* @__PURE__ */
|
|
1149
|
+
children: e && /* @__PURE__ */ G("div", { children: [
|
|
1150
1150
|
/* @__PURE__ */ o("div", { className: "mb-2", children: "开发者信息" }),
|
|
1151
|
-
/* @__PURE__ */ o("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ o(
|
|
1151
|
+
/* @__PURE__ */ o("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ o(_e, { src: e, theme: "monokai" }) })
|
|
1152
1152
|
] })
|
|
1153
1153
|
}
|
|
1154
1154
|
);
|
|
1155
|
-
},
|
|
1155
|
+
}, Xo = (s) => {
|
|
1156
1156
|
const {
|
|
1157
1157
|
pagination: e = { position: "bottom" },
|
|
1158
1158
|
className: r,
|
|
1159
1159
|
sliderProps: t,
|
|
1160
1160
|
sliderRef: l,
|
|
1161
1161
|
onItemClick: n
|
|
1162
|
-
} =
|
|
1163
|
-
list:
|
|
1162
|
+
} = s, d = te(null), p = te(null), {
|
|
1163
|
+
list: i,
|
|
1164
1164
|
setList: v,
|
|
1165
|
-
setListStatus:
|
|
1165
|
+
setListStatus: I,
|
|
1166
1166
|
showInfoItemData: R,
|
|
1167
|
-
setShowInfoItemData:
|
|
1167
|
+
setShowInfoItemData: N,
|
|
1168
1168
|
openGroupItemData: A,
|
|
1169
1169
|
setOpenGroupItemData: L,
|
|
1170
1170
|
setMoveItemId: u,
|
|
1171
1171
|
setMoveTargetId: c,
|
|
1172
|
-
addItem:
|
|
1173
|
-
} = Z(), { pagingDotBuilder: x, pagingDotsBuilder:
|
|
1174
|
-
top:
|
|
1172
|
+
addItem: w
|
|
1173
|
+
} = Z(), { pagingDotBuilder: x, pagingDotsBuilder: y, itemBuilder: g } = K(), M = ae(() => e === !1 ? {} : {
|
|
1174
|
+
top: a`
|
|
1175
1175
|
display: flex;
|
|
1176
1176
|
flex-direction: column;
|
|
1177
1177
|
.slick-list {
|
|
@@ -1181,12 +1181,12 @@ const Ie = fe({
|
|
|
1181
1181
|
position: static;
|
|
1182
1182
|
}
|
|
1183
1183
|
`,
|
|
1184
|
-
bottom:
|
|
1184
|
+
bottom: a`
|
|
1185
1185
|
.slick-dots {
|
|
1186
1186
|
position: static;
|
|
1187
1187
|
}
|
|
1188
1188
|
`,
|
|
1189
|
-
left:
|
|
1189
|
+
left: a`
|
|
1190
1190
|
.slick-dots {
|
|
1191
1191
|
position: absolute;
|
|
1192
1192
|
width: auto;
|
|
@@ -1202,7 +1202,7 @@ const Ie = fe({
|
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
1204
|
`,
|
|
1205
|
-
right:
|
|
1205
|
+
right: a`
|
|
1206
1206
|
.slick-dots {
|
|
1207
1207
|
position: absolute;
|
|
1208
1208
|
width: auto;
|
|
@@ -1219,9 +1219,9 @@ const Ie = fe({
|
|
|
1219
1219
|
}
|
|
1220
1220
|
`
|
|
1221
1221
|
}[e.position ?? "bottom"], [e]);
|
|
1222
|
-
return /* @__PURE__ */
|
|
1222
|
+
return /* @__PURE__ */ G(ce, { children: [
|
|
1223
1223
|
/* @__PURE__ */ o(
|
|
1224
|
-
|
|
1224
|
+
je,
|
|
1225
1225
|
{
|
|
1226
1226
|
useCSS: !0,
|
|
1227
1227
|
useTransform: !0,
|
|
@@ -1231,9 +1231,9 @@ const Ie = fe({
|
|
|
1231
1231
|
dots: !0,
|
|
1232
1232
|
touchMove: !1,
|
|
1233
1233
|
lazyLoad: "anticipated",
|
|
1234
|
-
className:
|
|
1235
|
-
|
|
1236
|
-
|
|
1234
|
+
className: B(
|
|
1235
|
+
M,
|
|
1236
|
+
a`
|
|
1237
1237
|
.slick-track {
|
|
1238
1238
|
display: flex;
|
|
1239
1239
|
align-items: stretch;
|
|
@@ -1251,26 +1251,26 @@ const Ie = fe({
|
|
|
1251
1251
|
`,
|
|
1252
1252
|
r
|
|
1253
1253
|
),
|
|
1254
|
-
customPaging: (
|
|
1255
|
-
var
|
|
1256
|
-
return x ? x(
|
|
1254
|
+
customPaging: (C) => {
|
|
1255
|
+
var m, h;
|
|
1256
|
+
return x ? x(i[C], C) : /* @__PURE__ */ o(
|
|
1257
1257
|
"div",
|
|
1258
1258
|
{
|
|
1259
1259
|
onDragEnter: () => {
|
|
1260
|
-
var
|
|
1261
|
-
(
|
|
1260
|
+
var E;
|
|
1261
|
+
(E = (l ?? d).current) == null || E.slickGoTo(C);
|
|
1262
1262
|
},
|
|
1263
|
-
children: (h = (
|
|
1263
|
+
children: (h = (m = i[C]) == null ? void 0 : m.data) == null ? void 0 : h.name
|
|
1264
1264
|
}
|
|
1265
1265
|
);
|
|
1266
1266
|
},
|
|
1267
|
-
appendDots: (
|
|
1267
|
+
appendDots: (C) => y ? y(C) : e === !1 ? /* @__PURE__ */ o("div", {}) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
1268
1268
|
"ul",
|
|
1269
1269
|
{
|
|
1270
1270
|
ref: p,
|
|
1271
|
-
className:
|
|
1271
|
+
className: B(
|
|
1272
1272
|
"slick-dots-default",
|
|
1273
|
-
|
|
1273
|
+
a`
|
|
1274
1274
|
padding: 0.5rem;
|
|
1275
1275
|
display: inline-flex;
|
|
1276
1276
|
justify-content: center;
|
|
@@ -1291,31 +1291,31 @@ const Ie = fe({
|
|
|
1291
1291
|
}
|
|
1292
1292
|
`
|
|
1293
1293
|
),
|
|
1294
|
-
children:
|
|
1294
|
+
children: C
|
|
1295
1295
|
}
|
|
1296
1296
|
) }),
|
|
1297
1297
|
...t,
|
|
1298
|
-
children:
|
|
1298
|
+
children: i.map((C) => /* @__PURE__ */ o(
|
|
1299
1299
|
"div",
|
|
1300
1300
|
{
|
|
1301
|
-
onDrop: (
|
|
1302
|
-
|
|
1303
|
-
const h =
|
|
1301
|
+
onDrop: (m) => {
|
|
1302
|
+
m.preventDefault();
|
|
1303
|
+
const h = m.dataTransfer.getData("text/plain");
|
|
1304
1304
|
if (h !== "")
|
|
1305
1305
|
try {
|
|
1306
|
-
|
|
1307
|
-
} catch (
|
|
1308
|
-
console.log("drag error",
|
|
1306
|
+
w(JSON.parse(h), [C.id]);
|
|
1307
|
+
} catch (E) {
|
|
1308
|
+
console.log("drag error", E);
|
|
1309
1309
|
}
|
|
1310
1310
|
},
|
|
1311
|
-
onDragOver: (
|
|
1312
|
-
|
|
1311
|
+
onDragOver: (m) => {
|
|
1312
|
+
m.preventDefault();
|
|
1313
1313
|
},
|
|
1314
1314
|
children: /* @__PURE__ */ o(
|
|
1315
1315
|
de,
|
|
1316
1316
|
{
|
|
1317
|
-
className:
|
|
1318
|
-
|
|
1317
|
+
className: B(
|
|
1318
|
+
a`
|
|
1319
1319
|
display: grid;
|
|
1320
1320
|
transition: all 0.3s;
|
|
1321
1321
|
grid-template-columns: repeat(auto-fill, 96px);
|
|
@@ -1330,58 +1330,58 @@ const Ie = fe({
|
|
|
1330
1330
|
fallbackOnBody: !0,
|
|
1331
1331
|
swapThreshold: 0.65,
|
|
1332
1332
|
group: "nested",
|
|
1333
|
-
list:
|
|
1334
|
-
setList: (
|
|
1333
|
+
list: C.children ?? [],
|
|
1334
|
+
setList: (m) => v(m, [C.id]),
|
|
1335
1335
|
filter: ".drag-disabled",
|
|
1336
|
-
onMove: (
|
|
1337
|
-
|
|
1338
|
-
const { dragged: h, related:
|
|
1339
|
-
return c(null), !((Object.keys(
|
|
1336
|
+
onMove: (m) => {
|
|
1337
|
+
I("onMove");
|
|
1338
|
+
const { dragged: h, related: E } = m, V = h.dataset, j = E.dataset;
|
|
1339
|
+
return c(null), !((Object.keys(j).length === 0 || j.parentIds) && Number(V.childrenLength) > 0 && E.classList.contains("sortable-group-item"));
|
|
1340
1340
|
},
|
|
1341
|
-
onStart: (
|
|
1342
|
-
const h =
|
|
1343
|
-
h != null && h.id && u(h.id),
|
|
1341
|
+
onStart: (m) => {
|
|
1342
|
+
const h = m.item.dataset;
|
|
1343
|
+
h != null && h.id && u(h.id), I("onMove");
|
|
1344
1344
|
},
|
|
1345
1345
|
onEnd: () => {
|
|
1346
|
-
u(null), c(null),
|
|
1346
|
+
u(null), c(null), I(null);
|
|
1347
1347
|
},
|
|
1348
1348
|
ghostClass: Me,
|
|
1349
|
-
children: (
|
|
1350
|
-
let
|
|
1351
|
-
if (
|
|
1352
|
-
return m
|
|
1353
|
-
switch (
|
|
1349
|
+
children: (C.children ?? []).map((m, h) => {
|
|
1350
|
+
let E;
|
|
1351
|
+
if (g)
|
|
1352
|
+
return g(m);
|
|
1353
|
+
switch (m.type) {
|
|
1354
1354
|
case "group":
|
|
1355
1355
|
case "app":
|
|
1356
|
-
|
|
1357
|
-
|
|
1356
|
+
E = /* @__PURE__ */ o(
|
|
1357
|
+
jo,
|
|
1358
1358
|
{
|
|
1359
|
-
data:
|
|
1359
|
+
data: m,
|
|
1360
1360
|
itemIndex: h,
|
|
1361
|
-
parentIds: [
|
|
1361
|
+
parentIds: [C.id, m.id],
|
|
1362
1362
|
onClick: n
|
|
1363
1363
|
},
|
|
1364
|
-
|
|
1364
|
+
m.id
|
|
1365
1365
|
);
|
|
1366
1366
|
break;
|
|
1367
1367
|
default:
|
|
1368
|
-
|
|
1369
|
-
|
|
1368
|
+
E = /* @__PURE__ */ o(
|
|
1369
|
+
ue,
|
|
1370
1370
|
{
|
|
1371
|
-
data:
|
|
1371
|
+
data: m,
|
|
1372
1372
|
itemIndex: h,
|
|
1373
1373
|
onClick: n
|
|
1374
1374
|
},
|
|
1375
|
-
|
|
1375
|
+
m.id
|
|
1376
1376
|
);
|
|
1377
1377
|
break;
|
|
1378
1378
|
}
|
|
1379
|
-
return
|
|
1379
|
+
return E;
|
|
1380
1380
|
})
|
|
1381
1381
|
}
|
|
1382
1382
|
)
|
|
1383
1383
|
},
|
|
1384
|
-
|
|
1384
|
+
C.id
|
|
1385
1385
|
))
|
|
1386
1386
|
}
|
|
1387
1387
|
),
|
|
@@ -1390,12 +1390,12 @@ const Ie = fe({
|
|
|
1390
1390
|
{
|
|
1391
1391
|
data: R,
|
|
1392
1392
|
onClose: () => {
|
|
1393
|
-
|
|
1393
|
+
N(null);
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
),
|
|
1397
1397
|
/* @__PURE__ */ o(
|
|
1398
|
-
|
|
1398
|
+
Ho,
|
|
1399
1399
|
{
|
|
1400
1400
|
data: A,
|
|
1401
1401
|
onClose: () => {
|
|
@@ -1405,7 +1405,7 @@ const Ie = fe({
|
|
|
1405
1405
|
}
|
|
1406
1406
|
)
|
|
1407
1407
|
] });
|
|
1408
|
-
},
|
|
1408
|
+
}, wt = (s) => {
|
|
1409
1409
|
const {
|
|
1410
1410
|
list: e,
|
|
1411
1411
|
onChange: r,
|
|
@@ -1414,13 +1414,13 @@ const Ie = fe({
|
|
|
1414
1414
|
theme: n,
|
|
1415
1415
|
noLetters: d,
|
|
1416
1416
|
contextMenu: p,
|
|
1417
|
-
contextMenuBuilder:
|
|
1417
|
+
contextMenuBuilder: i,
|
|
1418
1418
|
itemBuilder: v,
|
|
1419
|
-
itemIconBuilder:
|
|
1419
|
+
itemIconBuilder: I,
|
|
1420
1420
|
pagingDotBuilder: R,
|
|
1421
|
-
pagingDotsBuilder:
|
|
1421
|
+
pagingDotsBuilder: N,
|
|
1422
1422
|
...A
|
|
1423
|
-
} =
|
|
1423
|
+
} = s;
|
|
1424
1424
|
return /* @__PURE__ */ o(Lo, { ...{
|
|
1425
1425
|
list: e,
|
|
1426
1426
|
onChange: r,
|
|
@@ -1430,13 +1430,13 @@ const Ie = fe({
|
|
|
1430
1430
|
theme: n,
|
|
1431
1431
|
noLetters: d,
|
|
1432
1432
|
contextMenu: p,
|
|
1433
|
-
pagingDotsBuilder:
|
|
1433
|
+
pagingDotsBuilder: N,
|
|
1434
1434
|
pagingDotBuilder: R,
|
|
1435
1435
|
itemBuilder: v,
|
|
1436
|
-
itemIconBuilder:
|
|
1437
|
-
contextMenuBuilder:
|
|
1438
|
-
}, children: /* @__PURE__ */ o(
|
|
1439
|
-
},
|
|
1436
|
+
itemIconBuilder: I,
|
|
1437
|
+
contextMenuBuilder: i
|
|
1438
|
+
}, children: /* @__PURE__ */ o(Xo, { ...A }) }) });
|
|
1439
|
+
}, Go = {
|
|
1440
1440
|
frontmatterEditor: {
|
|
1441
1441
|
title: "编辑前置元数据",
|
|
1442
1442
|
key: "键",
|
|
@@ -1553,15 +1553,70 @@ const Ie = fe({
|
|
|
1553
1553
|
image: {
|
|
1554
1554
|
delete: "删除图片"
|
|
1555
1555
|
}
|
|
1556
|
-
}, qo = (
|
|
1557
|
-
const l =
|
|
1556
|
+
}, qo = (s, e, r) => {
|
|
1557
|
+
const l = s.split(".").reduce(
|
|
1558
1558
|
(n, d) => typeof n == "string" ? n : n[d],
|
|
1559
|
-
|
|
1559
|
+
Go
|
|
1560
1560
|
);
|
|
1561
1561
|
return typeof l != "string" ? e : r ? l.replace(/{{(.*?)}}/g, (n, d) => r[d]) : l;
|
|
1562
|
-
}, Yo =
|
|
1562
|
+
}, Yo = a`
|
|
1563
|
+
--accentBase: var(--tomato-1);
|
|
1564
|
+
--accentBgSubtle: var(--tomato-2);
|
|
1565
|
+
--accentBg: var(--tomato-3);
|
|
1566
|
+
--accentBgHover: var(--tomato-4);
|
|
1567
|
+
--accentBgActive: var(--tomato-5);
|
|
1568
|
+
--accentLine: var(--tomato-6);
|
|
1569
|
+
--accentBorder: var(--tomato-7);
|
|
1570
|
+
--accentBorderHover: var(--tomato-8);
|
|
1571
|
+
--accentSolid: var(--tomato-9);
|
|
1572
|
+
--accentSolidHover: var(--tomato-10);
|
|
1573
|
+
--accentText: var(--tomato-11);
|
|
1574
|
+
--accentTextContrast: var(--tomato-12);
|
|
1575
|
+
|
|
1576
|
+
--baseBase: var(--mauve-1);
|
|
1577
|
+
--baseBgSubtle: var(--mauve-2);
|
|
1578
|
+
--baseBg: var(--mauve-3);
|
|
1579
|
+
--baseBgHover: var(--mauve-4);
|
|
1580
|
+
--baseBgActive: var(--mauve-5);
|
|
1581
|
+
--baseLine: var(--mauve-6);
|
|
1582
|
+
--baseBorder: var(--mauve-7);
|
|
1583
|
+
--baseBorderHover: var(--mauve-8);
|
|
1584
|
+
--baseSolid: var(--mauve-9);
|
|
1585
|
+
--baseSolidHover: var(--mauve-10);
|
|
1586
|
+
--baseText: var(--mauve-11);
|
|
1587
|
+
--baseTextContrast: var(--mauve-12);
|
|
1588
|
+
|
|
1589
|
+
--admonitionTipBg: var(--cyan-4);
|
|
1590
|
+
--admonitionTipBorder: var(--cyan-8);
|
|
1591
|
+
|
|
1592
|
+
--admonitionInfoBg: var(--grass-4);
|
|
1593
|
+
--admonitionInfoBorder: var(--grass-8);
|
|
1594
|
+
|
|
1595
|
+
--admonitionCautionBg: var(--amber-4);
|
|
1596
|
+
--admonitionCautionBorder: var(--amber-8);
|
|
1597
|
+
|
|
1598
|
+
--admonitionDangerBg: var(--red-4);
|
|
1599
|
+
--admonitionDangerBorder: var(--red-8);
|
|
1600
|
+
|
|
1601
|
+
--admonitionNoteBg: var(--mauve-4);
|
|
1602
|
+
--admonitionNoteBorder: var(--mauve-8);
|
|
1603
|
+
|
|
1604
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
1605
|
+
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
|
1606
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
1607
|
+
"Liberation Mono", "Courier New", monospace;
|
|
1608
|
+
|
|
1609
|
+
color: var(--baseText);
|
|
1610
|
+
--basePageBg: #000000;
|
|
1611
|
+
background-color: var(--basePageBg);
|
|
1612
|
+
background-image: linear-gradient(
|
|
1613
|
+
rgba(255, 255, 255, 0.05),
|
|
1614
|
+
rgba(255, 255, 255, 0.05)
|
|
1615
|
+
);
|
|
1616
|
+
`, Oo = a`
|
|
1563
1617
|
[class*="_toolbarRoot"] {
|
|
1564
1618
|
flex-wrap: wrap;
|
|
1619
|
+
transition: all 0.3s;
|
|
1565
1620
|
}
|
|
1566
1621
|
[class*="_codeMirrorWrapper"] {
|
|
1567
1622
|
padding: 0;
|
|
@@ -1628,9 +1683,9 @@ const Ie = fe({
|
|
|
1628
1683
|
margin-bottom: 0;
|
|
1629
1684
|
}
|
|
1630
1685
|
}
|
|
1631
|
-
`, Se =
|
|
1686
|
+
`, Se = B(
|
|
1632
1687
|
"markdown-body",
|
|
1633
|
-
|
|
1688
|
+
a`
|
|
1634
1689
|
p {
|
|
1635
1690
|
margin-bottom: 8px;
|
|
1636
1691
|
}
|
|
@@ -1651,7 +1706,113 @@ const Ie = fe({
|
|
|
1651
1706
|
}
|
|
1652
1707
|
}
|
|
1653
1708
|
`
|
|
1654
|
-
),
|
|
1709
|
+
), Uo = a`
|
|
1710
|
+
/* light */
|
|
1711
|
+
color-scheme: light;
|
|
1712
|
+
--focus-outlineColor: #0969da;
|
|
1713
|
+
--fgColor-default: #1f2328;
|
|
1714
|
+
--fgColor-muted: #59636e;
|
|
1715
|
+
--fgColor-accent: #0969da;
|
|
1716
|
+
--fgColor-success: #1a7f37;
|
|
1717
|
+
--fgColor-attention: #9a6700;
|
|
1718
|
+
--fgColor-danger: #d1242f;
|
|
1719
|
+
--fgColor-done: #8250df;
|
|
1720
|
+
--bgColor-default: #ffffff;
|
|
1721
|
+
--bgColor-muted: #f6f8fa;
|
|
1722
|
+
--bgColor-neutral-muted: #818b981f;
|
|
1723
|
+
--bgColor-attention-muted: #fff8c5;
|
|
1724
|
+
--borderColor-default: #d1d9e0;
|
|
1725
|
+
--borderColor-muted: #d1d9e0b3;
|
|
1726
|
+
--borderColor-neutral-muted: #d1d9e0b3;
|
|
1727
|
+
--borderColor-accent-emphasis: #0969da;
|
|
1728
|
+
--borderColor-success-emphasis: #1a7f37;
|
|
1729
|
+
--borderColor-attention-emphasis: #9a6700;
|
|
1730
|
+
--borderColor-danger-emphasis: #cf222e;
|
|
1731
|
+
--borderColor-done-emphasis: #8250df;
|
|
1732
|
+
--color-prettylights-syntax-comment: #59636e;
|
|
1733
|
+
--color-prettylights-syntax-constant: #0550ae;
|
|
1734
|
+
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
|
|
1735
|
+
--color-prettylights-syntax-entity: #6639ba;
|
|
1736
|
+
--color-prettylights-syntax-storage-modifier-import: #1f2328;
|
|
1737
|
+
--color-prettylights-syntax-entity-tag: #0550ae;
|
|
1738
|
+
--color-prettylights-syntax-keyword: #cf222e;
|
|
1739
|
+
--color-prettylights-syntax-string: #0a3069;
|
|
1740
|
+
--color-prettylights-syntax-variable: #953800;
|
|
1741
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
|
|
1742
|
+
--color-prettylights-syntax-brackethighlighter-angle: #59636e;
|
|
1743
|
+
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
|
|
1744
|
+
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
|
|
1745
|
+
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
|
|
1746
|
+
--color-prettylights-syntax-carriage-return-bg: #cf222e;
|
|
1747
|
+
--color-prettylights-syntax-string-regexp: #116329;
|
|
1748
|
+
--color-prettylights-syntax-markup-list: #3b2300;
|
|
1749
|
+
--color-prettylights-syntax-markup-heading: #0550ae;
|
|
1750
|
+
--color-prettylights-syntax-markup-italic: #1f2328;
|
|
1751
|
+
--color-prettylights-syntax-markup-bold: #1f2328;
|
|
1752
|
+
--color-prettylights-syntax-markup-deleted-text: #82071e;
|
|
1753
|
+
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
|
|
1754
|
+
--color-prettylights-syntax-markup-inserted-text: #116329;
|
|
1755
|
+
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
|
|
1756
|
+
--color-prettylights-syntax-markup-changed-text: #953800;
|
|
1757
|
+
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
|
|
1758
|
+
--color-prettylights-syntax-markup-ignored-text: #d1d9e0;
|
|
1759
|
+
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
|
|
1760
|
+
--color-prettylights-syntax-meta-diff-range: #8250df;
|
|
1761
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
|
|
1762
|
+
`, Vo = a`
|
|
1763
|
+
/* dark */
|
|
1764
|
+
color-scheme: dark;
|
|
1765
|
+
--focus-outlineColor: #1f6feb;
|
|
1766
|
+
--fgColor-default: #f0f6fc;
|
|
1767
|
+
--fgColor-muted: #9198a1;
|
|
1768
|
+
--fgColor-accent: #4493f8;
|
|
1769
|
+
--fgColor-success: #3fb950;
|
|
1770
|
+
--fgColor-attention: #d29922;
|
|
1771
|
+
--fgColor-danger: #f85149;
|
|
1772
|
+
--fgColor-done: #ab7df8;
|
|
1773
|
+
--bgColor-default: #0d1117;
|
|
1774
|
+
--bgColor-muted: #151b23;
|
|
1775
|
+
--bgColor-neutral-muted: #656c7633;
|
|
1776
|
+
--bgColor-attention-muted: #bb800926;
|
|
1777
|
+
--borderColor-default: #3d444d;
|
|
1778
|
+
--borderColor-muted: #3d444db3;
|
|
1779
|
+
--borderColor-neutral-muted: #3d444db3;
|
|
1780
|
+
--borderColor-accent-emphasis: #1f6feb;
|
|
1781
|
+
--borderColor-success-emphasis: #238636;
|
|
1782
|
+
--borderColor-attention-emphasis: #9e6a03;
|
|
1783
|
+
--borderColor-danger-emphasis: #da3633;
|
|
1784
|
+
--borderColor-done-emphasis: #8957e5;
|
|
1785
|
+
--color-prettylights-syntax-comment: #9198a1;
|
|
1786
|
+
--color-prettylights-syntax-constant: #79c0ff;
|
|
1787
|
+
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
|
|
1788
|
+
--color-prettylights-syntax-entity: #d2a8ff;
|
|
1789
|
+
--color-prettylights-syntax-storage-modifier-import: #f0f6fc;
|
|
1790
|
+
--color-prettylights-syntax-entity-tag: #7ee787;
|
|
1791
|
+
--color-prettylights-syntax-keyword: #ff7b72;
|
|
1792
|
+
--color-prettylights-syntax-string: #a5d6ff;
|
|
1793
|
+
--color-prettylights-syntax-variable: #ffa657;
|
|
1794
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
|
|
1795
|
+
--color-prettylights-syntax-brackethighlighter-angle: #9198a1;
|
|
1796
|
+
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
|
|
1797
|
+
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
|
|
1798
|
+
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
|
|
1799
|
+
--color-prettylights-syntax-carriage-return-bg: #b62324;
|
|
1800
|
+
--color-prettylights-syntax-string-regexp: #7ee787;
|
|
1801
|
+
--color-prettylights-syntax-markup-list: #f2cc60;
|
|
1802
|
+
--color-prettylights-syntax-markup-heading: #1f6feb;
|
|
1803
|
+
--color-prettylights-syntax-markup-italic: #f0f6fc;
|
|
1804
|
+
--color-prettylights-syntax-markup-bold: #f0f6fc;
|
|
1805
|
+
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
|
|
1806
|
+
--color-prettylights-syntax-markup-deleted-bg: #67060c;
|
|
1807
|
+
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
|
|
1808
|
+
--color-prettylights-syntax-markup-inserted-bg: #033a16;
|
|
1809
|
+
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
|
|
1810
|
+
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
|
|
1811
|
+
--color-prettylights-syntax-markup-ignored-text: #f0f6fc;
|
|
1812
|
+
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
|
|
1813
|
+
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
|
|
1814
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;
|
|
1815
|
+
`, _o = {
|
|
1655
1816
|
'code[class*="language-"]': {
|
|
1656
1817
|
background: "hsl(230, 1%, 98%)",
|
|
1657
1818
|
color: "hsl(230, 8%, 24%)",
|
|
@@ -2139,42 +2300,50 @@ const Ie = fe({
|
|
|
2139
2300
|
".prism-previewer-easing.prism-previewer-easing line": {
|
|
2140
2301
|
stroke: "hsl(230, 8%, 24%)"
|
|
2141
2302
|
}
|
|
2142
|
-
},
|
|
2143
|
-
const { children: e = "", className: r } =
|
|
2303
|
+
}, Wo = (s) => {
|
|
2304
|
+
const { children: e = "", className: r } = s;
|
|
2144
2305
|
return /* @__PURE__ */ o(
|
|
2145
2306
|
Mo,
|
|
2146
2307
|
{
|
|
2147
|
-
className:
|
|
2308
|
+
className: B(Se, r),
|
|
2148
2309
|
remarkPlugins: [So, To],
|
|
2149
|
-
rehypePlugins: [
|
|
2310
|
+
rehypePlugins: [Bo],
|
|
2150
2311
|
components: {
|
|
2151
2312
|
code(t) {
|
|
2152
|
-
const { children: l, className: n, node: d, ref: p, ...
|
|
2313
|
+
const { children: l, className: n, node: d, ref: p, ...i } = t, v = /language-(\w+)/.exec(n || "");
|
|
2153
2314
|
return v ? /* @__PURE__ */ o(
|
|
2154
|
-
|
|
2315
|
+
No,
|
|
2155
2316
|
{
|
|
2156
|
-
...
|
|
2317
|
+
...i,
|
|
2157
2318
|
PreTag: "div",
|
|
2158
2319
|
children: String(l).replace(/\n$/, ""),
|
|
2159
2320
|
language: v[1],
|
|
2160
|
-
style:
|
|
2321
|
+
style: _o
|
|
2161
2322
|
}
|
|
2162
|
-
) : /* @__PURE__ */ o("code", { ...
|
|
2323
|
+
) : /* @__PURE__ */ o("code", { ...i, className: n, children: l });
|
|
2163
2324
|
}
|
|
2164
2325
|
},
|
|
2165
2326
|
children: e
|
|
2166
2327
|
}
|
|
2167
2328
|
);
|
|
2168
|
-
},
|
|
2169
|
-
const {
|
|
2170
|
-
|
|
2171
|
-
|
|
2329
|
+
}, Jo = (s) => {
|
|
2330
|
+
const {
|
|
2331
|
+
value: e,
|
|
2332
|
+
onChange: r,
|
|
2333
|
+
translation: t,
|
|
2334
|
+
pluginConfig: l,
|
|
2335
|
+
className: n,
|
|
2336
|
+
theme: d = "auto",
|
|
2337
|
+
...p
|
|
2338
|
+
} = s, i = te(null), {
|
|
2339
|
+
image: v,
|
|
2340
|
+
diffSource: I = {
|
|
2172
2341
|
viewMode: "rich-text"
|
|
2173
2342
|
},
|
|
2174
|
-
headings:
|
|
2175
|
-
link:
|
|
2176
|
-
codeBlock:
|
|
2177
|
-
codeMirror:
|
|
2343
|
+
headings: R,
|
|
2344
|
+
link: N,
|
|
2345
|
+
codeBlock: A,
|
|
2346
|
+
codeMirror: L = {
|
|
2178
2347
|
codeBlockLanguages: {
|
|
2179
2348
|
js: "JavaScript",
|
|
2180
2349
|
css: "CSS",
|
|
@@ -2183,27 +2352,37 @@ const Ie = fe({
|
|
|
2183
2352
|
"": "Unspecified"
|
|
2184
2353
|
}
|
|
2185
2354
|
},
|
|
2186
|
-
directives:
|
|
2355
|
+
directives: u = {
|
|
2187
2356
|
directiveDescriptors: [Io]
|
|
2188
2357
|
}
|
|
2189
|
-
} = l ?? {}, [
|
|
2190
|
-
|
|
2191
|
-
var
|
|
2192
|
-
e !== void 0 &&
|
|
2193
|
-
}, [e,
|
|
2358
|
+
} = l ?? {}, [c, w] = F("");
|
|
2359
|
+
oe(() => {
|
|
2360
|
+
var y;
|
|
2361
|
+
e !== void 0 && i.current && ((y = i.current) == null || y.setMarkdown(e), w(e));
|
|
2362
|
+
}, [e, i]);
|
|
2363
|
+
const x = () => {
|
|
2364
|
+
var y, g;
|
|
2365
|
+
return d === "dark" ? !0 : d === "light" ? !1 : (y = document.documentElement.getAttribute("style")) != null && y.includes("color-scheme: dark;") ? !0 : (g = document.documentElement.getAttribute("style")) != null && g.includes("color-scheme: light;") ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2366
|
+
};
|
|
2367
|
+
return /* @__PURE__ */ o(
|
|
2194
2368
|
We,
|
|
2195
2369
|
{
|
|
2196
|
-
ref:
|
|
2197
|
-
className:
|
|
2370
|
+
ref: i,
|
|
2371
|
+
className: B(
|
|
2372
|
+
Oo,
|
|
2373
|
+
x() ? Yo : "",
|
|
2374
|
+
x() ? Vo : Uo,
|
|
2375
|
+
n
|
|
2376
|
+
),
|
|
2198
2377
|
contentEditableClassName: Se,
|
|
2199
|
-
markdown:
|
|
2200
|
-
onChange: (
|
|
2201
|
-
!e && !r &&
|
|
2378
|
+
markdown: c,
|
|
2379
|
+
onChange: (y) => {
|
|
2380
|
+
!e && !r && w(y), r && r(y);
|
|
2202
2381
|
},
|
|
2203
2382
|
translation: t ?? qo,
|
|
2204
2383
|
plugins: [
|
|
2205
2384
|
Je({
|
|
2206
|
-
toolbarContents: () => /* @__PURE__ */
|
|
2385
|
+
toolbarContents: () => /* @__PURE__ */ G(Ke, { options: ["rich-text", "source"], children: [
|
|
2207
2386
|
/* @__PURE__ */ o(Ze, {}),
|
|
2208
2387
|
/* @__PURE__ */ o(J, {}),
|
|
2209
2388
|
/* @__PURE__ */ o(Qe, {}),
|
|
@@ -2216,47 +2395,47 @@ const Ie = fe({
|
|
|
2216
2395
|
/* @__PURE__ */ o(ro, {}),
|
|
2217
2396
|
/* @__PURE__ */ o(no, {}),
|
|
2218
2397
|
/* @__PURE__ */ o(J, {}),
|
|
2219
|
-
/* @__PURE__ */ o(lo, {}),
|
|
2220
2398
|
/* @__PURE__ */ o(ao, {}),
|
|
2399
|
+
/* @__PURE__ */ o(lo, {}),
|
|
2221
2400
|
/* @__PURE__ */ o(J, {}),
|
|
2222
2401
|
/* @__PURE__ */ o(io, {}),
|
|
2223
2402
|
/* @__PURE__ */ o(J, {}),
|
|
2224
2403
|
/* @__PURE__ */ o(so, {})
|
|
2225
2404
|
] })
|
|
2226
2405
|
}),
|
|
2227
|
-
co(
|
|
2406
|
+
co(I),
|
|
2407
|
+
go(),
|
|
2228
2408
|
uo(),
|
|
2229
|
-
mo(),
|
|
2230
|
-
|
|
2231
|
-
po(C),
|
|
2409
|
+
mo(R),
|
|
2410
|
+
po(N),
|
|
2232
2411
|
ho(),
|
|
2233
|
-
fo(
|
|
2412
|
+
fo(v),
|
|
2234
2413
|
bo(),
|
|
2235
2414
|
ko(),
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2415
|
+
xo(),
|
|
2416
|
+
vo(A),
|
|
2417
|
+
yo(L),
|
|
2418
|
+
wo(),
|
|
2419
|
+
Co(u)
|
|
2241
2420
|
],
|
|
2242
|
-
...
|
|
2421
|
+
...p
|
|
2243
2422
|
}
|
|
2244
2423
|
);
|
|
2245
|
-
},
|
|
2246
|
-
|
|
2247
|
-
function Te(...
|
|
2248
|
-
return $o(Do(
|
|
2424
|
+
}, Ko = Jo;
|
|
2425
|
+
Ko.Preview = Wo;
|
|
2426
|
+
function Te(...s) {
|
|
2427
|
+
return $o(Do(s));
|
|
2249
2428
|
}
|
|
2250
|
-
const
|
|
2251
|
-
const { mouseX: e, title: r, icon: t, href: l } =
|
|
2252
|
-
var
|
|
2253
|
-
const x = ((
|
|
2254
|
-
return
|
|
2255
|
-
}), p = ee(d, [-150, 0, 150], [40, 80, 40]),
|
|
2429
|
+
const Zo = (s) => {
|
|
2430
|
+
const { mouseX: e, title: r, icon: t, href: l } = s, n = te(null), d = ee(e, (w) => {
|
|
2431
|
+
var y;
|
|
2432
|
+
const x = ((y = n.current) == null ? void 0 : y.getBoundingClientRect()) ?? { x: 0, width: 0 };
|
|
2433
|
+
return w - x.x - x.width / 2;
|
|
2434
|
+
}), p = ee(d, [-150, 0, 150], [40, 80, 40]), i = ee(d, [-150, 0, 150], [40, 80, 40]), v = ee(
|
|
2256
2435
|
d,
|
|
2257
2436
|
[-150, 0, 150],
|
|
2258
2437
|
[20, 40, 20]
|
|
2259
|
-
),
|
|
2438
|
+
), I = ee(
|
|
2260
2439
|
d,
|
|
2261
2440
|
[-150, 0, 150],
|
|
2262
2441
|
[20, 40, 20]
|
|
@@ -2264,7 +2443,7 @@ const Wo = (a) => {
|
|
|
2264
2443
|
mass: 0.1,
|
|
2265
2444
|
stiffness: 150,
|
|
2266
2445
|
damping: 12
|
|
2267
|
-
}),
|
|
2446
|
+
}), N = ne(i, {
|
|
2268
2447
|
mass: 0.1,
|
|
2269
2448
|
stiffness: 150,
|
|
2270
2449
|
damping: 12
|
|
@@ -2272,21 +2451,21 @@ const Wo = (a) => {
|
|
|
2272
2451
|
mass: 0.1,
|
|
2273
2452
|
stiffness: 150,
|
|
2274
2453
|
damping: 12
|
|
2275
|
-
}), L = ne(
|
|
2454
|
+
}), L = ne(I, {
|
|
2276
2455
|
mass: 0.1,
|
|
2277
2456
|
stiffness: 150,
|
|
2278
2457
|
damping: 12
|
|
2279
2458
|
}), [u, c] = F(!1);
|
|
2280
|
-
return /* @__PURE__ */ o("a", { href: l, children: /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ o("a", { href: l, children: /* @__PURE__ */ G(
|
|
2281
2460
|
f.div,
|
|
2282
2461
|
{
|
|
2283
2462
|
ref: n,
|
|
2284
|
-
style: { width: R, height:
|
|
2463
|
+
style: { width: R, height: N },
|
|
2285
2464
|
onMouseEnter: () => c(!0),
|
|
2286
2465
|
onMouseLeave: () => c(!1),
|
|
2287
2466
|
className: "aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",
|
|
2288
2467
|
children: [
|
|
2289
|
-
/* @__PURE__ */ o(
|
|
2468
|
+
/* @__PURE__ */ o(ge, { children: u && /* @__PURE__ */ o(
|
|
2290
2469
|
f.div,
|
|
2291
2470
|
{
|
|
2292
2471
|
initial: { opacity: 0, y: 10, x: "-50%" },
|
|
@@ -2307,8 +2486,8 @@ const Wo = (a) => {
|
|
|
2307
2486
|
]
|
|
2308
2487
|
}
|
|
2309
2488
|
) });
|
|
2310
|
-
},
|
|
2311
|
-
const { items: e, className: r } =
|
|
2489
|
+
}, Be = (s) => {
|
|
2490
|
+
const { items: e, className: r } = s, t = He(1 / 0);
|
|
2312
2491
|
return /* @__PURE__ */ o(
|
|
2313
2492
|
f.div,
|
|
2314
2493
|
{
|
|
@@ -2318,14 +2497,14 @@ const Wo = (a) => {
|
|
|
2318
2497
|
"mx-auto hidden md:flex h-16 gap-4 items-end rounded-2xl bg-gray-50 dark:bg-neutral-900 px-4 pb-3",
|
|
2319
2498
|
r
|
|
2320
2499
|
),
|
|
2321
|
-
children: e.map((l) => /* @__PURE__ */ o(
|
|
2500
|
+
children: e.map((l) => /* @__PURE__ */ o(Zo, { mouseX: t, ...l }, l.title))
|
|
2322
2501
|
}
|
|
2323
2502
|
);
|
|
2324
|
-
},
|
|
2325
|
-
const { items: e, className: r, collapseIcon: t, autoHidden: l = !1 } =
|
|
2503
|
+
}, Ne = (s) => {
|
|
2504
|
+
const { items: e, className: r, collapseIcon: t, autoHidden: l = !1 } = s, [n, d] = F(!1), p = () => {
|
|
2326
2505
|
d(!n);
|
|
2327
2506
|
};
|
|
2328
|
-
return /* @__PURE__ */
|
|
2507
|
+
return /* @__PURE__ */ G(
|
|
2329
2508
|
"div",
|
|
2330
2509
|
{
|
|
2331
2510
|
className: Te(
|
|
@@ -2334,12 +2513,12 @@ const Wo = (a) => {
|
|
|
2334
2513
|
r
|
|
2335
2514
|
),
|
|
2336
2515
|
children: [
|
|
2337
|
-
/* @__PURE__ */ o(
|
|
2516
|
+
/* @__PURE__ */ o(ge, { children: n && /* @__PURE__ */ o(
|
|
2338
2517
|
f.div,
|
|
2339
2518
|
{
|
|
2340
2519
|
layoutId: "nav",
|
|
2341
2520
|
className: "absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",
|
|
2342
|
-
children: e.map((
|
|
2521
|
+
children: e.map((i, v) => /* @__PURE__ */ o(
|
|
2343
2522
|
f.div,
|
|
2344
2523
|
{
|
|
2345
2524
|
initial: { opacity: 0, y: 10 },
|
|
@@ -2358,14 +2537,14 @@ const Wo = (a) => {
|
|
|
2358
2537
|
children: /* @__PURE__ */ o(
|
|
2359
2538
|
"a",
|
|
2360
2539
|
{
|
|
2361
|
-
href:
|
|
2540
|
+
href: i.href,
|
|
2362
2541
|
className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-900 flex items-center justify-center",
|
|
2363
|
-
children: /* @__PURE__ */ o("div", { className: "h-4 w-4", children:
|
|
2542
|
+
children: /* @__PURE__ */ o("div", { className: "h-4 w-4", children: i.icon })
|
|
2364
2543
|
},
|
|
2365
|
-
|
|
2544
|
+
i.title
|
|
2366
2545
|
)
|
|
2367
2546
|
},
|
|
2368
|
-
|
|
2547
|
+
i.title
|
|
2369
2548
|
))
|
|
2370
2549
|
}
|
|
2371
2550
|
) }),
|
|
@@ -2374,18 +2553,18 @@ const Wo = (a) => {
|
|
|
2374
2553
|
{
|
|
2375
2554
|
onClick: p,
|
|
2376
2555
|
className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",
|
|
2377
|
-
children: t || /* @__PURE__ */ o(
|
|
2556
|
+
children: t || /* @__PURE__ */ o(Ve, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
|
|
2378
2557
|
}
|
|
2379
2558
|
)
|
|
2380
2559
|
]
|
|
2381
2560
|
}
|
|
2382
2561
|
);
|
|
2383
|
-
},
|
|
2384
|
-
const { items: e, desktopClassName: r, mobileClassName: t, ...l } =
|
|
2385
|
-
return /* @__PURE__ */
|
|
2386
|
-
/* @__PURE__ */ o(
|
|
2562
|
+
}, Qo = (s) => {
|
|
2563
|
+
const { items: e, desktopClassName: r, mobileClassName: t, ...l } = s;
|
|
2564
|
+
return /* @__PURE__ */ G(ce, { children: [
|
|
2565
|
+
/* @__PURE__ */ o(Be, { items: e, className: r, ...l }),
|
|
2387
2566
|
/* @__PURE__ */ o(
|
|
2388
|
-
|
|
2567
|
+
Ne,
|
|
2389
2568
|
{
|
|
2390
2569
|
items: e,
|
|
2391
2570
|
className: t,
|
|
@@ -2394,11 +2573,11 @@ const Wo = (a) => {
|
|
|
2394
2573
|
}
|
|
2395
2574
|
)
|
|
2396
2575
|
] });
|
|
2397
|
-
}, De =
|
|
2398
|
-
De.Desktop =
|
|
2399
|
-
De.Mobile =
|
|
2576
|
+
}, De = Qo;
|
|
2577
|
+
De.Desktop = Be;
|
|
2578
|
+
De.Mobile = Ne;
|
|
2400
2579
|
export {
|
|
2401
|
-
|
|
2580
|
+
wt as Desktop,
|
|
2402
2581
|
De as Dock,
|
|
2403
|
-
|
|
2582
|
+
Ko as MdEditor
|
|
2404
2583
|
};
|