use-scroll-animate 3.0.0 → 3.1.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 (59) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -0
  3. package/README_ja.md +1 -0
  4. package/README_zh.md +1 -0
  5. package/dist/chunks/{base-Co98Z2iM.js → base-Cu-86Z31.js} +2 -2
  6. package/dist/chunks/{base-Co98Z2iM.js.map → base-Cu-86Z31.js.map} +1 -1
  7. package/dist/chunks/{index-tags-f37txHmb.js → index-tags-D7NynL4r.js} +2 -1
  8. package/dist/chunks/{index-tags-f37txHmb.js.map → index-tags-D7NynL4r.js.map} +1 -1
  9. package/dist/chunks/{index-tags-BEM98giN.cjs → index-tags-Gw1G06Pb.cjs} +2 -1
  10. package/dist/chunks/{index-tags-BEM98giN.cjs.map → index-tags-Gw1G06Pb.cjs.map} +1 -1
  11. package/dist/chunks/{spring-YNUpez2g.js → spring-BV-cpTHC.js} +2 -2
  12. package/dist/chunks/{spring-YNUpez2g.js.map → spring-BV-cpTHC.js.map} +1 -1
  13. package/dist/chunks/{variants-Dp_5lJ_J.js → variants-BQ3gCb5L.js} +2 -2
  14. package/dist/chunks/{variants-Dp_5lJ_J.js.map → variants-BQ3gCb5L.js.map} +1 -1
  15. package/dist/components/background.js +3 -3
  16. package/dist/components/cards.js +3 -3
  17. package/dist/components/click.js +3 -3
  18. package/dist/components/feedback.js +2 -2
  19. package/dist/components/interaction.js +2 -2
  20. package/dist/components/jsx.d.cts +1 -0
  21. package/dist/components/jsx.d.ts +1 -0
  22. package/dist/components/lazy.cjs +2 -1
  23. package/dist/components/lazy.cjs.map +1 -1
  24. package/dist/components/lazy.d.cts +1 -0
  25. package/dist/components/lazy.d.ts +1 -0
  26. package/dist/components/lazy.js +2 -1
  27. package/dist/components/lazy.js.map +1 -1
  28. package/dist/components/page.js +3 -3
  29. package/dist/components/physics.js +4 -4
  30. package/dist/components/react.cjs +1 -1
  31. package/dist/components/react.js +1 -1
  32. package/dist/components/reveal.js +2 -2
  33. package/dist/components/text.js +2 -2
  34. package/dist/components/timeline.cjs +303 -0
  35. package/dist/components/timeline.cjs.map +1 -0
  36. package/dist/components/timeline.css +3 -0
  37. package/dist/components/timeline.d.cts +164 -0
  38. package/dist/components/timeline.d.ts +164 -0
  39. package/dist/components/timeline.js +296 -0
  40. package/dist/components/timeline.js.map +1 -0
  41. package/dist/components/transitions.js +2 -2
  42. package/dist/components/ui.js +5 -5
  43. package/dist/components/vue.cjs +2 -1
  44. package/dist/components/vue.cjs.map +1 -1
  45. package/dist/components/vue.d.cts +87 -0
  46. package/dist/components/vue.d.ts +87 -0
  47. package/dist/components/vue.js +5 -4
  48. package/dist/components/vue.js.map +1 -1
  49. package/dist/components.cjs +8 -1
  50. package/dist/components.cjs.map +1 -1
  51. package/dist/components.css +1 -0
  52. package/dist/components.d.cts +120 -2
  53. package/dist/components.d.ts +120 -2
  54. package/dist/components.js +10 -7
  55. package/dist/components.js.map +1 -1
  56. package/dist/components.umd.js +2 -2
  57. package/dist/components.umd.js.map +1 -1
  58. package/docs/components.md +9 -0
  59. package/package.json +13 -2
@@ -1288,6 +1288,92 @@ declare global {
1288
1288
  }
1289
1289
  }
1290
1290
 
