@leiyi-works/dsh-session-tmpdir 0.10.12 → 0.10.13

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 (3) hide show
  1. package/README.md +6 -0
  2. package/client.js +18 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -308,3 +308,9 @@ v0.10.3 变更(2026-11-16):
308
308
 
309
309
  - B 的 description 改为「保存到 <本会话工作目录真实绝对路径>」(去掉「长期」和末尾的「下」);A 的 description 仍是「保存到临时目录 <真实绝对路径>,随会话删除后 N 天清理」。
310
310
  - `compact` / `full` 注入同步;guard 判定、审批、清理逻辑未改。
311
+
312
+ ## v0.10.13 变更(2026-11-19):问询卡片标题与选项文字加粗
313
+
314
+ - 客户端 `apply` 里注入一段样式(`<style id="dsh-session-tmpdir-question-bold">`):`[data-question-key] h2[id^="question-"]` 与 `[data-question-key] [class*="_optionLabel"]` 的 `font-weight` 提到 600。
315
+ - 只改视觉样式,不改问题/选项文案,也不影响 guard 与审批;`ctx.effect` 卸载时会移除样式。
316
+ - 选择器用卡片自带的 `data-question-key` 作用域 + 类名后缀匹配(`_optionLabel`),避免 CSS Modules 哈希跨版本变化后失效。
package/client.js CHANGED
@@ -266,6 +266,24 @@ window.__ModuleLoader__.load({
266
266
  name: '@leiyi-works/dsh-session-tmpdir',
267
267
  inject: ['slots', 'layout'],
268
268
  apply(ctx) {
269
+ // v0.10.13:把 ask_user_question 卡片的问题标题与选项文字加粗(仅注入样式,不改文案/行为)。
270
+ // 选择器用卡片自带的 data-question-key 作用域,类名用后缀匹配,避免 CSS Modules 哈希变化后失效。
271
+ ctx.effect(() => {
272
+ if (typeof document === 'undefined') return undefined
273
+ const STYLE_ID = 'dsh-session-tmpdir-question-bold'
274
+ if (document.getElementById(STYLE_ID) !== null) return undefined
275
+ const style = document.createElement('style')
276
+ style.id = STYLE_ID
277
+ style.textContent = [
278
+ '[data-question-key] h2[id^="question-"]{font-weight:600 !important}',
279
+ '[data-question-key] [class*="_optionLabel"]{font-weight:600 !important}',
280
+ ].join('')
281
+ document.head.appendChild(style)
282
+ return () => {
283
+ style.remove()
284
+ }
285
+ }, 'session-task-tmpdir: bold question card text')
286
+
269
287
  let nativeOpen = null
270
288
  let redirecting = false
271
289
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leiyi-works/dsh-session-tmpdir",
3
- "version": "0.10.12",
3
+ "version": "0.10.13",
4
4
  "type": "module",
5
5
  "description": "Per-session task temp folder with a long-term write guard. v0.9 (方案3): creating a new file outside _tmp requires the user's approval (per file by default, per directory with mode=dir), overwriting an existing file is allowed without asking, every write channel is guarded (write/edit, shell including ffmpeg/pandoc/Export-*/IO APIs, publish copies, code runtimes, unknown tools), and the persisted whitelist is shown in a left-sidebar panel「临时目录」 where entries can be removed. Every session also gets _tmp/<session title>/ in its working directory, cleaned 7 days after the session is deleted; the same tick reclaims the attachment store.",
6
6
  "exports": {