@y14e/roving-tabindex 3.1.1 → 3.1.3

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
@@ -10,14 +10,14 @@ npm i @y14e/roving-tabindex
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import { createRovingTabIndex } from '@y14e/roving-tabindex@3.1.1';
13
+ import { createRovingTabIndex } from '@y14e/roving-tabindex';
14
14
 
15
15
  // CDNs
16
- import { createRovingTabIndex } from 'https://esm.sh/@y14e/roving-tabindex@3.1.1';
16
+ import { createRovingTabIndex } from 'https://esm.sh/@y14e/roving-tabindex@3.1.3';
17
17
  // or
18
- import { createRovingTabIndex } from 'https://cdn.jsdelivr.net/npm/@y14e/roving-tabindex@3.1.1/+esm';
18
+ import { createRovingTabIndex } from 'https://cdn.jsdelivr.net/npm/@y14e/roving-tabindex@3.1.3/+esm';
19
19
  // or
20
- import { createRovingTabIndex } from 'https://esm.unpkg.com/@y14e/roving-tabindex@3.1.1';
20
+ import { createRovingTabIndex } from 'https://esm.unpkg.com/@y14e/roving-tabindex@3.1.3';
21
21
  ```
22
22
 
23
23
  ## 📦 APIs
@@ -353,13 +353,7 @@ var RovingTabIndex = class _RovingTabIndex {
353
353
  console.warn("Invalid wrap option. Fallback: false.");
354
354
  wrap = false;
355
355
  }
356
- this.#settings = {
357
- navigationOnly,
358
- noMemory,
359
- noStart,
360
- typeahead,
361
- wrap
362
- };
356
+ this.#settings = { navigationOnly, noMemory, noStart, typeahead, wrap };
363
357
  direction && Object.assign(this.#settings, { direction });
364
358
  selector && Object.assign(this.#settings, { selector });
365
359
  this.#selectorFilter = this.#createSelectorFilter();
@@ -383,18 +377,9 @@ var RovingTabIndex = class _RovingTabIndex {
383
377
  }
384
378
  this.#controller = new AbortController();
385
379
  const { signal } = this.#controller;
386
- document.addEventListener("focusin", this.#onFocusIn, {
387
- capture: true,
388
- signal
389
- });
390
- this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, {
391
- capture: true,
392
- signal
393
- });
394
- this.#container.addEventListener("keydown", this.#onKeyDown, {
395
- capture: true,
396
- signal
397
- });
380
+ document.addEventListener("focusin", this.#onFocusIn, { signal });
381
+ this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, { signal });
382
+ this.#container.addEventListener("keydown", this.#onKeyDown, { signal });
398
383
  }
399
384
  #onFocusIn = (event) => {
400
385
  const { target } = event;
@@ -546,7 +531,7 @@ var RovingTabIndex = class _RovingTabIndex {
546
531
  * Lightweight roving tabindex utility with fully focus management.
547
532
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
548
533
  *
549
- * @version 3.1.1
534
+ * @version 3.1.3
550
535
  * @author Yusuke Kamiyamane
551
536
  * @license MIT
552
537
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -351,13 +351,7 @@ var RovingTabIndex = class _RovingTabIndex {
351
351
  console.warn("Invalid wrap option. Fallback: false.");
352
352
  wrap = false;
353
353
  }
354
- this.#settings = {
355
- navigationOnly,
356
- noMemory,
357
- noStart,
358
- typeahead,
359
- wrap
360
- };
354
+ this.#settings = { navigationOnly, noMemory, noStart, typeahead, wrap };
361
355
  direction && Object.assign(this.#settings, { direction });
362
356
  selector && Object.assign(this.#settings, { selector });
363
357
  this.#selectorFilter = this.#createSelectorFilter();
@@ -381,18 +375,9 @@ var RovingTabIndex = class _RovingTabIndex {
381
375
  }
382
376
  this.#controller = new AbortController();
383
377
  const { signal } = this.#controller;
384
- document.addEventListener("focusin", this.#onFocusIn, {
385
- capture: true,
386
- signal
387
- });
388
- this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, {
389
- capture: true,
390
- signal
391
- });
392
- this.#container.addEventListener("keydown", this.#onKeyDown, {
393
- capture: true,
394
- signal
395
- });
378
+ document.addEventListener("focusin", this.#onFocusIn, { signal });
379
+ this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, { signal });
380
+ this.#container.addEventListener("keydown", this.#onKeyDown, { signal });
396
381
  }
397
382
  #onFocusIn = (event) => {
398
383
  const { target } = event;
@@ -544,7 +529,7 @@ var RovingTabIndex = class _RovingTabIndex {
544
529
  * Lightweight roving tabindex utility with fully focus management.
545
530
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
546
531
  *
547
- * @version 3.1.1
532
+ * @version 3.1.3
548
533
  * @author Yusuke Kamiyamane
549
534
  * @license MIT
550
535
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.cjs CHANGED
@@ -69,13 +69,7 @@ var RovingTabIndex = class _RovingTabIndex {
69
69
  console.warn("Invalid wrap option. Fallback: false.");
70
70
  wrap = false;
71
71
  }
72
- this.#settings = {
73
- navigationOnly,
74
- noMemory,
75
- noStart,
76
- typeahead,
77
- wrap
78
- };
72
+ this.#settings = { navigationOnly, noMemory, noStart, typeahead, wrap };
79
73
  direction && Object.assign(this.#settings, { direction });
80
74
  selector && Object.assign(this.#settings, { selector });
81
75
  this.#selectorFilter = this.#createSelectorFilter();
@@ -99,18 +93,9 @@ var RovingTabIndex = class _RovingTabIndex {
99
93
  }
100
94
  this.#controller = new AbortController();
101
95
  const { signal } = this.#controller;
102
- document.addEventListener("focusin", this.#onFocusIn, {
103
- capture: true,
104
- signal
105
- });
106
- this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, {
107
- capture: true,
108
- signal
109
- });
110
- this.#container.addEventListener("keydown", this.#onKeyDown, {
111
- capture: true,
112
- signal
113
- });
96
+ document.addEventListener("focusin", this.#onFocusIn, { signal });
97
+ this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, { signal });
98
+ this.#container.addEventListener("keydown", this.#onKeyDown, { signal });
114
99
  }
115
100
  #onFocusIn = (event) => {
116
101
  const { target } = event;
@@ -262,7 +247,7 @@ var RovingTabIndex = class _RovingTabIndex {
262
247
  * Lightweight roving tabindex utility with fully focus management.
263
248
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
264
249
  *
265
- * @version 3.1.1
250
+ * @version 3.1.3
266
251
  * @author Yusuke Kamiyamane
267
252
  * @license MIT
268
253
  * @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 3.1.1
6
+ * @version 3.1.3
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 3.1.1
6
+ * @version 3.1.3
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -67,13 +67,7 @@ var RovingTabIndex = class _RovingTabIndex {
67
67
  console.warn("Invalid wrap option. Fallback: false.");
68
68
  wrap = false;
69
69
  }
70
- this.#settings = {
71
- navigationOnly,
72
- noMemory,
73
- noStart,
74
- typeahead,
75
- wrap
76
- };
70
+ this.#settings = { navigationOnly, noMemory, noStart, typeahead, wrap };
77
71
  direction && Object.assign(this.#settings, { direction });
78
72
  selector && Object.assign(this.#settings, { selector });
79
73
  this.#selectorFilter = this.#createSelectorFilter();
@@ -97,18 +91,9 @@ var RovingTabIndex = class _RovingTabIndex {
97
91
  }
98
92
  this.#controller = new AbortController();
99
93
  const { signal } = this.#controller;
100
- document.addEventListener("focusin", this.#onFocusIn, {
101
- capture: true,
102
- signal
103
- });
104
- this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, {
105
- capture: true,
106
- signal
107
- });
108
- this.#container.addEventListener("keydown", this.#onKeyDown, {
109
- capture: true,
110
- signal
111
- });
94
+ document.addEventListener("focusin", this.#onFocusIn, { signal });
95
+ this.#settings.noMemory && document.addEventListener("focusout", this.#onFocusOut, { signal });
96
+ this.#container.addEventListener("keydown", this.#onKeyDown, { signal });
112
97
  }
113
98
  #onFocusIn = (event) => {
114
99
  const { target } = event;
@@ -260,7 +245,7 @@ var RovingTabIndex = class _RovingTabIndex {
260
245
  * Lightweight roving tabindex utility with fully focus management.
261
246
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
262
247
  *
263
- * @version 3.1.1
248
+ * @version 3.1.3
264
249
  * @author Yusuke Kamiyamane
265
250
  * @license MIT
266
251
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/roving-tabindex",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "Lightweight roving tabindex utility with fully focus management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",