1291
+ /**
1292
+ * Where a step starts on a timeline:
1293
+ * - a number: absolute time in ms
1294
+ * - `'>'` (default): when the previous step ends · `'<'`: when it starts
1295
+ * - `'+=200'` / `'-=200'`: after / overlapping the previous end
1296
+ * - `'<+=100'`: 100ms after the previous step's start
1297
+ * - `'intro'` / `'intro+=150'`: at (or relative to) a label
1298
+ */
1299
+ type TimelinePosition = number | string;
1300
+ interface TimelineStepOptions {
1301
+ /** Duration in ms (default: timeline default, 600). */
1302
+ duration?: number;
1303
+ /** CSS easing (default `cubic-bezier(0.22, 1, 0.36, 1)`). */
1304
+ easing?: string;
1305
+ /** Start position, see `TimelinePosition`. */
1306
+ at?: TimelinePosition;
1307
+ /** ms between targets when the selector matches several elements. */
1308
+ stagger?: number;
1309
+ }
1310
+ interface ScrubOptions {
1311
+ /** Scroll offset (px) before the source's top reaches the viewport bottom where progress starts. */
1312
+ offset?: number;
1313
+ /** Smoothing 0–1 (0 = immediate, default 0). */
1314
+ smooth?: number;
1315
+ }
1316
+ interface Timeline {
1317
+ /** Total length in ms. */
1318
+ readonly duration: number;
1319
+ /** Label positions in ms. */
1320
+ readonly labels: Readonly<Record<string, number>>;
1321
+ /** Current playhead in ms. */
1322
+ readonly time: number;
1323
+ /** Add a step: animate `target` with keyframes or a preset name (`fade-up`, `scale`…). */
1324
+ to(target: string | Element | Element[] | NodeList, frames: Keyframe[] | string, options?: TimelineStepOptions): Timeline;
1325
+ /** Name a position (default: the current end). */
1326
+ label(name: string, at?: TimelinePosition): Timeline;
1327
+ /** Run `fn` when the playhead passes `at`. */
1328
+ call(fn: () => void, at?: TimelinePosition): Timeline;
1329
+ /** Play forwards from the playhead (from 0 when at the end). Resolves at the end. */
1330
+ play(from?: TimelinePosition): Promise<void>;
1331
+ /** Play backwards to 0. */
1332
+ reverse(): Promise<void>;
1333
+ pause(): Timeline;
1334
+ /** Jump to a time (ms) or label. */
1335
+ seek(to: TimelinePosition): Timeline;
1336
+ /** Get or set progress 0–1. */
1337
+ progress(p?: number): number;
1338
+ /** Tie progress to the scroll position of `source` (it moves through the viewport). Returns a stop function. */
1339
+ scrub(source: Element, options?: ScrubOptions): () => void;
1340
+ /** Stop and drop every animation (elements keep their last frame). */
1341
+ cancel(): void;
1342
+ }
1343
+
1344
+ /**
1345
+ * `<usa-timeline>` — declarative choreography. Every descendant with
1346
+ * `data-tl="<preset>"` becomes a step, in document order; `data-at`
1347
+ * (`'-=200'`, `'<'`, `'label+=100'`, ms), `data-duration` and `data-label`
1348
+ * fine-tune it.
1349
+ *
1350
+ * Attributes: `trigger` (`view` default · `click` · `manual`), `scrub`
1351
+ * (progress follows scroll instead of playing), `overlap` (ms each step
1352
+ * overlaps the previous, default 0), `duration` (600), `stagger` (ms),
1353
+ * `repeat` (replay every time it enters the viewport). Methods: `play()`,
1354
+ * `reverse()`, `seek(t)`; property `timeline`. Event `usa:complete`.
1355
+ * Reduced motion: steps appear in their final state.
1356
+ */
1357
+ interface UsaTimelineElement extends UsaElement {
1358
+ readonly timeline: Timeline | null;
1359
+ play(): Promise<void>;
1360
+ reverse(): Promise<void>;
1361
+ seek(to: number | string): void;
1362
+ }
1363
+
1364
+ /**
1365
+ * use-scroll-animate/components/timeline — choreography (v3.1).
1366
+ * `timeline()` chains, overlaps, labels, seeks, reverses and scroll-scrubs
1367
+ * WAAPI animations on one playhead; `<usa-timeline>` builds one from
1368
+ * `data-tl` children.
1369
+ */
1370
+
1371
+ declare global {
1372
+ interface HTMLElementTagNameMap {
1373
+ 'usa-timeline': UsaTimelineElement;
1374
+ }
1375
+ }
1376
+
1291
1377
  /** The component categories and their default tags. */
1292
1378
  declare const COMPONENT_CATEGORIES: {
1293
1379
  readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
@@ -1301,6 +1387,7 @@ declare const COMPONENT_CATEGORIES: {
1301
1387
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
1302
1388
  readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-tooltip", "usa-popover", "usa-badge", "usa-avatar-stack"];
1303
1389
  readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
1390
+ readonly timeline: readonly ["usa-timeline"];
1304
1391
  };
1305
1392
  type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
1306
1393
 
@@ -1288,6 +1288,92 @@ declare global {
1288
1288
  }
1289
1289
  }
1290
1290
 
