dsh-plugin-core 0.29.0 → 0.29.1

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.
Files changed (53) hide show
  1. package/dist/design/tokens-css.generated.d.ts +1 -1
  2. package/dist/design/tokens-css.generated.d.ts.map +1 -1
  3. package/dist/design/tokens-css.generated.js +1 -1
  4. package/dist/design/tokens-css.generated.js.map +1 -1
  5. package/dist/explorer/open.d.ts +9 -0
  6. package/dist/explorer/open.d.ts.map +1 -1
  7. package/dist/explorer/open.js +6 -4
  8. package/dist/explorer/open.js.map +1 -1
  9. package/dist/session/SessionViewModal.d.ts.map +1 -1
  10. package/dist/session/SessionViewModal.js +7 -4
  11. package/dist/session/SessionViewModal.js.map +1 -1
  12. package/dist/session/mirror/ChangedFileDiff.d.ts +2 -2
  13. package/dist/session/mirror/ChangedFileDiff.d.ts.map +1 -1
  14. package/dist/session/mirror/ChangedFileDiff.js +1 -6
  15. package/dist/session/mirror/ChangedFileDiff.js.map +1 -1
  16. package/dist/session/mirror/ContextInjectionRow.d.ts +18 -0
  17. package/dist/session/mirror/ContextInjectionRow.d.ts.map +1 -0
  18. package/dist/session/mirror/ContextInjectionRow.js +50 -0
  19. package/dist/session/mirror/ContextInjectionRow.js.map +1 -0
  20. package/dist/session/mirror/MessageItem.d.ts +17 -0
  21. package/dist/session/mirror/MessageItem.d.ts.map +1 -1
  22. package/dist/session/mirror/MessageItem.js +33 -1
  23. package/dist/session/mirror/MessageItem.js.map +1 -1
  24. package/dist/session/mirror/TurnTriggerNodeView.d.ts +2 -0
  25. package/dist/session/mirror/TurnTriggerNodeView.d.ts.map +1 -1
  26. package/dist/session/mirror/TurnTriggerNodeView.js +1 -1
  27. package/dist/session/mirror/TurnTriggerNodeView.js.map +1 -1
  28. package/dist/session/open-review.d.ts +2 -2
  29. package/dist/session/open-review.d.ts.map +1 -1
  30. package/dist/session/open-review.js +8 -3
  31. package/dist/session/open-review.js.map +1 -1
  32. package/dist/ui/PanelDock.d.ts.map +1 -1
  33. package/dist/ui/PanelDock.js +20 -18
  34. package/dist/ui/PanelDock.js.map +1 -1
  35. package/dist/ui/code-viewer-css.generated.d.ts +1 -1
  36. package/dist/ui/code-viewer-css.generated.d.ts.map +1 -1
  37. package/dist/ui/code-viewer-css.generated.js +1 -1
  38. package/dist/ui/code-viewer-css.generated.js.map +1 -1
  39. package/dist/ui/panel-dock-css.generated.d.ts +1 -1
  40. package/dist/ui/panel-dock-css.generated.d.ts.map +1 -1
  41. package/dist/ui/panel-dock-css.generated.js +1 -1
  42. package/dist/ui/panel-dock-css.generated.js.map +1 -1
  43. package/dist/utils/i18n.d.ts +1 -1
  44. package/dist/utils/i18n.d.ts.map +1 -1
  45. package/dist/utils/i18n.js +12 -0
  46. package/dist/utils/i18n.js.map +1 -1
  47. package/docs/design/style.md +1 -1
  48. package/docs/help/explorer.doc.ts +11 -5
  49. package/docs/help/explorer.md +5 -4
  50. package/docs/help/session.doc.ts +2 -2
  51. package/docs/help/session.md +2 -2
  52. package/docs/requirements.md +1 -1
  53. package/package.json +1 -1
@@ -63,8 +63,8 @@ const doc: DocTopic = {
63
63
  en: 'There is exactly one file exit: tool-card paths, inline mentions and delivered cards all go through `onOpenFile`; without it links degrade to plain text (clickable-looking but no exit — not a break). If you already own a preview surface, call yours inside the callback (core touches no DOM); otherwise wire core’s dock in one line: `onOpenFile: (path, sid) => openFilePreview({ mount: \'#page-row\', path, sessionId: sid })` — the mount takes an element or a selector, and the dialog needs no mask props.',
64
64
  },
65
65
  {
66
- zh: '变更文件的审阅出口是 `onOpenReview`,落点用 `openSessionReview({ mount, locator })` 一行接上:`locator`(sessionId / seq / index / display)到 diff 的拼装归会话域,调用方不挑组件、不塞节点、不补 ✕。面板关闭钮由 dock 出;`ChangedFileDiff.onClose` 只给自带壳的容器,不是关面板的手段。',
67
- en: 'The review exit for changed files is `onOpenReview`; wire it with one line, `openSessionReview({ mount, locator })`. Turning the locator (sessionId / seq / index / display) into a diff belongs to the session domain — pick no components, pass no nodes, add no ✕. The panel close belongs to the dock; `ChangedFileDiff.onClose` is for containers that own their own chrome, not a way to close the panel.',
66
+ zh: '变更文件的审阅出口是 `onOpenReview`,落点用 `openSessionReview({ mount, locator })` 一行接上:`locator`(sessionId / seq / index / display)到 diff 的拼装归会话域,调用方不挑组件、不塞节点、不补 ✕。审阅面板是无头的,`openSessionReview` 已把关闭钮画在审阅头行尾(与换行钮同排),你什么都不用做。',
67
+ en: 'The review exit for changed files is `onOpenReview`; wire it with one line, `openSessionReview({ mount, locator })`. Turning the locator (sessionId / seq / index / display) into a diff belongs to the session domain — pick no components, pass no nodes, add no ✕. The review panel is headerless, so `openSessionReview` already draws the close button at the end of the review header row (next to the wrap toggle); nothing left for you to do.',
68
68
  },
