power-focusable 2.1.5 → 2.1.6

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 CHANGED
@@ -95,13 +95,16 @@ function isFocusable(element) {
95
95
  return true;
96
96
  }
97
97
  function getRelativeFocusable(container, offset, options) {
98
- const { active: a = null, composed = false, wrap = false } = options;
98
+ const {
99
+ active = getActiveElement(),
100
+ composed = false,
101
+ wrap = false
102
+ } = options;
99
103
  const focusables = getFocusables(container, { composed });
100
104
  const { length } = focusables;
101
105
  if (!length) {
102
106
  return null;
103
107
  }
104
- const active = a ?? getActiveElement();
105
108
  if (!active || !containsDeep(container, active)) {
106
109
  return null;
107
110
  }
@@ -233,7 +236,7 @@ function sortByTabIndex(elements) {
233
236
  * High-precision focus management utility with shadow DOM support.
234
237
  * Handles complex focus rules including tabindex ordering, radio groups, etc.
235
238
  *
236
- * @version 2.1.5
239
+ * @version 2.1.6
237
240
  * @author Yusuke Kamiyamane
238
241
  * @license MIT
239
242
  * @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.5
6
+ * @version 2.1.6
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.5
6
+ * @version 2.1.6
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -93,13 +93,16 @@ function isFocusable(element) {
93
93
  return true;
94
94
  }
95
95
  function getRelativeFocusable(container, offset, options) {
96
- const { active: a = null, composed = false, wrap = false } = options;
96
+ const {
97
+ active = getActiveElement(),
98
+ composed = false,
99
+ wrap = false
100
+ } = options;
97
101
  const focusables = getFocusables(container, { composed });
98
102
  const { length } = focusables;
99
103
  if (!length) {
100
104
  return null;
101
105
  }
102
- const active = a ?? getActiveElement();
103
106
  if (!active || !containsDeep(container, active)) {
104
107
  return null;
105
108
  }
@@ -231,7 +234,7 @@ function sortByTabIndex(elements) {
231
234
  * High-precision focus management utility with shadow DOM support.
232
235
  * Handles complex focus rules including tabindex ordering, radio groups, etc.
233
236
  *
234
- * @version 2.1.5
237
+ * @version 2.1.6
235
238
  * @author Yusuke Kamiyamane
236
239
  * @license MIT
237
240
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "power-focusable",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "High-precision focus management utility with shadow DOM support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",