@y14e/roving-tabindex 1.2.6 → 1.2.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/dist/index.cjs CHANGED
@@ -59,15 +59,19 @@ function getFocusables(container = document.body, options = {}) {
59
59
  }
60
60
  let { composed = false, filter, include } = options;
61
61
  if (typeof composed !== "boolean") {
62
- console.warn("Invalid composed. Fallback: false.");
62
+ console.warn("Invalid composed option. Fallback: false.");
63
63
  composed = false;
64
64
  }
65
65
  if (typeof filter !== "undefined" && typeof filter !== "function") {
66
- console.warn("Invalid filter. Fallback: no filter function (undefined).");
66
+ console.warn(
67
+ "Invalid filter function. Fallback: no filter function (undefined)."
68
+ );
67
69
  filter = void 0;
68
70
  }
69
71
  if (typeof include !== "undefined" && typeof include !== "function") {
70
- console.warn("Invalid include. Fallback: no include function (undefined).");
72
+ console.warn(
73
+ "Invalid include function. Fallback: no include function (undefined)."
74
+ );
71
75
  include = void 0;
72
76
  }
73
77
  const elements = [];
@@ -258,11 +262,13 @@ function isUngroupedRadio(element) {
258
262
  // src/index.ts
259
263
  function createRovingTabIndex(container, options = {}) {
260
264
  if (!(container instanceof Element)) {
261
- throw new TypeError("Invalid container element");
265
+ console.warn("Invalid container element");
266
+ return () => {
267
+ };
262
268
  }
263
269
  let { direction, selector, typeahead = false, wrap = false } = options;
264
270
  if (typeof direction !== "undefined" && !["horizontal", "vertical"].includes(direction)) {
265
- console.warn("Invalid direction. Fallback: both (undefined).");
271
+ console.warn("Invalid direction option. Fallback: both (undefined).");
266
272
  direction = void 0;
267
273
  }
268
274
  if (typeof selector !== "undefined" && typeof selector !== "string") {
@@ -272,11 +278,11 @@ function createRovingTabIndex(container, options = {}) {
272
278
  selector = void 0;
273
279
  }
274
280
  if (typeof typeahead !== "boolean") {
275
- console.warn("Invalid typeahead. Fallback: false.");
281
+ console.warn("Invalid typeahead option. Fallback: false.");
276
282
  typeahead = false;
277
283
  }
278
284
  if (typeof wrap !== "boolean") {
279
- console.warn("Invalid wrap. Fallback: false.");
285
+ console.warn("Invalid wrap option. Fallback: false.");
280
286
  wrap = false;
281
287
  }
282
288
  const roving = new RovingTabIndex(container, {
@@ -478,7 +484,7 @@ function getActiveElement() {
478
484
  * Lightweight roving tabindex utility with fully focus management.
479
485
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
480
486
  *
481
- * @version 1.2.6
487
+ * @version 1.2.8
482
488
  * @author Yusuke Kamiyamane
483
489
  * @license MIT
484
490
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -503,7 +509,7 @@ power-focusable/dist/index.js:
503
509
  * High-precision focus management utility with full composed tree support.
504
510
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
505
511
  *
506
- * @version 4.1.7
512
+ * @version 4.1.8
507
513
  * @author Yusuke Kamiyamane
508
514
  * @license MIT
509
515
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Lightweight roving tabindex utility with fully focus management.
4
4
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
5
5
  *
6
- * @version 1.2.6
6
+ * @version 1.2.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
  * Lightweight roving tabindex utility with fully focus management.
4
4
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
5
5
  *
6
- * @version 1.2.6
6
+ * @version 1.2.8
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -57,15 +57,19 @@ function getFocusables(container = document.body, options = {}) {
57
57
  }
58
58
  let { composed = false, filter, include } = options;
59
59
  if (typeof composed !== "boolean") {
60
- console.warn("Invalid composed. Fallback: false.");
60
+ console.warn("Invalid composed option. Fallback: false.");
61
61
  composed = false;
62
62
  }
63
63
  if (typeof filter !== "undefined" && typeof filter !== "function") {
64
- console.warn("Invalid filter. Fallback: no filter function (undefined).");
64
+ console.warn(
65
+ "Invalid filter function. Fallback: no filter function (undefined)."
66
+ );
65
67
  filter = void 0;
66
68
  }
67
69
  if (typeof include !== "undefined" && typeof include !== "function") {
68
- console.warn("Invalid include. Fallback: no include function (undefined).");
70
+ console.warn(
71
+ "Invalid include function. Fallback: no include function (undefined)."
72
+ );
69
73
  include = void 0;
70
74
  }
71
75
  const elements = [];
@@ -256,11 +260,13 @@ function isUngroupedRadio(element) {
256
260
  // src/index.ts
257
261
  function createRovingTabIndex(container, options = {}) {
258
262
  if (!(container instanceof Element)) {
259
- throw new TypeError("Invalid container element");
263
+ console.warn("Invalid container element");
264
+ return () => {
265
+ };
260
266
  }
261
267
  let { direction, selector, typeahead = false, wrap = false } = options;
262
268
  if (typeof direction !== "undefined" && !["horizontal", "vertical"].includes(direction)) {
263
- console.warn("Invalid direction. Fallback: both (undefined).");
269
+ console.warn("Invalid direction option. Fallback: both (undefined).");
264
270
  direction = void 0;
265
271
  }
266
272
  if (typeof selector !== "undefined" && typeof selector !== "string") {
@@ -270,11 +276,11 @@ function createRovingTabIndex(container, options = {}) {
270
276
  selector = void 0;
271
277
  }
272
278
  if (typeof typeahead !== "boolean") {
273
- console.warn("Invalid typeahead. Fallback: false.");
279
+ console.warn("Invalid typeahead option. Fallback: false.");
274
280
  typeahead = false;
275
281
  }
276
282
  if (typeof wrap !== "boolean") {
277
- console.warn("Invalid wrap. Fallback: false.");
283
+ console.warn("Invalid wrap option. Fallback: false.");
278
284
  wrap = false;
279
285
  }
280
286
  const roving = new RovingTabIndex(container, {
@@ -476,7 +482,7 @@ function getActiveElement() {
476
482
  * Lightweight roving tabindex utility with fully focus management.
477
483
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
478
484
  *
479
- * @version 1.2.6
485
+ * @version 1.2.8
480
486
  * @author Yusuke Kamiyamane
481
487
  * @license MIT
482
488
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -501,7 +507,7 @@ power-focusable/dist/index.js:
501
507
  * High-precision focus management utility with full composed tree support.
502
508
  * Handles complex focus rules including tabindex ordering, radio groups, inert.
503
509
  *
504
- * @version 4.1.7
510
+ * @version 4.1.8
505
511
  * @author Yusuke Kamiyamane
506
512
  * @license MIT
507
513
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/roving-tabindex",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "Lightweight roving tabindex utility with fully focus management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "@y14e/attributes-utils": "^1.0.5",
52
52
  "bun-types": "latest",
53
- "power-focusable": "^4.1.7",
53
+ "power-focusable": "^4.1.8",
54
54
  "tsup": "^8.0.0",
55
55
  "typescript": "^5.6.0"
56
56
  },