@y14e/disclosure 2.0.10 → 2.0.11
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 +3 -3
- package/dist/index.bundle.cjs +10 -9
- package/dist/index.bundle.js +10 -9
- package/dist/index.cjs +10 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,11 +13,11 @@ npm i @y14e/disclosure
|
|
|
13
13
|
import { Disclosure } from "@y14e/disclosure";
|
|
14
14
|
|
|
15
15
|
// CDNs
|
|
16
|
-
import { Disclosure } from "https://esm.sh/@y14e/disclosure@2.0.
|
|
16
|
+
import { Disclosure } from "https://esm.sh/@y14e/disclosure@2.0.11";
|
|
17
17
|
// or
|
|
18
|
-
import { Disclosure } from "https://cdn.jsdelivr.net/npm/@y14e/disclosure@2.0.
|
|
18
|
+
import { Disclosure } from "https://cdn.jsdelivr.net/npm/@y14e/disclosure@2.0.11/+esm";
|
|
19
19
|
// or
|
|
20
|
-
import { Disclosure } from "https://esm.unpkg.com/@y14e/disclosure@2.0.
|
|
20
|
+
import { Disclosure } from "https://esm.unpkg.com/@y14e/disclosure@2.0.11";
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -839,21 +839,22 @@ var Disclosure = class _Disclosure {
|
|
|
839
839
|
...source,
|
|
840
840
|
animation: { ...target.animation, ...source.animation ?? {} }
|
|
841
841
|
};
|
|
842
|
-
const
|
|
843
|
-
const duration =
|
|
842
|
+
const mergedAnimation = merged.animation;
|
|
843
|
+
const duration = mergedAnimation.duration;
|
|
844
|
+
const defaultAnimation = this.#defaults.animation;
|
|
844
845
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
845
|
-
const duration2 =
|
|
846
|
+
const duration2 = defaultAnimation.duration;
|
|
846
847
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
847
|
-
|
|
848
|
+
mergedAnimation.duration = duration2;
|
|
848
849
|
}
|
|
849
850
|
if (duration < 0) {
|
|
850
851
|
console.warn("Invalid animation duration. Fallback: 0 (ms).");
|
|
851
|
-
|
|
852
|
+
mergedAnimation.duration = 0;
|
|
852
853
|
}
|
|
853
|
-
if (!CSS.supports("animation-timing-function",
|
|
854
|
-
const easing =
|
|
854
|
+
if (!CSS.supports("animation-timing-function", mergedAnimation.easing)) {
|
|
855
|
+
const easing = defaultAnimation.easing;
|
|
855
856
|
console.warn(`Invalid animation easing. Fallback: '${easing}'.`);
|
|
856
|
-
|
|
857
|
+
mergedAnimation.easing = easing;
|
|
857
858
|
}
|
|
858
859
|
if (typeof merged.collapsible !== "boolean") {
|
|
859
860
|
const collapsible = this.#defaults.collapsible;
|
|
@@ -881,7 +882,7 @@ function waitAnimationFinish(animation) {
|
|
|
881
882
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
882
883
|
* Using the <details> and <summary> element.
|
|
883
884
|
*
|
|
884
|
-
* @version 2.0.
|
|
885
|
+
* @version 2.0.11
|
|
885
886
|
* @author Yusuke Kamiyamane
|
|
886
887
|
* @license MIT
|
|
887
888
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -837,21 +837,22 @@ var Disclosure = class _Disclosure {
|
|
|
837
837
|
...source,
|
|
838
838
|
animation: { ...target.animation, ...source.animation ?? {} }
|
|
839
839
|
};
|
|
840
|
-
const
|
|
841
|
-
const duration =
|
|
840
|
+
const mergedAnimation = merged.animation;
|
|
841
|
+
const duration = mergedAnimation.duration;
|
|
842
|
+
const defaultAnimation = this.#defaults.animation;
|
|
842
843
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
843
|
-
const duration2 =
|
|
844
|
+
const duration2 = defaultAnimation.duration;
|
|
844
845
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
845
|
-
|
|
846
|
+
mergedAnimation.duration = duration2;
|
|
846
847
|
}
|
|
847
848
|
if (duration < 0) {
|
|
848
849
|
console.warn("Invalid animation duration. Fallback: 0 (ms).");
|
|
849
|
-
|
|
850
|
+
mergedAnimation.duration = 0;
|
|
850
851
|
}
|
|
851
|
-
if (!CSS.supports("animation-timing-function",
|
|
852
|
-
const easing =
|
|
852
|
+
if (!CSS.supports("animation-timing-function", mergedAnimation.easing)) {
|
|
853
|
+
const easing = defaultAnimation.easing;
|
|
853
854
|
console.warn(`Invalid animation easing. Fallback: '${easing}'.`);
|
|
854
|
-
|
|
855
|
+
mergedAnimation.easing = easing;
|
|
855
856
|
}
|
|
856
857
|
if (typeof merged.collapsible !== "boolean") {
|
|
857
858
|
const collapsible = this.#defaults.collapsible;
|
|
@@ -879,7 +880,7 @@ function waitAnimationFinish(animation) {
|
|
|
879
880
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
880
881
|
* Using the <details> and <summary> element.
|
|
881
882
|
*
|
|
882
|
-
* @version 2.0.
|
|
883
|
+
* @version 2.0.11
|
|
883
884
|
* @author Yusuke Kamiyamane
|
|
884
885
|
* @license MIT
|
|
885
886
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -283,21 +283,22 @@ var Disclosure = class _Disclosure {
|
|
|
283
283
|
...source,
|
|
284
284
|
animation: { ...target.animation, ...source.animation ?? {} }
|
|
285
285
|
};
|
|
286
|
-
const
|
|
287
|
-
const duration =
|
|
286
|
+
const mergedAnimation = merged.animation;
|
|
287
|
+
const duration = mergedAnimation.duration;
|
|
288
|
+
const defaultAnimation = this.#defaults.animation;
|
|
288
289
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
289
|
-
const duration2 =
|
|
290
|
+
const duration2 = defaultAnimation.duration;
|
|
290
291
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
291
|
-
|
|
292
|
+
mergedAnimation.duration = duration2;
|
|
292
293
|
}
|
|
293
294
|
if (duration < 0) {
|
|
294
295
|
console.warn("Invalid animation duration. Fallback: 0 (ms).");
|
|
295
|
-
|
|
296
|
+
mergedAnimation.duration = 0;
|
|
296
297
|
}
|
|
297
|
-
if (!CSS.supports("animation-timing-function",
|
|
298
|
-
const easing =
|
|
298
|
+
if (!CSS.supports("animation-timing-function", mergedAnimation.easing)) {
|
|
299
|
+
const easing = defaultAnimation.easing;
|
|
299
300
|
console.warn(`Invalid animation easing. Fallback: '${easing}'.`);
|
|
300
|
-
|
|
301
|
+
mergedAnimation.easing = easing;
|
|
301
302
|
}
|
|
302
303
|
if (typeof merged.collapsible !== "boolean") {
|
|
303
304
|
const collapsible = this.#defaults.collapsible;
|
|
@@ -325,7 +326,7 @@ function waitAnimationFinish(animation) {
|
|
|
325
326
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
326
327
|
* Using the <details> and <summary> element.
|
|
327
328
|
*
|
|
328
|
-
* @version 2.0.
|
|
329
|
+
* @version 2.0.11
|
|
329
330
|
* @author Yusuke Kamiyamane
|
|
330
331
|
* @license MIT
|
|
331
332
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -261,21 +261,22 @@ var Disclosure = class _Disclosure {
|
|
|
261
261
|
...source,
|
|
262
262
|
animation: { ...target.animation, ...source.animation ?? {} }
|
|
263
263
|
};
|
|
264
|
-
const
|
|
265
|
-
const duration =
|
|
264
|
+
const mergedAnimation = merged.animation;
|
|
265
|
+
const duration = mergedAnimation.duration;
|
|
266
|
+
const defaultAnimation = this.#defaults.animation;
|
|
266
267
|
if (typeof duration !== "number" || Number.isNaN(duration)) {
|
|
267
|
-
const duration2 =
|
|
268
|
+
const duration2 = defaultAnimation.duration;
|
|
268
269
|
console.warn(`Invalid animation duration. Fallback: ${duration2} (ms).`);
|
|
269
|
-
|
|
270
|
+
mergedAnimation.duration = duration2;
|
|
270
271
|
}
|
|
271
272
|
if (duration < 0) {
|
|
272
273
|
console.warn("Invalid animation duration. Fallback: 0 (ms).");
|
|
273
|
-
|
|
274
|
+
mergedAnimation.duration = 0;
|
|
274
275
|
}
|
|
275
|
-
if (!CSS.supports("animation-timing-function",
|
|
276
|
-
const easing =
|
|
276
|
+
if (!CSS.supports("animation-timing-function", mergedAnimation.easing)) {
|
|
277
|
+
const easing = defaultAnimation.easing;
|
|
277
278
|
console.warn(`Invalid animation easing. Fallback: '${easing}'.`);
|
|
278
|
-
|
|
279
|
+
mergedAnimation.easing = easing;
|
|
279
280
|
}
|
|
280
281
|
if (typeof merged.collapsible !== "boolean") {
|
|
281
282
|
const collapsible = this.#defaults.collapsible;
|
|
@@ -303,7 +304,7 @@ function waitAnimationFinish(animation) {
|
|
|
303
304
|
* WAI-ARIA compliant disclosure pattern implementation in TypeScript.
|
|
304
305
|
* Using the <details> and <summary> element.
|
|
305
306
|
*
|
|
306
|
-
* @version 2.0.
|
|
307
|
+
* @version 2.0.11
|
|
307
308
|
* @author Yusuke Kamiyamane
|
|
308
309
|
* @license MIT
|
|
309
310
|
* @copyright Copyright (c) Yusuke Kamiyamane
|