dsh-notify-me 1.9.2 → 1.9.3
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 +11 -0
- package/README.en.md +3 -3
- package/README.md +2 -2
- package/lib/client.js +41 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to **dsh-notify-me** are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.9.3] — 2026-10-20
|
|
6
|
+
|
|
7
|
+
### 变更
|
|
8
|
+
|
|
9
|
+
- **悬浮提示只在行标题上触发**:之前整行(右侧开关、滑块、下拉都算)都是触发区,鼠标扫过控件也会弹方框;现在指针停在标题文字上才出现,开关和滑块保持干净。
|
|
10
|
+
- 渐显 320 ms、跟随指针、靠边翻转、滚动收起这些行为不变;读屏隐藏副本不受影响。
|
|
11
|
+
|
|
12
|
+
### 测试
|
|
13
|
+
|
|
14
|
+
- 冒烟测试新增四条结构断言:带说明的行必须把提示挂在 `.dnm-rowLabel` 上,该节点持有 `data-dnm-tip` 与三个 hover 处理函数,任何整行节点都不再是提示目标。`npm test` 两套件通过。
|
|
15
|
+
|
|
5
16
|
## [1.9.2] — 2026-10-20
|
|
6
17
|
|
|
7
18
|
### 变更
|
package/README.en.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[](https://www.npmjs.com/package/dsh-notify-me)
|
|
14
14
|
[](LICENSE)
|
|
15
15
|
[](#installation)
|
|
16
|
-
[](lib/client.js)
|
|
17
17
|
[](#compatibility)
|
|
18
18
|
[](https://awesome-dsh-plugin.com)
|
|
19
19
|
|
|
@@ -47,7 +47,7 @@ A notification plugin for DSH Web / Desktop, so you can keep full access off wit
|
|
|
47
47
|
|
|
48
48
|

|
|
49
49
|
|
|
50
|
-
The real settings component (v1.9.2 defaults) rendered as the content column in a standalone demo shell. Row explanations now live in a hover tooltip, which is why only the titles show here.
|
|
50
|
+
The real settings component (v1.9.2 defaults) rendered as the content column in a standalone demo shell. Row explanations now live in a hover tooltip that appears when the pointer rests on a title, which is why only the titles show here.
|
|
51
51
|
</details>
|
|
52
52
|
|
|
53
53
|
## Installation
|
|
@@ -116,7 +116,7 @@ dsh-notify-me decouples **supervision** from **sitting in front of the screen**:
|
|
|
116
116
|
|
|
117
117
|
## Configure it from DSH Settings
|
|
118
118
|
|
|
119
|
-
Open **Settings → Notify me**. The page runs as how you get told, when to alert, and a try-it block; the knobs you rarely touch fold into **Advanced** at the bottom. Rows show titles only — the explanation pops up next to the pointer on
|
|
119
|
+
Open **Settings → Notify me**. The page runs as how you get told, when to alert, and a try-it block; the knobs you rarely touch fold into **Advanced** at the bottom. Rows show titles only — the explanation pops up next to the pointer once it rests on the title text (hovering a switch does nothing), with a hidden copy kept for screen readers.
|
|
120
120
|
|
|
121
121
|
### How you get told
|
|
122
122
|
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[](https://www.npmjs.com/package/dsh-notify-me)
|
|
14
14
|
[](LICENSE)
|
|
15
15
|
[](#安装)
|
|
16
|
-
[](lib/client.js)
|
|
17
17
|
[](#兼容性)
|
|
18
18
|
[](https://awesome-dsh-plugin.com)
|
|
19
19
|
|
|
@@ -47,7 +47,7 @@ DSH Web / Desktop 的通知插件,让你敢不开完整访问,也不必一
|
|
|
47
47
|
|
|
48
48
|

|
|
49
49
|
|
|
50
|
-
真实插件设置组件(v1.9.2
|
|
50
|
+
真实插件设置组件(v1.9.2 默认配置)在独立演示环境里按内容列整页渲染;每行的说明改成鼠标停在标题文字上才出现的小方框,所以这里只看到标题。
|
|
51
51
|
</details>
|
|
52
52
|
|
|
53
53
|
## 安装
|
package/lib/client.js
CHANGED
|
@@ -1937,7 +1937,7 @@
|
|
|
1937
1937
|
});
|
|
1938
1938
|
} catch (e) {}
|
|
1939
1939
|
// keep in sync with package.json "version" on every release
|
|
1940
|
-
api.version = "1.9.
|
|
1940
|
+
api.version = "1.9.3";
|
|
1941
1941
|
api.setConfig = function (patch) { return setConfigLocal(patch); };
|
|
1942
1942
|
api.resetConfig = function () {
|
|
1943
1943
|
try {
|
|
@@ -2450,7 +2450,7 @@
|
|
|
2450
2450
|
".dnm-advToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#3b82f6);outline-offset:2px}" +
|
|
2451
2451
|
".dnm-advRight{display:flex;align-items:center;gap:8px;flex:none;font-weight:400;color:var(--dsw-alias-label-tertiary,rgba(120,120,120,.9))}" +
|
|
2452
2452
|
".dnm-advChev{font-size:10px;translate:0 1px;transition:transform .15s ease}" +
|
|
2453
|
-
".dnm-rowTip{cursor:help}" +
|
|
2453
|
+
".dnm-rowLabel.dnm-rowTip{cursor:help}" +
|
|
2454
2454
|
".dnm-rowValue{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary,rgba(120,120,120,.9))}" +
|
|
2455
2455
|
// The long explanation lives in a tooltip next to the pointer, so a
|
|
2456
2456
|
// row is one line tall. Screen readers still get the text.
|
|
@@ -2541,17 +2541,47 @@
|
|
|
2541
2541
|
onMouseLeave: hideTip
|
|
2542
2542
|
};
|
|
2543
2543
|
}
|
|
2544
|
-
//
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
if (
|
|
2548
|
-
|
|
2544
|
+
// Attach the tooltip to the label text only. Hovering the switch or the
|
|
2545
|
+
// slider on the right of a row should not pop an explanation.
|
|
2546
|
+
function tipTarget(node, hintText) {
|
|
2547
|
+
if (!node || typeof node !== "object") return node;
|
|
2548
|
+
var props = node.props || {};
|
|
2549
|
+
var className = String(props.className || "");
|
|
2550
|
+
// React keeps children in props.children; the smoke harness keeps them on
|
|
2551
|
+
// the node itself, so look in both places.
|
|
2552
|
+
var kids = props.children;
|
|
2553
|
+
if (kids === undefined && node.children) kids = node.children.length === 1 ? node.children[0] : node.children;
|
|
2554
|
+
if (className.indexOf("dnm-rowLabel") >= 0) {
|
|
2549
2555
|
var handlers = tipHandlers(hintText);
|
|
2550
|
-
|
|
2551
|
-
props
|
|
2552
|
-
|
|
2556
|
+
var merged = {};
|
|
2557
|
+
for (var k in props) merged[k] = props[k];
|
|
2558
|
+
merged.className = className + " dnm-rowTip";
|
|
2559
|
+
merged["data-dnm-tip"] = hintText;
|
|
2560
|
+
merged.onMouseEnter = handlers.onMouseEnter;
|
|
2561
|
+
merged.onMouseMove = handlers.onMouseMove;
|
|
2562
|
+
merged.onMouseLeave = handlers.onMouseLeave;
|
|
2563
|
+
return h(node.type, merged, kids);
|
|
2564
|
+
}
|
|
2565
|
+
if (Array.isArray(kids)) {
|
|
2566
|
+
var changed = false;
|
|
2567
|
+
var next = [];
|
|
2568
|
+
for (var i = 0; i < kids.length; i++) {
|
|
2569
|
+
var mapped = tipTarget(kids[i], hintText);
|
|
2570
|
+
if (mapped !== kids[i]) changed = true;
|
|
2571
|
+
next.push(mapped);
|
|
2572
|
+
}
|
|
2573
|
+
return changed ? h(node.type, props, next) : node;
|
|
2553
2574
|
}
|
|
2554
|
-
|
|
2575
|
+
var single = tipTarget(kids, hintText);
|
|
2576
|
+
return single === kids ? node : h(node.type, props, single);
|
|
2577
|
+
}
|
|
2578
|
+
// A row that has an explanation: single-line label, text in the tooltip.
|
|
2579
|
+
function tipRow(className, hintText, children) {
|
|
2580
|
+
if (!hintText) return h("div", { className: className }, children);
|
|
2581
|
+
var kids = Array.isArray(children)
|
|
2582
|
+
? children.map(function (child) { return tipTarget(child, hintText); })
|
|
2583
|
+
: tipTarget(children, hintText);
|
|
2584
|
+
return h("div", { className: className }, kids);
|
|
2555
2585
|
}
|
|
2556
2586
|
// Read-screen-only copy of the tooltip text.
|
|
2557
2587
|
function srOnly(text) {
|
package/package.json
CHANGED