power-focusable 4.3.7 → 4.3.8

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.7';
27
+ import { ... } 'https://esm.sh/power-focusable@4.3.8';
28
28
  // or
29
- import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.7/+esm';
29
+ import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.8/+esm';
30
30
  // or
31
- import { ... } 'https://esm.unpkg.com/power-focusable@4.3.7';
31
+ import { ... } 'https://esm.unpkg.com/power-focusable@4.3.8';
32
32
  ```
33
33
 
34
34
  ## 🪄 Options
package/dist/index.cjs CHANGED
@@ -29,9 +29,6 @@ var FocusTrap = class {
29
29
  }
30
30
  #initialize() {
31
31
  this.#controller = new AbortController();
32
- if (!(this.#container instanceof HTMLElement)) {
33
- return;
34
- }
35
32
  this.#container.addEventListener("keydown", this.#onKeyDown, {
36
33
  signal: this.#controller.signal
37
34
  });
@@ -42,6 +39,9 @@ var FocusTrap = class {
42
39
  }
43
40
  }
44
41
  #onKeyDown = (event) => {
42
+ if (!(event instanceof KeyboardEvent)) {
43
+ return;
44
+ }
45
45
  const { key, altKey, ctrlKey, metaKey, shiftKey } = event;
46
46
  if (key !== "Tab" || altKey || ctrlKey || metaKey) {
47
47
  return;
@@ -476,7 +476,7 @@ function isUngroupedRadio(element) {
476
476
  * High-precision focus management utility with full composed tree support.
477
477
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
478
478
  *
479
- * @version 4.3.7
479
+ * @version 4.3.8
480
480
  * @author Yusuke Kamiyamane
481
481
  * @license MIT
482
482
  * @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.7
6
+ * @version 4.3.8
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.7
6
+ * @version 4.3.8
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -27,9 +27,6 @@ var FocusTrap = class {
27
27
  }
28
28
  #initialize() {
29
29
  this.#controller = new AbortController();
30
- if (!(this.#container instanceof HTMLElement)) {
31
- return;
32
- }
33
30
  this.#container.addEventListener("keydown", this.#onKeyDown, {
34
31
  signal: this.#controller.signal
35
32
  });
@@ -40,6 +37,9 @@ var FocusTrap = class {
40
37
  }
41
38
  }
42
39
  #onKeyDown = (event) => {
40
+ if (!(event instanceof KeyboardEvent)) {
41
+ return;
42
+ }
43
43
  const { key, altKey, ctrlKey, metaKey, shiftKey } = event;
44
44
  if (key !== "Tab" || altKey || ctrlKey || metaKey) {
45
45
  return;
@@ -474,7 +474,7 @@ function isUngroupedRadio(element) {
474
474
  * High-precision focus management utility with full composed tree support.
475
475
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
476
476
  *
477
- * @version 4.3.7
477
+ * @version 4.3.8
478
478
  * @author Yusuke Kamiyamane
479
479
  * @license MIT
480
480
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "power-focusable",
3
- "version": "4.3.7",
3
+ "version": "4.3.8",
4
4
  "description": "High-precision focus management utility with full composed tree support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",