dsh-life-pack 0.3.44 → 0.3.46

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/client.js CHANGED
@@ -99,12 +99,18 @@ window.__ModuleLoader__.load({
99
99
  */
100
100
  const PANEL_LINKS = [{
101
101
  key: "star",
102
- glyph: "⭐",
102
+ icon: {
103
+ path: "M12 2.6l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6-5.9-3.2-5.9 3.2 1.3-6.6L2.5 9.5l6.6-.8z",
104
+ filled: true
105
+ },
103
106
  tip: "你的🌟是我夜空中最亮的星。",
104
107
  url: "https://github.com/FeatherHunter/ilife"
105
108
  }, {
106
109
  key: "feedback",
107
- glyph: "💬",
110
+ icon: {
111
+ path: "M5 4h14a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-7.5L7 18v-4H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",
112
+ filled: false
113
+ },
108
114
  tip: "反馈问题",
109
115
  url: "https://github.com/FeatherHunter/ilife/issues/new"
110
116
  }];
@@ -153,14 +159,14 @@ window.__ModuleLoader__.load({
153
159
  path: "/api/ilife-manager"
154
160
  };
155
161
  //#endregion
156
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/config.js
162
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/config.js
157
163
  function assertPrefix(value, role) {
158
164
  if (typeof value !== "string" || value.length === 0) throw new Error("[dsh-plugin-update] " + role + " 非法:须为非空字符串(收到 " + JSON.stringify(value) + ")");
159
165
  if (value.includes(".") || value.includes("/") || value.includes("\\") || /\s/.test(value)) throw new Error("[dsh-plugin-update] " + role + " 非法:不得含有点、路径分隔符或空白(收到 " + JSON.stringify(value) + ")");
160
166
  return value;
161
167
  }
162
168
  //#endregion
163
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/redaction.js
169
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/redaction.js
164
170
  const COPY_BUDGET_CHARS = 1500;
165
171
  const REDACTED_PATH = "<路径>";
166
172
  const REDACTED_SECRET = "<脱敏>";
@@ -224,7 +230,7 @@ window.__ModuleLoader__.load({
224
230
  return truncateForCopy(scrubWithoutBudget(flat));
225
231
  }
226
232
  //#endregion
227
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/service.js
233
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/service.js
228
234
  function updateError(code) {
229
235
  return Object.assign(new Error(code), { code });
230
236
  }
@@ -311,7 +317,7 @@ window.__ModuleLoader__.load({
311
317
  return 0;
312
318
  }
313
319
  //#endregion
314
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/lang.js
320
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/lang.js
315
321
  function normalizeLangTag(tag) {
316
322
  if (typeof tag !== "string") return "zh";
317
323
  const s = tag.trim().toLowerCase().replace(/_/g, "-");
@@ -432,7 +438,7 @@ window.__ModuleLoader__.load({
432
438
  };
433
439
  }
434
440
  //#endregion
435
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/bilingual.js
441
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/bilingual.js
436
442
  const BILINGUAL_STRINGS = {
437
443
  "entry.label.idle": {
438
444
  en: "Check for updates",
@@ -2024,7 +2030,7 @@ window.__ModuleLoader__.load({
2024
2030
  }
2025
2031
  const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
2026
2032
  //#endregion
2027
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/changelog.js
2033
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/changelog.js
2028
2034
  const CHANGELOG_MAX_CHARS = 65536;
2029
2035
  const CHANGELOG_ALL_CATEGORIES = [
2030
2036
  "Added",
@@ -2501,15 +2507,113 @@ ${blocks.join("\n")}
2501
2507
  }
2502
2508
  }
2503
2509
  //#endregion
2504
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/log-events.js
2510
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/log-events.js
2505
2511
  const LOG_EVENT_CALL = "host.call";
2506
2512
  const LOG_EVENT_CALL_FAIL = "host.call.fail";
2507
2513
  const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
2508
2514
  //#endregion
2509
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/panel.js
2515
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/panel.js
2510
2516
  function normalizePanelTheme(value) {
2511
2517
  return value === "archive" ? "archive" : "default";
2512
2518
  }
2519
+ const THEME_TOKEN_VARS = {
2520
+ text: "--dsh-update-text",
2521
+ textMuted: "--dsh-update-text-muted",
2522
+ bg: "--dsh-update-bg",
2523
+ bgSoft: "--dsh-update-bg-soft",
2524
+ border: "--dsh-update-border",
2525
+ borderStrong: "--dsh-update-border-strong",
2526
+ buttonBg: "--dsh-update-button-bg",
2527
+ primary: "--dsh-update-primary",
2528
+ primaryDeep: "--dsh-update-primary-deep",
2529
+ focus: "--dsh-update-focus",
2530
+ okBg: "--dsh-update-ok-bg",
2531
+ okBorder: "--dsh-update-ok-border",
2532
+ okText: "--dsh-update-ok-text",
2533
+ warnBg: "--dsh-update-warn-bg",
2534
+ warnBorder: "--dsh-update-warn-border",
2535
+ warnText: "--dsh-update-warn-text",
2536
+ badBg: "--dsh-update-bad-bg",
2537
+ badBorder: "--dsh-update-bad-border",
2538
+ badText: "--dsh-update-bad-text",
2539
+ busyBg: "--dsh-update-busy-bg",
2540
+ busyBorder: "--dsh-update-busy-border",
2541
+ busyText: "--dsh-update-busy-text",
2542
+ fontSans: "--dsh-update-font-sans",
2543
+ fontSerif: "--dsh-update-font-serif",
2544
+ fontMono: "--dsh-update-font-mono",
2545
+ shadow: "--dsh-update-shadow",
2546
+ radiusPanel: "--dsh-update-radius-panel",
2547
+ radiusButton: "--dsh-update-radius-button",
2548
+ radiusBadge: "--dsh-update-radius-badge",
2549
+ entryFontSize: "--dsh-update-entry-font-size",
2550
+ entryPadding: "--dsh-update-entry-padding",
2551
+ entryBorderRadius: "--dsh-update-entry-border-radius",
2552
+ entryScale: "--dsh-update-entry-scale"
2553
+ };
2554
+ const THEME_TOKEN_COLOR_KEYS = /* @__PURE__ */ new Set([
2555
+ "text",
2556
+ "textMuted",
2557
+ "bg",
2558
+ "bgSoft",
2559
+ "border",
2560
+ "borderStrong",
2561
+ "buttonBg",
2562
+ "primary",
2563
+ "primaryDeep",
2564
+ "focus",
2565
+ "okBg",
2566
+ "okBorder",
2567
+ "okText",
2568
+ "warnBg",
2569
+ "warnBorder",
2570
+ "warnText",
2571
+ "badBg",
2572
+ "badBorder",
2573
+ "badText",
2574
+ "busyBg",
2575
+ "busyBorder",
2576
+ "busyText"
2577
+ ]);
2578
+ function themeTokensError(raw) {
2579
+ return /* @__PURE__ */ new Error(`[dsh-plugin-update] \u4E3B\u9898\u53C2\u6570 themeTokens \u975E\u6CD5\uFF1A\u53EA\u6536\u5DF2\u77E5 token \u952E\uFF08\u989C\u8272\u7528 hex \u6216\u82F1\u6587\u540D\uFF0C\u5B57\u4F53/\u5706\u89D2/\u9634\u5F71/\u5C3A\u5BF8\u4E3A\u5B89\u5168 CSS \u503C\uFF0CentryScale \u4E3A\u5927\u4E8E 0 \u7684\u6709\u9650\u6570\uFF09\uFF08\u6536\u5230 ${JSON.stringify(raw ?? null)})`);
2580
+ }
2581
+ function isSafeThemeCssValue(value) {
2582
+ const v = value.trim();
2583
+ if (!v || v.length > 200) return false;
2584
+ if (/[;"'<>\`{}!&]/.test(v)) return false;
2585
+ if (/url\s*\(/i.test(v)) return false;
2586
+ if (/expression\s*\(/i.test(v)) return false;
2587
+ if (/javascript\s*:/i.test(v)) return false;
2588
+ return true;
2589
+ }
2590
+ function isThemeColorValue(value) {
2591
+ const v = value.trim();
2592
+ if (!v || v.length > 100) return false;
2593
+ return /^(?:#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|[a-zA-Z]+)$/.test(v);
2594
+ }
2595
+ function themeTokensStyleFor(tokens) {
2596
+ if (tokens === void 0 || tokens === null) return "";
2597
+ if (typeof tokens !== "object" || Array.isArray(tokens)) throw themeTokensError(tokens);
2598
+ for (const key of Object.keys(tokens)) if (!Object.prototype.hasOwnProperty.call(THEME_TOKEN_VARS, key)) throw themeTokensError(tokens);
2599
+ const parts = [];
2600
+ for (const key of Object.keys(THEME_TOKEN_VARS)) {
2601
+ const value = tokens[key];
2602
+ if (value === void 0) continue;
2603
+ if (key === "entryScale") {
2604
+ if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) throw themeTokensError(tokens);
2605
+ parts.push(THEME_TOKEN_VARS[key] + ":" + String(value));
2606
+ continue;
2607
+ }
2608
+ if (typeof value !== "string") throw themeTokensError(tokens);
2609
+ const text = value.trim();
2610
+ if (THEME_TOKEN_COLOR_KEYS.has(key)) {
2611
+ if (!isThemeColorValue(text)) throw themeTokensError(tokens);
2612
+ } else if (!isSafeThemeCssValue(text)) throw themeTokensError(tokens);
2613
+ parts.push(THEME_TOKEN_VARS[key] + ":" + text);
2614
+ }
2615
+ return parts.join(";");
2616
+ }
2513
2617
  const BLOCKED_KEYS = {
2514
2618
  "unknown-profile": {
2515
2619
  title: "panel.blocked.unknown-profile.title",
@@ -3381,10 +3485,12 @@ ${changelogHTML}
3381
3485
  const kernel = renderUpdatePanelKernel(input, view, l);
3382
3486
  const archive = normalizePanelTheme(input.theme) === "archive";
3383
3487
  const attr = archive ? " data-theme=\"archive\"" : "";
3488
+ const tokensStyle = themeTokensStyleFor(input.themeTokens ?? void 0);
3489
+ const tokensAttr = tokensStyle ? ` style="${tokensStyle}"` : "";
3384
3490
  const sealAttr = ` data-seal="${escapeHtml$2(view.seal.text)}" data-seal-tone="${view.seal.tone}"`;
3385
- const body = input.mode === "dialog" ? `<div class="dsh-upd-overlay" data-mode="dialog"><div class="dsh-upd" data-mode="dialog" data-plugin="${escapeHtml$2(input.pluginId)}"${sealAttr}${attr}>
3491
+ const body = input.mode === "dialog" ? `<div class="dsh-upd-overlay" data-mode="dialog"><div class="dsh-upd" data-mode="dialog" data-plugin="${escapeHtml$2(input.pluginId)}"${sealAttr}${attr}${tokensAttr}>
3386
3492
  ${kernel}
3387
- </div></div>` : `<div class="dsh-upd" data-mode="embedded" data-plugin="${escapeHtml$2(input.pluginId)}"${sealAttr}${attr}>
3493
+ </div></div>` : `<div class="dsh-upd" data-mode="embedded" data-plugin="${escapeHtml$2(input.pluginId)}"${sealAttr}${attr}${tokensAttr}>
3388
3494
  ${kernel}
3389
3495
  </div>`;
3390
3496
  return `<style>${archive ? `${UPDATE_PANEL_CSS}
@@ -3392,7 +3498,7 @@ ${UPDATE_PANEL_ARCHIVE_CSS}` : UPDATE_PANEL_CSS}</style>
3392
3498
  ${body}`;
3393
3499
  }
3394
3500
  //#endregion
3395
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/entry.js
3501
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/entry.js
3396
3502
  const UPDATE_ENTRY_CSS = [
3397
3503
  ".dsh-upd-entry{display:inline-flex;align-items:center;gap:8px;font:13px/1.6 var(--dsh-update-font-sans,system-ui,\"Microsoft YaHei\",sans-serif);font-size:var(--dsh-update-entry-font-size,13px);color:var(--dsh-update-text,#1f2937)}",
3398
3504
  ".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-update-border,#d1d5db);border-radius:var(--dsh-update-entry-border-radius,6px);",
@@ -3504,7 +3610,7 @@ ${body}`;
3504
3610
  }
3505
3611
  }
3506
3612
  //#endregion
3507
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/panel-batch.js
3613
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/panel-batch.js
3508
3614
  const BATCH_PANEL_POLL = {
3509
3615
  defaultMs: 1500,
3510
3616
  minMs: 250
@@ -3670,6 +3776,7 @@ ${body}`;
3670
3776
  busy: installing,
3671
3777
  inFlight: input.inFlight === true,
3672
3778
  theme,
3779
+ themeTokens: input.themeTokens ?? void 0,
3673
3780
  titles,
3674
3781
  skipped: null,
3675
3782
  notice: null,
@@ -3741,8 +3848,10 @@ ${body}`;
3741
3848
  const kernel = parts.join(String.fromCharCode(10));
3742
3849
  const archive = normalizePanelTheme(theme) === "archive";
3743
3850
  const attr = archive ? " data-theme=\"archive\"" : "";
3851
+ const tokensStyle = themeTokensStyleFor(input.themeTokens ?? void 0);
3852
+ const tokensAttr = tokensStyle ? " style=\"" + tokensStyle + "\"" : "";
3744
3853
  const seal = batchSealOf(counts, lang);
3745
- const root = "<div class=\"dsh-upd dsh-upd-batch\" data-mode=\"" + mode + "\" data-seal=\"" + escapeHtml$1(seal.text) + "\" data-seal-tone=\"" + seal.tone + "\"" + attr + ">\n" + kernel + "\n</div>";
3854
+ const root = "<div class=\"dsh-upd dsh-upd-batch\" data-mode=\"" + mode + "\" data-seal=\"" + escapeHtml$1(seal.text) + "\" data-seal-tone=\"" + seal.tone + "\"" + attr + tokensAttr + ">\n" + kernel + "\n</div>";
3746
3855
  const body = mode === "dialog" ? "<div class=\"dsh-upd-overlay\" data-mode=\"dialog\">" + root + "</div>" : root;
3747
3856
  return "<style>" + (archive ? [
3748
3857
  UPDATE_PANEL_CSS,
@@ -3858,6 +3967,7 @@ ${body}`;
3858
3967
  pluginId: pluginIdOf(row),
3859
3968
  copyNotice: null,
3860
3969
  theme: ctx.theme,
3970
+ themeTokens: ctx.themeTokens,
3861
3971
  profileName: typeof row.profileName === "string" && row.profileName ? row.profileName : null,
3862
3972
  actions: "none"
3863
3973
  }, ctx.lang));
@@ -4167,6 +4277,8 @@ ${body}`;
4167
4277
  if (mode !== "embedded" && mode !== "dialog") throw new Error("[dsh-plugin-update] 摆放形态非法:只收 embedded 或 dialog(收到 " + JSON.stringify(options.mode) + ")");
4168
4278
  if (options.theme !== void 0 && options.theme !== "default" && options.theme !== "archive") throw new Error("[dsh-plugin-update] 主题非法:只收 default 或 archive(收到 " + JSON.stringify(options.theme) + ")");
4169
4279
  let theme = normalizePanelTheme(options.theme ?? "default");
4280
+ themeTokensStyleFor(options.themeTokens ?? void 0);
4281
+ let themeTokens = options.themeTokens;
4170
4282
  const call = options.call;
4171
4283
  const titles = options.titles && typeof options.titles === "object" ? options.titles : {};
4172
4284
  const onRestartRequested = options.onRestartRequested;
@@ -4344,6 +4456,7 @@ ${body}`;
4344
4456
  const nextHTML = renderBatchPanelHTML({
4345
4457
  rows,
4346
4458
  theme,
4459
+ themeTokens,
4347
4460
  mode,
4348
4461
  expandedKey,
4349
4462
  lastError,
@@ -4645,6 +4758,11 @@ ${body}`;
4645
4758
  theme = normalizePanelTheme(next);
4646
4759
  render();
4647
4760
  }
4761
+ function setThemeTokens(next) {
4762
+ themeTokensStyleFor(next ?? void 0);
4763
+ themeTokens = next ?? void 0;
4764
+ render();
4765
+ }
4648
4766
  function setMode(next) {
4649
4767
  if (next !== "embedded" && next !== "dialog") throw new Error("[dsh-plugin-update] 摆放形态非法:只收 embedded 或 dialog(收到 " + JSON.stringify(next) + ")");
4650
4768
  mode = next;
@@ -4760,12 +4878,13 @@ ${body}`;
4760
4878
  refresh,
4761
4879
  act,
4762
4880
  setTheme,
4881
+ setThemeTokens,
4763
4882
  setMode,
4764
4883
  unmount
4765
4884
  };
4766
4885
  }
4767
4886
  //#endregion
4768
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.6.0/node_modules/dsh-plugin-update/dist/entry-batch.js
4887
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.7.0/node_modules/dsh-plugin-update/dist/entry-batch.js
4769
4888
  function isObject(value) {
4770
4889
  return !!value && typeof value === "object" && !Array.isArray(value);
4771
4890
  }
@@ -4854,6 +4973,8 @@ ${body}`;
4854
4973
  if (openOn !== "has-update" && openOn !== "always" && openOn !== "manual" && openOn !== "direct") throw new Error("[dsh-plugin-update] 点击去向非法:只收 has-update / always / manual / direct(收到 " + JSON.stringify(options.openOn) + ")");
4855
4974
  if (options.theme !== void 0 && options.theme !== "default" && options.theme !== "archive") throw new Error("[dsh-plugin-update] 主题非法:只收 default 或 archive(收到 " + JSON.stringify(options.theme) + ")");
4856
4975
  let theme = normalizePanelTheme(options.theme ?? "default");
4976
+ themeTokensStyleFor(options.themeTokens ?? void 0);
4977
+ let themeTokens = options.themeTokens;
4857
4978
  const pollMs = options.pollMs;
4858
4979
  if (pollMs !== void 0 && (typeof pollMs !== "number" || !Number.isFinite(pollMs) || pollMs < 250)) throw new Error("[dsh-plugin-update] 面板轮询间隔非法:不得小于 250 毫秒(收到 " + JSON.stringify(options.pollMs) + ")");
4859
4980
  const labelOverride = typeof options.label === "string" && options.label ? options.label : null;
@@ -4920,9 +5041,11 @@ ${body}`;
4920
5041
  const labelText = labelOverride ?? (activating ? copyText("batch-entry.action.checking", lang) : copyText(batchEntryBilingualKeyFor(stateOf()), lang, batchEntryBilingualValuesFor(stateOf())));
4921
5042
  const busyAttr = activating ? " disabled aria-busy=\"true\"" : "";
4922
5043
  const themeAttr = theme === "archive" ? " data-theme=\"archive\"" : "";
5044
+ const tokensStyle = themeTokensStyleFor(themeTokens ?? void 0);
5045
+ const tokensAttr = tokensStyle ? " style=\"" + tokensStyle + "\"" : "";
4923
5046
  const control = variant === "badge" ? "<button type=\"button\" class=\"dsh-upd-entry-dot\" " + ENTRY_ATTR + "=\"activate\" title=\"" + escapeHtml(labelText) + "\" aria-label=\"" + escapeHtml(labelText) + "\"" + busyAttr + "></button>" : "<button type=\"button\" class=\"dsh-upd-entry-btn\" " + ENTRY_ATTR + "=\"activate\"" + busyAttr + ">" + labelHTML + "</button>";
4924
5047
  const noteHTML = note ? "<span class=\"dsh-upd-entry-note\" data-dsh-upd-note=\"1\">" + escapeHtml(note) + "</span>" : "";
4925
- return "<style>" + UPDATE_ENTRY_CSS + "\n" + BILINGUAL_CSS + "</style>\n<span class=\"dsh-upd-entry\" data-variant=\"" + variant + "\" data-state=\"" + summary.kind + "\"" + themeAttr + ">" + control + noteHTML + "</span>";
5048
+ return "<style>" + UPDATE_ENTRY_CSS + "\n" + BILINGUAL_CSS + "</style>\n<span class=\"dsh-upd-entry\" data-variant=\"" + variant + "\" data-state=\"" + summary.kind + "\"" + themeAttr + tokensAttr + ">" + control + noteHTML + "</span>";
4926
5049
  }
4927
5050
  function render() {
4928
5051
  if (!mounted) return;
@@ -4967,6 +5090,7 @@ ${body}`;
4967
5090
  prefix: options.prefix,
4968
5091
  mode,
4969
5092
  theme,
5093
+ themeTokens,
4970
5094
  pollMs,
4971
5095
  titles,
4972
5096
  onRestartRequested: options.onRestartRequested,
@@ -5042,6 +5166,12 @@ ${body}`;
5042
5166
  if (panel) panel.setTheme(theme);
5043
5167
  else render();
5044
5168
  }
5169
+ function setThemeTokens(next) {
5170
+ themeTokensStyleFor(next ?? void 0);
5171
+ themeTokens = next ?? void 0;
5172
+ if (panel) panel.setThemeTokens(themeTokens);
5173
+ else render();
5174
+ }
5045
5175
  function onClick(ev) {
5046
5176
  if (!mounted) return;
5047
5177
  try {
@@ -5099,6 +5229,7 @@ ${body}`;
5099
5229
  label: currentLabel,
5100
5230
  summary: summaryOf,
5101
5231
  setTheme,
5232
+ setThemeTokens,
5102
5233
  unmount
5103
5234
  };
5104
5235
  }
@@ -6110,7 +6241,7 @@ ${body}`;
6110
6241
  const PANEL_FIELD_EDGE = inkMix(24);
6111
6242
  inkMix(21);
6112
6243
  function interactionCss() {
6113
- return "[data-ilife-press]{transition:" + INTERACTION_TRANSITION + "}[data-ilife-focus]{transition:" + INTERACTION_TRANSITION + "}[data-ilife-press]:active{transform:scale(" + String(PRESS_SCALE) + ")}[data-ilife-press]:focus-visible,[data-ilife-focus]:focus-visible{outline:none;box-shadow:0 0 0 " + String(2) + "px var(--dsw-alias-bg-layer-1, #232324),0 0 0 " + String(5) + "px var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))}[data-ilife-press]{position:relative;overflow:hidden}[data-ilife-press]:hover:not(:disabled){background:color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(13) + "%, transparent);border-color:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55));box-shadow:0 0 0 1px color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(55) + "%, transparent),0 4px 16px color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(25) + "%, transparent);transform:translateY(-" + String(1) + "px)}[data-ilife-press]:active:hover:not(:disabled){transform:scale(" + String(PRESS_SCALE) + ")}[data-ilife-press]:focus-visible:hover:not(:disabled){box-shadow:0 0 0 " + String(2) + "px var(--dsw-alias-bg-layer-1, #232324),0 0 0 " + String(5) + "px var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)),0 4px 16px color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(25) + "%, transparent)}[data-ilife-press]::before{content:\"\";position:absolute;inset:0;background:radial-gradient(" + String(120) + "px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(22) + "%, transparent),transparent 65%);opacity:0;transition:opacity " + String(180 / 1e3) + "s ease;pointer-events:none}[data-ilife-press]:hover:not(:disabled)::before{opacity:1}[data-ilife-press]:disabled{cursor:not-allowed;opacity:" + String(DISABLED_OPACITY) + "}[data-ilife-press]:disabled:hover{animation:ilifeShake " + String(300 / 1e3) + "s ease}@keyframes ilifeShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-2px)}75%{transform:translateX(2px)}}[data-ilife-longpress]{position:relative;overflow:hidden}[data-ilife-longpress]::after{content:\"\";position:absolute;left:0;bottom:0;height:" + String(3) + "px;width:0;background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55));pointer-events:none}[data-ilife-longpress]:active:not(:disabled)::after{animation:ilifeLongRing " + String(500 / 1e3) + "s linear forwards}@keyframes ilifeLongRing{from{width:0}to{width:100%}}[data-ilife-advanced=\"head\"]{transition:background .15s ease,transform .15s ease,box-shadow .15s ease,border-color .15s ease}[data-ilife-advanced=\"mark\"]{display:inline-block;transition:transform " + String(200 / 1e3) + "s ease}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"mark\"]{transform:rotate(90deg)}[data-ilife-advanced=\"head\"]:hover [data-ilife-advanced=\"mark\"]{color:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55));transform:translateX(" + String(2) + "px)}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"body\"]{animation:ilifeFoldIn " + String(220 / 1e3) + "s ease}@keyframes ilifeFoldIn{from{max-height:0;opacity:0}to{max-height:" + String(300) + "px;opacity:1}}[data-ilife-notice=\"line\"]{animation:ilifeToastIn " + String(180 / 1e3) + "s ease}@keyframes ilifeToastIn{from{opacity:0;transform:translateY(" + String(8) + "px)}to{opacity:1;transform:none}}@media (hover:none){[data-ilife-press]:hover:not(:disabled){transform:none}[data-ilife-press]::before{display:none}}@media (prefers-reduced-motion:reduce){[data-ilife-press],[data-ilife-focus]{transition:none}[data-ilife-press]:disabled:hover{animation:none}[data-ilife-longpress]:active:not(:disabled)::after{animation:none;width:100%}[data-ilife-advanced=\"mark\"]{transition:none}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"body\"]{animation:none}[data-ilife-notice=\"line\"]{animation:none}}@media (update: slow){[data-ilife-press],[data-ilife-focus]{transition:none}[data-ilife-press]::before{display:none}[data-ilife-press]:disabled:hover{animation:none}[data-ilife-longpress]:active:not(:disabled)::after{animation:none;width:100%}[data-ilife-advanced=\"mark\"]{transition:none}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"body\"]{animation:none}[data-ilife-notice=\"line\"]{animation:none}}";
6244
+ return "[data-ilife-press]{transition:" + INTERACTION_TRANSITION + "}[data-ilife-focus]{transition:" + INTERACTION_TRANSITION + "}[data-ilife-press]:active{transform:scale(" + String(PRESS_SCALE) + ")}[data-ilife-press]:focus-visible,[data-ilife-focus]:focus-visible{outline:none;box-shadow:0 0 0 " + String(2) + "px var(--dsw-alias-bg-layer-1, #232324),0 0 0 " + String(5) + "px var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))}[data-ilife-press]{position:relative;overflow:hidden}[data-ilife-press]:hover:not(:disabled){background:color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(13) + "%, transparent)!important;border-color:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))!important;box-shadow:0 0 0 1px color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(55) + "%, transparent),0 4px 16px color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(25) + "%, transparent);transform:translateY(-" + String(1) + "px)}[data-ilife-press]:active:hover:not(:disabled){transform:scale(" + String(PRESS_SCALE) + ")}[data-ilife-press]:focus-visible:hover:not(:disabled){box-shadow:0 0 0 " + String(2) + "px var(--dsw-alias-bg-layer-1, #232324),0 0 0 " + String(5) + "px var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)),0 4px 16px color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(25) + "%, transparent)}[data-ilife-press]::before{content:\"\";position:absolute;inset:0;background:radial-gradient(" + String(120) + "px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(22) + "%, transparent),transparent 65%);opacity:0;transition:opacity " + String(180 / 1e3) + "s ease;pointer-events:none}[data-ilife-press]:hover:not(:disabled)::before{opacity:1}[data-ilife-press]:disabled{cursor:not-allowed;opacity:" + String(DISABLED_OPACITY) + "}[data-ilife-press]:disabled:hover{animation:ilifeShake " + String(300 / 1e3) + "s ease}@keyframes ilifeShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-2px)}75%{transform:translateX(2px)}}[data-ilife-longpress]{position:relative;overflow:hidden}[data-ilife-longpress]::after{content:\"\";position:absolute;left:0;bottom:0;height:" + String(3) + "px;width:0;background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55));pointer-events:none}[data-ilife-longpress]:active:not(:disabled)::after{animation:ilifeLongRing " + String(500 / 1e3) + "s linear forwards}@keyframes ilifeLongRing{from{width:0}to{width:100%}}[data-ilife-advanced=\"head\"]{transition:background .15s ease,transform .15s ease,box-shadow .15s ease,border-color .15s ease;border-radius:8px}[data-ilife-advanced=\"head\"]:hover{background:color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(13) + "%, transparent)!important}[data-ilife-advanced=\"mark\"]{display:inline-block;transition:transform " + String(200 / 1e3) + "s ease}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"mark\"]{transform:rotate(90deg)}[data-ilife-advanced=\"head\"]:hover [data-ilife-advanced=\"mark\"]{color:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55));transform:translateX(" + String(2) + "px)}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"body\"]{animation:ilifeFoldIn " + String(220 / 1e3) + "s ease}@keyframes ilifeFoldIn{from{max-height:0;opacity:0}to{max-height:" + String(300) + "px;opacity:1}}[data-ilife-notice=\"line\"]{animation:ilifeToastIn " + String(180 / 1e3) + "s ease}@keyframes ilifeToastIn{from{opacity:0;transform:translateY(" + String(8) + "px)}to{opacity:1;transform:none}}@media (hover:none){[data-ilife-press]:hover:not(:disabled){transform:none}[data-ilife-press]::before{display:none}}@media (prefers-reduced-motion:reduce){[data-ilife-press],[data-ilife-focus]{transition:none}[data-ilife-press]:disabled:hover{animation:none}[data-ilife-longpress]:active:not(:disabled)::after{animation:none;width:100%}[data-ilife-advanced=\"mark\"]{transition:none}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"body\"]{animation:none}[data-ilife-notice=\"line\"]{animation:none}}@media (update: slow){[data-ilife-press],[data-ilife-focus]{transition:none}[data-ilife-press]::before{display:none}[data-ilife-press]:disabled:hover{animation:none}[data-ilife-longpress]:active:not(:disabled)::after{animation:none;width:100%}[data-ilife-advanced=\"mark\"]{transition:none}[data-ilife-advanced=\"group\"][open] [data-ilife-advanced=\"body\"]{animation:none}[data-ilife-notice=\"line\"]{animation:none}}";
6114
6245
  }
6115
6246
  /** T6 页签条交互(#1165,唯一生成处;载体 `client.ts` 页签条消费,不自画)。
6116
6247
  *
@@ -6122,9 +6253,14 @@ ${body}`;
6122
6253
  * 数值全引契约 T6 四格(淡洗/呼吸/过渡/影子),颜色永不写死蓝(缺席退橙 #f6ad55)。
6123
6254
  * 低端机模糊降级(#1162):update: slow 下 glider 层(含 goo 模糊)关闭、选中态回实心 pill(与减少动态同形)。 */
6124
6255
  function tabInteractionCss() {
6125
- return "[data-ilife-tablist]{position:relative;isolation:isolate}[data-ilife-glider-layer]{position:absolute;inset:0;z-index:0;filter:url(#ilife-goo);pointer-events:none}[data-ilife-glider],[data-ilife-ghost]{position:absolute;top:0;left:0;border-radius:999px;background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))}[data-ilife-ghost]{opacity:0}[data-ilife-tab]{position:relative;z-index:1;transition:background .15s ease,border-color .15s ease}[data-ilife-tab]:hover{background:color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(12) + "%, transparent);border-color:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))}[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:ilifeDotPulse " + String(800 / 1e3) + "s ease infinite}@keyframes ilifeDotPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.5);opacity:.6}}[data-ilife-tab]:focus-visible{outline:none;box-shadow:0 0 0 " + String(2) + "px var(--dsw-alias-bg-layer-1, #232324),0 0 0 " + String(5) + "px var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))}[data-ilife-tab][aria-selected=\"true\"]{background:transparent;border-color:transparent}[data-ilife-ghost]{transition:opacity " + String(180 / 1e3) + "s ease}@media (hover:none){[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:none}}@media (prefers-reduced-motion:reduce){[data-ilife-tablist] [data-ilife-glider-layer]{display:none}[data-ilife-tab]{transition:none}[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:none}[data-ilife-tab][aria-selected=\"true\"]{background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))!important;border-color:transparent!important}}@media (update: slow){[data-ilife-tablist] [data-ilife-glider-layer]{display:none}[data-ilife-tab]{transition:none}[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:none}[data-ilife-tab][aria-selected=\"true\"]{background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))!important;border-color:transparent!important}}";
6126
- }
6127
- "" + PANEL_CARD_EDGE, "" + PANEL_FIELD_EDGE;
6256
+ return "[data-ilife-tablist]{position:relative;isolation:isolate}[data-ilife-glider-layer]{position:absolute;inset:0;z-index:0;filter:url(#ilife-goo);pointer-events:none}[data-ilife-glider],[data-ilife-ghost]{position:absolute;top:0;left:0;border-radius:999px;background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))}[data-ilife-ghost]{opacity:0}[data-ilife-tab]{position:relative;z-index:1;transition:background .15s ease,border-color .15s ease}[data-ilife-tab]:hover{background:color-mix(in srgb, var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55)) " + String(12) + "%, transparent)!important;border-color:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))!important}[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:ilifeDotPulse " + String(800 / 1e3) + "s ease infinite}@keyframes ilifeDotPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.5);opacity:.6}}[data-ilife-tab]:focus-visible{outline:none;box-shadow:0 0 0 " + String(2) + "px var(--dsw-alias-bg-layer-1, #232324),0 0 0 " + String(5) + "px var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))}[data-ilife-tab][aria-selected=\"true\"]{background:transparent;border-color:transparent}[data-ilife-ghost]{transition:opacity " + String(180 / 1e3) + "s ease}@media (hover:none){[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:none}}@media (prefers-reduced-motion:reduce){[data-ilife-tablist] [data-ilife-glider-layer]{display:none}[data-ilife-tab]{transition:none}[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:none}[data-ilife-tab][aria-selected=\"true\"]{background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))!important;border-color:transparent!important}}@media (update: slow){[data-ilife-tablist] [data-ilife-glider-layer]{display:none}[data-ilife-tab]{transition:none}[data-ilife-tab]:hover [data-ilife-health=\"tab-dot\"]{animation:none}[data-ilife-tab][aria-selected=\"true\"]{background:var(--ilife-focus, var(--dsw-alias-brand-primary, #f6ad55))!important;border-color:transparent!important}}";
6257
+ }
6258
+ /** 三枚章的整体缩放(定:当前显示大小 × 0.7)。**一个系数管全簇**——章面字号、三行落位、右间距、
6259
+ * 浮层锚点全乘它:只缩章不缩槽位,三行之间会空出一截;只缩槽位不缩章,章会互相压上。 */
6260
+ const SEAL_SCALE = .7;
6261
+ /** 卡面 em 值(乘缩放后收 4 位小数:0.3×0.7 在浮点里是 0.21000000000000002,直接拼串会带尾巴)。 */
6262
+ const sealEm = (n) => String(Math.round(n * SEAL_SCALE * 1e4) / 1e4) + "em";
6263
+ "" + PANEL_CARD_EDGE, sealEm(9), "" + PANEL_FIELD_EDGE;
6128
6264
  //#endregion
6129
6265
  //#region src/health-contract.ts
6130
6266
  /** 面板第二段参数(与各家的端点名同值,和各家的 `RPC_CHANNEL` 配成一次调用)。 */
@@ -6993,7 +7129,22 @@ ${body}`;
6993
7129
  focusable: "false"
6994
7130
  }, react.createElement("path", { d: "M13.5 4.5H19.5V10.5" }), react.createElement("path", { d: "M19.5 4.5L11 13" }), react.createElement("path", { d: "M18 14.5V18A2 2 0 0 1 16 20H6A2 2 0 0 1 4 18V8A2 2 0 0 1 6 6H9.5" }));
6995
7131
  }
6996
- /** 标题行右上角两件:星(去本仓点 Star)+ 气泡(去本仓开 issue),悬停出说明文字。
7132
+ /** 标题行入口图标(#1174:星星实心填色、气泡描边,与行尾外链图标同线形语言;语义仍在链接的 title/aria-label 上)。 */
7133
+ function PanelLinkIcon(props) {
7134
+ return react.createElement("svg", {
7135
+ viewBox: "0 0 24 24",
7136
+ width: 14,
7137
+ height: 14,
7138
+ fill: props.filled ? "currentColor" : "none",
7139
+ stroke: props.filled ? "none" : "currentColor",
7140
+ strokeWidth: 1.9,
7141
+ strokeLinecap: "round",
7142
+ strokeLinejoin: "round",
7143
+ "aria-hidden": "true",
7144
+ focusable: "false"
7145
+ }, react.createElement("path", { d: props.path }));
7146
+ }
7147
+ /** 标题行右上角两件:星(去本仓点 Star)+ 气泡(去本仓开 issue),SVG 图标+悬停说明+按压反馈(#1174)。
6997
7148
  *
6998
7149
  * 三件并排里的第三件「检查更新」住隔壁票(#678):本票只留位子——它就接在本组件之前,
6999
7150
  * 不画一个点了没反应的假按钮。窄窗口靠 headRow 的 flexWrap 折到标题下方,
@@ -7007,8 +7158,12 @@ ${body}`;
7007
7158
  rel: "noreferrer",
7008
7159
  title: link.tip,
7009
7160
  "aria-label": link.tip,
7010
- style: S.iconLink
7011
- }, react.createElement("span", { "aria-hidden": "true" }, link.glyph))));
7161
+ style: S.iconLink,
7162
+ "data-ilife-press": link.key
7163
+ }, react.createElement(PanelLinkIcon, {
7164
+ filled: link.icon.filled,
7165
+ path: link.icon.path
7166
+ }))));
7012
7167
  }
7013
7168
  /** 底部「作者其他插件」引流卡:四行(包名 + 一句说明 + 行尾外链图标),点开新窗口。
7014
7169
  *
@@ -7021,11 +7176,12 @@ ${body}`;
7021
7176
  target: "_blank",
7022
7177
  rel: "noreferrer",
7023
7178
  title: row.pkg + " 的 GitHub 仓库",
7024
- style: S.moreRow
7179
+ style: S.moreRow,
7180
+ "data-ilife-press": "more"
7025
7181
  }, react.createElement("span", { style: S.morePkg }, row.pkg), react.createElement("span", { style: S.moreDesc }, row.desc), react.createElement("span", { style: S.moreIcon }, react.createElement(ExternalIcon, null)))));
7026
7182
  }
7027
7183
  /** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
7028
- const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.44";
7184
+ const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.46";
7029
7185
  /** 爱生活面板:总设置区 + 检查更新(七家)+ 爱生活页签条(slot 驱动)+ 技能设置页投影/缺席卡。 */
7030
7186
  function LifePackSection(props) {
7031
7187
  const tabsId = react.useId();