zs_library 0.6.17 → 0.6.18
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 +100 -98
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -449,7 +449,7 @@ const go = Ct({
|
|
|
449
449
|
onChange: n,
|
|
450
450
|
storageKey: r = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
|
|
451
451
|
enableCaching: a = !0
|
|
452
|
-
} = t, [i, l] = B(), [f, p] = B(), [d, g] = B(null), h = ne(d), [c, u] = B(null), [w, z] = B([]), [y, M] = B(null), [k, v] = B(null), [b, x] = B(!1), [D, N] = B(null), [
|
|
452
|
+
} = t, [i, l] = B(), [f, p] = B(), [d, g] = B(null), h = ne(d), [c, u] = B(null), [w, z] = B([]), [y, M] = B(null), [k, v] = B(null), [b, x] = B(!1), [D, N] = B(null), [P, $] = B(null), [q, T] = B(null), [_, R] = B(0), [j, se] = B(!1), [Z, U] = nr(r, {
|
|
453
453
|
defaultValue: [],
|
|
454
454
|
listenStorageChange: !0
|
|
455
455
|
}), te = () => {
|
|
@@ -634,10 +634,10 @@ const go = Ct({
|
|
|
634
634
|
removeRootItem: ge,
|
|
635
635
|
moveItemId: D,
|
|
636
636
|
setMoveItemId: N,
|
|
637
|
-
moveTargetId:
|
|
637
|
+
moveTargetId: P,
|
|
638
638
|
setMoveTargetId: $,
|
|
639
639
|
dragItem: q,
|
|
640
|
-
setDragItem:
|
|
640
|
+
setDragItem: T,
|
|
641
641
|
currentSliderIndex: _,
|
|
642
642
|
setCurrentSliderIndex: R,
|
|
643
643
|
currentSliderPage: ze
|
|
@@ -667,12 +667,12 @@ const go = Ct({
|
|
|
667
667
|
return;
|
|
668
668
|
const N = Date.now();
|
|
669
669
|
u.current || N - c.current < a + 200 || g !== b && (h(b), w(), d.current = setTimeout(() => {
|
|
670
|
-
const
|
|
671
|
-
if (!
|
|
670
|
+
const P = t.current;
|
|
671
|
+
if (!P) {
|
|
672
672
|
h(null);
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
|
-
u.current = !0, c.current = Date.now(), b === "left" && e > 0 ?
|
|
675
|
+
u.current = !0, c.current = Date.now(), b === "left" && e > 0 ? P.slickGoTo(e - 1) : b === "right" && (e < o - 1 ? P.slickGoTo(e + 1) : D || f == null || f()), h(null), setTimeout(() => {
|
|
676
676
|
u.current = !1;
|
|
677
677
|
}, 300);
|
|
678
678
|
}, a));
|
|
@@ -698,8 +698,8 @@ const go = Ct({
|
|
|
698
698
|
if (D < i && e > 0)
|
|
699
699
|
z("left");
|
|
700
700
|
else if (D > N) {
|
|
701
|
-
const
|
|
702
|
-
if (
|
|
701
|
+
const P = e >= o - 1, $ = typeof n == "number" && o >= n;
|
|
702
|
+
if (P && $)
|
|
703
703
|
return;
|
|
704
704
|
z("right");
|
|
705
705
|
} else
|
|
@@ -1098,7 +1098,7 @@ const qs = Ae(({ src: t }) => {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
);
|
|
1100
1100
|
}, Co = (t) => {
|
|
1101
|
-
var
|
|
1101
|
+
var T, _, R, j, se;
|
|
1102
1102
|
const { data: e, className: o, parentIds: n, itemIndex: r, onClick: a, noLetters: i = !1, disabledDrag: l = !1, icon: f } = t, {
|
|
1103
1103
|
contextMenuFuns: p,
|
|
1104
1104
|
setList: d,
|
|
@@ -1107,7 +1107,7 @@ const qs = Ae(({ src: t }) => {
|
|
|
1107
1107
|
moveTargetId: c,
|
|
1108
1108
|
setMoveTargetId: u,
|
|
1109
1109
|
listStatus: w
|
|
1110
|
-
} = Ee(), { itemIconBuilder: z, theme: y, contextMenu: M, typeConfigMap: k } = pe(), { children: v } = e, { row: b, col: x } = ko(e.type, (
|
|
1110
|
+
} = Ee(), { itemIconBuilder: z, theme: y, contextMenu: M, typeConfigMap: k } = pe(), { children: v } = e, { row: b, col: x } = ko(e.type, (T = e.config) == null ? void 0 : T.sizeId, k), D = ((v == null ? void 0 : v.length) ?? 0) === 0, N = D ? [e] : [...v ?? []].slice(0, 9), P = re(() => c === e.id, [e.id, c]), $ = E`
|
|
1111
1111
|
overflow: hidden;
|
|
1112
1112
|
cursor: pointer;
|
|
1113
1113
|
background-color: ${(_ = y.token.items) == null ? void 0 : _.iconBackgroundColor};
|
|
@@ -1230,7 +1230,7 @@ const qs = Ae(({ src: t }) => {
|
|
|
1230
1230
|
{
|
|
1231
1231
|
whileTap: { scale: 0.9 },
|
|
1232
1232
|
className: S(
|
|
1233
|
-
|
|
1233
|
+
P ? "!scale-110" : "",
|
|
1234
1234
|
"zs-cursor-pointer zs-relative my-0",
|
|
1235
1235
|
E`
|
|
1236
1236
|
border-radius: 0.75rem;
|
|
@@ -1298,7 +1298,7 @@ const qs = Ae(({ src: t }) => {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
);
|
|
1300
1300
|
}, zo = Xs, Ks = ({ value: t, onChange: e, onBlur: o, placeholder: n = "标题" }) => {
|
|
1301
|
-
var p, d, g, h, c, u, w, z, y, M, k, v, b, x, D, N,
|
|
1301
|
+
var p, d, g, h, c, u, w, z, y, M, k, v, b, x, D, N, P, $, q, T, _;
|
|
1302
1302
|
const [r, a] = B(t), { theme: i } = pe(), l = (R) => {
|
|
1303
1303
|
const j = R.target.value;
|
|
1304
1304
|
a(j), e(j);
|
|
@@ -1332,11 +1332,11 @@ const qs = Ae(({ src: t }) => {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
|
|
1334
1334
|
&::placeholder {
|
|
1335
|
-
color: ${($ = (
|
|
1335
|
+
color: ${($ = (P = (N = i.token.items) == null ? void 0 : N.groupModal) == null ? void 0 : P.title) == null ? void 0 : $.placeholderColor};
|
|
1336
1336
|
}
|
|
1337
1337
|
|
|
1338
1338
|
&::selection {
|
|
1339
|
-
background: ${(_ = (
|
|
1339
|
+
background: ${(_ = (T = (q = i.token.items) == null ? void 0 : q.groupModal) == null ? void 0 : T.title) == null ? void 0 : _.selectionBackgroundColor};
|
|
1340
1340
|
}
|
|
1341
1341
|
`
|
|
1342
1342
|
),
|
|
@@ -1347,7 +1347,7 @@ const qs = Ae(({ src: t }) => {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
);
|
|
1349
1349
|
}, pt = (t) => {
|
|
1350
|
-
var k, v, b, x, D, N,
|
|
1350
|
+
var k, v, b, x, D, N, P, $, q, T, _, R, j, se, Z, U, te, ce, fe, ae, ie, K;
|
|
1351
1351
|
const {
|
|
1352
1352
|
visible: e,
|
|
1353
1353
|
onClose: o,
|
|
@@ -1410,7 +1410,7 @@ const qs = Ae(({ src: t }) => {
|
|
|
1410
1410
|
background: ${(x = c == null ? void 0 : c.content) == null ? void 0 : x.backgroundColor};
|
|
1411
1411
|
backdrop-filter: ${(D = c == null ? void 0 : c.content) == null ? void 0 : D.backdropFilter};
|
|
1412
1412
|
box-shadow: 0 20px 40px ${(N = c == null ? void 0 : c.content) == null ? void 0 : N.boxShadowColor},
|
|
1413
|
-
0 0 0 0.75px ${(
|
|
1413
|
+
0 0 0 0.75px ${(P = c == null ? void 0 : c.content) == null ? void 0 : P.boxShadowBorderColor};
|
|
1414
1414
|
border: 0.75px solid ${($ = c == null ? void 0 : c.content) == null ? void 0 : $.borderColor};
|
|
1415
1415
|
padding: 0;
|
|
1416
1416
|
border-radius: ${(q = c == null ? void 0 : c.content) == null ? void 0 : q.borderRadius};
|
|
@@ -1444,7 +1444,7 @@ const qs = Ae(({ src: t }) => {
|
|
|
1444
1444
|
@keyframes maskFadeOut {
|
|
1445
1445
|
from {
|
|
1446
1446
|
opacity: 1;
|
|
1447
|
-
backdrop-filter: ${(
|
|
1447
|
+
backdrop-filter: ${(T = c == null ? void 0 : c.mask) == null ? void 0 : T.backdropFilter};
|
|
1448
1448
|
}
|
|
1449
1449
|
to {
|
|
1450
1450
|
opacity: 0;
|
|
@@ -1563,29 +1563,29 @@ const qs = Ae(({ src: t }) => {
|
|
|
1563
1563
|
name: d
|
|
1564
1564
|
});
|
|
1565
1565
|
}, b = (N) => {
|
|
1566
|
-
const
|
|
1567
|
-
|
|
1566
|
+
const P = N.relatedTarget;
|
|
1567
|
+
P && (N.currentTarget.contains(P) || setTimeout(() => {
|
|
1568
1568
|
o();
|
|
1569
1569
|
}, 500));
|
|
1570
1570
|
}, x = ue((N) => {
|
|
1571
|
-
const { width:
|
|
1572
|
-
w(
|
|
1571
|
+
const { width: P, marginLeft: $ } = Me.computeRowWidth(N, 112);
|
|
1572
|
+
w(P), y($);
|
|
1573
1573
|
}, []), D = ue(
|
|
1574
1574
|
(N) => {
|
|
1575
1575
|
if (c.current && (c.current.disconnect(), c.current = null), h.current = N, !!N)
|
|
1576
1576
|
if (window.requestAnimationFrame(() => {
|
|
1577
1577
|
x(N);
|
|
1578
1578
|
}), "ResizeObserver" in window) {
|
|
1579
|
-
const
|
|
1579
|
+
const P = new ResizeObserver(() => {
|
|
1580
1580
|
x(N);
|
|
1581
1581
|
});
|
|
1582
|
-
|
|
1582
|
+
P.observe(N), c.current = P;
|
|
1583
1583
|
} else {
|
|
1584
|
-
const
|
|
1584
|
+
const P = () => {
|
|
1585
1585
|
x(N);
|
|
1586
1586
|
};
|
|
1587
|
-
globalThis.addEventListener("resize",
|
|
1588
|
-
disconnect: () => globalThis.removeEventListener("resize",
|
|
1587
|
+
globalThis.addEventListener("resize", P), c.current = {
|
|
1588
|
+
disconnect: () => globalThis.removeEventListener("resize", P)
|
|
1589
1589
|
};
|
|
1590
1590
|
}
|
|
1591
1591
|
},
|
|
@@ -1616,20 +1616,20 @@ const qs = Ae(({ src: t }) => {
|
|
|
1616
1616
|
...Vs,
|
|
1617
1617
|
list: (e == null ? void 0 : e.children) ?? [],
|
|
1618
1618
|
setList: (N) => {
|
|
1619
|
-
var q,
|
|
1620
|
-
const
|
|
1621
|
-
|
|
1619
|
+
var q, T;
|
|
1620
|
+
const P = N.map((_) => _.id), $ = (T = (q = r.find((_) => _.id === (e == null ? void 0 : e.id))) == null ? void 0 : q.children) == null ? void 0 : T.map((_) => _.id);
|
|
1621
|
+
P.length === ($ == null ? void 0 : $.length) && P.every((_, R) => _ === $[R]) || P.length < (($ == null ? void 0 : $.length) ?? 0) || a(N, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
|
|
1622
1622
|
},
|
|
1623
1623
|
onMove: () => (f(null), i("onMove"), !0),
|
|
1624
1624
|
onStart: (N) => {
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1625
|
+
const P = N.item.dataset;
|
|
1626
|
+
P != null && P.id && l(P.id), i("onMove");
|
|
1627
1627
|
},
|
|
1628
1628
|
onEnd: () => {
|
|
1629
1629
|
l(null), f(null), i(null);
|
|
1630
1630
|
},
|
|
1631
1631
|
ghostClass: zo,
|
|
1632
|
-
children: /* @__PURE__ */ s(Ce, { mode: "popLayout", children: M.map((N,
|
|
1632
|
+
children: /* @__PURE__ */ s(Ce, { mode: "popLayout", children: M.map((N, P) => /* @__PURE__ */ s("div", { className: "zs-w-28 zs-h-28 zs-flex zs-items-center zs-justify-center", children: /* @__PURE__ */ s(_e, { data: N, itemIndex: P, onClick: n }, N.id) }, N.id)) })
|
|
1633
1633
|
}
|
|
1634
1634
|
) })
|
|
1635
1635
|
}
|
|
@@ -1726,13 +1726,13 @@ const qs = Ae(({ src: t }) => {
|
|
|
1726
1726
|
var c, u, w;
|
|
1727
1727
|
const [o, n] = B(!1), { theme: r } = pe(), a = (w = (u = (c = r == null ? void 0 : r.token) == null ? void 0 : c.dock) == null ? void 0 : u.launchpad) == null ? void 0 : w.icon, i = a.textColor, l = a.backgroundColor, f = a.borderColor, p = a.shadowColor, d = a.hoverGlowColor, g = (z, y) => {
|
|
1728
1728
|
if (z.startsWith("#")) {
|
|
1729
|
-
const k = z.slice(1), v = parseInt(k.slice(0, 2), 16), b = parseInt(k.slice(2, 4), 16), x = parseInt(k.slice(4, 6), 16), D = y * 15, N = Math.max(0, v - D),
|
|
1730
|
-
return `rgb(${N}, ${
|
|
1729
|
+
const k = z.slice(1), v = parseInt(k.slice(0, 2), 16), b = parseInt(k.slice(2, 4), 16), x = parseInt(k.slice(4, 6), 16), D = y * 15, N = Math.max(0, v - D), P = Math.max(0, b - D), $ = Math.max(0, x - D);
|
|
1730
|
+
return `rgb(${N}, ${P}, ${$})`;
|
|
1731
1731
|
}
|
|
1732
1732
|
const M = z.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);
|
|
1733
1733
|
if (M) {
|
|
1734
|
-
const k = parseInt(M[1]), v = parseInt(M[2]), b = parseInt(M[3]), x = M[4] || "1", D = y * 15, N = Math.max(0, k - D),
|
|
1735
|
-
return `rgba(${N}, ${
|
|
1734
|
+
const k = parseInt(M[1]), v = parseInt(M[2]), b = parseInt(M[3]), x = M[4] || "1", D = y * 15, N = Math.max(0, k - D), P = Math.max(0, v - D), $ = Math.max(0, b - D);
|
|
1735
|
+
return `rgba(${N}, ${P}, ${$}, ${x})`;
|
|
1736
1736
|
}
|
|
1737
1737
|
return z;
|
|
1738
1738
|
}, h = [
|
|
@@ -1778,14 +1778,14 @@ const qs = Ae(({ src: t }) => {
|
|
|
1778
1778
|
overflow: "visible"
|
|
1779
1779
|
},
|
|
1780
1780
|
children: h.map((z, y) => {
|
|
1781
|
-
const M = y * 4, k = 0, v = o ? M + y * 2 : M, b = k, x = 0, D = 1 - y * 0.05, N = h.length - y,
|
|
1781
|
+
const M = y * 4, k = 0, v = o ? M + y * 2 : M, b = k, x = 0, D = 1 - y * 0.05, N = h.length - y, P = ($) => $ === 0 ? l : g(l, $);
|
|
1782
1782
|
return /* @__PURE__ */ s(
|
|
1783
1783
|
X.div,
|
|
1784
1784
|
{
|
|
1785
1785
|
className: S(
|
|
1786
1786
|
"zs-absolute zs-w-full zs-h-full zs-rounded-xl zs-flex zs-items-center zs-justify-center zs-shadow-lg",
|
|
1787
1787
|
E`
|
|
1788
|
-
background: ${
|
|
1788
|
+
background: ${P(y)};
|
|
1789
1789
|
color: ${i};
|
|
1790
1790
|
z-index: ${N};
|
|
1791
1791
|
box-shadow: 0 ${1 + y * 0.5}px ${4 + y * 1}px
|
|
@@ -1857,17 +1857,17 @@ const Mo = ({
|
|
|
1857
1857
|
itemSize: d = 56
|
|
1858
1858
|
}) => {
|
|
1859
1859
|
var q;
|
|
1860
|
-
const { setListStatus: g } = Ee(), { theme: h } = pe(), c = h.token.dock, u = h.token.base, w = Io(), [z, y] = B(null), [M, k] = B(null), [v, b] = B(0), [x, D] = B(!1), N = (
|
|
1860
|
+
const { setListStatus: g } = Ee(), { theme: h } = pe(), c = h.token.dock, u = h.token.base, w = Io(), [z, y] = B(null), [M, k] = B(null), [v, b] = B(0), [x, D] = B(!1), N = (T, _) => r ? r(T, _) : /* @__PURE__ */ s(_e, { data: T, itemIndex: _, noLetters: !0, from: "dock", iconSize: d }, T.id), P = (T, _) => a ? a(T, _) : /* @__PURE__ */ s(
|
|
1861
1861
|
_e,
|
|
1862
1862
|
{
|
|
1863
|
-
data:
|
|
1863
|
+
data: T,
|
|
1864
1864
|
itemIndex: _,
|
|
1865
1865
|
noLetters: !0,
|
|
1866
1866
|
from: "dock",
|
|
1867
1867
|
disabledDrag: !0,
|
|
1868
1868
|
iconSize: d
|
|
1869
1869
|
},
|
|
1870
|
-
|
|
1870
|
+
T.id
|
|
1871
1871
|
);
|
|
1872
1872
|
if (!t.length && !e.length && !i)
|
|
1873
1873
|
return null;
|
|
@@ -1899,9 +1899,9 @@ const Mo = ({
|
|
|
1899
1899
|
`,
|
|
1900
1900
|
n
|
|
1901
1901
|
),
|
|
1902
|
-
onDragOver: (
|
|
1903
|
-
onDrop: (
|
|
1904
|
-
|
|
1902
|
+
onDragOver: (T) => T.preventDefault(),
|
|
1903
|
+
onDrop: (T) => {
|
|
1904
|
+
T.preventDefault(), f && f();
|
|
1905
1905
|
},
|
|
1906
1906
|
children: [
|
|
1907
1907
|
e.length > 0 && /* @__PURE__ */ s(
|
|
@@ -1913,7 +1913,7 @@ const Mo = ({
|
|
|
1913
1913
|
${o === "top" || o === "bottom" ? "flex-direction: row;" : "flex-direction: column;"}
|
|
1914
1914
|
`
|
|
1915
1915
|
),
|
|
1916
|
-
children: /* @__PURE__ */ s(Ce, { mode: "popLayout", children: e.map((
|
|
1916
|
+
children: /* @__PURE__ */ s(Ce, { mode: "popLayout", children: e.map((T, _) => /* @__PURE__ */ s("div", { children: P(T, _) }, T.id)) })
|
|
1917
1917
|
}
|
|
1918
1918
|
),
|
|
1919
1919
|
e.length > 0 && t.length > 0 && $,
|
|
@@ -1921,8 +1921,8 @@ const Mo = ({
|
|
|
1921
1921
|
ft,
|
|
1922
1922
|
{
|
|
1923
1923
|
list: t,
|
|
1924
|
-
setList: (
|
|
1925
|
-
p && p(
|
|
1924
|
+
setList: (T) => {
|
|
1925
|
+
p && p(T);
|
|
1926
1926
|
},
|
|
1927
1927
|
...bo,
|
|
1928
1928
|
className: S(
|
|
@@ -1960,7 +1960,7 @@ const Mo = ({
|
|
|
1960
1960
|
onEnd: () => {
|
|
1961
1961
|
g(null);
|
|
1962
1962
|
},
|
|
1963
|
-
children: t.length > 0 ? t.map((
|
|
1963
|
+
children: t.length > 0 ? t.map((T, _) => N(T, _)) : /* @__PURE__ */ s(
|
|
1964
1964
|
X.div,
|
|
1965
1965
|
{
|
|
1966
1966
|
className: S(
|
|
@@ -2003,18 +2003,18 @@ const Mo = ({
|
|
|
2003
2003
|
// 根据上滑距离做轻微的视觉反馈
|
|
2004
2004
|
transform: `translateX(-50%) translateY(0) scale(${1 + Math.min(Math.max(-v, 0), 80) / 800})`
|
|
2005
2005
|
},
|
|
2006
|
-
onTouchStart: (
|
|
2007
|
-
y(
|
|
2006
|
+
onTouchStart: (T) => {
|
|
2007
|
+
y(T.touches[0].clientY), k(T.touches[0].clientX), b(0), D(!1);
|
|
2008
2008
|
},
|
|
2009
|
-
onTouchMove: (
|
|
2009
|
+
onTouchMove: (T) => {
|
|
2010
2010
|
if (z === null || M === null) return;
|
|
2011
|
-
const _ =
|
|
2011
|
+
const _ = T.touches[0].clientY - z, R = T.touches[0].clientX - M;
|
|
2012
2012
|
if (!x)
|
|
2013
2013
|
if (Math.abs(_) > Math.abs(R) && _ < 0)
|
|
2014
2014
|
D(!0);
|
|
2015
2015
|
else
|
|
2016
2016
|
return;
|
|
2017
|
-
|
|
2017
|
+
T.preventDefault(), T.stopPropagation(), b(_);
|
|
2018
2018
|
},
|
|
2019
2019
|
onTouchEnd: () => {
|
|
2020
2020
|
x && z !== null && v < -60 && (l == null || l()), y(null), k(null), b(0), D(!1);
|
|
@@ -2029,7 +2029,7 @@ const Mo = ({
|
|
|
2029
2029
|
}, bt = E`
|
|
2030
2030
|
transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
2031
2031
|
`, na = ({ value: t, onChange: e, placeholder: o = "搜索应用", className: n = "" }) => {
|
|
2032
|
-
var c, u, w, z, y, M, k, v, b, x, D, N,
|
|
2032
|
+
var c, u, w, z, y, M, k, v, b, x, D, N, P, $, q, T, _, R, j, se, Z, U, te, ce, fe, ae, ie, K, de, be, Q, he, ge, ke, ze, H, J, W, F, oe, ee, m, C;
|
|
2033
2033
|
const { theme: r } = pe(), a = ne(null), i = ne(null), l = ne(null), [f, p] = B(!1), d = () => {
|
|
2034
2034
|
p(!0), i.current && (i.current.style.transform = "translateY(-50%) translateX(-0.5rem)"), l.current && (l.current.style.transform = "translateY(-50%) translateX(0.5rem)");
|
|
2035
2035
|
}, g = () => {
|
|
@@ -2061,7 +2061,7 @@ const Mo = ({
|
|
|
2061
2061
|
"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]",
|
|
2062
2062
|
E`
|
|
2063
2063
|
background-color: ${(N = (D = (x = (b = r.token.dock) == null ? void 0 : b.launchpad) == null ? void 0 : x.modal) == null ? void 0 : D.searchBox) == null ? void 0 : N.backgroundColor};
|
|
2064
|
-
color: ${(
|
|
2064
|
+
color: ${(T = (q = ($ = (P = r.token.dock) == null ? void 0 : P.launchpad) == null ? void 0 : $.modal) == null ? void 0 : q.searchBox) == null ? void 0 : T.textColor};
|
|
2065
2065
|
&::placeholder {
|
|
2066
2066
|
color: ${(se = (j = (R = (_ = r.token.dock) == null ? void 0 : _.launchpad) == null ? void 0 : R.modal) == null ? void 0 : j.searchBox) == null ? void 0 : se.placeholderColor};
|
|
2067
2067
|
}
|
|
@@ -2102,7 +2102,7 @@ const Mo = ({
|
|
|
2102
2102
|
)
|
|
2103
2103
|
] });
|
|
2104
2104
|
}, So = (t) => {
|
|
2105
|
-
var b, x, D, N,
|
|
2105
|
+
var b, x, D, N, P, $, q, T, _, R, j, se, Z, U, te, ce, fe, ae, ie, K, de, be, Q;
|
|
2106
2106
|
const {
|
|
2107
2107
|
open: e = !1,
|
|
2108
2108
|
onClose: o,
|
|
@@ -2170,10 +2170,10 @@ const Mo = ({
|
|
|
2170
2170
|
/* Drawer content wrapper styling */
|
|
2171
2171
|
.drawer-content-wrapper,
|
|
2172
2172
|
.rc-drawer-content-wrapper {
|
|
2173
|
-
background: ${(
|
|
2173
|
+
background: ${(P = u == null ? void 0 : u.content) == null ? void 0 : P.backgroundColor};
|
|
2174
2174
|
backdrop-filter: ${($ = u == null ? void 0 : u.content) == null ? void 0 : $.backdropFilter};
|
|
2175
2175
|
box-shadow: 0 20px 40px ${(q = u == null ? void 0 : u.content) == null ? void 0 : q.boxShadowColor},
|
|
2176
|
-
0 0 0 0.75px ${(
|
|
2176
|
+
0 0 0 0.75px ${(T = u == null ? void 0 : u.content) == null ? void 0 : T.boxShadowBorderColor};
|
|
2177
2177
|
border: 0.75px solid ${(_ = u == null ? void 0 : u.content) == null ? void 0 : _.borderColor};
|
|
2178
2178
|
border-radius: ${(R = u == null ? void 0 : u.content) == null ? void 0 : R.borderRadius};
|
|
2179
2179
|
overflow: hidden;
|
|
@@ -2295,13 +2295,13 @@ const Mo = ({
|
|
|
2295
2295
|
var D;
|
|
2296
2296
|
return (((D = b.data) == null ? void 0 : D.name) || b.id || "").toString().toLowerCase().includes(r.toLowerCase());
|
|
2297
2297
|
}) : u).sort((b, x) => {
|
|
2298
|
-
var
|
|
2299
|
-
const D = (((
|
|
2298
|
+
var P, $;
|
|
2299
|
+
const D = (((P = b.data) == null ? void 0 : P.name) || b.id || "").toString(), N = ((($ = x.data) == null ? void 0 : $.name) || x.id || "").toString();
|
|
2300
2300
|
return D.localeCompare(N);
|
|
2301
2301
|
}), y = /* @__PURE__ */ new Map();
|
|
2302
2302
|
z.forEach((b) => {
|
|
2303
|
-
var
|
|
2304
|
-
const D = (((
|
|
2303
|
+
var P;
|
|
2304
|
+
const D = (((P = b.data) == null ? void 0 : P.name) || b.id || "").toString().charAt(0).toUpperCase(), N = /[A-Z]/.test(D) ? D : "#";
|
|
2305
2305
|
y.has(N) || y.set(N, []), y.get(N).push(b);
|
|
2306
2306
|
});
|
|
2307
2307
|
const M = Array.from(y.keys()).sort((b, x) => b === "#" ? 1 : x === "#" ? -1 : b.localeCompare(x)), k = [], v = [];
|
|
@@ -2424,10 +2424,10 @@ const Mo = ({
|
|
|
2424
2424
|
setListStatus: x,
|
|
2425
2425
|
showInfoItemData: D,
|
|
2426
2426
|
setShowInfoItemData: N,
|
|
2427
|
-
openGroupItemData:
|
|
2427
|
+
openGroupItemData: P,
|
|
2428
2428
|
setOpenGroupItemData: $,
|
|
2429
2429
|
setMoveItemId: q,
|
|
2430
|
-
setMoveTargetId:
|
|
2430
|
+
setMoveTargetId: T,
|
|
2431
2431
|
addItem: _,
|
|
2432
2432
|
dragItem: R,
|
|
2433
2433
|
setDragItem: j,
|
|
@@ -2735,7 +2735,7 @@ const Mo = ({
|
|
|
2735
2735
|
var O;
|
|
2736
2736
|
x("onMove");
|
|
2737
2737
|
const { dragged: I, related: Y } = C, L = I.dataset, G = Y.dataset;
|
|
2738
|
-
return
|
|
2738
|
+
return T(null), !((Object.keys(G).length === 0 || G.parentIds) && Number(L.childrenLength) > 0 && Y.classList.contains("sortable-group-item") || (Y.classList.contains("desktop-dock-sortable") || (O = Y.parentElement) != null && O.classList.contains("desktop-dock-sortable")) && Number(L.childrenLength) > 0);
|
|
2739
2739
|
},
|
|
2740
2740
|
onStart: (C) => {
|
|
2741
2741
|
var L;
|
|
@@ -2745,7 +2745,7 @@ const Mo = ({
|
|
|
2745
2745
|
Y && j(Y);
|
|
2746
2746
|
},
|
|
2747
2747
|
onEnd: () => {
|
|
2748
|
-
q(null),
|
|
2748
|
+
q(null), T(null), x(null), w(!1), j(null), setTimeout(() => {
|
|
2749
2749
|
be();
|
|
2750
2750
|
}, 100);
|
|
2751
2751
|
},
|
|
@@ -2837,7 +2837,7 @@ const Mo = ({
|
|
|
2837
2837
|
/* @__PURE__ */ s(
|
|
2838
2838
|
Js,
|
|
2839
2839
|
{
|
|
2840
|
-
data:
|
|
2840
|
+
data: P,
|
|
2841
2841
|
onClose: () => {
|
|
2842
2842
|
$(null);
|
|
2843
2843
|
},
|
|
@@ -2956,7 +2956,7 @@ const Mo = ({
|
|
|
2956
2956
|
}
|
|
2957
2957
|
);
|
|
2958
2958
|
}, aa = ({ text: t, icon: e, index: o, children: n, color: r, textColor: a, ...i }) => {
|
|
2959
|
-
var D, N,
|
|
2959
|
+
var D, N, P;
|
|
2960
2960
|
const [l, f] = B(!1), [p, d] = B({ x: 0, y: 0 }), g = ne(null), h = ne(null), { hoveredIndex: c, setHoveredIndex: u } = De(St), { theme: w } = pe(), z = c === o, y = a || ((D = w.token.contextMenu) == null ? void 0 : D.textColor) || "#1d1d1f", M = r || ((N = w.token.contextMenu) == null ? void 0 : N.textColor) || "black", k = () => {
|
|
2961
2961
|
if (h.current && clearTimeout(h.current), u(o), f(!0), g.current) {
|
|
2962
2962
|
const $ = g.current.getBoundingClientRect();
|
|
@@ -2998,7 +2998,7 @@ const Mo = ({
|
|
|
2998
2998
|
"zs-absolute zs-top-0.5 zs-left-2 zs-right-2 zs-bottom-0.5 zs-rounded-lg",
|
|
2999
2999
|
E`
|
|
3000
3000
|
z-index: -1;
|
|
3001
|
-
background-color: ${((
|
|
3001
|
+
background-color: ${((P = w.token.contextMenu) == null ? void 0 : P.activeColor) || "rgba(0, 0, 0, 0.05)"};
|
|
3002
3002
|
`
|
|
3003
3003
|
),
|
|
3004
3004
|
initial: { opacity: 0 },
|
|
@@ -3153,9 +3153,9 @@ const Mo = ({
|
|
|
3153
3153
|
return ct(((_ = d == null ? void 0 : d.data) == null ? void 0 : _.type) || "app", z).sizeConfigs.map((R) => R.name);
|
|
3154
3154
|
}, N = () => {
|
|
3155
3155
|
var _;
|
|
3156
|
-
const
|
|
3157
|
-
return !
|
|
3158
|
-
},
|
|
3156
|
+
const T = (_ = d == null ? void 0 : d.data) == null ? void 0 : _.dataType;
|
|
3157
|
+
return !T || !y ? [] : y[T] || [];
|
|
3158
|
+
}, P = {
|
|
3159
3159
|
setContextMenu: g,
|
|
3160
3160
|
hideContextMenu: h,
|
|
3161
3161
|
setShowInfoItemData: c,
|
|
@@ -3219,12 +3219,14 @@ const Mo = ({
|
|
|
3219
3219
|
}
|
|
3220
3220
|
}
|
|
3221
3221
|
),
|
|
3222
|
-
r && (
|
|
3222
|
+
r && (x == null ? void 0 : x.allowResize) !== !1 && (() => {
|
|
3223
3223
|
var j, se;
|
|
3224
|
-
const
|
|
3224
|
+
const T = ct(((j = d == null ? void 0 : d.data) == null ? void 0 : j.type) || "app", z);
|
|
3225
|
+
if (T.sizeConfigs.length <= 1) return null;
|
|
3226
|
+
const _ = vo(
|
|
3225
3227
|
(se = b == null ? void 0 : b.config) == null ? void 0 : se.sizeId,
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
+
T.sizeConfigs,
|
|
3229
|
+
T.defaultSizeId
|
|
3228
3230
|
);
|
|
3229
3231
|
let R = 0;
|
|
3230
3232
|
return o && R++, n && R++, e && R++, /* @__PURE__ */ s(aa, { text: "尺寸", icon: /* @__PURE__ */ s(mr, { size: 18 }), index: R, children: /* @__PURE__ */ s(
|
|
@@ -3233,7 +3235,7 @@ const Mo = ({
|
|
|
3233
3235
|
sizes: D(),
|
|
3234
3236
|
currentSize: _.name,
|
|
3235
3237
|
onSizeChange: (Z) => {
|
|
3236
|
-
const U =
|
|
3238
|
+
const U = T.sizeConfigs.find((te) => te.name === Z);
|
|
3237
3239
|
U && w(d.data.id, {
|
|
3238
3240
|
sizeId: U.id || Z
|
|
3239
3241
|
});
|
|
@@ -3241,18 +3243,18 @@ const Mo = ({
|
|
|
3241
3243
|
}
|
|
3242
3244
|
) });
|
|
3243
3245
|
})(),
|
|
3244
|
-
N().map((
|
|
3246
|
+
N().map((T, _) => {
|
|
3245
3247
|
let R = 0;
|
|
3246
|
-
return o && R++, n && R++, e && R++, r && (
|
|
3248
|
+
return o && R++, n && R++, e && R++, r && (x == null ? void 0 : x.allowResize) !== !1 && R++, R += _, /* @__PURE__ */ s(
|
|
3247
3249
|
st,
|
|
3248
3250
|
{
|
|
3249
|
-
text:
|
|
3250
|
-
icon:
|
|
3251
|
-
color:
|
|
3252
|
-
textColor:
|
|
3251
|
+
text: T.text,
|
|
3252
|
+
icon: T.icon,
|
|
3253
|
+
color: T.color,
|
|
3254
|
+
textColor: T.textColor,
|
|
3253
3255
|
index: R,
|
|
3254
3256
|
onClick: () => {
|
|
3255
|
-
|
|
3257
|
+
T.onClick && T.onClick(d.data, P);
|
|
3256
3258
|
}
|
|
3257
3259
|
},
|
|
3258
3260
|
`custom-${_}`
|
|
@@ -3993,10 +3995,10 @@ const Lt = (t) => {
|
|
|
3993
3995
|
titleClassName: f = "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",
|
|
3994
3996
|
childrenClassName: p,
|
|
3995
3997
|
...d
|
|
3996
|
-
} = t, g = ne(null), h = He(e, (
|
|
3998
|
+
} = t, g = ne(null), h = He(e, (P) => {
|
|
3997
3999
|
var q;
|
|
3998
4000
|
const $ = ((q = g.current) == null ? void 0 : q.getBoundingClientRect()) ?? { x: 0, width: 0 };
|
|
3999
|
-
return
|
|
4001
|
+
return P - $.x - $.width / 2;
|
|
4000
4002
|
}), c = He(h, [-150, 0, 150], [40, 80, 40]), u = He(h, [-150, 0, 150], [40, 80, 40]), w = He(h, [-150, 0, 150], [20, 40, 20]), z = He(h, [-150, 0, 150], [20, 40, 20]), y = rt(c, {
|
|
4001
4003
|
mass: 0.1,
|
|
4002
4004
|
stiffness: 150,
|
|
@@ -4013,7 +4015,7 @@ const Lt = (t) => {
|
|
|
4013
4015
|
mass: 0.1,
|
|
4014
4016
|
stiffness: 150,
|
|
4015
4017
|
damping: 12
|
|
4016
|
-
}), b = He(k, (
|
|
4018
|
+
}), b = He(k, (P) => `${P}px`), [x, D] = B(!1), N = /* @__PURE__ */ A(
|
|
4017
4019
|
i,
|
|
4018
4020
|
{
|
|
4019
4021
|
ref: g,
|
|
@@ -5875,7 +5877,7 @@ const ci = ({ children: t, ...e }) => {
|
|
|
5875
5877
|
aiOptions: g
|
|
5876
5878
|
} = t, [h, c] = B(
|
|
5877
5879
|
o
|
|
5878
|
-
), [u, w] = B("Saved"), [z, y] = B(), [M, k] = B(!1), [v, b] = B(!1), [x, D] = B(!1), [N,
|
|
5880
|
+
), [u, w] = B("Saved"), [z, y] = B(), [M, k] = B(!1), [v, b] = B(!1), [x, D] = B(!1), [N, P] = B(!1), $ = (R) => {
|
|
5879
5881
|
const j = new DOMParser().parseFromString(R, "text/html");
|
|
5880
5882
|
return j.querySelectorAll("pre code").forEach((se) => {
|
|
5881
5883
|
Ps.highlightElement(se);
|
|
@@ -5892,7 +5894,7 @@ const ci = ({ children: t, ...e }) => {
|
|
|
5892
5894
|
), w("Saved"));
|
|
5893
5895
|
},
|
|
5894
5896
|
500
|
|
5895
|
-
),
|
|
5897
|
+
), T = re(() => {
|
|
5896
5898
|
if (!f) return si;
|
|
5897
5899
|
const {
|
|
5898
5900
|
beforeUpload: R,
|
|
@@ -5963,7 +5965,7 @@ const ci = ({ children: t, ...e }) => {
|
|
|
5963
5965
|
const _ = [
|
|
5964
5966
|
...$o,
|
|
5965
5967
|
ii({
|
|
5966
|
-
uploadFn:
|
|
5968
|
+
uploadFn: T
|
|
5967
5969
|
})
|
|
5968
5970
|
];
|
|
5969
5971
|
return /* @__PURE__ */ A("div", { className: S("relative w-full max-w-screen-lg", e), children: [
|
|
@@ -5993,8 +5995,8 @@ const ci = ({ children: t, ...e }) => {
|
|
|
5993
5995
|
handleDOMEvents: {
|
|
5994
5996
|
keydown: (R, j) => Kn(j)
|
|
5995
5997
|
},
|
|
5996
|
-
handlePaste: (R, j) => Zn(R, j,
|
|
5997
|
-
handleDrop: (R, j, se, Z) => qn(R, j, Z,
|
|
5998
|
+
handlePaste: (R, j) => Zn(R, j, T),
|
|
5999
|
+
handleDrop: (R, j, se, Z) => qn(R, j, Z, T),
|
|
5998
6000
|
attributes: {
|
|
5999
6001
|
class: "prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"
|
|
6000
6002
|
}
|
|
@@ -6007,7 +6009,7 @@ const ci = ({ children: t, ...e }) => {
|
|
|
6007
6009
|
/* @__PURE__ */ A(Jn, { className: "z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border border-muted bg-background px-1 py-2 shadow-md transition-all", children: [
|
|
6008
6010
|
/* @__PURE__ */ s(Qn, { className: "px-2 text-muted-foreground", children: "没有结果" }),
|
|
6009
6011
|
/* @__PURE__ */ s(es, { children: Wo({
|
|
6010
|
-
uploadFn:
|
|
6012
|
+
uploadFn: T
|
|
6011
6013
|
}).map((R) => /* @__PURE__ */ A(
|
|
6012
6014
|
ts,
|
|
6013
6015
|
{
|
|
@@ -6029,7 +6031,7 @@ const ci = ({ children: t, ...e }) => {
|
|
|
6029
6031
|
ri,
|
|
6030
6032
|
{
|
|
6031
6033
|
open: N,
|
|
6032
|
-
onOpenChange:
|
|
6034
|
+
onOpenChange: P,
|
|
6033
6035
|
enableAI: d,
|
|
6034
6036
|
aiOptions: g,
|
|
6035
6037
|
children: [
|
|
@@ -6882,7 +6884,7 @@ const Oi = (t) => {
|
|
|
6882
6884
|
fetchGeoData: d,
|
|
6883
6885
|
children: g
|
|
6884
6886
|
}) => {
|
|
6885
|
-
const h = ne(null), [c, u] = B(Gt), [w, z] = B(null), [y, M] = B(t), [k, v] = B([]), b = ne({}), [x, D] = B({}), [N,
|
|
6887
|
+
const h = ne(null), [c, u] = B(Gt), [w, z] = B(null), [y, M] = B(t), [k, v] = B([]), b = ne({}), [x, D] = B({}), [N, P] = B({}), [$, q] = B(!1), [T, _] = B([]), [R, j] = B({}), [se, Z] = B({}), [U, te] = B(!1), [ce, fe] = B([]), ae = re(
|
|
6886
6888
|
() => d || ji,
|
|
6887
6889
|
[d]
|
|
6888
6890
|
), { run: ie } = ar(
|
|
@@ -6934,7 +6936,7 @@ const Oi = (t) => {
|
|
|
6934
6936
|
).map((L) => ({ name: m.find((O) => O.code === L).name, code: L }));
|
|
6935
6937
|
q((L) => L || !0);
|
|
6936
6938
|
const I = C.filter(
|
|
6937
|
-
(L) => !
|
|
6939
|
+
(L) => !T.includes(L.code) && !x[L.code]
|
|
6938
6940
|
);
|
|
6939
6941
|
if (I.length === 0)
|
|
6940
6942
|
return;
|
|
@@ -6949,7 +6951,7 @@ const Oi = (t) => {
|
|
|
6949
6951
|
[L.code]: G
|
|
6950
6952
|
}));
|
|
6951
6953
|
const O = K(G);
|
|
6952
|
-
return
|
|
6954
|
+
return P((me) => ({
|
|
6953
6955
|
...me,
|
|
6954
6956
|
[L.code]: O
|
|
6955
6957
|
})), { code: L.code, data: G };
|
|
@@ -6966,7 +6968,7 @@ const Oi = (t) => {
|
|
|
6966
6968
|
});
|
|
6967
6969
|
},
|
|
6968
6970
|
[
|
|
6969
|
-
|
|
6971
|
+
T,
|
|
6970
6972
|
x,
|
|
6971
6973
|
K,
|
|
6972
6974
|
ae
|