dsh-dpharness 0.6.9 → 0.6.10

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,15 @@ export function npmLatestUrl(pkg) {
37
37
  * (用户要看的是行为变化,不是我们的 commit 分类)。
38
38
  */
39
39
  export const CHANGELOG = [
40
+ {
41
+ version: "0.6.10",
42
+ date: "2026-10-27",
43
+ title: "「今日推荐」点开分享后,卡片不再被撑破",
44
+ items: [
45
+ "侧栏今日推荐卡里点「分享」:按钮不再溢出卡片右边界,「复制命令」也不会被挤到下一行。收起留在原位,复制链接 / 复制文案 / 说明图各占一格。",
46
+ "窗口拉窄成单列时,命令条改成真正的一行排开,不再出现半屏宽的按钮。",
47
+ ],
48
+ },
40
49
  {
41
50
  version: "0.6.9",
42
51
  date: "2026-10-24",
package/lib/client.js CHANGED
@@ -331,10 +331,26 @@ window.__ModuleLoader__.load({
331
331
  ".dph_cardFav{border-left:3px solid var(--dsw-alias-state-business-primary);padding-left:11px}",
332
332
  /* 选中卡里的主按钮改回白底:浅蓝底 + 蓝描边按钮叠在一起会糊成一片 */
333
333
  ".dph_cardOn .dph_btnPrimary{background:var(--dsw-alias-bg-layer-1)}",
334
- /* 右栏命令条是两列网格:命令跨两列,复制/分享各占一格(展开态自然排成 2×2) */
334
+ /* 右栏命令条是两列网格:命令跨两列,复制/分享各占一格 */
335
335
  ".dph_cmdbarCol .dph_cmdbarCode{grid-column:1/-1;font-size:11.5px}",
336
336
  ".dph_cmdbarCol .dph_shareWrap,.dph_cmdbarCol .dph_shareWrap .dph_btn{width:100%}",
337
337
  ".dph_cmdbarCol .dph_shareWrap .dph_btn{height:28px;padding:0 6px;font-size:11.5px}",
338
+ /* 侧栏窄格里的分享展开态(2026-10-27 真机截图:「今日推荐」点开分享后 UI 错乱):
339
+ 原先 4 个动作一起塞进命令条的一个 1fr 单元格,nowrap 按钮的 min-content 把
340
+ 轨道撑开 ⇒ 命令条溢出卡片右边界、「复制命令」被挤到下一行、说明图单独漂在底部。
341
+ 现在收起留在原格(与复制命令同排),三个动作跨满整行按 2 列排,说明图独占末行。
342
+ ⚠️ 只在 .dph_shareWrapStack(stack=true 的唯一调用点:今日推荐侧栏卡)生效,
343
+ 浮窗 372px 与宽命令条 700px 的既有排布不受影响 —— 那两处实测本来就是通的。 */
344
+ ".dph_cmdbarCol .dph_shareToggle{width:100%}",
345
+ ".dph_cmdbarCol .dph_shareWrapStack{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:6px;width:100%}",
346
+ ".dph_cmdbarCol .dph_shareWrapStack .dph_shareCard{grid-column:1/-1}",
347
+ /* 窄屏(<900px)时 .dph_rail 变 display:contents,今日推荐卡横跨整行 —— 212px 那一套
348
+ 「命令跨两列 + 复制/分享各占一格」的 2 列网格在这里会变成两颗 500px 的巨型按钮。
349
+ 媒体查询里原本写的 flex-direction:row 对 grid 元素无效(那时候还没改成 grid),
350
+ 这里把它落实成真正的横排:命令弹性收窄,动作按内容宽,放不下就整组换行。
351
+ 顺带收掉同断点的 .dph_instRow .dph_btn min-width:50% —— 那是给 212px 侧栏量的,
352
+ 整行卡片里会把「安装」按钮拉成半屏宽。 */
353
+ "@media (max-width:900px){.dph_cmdbarCol{display:flex;flex-wrap:wrap;align-items:center}.dph_cmdbarCol .dph_cmdbarCode{flex:1;min-width:0}.dph_cmdbarCol .dph_shareWrap{width:auto}.dph_cmdbarCol .dph_shareWrap .dph_btn{width:auto;padding:0 12px;font-size:12px}.dph_cmdbarCol .dph_shareToggle{width:auto;padding:0 12px;font-size:12px}.dph_cmdbarCol .dph_shareWrapStack{display:inline-flex;flex-wrap:wrap;gap:4px;width:auto}.dph_cmdbarCol .dph_shareWrapStack .dph_btn{width:auto;padding:0 12px;font-size:12px}.dph_railCard .dph_instRow .dph_btn{min-width:0}}",
338
354
  /* 响应式(2026-10-21):主列单栏时宽卡也拆单列,操作轨道转横排成一条动作行 */
339
355
  "@media (max-width:900px){.dph_cardLg{grid-template-columns:minmax(0,1fr);gap:10px}.dph_opRail{flex-direction:row;flex-wrap:wrap;margin-top:2px;padding-top:10px;border-top:1px solid var(--dsw-alias-border-l2)}.dph_opRail .dph_btn{flex:1 1 0;min-width:0}.dph_rail{position:static}}",
340
356
  ].join("");
@@ -3356,6 +3372,12 @@ window.__ModuleLoader__.load({
3356
3372
  const item = props.item || {};
3357
3373
  const fullName = typeof item.fullName === "string" ? item.fullName : "";
3358
3374
  const scope = props.scope || "";
3375
+ /* stack(2026-10-27)只换「动作怎么摆」,不动任何行为:
3376
+ 212px 侧栏的命令条是 2 列 grid,展开后 4 个动作挤在同一个单元格里会撑破轨道
3377
+ (真机截图:按钮溢出卡片右边界、复制命令被挤到下一行)。
3378
+ stack=true 时收起留在原格,另外三个动作作为一整块跨满行 —— 见 CSS 注释。
3379
+ 其余调用点(浮窗 372px / 宽命令条 700px / 窄卡行内)不传,排布与原来逐像素一致。 */
3380
+ const stack = !!props.stack;
3359
3381
  const [open, setOpen] = react.useState(false);
3360
3382
  const [done, setDone] = react.useState("");
3361
3383
  /* 没有 owner/repo 就拼不出详情页(站点 /plugin/<owner>/<repo> 需要两段)——
@@ -3370,7 +3392,7 @@ window.__ModuleLoader__.load({
3370
3392
  track("plugin_hub", { action: kind === "link" ? "share_link" : "share_text", scope });
3371
3393
  });
3372
3394
  const toggle = h("button", {
3373
- className: "dph_btn" + (open ? " dph_btnPrimary" : ""),
3395
+ className: "dph_btn" + (stack ? " dph_shareToggle" : "") + (open ? " dph_btnPrimary" : ""),
3374
3396
  key: "toggle",
3375
3397
  type: "button",
3376
3398
  title: open ? t("share.closeHint") : t("share.toggle"),
@@ -3384,8 +3406,7 @@ window.__ModuleLoader__.load({
3384
3406
  400px 浮窗里多一个按钮就多占一行,而这两个本来就是同一个开关。 */
3385
3407
  }, open ? t("share.collapse") : t("share.action"));
3386
3408
  if (!open) return h("span", { className: "dph_shareWrap", key: "share" }, [toggle]);
3387
- return h("span", { className: "dph_shareWrap dph_shareWrapOpen", key: "share" }, [
3388
- toggle,
3409
+ const acts = [
3389
3410
  h("button", {
3390
3411
  className: "dph_btn dph_btnSm",
3391
3412
  key: "link",
@@ -3401,7 +3422,7 @@ window.__ModuleLoader__.load({
3401
3422
  onClick: () => copy("text", shareTextOf(item)),
3402
3423
  }, done === "text" ? t("action.copied") : t("share.text")),
3403
3424
  h("a", {
3404
- className: "dph_btn dph_btnSm",
3425
+ className: "dph_btn dph_btnSm" + (stack ? " dph_shareCard" : ""),
3405
3426
  key: "card",
3406
3427
  href: shareCardOf(fullName),
3407
3428
  target: "_blank",
@@ -3409,7 +3430,16 @@ window.__ModuleLoader__.load({
3409
3430
  title: t("share.cardHint"),
3410
3431
  onClick: () => track("plugin_hub", { action: "share_card", scope }),
3411
3432
  }, t("share.card")),
3412
- ]);
3433
+ ];
3434
+ if (stack) {
3435
+ /* Fragment 不产生盒子:两个子项直接成为命令条 grid 的项 ——
3436
+ 收起落在「复制命令」右边那一格,动作块因 grid-column:1/-1 自动落到下一行。 */
3437
+ return h(react.Fragment, { key: "share" }, [
3438
+ toggle,
3439
+ h("span", { className: "dph_shareWrap dph_shareWrapOpen dph_shareWrapStack", key: "acts" }, acts),
3440
+ ]);
3441
+ }
3442
+ return h("span", { className: "dph_shareWrap dph_shareWrapOpen", key: "share" }, [toggle].concat(acts));
3413
3443
  }
3414
3444
 
3415
3445
  /**
@@ -4895,8 +4925,10 @@ window.__ModuleLoader__.load({
4895
4925
  }),
4896
4926
  }, copiedCmd === item.cmd ? t("action.copied") : t("action.copy")),
4897
4927
  /* 侧栏这条命令条是**自建**的(不走 renderCard),所以分享要单独接一次。
4898
- 2026-10-21 首版漏了这一处:用户在真机截图里发现"今日推荐卡没有分享"。 */
4899
- h(ShareUnit, { item: item, scope: "rail", key: "share" }),
4928
+ 2026-10-21 首版漏了这一处:用户在真机截图里发现"今日推荐卡没有分享"。
4929
+ stack=true(2026-10-27):这个格子只有 88px,展开的四个动作放不下 ——
4930
+ 改成"收起留在原格 + 三个动作跨满行",否则会撑破卡片。 */
4931
+ h(ShareUnit, { item: item, scope: "rail", stack: true, key: "share" }),
4900
4932
  ])
4901
4933
  : null,
4902
4934
  item.reason ? h("p", { className: "dph_railWhy", key: "why" }, t("daily.why") + ":" + item.reason) : null,
package/lib/index.js CHANGED
@@ -48,7 +48,7 @@ export const name = "dpharness";
48
48
  /** The dsh web server service used to register HTTP routes. */
49
49
  export const inject = ["webServer"];
50
50
 
51
- export const VERSION = "0.6.9";
51
+ export const VERSION = "0.6.10";
52
52
 
53
53
  /**
54
54
  * 本插件在 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.9",
4
+ "version": "0.6.10",
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": {