1291
+ /**
1292
+ * Where a step starts on a timeline:
1293
+ * - a number: absolute time in ms
1294
+ * - `'>'` (default): when the previous step ends · `'<'`: when it starts
1295
+ * - `'+=200'` / `'-=200'`: after / overlapping the previous end
1296
+ * - `'<+=100'`: 100ms after the previous step's start
1297
+ * - `'intro'` / `'intro+=150'`: at (or relative to) a label
1298
+ */
1299
+ type TimelinePosition = number | string;
1300
+ interface TimelineStepOptions {
1301
+ /** Duration in ms (default: timeline default, 600). */
1302
+ duration?: number;
1303
+ /** CSS easing (default `cubic-bezier(0.22, 1, 0.36, 1)`). */
1304
+ easing?: string;
1305
+ /** Start position, see `TimelinePosition`. */
1306
+ at?: TimelinePosition;
1307
+ /** ms between targets when the selector matches several elements. */
1308
+ stagger?: number;
1309
+ }
1310
+ interface ScrubOptions {
1311
+ /** Scroll offset (px) before the source's top reaches the viewport bottom where progress starts. */
1312
+ offset?: number;
1313
+ /** Smoothing 0–1 (0 = immediate, default 0). */
1314
+ smooth?: number;
1315
+ }
1316
+ interface Timeline {
1317
+ /** Total length in ms. */
1318
+ readonly duration: number;
1319
+ /** Label positions in ms. */
1320
+ readonly labels: Readonly<Record<string, number>>;
1321
+ /** Current playhead in ms. */
1322
+ readonly time: number;
1323
+ /** Add a step: animate `target` with keyframes or a preset name (`fade-up`, `scale`…). */
1324
+ to(target: string | Element | Element[] | NodeList, frames: Keyframe[] | string, options?: TimelineStepOptions): Timeline;
1325
+ /** Name a position (default: the current end). */
1326
+ label(name: string, at?: TimelinePosition): Timeline;
1327
+ /** Run `fn` when the playhead passes `at`. */
1328
+ call(fn: () => void, at?: TimelinePosition): Timeline;
1329
+ /** Play forwards from the playhead (from 0 when at the end). Resolves at the end. */
1330
+ play(from?: TimelinePosition): Promise<void>;
1331
+ /** Play backwards to 0. */
1332
+ reverse(): Promise<void>;
1333
+ pause(): Timeline;
1334
+ /** Jump to a time (ms) or label. */
1335
+ seek(to: TimelinePosition): Timeline;
1336
+ /** Get or set progress 0–1. */
1337
+ progress(p?: number): number;
1338
+ /** Tie progress to the scroll position of `source` (it moves through the viewport). Returns a stop function. */
1339
+ scrub(source: Element, options?: ScrubOptions): () => void;
1340
+ /** Stop and drop every animation (elements keep their last frame). */
1341
+ cancel(): void;
1342
+ }
1343
+
1344
+ /**
1345
+ * `<usa-timeline>` — declarative choreography. Every descendant with
1346
+ * `data-tl="<preset>"` becomes a step, in document order; `data-at`
1347
+ * (`'-=200'`, `'<'`, `'label+=100'`, ms), `data-duration` and `data-label`
1348
+ * fine-tune it.
1349
+ *
1350
+ * Attributes: `trigger` (`view` default · `click` · `manual`), `scrub`
1351
+ * (progress follows scroll instead of playing), `overlap` (ms each step
1352
+ * overlaps the previous, default 0), `duration` (600), `stagger` (ms),
1353
+ * `repeat` (replay every time it enters the viewport). Methods: `play()`,
1354
+ * `reverse()`, `seek(t)`; property `timeline`. Event `usa:complete`.
1355
+ * Reduced motion: steps appear in their final state.
1356
+ */
1357
+ interface UsaTimelineElement extends UsaElement {
1358
+ readonly timeline: Timeline | null;
1359
+ play(): Promise<void>;
1360
+ reverse(): Promise<void>;
1361
+ seek(to: number | string): void;
1362
+ }
1363
+
1364
+ /**
1365
+ * use-scroll-animate/components/timeline — choreography (v3.1).
1366
+ * `timeline()` chains, overlaps, labels, seeks, reverses and scroll-scrubs
1367
+ * WAAPI animations on one playhead; `<usa-timeline>` builds one from
1368
+ * `data-tl` children.
1369
+ */
1370
+
1371
+ declare global {
1372
+ interface HTMLElementTagNameMap {
1373
+ 'usa-timeline': UsaTimelineElement;
1374
+ }
1375
+ }
1376
+
1291
1377
  /** The component categories and their default tags. */
