use-scroll-animate 3.9.0 → 4.0.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.
Files changed (144) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +16 -14
  3. package/README_ja.md +10 -11
  4. package/README_zh.md +11 -12
  5. package/dist/chunks/{base-Dm6ee5ug.cjs → base-CXx7jZ-o.cjs} +1 -11
  6. package/dist/chunks/{base-Dm6ee5ug.cjs.map → base-CXx7jZ-o.cjs.map} +1 -1
  7. package/dist/chunks/{base-BRIPyPtX.js → base-ZARFccur.js} +2 -11
  8. package/dist/chunks/{base-BRIPyPtX.js.map → base-ZARFccur.js.map} +1 -1
  9. package/dist/chunks/core-Co-6AL0h.js +218 -0
  10. package/dist/chunks/core-Co-6AL0h.js.map +1 -0
  11. package/dist/chunks/{core-CYozf_E-.js → core-DKY-fVzR.js} +2 -2
  12. package/dist/chunks/{core-CYozf_E-.js.map → core-DKY-fVzR.js.map} +1 -1
  13. package/dist/chunks/core-DXqZm5Il.cjs +222 -0
  14. package/dist/chunks/core-DXqZm5Il.cjs.map +1 -0
  15. package/dist/chunks/{core-CHAtivHV.cjs → core-IaorbTdu.cjs} +2 -2
  16. package/dist/chunks/{core-CHAtivHV.cjs.map → core-IaorbTdu.cjs.map} +1 -1
  17. package/dist/chunks/{index-tags-BmQR17Sb.js → index-tags-43Xtd01A.js} +2 -2
  18. package/dist/chunks/index-tags-43Xtd01A.js.map +1 -0
  19. package/dist/chunks/{index-tags-DYYsgbba.cjs → index-tags-BQh_uGqH.cjs} +2 -2
  20. package/dist/chunks/index-tags-BQh_uGqH.cjs.map +1 -0
  21. package/dist/chunks/{spring-Dp5BllPB.cjs → spring-2OTnYCzm.cjs} +2 -2
  22. package/dist/chunks/{spring-Dp5BllPB.cjs.map → spring-2OTnYCzm.cjs.map} +1 -1
  23. package/dist/chunks/{spring-UBPhrh1X.js → spring-E2ickYNI.js} +2 -2
  24. package/dist/chunks/{spring-UBPhrh1X.js.map → spring-E2ickYNI.js.map} +1 -1
  25. package/dist/chunks/{variants-_dC-ey6R.cjs → variants-BNIrn4ch.cjs} +2 -2
  26. package/dist/chunks/{variants-_dC-ey6R.cjs.map → variants-BNIrn4ch.cjs.map} +1 -1
  27. package/dist/chunks/{variants-DTypaOH3.js → variants-DvnxvRCM.js} +2 -2
  28. package/dist/chunks/{variants-DTypaOH3.js.map → variants-DvnxvRCM.js.map} +1 -1
  29. package/dist/components/angular.cjs +6 -5
  30. package/dist/components/angular.cjs.map +1 -1
  31. package/dist/components/angular.d.cts +4 -17
  32. package/dist/components/angular.d.ts +4 -17
  33. package/dist/components/angular.js +6 -5
  34. package/dist/components/angular.js.map +1 -1
  35. package/dist/components/background.cjs +2 -2
  36. package/dist/components/background.js +3 -3
  37. package/dist/components/cards.cjs +2 -2
  38. package/dist/components/cards.js +3 -3
  39. package/dist/components/click.cjs +2 -2
  40. package/dist/components/click.js +3 -3
  41. package/dist/components/depth.cjs +3 -3
  42. package/dist/components/depth.js +4 -4
  43. package/dist/components/feedback.cjs +1 -1
  44. package/dist/components/feedback.js +2 -2
  45. package/dist/components/gesture.cjs +3 -3
  46. package/dist/components/gesture.js +5 -5
  47. package/dist/components/interaction.cjs +1 -1
  48. package/dist/components/interaction.js +2 -2
  49. package/dist/components/jsx.d.cts +1 -1
  50. package/dist/components/jsx.d.ts +1 -1
  51. package/dist/components/layout.cjs +1 -1
  52. package/dist/components/layout.js +2 -2
  53. package/dist/components/lazy.cjs +1 -1
  54. package/dist/components/lazy.d.cts +1 -1
  55. package/dist/components/lazy.d.ts +1 -1
  56. package/dist/components/lazy.js +1 -1
  57. package/dist/components/packs.cjs +1 -1
  58. package/dist/components/packs.js +2 -2
  59. package/dist/components/page.cjs +2 -2
  60. package/dist/components/page.js +3 -3
  61. package/dist/components/physics.cjs +2 -2
  62. package/dist/components/physics.js +4 -4
  63. package/dist/components/react.cjs +2 -2
  64. package/dist/components/react.cjs.map +1 -1
  65. package/dist/components/react.d.cts +1 -1
  66. package/dist/components/react.d.ts +1 -1
  67. package/dist/components/react.js +2 -2
  68. package/dist/components/react.js.map +1 -1
  69. package/dist/components/reveal.cjs +1 -1
  70. package/dist/components/reveal.js +2 -2
  71. package/dist/components/solid.cjs +25 -9
  72. package/dist/components/solid.cjs.map +1 -1
  73. package/dist/components/solid.d.cts +8 -35
  74. package/dist/components/solid.d.ts +8 -35
  75. package/dist/components/solid.js +25 -9
  76. package/dist/components/solid.js.map +1 -1
  77. package/dist/components/svelte.cjs +6 -5
  78. package/dist/components/svelte.cjs.map +1 -1
  79. package/dist/components/svelte.d.cts +4 -17
  80. package/dist/components/svelte.d.ts +4 -17
  81. package/dist/components/svelte.js +6 -5
  82. package/dist/components/svelte.js.map +1 -1
  83. package/dist/components/svg.cjs +17 -11
  84. package/dist/components/svg.cjs.map +1 -1
  85. package/dist/components/svg.css +1 -1
  86. package/dist/components/svg.js +18 -12
  87. package/dist/components/svg.js.map +1 -1
  88. package/dist/components/text.cjs +2 -2
  89. package/dist/components/text.css +1 -1
  90. package/dist/components/text.js +3 -3
  91. package/dist/components/timeline.cjs +23 -223
  92. package/dist/components/timeline.cjs.map +1 -1
  93. package/dist/components/timeline.js +21 -220
  94. package/dist/components/timeline.js.map +1 -1
  95. package/dist/components/transitions.cjs +8 -125
  96. package/dist/components/transitions.cjs.map +1 -1
  97. package/dist/components/transitions.css +0 -1
  98. package/dist/components/transitions.d.cts +5 -34
  99. package/dist/components/transitions.d.ts +5 -34
  100. package/dist/components/transitions.js +10 -125
  101. package/dist/components/transitions.js.map +1 -1
  102. package/dist/components/ui.cjs +3 -3
  103. package/dist/components/ui.js +5 -5
  104. package/dist/components/vue.cjs +6 -5
  105. package/dist/components/vue.cjs.map +1 -1
  106. package/dist/components/vue.d.cts +4 -17
  107. package/dist/components/vue.d.ts +4 -17
  108. package/dist/components/vue.js +6 -5
  109. package/dist/components/vue.js.map +1 -1
  110. package/dist/components/webgl.cjs +11 -1
  111. package/dist/components/webgl.cjs.map +1 -1
  112. package/dist/components/webgl.js +12 -2
  113. package/dist/components/webgl.js.map +1 -1
  114. package/dist/components.cjs +12 -13
  115. package/dist/components.cjs.map +1 -1
  116. package/dist/components.css +2 -3
  117. package/dist/components.d.cts +6 -35
  118. package/dist/components.d.ts +6 -35
  119. package/dist/components.js +10 -9
  120. package/dist/components.js.map +1 -1
  121. package/dist/components.umd.js +2 -2
  122. package/dist/components.umd.js.map +1 -1
  123. package/dist/index.cjs +5 -109
  124. package/dist/index.cjs.map +1 -1
  125. package/dist/index.d.cts +72 -32
  126. package/dist/index.d.ts +72 -32
  127. package/dist/index.js +4 -110
  128. package/dist/index.js.map +1 -1
  129. package/dist/index.umd.js +2 -2
  130. package/dist/index.umd.js.map +1 -1
  131. package/dist/solid.cjs +38 -8
  132. package/dist/solid.cjs.map +1 -1
  133. package/dist/solid.d.cts +6 -1
  134. package/dist/solid.d.ts +6 -1
  135. package/dist/solid.js +39 -9
  136. package/dist/solid.js.map +1 -1
  137. package/docs/API.md +6 -6
  138. package/docs/ROADMAP.md +14 -0
  139. package/docs/components.md +3 -5
  140. package/docs/migration-from-aos.md +1 -1
  141. package/docs/migration-from-gsap-scrolltrigger.md +6 -6
  142. package/package.json +1 -1
  143. package/dist/chunks/index-tags-BmQR17Sb.js.map +0 -1
  144. package/dist/chunks/index-tags-DYYsgbba.cjs.map +0 -1
