dsh-sidebar-row-menu 1.3.3 → 1.3.4
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/README.en.md +4 -4
- package/README.md +4 -4
- package/lib/client.js +30 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -90,13 +90,13 @@ resolve it directly by name:
|
|
|
90
90
|
Pin a version by appending it to the name:
|
|
91
91
|
|
|
92
92
|
```
|
|
93
|
-
dsh-sidebar-row-menu@1.3.
|
|
93
|
+
dsh-sidebar-row-menu@1.3.4
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
Equivalent command line:
|
|
97
97
|
|
|
98
98
|
```powershell
|
|
99
|
-
dsh plugin --profile desktop add dsh-sidebar-row-menu@1.3.
|
|
99
|
+
dsh plugin --profile desktop add dsh-sidebar-row-menu@1.3.4
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
### Install from GitHub
|
|
@@ -116,13 +116,13 @@ repository is already runnable, so **no local build is required**.
|
|
|
116
116
|
That URL tracks the latest commit on `main`. Pin a tag for a stable version:
|
|
117
117
|
|
|
118
118
|
```
|
|
119
|
-
https://github.com/TLEWA/dsh-sidebar-row-menu#v1.3.
|
|
119
|
+
https://github.com/TLEWA/dsh-sidebar-row-menu#v1.3.4
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
Or install the tarball built by Actions directly, without Git:
|
|
123
123
|
|
|
124
124
|
```
|
|
125
|
-
https://github.com/TLEWA/dsh-sidebar-row-menu/releases/download/v1.3.
|
|
125
|
+
https://github.com/TLEWA/dsh-sidebar-row-menu/releases/download/v1.3.4/dsh-sidebar-row-menu-1.3.4.tgz
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
Equivalent command line:
|
package/README.md
CHANGED
|
@@ -82,13 +82,13 @@
|
|
|
82
82
|
要固定版本,在包名后加版本号:
|
|
83
83
|
|
|
84
84
|
```
|
|
85
|
-
dsh-sidebar-row-menu@1.3.
|
|
85
|
+
dsh-sidebar-row-menu@1.3.4
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
命令行等价写法:
|
|
89
89
|
|
|
90
90
|
```powershell
|
|
91
|
-
dsh plugin --profile desktop add dsh-sidebar-row-menu@1.3.
|
|
91
|
+
dsh plugin --profile desktop add dsh-sidebar-row-menu@1.3.4
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
### 从 GitHub 安装
|
|
@@ -108,13 +108,13 @@ DSH 桌面端通过 pnpm 安装 Git 依赖;本仓库的 `lib/` 已是可直接
|
|
|
108
108
|
该地址跟随 `main` 的最新提交。要固定版本,在地址后加标签:
|
|
109
109
|
|
|
110
110
|
```
|
|
111
|
-
https://github.com/TLEWA/dsh-sidebar-row-menu#v1.3.
|
|
111
|
+
https://github.com/TLEWA/dsh-sidebar-row-menu#v1.3.4
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
也可以直接安装 Actions 打出的压缩包(不经过 Git):
|
|
115
115
|
|
|
116
116
|
```
|
|
117
|
-
https://github.com/TLEWA/dsh-sidebar-row-menu/releases/download/v1.3.
|
|
117
|
+
https://github.com/TLEWA/dsh-sidebar-row-menu/releases/download/v1.3.4/dsh-sidebar-row-menu-1.3.4.tgz
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
命令行等价写法:
|
package/lib/client.js
CHANGED
|
@@ -649,6 +649,35 @@ window.__ModuleLoader__.load({
|
|
|
649
649
|
return null;
|
|
650
650
|
}
|
|
651
651
|
|
|
652
|
+
/**
|
|
653
|
+
* 有些插件(例如 meow-memory 的「记忆参与」)在菜单打开后才用
|
|
654
|
+
* MutationObserver 往面板里补一个 DOM 条目;它们只有在收到行内「…」
|
|
655
|
+
* 按钮的 pointerdown 时才走同步注入的快路径,否则要等约 120ms 的防抖,
|
|
656
|
+
* 表现就是菜单先出现、条目晚一拍再冒出来,触发一次可见的重排。
|
|
657
|
+
*
|
|
658
|
+
* 右键发生在行标题等位置,天然不会点到「…」按钮,所以这里补发一次
|
|
659
|
+
* pointerdown,让这类插件在菜单挂载的同一帧完成注入。事件只用于通知,
|
|
660
|
+
* 不派发 click,也不会二次打开菜单。
|
|
661
|
+
*/
|
|
662
|
+
function primeRowActionPointer(trigger) {
|
|
663
|
+
if (trigger === null || trigger === undefined || typeof trigger.dispatchEvent !== 'function') return;
|
|
664
|
+
if (typeof PointerEvent !== 'function') return;
|
|
665
|
+
try {
|
|
666
|
+
trigger.dispatchEvent(new PointerEvent('pointerdown', {
|
|
667
|
+
bubbles: true,
|
|
668
|
+
cancelable: true,
|
|
669
|
+
composed: true,
|
|
670
|
+
pointerId: 1,
|
|
671
|
+
pointerType: 'mouse',
|
|
672
|
+
isPrimary: true,
|
|
673
|
+
button: 0,
|
|
674
|
+
buttons: 1,
|
|
675
|
+
}));
|
|
676
|
+
} catch {
|
|
677
|
+
/* 第三方 pointerdown 监听器抛错不应影响菜单打开 */
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
652
681
|
/**
|
|
653
682
|
* 右键会话行时在指针处展开该行自带的「…」菜单。
|
|
654
683
|
* 菜单内容来自 slot 注册表:内置条目和第三方条目都在,本插件不复制内置动作;
|
|
@@ -667,6 +696,7 @@ window.__ModuleLoader__.load({
|
|
|
667
696
|
window.setTimeout(() => {
|
|
668
697
|
rightClickMenuUntil = 0;
|
|
669
698
|
}, 600);
|
|
699
|
+
primeRowActionPointer(trigger);
|
|
670
700
|
if (menu !== null) {
|
|
671
701
|
menu.anchor.props.onClick();
|
|
672
702
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-sidebar-row-menu",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH sidebar right-click menus: a self-composed menu for workspace rows, and the native slot menu opened at the pointer for session rows.",
|
|
6
6
|
"keywords": [
|