@idoall/dsh-notify 0.4.8 → 0.4.9
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/CHANGELOG.md +12 -0
- package/README.md +7 -6
- package/README.zh.md +7 -6
- package/dist/client.js +29 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). GitHub Releases use the same bilingual layout as [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.6-alpha.1).
|
|
4
4
|
|
|
5
|
+
## [0.4.9] - 2026-10-26
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **One-click clear-all above the notification pile.** With two or more live cards, a **全部清除** strip sits above the pile and retires every card on the page at once. Clearing stays page-local: nothing is acknowledged, a pending question or approval is still waiting in its session, and a cleared record is not presented again by the polls that re-deliver it. The strip is part of the frame's height (a 20px pill plus a 6px gap) rather than an overlay on the newest card, so card content keeps every line; the `+N` queue counter moves down by the same amount instead of drawing under it, and the empty part of the strip stays click-through. A single card shows no strip — its own × is the whole story.
|
|
10
|
+
|
|
11
|
+
### Verified
|
|
12
|
+
|
|
13
|
+
- New jsdom coverage: a single card offers no strip, one click clears the pile and the next poll does not resurrect it, and clearing a pending question never answers it on the user's behalf.
|
|
14
|
+
- Full verification: static checks, **112 automated tests**, build, and package checks — the pack check materializes the shipped client bundle and requires both the `settings.section` and `shell.overlay` seats to activate.
|
|
15
|
+
- Previewed in a real DeepSeek Harness `0.2.1-rc.3` profile with the built client bundle; the clear-all strip, the settings section, and the toast stack were confirmed in the running page. Compatibility declarations, the `>=0.1.7-rc.1 <0.3.0` host requirement, and `dshReleases` are unchanged.
|
|
16
|
+
|
|
5
17
|
## [0.4.8] - 2026-10-23
|
|
6
18
|
|
|
7
19
|
### Changed
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ When a session really stops, fails, asks a question, or needs approval, a card a
|
|
|
31
31
|
## What it does
|
|
32
32
|
|
|
33
33
|
- **Enhanced or soft toast styling.** The default **Enhanced** style gives each notification a clear status colour and a short four-second attention bar; the bar is attention only, not a dismissal timer. **Soft** is a lower-key alternative. A card remains until you close it, open its session, or complete an in-card answer.
|
|
34
|
-
- **A collapsible page-local stack.** With **Collapse multiple notifications** enabled (the default), the second card and onward form a pile: the newest card is fully readable on top, while earlier cards remain complete underneath and expose equal `18px` lower edges. Pointer entry or keyboard focus expands the pile. The page keeps up to 50 live cards; pending actions are prioritised before ordinary cards, then newer cards come first.
|
|
34
|
+
- **A collapsible page-local stack.** With **Collapse multiple notifications** enabled (the default), the second card and onward form a pile: the newest card is fully readable on top, while earlier cards remain complete underneath and expose equal `18px` lower edges. Pointer entry or keyboard focus expands the pile. From two cards on, a **Clear all** action sits above the pile and retires every card on this page at once; clearing stays page-local, so a pending question or approval is untouched and still waits in its session. The page keeps up to 50 live cards; pending actions are prioritised before ordinary cards, then newer cards come first.
|
|
35
35
|
- **Direct, traceable navigation.** Clicking a card opens its session and the exact originating turn. After the host selects that session, the selected row is smoothly revealed in the left session tree, even when it lives in a different off-screen workspace. A card stays put with an explanation if navigation cannot succeed.
|
|
36
36
|
- **Answer in the toast.** A pending question or approval renders the same compatible options as the composer. Execution approvals and plan reviews share DSH's amber decision colour; ordinary questions remain blue. In-card and composer answers share the same host interaction.
|
|
37
37
|
- **Sound and background attention.** Built-in WebAudio cues and validated custom uploads play only after a card is admitted to an enabled visual Toast queue, including while the page is hidden. One polling batch produces one cue. A background tab with unseen notifications receives a temporary bell prefix and favicon attention marker.
|
|
@@ -92,7 +92,7 @@ Reload the profile or restart DSH only when its plugin host has not hot-reloaded
|
|
|
92
92
|
|
|
93
93
|
Custom sounds are stored in `<dataDir>/sounds/` in the profile data directory, not the plugin installation. Uploads are limited to 1 MB and `mp3 / m4a / aac / wav / ogg / flac`; names must be a single path segment.
|
|
94
94
|
|
|
95
|
-
Above the cards, the page shows the running version against the newest one on npm: `v0.4.
|
|
95
|
+
Above the cards, the page shows the running version against the newest one on npm: `v0.4.9 ✓ 最新`, `v0.4.8 ➔ v0.4.9`, or `v0.4.9 · 检查失败`. **检查更新** forces a fresh lookup (`GET /plugins/dsh-notify/update?force=1`, authenticated); a page load reuses the host's six-hour cache. When a newer version exists the row reveals `dsh plugin --profile web add @idoall/dsh-notify@<version>` with a copy button — installing it, and restarting DSH afterwards, stays your decision.
|
|
96
96
|
|
|
97
97
|
<p align="center">
|
|
98
98
|
<img src="./assets/version-check.png" width="60%" alt="DSH notification settings with the version row: v0.4.0 newest, Check for updates, GitHub, Changelog and Issues links">
|
|
@@ -100,10 +100,11 @@ Above the cards, the page shows the running version against the newest one on np
|
|
|
100
100
|
|
|
101
101
|
## Compatibility
|
|
102
102
|
|
|
103
|
-
Current release: plugin **`0.4.
|
|
103
|
+
Current release: plugin **`0.4.9`** is verified against DeepSeek Harness **`0.2.1-rc.3`**.
|
|
104
104
|
|
|
105
105
|
| Plugin | Verified DeepSeek Harness | What that version is |
|
|
106
106
|
| --- | --- | --- |
|
|
107
|
+
| **`0.4.9`** | `0.2.1-rc.3` | Adds one-click **clear-all** above the notification pile — page-local, it never answers a waiting interaction; host requirement and DSH declarations are unchanged |
|
|
107
108
|
| **`0.4.8`** | `0.2.1-rc.3` | Declares DSH `0.2.1-rc.3` compatible; notification behavior and the existing host requirement are unchanged |
|
|
108
109
|
| `0.4.7` | `0.2.1-rc.2` | Declares DeepSeek Harness `0.2.1-rc.2` compatible — one `dshReleases` line, since `>=0.1.7-rc.1 <0.3.0` already admitted it. No source change: of the packages it binds, only `dsh-client-ui-settings-general` differs across `0.2.1-alpha.5` → `0.2.1-rc.2`, and only in the host version string it displays. The host's `cordis` and `schemastery` also promoted to stable `4.0.5` / `3.18.5`, which are byte-identical to the alphas this plugin already ran against |
|
|
109
110
|
| `0.4.6` | `0.2.1-alpha.5` | Declares DeepSeek Harness `0.2.1-alpha.5` compatible — one `dshReleases` line, since `>=0.1.7-rc.1 <0.3.0` already admitted it. No source change: every package it binds is byte-identical across `0.2.1-alpha.4` → `0.2.1-alpha.5` except two that changed off this plugin's paths — `dsh-tools` (the `run_code` tool description) and `dsh-client-ui-settings-general` (the displayed host version string). Also fixes the Chinese README's DSH badge, which had been left two releases behind |
|
|
@@ -127,7 +128,7 @@ Current release: plugin **`0.4.8`** is verified against DeepSeek Harness **`0.2.
|
|
|
127
128
|
- Two declarations decide whether the plugin loads at all: `dsh.engines.dsh` and every `@deepseek-ai/dsh-*` peer state the same requirement, `>=0.1.7-rc.1 <0.3.0` as of `0.4.1`. DSH refuses an incompatible bundle at profile load, so a range that excluded the running release would silently drop the plugin — which is exactly what the old `<0.2.0` ceiling would have done on the `0.2.0` release.
|
|
128
129
|
- **An interactive gate only withholds a completion while it is unanswered.** DSH resolves an execution approval and a plan review *inside* the turn that asked them (`approval.request()` awaits its outcome under an open turn; `exit_plan_mode` returns its verdict to the same turn), so the turn that resumes is the turn that asked, and its end is the user's task finishing. `0.4.2` makes that the rule; `0.3.2`–`0.4.1` suppressed the whole turn, which silently dropped the completion of every approval-gated task.
|
|
129
130
|
- `@deepseek-ai/schemastery` is a **peer**, not a plain dependency: DSH resolves only a linked plugin's peer dependencies from the running installation, so a `link:` install of this directory would otherwise fail to import the Host half.
|
|
130
|
-
- **Verified releases are listed, not just matched.** `dsh.compatibility.dshReleases` names every release this plugin was actually booted on (`0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.2`, `0.2.1-rc.3` as of `0.4.
|
|
131
|
+
- **Verified releases are listed, not just matched.** `dsh.compatibility.dshReleases` names every release this plugin was actually booted on (`0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.2`, `0.2.1-rc.3` as of `0.4.9`) and `npm run pack:check` fails when one of them falls outside the declared range. Each entry means a real boot, not a semver guess.
|
|
131
132
|
|
|
132
133
|
The layout is also checked at a 390px mobile viewport: the settings controls reflow and the toast becomes full-width without falling behind the mobile sidebar.
|
|
133
134
|
|
|
@@ -158,8 +159,8 @@ npm run pack:check # publish preconditions + client registration check
|
|
|
158
159
|
Releases are tag-driven. Bump `package.json`, move the matching CHANGELOG section out of `Unreleased`, write `release-notes/v<version>.md`, then push the release commit and tag:
|
|
159
160
|
|
|
160
161
|
```sh
|
|
161
|
-
git tag v0.4.
|
|
162
|
-
git push origin v0.4.
|
|
162
|
+
git tag v0.4.9
|
|
163
|
+
git push origin v0.4.9
|
|
163
164
|
```
|
|
164
165
|
|
|
165
166
|
The release workflow runs `npm run verify`, packs the plugin, publishes through npm trusted publishing (OIDC), and creates a GitHub Release with the package tarball and sha256.
|
package/README.zh.md
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
## 能做什么
|
|
32
32
|
|
|
33
33
|
- **增强版或柔和版通知样式**:默认的**增强版**使用清晰状态色与四秒短暂提醒条;提醒条只用于吸引注意,不负责关闭通知。**柔和版**提供更克制的视觉效果。卡片会保留到你关闭、打开对应会话或完成卡片内回答为止。
|
|
34
|
-
- **可折叠的页内通知栈**:开启默认的**多条通知折叠显示**后,从第 2 条起会折叠:最新卡片完整可读,早期卡片仍保留完整内容并在下方等距露出 `18px`
|
|
34
|
+
- **可折叠的页内通知栈**:开启默认的**多条通知折叠显示**后,从第 2 条起会折叠:最新卡片完整可读,早期卡片仍保留完整内容并在下方等距露出 `18px` 边缘。鼠标移入或键盘焦点进入时会展开。有两条及以上时,堆叠上方会出现**全部清除**,一次收走本页所有卡片;清除始终只发生在本页,宿主里等待回答或审批的交互仍留在会话中。本页最多保存 50 条活跃卡片;待处理通知优先,其余按最新优先。
|
|
35
35
|
- **可追溯的会话跳转**:点通知会打开对应会话并定位到来源轮次。宿主选中会话后,左侧会话树会自动平滑滚动并展示已选行,即使它位于另一个屏幕外工作区。跳转失败时卡片会留在原地说明原因。
|
|
36
36
|
- **在卡片内回答**:待回复问题或审批会显示可兼容的输入框选项;执行审批与计划待审沿用 DSH 的橙色决策语义,普通需要回复保持蓝色;卡片内回答与输入框操作同一份宿主交互。
|
|
37
37
|
- **提示音与后台提醒**:通知成功进入已启用的可视 Toast 队列后,才会播放内置 WebAudio 或经过校验的自定义提示音;页面在后台时也适用。同一轮轮询的一批通知只播放一次。后台标签有未查看通知时,标题和 favicon 会短暂提示。
|
|
@@ -92,7 +92,7 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
92
92
|
|
|
93
93
|
自定义提示音保存在 profile 数据目录的 `<dataDir>/sounds/`,而非插件安装目录。上传限制 1 MB,支持 `mp3 / m4a / aac / wav / ogg / flac`,文件名必须是单段路径。
|
|
94
94
|
|
|
95
|
-
卡片上方是版本检测行:显示当前版本与 npm 上最新版本的关系——`v0.4.
|
|
95
|
+
卡片上方是版本检测行:显示当前版本与 npm 上最新版本的关系——`v0.4.9 ✓ 最新`、`v0.4.8 ➔ v0.4.9` 或 `v0.4.9 · 检查失败`。**检查更新**会强制重新查询(`GET /plugins/dsh-notify/update?force=1`,需通过鉴权);页面加载则复用宿主 6 小时缓存。检测到新版本时,行下方会展开 `dsh plugin --profile web add @idoall/dsh-notify@<版本>` 与复制按钮——是否安装、以及随后是否重启 DSH,都由你决定。
|
|
96
96
|
|
|
97
97
|
<p align="center">
|
|
98
98
|
<img src="./assets/version-check.png" width="60%" alt="DSH 通知设置中的版本检测行:v0.4.0 已是最新、检查更新、GitHub、更新日志与反馈 Issue 入口">
|
|
@@ -100,10 +100,11 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
100
100
|
|
|
101
101
|
## 兼容性
|
|
102
102
|
|
|
103
|
-
当前发布:插件 **`0.4.
|
|
103
|
+
当前发布:插件 **`0.4.9`** 已在 DeepSeek Harness **`0.2.1-rc.3`** 上验证。
|
|
104
104
|
|
|
105
105
|
| 插件 | 已验证的 DeepSeek Harness | 这一版是什么 |
|
|
106
106
|
| --- | --- | --- |
|
|
107
|
+
| **`0.4.9`** | `0.2.1-rc.3` | 通知堆叠上方新增**全部清除**——只清本页、不替你回答待处理交互;宿主要求与 DSH 兼容声明保持不变 |
|
|
107
108
|
| **`0.4.8`** | `0.2.1-rc.3` | 声明兼容 DSH `0.2.1-rc.3`;通知行为与现有宿主版本范围保持不变 |
|
|
108
109
|
| `0.4.7` | `0.2.1-rc.2` | 声明兼容 DeepSeek Harness `0.2.1-rc.2`——只加一行 `dshReleases`,因为 `>=0.1.7-rc.1 <0.3.0` 本来就接纳它。无源码改动:它绑定的包里只有 `dsh-client-ui-settings-general` 在 `0.2.1-alpha.5` → `0.2.1-rc.2` 之间有差异,且只差界面显示的宿主版本号。宿主侧 `cordis`、`schemastery` 同时转正为 `4.0.5` / `3.18.5`,与本插件此前运行的 alpha 版本逐字节相同 |
|
|
109
110
|
| `0.4.6` | `0.2.1-alpha.5` | 声明兼容 DeepSeek Harness `0.2.1-alpha.5`——只加一行 `dshReleases`,因为 `>=0.1.7-rc.1 <0.3.0` 本来就接纳它。无源码改动:它绑定的每个包在 `0.2.1-alpha.4` → `0.2.1-alpha.5` 之间都逐字节相同,只有两个包的改动不在本插件路径上——`dsh-tools`(`run_code` 的工具描述)与 `dsh-client-ui-settings-general`(界面显示的宿主版本号)。另修正了中文 README 的 DSH 徽章,它此前落后了两个版本 |
|
|
@@ -127,7 +128,7 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
127
128
|
- 两处声明决定插件能否加载:`dsh.engines.dsh` 与每一个 `@deepseek-ai/dsh-*` peer 都写同一条要求,自 `0.4.1` 起为 `>=0.1.7-rc.1 <0.3.0`。DSH 会在 profile 加载时拒绝不兼容的 bundle,范围写错就会静默丢掉插件——旧的 `<0.2.0` 上限在 `0.2.0` 正式版上正是如此。
|
|
128
129
|
- **交互门禁只在「还没等到人回答」时压住完成通知。** DSH 的执行审批与计划审批都是在**提问的那个回合内**解决的(`approval.request()` 必须处于打开的回合中并原地等待结果;`exit_plan_mode` 把结论交回同一回合),所以接着干活的回合就是提问的那个回合,它的结束就是用户任务的完成。`0.4.2` 以此为规则;`0.3.2`–`0.4.1` 压掉了整个回合,于是每个带审批的任务都静默丢失完成通知。
|
|
129
130
|
- `@deepseek-ai/schemastery` 是 **peer**,不是普通依赖:DSH 只会把 **link 形态**插件的 peer 解析到当前安装;若仍写成普通依赖,`link:` 安装的 Host 半会导入失败。
|
|
130
|
-
- **声明的是「实测验证过的版本」,不是语义化猜测。** `dsh.compatibility.dshReleases` 列出真正启动验证过的每个版本(截至 `0.4.
|
|
131
|
+
- **声明的是「实测验证过的版本」,不是语义化猜测。** `dsh.compatibility.dshReleases` 列出真正启动验证过的每个版本(截至 `0.4.9`:`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.2`、`0.2.1-rc.3`),一旦其中某个落在声明范围之外,`npm run pack:check` 会直接失败。
|
|
131
132
|
|
|
132
133
|
同时在 390px 手机视口检查:设置控件会重排,Toast 会满宽显示且不会被移动端侧栏遮挡。
|
|
133
134
|
|
|
@@ -158,8 +159,8 @@ npm run pack:check # 发布前置条件 + 客户端注册校验
|
|
|
158
159
|
发版由 tag 驱动。更新 `package.json`、将对应 CHANGELOG 段落移出 `Unreleased`、编写 `release-notes/v<版本>.md` 后,推送发版提交与 tag:
|
|
159
160
|
|
|
160
161
|
```sh
|
|
161
|
-
git tag v0.4.
|
|
162
|
-
git push origin v0.4.
|
|
162
|
+
git tag v0.4.9
|
|
163
|
+
git push origin v0.4.9
|
|
163
164
|
```
|
|
164
165
|
|
|
165
166
|
发版工作流会运行 `npm run verify`、打包插件、通过 npm trusted publishing(OIDC)发布,并创建附带 tarball 与 sha256 的 GitHub Release。
|
package/dist/client.js
CHANGED
|
@@ -42,6 +42,8 @@ window.__ModuleLoader__.load({
|
|
|
42
42
|
SELF_TEST_STEP_MS: () => SELF_TEST_STEP_MS,
|
|
43
43
|
SETTINGS_CSS: () => SETTINGS_CSS,
|
|
44
44
|
TOAST_ATTENTION_MS: () => TOAST_ATTENTION_MS,
|
|
45
|
+
TOAST_CLEAR_ALL_GAP: () => TOAST_CLEAR_ALL_GAP,
|
|
46
|
+
TOAST_CLEAR_ALL_HEIGHT: () => TOAST_CLEAR_ALL_HEIGHT,
|
|
45
47
|
TOAST_CSS: () => TOAST_CSS,
|
|
46
48
|
TOAST_EXIT_MS: () => TOAST_EXIT_MS,
|
|
47
49
|
TOAST_QUEUE_MAX: () => TOAST_QUEUE_MAX,
|
|
@@ -277,14 +279,20 @@ window.__ModuleLoader__.load({
|
|
|
277
279
|
.dsh-notify-update-title{font-size:13px;font-weight:650}
|
|
278
280
|
.dsh-notify-update-command{background:var(--dsw-alias-bg-layer-2);border-radius:8px;display:block;font-family:var(--ds-font-family-code,ui-monospace,SFMono-Regular,Menlo,monospace);font-size:12px;line-height:1.6;overflow-wrap:anywhere;padding:8px 10px}
|
|
279
281
|
@media (hover:none) and (pointer:coarse){.dsh-notify-action{line-height:42px;min-height:44px}.dsh-notify-select{min-height:44px}.dsh-notify-settings .dsh-notify-toggle input{flex:0 0 42px;height:24px;max-width:42px;min-height:24px;min-width:42px;width:42px}}@media(max-width:620px){.dsh-notify-settings-head{display:block}.dsh-notify-settings-status{display:inline-flex;margin-top:14px}.dsh-notify-setting-field{grid-template-columns:1fr;gap:11px}.dsh-notify-card{padding:16px}.dsh-notify-test-grid{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.dsh-notify-test-action{min-height:44px;padding:8px}.dsh-notify-test-primary,.dsh-notify-test-secondary{justify-self:stretch;min-width:0;width:100%}}`;
|
|
280
|
-
var TOAST_CSS = `.dsh-notify-frame{position:fixed;z-index:1100;transition:height 390ms cubic-bezier(.16,1,.3,1)}
|
|
281
|
-
.dsh-notify-stack{height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
|
|
282
|
+
var TOAST_CSS = `.dsh-notify-frame{pointer-events:none;position:fixed;z-index:1100;transition:height 390ms cubic-bezier(.16,1,.3,1)}
|
|
283
|
+
.dsh-notify-stack{height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;pointer-events:auto;scrollbar-width:thin}
|
|
282
284
|
.dsh-notify-stack[data-collapsed=true]{overflow:hidden}
|
|
283
285
|
.dsh-notify-stack-inner{pointer-events:none;position:relative}
|
|
284
286
|
.dsh-notify-slot{inset-inline:0;pointer-events:none;position:absolute;top:0;transform-origin:top center;transition:transform 360ms cubic-bezier(.16,1,.3,1)}
|
|
285
287
|
.dsh-notify-stack[data-collapsed=true] .dsh-notify-slot{transition:top 340ms cubic-bezier(.22,.88,.38,1),transform 340ms cubic-bezier(.22,.88,.38,1)}
|
|
286
|
-
.dsh-notify-count{background:var(--dsw-alias-interactive-bg-hover-solid,var(--dsw-alias-bg-layer-3,rgb(0 0 0 / 6%)));border:0;border-radius:999px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;font-size:11px;inset-inline-end:35px;line-height:18px;padding:0 8px;position:absolute;top:13px;z-index:102}
|
|
288
|
+
.dsh-notify-count{background:var(--dsw-alias-interactive-bg-hover-solid,var(--dsw-alias-bg-layer-3,rgb(0 0 0 / 6%)));border:0;border-radius:999px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;font-size:11px;inset-inline-end:35px;line-height:18px;padding:0 8px;pointer-events:auto;position:absolute;top:13px;z-index:102}
|
|
287
289
|
.dsh-notify-count:hover{color:var(--dsw-alias-label-primary)}
|
|
290
|
+
/* The strip belongs to the frame, not to a card: it stays put while the pile behind it scrolls, and
|
|
291
|
+
passing a pointer over the empty part of the strip must still reach the page underneath. */
|
|
292
|
+
.dsh-notify-toolbar{align-items:center;display:flex;justify-content:flex-end;pointer-events:none}
|
|
293
|
+
.dsh-notify-clear-all{background:var(--dsw-alias-interactive-bg-hover-solid,var(--dsw-alias-bg-layer-3,rgb(0 0 0 / 6%)));border:0;border-radius:999px;color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;font-size:11px;line-height:20px;padding:0 10px;pointer-events:auto;white-space:nowrap}
|
|
294
|
+
.dsh-notify-clear-all:hover{background:var(--dsw-alias-button-floating-hover);color:var(--dsw-alias-label-primary)}
|
|
295
|
+
.dsh-notify-clear-all:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}
|
|
288
296
|
.dsh-notify-toast{align-items:flex-start;animation:dsh-notify-card-in 380ms cubic-bezier(.21,1.02,.73,1);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:11px;box-shadow:0 2px 7px rgb(29 41 57 / 10%),0 1px 2px rgb(29 41 57 / 6%);box-sizing:border-box;color:var(--dsw-alias-label-primary);cursor:pointer;display:flex;gap:11px;margin:0;overflow:hidden;padding:14px 34px 17px 14px;pointer-events:auto;position:relative;width:100%}
|
|
289
297
|
.dsh-notify-toast[data-style=strong]{background:color-mix(in srgb,var(--dsh-notify-tone) 7%,var(--dsw-alias-bg-layer-2));border-color:color-mix(in srgb,var(--dsh-notify-tone) 62%,var(--dsw-alias-border-l2))}
|
|
290
298
|
.dsh-notify-toast[data-style=soft]{box-shadow:0 2px 7px rgb(29 41 57 / 7%),0 1px 2px rgb(29 41 57 / 4%)}
|
|
@@ -725,6 +733,8 @@ window.__ModuleLoader__.load({
|
|
|
725
733
|
var TOAST_STACK_PEEK = 10;
|
|
726
734
|
var TOAST_QUEUE_MAX = 50;
|
|
727
735
|
var TOAST_STACK_COLLAPSED_PEEK = 18;
|
|
736
|
+
var TOAST_CLEAR_ALL_HEIGHT = 20;
|
|
737
|
+
var TOAST_CLEAR_ALL_GAP = 6;
|
|
728
738
|
var TOAST_ATTENTION_MS = 4e3;
|
|
729
739
|
var TOAST_EXIT_MS = 200;
|
|
730
740
|
var TOAST_SUCCESS_MS = 900;
|
|
@@ -822,6 +832,9 @@ window.__ModuleLoader__.load({
|
|
|
822
832
|
retire(eventId);
|
|
823
833
|
};
|
|
824
834
|
const patchCard = (eventId, patch) => commit(cardsRef.current.map((card) => card.record.eventId === eventId ? { ...card, ...patch } : card));
|
|
835
|
+
const clearAll = () => {
|
|
836
|
+
for (const card of cardsRef.current) if (!card.leaving) dismiss(card.record.eventId);
|
|
837
|
+
};
|
|
825
838
|
const measureOne = (eventId, node) => {
|
|
826
839
|
const height = Math.ceil(node.offsetHeight || node.getBoundingClientRect?.().height || 0);
|
|
827
840
|
if (!height || heights.current.get(eventId) === height) return false;
|
|
@@ -1094,21 +1107,31 @@ window.__ModuleLoader__.load({
|
|
|
1094
1107
|
const queueCount = frame.overflow ? frame.total : 0;
|
|
1095
1108
|
const onScreenCount = Math.max(0, frame.total - frame.hidden);
|
|
1096
1109
|
const rendered = [...liveCards, ...cards.filter((card) => card.leaving)];
|
|
1110
|
+
const clearAllVisible = liveCards.length > 1;
|
|
1111
|
+
const clearAllStrip = TOAST_CLEAR_ALL_HEIGHT + TOAST_CLEAR_ALL_GAP;
|
|
1097
1112
|
return import_react.default.createElement(
|
|
1098
1113
|
"div",
|
|
1099
1114
|
{
|
|
1100
1115
|
ref: frameRef,
|
|
1101
1116
|
popover: "manual",
|
|
1102
1117
|
className: "dsh-notify-frame",
|
|
1103
|
-
style: { inset: "auto", insetInlineEnd: narrow ? 12 : toastConfig.toastPosition === "viewport" ? 16 : anchor, insetInlineStart: "auto", bottom: "auto", top: "calc(env(safe-area-inset-top, 0px) + var(--dsh-toast-top-offset, 56px))", width: narrow ? "calc(100vw - 24px)" : "min(360px, calc(100vw - 32px))", height: `${frame.windowHeight}px`, margin: 0, padding: 0, border: 0, background: "transparent", overflow: "visible" }
|
|
1118
|
+
style: { inset: "auto", insetInlineEnd: narrow ? 12 : toastConfig.toastPosition === "viewport" ? 16 : anchor, insetInlineStart: "auto", bottom: "auto", top: "calc(env(safe-area-inset-top, 0px) + var(--dsh-toast-top-offset, 56px))", width: narrow ? "calc(100vw - 24px)" : "min(360px, calc(100vw - 32px))", height: `${frame.windowHeight + (clearAllVisible ? clearAllStrip : 0)}px`, margin: 0, padding: 0, border: 0, background: "transparent", overflow: "visible" }
|
|
1104
1119
|
},
|
|
1105
|
-
|
|
1120
|
+
clearAllVisible ? import_react.default.createElement(
|
|
1121
|
+
"div",
|
|
1122
|
+
{ className: "dsh-notify-toolbar", style: { height: `${TOAST_CLEAR_ALL_HEIGHT}px`, marginBottom: `${TOAST_CLEAR_ALL_GAP}px` } },
|
|
1123
|
+
import_react.default.createElement("button", { type: "button", className: "dsh-notify-clear-all", "aria-label": `\u6E05\u9664\u5168\u90E8 ${liveCards.length} \u6761\u901A\u77E5`, title: "\u6E05\u9664\u5F53\u524D\u9875\u9762\u4E0A\u7684\u5168\u90E8\u901A\u77E5", onClick: (event) => {
|
|
1124
|
+
event.stopPropagation();
|
|
1125
|
+
clearAll();
|
|
1126
|
+
} }, "\u5168\u90E8\u6E05\u9664")
|
|
1127
|
+
) : null,
|
|
1128
|
+
queueCount > 0 ? import_react.default.createElement("button", { type: "button", className: "dsh-notify-count", "aria-label": `\u672C\u9875\u5171 ${queueCount} \u6761\u901A\u77E5`, title: `\u5171 ${queueCount} \u6761\uFF0C\u5DF2\u663E\u793A ${onScreenCount} \u6761\uFF0C\u70B9\u51FB\u5728\u961F\u5217\u4E24\u7AEF\u4E4B\u95F4\u8DF3\u8F6C`, style: { top: `${13 + (clearAllVisible ? clearAllStrip : 0)}px` }, onClick: (event) => {
|
|
1106
1129
|
event.stopPropagation();
|
|
1107
1130
|
scrollWindow();
|
|
1108
1131
|
} }, `+${queueCount}`) : null,
|
|
1109
1132
|
import_react.default.createElement(
|
|
1110
1133
|
"div",
|
|
1111
|
-
{ ref: stackRef, className: "dsh-notify-stack", "data-overflow": frame.overflow ? "true" : "false", "data-collapsed": collapsed ? "true" : "false", onPointerEnter: () => {
|
|
1134
|
+
{ ref: stackRef, className: "dsh-notify-stack", style: { height: `${frame.windowHeight}px` }, "data-overflow": frame.overflow ? "true" : "false", "data-collapsed": collapsed ? "true" : "false", onPointerEnter: () => {
|
|
1112
1135
|
if (collapsed) setExpanded(true);
|
|
1113
1136
|
}, onFocusCapture: () => {
|
|
1114
1137
|
if (collapsed) setExpanded(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idoall/dsh-notify",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH web plugin: in-page task notifications for DeepSeek Harness — enhanced or soft status toasts, a collapsible top-right stack, answer buttons, background-tab attention, and a WebAudio cue that also plays while the page is hidden. Live delivery only: no history, no service worker, no web push, no OS notification matrix.",
|
|
6
6
|
"main": "./dist/index.js",
|