@max-null/dsh-quick-toolbar 0.8.2 → 0.8.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/docs/shots/four-scenes.png +0 -0
- package/lib/client.js +21 -9
- package/package.json +54 -54
|
Binary file
|
package/lib/client.js
CHANGED
|
@@ -20,7 +20,10 @@ const BUILTIN_ADAPTERS = [
|
|
|
20
20
|
{
|
|
21
21
|
id: "dsh-better-sidebar.sidebar",
|
|
22
22
|
button: "[class*=\"toggleCluster\"]",
|
|
23
|
-
icon: {
|
|
23
|
+
icon: {
|
|
24
|
+
source: "custom",
|
|
25
|
+
value: "sidebar"
|
|
26
|
+
},
|
|
24
27
|
label: "侧栏",
|
|
25
28
|
act: {
|
|
26
29
|
kind: "dispatch-event",
|
|
@@ -32,7 +35,10 @@ const BUILTIN_ADAPTERS = [
|
|
|
32
35
|
{
|
|
33
36
|
id: "dsh-better-sidebar.bottom",
|
|
34
37
|
button: "[class*=\"toggleCluster\"]",
|
|
35
|
-
icon: {
|
|
38
|
+
icon: {
|
|
39
|
+
source: "custom",
|
|
40
|
+
value: "bottom"
|
|
41
|
+
},
|
|
36
42
|
label: "底栏",
|
|
37
43
|
act: {
|
|
38
44
|
kind: "dispatch-event",
|
|
@@ -302,11 +308,17 @@ const REGISTER_BRIEF = `# 任务:为「工具栏插件」迁移 / 新增一个
|
|
|
302
308
|
用你的浏览器能力实测原按钮行为,按结果选 act:
|
|
303
309
|
|
|
304
310
|
1. 点击一次:开的是**弹窗/面板**还是普通页面?
|
|
305
|
-
2.
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
311
|
+
2. **用 JS \`.click()\` 验证 toggle 性**(DOM 事件触发、穿透遮罩)——Playwright 物理点击
|
|
312
|
+
可能被弹窗遮罩(backdrop)**拦截而误判**"不能再点关闭"(remote 案例实测:物理点不到
|
|
313
|
+
≠ 不能 toggle,JS 点击下原按钮可能是天然开关):
|
|
314
|
+
- \`document.querySelector(原按钮选择器).click()\` 连点两次:开→关 → **天然 toggle** → \`click\` 就够;
|
|
315
|
+
- 仍开→关不掉 → act 用 \`toggle-panel\` 并探测关闭通道(下一步)。
|
|
316
|
+
3. \`toggle-panel\` 关闭通道:**优先 \`secondClick: { "kind": "mask" }\`(点遮罩)——
|
|
317
|
+
但必须探测验证遮罩点击真的会关闭**(remote 弹窗遮罩实测不响应);不行换
|
|
318
|
+
\`{ "kind": "click", "selector": "弹窗内唯一×按钮选择器" }\`。
|
|
319
|
+
4. **\`close\` 旧字段兼容**:\`"close": "关闭按钮选择器"\`(字符串简写,v0.8.0 前写法)
|
|
320
|
+
与 secondClick 等效,schema 仍接受——旧任务书/注册可读,不必改写。
|
|
321
|
+
5. 记录原按钮是否会在意「隐藏」(见第三步 hide 说明)。
|
|
310
322
|
|
|
311
323
|
## 第四步:写入配置,让用户刷新
|
|
312
324
|
|
|
@@ -595,8 +607,8 @@ window.__ModuleLoader__.load({
|
|
|
595
607
|
var ICONS = {
|
|
596
608
|
grid: "<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><rect x=\"2\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"2\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/></svg>",
|
|
597
609
|
plugin: "<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><rect x=\"2\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"2\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/></svg>",
|
|
598
|
-
sidebar: "<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"
|
|
599
|
-
bottom: "<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"
|
|
610
|
+
sidebar: "<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"1.5\" y=\"2\" width=\"13\" height=\"12\" rx=\"2.5\" stroke=\"currentColor\" stroke-width=\"1.5\"/><rect x=\"10.5\" y=\"3.25\" width=\"2.75\" height=\"9.5\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/></svg>",
|
|
611
|
+
bottom: "<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"1.5\" y=\"2\" width=\"13\" height=\"12\" rx=\"2.5\" stroke=\"currentColor\" stroke-width=\"1.5\"/><rect x=\"3.25\" y=\"10\" width=\"9.5\" height=\"2.75\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/></svg>",
|
|
600
612
|
sessions: "<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><rect x=\"2\" y=\"3\" width=\"12\" height=\"10\" rx=\"1.5\"/><path d=\"M5 6.5h6M5 9.5h4\" stroke-linecap=\"round\"/></svg>",
|
|
601
613
|
collapse: "<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M3 5.5h10M6.5 8.5h3M8 11.5h1\" stroke-linecap=\"round\"/></svg>",
|
|
602
614
|
menu: "<svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M3 5h10M3 8h10M3 11h10\" stroke-linecap=\"round\"/></svg>",
|
package/package.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@max-null/dsh-quick-toolbar",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "插件按钮聚合器(高度可扩展):把三方插件散乱按钮聚合到统一入口——SSiD 标题栏 / web 悬浮球;载体+驻场 LLM 范式——任何人都能把自己环境里任何插件的按钮动态聚合(LLM 一键注册、右键删除=注销,纯数据零代码,不动插件源码)",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./lib/index.js",
|
|
9
|
-
"./client": "./lib/client.js",
|
|
10
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
11
|
-
"./package.json": "./package.json"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"lib",
|
|
15
|
-
"cordis.patch.yml",
|
|
16
|
-
"README.md",
|
|
17
|
-
"LICENSE",
|
|
18
|
-
"docs/shots"
|
|
19
|
-
],
|
|
20
|
-
"dsh": {
|
|
21
|
-
"bundle": {
|
|
22
|
-
"patch": "./cordis.patch.yml"
|
|
23
|
-
},
|
|
24
|
-
"client": {
|
|
25
|
-
"inject": [],
|
|
26
|
-
"platform": "web"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"build": "tsdown",
|
|
31
|
-
"typecheck": "tsc --noEmit",
|
|
32
|
-
"watch": "tsdown --watch",
|
|
33
|
-
"test": "node --import tsx/esm --test tests/**/*.spec.ts"
|
|
34
|
-
},
|
|
35
|
-
"license": "MIT",
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"cordis": "^4.0.0-rc.7",
|
|
38
|
-
"dsh-better-sidebar": ">=0.13.0"
|
|
39
|
-
},
|
|
40
|
-
"peerDependenciesMeta": {
|
|
41
|
-
"dsh-better-sidebar": {
|
|
42
|
-
"optional": true
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@types/node": "^22.0.0",
|
|
47
|
-
"tsdown": "^0.22.2",
|
|
48
|
-
"tsx": "^4.0.0",
|
|
49
|
-
"typescript": "^5.6.0"
|
|
50
|
-
},
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"zod": "^4.5.4"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@max-null/dsh-quick-toolbar",
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "插件按钮聚合器(高度可扩展):把三方插件散乱按钮聚合到统一入口——SSiD 标题栏 / web 悬浮球;载体+驻场 LLM 范式——任何人都能把自己环境里任何插件的按钮动态聚合(LLM 一键注册、右键删除=注销,纯数据零代码,不动插件源码)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./lib/index.js",
|
|
9
|
+
"./client": "./lib/client.js",
|
|
10
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"lib",
|
|
15
|
+
"cordis.patch.yml",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"docs/shots"
|
|
19
|
+
],
|
|
20
|
+
"dsh": {
|
|
21
|
+
"bundle": {
|
|
22
|
+
"patch": "./cordis.patch.yml"
|
|
23
|
+
},
|
|
24
|
+
"client": {
|
|
25
|
+
"inject": [],
|
|
26
|
+
"platform": "web"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsdown",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"watch": "tsdown --watch",
|
|
33
|
+
"test": "node --import tsx/esm --test tests/**/*.spec.ts"
|
|
34
|
+
},
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"cordis": "^4.0.0-rc.7",
|
|
38
|
+
"dsh-better-sidebar": ">=0.13.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"dsh-better-sidebar": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "^22.0.0",
|
|
47
|
+
"tsdown": "^0.22.2",
|
|
48
|
+
"tsx": "^4.0.0",
|
|
49
|
+
"typescript": "^5.6.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"zod": "^4.5.4"
|
|
53
|
+
}
|
|
54
|
+
}
|