zs_library 0.3.18 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/md-editor/preview.d.ts +1 -0
- package/dist/components/md-editor/utils.d.ts +1 -0
- package/dist/index.es.js +695 -687
- package/dist/index.umd.js +187 -183
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ie = (
|
|
1
|
+
var He = Object.defineProperty;
|
|
2
|
+
var Fe = (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) => Fe(a, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import "./zs_library.css";
|
|
5
|
-
import { jsx as o, jsxs as G, Fragment as
|
|
6
|
-
import { cx as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import
|
|
9
|
-
import { ReactSortable as
|
|
10
|
-
import { AnimatePresence as
|
|
11
|
-
import { useLocalStorageState as
|
|
12
|
-
import { v4 as
|
|
13
|
-
import
|
|
14
|
-
import { RiPencilRuler2Line as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { MDXEditor as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { Prism as
|
|
23
|
-
import { clsx as
|
|
24
|
-
import { twMerge as
|
|
25
|
-
const
|
|
5
|
+
import { jsx as o, jsxs as G, Fragment as de } from "react/jsx-runtime";
|
|
6
|
+
import { cx as T, css as l } from "@emotion/css";
|
|
7
|
+
import { createContext as be, useMemo as ae, useContext as ke, useState as F, useRef as te, useEffect as oe } from "react";
|
|
8
|
+
import Xe from "react-slick";
|
|
9
|
+
import { ReactSortable as ge } from "react-sortablejs";
|
|
10
|
+
import { AnimatePresence as ue, motion as b, useMotionValue as Ge, useTransform as ee, useSpring as ne } from "framer-motion";
|
|
11
|
+
import { useLocalStorageState as qe, useDebounceEffect as Ye } from "ahooks";
|
|
12
|
+
import { v4 as fe } from "uuid";
|
|
13
|
+
import Oe from "rc-tooltip";
|
|
14
|
+
import { RiPencilRuler2Line as Ue, RiShareLine as Ve, RiInformationLine as _e, RiCloseCircleLine as We, RiMoreLine as Je } from "@remixicon/react";
|
|
15
|
+
import ye from "rc-dialog";
|
|
16
|
+
import Ke from "react-json-view";
|
|
17
|
+
import { MDXEditor as Ze, toolbarPlugin as Qe, DiffSourceToggleWrapper as eo, UndoRedo as oo, Separator as J, BoldItalicUnderlineToggles as to, CodeToggle as ro, StrikeThroughSupSubToggles as no, ListsToggle as ao, CreateLink as lo, InsertImage as io, InsertTable as so, InsertThematicBreak as co, InsertCodeBlock as go, InsertFrontmatter as uo, diffSourcePlugin as mo, listsPlugin as po, quotePlugin as ho, headingsPlugin as fo, linkPlugin as bo, linkDialogPlugin as ko, imagePlugin as yo, tablePlugin as vo, thematicBreakPlugin as xo, frontmatterPlugin as wo, codeBlockPlugin as Co, codeMirrorPlugin as Io, markdownShortcutPlugin as Mo, directivesPlugin as So, AdmonitionDirectiveDescriptor as To } from "@mdxeditor/editor";
|
|
18
|
+
import Bo from "react-markdown";
|
|
19
|
+
import No from "remark-gfm";
|
|
20
|
+
import Do from "remark-emoji";
|
|
21
|
+
import $o from "rehype-raw";
|
|
22
|
+
import { Prism as Po } from "react-syntax-highlighter";
|
|
23
|
+
import { clsx as Ro } from "clsx";
|
|
24
|
+
import { twMerge as Lo } from "tailwind-merge";
|
|
25
|
+
const ve = {
|
|
26
26
|
token: {
|
|
27
27
|
itemNameColor: "#1a1a1a",
|
|
28
28
|
itemIconBackgroundColor: "white",
|
|
@@ -35,7 +35,7 @@ const xe = {
|
|
|
35
35
|
contextMenuBackgroundColor: "white",
|
|
36
36
|
contextMenuShadowColor: "rgba(0, 0, 0, 0.1)"
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, xe = {
|
|
39
39
|
token: {
|
|
40
40
|
itemNameColor: "white",
|
|
41
41
|
itemIconBackgroundColor: "#1f2937",
|
|
@@ -48,28 +48,28 @@ const xe = {
|
|
|
48
48
|
contextMenuBackgroundColor: "#1a1a1a",
|
|
49
49
|
contextMenuShadowColor: "rgba(255, 255, 255, 0.1)"
|
|
50
50
|
}
|
|
51
|
-
},
|
|
51
|
+
}, we = be(
|
|
52
52
|
{}
|
|
53
|
-
),
|
|
54
|
-
const { children: e, theme: r, ...t } =
|
|
55
|
-
return /* @__PURE__ */ o(
|
|
56
|
-
}, K = () =>
|
|
53
|
+
), zo = (a) => {
|
|
54
|
+
const { children: e, theme: r, ...t } = a, i = ae(() => r === "light" ? ve : r === "dark" ? xe : r, [r]);
|
|
55
|
+
return /* @__PURE__ */ o(we.Provider, { value: { theme: i, ...t }, children: e });
|
|
56
|
+
}, K = () => ke(we), Ce = {
|
|
57
57
|
maxRow: 2,
|
|
58
58
|
maxCol: 2
|
|
59
|
-
},
|
|
60
|
-
...
|
|
61
|
-
},
|
|
62
|
-
app:
|
|
63
|
-
group:
|
|
59
|
+
}, Ao = {
|
|
60
|
+
...Ce
|
|
61
|
+
}, Ie = {
|
|
62
|
+
app: Ce,
|
|
63
|
+
group: Ao
|
|
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 =
|
|
70
|
-
return { light:
|
|
69
|
+
const r = ve.token, t = xe.token, i = { ...r, ...e == null ? void 0 : e.token }, n = { ...t, ...e == null ? void 0 : e.token };
|
|
70
|
+
return { light: i, dark: n };
|
|
71
71
|
});
|
|
72
|
-
const
|
|
72
|
+
const Me = be({
|
|
73
73
|
list: [],
|
|
74
74
|
setList: () => {
|
|
75
75
|
},
|
|
@@ -104,33 +104,33 @@ const Ie = fe({
|
|
|
104
104
|
moveTargetId: null,
|
|
105
105
|
setMoveTargetId: () => {
|
|
106
106
|
}
|
|
107
|
-
}),
|
|
107
|
+
}), Eo = (a) => {
|
|
108
108
|
const {
|
|
109
109
|
children: e,
|
|
110
110
|
list: r = [],
|
|
111
111
|
onChange: t,
|
|
112
|
-
storageKey:
|
|
112
|
+
storageKey: i = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
|
|
113
113
|
enableCaching: n = !0
|
|
114
|
-
} =
|
|
114
|
+
} = a, [c, p] = F(), [s, v] = F(), [x, R] = F(null), B = te(x), [A, L] = F(null), [g, d] = F([]), [w, h] = F(
|
|
115
115
|
null
|
|
116
|
-
), [
|
|
116
|
+
), [$, u] = F(
|
|
117
117
|
null
|
|
118
|
-
), [
|
|
118
|
+
), [I, C] = F(!1), [m, f] = F(null), [E, V] = F(
|
|
119
119
|
null
|
|
120
|
-
), [j, le] = F(!1), [_, Q] =
|
|
120
|
+
), [j, le] = F(!1), [_, Q] = qe(i, {
|
|
121
121
|
defaultValue: [],
|
|
122
122
|
listenStorageChange: !0
|
|
123
123
|
}), re = () => {
|
|
124
|
-
L(null), clearTimeout(
|
|
125
|
-
},
|
|
126
|
-
L({ ...
|
|
127
|
-
}, O = (
|
|
128
|
-
const { config: H = {} } =
|
|
124
|
+
L(null), clearTimeout(c), p(void 0), B.current = null;
|
|
125
|
+
}, N = (k, X) => {
|
|
126
|
+
L({ ...k, pageX: k.pageX, pageY: k.pageY, data: X }), clearTimeout(c);
|
|
127
|
+
}, O = (k, X = !0) => {
|
|
128
|
+
const { config: H = {} } = k;
|
|
129
129
|
return H.allowContextMenu === !1 ? {} : {
|
|
130
|
-
onMouseDown: (
|
|
130
|
+
onMouseDown: (M) => {
|
|
131
131
|
p(
|
|
132
132
|
setTimeout(() => {
|
|
133
|
-
X &&
|
|
133
|
+
X && B.current === null && N(M, k);
|
|
134
134
|
}, 800)
|
|
135
135
|
), C(!1), v(
|
|
136
136
|
setTimeout(() => {
|
|
@@ -139,162 +139,162 @@ const Ie = fe({
|
|
|
139
139
|
);
|
|
140
140
|
},
|
|
141
141
|
onMouseUp: () => {
|
|
142
|
-
clearTimeout(
|
|
142
|
+
clearTimeout(s), v(void 0), clearTimeout(c), p(void 0);
|
|
143
143
|
},
|
|
144
|
-
onContextMenu: (
|
|
145
|
-
X && (
|
|
144
|
+
onContextMenu: (M) => {
|
|
145
|
+
X && (M.preventDefault(), N(M, k));
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
|
-
}, W = (
|
|
148
|
+
}, W = (k, X) => {
|
|
149
149
|
const H = [...X || []];
|
|
150
150
|
if (H.length > 0)
|
|
151
|
-
|
|
152
|
-
const P = [...
|
|
153
|
-
var
|
|
154
|
-
const
|
|
151
|
+
d((M) => {
|
|
152
|
+
const P = [...M], D = (y) => {
|
|
153
|
+
var pe, he;
|
|
154
|
+
const S = H.shift(), z = y.find((U) => U.id === S), Y = y.findIndex((U) => U.id === S);
|
|
155
155
|
if (H.length && z) {
|
|
156
|
-
if (((
|
|
157
|
-
(U) => !
|
|
158
|
-
).length) === 1 &&
|
|
159
|
-
const U = { ...
|
|
160
|
-
return
|
|
156
|
+
if (((pe = z.children) == null ? void 0 : pe.filter(
|
|
157
|
+
(U) => !k.some((je) => je.id === U.id)
|
|
158
|
+
).length) === 1 && k.length === 1) {
|
|
159
|
+
const U = { ...k[0] };
|
|
160
|
+
return y.splice(Y, 1, U), t == null || t(y), y;
|
|
161
161
|
}
|
|
162
|
-
return z.children =
|
|
162
|
+
return z.children = D(z.children || []), y.splice(Y, 1, z), t == null || t(y), y;
|
|
163
163
|
}
|
|
164
164
|
if (z) {
|
|
165
|
-
if (!((
|
|
165
|
+
if (!((he = z.children) != null && he.length) && k.length) {
|
|
166
166
|
const U = { ...z };
|
|
167
|
-
return z.data = { name: "文件夹" }, z.type = "group", z.children = [U, ...
|
|
167
|
+
return z.data = { name: "文件夹" }, z.type = "group", z.children = [U, ...k], z.id = fe(), y.splice(Y, 1, z), t == null || t(y), y;
|
|
168
168
|
}
|
|
169
|
-
return z.children = q.uniqueArray(
|
|
169
|
+
return z.children = q.uniqueArray(k), y.splice(Y, 1, z), t == null || t(y), y;
|
|
170
170
|
}
|
|
171
|
-
return q.uniqueArray(
|
|
171
|
+
return q.uniqueArray(k);
|
|
172
172
|
};
|
|
173
|
-
return q.uniqueArray(
|
|
173
|
+
return q.uniqueArray(D(P));
|
|
174
174
|
});
|
|
175
175
|
else {
|
|
176
|
-
const
|
|
177
|
-
t == null || t(
|
|
176
|
+
const M = q.uniqueArray(k);
|
|
177
|
+
t == null || t(M), d(M);
|
|
178
178
|
}
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
var
|
|
183
|
-
for (let
|
|
184
|
-
if (
|
|
185
|
-
|
|
179
|
+
}, Le = (k, X) => {
|
|
180
|
+
d((H) => {
|
|
181
|
+
const M = [...H], P = (D) => {
|
|
182
|
+
var y;
|
|
183
|
+
for (let S = 0; S < D.length; S++)
|
|
184
|
+
if (D[S].id === k) {
|
|
185
|
+
D[S].config = X;
|
|
186
186
|
break;
|
|
187
|
-
} else ((
|
|
187
|
+
} else ((y = D[S].children) == null ? void 0 : y.length) !== void 0 && P(D[S].children);
|
|
188
188
|
};
|
|
189
|
-
return P(
|
|
189
|
+
return P(M), t == null || t(M), M;
|
|
190
190
|
});
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
var
|
|
195
|
-
for (let
|
|
196
|
-
if (
|
|
197
|
-
|
|
191
|
+
}, ze = (k, X) => {
|
|
192
|
+
d((H) => {
|
|
193
|
+
const M = [...H], P = (D) => {
|
|
194
|
+
var y;
|
|
195
|
+
for (let S = 0; S < D.length; S++)
|
|
196
|
+
if (D[S].id === k) {
|
|
197
|
+
D[S].data = X;
|
|
198
198
|
break;
|
|
199
|
-
} else ((
|
|
199
|
+
} else ((y = D[S].children) == null ? void 0 : y.length) !== void 0 && P(D[S].children);
|
|
200
200
|
};
|
|
201
|
-
return P(
|
|
201
|
+
return P(M), t == null || t(M), M;
|
|
202
202
|
});
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
const H = [...X],
|
|
206
|
-
var
|
|
207
|
-
for (let
|
|
208
|
-
if (P[
|
|
209
|
-
P.splice(
|
|
203
|
+
}, Ae = (k) => {
|
|
204
|
+
d((X) => {
|
|
205
|
+
const H = [...X], M = (P) => {
|
|
206
|
+
var D;
|
|
207
|
+
for (let y = 0; y < P.length; y++)
|
|
208
|
+
if (P[y].id === k) {
|
|
209
|
+
P.splice(y, 1);
|
|
210
210
|
break;
|
|
211
|
-
} else ((
|
|
211
|
+
} else ((D = P[y].children) == null ? void 0 : D.length) !== void 0 && M(P[y].children);
|
|
212
212
|
};
|
|
213
|
-
return
|
|
213
|
+
return M(H), t == null || t(H), H;
|
|
214
214
|
});
|
|
215
|
-
},
|
|
216
|
-
const H = [...
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
if (
|
|
220
|
-
|
|
215
|
+
}, Ee = (k, X) => {
|
|
216
|
+
const H = [...g], M = (P, D) => {
|
|
217
|
+
const y = D.shift(), S = P.find((Y) => Y.id === y), z = P.findIndex((Y) => Y.id === y);
|
|
218
|
+
if (S) {
|
|
219
|
+
if (D.length)
|
|
220
|
+
S.children = M(S.children || [], D);
|
|
221
221
|
else {
|
|
222
|
-
const Y = (
|
|
223
|
-
|
|
224
|
-
...
|
|
222
|
+
const Y = (k == null ? void 0 : k.type) ?? "app";
|
|
223
|
+
S.children = [
|
|
224
|
+
...S.children ?? [],
|
|
225
225
|
{
|
|
226
|
-
...
|
|
227
|
-
id:
|
|
228
|
-
config: (
|
|
226
|
+
...k,
|
|
227
|
+
id: fe(),
|
|
228
|
+
config: (k == null ? void 0 : k.config) ?? Ie[Y]
|
|
229
229
|
}
|
|
230
230
|
];
|
|
231
231
|
}
|
|
232
|
-
return P.splice(z, 1,
|
|
232
|
+
return P.splice(z, 1, S), P;
|
|
233
233
|
} else
|
|
234
234
|
return P;
|
|
235
235
|
};
|
|
236
|
-
|
|
236
|
+
d(M(H, X));
|
|
237
237
|
};
|
|
238
238
|
return oe(() => {
|
|
239
|
-
(r == null ? void 0 : r.length) > 0 &&
|
|
239
|
+
(r == null ? void 0 : r.length) > 0 && g.length === 0 && W(r);
|
|
240
240
|
}, [r]), oe(() => {
|
|
241
|
-
|
|
242
|
-
}, [
|
|
241
|
+
B.current = x, x !== null && re();
|
|
242
|
+
}, [x]), oe(() => {
|
|
243
243
|
n && _ != null && _.length && !j && (W(_), le(!0));
|
|
244
|
-
}, [_, j, n]),
|
|
244
|
+
}, [_, j, n]), Ye(
|
|
245
245
|
() => {
|
|
246
|
-
n && Q(
|
|
246
|
+
n && Q(g);
|
|
247
247
|
},
|
|
248
|
-
[
|
|
248
|
+
[g, n],
|
|
249
249
|
{
|
|
250
250
|
wait: 1e3
|
|
251
251
|
}
|
|
252
252
|
), /* @__PURE__ */ o(
|
|
253
|
-
|
|
253
|
+
Me.Provider,
|
|
254
254
|
{
|
|
255
255
|
value: {
|
|
256
|
-
list:
|
|
256
|
+
list: g,
|
|
257
257
|
setList: W,
|
|
258
258
|
contextMenu: A,
|
|
259
259
|
setContextMenu: L,
|
|
260
|
-
listStatus:
|
|
260
|
+
listStatus: x,
|
|
261
261
|
setListStatus: R,
|
|
262
262
|
contextMenuFuns: O,
|
|
263
263
|
hideContextMenu: re,
|
|
264
264
|
showInfoItemData: w,
|
|
265
|
-
setShowInfoItemData:
|
|
266
|
-
openGroupItemData:
|
|
267
|
-
setOpenGroupItemData:
|
|
268
|
-
longPressTriggered:
|
|
269
|
-
updateItemConfig:
|
|
270
|
-
updateItem:
|
|
271
|
-
removeItem:
|
|
272
|
-
addItem:
|
|
265
|
+
setShowInfoItemData: h,
|
|
266
|
+
openGroupItemData: $,
|
|
267
|
+
setOpenGroupItemData: u,
|
|
268
|
+
longPressTriggered: I,
|
|
269
|
+
updateItemConfig: Le,
|
|
270
|
+
updateItem: ze,
|
|
271
|
+
removeItem: Ae,
|
|
272
|
+
addItem: Ee,
|
|
273
273
|
moveItemId: m,
|
|
274
|
-
setMoveItemId:
|
|
274
|
+
setMoveItemId: f,
|
|
275
275
|
moveTargetId: E,
|
|
276
276
|
setMoveTargetId: V
|
|
277
277
|
},
|
|
278
278
|
children: e
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
|
-
}, Z = () =>
|
|
281
|
+
}, Z = () => ke(Me), jo = {
|
|
282
282
|
menuShow: {
|
|
283
283
|
opacity: 1,
|
|
284
284
|
y: 0,
|
|
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 = (a) => {
|
|
289
|
+
const { icon: e, title: r, onClick: t } = a, { theme: i } = K(), { light: n, dark: c } = q.getTheme(i);
|
|
290
290
|
return /* @__PURE__ */ o(
|
|
291
|
-
|
|
291
|
+
b.div,
|
|
292
292
|
{
|
|
293
|
-
className:
|
|
293
|
+
className: l`
|
|
294
294
|
&:hover {
|
|
295
295
|
background-color: ${n.contextMenuActiveColor};
|
|
296
296
|
@media (prefers-color-scheme: dark) {
|
|
297
|
-
background-color: ${
|
|
297
|
+
background-color: ${c.contextMenuActiveColor};
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
@media (prefers-color-scheme: dark) {
|
|
@@ -310,13 +310,13 @@ const Ie = fe({
|
|
|
310
310
|
onClick: (p) => {
|
|
311
311
|
p.stopPropagation(), t == null || t();
|
|
312
312
|
},
|
|
313
|
-
variants:
|
|
313
|
+
variants: jo,
|
|
314
314
|
children: /* @__PURE__ */ G(
|
|
315
|
-
|
|
315
|
+
b.div,
|
|
316
316
|
{
|
|
317
|
-
className:
|
|
317
|
+
className: T(
|
|
318
318
|
"py-1.5 px-3 rounded-lg",
|
|
319
|
-
|
|
319
|
+
l`
|
|
320
320
|
padding-top: 0.375rem;
|
|
321
321
|
padding-bottom: 0.375rem;
|
|
322
322
|
padding-left: 0.75rem;
|
|
@@ -327,10 +327,10 @@ const Ie = fe({
|
|
|
327
327
|
whileTap: { scale: 0.9 },
|
|
328
328
|
children: [
|
|
329
329
|
/* @__PURE__ */ o(
|
|
330
|
-
|
|
330
|
+
b.div,
|
|
331
331
|
{
|
|
332
|
-
className:
|
|
333
|
-
|
|
332
|
+
className: T(
|
|
333
|
+
l`
|
|
334
334
|
margin-bottom: 0.375rem;
|
|
335
335
|
display: flex;
|
|
336
336
|
justify-content: center;
|
|
@@ -339,65 +339,65 @@ const Ie = fe({
|
|
|
339
339
|
children: e
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
/* @__PURE__ */ o(
|
|
342
|
+
/* @__PURE__ */ o(b.div, { children: r })
|
|
343
343
|
]
|
|
344
344
|
}
|
|
345
345
|
)
|
|
346
346
|
}
|
|
347
347
|
);
|
|
348
|
-
},
|
|
348
|
+
}, Ho = (a) => {
|
|
349
349
|
const {
|
|
350
350
|
showInfoButton: e = !0,
|
|
351
351
|
showRemoveButton: r = !0,
|
|
352
352
|
showShareButton: t = !0,
|
|
353
|
-
showSizeButton:
|
|
353
|
+
showSizeButton: i = !0,
|
|
354
354
|
onInfoClick: n,
|
|
355
|
-
onShareClick:
|
|
355
|
+
onShareClick: c,
|
|
356
356
|
onRemoveClick: p
|
|
357
|
-
} =
|
|
358
|
-
contextMenu:
|
|
357
|
+
} = a, {
|
|
358
|
+
contextMenu: s,
|
|
359
359
|
setContextMenu: v,
|
|
360
|
-
hideContextMenu:
|
|
360
|
+
hideContextMenu: x,
|
|
361
361
|
setShowInfoItemData: R,
|
|
362
|
-
removeItem:
|
|
362
|
+
removeItem: B,
|
|
363
363
|
updateItemConfig: A
|
|
364
|
-
} = Z(), { theme: L } = K(), { light:
|
|
364
|
+
} = Z(), { theme: L } = K(), { light: g, dark: d } = q.getTheme(L), { data: w } = s ?? {}, { config: h = {} } = w ?? {}, $ = () => {
|
|
365
365
|
var C;
|
|
366
|
-
const
|
|
367
|
-
for (let m = 1; m <= ((
|
|
368
|
-
for (let
|
|
369
|
-
|
|
370
|
-
return
|
|
366
|
+
const u = Ie[(C = s == null ? void 0 : s.data) == null ? void 0 : C.type], I = [];
|
|
367
|
+
for (let m = 1; m <= ((u == null ? void 0 : u.maxRow) ?? 2); m++)
|
|
368
|
+
for (let f = 1; f <= ((u == null ? void 0 : u.maxCol) ?? 2); f++)
|
|
369
|
+
I.push(`${m}x${f}`);
|
|
370
|
+
return I;
|
|
371
371
|
};
|
|
372
|
-
return /* @__PURE__ */ o(
|
|
373
|
-
|
|
372
|
+
return /* @__PURE__ */ o(ue, { children: s && /* @__PURE__ */ G(
|
|
373
|
+
b.div,
|
|
374
374
|
{
|
|
375
375
|
initial: { opacity: 0 },
|
|
376
376
|
animate: { opacity: 1 },
|
|
377
377
|
exit: { opacity: 0 },
|
|
378
|
-
onMouseDown: (
|
|
379
|
-
|
|
378
|
+
onMouseDown: (u) => {
|
|
379
|
+
u.stopPropagation(), u.preventDefault();
|
|
380
380
|
},
|
|
381
381
|
children: [
|
|
382
382
|
/* @__PURE__ */ o(
|
|
383
|
-
|
|
383
|
+
b.div,
|
|
384
384
|
{
|
|
385
|
-
className:
|
|
386
|
-
|
|
385
|
+
className: T(
|
|
386
|
+
l`
|
|
387
387
|
border-radius: 0.5rem;
|
|
388
388
|
overflow: hidden;
|
|
389
|
-
background-color: ${
|
|
390
|
-
box-shadow: 0 0 0.5rem ${
|
|
389
|
+
background-color: ${g.contextMenuBackgroundColor};
|
|
390
|
+
box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
|
|
391
391
|
@media (prefers-color-scheme: dark) {
|
|
392
|
-
background-color: ${
|
|
393
|
-
box-shadow: 0 0 0.5rem ${
|
|
392
|
+
background-color: ${d.contextMenuBackgroundColor};
|
|
393
|
+
box-shadow: 0 0 0.5rem ${d.contextMenuShadowColor};
|
|
394
394
|
}
|
|
395
395
|
`
|
|
396
396
|
),
|
|
397
|
-
children:
|
|
398
|
-
|
|
397
|
+
children: i && h.allowResize !== !1 && /* @__PURE__ */ o(
|
|
398
|
+
b.ul,
|
|
399
399
|
{
|
|
400
|
-
className:
|
|
400
|
+
className: l`
|
|
401
401
|
background-color: white;
|
|
402
402
|
padding: 0.25rem;
|
|
403
403
|
margin: 0;
|
|
@@ -406,23 +406,23 @@ const Ie = fe({
|
|
|
406
406
|
{
|
|
407
407
|
label: "修改大小",
|
|
408
408
|
key: "size",
|
|
409
|
-
icon: /* @__PURE__ */ o(
|
|
410
|
-
items:
|
|
411
|
-
label:
|
|
412
|
-
key:
|
|
409
|
+
icon: /* @__PURE__ */ o(Ue, { size: 14 }),
|
|
410
|
+
items: $().map((u) => ({
|
|
411
|
+
label: u,
|
|
412
|
+
key: u,
|
|
413
413
|
onClick: () => {
|
|
414
|
-
const [
|
|
415
|
-
A(
|
|
416
|
-
row:
|
|
414
|
+
const [I, C] = u.split("x").map(Number);
|
|
415
|
+
A(s.data.id, {
|
|
416
|
+
row: I,
|
|
417
417
|
col: C
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
}))
|
|
421
421
|
}
|
|
422
|
-
].map((
|
|
423
|
-
|
|
422
|
+
].map((u) => /* @__PURE__ */ G(
|
|
423
|
+
b.li,
|
|
424
424
|
{
|
|
425
|
-
className:
|
|
425
|
+
className: l`
|
|
426
426
|
padding-top: 0.5rem;
|
|
427
427
|
padding-bottom: 0.5rem;
|
|
428
428
|
padding-left: 0.75rem;
|
|
@@ -430,9 +430,9 @@ const Ie = fe({
|
|
|
430
430
|
`,
|
|
431
431
|
children: [
|
|
432
432
|
/* @__PURE__ */ G(
|
|
433
|
-
|
|
433
|
+
b.p,
|
|
434
434
|
{
|
|
435
|
-
className:
|
|
435
|
+
className: l`
|
|
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
|
+
u.icon,
|
|
446
446
|
" ",
|
|
447
|
-
|
|
447
|
+
u.label
|
|
448
448
|
]
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
451
|
/* @__PURE__ */ o(
|
|
452
|
-
|
|
452
|
+
b.div,
|
|
453
453
|
{
|
|
454
|
-
className:
|
|
454
|
+
className: l`
|
|
455
455
|
display: grid;
|
|
456
456
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
457
457
|
gap: 0.25rem;
|
|
458
458
|
`,
|
|
459
|
-
children:
|
|
460
|
-
|
|
459
|
+
children: u.items.map((I) => /* @__PURE__ */ o(
|
|
460
|
+
b.div,
|
|
461
461
|
{
|
|
462
|
-
className:
|
|
462
|
+
className: T(
|
|
463
463
|
"py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",
|
|
464
|
-
|
|
464
|
+
l`
|
|
465
465
|
padding-top: 0.25rem;
|
|
466
466
|
padding-bottom: 0.25rem;
|
|
467
467
|
padding-left: 0.5rem;
|
|
@@ -472,49 +472,49 @@ const Ie = fe({
|
|
|
472
472
|
line-height: 1.25rem;
|
|
473
473
|
cursor: pointer;
|
|
474
474
|
text-align: center;
|
|
475
|
-
color: ${
|
|
475
|
+
color: ${g.contextMenuTextColor};
|
|
476
476
|
@media (prefers-color-scheme: dark) {
|
|
477
|
-
color: ${
|
|
477
|
+
color: ${d.contextMenuTextColor};
|
|
478
478
|
}
|
|
479
479
|
&:hover {
|
|
480
|
-
background-color: ${
|
|
480
|
+
background-color: ${g.contextMenuActiveColor};
|
|
481
481
|
@media (prefers-color-scheme: dark) {
|
|
482
|
-
background-color: ${
|
|
482
|
+
background-color: ${d.contextMenuActiveColor};
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
`,
|
|
486
|
-
`${
|
|
487
|
-
background-color: ${
|
|
486
|
+
`${h.row}x${h.col}` === I.key && l`
|
|
487
|
+
background-color: ${g.contextMenuActiveColor};
|
|
488
488
|
@media (prefers-color-scheme: dark) {
|
|
489
|
-
background-color: ${
|
|
489
|
+
background-color: ${d.contextMenuActiveColor};
|
|
490
490
|
}
|
|
491
491
|
`
|
|
492
492
|
),
|
|
493
|
-
onClick:
|
|
494
|
-
children:
|
|
493
|
+
onClick: I.onClick,
|
|
494
|
+
children: I.label
|
|
495
495
|
},
|
|
496
|
-
|
|
496
|
+
I.key
|
|
497
497
|
))
|
|
498
498
|
}
|
|
499
499
|
)
|
|
500
500
|
]
|
|
501
501
|
},
|
|
502
|
-
|
|
502
|
+
u.key
|
|
503
503
|
))
|
|
504
504
|
}
|
|
505
505
|
)
|
|
506
506
|
}
|
|
507
507
|
),
|
|
508
508
|
/* @__PURE__ */ G(
|
|
509
|
-
|
|
509
|
+
b.div,
|
|
510
510
|
{
|
|
511
|
-
className:
|
|
512
|
-
|
|
513
|
-
background-color: ${
|
|
514
|
-
box-shadow: 0 0 0.5rem ${
|
|
511
|
+
className: T(
|
|
512
|
+
l`
|
|
513
|
+
background-color: ${g.contextMenuBackgroundColor};
|
|
514
|
+
box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
|
|
515
515
|
@media (prefers-color-scheme: dark) {
|
|
516
|
-
background-color: ${
|
|
517
|
-
box-shadow: 0 0 0.5rem ${
|
|
516
|
+
background-color: ${d.contextMenuBackgroundColor};
|
|
517
|
+
box-shadow: 0 0 0.5rem ${d.contextMenuShadowColor};
|
|
518
518
|
}
|
|
519
519
|
display: flex;
|
|
520
520
|
justify-content: space-around;
|
|
@@ -529,11 +529,11 @@ const Ie = fe({
|
|
|
529
529
|
t && /* @__PURE__ */ o(
|
|
530
530
|
se,
|
|
531
531
|
{
|
|
532
|
-
icon: /* @__PURE__ */ o(
|
|
532
|
+
icon: /* @__PURE__ */ o(Ve, { size: 20 }),
|
|
533
533
|
title: "分享",
|
|
534
534
|
onClick: () => {
|
|
535
|
-
if (
|
|
536
|
-
|
|
535
|
+
if (c) {
|
|
536
|
+
c(s.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(_e, { size: 20 }),
|
|
546
546
|
title: "信息",
|
|
547
547
|
onClick: () => {
|
|
548
548
|
if (n) {
|
|
549
|
-
n(
|
|
549
|
+
n(s.data);
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
552
|
R({
|
|
553
|
-
...
|
|
554
|
-
pageX:
|
|
555
|
-
pageY:
|
|
556
|
-
}),
|
|
553
|
+
...s.data,
|
|
554
|
+
pageX: s.pageX,
|
|
555
|
+
pageY: s.pageY
|
|
556
|
+
}), x();
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
),
|
|
560
560
|
r && /* @__PURE__ */ o(
|
|
561
561
|
se,
|
|
562
562
|
{
|
|
563
|
-
icon: /* @__PURE__ */ o(
|
|
563
|
+
icon: /* @__PURE__ */ o(We, { size: 20 }),
|
|
564
564
|
title: "移除",
|
|
565
565
|
onClick: () => {
|
|
566
566
|
if (p) {
|
|
567
|
-
p(
|
|
567
|
+
p(s.data, B);
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
|
-
v(null),
|
|
570
|
+
v(null), B(s.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__ */ G(
|
|
580
|
+
}, Fo = (a) => {
|
|
581
|
+
const { data: e, noLetters: r = !1 } = a, { contextMenuFuns: t } = Z(), { itemIconBuilder: i, theme: n, contextMenu: c } = K(), { light: p, dark: s } = q.getTheme(n), { data: v = {} } = e, { name: x } = v;
|
|
582
|
+
return /* @__PURE__ */ G(de, { children: [
|
|
583
583
|
/* @__PURE__ */ o(
|
|
584
|
-
|
|
584
|
+
b.div,
|
|
585
585
|
{
|
|
586
|
-
className:
|
|
586
|
+
className: l`
|
|
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: ${s.itemIconBackgroundColor};
|
|
597
|
+
box-shadow: 0 0 0.5rem ${s.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: l`
|
|
605
605
|
position: absolute;
|
|
606
606
|
left: 0;
|
|
607
607
|
top: 0;
|
|
@@ -609,52 +609,52 @@ const Ie = fe({
|
|
|
609
609
|
height: 100%;
|
|
610
610
|
color: ${p.itemNameColor};
|
|
611
611
|
@media (prefers-color-scheme: dark) {
|
|
612
|
-
color: ${
|
|
612
|
+
color: ${s.itemNameColor};
|
|
613
613
|
}
|
|
614
614
|
`,
|
|
615
|
-
...t(e,
|
|
616
|
-
children:
|
|
615
|
+
...t(e, c !== !1),
|
|
616
|
+
children: i == null ? void 0 : i(e)
|
|
617
617
|
}
|
|
618
618
|
)
|
|
619
619
|
}
|
|
620
620
|
),
|
|
621
621
|
/* @__PURE__ */ o(
|
|
622
|
-
|
|
622
|
+
b.p,
|
|
623
623
|
{
|
|
624
|
-
className:
|
|
625
|
-
|
|
624
|
+
className: T(
|
|
625
|
+
l`
|
|
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: ${s.itemNameColor};
|
|
632
632
|
}
|
|
633
633
|
`,
|
|
634
|
-
r &&
|
|
634
|
+
r && l`
|
|
635
635
|
color: transparent;
|
|
636
636
|
`
|
|
637
637
|
),
|
|
638
|
-
children:
|
|
638
|
+
children: x
|
|
639
639
|
}
|
|
640
640
|
)
|
|
641
641
|
] });
|
|
642
|
-
},
|
|
642
|
+
}, me = (a) => {
|
|
643
643
|
const {
|
|
644
644
|
data: e,
|
|
645
645
|
className: r,
|
|
646
646
|
itemIndex: t,
|
|
647
|
-
onClick:
|
|
647
|
+
onClick: i,
|
|
648
648
|
disabledDrag: n = !1,
|
|
649
|
-
children:
|
|
649
|
+
children: c,
|
|
650
650
|
parentIds: p,
|
|
651
|
-
childrenLength:
|
|
652
|
-
} =
|
|
651
|
+
childrenLength: s
|
|
652
|
+
} = a, { contextMenu: v, setContextMenu: x } = Z(), { contextMenu: R } = K();
|
|
653
653
|
return /* @__PURE__ */ o(
|
|
654
|
-
|
|
654
|
+
Oe,
|
|
655
655
|
{
|
|
656
656
|
placement: "bottom",
|
|
657
|
-
overlayClassName:
|
|
657
|
+
overlayClassName: l`
|
|
658
658
|
background-color: transparent;
|
|
659
659
|
.rc-tooltip-inner {
|
|
660
660
|
background-color: transparent;
|
|
@@ -662,122 +662,122 @@ const Ie = fe({
|
|
|
662
662
|
border: none;
|
|
663
663
|
}
|
|
664
664
|
`,
|
|
665
|
-
overlay: /* @__PURE__ */ o(
|
|
665
|
+
overlay: /* @__PURE__ */ o(Ho, { ...R }),
|
|
666
666
|
visible: (v == null ? void 0 : v.data.id) === e.id,
|
|
667
|
-
onVisibleChange: (
|
|
668
|
-
|
|
667
|
+
onVisibleChange: (B) => {
|
|
668
|
+
B || x(null);
|
|
669
669
|
},
|
|
670
670
|
destroyTooltipOnHide: !0,
|
|
671
671
|
children: /* @__PURE__ */ o(
|
|
672
|
-
|
|
672
|
+
b.div,
|
|
673
673
|
{
|
|
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":
|
|
678
|
-
onClick: () =>
|
|
679
|
-
className:
|
|
680
|
-
children:
|
|
677
|
+
"data-children-length": s,
|
|
678
|
+
onClick: () => i == null ? void 0 : i(e),
|
|
679
|
+
className: T(n && "drag-disabled", r),
|
|
680
|
+
children: c ?? /* @__PURE__ */ o(Fo, { ...a })
|
|
681
681
|
}
|
|
682
682
|
)
|
|
683
683
|
}
|
|
684
684
|
);
|
|
685
|
-
},
|
|
685
|
+
}, Xo = (a) => {
|
|
686
686
|
const {
|
|
687
687
|
data: e,
|
|
688
688
|
className: r,
|
|
689
689
|
parentIds: t,
|
|
690
|
-
itemIndex:
|
|
690
|
+
itemIndex: i,
|
|
691
691
|
onClick: n,
|
|
692
|
-
noLetters:
|
|
693
|
-
} =
|
|
692
|
+
noLetters: c = !1
|
|
693
|
+
} = a, {
|
|
694
694
|
contextMenuFuns: p,
|
|
695
|
-
setList:
|
|
695
|
+
setList: s,
|
|
696
696
|
setOpenGroupItemData: v,
|
|
697
|
-
longPressTriggered:
|
|
697
|
+
longPressTriggered: x,
|
|
698
698
|
moveItemId: R,
|
|
699
|
-
moveTargetId:
|
|
699
|
+
moveTargetId: B,
|
|
700
700
|
setMoveTargetId: A,
|
|
701
701
|
listStatus: L
|
|
702
|
-
} = Z(), { itemIconBuilder:
|
|
702
|
+
} = Z(), { itemIconBuilder: g, theme: d, contextMenu: w } = K(), { light: h, dark: $ } = q.getTheme(d), { children: u, data: I, config: C } = e, { row: m = 1, col: f = 1 } = C ?? {}, E = {
|
|
703
703
|
visible: { opacity: 1, scale: 1 },
|
|
704
704
|
hidden: { opacity: 0, scale: 0.95 }
|
|
705
|
-
}, V = ((
|
|
705
|
+
}, V = ((u == null ? void 0 : u.length) ?? 0) === 0, j = V ? [e] : [...u ?? []].slice(0, 9), le = ae(() => R === e.id.toString(), [e.id, R]), _ = ae(() => B === e.id, [e.id, B]), Q = l`
|
|
706
706
|
overflow: hidden;
|
|
707
707
|
cursor: pointer;
|
|
708
|
-
background-color: ${
|
|
709
|
-
box-shadow: 0 0 0.5rem ${
|
|
708
|
+
background-color: ${h.itemIconBackgroundColor};
|
|
709
|
+
box-shadow: 0 0 0.5rem ${h.itemIconShadowColor};
|
|
710
710
|
@media (prefers-color-scheme: dark) {
|
|
711
|
-
background-color: ${
|
|
712
|
-
box-shadow: 0 0 0.5rem ${
|
|
711
|
+
background-color: ${$.itemIconBackgroundColor};
|
|
712
|
+
box-shadow: 0 0 0.5rem ${$.itemIconShadowColor};
|
|
713
713
|
}
|
|
714
714
|
`, re = () => {
|
|
715
715
|
if (V)
|
|
716
716
|
return /* @__PURE__ */ o(
|
|
717
|
-
|
|
717
|
+
b.div,
|
|
718
718
|
{
|
|
719
|
-
className:
|
|
719
|
+
className: T(
|
|
720
720
|
"sortable-group-item",
|
|
721
|
-
|
|
721
|
+
l`
|
|
722
722
|
overflow: hidden;
|
|
723
723
|
cursor: pointer;
|
|
724
724
|
width: 100%;
|
|
725
725
|
height: 100%;
|
|
726
|
-
background-color: ${
|
|
726
|
+
background-color: ${h.itemIconBackgroundColor};
|
|
727
727
|
position: absolute;
|
|
728
728
|
left: 0;
|
|
729
729
|
top: 0;
|
|
730
730
|
border-radius: 0.75rem;
|
|
731
731
|
@media (prefers-color-scheme: dark) {
|
|
732
|
-
background-color: ${
|
|
732
|
+
background-color: ${$.itemIconBackgroundColor};
|
|
733
733
|
}
|
|
734
734
|
`
|
|
735
735
|
),
|
|
736
|
-
onClick: (
|
|
737
|
-
|
|
736
|
+
onClick: (N) => {
|
|
737
|
+
N.stopPropagation(), n == null || n(e);
|
|
738
738
|
},
|
|
739
|
-
children:
|
|
739
|
+
children: g == null ? void 0 : g(e)
|
|
740
740
|
}
|
|
741
741
|
);
|
|
742
|
-
if (m === 1 &&
|
|
742
|
+
if (m === 1 && f === 1 || m === 2 && f === 2)
|
|
743
743
|
return /* @__PURE__ */ o(
|
|
744
|
-
|
|
744
|
+
b.div,
|
|
745
745
|
{
|
|
746
|
-
className:
|
|
746
|
+
className: l`
|
|
747
747
|
display: grid;
|
|
748
748
|
width: 100%;
|
|
749
749
|
height: 100%;
|
|
750
750
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
751
751
|
grid-template-rows: repeat(3, minmax(0, 1fr));
|
|
752
|
-
padding: ${
|
|
753
|
-
gap: ${
|
|
752
|
+
padding: ${f === 1 ? "0.125rem" : "0.25rem"};
|
|
753
|
+
gap: ${f === 1 ? "0.125rem" : "0.5rem"};
|
|
754
754
|
place-items: center;
|
|
755
755
|
`,
|
|
756
|
-
children: j == null ? void 0 : j.slice(0, 9).map((
|
|
757
|
-
|
|
756
|
+
children: j == null ? void 0 : j.slice(0, 9).map((N) => /* @__PURE__ */ o(
|
|
757
|
+
b.div,
|
|
758
758
|
{
|
|
759
|
-
className:
|
|
759
|
+
className: T(
|
|
760
760
|
Q,
|
|
761
|
-
|
|
762
|
-
border-radius: ${
|
|
761
|
+
l`
|
|
762
|
+
border-radius: ${f === 1 ? "0.25rem" : "0.5rem"};
|
|
763
763
|
width: 100%;
|
|
764
764
|
height: 100%;
|
|
765
765
|
`
|
|
766
766
|
),
|
|
767
767
|
onClick: (O) => {
|
|
768
|
-
O.stopPropagation(), n == null || n(
|
|
768
|
+
O.stopPropagation(), n == null || n(N);
|
|
769
769
|
},
|
|
770
|
-
children:
|
|
770
|
+
children: g == null ? void 0 : g(N)
|
|
771
771
|
},
|
|
772
|
-
|
|
772
|
+
N.id
|
|
773
773
|
))
|
|
774
774
|
}
|
|
775
775
|
);
|
|
776
|
-
if (m === 1 &&
|
|
776
|
+
if (m === 1 && f === 2)
|
|
777
777
|
return /* @__PURE__ */ o(
|
|
778
|
-
|
|
778
|
+
b.div,
|
|
779
779
|
{
|
|
780
|
-
className:
|
|
780
|
+
className: l`
|
|
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: j == null ? void 0 : j.slice(0, 4).map((
|
|
791
|
-
|
|
790
|
+
children: j == null ? void 0 : j.slice(0, 4).map((N, O) => /* @__PURE__ */ o(
|
|
791
|
+
b.div,
|
|
792
792
|
{
|
|
793
|
-
className:
|
|
793
|
+
className: T(
|
|
794
794
|
Q,
|
|
795
|
-
O < 2 ?
|
|
795
|
+
O < 2 ? l`
|
|
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
|
+
` : l`
|
|
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
|
-
O > 2 || (W.stopPropagation(), n == null || n(
|
|
810
|
+
O > 2 || (W.stopPropagation(), n == null || n(N));
|
|
811
811
|
},
|
|
812
|
-
children:
|
|
812
|
+
children: g == null ? void 0 : g(N)
|
|
813
813
|
},
|
|
814
|
-
|
|
814
|
+
N.id
|
|
815
815
|
))
|
|
816
816
|
}
|
|
817
817
|
);
|
|
818
|
-
if (m === 2 &&
|
|
818
|
+
if (m === 2 && f === 1)
|
|
819
819
|
return /* @__PURE__ */ o(
|
|
820
|
-
|
|
820
|
+
b.div,
|
|
821
821
|
{
|
|
822
|
-
className:
|
|
822
|
+
className: l`
|
|
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: j == null ? void 0 : j.slice(0, 4).map((
|
|
833
|
-
|
|
832
|
+
children: j == null ? void 0 : j.slice(0, 4).map((N, O) => /* @__PURE__ */ o(
|
|
833
|
+
b.div,
|
|
834
834
|
{
|
|
835
|
-
className:
|
|
835
|
+
className: T(
|
|
836
836
|
Q,
|
|
837
|
-
O < 2 ?
|
|
837
|
+
O < 2 ? l`
|
|
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
|
+
` : l`
|
|
844
844
|
width: 1.5rem;
|
|
845
845
|
height: 1.5rem;
|
|
846
846
|
grid-column: span 2 / span 2;
|
|
@@ -848,61 +848,61 @@ const Ie = fe({
|
|
|
848
848
|
`
|
|
849
849
|
),
|
|
850
850
|
onClick: (W) => {
|
|
851
|
-
O > 2 || (W.stopPropagation(), n == null || n(
|
|
851
|
+
O > 2 || (W.stopPropagation(), n == null || n(N));
|
|
852
852
|
},
|
|
853
|
-
children:
|
|
853
|
+
children: g == null ? void 0 : g(N)
|
|
854
854
|
},
|
|
855
|
-
|
|
855
|
+
N.id
|
|
856
856
|
))
|
|
857
857
|
}
|
|
858
858
|
);
|
|
859
859
|
};
|
|
860
860
|
return /* @__PURE__ */ G(
|
|
861
|
-
|
|
861
|
+
me,
|
|
862
862
|
{
|
|
863
863
|
data: e,
|
|
864
|
-
itemIndex:
|
|
864
|
+
itemIndex: i,
|
|
865
865
|
parentIds: t,
|
|
866
|
-
childrenLength:
|
|
867
|
-
className:
|
|
868
|
-
|
|
866
|
+
childrenLength: u == null ? void 0 : u.length,
|
|
867
|
+
className: T(
|
|
868
|
+
l`
|
|
869
869
|
grid-row: span ${m};
|
|
870
|
-
grid-column: span ${
|
|
870
|
+
grid-column: span ${f};
|
|
871
871
|
`,
|
|
872
872
|
r
|
|
873
873
|
),
|
|
874
874
|
children: [
|
|
875
875
|
/* @__PURE__ */ o(
|
|
876
|
-
|
|
876
|
+
b.div,
|
|
877
877
|
{
|
|
878
878
|
whileTap: { scale: 0.9 },
|
|
879
|
-
className:
|
|
879
|
+
className: T(
|
|
880
880
|
_ ? "!scale-110" : "",
|
|
881
|
-
|
|
881
|
+
l`
|
|
882
882
|
cursor: pointer;
|
|
883
883
|
position: relative;
|
|
884
884
|
border-radius: 0.75rem;
|
|
885
|
-
background-color: ${
|
|
886
|
-
box-shadow: 0 0 0.5rem ${
|
|
885
|
+
background-color: ${h.groupItemIconBackgroundColor};
|
|
886
|
+
box-shadow: 0 0 0.5rem ${h.groupItemIconShadowColor};
|
|
887
887
|
@media (prefers-color-scheme: dark) {
|
|
888
|
-
background-color: ${
|
|
889
|
-
box-shadow: 0 0 0.5rem ${
|
|
888
|
+
background-color: ${$.groupItemIconBackgroundColor};
|
|
889
|
+
box-shadow: 0 0 0.5rem ${$.groupItemIconShadowColor};
|
|
890
890
|
}
|
|
891
891
|
/* overflow: hidden; */
|
|
892
892
|
transition: all 0.3s;
|
|
893
893
|
margin: 0 auto;
|
|
894
|
-
width: ${
|
|
894
|
+
width: ${f * 64 + 32 * (f - 1)}px;
|
|
895
895
|
height: ${m * 64 + 32 * (m - 1)}px;
|
|
896
896
|
`
|
|
897
897
|
),
|
|
898
|
-
onClick: (
|
|
899
|
-
!V && !
|
|
898
|
+
onClick: (N) => {
|
|
899
|
+
!V && !x && (e.parentIds = t, e.pageX = N.pageX, e.pageY = N.pageY, v(e));
|
|
900
900
|
},
|
|
901
901
|
...p(e, w !== !1),
|
|
902
902
|
children: /* @__PURE__ */ G(
|
|
903
|
-
|
|
903
|
+
b.div,
|
|
904
904
|
{
|
|
905
|
-
className:
|
|
905
|
+
className: l`
|
|
906
906
|
position: relative;
|
|
907
907
|
width: 100%;
|
|
908
908
|
height: 100%;
|
|
@@ -914,11 +914,11 @@ const Ie = fe({
|
|
|
914
914
|
children: [
|
|
915
915
|
re(),
|
|
916
916
|
/* @__PURE__ */ o(
|
|
917
|
-
|
|
917
|
+
ge,
|
|
918
918
|
{
|
|
919
|
-
className:
|
|
919
|
+
className: T(
|
|
920
920
|
"sortable-group-item",
|
|
921
|
-
|
|
921
|
+
l`
|
|
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: u ?? [],
|
|
938
|
+
setList: (N) => s(N, t),
|
|
939
939
|
filter: () => !0,
|
|
940
940
|
"data-id": e.id,
|
|
941
941
|
onChange: () => {
|
|
@@ -949,31 +949,31 @@ const Ie = fe({
|
|
|
949
949
|
}
|
|
950
950
|
),
|
|
951
951
|
/* @__PURE__ */ o(
|
|
952
|
-
|
|
952
|
+
b.p,
|
|
953
953
|
{
|
|
954
|
-
className:
|
|
955
|
-
|
|
954
|
+
className: T(
|
|
955
|
+
l`
|
|
956
956
|
text-align: center;
|
|
957
957
|
margin-top: 0.25rem;
|
|
958
958
|
margin-bottom: 0;
|
|
959
|
-
color: ${
|
|
959
|
+
color: ${h.itemNameColor};
|
|
960
960
|
@media (prefers-color-scheme: dark) {
|
|
961
|
-
color: ${
|
|
961
|
+
color: ${$.itemNameColor};
|
|
962
962
|
}
|
|
963
963
|
`,
|
|
964
|
-
|
|
964
|
+
c && l`
|
|
965
965
|
color: transparent;
|
|
966
966
|
`
|
|
967
967
|
),
|
|
968
968
|
variants: E,
|
|
969
969
|
animate: le ? "hidden" : "visible",
|
|
970
|
-
children: (
|
|
970
|
+
children: (I == null ? void 0 : I.name) ?? "文件夹"
|
|
971
971
|
}
|
|
972
972
|
)
|
|
973
973
|
]
|
|
974
974
|
}
|
|
975
975
|
);
|
|
976
|
-
},
|
|
976
|
+
}, Se = l`
|
|
977
977
|
padding: 8px;
|
|
978
978
|
transition: all 0.2s;
|
|
979
979
|
> div {
|
|
@@ -985,20 +985,20 @@ const Ie = fe({
|
|
|
985
985
|
transition: all 0.2s;
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
`,
|
|
989
|
-
const { data: e, onClose: r, onItemClick: t } =
|
|
990
|
-
list:
|
|
988
|
+
`, Go = (a) => {
|
|
989
|
+
const { data: e, onClose: r, onItemClick: t } = a, {
|
|
990
|
+
list: i,
|
|
991
991
|
setList: n,
|
|
992
|
-
setListStatus:
|
|
992
|
+
setListStatus: c,
|
|
993
993
|
setMoveItemId: p,
|
|
994
|
-
setMoveTargetId:
|
|
994
|
+
setMoveTargetId: s,
|
|
995
995
|
updateItem: v
|
|
996
|
-
} = Z(), { theme:
|
|
996
|
+
} = Z(), { theme: x } = K(), { light: R, dark: B } = q.getTheme(x), [A, L] = F("文件夹"), g = [...(e == null ? void 0 : e.children) ?? []];
|
|
997
997
|
return oe(() => {
|
|
998
|
-
var
|
|
999
|
-
e && L((
|
|
998
|
+
var d;
|
|
999
|
+
e && L((d = e.data) == null ? void 0 : d.name);
|
|
1000
1000
|
}, [e]), /* @__PURE__ */ o(
|
|
1001
|
-
|
|
1001
|
+
ye,
|
|
1002
1002
|
{
|
|
1003
1003
|
visible: !!e,
|
|
1004
1004
|
onClose: () => {
|
|
@@ -1013,7 +1013,7 @@ const Ie = fe({
|
|
|
1013
1013
|
title: /* @__PURE__ */ o(
|
|
1014
1014
|
"input",
|
|
1015
1015
|
{
|
|
1016
|
-
className:
|
|
1016
|
+
className: l`
|
|
1017
1017
|
background-color: transparent;
|
|
1018
1018
|
border-style: none;
|
|
1019
1019
|
text-align: center;
|
|
@@ -1028,8 +1028,8 @@ const Ie = fe({
|
|
|
1028
1028
|
}
|
|
1029
1029
|
`,
|
|
1030
1030
|
value: A,
|
|
1031
|
-
onChange: (
|
|
1032
|
-
L(
|
|
1031
|
+
onChange: (d) => {
|
|
1032
|
+
L(d.target.value);
|
|
1033
1033
|
},
|
|
1034
1034
|
onBlur: () => {
|
|
1035
1035
|
e && v(e.id, {
|
|
@@ -1041,9 +1041,9 @@ const Ie = fe({
|
|
|
1041
1041
|
),
|
|
1042
1042
|
footer: null,
|
|
1043
1043
|
closable: !1,
|
|
1044
|
-
className:
|
|
1044
|
+
className: T(
|
|
1045
1045
|
"group-item-modal",
|
|
1046
|
-
|
|
1046
|
+
l`
|
|
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: ${B.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: l`
|
|
1077
1077
|
overflow-y: auto;
|
|
1078
1078
|
max-height: 60vh;
|
|
1079
1079
|
padding: 1.25rem 0;
|
|
1080
1080
|
`,
|
|
1081
|
-
onDragLeave: (
|
|
1082
|
-
const w =
|
|
1083
|
-
w && (
|
|
1081
|
+
onDragLeave: (d) => {
|
|
1082
|
+
const w = d.relatedTarget;
|
|
1083
|
+
w && (d.currentTarget.contains(w) || setTimeout(() => {
|
|
1084
1084
|
r();
|
|
1085
1085
|
}, 500));
|
|
1086
1086
|
},
|
|
1087
1087
|
children: /* @__PURE__ */ o(
|
|
1088
|
-
|
|
1088
|
+
ge,
|
|
1089
1089
|
{
|
|
1090
|
-
className:
|
|
1090
|
+
className: l`
|
|
1091
1091
|
display: grid;
|
|
1092
1092
|
gap: 1rem;
|
|
1093
1093
|
place-items: center;
|
|
@@ -1099,28 +1099,28 @@ const Ie = fe({
|
|
|
1099
1099
|
animation: 150,
|
|
1100
1100
|
fallbackOnBody: !0,
|
|
1101
1101
|
list: (e == null ? void 0 : e.children) ?? [],
|
|
1102
|
-
setList: (
|
|
1103
|
-
var
|
|
1104
|
-
const w =
|
|
1105
|
-
w.length === (
|
|
1102
|
+
setList: (d) => {
|
|
1103
|
+
var $, u;
|
|
1104
|
+
const w = d.map((I) => I.id), h = (u = ($ = i.find((I) => I.id === (e == null ? void 0 : e.id))) == null ? void 0 : $.children) == null ? void 0 : u.map((I) => I.id);
|
|
1105
|
+
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
1106
|
},
|
|
1107
|
-
onMove: () => (
|
|
1108
|
-
onStart: (
|
|
1109
|
-
const w =
|
|
1110
|
-
w != null && w.id && p(w.id),
|
|
1107
|
+
onMove: () => (s(null), c("onMove"), !0),
|
|
1108
|
+
onStart: (d) => {
|
|
1109
|
+
const w = d.item.dataset;
|
|
1110
|
+
w != null && w.id && p(w.id), c("onMove");
|
|
1111
1111
|
},
|
|
1112
1112
|
onEnd: () => {
|
|
1113
|
-
p(null),
|
|
1113
|
+
p(null), s(null), c(null);
|
|
1114
1114
|
},
|
|
1115
|
-
ghostClass:
|
|
1116
|
-
children:
|
|
1117
|
-
|
|
1115
|
+
ghostClass: Se,
|
|
1116
|
+
children: g.map((d, w) => /* @__PURE__ */ o(
|
|
1117
|
+
me,
|
|
1118
1118
|
{
|
|
1119
|
-
data:
|
|
1119
|
+
data: d,
|
|
1120
1120
|
itemIndex: w,
|
|
1121
1121
|
onClick: t
|
|
1122
1122
|
},
|
|
1123
|
-
|
|
1123
|
+
d.id
|
|
1124
1124
|
))
|
|
1125
1125
|
}
|
|
1126
1126
|
)
|
|
@@ -1128,11 +1128,11 @@ const Ie = fe({
|
|
|
1128
1128
|
)
|
|
1129
1129
|
}
|
|
1130
1130
|
);
|
|
1131
|
-
},
|
|
1131
|
+
}, qo = (a) => {
|
|
1132
1132
|
var t;
|
|
1133
|
-
const { data: e, onClose: r } =
|
|
1133
|
+
const { data: e, onClose: r } = a;
|
|
1134
1134
|
return /* @__PURE__ */ o(
|
|
1135
|
-
|
|
1135
|
+
ye,
|
|
1136
1136
|
{
|
|
1137
1137
|
visible: !!e,
|
|
1138
1138
|
onClose: () => {
|
|
@@ -1148,30 +1148,30 @@ const Ie = fe({
|
|
|
1148
1148
|
title: ((t = e == null ? void 0 : e.data) == null ? void 0 : t.name) ?? "信息",
|
|
1149
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(Ke, { src: e, theme: "monokai" }) })
|
|
1152
1152
|
] })
|
|
1153
1153
|
}
|
|
1154
1154
|
);
|
|
1155
|
-
},
|
|
1155
|
+
}, Yo = (a) => {
|
|
1156
1156
|
const {
|
|
1157
1157
|
pagination: e = { position: "bottom" },
|
|
1158
1158
|
className: r,
|
|
1159
1159
|
sliderProps: t,
|
|
1160
|
-
sliderRef:
|
|
1160
|
+
sliderRef: i,
|
|
1161
1161
|
onItemClick: n
|
|
1162
|
-
} =
|
|
1163
|
-
list:
|
|
1162
|
+
} = a, c = te(null), p = te(null), {
|
|
1163
|
+
list: s,
|
|
1164
1164
|
setList: v,
|
|
1165
|
-
setListStatus:
|
|
1165
|
+
setListStatus: x,
|
|
1166
1166
|
showInfoItemData: R,
|
|
1167
|
-
setShowInfoItemData:
|
|
1167
|
+
setShowInfoItemData: B,
|
|
1168
1168
|
openGroupItemData: A,
|
|
1169
1169
|
setOpenGroupItemData: L,
|
|
1170
|
-
setMoveItemId:
|
|
1171
|
-
setMoveTargetId:
|
|
1170
|
+
setMoveItemId: g,
|
|
1171
|
+
setMoveTargetId: d,
|
|
1172
1172
|
addItem: w
|
|
1173
|
-
} = Z(), { pagingDotBuilder:
|
|
1174
|
-
top:
|
|
1173
|
+
} = Z(), { pagingDotBuilder: h, pagingDotsBuilder: $, itemBuilder: u } = K(), I = ae(() => e === !1 ? {} : {
|
|
1174
|
+
top: l`
|
|
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: l`
|
|
1185
1185
|
.slick-dots {
|
|
1186
1186
|
position: static;
|
|
1187
1187
|
}
|
|
1188
1188
|
`,
|
|
1189
|
-
left:
|
|
1189
|
+
left: l`
|
|
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: l`
|
|
1206
1206
|
.slick-dots {
|
|
1207
1207
|
position: absolute;
|
|
1208
1208
|
width: auto;
|
|
@@ -1219,21 +1219,21 @@ const Ie = fe({
|
|
|
1219
1219
|
}
|
|
1220
1220
|
`
|
|
1221
1221
|
}[e.position ?? "bottom"], [e]);
|
|
1222
|
-
return /* @__PURE__ */ G(
|
|
1222
|
+
return /* @__PURE__ */ G(de, { children: [
|
|
1223
1223
|
/* @__PURE__ */ o(
|
|
1224
|
-
|
|
1224
|
+
Xe,
|
|
1225
1225
|
{
|
|
1226
1226
|
useCSS: !0,
|
|
1227
1227
|
useTransform: !0,
|
|
1228
1228
|
arrows: !1,
|
|
1229
|
-
ref:
|
|
1229
|
+
ref: i ?? c,
|
|
1230
1230
|
infinite: !1,
|
|
1231
1231
|
dots: !0,
|
|
1232
1232
|
touchMove: !1,
|
|
1233
1233
|
lazyLoad: "anticipated",
|
|
1234
|
-
className:
|
|
1235
|
-
|
|
1236
|
-
|
|
1234
|
+
className: T(
|
|
1235
|
+
I,
|
|
1236
|
+
l`
|
|
1237
1237
|
.slick-track {
|
|
1238
1238
|
display: flex;
|
|
1239
1239
|
align-items: stretch;
|
|
@@ -1252,25 +1252,25 @@ const Ie = fe({
|
|
|
1252
1252
|
r
|
|
1253
1253
|
),
|
|
1254
1254
|
customPaging: (C) => {
|
|
1255
|
-
var m,
|
|
1256
|
-
return
|
|
1255
|
+
var m, f;
|
|
1256
|
+
return h ? h(s[C], C) : /* @__PURE__ */ o(
|
|
1257
1257
|
"div",
|
|
1258
1258
|
{
|
|
1259
1259
|
onDragEnter: () => {
|
|
1260
1260
|
var E;
|
|
1261
|
-
(E = (
|
|
1261
|
+
(E = (i ?? c).current) == null || E.slickGoTo(C);
|
|
1262
1262
|
},
|
|
1263
|
-
children: (
|
|
1263
|
+
children: (f = (m = s[C]) == null ? void 0 : m.data) == null ? void 0 : f.name
|
|
1264
1264
|
}
|
|
1265
1265
|
);
|
|
1266
1266
|
},
|
|
1267
|
-
appendDots: (C) =>
|
|
1267
|
+
appendDots: (C) => $ ? $(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: T(
|
|
1272
1272
|
"slick-dots-default",
|
|
1273
|
-
|
|
1273
|
+
l`
|
|
1274
1274
|
padding: 0.5rem;
|
|
1275
1275
|
display: inline-flex;
|
|
1276
1276
|
justify-content: center;
|
|
@@ -1295,15 +1295,15 @@ const Ie = fe({
|
|
|
1295
1295
|
}
|
|
1296
1296
|
) }),
|
|
1297
1297
|
...t,
|
|
1298
|
-
children:
|
|
1298
|
+
children: s.map((C) => /* @__PURE__ */ o(
|
|
1299
1299
|
"div",
|
|
1300
1300
|
{
|
|
1301
1301
|
onDrop: (m) => {
|
|
1302
1302
|
m.preventDefault();
|
|
1303
|
-
const
|
|
1304
|
-
if (
|
|
1303
|
+
const f = m.dataTransfer.getData("text/plain");
|
|
1304
|
+
if (f !== "")
|
|
1305
1305
|
try {
|
|
1306
|
-
w(JSON.parse(
|
|
1306
|
+
w(JSON.parse(f), [C.id]);
|
|
1307
1307
|
} catch (E) {
|
|
1308
1308
|
console.log("drag error", E);
|
|
1309
1309
|
}
|
|
@@ -1312,10 +1312,10 @@ const Ie = fe({
|
|
|
1312
1312
|
m.preventDefault();
|
|
1313
1313
|
},
|
|
1314
1314
|
children: /* @__PURE__ */ o(
|
|
1315
|
-
|
|
1315
|
+
ge,
|
|
1316
1316
|
{
|
|
1317
|
-
className:
|
|
1318
|
-
|
|
1317
|
+
className: T(
|
|
1318
|
+
l`
|
|
1319
1319
|
display: grid;
|
|
1320
1320
|
transition: all 0.3s;
|
|
1321
1321
|
grid-template-columns: repeat(auto-fill, 96px);
|
|
@@ -1334,30 +1334,30 @@ const Ie = fe({
|
|
|
1334
1334
|
setList: (m) => v(m, [C.id]),
|
|
1335
1335
|
filter: ".drag-disabled",
|
|
1336
1336
|
onMove: (m) => {
|
|
1337
|
-
|
|
1338
|
-
const { dragged:
|
|
1339
|
-
return
|
|
1337
|
+
x("onMove");
|
|
1338
|
+
const { dragged: f, related: E } = m, V = f.dataset, j = E.dataset;
|
|
1339
|
+
return d(null), !((Object.keys(j).length === 0 || j.parentIds) && Number(V.childrenLength) > 0 && E.classList.contains("sortable-group-item"));
|
|
1340
1340
|
},
|
|
1341
1341
|
onStart: (m) => {
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1342
|
+
const f = m.item.dataset;
|
|
1343
|
+
f != null && f.id && g(f.id), x("onMove");
|
|
1344
1344
|
},
|
|
1345
1345
|
onEnd: () => {
|
|
1346
|
-
|
|
1346
|
+
g(null), d(null), x(null);
|
|
1347
1347
|
},
|
|
1348
|
-
ghostClass:
|
|
1349
|
-
children: (C.children ?? []).map((m,
|
|
1348
|
+
ghostClass: Se,
|
|
1349
|
+
children: (C.children ?? []).map((m, f) => {
|
|
1350
1350
|
let E;
|
|
1351
|
-
if (
|
|
1352
|
-
return
|
|
1351
|
+
if (u)
|
|
1352
|
+
return u(m);
|
|
1353
1353
|
switch (m.type) {
|
|
1354
1354
|
case "group":
|
|
1355
1355
|
case "app":
|
|
1356
1356
|
E = /* @__PURE__ */ o(
|
|
1357
|
-
|
|
1357
|
+
Xo,
|
|
1358
1358
|
{
|
|
1359
1359
|
data: m,
|
|
1360
|
-
itemIndex:
|
|
1360
|
+
itemIndex: f,
|
|
1361
1361
|
parentIds: [C.id, m.id],
|
|
1362
1362
|
onClick: n
|
|
1363
1363
|
},
|
|
@@ -1366,10 +1366,10 @@ const Ie = fe({
|
|
|
1366
1366
|
break;
|
|
1367
1367
|
default:
|
|
1368
1368
|
E = /* @__PURE__ */ o(
|
|
1369
|
-
|
|
1369
|
+
me,
|
|
1370
1370
|
{
|
|
1371
1371
|
data: m,
|
|
1372
|
-
itemIndex:
|
|
1372
|
+
itemIndex: f,
|
|
1373
1373
|
onClick: n
|
|
1374
1374
|
},
|
|
1375
1375
|
m.id
|
|
@@ -1386,16 +1386,16 @@ const Ie = fe({
|
|
|
1386
1386
|
}
|
|
1387
1387
|
),
|
|
1388
1388
|
/* @__PURE__ */ o(
|
|
1389
|
-
|
|
1389
|
+
qo,
|
|
1390
1390
|
{
|
|
1391
1391
|
data: R,
|
|
1392
1392
|
onClose: () => {
|
|
1393
|
-
|
|
1393
|
+
B(null);
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
),
|
|
1397
1397
|
/* @__PURE__ */ o(
|
|
1398
|
-
|
|
1398
|
+
Go,
|
|
1399
1399
|
{
|
|
1400
1400
|
data: A,
|
|
1401
1401
|
onClose: () => {
|
|
@@ -1405,38 +1405,38 @@ const Ie = fe({
|
|
|
1405
1405
|
}
|
|
1406
1406
|
)
|
|
1407
1407
|
] });
|
|
1408
|
-
},
|
|
1408
|
+
}, Ct = (a) => {
|
|
1409
1409
|
const {
|
|
1410
1410
|
list: e,
|
|
1411
1411
|
onChange: r,
|
|
1412
1412
|
storageKey: t,
|
|
1413
|
-
enableCaching:
|
|
1413
|
+
enableCaching: i,
|
|
1414
1414
|
theme: n,
|
|
1415
|
-
noLetters:
|
|
1415
|
+
noLetters: c,
|
|
1416
1416
|
contextMenu: p,
|
|
1417
|
-
contextMenuBuilder:
|
|
1417
|
+
contextMenuBuilder: s,
|
|
1418
1418
|
itemBuilder: v,
|
|
1419
|
-
itemIconBuilder:
|
|
1419
|
+
itemIconBuilder: x,
|
|
1420
1420
|
pagingDotBuilder: R,
|
|
1421
|
-
pagingDotsBuilder:
|
|
1421
|
+
pagingDotsBuilder: B,
|
|
1422
1422
|
...A
|
|
1423
|
-
} =
|
|
1424
|
-
return /* @__PURE__ */ o(
|
|
1423
|
+
} = a;
|
|
1424
|
+
return /* @__PURE__ */ o(Eo, { ...{
|
|
1425
1425
|
list: e,
|
|
1426
1426
|
onChange: r,
|
|
1427
1427
|
storageKey: t,
|
|
1428
|
-
enableCaching:
|
|
1429
|
-
}, children: /* @__PURE__ */ o(
|
|
1428
|
+
enableCaching: i
|
|
1429
|
+
}, children: /* @__PURE__ */ o(zo, { ...{
|
|
1430
1430
|
theme: n,
|
|
1431
|
-
noLetters:
|
|
1431
|
+
noLetters: c,
|
|
1432
1432
|
contextMenu: p,
|
|
1433
|
-
pagingDotsBuilder:
|
|
1433
|
+
pagingDotsBuilder: B,
|
|
1434
1434
|
pagingDotBuilder: R,
|
|
1435
1435
|
itemBuilder: v,
|
|
1436
|
-
itemIconBuilder:
|
|
1437
|
-
contextMenuBuilder:
|
|
1438
|
-
}, children: /* @__PURE__ */ o(
|
|
1439
|
-
},
|
|
1436
|
+
itemIconBuilder: x,
|
|
1437
|
+
contextMenuBuilder: s
|
|
1438
|
+
}, children: /* @__PURE__ */ o(Yo, { ...A }) }) });
|
|
1439
|
+
}, Oo = {
|
|
1440
1440
|
frontmatterEditor: {
|
|
1441
1441
|
title: "编辑前置元数据",
|
|
1442
1442
|
key: "键",
|
|
@@ -1553,13 +1553,13 @@ const Ie = fe({
|
|
|
1553
1553
|
image: {
|
|
1554
1554
|
delete: "删除图片"
|
|
1555
1555
|
}
|
|
1556
|
-
},
|
|
1557
|
-
const
|
|
1558
|
-
(n,
|
|
1559
|
-
|
|
1556
|
+
}, Uo = (a, e, r) => {
|
|
1557
|
+
const i = a.split(".").reduce(
|
|
1558
|
+
(n, c) => typeof n == "string" ? n : n[c],
|
|
1559
|
+
Oo
|
|
1560
1560
|
);
|
|
1561
|
-
return typeof
|
|
1562
|
-
},
|
|
1561
|
+
return typeof i != "string" ? e : r ? i.replace(/{{(.*?)}}/g, (n, c) => r[c]) : i;
|
|
1562
|
+
}, Vo = l`
|
|
1563
1563
|
--accentBase: var(--tomato-1);
|
|
1564
1564
|
--accentBgSubtle: var(--tomato-2);
|
|
1565
1565
|
--accentBg: var(--tomato-3);
|
|
@@ -1613,7 +1613,7 @@ const Ie = fe({
|
|
|
1613
1613
|
rgba(255, 255, 255, 0.05),
|
|
1614
1614
|
rgba(255, 255, 255, 0.05)
|
|
1615
1615
|
);
|
|
1616
|
-
`,
|
|
1616
|
+
`, _o = l`
|
|
1617
1617
|
[class*="_toolbarRoot"] {
|
|
1618
1618
|
flex-wrap: wrap;
|
|
1619
1619
|
transition: all 0.3s;
|
|
@@ -1683,9 +1683,9 @@ const Ie = fe({
|
|
|
1683
1683
|
margin-bottom: 0;
|
|
1684
1684
|
}
|
|
1685
1685
|
}
|
|
1686
|
-
`,
|
|
1686
|
+
`, Te = T(
|
|
1687
1687
|
"markdown-body",
|
|
1688
|
-
|
|
1688
|
+
l`
|
|
1689
1689
|
p {
|
|
1690
1690
|
margin-bottom: 8px;
|
|
1691
1691
|
}
|
|
@@ -1706,113 +1706,117 @@ const Ie = fe({
|
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
1708
|
`
|
|
1709
|
-
),
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1709
|
+
), Be = l`
|
|
1710
|
+
.markdown-body {
|
|
1711
|
+
/* light */
|
|
1712
|
+
color-scheme: light;
|
|
1713
|
+
--focus-outlineColor: #0969da;
|
|
1714
|
+
--fgColor-default: #1f2328;
|
|
1715
|
+
--fgColor-muted: #59636e;
|
|
1716
|
+
--fgColor-accent: #0969da;
|
|
1717
|
+
--fgColor-success: #1a7f37;
|
|
1718
|
+
--fgColor-attention: #9a6700;
|
|
1719
|
+
--fgColor-danger: #d1242f;
|
|
1720
|
+
--fgColor-done: #8250df;
|
|
1721
|
+
--bgColor-default: #ffffff;
|
|
1722
|
+
--bgColor-muted: #f6f8fa;
|
|
1723
|
+
--bgColor-neutral-muted: #818b981f;
|
|
1724
|
+
--bgColor-attention-muted: #fff8c5;
|
|
1725
|
+
--borderColor-default: transparent;
|
|
1726
|
+
--borderColor-muted: #d1d9e0b3;
|
|
1727
|
+
--borderColor-neutral-muted: #d1d9e0b3;
|
|
1728
|
+
--borderColor-accent-emphasis: #0969da;
|
|
1729
|
+
--borderColor-success-emphasis: #1a7f37;
|
|
1730
|
+
--borderColor-attention-emphasis: #9a6700;
|
|
1731
|
+
--borderColor-danger-emphasis: #cf222e;
|
|
1732
|
+
--borderColor-done-emphasis: #8250df;
|
|
1733
|
+
--color-prettylights-syntax-comment: #59636e;
|
|
1734
|
+
--color-prettylights-syntax-constant: #0550ae;
|
|
1735
|
+
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
|
|
1736
|
+
--color-prettylights-syntax-entity: #6639ba;
|
|
1737
|
+
--color-prettylights-syntax-storage-modifier-import: #1f2328;
|
|
1738
|
+
--color-prettylights-syntax-entity-tag: #0550ae;
|
|
1739
|
+
--color-prettylights-syntax-keyword: #cf222e;
|
|
1740
|
+
--color-prettylights-syntax-string: #0a3069;
|
|
1741
|
+
--color-prettylights-syntax-variable: #953800;
|
|
1742
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
|
|
1743
|
+
--color-prettylights-syntax-brackethighlighter-angle: #59636e;
|
|
1744
|
+
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
|
|
1745
|
+
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
|
|
1746
|
+
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
|
|
1747
|
+
--color-prettylights-syntax-carriage-return-bg: #cf222e;
|
|
1748
|
+
--color-prettylights-syntax-string-regexp: #116329;
|
|
1749
|
+
--color-prettylights-syntax-markup-list: #3b2300;
|
|
1750
|
+
--color-prettylights-syntax-markup-heading: #0550ae;
|
|
1751
|
+
--color-prettylights-syntax-markup-italic: #1f2328;
|
|
1752
|
+
--color-prettylights-syntax-markup-bold: #1f2328;
|
|
1753
|
+
--color-prettylights-syntax-markup-deleted-text: #82071e;
|
|
1754
|
+
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
|
|
1755
|
+
--color-prettylights-syntax-markup-inserted-text: #116329;
|
|
1756
|
+
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
|
|
1757
|
+
--color-prettylights-syntax-markup-changed-text: #953800;
|
|
1758
|
+
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
|
|
1759
|
+
--color-prettylights-syntax-markup-ignored-text: #d1d9e0;
|
|
1760
|
+
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
|
|
1761
|
+
--color-prettylights-syntax-meta-diff-range: #8250df;
|
|
1762
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
|
|
1763
|
+
}
|
|
1764
|
+
`, Ne = l`
|
|
1765
|
+
.markdown-body {
|
|
1766
|
+
/* dark */
|
|
1767
|
+
color-scheme: dark;
|
|
1768
|
+
--focus-outlineColor: #1f6feb;
|
|
1769
|
+
--fgColor-default: #f0f6fc;
|
|
1770
|
+
--fgColor-muted: #9198a1;
|
|
1771
|
+
--fgColor-accent: #4493f8;
|
|
1772
|
+
--fgColor-success: #3fb950;
|
|
1773
|
+
--fgColor-attention: #d29922;
|
|
1774
|
+
--fgColor-danger: #f85149;
|
|
1775
|
+
--fgColor-done: #ab7df8;
|
|
1776
|
+
--bgColor-default: transparent;
|
|
1777
|
+
--bgColor-muted: #151b23;
|
|
1778
|
+
--bgColor-neutral-muted: #656c7633;
|
|
1779
|
+
--bgColor-attention-muted: #bb800926;
|
|
1780
|
+
--borderColor-default: #3d444d;
|
|
1781
|
+
--borderColor-muted: #3d444db3;
|
|
1782
|
+
--borderColor-neutral-muted: #3d444db3;
|
|
1783
|
+
--borderColor-accent-emphasis: #1f6feb;
|
|
1784
|
+
--borderColor-success-emphasis: #238636;
|
|
1785
|
+
--borderColor-attention-emphasis: #9e6a03;
|
|
1786
|
+
--borderColor-danger-emphasis: #da3633;
|
|
1787
|
+
--borderColor-done-emphasis: #8957e5;
|
|
1788
|
+
--color-prettylights-syntax-comment: #9198a1;
|
|
1789
|
+
--color-prettylights-syntax-constant: #79c0ff;
|
|
1790
|
+
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
|
|
1791
|
+
--color-prettylights-syntax-entity: #d2a8ff;
|
|
1792
|
+
--color-prettylights-syntax-storage-modifier-import: #f0f6fc;
|
|
1793
|
+
--color-prettylights-syntax-entity-tag: #7ee787;
|
|
1794
|
+
--color-prettylights-syntax-keyword: #ff7b72;
|
|
1795
|
+
--color-prettylights-syntax-string: #a5d6ff;
|
|
1796
|
+
--color-prettylights-syntax-variable: #ffa657;
|
|
1797
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
|
|
1798
|
+
--color-prettylights-syntax-brackethighlighter-angle: #9198a1;
|
|
1799
|
+
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
|
|
1800
|
+
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
|
|
1801
|
+
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
|
|
1802
|
+
--color-prettylights-syntax-carriage-return-bg: #b62324;
|
|
1803
|
+
--color-prettylights-syntax-string-regexp: #7ee787;
|
|
1804
|
+
--color-prettylights-syntax-markup-list: #f2cc60;
|
|
1805
|
+
--color-prettylights-syntax-markup-heading: #1f6feb;
|
|
1806
|
+
--color-prettylights-syntax-markup-italic: #f0f6fc;
|
|
1807
|
+
--color-prettylights-syntax-markup-bold: #f0f6fc;
|
|
1808
|
+
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
|
|
1809
|
+
--color-prettylights-syntax-markup-deleted-bg: #67060c;
|
|
1810
|
+
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
|
|
1811
|
+
--color-prettylights-syntax-markup-inserted-bg: #033a16;
|
|
1812
|
+
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
|
|
1813
|
+
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
|
|
1814
|
+
--color-prettylights-syntax-markup-ignored-text: #f0f6fc;
|
|
1815
|
+
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
|
|
1816
|
+
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
|
|
1817
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;
|
|
1818
|
+
}
|
|
1819
|
+
`, Wo = {
|
|
1816
1820
|
'code[class*="language-"]': {
|
|
1817
1821
|
background: "hsl(230, 1%, 98%)",
|
|
1818
1822
|
color: "hsl(230, 8%, 24%)",
|
|
@@ -2300,48 +2304,57 @@ const Ie = fe({
|
|
|
2300
2304
|
".prism-previewer-easing.prism-previewer-easing line": {
|
|
2301
2305
|
stroke: "hsl(230, 8%, 24%)"
|
|
2302
2306
|
}
|
|
2303
|
-
},
|
|
2304
|
-
|
|
2307
|
+
}, ce = (a) => {
|
|
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) => {
|
|
2311
|
+
const { children: e = "", className: r, theme: t = "auto" } = a;
|
|
2305
2312
|
return /* @__PURE__ */ o(
|
|
2306
|
-
|
|
2313
|
+
"div",
|
|
2307
2314
|
{
|
|
2308
|
-
className:
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
{
|
|
2317
|
-
...i,
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2315
|
+
className: ce(t) ? Ne : Be,
|
|
2316
|
+
children: /* @__PURE__ */ o(
|
|
2317
|
+
Bo,
|
|
2318
|
+
{
|
|
2319
|
+
className: T(Te, r),
|
|
2320
|
+
remarkPlugins: [No, Do],
|
|
2321
|
+
rehypePlugins: [$o],
|
|
2322
|
+
components: {
|
|
2323
|
+
code(i) {
|
|
2324
|
+
const { children: n, className: c, node: p, ref: s, ...v } = i, x = /language-(\w+)/.exec(c || "");
|
|
2325
|
+
return x ? /* @__PURE__ */ o(
|
|
2326
|
+
Po,
|
|
2327
|
+
{
|
|
2328
|
+
...v,
|
|
2329
|
+
PreTag: "div",
|
|
2330
|
+
children: String(n).replace(/\n$/, ""),
|
|
2331
|
+
language: x[1],
|
|
2332
|
+
style: Wo
|
|
2333
|
+
}
|
|
2334
|
+
) : /* @__PURE__ */ o("code", { ...v, className: c, children: n });
|
|
2322
2335
|
}
|
|
2323
|
-
|
|
2336
|
+
},
|
|
2337
|
+
children: e
|
|
2324
2338
|
}
|
|
2325
|
-
|
|
2326
|
-
children: e
|
|
2339
|
+
)
|
|
2327
2340
|
}
|
|
2328
2341
|
);
|
|
2329
|
-
},
|
|
2342
|
+
}, Ko = (a) => {
|
|
2330
2343
|
const {
|
|
2331
2344
|
value: e,
|
|
2332
2345
|
onChange: r,
|
|
2333
2346
|
translation: t,
|
|
2334
|
-
pluginConfig:
|
|
2347
|
+
pluginConfig: i,
|
|
2335
2348
|
className: n,
|
|
2336
|
-
theme:
|
|
2349
|
+
theme: c = "auto",
|
|
2337
2350
|
...p
|
|
2338
|
-
} =
|
|
2351
|
+
} = a, s = te(null), {
|
|
2339
2352
|
image: v,
|
|
2340
|
-
diffSource:
|
|
2353
|
+
diffSource: x = {
|
|
2341
2354
|
viewMode: "rich-text"
|
|
2342
2355
|
},
|
|
2343
2356
|
headings: R,
|
|
2344
|
-
link:
|
|
2357
|
+
link: B,
|
|
2345
2358
|
codeBlock: A,
|
|
2346
2359
|
codeMirror: L = {
|
|
2347
2360
|
codeBlockLanguages: {
|
|
@@ -2352,98 +2365,93 @@ const Ie = fe({
|
|
|
2352
2365
|
"": "Unspecified"
|
|
2353
2366
|
}
|
|
2354
2367
|
},
|
|
2355
|
-
directives:
|
|
2356
|
-
directiveDescriptors: [
|
|
2368
|
+
directives: g = {
|
|
2369
|
+
directiveDescriptors: [To]
|
|
2357
2370
|
}
|
|
2358
|
-
} =
|
|
2359
|
-
oe(() => {
|
|
2360
|
-
var
|
|
2361
|
-
e !== void 0 &&
|
|
2362
|
-
}, [e,
|
|
2363
|
-
|
|
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(
|
|
2368
|
-
We,
|
|
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,
|
|
2369
2377
|
{
|
|
2370
|
-
ref:
|
|
2371
|
-
className:
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2378
|
+
ref: s,
|
|
2379
|
+
className: T(
|
|
2380
|
+
_o,
|
|
2381
|
+
ce(c) ? Vo : "",
|
|
2382
|
+
ce(c) ? Ne : Be,
|
|
2375
2383
|
n
|
|
2376
2384
|
),
|
|
2377
|
-
contentEditableClassName:
|
|
2378
|
-
markdown:
|
|
2379
|
-
onChange: (
|
|
2380
|
-
!e && !r && w(
|
|
2385
|
+
contentEditableClassName: Te,
|
|
2386
|
+
markdown: d,
|
|
2387
|
+
onChange: (h) => {
|
|
2388
|
+
!e && !r && w(h), r && r(h);
|
|
2381
2389
|
},
|
|
2382
|
-
translation: t ??
|
|
2390
|
+
translation: t ?? Uo,
|
|
2383
2391
|
plugins: [
|
|
2384
|
-
|
|
2385
|
-
toolbarContents: () => /* @__PURE__ */ G(
|
|
2386
|
-
/* @__PURE__ */ o(Ze, {}),
|
|
2387
|
-
/* @__PURE__ */ o(J, {}),
|
|
2388
|
-
/* @__PURE__ */ o(Qe, {}),
|
|
2389
|
-
/* @__PURE__ */ o(eo, {}),
|
|
2390
|
-
/* @__PURE__ */ o(J, {}),
|
|
2392
|
+
Qe({
|
|
2393
|
+
toolbarContents: () => /* @__PURE__ */ G(eo, { options: ["rich-text", "source"], children: [
|
|
2391
2394
|
/* @__PURE__ */ o(oo, {}),
|
|
2392
2395
|
/* @__PURE__ */ o(J, {}),
|
|
2393
2396
|
/* @__PURE__ */ o(to, {}),
|
|
2394
|
-
/* @__PURE__ */ o(J, {}),
|
|
2395
2397
|
/* @__PURE__ */ o(ro, {}),
|
|
2398
|
+
/* @__PURE__ */ o(J, {}),
|
|
2396
2399
|
/* @__PURE__ */ o(no, {}),
|
|
2397
2400
|
/* @__PURE__ */ o(J, {}),
|
|
2398
2401
|
/* @__PURE__ */ o(ao, {}),
|
|
2399
|
-
/* @__PURE__ */ o(lo, {}),
|
|
2400
2402
|
/* @__PURE__ */ o(J, {}),
|
|
2403
|
+
/* @__PURE__ */ o(lo, {}),
|
|
2401
2404
|
/* @__PURE__ */ o(io, {}),
|
|
2402
2405
|
/* @__PURE__ */ o(J, {}),
|
|
2403
|
-
/* @__PURE__ */ o(so, {})
|
|
2406
|
+
/* @__PURE__ */ o(so, {}),
|
|
2407
|
+
/* @__PURE__ */ o(co, {}),
|
|
2408
|
+
/* @__PURE__ */ o(J, {}),
|
|
2409
|
+
/* @__PURE__ */ o(go, {}),
|
|
2410
|
+
/* @__PURE__ */ o(J, {}),
|
|
2411
|
+
/* @__PURE__ */ o(uo, {})
|
|
2404
2412
|
] })
|
|
2405
2413
|
}),
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
uo(),
|
|
2409
|
-
mo(R),
|
|
2410
|
-
po(N),
|
|
2414
|
+
mo(x),
|
|
2415
|
+
po(),
|
|
2411
2416
|
ho(),
|
|
2412
|
-
fo(
|
|
2413
|
-
bo(),
|
|
2417
|
+
fo(R),
|
|
2418
|
+
bo(B),
|
|
2414
2419
|
ko(),
|
|
2420
|
+
yo(v),
|
|
2421
|
+
vo(),
|
|
2415
2422
|
xo(),
|
|
2416
|
-
vo(A),
|
|
2417
|
-
yo(L),
|
|
2418
2423
|
wo(),
|
|
2419
|
-
Co(
|
|
2424
|
+
Co(A),
|
|
2425
|
+
Io(L),
|
|
2426
|
+
Mo(),
|
|
2427
|
+
So(g)
|
|
2420
2428
|
],
|
|
2421
2429
|
...p
|
|
2422
2430
|
}
|
|
2423
2431
|
);
|
|
2424
|
-
},
|
|
2425
|
-
|
|
2426
|
-
function
|
|
2427
|
-
return
|
|
2432
|
+
}, Zo = Ko;
|
|
2433
|
+
Zo.Preview = Jo;
|
|
2434
|
+
function De(...a) {
|
|
2435
|
+
return Lo(Ro(a));
|
|
2428
2436
|
}
|
|
2429
|
-
const
|
|
2430
|
-
const { mouseX: e, title: r, icon: t, href:
|
|
2431
|
-
var
|
|
2432
|
-
const
|
|
2433
|
-
return w -
|
|
2434
|
-
}), p = ee(
|
|
2435
|
-
|
|
2437
|
+
const Qo = (a) => {
|
|
2438
|
+
const { mouseX: e, title: r, icon: t, href: i } = a, n = te(null), c = ee(e, (w) => {
|
|
2439
|
+
var $;
|
|
2440
|
+
const h = (($ = n.current) == null ? void 0 : $.getBoundingClientRect()) ?? { x: 0, width: 0 };
|
|
2441
|
+
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]), v = ee(
|
|
2443
|
+
c,
|
|
2436
2444
|
[-150, 0, 150],
|
|
2437
2445
|
[20, 40, 20]
|
|
2438
|
-
),
|
|
2439
|
-
|
|
2446
|
+
), x = ee(
|
|
2447
|
+
c,
|
|
2440
2448
|
[-150, 0, 150],
|
|
2441
2449
|
[20, 40, 20]
|
|
2442
2450
|
), R = ne(p, {
|
|
2443
2451
|
mass: 0.1,
|
|
2444
2452
|
stiffness: 150,
|
|
2445
2453
|
damping: 12
|
|
2446
|
-
}),
|
|
2454
|
+
}), B = ne(s, {
|
|
2447
2455
|
mass: 0.1,
|
|
2448
2456
|
stiffness: 150,
|
|
2449
2457
|
damping: 12
|
|
@@ -2451,22 +2459,22 @@ const Zo = (s) => {
|
|
|
2451
2459
|
mass: 0.1,
|
|
2452
2460
|
stiffness: 150,
|
|
2453
2461
|
damping: 12
|
|
2454
|
-
}), L = ne(
|
|
2462
|
+
}), L = ne(x, {
|
|
2455
2463
|
mass: 0.1,
|
|
2456
2464
|
stiffness: 150,
|
|
2457
2465
|
damping: 12
|
|
2458
|
-
}), [
|
|
2459
|
-
return /* @__PURE__ */ o("a", { href:
|
|
2460
|
-
|
|
2466
|
+
}), [g, d] = F(!1);
|
|
2467
|
+
return /* @__PURE__ */ o("a", { href: i, children: /* @__PURE__ */ G(
|
|
2468
|
+
b.div,
|
|
2461
2469
|
{
|
|
2462
2470
|
ref: n,
|
|
2463
|
-
style: { width: R, height:
|
|
2464
|
-
onMouseEnter: () =>
|
|
2465
|
-
onMouseLeave: () =>
|
|
2471
|
+
style: { width: R, height: B },
|
|
2472
|
+
onMouseEnter: () => d(!0),
|
|
2473
|
+
onMouseLeave: () => d(!1),
|
|
2466
2474
|
className: "aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",
|
|
2467
2475
|
children: [
|
|
2468
|
-
/* @__PURE__ */ o(
|
|
2469
|
-
|
|
2476
|
+
/* @__PURE__ */ o(ue, { children: g && /* @__PURE__ */ o(
|
|
2477
|
+
b.div,
|
|
2470
2478
|
{
|
|
2471
2479
|
initial: { opacity: 0, y: 10, x: "-50%" },
|
|
2472
2480
|
animate: { opacity: 1, y: 0, x: "-50%" },
|
|
@@ -2476,7 +2484,7 @@ const Zo = (s) => {
|
|
|
2476
2484
|
}
|
|
2477
2485
|
) }),
|
|
2478
2486
|
/* @__PURE__ */ o(
|
|
2479
|
-
|
|
2487
|
+
b.div,
|
|
2480
2488
|
{
|
|
2481
2489
|
style: { width: A, height: L },
|
|
2482
2490
|
className: "flex items-center justify-center",
|
|
@@ -2486,40 +2494,40 @@ const Zo = (s) => {
|
|
|
2486
2494
|
]
|
|
2487
2495
|
}
|
|
2488
2496
|
) });
|
|
2489
|
-
},
|
|
2490
|
-
const { items: e, className: r } =
|
|
2497
|
+
}, $e = (a) => {
|
|
2498
|
+
const { items: e, className: r } = a, t = Ge(1 / 0);
|
|
2491
2499
|
return /* @__PURE__ */ o(
|
|
2492
|
-
|
|
2500
|
+
b.div,
|
|
2493
2501
|
{
|
|
2494
|
-
onMouseMove: (
|
|
2502
|
+
onMouseMove: (i) => t.set(i.pageX),
|
|
2495
2503
|
onMouseLeave: () => t.set(1 / 0),
|
|
2496
|
-
className:
|
|
2504
|
+
className: De(
|
|
2497
2505
|
"mx-auto hidden md:flex h-16 gap-4 items-end rounded-2xl bg-gray-50 dark:bg-neutral-900 px-4 pb-3",
|
|
2498
2506
|
r
|
|
2499
2507
|
),
|
|
2500
|
-
children: e.map((
|
|
2508
|
+
children: e.map((i) => /* @__PURE__ */ o(Qo, { mouseX: t, ...i }, i.title))
|
|
2501
2509
|
}
|
|
2502
2510
|
);
|
|
2503
|
-
},
|
|
2504
|
-
const { items: e, className: r, collapseIcon: t, autoHidden:
|
|
2505
|
-
|
|
2511
|
+
}, Pe = (a) => {
|
|
2512
|
+
const { items: e, className: r, collapseIcon: t, autoHidden: i = !1 } = a, [n, c] = F(!1), p = () => {
|
|
2513
|
+
c(!n);
|
|
2506
2514
|
};
|
|
2507
2515
|
return /* @__PURE__ */ G(
|
|
2508
2516
|
"div",
|
|
2509
2517
|
{
|
|
2510
|
-
className:
|
|
2518
|
+
className: De(
|
|
2511
2519
|
"relative block",
|
|
2512
|
-
|
|
2520
|
+
i ? "md:hidden" : "",
|
|
2513
2521
|
r
|
|
2514
2522
|
),
|
|
2515
2523
|
children: [
|
|
2516
|
-
/* @__PURE__ */ o(
|
|
2517
|
-
|
|
2524
|
+
/* @__PURE__ */ o(ue, { children: n && /* @__PURE__ */ o(
|
|
2525
|
+
b.div,
|
|
2518
2526
|
{
|
|
2519
2527
|
layoutId: "nav",
|
|
2520
2528
|
className: "absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",
|
|
2521
|
-
children: e.map((
|
|
2522
|
-
|
|
2529
|
+
children: e.map((s, v) => /* @__PURE__ */ o(
|
|
2530
|
+
b.div,
|
|
2523
2531
|
{
|
|
2524
2532
|
initial: { opacity: 0, y: 10 },
|
|
2525
2533
|
animate: {
|
|
@@ -2537,14 +2545,14 @@ const Zo = (s) => {
|
|
|
2537
2545
|
children: /* @__PURE__ */ o(
|
|
2538
2546
|
"a",
|
|
2539
2547
|
{
|
|
2540
|
-
href:
|
|
2548
|
+
href: s.href,
|
|
2541
2549
|
className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-900 flex items-center justify-center",
|
|
2542
|
-
children: /* @__PURE__ */ o("div", { className: "h-4 w-4", children:
|
|
2550
|
+
children: /* @__PURE__ */ o("div", { className: "h-4 w-4", children: s.icon })
|
|
2543
2551
|
},
|
|
2544
|
-
|
|
2552
|
+
s.title
|
|
2545
2553
|
)
|
|
2546
2554
|
},
|
|
2547
|
-
|
|
2555
|
+
s.title
|
|
2548
2556
|
))
|
|
2549
2557
|
}
|
|
2550
2558
|
) }),
|
|
@@ -2553,31 +2561,31 @@ const Zo = (s) => {
|
|
|
2553
2561
|
{
|
|
2554
2562
|
onClick: p,
|
|
2555
2563
|
className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",
|
|
2556
|
-
children: t || /* @__PURE__ */ o(
|
|
2564
|
+
children: t || /* @__PURE__ */ o(Je, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
|
|
2557
2565
|
}
|
|
2558
2566
|
)
|
|
2559
2567
|
]
|
|
2560
2568
|
}
|
|
2561
2569
|
);
|
|
2562
|
-
},
|
|
2563
|
-
const { items: e, desktopClassName: r, mobileClassName: t, ...
|
|
2564
|
-
return /* @__PURE__ */ G(
|
|
2565
|
-
/* @__PURE__ */ o(
|
|
2570
|
+
}, et = (a) => {
|
|
2571
|
+
const { items: e, desktopClassName: r, mobileClassName: t, ...i } = a;
|
|
2572
|
+
return /* @__PURE__ */ G(de, { children: [
|
|
2573
|
+
/* @__PURE__ */ o($e, { items: e, className: r, ...i }),
|
|
2566
2574
|
/* @__PURE__ */ o(
|
|
2567
|
-
|
|
2575
|
+
Pe,
|
|
2568
2576
|
{
|
|
2569
2577
|
items: e,
|
|
2570
2578
|
className: t,
|
|
2571
2579
|
autoHidden: !0,
|
|
2572
|
-
...
|
|
2580
|
+
...i
|
|
2573
2581
|
}
|
|
2574
2582
|
)
|
|
2575
2583
|
] });
|
|
2576
|
-
},
|
|
2577
|
-
|
|
2578
|
-
|
|
2584
|
+
}, Re = et;
|
|
2585
|
+
Re.Desktop = $e;
|
|
2586
|
+
Re.Mobile = Pe;
|
|
2579
2587
|
export {
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2588
|
+
Ct as Desktop,
|
|
2589
|
+
Re as Dock,
|
|
2590
|
+
Zo as MdEditor
|
|
2583
2591
|
};
|