dsh-dpharness 0.6.1 → 0.6.3

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/lib/changelog.js CHANGED
@@ -37,6 +37,28 @@ export function npmLatestUrl(pkg) {
37
37
  * (用户要看的是行为变化,不是我们的 commit 分类)。
38
38
  */
39
39
  export const CHANGELOG = [
40
+ {
41
+ version: "0.6.3",
42
+ date: "2026-10-19",
43
+ title: "严选插件页换成双栏工作台",
44
+ items: [
45
+ "整页重新分区:页头与页签各有一条分隔线,下面分成「浏览插件」主区和右侧信息栏,不再是几个同样间距的块平铺在一张背景上。",
46
+ "右侧信息栏常驻三块:今天推荐哪个(附上榜理由)、各小类下载最多的三个、安装须知;窗口宽度不足 900px 时自动收成一列,今日推荐排到列表前面。",
47
+ "插件卡片改成左右两栏:左边是名称、标签、说明与安装命令,右边一列固定放对比 / 收藏 / GitHub,不用再在一条卡里左右找按钮。",
48
+ "安装命令改为通栏显示、复制按钮就在命令右侧,短命令后面不再拖出一大片空白。",
49
+ ],
50
+ },
51
+ {
52
+ version: "0.6.2",
53
+ date: "2026-10-19",
54
+ title: "卡片标签全部中文化",
55
+ items: [
56
+ "插件卡片上的标签改成中文:核心 / 相关、实装验证通过 / 未通过、人工实测通过、风险:中 / 高,不再出现 core、verify: pass 这类英文标记。",
57
+ "兼容范围写成「适配 DSH v0.20+」,一眼看出这条说的是 dsh 版本要求。",
58
+ "风险未评估的插件不再挂标记(此前几乎每张卡都有一条「未知」,等于噪声);只保留中等、高风险两种提示。",
59
+ "修复「对比」表把未实测、未验证、验证未通过都显示成「通过」的问题。",
60
+ ],
61
+ },
40
62
  {
41
63
  version: "0.6.1",
42
64
  date: "2026-10-17",
package/lib/client.js CHANGED
@@ -180,6 +180,61 @@ window.__ModuleLoader__.load({
180
180
  ".dph_updVer{font-size:12px;color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums}",
181
181
  ".dph_updNote{font-size:11px;color:var(--dsw-alias-label-tertiary)}",
182
182
  ".dph_updList{display:flex;flex-direction:column;gap:6px}",
183
+ /* ──────────────── 页签入口:双栏工作台(2026-10-19 A2 重构) ────────────────
184
+ 原来是一条 12px 等距的纵向流:页头 / 页签 / 今日推荐 / 筛选 / 列表 / 页脚
185
+ 全贴在同一张背景上,区块之间没有边界;宽屏下卡片正文只占一半、右侧空着。
186
+ 现在分四层:页头 + 页签 / 主列(检索与列表)/ 侧栏(决策信息)。
187
+ ⚠️ 两条实测要点:
188
+ 1) 主列与侧栏都必须 min-width:0 —— 卡片里的安装命令是 nowrap 的 <code>,
189
+ 不写会把 1fr 列撑破、侧栏被挤出可视区;
190
+ 2) 窄窗单列时用 display:contents 把侧栏拆成两个栅格项(今日推荐 / 其余),
191
+ 靠 order 把今日推荐提到列表之前 —— 不复制 DOM,也不存在两套渲染分支。 */
192
+ ".dph_work{display:grid;grid-template-columns:minmax(0,1fr) 212px;gap:16px;align-items:start;width:100%;max-width:1080px;margin:0 auto;padding:6px 4px 20px}",
193
+ ".dph_workHead{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--dsw-alias-border-l2);padding-bottom:9px}",
194
+ ".dph_tabbar{grid-column:1/-1;display:flex;gap:18px;flex-wrap:wrap;border-bottom:1px solid var(--dsw-alias-border-l2)}",
195
+ ".dph_tab{border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;padding:2px 0 8px;cursor:pointer;white-space:nowrap}",
196
+ ".dph_tab:hover{color:var(--dsw-alias-label-primary)}",
197
+ ".dph_tabOn{color:var(--dsw-alias-state-business-primary);font-weight:600;box-shadow:inset 0 -2px 0 var(--dsw-alias-state-business-primary)}",
198
+ ".dph_mainCol{display:flex;flex-direction:column;gap:9px;min-width:0}",
199
+ ".dph_sectionHead{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}",
200
+ ".dph_sectionTitle{margin:0;font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary)}",
201
+ ".dph_sectionCount{font-size:11px;color:var(--dsw-alias-label-tertiary)}",
202
+ ".dph_rail{display:flex;flex-direction:column;gap:10px;min-width:0;position:sticky;top:0}",
203
+ ".dph_railSlot{display:flex;flex-direction:column;gap:10px;min-width:0}",
204
+ ".dph_railCard{display:flex;flex-direction:column;gap:5px;min-width:0;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-1);padding:10px 11px}",
205
+ /* 今日推荐是侧栏里唯一"当天只有一个答案"的东西,给一条强调边区分于其它信息块 */
206
+ ".dph_railCardAccent{border-left:3px solid var(--dsw-alias-state-business-primary)}",
207
+ ".dph_railLabel{margin:0;font-size:11px;color:var(--dsw-alias-label-tertiary)}",
208
+ ".dph_railName{font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary);margin-top:4px;word-break:break-word}",
209
+ ".dph_railMeta{font-size:11px;color:var(--dsw-alias-label-secondary);line-height:1.5;word-break:break-word}",
210
+ ".dph_railDesc{margin:4px 0 0;font-size:11px;line-height:1.55;color:var(--dsw-alias-label-secondary)}",
211
+ ".dph_railWhy{margin:5px 0 0;padding-top:6px;border-top:1px solid var(--dsw-alias-border-l2);font-size:11px;line-height:1.55;color:var(--dsw-alias-label-tertiary)}",
212
+ ".dph_railDivider{border-top:1px solid var(--dsw-alias-border-l2);padding-top:6px;margin-top:3px;font-size:11px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}",
213
+ ".dph_railLink{color:var(--dsw-alias-state-business-primary);text-decoration:none}",
214
+ ".dph_railLink:hover{text-decoration:underline}",
215
+ ".dph_railWarn{color:var(--dsw-alias-state-business-primary)}",
216
+ ".dph_top3{display:flex;align-items:baseline;gap:7px;min-width:0;font-size:11px;color:var(--dsw-alias-label-primary)}",
217
+ ".dph_top3Rank{flex:none;width:10px;color:var(--dsw-alias-state-business-primary);font-weight:600}",
218
+ ".dph_top3Name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
219
+ ".dph_top3Num{flex:none;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums}",
220
+ /* 宽屏卡片:左内容 + 右 84px 操作轨道。只由 renderCard 的 wide 分支产出;
221
+ 浮窗 / 今日推荐 / 分类精选仍走原来的 .dph_card,互不影响。 */
222
+ ".dph_cardLg{display:grid;grid-template-columns:minmax(0,1fr) 84px;gap:12px;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:10px;padding:11px 12px}",
223
+ ".dph_cardLgMain{display:flex;flex-direction:column;gap:5px;min-width:0}",
224
+ ".dph_opRail{display:flex;flex-direction:column;gap:5px}",
225
+ ".dph_opRail .dph_btn{width:100%;text-align:center;padding:5px 6px}",
226
+ ".dph_btnSm{padding:3px 8px;font-size:11px}",
227
+ /* 命令条:复制按钮内嵌右端,不再靠 flex:1 把按钮顶到卡的另一头 */
228
+ ".dph_cmdbar{display:flex;align-items:center;gap:6px;min-width:0;background:var(--dsw-alias-bg-layer-3);border-radius:6px;padding:5px 6px 5px 9px}",
229
+ ".dph_cmdbarCode{flex:1;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--dsw-alias-label-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
230
+ /* 212px 侧栏里的命令条:横向排会把命令截成「dsh plugin ----」(实测),
231
+ 改竖排 + 允许断词,命令必须完整可读 —— 它是这一块的行动依据。 */
232
+ ".dph_cmdbarCol{flex-direction:column;align-items:stretch;gap:5px}",
233
+ ".dph_cmdbarCol .dph_cmdbarCode{white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.5}",
234
+ /* 侧栏里的安装行同理:包名在窄栏里必须能换行,否则会顶出卡片右边界 */
235
+ ".dph_railCard .dph_instRow{flex-direction:column;align-items:stretch;gap:4px}",
236
+ ".dph_railCard .dph_instHint{word-break:break-all}",
237
+ "@media (max-width:900px){.dph_work{grid-template-columns:minmax(0,1fr)}.dph_rail{display:contents}.dph_workHead,.dph_tabbar{order:0}.dph_dailySlot{order:1}.dph_mainCol{order:2}.dph_railSlot{order:3}.dph_railCard .dph_instRow{flex-direction:row;align-items:center}.dph_cmdbarCol{flex-direction:row;align-items:center}.dph_cmdbarCol .dph_cmdbarCode{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}",
183
238
  ].join("");
184
239
  const tagId = "dsh-dpharness/client.css";
185
240
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
@@ -199,6 +254,20 @@ window.__ModuleLoader__.load({
199
254
  "view.tab": "严选插件",
200
255
  "view.title": "dsh 严选插件",
201
256
  "view.sub": "只推装得上的 · 数据来源 dpharness.com",
257
+ /* 区标题:与页头口径分开 —— 页头说"这是什么",区标题说"现在看到的是哪一段" */
258
+ "section.browse": "浏览插件",
259
+ "section.best": "分类精选",
260
+ "section.sets": "套装方案",
261
+ "section.daily": "每日推荐",
262
+ "section.updates": "我的插件",
263
+ /* 侧栏:今日推荐 / 各小类冠军 / 安装须知 */
264
+ "rail.highlights": "各小类冠军 · 周下载前 3",
265
+ "rail.highlightsHint": "共 {n} 个小类各取第 1 名 · {m} 期 · 按周下载排序",
266
+ "rail.viewBoard": "查看完整榜单 →",
267
+ "rail.install": "安装须知",
268
+ "rail.installTip": "插件走本地通道安装,重启 dsh 后生效;未重启时页面上方会提示。",
269
+ "rail.restartPending": "有插件装完还没重启,重启 dsh 才会生效。",
270
+ "rail.week": "周下载 {n}",
202
271
  "search.placeholder": "搜索插件名称 / 描述 / 作者…",
203
272
  "sort.default": "综合",
204
273
  "sort.stars": "按 Star",
@@ -289,7 +358,10 @@ window.__ModuleLoader__.load({
289
358
  "compare.stars": "星标",
290
359
  "compare.verify": "实装验证",
291
360
  "compare.tested": "人工实测通过",
292
- "compare.verified": "通过安装校验",
361
+ /* 与卡片标签同一口径(tag.verify.*):verifyStatus 是**实装验证**的结果,
362
+ 不是 installCheck(装得上吗)—— 旧文案「通过安装校验」把两件事混成了一件。 */
363
+ "compare.verified": "实装验证通过",
364
+ "compare.failed": "实装验证未通过",
293
365
  "compare.unverified": "未验证",
294
366
  "compare.installed": "本机",
295
367
  "compare.notInstalled": "未安装",
@@ -398,6 +470,17 @@ window.__ModuleLoader__.load({
398
470
  "label.untranslated": "未汉化",
399
471
  "label.repoSource": "GitHub 源",
400
472
  "hint.repoSource": "该插件未发布到 npm,走 GitHub 源安装(与站点详情页同口径)。",
473
+ /* 卡片标签(站点英文枚举的中文名,见 makeUi 的 TAG_LABEL)
474
+ ⚠️ tier 与 usage.core 是**两套语义**:这里是生态分层(核心 / 相关),
475
+ 那里的「核心在用」是使用频次,别合并。 */
476
+ "tag.tier.core": "核心",
477
+ "tag.tier.related": "相关",
478
+ "tag.verify.pass": "实装验证通过",
479
+ "tag.verify.fail": "实装验证未通过",
480
+ "tag.tested.passed": "人工实测通过",
481
+ "tag.risk.medium": "风险:中",
482
+ "tag.risk.high": "风险:高",
483
+ "tag.compat": "适配 DSH {v}",
401
484
  "best.recommend": "严选推荐",
402
485
  "best.picks": "分类精选",
403
486
  "best.catCount": "{subs} 个小类 · {n} 个",
@@ -445,6 +528,18 @@ window.__ModuleLoader__.load({
445
528
  "view.tab": "Curated",
446
529
  "view.title": "dsh curated plugins",
447
530
  "view.sub": "Only installable ones · source dpharness.com",
531
+ "section.browse": "Browse plugins",
532
+ "section.best": "By category",
533
+ "section.sets": "Setups",
534
+ "section.daily": "Daily pick",
535
+ "section.updates": "My plugins",
536
+ "rail.highlights": "Top of each group · weekly downloads",
537
+ "rail.highlightsHint": "{n} groups, 1 each · {m} · ranked by weekly downloads",
538
+ "rail.viewBoard": "See the full board →",
539
+ "rail.install": "Install notes",
540
+ "rail.installTip": "Installs go through the local channel and take effect after restarting dsh.",
541
+ "rail.restartPending": "A plugin is installed but dsh has not been restarted yet.",
542
+ "rail.week": "{n}/wk",
448
543
  "search.placeholder": "Search name / description / owner…",
449
544
  "sort.default": "Relevance",
450
545
  "sort.stars": "By stars",
@@ -535,7 +630,8 @@ window.__ModuleLoader__.load({
535
630
  "compare.stars": "Stars",
536
631
  "compare.verify": "Verified",
537
632
  "compare.tested": "Hands-on tested",
538
- "compare.verified": "Install-check passed",
633
+ "compare.verified": "Install verified",
634
+ "compare.failed": "Install verification failed",
539
635
  "compare.unverified": "Unverified",
540
636
  "compare.installed": "On this machine",
541
637
  "compare.notInstalled": "Not installed",
@@ -644,6 +740,14 @@ window.__ModuleLoader__.load({
644
740
  "label.untranslated": "Not translated",
645
741
  "label.repoSource": "GitHub source",
646
742
  "hint.repoSource": "Not published to npm — installs from the GitHub source (same rule as the site's detail page).",
743
+ "tag.tier.core": "Core",
744
+ "tag.tier.related": "Related",
745
+ "tag.verify.pass": "Install verified",
746
+ "tag.verify.fail": "Install verification failed",
747
+ "tag.tested.passed": "Hands-on tested",
748
+ "tag.risk.medium": "Risk: medium",
749
+ "tag.risk.high": "Risk: high",
750
+ "tag.compat": "DSH {v}",
647
751
  "best.recommend": "Curated",
648
752
  "best.picks": "By category",
649
753
  "best.catCount": "{subs} groups · {n}",
@@ -1913,6 +2017,46 @@ window.__ModuleLoader__.load({
1913
2017
  return sorted[hashKey(dateKey) % sorted.length];
1914
2018
  }
1915
2019
 
2020
+ /**
2021
+ * 侧栏「各小类冠军」的三条 —— 口径 A(2026-10-19 定案)。
2022
+ *
2023
+ * ⚠️ 不能直接取 /api/best 的前三条:那个接口的分组顺序是
2024
+ * `subKey asc, rank asc`(app/api/best/route.ts),**没有跨小类排名**。
2025
+ * 实测当期(2026-10)直接取前三条得到的是「市场/管理 › 插件发现」这一个
2026
+ * 小类的第 1、2、3 名 —— 看起来像"榜单坏了",实际是读错了口径。
2027
+ *
2028
+ * 所以:候选集只保留 rank=1(每个小类一条,当期 43 条),按周下载降序,
2029
+ * 并列时用星数、再用 fullName 字典序兜底 —— 最后一级与 pickDaily 同一条纪律:
2030
+ * 上游分组顺序会随站点重算榜单而变,只有唯一键排序才能保证同一天多次刷新一致。
2031
+ *
2032
+ * 全部在客户端完成:不新增请求、不改站点接口。数据未就绪时返回空数组,
2033
+ * 调用方据此整块不渲染(不占位、不显示"暂无")。
2034
+ */
2035
+ function pickHighlights(data, limit) {
2036
+ const all = flattenBest(data).filter((entry) => Number(entry.item.rank) === 1);
2037
+ if (all.length === 0) return [];
2038
+ const num = (value) => (typeof value === "number" && Number.isFinite(value) ? value : -1);
2039
+ const sorted = all.slice().sort((a, b) => {
2040
+ const weekly = num(b.item.weeklyDownloads) - num(a.item.weeklyDownloads);
2041
+ if (weekly !== 0) return weekly;
2042
+ const stars = num(b.item.stars) - num(a.item.stars);
2043
+ if (stars !== 0) return stars;
2044
+ return a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
2045
+ });
2046
+ const seen = Object.create(null);
2047
+ const output = [];
2048
+ const max = limit && limit > 0 ? limit : 3;
2049
+ for (let index = 0; index < sorted.length; index += 1) {
2050
+ const entry = sorted[index];
2051
+ /* 同一插件在两个小类都以 rank=1 出现时只留一条(fullName 是唯一键) */
2052
+ if (seen[entry.key]) continue;
2053
+ seen[entry.key] = true;
2054
+ output.push(entry);
2055
+ if (output.length >= max) break;
2056
+ }
2057
+ return output;
2058
+ }
2059
+
1916
2060
  /**
1917
2061
  * 当前自然日键,跨天自动刷新。
1918
2062
  *
@@ -2269,16 +2413,39 @@ window.__ModuleLoader__.load({
2269
2413
  return h("span", { className: cls, key: label }, label);
2270
2414
  }
2271
2415
 
2416
+ /* 标签文案表:站点 API 给的是**英文枚举**(tier / verifyStatus / testedStatus / riskLevel),
2417
+ 原先直接渲染,中文界面里因此露出 `core`、`verify: pass`、`risk: unknown`
2418
+ (2026-10-19 用户截图指出)。这里把枚举翻成中文,与本文件 tierLabel 同一约定:
2419
+ **字典里没有的值返回空串** —— 不显示、不猜,也不把内部标识当文案丢给用户。
2420
+ 新增枚举值只改这张表 + 两份字典,勿在 tagsOf 里现拼字符串。 */
2421
+ const TAG_LABEL = {
2422
+ tier: { core: "tag.tier.core", related: "tag.tier.related" },
2423
+ verify: { pass: "tag.verify.pass", fail: "tag.verify.fail" },
2424
+ tested: { passed: "tag.tested.passed" },
2425
+ /* low / unknown 有意**不给文案**:unknown 占当前样本 97%(194/200),
2426
+ 挂一个「风险未知」等于每张卡都贴一条零信息量徽标;low 无风险可报(与站点
2427
+ 「站点给的是结论,没结论就没有这条」同口径)。 */
2428
+ risk: { medium: "tag.risk.medium", high: "tag.risk.high" },
2429
+ };
2430
+ function tagLabel(group, value) {
2431
+ const key = TAG_LABEL[group] && TAG_LABEL[group][value];
2432
+ return key ? t(key) : "";
2433
+ }
2434
+
2272
2435
  function tagsOf(item) {
2273
2436
  const tags = [];
2274
2437
  // 中文分类放最前 —— 它是"这东西是干什么的"的第一眼信息
2275
2438
  if (item.cat) tags.push(badge(item.cat, null));
2276
- if (item.tier) tags.push(badge(item.tier, item.tier === "core" ? "ok" : null));
2277
- if (item.compat) tags.push(badge(item.compat, null));
2278
- if (item.verify === "pass") tags.push(badge("verify: pass", "ok"));
2279
- else if (item.verify === "fail") tags.push(badge("verify: fail", "bad"));
2280
- if (item.tested === "passed") tags.push(badge("tested", "ok"));
2281
- if (item.risk && item.risk !== "low") tags.push(badge("risk: " + item.risk, item.risk === "high" ? "bad" : null));
2439
+ const tier = item.tier ? tagLabel("tier", item.tier) : "";
2440
+ if (tier) tags.push(badge(tier, item.tier === "core" ? "ok" : null));
2441
+ // 兼容范围是版本号,不翻译本体,只补中文前缀(站点原样是「DSH v0.20+」)
2442
+ if (item.compat) tags.push(badge(format(t("tag.compat"), { v: item.compat }), null));
2443
+ const verify = item.verify ? tagLabel("verify", item.verify) : "";
2444
+ if (verify) tags.push(badge(verify, item.verify === "pass" ? "ok" : "bad"));
2445
+ const tested = item.tested ? tagLabel("tested", item.tested) : "";
2446
+ if (tested) tags.push(badge(tested, "ok"));
2447
+ const risk = item.risk ? tagLabel("risk", item.risk) : "";
2448
+ if (risk) tags.push(badge(risk, item.risk === "high" ? "bad" : null));
2282
2449
  return tags;
2283
2450
  }
2284
2451
 
@@ -2637,7 +2804,7 @@ window.__ModuleLoader__.load({
2637
2804
  if (list.length < 2) return null;
2638
2805
  const rows = [
2639
2806
  { key: "stars", label: t("compare.stars"), value: (item) => format(t("badge.stars"), { n: item.stars }) },
2640
- { key: "verify", label: t("compare.verify"), value: (item) => (item.tested ? t("compare.tested") : item.verify ? t("compare.verified") : t("compare.unverified")) },
2807
+ { key: "verify", label: t("compare.verify"), value: (item) => (item.tested === "passed" ? t("compare.tested") : item.verify === "pass" ? t("compare.verified") : item.verify === "fail" ? t("compare.failed") : t("compare.unverified")) },
2641
2808
  { key: "installed", label: t("compare.installed"), value: (item) => (item.installed ? format(t("card.installed"), { v: item.installed }) : t("compare.notInstalled")) },
2642
2809
  { key: "cat", label: t("compare.cat"), value: (item) => item.cat || "—" },
2643
2810
  { key: "sell", label: t("compare.sell"), value: (item) => item.sell || "—" },
@@ -2702,7 +2869,17 @@ window.__ModuleLoader__.load({
2702
2869
  ]);
2703
2870
  }
2704
2871
 
2705
- function renderCard(item, copiedCmd, onCopied, compact, comparable) {
2872
+ /**
2873
+ * 一张插件卡。
2874
+ *
2875
+ * 两种版式,同一份数据:
2876
+ * · 窄卡(默认,浮窗 / 今日推荐 / 分类精选):.dph_card,动作按钮都在标题行;
2877
+ * · 宽卡(wide=true,仅页签「严选推荐」列表):.dph_cardLg = 左内容 + 右 84px
2878
+ * 操作轨道。原来靠 .dph_spacer 把 ★ 与 GitHub 顶到卡片两端,正文只占一半、
2879
+ * 右侧大片空白;挪成轨道后操作按列对齐、可纵向扫读(2026-10-19 A2)。
2880
+ * ⚠️ wide 必须由调用方显式传参,不能靠样式选择器自动套用 —— 本组件有 4 处复用。
2881
+ */
2882
+ function renderCard(item, copiedCmd, onCopied, compact, comparable, wide) {
2706
2883
  const title = item.nameZh || item.name || item.fullName || "";
2707
2884
  const tags = tagsOf(item);
2708
2885
  // 卖点行:站点 tagline 经严格过滤后的结果;没有就不占位(宁可不显示,也不放英文原文或垃圾串)
@@ -2721,6 +2898,74 @@ window.__ModuleLoader__.load({
2721
2898
  h("span", { className: "dph_tag", key: "unzh" }, t("label.untranslated")),
2722
2899
  ])
2723
2900
  : null;
2901
+ /* 已经装过就直说 —— 实测有用户对着一个早就装好的插件反复点「安装」,
2902
+ 然后判定"安装不成功"(他无从知道那东西其实已经在跑了)。 */
2903
+ const installedRow = item.installed
2904
+ ? h("div", { className: "dph_tags", key: "installed" }, h("span", { className: "dph_tag dph_tagOk" }, format(t("card.installed"), { v: item.installed })))
2905
+ : null;
2906
+ const onCopy = () => copyText(item.cmd, () => {
2907
+ onCopied(item.cmd);
2908
+ // 与站点 InstallBlock 同口径:value 传整条命令
2909
+ track("copy_install", { cmd: item.cmd, pkg: item.pkg || "" });
2910
+ });
2911
+ /* comparable = 这张卡片支持"选择类动作"(对比 + 收藏)。两处都放最左:
2912
+ 多选/收藏的第一列位置固定,扫一眼就知道能选;第二列才是插件名。
2913
+ 宽屏时这两个按钮与 GitHub 一起挪到右侧操作轨道,样式与行为不变。 */
2914
+ const cmpBtn = comparable ? h("button", {
2915
+ className: "dph_btn" + (inCompare(item) ? " dph_btnPrimary" : ""),
2916
+ key: "cmp",
2917
+ type: "button",
2918
+ title: format(t("compare.toggle"), { max: COMPARE_MAX }),
2919
+ onClick: () => {
2920
+ /* 先读旧状态再改 —— toggleCompare 是同步写 hub,改完再判断就反了 */
2921
+ const was = inCompare(item);
2922
+ toggleCompare(item);
2923
+ track("plugin_hub", { action: was ? "compare_off" : "compare_on" });
2924
+ },
2925
+ }, inCompare(item) ? t("compare.picked") : t("compare.pick")) : null;
2926
+ const favBtn = comparable ? h("button", {
2927
+ className: "dph_btn" + (inFav(item) ? " dph_btnPrimary" : ""),
2928
+ key: "fav",
2929
+ type: "button",
2930
+ title: t("fav.toggle"),
2931
+ onClick: () => {
2932
+ const was = inFav(item);
2933
+ toggleFav(item);
2934
+ track("plugin_hub", { action: was ? "fav_off" : "fav_on" });
2935
+ },
2936
+ }, inFav(item) ? t("fav.added") : t("fav.add")) : null;
2937
+ const linkBtn = item.url
2938
+ ? h("a", { className: "dph_btn", key: "link", href: item.url, target: "_blank", rel: "noopener noreferrer" }, "GitHub")
2939
+ : null;
2940
+
2941
+ if (wide) {
2942
+ /* 命令条通栏、复制按钮内嵌右端 —— 短命令不再拉出一条空白 */
2943
+ const bar = item.cmd
2944
+ ? h("div", { className: "dph_cmdbar", key: "cmd" }, [
2945
+ h("code", { className: "dph_cmdbarCode", key: "code" }, item.cmd),
2946
+ h("button", { className: "dph_btn dph_btnSm", key: "copy", type: "button", onClick: onCopy },
2947
+ copiedCmd === item.cmd ? t("action.copied") : t("action.copy")),
2948
+ ])
2949
+ : h("div", { className: "dph_cmdMissing", key: "cmd" }, t("cmd.missing"));
2950
+ return h("div", { className: "dph_cardLg", key: item.fullName || title }, [
2951
+ h("div", { className: "dph_cardLgMain", key: "main" }, [
2952
+ h("div", { className: "dph_cardTop", key: "top" }, [
2953
+ h("span", { className: "dph_name", key: "name" }, title),
2954
+ item.owner ? h("span", { className: "dph_owner", key: "owner" }, "@" + item.owner) : null,
2955
+ h("span", { className: "dph_stars", key: "stars" }, format(t("badge.stars"), { n: item.stars })),
2956
+ item.src === "repo" ? h("span", { className: "dph_tag", key: "src" }, t("label.repoSource")) : null,
2957
+ ]),
2958
+ tags.length ? h("div", { className: "dph_tags", key: "tags" }, tags) : null,
2959
+ installedRow,
2960
+ sellRow,
2961
+ descRow,
2962
+ h(InstallRow, { item: item, key: "install" }),
2963
+ bar,
2964
+ ]),
2965
+ h("div", { className: "dph_opRail", key: "ops" }, [cmpBtn, favBtn, linkBtn]),
2966
+ ]);
2967
+ }
2968
+
2724
2969
  const cmdRow = item.cmd
2725
2970
  ? h("div", { className: "dph_cmdWrap", key: "cmd" }, [
2726
2971
  h("div", { className: "dph_cmdRow", key: "row" }, [
@@ -2729,16 +2974,8 @@ window.__ModuleLoader__.load({
2729
2974
  ? h("span", { className: "dph_tag", key: "src" }, t("label.repoSource"))
2730
2975
  : null,
2731
2976
  h("code", { className: "dph_cmd", key: "code" }, item.cmd),
2732
- h("button", {
2733
- className: "dph_btn",
2734
- key: "copy",
2735
- type: "button",
2736
- onClick: () => copyText(item.cmd, () => {
2737
- onCopied(item.cmd);
2738
- // 与站点 InstallBlock 同口径:value 传整条命令
2739
- track("copy_install", { cmd: item.cmd, pkg: item.pkg || "" });
2740
- }),
2741
- }, copiedCmd === item.cmd ? t("action.copied") : t("action.copy")),
2977
+ h("button", { className: "dph_btn", key: "copy", type: "button", onClick: onCopy },
2978
+ copiedCmd === item.cmd ? t("action.copied") : t("action.copy")),
2742
2979
  ]),
2743
2980
  item.src === "repo" ? h("div", { className: "dph_instHint", key: "hint" }, t("hint.repoSource")) : null,
2744
2981
  ])
@@ -2746,43 +2983,16 @@ window.__ModuleLoader__.load({
2746
2983
 
2747
2984
  return h("div", { className: "dph_card" + (compact ? " dph_cardSm" : ""), key: item.fullName || title }, [
2748
2985
  h("div", { className: "dph_cardTop", key: "top" }, [
2749
- /* comparable = 这张卡片支持"选择类动作"(对比 + 收藏)。两处都放最左:
2750
- 多选/收藏的第一列位置固定,扫一眼就知道能选;第二列才是插件名。 */
2751
- comparable ? h("button", {
2752
- className: "dph_btn" + (inCompare(item) ? " dph_btnPrimary" : ""),
2753
- key: "cmp",
2754
- type: "button",
2755
- title: format(t("compare.toggle"), { max: COMPARE_MAX }),
2756
- onClick: () => {
2757
- /* 先读旧状态再改 —— toggleCompare 是同步写 hub,改完再判断就反了 */
2758
- const was = inCompare(item);
2759
- toggleCompare(item);
2760
- track("plugin_hub", { action: was ? "compare_off" : "compare_on" });
2761
- },
2762
- }, inCompare(item) ? t("compare.picked") : t("compare.pick")) : null,
2763
- comparable ? h("button", {
2764
- className: "dph_btn" + (inFav(item) ? " dph_btnPrimary" : ""),
2765
- key: "fav",
2766
- type: "button",
2767
- title: t("fav.toggle"),
2768
- onClick: () => {
2769
- const was = inFav(item);
2770
- toggleFav(item);
2771
- track("plugin_hub", { action: was ? "fav_off" : "fav_on" });
2772
- },
2773
- }, inFav(item) ? t("fav.added") : t("fav.add")) : null,
2986
+ cmpBtn,
2987
+ favBtn,
2774
2988
  h("span", { className: "dph_name", key: "name" }, title),
2775
2989
  item.owner ? h("span", { className: "dph_owner", key: "owner" }, "@" + item.owner) : null,
2776
2990
  h("span", { className: "dph_spacer", key: "gap" }),
2777
2991
  h("span", { className: "dph_stars", key: "stars" }, format(t("badge.stars"), { n: item.stars })),
2778
- item.url
2779
- ? h("a", { className: "dph_btn", key: "link", href: item.url, target: "_blank", rel: "noopener noreferrer" }, "GitHub")
2780
- : null,
2992
+ linkBtn,
2781
2993
  ]),
2782
2994
  tags.length ? h("div", { className: "dph_tags", key: "tags" }, tags) : null,
2783
- /* 已经装过就直说 —— 实测有用户对着一个早就装好的插件反复点「安装」,
2784
- 然后判定"安装不成功"(他无从知道那东西其实已经在跑了)。 */
2785
- item.installed ? h("div", { className: "dph_tags", key: "installed" }, h("span", { className: "dph_tag dph_tagOk" }, format(t("card.installed"), { v: item.installed }))) : null,
2995
+ installedRow,
2786
2996
  sellRow,
2787
2997
  descRow,
2788
2998
  h(InstallRow, { item: item, key: "install" }),
@@ -3876,6 +4086,70 @@ window.__ModuleLoader__.load({
3876
4086
  * `.dph_segWrap`(那是让两个按钮铺满 400px 面板用的)。页签宽 1080px,
3877
4087
  * 铺满会变成两个 500px 的巨大按钮。
3878
4088
  */
4089
+ /**
4090
+ * 侧栏版「今日推荐」——212px 宽。
4091
+ *
4092
+ * 与 dailyCard 同源(都走 pickDaily),只换版式:面板与「每日推荐」视图
4093
+ * 继续用带卡片壳的 dailyCard,这里去掉那层壳、把理由与刷新说明收进卡内,
4094
+ * 避免选取逻辑出现第二份实现。取数失败时同样要说清"暂不可用",
4095
+ * 不能静止消失 —— 它是侧栏里唯一"今天该装哪个"的答案。
4096
+ */
4097
+ function railDailyCard(best, copiedCmd, onCopied, dateKey) {
4098
+ const picked = best.state.data ? pickDaily(best.state.data, dateKey) : null;
4099
+ if (!picked) {
4100
+ return h("div", { className: "dph_railCard dph_railCardAccent", key: "daily" }, [
4101
+ h("div", { className: "dph_bar", key: "head" }, [
4102
+ h("span", { className: "dph_dailyTag", key: "tag" }, t("daily.title")),
4103
+ h("span", { className: "dph_dailyDate", key: "date" }, dateKey),
4104
+ ]),
4105
+ h("div", { className: "dph_instMsg", key: "msg" }, best.state.error ? t("daily.empty") : t("daily.loading")),
4106
+ ]);
4107
+ }
4108
+ const item = picked.item;
4109
+ const title = item.nameZh || item.name || item.fullName || "";
4110
+ const where = [picked.cat, picked.sub].filter(Boolean).join(" › ");
4111
+ const meta = [format(t("badge.stars"), { n: item.stars }), where].filter(Boolean).join(" · ");
4112
+ const desc = item.descZh || item.sell || "";
4113
+ const verify = item.verify ? tagLabel("verify", item.verify) : "";
4114
+ return h("div", { className: "dph_railCard dph_railCardAccent", key: "daily" }, [
4115
+ h("div", { className: "dph_bar", key: "head" }, [
4116
+ h("span", { className: "dph_dailyTag", key: "tag" }, t("daily.title")),
4117
+ h("span", { className: "dph_dailyDate", key: "date" }, dateKey),
4118
+ ]),
4119
+ h("div", { className: "dph_railName", key: "name" }, title),
4120
+ h("div", { className: "dph_railMeta", key: "meta" }, meta),
4121
+ verify ? h("div", { className: "dph_tags", key: "verify" }, h("span", { className: "dph_tag" + (item.verify === "pass" ? " dph_tagOk" : " dph_tagBad") }, verify)) : null,
4122
+ desc ? h("p", { className: "dph_railDesc", key: "desc" }, desc) : null,
4123
+ h(InstallRow, { item: item, key: "install" }),
4124
+ item.cmd
4125
+ ? h("div", { className: "dph_cmdbar dph_cmdbarCol", key: "cmd" }, [
4126
+ h("code", { className: "dph_cmdbarCode", key: "code", title: item.cmd }, item.cmd),
4127
+ h("button", {
4128
+ className: "dph_btn dph_btnSm",
4129
+ key: "copy",
4130
+ type: "button",
4131
+ onClick: () => copyText(item.cmd, () => {
4132
+ onCopied(item.cmd);
4133
+ track("copy_install", { cmd: item.cmd, pkg: item.pkg || "" });
4134
+ }),
4135
+ }, copiedCmd === item.cmd ? t("action.copied") : t("action.copy")),
4136
+ ])
4137
+ : null,
4138
+ item.reason ? h("p", { className: "dph_railWhy", key: "why" }, t("daily.why") + ":" + item.reason) : null,
4139
+ ]);
4140
+ }
4141
+
4142
+ /**
4143
+ * 入口 1:会话视图页签(完整页)。
4144
+ *
4145
+ * 2026-10-19 版式(A2):页头 + 页签 / 左主列 / 右 212px 侧栏。
4146
+ * 原来是一条 12px 等距的纵向流,今日推荐与列表卡同规格、理由行还漂在卡外,
4147
+ * 用户的原话是「模块分布不清晰、右侧空白太多」。
4148
+ * 现在:主列只做检索与列表(区标题 → 筛选 → 结果),侧栏放"今天装哪个"
4149
+ * 与"各小类冠军",横向空白由决策信息吸收。
4150
+ * 视图切换从分段按钮改成下划线页签:它管的是整页内容,不该长得像一个
4151
+ * 与正文平级的控件(浮窗仍用 .dph_seg,两处互不影响)。
4152
+ */
3879
4153
  function CatalogView() {
3880
4154
  const cat = useCatalog(t);
3881
4155
  /* 必须订阅共享 store:页签底部的「显示右下角浮窗」开关读的是同一个
@@ -3887,8 +4161,9 @@ window.__ModuleLoader__.load({
3887
4161
  /* 对比表开没开 ── 每个面各自记(选择集在 hub 上共享,表格的展开状态是本面的) */
3888
4162
  const [comparing, setComparing] = react.useState(false);
3889
4163
  const dateKey = useDateKey();
3890
- /* 默认视图顶部也要放「今日推荐」卡片,所以 daily 开着时必须取榜单数据 ——
3891
- 不取就没东西可渲染。关掉每日推荐后即回到「只有切到榜单/每日视图才请求」。 */
4164
+ /* 侧栏也要放「今日推荐」与「各小类冠军」,两处都来自 /api/best:
4165
+ daily 开着时必须取,关掉后即回到「只有切到榜单/每日视图才请求」。
4166
+ 不给侧栏新增任何请求 —— 全站只有这一个数据源。 */
3892
4167
  const best = useBest(t, mode === "best" || mode === "daily" || state.daily);
3893
4168
  const sets = useSets(t, mode === "sets");
3894
4169
  const data = cat.state.data;
@@ -3898,15 +4173,38 @@ window.__ModuleLoader__.load({
3898
4173
  const isDaily = mode === "daily";
3899
4174
  const isUpdate = mode === "update";
3900
4175
  const isSets = mode === "sets";
3901
- const sub = isSets
3902
- ? (setsData ? format(t("sets.count"), { n: setsData.total || 0 }) : "")
3903
- : isBest
3904
- ? (bestData ? format(t("best.month"), { m: bestData.month || "" }) : "")
3905
- : isDaily
3906
- ? t("daily.hint")
3907
- : isUpdate
3908
- ? ""
3909
- : countSub(data, t, cat.state.loading, t("view.sub"));
4176
+
4177
+ /* 页头副标题与区标题分工:页头说「这是什么」(固定口径),
4178
+ 区标题说「现在看到的是哪一段 + 多少条」。
4179
+ 两处都写"共 N 条"会让页面重复又啰嗦(原版就是这个毛病)。 */
4180
+ const headSub = isSets || isBest || isDaily || isUpdate ? "" : t("view.sub");
4181
+ const sectionTitle = isUpdate
4182
+ ? t("section.updates")
4183
+ : isSets
4184
+ ? t("section.sets")
4185
+ : isBest
4186
+ ? t("section.best")
4187
+ : isDaily
4188
+ ? t("section.daily")
4189
+ : t("section.browse");
4190
+ const sectionCount = isUpdate
4191
+ ? ""
4192
+ : isSets
4193
+ ? (setsData ? format(t("sets.count"), { n: setsData.total || 0 }) : "")
4194
+ : isBest
4195
+ ? (bestData ? format(t("best.month"), { m: bestData.month || "" }) : "")
4196
+ : isDaily
4197
+ ? dateKey
4198
+ : countSub(data, t, cat.state.loading, "");
4199
+
4200
+ const TABS = [
4201
+ { value: "search", label: t("best.recommend") },
4202
+ { value: "best", label: t("best.picks") },
4203
+ { value: "sets", label: t("sets.tab") },
4204
+ { value: "daily", label: t("daily.tab") },
4205
+ { value: "update", label: t("updates.tab") },
4206
+ ];
4207
+
3910
4208
  /* 各分支各自成段。写成嵌套三元再 spread 已经难以核对,分支越多越该先算好 body。 */
3911
4209
  const body = isUpdate
3912
4210
  ? [h(UpdateView, { key: "update", scope: "tab" })]
@@ -3929,19 +4227,58 @@ window.__ModuleLoader__.load({
3929
4227
  h("div", { className: "dph_list", key: "blist" }, renderBest(bestData, best.copiedCmd, best.markCopied)),
3930
4228
  ]
3931
4229
  : [
3932
- state.daily ? dailyCard(best, cat.copiedCmd, cat.markCopied, { dateKey: dateKey }) : null,
3933
4230
  controls(cat),
3934
4231
  cat.state.error ? h(Notice, { key: "error", kind: "bad", text: t("state.failed") + ":" + cat.state.error }) : null,
3935
4232
  cat.state.loading && cat.plugins.length === 0 ? h(Notice, { key: "loading", text: t("state.loading") }) : null,
3936
4233
  !cat.state.loading && !cat.state.error && cat.plugins.length === 0 ? h(Notice, { key: "empty", text: t("state.empty") }) : null,
3937
4234
  h(CompareBar, { key: "cmpBar", open: comparing, onToggle: () => setComparing((value) => !value) }),
3938
4235
  comparing ? h(CompareTable, { key: "cmp", copiedCmd: cat.copiedCmd, markCopied: cat.markCopied }) : null,
3939
- h("div", { className: "dph_list", key: "list" }, cat.plugins.map((item) => renderCard(item, cat.copiedCmd, cat.markCopied, false, true))),
4236
+ h("div", { className: "dph_list", key: "list" }, cat.plugins.map((item) => renderCard(item, cat.copiedCmd, cat.markCopied, false, true, true))),
3940
4237
  ];
3941
- return h("div", { className: "dph_root" }, [
3942
- h("div", { className: "dph_header", key: "header" }, [
4238
+
4239
+ /* ── 侧栏:今日推荐(「每日推荐」视图里正文已经是这条,不重复)+ 各小类冠军 + 安装须知 ── */
4240
+ const showRailDaily = state.daily && !isDaily;
4241
+ const highlights = bestData ? pickHighlights(bestData, 3) : [];
4242
+ const subCount = bestData && Array.isArray(bestData.categories)
4243
+ ? bestData.categories.reduce((total, entry) => total + (Array.isArray(entry.subs) ? entry.subs.length : 0), 0)
4244
+ : 0;
4245
+ const highlightCard = highlights.length
4246
+ ? h("div", { className: "dph_railCard", key: "top3" }, [
4247
+ h("p", { className: "dph_railLabel", key: "label" }, t("rail.highlights")),
4248
+ ...highlights.map((entry, index) => {
4249
+ const name = entry.item.nameZh || entry.item.name || entry.item.fullName || "";
4250
+ const weekly = Number(entry.item.weeklyDownloads);
4251
+ return h("div", { className: "dph_top3", key: entry.key }, [
4252
+ h("span", { className: "dph_top3Rank", key: "rank" }, String(index + 1)),
4253
+ h("span", { className: "dph_top3Name", key: "name", title: name }, name),
4254
+ h("span", { className: "dph_top3Num", key: "num", title: format(t("rail.week"), { n: Number.isFinite(weekly) ? weekly.toLocaleString() : "—" }) },
4255
+ Number.isFinite(weekly) && weekly > 0 ? weekly.toLocaleString() : "—"),
4256
+ ]);
4257
+ }),
4258
+ h("div", { className: "dph_railDivider", key: "foot" }, [
4259
+ format(t("rail.highlightsHint"), { n: String(subCount), m: String(bestData.month || "") }),
4260
+ h("br", { key: "br" }),
4261
+ h("a", {
4262
+ className: "dph_railLink",
4263
+ key: "more",
4264
+ href: SITE + "/best",
4265
+ target: "_blank",
4266
+ rel: "noopener noreferrer",
4267
+ onClick: () => track("plugin_hub", { action: "site_click", scope: "rail_board" }),
4268
+ }, t("rail.viewBoard")),
4269
+ ]),
4270
+ ])
4271
+ : null;
4272
+ const installCard = h("div", { className: "dph_railCard", key: "install" }, [
4273
+ h("p", { className: "dph_railLabel", key: "label" }, t("rail.install")),
4274
+ h("p", { className: "dph_railDesc", key: "body" }, t("rail.installTip")),
4275
+ state.restartPending ? h("p", { className: "dph_railDesc dph_railWarn", key: "pending" }, t("rail.restartPending")) : null,
4276
+ ]);
4277
+
4278
+ return h("div", { className: "dph_work" }, [
4279
+ h("div", { className: "dph_workHead", key: "header" }, [
3943
4280
  h("h2", { className: "dph_title", key: "title" }, t("view.title")),
3944
- h("span", { className: "dph_sub", key: "sub" }, sub),
4281
+ headSub ? h("span", { className: "dph_sub", key: "sub" }, headSub) : null,
3945
4282
  h("span", { className: "dph_spacer", key: "gap" }),
3946
4283
  h("a", {
3947
4284
  className: "dph_btn",
@@ -3953,20 +4290,33 @@ window.__ModuleLoader__.load({
3953
4290
  }, t("action.openSite")),
3954
4291
  h("button", { className: "dph_btn", key: "refresh", type: "button", onClick: isUpdate ? () => loadUpdates(true) : isSets ? sets.refresh : (isBest || isDaily) ? best.refresh : cat.refresh }, t("action.refresh")),
3955
4292
  ]),
3956
- /* 单元素不要写成数组:[seg(...)] 这种"数组里塞一个无 key 元素"会触发
3957
- React 的 key 警告(实测)。直接作为唯一子节点传入即可。 */
3958
- h("div", { className: "dph_bar", key: "seg" }, seg([
3959
- { value: "search", label: t("best.recommend") },
3960
- { value: "best", label: t("best.picks") },
3961
- { value: "sets", label: t("sets.tab") },
3962
- { value: "daily", label: t("daily.tab") },
3963
- { value: "update", label: t("updates.tab") },
3964
- ], mode, setMode)),
3965
- /* 待重启横幅挂在视图切换之下、结果区之上:不跟着卡片滚走,切视图也在 */
3966
- h(RestartBanner, { scope: "tab", key: "rbanner" }),
3967
- ...body,
3968
- h("div", { className: "dph_footer", key: "hint" }, t("footer.hint")),
3969
- h("div", { className: "dph_footer", key: "tel" }, h("div", { className: "dph_footToggles" }, [telemetryToggle(), floatToggle()])),
4293
+ /* 页签是页级导航:用下划线而不是分段按钮 —— 原来那枚 seg 与正文控件同规格,
4294
+ 读不出"它管着下面全部内容"(用户反馈"模块分布不清晰"的一部分)。 */
4295
+ h("div", { className: "dph_tabbar", key: "tabs" }, TABS.map((entry) =>
4296
+ h("button", {
4297
+ className: "dph_tab" + (mode === entry.value ? " dph_tabOn" : ""),
4298
+ key: entry.value,
4299
+ type: "button",
4300
+ "aria-current": mode === entry.value ? "page" : undefined,
4301
+ onClick: () => setMode(entry.value),
4302
+ }, entry.label))),
4303
+ h("div", { className: "dph_mainCol", key: "main" }, [
4304
+ h("div", { className: "dph_sectionHead", key: "sec" }, [
4305
+ h("h3", { className: "dph_sectionTitle", key: "t" }, sectionTitle),
4306
+ sectionCount ? h("span", { className: "dph_sectionCount", key: "c" }, sectionCount) : null,
4307
+ ]),
4308
+ /* 待重启横幅挂在区标题之下、结果区之上:不跟着卡片滚走,切视图也在 */
4309
+ h(RestartBanner, { scope: "tab", key: "rbanner" }),
4310
+ ...body,
4311
+ h("div", { className: "dph_footer", key: "hint" }, t("footer.hint")),
4312
+ h("div", { className: "dph_footer", key: "tel" }, h("div", { className: "dph_footToggles" }, [telemetryToggle(), floatToggle()])),
4313
+ ]),
4314
+ h("div", { className: "dph_rail", key: "rail" }, [
4315
+ showRailDaily
4316
+ ? h("div", { className: "dph_dailySlot", key: "dslot" }, railDailyCard(best, cat.copiedCmd, cat.markCopied, dateKey))
4317
+ : null,
4318
+ h("div", { className: "dph_railSlot", key: "rslot" }, [highlightCard, installCard].filter(Boolean)),
4319
+ ]),
3970
4320
  ]);
3971
4321
  }
3972
4322
 
@@ -4327,6 +4677,8 @@ window.__ModuleLoader__.load({
4327
4677
  exports.hashKey = hashKey;
4328
4678
  exports.flattenBest = flattenBest;
4329
4679
  exports.pickDaily = pickDaily;
4680
+ /* 侧栏「各小类冠军」的口径是纯函数,单独导出便于断言排序与去重边界 */
4681
+ exports.pickHighlights = pickHighlights;
4330
4682
  /* 供测试使用:本机路由的响应解析要能容忍非 JSON 正文(host 未重启的窗口期) */
4331
4683
  exports.readHostJson = readHostJson;
4332
4684
  /* 供测试使用:升级目标要还原成裸包名才能查 profile 清单 */
package/lib/index.js CHANGED
@@ -47,7 +47,7 @@ export const name = "dpharness";
47
47
  /** The dsh web server service used to register HTTP routes. */
48
48
  export const inject = ["webServer"];
49
49
 
50
- export const VERSION = "0.6.1";
50
+ export const VERSION = "0.6.3";
51
51
 
52
52
  /**
53
53
  * 本插件在 npm 上的包名 —— 与 dsh 的插件 id(上面的 `name = "dpharness"`)**不是一回事**,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-dpharness",
3
3
  "icon": "./icon.svg",
4
- "version": "0.6.1",
4
+ "version": "0.6.3",
5
5
  "description": "Curated dpharness.com plugin catalog inside the DeepSeek Harness Web GUI: a conversation-view tab, a sidebar entry and a dismissible site-wide floating panel, offering a searchable full catalog, a monthly by-category shortlist, a daily pick and an update check (this plugin plus every installed plugin) with a red-dot reminder, with one-click install via dshmarket or the dsh CLI. Includes a settings page (General row + Plugins tab) for the widget visibility, the daily pick, the update check and the opt-out telemetry relay covering the full install funnel.",
6
6
  "author": "zhanghao3693 <zhanghao3693@qq.com>",
7
7
  "repository": {