power-focusable 4.3.18 → 4.3.20

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.18';
27
+ import { ... } 'https://esm.sh/power-focusable@4.3.20';
28
28
  // or
29
- import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.18/+esm';
29
+ import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.20/+esm';
30
30
  // or
31
- import { ... } 'https://esm.unpkg.com/power-focusable@4.3.18';
31
+ import { ... } 'https://esm.unpkg.com/power-focusable@4.3.20';
32
32
  ```
33
33
 
34
34
  ## 🪄 Options
package/dist/index.cjs CHANGED
@@ -265,20 +265,20 @@ function getRelativeFocusable(container, offset, options) {
265
265
  skipNegativeTabIndexCheck,
266
266
  skipVisibilityCheck
267
267
  };
268
- const candidates = getFocusables(container, settings);
269
- const { length } = candidates;
268
+ const focusables = getFocusables(container, settings);
269
+ const { length } = focusables;
270
270
  if (!length) {
271
271
  return null;
272
272
  }
273
- const anchorIndex = candidates.indexOf(anchor);
274
- if (anchorIndex === -1) {
273
+ const currentIndex = focusables.indexOf(anchor);
274
+ if (currentIndex === -1) {
275
275
  return null;
276
276
  }
277
- const offsetIndex = anchorIndex + offset;
277
+ const offsetIndex = currentIndex + offset;
278
278
  if ((offsetIndex < 0 || offsetIndex >= length) && !wrap) {
279
279
  return null;
280
280
  }
281
- return candidates[(offsetIndex + length) % length] ?? null;
281
+ return focusables[(offsetIndex + length) % length] ?? null;
282
282
  }
283
283
  function isDisabledDeep(element) {
284
284
  let current = element;
@@ -493,7 +493,7 @@ function isUngroupedRadio(element) {
493
493
  * High-precision focus management utility with full composed tree support.
494
494
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
495
495
  *
496
- * @version 4.3.18
496
+ * @version 4.3.20
497
497
  * @author Yusuke Kamiyamane
498
498
  * @license MIT
499
499
  * @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.18
6
+ * @version 4.3.20
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.18
6
+ * @version 4.3.20
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -263,20 +263,20 @@ function getRelativeFocusable(container, offset, options) {
263
263
  skipNegativeTabIndexCheck,
264
264
  skipVisibilityCheck
265
265
  };
266
- const candidates = getFocusables(container, settings);
267
- const { length } = candidates;
266
+ const focusables = getFocusables(container, settings);
267
+ const { length } = focusables;
268
268
  if (!length) {
269
269
  return null;
270
270
  }
271
- const anchorIndex = candidates.indexOf(anchor);
272
- if (anchorIndex === -1) {
271
+ const currentIndex = focusables.indexOf(anchor);
272
+ if (currentIndex === -1) {
273
273
  return null;
274
274
  }
275
- const offsetIndex = anchorIndex + offset;
275
+ const offsetIndex = currentIndex + offset;
276
276
  if ((offsetIndex < 0 || offsetIndex >= length) && !wrap) {
277
277
  return null;
278
278
  }
279
- return candidates[(offsetIndex + length) % length] ?? null;
279
+ return focusables[(offsetIndex + length) % length] ?? null;
280
280
  }
281
281
  function isDisabledDeep(element) {
282
282
  let current = element;
@@ -491,7 +491,7 @@ function isUngroupedRadio(element) {
491
491
  * High-precision focus management utility with full composed tree support.
492
492
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
493
493
  *
494
- * @version 4.3.18
494
+ * @version 4.3.20
495
495
  * @author Yusuke Kamiyamane
496
496
  * @license MIT
497
497
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "power-focusable",
3
- "version": "4.3.18",
3
+ "version": "4.3.20",
4
4
  "description": "High-precision focus management utility with full composed tree support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",