@y14e/disclosure 1.3.13 → 1.3.14

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/disclosure
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import Disclosure from '@y14e/disclosure@1.3.13';
13
+ import Disclosure from '@y14e/disclosure@1.3.14';
14
14
 
15
15
  // CDNs
16
- import Disclosure from 'https://esm.sh/@y14e/disclosure@1.3.13';
16
+ import Disclosure from 'https://esm.sh/@y14e/disclosure@1.3.14';
17
17
  // or
18
- import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@1.3.13/+esm';
18
+ import Disclosure from 'https://cdn.jsdelivr.net/npm/@y14e/disclosure@1.3.14/+esm';
19
19
  // or
20
- import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure@1.3.13';
20
+ import Disclosure from 'https://esm.unpkg.com/@y14e/disclosure@1.3.14';
21
21
  ```
22
22
 
23
23
  ## Usage
package/dist/index.cjs CHANGED
@@ -624,11 +624,11 @@ var Disclosure = class _Disclosure {
624
624
  if (this.#isDestroyed) {
625
625
  return;
626
626
  }
627
- if (!(details instanceof HTMLDetailsElement)) {
627
+ if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
628
628
  console.warn("Invalid <details> element");
629
629
  return;
630
630
  }
631
- this.#bindings.has(details) && this.#toggle(details, false);
631
+ this.#toggle(details, false);
632
632
  }
633
633
  async destroy(force = false) {
634
634
  if (this.#isDestroyed) {
@@ -665,11 +665,11 @@ var Disclosure = class _Disclosure {
665
665
  if (this.#isDestroyed) {
666
666
  return;
667
667
  }
668
- if (!(details instanceof HTMLDetailsElement)) {
668
+ if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
669
669
  console.warn("Invalid <details> element");
670
670
  return;
671
671
  }
672
- this.#bindings.has(details) && this.#toggle(details, true);
672
+ this.#toggle(details, true);
673
673
  }
674
674
  #initialize() {
675
675
  saveAttributes(this.#summaryElements, [
@@ -827,7 +827,7 @@ function waitAnimationFinish(animation) {
827
827
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
828
828
  * Using the <details> and <summary> element.
829
829
  *
830
- * @version 1.3.13
830
+ * @version 1.3.14
831
831
  * @author Yusuke Kamiyamane
832
832
  * @license MIT
833
833
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.3.13
6
+ * @version 1.3.14
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
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.3.13
6
+ * @version 1.3.14
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -622,11 +622,11 @@ var Disclosure = class _Disclosure {
622
622
  if (this.#isDestroyed) {
623
623
  return;
624
624
  }
625
- if (!(details instanceof HTMLDetailsElement)) {
625
+ if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
626
626
  console.warn("Invalid <details> element");
627
627
  return;
628
628
  }
629
- this.#bindings.has(details) && this.#toggle(details, false);
629
+ this.#toggle(details, false);
630
630
  }
631
631
  async destroy(force = false) {
632
632
  if (this.#isDestroyed) {
@@ -663,11 +663,11 @@ var Disclosure = class _Disclosure {
663
663
  if (this.#isDestroyed) {
664
664
  return;
665
665
  }
666
- if (!(details instanceof HTMLDetailsElement)) {
666
+ if (!(details instanceof HTMLDetailsElement) || !this.#bindings.has(details)) {
667
667
  console.warn("Invalid <details> element");
668
668
  return;
669
669
  }
670
- this.#bindings.has(details) && this.#toggle(details, true);
670
+ this.#toggle(details, true);
671
671
  }
672
672
  #initialize() {
673
673
  saveAttributes(this.#summaryElements, [
@@ -825,7 +825,7 @@ function waitAnimationFinish(animation) {
825
825
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
826
826
  * Using the <details> and <summary> element.
827
827
  *
828
- * @version 1.3.13
828
+ * @version 1.3.14
829
829
  * @author Yusuke Kamiyamane
830
830
  * @license MIT
831
831
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure",
3
- "version": "1.3.13",
3
+ "version": "1.3.14",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",