dsh-deck-touch 0.1.4 → 0.1.6

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/lib/client.js CHANGED
@@ -19,7 +19,7 @@ window.__ModuleLoader__.load({id:`dsh-deck-touch`,factory:require=>{
19
19
  const inject = [];
20
20
 
21
21
  const CONTRACT_VERSION = '1';
22
- const PLUGIN_VERSION = '0.1.4';
22
+ const PLUGIN_VERSION = '0.1.6';
23
23
 
24
24
  // ---- probe:只读 DOM ----
25
25
 
@@ -39,7 +39,8 @@ window.__ModuleLoader__.load({id:`dsh-deck-touch`,factory:require=>{
39
39
  let current = node;
40
40
  while (current && current !== document.body) {
41
41
  if (current.hasAttribute &&
42
- (current.hasAttribute('data-sidebar') || current.hasAttribute('data-sidebar-panel') ||
42
+ (current.getAttribute('data-shortcut-modal') === 'sidebar' ||
43
+ current.hasAttribute('data-sidebar') || current.hasAttribute('data-sidebar-panel') ||
43
44
  current.tagName === 'ASIDE')) return true;
44
45
  current = current.parentElement;
45
46
  }
@@ -103,7 +104,9 @@ window.__ModuleLoader__.load({id:`dsh-deck-touch`,factory:require=>{
103
104
  const dialogs = document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"]');
104
105
  for (let i = dialogs.length - 1; i >= 0; i -= 1) {
105
106
  const dialog = dialogs[i];
106
- if (dialog !== settings && !dialog.contains(settings) && isVisible(dialog)) return dialog;
107
+ if (dialog !== settings && !dialog.contains(settings) && !insideSidebar(dialog) && isVisible(dialog)) {
108
+ return dialog;
109
+ }
107
110
  }
108
111
  return null;
109
112
  }
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "DSH Touch Enhancements"
4
+ }
5
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "DSH 触控增强"
4
+ }
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-deck-touch",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "DSH Deck touch navigation: swipe/back routing for the Deck WebShell",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -11,7 +11,8 @@
11
11
  "./client": {
12
12
  "default": "./lib/client.js"
13
13
  },
14
- "./package.json": "./package.json"
14
+ "./package.json": "./package.json",
15
+ "./locale/*.json": "./locale/*.json"
15
16
  },
16
17
  "dsh": {
17
18
  "client": {
@@ -31,7 +32,8 @@
31
32
  "LICENSE",
32
33
  "package.json",
33
34
  "cordis.patch.yml",
34
- "NOTICE"
35
+ "NOTICE",
36
+ "locale"
35
37
  ],
36
38
  "scripts": {
37
39
  "test": "node test/nav.test.mjs"