use-scroll-animate 4.4.0 → 4.6.0

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 (104) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/chunks/{base-BtJDNCB6.js → base-CZiIAMBc.js} +97 -10
  3. package/dist/chunks/base-CZiIAMBc.js.map +1 -0
  4. package/dist/chunks/{base-DE2yzxE7.cjs → base-CxYU2NK_.cjs} +102 -9
  5. package/dist/chunks/base-CxYU2NK_.cjs.map +1 -0
  6. package/dist/chunks/{core-DS1nrx5L.js → core-CJHJeMI_.js} +2 -2
  7. package/dist/chunks/{core-DS1nrx5L.js.map → core-CJHJeMI_.js.map} +1 -1
  8. package/dist/chunks/{core-DX6pdOoY.js → core-COi3DrLx.js} +2 -2
  9. package/dist/chunks/{core-DX6pdOoY.js.map → core-COi3DrLx.js.map} +1 -1
  10. package/dist/chunks/{core-DPYjLqA0.cjs → core-CctNfzuP.cjs} +2 -2
  11. package/dist/chunks/{core-DPYjLqA0.cjs.map → core-CctNfzuP.cjs.map} +1 -1
  12. package/dist/chunks/{core-BC9S2osy.cjs → core-HLqH3qkA.cjs} +2 -2
  13. package/dist/chunks/{core-BC9S2osy.cjs.map → core-HLqH3qkA.cjs.map} +1 -1
  14. package/dist/chunks/{spring-CxRz49Wk.js → spring-BS5tg6aK.js} +2 -2
  15. package/dist/chunks/{spring-CxRz49Wk.js.map → spring-BS5tg6aK.js.map} +1 -1
  16. package/dist/chunks/{spring-hsmgd7ml.cjs → spring-Dkpygsuj.cjs} +2 -2
  17. package/dist/chunks/{spring-hsmgd7ml.cjs.map → spring-Dkpygsuj.cjs.map} +1 -1
  18. package/dist/chunks/{variants-CM2zaG8v.cjs → variants-CfJzrzMh.cjs} +2 -2
  19. package/dist/chunks/{variants-CM2zaG8v.cjs.map → variants-CfJzrzMh.cjs.map} +1 -1
  20. package/dist/chunks/{variants-dD6SbUMR.js → variants-D9n-3x27.js} +2 -2
  21. package/dist/chunks/{variants-dD6SbUMR.js.map → variants-D9n-3x27.js.map} +1 -1
  22. package/dist/components/a11y.cjs +1 -1
  23. package/dist/components/a11y.js +2 -2
  24. package/dist/components/angular.cjs +6 -5
  25. package/dist/components/angular.cjs.map +1 -1
  26. package/dist/components/angular.js +6 -5
  27. package/dist/components/angular.js.map +1 -1
  28. package/dist/components/background.cjs +2 -2
  29. package/dist/components/background.js +3 -3
  30. package/dist/components/cards.cjs +2 -2
  31. package/dist/components/cards.js +3 -3
  32. package/dist/components/click.cjs +2 -2
  33. package/dist/components/click.js +3 -3
  34. package/dist/components/depth.cjs +3 -3
  35. package/dist/components/depth.js +4 -4
  36. package/dist/components/feedback.cjs +1 -1
  37. package/dist/components/feedback.js +2 -2
  38. package/dist/components/gesture.cjs +3 -3
  39. package/dist/components/gesture.js +5 -5
  40. package/dist/components/interaction.cjs +1 -1
  41. package/dist/components/interaction.js +2 -2
  42. package/dist/components/layout.cjs +1 -1
  43. package/dist/components/layout.js +2 -2
  44. package/dist/components/lite.cjs +10398 -0
  45. package/dist/components/lite.cjs.map +1 -0
  46. package/dist/components/lite.d.cts +4 -0
  47. package/dist/components/lite.d.ts +4 -0
  48. package/dist/components/lite.js +10161 -0
  49. package/dist/components/lite.js.map +1 -0
  50. package/dist/components/packs.cjs +1 -1
  51. package/dist/components/packs.js +2 -2
  52. package/dist/components/page.cjs +2 -2
  53. package/dist/components/page.js +3 -3
  54. package/dist/components/perf.cjs +121 -0
  55. package/dist/components/perf.cjs.map +1 -0
  56. package/dist/components/perf.d.cts +97 -0
  57. package/dist/components/perf.d.ts +97 -0
  58. package/dist/components/perf.js +111 -0
  59. package/dist/components/perf.js.map +1 -0
  60. package/dist/components/physics.cjs +2 -2
  61. package/dist/components/physics.js +4 -4
  62. package/dist/components/reveal.cjs +1 -1
  63. package/dist/components/reveal.js +2 -2
  64. package/dist/components/solid.cjs +6 -5
  65. package/dist/components/solid.cjs.map +1 -1
  66. package/dist/components/solid.js +6 -5
  67. package/dist/components/solid.js.map +1 -1
  68. package/dist/components/svelte.cjs +6 -5
  69. package/dist/components/svelte.cjs.map +1 -1
  70. package/dist/components/svelte.js +6 -5
  71. package/dist/components/svelte.js.map +1 -1
  72. package/dist/components/svg.cjs +1 -1
  73. package/dist/components/svg.js +2 -2
  74. package/dist/components/text.cjs +2 -2
  75. package/dist/components/text.js +3 -3
  76. package/dist/components/timeline.cjs +2 -2
  77. package/dist/components/timeline.js +4 -4
  78. package/dist/components/transitions.cjs +1 -1
  79. package/dist/components/transitions.js +2 -2
  80. package/dist/components/ui.cjs +3 -3
  81. package/dist/components/ui.js +5 -5
  82. package/dist/components/vue.cjs +6 -5
  83. package/dist/components/vue.cjs.map +1 -1
  84. package/dist/components/vue.js +6 -5
  85. package/dist/components/vue.js.map +1 -1
  86. package/dist/components/webgl.cjs +1 -1
  87. package/dist/components/webgl.js +2 -2
  88. package/dist/components.cjs +16 -5
  89. package/dist/components.cjs.map +1 -1
  90. package/dist/components.d.cts +73 -2
  91. package/dist/components.d.ts +73 -2
  92. package/dist/components.js +8 -7
  93. package/dist/components.js.map +1 -1
  94. package/dist/components.umd.js +2 -2
  95. package/dist/components.umd.js.map +1 -1
  96. package/dist/index.cjs +2 -2
  97. package/dist/index.js +2 -2
  98. package/dist/index.umd.js +2 -2
  99. package/dist/index.umd.js.map +1 -1
  100. package/docs/ROADMAP.md +2 -2
  101. package/docs/performance.md +24 -0
  102. package/package.json +21 -1
  103. package/dist/chunks/base-BtJDNCB6.js.map +0 -1
  104. package/dist/chunks/base-DE2yzxE7.cjs.map +0 -1
@@ -3,24 +3,24 @@ import { defineComponents } from '../components.js';
3
3
  import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
4
4
  export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
5
5
  import './reveal.js';
6
- import '../chunks/base-BtJDNCB6.js';
6
+ import '../chunks/base-CZiIAMBc.js';
7
7
  import './text.js';
8
- import '../chunks/core-DS1nrx5L.js';
8
+ import '../chunks/core-CJHJeMI_.js';
9
9
  import './tokens.js';
10
10
  import './interaction.js';
11
11
  import './feedback.js';
12
12
  import './background.js';
13
- import '../chunks/variants-dD6SbUMR.js';
13
+ import '../chunks/variants-D9n-3x27.js';
14
14
  import './transitions.js';
15
15
  import './physics.js';
