power-focusable 4.3.8 → 4.3.9

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,24 +24,24 @@ import {
24
24
  } from 'power-focusable';
25
25
 
26
26
  // CDNs
27
- import { ... } 'https://esm.sh/power-focusable@4.3.8';
27
+ import { ... } 'https://esm.sh/power-focusable@4.3.9';
28
28
  // or
29
- import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.8/+esm';
29
+ import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.9/+esm';
30
30
  // or
31
- import { ... } 'https://esm.unpkg.com/power-focusable@4.3.8';
31
+ import { ... } 'https://esm.unpkg.com/power-focusable@4.3.9';
32
32
  ```
33
33
 
34
34
  ## 🪄 Options
35
35
 
36
36
  ```ts
37
37
  interface PowerFocusableOptions {
38
- anchor?: Element | null; // default: active element
39
- composed?: boolean; // default: false
40
- filter?: (element: Element) => boolean;
41
- include?: (element: Element) => boolean;
42
- skipNegativeTabIndexCheck?: boolean; // default: false
43
- skipVisibilityCheck?: boolean; // default: false
44
- wrap?: boolean; // default: false
38
+ anchor: Element | null; // default: active element
39
+ composed: boolean; // default: false
40
+ filter: (element: Element) => boolean;
41
+ include: (element: Element) => boolean;
42
+ skipNegativeTabIndexCheck: boolean; // default: false
43
+ skipVisibilityCheck: boolean; // default: false
44
+ wrap: boolean; // default: false
45
45
  }
46
46
  ```
47
47
 
package/dist/index.cjs CHANGED
@@ -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.8
479
+ * @version 4.3.9
480
480
  * @author Yusuke Kamiyamane
481
481
  * @license MIT
482
482
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,26 +3,26 @@
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.8
6
+ * @version 4.3.9
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
10
10
  * @see {@link https://github.com/y14e/power-focusable}
11
11
  */
12
12
  interface PowerFocusableOptions {
13
- readonly anchor?: Element | null;
14
- readonly composed?: boolean;
15
- readonly filter?: (element: Element) => boolean;
16
- readonly include?: (element: Element) => boolean;
17
- readonly skipNegativeTabIndexCheck?: boolean;
18
- readonly skipVisibilityCheck?: boolean;
19
- readonly wrap?: boolean;
13
+ anchor: Element | null;
14
+ composed: boolean;
15
+ filter: (element: Element) => boolean;
16
+ include: (element: Element) => boolean;
17
+ skipNegativeTabIndexCheck: boolean;
18
+ skipVisibilityCheck: boolean;
19
+ wrap: boolean;
20
20
  }
21
21
  declare function createFocusTrap(container?: Element): () => void;
22
- declare function getFocusables(container?: Element, options?: Omit<PowerFocusableOptions, 'anchor' | 'wrap'>): Element[];
23
- declare function getNextFocusable(container?: Element, options?: PowerFocusableOptions): Element | null;
24
- declare function getPreviousFocusable(container?: Element, options?: PowerFocusableOptions): Element | null;
25
- declare function hasFocusable(container?: Element, options?: Omit<PowerFocusableOptions, 'anchor' | 'wrap'>): boolean;
22
+ declare function getFocusables(container?: Element, options?: Partial<Omit<PowerFocusableOptions, 'anchor' | 'wrap'>>): Element[];
23
+ declare function getNextFocusable(container?: Element, options?: Partial<PowerFocusableOptions>): Element | null;
24
+ declare function getPreviousFocusable(container?: Element, options?: Partial<PowerFocusableOptions>): Element | null;
25
+ declare function hasFocusable(container?: Element, options?: Partial<Omit<PowerFocusableOptions, 'anchor' | 'wrap'>>): boolean;
26
26
  declare function inertOutside(element: Element): () => void;
27
27
  declare function isFocusable(element: Element, options?: {
28
28
  skipNegativeTabIndexCheck?: boolean;
package/dist/index.d.ts CHANGED
@@ -3,26 +3,26 @@
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.8
6
+ * @version 4.3.9
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
10
10
  * @see {@link https://github.com/y14e/power-focusable}
11
11
  */
12
12
  interface PowerFocusableOptions {
13
- readonly anchor?: Element | null;
14
- readonly composed?: boolean;
15
- readonly filter?: (element: Element) => boolean;
16
- readonly include?: (element: Element) => boolean;
17
- readonly skipNegativeTabIndexCheck?: boolean;
18
- readonly skipVisibilityCheck?: boolean;
19
- readonly wrap?: boolean;
13
+ anchor: Element | null;
14
+ composed: boolean;
15
+ filter: (element: Element) => boolean;
16
+ include: (element: Element) => boolean;
17
+ skipNegativeTabIndexCheck: boolean;
18
+ skipVisibilityCheck: boolean;
19
+ wrap: boolean;
20
20
  }
21
21
  declare function createFocusTrap(container?: Element): () => void;
22
- declare function getFocusables(container?: Element, options?: Omit<PowerFocusableOptions, 'anchor' | 'wrap'>): Element[];
23
- declare function getNextFocusable(container?: Element, options?: PowerFocusableOptions): Element | null;
24
- declare function getPreviousFocusable(container?: Element, options?: PowerFocusableOptions): Element | null;
25
- declare function hasFocusable(container?: Element, options?: Omit<PowerFocusableOptions, 'anchor' | 'wrap'>): boolean;
22
+ declare function getFocusables(container?: Element, options?: Partial<Omit<PowerFocusableOptions, 'anchor' | 'wrap'>>): Element[];
23
+ declare function getNextFocusable(container?: Element, options?: Partial<PowerFocusableOptions>): Element | null;
24
+ declare function getPreviousFocusable(container?: Element, options?: Partial<PowerFocusableOptions>): Element | null;
25
+ declare function hasFocusable(container?: Element, options?: Partial<Omit<PowerFocusableOptions, 'anchor' | 'wrap'>>): boolean;
26
26
  declare function inertOutside(element: Element): () => void;
27
27
  declare function isFocusable(element: Element, options?: {
28
28
  skipNegativeTabIndexCheck?: boolean;
package/dist/index.js CHANGED
@@ -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.8
477
+ * @version 4.3.9
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.8",
3
+ "version": "4.3.9",
4
4
  "description": "High-precision focus management utility with full composed tree support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",