power-focusable 4.3.22 → 4.3.24

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.md CHANGED
@@ -24,11 +24,11 @@ import {
24
24
  } from 'power-focusable';
25
25
 
26
26
  // CDNs
27
- import { ... } 'https://esm.sh/power-focusable@4.3.22';
27
+ import { ... } 'https://esm.sh/power-focusable@4.3.24';
28
28
  // or
29
- import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.22/+esm';
29
+ import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.24/+esm';
30
30
  // or
31
- import { ... } 'https://esm.unpkg.com/power-focusable@4.3.22';
31
+ import { ... } 'https://esm.unpkg.com/power-focusable@4.3.24';
32
32
  ```
33
33
 
34
34
  ## 🪄 Options
@@ -103,7 +103,7 @@ Creates a keyboard focus trap within the container. Automatically focuses the co
103
103
  const cleanup = createFocusTrap(container);
104
104
  // => () => void
105
105
  //
106
- // container: Element
106
+ // container (optional): Element (default: <body>)
107
107
  ```
108
108
 
109
109
  ### `getFocusables`
package/dist/index.cjs CHANGED
@@ -8,9 +8,8 @@ var FOCUSABLE_SELECTOR_WITH_NEGATIVE_TABINDEX = FOCUSABLE_SELECTOR.replace(
8
8
  );
9
9
  function createFocusTrap(container = document.body) {
10
10
  if (!(container instanceof Element)) {
11
- console.warn("Invalid container element");
12
- return () => {
13
- };
11
+ console.warn("Invalid container element. Fallback: <body> element.");
12
+ container = document.body;
14
13
  }
15
14
  const trap = new FocusTrap(container);
16
15
  return () => trap.destroy();
@@ -495,7 +494,7 @@ function isUngroupedRadio(element) {
495
494
  * High-precision focus management utility with full composed tree support.
496
495
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
497
496
  *
498
- * @version 4.3.22
497
+ * @version 4.3.24
499
498
  * @author Yusuke Kamiyamane
500
499
  * @license MIT
501
500
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * High-precision focus management utility with full composed tree support.
4
4
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
5
5
  *
6
- * @version 4.3.22
6
+ * @version 4.3.24
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 full composed tree support.
4
4
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
5
5
  *
6
- * @version 4.3.22
6
+ * @version 4.3.24
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -6,9 +6,8 @@ var FOCUSABLE_SELECTOR_WITH_NEGATIVE_TABINDEX = FOCUSABLE_SELECTOR.replace(
6
6
  );
7
7
  function createFocusTrap(container = document.body) {
8
8
  if (!(container instanceof Element)) {
9
- console.warn("Invalid container element");
10
- return () => {
11
- };
9
+ console.warn("Invalid container element. Fallback: <body> element.");
10
+ container = document.body;
12
11
  }
13
12
  const trap = new FocusTrap(container);
14
13
  return () => trap.destroy();
@@ -493,7 +492,7 @@ function isUngroupedRadio(element) {
493
492
  * High-precision focus management utility with full composed tree support.
494
493
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
495
494
  *
496
- * @version 4.3.22
495
+ * @version 4.3.24
497
496
  * @author Yusuke Kamiyamane
498
497
  * @license MIT
499
498
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "power-focusable",
3
- "version": "4.3.22",
3
+ "version": "4.3.24",
4
4
  "description": "High-precision focus management utility with full composed tree support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -20,7 +20,6 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "build": "tsup",
23
- "test": "vitest run",
24
23
  "prepublishOnly": "npm run build",
25
24
  "lint": "tsc --noEmit"
26
25
  },
@@ -52,9 +51,6 @@
52
51
  "typescript": "^5.6.0",
53
52
  "vitest": "^4.1.5"
54
53
  },
55
- "overrides": {
56
- "@emnapi/wasi-threads": "1.2.2"
57
- },
58
54
  "engines": {
59
55
  "node": ">=18"
60
56
  }