69
69
  {
70
70
  zh: '限制:官方样式未注入时回退自绘观感(功能不受影响);长会话一次全渲染,用「加载更早记录」向前翻页;👍👎 反馈走官方 slots,弹窗没有该插槽。',
@@ -26,9 +26,9 @@
26
26
 
27
27
  > EN: There is exactly one file exit: tool-card paths, inline mentions and delivered cards all go through `onOpenFile`; without it links degrade to plain text (clickable-looking but no exit — not a break). If you already own a preview surface, call yours inside the callback (core touches no DOM); otherwise wire core’s dock in one line: `onOpenFile: (path, sid) => openFilePreview({ mount: '#page-row', path, sessionId: sid })` — the mount takes an element or a selector, and the dialog needs no mask props.
28
28
 
29
- 变更文件的审阅出口是 `onOpenReview`,落点用 `openSessionReview({ mount, locator })` 一行接上:`locator`(sessionId / seq / index / display)到 diff 的拼装归会话域,调用方不挑组件、不塞节点、不补 ✕。面板关闭钮由 dock 出;`ChangedFileDiff.onClose` 只给自带壳的容器,不是关面板的手段。
29
+ 变更文件的审阅出口是 `onOpenReview`,落点用 `openSessionReview({ mount, locator })` 一行接上:`locator`(sessionId / seq / index / display)到 diff 的拼装归会话域,调用方不挑组件、不塞节点、不补 ✕。审阅面板是无头的,`openSessionReview` 已把关闭钮画在审阅头行尾(与换行钮同排),你什么都不用做。
30
30
 
31
- > EN: The review exit for changed files is `onOpenReview`; wire it with one line, `openSessionReview({ mount, locator })`. Turning the locator (sessionId / seq / index / display) into a diff belongs to the session domain — pick no components, pass no nodes, add no ✕. The panel close belongs to the dock; `ChangedFileDiff.onClose` is for containers that own their own chrome, not a way to close the panel.
31
+ > EN: The review exit for changed files is `onOpenReview`; wire it with one line, `openSessionReview({ mount, locator })`. Turning the locator (sessionId / seq / index / display) into a diff belongs to the session domain — pick no components, pass no nodes, add no ✕. The review panel is headerless, so `openSessionReview` already draws the close button at the end of the review header row (next to the wrap toggle); nothing left for you to do.
32
32
 
33
33
  限制:官方样式未注入时回退自绘观感(功能不受影响);长会话一次全渲染,用「加载更早记录」向前翻页;👍👎 反馈走官方 slots,弹窗没有该插槽。
34
34
 
@@ -160,7 +160,7 @@ dsh-plugin-core/
160
160
  类并补 `display:flex`,关闭时还原;子项规则只让第一个非预览子项伸展,不要传 `document.body`;
161
161
  - 依据:插件沙箱里没有 `fs`,读字节唯一通道是 ctx 注入的服务对象 ⇒ 服务只能「接线一次」交进来,
162
162
  不能每次调用各传一遍(这是权限边界,不是能力缺口)。
163
- - **关闭钮归面板壳**(2026-11-04 用户拍板):`openFilePreview` 的 dock 一律用壳的浮动 ✕(`closeButton: 'floating'`,文件 / content 两种模式位置一致),`FileBrowser` 不再接 `onClose`(它的 `onClose` 只留给无壳的 picker 弹窗);内容组件(`ChangedFileDiff` 等)不画关,只在右上让 28px。根因:关在内容上曾是可选 prop,漏传即整块面板无关闭钮(dsh-task-ledger 报的缺陷)。`content` 与 `path` 同传 ⇒ warn 并忽略 `path`(`handle.path` 不再回报未生效的路径)。
163
+ - **关钮可退让**(2026-11-04 用户拍板,同日二次修正):`openFilePreview` 默认**不在面板层画关钮**(`closeButton: 'none'`)—— 文件模式用 `FileBrowser` 面包屑行尾那枚,`content` 模式由内容自己画;新增 `OpenFilePreviewOptions.closeButton`,传 `'floating'` 才由壳在右上出一枚。审阅面板(`openSessionReview`)的 ✕ 画在审阅头行尾,与换行钮同排。理由:无头面板画不画、画在哪归调用方,dock 不强制浮动。`content` 与 `path` 同传 ⇒ warn 并忽略 `path`(`handle.path` 不再回报未生效的路径)。
164
164
  - 控件纪律(2026-10-21):核心有的控件一律核心(`Button` ghost 面包屑 / `IconButton` / `Segmented` / `MarqueeText` / `PanelDock`);核心没有的那一项(▾ 选层浮层)严格按兄弟项目度量照抄
165
165
  - 选工作区(`WorkspacePicker`)在 `ui`,不在这里;`FilePicker` 已删(2026-10-20)
166
166
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-core",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "packageManager": "pnpm@12.3.4",
5
5
  "description": "Shared base for DSH plugins: design tokens, UI controls, utils, workspace explorer, session preview",
6
6
  "keywords": [