16
- import '../chunks/spring-CxRz49Wk.js';
16
+ import '../chunks/spring-BS5tg6aK.js';
17
17
  import './cards.js';
18
18
  import './click.js';
19
19
  import './ui.js';
20
20
  import './page.js';
21
21
  import './timeline.js';
22
22
  import './gesture.js';
23
- import '../chunks/core-DX6pdOoY.js';
23
+ import '../chunks/core-COi3DrLx.js';
24
24
  import './svg.js';
25
25
  import './webgl.js';
26
26
  import './depth.js';
@@ -28,6 +28,7 @@ import './layout.js';
28
28
  import './packs.js';
29
29
  import './a11y.js';
30
30
  import '../chunks/index-tags-43Xtd01A.js';
31
+ import './perf.js';
31
32
 
32
33
  /**
33
34
  * use-scroll-animate/components/solid — Solid integration (v3.8).
@@ -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 { 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;;;;"}
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,24 +3,24 @@
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-DE2yzxE7.cjs');
6
+ require('../chunks/base-CxYU2NK_.cjs');
7
7
  require('./text.cjs');
8
- require('../chunks/core-BC9S2osy.cjs');
8
+ require('../chunks/core-HLqH3qkA.cjs');
9
9
  require('./tokens.cjs');
10
10
  require('./interaction.cjs');
11
11
  require('./feedback.cjs');
12
12
  require('./background.cjs');
13
- require('../chunks/variants-CM2zaG8v.cjs');
13
+ require('../chunks/variants-CfJzrzMh.cjs');
14
14
  require('./transitions.cjs');
15
15
  require('./physics.cjs');
16
- require('../chunks/spring-hsmgd7ml.cjs');
16
+ require('../chunks/spring-Dkpygsuj.cjs');
17
17
  require('./cards.cjs');
18
18
  require('./click.cjs');
19
19
  require('./ui.cjs');
20
20
  require('./page.cjs');
21
21
  require('./timeline.cjs');
22
22
  require('./gesture.cjs');
23
- require('../chunks/core-DPYjLqA0.cjs');
23
+ require('../chunks/core-CctNfzuP.cjs');
24
24
  require('./svg.cjs');
25
25
  require('./webgl.cjs');
26
26
  require('./depth.cjs');
@@ -28,6 +28,7 @@ require('./layout.cjs');
28
28
  require('./packs.cjs');
29
29
  require('./a11y.cjs');
30
30
  require('../chunks/index-tags-BQh_uGqH.cjs');
31
+ require('./perf.cjs');
31
32
 
32
33
  /**
33
34
  * 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;;;;;;;"}
@@ -2,24 +2,24 @@ 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-BtJDNCB6.js';
5
+ import '../chunks/base-CZiIAMBc.js';
6
6
  import './text.js';
7
- import '../chunks/core-DS1nrx5L.js';
7
+ import '../chunks/core-CJHJeMI_.js';
8
8
  import './tokens.js';
9
9
  import './interaction.js';
10
10
  import './feedback.js';
11
11
  import './background.js';
12
- import '../chunks/variants-dD6SbUMR.js';
12
+ import '../chunks/variants-D9n-3x27.js';
13
13
  import './transitions.js';
14
14
  import './physics.js';
15
- import '../chunks/spring-CxRz49Wk.js';
15
+ import '../chunks/spring-BS5tg6aK.js';
16
16
  import './cards.js';
17
17
  import './click.js';
18
18
  import './ui.js';
19
19
  import './page.js';
20
20
  import './timeline.js';
21
21
  import './gesture.js';
22
- import '../chunks/core-DX6pdOoY.js';
22
+ import '../chunks/core-COi3DrLx.js';
23
23
  import './svg.js';
24
24
  import './webgl.js';
25
25
  import './depth.js';
@@ -27,6 +27,7 @@ import './layout.js';
27
27
  import './packs.js';
28
28
  import './a11y.js';
29
29
  import '../chunks/index-tags-43Xtd01A.js';
30
+ import './perf.js';
30
31
 
31
32
  /**
32
33
  * 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-DE2yzxE7.cjs');
3
+ var base = require('../chunks/base-CxYU2NK_.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). */
@@ -1,5 +1,5 @@
1
- import { f as clamp, m as motionScale, h as caf, p as prefersReducedMotion, n as now, r as raf, k as defineElement, l as EASE_OUT } from '../chunks/base-BtJDNCB6.js';
2
- export { d as configureComponents } from '../chunks/base-BtJDNCB6.js';
1
+ import { j as clamp, m as motionScale, k as caf, p as prefersReducedMotion, n as now, r as raf, u as defineElement, v as EASE_OUT } from '../chunks/base-CZiIAMBc.js';
2
+ export { f as configureComponents } from '../chunks/base-CZiIAMBc.js';
3
3
 
4
4
  const NUM = /-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi;
5
5
  /** `true` when two path strings share the same commands (so their numbers can be interpolated). */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-DE2yzxE7.cjs');
4
- var core = require('../chunks/core-BC9S2osy.cjs');
3
+ var base = require('../chunks/base-CxYU2NK_.cjs');
4
+ var core = require('../chunks/core-HLqH3qkA.cjs');
5
5
  require('./tokens.cjs');
6
6
 
7
7
  var css$5 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
@@ -1,6 +1,6 @@
1
- import { k as defineElement, q as srText, h as caf, n as now, r as raf, l as EASE_OUT, E as EASE_SPRING, f as clamp } from '../chunks/base-BtJDNCB6.js';
2
- export { d as configureComponents, p as prefersReducedMotion } from '../chunks/base-BtJDNCB6.js';
3
- import { t as timeline } from '../chunks/core-DS1nrx5L.js';
1
+ import { u as defineElement, y as srText, k as caf, n as now, r as raf, v as EASE_OUT, E as EASE_SPRING, j as clamp } from '../chunks/base-CZiIAMBc.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
3
+ import { t as timeline } from '../chunks/core-CJHJeMI_.js';
4
4
  import './tokens.js';
5
5
 
6
6
  var css$5 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-DE2yzxE7.cjs');
4
- var core = require('../chunks/core-BC9S2osy.cjs');
3
+ var base = require('../chunks/base-CxYU2NK_.cjs');
4
+ var core = require('../chunks/core-HLqH3qkA.cjs');
5
5
  require('./tokens.cjs');
6
6
 
7
7
  var css = "usa-timeline{display:block}usa-timeline[scrub]{position:relative}@media (prefers-reduced-motion:reduce){usa-timeline [data-tl]{opacity:1 !important;transform:none !important;filter:none !important;clip-path:none !important}}";
@@ -1,7 +1,7 @@
1
- import { k as defineElement } from '../chunks/base-BtJDNCB6.js';
2
- export { d as configureComponents, p as prefersReducedMotion } from '../chunks/base-BtJDNCB6.js';
3
- import { t as timeline, T as TIMELINE_PRESETS } from '../chunks/core-DS1nrx5L.js';
4
- export { r as resolvePosition, s as supportsNativeScrub } from '../chunks/core-DS1nrx5L.js';
1
+ import { u as defineElement } from '../chunks/base-CZiIAMBc.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
3
+ import { t as timeline, T as TIMELINE_PRESETS } from '../chunks/core-CJHJeMI_.js';
4
+ export { r as resolvePosition, s as supportsNativeScrub } from '../chunks/core-CJHJeMI_.js';
5
5
  import './tokens.js';
6
6
 
7
7
  var css = "usa-timeline{display:block}usa-timeline[scrub]{position:relative}@media (prefers-reduced-motion:reduce){usa-timeline [data-tl]{opacity:1 !important;transform:none !important;filter:none !important;clip-path:none !important}}";
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-DE2yzxE7.cjs');
3
+ var base = require('../chunks/base-CxYU2NK_.cjs');
4
4
 