@@ -1,30 +1,32 @@
1
1
  'use strict';
2
2
 
3
+ var solidJs = require('solid-js');
3
4
  var components = require('../components.cjs');
4
5
  var bind = require('../chunks/bind-Ui43-n2d.cjs');
5
6
  require('./reveal.cjs');
6
- require('../chunks/base-Dm6ee5ug.cjs');
7
+ require('../chunks/base-CXx7jZ-o.cjs');
7
8
  require('./text.cjs');
8
9
  require('./interaction.cjs');
9
10
  require('./feedback.cjs');
10
11
  require('./background.cjs');
11
- require('../chunks/variants-_dC-ey6R.cjs');
12
+ require('../chunks/variants-BNIrn4ch.cjs');
12
13
  require('./transitions.cjs');
13
14
  require('./physics.cjs');
14
- require('../chunks/spring-Dp5BllPB.cjs');
15
+ require('../chunks/spring-2OTnYCzm.cjs');
15
16
  require('./cards.cjs');
16
17
  require('./click.cjs');
17
18
  require('./ui.cjs');
18
19
  require('./page.cjs');
19
20
  require('./timeline.cjs');
21
+ require('../chunks/core-DXqZm5Il.cjs');
20
22
  require('./gesture.cjs');
21
- require('../chunks/core-CHAtivHV.cjs');
23
+ require('../chunks/core-IaorbTdu.cjs');
22
24
  require('./svg.cjs');
23
25
  require('./webgl.cjs');
24
26
  require('./depth.cjs');
25
27
  require('./layout.cjs');
26
28
  require('./packs.cjs');
27
- require('../chunks/index-tags-DYYsgbba.cjs');
29
+ require('../chunks/index-tags-BQh_uGqH.cjs');
28
30
 
29
31
  /**
30
32
  * use-scroll-animate/components/solid — Solid integration (v3.8).
@@ -43,12 +45,26 @@ require('../chunks/index-tags-DYYsgbba.cjs');
43
45
  */
44
46
  /**
45
47
  * Solid directive (`use:usa`). Solid calls it with the element and an
46
- * accessor; the binding is read once on mount and re-read whenever
47
- * `refresh()` on the returned handle is called (or wrap it in `createEffect`).
48
+ * accessor; since 4.0.1 the binding is tracked with `createRenderEffect`, so
49
+ * signals read inside `{{ props, on }}` update the element automatically and
50
+ * the listeners are removed on cleanup. `refresh()` is kept for code that
51
+ * calls the directive outside a reactive owner.
48
52
  */
