@y14e/portal 1.2.30 → 1.2.31

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
@@ -13,11 +13,11 @@ npm i @y14e/portal
13
13
  import { createPortal } from '@y14e/portal';
14
14
 
15
15
  // CDNs
16
- import { createPortal } from 'https://esm.sh/@y14e/portal@1.2.30';
16
+ import { createPortal } from 'https://esm.sh/@y14e/portal@1.2.31';
17
17
  // or
18
- import { createPortal } from 'https://cdn.jsdelivr.net/npm/@y14e/portal@1.2.30/+esm';
18
+ import { createPortal } from 'https://cdn.jsdelivr.net/npm/@y14e/portal@1.2.31/+esm';
19
19
  // or
20
- import { createPortal } from 'https://esm.unpkg.com/@y14e/portal@1.2.30';
20
+ import { createPortal } from 'https://esm.unpkg.com/@y14e/portal@1.2.31';
21
21
  ```
22
22
 
23
23
  ## 📦 APIs
@@ -428,8 +428,7 @@ var Portal = class {
428
428
  this.#host.setAttribute("data-portaled", "");
429
429
  }
430
430
  #onFocus = (event) => {
431
- const sentinel = event.target;
432
- const previous = event.relatedTarget;
431
+ const { currentTarget: sentinel, relatedTarget: previous } = event;
433
432
  if (!(previous instanceof Element)) {
434
433
  return;
435
434
  }
@@ -537,7 +536,7 @@ function containsComposed2(container, element) {
537
536
  * Lightweight DOM portal (teleport) utility with fully focus management.
538
537
  * Designed for accessible dialogs, menus, overlays, popovers.
539
538
  *
540
- * @version 1.2.30
539
+ * @version 1.2.31
541
540
  * @author Yusuke Kamiyamane
542
541
  * @license MIT
543
542
  * @copyright Copyright (c) Yusuke Kamiyamane
@@ -426,8 +426,7 @@ var Portal = class {
426
426
  this.#host.setAttribute("data-portaled", "");
427
427
  }
428
428
  #onFocus = (event) => {
429
- const sentinel = event.target;
430
- const previous = event.relatedTarget;
429
+ const { currentTarget: sentinel, relatedTarget: previous } = event;
431
430
  if (!(previous instanceof Element)) {
432
431
  return;
433
432
  }
@@ -535,7 +534,7 @@ function containsComposed2(container, element) {
535
534
  * Lightweight DOM portal (teleport) utility with fully focus management.
536
535
  * Designed for accessible dialogs, menus, overlays, popovers.
537
536
  *
538
- * @version 1.2.30
537
+ * @version 1.2.31
539
538
  * @author Yusuke Kamiyamane
540
539
  * @license MIT
541
540
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.cjs CHANGED
@@ -71,8 +71,7 @@ var Portal = class {
71
71
  this.#host.setAttribute("data-portaled", "");
72
72
  }
73
73
  #onFocus = (event) => {
74
- const sentinel = event.target;
75
- const previous = event.relatedTarget;
74
+ const { currentTarget: sentinel, relatedTarget: previous } = event;
76
75
  if (!(previous instanceof Element)) {
77
76
  return;
78
77
  }
@@ -180,7 +179,7 @@ function containsComposed(container, element) {
180
179
  * Lightweight DOM portal (teleport) utility with fully focus management.
181
180
  * Designed for accessible dialogs, menus, overlays, popovers.
182
181
  *
183
- * @version 1.2.30
182
+ * @version 1.2.31
184
183
  * @author Yusuke Kamiyamane
185
184
  * @license MIT
186
185
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Lightweight DOM portal (teleport) utility with fully focus management.
4
4
  * Designed for accessible dialogs, menus, overlays, popovers.
5
5
  *
6
- * @version 1.2.30
6
+ * @version 1.2.31
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 DOM portal (teleport) utility with fully focus management.
4
4
  * Designed for accessible dialogs, menus, overlays, popovers.
5
5
  *
6
- * @version 1.2.30
6
+ * @version 1.2.31
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -69,8 +69,7 @@ var Portal = class {
69
69
  this.#host.setAttribute("data-portaled", "");
70
70
  }
71
71
  #onFocus = (event) => {
72
- const sentinel = event.target;
73
- const previous = event.relatedTarget;
72
+ const { currentTarget: sentinel, relatedTarget: previous } = event;
74
73
  if (!(previous instanceof Element)) {
75
74
  return;
76
75
  }
@@ -178,7 +177,7 @@ function containsComposed(container, element) {
178
177
  * Lightweight DOM portal (teleport) utility with fully focus management.
179
178
  * Designed for accessible dialogs, menus, overlays, popovers.
180
179
  *
181
- * @version 1.2.30
180
+ * @version 1.2.31
182
181
  * @author Yusuke Kamiyamane
183
182
  * @license MIT
184
183
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/portal",
3
- "version": "1.2.30",
3
+ "version": "1.2.31",
4
4
  "description": "Lightweight DOM portal (teleport) utility with fully focus management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",