@linkdesk/ui 0.2.54 → 0.2.56
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 +293 -272
- package/dist/markdown-view/MarkdownView.d.ts +6 -1
- package/dist/shell-provenance.json +3 -3
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -15454,6 +15454,11 @@ function xE(e) {
|
|
|
15454
15454
|
const t = e.trim();
|
|
15455
15455
|
return !t || t.startsWith("#") || /^(\.{0,2}\/|(?!\w+:)\/?)/.test(t) && !/^\/\//.test(t) ? !0 : /^https?:\/\//i.test(t) || /^mailto:/i.test(t);
|
|
15456
15456
|
}
|
|
15457
|
+
function SE(e) {
|
|
15458
|
+
if (!e) return !1;
|
|
15459
|
+
const t = e.trim();
|
|
15460
|
+
return !t || t.startsWith("#") || t.startsWith("//") ? !1 : !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t);
|
|
15461
|
+
}
|
|
15457
15462
|
function bn(e, t) {
|
|
15458
15463
|
if (!e) return null;
|
|
15459
15464
|
const n = e.trim();
|
|
@@ -15469,7 +15474,7 @@ function bn(e, t) {
|
|
|
15469
15474
|
}
|
|
15470
15475
|
return /^(\.{0,2}\/)/.test(n) ? n : null;
|
|
15471
15476
|
}
|
|
15472
|
-
const
|
|
15477
|
+
const LE = {
|
|
15473
15478
|
...Xt,
|
|
15474
15479
|
tagNames: [...Xt.tagNames ?? [], "video", "figure", "figcaption"],
|
|
15475
15480
|
attributes: {
|
|
@@ -15479,58 +15484,74 @@ const SE = {
|
|
|
15479
15484
|
source: ["src", "type", "srcset", "srcSet", "sizes"]
|
|
15480
15485
|
}
|
|
15481
15486
|
};
|
|
15482
|
-
function
|
|
15487
|
+
function OE(e, t) {
|
|
15483
15488
|
return {
|
|
15484
|
-
a: ({ href:
|
|
15485
|
-
|
|
15486
|
-
const
|
|
15487
|
-
return
|
|
15489
|
+
a: ({ href: n, children: r, ...i }) => {
|
|
15490
|
+
if (!xE(n)) return /* @__PURE__ */ N("span", { ...i, children: r });
|
|
15491
|
+
const u = (n ?? "").trim(), a = t && SE(u);
|
|
15492
|
+
return /* @__PURE__ */ N(
|
|
15493
|
+
"a",
|
|
15494
|
+
{
|
|
15495
|
+
href: n,
|
|
15496
|
+
target: "_blank",
|
|
15497
|
+
rel: "noopener noreferrer",
|
|
15498
|
+
onClick: a ? (s) => {
|
|
15499
|
+
t(u) && s.preventDefault();
|
|
15500
|
+
} : void 0,
|
|
15501
|
+
...i,
|
|
15502
|
+
children: r
|
|
15503
|
+
}
|
|
15504
|
+
);
|
|
15505
|
+
},
|
|
15506
|
+
img: ({ src: n, alt: r, ...i }) => {
|
|
15507
|
+
const u = bn(n, e);
|
|
15508
|
+
return u ? (
|
|
15488
15509
|
// E2:外链图只走 https(相对经基址解析落 https/linkdesk);alt 缺失补空串(a11y——装饰图不读屏)
|
|
15489
|
-
/* @__PURE__ */ N("img", { src:
|
|
15510
|
+
/* @__PURE__ */ N("img", { src: u, alt: r ?? "", loading: "lazy", ...i })
|
|
15490
15511
|
) : null;
|
|
15491
15512
|
},
|
|
15492
15513
|
// E6#70d:页内视频(VS Code 更新页式)——src/poster 与图同走 resolveMediaSrc(相对经 assetBase 落包内)。
|
|
15493
15514
|
// 安全默认:controls 强制给(无播放条则读者无从起播);autoplay 消毒层已剥,此处再双保险剥两种拼写
|
|
15494
15515
|
// (parse5 会把作者 autoplay 小写化直达 rest——不剥会真透传成 DOM autoplay 属性自动播);
|
|
15495
15516
|
// preload 顶格 metadata——绝不在打开说明时整片预下(带宽/体积现实,档案 §五.4/§五.5)。
|
|
15496
|
-
video: (
|
|
15497
|
-
const { src:
|
|
15498
|
-
delete
|
|
15499
|
-
const
|
|
15500
|
-
if (!
|
|
15501
|
-
const
|
|
15517
|
+
video: (n) => {
|
|
15518
|
+
const { src: r, poster: i, preload: u, autoPlay: a, children: s, ...l } = n;
|
|
15519
|
+
delete l.autoplay;
|
|
15520
|
+
const c = bn(r, e);
|
|
15521
|
+
if (!c && !yE(s)) return null;
|
|
15522
|
+
const f = i ? bn(i, e) : void 0;
|
|
15502
15523
|
return /* @__PURE__ */ N(
|
|
15503
15524
|
"video",
|
|
15504
15525
|
{
|
|
15505
15526
|
controls: !0,
|
|
15506
|
-
preload:
|
|
15507
|
-
src:
|
|
15508
|
-
poster:
|
|
15509
|
-
...
|
|
15510
|
-
children:
|
|
15527
|
+
preload: u === "none" ? "none" : "metadata",
|
|
15528
|
+
src: c ?? void 0,
|
|
15529
|
+
poster: f ?? void 0,
|
|
15530
|
+
...l,
|
|
15531
|
+
children: s
|
|
15511
15532
|
}
|
|
15512
15533
|
);
|
|
15513
15534
|
},
|
|
15514
15535
|
// `<video><source src>` 多格式写法——source 的相对 src 同走 resolveMediaSrc(否则子 source 是裸相对、裂)
|
|
15515
|
-
source: ({ src:
|
|
15516
|
-
const
|
|
15517
|
-
return
|
|
15536
|
+
source: ({ src: n, ...r }) => {
|
|
15537
|
+
const i = bn(n, e);
|
|
15538
|
+
return i ? /* @__PURE__ */ N("source", { src: i, ...r }) : null;
|
|
15518
15539
|
}
|
|
15519
15540
|
};
|
|
15520
15541
|
}
|
|
15521
|
-
function
|
|
15522
|
-
const
|
|
15542
|
+
function DE({ markdown: e, className: t, assetBase: n, onRelativeLink: r }) {
|
|
15543
|
+
const i = Me(() => OE(n, r), [n, r]);
|
|
15523
15544
|
return /* @__PURE__ */ N("div", { className: t ? `ldk-mdv ${t}` : "ldk-mdv", children: /* @__PURE__ */ N(
|
|
15524
15545
|
V0,
|
|
15525
15546
|
{
|
|
15526
15547
|
remarkPlugins: [rm],
|
|
15527
|
-
rehypePlugins: [pE, [IE,
|
|
15528
|
-
components:
|
|
15548
|
+
rehypePlugins: [pE, [IE, LE]],
|
|
15549
|
+
components: i,
|
|
15529
15550
|
children: e ?? ""
|
|
15530
15551
|
}
|
|
15531
15552
|
) });
|
|
15532
15553
|
}
|
|
15533
|
-
const
|
|
15554
|
+
const _b = xo(DE);
|
|
15534
15555
|
function In({ children: e, onClick: t, disabled: n, title: r, type: i = "button", variant: u, size: a }) {
|
|
15535
15556
|
const s = ["ldk-button", u && `ldk-button--${u}`, a && `ldk-button--${a}`].filter(Boolean).join(" "), l = typeof e == "string" || typeof e == "number";
|
|
15536
15557
|
return /* @__PURE__ */ N(
|
|
@@ -15547,7 +15568,7 @@ function In({ children: e, onClick: t, disabled: n, title: r, type: i = "button"
|
|
|
15547
15568
|
);
|
|
15548
15569
|
}
|
|
15549
15570
|
var _t = {}, Su;
|
|
15550
|
-
function
|
|
15571
|
+
function RE() {
|
|
15551
15572
|
if (Su) return _t;
|
|
15552
15573
|
Su = 1;
|
|
15553
15574
|
var e = wo;
|
|
@@ -15573,9 +15594,9 @@ function DE() {
|
|
|
15573
15594
|
}
|
|
15574
15595
|
return _t;
|
|
15575
15596
|
}
|
|
15576
|
-
|
|
15597
|
+
RE();
|
|
15577
15598
|
const si = "data-overlay-layer";
|
|
15578
|
-
function
|
|
15599
|
+
function wE(e) {
|
|
15579
15600
|
let t = e;
|
|
15580
15601
|
for (; t && t !== document.body; ) {
|
|
15581
15602
|
const n = getComputedStyle(t).zIndex;
|
|
@@ -15591,15 +15612,15 @@ function Ps(e) {
|
|
|
15591
15612
|
if (!e || !e.isConnected) return !0;
|
|
15592
15613
|
const t = Array.from(document.querySelectorAll(`[${si}]`));
|
|
15593
15614
|
if (t.length <= 1) return !0;
|
|
15594
|
-
const n = t.map(
|
|
15615
|
+
const n = t.map(wE), r = Math.max(...n);
|
|
15595
15616
|
return t.indexOf(e) === n.lastIndexOf(r);
|
|
15596
15617
|
}
|
|
15597
|
-
function
|
|
15618
|
+
function PE(e) {
|
|
15598
15619
|
return Ps((e == null ? void 0 : e.closest(`[${si}]`)) ?? null);
|
|
15599
15620
|
}
|
|
15600
|
-
const
|
|
15621
|
+
const ME = "overlay-root", FE = "ld-scrim-plane";
|
|
15601
15622
|
function oi() {
|
|
15602
|
-
return document.getElementById(
|
|
15623
|
+
return document.getElementById(FE) ?? document.body;
|
|
15603
15624
|
}
|
|
15604
15625
|
const Lu = 'a[href],button:not([disabled]),input:not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
15605
15626
|
function cn({ children: e, onClose: t, closeOnOutsideClick: n = !0, triggerRef: r, trapFocus: i, zIndex: u, rootId: a, open: s = !0 }) {
|
|
@@ -15651,11 +15672,11 @@ function cn({ children: e, onClose: t, closeOnOutsideClick: n = !0, triggerRef:
|
|
|
15651
15672
|
// zIndex 例外见 prop 契约——需 z-index 时必须 > scrim 遮罩 500)。
|
|
15652
15673
|
/* @__PURE__ */ N("div", { ref: l, "data-overlay-wrapper": !0, ...c, style: Object.keys(f).length > 1 ? f : {}, children: e }),
|
|
15653
15674
|
// E5.8#107 单一门:默认 → #overlay-root(浮层权威 surface 根);显式 rootId 优先;根缺失回退 body
|
|
15654
|
-
(a ? document.getElementById(a) : document.getElementById(
|
|
15675
|
+
(a ? document.getElementById(a) : document.getElementById(ME)) ?? document.body
|
|
15655
15676
|
);
|
|
15656
15677
|
}
|
|
15657
|
-
const Ou = 232, Du = 224, Ru = 263,
|
|
15658
|
-
function mr(e, t, n, r, i =
|
|
15678
|
+
const Ou = 232, Du = 224, Ru = 263, BE = 8;
|
|
15679
|
+
function mr(e, t, n, r, i = BE) {
|
|
15659
15680
|
const u = Math.max(i, r.width - t - i), a = Math.max(i, r.height - n - i), s = Math.min(Math.max(
|
|
15660
15681
|
e.x + t + i <= r.width ? e.x : e.x - t - i,
|
|
15661
15682
|
i
|
|
@@ -15665,7 +15686,7 @@ function mr(e, t, n, r, i = FE) {
|
|
|
15665
15686
|
), a);
|
|
15666
15687
|
return { left: s, top: l };
|
|
15667
15688
|
}
|
|
15668
|
-
function
|
|
15689
|
+
function vE(e) {
|
|
15669
15690
|
const t = e.replace("#", "");
|
|
15670
15691
|
return [
|
|
15671
15692
|
parseInt(t.substring(0, 2), 16),
|
|
@@ -15673,15 +15694,15 @@ function BE(e) {
|
|
|
15673
15694
|
parseInt(t.substring(4, 6), 16)
|
|
15674
15695
|
];
|
|
15675
15696
|
}
|
|
15676
|
-
function
|
|
15697
|
+
function HE(e, t, n) {
|
|
15677
15698
|
return "#" + [e, t, n].map((r) => Math.max(0, Math.min(255, Math.round(r))).toString(16).padStart(2, "0")).join("");
|
|
15678
15699
|
}
|
|
15679
|
-
function
|
|
15700
|
+
function UE(e, t, n) {
|
|
15680
15701
|
const r = n * t, i = r * (1 - Math.abs(e / 60 % 2 - 1)), u = n - r;
|
|
15681
15702
|
let a = 0, s = 0, l = 0;
|
|
15682
15703
|
return e < 60 ? (a = r, s = i) : e < 120 ? (a = i, s = r) : e < 180 ? (s = r, l = i) : e < 240 ? (s = i, l = r) : e < 300 ? (a = i, l = r) : (a = r, l = i), [Math.round((a + u) * 255), Math.round((s + u) * 255), Math.round((l + u) * 255)];
|
|
15683
15704
|
}
|
|
15684
|
-
function
|
|
15705
|
+
function zE(e, t, n) {
|
|
15685
15706
|
const r = Math.max(e, t, n) / 255, i = Math.min(e, t, n) / 255, u = r - i;
|
|
15686
15707
|
let a = 0;
|
|
15687
15708
|
u > 0 && (r === e / 255 ? a = 60 * ((t / 255 - n / 255) / u % 6) : r === t / 255 ? a = 60 * ((n / 255 - e / 255) / u + 2) : a = 60 * ((e / 255 - t / 255) / u + 4)), a < 0 && (a += 360);
|
|
@@ -15689,18 +15710,18 @@ function UE(e, t, n) {
|
|
|
15689
15710
|
return { h: a, s, v: r };
|
|
15690
15711
|
}
|
|
15691
15712
|
function Tn(e) {
|
|
15692
|
-
const [t, n, r] =
|
|
15693
|
-
return
|
|
15713
|
+
const [t, n, r] = vE(e);
|
|
15714
|
+
return zE(t, n, r);
|
|
15694
15715
|
}
|
|
15695
15716
|
function pr(e, t, n) {
|
|
15696
|
-
const [r, i, u] =
|
|
15697
|
-
return
|
|
15717
|
+
const [r, i, u] = UE(e, t, n);
|
|
15718
|
+
return HE(r, i, u);
|
|
15698
15719
|
}
|
|
15699
|
-
function
|
|
15720
|
+
function YE(e) {
|
|
15700
15721
|
let t = e.replace(/[^0-9a-fA-F]/g, "").slice(0, 6);
|
|
15701
15722
|
return t.length > 0 && (t = "#" + t), t;
|
|
15702
15723
|
}
|
|
15703
|
-
function
|
|
15724
|
+
function Ab({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u }) {
|
|
15704
15725
|
const [a, s] = re(() => Tn(t)), [l, c] = re(t), f = se(null), d = se(null), m = se(null), h = se(null), p = se(a), [k, I] = re(null);
|
|
15705
15726
|
ae(() => {
|
|
15706
15727
|
if (e) {
|
|
@@ -15709,7 +15730,7 @@ function _b({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u
|
|
|
15709
15730
|
}
|
|
15710
15731
|
}, [t, e]);
|
|
15711
15732
|
const _ = ie((T) => {
|
|
15712
|
-
const L =
|
|
15733
|
+
const L = YE(T);
|
|
15713
15734
|
if (c(L), /^#[0-9a-fA-F]{6}$/.test(L)) {
|
|
15714
15735
|
const V = Tn(L);
|
|
15715
15736
|
return p.current = V, s(V), L;
|
|
@@ -15833,9 +15854,9 @@ function _b({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u
|
|
|
15833
15854
|
)
|
|
15834
15855
|
] });
|
|
15835
15856
|
}
|
|
15836
|
-
const
|
|
15857
|
+
const VE = { left: 0, top: 0, width: 100, maxWidth: 300 };
|
|
15837
15858
|
function Ms({ containerRef: e, onClose: t, onKeyDown: n, listRef: r, search: i, children: u }) {
|
|
15838
|
-
const [a, s] = re(
|
|
15859
|
+
const [a, s] = re(VE), l = ie(() => {
|
|
15839
15860
|
var d;
|
|
15840
15861
|
const c = (d = e.current) == null ? void 0 : d.getBoundingClientRect();
|
|
15841
15862
|
if (!c) return;
|
|
@@ -15873,7 +15894,7 @@ function Ms({ containerRef: e, onClose: t, onKeyDown: n, listRef: r, search: i,
|
|
|
15873
15894
|
}
|
|
15874
15895
|
) });
|
|
15875
15896
|
}
|
|
15876
|
-
function
|
|
15897
|
+
function kb({ value: e, options: t, onChange: n, disabled: r, placeholder: i, title: u, className: a, onOpen: s, inputMode: l = "text" }) {
|
|
15877
15898
|
const { t: c } = Ae(), [f, d] = re(!1), [m, h] = re(e), [p, k] = re(-1), I = se(null), _ = se(null), O = se(null), x = se(null), P = se(!1);
|
|
15878
15899
|
ae(() => {
|
|
15879
15900
|
P.current || h(e);
|
|
@@ -16087,7 +16108,7 @@ function li({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16087
16108
|
ae(() => {
|
|
16088
16109
|
if (!v) return;
|
|
16089
16110
|
const F = (Z) => {
|
|
16090
|
-
Z.key === "Escape" &&
|
|
16111
|
+
Z.key === "Escape" && PE(s.current) && (p.length > 0 ? k((Q) => Q.slice(0, Q.length - 1)) : r());
|
|
16091
16112
|
}, R = () => r(), W = () => r(), j = (Z) => {
|
|
16092
16113
|
var me;
|
|
16093
16114
|
const Q = Z.target;
|
|
@@ -16252,12 +16273,12 @@ function li({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16252
16273
|
))
|
|
16253
16274
|
] });
|
|
16254
16275
|
}
|
|
16255
|
-
function
|
|
16276
|
+
function qE(e) {
|
|
16256
16277
|
return typeof e == "object" && "value" in e && "label" in e;
|
|
16257
16278
|
}
|
|
16258
16279
|
function dn({ value: e, options: t, onChange: n, disabled: r, placeholder: i, title: u, className: a, onOpen: s }) {
|
|
16259
16280
|
const { t: l } = Ae(), [c, f] = re(!1), [d, m] = re(""), [h, p] = re(-1), k = se(null), I = se(null), _ = se(null), O = Me(
|
|
16260
|
-
() => t.map((z) =>
|
|
16281
|
+
() => t.map((z) => qE(z) ? z : { value: z, label: z }),
|
|
16261
16282
|
[t]
|
|
16262
16283
|
), x = Me(() => {
|
|
16263
16284
|
if (!d) return O;
|
|
@@ -16366,7 +16387,7 @@ function dn({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
16366
16387
|
);
|
|
16367
16388
|
}
|
|
16368
16389
|
const Pu = "followTheme", gr = [];
|
|
16369
|
-
function
|
|
16390
|
+
function Cb({ value: e, onChange: t, optionsFrom: n, domain: r, disabled: i, placeholder: u, title: a }) {
|
|
16370
16391
|
const { t: s, i18n: l } = Ae(), [c, f] = re(gr), d = n === "theme.colorways" && r === "colors", [m, h] = re(void 0);
|
|
16371
16392
|
ae(() => {
|
|
16372
16393
|
var x, P, w, y, v;
|
|
@@ -16449,7 +16470,7 @@ function kb({ value: e, onChange: t, optionsFrom: n, domain: r, disabled: i, pla
|
|
|
16449
16470
|
}
|
|
16450
16471
|
);
|
|
16451
16472
|
}
|
|
16452
|
-
function
|
|
16473
|
+
function Nb({ value: e, onChange: t, dialogType: n }) {
|
|
16453
16474
|
const { t: r } = Ae(), i = async () => {
|
|
16454
16475
|
var s;
|
|
16455
16476
|
const u = (s = window.linkdesk) == null ? void 0 : s.dialog;
|
|
@@ -16485,7 +16506,7 @@ function Cb({ value: e, onChange: t, dialogType: n }) {
|
|
|
16485
16506
|
)
|
|
16486
16507
|
] });
|
|
16487
16508
|
}
|
|
16488
|
-
const yn = "__none__",
|
|
16509
|
+
const yn = "__none__", Ib = "followTheme", WE = [
|
|
16489
16510
|
"themePicker",
|
|
16490
16511
|
"select",
|
|
16491
16512
|
"accentSource",
|
|
@@ -16500,13 +16521,13 @@ const yn = "__none__", Nb = "followTheme", qE = [
|
|
|
16500
16521
|
"segmented",
|
|
16501
16522
|
"stringList",
|
|
16502
16523
|
"fileAssociationsManager"
|
|
16503
|
-
],
|
|
16504
|
-
function yb(e) {
|
|
16505
|
-
return typeof e == "string" && $E.has(e);
|
|
16506
|
-
}
|
|
16524
|
+
], yb = ["readonly", "action", "color"], $E = ["fileAssociationsManager"], jE = new Set(WE), GE = new Set($E);
|
|
16507
16525
|
function xb(e) {
|
|
16508
16526
|
return typeof e == "string" && jE.has(e);
|
|
16509
16527
|
}
|
|
16528
|
+
function Sb(e) {
|
|
16529
|
+
return typeof e == "string" && GE.has(e);
|
|
16530
|
+
}
|
|
16510
16531
|
const Bs = [
|
|
16511
16532
|
"Cascadia Code",
|
|
16512
16533
|
"Cascadia Mono",
|
|
@@ -16527,7 +16548,7 @@ const Bs = [
|
|
|
16527
16548
|
"Noto Sans Mono",
|
|
16528
16549
|
"Source Code Pro",
|
|
16529
16550
|
"Ubuntu Mono"
|
|
16530
|
-
],
|
|
16551
|
+
], QE = [
|
|
16531
16552
|
...Bs,
|
|
16532
16553
|
"Arial",
|
|
16533
16554
|
"Arial Narrow",
|
|
@@ -16549,7 +16570,7 @@ const Bs = [
|
|
|
16549
16570
|
"Trebuchet MS",
|
|
16550
16571
|
"Verdana"
|
|
16551
16572
|
];
|
|
16552
|
-
function
|
|
16573
|
+
function KE(e) {
|
|
16553
16574
|
try {
|
|
16554
16575
|
const n = document.createElement("canvas").getContext("2d");
|
|
16555
16576
|
if (!n) return !1;
|
|
@@ -16560,7 +16581,7 @@ function QE(e) {
|
|
|
16560
16581
|
return !1;
|
|
16561
16582
|
}
|
|
16562
16583
|
}
|
|
16563
|
-
function
|
|
16584
|
+
function XE(e) {
|
|
16564
16585
|
const [t, n] = re([]);
|
|
16565
16586
|
return ae(() => {
|
|
16566
16587
|
let r = !1;
|
|
@@ -16573,8 +16594,8 @@ function KE(e) {
|
|
|
16573
16594
|
r || (u = (l ?? []).map((c) => c.family).filter((c, f, d) => d.indexOf(c) === f));
|
|
16574
16595
|
} catch {
|
|
16575
16596
|
}
|
|
16576
|
-
u.length === 0 && (u = e ? Bs :
|
|
16577
|
-
const a = e ? u.filter((l) =>
|
|
16597
|
+
u.length === 0 && (u = e ? Bs : QE);
|
|
16598
|
+
const a = e ? u.filter((l) => KE(l)) : u;
|
|
16578
16599
|
r || n(a.sort((l, c) => l.localeCompare(c)));
|
|
16579
16600
|
}
|
|
16580
16601
|
return i(), () => {
|
|
@@ -16582,8 +16603,8 @@ function KE(e) {
|
|
|
16582
16603
|
};
|
|
16583
16604
|
}, [e]), t;
|
|
16584
16605
|
}
|
|
16585
|
-
function
|
|
16586
|
-
const { t: r } = Ae(), i =
|
|
16606
|
+
function Lb({ value: e, onChange: t, monoOnly: n = !0 }) {
|
|
16607
|
+
const { t: r } = Ae(), i = XE(n), u = Me(() => n ? i.map((a) => ({ value: a, label: a })) : [
|
|
16587
16608
|
{ value: "", label: r("跟随主题") },
|
|
16588
16609
|
{ value: yn, label: r("系统字体") },
|
|
16589
16610
|
...i.map((a) => ({ value: a, label: a }))
|
|
@@ -16598,21 +16619,21 @@ function Sb({ value: e, onChange: t, monoOnly: n = !0 }) {
|
|
|
16598
16619
|
}
|
|
16599
16620
|
);
|
|
16600
16621
|
}
|
|
16601
|
-
function
|
|
16622
|
+
function Ob({ label: e, children: t }) {
|
|
16602
16623
|
return /* @__PURE__ */ $("div", { className: "ldk-form-row", children: [
|
|
16603
16624
|
/* @__PURE__ */ N("label", { children: e }),
|
|
16604
16625
|
t
|
|
16605
16626
|
] });
|
|
16606
16627
|
}
|
|
16607
16628
|
const Mr = 6, Qe = 8;
|
|
16608
|
-
function
|
|
16629
|
+
function JE(e, t, n, r) {
|
|
16609
16630
|
const i = Math.max(Qe, Math.min(e.left, n.width - t.width - Qe)), u = e.bottom + Mr, a = e.top - t.height - Mr, s = u + t.height <= n.height - Qe, l = a >= Qe;
|
|
16610
16631
|
let c = r;
|
|
16611
16632
|
r === "bottom" && !s && l ? c = "top" : r === "top" && !l && s ? c = "bottom" : r === "bottom" && !s && !l && (c = "top");
|
|
16612
16633
|
const f = c === "bottom" ? u : a, d = Math.max(Qe, n.height - t.height - Qe);
|
|
16613
16634
|
return { top: Math.min(Math.max(f, Qe), d), left: Math.max(Qe, i), placement: c };
|
|
16614
16635
|
}
|
|
16615
|
-
function
|
|
16636
|
+
function Db({ lines: e, title: t, note: n, placement: r = "bottom", openDelayMs: i = 400, children: u }) {
|
|
16616
16637
|
const a = se(null), s = se(null), l = se(void 0), [c, f] = re(!1), [d, m] = re({ top: 0, left: 0 }), h = Uu(), p = e.length > 0, k = ie(() => {
|
|
16617
16638
|
window.clearTimeout(l.current), f(!1);
|
|
16618
16639
|
}, []), I = ie(() => {
|
|
@@ -16629,7 +16650,7 @@ function Ob({ lines: e, title: t, note: n, placement: r = "bottom", openDelayMs:
|
|
|
16629
16650
|
if (!c) return;
|
|
16630
16651
|
const x = (y = a.current) == null ? void 0 : y.getBoundingClientRect(), P = (v = s.current) == null ? void 0 : v.getBoundingClientRect();
|
|
16631
16652
|
if (!x || !P) return;
|
|
16632
|
-
const w =
|
|
16653
|
+
const w = JE(x, P, { width: window.innerWidth, height: window.innerHeight }, r);
|
|
16633
16654
|
m({ top: w.top, left: w.left });
|
|
16634
16655
|
}, [c, r]), ae(() => () => window.clearTimeout(l.current), []), ae(() => {
|
|
16635
16656
|
if (!c) return;
|
|
@@ -16663,12 +16684,12 @@ function Ob({ lines: e, title: t, note: n, placement: r = "bottom", openDelayMs:
|
|
|
16663
16684
|
}
|
|
16664
16685
|
) : /* @__PURE__ */ N(xt, { children: u });
|
|
16665
16686
|
}
|
|
16666
|
-
function
|
|
16687
|
+
function ZE({ label: e, command: t, placement: n, openDelayMs: r, children: i }) {
|
|
16667
16688
|
if (!(e != null && e !== "" || t != null) || !So(i)) return i;
|
|
16668
16689
|
const a = {};
|
|
16669
16690
|
return e != null && e !== "" && (a[et] = e), t != null && (a[Po] = t), n != null && (a[Mo] = n), r != null && (a[vr] = String(r)), Lo(i, a);
|
|
16670
16691
|
}
|
|
16671
|
-
function
|
|
16692
|
+
function Rb({ value: e, onChange: t, min: n, max: r, step: i = 1, unit: u, style: a }) {
|
|
16672
16693
|
const { t: s } = Ae(), l = ie(
|
|
16673
16694
|
(h) => {
|
|
16674
16695
|
let p = h;
|
|
@@ -16720,7 +16741,7 @@ function Db({ value: e, onChange: t, min: n, max: r, step: i = 1, unit: u, style
|
|
|
16720
16741
|
)
|
|
16721
16742
|
] });
|
|
16722
16743
|
}
|
|
16723
|
-
const
|
|
16744
|
+
const eg = 3e3, Ct = /* @__PURE__ */ new Map();
|
|
16724
16745
|
let wn = !1;
|
|
16725
16746
|
function vs() {
|
|
16726
16747
|
return typeof document < "u" && document.visibilityState === "hidden";
|
|
@@ -16751,13 +16772,13 @@ function zs() {
|
|
|
16751
16772
|
for (const t of Ct.values())
|
|
16752
16773
|
e ? Us(t) : (ci(t), Hs(t));
|
|
16753
16774
|
}
|
|
16754
|
-
function
|
|
16775
|
+
function tg() {
|
|
16755
16776
|
wn || typeof document > "u" || (document.addEventListener("visibilitychange", zs), wn = !0);
|
|
16756
16777
|
}
|
|
16757
|
-
function
|
|
16778
|
+
function ng() {
|
|
16758
16779
|
!wn || typeof document > "u" || (document.removeEventListener("visibilitychange", zs), wn = !1);
|
|
16759
16780
|
}
|
|
16760
|
-
function
|
|
16781
|
+
function rg(e, t, n = eg) {
|
|
16761
16782
|
const [r, i] = re(null), u = se(t);
|
|
16762
16783
|
u.current = t;
|
|
16763
16784
|
const a = se(n);
|
|
@@ -16777,24 +16798,24 @@ function ng(e, t, n = ZE) {
|
|
|
16777
16798
|
runRef: u,
|
|
16778
16799
|
subscribers: /* @__PURE__ */ new Set(),
|
|
16779
16800
|
timer: null
|
|
16780
|
-
}, Ct.set(e, c),
|
|
16801
|
+
}, Ct.set(e, c), tg()), c.subscribers.add(l), ci(c), Hs(c), () => {
|
|
16781
16802
|
s = !1;
|
|
16782
16803
|
const f = Ct.get(e);
|
|
16783
|
-
f && (f.subscribers.delete(l), !(f.subscribers.size > 0) && (Us(f), Ct.delete(e), Ct.size === 0 &&
|
|
16804
|
+
f && (f.subscribers.delete(l), !(f.subscribers.size > 0) && (Us(f), Ct.delete(e), Ct.size === 0 && ng()));
|
|
16784
16805
|
};
|
|
16785
16806
|
}, [e]), r;
|
|
16786
16807
|
}
|
|
16787
|
-
function
|
|
16788
|
-
const u =
|
|
16808
|
+
function ig({ value: e, multiline: t, statusCommand: n, runCommand: r, intervalMs: i }) {
|
|
16809
|
+
const u = rg(n, r, i), a = n ? u : e;
|
|
16789
16810
|
if (!a) return null;
|
|
16790
16811
|
const s = t || !!n && a.includes(`
|
|
16791
16812
|
`);
|
|
16792
16813
|
return /* @__PURE__ */ N("span", { className: `ldk-readonly-text${s ? " multiline" : ""}`, children: a });
|
|
16793
16814
|
}
|
|
16794
|
-
function
|
|
16815
|
+
function wb({ children: e }) {
|
|
16795
16816
|
return e == null || e === "" ? null : /* @__PURE__ */ N("div", { className: "ldk-section-subtitle", children: e });
|
|
16796
16817
|
}
|
|
16797
|
-
function
|
|
16818
|
+
function Pb({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
16798
16819
|
const i = se([]), u = (a, s) => {
|
|
16799
16820
|
var f;
|
|
16800
16821
|
if (!["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"].includes(a.key)) return;
|
|
@@ -16827,12 +16848,12 @@ function wb({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
|
16827
16848
|
);
|
|
16828
16849
|
}) });
|
|
16829
16850
|
}
|
|
16830
|
-
function
|
|
16851
|
+
function ug(e, t) {
|
|
16831
16852
|
if (!Number.isFinite(e)) return "";
|
|
16832
16853
|
const n = t === "×" ? e.toFixed(1) : String(Number(e.toFixed(2)));
|
|
16833
16854
|
return t ? t === "×" ? `${t}${n}` : `${n}${t}` : n;
|
|
16834
16855
|
}
|
|
16835
|
-
function
|
|
16856
|
+
function Mb({
|
|
16836
16857
|
value: e,
|
|
16837
16858
|
onChange: t,
|
|
16838
16859
|
min: n = 0,
|
|
@@ -16877,10 +16898,10 @@ function Pb({
|
|
|
16877
16898
|
s && P(-1),
|
|
16878
16899
|
I,
|
|
16879
16900
|
s && P(1),
|
|
16880
|
-
u !== void 0 && /* @__PURE__ */ N("span", { className: "ldk-slider-value", children:
|
|
16901
|
+
u !== void 0 && /* @__PURE__ */ N("span", { className: "ldk-slider-value", children: ug(p, u) })
|
|
16881
16902
|
] });
|
|
16882
16903
|
}
|
|
16883
|
-
function
|
|
16904
|
+
function Fb({
|
|
16884
16905
|
value: e,
|
|
16885
16906
|
onChange: t,
|
|
16886
16907
|
locked: n = [],
|
|
@@ -16962,8 +16983,8 @@ function Mb({
|
|
|
16962
16983
|
!k && m && /* @__PURE__ */ N("div", { className: "ldk-sle-msg ldk-sle-msg--hint", children: m })
|
|
16963
16984
|
] });
|
|
16964
16985
|
}
|
|
16965
|
-
const
|
|
16966
|
-
function
|
|
16986
|
+
const ag = 6, sg = "color-mix(in srgb, var(--text-secondary) 45%, transparent)";
|
|
16987
|
+
function Bb({ value: e, onChange: t }) {
|
|
16967
16988
|
const { t: n, i18n: r } = Ae(), [i, u] = re([]), [a, s] = re(0), l = se([]), c = ie((m) => {
|
|
16968
16989
|
var p, k;
|
|
16969
16990
|
const h = (k = (p = window.linkdesk) == null ? void 0 : p.theme) == null ? void 0 : k.listRecipes;
|
|
@@ -17019,7 +17040,7 @@ function Fb({ value: e, onChange: t }) {
|
|
|
17019
17040
|
onKeyDown: d,
|
|
17020
17041
|
children: i.map((m, h) => {
|
|
17021
17042
|
var O, x;
|
|
17022
|
-
const p = m.colorways.length <= 1, k = (O = m.colorways[0]) == null ? void 0 : O.preview, I = (k == null ? void 0 : k.accent) ||
|
|
17043
|
+
const p = m.colorways.length <= 1, k = (O = m.colorways[0]) == null ? void 0 : O.preview, I = (k == null ? void 0 : k.accent) || sg, _ = m.id === e;
|
|
17023
17044
|
return /* @__PURE__ */ $(
|
|
17024
17045
|
"button",
|
|
17025
17046
|
{
|
|
@@ -17043,7 +17064,7 @@ function Fb({ value: e, onChange: t }) {
|
|
|
17043
17064
|
] })
|
|
17044
17065
|
) : (
|
|
17045
17066
|
// 多配色配方——配色圆点色板(mockup .ldk-theme-picker-preview-dot)
|
|
17046
|
-
/* @__PURE__ */ N("span", { className: "ldk-theme-picker-preview-dots", children: m.colorways.slice(0,
|
|
17067
|
+
/* @__PURE__ */ N("span", { className: "ldk-theme-picker-preview-dots", children: m.colorways.slice(0, ag).map((P) => {
|
|
17047
17068
|
var w;
|
|
17048
17069
|
return /* @__PURE__ */ N(
|
|
17049
17070
|
"span",
|
|
@@ -17067,7 +17088,7 @@ function Fb({ value: e, onChange: t }) {
|
|
|
17067
17088
|
}
|
|
17068
17089
|
);
|
|
17069
17090
|
}
|
|
17070
|
-
function
|
|
17091
|
+
function vb({ checked: e, onChange: t, disabled: n }) {
|
|
17071
17092
|
return /* @__PURE__ */ N(
|
|
17072
17093
|
"div",
|
|
17073
17094
|
{
|
|
@@ -17083,7 +17104,7 @@ function Bb({ checked: e, onChange: t, disabled: n }) {
|
|
|
17083
17104
|
function At() {
|
|
17084
17105
|
return window.linkdesk;
|
|
17085
17106
|
}
|
|
17086
|
-
const
|
|
17107
|
+
const og = Br(function({
|
|
17087
17108
|
size: t,
|
|
17088
17109
|
value: n,
|
|
17089
17110
|
onConfirm: r,
|
|
@@ -17160,7 +17181,7 @@ const sg = Br(function({
|
|
|
17160
17181
|
spellCheck: !1
|
|
17161
17182
|
}
|
|
17162
17183
|
);
|
|
17163
|
-
}),
|
|
17184
|
+
}), lg = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
|
17164
17185
|
<defs>
|
|
17165
17186
|
<linearGradient id="defBg" x1="0" y1="0" x2="1" y2="1">
|
|
17166
17187
|
<stop offset="0" stop-color="#3F4A5E"/>
|
|
@@ -17178,8 +17199,8 @@ const sg = Br(function({
|
|
|
17178
17199
|
<path d="M24 18.6 L24 27" fill="none" stroke="#F1F5F9" stroke-width="2.9" stroke-linecap="round"/>
|
|
17179
17200
|
<path d="M17 30 L23 30" fill="none" stroke="#F1F5F9" stroke-width="2.9" stroke-linecap="round"/>
|
|
17180
17201
|
<path d="M25 30 L31 30" fill="none" stroke="#F1F5F9" stroke-width="2.9" stroke-linecap="round"/>
|
|
17181
|
-
</svg>`,
|
|
17182
|
-
function
|
|
17202
|
+
</svg>`, cg = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(lg)}`;
|
|
17203
|
+
function dg(e, t) {
|
|
17183
17204
|
const n = t.icon, r = t.iconSource;
|
|
17184
17205
|
if (r === "lucide" && n)
|
|
17185
17206
|
return { lucide: n };
|
|
@@ -17196,10 +17217,10 @@ function cg(e, t) {
|
|
|
17196
17217
|
}
|
|
17197
17218
|
return { emoji: "📄" };
|
|
17198
17219
|
}
|
|
17199
|
-
function
|
|
17220
|
+
function Hb(...e) {
|
|
17200
17221
|
for (const t of e) if (t != null && t.marketIcon) return { icon: t.marketIcon, iconSource: t.marketIconSource };
|
|
17201
17222
|
for (const t of e) if (t != null && t.icon) return { icon: t.icon, iconSource: t.iconSource };
|
|
17202
|
-
return { icon:
|
|
17223
|
+
return { icon: cg, iconSource: "url" };
|
|
17203
17224
|
}
|
|
17204
17225
|
/**
|
|
17205
17226
|
* @license lucide-react v1.42.0 - ISC
|
|
@@ -17207,18 +17228,18 @@ function vb(...e) {
|
|
|
17207
17228
|
* This source code is licensed under the ISC license.
|
|
17208
17229
|
* See the LICENSE file in the root directory of this source tree.
|
|
17209
17230
|
*/
|
|
17210
|
-
const
|
|
17231
|
+
const fg = (e) => e == null ? void 0 : e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
17211
17232
|
/**
|
|
17212
17233
|
* @license lucide-react v1.42.0 - ISC
|
|
17213
17234
|
*
|
|
17214
17235
|
* This source code is licensed under the ISC license.
|
|
17215
17236
|
* See the LICENSE file in the root directory of this source tree.
|
|
17216
17237
|
*/
|
|
17217
|
-
function
|
|
17238
|
+
function hg(e, t, n = []) {
|
|
17218
17239
|
if (t == null)
|
|
17219
17240
|
throw new Error("[lucide]: iconNode is required when icon name is used");
|
|
17220
17241
|
return {
|
|
17221
|
-
name:
|
|
17242
|
+
name: fg(e),
|
|
17222
17243
|
size: 24,
|
|
17223
17244
|
node: t,
|
|
17224
17245
|
...n.length > 0 ? { aliases: n } : {}
|
|
@@ -17230,7 +17251,7 @@ function fg(e, t, n = []) {
|
|
|
17230
17251
|
* This source code is licensed under the ISC license.
|
|
17231
17252
|
* See the LICENSE file in the root directory of this source tree.
|
|
17232
17253
|
*/
|
|
17233
|
-
const
|
|
17254
|
+
const mg = (e) => {
|
|
17234
17255
|
let t = "", n = !1;
|
|
17235
17256
|
for (const r of e) {
|
|
17236
17257
|
if (r === "-" || r === "_" || r <= " ") {
|
|
@@ -17247,8 +17268,8 @@ const hg = (e) => {
|
|
|
17247
17268
|
* This source code is licensed under the ISC license.
|
|
17248
17269
|
* See the LICENSE file in the root directory of this source tree.
|
|
17249
17270
|
*/
|
|
17250
|
-
const
|
|
17251
|
-
const t =
|
|
17271
|
+
const pg = (e) => {
|
|
17272
|
+
const t = mg(e);
|
|
17252
17273
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
17253
17274
|
};
|
|
17254
17275
|
/**
|
|
@@ -17284,7 +17305,7 @@ const st = {
|
|
|
17284
17305
|
function br(e) {
|
|
17285
17306
|
return e != null;
|
|
17286
17307
|
}
|
|
17287
|
-
function
|
|
17308
|
+
function Eg(e, t = {}) {
|
|
17288
17309
|
var m, h;
|
|
17289
17310
|
const n = t.attributeNames ?? {}, r = (p) => n[p] ?? p, i = e.size ?? e.width ?? st.width, u = e.size ?? e.height ?? st.height, a = ((m = e.aliases) == null ? void 0 : m.filter((p) => typeof p == "string" && p.trim() !== "").map((p) => `lucide-${p}`)) ?? [], s = [...e.name ? [`lucide-${e.name}`] : [], ...a], l = ((h = t.className) == null ? void 0 : h.split(" ").filter(Boolean)) ?? [], c = t.includeDefaultClasses === !1 ? Fr(...l) : Fr("lucide", ...s, ...l), f = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? st["stroke-width"]) * Number(e.size ?? e.width ?? st.width) / Number(t.size ?? t.width ?? st.width) : t.strokeWidth ?? st["stroke-width"];
|
|
17290
17311
|
return [
|
|
@@ -17326,8 +17347,8 @@ function pg(e, t = {}) {
|
|
|
17326
17347
|
* This source code is licensed under the ISC license.
|
|
17327
17348
|
* See the LICENSE file in the root directory of this source tree.
|
|
17328
17349
|
*/
|
|
17329
|
-
function
|
|
17330
|
-
return
|
|
17350
|
+
function gg(e, t = {}) {
|
|
17351
|
+
return Eg(e, {
|
|
17331
17352
|
...t,
|
|
17332
17353
|
attributeNames: {
|
|
17333
17354
|
...t.attributeNames,
|
|
@@ -17345,12 +17366,12 @@ function Eg(e, t = {}) {
|
|
|
17345
17366
|
* This source code is licensed under the ISC license.
|
|
17346
17367
|
* See the LICENSE file in the root directory of this source tree.
|
|
17347
17368
|
*/
|
|
17348
|
-
const
|
|
17369
|
+
const bg = (e) => {
|
|
17349
17370
|
for (const t in e)
|
|
17350
17371
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
17351
17372
|
return !0;
|
|
17352
17373
|
return !1;
|
|
17353
|
-
},
|
|
17374
|
+
}, Tg = Ro({}), _g = () => Do(Tg), Ag = Br(
|
|
17354
17375
|
({
|
|
17355
17376
|
color: e,
|
|
17356
17377
|
size: t,
|
|
@@ -17376,7 +17397,7 @@ const gg = (e) => {
|
|
|
17376
17397
|
nonScalingStroke: I = !1,
|
|
17377
17398
|
color: _ = "currentColor",
|
|
17378
17399
|
className: O = ""
|
|
17379
|
-
} =
|
|
17400
|
+
} = _g() ?? {}, x = !!l || bg(d), [P, w, y = []] = gg(f, {
|
|
17380
17401
|
color: e ?? _,
|
|
17381
17402
|
width: n ?? t ?? h,
|
|
17382
17403
|
height: r ?? t ?? h,
|
|
@@ -17407,15 +17428,15 @@ const gg = (e) => {
|
|
|
17407
17428
|
* See the LICENSE file in the root directory of this source tree.
|
|
17408
17429
|
*/
|
|
17409
17430
|
function he(e, t = [], n = []) {
|
|
17410
|
-
const r = typeof e == "string" ?
|
|
17411
|
-
({ className: u, ...a }, s) => Tr(
|
|
17431
|
+
const r = typeof e == "string" ? hg(e, t, n) : e, i = Br(
|
|
17432
|
+
({ className: u, ...a }, s) => Tr(Ag, {
|
|
17412
17433
|
ref: s,
|
|
17413
17434
|
icon: r,
|
|
17414
17435
|
className: u,
|
|
17415
17436
|
...a
|
|
17416
17437
|
})
|
|
17417
17438
|
);
|
|
17418
|
-
return r.name && (i.displayName =
|
|
17439
|
+
return r.name && (i.displayName = pg(r.name)), i;
|
|
17419
17440
|
}
|
|
17420
17441
|
/**
|
|
17421
17442
|
* @license lucide-react v1.42.0 - ISC
|
|
@@ -17438,7 +17459,7 @@ const Ys = {
|
|
|
17438
17459
|
]
|
|
17439
17460
|
};
|
|
17440
17461
|
Ys.node;
|
|
17441
|
-
const
|
|
17462
|
+
const kg = he(Ys);
|
|
17442
17463
|
/**
|
|
17443
17464
|
* @license lucide-react v1.42.0 - ISC
|
|
17444
17465
|
*
|
|
@@ -17457,7 +17478,7 @@ const Vs = {
|
|
|
17457
17478
|
aliases: ["bar-chart-3"]
|
|
17458
17479
|
};
|
|
17459
17480
|
Vs.node;
|
|
17460
|
-
const
|
|
17481
|
+
const Cg = he(Vs);
|
|
17461
17482
|
/**
|
|
17462
17483
|
* @license lucide-react v1.42.0 - ISC
|
|
17463
17484
|
*
|
|
@@ -17474,7 +17495,7 @@ const qs = {
|
|
|
17474
17495
|
]
|
|
17475
17496
|
};
|
|
17476
17497
|
qs.node;
|
|
17477
|
-
const
|
|
17498
|
+
const Ng = he(qs);
|
|
17478
17499
|
/**
|
|
17479
17500
|
* @license lucide-react v1.42.0 - ISC
|
|
17480
17501
|
*
|
|
@@ -17493,7 +17514,7 @@ const Ws = {
|
|
|
17493
17514
|
aliases: ["smile"]
|
|
17494
17515
|
};
|
|
17495
17516
|
Ws.node;
|
|
17496
|
-
const
|
|
17517
|
+
const Ig = he(Ws);
|
|
17497
17518
|
/**
|
|
17498
17519
|
* @license lucide-react v1.42.0 - ISC
|
|
17499
17520
|
*
|
|
@@ -17515,7 +17536,7 @@ const $s = {
|
|
|
17515
17536
|
]
|
|
17516
17537
|
};
|
|
17517
17538
|
$s.node;
|
|
17518
|
-
const
|
|
17539
|
+
const yg = he($s);
|
|
17519
17540
|
/**
|
|
17520
17541
|
* @license lucide-react v1.42.0 - ISC
|
|
17521
17542
|
*
|
|
@@ -17536,7 +17557,7 @@ const js = {
|
|
|
17536
17557
|
]
|
|
17537
17558
|
};
|
|
17538
17559
|
js.node;
|
|
17539
|
-
const
|
|
17560
|
+
const xg = he(js);
|
|
17540
17561
|
/**
|
|
17541
17562
|
* @license lucide-react v1.42.0 - ISC
|
|
17542
17563
|
*
|
|
@@ -17566,7 +17587,7 @@ const Gs = {
|
|
|
17566
17587
|
]
|
|
17567
17588
|
};
|
|
17568
17589
|
Gs.node;
|
|
17569
|
-
const
|
|
17590
|
+
const Sg = he(Gs);
|
|
17570
17591
|
/**
|
|
17571
17592
|
* @license lucide-react v1.42.0 - ISC
|
|
17572
17593
|
*
|
|
@@ -17587,7 +17608,7 @@ const Qs = {
|
|
|
17587
17608
|
]
|
|
17588
17609
|
};
|
|
17589
17610
|
Qs.node;
|
|
17590
|
-
const
|
|
17611
|
+
const Lg = he(Qs);
|
|
17591
17612
|
/**
|
|
17592
17613
|
* @license lucide-react v1.42.0 - ISC
|
|
17593
17614
|
*
|
|
@@ -17604,7 +17625,7 @@ const Ks = {
|
|
|
17604
17625
|
]
|
|
17605
17626
|
};
|
|
17606
17627
|
Ks.node;
|
|
17607
|
-
const
|
|
17628
|
+
const Og = he(Ks);
|
|
17608
17629
|
/**
|
|
17609
17630
|
* @license lucide-react v1.42.0 - ISC
|
|
17610
17631
|
*
|
|
@@ -17627,7 +17648,7 @@ const Xs = {
|
|
|
17627
17648
|
]
|
|
17628
17649
|
};
|
|
17629
17650
|
Xs.node;
|
|
17630
|
-
const
|
|
17651
|
+
const Dg = he(Xs);
|
|
17631
17652
|
/**
|
|
17632
17653
|
* @license lucide-react v1.42.0 - ISC
|
|
17633
17654
|
*
|
|
@@ -17643,7 +17664,7 @@ const Js = {
|
|
|
17643
17664
|
]
|
|
17644
17665
|
};
|
|
17645
17666
|
Js.node;
|
|
17646
|
-
const
|
|
17667
|
+
const Rg = he(Js);
|
|
17647
17668
|
/**
|
|
17648
17669
|
* @license lucide-react v1.42.0 - ISC
|
|
17649
17670
|
*
|
|
@@ -17660,7 +17681,7 @@ const Zs = {
|
|
|
17660
17681
|
]
|
|
17661
17682
|
};
|
|
17662
17683
|
Zs.node;
|
|
17663
|
-
const
|
|
17684
|
+
const wg = he(Zs);
|
|
17664
17685
|
/**
|
|
17665
17686
|
* @license lucide-react v1.42.0 - ISC
|
|
17666
17687
|
*
|
|
@@ -17684,7 +17705,7 @@ const eo = {
|
|
|
17684
17705
|
]
|
|
17685
17706
|
};
|
|
17686
17707
|
eo.node;
|
|
17687
|
-
const
|
|
17708
|
+
const Pg = he(eo);
|
|
17688
17709
|
/**
|
|
17689
17710
|
* @license lucide-react v1.42.0 - ISC
|
|
17690
17711
|
*
|
|
@@ -17705,7 +17726,7 @@ const to = {
|
|
|
17705
17726
|
]
|
|
17706
17727
|
};
|
|
17707
17728
|
to.node;
|
|
17708
|
-
const
|
|
17729
|
+
const Mg = he(to);
|
|
17709
17730
|
/**
|
|
17710
17731
|
* @license lucide-react v1.42.0 - ISC
|
|
17711
17732
|
*
|
|
@@ -17726,7 +17747,7 @@ const no = {
|
|
|
17726
17747
|
]
|
|
17727
17748
|
};
|
|
17728
17749
|
no.node;
|
|
17729
|
-
const
|
|
17750
|
+
const Fg = he(no);
|
|
17730
17751
|
/**
|
|
17731
17752
|
* @license lucide-react v1.42.0 - ISC
|
|
17732
17753
|
*
|
|
@@ -17756,7 +17777,7 @@ const ro = {
|
|
|
17756
17777
|
]
|
|
17757
17778
|
};
|
|
17758
17779
|
ro.node;
|
|
17759
|
-
const
|
|
17780
|
+
const Bg = he(ro);
|
|
17760
17781
|
/**
|
|
17761
17782
|
* @license lucide-react v1.42.0 - ISC
|
|
17762
17783
|
*
|
|
@@ -17778,7 +17799,7 @@ const io = {
|
|
|
17778
17799
|
]
|
|
17779
17800
|
};
|
|
17780
17801
|
io.node;
|
|
17781
|
-
const
|
|
17802
|
+
const vg = he(io);
|
|
17782
17803
|
/**
|
|
17783
17804
|
* @license lucide-react v1.42.0 - ISC
|
|
17784
17805
|
*
|
|
@@ -17801,7 +17822,7 @@ const uo = {
|
|
|
17801
17822
|
]
|
|
17802
17823
|
};
|
|
17803
17824
|
uo.node;
|
|
17804
|
-
const
|
|
17825
|
+
const Hg = he(uo);
|
|
17805
17826
|
/**
|
|
17806
17827
|
* @license lucide-react v1.42.0 - ISC
|
|
17807
17828
|
*
|
|
@@ -17826,7 +17847,7 @@ const ao = {
|
|
|
17826
17847
|
aliases: ["stars"]
|
|
17827
17848
|
};
|
|
17828
17849
|
ao.node;
|
|
17829
|
-
const
|
|
17850
|
+
const Ug = he(ao);
|
|
17830
17851
|
/**
|
|
17831
17852
|
* @license lucide-react v1.42.0 - ISC
|
|
17832
17853
|
*
|
|
@@ -17847,7 +17868,7 @@ const so = {
|
|
|
17847
17868
|
]
|
|
17848
17869
|
};
|
|
17849
17870
|
so.node;
|
|
17850
|
-
const
|
|
17871
|
+
const zg = he(so);
|
|
17851
17872
|
/**
|
|
17852
17873
|
* @license lucide-react v1.42.0 - ISC
|
|
17853
17874
|
*
|
|
@@ -17868,40 +17889,40 @@ const oo = {
|
|
|
17868
17889
|
]
|
|
17869
17890
|
};
|
|
17870
17891
|
oo.node;
|
|
17871
|
-
const
|
|
17872
|
-
File:
|
|
17873
|
-
Folder:
|
|
17874
|
-
FolderOpen:
|
|
17875
|
-
FolderTree:
|
|
17876
|
-
Package:
|
|
17877
|
-
ShoppingBag:
|
|
17878
|
-
Monitor:
|
|
17879
|
-
Settings:
|
|
17880
|
-
BookOpen:
|
|
17881
|
-
BarChart3:
|
|
17882
|
-
Lightbulb:
|
|
17883
|
-
Lock:
|
|
17884
|
-
Download:
|
|
17885
|
-
Globe:
|
|
17886
|
-
Plug:
|
|
17887
|
-
Puzzle:
|
|
17888
|
-
Rocket:
|
|
17889
|
-
Smile:
|
|
17890
|
-
Sparkles:
|
|
17891
|
-
Star:
|
|
17892
|
-
Zap:
|
|
17892
|
+
const Yg = he(oo), Vg = {
|
|
17893
|
+
File: yg,
|
|
17894
|
+
Folder: Lg,
|
|
17895
|
+
FolderOpen: xg,
|
|
17896
|
+
FolderTree: Sg,
|
|
17897
|
+
Package: Pg,
|
|
17898
|
+
ShoppingBag: Hg,
|
|
17899
|
+
Monitor: wg,
|
|
17900
|
+
Settings: vg,
|
|
17901
|
+
BookOpen: kg,
|
|
17902
|
+
BarChart3: Cg,
|
|
17903
|
+
Lightbulb: Dg,
|
|
17904
|
+
Lock: Rg,
|
|
17905
|
+
Download: Ng,
|
|
17906
|
+
Globe: Og,
|
|
17907
|
+
Plug: Mg,
|
|
17908
|
+
Puzzle: Fg,
|
|
17909
|
+
Rocket: Bg,
|
|
17910
|
+
Smile: Ig,
|
|
17911
|
+
Sparkles: Ug,
|
|
17912
|
+
Star: zg,
|
|
17913
|
+
Zap: Yg
|
|
17893
17914
|
}, Mu = "📄";
|
|
17894
17915
|
function lo({ pluginId: e, manifest: t, className: n, alt: r = "" }) {
|
|
17895
|
-
const i = t ?
|
|
17916
|
+
const i = t ? dg(e, t) : { emoji: Mu };
|
|
17896
17917
|
if (i.lucide) {
|
|
17897
|
-
const u =
|
|
17918
|
+
const u = Vg[i.lucide];
|
|
17898
17919
|
if (u)
|
|
17899
17920
|
return /* @__PURE__ */ N(u, { className: `plugin-icon plugin-icon--lucide ${n ?? ""}` });
|
|
17900
17921
|
}
|
|
17901
17922
|
return i.codicon ? /* @__PURE__ */ N("span", { className: `codicon ${i.codicon} plugin-icon plugin-icon--codicon ${n ?? ""}` }) : i.src ? /* @__PURE__ */ N("img", { src: i.src, alt: r, className: `plugin-icon plugin-icon--img ${n ?? ""}`, draggable: !1 }) : /* @__PURE__ */ N("span", { className: `plugin-icon plugin-icon--emoji ${n ?? ""}`, children: i.emoji ?? Mu });
|
|
17902
17923
|
}
|
|
17903
|
-
const
|
|
17904
|
-
function
|
|
17924
|
+
const qg = "pluginCardGear";
|
|
17925
|
+
function Wg({
|
|
17905
17926
|
pluginId: e,
|
|
17906
17927
|
manifest: t,
|
|
17907
17928
|
title: n,
|
|
@@ -17980,7 +18001,7 @@ function qg({
|
|
|
17980
18001
|
P && p && /* @__PURE__ */ N(
|
|
17981
18002
|
li,
|
|
17982
18003
|
{
|
|
17983
|
-
menuId:
|
|
18004
|
+
menuId: qg,
|
|
17984
18005
|
anchor: p,
|
|
17985
18006
|
context: { pluginId: e },
|
|
17986
18007
|
items: s,
|
|
@@ -17993,7 +18014,7 @@ function qg({
|
|
|
17993
18014
|
);
|
|
17994
18015
|
}
|
|
17995
18016
|
const Fu = 4e3;
|
|
17996
|
-
function
|
|
18017
|
+
function Ub({
|
|
17997
18018
|
request: e,
|
|
17998
18019
|
handlers: t,
|
|
17999
18020
|
onOpenOnce: n,
|
|
@@ -18092,7 +18113,7 @@ function Hb({
|
|
|
18092
18113
|
)
|
|
18093
18114
|
] });
|
|
18094
18115
|
}
|
|
18095
|
-
function
|
|
18116
|
+
function zb({ onPreview: e, onPin: t, disabled: n, delay: r = 250 }) {
|
|
18096
18117
|
const i = se(null);
|
|
18097
18118
|
ae(() => () => {
|
|
18098
18119
|
i.current && clearTimeout(i.current);
|
|
@@ -18106,7 +18127,7 @@ function Ub({ onPreview: e, onPin: t, disabled: n, delay: r = 250 }) {
|
|
|
18106
18127
|
}, [n, t]);
|
|
18107
18128
|
return { handleMouseDown: u, handleClick: a };
|
|
18108
18129
|
}
|
|
18109
|
-
function
|
|
18130
|
+
function Yb(e) {
|
|
18110
18131
|
const t = se(e);
|
|
18111
18132
|
return t.current = e, ie((n) => {
|
|
18112
18133
|
var i, u, a, s, l, c;
|
|
@@ -18115,7 +18136,7 @@ function zb(e) {
|
|
|
18115
18136
|
return r !== "c" && r !== "x" && r !== "v" ? !1 : (n.preventDefault(), r === "c" ? (u = (i = t.current).onCopy) == null || u.call(i) : r === "x" ? (s = (a = t.current).onCut) == null || s.call(a) : (c = (l = t.current).onPaste) == null || c.call(l), !0);
|
|
18116
18137
|
}, []);
|
|
18117
18138
|
}
|
|
18118
|
-
function
|
|
18139
|
+
function $g(e, t = 150) {
|
|
18119
18140
|
const [n, r] = re(""), i = se(null), u = ie(
|
|
18120
18141
|
(s) => {
|
|
18121
18142
|
r(s), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
@@ -18130,7 +18151,7 @@ function Wg(e, t = 150) {
|
|
|
18130
18151
|
i.current && clearTimeout(i.current);
|
|
18131
18152
|
}, []), { value: n, onChange: u, onClear: a };
|
|
18132
18153
|
}
|
|
18133
|
-
const
|
|
18154
|
+
const jg = {
|
|
18134
18155
|
"package.json": "codicon-package",
|
|
18135
18156
|
"tsconfig.json": "codicon-settings-gear",
|
|
18136
18157
|
".gitignore": "codicon-git-ignore",
|
|
@@ -18138,7 +18159,7 @@ const $g = {
|
|
|
18138
18159
|
LICENSE: "codicon-law",
|
|
18139
18160
|
".env": "codicon-symbol-key",
|
|
18140
18161
|
"docker-compose.yml": "codicon-server-environment"
|
|
18141
|
-
},
|
|
18162
|
+
}, Gg = {
|
|
18142
18163
|
".tsx": "codicon-react",
|
|
18143
18164
|
".ts": "codicon-symbol-namespace",
|
|
18144
18165
|
".json": "codicon-json",
|
|
@@ -18167,13 +18188,13 @@ const $g = {
|
|
|
18167
18188
|
components: "codicon-folder-library",
|
|
18168
18189
|
hooks: "codicon-folder-library",
|
|
18169
18190
|
utils: "codicon-folder-library"
|
|
18170
|
-
},
|
|
18191
|
+
}, Qg = "codicon-file", Kg = "codicon-folder", Xg = "codicon-folder-opened", vu = "codicon-root-folder", Jg = (e) => ({ kind: "class", className: e });
|
|
18171
18192
|
function An(e) {
|
|
18172
18193
|
const t = {};
|
|
18173
18194
|
for (const [n, r] of Object.entries(e)) t[n] = { class: r };
|
|
18174
18195
|
return t;
|
|
18175
18196
|
}
|
|
18176
|
-
class
|
|
18197
|
+
class Vb {
|
|
18177
18198
|
constructor(t) {
|
|
18178
18199
|
ve(this, "_fileMap");
|
|
18179
18200
|
ve(this, "_extMap");
|
|
@@ -18185,28 +18206,28 @@ class Yb {
|
|
|
18185
18206
|
ve(this, "_defaultFolderOpen");
|
|
18186
18207
|
ve(this, "_defaultRoot");
|
|
18187
18208
|
ve(this, "_defaultRootOpen");
|
|
18188
|
-
this._fileMap = { ...An(
|
|
18209
|
+
this._fileMap = { ...An(jg), ...t == null ? void 0 : t.files }, this._extMap = { ...An(Gg), ...t == null ? void 0 : t.extensions }, this._folderMap = { ...An(Bu), ...t == null ? void 0 : t.folders }, this._folderOpenMap = { ...An(Bu), ...t == null ? void 0 : t.foldersExpanded }, this._defaultFile = t == null ? void 0 : t.file, this._defaultFolder = t == null ? void 0 : t.folder, this._defaultFolderOpen = t == null ? void 0 : t.folderExpanded, this._defaultRoot = t == null ? void 0 : t.rootFolder, this._defaultRootOpen = t == null ? void 0 : t.rootFolderExpanded;
|
|
18189
18210
|
}
|
|
18190
18211
|
/** 解析映射条目 → 渲染描述符(glyph → class / image → 壳解析好的 linkdesk:// url) */
|
|
18191
18212
|
resolve(t, n) {
|
|
18192
|
-
return t ? "imagePath" in t ? { kind: "image", url: t.imagePath } : { kind: "class", className: t.class, color: t.color } :
|
|
18213
|
+
return t ? "imagePath" in t ? { kind: "image", url: t.imagePath } : { kind: "class", className: t.class, color: t.color } : Jg(n);
|
|
18193
18214
|
}
|
|
18194
18215
|
/** 文件图标——按文件名解析(E6#69g:tab 传路径基名即可) */
|
|
18195
18216
|
getFileIcon(t) {
|
|
18196
18217
|
return this.resolve(
|
|
18197
18218
|
this._fileMap[t] ?? this._extMap[this._getExt(t)] ?? this._defaultFile,
|
|
18198
|
-
|
|
18219
|
+
Qg
|
|
18199
18220
|
);
|
|
18200
18221
|
}
|
|
18201
18222
|
/** 文件夹图标 */
|
|
18202
18223
|
getFolderIcon(t, n) {
|
|
18203
|
-
return n ? this.resolve(this._defaultRoot, vu) : this.resolve(this._folderMap[t] ?? this._defaultFolder,
|
|
18224
|
+
return n ? this.resolve(this._defaultRoot, vu) : this.resolve(this._folderMap[t] ?? this._defaultFolder, Kg);
|
|
18204
18225
|
}
|
|
18205
18226
|
/** 获取展开状态的文件夹图标 */
|
|
18206
18227
|
getFolderIconOpened(t, n) {
|
|
18207
18228
|
return n ? this.resolve(this._defaultRootOpen ?? this._defaultRoot, vu) : this.resolve(
|
|
18208
18229
|
this._folderOpenMap[t] ?? this._folderMap[t] ?? this._defaultFolderOpen ?? this._defaultFolder,
|
|
18209
|
-
|
|
18230
|
+
Xg
|
|
18210
18231
|
);
|
|
18211
18232
|
}
|
|
18212
18233
|
_getExt(t) {
|
|
@@ -18214,7 +18235,7 @@ class Yb {
|
|
|
18214
18235
|
return n > 0 ? t.slice(n) : "";
|
|
18215
18236
|
}
|
|
18216
18237
|
}
|
|
18217
|
-
function
|
|
18238
|
+
function qb(e, t) {
|
|
18218
18239
|
const n = t - e;
|
|
18219
18240
|
return !Number.isInteger(e) || !Number.isInteger(t) || n <= 2 ? 0.01 : 1;
|
|
18220
18241
|
}
|
|
@@ -18222,11 +18243,11 @@ function Hu(e) {
|
|
|
18222
18243
|
const t = /^https?:\/\/(?:github\.com|raw\.githubusercontent\.com)\/([^/]+)\/([^/?#]+)/i.exec(e.trim());
|
|
18223
18244
|
return t ? `${t[1].toLowerCase()}/${t[2].toLowerCase()}` : null;
|
|
18224
18245
|
}
|
|
18225
|
-
const
|
|
18226
|
-
function
|
|
18227
|
-
return
|
|
18246
|
+
const Zg = /^(#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})\b|rgba?\(|hsla?\()/i;
|
|
18247
|
+
function Wb(e) {
|
|
18248
|
+
return Zg.test(e) ? { label: e, color: e } : { label: e.split(",")[0].trim().replace(/^["']|["']$/g, "") };
|
|
18228
18249
|
}
|
|
18229
|
-
function
|
|
18250
|
+
function $b(e, t) {
|
|
18230
18251
|
const n = Array.isArray(e.default) ? e.default.filter((a) => typeof a == "string") : [], r = Array.isArray(t) ? t : Array.isArray(e.default) ? e.default : [], i = /* @__PURE__ */ new Set();
|
|
18231
18252
|
for (const a of n) {
|
|
18232
18253
|
const s = Hu(a);
|
|
@@ -18239,7 +18260,7 @@ function Wb(e, t) {
|
|
|
18239
18260
|
});
|
|
18240
18261
|
return { locked: n, editable: u };
|
|
18241
18262
|
}
|
|
18242
|
-
function
|
|
18263
|
+
function jb({ value: e, onChange: t, onPick: n, onImport: r }) {
|
|
18243
18264
|
const { t: i } = Ae(), [u, a] = re(!1), s = async () => {
|
|
18244
18265
|
a(!0);
|
|
18245
18266
|
try {
|
|
@@ -18260,31 +18281,31 @@ function $b({ value: e, onChange: t, onPick: n, onImport: r }) {
|
|
|
18260
18281
|
/* @__PURE__ */ N("span", { className: "ldk-image-picker__path", "data-hint": l, "data-hint-delay": "0", children: l })
|
|
18261
18282
|
] });
|
|
18262
18283
|
}
|
|
18263
|
-
function
|
|
18284
|
+
function Gb({ label: e, value: t, color: n }) {
|
|
18264
18285
|
return t ? /* @__PURE__ */ $("span", { className: "ldk-effective-badge", children: [
|
|
18265
18286
|
e ? /* @__PURE__ */ N("span", { className: "ldk-effective-badge-label", children: e }) : null,
|
|
18266
18287
|
n ? /* @__PURE__ */ N("span", { className: "ldk-effective-swatch", style: { background: n }, "aria-hidden": "true" }) : null,
|
|
18267
|
-
/* @__PURE__ */ N("span", { className: "ldk-effective-badge-value", children: /* @__PURE__ */ N(
|
|
18288
|
+
/* @__PURE__ */ N("span", { className: "ldk-effective-badge-value", children: /* @__PURE__ */ N(ig, { value: t }) })
|
|
18268
18289
|
] }) : null;
|
|
18269
18290
|
}
|
|
18270
|
-
const
|
|
18291
|
+
const eb = {
|
|
18271
18292
|
user: "codicon-edit",
|
|
18272
18293
|
mix: "codicon-arrow-swap"
|
|
18273
18294
|
};
|
|
18274
|
-
function
|
|
18295
|
+
function Qb({ source: e, label: t }) {
|
|
18275
18296
|
const n = { [et]: t };
|
|
18276
18297
|
return /* @__PURE__ */ $("span", { className: `ldk-source-badge ldk-source-badge--${e}`, ...n, children: [
|
|
18277
|
-
/* @__PURE__ */ N("span", { className: `codicon ${
|
|
18298
|
+
/* @__PURE__ */ N("span", { className: `codicon ${eb[e]}`, "aria-hidden": "true" }),
|
|
18278
18299
|
t
|
|
18279
18300
|
] });
|
|
18280
18301
|
}
|
|
18281
|
-
function
|
|
18302
|
+
function Kb({ halves: e }) {
|
|
18282
18303
|
return /* @__PURE__ */ N("span", { className: "ldk-segment-preview", "aria-hidden": "true", children: e.map((t, n) => /* @__PURE__ */ N("span", { className: `ldk-segment-preview__half ldk-segment-preview__half--${t}`, children: "Aa" }, n)) });
|
|
18283
18304
|
}
|
|
18284
|
-
function
|
|
18305
|
+
function Xb({ variant: e }) {
|
|
18285
18306
|
return /* @__PURE__ */ N("span", { className: `ldk-segment-preview ldk-segment-preview--${e}`, "aria-hidden": "true" });
|
|
18286
18307
|
}
|
|
18287
|
-
function
|
|
18308
|
+
function Jb({
|
|
18288
18309
|
value: e,
|
|
18289
18310
|
onChange: t,
|
|
18290
18311
|
onSwatchClick: n
|
|
@@ -18311,7 +18332,7 @@ function Xb({
|
|
|
18311
18332
|
)
|
|
18312
18333
|
] });
|
|
18313
18334
|
}
|
|
18314
|
-
function
|
|
18335
|
+
function Zb({
|
|
18315
18336
|
value: e,
|
|
18316
18337
|
onChange: t,
|
|
18317
18338
|
addLabel: n,
|
|
@@ -18398,8 +18419,8 @@ function Jb({
|
|
|
18398
18419
|
] })
|
|
18399
18420
|
] });
|
|
18400
18421
|
}
|
|
18401
|
-
const
|
|
18402
|
-
function
|
|
18422
|
+
const tb = "famgrCardRowGear";
|
|
18423
|
+
function nb({ row: e, onPick: t, gearItems: n = [], nameOnlyHit: r = !1 }) {
|
|
18403
18424
|
const { t: i } = Ae(), [u, a] = re(null), s = [{ value: "", label: i("自动") }, ...e.options.map((d) => ({ ...d, label: i(d.label) }))], l = (() => {
|
|
18404
18425
|
switch (e.state) {
|
|
18405
18426
|
case "lock":
|
|
@@ -18433,7 +18454,7 @@ function tb({ row: e, onPick: t, gearItems: n = [], nameOnlyHit: r = !1 }) {
|
|
|
18433
18454
|
a({ x: m.left, y: m.bottom + 4 });
|
|
18434
18455
|
};
|
|
18435
18456
|
return /* @__PURE__ */ $("div", { className: "ldk-famgr-row", children: [
|
|
18436
|
-
e.rawDeclaration ? /* @__PURE__ */ N(
|
|
18457
|
+
e.rawDeclaration ? /* @__PURE__ */ N(ZE, { label: i("声明串 {{raw}} → 归一存储键 .{{ext}}", { raw: e.rawDeclaration, ext: e.ext }), children: c }) : c,
|
|
18437
18458
|
/* @__PURE__ */ N(
|
|
18438
18459
|
"span",
|
|
18439
18460
|
{
|
|
@@ -18474,7 +18495,7 @@ function tb({ row: e, onPick: t, gearItems: n = [], nameOnlyHit: r = !1 }) {
|
|
|
18474
18495
|
u && n.length > 0 && /* @__PURE__ */ N(
|
|
18475
18496
|
li,
|
|
18476
18497
|
{
|
|
18477
|
-
menuId:
|
|
18498
|
+
menuId: tb,
|
|
18478
18499
|
anchor: u,
|
|
18479
18500
|
items: [...n],
|
|
18480
18501
|
onClose: () => a(null),
|
|
@@ -18498,7 +18519,7 @@ function fo(e, t) {
|
|
|
18498
18519
|
const r = e == null ? void 0 : e[n];
|
|
18499
18520
|
return typeof r == "string" && r ? r : void 0;
|
|
18500
18521
|
}
|
|
18501
|
-
function
|
|
18522
|
+
function eT(e) {
|
|
18502
18523
|
if (!Array.isArray(e)) return [];
|
|
18503
18524
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
18504
18525
|
for (const r of e) {
|
|
@@ -18507,7 +18528,7 @@ function Zb(e) {
|
|
|
18507
18528
|
}
|
|
18508
18529
|
return t;
|
|
18509
18530
|
}
|
|
18510
|
-
function
|
|
18531
|
+
function tT(e) {
|
|
18511
18532
|
const t = e == null ? void 0 : e.fileAssociations;
|
|
18512
18533
|
if (!Array.isArray(t)) return [];
|
|
18513
18534
|
const n = [], r = /* @__PURE__ */ new Set();
|
|
@@ -18521,7 +18542,7 @@ function eT(e) {
|
|
|
18521
18542
|
return n;
|
|
18522
18543
|
}
|
|
18523
18544
|
const ho = 3;
|
|
18524
|
-
function
|
|
18545
|
+
function rb(e) {
|
|
18525
18546
|
return e.slice(0, ho).map((t) => `.${t}`).join(" / ");
|
|
18526
18547
|
}
|
|
18527
18548
|
function Pn(e, t) {
|
|
@@ -18529,7 +18550,7 @@ function Pn(e, t) {
|
|
|
18529
18550
|
const n = t.handlersByExt[e] ?? [], r = fo(t.overrideTable, e), i = !!r && n.some((l) => l.pluginId === r), u = ((a = n.find((l) => l.isCurrent)) == null ? void 0 : a.pluginId) ?? r ?? ((s = n[0]) == null ? void 0 : s.pluginId) ?? "";
|
|
18530
18551
|
return { handlers: n, override: r, overrideInRegistry: i, currentId: u };
|
|
18531
18552
|
}
|
|
18532
|
-
function
|
|
18553
|
+
function ib(e, t, n) {
|
|
18533
18554
|
var c;
|
|
18534
18555
|
const { handlers: r, override: i, overrideInRegistry: u, currentId: a } = Pn(t.ext, n), s = !!i && !u;
|
|
18535
18556
|
let l;
|
|
@@ -18546,11 +18567,11 @@ function rb(e, t, n) {
|
|
|
18546
18567
|
options: r.map((f) => ({ value: f.pluginId, label: f.title }))
|
|
18547
18568
|
};
|
|
18548
18569
|
}
|
|
18549
|
-
function
|
|
18570
|
+
function ub(e, t, n) {
|
|
18550
18571
|
const r = (u) => !n || u.toLowerCase().includes(n), i = [];
|
|
18551
18572
|
for (const u of e) {
|
|
18552
18573
|
if (u.exts.length === 0) continue;
|
|
18553
|
-
const a = u.exts.map((s) =>
|
|
18574
|
+
const a = u.exts.map((s) => ib(u.pluginId, s, t));
|
|
18554
18575
|
n && !r(u.name) && !r(u.pluginId) && !u.exts.some((s) => r(`.${s.ext}`)) || i.push({
|
|
18555
18576
|
pluginId: u.pluginId,
|
|
18556
18577
|
name: u.name,
|
|
@@ -18569,7 +18590,7 @@ function ib(e, t, n) {
|
|
|
18569
18590
|
}
|
|
18570
18591
|
return i;
|
|
18571
18592
|
}
|
|
18572
|
-
function
|
|
18593
|
+
function ab(e, t, n) {
|
|
18573
18594
|
var s;
|
|
18574
18595
|
const r = /* @__PURE__ */ new Set();
|
|
18575
18596
|
for (const l of e) for (const c of l.exts) r.add(c.ext);
|
|
@@ -18606,8 +18627,8 @@ function ub(e, t, n) {
|
|
|
18606
18627
|
}
|
|
18607
18628
|
return { rows: a, extCount: i.length };
|
|
18608
18629
|
}
|
|
18609
|
-
function
|
|
18610
|
-
const t = (e.search ?? "").trim().toLowerCase(), n =
|
|
18630
|
+
function nT(e) {
|
|
18631
|
+
const t = (e.search ?? "").trim().toLowerCase(), n = ub(e.plugins, e, t), { rows: r, extCount: i } = ab(e.plugins, e, t);
|
|
18611
18632
|
return {
|
|
18612
18633
|
contested: r,
|
|
18613
18634
|
cards: n,
|
|
@@ -18623,11 +18644,11 @@ function po(e, t, n) {
|
|
|
18623
18644
|
const r = mo(n);
|
|
18624
18645
|
return r ? e.includes(r) ? "ext" : String(t ?? "").toLowerCase().includes(r) ? "name" : "" : "";
|
|
18625
18646
|
}
|
|
18626
|
-
function
|
|
18647
|
+
function sb(e, t) {
|
|
18627
18648
|
const n = e.slice();
|
|
18628
18649
|
return t === "declared" ? n : n.sort((r, i) => r.ext.localeCompare(i.ext));
|
|
18629
18650
|
}
|
|
18630
|
-
function
|
|
18651
|
+
function ob(e, t) {
|
|
18631
18652
|
const n = mo(t);
|
|
18632
18653
|
if (!n) return e.slice();
|
|
18633
18654
|
const r = [], i = [];
|
|
@@ -18637,9 +18658,9 @@ function sb(e, t) {
|
|
|
18637
18658
|
}
|
|
18638
18659
|
return [...r, ...i];
|
|
18639
18660
|
}
|
|
18640
|
-
const
|
|
18641
|
-
function
|
|
18642
|
-
const { t: r } = Ae(), [i, u] = re(null), a = [{ value: "", label: r("自动") }, ...e.handlers.map((m) => ({ ...m, label: r(m.label) }))], s =
|
|
18661
|
+
const lb = "famgrContestedRowGear";
|
|
18662
|
+
function cb({ row: e, onPick: t, gearItems: n = [] }) {
|
|
18663
|
+
const { t: r } = Ae(), [i, u] = re(null), a = [{ value: "", label: r("自动") }, ...e.handlers.map((m) => ({ ...m, label: r(m.label) }))], s = rb(e.exts), l = e.exts.length > ho ? r(" 等 {{count}} 类", { count: e.exts.length }) : "", c = e.source === "user" ? r("(用户指定)") : e.source === "partial" ? r("(含用户指定)") : r("(自动)"), f = e.exts.length < e.groupExtsCount ? r(" · 整组 {{total}} 类中 {{count}} 类单独设置", { total: e.groupExtsCount, count: e.exts.length }) : ` ${r("· 下拉=整格生效")}`, d = (m) => {
|
|
18643
18664
|
const h = m.currentTarget.getBoundingClientRect();
|
|
18644
18665
|
u({ x: h.left, y: h.bottom + 4 });
|
|
18645
18666
|
};
|
|
@@ -18677,7 +18698,7 @@ function lb({ row: e, onPick: t, gearItems: n = [] }) {
|
|
|
18677
18698
|
i && n.length > 0 && /* @__PURE__ */ N(
|
|
18678
18699
|
li,
|
|
18679
18700
|
{
|
|
18680
|
-
menuId:
|
|
18701
|
+
menuId: lb,
|
|
18681
18702
|
anchor: i,
|
|
18682
18703
|
items: [...n],
|
|
18683
18704
|
onClose: () => u(null),
|
|
@@ -18686,8 +18707,8 @@ function lb({ row: e, onPick: t, gearItems: n = [] }) {
|
|
|
18686
18707
|
)
|
|
18687
18708
|
] });
|
|
18688
18709
|
}
|
|
18689
|
-
const
|
|
18690
|
-
function
|
|
18710
|
+
const db = 8, fb = 150;
|
|
18711
|
+
function rT({
|
|
18691
18712
|
model: e,
|
|
18692
18713
|
search: t = "",
|
|
18693
18714
|
loading: n = !1,
|
|
@@ -18722,7 +18743,7 @@ function nT({
|
|
|
18722
18743
|
/* @__PURE__ */ $("div", { className: "ldk-famgr-subsection", children: [
|
|
18723
18744
|
/* @__PURE__ */ N("h3", { className: "ldk-famgr-subsection-title", children: c("多候选类型") }),
|
|
18724
18745
|
e.contested.length === 0 ? /* @__PURE__ */ N("div", { className: "ldk-famgr-empty", children: c("(当前没有多候选的类型)") }) : e.contested.map((w) => /* @__PURE__ */ N(
|
|
18725
|
-
|
|
18746
|
+
cb,
|
|
18726
18747
|
{
|
|
18727
18748
|
row: w,
|
|
18728
18749
|
onPick: u,
|
|
@@ -18734,7 +18755,7 @@ function nT({
|
|
|
18734
18755
|
/* @__PURE__ */ $("div", { className: "ldk-famgr-subsection", children: [
|
|
18735
18756
|
/* @__PURE__ */ N("h3", { className: "ldk-famgr-subsection-title", children: c("按插件浏览") }),
|
|
18736
18757
|
e.cards.length === 0 ? /* @__PURE__ */ N("div", { className: "ldk-famgr-empty", children: c("(没有声明了文件类型的插件)") }) : e.cards.map((w) => /* @__PURE__ */ N(
|
|
18737
|
-
|
|
18758
|
+
hb,
|
|
18738
18759
|
{
|
|
18739
18760
|
card: w,
|
|
18740
18761
|
expanded: !!d[w.pluginId],
|
|
@@ -18752,7 +18773,7 @@ function nT({
|
|
|
18752
18773
|
] })
|
|
18753
18774
|
] });
|
|
18754
18775
|
}
|
|
18755
|
-
function
|
|
18776
|
+
function hb({
|
|
18756
18777
|
card: e,
|
|
18757
18778
|
expanded: t,
|
|
18758
18779
|
onToggle: n,
|
|
@@ -18764,9 +18785,9 @@ function fb({
|
|
|
18764
18785
|
gearItems: l,
|
|
18765
18786
|
rowGearItems: c
|
|
18766
18787
|
}) {
|
|
18767
|
-
const { t: f } = Ae(), d = sb(
|
|
18788
|
+
const { t: f } = Ae(), d = ob(sb(e.rows, u), i), m = i.trim();
|
|
18768
18789
|
return /* @__PURE__ */ N(
|
|
18769
|
-
|
|
18790
|
+
Wg,
|
|
18770
18791
|
{
|
|
18771
18792
|
pluginId: e.pluginId,
|
|
18772
18793
|
...e.manifest ? { manifest: e.manifest } : {},
|
|
@@ -18792,9 +18813,9 @@ function fb({
|
|
|
18792
18813
|
expanded: t,
|
|
18793
18814
|
onToggle: (h) => n(e.pluginId, h),
|
|
18794
18815
|
...l ? { gearItems: [...l] } : {},
|
|
18795
|
-
...t && e.rows.length >=
|
|
18816
|
+
...t && e.rows.length >= db ? {
|
|
18796
18817
|
toolbar: /* @__PURE__ */ N(
|
|
18797
|
-
|
|
18818
|
+
mb,
|
|
18798
18819
|
{
|
|
18799
18820
|
pluginId: e.pluginId,
|
|
18800
18821
|
total: e.rows.length,
|
|
@@ -18810,7 +18831,7 @@ function fb({
|
|
|
18810
18831
|
// 过滤 0 命中:一行 muted 文案(⛔ 不带清空入口——清空靠删字或 Esc)
|
|
18811
18832
|
/* @__PURE__ */ N("div", { className: "ldk-famgr-empty", children: f("没有匹配的类型") })
|
|
18812
18833
|
) : d.map((h) => /* @__PURE__ */ N(
|
|
18813
|
-
|
|
18834
|
+
nb,
|
|
18814
18835
|
{
|
|
18815
18836
|
row: h,
|
|
18816
18837
|
onPick: r,
|
|
@@ -18822,7 +18843,7 @@ function fb({
|
|
|
18822
18843
|
}
|
|
18823
18844
|
);
|
|
18824
18845
|
}
|
|
18825
|
-
function
|
|
18846
|
+
function mb({
|
|
18826
18847
|
pluginId: e,
|
|
18827
18848
|
total: t,
|
|
18828
18849
|
hitCount: n,
|
|
@@ -18831,7 +18852,7 @@ function hb({
|
|
|
18831
18852
|
onCardFilter: u,
|
|
18832
18853
|
onCardSort: a
|
|
18833
18854
|
}) {
|
|
18834
|
-
const { t: s } = Ae(), l = ie((h) => u(e, h), [u, e]), { value: c, onChange: f, onClear: d } =
|
|
18855
|
+
const { t: s } = Ae(), l = ie((h) => u(e, h), [u, e]), { value: c, onChange: f, onClear: d } = $g(l, fb), m = Me(
|
|
18835
18856
|
() => [
|
|
18836
18857
|
{ value: "alpha", label: s("按字母序") },
|
|
18837
18858
|
{ value: "declared", label: s("按默认排序") }
|
|
@@ -18842,7 +18863,7 @@ function hb({
|
|
|
18842
18863
|
/* @__PURE__ */ $("span", { className: "ldk-famgr-filter", children: [
|
|
18843
18864
|
/* @__PURE__ */ N("span", { className: "codicon codicon-search ldk-famgr-filter-icon", "aria-hidden": "true" }),
|
|
18844
18865
|
/* @__PURE__ */ N(
|
|
18845
|
-
|
|
18866
|
+
og,
|
|
18846
18867
|
{
|
|
18847
18868
|
size: "normal",
|
|
18848
18869
|
value: c,
|
|
@@ -18869,69 +18890,69 @@ function hb({
|
|
|
18869
18890
|
] });
|
|
18870
18891
|
}
|
|
18871
18892
|
export {
|
|
18872
|
-
|
|
18893
|
+
jb as BackgroundImagePicker,
|
|
18873
18894
|
Hr as Badge,
|
|
18874
18895
|
In as Button,
|
|
18875
18896
|
yn as CONFIG_NONE_SENTINEL,
|
|
18876
|
-
|
|
18877
|
-
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18897
|
+
nb as CardRow,
|
|
18898
|
+
Jb as ColorField,
|
|
18899
|
+
Ab as ColorPicker,
|
|
18900
|
+
kb as Combobox,
|
|
18901
|
+
cb as ContestedRow,
|
|
18881
18902
|
li as ContextMenu,
|
|
18882
|
-
|
|
18883
|
-
|
|
18903
|
+
cg as DEFAULT_PLUGIN_IDENTITY_URI,
|
|
18904
|
+
Cb as DynamicSelect,
|
|
18884
18905
|
ho as EXT_LABEL_MAX,
|
|
18885
|
-
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
|
|
18890
|
-
|
|
18891
|
-
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
|
|
18906
|
+
Gb as EffectiveBadge,
|
|
18907
|
+
Vb as FileIconResolver,
|
|
18908
|
+
Nb as FilePathInput,
|
|
18909
|
+
Lb as FontFamilySelect,
|
|
18910
|
+
Ob as FormRow,
|
|
18911
|
+
Db as HintCard,
|
|
18912
|
+
ZE as HintTip,
|
|
18913
|
+
og as InlineInput,
|
|
18914
|
+
Ib as MIX_FOLLOW_THEME_SENTINEL,
|
|
18915
|
+
rT as ManagerView,
|
|
18916
|
+
_b as MarkdownView,
|
|
18917
|
+
Rb as NumberInput,
|
|
18918
|
+
Zb as ObjectEditor,
|
|
18919
|
+
Ub as OpenWithPicker,
|
|
18899
18920
|
cn as OverlayPortal,
|
|
18900
|
-
|
|
18921
|
+
Wg as PluginCard,
|
|
18901
18922
|
lo as PluginIcon,
|
|
18902
|
-
|
|
18903
|
-
|
|
18904
|
-
|
|
18905
|
-
|
|
18906
|
-
|
|
18907
|
-
|
|
18908
|
-
|
|
18909
|
-
|
|
18923
|
+
ig as ReadOnlyText,
|
|
18924
|
+
$E as SETTINGS_HIDDEN_HINTS,
|
|
18925
|
+
yb as SETTINGS_RENDER_HINTS,
|
|
18926
|
+
WE as SETTINGS_UI_HINTS,
|
|
18927
|
+
wb as SectionSubtitle,
|
|
18928
|
+
Xb as SegmentPreviewSwatch,
|
|
18929
|
+
Kb as SegmentPreviewText,
|
|
18930
|
+
Pb as SegmentedRadio,
|
|
18910
18931
|
dn as SelectBox,
|
|
18911
|
-
|
|
18912
|
-
|
|
18913
|
-
|
|
18914
|
-
|
|
18915
|
-
|
|
18916
|
-
|
|
18917
|
-
|
|
18918
|
-
|
|
18919
|
-
|
|
18920
|
-
|
|
18932
|
+
Mb as Slider,
|
|
18933
|
+
Qb as SourceBadge,
|
|
18934
|
+
Fb as StringListEditor,
|
|
18935
|
+
Bb as ThemePicker,
|
|
18936
|
+
vb as Toggle,
|
|
18937
|
+
nT as buildManagerModel,
|
|
18938
|
+
rb as extLabelHead,
|
|
18939
|
+
tT as extractDeclaredExtensions,
|
|
18940
|
+
ob as filterRows,
|
|
18941
|
+
Wb as formatEffectiveValue,
|
|
18921
18942
|
po as hitKindOf,
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18943
|
+
qb as inferSliderStep,
|
|
18944
|
+
Sb as isSettingsHiddenHint,
|
|
18945
|
+
xb as isSettingsUiHint,
|
|
18925
18946
|
di as normalizeExt,
|
|
18926
|
-
|
|
18927
|
-
|
|
18947
|
+
eT as normalizeExtList,
|
|
18948
|
+
sb as orderRows,
|
|
18928
18949
|
co as overrideKeyOf,
|
|
18929
|
-
|
|
18950
|
+
Hb as pickIdentityArt,
|
|
18930
18951
|
fo as readOverride,
|
|
18931
|
-
|
|
18952
|
+
$b as splitStringList,
|
|
18932
18953
|
Hu as urlSourceKey,
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18954
|
+
zb as useClickPreview,
|
|
18955
|
+
Yb as useClipboardKeys,
|
|
18956
|
+
$g as useDebouncedInput,
|
|
18957
|
+
rg as useStatusPolling
|
|
18937
18958
|
};
|