@xrn1997/dsh-session-delete 0.14.0 → 0.14.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.
package/LICENSE CHANGED
@@ -1,201 +1,201 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2026 xrn1997
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 xrn1997
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/cordis.patch.yml CHANGED
@@ -1,7 +1,7 @@
1
- - insert:
2
- - id: xrn1997-session-delete
3
- name: '@xrn1997/dsh-session-delete'
4
- config:
5
- orphanPreviewLimit: 200
6
- maxAttachmentBytes: 20971520
7
- maxJsonRefBytes: 10485760
1
+ - insert:
2
+ - id: xrn1997-session-delete
3
+ name: '@xrn1997/dsh-session-delete'
4
+ config:
5
+ orphanPreviewLimit: 200
6
+ maxAttachmentBytes: 20971520
7
+ maxJsonRefBytes: 10485760
package/docs/DETAIL.md CHANGED
@@ -1 +1 @@
1
- ![Trash panel illustration: session rows grouped by project in the left column (restore and delete-forever buttons at each row's right), session info, the "Work steps" bar and a conversation preview in the right column, and the page's only solid red "Empty trash…" button in the footer](preview.svg)
1
+ ![Trash panel illustration: session rows grouped by project in the left column (restore and delete-forever buttons at each row's right), session info, the "Work steps" bar and a conversation preview in the right column, and the page's only solid red "Empty trash…" button in the footer](preview.svg)
package/docs/DETAIL.zh.md CHANGED
@@ -1 +1 @@
1
- ![回收站面板示意:左列是按项目分组的会话行(行右是恢复与彻底删除按钮),右栏是会话信息与「工作步骤」折叠条和对话预览,页脚是整页唯一的实心红按钮「清空回收站…」](preview.zh.svg)
1
+ ![回收站面板示意:左列是按项目分组的会话行(行右是恢复与彻底删除按钮),右栏是会话信息与「工作步骤」折叠条和对话预览,页脚是整页唯一的实心红按钮「清空回收站…」](preview.zh.svg)
package/lib/client.js CHANGED
@@ -934,11 +934,11 @@ window.__ModuleLoader__.load({
934
934
  }
935
935
  };
936
936
  }
937
- /** 引用归一:回调只经这份 ref 读最新值,身份恒稳、可进 effect 依赖(写回在 effect 里,与渲染期只读约定一致)。
937
+ /** 引用归一:回调只经这份 ref 读最新值,身份恒稳、可进 effect 依赖(layout 阶段写回:既遵守渲染期只读约定,又保证同帧后续 layout effect 与事件处理都能直接读到最新输入)。
938
938
  * 别在调用方再手写「useRef + 每渲染写回」(issue #8 第 3 条)。 */
939
939
  function useLatest(value) {
940
940
  const ref = (0, react.useRef)(value);
941
- (0, react.useEffect)(() => {
941
+ (0, react.useLayoutEffect)(() => {
942
942
  ref.current = value;
943
943
  });
944
944
  return ref;
@@ -3320,7 +3320,7 @@ window.__ModuleLoader__.load({
3320
3320
  var layout_default = "/**\n * 清单行 / 行内动作 / 工作步骤开关的**本插件自造规则**(不在抄本对照表里)。\n *\n * 为什么不并进 `ui.css`:那份是照宿主 `dsh-client-ui-primitives` 明文逐字抄的对照表,\n * `docs/development.md` 的界面保真复核门要求它与官方逐属性一致(差异只允许文件头列出的那几处)。\n * 把自造规则混进去会把那次核对弄脏——同 `forms.css` 文件头给的理由。\n *\n * 为什么非要有个 CSS 文件:`trash-view.ts` 的 `ROW` 是 inline style,而 inline style 表达不了\n * `:hover` / `:focus-within` / `prefers-reduced-motion`。动作列的低强调与提亮、分段开关的选中态\n * 本身就是伪类。\n *\n * 配色只用宿主**公开** token(`--dsw-alias-*`)与本插件的 `--sd-*` 别名层(后者在 `ui.css` 顶部\n * 定义、逐条退到公开 token)。**悬停一律走 `--sd-interactive-bg-hover`**(宿主交互悬停档,半透明叠色):\n * `bg-layer-1` / `bg-layer-2` 在浅色主题下与页面底色同值,拿它们做悬停等于没变色(2026-11-07 真机反馈)。\n */\n\n/* 悬停档为什么是 `--sd-interactive-bg-hover`:判据住文件头注。\n 选中态的底色写在元素上(`ROW_SELECTED`),伪类打不过它,所以选中 + 悬停同时成立时\n 看到的是选中那一档,不会在鼠标经过时闪回浅色。\n 行与组头认的是 `session-list.tsx` 交出的**类名**,不是档位的 `data-*` 值:两档吃同一份规则,\n 少写一条就只会有一档变样——2026-11 那次归档档缺焦点环、缺提亮就是这么漂出来的。 */\n.sd-session-row:hover {\n background: var(--sd-interactive-bg-hover);\n}\n\n/*\n * 行内动作:两颗图标按钮**常驻**,默认低强调,悬停 / 键盘落到这一行 / 这一行被选中时提亮;\n * 窄档(面板根 `.sd-narrow`)常亮——触屏没有 hover,点行即下钻,不能要求\"先选中才出场\"。\n *\n * 用 `opacity` 而不是 `visibility` 或 `display`:两颗按钮始终住在自己的 `gridcell` 里、\n * 始终在可访问性树内(docs/ui-spec.md 状态④)。\n */\n.sd-icon-btn {\n box-sizing: border-box;\n width: 28px;\n height: 28px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: 0;\n border: none;\n border-radius: var(--sd-radius-sm);\n background: transparent;\n color: var(--sd-label-tertiary);\n cursor: pointer;\n opacity: 0.55;\n transition: opacity 120ms ease-out, background-color 120ms ease-out, color 120ms ease-out;\n}\n\n.sd-session-row:hover .sd-icon-btn,\n.sd-session-row:focus-within .sd-icon-btn,\n.sd-session-row[aria-selected='true'] .sd-icon-btn,\n.sd-narrow .sd-session-row .sd-icon-btn {\n opacity: 1;\n}\n\n.sd-icon-btn:hover:not(:disabled) {\n background: var(--sd-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.sd-icon-btn-danger:hover:not(:disabled) {\n color: var(--dsw-alias-state-error-primary);\n}\n\n/* 禁用态要压过上一组的提亮(那一组是 0,3,0):写入在飞时按钮不能看起来还能点。 */\n.sd-session-row .sd-icon-btn:disabled,\n.sd-narrow .sd-session-row .sd-icon-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* 为什么不能依赖宿主焦点环 token:住 `ui.css` 的清单行注释。图标按钮没有裁切,环画在外侧一档。 */\n.sd-icon-btn:focus-visible {\n outline: 1px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n/* 工具行的图标钮没有行级 hover 可依赖(基础 0.55 是给清单行「悬停提亮」的):常亮。\n 多选按下态与 `.sd-seg button[aria-pressed='true']` 同一对 token;写在 `.sd-icon-btn:hover` 之后,\n 同等特异性按后写取胜——否则悬停时会被 hover 档抢回 label-primary。 */\n.sd-toolbar .sd-icon-btn { opacity: 1; }\n\n.sd-toolbar .sd-icon-btn[aria-pressed='true'] {\n background: var(--sd-button-ghost-active-fill);\n color: var(--dsw-alias-brand-primary);\n}\n\n.sd-toolbar .sd-icon-btn[aria-pressed='true']:hover:not(:disabled) {\n background: var(--sd-button-ghost-active-fill);\n color: var(--dsw-alias-brand-primary);\n}\n\n/* 禁用态压过「常亮」:例外帧里清单没有行时(工具行因多选态或检索词仍在场),被禁用的那颗开关\n 得看起来点不动(与旧文字钮同档;多选态下「退出多选」仍必须可点)。原生 disabled 按钮不吃\n hover/focus ⇒ 此时 tooltip 不出现;名字仍由 `aria-label` 交给读屏。 */\n.sd-toolbar .sd-icon-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/*\n * 工作步骤展示的分段开关(简洁 / 标准 / 详细 / 完全展开)。与工具栏按钮同族的几何;\n * 选中态走宿主\"紧按\"那一档底色与品牌色。原生 `<select>` 与插件其余控件不是一套长相,\n * 所以这里做成四段平铺。\n */\n.sd-seg {\n display: inline-flex;\n flex: none;\n border: 0.5px solid var(--dsw-alias-border-l2);\n border-radius: var(--sd-radius-sm);\n overflow: hidden;\n}\n\n.sd-seg button {\n border: none;\n background: transparent;\n padding: 3px 8px;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--sd-label-tertiary);\n cursor: pointer;\n transition: background-color 120ms ease-out, color 120ms ease-out;\n}\n\n.sd-seg button:hover {\n background: var(--sd-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n.sd-seg button[aria-pressed='true'] {\n background: var(--sd-button-ghost-active-fill);\n color: var(--dsw-alias-brand-primary);\n font-weight: 500;\n}\n\n/* `.sd-seg` 的 `overflow: hidden` 会裁掉外描边,环画在内侧一档;颜色与图标按钮同一枚品牌色。 */\n.sd-seg button:focus-visible {\n outline: 1px solid var(--dsw-alias-brand-primary);\n outline-offset: -1px;\n}\n\n/* 面板头两档(回收站 / 归档)用大号分段:与旧版 H1 同档(16px / 600 / 24px 行高),\n 两档同尺寸;计数退一档小号等宽数字,不跟着标题一起放大。 */\n.sd-seg-lg {\n border-radius: var(--sd-radius-md);\n}\n\n.sd-seg-lg button {\n padding: 4px 10px;\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n}\n\n.sd-seg-lg button[aria-pressed='true'] {\n font-weight: 600;\n}\n\n.sd-seg-lg .sd-seg-count {\n margin-left: 6px;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n font-variant-numeric: tabular-nums;\n}\n\n/* 子会话段:摘要条与标题排徽标都是按钮,底色只能写在这里——内联底色会压过 `:hover`,\n 悬停就永远不可见(判据同文件头)。摘要条里的标签/计数取主色与品牌实心徽标,颜色走内联。\n 孩子导航行同一条判据:底色不内联,悬停才有反馈。 */\n[data-dsh-session-delete=\"session-subagents-toggle\"],\n[data-dsh-session-delete=\"session-subagents-jump\"],\n[data-dsh-session-delete=\"session-subagent-row\"] {\n background: transparent;\n}\n\n[data-dsh-session-delete=\"session-subagents-toggle\"]:hover,\n[data-dsh-session-delete=\"session-subagents-jump\"]:hover,\n[data-dsh-session-delete=\"session-subagent-row\"]:hover {\n background: var(--sd-interactive-bg-hover);\n}\n\n[data-dsh-session-delete=\"session-subagents-toggle\"]:focus-visible,\n[data-dsh-session-delete=\"session-subagents-jump\"]:focus-visible,\n[data-dsh-session-delete=\"session-subagent-row\"]:focus-visible {\n outline: 1px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n/* 子会话导航行:标题是主要信息,取 primary;折叠头那套类已不套在导航行上\n (chevron 只留给原地展开)。大小/时间仍由各自的 `BLOCK_META` 保持 tertiary。 */\n[data-dsh-session-delete=\"session-subagent-row\"],\n[data-dsh-session-delete=\"session-subagent-row\"]:hover {\n color: var(--dsw-alias-label-primary);\n}\n\n/*\n * 分组头的开合指示:与宿主工作区行同法(`Rows.module.css` 的 `.projectRow` 那一族)——\n * 默认显示**官方文件夹图标**(展开=开盖 `IconFolderOpenRegular`、收起=闭盒 `IconFolderCloseRegular`);\n * 鼠标经过时文件夹隐去、换成**实心三角**并旋转 90°(150ms,宿主原文的时长)。\n * 触屏没有 hover,文件夹本身就是开合状态;键盘用户的 aria-expanded 仍在按钮上。\n */\n.sd-session-group-row .sd-group-chevron {\n display: none;\n}\n\n@media (hover: hover) {\n .sd-session-group-row:hover .sd-group-chevron {\n display: inline-flex;\n }\n\n .sd-session-group-row:hover .sd-group-folder {\n display: none;\n }\n}\n\n.sd-group-arrow {\n display: inline-flex;\n transition: transform 150ms ease-in-out;\n}\n\n.sd-group-arrow-open {\n transform: rotate(90deg);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sd-icon-btn,\n .sd-seg button {\n transition: none;\n }\n\n .sd-group-arrow {\n transition: none;\n }\n}\n\n/*\n * 清单 / 详情两栏**无条件**预留滚动条槽:宿主 composer 在视图标签之间横移过 4px\n * (滚动条占布局,两个分支量到的宽度不同),修法就是无条件预留;`DetailDocument` 也这么做。\n * 判据:滚动条的出现/消失不许改变正文宽度(否则切换条目时整栏文字横向重排 5px)。\n */\n.sd-stable-scroll {\n scrollbar-gutter: stable;\n}\n\n/*\n * 首次读数的骨架条:颜色走 `--sd-bg-skeleton`(私有 token 带公开兜底,见 `ui.css` 别名单),\n * 脉冲与宿主 `DetailDocument` 的 `dsh-plugin-detail-skeleton` 同档(2s,reduced-motion 关)。\n * 换条目不再走到这里(详情保持),所以这条动画只服务\"真的没有上一条\"的首次。\n */\n.sd-skeleton-bar {\n background: var(--sd-bg-skeleton);\n animation: sd-skeleton-pulse 2s cubic-bezier(0.36, 0, 0.64, 1) infinite;\n}\n\n@keyframes sd-skeleton-pulse {\n 0% { opacity: 1; }\n 40% { opacity: 0.6; }\n 80%, 100% { opacity: 1; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sd-skeleton-bar {\n animation: none;\n }\n}\n\n/*\n * 提问轨(ADR-0057):贴详情正文栏右缘常驻,一句用户提问一格;不做列表、不做弹层,零开合。\n *\n * 水平位置与宽度**不在这里**:右缘是正文列宽的函数(`100% - DETAIL_TEXT_MAX_WIDTH`),由\n * `detail-pane.tsx` 算好以行内 `right` 交给 `PromptRail`;轨宽是 `PromptRail` 的 `RAIL_WIDTH`\n * (行内 `width`)——样式表里写死任何一份,都会与 `detail-pane.tsx` 的 `RAIL_GUTTER` / `DETAIL_INNER` 漂开。\n * 这里只管竖直居中与叠放次序。\n *\n * 预览卡用 `--sd-elevation-prominent` + 边框浮在正文上;`pointer-events: none` 不挡点击。\n */\n.sd-prompt-rail {\n position: absolute;\n z-index: 5;\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* 轨内自己滚:条数多时不把整页带着滚,也不留可见滚动条。 */\n.sd-prompt-rail-scroll {\n display: flex;\n flex-direction: column;\n max-height: 420px;\n overflow-y: auto;\n padding: 6px 0;\n scrollbar-width: none;\n}\n\n.sd-prompt-rail-scroll::-webkit-scrollbar {\n display: none;\n}\n\n/* 一格 = 一句提问。刻度是 20px 的短横(2px 高):未加载更短更淡,当前那条最长最深。 */\n.sd-prompt-mark {\n position: relative;\n flex: none;\n width: 100%;\n height: 10px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.sd-prompt-mark::before {\n position: absolute;\n top: 50%;\n right: 2px;\n width: 20px;\n height: 2px;\n border-radius: 2px;\n background: var(--sd-border-l4);\n content: \"\";\n transform: translateY(-50%) scaleX(0.6);\n transform-origin: right center;\n transition: transform 140ms ease, background-color 140ms ease;\n}\n\n.sd-prompt-mark[data-loaded=\"false\"]::before {\n transform: translateY(-50%) scaleX(0.4);\n opacity: 0.6;\n}\n\n/* 悬停与「当前这句」两档分开:悬停是次级色 0.9 长,选中才是主色满长(与宿主轮次轨同档)。\n 两档同色时选中那格淹没在悬停里,读者认不出自己刚点了哪一句。 */\n.sd-prompt-mark:hover::before {\n transform: translateY(-50%) scaleX(0.9);\n background: var(--sd-label-tertiary);\n}\n\n.sd-prompt-mark[aria-current=\"true\"]::before {\n transform: translateY(-50%) scaleX(1);\n background: var(--dsw-alias-label-primary);\n}\n\n.sd-prompt-mark[data-loading=\"true\"]::before {\n animation: sd-prompt-mark-busy 1s ease-in-out infinite;\n}\n\n/* 键盘焦点比两种静止态都强:环画在格子里,避免被轨的滚动容器裁掉。 */\n.sd-prompt-mark:focus-visible {\n outline: none;\n}\n\n.sd-prompt-mark:focus-visible::before {\n transform: translateY(-50%) scaleX(1);\n background: var(--dsw-alias-brand-primary);\n}\n\n.sd-prompt-mark:focus-visible::after {\n position: absolute;\n inset: 0 0 0 auto;\n width: 24px;\n border-radius: var(--sd-radius-sm);\n outline: 1px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n content: \"\";\n}\n\n@keyframes sd-prompt-mark-busy {\n 0%, 100% { opacity: 0.35; }\n 50% { opacity: 1; }\n}\n\n/* 预览卡:跟那一格竖直居中;正文一律 3 行截断(预览本身已在服务端截到 80 字)。 */\n.sd-prompt-peek {\n position: absolute;\n z-index: 6;\n right: calc(100% + 10px);\n width: 282px;\n padding: 9px 11px 10px;\n border: 1px solid var(--sd-border-l3);\n border-radius: var(--sd-radius-lg);\n background: var(--dsw-alias-bg-layer-1, var(--dsw-alias-bg-base));\n box-shadow: var(--sd-elevation-prominent);\n pointer-events: none;\n transform: translateY(-50%);\n}\n\n.sd-prompt-peek-top {\n display: flex;\n align-items: baseline;\n gap: 8px;\n font-size: 11px;\n line-height: 16px;\n color: var(--sd-label-tertiary);\n}\n\n.sd-prompt-peek-top span:last-child {\n margin-left: auto;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.sd-prompt-peek-text {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n margin-top: 3px;\n font-size: 13px;\n line-height: 19px;\n color: var(--dsw-alias-label-primary);\n}\n\n/* 收掉 WebKit / Blink 给 `type=\"search\"` 挂的那颗原生清除钮;判据住 `search-box.tsx` 文件头,\n 类名由那边的输入框交出。 */\n.sd-search-input::-webkit-search-cancel-button {\n display: none;\n -webkit-appearance: none;\n}\n\n/*\n * 检索结果行的命中摘录:最多两行。clamp 只能用 CSS 表达(inline style 的 `WebkitBoxOrient` 已被 TS 标弃用),\n * 所以这条规则与 `.sd-prompt-peek-text` 同族、住同一个文件。\n */\n.sd-search-snippet {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n word-break: break-word;\n /* 摘录是可点选的(组行里混着父 / 子会话命中):先重置按钮字体再钉 12/17,避免后写 `font: inherit` 把字号/行高冲掉。 */\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-label-secondary);\n text-align: left;\n cursor: pointer;\n}\n\n.sd-search-snippet mark,\nmark[data-dsh-session-delete=\"search-hit\"] {\n /* 命中高亮(标题行 / 摘录 / 命中预览共用):底色取宿主 warn 档的浅色,字色跟随正文,不另造一套配色。 */\n background: var(--dsw-alias-state-warn-primary);\n color: var(--dsw-alias-label-primary);\n border-radius: 2px;\n padding: 0 1px;\n}\n\n.sd-prompt-peek-hint {\n margin-top: 6px;\n font-size: 11px;\n line-height: 16px;\n color: var(--sd-label-tertiary);\n}\n\n/* 跳转收手(「太远」)的说明挂在轨下方:它不影响正文,也不假装是分页失败。 */\n.sd-prompt-rail-notice {\n position: absolute;\n top: calc(100% + 8px);\n right: 0;\n width: 180px;\n font-size: 11px;\n line-height: 16px;\n color: var(--sd-label-tertiary);\n text-align: right;\n}\n\n/* 落位只把目标行对齐,不画落地高亮框:宿主 `scrollToTurn` 也只对齐,整行套一圈环在正文里\n 就是一个大白框(ADR-0057)。目标行的让位(sticky 标题排的高度)由 `src/client/detail/detail-style.ts` 的\n `USER_ROW` 以行内 `scrollMarginTop` 消费 `JUMP_SCROLL_MARGIN_PX`,这里不写第二份像素。 */\n\n@media (prefers-reduced-motion: reduce) {\n .sd-prompt-mark::before {\n transition: none;\n }\n\n .sd-prompt-mark[data-loading=\"true\"]::before {\n animation: none;\n opacity: 1;\n }\n}\n\n/*\n * 拖放移入回收站(`docs/ui-spec.md` §1、`ADR-0071`):\n * 全链红色、4 态 × ok/blk 两档、拒收是动效不是状态。高亮圈**宿主行本体**——`:has` 认行内投放标记\n * 上的 `data-dst-*` attr(不认宿主哈希类名,跟着宿主换代会漂);outline 不占布局,-2px 内移防裁边。\n * 时长:档位过渡 140ms、吞入回弹 240ms、抖动 220ms×2、胶囊 1600ms 自灭(计时在组件);prefers-reduced-motion 全瞬切。\n */\nbutton:has([data-dsh-session-delete='trash-drop']) {\n transition: background-color 140ms ease-out, outline-color 140ms ease-out;\n}\n\nbutton:has([data-dsh-session-delete='trash-drop'][data-dst-state='armed']) {\n outline: 2px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 55%, transparent);\n outline-offset: -2px;\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 7%, transparent);\n}\n\nbutton:has([data-dsh-session-delete='trash-drop'][data-dst-state='over']),\nbutton:has([data-dsh-session-delete='trash-drop'][data-dst-state='committing']) {\n outline: 2px solid var(--dsw-alias-state-error-primary);\n outline-offset: -2px;\n background: var(--sd-interactive-bg-hover-danger);\n}\n\n[data-dsh-session-delete='trash-drop'][data-dst-state='committing'] [data-dst-icon] {\n animation: sd-drop-swallow 240ms ease-out 1;\n}\n\n@keyframes sd-drop-swallow {\n 0%,\n 100% {\n transform: translateY(0) scale(1);\n }\n\n 40% {\n transform: translateY(2px) scale(0.88);\n }\n}\n\nbutton:has([data-dsh-session-delete='trash-drop'][data-dst-shake='true']) {\n animation: sd-drop-shake 220ms ease-in-out 2;\n}\n\n@keyframes sd-drop-shake {\n 0%,\n 100% {\n transform: translateX(0);\n }\n\n 25% {\n transform: translateX(-3px);\n }\n\n 75% {\n transform: translateX(3px);\n }\n}\n\n/* 拖放胶囊(「松手移入回收站」/「正在移入回收站…」/拒收原因):portal 到 body、fixed 锚在宿主行下缘,\n 不占布局、不参与命中(pointer-events: none)。红底白字 = 反白文本走 on-fill token 并带安全兜底。 */\n.sd-drop-pill {\n position: fixed;\n z-index: 1100;\n transform: translateX(-50%);\n width: max-content;\n max-width: min(320px, calc(100vw - 24px));\n padding: 3px 10px;\n border-radius: 999px;\n background: var(--dsw-alias-state-error-primary);\n /* 反白文本用宿主「有色底上的文字」token(两主题都是近白),并兜底纯白固定色。 */\n color: var(--dsw-alias-label-on-color, var(--dsw-static-neutral-bluish-00, #fff));\n /* 排版照 `.sd-tooltip-bubble`(ui.css 抄本)逐字对齐:13/20、字重继承。 */\n font-size: 13px;\n line-height: 20px;\n text-align: center;\n overflow-wrap: break-word;\n box-shadow: var(--sd-elevation-prominent);\n pointer-events: none;\n animation: sd-drop-pill-in 140ms ease-out;\n}\n\n@keyframes sd-drop-pill-in {\n from {\n opacity: 0;\n transform: translateX(-50%) translateY(-3px);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n button:has([data-dsh-session-delete='trash-drop']),\n button:has([data-dsh-session-delete='trash-drop'][data-dst-shake='true']),\n [data-dsh-session-delete='trash-drop'][data-dst-state='committing'] [data-dst-icon],\n .sd-drop-pill {\n transition: none;\n animation: none;\n }\n}\n";
3321
3321
  //#endregion
3322
3322
  //#region src/client/ui/markdown.css?dsh-css-text
3323
- var markdown_default = "/**\r\n * 回收站详情里**会话正文**的排版(2026-10-15 真机反馈后新增)。\r\n *\r\n * 为什么单独一个文件而不并进 `ui.css`:`ui.css` 是\"照官方 primitives 逐字抄来的那一份表\",\r\n * 那条 fidelity 核对(`docs/development.md` 的界面保真复核门)要的是它与官方明文**逐属性零差异**,只许文件头点名的几类例外\r\n * (类名前缀、`@keyframes` 改名,外加它点名的自造与已声明的差别);条数不钉在这里,钉了就会漂成假基线。这一份抄的是\r\n * **另一个来源**(宿主 markdown 那一张表),混进去就把那份核对弄脏了。\r\n *\r\n * **来源(逐字抄,只改选择器、下面点名的三处,以及 token 引用走 `--sd-*` 别名层)**:\r\n * `app.asar` 里 `@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css`\r\n * (`.markdown` 那一支;`.compact` 一支我们不用)+ `lib/markdown/CodeBlock.module.css` 的 `pre`。\r\n * 字体简写 `--dsw-font-markdown-*` 与内容字号 `--dsh-content-font-*` 逐字保留:它们是宿主会话区\r\n * 自己吃的那组,宿主调内容字号时这里跟着一起动。配色/几何的 `--dsw-alias-*` / `--dsw-radius-*`\r\n * 走 `ui.css` 头注那层 `--sd-*` 别名(私有 token 带公开兜底);逐属性复核时按别名还原成它引用的\r\n * `--dsw-*` 再比,不把别名层算成抄本差异。\r\n *\r\n * 三处**有意**的差异,每条都是因为我们的 DOM 长不出宿主那个节点:\r\n * ① 宿主给表包一层 `.tableScroll`(div)再横向滚动;react-markdown 不产这层 ⇒ 滚动挂在 `table`\r\n * 自己身上(`display:block` + 匿名表盒)。这条得真机量过才算成立。\r\n * ② 宿主的代码卡有 banner 行(语言名 + 复制),四个圆角被拆成\"上圆角在 banner、下圆角在 pre\";\r\n * 我们没有 banner ⇒ 圆角整块给 `pre`。\r\n * ③ 宿主的链接可点(点开外链/文件),我们不碰宿主导航,链接渲成不可点的文本 ⇒ 保留链接色与字重,\r\n * **去掉** hover 的下划线(那是\"点我\"的邀请)。\r\n *\r\n * 抄过来但用不上的选择器已删:`.fileLink` / `.fileMention` / `.linkIcon` / `.image` / `.imageAlt`\r\n * (图片渲成本地化占位,见 `copy.ts` 的 `detail.image` / `detail.image.alt`)/ `.katex-display` /\r\n * `:global(.md-code-block)` / `.shiki`(高亮由宿主的 highlighter 提供,我们没有)。\r\n */\r\n.sd-md {\r\n min-width: 0;\r\n overflow-wrap: anywhere;\r\n font: var(--dsw-font-markdown-base);\r\n color: var(--dsw-alias-label-primary);\r\n}\r\n\r\n.sd-md strong {\r\n font-weight: 600;\r\n}\r\n\r\n.sd-md h1 {\r\n font: var(--dsw-font-markdown-h1);\r\n margin: 32px 0 16px;\r\n}\r\n\r\n.sd-md h2 {\r\n font: var(--dsw-font-markdown-h2);\r\n margin: 32px 0 16px;\r\n}\r\n\r\n.sd-md h3 {\r\n font: var(--dsw-font-markdown-h3);\r\n margin: 32px 0 16px;\r\n}\r\n\r\n.sd-md h4 {\r\n font: var(--dsw-font-markdown-h4);\r\n margin: 16px 0;\r\n}\r\n\r\n.sd-md :where(h5, h6) {\r\n font: var(--dsw-font-markdown-base-strong);\r\n margin: 16px 0;\r\n}\r\n\r\n.sd-md :where(h1, h2, h3, h4, h5, h6) strong {\r\n font-weight: inherit;\r\n}\r\n\r\n.sd-md p {\r\n margin: 16px 0;\r\n}\r\n\r\n/* Tighten h4–h6 against a following list (design: 8px gap). */\r\n.sd-md :where(h4, h5, h6) + :where(ul, ol) {\r\n margin-top: 8px;\r\n}\r\n\r\n.sd-md :where(h4, h5, h6):has(+ :where(ul, ol)) {\r\n margin-bottom: 8px;\r\n}\r\n\r\n/* 见文件头差异③:颜色与字重照抄,hover 的 dotted 下划线不抄——这里没有可点的东西。 */\r\n.sd-md-link {\r\n color: var(--sd-link);\r\n font-weight: 500;\r\n}\r\n\r\n.sd-md :where(ul, ol) {\r\n margin: 16px 0;\r\n padding-left: 18px;\r\n}\r\n\r\n.sd-md li:not(:first-child) {\r\n margin-top: 6px;\r\n}\r\n\r\n.sd-md li > :where(ul, ol) {\r\n margin-top: 4px;\r\n}\r\n\r\n.sd-md li::marker {\r\n line-height: 24px;\r\n color: var(--dsw-alias-label-secondary);\r\n}\r\n\r\n/* Nested ol under ul/ol: markers inside (models sometimes emit this shape). */\r\n.sd-md :where(ul, ol) ol {\r\n list-style-position: inside;\r\n padding-left: 0;\r\n}\r\n\r\n.sd-md :where(ul, ol) ol li p {\r\n display: inline;\r\n}\r\n\r\n.sd-md li > p {\r\n margin: 8px 0;\r\n}\r\n\r\n.sd-md li > *:first-child {\r\n margin-top: 0;\r\n}\r\n\r\n.sd-md li > *:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.sd-md hr {\r\n display: block;\r\n border: none;\r\n height: 0.5px;\r\n margin: 32px 0;\r\n background: var(--dsw-alias-border-l2);\r\n}\r\n\r\n.sd-md blockquote {\r\n border-left: 2px solid var(--sd-label-caption);\r\n margin: 16px 0 0;\r\n padding-left: 14px;\r\n}\r\n\r\n/* 代码卡:宿主的卡片由 `.block`(底色+圆角)与其内 `pre`(字号+内边距)两层拼成。\r\n 我们只有 `pre` 这一层,所以两层的声明合成在这里——见文件头差异②。 */\r\n.sd-md pre {\r\n font: var(--dsw-font-markdown-code-block);\r\n margin: 16px 0;\r\n padding: 16px;\r\n color: var(--dsw-alias-label-primary);\r\n background: var(--sd-markdown-code-block);\r\n border-radius: var(--sd-radius-lg);\r\n overflow-x: auto;\r\n white-space: pre-wrap;\r\n word-break: break-all;\r\n}\r\n\r\n.sd-md pre code {\r\n font: inherit;\r\n background: none;\r\n padding: 0;\r\n}\r\n\r\n.sd-md :not(pre) > code {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n font: var(--dsw-font-markdown-code);\r\n font-family: var(--ds-font-family-code);\r\n font-size: 0.875em !important;\r\n background-color: var(--sd-markdown-inline-code);\r\n border: 0.5px solid var(--dsw-alias-border-l1);\r\n border-radius: var(--sd-radius-sm);\r\n padding: 0 5px;\r\n}\r\n\r\n.sd-md :where(h1, h2, h3, h4, h5, h6) code {\r\n font: inherit;\r\n font-family: var(--ds-font-family-code);\r\n}\r\n\r\n.sd-md input[type='checkbox'] {\r\n margin: 0 8px 0 0;\r\n accent-color: var(--dsw-alias-label-secondary);\r\n}\r\n\r\n/* 见文件头差异①:宿主是 `.tableScroll > table`,我们没有那层 div。 */\r\n.sd-md table {\r\n display: block;\r\n box-sizing: border-box;\r\n max-width: 100%;\r\n overflow-x: auto;\r\n overscroll-behavior-x: contain;\r\n border-collapse: collapse;\r\n width: max-content;\r\n}\r\n\r\n.sd-md th {\r\n text-align: start;\r\n padding: 10px 16px;\r\n border-bottom: 0.5px solid var(--sd-border-l3);\r\n border-top: none;\r\n font: var(--dsw-font-markdown-table-head);\r\n max-width: min(30vw, 320px);\r\n min-width: 100px;\r\n}\r\n\r\n.sd-md td {\r\n padding: 10px 16px;\r\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\r\n font: var(--dsw-font-markdown-table);\r\n max-width: min(30vw, 320px);\r\n min-width: 100px;\r\n}\r\n\r\n.sd-md th:first-child,\r\n.sd-md td:first-child {\r\n padding-left: 0;\r\n}\r\n\r\n.sd-md td:last-child {\r\n padding-right: 0;\r\n}\r\n\r\n.sd-md table code {\r\n font-size: 11px;\r\n}\r\n\r\n.sd-md > *:first-child,\r\n.sd-md p:first-child {\r\n margin-top: 0 !important;\r\n}\r\n\r\n.sd-md > *:last-child,\r\n.sd-md p:last-child {\r\n margin-bottom: 0 !important;\r\n}\r\n\r\n/* 图片在回收站里读不到(路径属于会话当时的 cwd),渲成一句说明,字色用宿主的 tertiary。 */\r\n.sd-md-image {\r\n color: var(--sd-label-tertiary);\r\n font-style: italic;\r\n}\r\n";
3323
+ var markdown_default = "/**\n * 回收站详情里**会话正文**的排版(2026-10-15 真机反馈后新增)。\n *\n * 为什么单独一个文件而不并进 `ui.css`:`ui.css` 是\"照官方 primitives 逐字抄来的那一份表\",\n * 那条 fidelity 核对(`docs/development.md` 的界面保真复核门)要的是它与官方明文**逐属性零差异**,只许文件头点名的几类例外\n * (类名前缀、`@keyframes` 改名,外加它点名的自造与已声明的差别);条数不钉在这里,钉了就会漂成假基线。这一份抄的是\n * **另一个来源**(宿主 markdown 那一张表),混进去就把那份核对弄脏了。\n *\n * **来源(逐字抄,只改选择器、下面点名的三处,以及 token 引用走 `--sd-*` 别名层)**:\n * `app.asar` 里 `@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css`\n * (`.markdown` 那一支;`.compact` 一支我们不用)+ `lib/markdown/CodeBlock.module.css` 的 `pre`。\n * 字体简写 `--dsw-font-markdown-*` 与内容字号 `--dsh-content-font-*` 逐字保留:它们是宿主会话区\n * 自己吃的那组,宿主调内容字号时这里跟着一起动。配色/几何的 `--dsw-alias-*` / `--dsw-radius-*`\n * 走 `ui.css` 头注那层 `--sd-*` 别名(私有 token 带公开兜底);逐属性复核时按别名还原成它引用的\n * `--dsw-*` 再比,不把别名层算成抄本差异。\n *\n * 三处**有意**的差异,每条都是因为我们的 DOM 长不出宿主那个节点:\n * ① 宿主给表包一层 `.tableScroll`(div)再横向滚动;react-markdown 不产这层 ⇒ 滚动挂在 `table`\n * 自己身上(`display:block` + 匿名表盒)。这条得真机量过才算成立。\n * ② 宿主的代码卡有 banner 行(语言名 + 复制),四个圆角被拆成\"上圆角在 banner、下圆角在 pre\";\n * 我们没有 banner ⇒ 圆角整块给 `pre`。\n * ③ 宿主的链接可点(点开外链/文件),我们不碰宿主导航,链接渲成不可点的文本 ⇒ 保留链接色与字重,\n * **去掉** hover 的下划线(那是\"点我\"的邀请)。\n *\n * 抄过来但用不上的选择器已删:`.fileLink` / `.fileMention` / `.linkIcon` / `.image` / `.imageAlt`\n * (图片渲成本地化占位,见 `copy.ts` 的 `detail.image` / `detail.image.alt`)/ `.katex-display` /\n * `:global(.md-code-block)` / `.shiki`(高亮由宿主的 highlighter 提供,我们没有)。\n */\n.sd-md {\n min-width: 0;\n overflow-wrap: anywhere;\n font: var(--dsw-font-markdown-base);\n color: var(--dsw-alias-label-primary);\n}\n\n.sd-md strong {\n font-weight: 600;\n}\n\n.sd-md h1 {\n font: var(--dsw-font-markdown-h1);\n margin: 32px 0 16px;\n}\n\n.sd-md h2 {\n font: var(--dsw-font-markdown-h2);\n margin: 32px 0 16px;\n}\n\n.sd-md h3 {\n font: var(--dsw-font-markdown-h3);\n margin: 32px 0 16px;\n}\n\n.sd-md h4 {\n font: var(--dsw-font-markdown-h4);\n margin: 16px 0;\n}\n\n.sd-md :where(h5, h6) {\n font: var(--dsw-font-markdown-base-strong);\n margin: 16px 0;\n}\n\n.sd-md :where(h1, h2, h3, h4, h5, h6) strong {\n font-weight: inherit;\n}\n\n.sd-md p {\n margin: 16px 0;\n}\n\n/* Tighten h4–h6 against a following list (design: 8px gap). */\n.sd-md :where(h4, h5, h6) + :where(ul, ol) {\n margin-top: 8px;\n}\n\n.sd-md :where(h4, h5, h6):has(+ :where(ul, ol)) {\n margin-bottom: 8px;\n}\n\n/* 见文件头差异③:颜色与字重照抄,hover 的 dotted 下划线不抄——这里没有可点的东西。 */\n.sd-md-link {\n color: var(--sd-link);\n font-weight: 500;\n}\n\n.sd-md :where(ul, ol) {\n margin: 16px 0;\n padding-left: 18px;\n}\n\n.sd-md li:not(:first-child) {\n margin-top: 6px;\n}\n\n.sd-md li > :where(ul, ol) {\n margin-top: 4px;\n}\n\n.sd-md li::marker {\n line-height: 24px;\n color: var(--dsw-alias-label-secondary);\n}\n\n/* Nested ol under ul/ol: markers inside (models sometimes emit this shape). */\n.sd-md :where(ul, ol) ol {\n list-style-position: inside;\n padding-left: 0;\n}\n\n.sd-md :where(ul, ol) ol li p {\n display: inline;\n}\n\n.sd-md li > p {\n margin: 8px 0;\n}\n\n.sd-md li > *:first-child {\n margin-top: 0;\n}\n\n.sd-md li > *:last-child {\n margin-bottom: 0;\n}\n\n.sd-md hr {\n display: block;\n border: none;\n height: 0.5px;\n margin: 32px 0;\n background: var(--dsw-alias-border-l2);\n}\n\n.sd-md blockquote {\n border-left: 2px solid var(--sd-label-caption);\n margin: 16px 0 0;\n padding-left: 14px;\n}\n\n/* 代码卡:宿主的卡片由 `.block`(底色+圆角)与其内 `pre`(字号+内边距)两层拼成。\n 我们只有 `pre` 这一层,所以两层的声明合成在这里——见文件头差异②。 */\n.sd-md pre {\n font: var(--dsw-font-markdown-code-block);\n margin: 16px 0;\n padding: 16px;\n color: var(--dsw-alias-label-primary);\n background: var(--sd-markdown-code-block);\n border-radius: var(--sd-radius-lg);\n overflow-x: auto;\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.sd-md pre code {\n font: inherit;\n background: none;\n padding: 0;\n}\n\n.sd-md :not(pre) > code {\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n font: var(--dsw-font-markdown-code);\n font-family: var(--ds-font-family-code);\n font-size: 0.875em !important;\n background-color: var(--sd-markdown-inline-code);\n border: 0.5px solid var(--dsw-alias-border-l1);\n border-radius: var(--sd-radius-sm);\n padding: 0 5px;\n}\n\n.sd-md :where(h1, h2, h3, h4, h5, h6) code {\n font: inherit;\n font-family: var(--ds-font-family-code);\n}\n\n.sd-md input[type='checkbox'] {\n margin: 0 8px 0 0;\n accent-color: var(--dsw-alias-label-secondary);\n}\n\n/* 见文件头差异①:宿主是 `.tableScroll > table`,我们没有那层 div。 */\n.sd-md table {\n display: block;\n box-sizing: border-box;\n max-width: 100%;\n overflow-x: auto;\n overscroll-behavior-x: contain;\n border-collapse: collapse;\n width: max-content;\n}\n\n.sd-md th {\n text-align: start;\n padding: 10px 16px;\n border-bottom: 0.5px solid var(--sd-border-l3);\n border-top: none;\n font: var(--dsw-font-markdown-table-head);\n max-width: min(30vw, 320px);\n min-width: 100px;\n}\n\n.sd-md td {\n padding: 10px 16px;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n font: var(--dsw-font-markdown-table);\n max-width: min(30vw, 320px);\n min-width: 100px;\n}\n\n.sd-md th:first-child,\n.sd-md td:first-child {\n padding-left: 0;\n}\n\n.sd-md td:last-child {\n padding-right: 0;\n}\n\n.sd-md table code {\n font-size: 11px;\n}\n\n.sd-md > *:first-child,\n.sd-md p:first-child {\n margin-top: 0 !important;\n}\n\n.sd-md > *:last-child,\n.sd-md p:last-child {\n margin-bottom: 0 !important;\n}\n\n/* 图片在回收站里读不到(路径属于会话当时的 cwd),渲成一句说明,字色用宿主的 tertiary。 */\n.sd-md-image {\n color: var(--sd-label-tertiary);\n font-style: italic;\n}\n";
3324
3324
  //#endregion
3325
3325
  //#region src/client/ui/styles.ts
3326
3326
  /**
@@ -33587,7 +33587,7 @@ window.__ModuleLoader__.load({
33587
33587
  const savedSelectionRef = (0, react.useRef)(input.savedSelection);
33588
33588
  const restoreOnExitRef = (0, react.useRef)(false);
33589
33589
  const prevActiveRef = (0, react.useRef)(null);
33590
- (0, react.useEffect)(() => {
33590
+ (0, react.useLayoutEffect)(() => {
33591
33591
  const was = prevActiveRef.current;
33592
33592
  prevActiveRef.current = input.active;
33593
33593
  if (was === null) {
@@ -33611,8 +33611,8 @@ window.__ModuleLoader__.load({
33611
33611
  if (saved === null) return;
33612
33612
  latest.current.restoreSelection(saved);
33613
33613
  }, [input.active, latest]);
33614
- /** 结果集换了(首次到达 / 重跑 / 续页):选中行不在新结果里就落到第一条,预览跟着换到那条的第一处。 */
33615
- (0, react.useEffect)(() => {
33614
+ /** 结果集换了(首次到达 / 重跑 / 续页):在首帧绘制前(layout 阶段,同 ADR-0050)把选中落到第一条并对齐预览目标,避免空选闪烁及事件处理与滞后效果互相覆写。 */
33615
+ (0, react.useLayoutEffect)(() => {
33616
33616
  if (!input.active) return;
33617
33617
  if (input.rows.length === 0) {
33618
33618
  if (selectedKey !== null) setSelectedKey(null);
@@ -33648,8 +33648,8 @@ window.__ModuleLoader__.load({
33648
33648
  if (!latest.current.active) return;
33649
33649
  latest.current.refresh();
33650
33650
  }, [input.listVersion, latest]);
33651
- /** 结果行变空(清空检索):选中行与预览归零,清单与它的选中交给还原回调。 */
33652
- (0, react.useEffect)(() => {
33651
+ /** 结果行变空(清空检索):选中行与预览在 layout 阶段归零,清单与它的选中交给还原回调。 */
33652
+ (0, react.useLayoutEffect)(() => {
33653
33653
  if (input.active) return;
33654
33654
  if (selectedKey !== null) setSelectedKey(null);
33655
33655
  if (previewTarget !== null) setPreviewTarget(null);
@@ -27,7 +27,7 @@ export interface LatestWins {
27
27
  invalidate(): void;
28
28
  }
29
29
  export declare function createLatestWins(): LatestWins;
30
- /** 引用归一:回调只经这份 ref 读最新值,身份恒稳、可进 effect 依赖(写回在 effect 里,与渲染期只读约定一致)。
30
+ /** 引用归一:回调只经这份 ref 读最新值,身份恒稳、可进 effect 依赖(layout 阶段写回:既遵守渲染期只读约定,又保证同帧后续 layout effect 与事件处理都能直接读到最新输入)。
31
31
  * 别在调用方再手写「useRef + 每渲染写回」(issue #8 第 3 条)。 */
32
32
  export declare function useLatest<T>(value: T): {
33
33
  readonly current: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xrn1997/dsh-session-delete",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "在 DeepSeek Harness 里清理会话:可恢复的移入回收站,无恢复路径的彻底删除需二次确认",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.25.0",