1292
1378
  declare const COMPONENT_CATEGORIES: {
1293
1379
  readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
@@ -1301,6 +1387,7 @@ declare const COMPONENT_CATEGORIES: {
1301
1387
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
1302
1388
  readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-tooltip", "usa-popover", "usa-badge", "usa-avatar-stack"];
1303
1389
  readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
1390
+ readonly timeline: readonly ["usa-timeline"];
1304
1391
  };
1305
1392
  type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
1306
1393
 
@@ -1,19 +1,20 @@
1
1
  import { defineComponents } from '../components.js';
2
2
  import './reveal.js';
3
- import '../chunks/base-Co98Z2iM.js';
3
+ import '../chunks/base-Cu-86Z31.js';
4
4
  import './text.js';
5
5
  import './interaction.js';
6
6
  import './feedback.js';
7
7
  import './background.js';
8
- import '../chunks/variants-Dp_5lJ_J.js';
8
+ import '../chunks/variants-BQ3gCb5L.js';
9
9
  import './transitions.js';
10
10
  import './physics.js';
11
- import '../chunks/spring-YNUpez2g.js';
11
+ import '../chunks/spring-BV-cpTHC.js';
12
12
  import './cards.js';
13
13
  import './click.js';
14
14
  import './ui.js';
15
15
  import './page.js';
16
- import '../chunks/index-tags-f37txHmb.js';
16
+ import './timeline.js';
17
+ import '../chunks/index-tags-D7NynL4r.js';
17
18
 
18
19
  /**
19
20
  * 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;;;;;"}
@@ -11,9 +11,10 @@ var components_cards = require('./components/cards.cjs');
11
11
  var components_click = require('./components/click.cjs');
12
12
  var components_ui = require('./components/ui.cjs');
13
13
  var components_page = require('./components/page.cjs');
14
+ var components_timeline = require('./components/timeline.cjs');
14
15
  var variants = require('./chunks/variants-BNIrn4ch.cjs');
15
16
  var base = require('./chunks/base-CXx7jZ-o.cjs');
16
- var indexTags = require('./chunks/index-tags-BEM98giN.cjs');
17
+ var indexTags = require('./chunks/index-tags-Gw1G06Pb.cjs');
17
18
  var spring = require('./chunks/spring-2OTnYCzm.cjs');
18
19
 
19
20
  /**
@@ -48,6 +49,7 @@ const BY_CATEGORY = {
48
49
  click: components_click.defineClickComponents,
49
50
  ui: components_ui.defineUiComponents,
50
51
  page: components_page.definePageComponents,
52
+ timeline: components_timeline.defineTimelineComponents,
51
53
  };
52
54
  /**
53
55
  * Register every `<usa-*>` component (or only the given categories).
@@ -177,6 +179,11 @@ exports.setMotionIntensity = components_page.setMotionIntensity;
177
179
  exports.smoothScroll = components_page.smoothScroll;
178
180
  exports.supportsViewTransitions = components_page.supportsViewTransitions;
179
181
  exports.themeTransition = components_page.themeTransition;
182
+ exports.TIMELINE_PRESETS = components_timeline.TIMELINE_PRESETS;
183
+ exports.defineTimeline = components_timeline.defineTimeline;
184
+ exports.defineTimelineComponents = components_timeline.defineTimelineComponents;
185
+ exports.resolvePosition = components_timeline.resolvePosition;
186
+ exports.timeline = components_timeline.timeline;
180
187
  exports.VARIANTS = variants.VARIANTS;
181
188
  exports.adoptVariants = variants.adoptVariants;
182
189
  exports.setVariant = variants.setVariant;
@@ -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 { 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';\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};\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","canDefine","adoptVariants"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AA+BH,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;CAC3B;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 { 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';\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};\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","canDefine","adoptVariants"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAiCH,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;CACnC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -66,3 +66,4 @@ usa-loading-bar{--usa-loading:0;--usa-loading-h:3px;--usa-loading-color:var(--us
66
66
  usa-motion-switch{--usa-motion-i:2;position:relative;display:inline-grid;grid-auto-flow:column;grid-auto-columns:1fr;padding:3px;border-radius:999px;background:color-mix(in srgb,currentColor 9%,transparent);isolation:isolate}usa-motion-switch button{position:relative;z-index:1;padding:6px 12px;border:0;background:none;color:inherit;font:inherit;font-size:0.85em;border-radius:999px;cursor:pointer}usa-motion-switch button[aria-checked="true"]{color:var(--usa-accent-text,#fff)}usa-motion-switch button:focus-visible{outline:2px solid var(--usa-accent,#7c5cff);outline-offset:1px}usa-motion-switch .usa-motion-thumb{position:absolute;z-index:0;top:3px;bottom:3px;left:3px;width:calc((100% - 6px) / 4);border-radius:999px;background:var(--usa-accent,#7c5cff);transform:translateX(calc(var(--usa-motion-i) * 100%));transition:transform 0.4s cubic-bezier(0.34,1.4,0.64,1)}@media (prefers-reduced-motion:reduce){usa-motion-switch .usa-motion-thumb{transition:none}}
67
67
  usa-splash{position:fixed;inset:0;z-index:2147483400;display:grid;place-items:center;background:var(--usa-splash-bg,var(--usa-surface,#0b0d12));color:var(--usa-text,#fff)}usa-splash[hidden]{display:none}
68
68
  ::view-transition-group(root){animation-duration:var(--usa-pt-duration,600ms)}html[data-usa-pt] ::view-transition-old(root),html[data-usa-pt] ::view-transition-new(root){animation-duration:var(--usa-pt-duration,600ms);animation-timing-function:cubic-bezier(0.22,1,0.36,1);mix-blend-mode:normal}html[data-usa-pt="slide"] ::view-transition-old(root),html[data-usa-pt="slide-left"] ::view-transition-old(root){animation-name:usa-pt-out-left}html[data-usa-pt="slide"] ::view-transition-new(root),html[data-usa-pt="slide-left"] ::view-transition-new(root){animation-name:usa-pt-in-right}html[data-usa-pt="slide-right"] ::view-transition-old(root){animation-name:usa-pt-out-right}html[data-usa-pt="slide-right"] ::view-transition-new(root){animation-name:usa-pt-in-left}html[data-usa-pt="slide-up"] ::view-transition-old(root){animation-name:usa-pt-out-up}html[data-usa-pt="slide-up"] ::view-transition-new(root){animation-name:usa-pt-in-up}html[data-usa-pt="zoom"] ::view-transition-old(root){animation-name:usa-pt-zoom-out}html[data-usa-pt="zoom"] ::view-transition-new(root){animation-name:usa-pt-zoom-in}html[data-usa-pt="circle"] ::view-transition-old(root){animation:none}html[data-usa-pt="circle"] ::view-transition-new(root){animation-name:usa-pt-circle}html[data-usa-pt="blinds"] ::view-transition-old(root){animation:none}html[data-usa-pt="blinds"] ::view-transition-new(root){animation-name:usa-pt-blinds;-webkit-mask-image:repeating-linear-gradient(to bottom,#000 0 var(--usa-blind),transparent var(--usa-blind) 10vh);mask-image:repeating-linear-gradient(to bottom,#000 0 var(--usa-blind),transparent var(--usa-blind) 10vh)}html[data-usa-pt="pixel"] ::view-transition-old(root){animation-name:usa-pt-pixel-out;animation-timing-function:steps(10,end)}html[data-usa-pt="pixel"] ::view-transition-new(root){animation-name:usa-pt-pixel-in;animation-timing-function:steps(10,end)}@property --usa-blind{syntax:"<length-percentage>";inherits:false;initial-value:0vh}@keyframes usa-pt-out-left{to{transform:translateX(-30%);opacity:0}}@keyframes usa-pt-in-right{from{transform:translateX(30%);opacity:0}}@keyframes usa-pt-out-right{to{transform:translateX(30%);opacity:0}}@keyframes usa-pt-in-left{from{transform:translateX(-30%);opacity:0}}@keyframes usa-pt-out-up{to{transform:translateY(-12%);opacity:0}}@keyframes usa-pt-in-up{from{transform:translateY(12%);opacity:0}}@keyframes usa-pt-zoom-out{to{transform:scale(0.92);opacity:0}}@keyframes usa-pt-zoom-in{from{transform:scale(1.08);opacity:0}}@keyframes usa-pt-circle{from{clip-path:circle(0 at var(--usa-pt-x,50%) var(--usa-pt-y,50%))}to{clip-path:circle(var(--usa-pt-r,150vmax) at var(--usa-pt-x,50%) var(--usa-pt-y,50%))}}@keyframes usa-pt-blinds{from{--usa-blind:0vh}to{--usa-blind:10vh}}@keyframes usa-pt-pixel-out{to{opacity:0;filter:blur(6px) contrast(1.4)}}@keyframes usa-pt-pixel-in{from{opacity:0;filter:blur(6px) contrast(1.4)}}@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none !important}}
69
+ 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}}
@@ -1774,6 +1774,123 @@ declare global {
1774
1774
  }
1775
1775
  }
1776
1776
 
1777
+ /**
1778
+ * Where a step starts on a timeline:
1779
+ * - a number: absolute time in ms
1780
+ * - `'>'` (default): when the previous step ends · `'<'`: when it starts
1781
+ * - `'+=200'` / `'-=200'`: after / overlapping the previous end
1782
+ * - `'<+=100'`: 100ms after the previous step's start
1783
+ * - `'intro'` / `'intro+=150'`: at (or relative to) a label
1784
+ */
1785
+ type TimelinePosition = number | string;
1786
+ interface TimelineStepOptions {
1787
+ /** Duration in ms (default: timeline default, 600). */
1788
+ duration?: number;
1789
+ /** CSS easing (default `cubic-bezier(0.22, 1, 0.36, 1)`). */
1790
+ easing?: string;
1791
+ /** Start position, see `TimelinePosition`. */
1792
+ at?: TimelinePosition;
1793
+ /** ms between targets when the selector matches several elements. */
1794
+ stagger?: number;
1795
+ }
1796
+ interface TimelineOptions {
1797
+ /** Defaults for every step. */
1798
+ defaults?: Pick<TimelineStepOptions, 'duration' | 'easing' | 'stagger'>;
1799
+ /** Playback rate (1 = normal). */
1800
+ speed?: number;
1801
+ /** Called after `play()` reaches the end (or the start when reversed). */
1802
+ onComplete?: () => void;
1803
+ /** Called on every frame with progress 0–1. */
1804
+ onUpdate?: (progress: number) => void;
1805
+ }
1806
+ interface ScrubOptions {
1807
+ /** Scroll offset (px) before the source's top reaches the viewport bottom where progress starts. */
1808
+ offset?: number;
1809
+ /** Smoothing 0–1 (0 = immediate, default 0). */
1810
+ smooth?: number;
1811
+ }
1812
+ interface Timeline {
1813
+ /** Total length in ms. */
1814
+ readonly duration: number;
1815
+ /** Label positions in ms. */
1816
+ readonly labels: Readonly<Record<string, number>>;
1817
+ /** Current playhead in ms. */
1818
+ readonly time: number;
1819
+ /** Add a step: animate `target` with keyframes or a preset name (`fade-up`, `scale`…). */
1820
+ to(target: string | Element | Element[] | NodeList, frames: Keyframe[] | string, options?: TimelineStepOptions): Timeline;
1821
+ /** Name a position (default: the current end). */
1822
+ label(name: string, at?: TimelinePosition): Timeline;
1823
+ /** Run `fn` when the playhead passes `at`. */
1824
+ call(fn: () => void, at?: TimelinePosition): Timeline;
1825
+ /** Play forwards from the playhead (from 0 when at the end). Resolves at the end. */
1826
+ play(from?: TimelinePosition): Promise<void>;
1827
+ /** Play backwards to 0. */
1828
+ reverse(): Promise<void>;
1829
+ pause(): Timeline;
1830
+ /** Jump to a time (ms) or label. */
1831
+ seek(to: TimelinePosition): Timeline;
1832
+ /** Get or set progress 0–1. */
1833
+ progress(p?: number): number;
1834
+ /** Tie progress to the scroll position of `source` (it moves through the viewport). Returns a stop function. */
1835
+ scrub(source: Element, options?: ScrubOptions): () => void;
1836
+ /** Stop and drop every animation (elements keep their last frame). */
1837
+ cancel(): void;
1838
+ }
1839
+ /** Keyframe presets usable by name in `to()` and `data-tl`. */
1840
+ declare const TIMELINE_PRESETS: Record<string, Keyframe[]>;
1841
+ /** Resolve a position against the previous step and labels (pure). */
1842
+ declare function resolvePosition(pos: TimelinePosition | undefined, end: number, prevStart: number, labels?: Record<string, number>): number;
1843
+ /**
1844
+ * Choreograph animations on one clock: chain, overlap, label, seek, reverse and
1845
+ * scrub them with scroll. Built on WAAPI (paused animations driven by one
1846
+ * playhead); without WAAPI or under reduced motion it jumps to the end state.
1847
+ *
1848
+ * @example
1849
+ * const tl = timeline({ defaults: { duration: 500 } })
1850
+ * .to('.title', 'fade-up')
1851
+ * .label('cards')
1852
+ * .to('.card', 'scale', { stagger: 80, at: '-=200' })
1853
+ * .to('.cta', [{ opacity: 0 }, { opacity: 1 }], { at: 'cards+=400' });
1854
+ * tl.play(); // or tl.scrub(document.querySelector('.hero'))
1855
+ */
1856
+ declare function timeline(options?: TimelineOptions): Timeline;
1857
+
1858
+ /**
1859
+ * `<usa-timeline>` — declarative choreography. Every descendant with
1860
+ * `data-tl="<preset>"` becomes a step, in document order; `data-at`
1861
+ * (`'-=200'`, `'<'`, `'label+=100'`, ms), `data-duration` and `data-label`
1862
+ * fine-tune it.
1863
+ *
1864
+ * Attributes: `trigger` (`view` default · `click` · `manual`), `scrub`
1865
+ * (progress follows scroll instead of playing), `overlap` (ms each step
1866
+ * overlaps the previous, default 0), `duration` (600), `stagger` (ms),
1867
+ * `repeat` (replay every time it enters the viewport). Methods: `play()`,
1868
+ * `reverse()`, `seek(t)`; property `timeline`. Event `usa:complete`.
1869
+ * Reduced motion: steps appear in their final state.
1870
+ */
1871
+ interface UsaTimelineElement extends UsaElement {
1872
+ readonly timeline: Timeline | null;
1873
+ play(): Promise<void>;
1874
+ reverse(): Promise<void>;
1875
+ seek(to: number | string): void;
1876
+ }
1877
+ declare function defineTimeline(tag?: string): CustomElementConstructor | undefined;
1878
+
1879
+ /**
1880
+ * use-scroll-animate/components/timeline — choreography (v3.1).
1881
+ * `timeline()` chains, overlaps, labels, seeks, reverses and scroll-scrubs
1882
+ * WAAPI animations on one playhead; `<usa-timeline>` builds one from
1883
+ * `data-tl` children.
1884
+ */
1885
+
1886
+ /** Register every component of this category under its default tag. */
1887
+ declare function defineTimelineComponents(): void;
1888
+ declare global {
1889
+ interface HTMLElementTagNameMap {
1890
+ 'usa-timeline': UsaTimelineElement;
1891
+ }
1892
+ }
1893
+
1777
1894
  /** The component categories and their default tags. */
1778
1895
  declare const COMPONENT_CATEGORIES: {
1779
1896
  readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
@@ -1787,6 +1904,7 @@ declare const COMPONENT_CATEGORIES: {
1787
1904
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
1788
1905
  readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-tooltip", "usa-popover", "usa-badge", "usa-avatar-stack"];
1789
1906
  readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
1907
+ readonly timeline: readonly ["usa-timeline"];
1790
1908
  };
1791
1909
  type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
1792
1910
 
@@ -1796,5 +1914,5 @@ type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
1796
1914
  */
1797
1915
  declare function defineComponents(categories?: ComponentCategory[]): void;
1798
1916
 
1799
- export { AMBIENT_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, MORPH_ICONS, MOTION_SCALE, PAGE_EFFECTS, REVEAL_EFFECTS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, VARIANTS, adoptVariants, burst, confetti, configureComponents, connectedAnimation, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAurora, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCursor, defineDialog, defineDotNetwork, defineDoubleTap, defineDraggable, defineDrawer, defineFab, defineFeedbackComponents, defineFlipList, defineFullpage, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLike, defineLoadingBar, defineMagnetic, defineMarquee, defineMotionSwitch, defineNavbar, defineOverscroll, definePageComponents, defineParticles, definePhysicsComponents, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, easeOutExpo, enableMpaTransitions, flip, fluentPreset, getMotionIntensity, haptic, linearEasing, loadingBar, morphPath, pageTransition, prefersReducedMotion, projectInertia, readScrollProgress, resolveSpring, restoreMotionIntensity, revealKeyframes, rubberBand, scrambleFrame, scrollToTarget, setMotionIntensity, setVariant, shake, smoothScroll, snapTo, spring, springEasing, springEffectKeyframes, springSamples, stepSpring, supportsLinearEasing, supportsViewTransitions, themeTransition, toast, viewTransition };
1800
- export type { AmbientEffect, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, ConnectedOptions, CursorMode, DialogVariant, FlipOptions, FluentPresetOptions, MotionIntensity, PageEffect, PageTransitionOptions, Placement, RevealEffect, SmoothScrollOptions, SpinnerVariant, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringValue, SpringValueOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAuroraElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBlobsElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCursorElement, UsaDialogElement, UsaDotNetworkElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFlipListElement, UsaFullpageElement, UsaGlitchElement, UsaGradientTextElement, UsaGrainElement, UsaGridGlowElement, UsaHandwritingElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaParticlesElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollHighlightElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, UsaWaterRippleElement, UsaWaveTextElement, Variant, ViewTransitionOptions };
1917
+ export { AMBIENT_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, MORPH_ICONS, MOTION_SCALE, PAGE_EFFECTS, REVEAL_EFFECTS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, TIMELINE_PRESETS, VARIANTS, adoptVariants, burst, confetti, configureComponents, connectedAnimation, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAurora, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCursor, defineDialog, defineDotNetwork, defineDoubleTap, defineDraggable, defineDrawer, defineFab, defineFeedbackComponents, defineFlipList, defineFullpage, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLike, defineLoadingBar, defineMagnetic, defineMarquee, defineMotionSwitch, defineNavbar, defineOverscroll, definePageComponents, defineParticles, definePhysicsComponents, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineTimeline, defineTimelineComponents, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, easeOutExpo, enableMpaTransitions, flip, fluentPreset, getMotionIntensity, haptic, linearEasing, loadingBar, morphPath, pageTransition, prefersReducedMotion, projectInertia, readScrollProgress, resolvePosition, resolveSpring, restoreMotionIntensity, revealKeyframes, rubberBand, scrambleFrame, scrollToTarget, setMotionIntensity, setVariant, shake, smoothScroll, snapTo, spring, springEasing, springEffectKeyframes, springSamples, stepSpring, supportsLinearEasing, supportsViewTransitions, themeTransition, timeline, toast, viewTransition };
1918
+ export type { AmbientEffect, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, ConnectedOptions, CursorMode, DialogVariant, FlipOptions, FluentPresetOptions, MotionIntensity, PageEffect, PageTransitionOptions, Placement, RevealEffect, ScrubOptions, SmoothScrollOptions, SpinnerVariant, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringValue, SpringValueOptions, Timeline, TimelineOptions, TimelinePosition, TimelineStepOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAuroraElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBlobsElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCursorElement, UsaDialogElement, UsaDotNetworkElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFlipListElement, UsaFullpageElement, UsaGlitchElement, UsaGradientTextElement, UsaGrainElement, UsaGridGlowElement, UsaHandwritingElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaParticlesElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollHighlightElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaTimelineElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, UsaWaterRippleElement, UsaWaveTextElement, Variant, ViewTransitionOptions };
@@ -1774,6 +1774,123 @@ declare global {
1774
1774
  }
1775
1775
  }
1776
1776
 
1777
+ /**
1778
+ * Where a step starts on a timeline:
1779
+ * - a number: absolute time in ms
1780
+ * - `'>'` (default): when the previous step ends · `'<'`: when it starts
1781
+ * - `'+=200'` / `'-=200'`: after / overlapping the previous end
1782
+ * - `'<+=100'`: 100ms after the previous step's start
1783
+ * - `'intro'` / `'intro+=150'`: at (or relative to) a label
1784
+ */
1785
+ type TimelinePosition = number | string;
1786
+ interface TimelineStepOptions {
1787
+ /** Duration in ms (default: timeline default, 600). */
1788
+ duration?: number;
1789
+ /** CSS easing (default `cubic-bezier(0.22, 1, 0.36, 1)`). */
1790
+ easing?: string;
1791
+ /** Start position, see `TimelinePosition`. */
1792
+ at?: TimelinePosition;
1793
+ /** ms between targets when the selector matches several elements. */
1794
+ stagger?: number;
1795
+ }
1796
+ interface TimelineOptions {
1797
+ /** Defaults for every step. */
1798
+ defaults?: Pick<TimelineStepOptions, 'duration' | 'easing' | 'stagger'>;
1799
+ /** Playback rate (1 = normal). */
1800
+ speed?: number;
1801
+ /** Called after `play()` reaches the end (or the start when reversed). */
1802
+ onComplete?: () => void;
1803
+ /** Called on every frame with progress 0–1. */
1804
+ onUpdate?: (progress: number) => void;
1805
+ }
1806
+ interface ScrubOptions {
1807
+ /** Scroll offset (px) before the source's top reaches the viewport bottom where progress starts. */
1808
+ offset?: number;
1809
+ /** Smoothing 0–1 (0 = immediate, default 0). */
1810
+ smooth?: number;
1811
+ }
1812
+ interface Timeline {
1813
+ /** Total length in ms. */
1814
+ readonly duration: number;
1815
+ /** Label positions in ms. */
1816
+ readonly labels: Readonly<Record<string, number>>;
1817
+ /** Current playhead in ms. */
1818
+ readonly time: number;
1819
+ /** Add a step: animate `target` with keyframes or a preset name (`fade-up`, `scale`…). */
1820
+ to(target: string | Element | Element[] | NodeList, frames: Keyframe[] | string, options?: TimelineStepOptions): Timeline;
1821
+ /** Name a position (default: the current end). */
1822
+ label(name: string, at?: TimelinePosition): Timeline;
1823
+ /** Run `fn` when the playhead passes `at`. */
1824
+ call(fn: () => void, at?: TimelinePosition): Timeline;
1825
+ /** Play forwards from the playhead (from 0 when at the end). Resolves at the end. */
1826
+ play(from?: TimelinePosition): Promise<void>;
1827
+ /** Play backwards to 0. */
1828
+ reverse(): Promise<void>;
1829
+ pause(): Timeline;
1830
+ /** Jump to a time (ms) or label. */
1831
+ seek(to: TimelinePosition): Timeline;
1832
+ /** Get or set progress 0–1. */
1833
+ progress(p?: number): number;
1834
+ /** Tie progress to the scroll position of `source` (it moves through the viewport). Returns a stop function. */
1835
+ scrub(source: Element, options?: ScrubOptions): () => void;
1836
+ /** Stop and drop every animation (elements keep their last frame). */
1837
+ cancel(): void;
1838
+ }
1839
+ /** Keyframe presets usable by name in `to()` and `data-tl`. */
1840
+ declare const TIMELINE_PRESETS: Record<string, Keyframe[]>;
1841
+ /** Resolve a position against the previous step and labels (pure). */
1842
+ declare function resolvePosition(pos: TimelinePosition | undefined, end: number, prevStart: number, labels?: Record<string, number>): number;
1843
+ /**
1844
+ * Choreograph animations on one clock: chain, overlap, label, seek, reverse and
1845
+ * scrub them with scroll. Built on WAAPI (paused animations driven by one
1846
+ * playhead); without WAAPI or under reduced motion it jumps to the end state.
1847
+ *
1848
+ * @example
1849
+ * const tl = timeline({ defaults: { duration: 500 } })
1850
+ * .to('.title', 'fade-up')
1851
+ * .label('cards')
1852
+ * .to('.card', 'scale', { stagger: 80, at: '-=200' })
1853
+ * .to('.cta', [{ opacity: 0 }, { opacity: 1 }], { at: 'cards+=400' });
1854
+ * tl.play(); // or tl.scrub(document.querySelector('.hero'))
1855
+ */
1856
+ declare function timeline(options?: TimelineOptions): Timeline;
1857
+
1858
+ /**
1859
+ * `<usa-timeline>` — declarative choreography. Every descendant with
1860
+ * `data-tl="<preset>"` becomes a step, in document order; `data-at`
1861
+ * (`'-=200'`, `'<'`, `'label+=100'`, ms), `data-duration` and `data-label`
1862
+ * fine-tune it.
1863
+ *
1864
+ * Attributes: `trigger` (`view` default · `click` · `manual`), `scrub`
1865
+ * (progress follows scroll instead of playing), `overlap` (ms each step
1866
+ * overlaps the previous, default 0), `duration` (600), `stagger` (ms),
1867
+ * `repeat` (replay every time it enters the viewport). Methods: `play()`,
1868
+ * `reverse()`, `seek(t)`; property `timeline`. Event `usa:complete`.
1869
+ * Reduced motion: steps appear in their final state.
1870
+ */
1871
+ interface UsaTimelineElement extends UsaElement {
1872
+ readonly timeline: Timeline | null;
1873
+ play(): Promise<void>;
1874
+ reverse(): Promise<void>;
1875
+ seek(to: number | string): void;
1876
+ }
1877
+ declare function defineTimeline(tag?: string): CustomElementConstructor | undefined;
1878
+
1879
+ /**
1880
+ * use-scroll-animate/components/timeline — choreography (v3.1).
1881
+ * `timeline()` chains, overlaps, labels, seeks, reverses and scroll-scrubs
1882
+ * WAAPI animations on one playhead; `<usa-timeline>` builds one from
1883
+ * `data-tl` children.
1884
+ */
1885
+
1886
+ /** Register every component of this category under its default tag. */
1887
+ declare function defineTimelineComponents(): void;
1888
+ declare global {
1889
+ interface HTMLElementTagNameMap {
1890
+ 'usa-timeline': UsaTimelineElement;
1891
+ }
1892
+ }
1893
+
1777
1894
  /** The component categories and their default tags. */
1778
1895
  declare const COMPONENT_CATEGORIES: {
1779
1896
  readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
@@ -1787,6 +1904,7 @@ declare const COMPONENT_CATEGORIES: {
1787
1904
  readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
1788
1905
  readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-tooltip", "usa-popover", "usa-badge", "usa-avatar-stack"];
1789
1906
  readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
1907
+ readonly timeline: readonly ["usa-timeline"];
1790
1908
  };
1791
1909
  type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
1792
1910
 
@@ -1796,5 +1914,5 @@ type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
1796
1914
  */
1797
1915
  declare function defineComponents(categories?: ComponentCategory[]): void;
1798
1916
 
1799
- export { AMBIENT_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, MORPH_ICONS, MOTION_SCALE, PAGE_EFFECTS, REVEAL_EFFECTS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, VARIANTS, adoptVariants, burst, confetti, configureComponents, connectedAnimation, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAurora, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCursor, defineDialog, defineDotNetwork, defineDoubleTap, defineDraggable, defineDrawer, defineFab, defineFeedbackComponents, defineFlipList, defineFullpage, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLike, defineLoadingBar, defineMagnetic, defineMarquee, defineMotionSwitch, defineNavbar, defineOverscroll, definePageComponents, defineParticles, definePhysicsComponents, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, easeOutExpo, enableMpaTransitions, flip, fluentPreset, getMotionIntensity, haptic, linearEasing, loadingBar, morphPath, pageTransition, prefersReducedMotion, projectInertia, readScrollProgress, resolveSpring, restoreMotionIntensity, revealKeyframes, rubberBand, scrambleFrame, scrollToTarget, setMotionIntensity, setVariant, shake, smoothScroll, snapTo, spring, springEasing, springEffectKeyframes, springSamples, stepSpring, supportsLinearEasing, supportsViewTransitions, themeTransition, toast, viewTransition };
1800
- export type { AmbientEffect, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, ConnectedOptions, CursorMode, DialogVariant, FlipOptions, FluentPresetOptions, MotionIntensity, PageEffect, PageTransitionOptions, Placement, RevealEffect, SmoothScrollOptions, SpinnerVariant, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringValue, SpringValueOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAuroraElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBlobsElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCursorElement, UsaDialogElement, UsaDotNetworkElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFlipListElement, UsaFullpageElement, UsaGlitchElement, UsaGradientTextElement, UsaGrainElement, UsaGridGlowElement, UsaHandwritingElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaParticlesElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollHighlightElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, UsaWaterRippleElement, UsaWaveTextElement, Variant, ViewTransitionOptions };
1917
+ export { AMBIENT_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, MORPH_ICONS, MOTION_SCALE, PAGE_EFFECTS, REVEAL_EFFECTS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, TIMELINE_PRESETS, VARIANTS, adoptVariants, burst, confetti, configureComponents, connectedAnimation, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAurora, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCursor, defineDialog, defineDotNetwork, defineDoubleTap, defineDraggable, defineDrawer, defineFab, defineFeedbackComponents, defineFlipList, defineFullpage, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLike, defineLoadingBar, defineMagnetic, defineMarquee, defineMotionSwitch, defineNavbar, defineOverscroll, definePageComponents, defineParticles, definePhysicsComponents, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineTimeline, defineTimelineComponents, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, easeOutExpo, enableMpaTransitions, flip, fluentPreset, getMotionIntensity, haptic, linearEasing, loadingBar, morphPath, pageTransition, prefersReducedMotion, projectInertia, readScrollProgress, resolvePosition, resolveSpring, restoreMotionIntensity, revealKeyframes, rubberBand, scrambleFrame, scrollToTarget, setMotionIntensity, setVariant, shake, smoothScroll, snapTo, spring, springEasing, springEffectKeyframes, springSamples, stepSpring, supportsLinearEasing, supportsViewTransitions, themeTransition, timeline, toast, viewTransition };
1918
+ export type { AmbientEffect, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, ConnectedOptions, CursorMode, DialogVariant, FlipOptions, FluentPresetOptions, MotionIntensity, PageEffect, PageTransitionOptions, Placement, RevealEffect, ScrubOptions, SmoothScrollOptions, SpinnerVariant, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringValue, SpringValueOptions, Timeline, TimelineOptions, TimelinePosition, TimelineStepOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAuroraElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBlobsElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCursorElement, UsaDialogElement, UsaDotNetworkElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFlipListElement, UsaFullpageElement, UsaGlitchElement, UsaGradientTextElement, UsaGrainElement, UsaGridGlowElement, UsaHandwritingElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaParticlesElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollHighlightElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaTimelineElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, UsaWaterRippleElement, UsaWaveTextElement, Variant, ViewTransitionOptions };