5
5
  var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-kind^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-kind=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-kind=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-kind=\"drawer-bottom\"] [part=\"panel\"],dialog[data-kind=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-kind=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
6
6
 
@@ -1,5 +1,5 @@
1
- import { k as defineElement, o as kindOf, s as shadowStyles, l as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-BtJDNCB6.js';
2
- export { d as configureComponents } from '../chunks/base-BtJDNCB6.js';
1
+ import { u as defineElement, w as kindOf, x as shadowStyles, v as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
2
+ export { f as configureComponents } from '../chunks/base-CZiIAMBc.js';
3
3
 
4
4
  var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-kind^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-kind=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-kind=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-kind=\"drawer-bottom\"] [part=\"panel\"],dialog[data-kind=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-kind=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
5
5
 
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-DE2yzxE7.cjs');
4
- var spring = require('../chunks/spring-hsmgd7ml.cjs');
5
- var variants = require('../chunks/variants-CM2zaG8v.cjs');
3
+ var base = require('../chunks/base-CxYU2NK_.cjs');
4
+ var spring = require('../chunks/spring-Dkpygsuj.cjs');
5
+ var variants = require('../chunks/variants-CfJzrzMh.cjs');
6
6
 
7
7
  /** Position a fixed `floating` element next to `anchor`, flipping when it would leave the viewport. */
8
8
  function place(floating, anchor, placement = 'top', gap = 8) {
@@ -1,8 +1,8 @@
1
- import { k as defineElement, f as clamp, h as caf, r as raf } from '../chunks/base-BtJDNCB6.js';
2
- export { d as configureComponents, p as prefersReducedMotion } from '../chunks/base-BtJDNCB6.js';
3
- import { d as springEasing, c as createSpring, p as projectInertia, s as snapTo, a as rubberBand } from '../chunks/spring-CxRz49Wk.js';
4
- import { a as adoptVariants } from '../chunks/variants-dD6SbUMR.js';
5
- export { V as VARIANTS, s as setVariant } from '../chunks/variants-dD6SbUMR.js';
1
+ import { u as defineElement, j as clamp, k as caf, r as raf } from '../chunks/base-CZiIAMBc.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
3
+ import { d as springEasing, c as createSpring, p as projectInertia, s as snapTo, a as rubberBand } from '../chunks/spring-BS5tg6aK.js';
4
+ import { a as adoptVariants } from '../chunks/variants-D9n-3x27.js';
5
+ export { V as VARIANTS, s as setVariant } from '../chunks/variants-D9n-3x27.js';
6
6
 
7
7
  /** Position a fixed `floating` element next to `anchor`, flipping when it would leave the viewport. */
8
8
  function place(floating, anchor, placement = 'top', gap = 8) {
@@ -2,24 +2,24 @@
2
2
 
3
3
  var components = require('../components.cjs');
4
4
  require('./reveal.cjs');
5
- require('../chunks/base-DE2yzxE7.cjs');
5
+ require('../chunks/base-CxYU2NK_.cjs');
6
6
  require('./text.cjs');
7
- require('../chunks/core-BC9S2osy.cjs');
7
+ require('../chunks/core-HLqH3qkA.cjs');
8
8
  require('./tokens.cjs');
9
9
  require('./interaction.cjs');
10
10
  require('./feedback.cjs');
11
11
  require('./background.cjs');
12
- require('../chunks/variants-CM2zaG8v.cjs');
12
+ require('../chunks/variants-CfJzrzMh.cjs');
13
13
  require('./transitions.cjs');
14
14
  require('./physics.cjs');
15
- require('../chunks/spring-hsmgd7ml.cjs');
15
+ require('../chunks/spring-Dkpygsuj.cjs');
16
16
  require('./cards.cjs');
17
17
  require('./click.cjs');
18
18
  require('./ui.cjs');
19
19
  require('./page.cjs');
20
20
  require('./timeline.cjs');
21
21
  require('./gesture.cjs');
22
- require('../chunks/core-DPYjLqA0.cjs');
22
+ require('../chunks/core-CctNfzuP.cjs');
23
23
  require('./svg.cjs');
24
24
  require('./webgl.cjs');
25
25
  require('./depth.cjs');
@@ -27,6 +27,7 @@ require('./layout.cjs');
27
27
  require('./packs.cjs');
28
28
  require('./a11y.cjs');
29
29
  require('../chunks/index-tags-BQh_uGqH.cjs');
30
+ require('./perf.cjs');
30
31
 
31
32
  /**
32
33
  * use-scroll-animate/components/vue — Vue integration (v2.9).
@@ -1 +1 @@
1
- {"version":3,"file":"vue.cjs","sources":["../../src/components/frameworks/vue.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/vue — Vue integration (v2.9).\n *\n * ```js\n * // vite.config.js\n * import vue from '@vitejs/plugin-vue';\n * import { isUsaElement } from 'use-scroll-animate/components/vue';\n * export default { plugins: [vue({ template: { compilerOptions: { isCustomElement: isUsaElement } } })] };\n *\n * // main.js\n * import { UsaPlugin } from 'use-scroll-animate/components/vue';\n * app.use(UsaPlugin, { categories: ['click', 'cards'] });\n * ```\n * In templates, listen with `@usa:change=\"…\"` and bind properties with\n * `.prop`: `<usa-toggle :checked.prop=\"on\" @usa:change=\"on = $event.detail.checked\">`.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\n\n/** `compilerOptions.isCustomElement` predicate for every `<usa-*>` tag. */\nexport const isUsaElement = (tag: string): boolean => tag.startsWith('usa-');\n\nexport interface UsaPluginOptions {\n /** Only register these categories (default: all). */\n categories?: ComponentCategory[];\n}\n\n/** Vue plugin: registers the `<usa-*>` elements (client only) and sets `isCustomElement` at runtime. */\nexport const UsaPlugin = {\n install(app: { config: { compilerOptions?: { isCustomElement?: (t: string) => boolean } } }, options: UsaPluginOptions = {}): void {\n const co = (app.config.compilerOptions ||= {});\n const prev = co.isCustomElement;\n co.isCustomElement = (t: string) => isUsaElement(t) || !!prev?.(t);\n defineComponents(options.categories);\n },\n};\n"],"names":["defineComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAGH;AACO,MAAM,YAAY,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,MAAM;AAO3E;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,OAAO,CAAC,GAAmF,EAAE,OAAA,GAA4B,EAAE,EAAA;;AACzH,QAAA,MAAM,EAAE,IAAG,CAAA,EAAA,GAAC,GAAG,CAAC,MAAM,EAAC,eAAe,KAAA,EAAA,CAAf,eAAe,GAAK,EAAE,EAAC;AAC9C,QAAA,MAAM,IAAI,GAAG,EAAE,CAAC,eAAe;QAC/B,EAAE,CAAC,eAAe,GAAG,CAAC,CAAS,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAClE,QAAAA,2BAAgB,CAAC,OAAO,CAAC,UAAU,CAAC;IACtC,CAAC;;;;;;"}
1
+ {"version":3,"file":"vue.cjs","sources":["../../src/components/frameworks/vue.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/vue — Vue integration (v2.9).\n *\n * ```js\n * // vite.config.js\n * import vue from '@vitejs/plugin-vue';\n * import { isUsaElement } from 'use-scroll-animate/components/vue';\n * export default { plugins: [vue({ template: { compilerOptions: { isCustomElement: isUsaElement } } })] };\n *\n * // main.js\n * import { UsaPlugin } from 'use-scroll-animate/components/vue';\n * app.use(UsaPlugin, { categories: ['click', 'cards'] });\n * ```\n * In templates, listen with `@usa:change=\"…\"` and bind properties with\n * `.prop`: `<usa-toggle :checked.prop=\"on\" @usa:change=\"on = $event.detail.checked\">`.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\n\n/** `compilerOptions.isCustomElement` predicate for every `<usa-*>` tag. */\nexport const isUsaElement = (tag: string): boolean => tag.startsWith('usa-');\n\nexport interface UsaPluginOptions {\n /** Only register these categories (default: all). */\n categories?: ComponentCategory[];\n}\n\n/** Vue plugin: registers the `<usa-*>` elements (client only) and sets `isCustomElement` at runtime. */\nexport const UsaPlugin = {\n install(app: { config: { compilerOptions?: { isCustomElement?: (t: string) => boolean } } }, options: UsaPluginOptions = {}): void {\n const co = (app.config.compilerOptions ||= {});\n const prev = co.isCustomElement;\n co.isCustomElement = (t: string) => isUsaElement(t) || !!prev?.(t);\n defineComponents(options.categories);\n },\n};\n"],"names":["defineComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAGH;AACO,MAAM,YAAY,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,MAAM;AAO3E;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,OAAO,CAAC,GAAmF,EAAE,OAAA,GAA4B,EAAE,EAAA;;AACzH,QAAA,MAAM,EAAE,IAAG,CAAA,EAAA,GAAC,GAAG,CAAC,MAAM,EAAC,eAAe,KAAA,EAAA,CAAf,eAAe,GAAK,EAAE,EAAC;AAC9C,QAAA,MAAM,IAAI,GAAG,EAAE,CAAC,eAAe;QAC/B,EAAE,CAAC,eAAe,GAAG,CAAC,CAAS,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAClE,QAAAA,2BAAgB,CAAC,OAAO,CAAC,UAAU,CAAC;IACtC,CAAC;;;;;;"}
@@ -1,23 +1,23 @@
1
1
  import { defineComponents } from '../components.js';
2
2
  import './reveal.js';
3
- import '../chunks/base-BtJDNCB6.js';
3
+ import '../chunks/base-CZiIAMBc.js';
4
4
  import './text.js';
5
- import '../chunks/core-DS1nrx5L.js';
5
+ import '../chunks/core-CJHJeMI_.js';
6
6
  import './tokens.js';
7
7
  import './interaction.js';
8
8
  import './feedback.js';
9
9
  import './background.js';
10
- import '../chunks/variants-dD6SbUMR.js';
10
+ import '../chunks/variants-D9n-3x27.js';
11
11
  import './transitions.js';
12
12
  import './physics.js';
13
- import '../chunks/spring-CxRz49Wk.js';
13
+ import '../chunks/spring-BS5tg6aK.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
19
  import './gesture.js';
20
- import '../chunks/core-DX6pdOoY.js';
20
+ import '../chunks/core-COi3DrLx.js';
21
21
  import './svg.js';
22
22
  import './webgl.js';
23
23
  import './depth.js';
@@ -25,6 +25,7 @@ import './layout.js';
25
25
  import './packs.js';
26
26
  import './a11y.js';
27
27
  import '../chunks/index-tags-43Xtd01A.js';
28
+ import './perf.js';
28
29
 
29
30
  /**
30
31
  * use-scroll-animate/components/vue — Vue integration (v2.9).
@@ -1 +1 @@
1
- {"version":3,"file":"vue.js","sources":["../../src/components/frameworks/vue.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/vue — Vue integration (v2.9).\n *\n * ```js\n * // vite.config.js\n * import vue from '@vitejs/plugin-vue';\n * import { isUsaElement } from 'use-scroll-animate/components/vue';\n * export default { plugins: [vue({ template: { compilerOptions: { isCustomElement: isUsaElement } } })] };\n *\n * // main.js\n * import { UsaPlugin } from 'use-scroll-animate/components/vue';\n * app.use(UsaPlugin, { categories: ['click', 'cards'] });\n * ```\n * In templates, listen with `@usa:change=\"…\"` and bind properties with\n * `.prop`: `<usa-toggle :checked.prop=\"on\" @usa:change=\"on = $event.detail.checked\">`.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\n\n/** `compilerOptions.isCustomElement` predicate for every `<usa-*>` tag. */\nexport const isUsaElement = (tag: string): boolean => tag.startsWith('usa-');\n\nexport interface UsaPluginOptions {\n /** Only register these categories (default: all). */\n categories?: ComponentCategory[];\n}\n\n/** Vue plugin: registers the `<usa-*>` elements (client only) and sets `isCustomElement` at runtime. */\nexport const UsaPlugin = {\n install(app: { config: { compilerOptions?: { isCustomElement?: (t: string) => boolean } } }, options: UsaPluginOptions = {}): void {\n const co = (app.config.compilerOptions ||= {});\n const prev = co.isCustomElement;\n co.isCustomElement = (t: string) => isUsaElement(t) || !!prev?.(t);\n defineComponents(options.categories);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAGH;AACO,MAAM,YAAY,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,MAAM;AAO3E;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,OAAO,CAAC,GAAmF,EAAE,OAAA,GAA4B,EAAE,EAAA;;AACzH,QAAA,MAAM,EAAE,IAAG,CAAA,EAAA,GAAC,GAAG,CAAC,MAAM,EAAC,eAAe,KAAA,EAAA,CAAf,eAAe,GAAK,EAAE,EAAC;AAC9C,QAAA,MAAM,IAAI,GAAG,EAAE,CAAC,eAAe;QAC/B,EAAE,CAAC,eAAe,GAAG,CAAC,CAAS,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAClE,QAAA,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC;IACtC,CAAC;;;;;"}
1
+ {"version":3,"file":"vue.js","sources":["../../src/components/frameworks/vue.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/vue — Vue integration (v2.9).\n *\n * ```js\n * // vite.config.js\n * import vue from '@vitejs/plugin-vue';\n * import { isUsaElement } from 'use-scroll-animate/components/vue';\n * export default { plugins: [vue({ template: { compilerOptions: { isCustomElement: isUsaElement } } })] };\n *\n * // main.js\n * import { UsaPlugin } from 'use-scroll-animate/components/vue';\n * app.use(UsaPlugin, { categories: ['click', 'cards'] });\n * ```\n * In templates, listen with `@usa:change=\"…\"` and bind properties with\n * `.prop`: `<usa-toggle :checked.prop=\"on\" @usa:change=\"on = $event.detail.checked\">`.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\n\n/** `compilerOptions.isCustomElement` predicate for every `<usa-*>` tag. */\nexport const isUsaElement = (tag: string): boolean => tag.startsWith('usa-');\n\nexport interface UsaPluginOptions {\n /** Only register these categories (default: all). */\n categories?: ComponentCategory[];\n}\n\n/** Vue plugin: registers the `<usa-*>` elements (client only) and sets `isCustomElement` at runtime. */\nexport const UsaPlugin = {\n install(app: { config: { compilerOptions?: { isCustomElement?: (t: string) => boolean } } }, options: UsaPluginOptions = {}): void {\n const co = (app.config.compilerOptions ||= {});\n const prev = co.isCustomElement;\n co.isCustomElement = (t: string) => isUsaElement(t) || !!prev?.(t);\n defineComponents(options.categories);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAGH;AACO,MAAM,YAAY,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,MAAM;AAO3E;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,OAAO,CAAC,GAAmF,EAAE,OAAA,GAA4B,EAAE,EAAA;;AACzH,QAAA,MAAM,EAAE,IAAG,CAAA,EAAA,GAAC,GAAG,CAAC,MAAM,EAAC,eAAe,KAAA,EAAA,CAAf,eAAe,GAAK,EAAE,EAAC;AAC9C,QAAA,MAAM,IAAI,GAAG,EAAE,CAAC,eAAe;QAC/B,EAAE,CAAC,eAAe,GAAG,CAAC,CAAS,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAClE,QAAA,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC;IACtC,CAAC;;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-DE2yzxE7.cjs');
3
+ var base = require('../chunks/base-CxYU2NK_.cjs');
4
4
 
5
5
  /** Minimal WebGL runner: one full-canvas quad, one fragment shader, optional image texture. */
6
6
  const VERTEX = 'attribute vec2 p;varying vec2 v_uv;void main(){v_uv=p*.5+.5;gl_Position=vec4(p,0.,1.);}';
@@ -1,5 +1,5 @@
1
- import { k as defineElement, n as now, h as caf, f as clamp, r as raf } from '../chunks/base-BtJDNCB6.js';
2
- export { d as configureComponents, p as prefersReducedMotion } from '../chunks/base-BtJDNCB6.js';
1
+ import { u as defineElement, n as now, k as caf, j as clamp, r as raf } from '../chunks/base-CZiIAMBc.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
3
3
 
4
4
  /** Minimal WebGL runner: one full-canvas quad, one fragment shader, optional image texture. */
5
5
  const VERTEX = 'attribute vec2 p;varying vec2 v_uv;void main(){v_uv=p*.5+.5;gl_Position=vec4(p,0.,1.);}';
@@ -18,14 +18,15 @@ var components_webgl = require('./components/webgl.cjs');
18
18
  var components_depth = require('./components/depth.cjs');
19
19
  var components_layout = require('./components/layout.cjs');
20
20
  var components_packs = require('./components/packs.cjs');
21
- var variants = require('./chunks/variants-CM2zaG8v.cjs');
22
- var base = require('./chunks/base-DE2yzxE7.cjs');
21
+ var variants = require('./chunks/variants-CfJzrzMh.cjs');
22
+ var base = require('./chunks/base-CxYU2NK_.cjs');
23
23
  var components_tokens = require('./components/tokens.cjs');
24
24
  var components_a11y = require('./components/a11y.cjs');
25
+ var components_perf = require('./components/perf.cjs');
25
26
  var indexTags = require('./chunks/index-tags-BQh_uGqH.cjs');
26
- var spring = require('./chunks/spring-hsmgd7ml.cjs');
27
- var core = require('./chunks/core-BC9S2osy.cjs');
28
- var core$1 = require('./chunks/core-DPYjLqA0.cjs');
27
+ var spring = require('./chunks/spring-Dkpygsuj.cjs');
28
+ var core = require('./chunks/core-HLqH3qkA.cjs');
29
+ var core$1 = require('./chunks/core-CctNfzuP.cjs');
29
30
 
30
31
  /**
31
32
  * use-scroll-animate/components
@@ -249,11 +250,16 @@ exports.adoptVariants = variants.adoptVariants;
249
250
  exports.setVariant = variants.setVariant;
250
251
  exports.MOTION_SCALE = base.MOTION_SCALE;
251
252
  exports.MOTION_SENSITIVITY_LEVELS = base.MOTION_SENSITIVITY_LEVELS;
253
+ exports.activeAnimations = base.activeAnimations;
252
254
  exports.adaptKeyframes = base.adaptKeyframes;
255
+ exports.animationBudget = base.animationBudget;
253
256
  exports.configureComponents = base.configureComponents;
254
257
  exports.getMotionIntensity = base.getMotionIntensity;
255
258
  exports.getMotionSensitivity = base.getMotionSensitivity;
259
+ exports.onFrame = base.onFrame;
256
260
  exports.prefersReducedMotion = base.prefersReducedMotion;
261
+ exports.schedulerStats = base.schedulerStats;
262
+ exports.setAnimationBudget = base.setAnimationBudget;
257
263
  exports.MOTION_TOKENS = components_tokens.MOTION_TOKENS;
258
264
  exports.applyMotionTokens = components_tokens.applyMotionTokens;
259
265
  exports.getMotionTokens = components_tokens.getMotionTokens;
@@ -280,6 +286,11 @@ exports.motionAllowed = components_a11y.motionAllowed;
280
286
  exports.restoreMotionSensitivity = components_a11y.restoreMotionSensitivity;
281
287
  exports.setMotionSensitivity = components_a11y.setMotionSensitivity;
282
288
  exports.staticAlternative = components_a11y.staticAlternative;
289
+ exports.autoDegrade = components_perf.autoDegrade;
290
+ exports.categoryOf = components_perf.categoryOf;
291
+ exports.loadCategoryStyles = components_perf.loadCategoryStyles;
292
+ exports.loadedStyles = components_perf.loadedStyles;
293
+ exports.onDemandStyles = components_perf.onDemandStyles;
283
294
  exports.COMPONENT_CATEGORIES = indexTags.COMPONENT_CATEGORIES;
284
295
  exports.SPRING_PRESETS = spring.SPRING_PRESETS;
285
296
  exports.createSpring = spring.createSpring;
@@ -1 +1 @@
1
- {"version":3,"file":"components.cjs","sources":["../src/components/index.ts"],"sourcesContent":["/**\n * use-scroll-animate/components\n *\n * Framework-agnostic, dependency-free animated UI components built on\n * Custom Elements + CSS + the Web Animations API. They run in any browser\n * and in Windows desktop apps that render with a web view: Electron, Tauri\n * (WebView2), WinUI 3 / WPF / WinForms with WebView2, and installed PWAs.\n *\n * ```js\n * import { defineComponents } from 'use-scroll-animate/components';\n * defineComponents(); // registers every <usa-*> element\n * // or only what you use (tree-shakable):\n * import { defineTypewriter } from 'use-scroll-animate/components/text';\n * ```\n *\n * Importing has no side effects and is SSR-safe; nothing is registered\n * until a `define*()` function runs in a browser.\n *\n * @license MIT\n */\nimport { defineRevealComponents } from './reveal/index';\nimport { defineTextComponents } from './text/index';\nimport { defineInteractionComponents } from './interaction/index';\nimport { defineFeedbackComponents } from './feedback/index';\nimport { defineBackgroundComponents } from './background/index';\nimport { defineTransitionComponents } from './transitions/index';\nimport { definePhysicsComponents } from './physics/index';\nimport { defineCardComponents } from './cards/index';\nimport { defineClickComponents } from './click/index';\nimport { defineUiComponents } from './ui/index';\nimport { definePageComponents } from './page/index';\nimport { defineTimelineComponents } from './timeline/index';\nimport { defineGestureComponents } from './gesture/index';\nimport { defineSvgComponents } from './svg/index';\nimport { defineWebglComponents } from './webgl/index';\nimport { defineDepthComponents } from './depth/index';\nimport { defineLayoutComponents } from './layout/index';\nimport { definePacksComponents } from './packs/index';\nimport { adoptVariants } from './ui/variants';\nimport { canDefine } from './base';\n\nexport * from './reveal/index';\nexport * from './text/index';\nexport * from './interaction/index';\nexport * from './feedback/index';\nexport * from './background/index';\nexport * from './transitions/index';\nexport * from './physics/index';\nexport * from './cards/index';\nexport * from './click/index';\nexport * from './ui/index';\nexport * from './page/index';\nexport * from './timeline/index';\nexport * from './gesture/index';\nexport * from './svg/index';\nexport * from './webgl/index';\nexport * from './depth/index';\nexport * from './layout/index';\nexport * from './packs/index';\nexport * from './tokens/index';\nexport * from './a11y/index';\n\nexport { COMPONENT_CATEGORIES } from './index-tags';\nexport type { ComponentCategory } from './index-tags';\nimport { COMPONENT_CATEGORIES, type ComponentCategory } from './index-tags';\n\nconst BY_CATEGORY: Record<ComponentCategory, () => void> = {\n reveal: defineRevealComponents,\n text: defineTextComponents,\n interaction: defineInteractionComponents,\n feedback: defineFeedbackComponents,\n background: defineBackgroundComponents,\n transitions: defineTransitionComponents,\n physics: definePhysicsComponents,\n cards: defineCardComponents,\n click: defineClickComponents,\n ui: defineUiComponents,\n page: definePageComponents,\n timeline: defineTimelineComponents,\n gesture: defineGestureComponents,\n svg: defineSvgComponents,\n webgl: defineWebglComponents,\n depth: defineDepthComponents,\n layout: defineLayoutComponents,\n packs: definePacksComponents,\n};\n\n/**\n * Register every `<usa-*>` component (or only the given categories).\n * Safe to call more than once and on the server (no-op without DOM).\n */\nexport function defineComponents(categories?: ComponentCategory[]): void {\n if (canDefine()) adoptVariants();\n (categories || (Object.keys(BY_CATEGORY) as ComponentCategory[])).forEach((c) => BY_CATEGORY[c]?.());\n}\n"],"names":["defineRevealComponents","defineTextComponents","defineInteractionComponents","defineFeedbackComponents","defineBackgroundComponents","defineTransitionComponents","definePhysicsComponents","defineCardComponents","defineClickComponents","defineUiComponents","definePageComponents","defineTimelineComponents","defineGestureComponents","defineSvgComponents","defineWebglComponents","defineDepthComponents","defineLayoutComponents","definePacksComponents","canDefine","adoptVariants"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AA+CH,MAAM,WAAW,GAA0C;AACzD,IAAA,MAAM,EAAEA,wCAAsB;AAC9B,IAAA,IAAI,EAAEC,oCAAoB;AAC1B,IAAA,WAAW,EAAEC,kDAA2B;AACxC,IAAA,QAAQ,EAAEC,4CAAwB;AAClC,IAAA,UAAU,EAAEC,gDAA0B;AACtC,IAAA,WAAW,EAAEC,iDAA0B;AACvC,IAAA,OAAO,EAAEC,0CAAuB;AAChC,IAAA,KAAK,EAAEC,qCAAoB;AAC3B,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,EAAE,EAAEC,gCAAkB;AACtB,IAAA,IAAI,EAAEC,oCAAoB;AAC1B,IAAA,QAAQ,EAAEC,4CAAwB;AAClC,IAAA,OAAO,EAAEC,0CAAuB;AAChC,IAAA,GAAG,EAAEC,kCAAmB;AACxB,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,MAAM,EAAEC,wCAAsB;AAC9B,IAAA,KAAK,EAAEC,sCAAqB;CAC7B;AAED;;;AAGG;AACG,SAAU,gBAAgB,CAAC,UAAgC,EAAA;AAC/D,IAAA,IAAIC,cAAS,EAAE;AAAE,QAAAC,sBAAa,EAAE;IAChC,CAAC,UAAU,IAAK,MAAM,CAAC,IAAI,CAAC,WAAW,CAAyB,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;AACtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"components.cjs","sources":["../src/components/index.ts"],"sourcesContent":["/**\n * use-scroll-animate/components\n *\n * Framework-agnostic, dependency-free animated UI components built on\n * Custom Elements + CSS + the Web Animations API. They run in any browser\n * and in Windows desktop apps that render with a web view: Electron, Tauri\n * (WebView2), WinUI 3 / WPF / WinForms with WebView2, and installed PWAs.\n *\n * ```js\n * import { defineComponents } from 'use-scroll-animate/components';\n * defineComponents(); // registers every <usa-*> element\n * // or only what you use (tree-shakable):\n * import { defineTypewriter } from 'use-scroll-animate/components/text';\n * ```\n *\n * Importing has no side effects and is SSR-safe; nothing is registered\n * until a `define*()` function runs in a browser.\n *\n * @license MIT\n */\nimport { defineRevealComponents } from './reveal/index';\nimport { defineTextComponents } from './text/index';\nimport { defineInteractionComponents } from './interaction/index';\nimport { defineFeedbackComponents } from './feedback/index';\nimport { defineBackgroundComponents } from './background/index';\nimport { defineTransitionComponents } from './transitions/index';\nimport { definePhysicsComponents } from './physics/index';\nimport { defineCardComponents } from './cards/index';\nimport { defineClickComponents } from './click/index';\nimport { defineUiComponents } from './ui/index';\nimport { definePageComponents } from './page/index';\nimport { defineTimelineComponents } from './timeline/index';\nimport { defineGestureComponents } from './gesture/index';\nimport { defineSvgComponents } from './svg/index';\nimport { defineWebglComponents } from './webgl/index';\nimport { defineDepthComponents } from './depth/index';\nimport { defineLayoutComponents } from './layout/index';\nimport { definePacksComponents } from './packs/index';\nimport { adoptVariants } from './ui/variants';\nimport { canDefine } from './base';\n\nexport * from './reveal/index';\nexport * from './text/index';\nexport * from './interaction/index';\nexport * from './feedback/index';\nexport * from './background/index';\nexport * from './transitions/index';\nexport * from './physics/index';\nexport * from './cards/index';\nexport * from './click/index';\nexport * from './ui/index';\nexport * from './page/index';\nexport * from './timeline/index';\nexport * from './gesture/index';\nexport * from './svg/index';\nexport * from './webgl/index';\nexport * from './depth/index';\nexport * from './layout/index';\nexport * from './packs/index';\nexport * from './tokens/index';\nexport * from './a11y/index';\nexport * from './perf/index';\n\nexport { COMPONENT_CATEGORIES } from './index-tags';\nexport type { ComponentCategory } from './index-tags';\nimport { COMPONENT_CATEGORIES, type ComponentCategory } from './index-tags';\n\nconst BY_CATEGORY: Record<ComponentCategory, () => void> = {\n reveal: defineRevealComponents,\n text: defineTextComponents,\n interaction: defineInteractionComponents,\n feedback: defineFeedbackComponents,\n background: defineBackgroundComponents,\n transitions: defineTransitionComponents,\n physics: definePhysicsComponents,\n cards: defineCardComponents,\n click: defineClickComponents,\n ui: defineUiComponents,\n page: definePageComponents,\n timeline: defineTimelineComponents,\n gesture: defineGestureComponents,\n svg: defineSvgComponents,\n webgl: defineWebglComponents,\n depth: defineDepthComponents,\n layout: defineLayoutComponents,\n packs: definePacksComponents,\n};\n\n/**\n * Register every `<usa-*>` component (or only the given categories).\n * Safe to call more than once and on the server (no-op without DOM).\n */\nexport function defineComponents(categories?: ComponentCategory[]): void {\n if (canDefine()) adoptVariants();\n (categories || (Object.keys(BY_CATEGORY) as ComponentCategory[])).forEach((c) => BY_CATEGORY[c]?.());\n}\n"],"names":["defineRevealComponents","defineTextComponents","defineInteractionComponents","defineFeedbackComponents","defineBackgroundComponents","defineTransitionComponents","definePhysicsComponents","defineCardComponents","defineClickComponents","defineUiComponents","definePageComponents","defineTimelineComponents","defineGestureComponents","defineSvgComponents","defineWebglComponents","defineDepthComponents","defineLayoutComponents","definePacksComponents","canDefine","adoptVariants"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAgDH,MAAM,WAAW,GAA0C;AACzD,IAAA,MAAM,EAAEA,wCAAsB;AAC9B,IAAA,IAAI,EAAEC,oCAAoB;AAC1B,IAAA,WAAW,EAAEC,kDAA2B;AACxC,IAAA,QAAQ,EAAEC,4CAAwB;AAClC,IAAA,UAAU,EAAEC,gDAA0B;AACtC,IAAA,WAAW,EAAEC,iDAA0B;AACvC,IAAA,OAAO,EAAEC,0CAAuB;AAChC,IAAA,KAAK,EAAEC,qCAAoB;AAC3B,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,EAAE,EAAEC,gCAAkB;AACtB,IAAA,IAAI,EAAEC,oCAAoB;AAC1B,IAAA,QAAQ,EAAEC,4CAAwB;AAClC,IAAA,OAAO,EAAEC,0CAAuB;AAChC,IAAA,GAAG,EAAEC,kCAAmB;AACxB,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,MAAM,EAAEC,wCAAsB;AAC9B,IAAA,KAAK,EAAEC,sCAAqB;CAC7B;AAED;;;AAGG;AACG,SAAU,gBAAgB,CAAC,UAAgC,EAAA;AAC/D,IAAA,IAAIC,cAAS,EAAE;AAAE,QAAAC,sBAAa,EAAE;IAChC,CAAC,UAAU,IAAK,MAAM,CAAC,IAAI,CAAC,WAAW,CAAyB,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;AACtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -64,6 +64,22 @@ interface UsaElement extends HTMLElement {
64
64
  /** `true` while reduced motion applies to this element. */
65
65
  readonly reduced: boolean;
66
66
  }
67
+ /** Run `fn(time, dt)` every frame on the shared scheduler until the returned function is called. */
68
+ declare function onFrame(fn: (t: number, dt: number) => void): () => void;
69
+ /** Scheduler counters: frames flushed, callbacks run, peak callbacks in one frame, pending now. */
70
+ declare function schedulerStats(): {
71
+ frames: number;
72
+ callbacks: number;
73
+ peak: number;
74
+ pending: number;
75
+ loops: number;
76
+ };
77
+ /** Number of component animations running right now. */
78
+ declare const activeAnimations: () => number;
79
+ /** Cap concurrent component animations; extra ones jump to their final frame (`Infinity` = no cap). */
80
+ declare function setAnimationBudget(max: number): void;
81
+ /** The current cap. */
82
+ declare const animationBudget: () => number;
67
83
 
68
84
  /** Entrance effects shared by `<usa-reveal>` and `<usa-stagger>` (transform / opacity / filter only). */
69
85
  declare const REVEAL_EFFECTS: readonly ["fade", "fade-up", "fade-down", "fade-left", "fade-right", "zoom-in", "zoom-out", "blur", "blur-up", "flip-up", "flip-left", "rise"];
@@ -2677,11 +2693,66 @@ declare function auditMotionA11y(root: Element | Document): {
2677
2693
  /** Every `<usa-*>` tag, for sweeping audits. */
2678
2694
  declare const ALL_TAGS: string[];
2679
2695
 
2696
+ /**
2697
+ * use-scroll-animate/components/perf — performance toolkit (4.5).
2698
+ *
2699
+ * - One shared rAF scheduler for every component loop (`onFrame()`, `schedulerStats()`).
2700
+ * - Animation budget: `setAnimationBudget(n)` caps concurrent component
2701
+ * animations; extra ones land on their final frame.
2702
+ * - `autoDegrade()`: watches frame rate and animation count and steps motion
2703
+ * down (`low`, then a tighter budget) while the device struggles, restoring
2704
+ * it when frames recover.
2705
+ * - On-demand CSS: `loadCategoryStyles()` / `onDemandStyles()` — used by
2706
+ * `use-scroll-animate/components/lite`, the build without inlined CSS.
2707
+ */
2708
+
2709
+ interface AutoDegradeOptions {
2710
+ /** Frame rate below which motion is degraded (default 45). */
2711
+ minFps?: number;
2712
+ /** Concurrent animations above which motion is degraded (default 40). */
2713
+ maxActive?: number;
2714
+ /** Sample window in ms (default 1000). */
2715
+ sample?: number;
2716
+ /** Bad samples in a row before degrading (default 2). */
2717
+ patience?: number;
2718
+ /** Good samples in a row before restoring (default 3). */
2719
+ recovery?: number;
2720
+ /** Called on every change. */
2721
+ onChange?: (state: DegradeState) => void;
2722
+ }
2723
+ interface DegradeState {
2724
+ degraded: boolean;
2725
+ fps: number;
2726
+ active: number;
2727
+ reason: '' | 'fps' | 'count';
2728
+ }
2729
+ /**
2730
+ * Watch frame rate and animation count; while the device struggles, set
2731
+ * motion intensity to `low` and cap concurrent animations at `maxActive / 2`,
2732
+ * then restore the previous settings once frames recover. Dispatches
2733
+ * `usa:degrade` on `document`. Returns a stop function (restores settings).
2734
+ */
2735
+ declare function autoDegrade(options?: AutoDegradeOptions): () => void;
2736
+ /** The category of a default `<usa-*>` tag. */
2737
+ declare const categoryOf: (tag: string) => ComponentCategory | undefined;
2738
+ /**
2739
+ * Add `<link rel="stylesheet" href="{base}components/{category}.css">` once.
2740
+ * `base` is the URL of the package's `dist/` folder.
2741
+ */
2742
+ declare function loadCategoryStyles(category: ComponentCategory | 'all', base: string): HTMLLinkElement | null;
2743
+ /**
2744
+ * Load each category's CSS the first time one of its elements connects
2745
+ * (custom tags fall back to the full stylesheet). Returns an undo.
2746
+ */
2747
+ declare function onDemandStyles(base: string): () => void;
2748
+ /** Categories whose CSS has been requested so far. */
2749
+ declare const loadedStyles: () => string[];
2750
+
2680
2751
  /**
2681
2752
  * Register every `<usa-*>` component (or only the given categories).
2682
2753
  * Safe to call more than once and on the server (no-op without DOM).
2683
2754
  */
2684
2755
  declare function defineComponents(categories?: ComponentCategory[]): void;
2685
2756
 
2686
- export { ALL_TAGS, AMBIENT_EFFECTS, ANIM_ICONS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, JOINING_SCRIPT, LIVE_REGION_IDS, MASK_SHAPES, MORPH_ICONS, MOTION_SCALE, MOTION_SENSITIVITY, MOTION_SENSITIVITY_LEVELS, MOTION_TOKENS, PACKS, PACK_PRIMITIVES, PAGE_EFFECTS, REVEAL_EFFECTS, SENSITIVITY_CSS, SHADERS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, STATIC_ALTERNATIVES, TIMELINE_PRESETS, VARIANTS, adaptKeyframes, adoptVariants, announce, applyMotionTokens, applyPack, auditMotionA11y, autoAnimate, burst, confetti, configureComponents, countUp, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAnimIcon, defineAurora, defineAutoAnimate, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCube, defineCursor, defineDepth, defineDepthComponents, defineDialog, defineDistort, defineDotNetwork, defineDoubleTap, defineDraggable, defineDraw, defineDrawer, defineFab, defineFeedbackComponents, defineFullpage, defineGestureComponents, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLayoutComponents, defineLike, defineLiquid, defineLoadingBar, defineMagnetic, defineMarquee, defineMaskReveal, defineMasonry, defineMorph, defineMotionSwitch, defineNavbar, defineOverscroll, definePack, definePacksComponents, definePageComponents, defineParticles, definePhysicsComponents, definePinchZoom, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShader, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineSvgComponents, defineSwipeable, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineTimeline, defineTimelineComponents, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, defineWebglComponents, deviceTilt, drawLines, easeOutExpo, enableMpaTransitions, flip, flipFrames, fluentPreset, flyToCart, fragmentSource, gesture, getMotionIntensity, getMotionSensitivity, getMotionTokens, glQuad, graphemes, haptic, importMotionTokens, interpolatePath, linearEasing, liveRegion, loadingBar, masonryLayout, mergeMotionTokens, morphPath, morphTo, motionAllowed, motionToken, motionTokensToCss, motionTokensToJSON, motionTokensToVars, motionVar, orientationToTilt, pageTransition, parseDuration, parseEasing, pathsCompatible, pinchScale, prefersReducedMotion, projectInertia, readScrollProgress, requestOrientationPermission, resolveDurationToken, resolveEasingToken, resolvePosition, resolveSpring, restoreMotionIntensity, restoreMotionSensitivity, revealKeyframes, rubberBand, scrambleFrame, scrollToTarget, setMotionIntensity, setMotionSensitivity, setVariant, shake, sharedTransition, smoothScroll, snapTo, splitOrder, splitText, splitTimeline, words as splitWords, spring, springEasing, springEffectKeyframes, springSamples, staticAlternative, stepSpring, supportsLinearEasing, supportsNativeScrub, supportsOrientation, supportsViewTransitions, supportsWebGL, swipeDirection, themeTransition, timeline, toast, viewTransition };
2687
- export type { A11yIssue, AmbientEffect, AutoAnimateOptions, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, CursorMode, DeepPartialTokens, DialogVariant, FlipOptions, FluentPresetOptions, GLQuad, GestureHandlers, GestureOptions, MorphOptions, MotionIntensity, MotionSensitivity, MotionTokenGroup, MotionTokens, PackContext, PackName, PageEffect, PageTransitionOptions, PanState, PinchState, Placement, Politeness, PressState, RevealEffect, ScrubHandle, ScrubOptions, SharedOptions, SmoothScrollOptions, SpinnerVariant, SplitBy, SplitFrom, SplitResult, SplitTextOptions, SplitTimelineOptions, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringToken, SpringValue, SpringValueOptions, SwipeDirection, SwipeState, TiltReading, Timeline, TimelineOptions, TimelinePosition, TimelineStepOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAnimIconElement, UsaAuroraElement, UsaAutoAnimateElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBlobsElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCubeElement, UsaCursorElement, UsaDepthElement, UsaDialogElement, UsaDotNetworkElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFullpageElement, UsaGLElement, UsaGlitchElement, UsaGradientTextElement, UsaGrainElement, UsaGridGlowElement, UsaHandwritingElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMaskRevealElement, UsaMasonryElement, UsaMorphElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaPackElement, UsaParticlesElement, UsaPinchZoomElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollHighlightElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaSwipeableElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaTimelineElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, UsaWaterRippleElement, UsaWaveTextElement, Variant, ViewTransitionOptions };
2757
+ export { ALL_TAGS, AMBIENT_EFFECTS, ANIM_ICONS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, JOINING_SCRIPT, LIVE_REGION_IDS, MASK_SHAPES, MORPH_ICONS, MOTION_SCALE, MOTION_SENSITIVITY, MOTION_SENSITIVITY_LEVELS, MOTION_TOKENS, PACKS, PACK_PRIMITIVES, PAGE_EFFECTS, REVEAL_EFFECTS, SENSITIVITY_CSS, SHADERS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, STATIC_ALTERNATIVES, TIMELINE_PRESETS, VARIANTS, activeAnimations, adaptKeyframes, adoptVariants, animationBudget, announce, applyMotionTokens, applyPack, auditMotionA11y, autoAnimate, autoDegrade, burst, categoryOf, confetti, configureComponents, countUp, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAnimIcon, defineAurora, defineAutoAnimate, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCube, defineCursor, defineDepth, defineDepthComponents, defineDialog, defineDistort, defineDotNetwork, defineDoubleTap, defineDraggable, defineDraw, defineDrawer, defineFab, defineFeedbackComponents, defineFullpage, defineGestureComponents, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLayoutComponents, defineLike, defineLiquid, defineLoadingBar, defineMagnetic, defineMarquee, defineMaskReveal, defineMasonry, defineMorph, defineMotionSwitch, defineNavbar, defineOverscroll, definePack, definePacksComponents, definePageComponents, defineParticles, definePhysicsComponents, definePinchZoom, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShader, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineSvgComponents, defineSwipeable, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineTimeline, defineTimelineComponents, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, defineWebglComponents, deviceTilt, drawLines, easeOutExpo, enableMpaTransitions, flip, flipFrames, fluentPreset, flyToCart, fragmentSource, gesture, getMotionIntensity, getMotionSensitivity, getMotionTokens, glQuad, graphemes, haptic, importMotionTokens, interpolatePath, linearEasing, liveRegion, loadCategoryStyles, loadedStyles, loadingBar, masonryLayout, mergeMotionTokens, morphPath, morphTo, motionAllowed, motionToken, motionTokensToCss, motionTokensToJSON, motionTokensToVars, motionVar, onDemandStyles, onFrame, orientationToTilt, pageTransition, parseDuration, parseEasing, pathsCompatible, pinchScale, prefersReducedMotion, projectInertia, readScrollProgress, requestOrientationPermission, resolveDurationToken, resolveEasingToken, resolvePosition, resolveSpring, restoreMotionIntensity, restoreMotionSensitivity, revealKeyframes, rubberBand, schedulerStats, scrambleFrame, scrollToTarget, setAnimationBudget, setMotionIntensity, setMotionSensitivity, setVariant, shake, sharedTransition, smoothScroll, snapTo, splitOrder, splitText, splitTimeline, words as splitWords, spring, springEasing, springEffectKeyframes, springSamples, staticAlternative, stepSpring, supportsLinearEasing, supportsNativeScrub, supportsOrientation, supportsViewTransitions, supportsWebGL, swipeDirection, themeTransition, timeline, toast, viewTransition };
2758
+ export type { A11yIssue, AmbientEffect, AutoAnimateOptions, AutoDegradeOptions, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, CursorMode, DeepPartialTokens, DegradeState, DialogVariant, FlipOptions, FluentPresetOptions, GLQuad, GestureHandlers, GestureOptions, MorphOptions, MotionIntensity, MotionSensitivity, MotionTokenGroup, MotionTokens, PackContext, PackName, PageEffect, PageTransitionOptions, PanState, PinchState, Placement, Politeness, PressState, RevealEffect, ScrubHandle, ScrubOptions, SharedOptions, SmoothScrollOptions, SpinnerVariant, SplitBy, SplitFrom, SplitResult, SplitTextOptions, SplitTimelineOptions, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringToken, SpringValue, SpringValueOptions, SwipeDirection, SwipeState, TiltReading, Timeline, TimelineOptions, TimelinePosition, TimelineStepOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAnimIconElement, UsaAuroraElement, UsaAutoAnimateElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBlobsElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCubeElement, UsaCursorElement, UsaDepthElement, UsaDialogElement, UsaDotNetworkElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFullpageElement, UsaGLElement, UsaGlitchElement, UsaGradientTextElement, UsaGrainElement, UsaGridGlowElement, UsaHandwritingElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMaskRevealElement, UsaMasonryElement, UsaMorphElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaPackElement, UsaParticlesElement, UsaPinchZoomElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollHighlightElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaSwipeableElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaTimelineElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, UsaWaterRippleElement, UsaWaveTextElement, Variant, ViewTransitionOptions };