@y14e/roving-tabindex 3.0.3 → 3.0.4

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.0.3';
13
+ import { createRovingTabIndex } from '@y14e/roving-tabindex@3.0.4';
14
14
 
15
15
  // CDNs
16
- import { createRovingTabIndex } from 'https://esm.sh/@y14e/roving-tabindex@3.0.3';
16
+ import { createRovingTabIndex } from 'https://esm.sh/@y14e/roving-tabindex@3.0.4';
17
17
  // or
18
- import { createRovingTabIndex } from 'https://cdn.jsdelivr.net/npm/@y14e/roving-tabindex@3.0.3/+esm';
18
+ import { createRovingTabIndex } from 'https://cdn.jsdelivr.net/npm/@y14e/roving-tabindex@3.0.4/+esm';
19
19
  // or
20
- import { createRovingTabIndex } from 'https://esm.unpkg.com/@y14e/roving-tabindex@3.0.3';
20
+ import { createRovingTabIndex } from 'https://esm.unpkg.com/@y14e/roving-tabindex@3.0.4';
21
21
  ```
22
22
 
23
23
  ## 📦 APIs
package/dist/index.cjs CHANGED
@@ -377,11 +377,10 @@ var RovingTabIndex = class {
377
377
  }
378
378
  #onFocusIn = (event) => {
379
379
  const { target } = event;
380
- if (!(target instanceof Element)) {
381
- return;
380
+ if (target instanceof Element) {
381
+ const isFocusable2 = this.#focusables.has(target);
382
+ this.#options.noMemory && !isFocusable2 ? this.#update(null) : isFocusable2 && this.#update(target);
382
383
  }
383
- const isFocusable2 = this.#focusables.has(target);
384
- this.#options.noMemory && !isFocusable2 ? this.#update(null) : isFocusable2 && this.#update(target);
385
384
  };
386
385
  #onKeyDown = (event) => {
387
386
  if (!event.composedPath().includes(this.#container)) {
@@ -529,7 +528,7 @@ function getActiveElement() {
529
528
  * Lightweight roving tabindex utility with fully focus management.
530
529
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
531
530
  *
532
- * @version 3.0.3
531
+ * @version 3.0.4
533
532
  * @author Yusuke Kamiyamane
534
533
  * @license MIT
535
534
  * @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.0.3
6
+ * @version 3.0.4
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.0.3
6
+ * @version 3.0.4
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -375,11 +375,10 @@ var RovingTabIndex = class {
375
375
  }
376
376
  #onFocusIn = (event) => {
377
377
  const { target } = event;
378
- if (!(target instanceof Element)) {
379
- return;
378
+ if (target instanceof Element) {
379
+ const isFocusable2 = this.#focusables.has(target);
380
+ this.#options.noMemory && !isFocusable2 ? this.#update(null) : isFocusable2 && this.#update(target);
380
381
  }
381
- const isFocusable2 = this.#focusables.has(target);
382
- this.#options.noMemory && !isFocusable2 ? this.#update(null) : isFocusable2 && this.#update(target);
383
382
  };
384
383
  #onKeyDown = (event) => {
385
384
  if (!event.composedPath().includes(this.#container)) {
@@ -527,7 +526,7 @@ function getActiveElement() {
527
526
  * Lightweight roving tabindex utility with fully focus management.
528
527
  * Designed for accessible menus, tabs, toolbars, and composite widgets.
529
528
  *
530
- * @version 3.0.3
529
+ * @version 3.0.4
531
530
  * @author Yusuke Kamiyamane
532
531
  * @license MIT
533
532
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/roving-tabindex",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Lightweight roving tabindex utility with fully focus management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",