dynaura 0.1.0 → 0.1.1

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.
@@ -232,7 +232,7 @@ function createToaster(initial = {}) {
232
232
  }
233
233
  }
234
234
  let raf = 0;
235
- const isCard = () => (t == null ? void 0 : t.variant) === "card";
235
+ const isCard = () => island.dataset.variant === "card";
236
236
  function shape() {
237
237
  if (!isCard()) {
238
238
  island.style.clipPath = "";
@@ -263,7 +263,11 @@ function createToaster(initial = {}) {
263
263
  island.style.height = hh + "px";
264
264
  island.style.borderRadius = isCard() ? "0" : Math.min(hh / 2, 32) + "px";
265
265
  if (isCard()) shapeLoop();
266
- else island.style.clipPath = "";
266
+ else {
267
+ cancelAnimationFrame(raf);
268
+ island.style.clipPath = "";
269
+ row.style.transform = "";
270
+ }
267
271
  }
268
272
  function measure() {
269
273
  if (island.hidden) return;
@@ -426,6 +430,7 @@ function createToaster(initial = {}) {
426
430
  island.hidden = true;
427
431
  ready = false;
428
432
  expanded = false;
433
+ row.style.transform = "";
429
434
  delete island.dataset.ready;
430
435
  island.dataset.expanded = "false";
431
436
  island.style.width = island.style.height = island.style.borderRadius = "";
package/dist/index.cjs CHANGED
@@ -260,7 +260,7 @@ function createToaster(initial = {}) {
260
260
  }
261
261
  }
262
262
  let raf = 0;
263
- const isCard = () => (t == null ? void 0 : t.variant) === "card";
263
+ const isCard = () => island.dataset.variant === "card";
264
264
  function shape() {
265
265
  if (!isCard()) {
266
266
  island.style.clipPath = "";
@@ -291,7 +291,11 @@ function createToaster(initial = {}) {
291
291
  island.style.height = hh + "px";
292
292
  island.style.borderRadius = isCard() ? "0" : Math.min(hh / 2, 32) + "px";
293
293
  if (isCard()) shapeLoop();
294
- else island.style.clipPath = "";
294
+ else {
295
+ cancelAnimationFrame(raf);
296
+ island.style.clipPath = "";
297
+ row.style.transform = "";
298
+ }
295
299
  }
296
300
  function measure() {
297
301
  if (island.hidden) return;
@@ -454,6 +458,7 @@ function createToaster(initial = {}) {
454
458
  island.hidden = true;
455
459
  ready = false;
456
460
  expanded = false;
461
+ row.style.transform = "";
457
462
  delete island.dataset.ready;
458
463
  island.dataset.expanded = "false";
459
464
  island.style.width = island.style.height = island.style.borderRadius = "";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createToaster,
4
4
  dynaura
5
- } from "./chunk-FNLIY6GQ.js";
5
+ } from "./chunk-VCDDW4W7.js";
6
6
 
7
7
  // src/index.tsx
8
8
  import { useEffect, useRef, useState } from "react";
package/dist/svelte.cjs CHANGED
@@ -258,7 +258,7 @@ function createToaster(initial = {}) {
258
258
  }
259
259
  }
260
260
  let raf = 0;
261
- const isCard = () => (t == null ? void 0 : t.variant) === "card";
261
+ const isCard = () => island.dataset.variant === "card";
262
262
  function shape() {
263
263
  if (!isCard()) {
264
264
  island.style.clipPath = "";
@@ -289,7 +289,11 @@ function createToaster(initial = {}) {
289
289
  island.style.height = hh + "px";
290
290
  island.style.borderRadius = isCard() ? "0" : Math.min(hh / 2, 32) + "px";
291
291
  if (isCard()) shapeLoop();
292
- else island.style.clipPath = "";
292
+ else {
293
+ cancelAnimationFrame(raf);
294
+ island.style.clipPath = "";
295
+ row.style.transform = "";
296
+ }
293
297
  }
294
298
  function measure() {
295
299
  if (island.hidden) return;
@@ -452,6 +456,7 @@ function createToaster(initial = {}) {
452
456
  island.hidden = true;
453
457
  ready = false;
454
458
  expanded = false;
459
+ row.style.transform = "";
455
460
  delete island.dataset.ready;
456
461
  island.dataset.expanded = "false";
457
462
  island.style.width = island.style.height = island.style.borderRadius = "";
package/dist/svelte.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createToaster,
4
4
  dynaura
5
- } from "./chunk-FNLIY6GQ.js";
5
+ } from "./chunk-VCDDW4W7.js";
6
6
 
7
7
  // src/svelte.ts
8
8
  var toaster = (_node, options) => {
package/dist/vanilla.cjs CHANGED
@@ -258,7 +258,7 @@ function createToaster(initial = {}) {
258
258
  }
259
259
  }
260
260
  let raf = 0;
261
- const isCard = () => (t == null ? void 0 : t.variant) === "card";
261
+ const isCard = () => island.dataset.variant === "card";
262
262
  function shape() {
263
263
  if (!isCard()) {
264
264
  island.style.clipPath = "";
@@ -289,7 +289,11 @@ function createToaster(initial = {}) {
289
289
  island.style.height = hh + "px";
290
290
  island.style.borderRadius = isCard() ? "0" : Math.min(hh / 2, 32) + "px";
291
291
  if (isCard()) shapeLoop();
292
- else island.style.clipPath = "";
292
+ else {
293
+ cancelAnimationFrame(raf);
294
+ island.style.clipPath = "";
295
+ row.style.transform = "";
296
+ }
293
297
  }
294
298
  function measure() {
295
299
  if (island.hidden) return;
@@ -452,6 +456,7 @@ function createToaster(initial = {}) {
452
456
  island.hidden = true;
453
457
  ready = false;
454
458
  expanded = false;
459
+ row.style.transform = "";
455
460
  delete island.dataset.ready;
456
461
  island.dataset.expanded = "false";
457
462
  island.style.width = island.style.height = island.style.borderRadius = "";
package/dist/vanilla.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createToaster,
4
4
  dynaura
5
- } from "./chunk-FNLIY6GQ.js";
5
+ } from "./chunk-VCDDW4W7.js";
6
6
  export {
7
7
  createToaster,
8
8
  dynaura
package/dist/vue.cjs CHANGED
@@ -259,7 +259,7 @@ function createToaster(initial = {}) {
259
259
  }
260
260
  }
261
261
  let raf = 0;
262
- const isCard = () => (t == null ? void 0 : t.variant) === "card";
262
+ const isCard = () => island.dataset.variant === "card";
263
263
  function shape() {
264
264
  if (!isCard()) {
265
265
  island.style.clipPath = "";
@@ -290,7 +290,11 @@ function createToaster(initial = {}) {
290
290
  island.style.height = hh + "px";
291
291
  island.style.borderRadius = isCard() ? "0" : Math.min(hh / 2, 32) + "px";
292
292
  if (isCard()) shapeLoop();
293
- else island.style.clipPath = "";
293
+ else {
294
+ cancelAnimationFrame(raf);
295
+ island.style.clipPath = "";
296
+ row.style.transform = "";
297
+ }
294
298
  }
295
299
  function measure() {
296
300
  if (island.hidden) return;
@@ -453,6 +457,7 @@ function createToaster(initial = {}) {
453
457
  island.hidden = true;
454
458
  ready = false;
455
459
  expanded = false;
460
+ row.style.transform = "";
456
461
  delete island.dataset.ready;
457
462
  island.dataset.expanded = "false";
458
463
  island.style.width = island.style.height = island.style.borderRadius = "";
package/dist/vue.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createToaster,
4
4
  dynaura
5
- } from "./chunk-FNLIY6GQ.js";
5
+ } from "./chunk-VCDDW4W7.js";
6
6
 
7
7
  // src/vue.ts
8
8
  import { defineComponent, onBeforeUnmount, onMounted, watch } from "vue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynaura",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Dynamic Island style toasts. Spring-morphing, swipeable, themeable, zero dependencies. React, Vue, Svelte, vanilla.",
5
5
  "license": "MIT",
6
6
  "type": "module",