@y14e/roving-tabindex 3.0.4 → 3.0.5

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