power-focusable 2.1.12 → 2.1.13
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/dist/index.cjs +5 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/package.json +5 -2
package/dist/index.cjs
CHANGED
|
@@ -33,7 +33,10 @@ function getFocusables(container = document.body, options = {}) {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
if (!(node instanceof Element || node instanceof ShadowRoot)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const children = node.children;
|
|
37
40
|
for (let i = 0, l = children.length; i < l; i++) {
|
|
38
41
|
const child = children[i];
|
|
39
42
|
if (!child) {
|
|
@@ -247,7 +250,7 @@ function sortByTabIndex(elements) {
|
|
|
247
250
|
* High-precision focus management utility with shadow DOM support.
|
|
248
251
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
249
252
|
*
|
|
250
|
-
* @version 2.1.
|
|
253
|
+
* @version 2.1.13
|
|
251
254
|
* @author Yusuke Kamiyamane
|
|
252
255
|
* @license MIT
|
|
253
256
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* High-precision focus management utility with shadow DOM support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
5
5
|
*
|
|
6
|
-
* @version 2.1.
|
|
6
|
+
* @version 2.1.13
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* High-precision focus management utility with shadow DOM support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
5
5
|
*
|
|
6
|
-
* @version 2.1.
|
|
6
|
+
* @version 2.1.13
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,10 @@ function getFocusables(container = document.body, options = {}) {
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
if (!(node instanceof Element || node instanceof ShadowRoot)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const children = node.children;
|
|
35
38
|
for (let i = 0, l = children.length; i < l; i++) {
|
|
36
39
|
const child = children[i];
|
|
37
40
|
if (!child) {
|
|
@@ -245,7 +248,7 @@ function sortByTabIndex(elements) {
|
|
|
245
248
|
* High-precision focus management utility with shadow DOM support.
|
|
246
249
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
247
250
|
*
|
|
248
|
-
* @version 2.1.
|
|
251
|
+
* @version 2.1.13
|
|
249
252
|
* @author Yusuke Kamiyamane
|
|
250
253
|
* @license MIT
|
|
251
254
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "power-focusable",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.13",
|
|
4
4
|
"description": "High-precision focus management utility with shadow DOM support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsup",
|
|
23
|
+
"test": "vitest run",
|
|
23
24
|
"prepublishOnly": "npm run build",
|
|
24
25
|
"lint": "tsc --noEmit"
|
|
25
26
|
},
|
|
@@ -46,8 +47,10 @@
|
|
|
46
47
|
"homepage": "https://github.com/y14e/power-focusable#readme",
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"bun-types": "latest",
|
|
50
|
+
"happy-dom": "^20.9.0",
|
|
49
51
|
"tsup": "^8.0.0",
|
|
50
|
-
"typescript": "^5.6.0"
|
|
52
|
+
"typescript": "^5.6.0",
|
|
53
|
+
"vitest": "^4.1.5"
|
|
51
54
|
},
|
|
52
55
|
"engines": {
|
|
53
56
|
"node": ">=18"
|