zs_library 0.6.12 → 0.6.13
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/index.js
CHANGED
|
@@ -448,18 +448,18 @@ const fo = zt({
|
|
|
448
448
|
onChange: r,
|
|
449
449
|
storageKey: n = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
|
|
450
450
|
enableCaching: a = !0
|
|
451
|
-
} = t, [i, l] = R(), [m, p] = R(), [
|
|
451
|
+
} = t, [i, l] = R(), [m, p] = R(), [c, u] = R(null), f = oe(c), [d, S] = R(null), [v, z] = R([]), [y, N] = R(null), [g, b] = R(null), [x, k] = R(!1), [A, I] = R(null), [P, B] = R(null), [J, j] = R(null), [F, E] = R(0), [G, se] = R(!1), [Z, Y] = on(n, {
|
|
452
452
|
defaultValue: [],
|
|
453
453
|
listenStorageChange: !0
|
|
454
454
|
}), re = () => {
|
|
455
|
-
|
|
455
|
+
S(null), clearTimeout(i), l(void 0), f.current = null;
|
|
456
456
|
}, de = (O, q) => {
|
|
457
457
|
let U = O.target;
|
|
458
458
|
for (; U && !U.getAttribute("data-id"); )
|
|
459
459
|
U = U.parentElement;
|
|
460
460
|
U || (U = O.target);
|
|
461
461
|
const _ = U.getBoundingClientRect();
|
|
462
|
-
|
|
462
|
+
S({
|
|
463
463
|
rect: _,
|
|
464
464
|
pageX: O.pageX,
|
|
465
465
|
pageY: O.pageY,
|
|
@@ -592,8 +592,8 @@ const fo = zt({
|
|
|
592
592
|
X(() => {
|
|
593
593
|
(o == null ? void 0 : o.length) > 0 && v.length === 0 && ie(o);
|
|
594
594
|
}, [o]), X(() => {
|
|
595
|
-
f.current =
|
|
596
|
-
}, [
|
|
595
|
+
f.current = c, c !== null && re();
|
|
596
|
+
}, [c]), X(() => {
|
|
597
597
|
a && Z != null && Z.length && !G && (ie(Z), se(!0));
|
|
598
598
|
}, [Z, G, a, ie]), nn(
|
|
599
599
|
() => {
|
|
@@ -613,14 +613,14 @@ const fo = zt({
|
|
|
613
613
|
value: {
|
|
614
614
|
list: v,
|
|
615
615
|
setList: ie,
|
|
616
|
-
contextMenu:
|
|
617
|
-
setContextMenu:
|
|
618
|
-
listStatus:
|
|
616
|
+
contextMenu: d,
|
|
617
|
+
setContextMenu: S,
|
|
618
|
+
listStatus: c,
|
|
619
619
|
setListStatus: u,
|
|
620
620
|
contextMenuFuns: fe,
|
|
621
621
|
hideContextMenu: re,
|
|
622
622
|
showInfoItemData: y,
|
|
623
|
-
setShowInfoItemData:
|
|
623
|
+
setShowInfoItemData: N,
|
|
624
624
|
openGroupItemData: g,
|
|
625
625
|
setOpenGroupItemData: b,
|
|
626
626
|
longPressTriggered: x,
|
|
@@ -632,7 +632,7 @@ const fo = zt({
|
|
|
632
632
|
updateRootItem: xe,
|
|
633
633
|
removeRootItem: me,
|
|
634
634
|
moveItemId: A,
|
|
635
|
-
setMoveItemId:
|
|
635
|
+
setMoveItemId: I,
|
|
636
636
|
moveTargetId: P,
|
|
637
637
|
setMoveTargetId: B,
|
|
638
638
|
dragItem: J,
|
|
@@ -656,23 +656,23 @@ const fo = zt({
|
|
|
656
656
|
containerRef: l,
|
|
657
657
|
onCreateNewPage: m
|
|
658
658
|
}, p) => {
|
|
659
|
-
const
|
|
660
|
-
|
|
659
|
+
const c = oe(null), [u, f] = R(null), d = oe(0), S = oe(!1), v = le(() => {
|
|
660
|
+
c.current && (clearTimeout(c.current), c.current = null), S.current = !1;
|
|
661
661
|
}, []), z = le(
|
|
662
662
|
(x) => {
|
|
663
663
|
if (!n) return;
|
|
664
664
|
const k = e >= o - 1, A = typeof r == "number" && o >= r;
|
|
665
665
|
if (x === "right" && k && A)
|
|
666
666
|
return;
|
|
667
|
-
const
|
|
668
|
-
|
|
667
|
+
const I = Date.now();
|
|
668
|
+
S.current || I - d.current < a + 200 || u !== x && (f(x), v(), c.current = setTimeout(() => {
|
|
669
669
|
const P = t.current;
|
|
670
670
|
if (!P) {
|
|
671
671
|
f(null);
|
|
672
672
|
return;
|
|
673
673
|
}
|
|
674
|
-
|
|
675
|
-
|
|
674
|
+
S.current = !0, d.current = Date.now(), x === "left" && e > 0 ? P.slickGoTo(e - 1) : x === "right" && (e < o - 1 ? P.slickGoTo(e + 1) : A || m == null || m()), f(null), setTimeout(() => {
|
|
675
|
+
S.current = !1;
|
|
676
676
|
}, 300);
|
|
677
677
|
}, a));
|
|
678
678
|
},
|
|
@@ -689,14 +689,14 @@ const fo = zt({
|
|
|
689
689
|
]
|
|
690
690
|
), y = le(() => {
|
|
691
691
|
f(null), v();
|
|
692
|
-
}, [v]),
|
|
692
|
+
}, [v]), N = le(
|
|
693
693
|
(x) => {
|
|
694
694
|
if (!n || !l.current)
|
|
695
695
|
return;
|
|
696
|
-
const k = l.current.getBoundingClientRect(), A = x.clientX - k.left,
|
|
696
|
+
const k = l.current.getBoundingClientRect(), A = x.clientX - k.left, I = k.width - i;
|
|
697
697
|
if (A < i && e > 0)
|
|
698
698
|
z("left");
|
|
699
|
-
else if (A >
|
|
699
|
+
else if (A > I) {
|
|
700
700
|
const P = e >= o - 1, B = typeof r == "number" && o >= r;
|
|
701
701
|
if (P && B)
|
|
702
702
|
return;
|
|
@@ -719,13 +719,13 @@ const fo = zt({
|
|
|
719
719
|
et(
|
|
720
720
|
p,
|
|
721
721
|
() => ({
|
|
722
|
-
handleDragMove:
|
|
722
|
+
handleDragMove: N
|
|
723
723
|
}),
|
|
724
|
-
[
|
|
724
|
+
[N]
|
|
725
725
|
), X(() => () => {
|
|
726
726
|
v();
|
|
727
727
|
}, [v]), X(() => {
|
|
728
|
-
n || (v(), f(null),
|
|
728
|
+
n || (v(), f(null), S.current = !1, d.current = 0);
|
|
729
729
|
}, [n, v]);
|
|
730
730
|
const g = D`
|
|
731
731
|
position: absolute;
|
|
@@ -1022,7 +1022,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1022
1022
|
const { data: e, noLetters: o = !1, name: r, defaultName: n, className: a } = t, { moveItemId: i } = Ae(), { theme: l } = pe(), m = {
|
|
1023
1023
|
visible: { opacity: 1, scale: 1 },
|
|
1024
1024
|
hidden: { opacity: 0, scale: 0.95 }
|
|
1025
|
-
}, p = te(() => i === e.id.toString(), [e.id, i]),
|
|
1025
|
+
}, p = te(() => i === e.id.toString(), [e.id, i]), c = r || ((u = e.data) == null ? void 0 : u.name) || n || "";
|
|
1026
1026
|
return /* @__PURE__ */ s(
|
|
1027
1027
|
V.p,
|
|
1028
1028
|
{
|
|
@@ -1038,12 +1038,12 @@ const Ys = De(({ src: t }) => {
|
|
|
1038
1038
|
),
|
|
1039
1039
|
variants: m,
|
|
1040
1040
|
animate: p ? "hidden" : "visible",
|
|
1041
|
-
children:
|
|
1041
|
+
children: c
|
|
1042
1042
|
}
|
|
1043
1043
|
);
|
|
1044
1044
|
}, Vs = (t) => {
|
|
1045
|
-
var
|
|
1046
|
-
const { data: e, noLetters: o = !1, icon: r,
|
|
1045
|
+
var z, y, N;
|
|
1046
|
+
const { data: e, noLetters: o = !1, icon: r, iconColor: n, from: a, iconSize: i = 64, contextMenuProps: l } = t, { contextMenuFuns: m } = Ae(), { itemIconBuilder: p, theme: c, contextMenu: u } = pe(), f = l != !1 ? l || u : l, { data: d = {} } = e, { name: S, iconColor: v } = d;
|
|
1047
1047
|
return /* @__PURE__ */ T(Ce, { children: [
|
|
1048
1048
|
/* @__PURE__ */ s(
|
|
1049
1049
|
V.div,
|
|
@@ -1051,11 +1051,11 @@ const Ys = De(({ src: t }) => {
|
|
|
1051
1051
|
className: L(
|
|
1052
1052
|
"zs-cursor-pointer zs-relative zs-overflow-hidden",
|
|
1053
1053
|
D`
|
|
1054
|
-
background-color: ${(
|
|
1054
|
+
background-color: ${n ?? v ?? ((z = c.token.items) == null ? void 0 : z.iconBackgroundColor)};
|
|
1055
1055
|
border-radius: 0.75rem;
|
|
1056
|
-
box-shadow: 0 0 0.5rem ${(
|
|
1057
|
-
width: ${
|
|
1058
|
-
height: ${
|
|
1056
|
+
box-shadow: 0 0 0.5rem ${(y = c.token.items) == null ? void 0 : y.iconShadowColor};
|
|
1057
|
+
width: ${i}px;
|
|
1058
|
+
height: ${i}px;
|
|
1059
1059
|
`
|
|
1060
1060
|
),
|
|
1061
1061
|
whileTap: { scale: 0.9 },
|
|
@@ -1065,19 +1065,19 @@ const Ys = De(({ src: t }) => {
|
|
|
1065
1065
|
className: L(
|
|
1066
1066
|
"zs-absolute zs-left-0 zs-top-0 zs-w-full zs-h-full",
|
|
1067
1067
|
D`
|
|
1068
|
-
color: ${(
|
|
1068
|
+
color: ${(N = c.token.items) == null ? void 0 : N.textColor};
|
|
1069
1069
|
`
|
|
1070
1070
|
),
|
|
1071
|
-
...
|
|
1072
|
-
{ ...e, ...
|
|
1073
|
-
|
|
1071
|
+
...m(
|
|
1072
|
+
{ ...e, ...a === "dock" ? { config: { allowResize: !1 } } : {} },
|
|
1073
|
+
f !== !1
|
|
1074
1074
|
),
|
|
1075
|
-
children: qe(e, r,
|
|
1075
|
+
children: qe(e, r, p)
|
|
1076
1076
|
}
|
|
1077
1077
|
)
|
|
1078
1078
|
}
|
|
1079
1079
|
),
|
|
1080
|
-
/* @__PURE__ */ s(Co, { data: e, noLetters: o, name:
|
|
1080
|
+
/* @__PURE__ */ s(Co, { data: e, noLetters: o, name: S })
|
|
1081
1081
|
] });
|
|
1082
1082
|
}, Pe = (t) => {
|
|
1083
1083
|
const { data: e, className: o, itemIndex: r, onClick: n, disabledDrag: a = !1, children: i, parentIds: l, childrenLength: m } = t;
|
|
@@ -1100,13 +1100,13 @@ const Ys = De(({ src: t }) => {
|
|
|
1100
1100
|
var j, F, E, G, se;
|
|
1101
1101
|
const { data: e, className: o, parentIds: r, itemIndex: n, onClick: a, noLetters: i = !1, disabledDrag: l = !1, icon: m } = t, {
|
|
1102
1102
|
contextMenuFuns: p,
|
|
1103
|
-
setList:
|
|
1103
|
+
setList: c,
|
|
1104
1104
|
setOpenGroupItemData: u,
|
|
1105
1105
|
longPressTriggered: f,
|
|
1106
|
-
moveTargetId:
|
|
1107
|
-
setMoveTargetId:
|
|
1106
|
+
moveTargetId: d,
|
|
1107
|
+
setMoveTargetId: S,
|
|
1108
1108
|
listStatus: v
|
|
1109
|
-
} = Ae(), { itemIconBuilder: z, theme: y, contextMenu:
|
|
1109
|
+
} = Ae(), { itemIconBuilder: z, theme: y, contextMenu: N, typeConfigMap: g } = pe(), { children: b } = e, { row: x, col: k } = ko(e.type, (j = e.config) == null ? void 0 : j.sizeId, g), A = ((b == null ? void 0 : b.length) ?? 0) === 0, I = A ? [e] : [...b ?? []].slice(0, 9), P = te(() => d === e.id, [e.id, d]), B = D`
|
|
1110
1110
|
overflow: hidden;
|
|
1111
1111
|
cursor: pointer;
|
|
1112
1112
|
background-color: ${(F = y.token.items) == null ? void 0 : F.iconBackgroundColor};
|
|
@@ -1141,7 +1141,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1141
1141
|
gap: ${k === 1 ? "0.125rem" : "0.5rem"};
|
|
1142
1142
|
`
|
|
1143
1143
|
),
|
|
1144
|
-
children:
|
|
1144
|
+
children: I == null ? void 0 : I.slice(0, 9).map((Y) => /* @__PURE__ */ s(
|
|
1145
1145
|
V.div,
|
|
1146
1146
|
{
|
|
1147
1147
|
className: L(
|
|
@@ -1161,7 +1161,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
);
|
|
1163
1163
|
if (x === 1 && k === 2)
|
|
1164
|
-
return /* @__PURE__ */ s(V.div, { className: "zs-grid zs-grid-cols-10 zs-grid-rows-4 zs-gap-x-2 zs-gap-y-1 zs-place-items-center zs-w-36 h-[52px]", children:
|
|
1164
|
+
return /* @__PURE__ */ s(V.div, { className: "zs-grid zs-grid-cols-10 zs-grid-rows-4 zs-gap-x-2 zs-gap-y-1 zs-place-items-center zs-w-36 h-[52px]", children: I == null ? void 0 : I.slice(0, 4).map((Y, re) => /* @__PURE__ */ s(
|
|
1165
1165
|
V.div,
|
|
1166
1166
|
{
|
|
1167
1167
|
className: L(
|
|
@@ -1188,7 +1188,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1188
1188
|
Y.id
|
|
1189
1189
|
)) });
|
|
1190
1190
|
if (x === 2 && k === 1)
|
|
1191
|
-
return /* @__PURE__ */ s(V.div, { className: "zs-grid zs-grid-cols-4 zs-grid-rows-10 zs-gap-x-1 zs-gap-y-2 w-[52px] zs-h-36 zs-place-items-center", children:
|
|
1191
|
+
return /* @__PURE__ */ s(V.div, { className: "zs-grid zs-grid-cols-4 zs-grid-rows-10 zs-gap-x-1 zs-gap-y-2 w-[52px] zs-h-36 zs-place-items-center", children: I == null ? void 0 : I.slice(0, 4).map((Y, re) => /* @__PURE__ */ s(
|
|
1192
1192
|
V.div,
|
|
1193
1193
|
{
|
|
1194
1194
|
className: L(
|
|
@@ -1245,7 +1245,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1245
1245
|
onClick: (Z) => {
|
|
1246
1246
|
!A && !f && (e.parentIds = r, e.pageX = Z.pageX, e.pageY = Z.pageY, u(e));
|
|
1247
1247
|
},
|
|
1248
|
-
...p(e,
|
|
1248
|
+
...p(e, N !== !1),
|
|
1249
1249
|
children: /* @__PURE__ */ T(
|
|
1250
1250
|
V.div,
|
|
1251
1251
|
{
|
|
@@ -1278,12 +1278,12 @@ const Ys = De(({ src: t }) => {
|
|
|
1278
1278
|
animation: 150,
|
|
1279
1279
|
fallbackOnBody: !0,
|
|
1280
1280
|
list: b ?? [],
|
|
1281
|
-
setList: (Z) => !l &&
|
|
1281
|
+
setList: (Z) => !l && c(Z, r),
|
|
1282
1282
|
filter: () => !0,
|
|
1283
1283
|
disabled: l,
|
|
1284
1284
|
"data-id": e.id,
|
|
1285
1285
|
onChange: () => {
|
|
1286
|
-
l ||
|
|
1286
|
+
l || S(e.id);
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
)
|
|
@@ -1297,7 +1297,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
);
|
|
1299
1299
|
}, wo = Ws, Xs = ({ value: t, onChange: e, onBlur: o, placeholder: r = "标题" }) => {
|
|
1300
|
-
var p,
|
|
1300
|
+
var p, c, u, f, d, S, v, z, y, N, g, b, x, k, A, I, P, B, J, j, F;
|
|
1301
1301
|
const [n, a] = R(t), { theme: i } = pe(), l = (E) => {
|
|
1302
1302
|
const G = E.target.value;
|
|
1303
1303
|
a(G), e(G);
|
|
@@ -1311,18 +1311,18 @@ const Ys = De(({ src: t }) => {
|
|
|
1311
1311
|
"zs-bg-transparent zs-text-center zs-text-xl zs-w-full zs-rounded-lg py-2 px-4",
|
|
1312
1312
|
D`
|
|
1313
1313
|
border-style: none;
|
|
1314
|
-
color: ${(u = (
|
|
1314
|
+
color: ${(u = (c = (p = i.token.items) == null ? void 0 : p.groupModal) == null ? void 0 : c.title) == null ? void 0 : u.textColor};
|
|
1315
1315
|
font-weight: 600;
|
|
1316
1316
|
letter-spacing: -0.5px;
|
|
1317
1317
|
transition: all 0.2s ease-out;
|
|
1318
|
-
background: ${(
|
|
1318
|
+
background: ${(S = (d = (f = i.token.items) == null ? void 0 : f.groupModal) == null ? void 0 : d.title) == null ? void 0 : S.backgroundColor};
|
|
1319
1319
|
|
|
1320
1320
|
&:focus {
|
|
1321
1321
|
outline: none;
|
|
1322
1322
|
background: ${(y = (z = (v = i.token.items) == null ? void 0 : v.groupModal) == null ? void 0 : z.title) == null ? void 0 : y.focusBackgroundColor};
|
|
1323
1323
|
backdrop-filter: blur(8px);
|
|
1324
1324
|
-webkit-backdrop-filter: blur(8px);
|
|
1325
|
-
box-shadow: 0 0 0 2px ${(b = (g = (
|
|
1325
|
+
box-shadow: 0 0 0 2px ${(b = (g = (N = i.token.items) == null ? void 0 : N.groupModal) == null ? void 0 : g.title) == null ? void 0 : b.shadowColor};
|
|
1326
1326
|
transform: scale(1.02);
|
|
1327
1327
|
}
|
|
1328
1328
|
|
|
@@ -1331,7 +1331,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
1333
|
&::placeholder {
|
|
1334
|
-
color: ${(B = (P = (
|
|
1334
|
+
color: ${(B = (P = (I = i.token.items) == null ? void 0 : I.groupModal) == null ? void 0 : P.title) == null ? void 0 : B.placeholderColor};
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
1337
1337
|
&::selection {
|
|
@@ -1346,7 +1346,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
);
|
|
1348
1348
|
}, gt = (t) => {
|
|
1349
|
-
var g, b, x, k, A,
|
|
1349
|
+
var g, b, x, k, A, I, P, B, J, j, F, E, G, se, Z, Y, re, de, fe, ie, ce, Q;
|
|
1350
1350
|
const {
|
|
1351
1351
|
visible: e,
|
|
1352
1352
|
onClose: o,
|
|
@@ -1357,15 +1357,15 @@ const Ys = De(({ src: t }) => {
|
|
|
1357
1357
|
destroyOnClose: l = !0,
|
|
1358
1358
|
closable: m = !1,
|
|
1359
1359
|
footer: p = null,
|
|
1360
|
-
className:
|
|
1360
|
+
className: c,
|
|
1361
1361
|
contentClassName: u
|
|
1362
|
-
} = t, { theme: f } = pe(),
|
|
1362
|
+
} = t, { theme: f } = pe(), d = f.token.modal, [S, v] = R(!1), [z, y] = R(!1);
|
|
1363
1363
|
return X(() => {
|
|
1364
1364
|
v(!!e);
|
|
1365
1365
|
}, [e]), /* @__PURE__ */ s(ze, { children: e && /* @__PURE__ */ s(
|
|
1366
1366
|
sn,
|
|
1367
1367
|
{
|
|
1368
|
-
visible:
|
|
1368
|
+
visible: S,
|
|
1369
1369
|
onClose: () => {
|
|
1370
1370
|
y(!0), v(!1), setTimeout(() => {
|
|
1371
1371
|
y(!1), o();
|
|
@@ -1382,8 +1382,8 @@ const Ys = De(({ src: t }) => {
|
|
|
1382
1382
|
{ "modal-closing": z },
|
|
1383
1383
|
D`
|
|
1384
1384
|
.rc-dialog-mask {
|
|
1385
|
-
background: ${(g =
|
|
1386
|
-
backdrop-filter: ${(b =
|
|
1385
|
+
background: ${(g = d == null ? void 0 : d.mask) == null ? void 0 : g.backgroundColor};
|
|
1386
|
+
backdrop-filter: ${(b = d == null ? void 0 : d.mask) == null ? void 0 : b.backdropFilter};
|
|
1387
1387
|
animation: maskFadeIn 0.2s ease-out;
|
|
1388
1388
|
}
|
|
1389
1389
|
|
|
@@ -1394,7 +1394,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
to {
|
|
1396
1396
|
opacity: 1;
|
|
1397
|
-
backdrop-filter: ${(x =
|
|
1397
|
+
backdrop-filter: ${(x = d == null ? void 0 : d.mask) == null ? void 0 : x.backdropFilter};
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
@@ -1406,13 +1406,13 @@ const Ys = De(({ src: t }) => {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
1408
|
.rc-dialog-content {
|
|
1409
|
-
background: ${(k =
|
|
1410
|
-
backdrop-filter: ${(A =
|
|
1411
|
-
box-shadow: 0 20px 40px ${(
|
|
1412
|
-
0 0 0 0.75px ${(P =
|
|
1413
|
-
border: 0.75px solid ${(B =
|
|
1409
|
+
background: ${(k = d == null ? void 0 : d.content) == null ? void 0 : k.backgroundColor};
|
|
1410
|
+
backdrop-filter: ${(A = d == null ? void 0 : d.content) == null ? void 0 : A.backdropFilter};
|
|
1411
|
+
box-shadow: 0 20px 40px ${(I = d == null ? void 0 : d.content) == null ? void 0 : I.boxShadowColor},
|
|
1412
|
+
0 0 0 0.75px ${(P = d == null ? void 0 : d.content) == null ? void 0 : P.boxShadowBorderColor};
|
|
1413
|
+
border: 0.75px solid ${(B = d == null ? void 0 : d.content) == null ? void 0 : B.borderColor};
|
|
1414
1414
|
padding: 0;
|
|
1415
|
-
border-radius: ${(J =
|
|
1415
|
+
border-radius: ${(J = d == null ? void 0 : d.content) == null ? void 0 : J.borderRadius};
|
|
1416
1416
|
overflow: hidden;
|
|
1417
1417
|
animation: modalSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
1418
1418
|
position: relative;
|
|
@@ -1443,7 +1443,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1443
1443
|
@keyframes maskFadeOut {
|
|
1444
1444
|
from {
|
|
1445
1445
|
opacity: 1;
|
|
1446
|
-
backdrop-filter: ${(j =
|
|
1446
|
+
backdrop-filter: ${(j = d == null ? void 0 : d.mask) == null ? void 0 : j.backdropFilter};
|
|
1447
1447
|
}
|
|
1448
1448
|
to {
|
|
1449
1449
|
opacity: 0;
|
|
@@ -1471,7 +1471,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1471
1471
|
position: relative;
|
|
1472
1472
|
|
|
1473
1473
|
.ant-modal-name {
|
|
1474
|
-
color: ${(F =
|
|
1474
|
+
color: ${(F = d == null ? void 0 : d.header) == null ? void 0 : F.textColor};
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
1477
|
|
|
@@ -1492,25 +1492,25 @@ const Ys = De(({ src: t }) => {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
|
|
1494
1494
|
&::-webkit-scrollbar-track {
|
|
1495
|
-
background: ${(E =
|
|
1495
|
+
background: ${(E = d == null ? void 0 : d.scrollbar) == null ? void 0 : E.trackColor};
|
|
1496
1496
|
}
|
|
1497
1497
|
|
|
1498
1498
|
&::-webkit-scrollbar-thumb {
|
|
1499
|
-
background: ${(G =
|
|
1500
|
-
border-radius: ${(se =
|
|
1499
|
+
background: ${(G = d == null ? void 0 : d.scrollbar) == null ? void 0 : G.thumbColor};
|
|
1500
|
+
border-radius: ${(se = d == null ? void 0 : d.scrollbar) == null ? void 0 : se.borderRadius};
|
|
1501
1501
|
transition: background-color 0.2s ease;
|
|
1502
1502
|
}
|
|
1503
1503
|
|
|
1504
1504
|
&::-webkit-scrollbar-thumb:hover {
|
|
1505
|
-
background: ${(Z =
|
|
1505
|
+
background: ${(Z = d == null ? void 0 : d.scrollbar) == null ? void 0 : Z.thumbHoverColor};
|
|
1506
1506
|
}
|
|
1507
1507
|
|
|
1508
1508
|
/* Firefox 滚动条样式 */
|
|
1509
1509
|
scrollbar-width: thin;
|
|
1510
|
-
scrollbar-color: ${(Y =
|
|
1510
|
+
scrollbar-color: ${(Y = d == null ? void 0 : d.scrollbar) == null ? void 0 : Y.thumbColor} ${(re = d == null ? void 0 : d.scrollbar) == null ? void 0 : re.trackColor};
|
|
1511
1511
|
}
|
|
1512
1512
|
`,
|
|
1513
|
-
|
|
1513
|
+
c
|
|
1514
1514
|
),
|
|
1515
1515
|
width: a,
|
|
1516
1516
|
destroyOnClose: l,
|
|
@@ -1524,21 +1524,21 @@ const Ys = De(({ src: t }) => {
|
|
|
1524
1524
|
|
|
1525
1525
|
/* iOS 风格的滚动条 */
|
|
1526
1526
|
&::-webkit-scrollbar {
|
|
1527
|
-
width: ${(de =
|
|
1527
|
+
width: ${(de = d == null ? void 0 : d.scrollbar) == null ? void 0 : de.width};
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
1530
|
&::-webkit-scrollbar-track {
|
|
1531
|
-
background: ${(fe =
|
|
1531
|
+
background: ${(fe = d == null ? void 0 : d.scrollbar) == null ? void 0 : fe.trackColor};
|
|
1532
1532
|
}
|
|
1533
1533
|
|
|
1534
1534
|
&::-webkit-scrollbar-thumb {
|
|
1535
|
-
background: ${(ie =
|
|
1536
|
-
border-radius: ${(ce =
|
|
1535
|
+
background: ${(ie = d == null ? void 0 : d.scrollbar) == null ? void 0 : ie.thumbColor};
|
|
1536
|
+
border-radius: ${(ce = d == null ? void 0 : d.scrollbar) == null ? void 0 : ce.borderRadius};
|
|
1537
1537
|
transition: background 0.2s ease;
|
|
1538
1538
|
}
|
|
1539
1539
|
|
|
1540
1540
|
&::-webkit-scrollbar-thumb:hover {
|
|
1541
|
-
background: ${(Q =
|
|
1541
|
+
background: ${(Q = d == null ? void 0 : d.scrollbar) == null ? void 0 : Q.thumbHoverColor};
|
|
1542
1542
|
}
|
|
1543
1543
|
`,
|
|
1544
1544
|
u
|
|
@@ -1549,41 +1549,41 @@ const Ys = De(({ src: t }) => {
|
|
|
1549
1549
|
}
|
|
1550
1550
|
) });
|
|
1551
1551
|
}, qs = (t) => {
|
|
1552
|
-
const { data: e, onClose: o, onItemClick: r } = t, { list: n, setList: a, setListStatus: i, setMoveItemId: l, setMoveTargetId: m, updateItem: p } = Ae(), [
|
|
1552
|
+
const { data: e, onClose: o, onItemClick: r } = t, { list: n, setList: a, setListStatus: i, setMoveItemId: l, setMoveTargetId: m, updateItem: p } = Ae(), [c, u] = R("文件夹"), f = oe(null), d = oe(null), [S, v] = R(), [z, y] = R(), N = [...(e == null ? void 0 : e.children) ?? []];
|
|
1553
1553
|
X(() => {
|
|
1554
|
-
var
|
|
1555
|
-
e && u((
|
|
1554
|
+
var I;
|
|
1555
|
+
e && u((I = e.data) == null ? void 0 : I.name);
|
|
1556
1556
|
}, [e]);
|
|
1557
|
-
const g = (
|
|
1558
|
-
u(
|
|
1557
|
+
const g = (I) => {
|
|
1558
|
+
u(I);
|
|
1559
1559
|
}, b = () => {
|
|
1560
1560
|
e && p(e.id, {
|
|
1561
1561
|
...e.data,
|
|
1562
|
-
name:
|
|
1562
|
+
name: c
|
|
1563
1563
|
});
|
|
1564
|
-
}, x = (
|
|
1565
|
-
const P =
|
|
1566
|
-
P && (
|
|
1564
|
+
}, x = (I) => {
|
|
1565
|
+
const P = I.relatedTarget;
|
|
1566
|
+
P && (I.currentTarget.contains(P) || setTimeout(() => {
|
|
1567
1567
|
o();
|
|
1568
1568
|
}, 500));
|
|
1569
|
-
}, k = le((
|
|
1570
|
-
const { width: P, marginLeft: B } = Se.computeRowWidth(
|
|
1569
|
+
}, k = le((I) => {
|
|
1570
|
+
const { width: P, marginLeft: B } = Se.computeRowWidth(I, 112);
|
|
1571
1571
|
v(P), y(B);
|
|
1572
1572
|
}, []), A = le(
|
|
1573
|
-
(
|
|
1574
|
-
if (
|
|
1573
|
+
(I) => {
|
|
1574
|
+
if (d.current && (d.current.disconnect(), d.current = null), f.current = I, !!I)
|
|
1575
1575
|
if (window.requestAnimationFrame(() => {
|
|
1576
|
-
k(
|
|
1576
|
+
k(I);
|
|
1577
1577
|
}), "ResizeObserver" in window) {
|
|
1578
1578
|
const P = new ResizeObserver(() => {
|
|
1579
|
-
k(
|
|
1579
|
+
k(I);
|
|
1580
1580
|
});
|
|
1581
|
-
P.observe(
|
|
1581
|
+
P.observe(I), d.current = P;
|
|
1582
1582
|
} else {
|
|
1583
1583
|
const P = () => {
|
|
1584
|
-
k(
|
|
1584
|
+
k(I);
|
|
1585
1585
|
};
|
|
1586
|
-
globalThis.addEventListener("resize", P),
|
|
1586
|
+
globalThis.addEventListener("resize", P), d.current = {
|
|
1587
1587
|
disconnect: () => globalThis.removeEventListener("resize", P)
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
@@ -1602,7 +1602,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1602
1602
|
`,
|
|
1603
1603
|
visible: !!e,
|
|
1604
1604
|
onClose: o,
|
|
1605
|
-
title: /* @__PURE__ */ s(Xs, { value:
|
|
1605
|
+
title: /* @__PURE__ */ s(Xs, { value: c, onChange: g, onBlur: b, placeholder: "文件夹" }),
|
|
1606
1606
|
mousePosition: e != null && e.pageX && (e != null && e.pageY) ? {
|
|
1607
1607
|
x: e == null ? void 0 : e.pageX,
|
|
1608
1608
|
y: e == null ? void 0 : e.pageY
|
|
@@ -1611,24 +1611,24 @@ const Ys = De(({ src: t }) => {
|
|
|
1611
1611
|
mt,
|
|
1612
1612
|
{
|
|
1613
1613
|
className: L("zs-grid zs-place-items-center zs-grid-flow-row-dense zs-mx-auto", js),
|
|
1614
|
-
style: { width:
|
|
1614
|
+
style: { width: S, marginLeft: z },
|
|
1615
1615
|
...Gs,
|
|
1616
1616
|
list: (e == null ? void 0 : e.children) ?? [],
|
|
1617
|
-
setList: (
|
|
1617
|
+
setList: (I) => {
|
|
1618
1618
|
var J, j;
|
|
1619
|
-
const P =
|
|
1620
|
-
P.length === (B == null ? void 0 : B.length) && P.every((F, E) => F === B[E]) || P.length < ((B == null ? void 0 : B.length) ?? 0) || a(
|
|
1619
|
+
const P = I.map((F) => F.id), B = (j = (J = n.find((F) => F.id === (e == null ? void 0 : e.id))) == null ? void 0 : J.children) == null ? void 0 : j.map((F) => F.id);
|
|
1620
|
+
P.length === (B == null ? void 0 : B.length) && P.every((F, E) => F === B[E]) || P.length < ((B == null ? void 0 : B.length) ?? 0) || a(I, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
|
|
1621
1621
|
},
|
|
1622
1622
|
onMove: () => (m(null), i("onMove"), !0),
|
|
1623
|
-
onStart: (
|
|
1624
|
-
const P =
|
|
1623
|
+
onStart: (I) => {
|
|
1624
|
+
const P = I.item.dataset;
|
|
1625
1625
|
P != null && P.id && l(P.id), i("onMove");
|
|
1626
1626
|
},
|
|
1627
1627
|
onEnd: () => {
|
|
1628
1628
|
l(null), m(null), i(null);
|
|
1629
1629
|
},
|
|
1630
1630
|
ghostClass: wo,
|
|
1631
|
-
children: /* @__PURE__ */ s(ze, { mode: "popLayout", children:
|
|
1631
|
+
children: /* @__PURE__ */ s(ze, { mode: "popLayout", children: N.map((I, P) => /* @__PURE__ */ s("div", { className: "zs-w-28 zs-h-28 zs-flex zs-items-center zs-justify-center", children: /* @__PURE__ */ s(Pe, { data: I, itemIndex: P, onClick: r }, I.id) }, I.id)) })
|
|
1632
1632
|
}
|
|
1633
1633
|
) })
|
|
1634
1634
|
}
|
|
@@ -1722,16 +1722,16 @@ const Ys = De(({ src: t }) => {
|
|
|
1722
1722
|
}
|
|
1723
1723
|
);
|
|
1724
1724
|
}, ea = ({ onClick: t, className: e }) => {
|
|
1725
|
-
var
|
|
1726
|
-
const [o, r] = R(!1), { theme: n } = pe(), a = (v = (
|
|
1725
|
+
var d, S, v;
|
|
1726
|
+
const [o, r] = R(!1), { theme: n } = pe(), a = (v = (S = (d = n == null ? void 0 : n.token) == null ? void 0 : d.dock) == null ? void 0 : S.launchpad) == null ? void 0 : v.icon, i = a.textColor, l = a.backgroundColor, m = a.borderColor, p = a.shadowColor, c = a.hoverGlowColor, u = (z, y) => {
|
|
1727
1727
|
if (z.startsWith("#")) {
|
|
1728
|
-
const g = z.slice(1), b = parseInt(g.slice(0, 2), 16), x = parseInt(g.slice(2, 4), 16), k = parseInt(g.slice(4, 6), 16), A = y * 15,
|
|
1729
|
-
return `rgb(${
|
|
1728
|
+
const g = z.slice(1), b = parseInt(g.slice(0, 2), 16), x = parseInt(g.slice(2, 4), 16), k = parseInt(g.slice(4, 6), 16), A = y * 15, I = Math.max(0, b - A), P = Math.max(0, x - A), B = Math.max(0, k - A);
|
|
1729
|
+
return `rgb(${I}, ${P}, ${B})`;
|
|
1730
1730
|
}
|
|
1731
|
-
const
|
|
1732
|
-
if (
|
|
1733
|
-
const g = parseInt(
|
|
1734
|
-
return `rgba(${
|
|
1731
|
+
const N = z.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);
|
|
1732
|
+
if (N) {
|
|
1733
|
+
const g = parseInt(N[1]), b = parseInt(N[2]), x = parseInt(N[3]), k = N[4] || "1", A = y * 15, I = Math.max(0, g - A), P = Math.max(0, b - A), B = Math.max(0, x - A);
|
|
1734
|
+
return `rgba(${I}, ${P}, ${B}, ${k})`;
|
|
1735
1735
|
}
|
|
1736
1736
|
return z;
|
|
1737
1737
|
}, f = [
|
|
@@ -1777,7 +1777,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1777
1777
|
overflow: "visible"
|
|
1778
1778
|
},
|
|
1779
1779
|
children: f.map((z, y) => {
|
|
1780
|
-
const
|
|
1780
|
+
const N = y * 4, g = 0, b = o ? N + y * 2 : N, x = g, k = 0, A = 1 - y * 0.05, I = f.length - y, P = (B) => B === 0 ? l : u(l, B);
|
|
1781
1781
|
return /* @__PURE__ */ s(
|
|
1782
1782
|
V.div,
|
|
1783
1783
|
{
|
|
@@ -1786,7 +1786,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1786
1786
|
D`
|
|
1787
1787
|
background: ${P(y)};
|
|
1788
1788
|
color: ${i};
|
|
1789
|
-
z-index: ${
|
|
1789
|
+
z-index: ${I};
|
|
1790
1790
|
box-shadow: 0 ${1 + y * 0.5}px ${4 + y * 1}px
|
|
1791
1791
|
${p.replace(/[\d.]+\)$/, `${0.1 + y * 0.02})`)};
|
|
1792
1792
|
border: 0.5px solid ${m};
|
|
@@ -1820,7 +1820,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1820
1820
|
className: L(
|
|
1821
1821
|
"zs-absolute zs-inset-0 zs-rounded-xl zs-pointer-events-none",
|
|
1822
1822
|
D`
|
|
1823
|
-
background: radial-gradient(circle, ${
|
|
1823
|
+
background: radial-gradient(circle, ${c} 0%, transparent 70%);
|
|
1824
1824
|
opacity: 0;
|
|
1825
1825
|
`
|
|
1826
1826
|
),
|
|
@@ -1842,10 +1842,10 @@ const Ys = De(({ src: t }) => {
|
|
|
1842
1842
|
onLaunchpadClick: l,
|
|
1843
1843
|
onDrop: m,
|
|
1844
1844
|
onDockItemsChange: p,
|
|
1845
|
-
itemSize:
|
|
1845
|
+
itemSize: c = 56
|
|
1846
1846
|
}) => {
|
|
1847
|
-
var
|
|
1848
|
-
const { setListStatus: u } = Ae(), { theme: f } = pe(),
|
|
1847
|
+
var N;
|
|
1848
|
+
const { setListStatus: u } = Ae(), { theme: f } = pe(), d = f.token.dock, S = f.token.base, v = (g, b) => n ? n(g, b) : /* @__PURE__ */ s(Pe, { data: g, itemIndex: b, noLetters: !0, from: "dock", iconSize: c }, g.id), z = (g, b) => a ? a(g, b) : /* @__PURE__ */ s(
|
|
1849
1849
|
Pe,
|
|
1850
1850
|
{
|
|
1851
1851
|
data: g,
|
|
@@ -1853,7 +1853,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1853
1853
|
noLetters: !0,
|
|
1854
1854
|
from: "dock",
|
|
1855
1855
|
disabledDrag: !0,
|
|
1856
|
-
iconSize:
|
|
1856
|
+
iconSize: c
|
|
1857
1857
|
},
|
|
1858
1858
|
g.id
|
|
1859
1859
|
);
|
|
@@ -1866,7 +1866,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1866
1866
|
"zs-flex zs-transition-colors",
|
|
1867
1867
|
o === "top" || o === "bottom" ? "zs-w-[1px] zs-h-8 zs-mx-1" : "zs-w-8 zs-h-[1px] zs-my-1",
|
|
1868
1868
|
D`
|
|
1869
|
-
background-color: ${((
|
|
1869
|
+
background-color: ${((N = d == null ? void 0 : d.divider) == null ? void 0 : N.color) || "rgba(255, 255, 255, 0.3)"};
|
|
1870
1870
|
`
|
|
1871
1871
|
)
|
|
1872
1872
|
}
|
|
@@ -1880,9 +1880,9 @@ const Ys = De(({ src: t }) => {
|
|
|
1880
1880
|
o === "top" && "zs-mb-4",
|
|
1881
1881
|
o === "bottom" && "zs-mt-4",
|
|
1882
1882
|
D`
|
|
1883
|
-
background-color: ${(
|
|
1884
|
-
border-color: ${(
|
|
1885
|
-
box-shadow: 0 8px 32px ${(
|
|
1883
|
+
background-color: ${(d == null ? void 0 : d.backgroundColor) || "rgba(255, 255, 255, 0.8)"};
|
|
1884
|
+
border-color: ${(d == null ? void 0 : d.borderColor) || "rgba(255, 255, 255, 0.2)"};
|
|
1885
|
+
box-shadow: 0 8px 32px ${(d == null ? void 0 : d.boxShadowColor) || "rgba(0, 0, 0, 0.1)"};
|
|
1886
1886
|
`,
|
|
1887
1887
|
r
|
|
1888
1888
|
),
|
|
@@ -1915,7 +1915,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1915
1915
|
className: L(
|
|
1916
1916
|
"desktop-dock-sortable zs-flex zs-gap-3 flex-1 zs-relative",
|
|
1917
1917
|
D`
|
|
1918
|
-
min-height: ${
|
|
1918
|
+
min-height: ${c}px;
|
|
1919
1919
|
${o === "top" || o === "bottom" ? "flex-direction: row; overflow-x: auto; overflow-y: hidden;" : "flex-direction: column; overflow-y: auto; overflow-x: hidden;"}
|
|
1920
1920
|
|
|
1921
1921
|
/* 隐藏滚动条但保持滚动功能 */
|
|
@@ -1932,12 +1932,12 @@ const Ys = De(({ src: t }) => {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
|
|
1934
1934
|
.sortable-ghost {
|
|
1935
|
-
width: ${
|
|
1936
|
-
height: ${
|
|
1935
|
+
width: ${c}px;
|
|
1936
|
+
height: ${c}px;
|
|
1937
1937
|
div,
|
|
1938
1938
|
img {
|
|
1939
|
-
width: ${
|
|
1940
|
-
height: ${
|
|
1939
|
+
width: ${c}px;
|
|
1940
|
+
height: ${c}px;
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
1943
|
`,
|
|
@@ -1953,11 +1953,11 @@ const Ys = De(({ src: t }) => {
|
|
|
1953
1953
|
className: L(
|
|
1954
1954
|
"drag-disabled dock-items-empty zs-flex zs-items-center zs-justify-center zs-gap-2 zs-rounded-xl zs-border-2 zs-border-dashed zs-absolute zs-top-0 zs-left-0",
|
|
1955
1955
|
D`
|
|
1956
|
-
min-height: ${
|
|
1957
|
-
${o === "top" || o === "bottom" ? "width: 100%; padding: 8px 12px;" : `height: 100%; min-width: ${
|
|
1958
|
-
color: ${(
|
|
1959
|
-
border-color: ${(
|
|
1960
|
-
background-color: ${(
|
|
1956
|
+
min-height: ${c}px;
|
|
1957
|
+
${o === "top" || o === "bottom" ? "width: 100%; padding: 8px 12px;" : `height: 100%; min-width: ${c}px; padding: 12px 8px;`};
|
|
1958
|
+
color: ${(S == null ? void 0 : S.textColor) || "rgba(0, 0, 0, 0.6)"};
|
|
1959
|
+
border-color: ${(d == null ? void 0 : d.borderColor) || "rgba(0, 0, 0, 0.2)"};
|
|
1960
|
+
background-color: ${(d == null ? void 0 : d.backgroundColor) || "rgba(255, 255, 255, 0.25)"};
|
|
1961
1961
|
opacity: 0.5 !important;
|
|
1962
1962
|
`
|
|
1963
1963
|
),
|
|
@@ -1974,8 +1974,8 @@ const Ys = De(({ src: t }) => {
|
|
|
1974
1974
|
}, bt = D`
|
|
1975
1975
|
transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
1976
1976
|
`, ta = ({ value: t, onChange: e, placeholder: o = "搜索应用", className: r = "" }) => {
|
|
1977
|
-
var
|
|
1978
|
-
const { theme: n } = pe(), a = oe(null), i = oe(null), l = oe(null), [m, p] = R(!1),
|
|
1977
|
+
var d, S, v, z, y, N, g, b, x, k, A, I, P, B, J, j, F, E, G, se, Z, Y, re, de, fe, ie, ce, Q, ue, Ie, ne, xe, me, ve, we, O, q, U, _, ee, K, h, C;
|
|
1978
|
+
const { theme: n } = pe(), a = oe(null), i = oe(null), l = oe(null), [m, p] = R(!1), c = () => {
|
|
1979
1979
|
p(!0), i.current && (i.current.style.transform = "translateY(-50%) translateX(-0.5rem)"), l.current && (l.current.style.transform = "translateY(-50%) translateX(0.5rem)");
|
|
1980
1980
|
}, u = () => {
|
|
1981
1981
|
p(!1), i.current && (i.current.style.transform = "translateY(-50%) translateX(0)"), l.current && (l.current.style.transform = "translateY(-50%) translateX(0)");
|
|
@@ -1991,7 +1991,7 @@ const Ys = De(({ src: t }) => {
|
|
|
1991
1991
|
className: L(
|
|
1992
1992
|
"zs-absolute zs-left-4 zs-top-1/2 zs-transform zs--translate-y-1/2 zs-pointer-events-none zs-transition-all zs-duration-300",
|
|
1993
1993
|
D`
|
|
1994
|
-
color: ${m ? (z = (v = (
|
|
1994
|
+
color: ${m ? (z = (v = (S = (d = n.token.dock) == null ? void 0 : d.launchpad) == null ? void 0 : S.modal) == null ? void 0 : v.searchBox) == null ? void 0 : z.iconFocusColor : (b = (g = (N = (y = n.token.dock) == null ? void 0 : y.launchpad) == null ? void 0 : N.modal) == null ? void 0 : g.searchBox) == null ? void 0 : b.iconColor};
|
|
1995
1995
|
`,
|
|
1996
1996
|
bt
|
|
1997
1997
|
),
|
|
@@ -2005,7 +2005,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2005
2005
|
className: L(
|
|
2006
2006
|
"zs-w-full zs-h-11 zs-pl-12 zs-pr-12 zs-border-none zs-rounded-[22px] zs-text-base zs-outline-none zs-transition-all zs-duration-300 placeholder:zs-font-normal focus:zs-scale-[1.02]",
|
|
2007
2007
|
D`
|
|
2008
|
-
background-color: ${(
|
|
2008
|
+
background-color: ${(I = (A = (k = (x = n.token.dock) == null ? void 0 : x.launchpad) == null ? void 0 : k.modal) == null ? void 0 : A.searchBox) == null ? void 0 : I.backgroundColor};
|
|
2009
2009
|
color: ${(j = (J = (B = (P = n.token.dock) == null ? void 0 : P.launchpad) == null ? void 0 : B.modal) == null ? void 0 : J.searchBox) == null ? void 0 : j.textColor};
|
|
2010
2010
|
&::placeholder {
|
|
2011
2011
|
color: ${(se = (G = (E = (F = n.token.dock) == null ? void 0 : F.launchpad) == null ? void 0 : E.modal) == null ? void 0 : G.searchBox) == null ? void 0 : se.placeholderColor};
|
|
@@ -2021,7 +2021,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2021
2021
|
placeholder: o,
|
|
2022
2022
|
value: t,
|
|
2023
2023
|
onChange: (w) => e(w.target.value),
|
|
2024
|
-
onFocus:
|
|
2024
|
+
onFocus: c,
|
|
2025
2025
|
onBlur: u
|
|
2026
2026
|
}
|
|
2027
2027
|
),
|
|
@@ -2050,32 +2050,32 @@ const Ys = De(({ src: t }) => {
|
|
|
2050
2050
|
const { list: r } = Ae(), [n, a] = R(""), { allApps: i, groupedData: l, groups: m, groupCounts: p } = te(() => {
|
|
2051
2051
|
if (!r || r.length === 0)
|
|
2052
2052
|
return { allApps: [], groupedData: [], groups: [], groupCounts: [] };
|
|
2053
|
-
const u = (g) => g.flatMap((b) => b.type === "app" ? [{ ...b }] : b.type === "group" && b.children ? u(b.children) : []), f = r.flatMap((g) => g.children ? u(g.children) : []),
|
|
2053
|
+
const u = (g) => g.flatMap((b) => b.type === "app" ? [{ ...b }] : b.type === "group" && b.children ? u(b.children) : []), f = r.flatMap((g) => g.children ? u(g.children) : []), S = (n.trim() ? f.filter((g) => {
|
|
2054
2054
|
var x;
|
|
2055
2055
|
return (((x = g.data) == null ? void 0 : x.name) || g.id || "").toString().toLowerCase().includes(n.toLowerCase());
|
|
2056
2056
|
}) : f).sort((g, b) => {
|
|
2057
|
-
var A,
|
|
2058
|
-
const x = (((A = g.data) == null ? void 0 : A.name) || g.id || "").toString(), k = (((
|
|
2057
|
+
var A, I;
|
|
2058
|
+
const x = (((A = g.data) == null ? void 0 : A.name) || g.id || "").toString(), k = (((I = b.data) == null ? void 0 : I.name) || b.id || "").toString();
|
|
2059
2059
|
return x.localeCompare(k);
|
|
2060
2060
|
}), v = /* @__PURE__ */ new Map();
|
|
2061
|
-
|
|
2061
|
+
S.forEach((g) => {
|
|
2062
2062
|
var A;
|
|
2063
2063
|
const x = (((A = g.data) == null ? void 0 : A.name) || g.id || "").toString().charAt(0).toUpperCase(), k = /[A-Z]/.test(x) ? x : "#";
|
|
2064
2064
|
v.has(k) || v.set(k, []), v.get(k).push(g);
|
|
2065
2065
|
});
|
|
2066
|
-
const z = Array.from(v.keys()).sort((g, b) => g === "#" ? 1 : b === "#" ? -1 : g.localeCompare(b)), y = [],
|
|
2066
|
+
const z = Array.from(v.keys()).sort((g, b) => g === "#" ? 1 : b === "#" ? -1 : g.localeCompare(b)), y = [], N = [];
|
|
2067
2067
|
return z.forEach((g) => {
|
|
2068
2068
|
const b = v.get(g) || [];
|
|
2069
|
-
y.push(...b),
|
|
2069
|
+
y.push(...b), N.push(b.length);
|
|
2070
2070
|
}), {
|
|
2071
|
-
allApps:
|
|
2071
|
+
allApps: S,
|
|
2072
2072
|
groupedData: y,
|
|
2073
2073
|
groups: z,
|
|
2074
|
-
groupCounts:
|
|
2074
|
+
groupCounts: N
|
|
2075
2075
|
};
|
|
2076
|
-
}, [r, n]),
|
|
2077
|
-
const f = m[u],
|
|
2078
|
-
|
|
2076
|
+
}, [r, n]), c = (u) => {
|
|
2077
|
+
const f = m[u], d = document.getElementById(`group-${f}`);
|
|
2078
|
+
d && d.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
2079
2079
|
};
|
|
2080
2080
|
return /* @__PURE__ */ T(
|
|
2081
2081
|
gt,
|
|
@@ -2104,11 +2104,11 @@ const Ys = De(({ src: t }) => {
|
|
|
2104
2104
|
) : (
|
|
2105
2105
|
// 正常模式:字母分组布局groups
|
|
2106
2106
|
m.map((u, f) => {
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2109
|
-
|
|
2107
|
+
const d = p.slice(0, f).reduce((v, z) => v + z, 0), S = l.slice(
|
|
2108
|
+
d,
|
|
2109
|
+
d + p[f]
|
|
2110
2110
|
);
|
|
2111
|
-
return /* @__PURE__ */ s(Ce, { children:
|
|
2111
|
+
return /* @__PURE__ */ s(Ce, { children: S.map((v, z) => /* @__PURE__ */ s(
|
|
2112
2112
|
"div",
|
|
2113
2113
|
{
|
|
2114
2114
|
id: z === 0 ? `group-${u}` : void 0,
|
|
@@ -2117,7 +2117,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2117
2117
|
Pe,
|
|
2118
2118
|
{
|
|
2119
2119
|
data: v,
|
|
2120
|
-
itemIndex:
|
|
2120
|
+
itemIndex: d + z,
|
|
2121
2121
|
parentIds: [],
|
|
2122
2122
|
onClick: o,
|
|
2123
2123
|
disabledDrag: !0
|
|
@@ -2154,7 +2154,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2154
2154
|
},
|
|
2155
2155
|
whileTap: { scale: 0.95 },
|
|
2156
2156
|
className: "zs-text-sm zs-p-2 zs-cursor-pointer zs-rounded-xl zs-w-8 zs-h-8 zs-flex zs-items-center zs-justify-center zs-bg-transparent zs-border-none zs-font-semibold zs-my-1 zs-text-[#666] zs-leading-none",
|
|
2157
|
-
onClick: () =>
|
|
2157
|
+
onClick: () => c(f),
|
|
2158
2158
|
title: `跳转到 ${u}`,
|
|
2159
2159
|
children: u
|
|
2160
2160
|
},
|
|
@@ -2190,12 +2190,12 @@ const Ys = De(({ src: t }) => {
|
|
|
2190
2190
|
position: "bottom",
|
|
2191
2191
|
showLaunchpad: !0
|
|
2192
2192
|
}
|
|
2193
|
-
} = t, p = oe(null),
|
|
2193
|
+
} = t, p = oe(null), c = oe(null), u = oe(null), [f, d] = R(0), [S, v] = R(!1), [z, y] = R(!1), [N, g] = R(!0), {
|
|
2194
2194
|
list: b,
|
|
2195
2195
|
setList: x,
|
|
2196
2196
|
setListStatus: k,
|
|
2197
2197
|
showInfoItemData: A,
|
|
2198
|
-
setShowInfoItemData:
|
|
2198
|
+
setShowInfoItemData: I,
|
|
2199
2199
|
openGroupItemData: P,
|
|
2200
2200
|
setOpenGroupItemData: B,
|
|
2201
2201
|
setMoveItemId: J,
|
|
@@ -2359,7 +2359,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2359
2359
|
/* @__PURE__ */ T(
|
|
2360
2360
|
"div",
|
|
2361
2361
|
{
|
|
2362
|
-
ref:
|
|
2362
|
+
ref: c,
|
|
2363
2363
|
className: L("zs-relative zs-w-full zs-h-full", xe),
|
|
2364
2364
|
onDragOver: (h) => {
|
|
2365
2365
|
h.preventDefault(), u.current && u.current.handleDragMove(h);
|
|
@@ -2404,12 +2404,12 @@ const Ys = De(({ src: t }) => {
|
|
|
2404
2404
|
po,
|
|
2405
2405
|
{
|
|
2406
2406
|
ref: u,
|
|
2407
|
-
isDragging:
|
|
2407
|
+
isDragging: S,
|
|
2408
2408
|
activeSlide: f,
|
|
2409
2409
|
totalSlides: Q.length,
|
|
2410
2410
|
maxSlides: a,
|
|
2411
2411
|
sliderRef: n ?? p,
|
|
2412
|
-
containerRef:
|
|
2412
|
+
containerRef: c,
|
|
2413
2413
|
onCreateNewPage: ue
|
|
2414
2414
|
}
|
|
2415
2415
|
),
|
|
@@ -2423,7 +2423,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2423
2423
|
infinite: !1,
|
|
2424
2424
|
dots: !0,
|
|
2425
2425
|
lazyLoad: "anticipated",
|
|
2426
|
-
touchMove:
|
|
2426
|
+
touchMove: N,
|
|
2427
2427
|
className: L(
|
|
2428
2428
|
ne,
|
|
2429
2429
|
D`
|
|
@@ -2476,7 +2476,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2476
2476
|
}
|
|
2477
2477
|
),
|
|
2478
2478
|
beforeChange: (h, C) => {
|
|
2479
|
-
|
|
2479
|
+
d(C), Y(C);
|
|
2480
2480
|
},
|
|
2481
2481
|
...r,
|
|
2482
2482
|
children: Q.map((h) => /* @__PURE__ */ s(
|
|
@@ -2543,8 +2543,8 @@ const Ys = De(({ src: t }) => {
|
|
|
2543
2543
|
`
|
|
2544
2544
|
),
|
|
2545
2545
|
"data-id": C.id,
|
|
2546
|
-
layout:
|
|
2547
|
-
transition:
|
|
2546
|
+
layout: S ? !1 : "position",
|
|
2547
|
+
transition: S ? { duration: 0 } : { type: "spring", stiffness: 380, damping: 38 },
|
|
2548
2548
|
onMouseEnter: () => g(!1),
|
|
2549
2549
|
onMouseLeave: () => g(!0),
|
|
2550
2550
|
children: /* @__PURE__ */ s(
|
|
@@ -2572,8 +2572,8 @@ const Ys = De(({ src: t }) => {
|
|
|
2572
2572
|
`
|
|
2573
2573
|
),
|
|
2574
2574
|
"data-id": C.id,
|
|
2575
|
-
layout:
|
|
2576
|
-
transition:
|
|
2575
|
+
layout: S ? !1 : "position",
|
|
2576
|
+
transition: S ? { duration: 0 } : { type: "spring", stiffness: 380, damping: 38 },
|
|
2577
2577
|
onMouseEnter: () => g(!1),
|
|
2578
2578
|
onMouseLeave: () => g(!0),
|
|
2579
2579
|
children: /* @__PURE__ */ s(Pe, { data: C, itemIndex: w, onClick: i })
|
|
@@ -2602,7 +2602,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2602
2602
|
{
|
|
2603
2603
|
data: A,
|
|
2604
2604
|
onClose: () => {
|
|
2605
|
-
|
|
2605
|
+
I(null);
|
|
2606
2606
|
}
|
|
2607
2607
|
}
|
|
2608
2608
|
),
|
|
@@ -2645,8 +2645,8 @@ const Ys = De(({ src: t }) => {
|
|
|
2645
2645
|
damping: 30,
|
|
2646
2646
|
duration: 0.15
|
|
2647
2647
|
},
|
|
2648
|
-
onMouseDown: (
|
|
2649
|
-
|
|
2648
|
+
onMouseDown: (c) => {
|
|
2649
|
+
c.stopPropagation(), c.preventDefault();
|
|
2650
2650
|
},
|
|
2651
2651
|
...r,
|
|
2652
2652
|
children: o
|
|
@@ -2658,7 +2658,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2658
2658
|
}
|
|
2659
2659
|
}), st = ({ icon: t, text: e, color: o, textColor: r, onClick: n, index: a, children: i, ...l }) => {
|
|
2660
2660
|
var v, z, y;
|
|
2661
|
-
const { hoveredIndex: m, setHoveredIndex: p } = Te(St), { theme:
|
|
2661
|
+
const { hoveredIndex: m, setHoveredIndex: p } = Te(St), { theme: c } = pe(), u = m === a, f = r || ((v = c.token.contextMenu) == null ? void 0 : v.textColor) || "#1d1d1f", d = o || ((z = c.token.contextMenu) == null ? void 0 : z.textColor) || "black";
|
|
2662
2662
|
return /* @__PURE__ */ T(
|
|
2663
2663
|
V.div,
|
|
2664
2664
|
{
|
|
@@ -2681,7 +2681,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2681
2681
|
"zs-absolute zs-top-0.5 zs-left-2 zs-right-2 zs-bottom-0.5 zs-bg-black zs-bg-opacity-5 zs-rounded-lg",
|
|
2682
2682
|
D`
|
|
2683
2683
|
z-index: -1;
|
|
2684
|
-
background-color: ${((y =
|
|
2684
|
+
background-color: ${((y = c.token.contextMenu) == null ? void 0 : y.activeColor) || "rgba(0, 0, 0, 0.05)"};
|
|
2685
2685
|
`
|
|
2686
2686
|
),
|
|
2687
2687
|
initial: { opacity: 0 },
|
|
@@ -2715,7 +2715,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2715
2715
|
className: L(
|
|
2716
2716
|
"zs-flex zs-items-center zs-justify-center zs-shrink-0",
|
|
2717
2717
|
D`
|
|
2718
|
-
color: ${
|
|
2718
|
+
color: ${d};
|
|
2719
2719
|
width: 18px;
|
|
2720
2720
|
height: 18px;
|
|
2721
2721
|
`
|
|
@@ -2728,11 +2728,11 @@ const Ys = De(({ src: t }) => {
|
|
|
2728
2728
|
}
|
|
2729
2729
|
);
|
|
2730
2730
|
}, na = ({ text: t, icon: e, index: o, children: r, color: n, textColor: a, ...i }) => {
|
|
2731
|
-
var A,
|
|
2732
|
-
const [l, m] = R(!1), [p,
|
|
2733
|
-
if (f.current && clearTimeout(f.current),
|
|
2731
|
+
var A, I, P;
|
|
2732
|
+
const [l, m] = R(!1), [p, c] = R({ x: 0, y: 0 }), u = oe(null), f = oe(null), { hoveredIndex: d, setHoveredIndex: S } = Te(St), { theme: v } = pe(), z = d === o, y = a || ((A = v.token.contextMenu) == null ? void 0 : A.textColor) || "#1d1d1f", N = n || ((I = v.token.contextMenu) == null ? void 0 : I.textColor) || "black", g = () => {
|
|
2733
|
+
if (f.current && clearTimeout(f.current), S(o), m(!0), u.current) {
|
|
2734
2734
|
const B = u.current.getBoundingClientRect();
|
|
2735
|
-
|
|
2735
|
+
c({
|
|
2736
2736
|
x: B.width - 4,
|
|
2737
2737
|
y: 0
|
|
2738
2738
|
});
|
|
@@ -2804,7 +2804,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2804
2804
|
className: L(
|
|
2805
2805
|
"zs-flex zs-items-center zs-justify-center zs-shrink-0",
|
|
2806
2806
|
D`
|
|
2807
|
-
color: ${
|
|
2807
|
+
color: ${N};
|
|
2808
2808
|
width: 18px;
|
|
2809
2809
|
height: 18px;
|
|
2810
2810
|
`
|
|
@@ -2838,7 +2838,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2838
2838
|
}, ra = ({ sizes: t, currentSize: e, onSizeChange: o }) => {
|
|
2839
2839
|
const [r, n] = R(null), { theme: a } = pe();
|
|
2840
2840
|
return /* @__PURE__ */ s(Ce, { children: t.map((i) => {
|
|
2841
|
-
var p,
|
|
2841
|
+
var p, c, u;
|
|
2842
2842
|
const l = r === i, m = e === i;
|
|
2843
2843
|
return /* @__PURE__ */ T(
|
|
2844
2844
|
V.div,
|
|
@@ -2882,7 +2882,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2882
2882
|
D`
|
|
2883
2883
|
font-weight: 400;
|
|
2884
2884
|
line-height: 18px;
|
|
2885
|
-
color: ${((
|
|
2885
|
+
color: ${((c = a.token.contextMenu) == null ? void 0 : c.textColor) || "#1d1d1f"};
|
|
2886
2886
|
letter-spacing: -0.28px;
|
|
2887
2887
|
`
|
|
2888
2888
|
),
|
|
@@ -2920,21 +2920,21 @@ const Ys = De(({ src: t }) => {
|
|
|
2920
2920
|
onInfoClick: l,
|
|
2921
2921
|
onShareClick: m,
|
|
2922
2922
|
onRemoveClick: p
|
|
2923
|
-
} = t, { contextMenu:
|
|
2923
|
+
} = t, { contextMenu: c, setContextMenu: u, hideContextMenu: f, setShowInfoItemData: d, removeItem: S, updateItemConfig: v } = Ae(), { typeConfigMap: z, dataTypeMenuConfigMap: y, theme: N } = pe(), [g, b] = R(null), { data: x } = c ?? {}, { config: k = {} } = x ?? {}, A = () => {
|
|
2924
2924
|
var F;
|
|
2925
|
-
return ct(((F =
|
|
2926
|
-
},
|
|
2925
|
+
return ct(((F = c == null ? void 0 : c.data) == null ? void 0 : F.type) || "app", z).sizeConfigs.map((E) => E.name);
|
|
2926
|
+
}, I = () => {
|
|
2927
2927
|
var F;
|
|
2928
|
-
const j = (F =
|
|
2928
|
+
const j = (F = c == null ? void 0 : c.data) == null ? void 0 : F.dataType;
|
|
2929
2929
|
return !j || !y ? [] : y[j] || [];
|
|
2930
2930
|
}, P = {
|
|
2931
2931
|
setContextMenu: u,
|
|
2932
2932
|
hideContextMenu: f,
|
|
2933
|
-
setShowInfoItemData:
|
|
2934
|
-
removeItem:
|
|
2933
|
+
setShowInfoItemData: d,
|
|
2934
|
+
removeItem: S,
|
|
2935
2935
|
updateItemConfig: v
|
|
2936
2936
|
};
|
|
2937
|
-
return /* @__PURE__ */ s(ze, { children:
|
|
2937
|
+
return /* @__PURE__ */ s(ze, { children: c && i && /* @__PURE__ */ s(St.Provider, { value: { hoveredIndex: g, setHoveredIndex: b }, children: /* @__PURE__ */ T(
|
|
2938
2938
|
Lo,
|
|
2939
2939
|
{
|
|
2940
2940
|
style: {
|
|
@@ -2946,15 +2946,15 @@ const Ys = De(({ src: t }) => {
|
|
|
2946
2946
|
{
|
|
2947
2947
|
text: "移除",
|
|
2948
2948
|
icon: /* @__PURE__ */ s(un, {}),
|
|
2949
|
-
color: ((B =
|
|
2950
|
-
textColor: ((J =
|
|
2949
|
+
color: ((B = N.token.contextMenu) == null ? void 0 : B.dangerColor) || "#ff3b30",
|
|
2950
|
+
textColor: ((J = N.token.contextMenu) == null ? void 0 : J.dangerColor) || "#ff3b30",
|
|
2951
2951
|
index: 0,
|
|
2952
2952
|
onClick: () => {
|
|
2953
2953
|
if (p) {
|
|
2954
|
-
p(
|
|
2954
|
+
p(c.data, S);
|
|
2955
2955
|
return;
|
|
2956
2956
|
}
|
|
2957
|
-
u(null),
|
|
2957
|
+
u(null), S(c.data.id);
|
|
2958
2958
|
}
|
|
2959
2959
|
}
|
|
2960
2960
|
),
|
|
@@ -2966,7 +2966,7 @@ const Ys = De(({ src: t }) => {
|
|
|
2966
2966
|
index: 1,
|
|
2967
2967
|
onClick: () => {
|
|
2968
2968
|
if (m) {
|
|
2969
|
-
m(
|
|
2969
|
+
m(c.data);
|
|
2970
2970
|
return;
|
|
2971
2971
|
}
|
|
2972
2972
|
}
|
|
@@ -2980,20 +2980,20 @@ const Ys = De(({ src: t }) => {
|
|
|
2980
2980
|
index: 2,
|
|
2981
2981
|
onClick: () => {
|
|
2982
2982
|
if (l) {
|
|
2983
|
-
l(
|
|
2983
|
+
l(c.data);
|
|
2984
2984
|
return;
|
|
2985
2985
|
}
|
|
2986
|
-
|
|
2987
|
-
...
|
|
2988
|
-
pageX:
|
|
2989
|
-
pageY:
|
|
2986
|
+
d({
|
|
2987
|
+
...c.data,
|
|
2988
|
+
pageX: c.pageX,
|
|
2989
|
+
pageY: c.pageY
|
|
2990
2990
|
}), f();
|
|
2991
2991
|
}
|
|
2992
2992
|
}
|
|
2993
2993
|
),
|
|
2994
2994
|
n && k.allowResize !== !1 && (() => {
|
|
2995
2995
|
var G, se;
|
|
2996
|
-
const j = ct(((G =
|
|
2996
|
+
const j = ct(((G = c == null ? void 0 : c.data) == null ? void 0 : G.type) || "app", z), F = vo(
|
|
2997
2997
|
(se = x == null ? void 0 : x.config) == null ? void 0 : se.sizeId,
|
|
2998
2998
|
j.sizeConfigs,
|
|
2999
2999
|
j.defaultSizeId
|
|
@@ -3006,14 +3006,14 @@ const Ys = De(({ src: t }) => {
|
|
|
3006
3006
|
currentSize: F.name,
|
|
3007
3007
|
onSizeChange: (Z) => {
|
|
3008
3008
|
const Y = j.sizeConfigs.find((re) => re.name === Z);
|
|
3009
|
-
Y && v(
|
|
3009
|
+
Y && v(c.data.id, {
|
|
3010
3010
|
sizeId: Y.id || Z
|
|
3011
3011
|
});
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
) });
|
|
3015
3015
|
})(),
|
|
3016
|
-
|
|
3016
|
+
I().map((j, F) => {
|
|
3017
3017
|
let E = 0;
|
|
3018
3018
|
return o && E++, r && E++, e && E++, n && k.allowResize !== !1 && E++, E += F, /* @__PURE__ */ s(
|
|
3019
3019
|
st,
|
|
@@ -3024,7 +3024,7 @@ const Ys = De(({ src: t }) => {
|
|
|
3024
3024
|
textColor: j.textColor,
|
|
3025
3025
|
index: E,
|
|
3026
3026
|
onClick: () => {
|
|
3027
|
-
j.onClick && j.onClick(
|
|
3027
|
+
j.onClick && j.onClick(c.data, P);
|
|
3028
3028
|
}
|
|
3029
3029
|
},
|
|
3030
3030
|
`custom-${F}`
|
|
@@ -3048,7 +3048,7 @@ const Ys = De(({ src: t }) => {
|
|
|
3048
3048
|
const { contextMenu: e, setContextMenu: o } = Ae(), [r, n] = R(!1), [a, i] = R(!1), [l, m] = R({
|
|
3049
3049
|
left: 0,
|
|
3050
3050
|
top: 0
|
|
3051
|
-
}), [p,
|
|
3051
|
+
}), [p, c] = R("center"), u = le(
|
|
3052
3052
|
(y) => ({
|
|
3053
3053
|
left: y.left,
|
|
3054
3054
|
right: y.right,
|
|
@@ -3058,18 +3058,18 @@ const Ys = De(({ src: t }) => {
|
|
|
3058
3058
|
height: y.height
|
|
3059
3059
|
}),
|
|
3060
3060
|
[]
|
|
3061
|
-
), f = le((y,
|
|
3061
|
+
), f = le((y, N, g, b) => {
|
|
3062
3062
|
const x = aa(), k = Re.GAP;
|
|
3063
3063
|
return {
|
|
3064
3064
|
left: Math.max(x.left + k, Math.min(y, x.right - g - k)),
|
|
3065
|
-
top: Math.max(x.top + k, Math.min(
|
|
3065
|
+
top: Math.max(x.top + k, Math.min(N, x.bottom - b - k))
|
|
3066
3066
|
};
|
|
3067
|
-
}, []),
|
|
3068
|
-
(y,
|
|
3067
|
+
}, []), d = le(
|
|
3068
|
+
(y, N, g) => {
|
|
3069
3069
|
const b = Re.GAP;
|
|
3070
3070
|
let x = y.right + b, k = y.top;
|
|
3071
|
-
if (x +
|
|
3072
|
-
if (x = y.left -
|
|
3071
|
+
if (x + N > window.innerWidth) {
|
|
3072
|
+
if (x = y.left - N - b, x < 0) {
|
|
3073
3073
|
x = y.left, k = y.bottom + b;
|
|
3074
3074
|
const A = window.innerHeight + window.scrollY;
|
|
3075
3075
|
k + g > A && (k = y.top - g - b);
|
|
@@ -3078,14 +3078,14 @@ const Ys = De(({ src: t }) => {
|
|
|
3078
3078
|
const A = window.innerHeight + window.scrollY;
|
|
3079
3079
|
if (k + g > A) {
|
|
3080
3080
|
k = y.bottom - g;
|
|
3081
|
-
const
|
|
3082
|
-
k <
|
|
3081
|
+
const I = window.scrollY;
|
|
3082
|
+
k < I + b && (k = I + b);
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
|
-
return f(x, k,
|
|
3085
|
+
return f(x, k, N, g);
|
|
3086
3086
|
},
|
|
3087
3087
|
[f]
|
|
3088
|
-
),
|
|
3088
|
+
), S = e ? {
|
|
3089
3089
|
getBoundingClientRect() {
|
|
3090
3090
|
return {
|
|
3091
3091
|
width: 0,
|
|
@@ -3113,21 +3113,21 @@ const Ys = De(({ src: t }) => {
|
|
|
3113
3113
|
],
|
|
3114
3114
|
whileElementsMounted: Dn,
|
|
3115
3115
|
elements: {
|
|
3116
|
-
reference:
|
|
3116
|
+
reference: S
|
|
3117
3117
|
}
|
|
3118
|
-
}), z = (y,
|
|
3119
|
-
const b = y < g.left, x = y > g.right, k =
|
|
3118
|
+
}), z = (y, N, g) => {
|
|
3119
|
+
const b = y < g.left, x = y > g.right, k = N < g.top, A = N > g.bottom;
|
|
3120
3120
|
return x ? k ? "bottom left" : A ? "top left" : "center left" : b ? k ? "bottom right" : A ? "top right" : "center right" : A ? "top center" : k ? "bottom center" : "center";
|
|
3121
3121
|
};
|
|
3122
3122
|
return X(() => {
|
|
3123
3123
|
if (e) {
|
|
3124
3124
|
i(!0), n(!0);
|
|
3125
|
-
const { rect: y } = e,
|
|
3126
|
-
|
|
3125
|
+
const { rect: y } = e, N = u(y), { left: g, top: b } = d(
|
|
3126
|
+
N,
|
|
3127
3127
|
Re.ESTIMATED_MENU_WIDTH,
|
|
3128
3128
|
Re.ESTIMATED_MENU_HEIGHT
|
|
3129
|
-
), x = z(g, b,
|
|
3130
|
-
|
|
3129
|
+
), x = z(g, b, N);
|
|
3130
|
+
c(x), m({ left: g, top: b });
|
|
3131
3131
|
} else {
|
|
3132
3132
|
n(!1);
|
|
3133
3133
|
const y = setTimeout(() => {
|
|
@@ -3135,23 +3135,23 @@ const Ys = De(({ src: t }) => {
|
|
|
3135
3135
|
}, Re.ANIMATION_DELAY);
|
|
3136
3136
|
return () => clearTimeout(y);
|
|
3137
3137
|
}
|
|
3138
|
-
}, [e, u,
|
|
3138
|
+
}, [e, u, d]), X(() => {
|
|
3139
3139
|
r && v.floating.current && e && a && requestAnimationFrame(() => {
|
|
3140
|
-
const { rect: y } = e,
|
|
3141
|
-
|
|
3140
|
+
const { rect: y } = e, N = u(y), g = v.floating.current, b = (g == null ? void 0 : g.offsetWidth) || Re.ESTIMATED_MENU_WIDTH, x = (g == null ? void 0 : g.offsetHeight) || Re.ESTIMATED_MENU_HEIGHT, { left: k, top: A } = d(N, b, x), I = z(k, A, N);
|
|
3141
|
+
c(I), m({ left: k, top: A });
|
|
3142
3142
|
});
|
|
3143
|
-
}, [r, e, v, a, u,
|
|
3143
|
+
}, [r, e, v, a, u, d]), X(() => {
|
|
3144
3144
|
if (!r) return;
|
|
3145
3145
|
const y = (b) => {
|
|
3146
3146
|
const x = b.target, k = v.floating.current;
|
|
3147
3147
|
k && !k.contains(x) && o(null);
|
|
3148
|
-
},
|
|
3148
|
+
}, N = (b) => {
|
|
3149
3149
|
b.key === "Escape" && o(null);
|
|
3150
3150
|
}, g = setTimeout(() => {
|
|
3151
|
-
document.addEventListener("mousedown", y), document.addEventListener("keydown",
|
|
3151
|
+
document.addEventListener("mousedown", y), document.addEventListener("keydown", N);
|
|
3152
3152
|
}, Re.EVENT_LISTENER_DELAY);
|
|
3153
3153
|
return () => {
|
|
3154
|
-
clearTimeout(g), document.removeEventListener("mousedown", y), document.removeEventListener("keydown",
|
|
3154
|
+
clearTimeout(g), document.removeEventListener("mousedown", y), document.removeEventListener("keydown", N);
|
|
3155
3155
|
};
|
|
3156
3156
|
}, [r, o, v.floating]), a ? /* @__PURE__ */ s(Pn, { children: /* @__PURE__ */ s(
|
|
3157
3157
|
"div",
|
|
@@ -3181,11 +3181,11 @@ const Ys = De(({ src: t }) => {
|
|
|
3181
3181
|
noLetters: l,
|
|
3182
3182
|
typeConfigMap: m,
|
|
3183
3183
|
contextMenu: p,
|
|
3184
|
-
contextMenuBuilder:
|
|
3184
|
+
contextMenuBuilder: c,
|
|
3185
3185
|
itemBuilder: u,
|
|
3186
3186
|
itemIconBuilder: f,
|
|
3187
|
-
pagingDotBuilder:
|
|
3188
|
-
pagingDotsBuilder:
|
|
3187
|
+
pagingDotBuilder: d,
|
|
3188
|
+
pagingDotsBuilder: S,
|
|
3189
3189
|
...v
|
|
3190
3190
|
} = t, z = {
|
|
3191
3191
|
list: o,
|
|
@@ -3198,11 +3198,11 @@ const Ys = De(({ src: t }) => {
|
|
|
3198
3198
|
typeConfigMap: m,
|
|
3199
3199
|
dataTypeMenuConfigMap: t.dataTypeMenuConfigMap,
|
|
3200
3200
|
contextMenu: p,
|
|
3201
|
-
pagingDotsBuilder:
|
|
3202
|
-
pagingDotBuilder:
|
|
3201
|
+
pagingDotsBuilder: S,
|
|
3202
|
+
pagingDotBuilder: d,
|
|
3203
3203
|
itemBuilder: u,
|
|
3204
3204
|
itemIconBuilder: f,
|
|
3205
|
-
contextMenuBuilder:
|
|
3205
|
+
contextMenuBuilder: c
|
|
3206
3206
|
};
|
|
3207
3207
|
return /* @__PURE__ */ s(go, { ...z, children: /* @__PURE__ */ T(mo, { ...y, children: [
|
|
3208
3208
|
/* @__PURE__ */ s(() => {
|
|
@@ -3608,13 +3608,13 @@ const Ys = De(({ src: t }) => {
|
|
|
3608
3608
|
...l
|
|
3609
3609
|
} = t, m = oe(null), {
|
|
3610
3610
|
image: p,
|
|
3611
|
-
diffSource:
|
|
3611
|
+
diffSource: c = {
|
|
3612
3612
|
viewMode: "rich-text"
|
|
3613
3613
|
},
|
|
3614
3614
|
headings: u,
|
|
3615
3615
|
link: f,
|
|
3616
|
-
codeBlock:
|
|
3617
|
-
codeMirror:
|
|
3616
|
+
codeBlock: d,
|
|
3617
|
+
codeMirror: S = {
|
|
3618
3618
|
codeBlockLanguages: {
|
|
3619
3619
|
js: "JavaScript",
|
|
3620
3620
|
css: "CSS",
|
|
@@ -3628,8 +3628,8 @@ const Ys = De(({ src: t }) => {
|
|
|
3628
3628
|
}
|
|
3629
3629
|
} = n ?? {}, [z, y] = R("");
|
|
3630
3630
|
return X(() => {
|
|
3631
|
-
var
|
|
3632
|
-
e !== void 0 && m.current && ((
|
|
3631
|
+
var N;
|
|
3632
|
+
e !== void 0 && m.current && ((N = m.current) == null || N.setMarkdown(e), y(e));
|
|
3633
3633
|
}, [e, m]), /* @__PURE__ */ s(
|
|
3634
3634
|
$n,
|
|
3635
3635
|
{
|
|
@@ -3642,8 +3642,8 @@ const Ys = De(({ src: t }) => {
|
|
|
3642
3642
|
),
|
|
3643
3643
|
contentEditableClassName: To,
|
|
3644
3644
|
markdown: z,
|
|
3645
|
-
onChange: (
|
|
3646
|
-
!e && !o && y(
|
|
3645
|
+
onChange: (N) => {
|
|
3646
|
+
!e && !o && y(N), o && o(N);
|
|
3647
3647
|
},
|
|
3648
3648
|
translation: r ?? da,
|
|
3649
3649
|
plugins: [
|
|
@@ -3669,7 +3669,7 @@ const Ys = De(({ src: t }) => {
|
|
|
3669
3669
|
/* @__PURE__ */ s(dr, {})
|
|
3670
3670
|
] })
|
|
3671
3671
|
}),
|
|
3672
|
-
On(
|
|
3672
|
+
On(c),
|
|
3673
3673
|
Fn(),
|
|
3674
3674
|
Hn(),
|
|
3675
3675
|
jn(u),
|
|
@@ -3679,8 +3679,8 @@ const Ys = De(({ src: t }) => {
|
|
|
3679
3679
|
Yn(),
|
|
3680
3680
|
Vn(),
|
|
3681
3681
|
Xn(),
|
|
3682
|
-
qn(
|
|
3683
|
-
Zn(
|
|
3682
|
+
qn(d),
|
|
3683
|
+
Zn(S),
|
|
3684
3684
|
Kn(),
|
|
3685
3685
|
Jn(v)
|
|
3686
3686
|
],
|
|
@@ -3701,17 +3701,17 @@ const Ys = De(({ src: t }) => {
|
|
|
3701
3701
|
rehypePlugins: [fr],
|
|
3702
3702
|
components: {
|
|
3703
3703
|
code(a) {
|
|
3704
|
-
const { children: i, className: l, node: m, ref: p, ...
|
|
3704
|
+
const { children: i, className: l, node: m, ref: p, ...c } = a, u = /language-(\w+)/.exec(l || "");
|
|
3705
3705
|
return u ? /* @__PURE__ */ s(
|
|
3706
3706
|
gr,
|
|
3707
3707
|
{
|
|
3708
|
-
...
|
|
3708
|
+
...c,
|
|
3709
3709
|
PreTag: "div",
|
|
3710
3710
|
children: String(i).replace(/\n$/, ""),
|
|
3711
3711
|
language: u[1],
|
|
3712
3712
|
style: pr
|
|
3713
3713
|
}
|
|
3714
|
-
) : /* @__PURE__ */ s("code", { ...
|
|
3714
|
+
) : /* @__PURE__ */ s("code", { ...c, className: l, children: i });
|
|
3715
3715
|
},
|
|
3716
3716
|
img(a) {
|
|
3717
3717
|
const { preview: i, ...l } = n ?? {};
|
|
@@ -3764,16 +3764,16 @@ const Mt = (t) => {
|
|
|
3764
3764
|
componentClassName: l = "zs-rounded-full zs-bg-gray-200 dark:zs-bg-neutral-800",
|
|
3765
3765
|
titleClassName: m = "zs-rounded-md zs-bg-gray-100 zs-border dark:zs-bg-neutral-800 dark:zs-border-neutral-900 dark:zs-text-white zs-border-gray-200 zs-text-neutral-700",
|
|
3766
3766
|
childrenClassName: p,
|
|
3767
|
-
...
|
|
3767
|
+
...c
|
|
3768
3768
|
} = t, u = oe(null), f = He(e, (P) => {
|
|
3769
3769
|
var J;
|
|
3770
3770
|
const B = ((J = u.current) == null ? void 0 : J.getBoundingClientRect()) ?? { x: 0, width: 0 };
|
|
3771
3771
|
return P - B.x - B.width / 2;
|
|
3772
|
-
}),
|
|
3772
|
+
}), d = He(f, [-150, 0, 150], [40, 80, 40]), S = He(f, [-150, 0, 150], [40, 80, 40]), v = He(f, [-150, 0, 150], [20, 40, 20]), z = He(f, [-150, 0, 150], [20, 40, 20]), y = nt(d, {
|
|
3773
3773
|
mass: 0.1,
|
|
3774
3774
|
stiffness: 150,
|
|
3775
3775
|
damping: 12
|
|
3776
|
-
}),
|
|
3776
|
+
}), N = nt(S, {
|
|
3777
3777
|
mass: 0.1,
|
|
3778
3778
|
stiffness: 150,
|
|
3779
3779
|
damping: 12
|
|
@@ -3785,15 +3785,15 @@ const Mt = (t) => {
|
|
|
3785
3785
|
mass: 0.1,
|
|
3786
3786
|
stiffness: 150,
|
|
3787
3787
|
damping: 12
|
|
3788
|
-
}), x = He(g, (P) => `${P}px`), [k, A] = R(!1),
|
|
3788
|
+
}), x = He(g, (P) => `${P}px`), [k, A] = R(!1), I = /* @__PURE__ */ T(
|
|
3789
3789
|
i,
|
|
3790
3790
|
{
|
|
3791
3791
|
ref: u,
|
|
3792
|
-
style: { width: y, height:
|
|
3792
|
+
style: { width: y, height: N },
|
|
3793
3793
|
onMouseEnter: () => A(!0),
|
|
3794
3794
|
onMouseLeave: () => A(!1),
|
|
3795
3795
|
className: Ze("zs-aspect-square zs-flex zs-items-center zs-justify-center zs-relative", l),
|
|
3796
|
-
...
|
|
3796
|
+
...c,
|
|
3797
3797
|
children: [
|
|
3798
3798
|
o && /* @__PURE__ */ s(ze, { children: k && /* @__PURE__ */ s(
|
|
3799
3799
|
V.div,
|
|
@@ -3823,7 +3823,7 @@ const Mt = (t) => {
|
|
|
3823
3823
|
]
|
|
3824
3824
|
}
|
|
3825
3825
|
);
|
|
3826
|
-
return n ? /* @__PURE__ */ s("a", { href: n, children:
|
|
3826
|
+
return n ? /* @__PURE__ */ s("a", { href: n, children: I }) : I;
|
|
3827
3827
|
}, Lt = (t) => {
|
|
3828
3828
|
const {
|
|
3829
3829
|
items: e = [],
|
|
@@ -3885,7 +3885,7 @@ const Mt = (t) => {
|
|
|
3885
3885
|
layoutId: "nav",
|
|
3886
3886
|
className: "zs-absolute zs-bottom-full zs-mb-2 zs-inset-x-0 zs-flex zs-flex-col zs-gap-2",
|
|
3887
3887
|
children: i || e.map(
|
|
3888
|
-
(
|
|
3888
|
+
(c, u) => a ? /* @__PURE__ */ s(dt, { ...c, index: u, totalItems: e.length, children: a(c, u, e) }, c.title) : /* @__PURE__ */ s(dt, { ...c, index: u, totalItems: e.length }, c.title)
|
|
3889
3889
|
)
|
|
3890
3890
|
}
|
|
3891
3891
|
) }),
|
|
@@ -4008,45 +4008,45 @@ function at(t, e) {
|
|
|
4008
4008
|
}
|
|
4009
4009
|
function xa(t) {
|
|
4010
4010
|
let e = "", o = !1;
|
|
4011
|
-
function r(
|
|
4012
|
-
if (u.focus(), !
|
|
4011
|
+
function r(c, u) {
|
|
4012
|
+
if (u.focus(), !c.dataTransfer) return;
|
|
4013
4013
|
const f = At(
|
|
4014
4014
|
{
|
|
4015
|
-
x:
|
|
4016
|
-
y:
|
|
4015
|
+
x: c.clientX + 50 + t.dragHandleWidth,
|
|
4016
|
+
y: c.clientY
|
|
4017
4017
|
},
|
|
4018
4018
|
t
|
|
4019
4019
|
);
|
|
4020
4020
|
if (!(f instanceof Element)) return;
|
|
4021
|
-
let
|
|
4022
|
-
if (
|
|
4023
|
-
|
|
4024
|
-
const { from:
|
|
4025
|
-
let
|
|
4021
|
+
let d = Et(f, u, t);
|
|
4022
|
+
if (d == null || d < 0) return;
|
|
4023
|
+
d = at(d, u);
|
|
4024
|
+
const { from: S, to: v } = u.state.selection, z = S - v, y = at(S, u);
|
|
4025
|
+
let N = !1;
|
|
4026
4026
|
const g = u.state.doc.resolve(y);
|
|
4027
|
-
if (g.node().type.name === "doc")
|
|
4027
|
+
if (g.node().type.name === "doc") N = !0;
|
|
4028
4028
|
else {
|
|
4029
|
-
const
|
|
4029
|
+
const I = ke.create(
|
|
4030
4030
|
u.state.doc,
|
|
4031
4031
|
g.before()
|
|
4032
4032
|
);
|
|
4033
|
-
|
|
4033
|
+
N = !(d + 1 >= I.$from.pos && d <= I.$to.pos);
|
|
4034
4034
|
}
|
|
4035
4035
|
let b = u.state.selection;
|
|
4036
|
-
if (!
|
|
4037
|
-
const
|
|
4036
|
+
if (!N && z !== 0 && !(u.state.selection instanceof ke)) {
|
|
4037
|
+
const I = ke.create(u.state.doc, v - 1);
|
|
4038
4038
|
b = ls.create(
|
|
4039
4039
|
u.state.doc,
|
|
4040
|
-
|
|
4041
|
-
|
|
4040
|
+
d,
|
|
4041
|
+
I.$to.pos
|
|
4042
4042
|
);
|
|
4043
|
-
} else if (b = ke.create(u.state.doc,
|
|
4044
|
-
const
|
|
4045
|
-
b = ke.create(u.state.doc,
|
|
4043
|
+
} else if (b = ke.create(u.state.doc, d), b.node.type.isInline || b.node.type.name === "tableRow") {
|
|
4044
|
+
const I = u.state.doc.resolve(b.from);
|
|
4045
|
+
b = ke.create(u.state.doc, I.before());
|
|
4046
4046
|
}
|
|
4047
4047
|
u.dispatch(u.state.tr.setSelection(b)), u.state.selection instanceof ke && u.state.selection.node.type.name === "listItem" && (e = f.parentElement.tagName);
|
|
4048
4048
|
const x = u.state.selection.content(), { dom: k, text: A } = ba(u, x);
|
|
4049
|
-
|
|
4049
|
+
c.dataTransfer.clearData(), c.dataTransfer.setData("text/html", k.innerHTML), c.dataTransfer.setData("text/plain", A), c.dataTransfer.effectAllowed = "copyMove", c.dataTransfer.setDragImage(f, 0, 0), u.dragging = { slice: x, move: c.ctrlKey };
|
|
4050
4050
|
}
|
|
4051
4051
|
let n = null;
|
|
4052
4052
|
function a() {
|
|
@@ -4055,63 +4055,63 @@ function xa(t) {
|
|
|
4055
4055
|
function i() {
|
|
4056
4056
|
n && n.classList.remove("hide");
|
|
4057
4057
|
}
|
|
4058
|
-
function l(
|
|
4059
|
-
const f = at(u,
|
|
4060
|
-
|
|
4058
|
+
function l(c, u) {
|
|
4059
|
+
const f = at(u, c), d = ke.create(c.state.doc, f);
|
|
4060
|
+
c.dispatch(c.state.tr.setSelection(d)), c.focus(), o = !0;
|
|
4061
4061
|
}
|
|
4062
|
-
function m(
|
|
4063
|
-
if (o =
|
|
4062
|
+
function m(c) {
|
|
4063
|
+
if (o = c.state.selection instanceof ke, o && (n != null && n.dataset.nodePos)) {
|
|
4064
4064
|
const f = parseInt(n.dataset.nodePos, 10);
|
|
4065
4065
|
try {
|
|
4066
|
-
const
|
|
4067
|
-
|
|
4066
|
+
const d = c.state.doc.resolve(f);
|
|
4067
|
+
d && d.parent && d.parent.type.name !== "doc" || (o = !1, a());
|
|
4068
4068
|
} catch {
|
|
4069
4069
|
o = !1, a();
|
|
4070
4070
|
}
|
|
4071
4071
|
}
|
|
4072
4072
|
o && n && !n.classList.contains("hide") ? i() : o || a();
|
|
4073
4073
|
}
|
|
4074
|
-
function p(
|
|
4075
|
-
if (!(
|
|
4076
|
-
const u =
|
|
4074
|
+
function p(c) {
|
|
4075
|
+
if (!(c.target instanceof Element)) return;
|
|
4076
|
+
const u = c.relatedTarget;
|
|
4077
4077
|
if (!u) {
|
|
4078
4078
|
o || a();
|
|
4079
4079
|
return;
|
|
4080
4080
|
}
|
|
4081
|
-
const f = u.closest(".drag-handle") || u.classList.contains("drag-handle"),
|
|
4082
|
-
!f && !
|
|
4081
|
+
const f = u.closest(".drag-handle") || u.classList.contains("drag-handle"), d = u.closest(".tiptap") || u.classList.contains("tiptap");
|
|
4082
|
+
!f && !d && !o && a();
|
|
4083
4083
|
}
|
|
4084
4084
|
return new as({
|
|
4085
4085
|
key: new is(t.pluginKey),
|
|
4086
|
-
view: (
|
|
4087
|
-
var v, z, y,
|
|
4086
|
+
view: (c) => {
|
|
4087
|
+
var v, z, y, N;
|
|
4088
4088
|
const u = t.dragHandleSelector ? document.querySelector(t.dragHandleSelector) : null;
|
|
4089
4089
|
n = u ?? document.createElement("div"), n.draggable = !0, n.dataset.dragHandle = "", n.classList.add("drag-handle");
|
|
4090
4090
|
function f(g) {
|
|
4091
|
-
r(g,
|
|
4091
|
+
r(g, c);
|
|
4092
4092
|
}
|
|
4093
4093
|
n.addEventListener("dragstart", f);
|
|
4094
|
-
function
|
|
4094
|
+
function d(g) {
|
|
4095
4095
|
u || (g.preventDefault(), g.stopPropagation());
|
|
4096
4096
|
const b = n == null ? void 0 : n.dataset.nodePos;
|
|
4097
|
-
b && l(
|
|
4097
|
+
b && l(c, parseInt(b, 10));
|
|
4098
4098
|
}
|
|
4099
|
-
n.addEventListener("click",
|
|
4100
|
-
function
|
|
4099
|
+
n.addEventListener("click", d);
|
|
4100
|
+
function S(g) {
|
|
4101
4101
|
a();
|
|
4102
4102
|
const b = window.scrollY;
|
|
4103
4103
|
g.clientY < t.scrollTreshold ? window.scrollTo({ top: b - 30, behavior: "smooth" }) : window.innerHeight - g.clientY < t.scrollTreshold && window.scrollTo({ top: b + 30, behavior: "smooth" });
|
|
4104
4104
|
}
|
|
4105
|
-
return n.addEventListener("drag",
|
|
4105
|
+
return n.addEventListener("drag", S), a(), u || (z = (v = c == null ? void 0 : c.dom) == null ? void 0 : v.parentElement) == null || z.appendChild(n), (N = (y = c == null ? void 0 : c.dom) == null ? void 0 : y.parentElement) == null || N.addEventListener(
|
|
4106
4106
|
"mouseout",
|
|
4107
4107
|
p
|
|
4108
4108
|
), {
|
|
4109
4109
|
destroy: () => {
|
|
4110
4110
|
var g, b, x;
|
|
4111
|
-
u || (g = n == null ? void 0 : n.remove) == null || g.call(n), n == null || n.removeEventListener("drag",
|
|
4111
|
+
u || (g = n == null ? void 0 : n.remove) == null || g.call(n), n == null || n.removeEventListener("drag", S), n == null || n.removeEventListener(
|
|
4112
4112
|
"dragstart",
|
|
4113
4113
|
f
|
|
4114
|
-
), n == null || n.removeEventListener("click",
|
|
4114
|
+
), n == null || n.removeEventListener("click", d), n = null, (x = (b = c == null ? void 0 : c.dom) == null ? void 0 : b.parentElement) == null || x.removeEventListener(
|
|
4115
4115
|
"mouseout",
|
|
4116
4116
|
p
|
|
4117
4117
|
);
|
|
@@ -4120,8 +4120,8 @@ function xa(t) {
|
|
|
4120
4120
|
},
|
|
4121
4121
|
props: {
|
|
4122
4122
|
handleDOMEvents: {
|
|
4123
|
-
mousemove: (
|
|
4124
|
-
if (!
|
|
4123
|
+
mousemove: (c, u) => {
|
|
4124
|
+
if (!c.editable)
|
|
4125
4125
|
return;
|
|
4126
4126
|
const f = At(
|
|
4127
4127
|
{
|
|
@@ -4129,17 +4129,17 @@ function xa(t) {
|
|
|
4129
4129
|
y: u.clientY
|
|
4130
4130
|
},
|
|
4131
4131
|
t
|
|
4132
|
-
),
|
|
4133
|
-
if (!(f instanceof Element) || f.matches(
|
|
4132
|
+
), d = f == null ? void 0 : f.closest(".not-draggable"), S = t.excludedTags.concat(["ol", "ul"]).join(", ");
|
|
4133
|
+
if (!(f instanceof Element) || f.matches(S) || d) {
|
|
4134
4134
|
o || a();
|
|
4135
4135
|
return;
|
|
4136
4136
|
}
|
|
4137
|
-
const v = Et(f,
|
|
4137
|
+
const v = Et(f, c, t);
|
|
4138
4138
|
v != null && v >= 0 && (n.dataset.nodePos = String(
|
|
4139
|
-
at(v,
|
|
4139
|
+
at(v, c)
|
|
4140
4140
|
));
|
|
4141
|
-
const z = window.getComputedStyle(f), y = parseInt(z.lineHeight, 10),
|
|
4142
|
-
b.top += (
|
|
4141
|
+
const z = window.getComputedStyle(f), y = parseInt(z.lineHeight, 10), N = isNaN(y) ? parseInt(z.fontSize) * 1.2 : y, g = parseInt(z.paddingTop, 10), b = ya(f);
|
|
4142
|
+
b.top += (N - 24) / 2, b.top += g, f.matches("ul:not([data-type=taskList]) li, ol li") && (b.left -= t.dragHandleWidth - 28), b.width = t.dragHandleWidth, n && (n.style.position = "absolute", n.style.left = `${b.left - b.width}px`, n.style.top = `${b.top}px`, i());
|
|
4143
4143
|
},
|
|
4144
4144
|
keydown: () => {
|
|
4145
4145
|
o || a();
|
|
@@ -4148,33 +4148,33 @@ function xa(t) {
|
|
|
4148
4148
|
o || a();
|
|
4149
4149
|
},
|
|
4150
4150
|
// 在选择状态变化时更新拖拽按钮的状态
|
|
4151
|
-
selectionChange: (
|
|
4152
|
-
m(
|
|
4151
|
+
selectionChange: (c) => {
|
|
4152
|
+
m(c);
|
|
4153
4153
|
},
|
|
4154
4154
|
// dragging class is used for CSS
|
|
4155
|
-
dragstart: (
|
|
4156
|
-
|
|
4155
|
+
dragstart: (c) => {
|
|
4156
|
+
c.dom.classList.add("dragging");
|
|
4157
4157
|
},
|
|
4158
|
-
drop: (
|
|
4158
|
+
drop: (c, u) => {
|
|
4159
4159
|
var z;
|
|
4160
|
-
|
|
4160
|
+
c.dom.classList.remove("dragging"), a();
|
|
4161
4161
|
let f = null;
|
|
4162
|
-
const
|
|
4162
|
+
const d = c.posAtCoords({
|
|
4163
4163
|
left: u.clientX,
|
|
4164
4164
|
top: u.clientY
|
|
4165
4165
|
});
|
|
4166
|
-
if (!
|
|
4167
|
-
const v =
|
|
4168
|
-
if (
|
|
4169
|
-
const y = (z =
|
|
4166
|
+
if (!d || (c.state.selection instanceof ke && (f = c.state.selection.node), !f)) return;
|
|
4167
|
+
const v = c.state.doc.resolve(d.pos).parent.type.name === "listItem";
|
|
4168
|
+
if (c.state.selection instanceof ke && c.state.selection.node.type.name === "listItem" && !v && e == "OL") {
|
|
4169
|
+
const y = (z = c.state.schema.nodes.orderedList) == null ? void 0 : z.createAndFill(
|
|
4170
4170
|
null,
|
|
4171
4171
|
f
|
|
4172
|
-
),
|
|
4173
|
-
|
|
4172
|
+
), N = new cs(ds.from(y), 0, 0);
|
|
4173
|
+
c.dragging = { slice: N, move: u.ctrlKey };
|
|
4174
4174
|
}
|
|
4175
4175
|
},
|
|
4176
|
-
dragend: (
|
|
4177
|
-
|
|
4176
|
+
dragend: (c) => {
|
|
4177
|
+
c.dom.classList.remove("dragging");
|
|
4178
4178
|
}
|
|
4179
4179
|
}
|
|
4180
4180
|
},
|
|
@@ -4183,11 +4183,11 @@ function xa(t) {
|
|
|
4183
4183
|
init() {
|
|
4184
4184
|
return {};
|
|
4185
4185
|
},
|
|
4186
|
-
apply(
|
|
4187
|
-
if (
|
|
4188
|
-
const
|
|
4186
|
+
apply(c, u, f, d) {
|
|
4187
|
+
if (c.docChanged && n && n.dataset.nodePos) {
|
|
4188
|
+
const S = parseInt(n.dataset.nodePos, 10);
|
|
4189
4189
|
try {
|
|
4190
|
-
const v =
|
|
4190
|
+
const v = d.doc.resolve(S);
|
|
4191
4191
|
(!v || v.parent.type.name === "doc") && (o = !1, a());
|
|
4192
4192
|
} catch {
|
|
4193
4193
|
o = !1, a();
|
|
@@ -5151,10 +5151,10 @@ function Qa({ onOpenChange: t, options: e }) {
|
|
|
5151
5151
|
return i(a, {
|
|
5152
5152
|
body: { option: "zap", command: r }
|
|
5153
5153
|
}).then(() => n(""));
|
|
5154
|
-
const p = o.state.selection.content(),
|
|
5154
|
+
const p = o.state.selection.content(), c = o.storage.markdown.serializer.serialize(
|
|
5155
5155
|
p.content
|
|
5156
5156
|
);
|
|
5157
|
-
i(
|
|
5157
|
+
i(c, {
|
|
5158
5158
|
body: { option: "zap", command: r }
|
|
5159
5159
|
}).then(() => n(""));
|
|
5160
5160
|
},
|
|
@@ -5173,7 +5173,7 @@ function Qa({ onOpenChange: t, options: e }) {
|
|
|
5173
5173
|
) : /* @__PURE__ */ s(
|
|
5174
5174
|
Ja,
|
|
5175
5175
|
{
|
|
5176
|
-
onSelect: (p,
|
|
5176
|
+
onSelect: (p, c) => i(p, { body: { option: c } })
|
|
5177
5177
|
}
|
|
5178
5178
|
)
|
|
5179
5179
|
] })
|
|
@@ -5643,11 +5643,11 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5643
5643
|
showWordCount: l = !0,
|
|
5644
5644
|
uploadImageProps: m,
|
|
5645
5645
|
editorRef: p,
|
|
5646
|
-
enableAI:
|
|
5646
|
+
enableAI: c = !1,
|
|
5647
5647
|
aiOptions: u
|
|
5648
|
-
} = t, [f,
|
|
5648
|
+
} = t, [f, d] = R(
|
|
5649
5649
|
o
|
|
5650
|
-
), [
|
|
5650
|
+
), [S, v] = R("Saved"), [z, y] = R(), [N, g] = R(!1), [b, x] = R(!1), [k, A] = R(!1), [I, P] = R(!1), B = (E) => {
|
|
5651
5651
|
const G = new DOMParser().parseFromString(E, "text/html");
|
|
5652
5652
|
return G.querySelectorAll("pre code").forEach((se) => {
|
|
5653
5653
|
As.highlightElement(se);
|
|
@@ -5730,7 +5730,7 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5730
5730
|
if (X(() => {
|
|
5731
5731
|
if (!a) return;
|
|
5732
5732
|
const E = window.localStorage.getItem(n);
|
|
5733
|
-
|
|
5733
|
+
d(E ? JSON.parse(E) : si);
|
|
5734
5734
|
}, [n, a]), !f) return null;
|
|
5735
5735
|
const F = [
|
|
5736
5736
|
...Po,
|
|
@@ -5740,7 +5740,7 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5740
5740
|
];
|
|
5741
5741
|
return /* @__PURE__ */ T("div", { className: L("relative w-full max-w-screen-lg", e), children: [
|
|
5742
5742
|
(a && i || l) && /* @__PURE__ */ T("div", { className: "flex absolute right-5 top-5 z-10 mb-5 gap-2", children: [
|
|
5743
|
-
a && i && /* @__PURE__ */ s("div", { className: "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground", children:
|
|
5743
|
+
a && i && /* @__PURE__ */ s("div", { className: "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground", children: S }),
|
|
5744
5744
|
l && /* @__PURE__ */ T(
|
|
5745
5745
|
"div",
|
|
5746
5746
|
{
|
|
@@ -5800,13 +5800,13 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5800
5800
|
/* @__PURE__ */ T(
|
|
5801
5801
|
ei,
|
|
5802
5802
|
{
|
|
5803
|
-
open:
|
|
5803
|
+
open: I,
|
|
5804
5804
|
onOpenChange: P,
|
|
5805
|
-
enableAI:
|
|
5805
|
+
enableAI: c,
|
|
5806
5806
|
aiOptions: u,
|
|
5807
5807
|
children: [
|
|
5808
|
-
|
|
5809
|
-
/* @__PURE__ */ s(ja, { open:
|
|
5808
|
+
c && /* @__PURE__ */ s(Ue, { orientation: "vertical" }),
|
|
5809
|
+
/* @__PURE__ */ s(ja, { open: N, onOpenChange: g }),
|
|
5810
5810
|
/* @__PURE__ */ s(Ue, { orientation: "vertical" }),
|
|
5811
5811
|
/* @__PURE__ */ s(Fa, { open: k, onOpenChange: A }),
|
|
5812
5812
|
/* @__PURE__ */ s(Ue, { orientation: "vertical" }),
|
|
@@ -6203,26 +6203,26 @@ function vi(t, e) {
|
|
|
6203
6203
|
const o = Te(di), [r, n] = R(null), a = oe(), { current: i } = oe({ mapLib: null, map: null });
|
|
6204
6204
|
X(() => {
|
|
6205
6205
|
const p = t.mapLib;
|
|
6206
|
-
let
|
|
6206
|
+
let c = !0, u;
|
|
6207
6207
|
return Promise.resolve(p || import("maplibre-gl")).then((f) => {
|
|
6208
|
-
if (!
|
|
6208
|
+
if (!c)
|
|
6209
6209
|
return;
|
|
6210
6210
|
if (!f)
|
|
6211
6211
|
throw new Error("Invalid mapLib");
|
|
6212
|
-
const
|
|
6213
|
-
if (!
|
|
6212
|
+
const d = "Map" in f ? f : f.default;
|
|
6213
|
+
if (!d.Map)
|
|
6214
6214
|
throw new Error("Invalid mapLib");
|
|
6215
|
-
xi(
|
|
6215
|
+
xi(d, t), t.reuseMaps && (u = Ye.reuse(t, a.current)), u || (u = new Ye(d.Map, t, a.current)), i.map = hi(u), i.mapLib = d, n(u), o == null || o.onMapMount(i.map, t.id);
|
|
6216
6216
|
}).catch((f) => {
|
|
6217
|
-
const { onError:
|
|
6218
|
-
|
|
6217
|
+
const { onError: d } = t;
|
|
6218
|
+
d ? d({
|
|
6219
6219
|
type: "error",
|
|
6220
6220
|
target: null,
|
|
6221
6221
|
originalEvent: null,
|
|
6222
6222
|
error: f
|
|
6223
6223
|
}) : console.error(f);
|
|
6224
6224
|
}), () => {
|
|
6225
|
-
|
|
6225
|
+
c = !1, u && (o == null || o.onMapUnmount(t.id), t.reuseMaps ? u.recycle() : u.destroy());
|
|
6226
6226
|
};
|
|
6227
6227
|
}, []), yi(() => {
|
|
6228
6228
|
r && r.setProps(t);
|
|
@@ -6270,10 +6270,10 @@ const yt = De(Ve((t, e) => {
|
|
|
6270
6270
|
ae.Children.forEach(t.children, (b) => {
|
|
6271
6271
|
b && (y = !0);
|
|
6272
6272
|
});
|
|
6273
|
-
const
|
|
6273
|
+
const N = {
|
|
6274
6274
|
...t,
|
|
6275
6275
|
element: y ? document.createElement("div") : void 0
|
|
6276
|
-
}, g = new r.Marker(
|
|
6276
|
+
}, g = new r.Marker(N);
|
|
6277
6277
|
return g.setLngLat([t.longitude, t.latitude]), g.getElement().addEventListener("click", (b) => {
|
|
6278
6278
|
var x, k;
|
|
6279
6279
|
(k = (x = n.current.props).onClick) == null || k.call(x, {
|
|
@@ -6298,12 +6298,12 @@ const yt = De(Ve((t, e) => {
|
|
|
6298
6298
|
X(() => (a.addTo(o.getMap()), () => {
|
|
6299
6299
|
a.remove();
|
|
6300
6300
|
}), []);
|
|
6301
|
-
const { longitude: i, latitude: l, offset: m, style: p, draggable:
|
|
6301
|
+
const { longitude: i, latitude: l, offset: m, style: p, draggable: c = !1, popup: u = null, rotation: f = 0, rotationAlignment: d = "auto", pitchAlignment: S = "auto" } = t;
|
|
6302
6302
|
X(() => {
|
|
6303
6303
|
Ee(a.getElement(), p);
|
|
6304
6304
|
}, [p]), et(e, () => a, []);
|
|
6305
6305
|
const v = n.current.props;
|
|
6306
|
-
(a.getLngLat().lng !== i || a.getLngLat().lat !== l) && a.setLngLat([i, l]), m && !ui(a.getOffset(), m) && a.setOffset(m), a.isDraggable() !==
|
|
6306
|
+
(a.getLngLat().lng !== i || a.getLngLat().lat !== l) && a.setLngLat([i, l]), m && !ui(a.getOffset(), m) && a.setOffset(m), a.isDraggable() !== c && a.setDraggable(c), a.getRotation() !== f && a.setRotation(f), a.getRotationAlignment() !== d && a.setRotationAlignment(d), a.getPitchAlignment() !== S && a.setPitchAlignment(S), a.getPopup() !== u && a.setPopup(u);
|
|
6307
6307
|
const z = Go(v.className, t.className);
|
|
6308
6308
|
if (z)
|
|
6309
6309
|
for (const y of z)
|
|
@@ -6314,14 +6314,14 @@ De(Ve((t, e) => {
|
|
|
6314
6314
|
const { map: o, mapLib: r } = Te(Xe), n = te(() => document.createElement("div"), []), a = oe({ props: t }), i = te(() => {
|
|
6315
6315
|
const l = { ...t }, m = new r.Popup(l);
|
|
6316
6316
|
return m.setLngLat([t.longitude, t.latitude]), m.once("open", (p) => {
|
|
6317
|
-
var
|
|
6318
|
-
(u = (
|
|
6317
|
+
var c, u;
|
|
6318
|
+
(u = (c = a.current.props).onOpen) == null || u.call(c, p);
|
|
6319
6319
|
}), m;
|
|
6320
6320
|
}, []);
|
|
6321
6321
|
if (X(() => {
|
|
6322
6322
|
const l = (m) => {
|
|
6323
|
-
var p,
|
|
6324
|
-
(
|
|
6323
|
+
var p, c;
|
|
6324
|
+
(c = (p = a.current.props).onClose) == null || c.call(p, m);
|
|
6325
6325
|
};
|
|
6326
6326
|
return i.on("close", l), i.setDOMContent(n).addTo(o.getMap()), () => {
|
|
6327
6327
|
i.off("close", l), i.isOpen() && i.remove();
|
|
@@ -6499,17 +6499,17 @@ function Ei(t, e, o, r) {
|
|
|
6499
6499
|
return;
|
|
6500
6500
|
const { layout: n = {}, paint: a = {}, filter: i, minzoom: l, maxzoom: m, beforeId: p } = o;
|
|
6501
6501
|
if (p !== r.beforeId && t.moveLayer(e, p), n !== r.layout) {
|
|
6502
|
-
const
|
|
6502
|
+
const c = r.layout || {};
|
|
6503
6503
|
for (const u in n)
|
|
6504
|
-
be(n[u],
|
|
6505
|
-
for (const u in
|
|
6504
|
+
be(n[u], c[u]) || t.setLayoutProperty(e, u, n[u]);
|
|
6505
|
+
for (const u in c)
|
|
6506
6506
|
n.hasOwnProperty(u) || t.setLayoutProperty(e, u, void 0);
|
|
6507
6507
|
}
|
|
6508
6508
|
if (a !== r.paint) {
|
|
6509
|
-
const
|
|
6509
|
+
const c = r.paint || {};
|
|
6510
6510
|
for (const u in a)
|
|
6511
|
-
be(a[u],
|
|
6512
|
-
for (const u in
|
|
6511
|
+
be(a[u], c[u]) || t.setPaintProperty(e, u, a[u]);
|
|
6512
|
+
for (const u in c)
|
|
6513
6513
|
a.hasOwnProperty(u) || t.setPaintProperty(e, u, void 0);
|
|
6514
6514
|
}
|
|
6515
6515
|
be(i, r.filter) || t.setFilter(e, i), (l !== r.minzoom || m !== r.maxzoom) && t.setLayerZoomRange(e, l, m);
|
|
@@ -6591,40 +6591,40 @@ const Bi = (t) => {
|
|
|
6591
6591
|
height: p
|
|
6592
6592
|
}), m > 50 && p > 30)
|
|
6593
6593
|
return console.log("视图范围很大,返回所有省份"), [...o];
|
|
6594
|
-
const
|
|
6594
|
+
const c = [], u = new Map(
|
|
6595
6595
|
o.map((f) => [f.code, f])
|
|
6596
6596
|
);
|
|
6597
6597
|
if (e.features.forEach((f) => {
|
|
6598
6598
|
if (!f.properties || !f.properties.adcode) return;
|
|
6599
|
-
const { adcode:
|
|
6600
|
-
if (!
|
|
6599
|
+
const { adcode: d } = f.properties, S = u.get(d);
|
|
6600
|
+
if (!S) return;
|
|
6601
6601
|
let v = Bi(f);
|
|
6602
|
-
if (!v &&
|
|
6603
|
-
const { longitude: x, latitude: k } =
|
|
6602
|
+
if (!v && S) {
|
|
6603
|
+
const { longitude: x, latitude: k } = S;
|
|
6604
6604
|
v = [x - 2, k - 2, x + 2, k + 2];
|
|
6605
6605
|
}
|
|
6606
6606
|
if (!v) return;
|
|
6607
|
-
const [z, y,
|
|
6608
|
-
!(
|
|
6607
|
+
const [z, y, N, g] = v;
|
|
6608
|
+
!(N < n || // 省份完全在视图左侧
|
|
6609
6609
|
z > a || // 省份完全在视图右侧
|
|
6610
6610
|
g < i || // 省份完全在视图下方
|
|
6611
|
-
y > l) &&
|
|
6612
|
-
}),
|
|
6613
|
-
if (
|
|
6614
|
-
const { longitude:
|
|
6615
|
-
|
|
6616
|
-
}),
|
|
6611
|
+
y > l) && c.push(S);
|
|
6612
|
+
}), c.length < 3 && (console.log("找到的相交区域太少,尝试其他检查方法..."), o.forEach((f) => {
|
|
6613
|
+
if (c.some((z) => z.code === f.code)) return;
|
|
6614
|
+
const { longitude: S, latitude: v } = f;
|
|
6615
|
+
S >= n && S <= a && v >= i && v <= l && c.push(f);
|
|
6616
|
+
}), c.length < 3 && (m > 10 || p > 10))) {
|
|
6617
6617
|
console.log("扩大检查范围...");
|
|
6618
|
-
const f = n - 2,
|
|
6618
|
+
const f = n - 2, d = a + 2, S = i - 2, v = l + 2;
|
|
6619
6619
|
o.forEach((z) => {
|
|
6620
|
-
if (
|
|
6620
|
+
if (c.some(
|
|
6621
6621
|
(b) => b.code === z.code
|
|
6622
6622
|
)) return;
|
|
6623
|
-
const { longitude:
|
|
6624
|
-
|
|
6623
|
+
const { longitude: N, latitude: g } = z;
|
|
6624
|
+
N >= f && N <= d && g >= S && g <= v && c.push(z);
|
|
6625
6625
|
});
|
|
6626
6626
|
}
|
|
6627
|
-
return console.log(`找到 ${
|
|
6627
|
+
return console.log(`找到 ${c.length} 个区域与视图相交`), c;
|
|
6628
6628
|
}, Wt = "100000", _i = {
|
|
6629
6629
|
6: 0,
|
|
6630
6630
|
// 国家级别 (6位ID长度)
|
|
@@ -6651,12 +6651,12 @@ const Bi = (t) => {
|
|
|
6651
6651
|
onVisibleAreasChanged: l,
|
|
6652
6652
|
cityMinZoom: m = 5,
|
|
6653
6653
|
districtMinZoom: p = 7,
|
|
6654
|
-
fetchGeoData:
|
|
6654
|
+
fetchGeoData: c,
|
|
6655
6655
|
children: u
|
|
6656
6656
|
}) => {
|
|
6657
|
-
const f = oe(null), [
|
|
6658
|
-
() =>
|
|
6659
|
-
[
|
|
6657
|
+
const f = oe(null), [d, S] = R(Wt), [v, z] = R(null), [y, N] = R(t), [g, b] = R([]), x = oe({}), [k, A] = R({}), [I, P] = R({}), [B, J] = R(!1), [j, F] = R([]), [E, G] = R({}), [se, Z] = R({}), [Y, re] = R(!1), [de, fe] = R([]), ie = te(
|
|
6658
|
+
() => c || Oi,
|
|
6659
|
+
[c]
|
|
6660
6660
|
), { run: ce } = rn(
|
|
6661
6661
|
(h) => ie(h),
|
|
6662
6662
|
{
|
|
@@ -6784,7 +6784,7 @@ const Bi = (t) => {
|
|
|
6784
6784
|
});
|
|
6785
6785
|
},
|
|
6786
6786
|
[de, E, Q, ie]
|
|
6787
|
-
), ne = te(() => B ? Object.values(
|
|
6787
|
+
), ne = te(() => B ? Object.values(I).flat() : [], [I, B]), xe = te(() => Y ? Object.values(se).flat() : [], [se, Y]), me = le(() => {
|
|
6788
6788
|
if (!f.current || !v)
|
|
6789
6789
|
return;
|
|
6790
6790
|
const h = f.current.getBounds(), C = {
|
|
@@ -6806,7 +6806,7 @@ const Bi = (t) => {
|
|
|
6806
6806
|
zoom: y
|
|
6807
6807
|
}, console.debug("计算结果:", w.length, "个区域在视图内"), l && l(w), y > p) {
|
|
6808
6808
|
J(!0), re(!0), ue(w);
|
|
6809
|
-
const W = Object.values(
|
|
6809
|
+
const W = Object.values(I).flat().filter(
|
|
6810
6810
|
(M) => {
|
|
6811
6811
|
var H;
|
|
6812
6812
|
return (H = f.current) == null ? void 0 : H.getBounds().contains([M.longitude, M.latitude]);
|
|
@@ -6822,13 +6822,13 @@ const Bi = (t) => {
|
|
|
6822
6822
|
y,
|
|
6823
6823
|
ue,
|
|
6824
6824
|
Ie,
|
|
6825
|
-
|
|
6825
|
+
I,
|
|
6826
6826
|
m,
|
|
6827
6827
|
p
|
|
6828
6828
|
]);
|
|
6829
6829
|
X(() => {
|
|
6830
|
-
ce(
|
|
6831
|
-
}, [
|
|
6830
|
+
ce(d);
|
|
6831
|
+
}, [d, ce]), X(() => {
|
|
6832
6832
|
if (f.current && g.length > 0) {
|
|
6833
6833
|
const h = requestAnimationFrame(() => {
|
|
6834
6834
|
me();
|
|
@@ -6852,16 +6852,16 @@ const Bi = (t) => {
|
|
|
6852
6852
|
west: M.getWest()
|
|
6853
6853
|
}, $ = !x.current.bounds || Math.abs(x.current.bounds.north - H.north) >= 1e-3 || Math.abs(x.current.bounds.south - H.south) >= 1e-3 || Math.abs(x.current.bounds.east - H.east) >= 1e-3 || Math.abs(x.current.bounds.west - H.west) >= 1e-3;
|
|
6854
6854
|
if (W) {
|
|
6855
|
-
|
|
6855
|
+
N(C), x.current.zoom = C;
|
|
6856
6856
|
let ge = 6;
|
|
6857
6857
|
for (const [Yo, Vo] of Object.entries(n))
|
|
6858
6858
|
C >= Vo && (ge = parseInt(Yo, 10));
|
|
6859
|
-
|
|
6859
|
+
d.length !== ge && S(Wt);
|
|
6860
6860
|
}
|
|
6861
6861
|
($ || W) && me();
|
|
6862
6862
|
}
|
|
6863
6863
|
},
|
|
6864
|
-
[
|
|
6864
|
+
[d, n, y, me]
|
|
6865
6865
|
), we = le(() => {
|
|
6866
6866
|
g.length > 0 && f.current && me();
|
|
6867
6867
|
}, [g, me]), O = te(
|