49
53
  function usa(el, accessor) {
50
- const b = bind.bindUsa(el, accessor() || {});
51
- return { refresh: () => b.update(accessor() || {}), destroy: b.destroy };
54
+ let b = null;
55
+ const run = () => {
56
+ const v = accessor() || {};
57
+ if (b)
58
+ b.update(v);
59
+ else
60
+ b = bind.bindUsa(el, v);
61
+ };
62
+ solidJs.createRenderEffect(run);
63
+ if (!b)
64
+ run();
65
+ const destroy = () => b?.destroy();
66
+ solidJs.onCleanup(destroy);
67
+ return { refresh: run, destroy };
52
68
  }
53
69
  /** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */
54
70
  function defineUsa(categories) {
@@ -1 +1 @@
1
- {"version":3,"file":"solid.cjs","sources":["../../src/components/frameworks/solid.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/solid — Solid integration (v3.8).\n * Solid renders custom elements natively: set properties with `prop:` and\n * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).\n * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`\n * directive for `use:usa={{ props, on }}`, and JSX types.\n *\n * ```tsx\n * import { defineUsa, usa } from 'use-scroll-animate/components/solid';\n * import type {} from 'use-scroll-animate/components/solid'; // JSX types\n * onMount(() => defineUsa());\n * false && usa; // keep the directive import (Solid convention)\n * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect=\"flip\">…</usa-card>\n * ```\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\nimport type { UsaIntrinsicElements } from './jsx';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/**\n * Solid directive (`use:usa`). Solid calls it with the element and an\n * accessor; the binding is read once on mount and re-read whenever\n * `refresh()` on the returned handle is called (or wrap it in `createEffect`).\n */\nexport function usa(el: HTMLElement, accessor: () => UsaBinding | undefined): { refresh(): void; destroy(): void } {\n const b = bindUsa(el, accessor() || {});\n return { refresh: () => b.update(accessor() || {}), destroy: b.destroy };\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n\n/** JSX intrinsic elements for Solid (same attribute types as the React/Preact ones). */\nexport type SolidUsaIntrinsicElements = UsaIntrinsicElements;\n"],"names":["bindUsa","defineComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AAQH;;;;AAIG;AACG,SAAU,GAAG,CAAC,EAAe,EAAE,QAAsC,EAAA;IACzE,MAAM,CAAC,GAAGA,YAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;AAC1E;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAEC,2BAAgB,CAAC,UAAU,CAAC;AACjE;;;;;;;"}
1
+ {"version":3,"file":"solid.cjs","sources":["../../src/components/frameworks/solid.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/solid — Solid integration (v3.8).\n * Solid renders custom elements natively: set properties with `prop:` and\n * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).\n * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`\n * directive for `use:usa={{ props, on }}`, and JSX types.\n *\n * ```tsx\n * import { defineUsa, usa } from 'use-scroll-animate/components/solid';\n * import type {} from 'use-scroll-animate/components/solid'; // JSX types\n * onMount(() => defineUsa());\n * false && usa; // keep the directive import (Solid convention)\n * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect=\"flip\">…</usa-card>\n * ```\n */\nimport { createRenderEffect, onCleanup } from 'solid-js';\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\nimport type { UsaIntrinsicElements } from './jsx';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/**\n * Solid directive (`use:usa`). Solid calls it with the element and an\n * accessor; since 4.0.1 the binding is tracked with `createRenderEffect`, so\n * signals read inside `{{ props, on }}` update the element automatically and\n * the listeners are removed on cleanup. `refresh()` is kept for code that\n * calls the directive outside a reactive owner.\n */\nexport function usa(el: HTMLElement, accessor: () => UsaBinding | undefined): { refresh(): void; destroy(): void } {\n let b: ReturnType<typeof bindUsa> | null = null;\n const run = () => {\n const v = accessor() || {};\n if (b) b.update(v);\n else b = bindUsa(el, v);\n };\n createRenderEffect(run);\n if (!b) run();\n const destroy = () => b?.destroy();\n onCleanup(destroy);\n return { refresh: run, destroy };\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n\n/** JSX intrinsic elements for Solid (same attribute types as the React/Preact ones). */\nexport type SolidUsaIntrinsicElements = UsaIntrinsicElements;\n"],"names":["bindUsa","createRenderEffect","onCleanup","defineComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AASH;;;;;;AAMG;AACG,SAAU,GAAG,CAAC,EAAe,EAAE,QAAsC,EAAA;IACzE,IAAI,CAAC,GAAsC,IAAI;IAC/C,MAAM,GAAG,GAAG,MAAK;AACf,QAAA,MAAM,CAAC,GAAG,QAAQ,EAAE,IAAI,EAAE;AAC1B,QAAA,IAAI,CAAC;AAAE,YAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;;AACb,YAAA,CAAC,GAAGA,YAAO,CAAC,EAAE,EAAE,CAAC,CAAC;AACzB,IAAA,CAAC;IACDC,0BAAkB,CAAC,GAAG,CAAC;AACvB,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,GAAG,EAAE;IACb,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,OAAO,EAAE;IAClCC,iBAAS,CAAC,OAAO,CAAC;AAClB,IAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAEC,2BAAgB,CAAC,UAAU,CAAC;AACjE;;;;;;;"}
@@ -622,19 +622,6 @@ interface UsaAccordionElement extends UsaElement {
622
622
  toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;
623
623
  }
624
624
 
625
- /**
626
- * `<usa-flip-list>` — animates its children to their new places whenever
627
- * they are added, removed or reordered (FLIP: transforms only). Works with
628
- * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.
629
- *
630
- * Attributes: `duration` (ms, 420), `easing`, `disabled`.
631
- * Method: `flip(mutate)` for explicit changes (also measures resizes).
632
- * Reduced motion: no animation.
633
- */
634
- interface UsaFlipListElement extends UsaElement {
635
- flip(mutate: () => void | Promise<void>): Promise<void>;
636
- }
637
-
638
625
  /**
639
626
  * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard
640
627
  * steps, app pages) and animates between them. Children are views; name
@@ -654,15 +641,15 @@ interface UsaViewSwitchElement extends UsaElement {
654
641
 
655
642
  /**
656
643
  * use-scroll-animate/components/transitions — view & layout transitions.
657
- * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`
658
- * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.
644
+ * `<usa-dialog>`, `<usa-accordion>`, `<usa-view-switch>`
645
+ * and the `viewTransition()` and `flip()` helpers (4.0: `<usa-flip-list>` → `<usa-auto-animate>`,
646
+ * `connectedAnimation()` → `sharedTransition()`, both in `components/layout`).
659
647
  */
660
648
 
661
649
  declare global {
662
650
  interface HTMLElementTagNameMap {
663
651
  'usa-dialog': UsaDialogElement;
664
652
  'usa-accordion': UsaAccordionElement;
665
- 'usa-flip-list': UsaFlipListElement;
666
653
  'usa-view-switch': UsaViewSwitchElement;
667
654
  }
668
655
  }
@@ -1621,7 +1608,7 @@ declare const COMPONENT_CATEGORIES: {
1621
1608
  readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press", "usa-toggle"];
1622
1609
  readonly feedback: readonly ["usa-spinner", "usa-skeleton", "usa-progress", "usa-toaster", "usa-check"];
1623
1610
  readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic", "usa-grid-glow", "usa-blobs", "usa-water-ripple", "usa-dot-network"];
1624
- readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-flip-list", "usa-view-switch"];
1611
+ readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-view-switch"];
1625
1612
  readonly physics: readonly ["usa-spring", "usa-draggable", "usa-overscroll"];
1626
1613
  readonly cards: readonly ["usa-card", "usa-card-stack", "usa-sticky-stack", "usa-carousel-3d"];
1627
1614
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
@@ -1684,26 +1671,12 @@ type UsaIntrinsicElements = {
1684
1671
  [K in Tags]: UsaAttributes;
1685
1672
  };
1686
1673
 
1687
- /**
1688
- * use-scroll-animate/components/solid — Solid integration (v3.8).
1689
- * Solid renders custom elements natively: set properties with `prop:` and
1690
- * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).
1691
- * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`
1692
- * directive for `use:usa={{ props, on }}`, and JSX types.
1693
- *
1694
- * ```tsx
1695
- * import { defineUsa, usa } from 'use-scroll-animate/components/solid';
1696
- * import type {} from 'use-scroll-animate/components/solid'; // JSX types
1697
- * onMount(() => defineUsa());
1698
- * false && usa; // keep the directive import (Solid convention)
1699
- * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect="flip">…</usa-card>
1700
- * ```
1701
- */
1702
-
1703
1674
  /**
1704
1675
  * Solid directive (`use:usa`). Solid calls it with the element and an
1705
- * accessor; the binding is read once on mount and re-read whenever
1706
- * `refresh()` on the returned handle is called (or wrap it in `createEffect`).
1676
+ * accessor; since 4.0.1 the binding is tracked with `createRenderEffect`, so
1677
+ * signals read inside `{{ props, on }}` update the element automatically and
1678
+ * the listeners are removed on cleanup. `refresh()` is kept for code that
1679
+ * calls the directive outside a reactive owner.
1707
1680
  */
1708
1681
  declare function usa(el: HTMLElement, accessor: () => UsaBinding | undefined): {
1709
1682
  refresh(): void;
@@ -622,19 +622,6 @@ interface UsaAccordionElement extends UsaElement {
622
622
  toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;
623
623
  }
624
624
 
625
- /**
626
- * `<usa-flip-list>` — animates its children to their new places whenever
627
- * they are added, removed or reordered (FLIP: transforms only). Works with
628
- * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.
629
- *
630
- * Attributes: `duration` (ms, 420), `easing`, `disabled`.
631
- * Method: `flip(mutate)` for explicit changes (also measures resizes).
632
- * Reduced motion: no animation.
633
- */
634
- interface UsaFlipListElement extends UsaElement {
635
- flip(mutate: () => void | Promise<void>): Promise<void>;
636
- }
637
-
638
625
  /**
639
626
  * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard
640
627
  * steps, app pages) and animates between them. Children are views; name
@@ -654,15 +641,15 @@ interface UsaViewSwitchElement extends UsaElement {
654
641
 
655
642
  /**
656
643
  * use-scroll-animate/components/transitions — view & layout transitions.
657
- * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`
658
- * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.
644
+ * `<usa-dialog>`, `<usa-accordion>`, `<usa-view-switch>`
645
+ * and the `viewTransition()` and `flip()` helpers (4.0: `<usa-flip-list>` → `<usa-auto-animate>`,
646
+ * `connectedAnimation()` → `sharedTransition()`, both in `components/layout`).
659
647
  */
660
648
 
661
649
  declare global {
662
650
  interface HTMLElementTagNameMap {
663
651
  'usa-dialog': UsaDialogElement;
664
652
  'usa-accordion': UsaAccordionElement;
665
- 'usa-flip-list': UsaFlipListElement;
666
653
  'usa-view-switch': UsaViewSwitchElement;
667
654
  }
668
655
  }
@@ -1621,7 +1608,7 @@ declare const COMPONENT_CATEGORIES: {
1621
1608
  readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press", "usa-toggle"];
1622
1609
  readonly feedback: readonly ["usa-spinner", "usa-skeleton", "usa-progress", "usa-toaster", "usa-check"];
1623
1610
  readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic", "usa-grid-glow", "usa-blobs", "usa-water-ripple", "usa-dot-network"];
1624
- readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-flip-list", "usa-view-switch"];
1611
+ readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-view-switch"];
1625
1612
  readonly physics: readonly ["usa-spring", "usa-draggable", "usa-overscroll"];
1626
1613
  readonly cards: readonly ["usa-card", "usa-card-stack", "usa-sticky-stack", "usa-carousel-3d"];
1627
1614
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
@@ -1684,26 +1671,12 @@ type UsaIntrinsicElements = {
1684
1671
  [K in Tags]: UsaAttributes;
1685
1672
  };
1686
1673
 
1687
- /**
1688
- * use-scroll-animate/components/solid — Solid integration (v3.8).
1689
- * Solid renders custom elements natively: set properties with `prop:` and
1690
- * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).
1691
- * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`
1692
- * directive for `use:usa={{ props, on }}`, and JSX types.
1693
- *
1694
- * ```tsx
1695
- * import { defineUsa, usa } from 'use-scroll-animate/components/solid';
1696
- * import type {} from 'use-scroll-animate/components/solid'; // JSX types
1697
- * onMount(() => defineUsa());
1698
- * false && usa; // keep the directive import (Solid convention)
1699
- * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect="flip">…</usa-card>
1700
- * ```
1701
- */
1702
-
1703
1674
  /**
1704
1675
  * Solid directive (`use:usa`). Solid calls it with the element and an
1705
- * accessor; the binding is read once on mount and re-read whenever
1706
- * `refresh()` on the returned handle is called (or wrap it in `createEffect`).
1676
+ * accessor; since 4.0.1 the binding is tracked with `createRenderEffect`, so
1677
+ * signals read inside `{{ props, on }}` update the element automatically and
1678
+ * the listeners are removed on cleanup. `refresh()` is kept for code that
1679
+ * calls the directive outside a reactive owner.
1707
1680
  */
1708
1681
  declare function usa(el: HTMLElement, accessor: () => UsaBinding | undefined): {
1709
1682
  refresh(): void;
@@ -1,29 +1,31 @@
1
+ import { createRenderEffect, onCleanup } from 'solid-js';
1
2
  import { defineComponents } from '../components.js';
2
3
  import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
3
4
  export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
4
5
  import './reveal.js';
5
- import '../chunks/base-BRIPyPtX.js';
6
+ import '../chunks/base-ZARFccur.js';
6
7
  import './text.js';
7
8
  import './interaction.js';
8
9
  import './feedback.js';
9
10
  import './background.js';
10
- import '../chunks/variants-DTypaOH3.js';
11
+ import '../chunks/variants-DvnxvRCM.js';
11
12
  import './transitions.js';
12
13
  import './physics.js';
13
- import '../chunks/spring-UBPhrh1X.js';
14
+ import '../chunks/spring-E2ickYNI.js';
14
15
  import './cards.js';
15
16
  import './click.js';
16
17
  import './ui.js';
17
18
  import './page.js';
18
19
  import './timeline.js';
20
+ import '../chunks/core-Co-6AL0h.js';
19
21
  import './gesture.js';
20
- import '../chunks/core-CYozf_E-.js';
22
+ import '../chunks/core-DKY-fVzR.js';
21
23
  import './svg.js';
22
24
  import './webgl.js';
23
25
  import './depth.js';
24
26
  import './layout.js';
25
27
  import './packs.js';
26
- import '../chunks/index-tags-BmQR17Sb.js';
28
+ import '../chunks/index-tags-43Xtd01A.js';
27
29
 
28
30
  /**
29
31
  * use-scroll-animate/components/solid — Solid integration (v3.8).
@@ -42,12 +44,26 @@ import '../chunks/index-tags-BmQR17Sb.js';
42
44
  */
43
45
  /**
44
46
  * Solid directive (`use:usa`). Solid calls it with the element and an
45
- * accessor; the binding is read once on mount and re-read whenever
46
- * `refresh()` on the returned handle is called (or wrap it in `createEffect`).
47
+ * accessor; since 4.0.1 the binding is tracked with `createRenderEffect`, so
48
+ * signals read inside `{{ props, on }}` update the element automatically and
49
+ * the listeners are removed on cleanup. `refresh()` is kept for code that
50
+ * calls the directive outside a reactive owner.
47
51
  */
48
52
  function usa(el, accessor) {
49
- const b = bindUsa(el, accessor() || {});
50
- return { refresh: () => b.update(accessor() || {}), destroy: b.destroy };
53
+ let b = null;
54
+ const run = () => {
55
+ const v = accessor() || {};
56
+ if (b)
57
+ b.update(v);
58
+ else
59
+ b = bindUsa(el, v);
60
+ };
61
+ createRenderEffect(run);
62
+ if (!b)
63
+ run();
64
+ const destroy = () => b?.destroy();
65
+ onCleanup(destroy);
66
+ return { refresh: run, destroy };
51
67
  }
52
68
  /** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */
53
69
  function defineUsa(categories) {
@@ -1 +1 @@
1
- {"version":3,"file":"solid.js","sources":["../../src/components/frameworks/solid.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/solid — Solid integration (v3.8).\n * Solid renders custom elements natively: set properties with `prop:` and\n * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).\n * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`\n * directive for `use:usa={{ props, on }}`, and JSX types.\n *\n * ```tsx\n * import { defineUsa, usa } from 'use-scroll-animate/components/solid';\n * import type {} from 'use-scroll-animate/components/solid'; // JSX types\n * onMount(() => defineUsa());\n * false && usa; // keep the directive import (Solid convention)\n * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect=\"flip\">…</usa-card>\n * ```\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\nimport type { UsaIntrinsicElements } from './jsx';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/**\n * Solid directive (`use:usa`). Solid calls it with the element and an\n * accessor; the binding is read once on mount and re-read whenever\n * `refresh()` on the returned handle is called (or wrap it in `createEffect`).\n */\nexport function usa(el: HTMLElement, accessor: () => UsaBinding | undefined): { refresh(): void; destroy(): void } {\n const b = bindUsa(el, accessor() || {});\n return { refresh: () => b.update(accessor() || {}), destroy: b.destroy };\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n\n/** JSX intrinsic elements for Solid (same attribute types as the React/Preact ones). */\nexport type SolidUsaIntrinsicElements = UsaIntrinsicElements;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AAQH;;;;AAIG;AACG,SAAU,GAAG,CAAC,EAAe,EAAE,QAAsC,EAAA;IACzE,MAAM,CAAC,GAAG,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;AAC1E;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,gBAAgB,CAAC,UAAU,CAAC;AACjE;;;;"}
1
+ {"version":3,"file":"solid.js","sources":["../../src/components/frameworks/solid.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/solid — Solid integration (v3.8).\n * Solid renders custom elements natively: set properties with `prop:` and\n * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).\n * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`\n * directive for `use:usa={{ props, on }}`, and JSX types.\n *\n * ```tsx\n * import { defineUsa, usa } from 'use-scroll-animate/components/solid';\n * import type {} from 'use-scroll-animate/components/solid'; // JSX types\n * onMount(() => defineUsa());\n * false && usa; // keep the directive import (Solid convention)\n * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect=\"flip\">…</usa-card>\n * ```\n */\nimport { createRenderEffect, onCleanup } from 'solid-js';\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\nimport type { UsaIntrinsicElements } from './jsx';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/**\n * Solid directive (`use:usa`). Solid calls it with the element and an\n * accessor; since 4.0.1 the binding is tracked with `createRenderEffect`, so\n * signals read inside `{{ props, on }}` update the element automatically and\n * the listeners are removed on cleanup. `refresh()` is kept for code that\n * calls the directive outside a reactive owner.\n */\nexport function usa(el: HTMLElement, accessor: () => UsaBinding | undefined): { refresh(): void; destroy(): void } {\n let b: ReturnType<typeof bindUsa> | null = null;\n const run = () => {\n const v = accessor() || {};\n if (b) b.update(v);\n else b = bindUsa(el, v);\n };\n createRenderEffect(run);\n if (!b) run();\n const destroy = () => b?.destroy();\n onCleanup(destroy);\n return { refresh: run, destroy };\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n\n/** JSX intrinsic elements for Solid (same attribute types as the React/Preact ones). */\nexport type SolidUsaIntrinsicElements = UsaIntrinsicElements;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AASH;;;;;;AAMG;AACG,SAAU,GAAG,CAAC,EAAe,EAAE,QAAsC,EAAA;IACzE,IAAI,CAAC,GAAsC,IAAI;IAC/C,MAAM,GAAG,GAAG,MAAK;AACf,QAAA,MAAM,CAAC,GAAG,QAAQ,EAAE,IAAI,EAAE;AAC1B,QAAA,IAAI,CAAC;AAAE,YAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;;AACb,YAAA,CAAC,GAAG,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;AACzB,IAAA,CAAC;IACD,kBAAkB,CAAC,GAAG,CAAC;AACvB,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,GAAG,EAAE;IACb,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,OAAO,EAAE;IAClC,SAAS,CAAC,OAAO,CAAC;AAClB,IAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,gBAAgB,CAAC,UAAU,CAAC;AACjE;;;;"}
@@ -3,28 +3,29 @@
3
3
  var components = require('../components.cjs');
4
4
  var bind = require('../chunks/bind-Ui43-n2d.cjs');
5
5
  require('./reveal.cjs');
6
- require('../chunks/base-Dm6ee5ug.cjs');
6
+ require('../chunks/base-CXx7jZ-o.cjs');
7
7
  require('./text.cjs');
8
8
  require('./interaction.cjs');
9
9
  require('./feedback.cjs');
10
10
  require('./background.cjs');
11
- require('../chunks/variants-_dC-ey6R.cjs');
11
+ require('../chunks/variants-BNIrn4ch.cjs');
12
12
  require('./transitions.cjs');
13
13
  require('./physics.cjs');
14
- require('../chunks/spring-Dp5BllPB.cjs');
14
+ require('../chunks/spring-2OTnYCzm.cjs');
15
15
  require('./cards.cjs');
16
16
  require('./click.cjs');
17
17
  require('./ui.cjs');
18
18
  require('./page.cjs');
19
19
  require('./timeline.cjs');
20
+ require('../chunks/core-DXqZm5Il.cjs');
20
21
  require('./gesture.cjs');
21
- require('../chunks/core-CHAtivHV.cjs');
22
+ require('../chunks/core-IaorbTdu.cjs');
22
23
  require('./svg.cjs');
23
24
  require('./webgl.cjs');
24
25
  require('./depth.cjs');
25
26
  require('./layout.cjs');
26
27
  require('./packs.cjs');
27
- require('../chunks/index-tags-DYYsgbba.cjs');
28
+ require('../chunks/index-tags-BQh_uGqH.cjs');
28
29
 
29
30
  /**
30
31
  * use-scroll-animate/components/svelte — Svelte integration (v3.8).
@@ -1 +1 @@
1
- {"version":3,"file":"svelte.cjs","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":["bindUsa","defineComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAOH;SACgB,GAAG,CAAC,IAAiB,EAAE,UAAsB,EAAE,EAAA;AAC7D,IAAA,OAAOA,YAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/B;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAEC,2BAAgB,CAAC,UAAU,CAAC;AACjE;;;;;;;"}
1
+ {"version":3,"file":"svelte.cjs","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":["bindUsa","defineComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAOH;SACgB,GAAG,CAAC,IAAiB,EAAE,UAAsB,EAAE,EAAA;AAC7D,IAAA,OAAOA,YAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/B;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAEC,2BAAgB,CAAC,UAAU,CAAC;AACjE;;;;;;;"}
@@ -622,19 +622,6 @@ interface UsaAccordionElement extends UsaElement {
622
622
  toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;
623
623
  }
624
624
 
625
- /**
626
- * `<usa-flip-list>` — animates its children to their new places whenever
627
- * they are added, removed or reordered (FLIP: transforms only). Works with
628
- * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.
629
- *
630
- * Attributes: `duration` (ms, 420), `easing`, `disabled`.
631
- * Method: `flip(mutate)` for explicit changes (also measures resizes).
632
- * Reduced motion: no animation.
633
- */
634
- interface UsaFlipListElement extends UsaElement {
635
- flip(mutate: () => void | Promise<void>): Promise<void>;
636
- }
637
-
638
625
  /**
639
626
  * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard
640
627
  * steps, app pages) and animates between them. Children are views; name
@@ -654,15 +641,15 @@ interface UsaViewSwitchElement extends UsaElement {
654
641
 
655
642
  /**
656
643
  * use-scroll-animate/components/transitions — view & layout transitions.
657
- * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`
658
- * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.
644
+ * `<usa-dialog>`, `<usa-accordion>`, `<usa-view-switch>`
645
+ * and the `viewTransition()` and `flip()` helpers (4.0: `<usa-flip-list>` → `<usa-auto-animate>`,
646
+ * `connectedAnimation()` → `sharedTransition()`, both in `components/layout`).
659
647
  */
660
648
 
661
649
  declare global {
662
650
  interface HTMLElementTagNameMap {
663
651
  'usa-dialog': UsaDialogElement;
664
652
  'usa-accordion': UsaAccordionElement;
665
- 'usa-flip-list': UsaFlipListElement;
666
653
  'usa-view-switch': UsaViewSwitchElement;
667
654
  }
668
655
  }
@@ -1621,7 +1608,7 @@ declare const COMPONENT_CATEGORIES: {
1621
1608
  readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press", "usa-toggle"];
1622
1609
  readonly feedback: readonly ["usa-spinner", "usa-skeleton", "usa-progress", "usa-toaster", "usa-check"];
1623
1610
  readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic", "usa-grid-glow", "usa-blobs", "usa-water-ripple", "usa-dot-network"];
1624
- readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-flip-list", "usa-view-switch"];
1611
+ readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-view-switch"];
1625
1612
  readonly physics: readonly ["usa-spring", "usa-draggable", "usa-overscroll"];
1626
1613
  readonly cards: readonly ["usa-card", "usa-card-stack", "usa-sticky-stack", "usa-carousel-3d"];
1627
1614
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
@@ -622,19 +622,6 @@ interface UsaAccordionElement extends UsaElement {
622
622
  toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;
623
623
  }
624
624
 
625
- /**
626
- * `<usa-flip-list>` — animates its children to their new places whenever
627
- * they are added, removed or reordered (FLIP: transforms only). Works with
628
- * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.
629
- *
630
- * Attributes: `duration` (ms, 420), `easing`, `disabled`.
631
- * Method: `flip(mutate)` for explicit changes (also measures resizes).
632
- * Reduced motion: no animation.
633
- */
634
- interface UsaFlipListElement extends UsaElement {
635
- flip(mutate: () => void | Promise<void>): Promise<void>;
636
- }
637
-
638
625
  /**
639
626
  * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard
640
627
  * steps, app pages) and animates between them. Children are views; name
@@ -654,15 +641,15 @@ interface UsaViewSwitchElement extends UsaElement {
654
641
 
655
642
  /**
656
643
  * use-scroll-animate/components/transitions — view & layout transitions.
657
- * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`
658
- * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.
644
+ * `<usa-dialog>`, `<usa-accordion>`, `<usa-view-switch>`
645
+ * and the `viewTransition()` and `flip()` helpers (4.0: `<usa-flip-list>` → `<usa-auto-animate>`,
646
+ * `connectedAnimation()` → `sharedTransition()`, both in `components/layout`).
659
647
  */
660
648
 
661
649
  declare global {
662
650
  interface HTMLElementTagNameMap {
663
651
  'usa-dialog': UsaDialogElement;
664
652
  'usa-accordion': UsaAccordionElement;
665
- 'usa-flip-list': UsaFlipListElement;
666
653
  'usa-view-switch': UsaViewSwitchElement;
667
654
  }
668
655
  }
@@ -1621,7 +1608,7 @@ declare const COMPONENT_CATEGORIES: {
1621
1608
  readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press", "usa-toggle"];
1622
1609
  readonly feedback: readonly ["usa-spinner", "usa-skeleton", "usa-progress", "usa-toaster", "usa-check"];
1623
1610
  readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic", "usa-grid-glow", "usa-blobs", "usa-water-ripple", "usa-dot-network"];
1624
- readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-flip-list", "usa-view-switch"];
1611
+ readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-view-switch"];
1625
1612
  readonly physics: readonly ["usa-spring", "usa-draggable", "usa-overscroll"];
1626
1613
  readonly cards: readonly ["usa-card", "usa-card-stack", "usa-sticky-stack", "usa-carousel-3d"];
1627
1614
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
@@ -2,28 +2,29 @@ import { defineComponents } from '../components.js';
2
2
  import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
3
3
  export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
4
4
  import './reveal.js';
5
- import '../chunks/base-BRIPyPtX.js';
5
+ import '../chunks/base-ZARFccur.js';
6
6
  import './text.js';
7
7
  import './interaction.js';
8
8
  import './feedback.js';
9
9
  import './background.js';
10
- import '../chunks/variants-DTypaOH3.js';
10
+ import '../chunks/variants-DvnxvRCM.js';
11
11
  import './transitions.js';
12
12
  import './physics.js';
13
- import '../chunks/spring-UBPhrh1X.js';
13
+ import '../chunks/spring-E2ickYNI.js';
14
14
  import './cards.js';
15
15
  import './click.js';
16
16
  import './ui.js';
17
17
  import './page.js';
18
18
  import './timeline.js';
19
+ import '../chunks/core-Co-6AL0h.js';
19
20
  import './gesture.js';
20
- import '../chunks/core-CYozf_E-.js';
21
+ import '../chunks/core-DKY-fVzR.js';
21
22
  import './svg.js';
22
23
  import './webgl.js';
23
24
  import './depth.js';
24
25
  import './layout.js';
25
26
  import './packs.js';
26
- import '../chunks/index-tags-BmQR17Sb.js';
27
+ import '../chunks/index-tags-43Xtd01A.js';
27
28
 
28
29
  /**
29
30
  * use-scroll-animate/components/svelte — Svelte integration (v3.8).
@@ -1 +1 @@
1
- {"version":3,"file":"svelte.js","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAOH;SACgB,GAAG,CAAC,IAAiB,EAAE,UAAsB,EAAE,EAAA;AAC7D,IAAA,OAAO,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/B;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,gBAAgB,CAAC,UAAU,CAAC;AACjE;;;;"}
1
+ {"version":3,"file":"svelte.js","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAOH;SACgB,GAAG,CAAC,IAAiB,EAAE,UAAsB,EAAE,EAAA;AAC7D,IAAA,OAAO,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/B;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,gBAAgB,CAAC,UAAU,CAAC;AACjE;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-Dm6ee5ug.cjs');
3
+ var base = require('../chunks/base-CXx7jZ-o.cjs');
4
4
 
5
5
  const NUM = /-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi;
6
6
  /** `true` when two path strings share the same commands (so their numbers can be interpolated). */
@@ -76,7 +76,7 @@ function drawLines(root, o = {}) {
76
76
  };
77
77
  }
78
78
 
79
- var css = "usa-draw{display:inline-block}usa-draw svg :is(path,line,polyline,polygon,circle,ellipse,rect){transition:fill-opacity 0.6s ease}usa-draw[fill]:not([data-drawn]) svg :is(path,polygon,circle,ellipse,rect){fill-opacity:0}usa-morph{display:inline-block;line-height:0}usa-morph svg{width:100%;height:100%;fill:currentColor}usa-morph[role=\"button\"]{cursor:pointer}usa-mask-reveal{display:block}usa-mask-reveal[data-state=\"visible\"]{clip-path:none !important}usa-anim-icon{display:inline-flex;line-height:0;vertical-align:middle}usa-anim-icon svg{overflow:visible}@media (prefers-reduced-motion:reduce){usa-mask-reveal{clip-path:none !important}usa-draw svg *{stroke-dashoffset:0 !important}}";
79
+ var css = "usa-draw{display:inline-block}usa-draw svg :is(path,line,polyline,polygon,circle,ellipse,rect){transition:fill-opacity 0.6s ease}usa-draw[fill]:not([data-drawn]) svg :is(path,polygon,circle,ellipse,rect){fill-opacity:0}usa-morph{display:inline-block;line-height:0}usa-morph svg{width:100%;height:100%;fill:currentColor}usa-morph[role=\"button\"]{cursor:pointer}usa-mask-reveal{display:block}usa-mask-reveal[data-state=\"visible\"]{clip-path:none !important}usa-mask-reveal[data-state=\"hidden\"]{opacity:0}usa-anim-icon{display:inline-flex;line-height:0;vertical-align:middle}usa-anim-icon svg{overflow:visible}@media (prefers-reduced-motion:reduce){usa-mask-reveal{clip-path:none !important;opacity:1 !important}usa-draw svg *{stroke-dashoffset:0 !important}}";
80
80
 
81
81
  function defineDraw(tag = 'usa-draw') {
82
82
  return base.defineElement(tag, (Base) => class UsaDraw extends Base {
@@ -239,7 +239,9 @@ function defineMaskReveal(tag = 'usa-mask-reveal') {
239
239
  reveal() {
240
240
  const [a, b] = this.frames();
241
241
  this.setAttribute('data-state', 'revealing');
242
- const anim = this.motion(this, [{ clipPath: a }, { clipPath: b }], { duration: this.num('duration', 900), delay: this.num('delay', 0), easing: base.EASE_OUT, fill: 'forwards' });
242
+ // fill 'both' keeps the closed mask applied during `delay`
243
+ const anim = this.motion(this, [{ clipPath: a }, { clipPath: b }], { duration: this.num('duration', 900), delay: this.num('delay', 0), easing: base.EASE_OUT, fill: 'both' });
244
+ this.style.opacity = '';
243
245
  const done = () => {
244
246
  this.setAttribute('data-state', 'visible');
245
247
  this.emit('complete');
@@ -253,9 +255,16 @@ function defineMaskReveal(tag = 'usa-mask-reveal') {
253
255
  this.setAttribute('data-state', 'visible');
254
256
  return;
255
257
  }
256
- this.setAttribute('data-state', 'hidden');
257
- this.style.clipPath = this.frames()[0];
258
- this.onCleanup(() => (this.style.clipPath = ''));
258
+ // 4.0.1: hide with opacity, not the closed clip-path — Chromium's
259
+ // IntersectionObserver honours the target's own clip-path, so a fully
260
+ // clipped element never reports as intersecting and never revealed.
261
+ const hide = () => {
262
+ this.getAnimations?.().forEach((x) => x.cancel());
263
+ this.style.opacity = '0';
264
+ this.setAttribute('data-state', 'hidden');
265
+ };
266
+ hide();
267
+ this.onCleanup(() => ((this.style.opacity = ''), (this.style.clipPath = '')));
259
268
  const t = this.str('trigger', 'view');
260
269
  if (t === 'hover')
261
270
  this.listen(this, 'pointerenter', () => void this.reveal());
@@ -268,11 +277,8 @@ function defineMaskReveal(tag = 'usa-mask-reveal') {
268
277
  done = true;
269
278
  void this.reveal();
270
279
  }
271
- else if (!v && this.flag('repeat')) {
272
- this.getAnimations?.().forEach((x) => x.cancel());
273
- this.style.clipPath = this.frames()[0];
274
- this.setAttribute('data-state', 'hidden');
275
- }
280
+ else if (!v && this.flag('repeat'))
281
+ hide();
276
282
  }, { threshold: 0.25 });
277
283
  }
278
284
  }