use-scroll-animate 2.9.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.
- package/CHANGELOG.md +34 -0
- package/README.md +4 -3
- package/README_ja.md +1 -0
- package/README_zh.md +2 -1
- package/dist/chunks/{base-BkQcvoSG.cjs → base-CXx7jZ-o.cjs} +4 -23
- package/dist/chunks/{base-BkQcvoSG.cjs.map → base-CXx7jZ-o.cjs.map} +1 -1
- package/dist/chunks/{base-CB8gChoe.js → base-Cu-86Z31.js} +5 -24
- package/dist/chunks/{base-CB8gChoe.js.map → base-Cu-86Z31.js.map} +1 -1
- package/dist/chunks/{core-J_KM443q.js → core-mV_TPgG_.js} +2 -52
- package/dist/chunks/core-mV_TPgG_.js.map +1 -0
- package/dist/chunks/{core-C1cEwjJj.cjs → core-qpECfEkb.cjs} +2 -52
- package/dist/chunks/core-qpECfEkb.cjs.map +1 -0
- package/dist/chunks/{index-tags-f37txHmb.js → index-tags-D7NynL4r.js} +2 -1
- package/dist/chunks/{index-tags-f37txHmb.js.map → index-tags-D7NynL4r.js.map} +1 -1
- package/dist/chunks/{index-tags-BEM98giN.cjs → index-tags-Gw1G06Pb.cjs} +2 -1
- package/dist/chunks/{index-tags-BEM98giN.cjs.map → index-tags-Gw1G06Pb.cjs.map} +1 -1
- package/dist/chunks/{spring-7U9MC6yQ.cjs → spring-2OTnYCzm.cjs} +2 -2
- package/dist/chunks/{spring-7U9MC6yQ.cjs.map → spring-2OTnYCzm.cjs.map} +1 -1
- package/dist/chunks/{spring-ka0YJ_ZR.js → spring-BV-cpTHC.js} +2 -2
- package/dist/chunks/{spring-ka0YJ_ZR.js.map → spring-BV-cpTHC.js.map} +1 -1
- package/dist/chunks/{stagger-CGF18oNs.js → stagger-BFAhKknX.js} +2 -2
- package/dist/chunks/{stagger-CGF18oNs.js.map → stagger-BFAhKknX.js.map} +1 -1
- package/dist/chunks/{stagger-DtKKS6GP.cjs → stagger-CLc3j58T.cjs} +2 -2
- package/dist/chunks/{stagger-DtKKS6GP.cjs.map → stagger-CLc3j58T.cjs.map} +1 -1
- package/dist/chunks/{variants-PsCXbQ5h.cjs → variants-BNIrn4ch.cjs} +2 -2
- package/dist/chunks/{variants-PsCXbQ5h.cjs.map → variants-BNIrn4ch.cjs.map} +1 -1
- package/dist/chunks/{variants-Ce9CboVc.js → variants-BQ3gCb5L.js} +2 -2
- package/dist/chunks/{variants-Ce9CboVc.js.map → variants-BQ3gCb5L.js.map} +1 -1
- package/dist/components/background.cjs +3 -3
- package/dist/components/background.cjs.map +1 -1
- package/dist/components/background.css +1 -1
- package/dist/components/background.d.cts +1 -1
- package/dist/components/background.d.ts +1 -1
- package/dist/components/background.js +4 -4
- package/dist/components/background.js.map +1 -1
- package/dist/components/cards.cjs +2 -2
- package/dist/components/cards.js +3 -3
- package/dist/components/click.cjs +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/feedback.cjs +9 -16
- package/dist/components/feedback.cjs.map +1 -1
- package/dist/components/feedback.css +2 -2
- package/dist/components/feedback.d.cts +2 -4
- package/dist/components/feedback.d.ts +2 -4
- package/dist/components/feedback.js +10 -17
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/interaction.cjs +1 -1
- package/dist/components/interaction.js +2 -2
- package/dist/components/jsx.d.cts +1 -0
- package/dist/components/jsx.d.ts +1 -0
- package/dist/components/lazy.cjs +2 -1
- package/dist/components/lazy.cjs.map +1 -1
- package/dist/components/lazy.d.cts +1 -0
- package/dist/components/lazy.d.ts +1 -0
- package/dist/components/lazy.js +2 -1
- package/dist/components/lazy.js.map +1 -1
- package/dist/components/page.cjs +2 -2
- package/dist/components/page.js +3 -3
- package/dist/components/physics.cjs +2 -2
- package/dist/components/physics.js +4 -4
- package/dist/components/react.cjs +1 -1
- package/dist/components/react.js +1 -1
- package/dist/components/reveal.cjs +1 -1
- package/dist/components/reveal.js +2 -2
- package/dist/components/text.cjs +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/timeline.cjs +303 -0
- package/dist/components/timeline.cjs.map +1 -0
- package/dist/components/timeline.css +3 -0
- package/dist/components/timeline.d.cts +164 -0
- package/dist/components/timeline.d.ts +164 -0
- package/dist/components/timeline.js +296 -0
- package/dist/components/timeline.js.map +1 -0
- package/dist/components/transitions.cjs +7 -7
- package/dist/components/transitions.cjs.map +1 -1
- package/dist/components/transitions.d.cts +1 -1
- package/dist/components/transitions.d.ts +1 -1
- package/dist/components/transitions.js +8 -8
- package/dist/components/transitions.js.map +1 -1
- package/dist/components/ui.cjs +3 -3
- package/dist/components/ui.js +5 -5
- package/dist/components/vue.cjs +5 -4
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.d.cts +91 -6
- package/dist/components/vue.d.ts +91 -6
- package/dist/components/vue.js +5 -4
- package/dist/components/vue.js.map +1 -1
- package/dist/components.cjs +11 -4
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +4 -3
- package/dist/components.d.cts +124 -8
- package/dist/components.d.ts +124 -8
- package/dist/components.js +10 -7
- package/dist/components.js.map +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/element.cjs +2 -3
- package/dist/element.cjs.map +1 -1
- package/dist/element.d.cts +4 -19
- package/dist/element.d.ts +4 -19
- package/dist/element.js +2 -3
- package/dist/element.js.map +1 -1
- package/dist/element.umd.js +1 -1
- package/dist/element.umd.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -19
- package/dist/index.d.ts +4 -19
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/react.cjs +3 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +3 -18
- package/dist/react.d.ts +3 -18
- package/dist/react.js +3 -3
- package/dist/react.js.map +1 -1
- package/dist/solid.cjs +2 -2
- package/dist/solid.d.cts +3 -18
- package/dist/solid.d.ts +3 -18
- package/dist/solid.js +2 -2
- package/dist/svelte.cjs +2 -2
- package/dist/svelte.d.cts +3 -18
- package/dist/svelte.d.ts +3 -18
- package/dist/svelte.js +2 -2
- package/dist/vue.cjs +3 -3
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +3 -18
- package/dist/vue.d.ts +3 -18
- package/dist/vue.js +3 -3
- package/dist/vue.js.map +1 -1
- package/docs/API.md +1 -2
- package/docs/components.md +12 -3
- package/docs/upgrading-3.md +1 -0
- package/package.json +14 -3
- package/dist/chunks/core-C1cEwjJj.cjs.map +0 -1
- package/dist/chunks/core-J_KM443q.js.map +0 -1
package/dist/components/ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-
|
|
3
|
-
import { d as springEasing, c as createSpring, p as projectInertia, s as snapTo, a as rubberBand } from '../chunks/spring-
|
|
4
|
-
import { a as adoptVariants } from '../chunks/variants-
|
|
5
|
-
export { V as VARIANTS, s as setVariant } from '../chunks/variants-
|
|
1
|
+
import { h as defineElement, f as clamp, d as caf, r as raf } from '../chunks/base-Cu-86Z31.js';
|
|
2
|
+
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-Cu-86Z31.js';
|
|
3
|
+
import { d as springEasing, c as createSpring, p as projectInertia, s as snapTo, a as rubberBand } from '../chunks/spring-BV-cpTHC.js';
|
|
4
|
+
import { a as adoptVariants } from '../chunks/variants-BQ3gCb5L.js';
|
|
5
|
+
export { V as VARIANTS, s as setVariant } from '../chunks/variants-BQ3gCb5L.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) {
|
package/dist/components/vue.cjs
CHANGED
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
var components = require('../components.cjs');
|
|
4
4
|
require('./reveal.cjs');
|
|
5
|
-
require('../chunks/base-
|
|
5
|
+
require('../chunks/base-CXx7jZ-o.cjs');
|
|
6
6
|
require('./text.cjs');
|
|
7
7
|
require('./interaction.cjs');
|
|
8
8
|
require('./feedback.cjs');
|
|
9
9
|
require('./background.cjs');
|
|
10
|
-
require('../chunks/variants-
|
|
10
|
+
require('../chunks/variants-BNIrn4ch.cjs');
|
|
11
11
|
require('./transitions.cjs');
|
|
12
12
|
require('./physics.cjs');
|
|
13
|
-
require('../chunks/spring-
|
|
13
|
+
require('../chunks/spring-2OTnYCzm.cjs');
|
|
14
14
|
require('./cards.cjs');
|
|
15
15
|
require('./click.cjs');
|
|
16
16
|
require('./ui.cjs');
|
|
17
17
|
require('./page.cjs');
|
|
18
|
-
require('
|
|
18
|
+
require('./timeline.cjs');
|
|
19
|
+
require('../chunks/index-tags-Gw1G06Pb.cjs');
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* 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":"
|
|
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;;;;;;"}
|
|
@@ -353,7 +353,7 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
353
353
|
* `<usa-spinner>` — indeterminate loading indicators, pure CSS animations
|
|
354
354
|
* of `transform` / `opacity` (plus an SVG stroke for `fluent`).
|
|
355
355
|
*
|
|
356
|
-
* Kinds (`kind
|
|
356
|
+
* Kinds (`kind`): `fluent` (default — the WinUI / Windows 11
|
|
357
357
|
* ProgressRing arc), `windows` (the Windows 10 boot "orbiting dots"),
|
|
358
358
|
* `ring` (classic border spinner), `dots` (three bouncing dots / typing
|
|
359
359
|
* indicator), `pulse` (expanding ripple), `bars` (equalizer).
|
|
@@ -365,8 +365,6 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
365
365
|
interface UsaSpinnerElement extends UsaElement {
|
|
366
366
|
/** Spinner kind (`kind` attribute). */
|
|
367
367
|
kind: SpinnerVariant;
|
|
368
|
-
/** @deprecated alias of `kind`, removed in 3.0. */
|
|
369
|
-
variant: SpinnerVariant;
|
|
370
368
|
}
|
|
371
369
|
|
|
372
370
|
/**
|
|
@@ -439,7 +437,7 @@ interface UsaToasterElement extends UsaElement {
|
|
|
439
437
|
* `<usa-check>` — an animated result icon: the circle draws itself, then the
|
|
440
438
|
* check mark (or cross / exclamation) strokes in with a little pop.
|
|
441
439
|
*
|
|
442
|
-
* Attributes: `
|
|
440
|
+
* Attributes: `kind` (`success` default, `error`, `warning`), `size`
|
|
443
441
|
* (px, 56), `start` (`view` default | `load` | `manual`), `label`
|
|
444
442
|
* (accessible name, e.g. "Payment complete"; the icon is decorative
|
|
445
443
|
* without it). Event: `usa:complete`. Reduced motion: drawn instantly.
|
|
@@ -527,7 +525,7 @@ interface UsaMarqueeElement extends UsaElement {
|
|
|
527
525
|
* tints from `--usa-mica-source`, a gradient you control). Optional
|
|
528
526
|
* `shimmer` adds a light sweep when it appears or on hover.
|
|
529
527
|
*
|
|
530
|
-
* Attributes: `kind` (`acrylic` default | `mica
|
|
528
|
+
* Attributes: `kind` (`acrylic` default | `mica`), `tint` (colour),
|
|
531
529
|
* `tint-opacity` (0–1, 0.55), `blur` (px, 30), `shimmer`
|
|
532
530
|
* (`hover` | `load` | `none`, default `none`). Falls back to a solid tint
|
|
533
531
|
* without `backdrop-filter` and under `prefers-reduced-transparency` or
|
|
@@ -594,7 +592,7 @@ declare global {
|
|
|
594
592
|
* React / Vue / Svelte keep owning them). Style with `::part(panel)`,
|
|
595
593
|
* `::part(backdrop)` and the `--usa-dialog-*` custom properties.
|
|
596
594
|
*
|
|
597
|
-
* Attributes: `open` (reflects; set/remove to open/close), `
|
|
595
|
+
* Attributes: `open` (reflects; set/remove to open/close), `kind`
|
|
598
596
|
* (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`
|
|
599
597
|
* slide from the side, `drawer-bottom` / `sheet` from below), `label`
|
|
600
598
|
* (accessible name), `no-backdrop-close`, `no-esc`. Elements inside
|
|
@@ -1290,6 +1288,92 @@ declare global {
|
|
|
1290
1288
|
}
|
|
1291
1289
|
}
|
|
1292
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
|
+
|
|
1293
1377
|
/** The component categories and their default tags. */
|
|
1294
1378
|
declare const COMPONENT_CATEGORIES: {
|
|
1295
1379
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
@@ -1303,6 +1387,7 @@ declare const COMPONENT_CATEGORIES: {
|
|
|
1303
1387
|
readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
|
|
1304
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"];
|
|
1305
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"];
|
|
1306
1391
|
};
|
|
1307
1392
|
type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
|
|
1308
1393
|
|
package/dist/components/vue.d.ts
CHANGED
|
@@ -353,7 +353,7 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
353
353
|
* `<usa-spinner>` — indeterminate loading indicators, pure CSS animations
|
|
354
354
|
* of `transform` / `opacity` (plus an SVG stroke for `fluent`).
|
|
355
355
|
*
|
|
356
|
-
* Kinds (`kind
|
|
356
|
+
* Kinds (`kind`): `fluent` (default — the WinUI / Windows 11
|
|
357
357
|
* ProgressRing arc), `windows` (the Windows 10 boot "orbiting dots"),
|
|
358
358
|
* `ring` (classic border spinner), `dots` (three bouncing dots / typing
|
|
359
359
|
* indicator), `pulse` (expanding ripple), `bars` (equalizer).
|
|
@@ -365,8 +365,6 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
365
365
|
interface UsaSpinnerElement extends UsaElement {
|
|
366
366
|
/** Spinner kind (`kind` attribute). */
|
|
367
367
|
kind: SpinnerVariant;
|
|
368
|
-
/** @deprecated alias of `kind`, removed in 3.0. */
|
|
369
|
-
variant: SpinnerVariant;
|
|
370
368
|
}
|
|
371
369
|
|
|
372
370
|
/**
|
|
@@ -439,7 +437,7 @@ interface UsaToasterElement extends UsaElement {
|
|
|
439
437
|
* `<usa-check>` — an animated result icon: the circle draws itself, then the
|
|
440
438
|
* check mark (or cross / exclamation) strokes in with a little pop.
|
|
441
439
|
*
|
|
442
|
-
* Attributes: `
|
|
440
|
+
* Attributes: `kind` (`success` default, `error`, `warning`), `size`
|
|
443
441
|
* (px, 56), `start` (`view` default | `load` | `manual`), `label`
|
|
444
442
|
* (accessible name, e.g. "Payment complete"; the icon is decorative
|
|
445
443
|
* without it). Event: `usa:complete`. Reduced motion: drawn instantly.
|
|
@@ -527,7 +525,7 @@ interface UsaMarqueeElement extends UsaElement {
|
|
|
527
525
|
* tints from `--usa-mica-source`, a gradient you control). Optional
|
|
528
526
|
* `shimmer` adds a light sweep when it appears or on hover.
|
|
529
527
|
*
|
|
530
|
-
* Attributes: `kind` (`acrylic` default | `mica
|
|
528
|
+
* Attributes: `kind` (`acrylic` default | `mica`), `tint` (colour),
|
|
531
529
|
* `tint-opacity` (0–1, 0.55), `blur` (px, 30), `shimmer`
|
|
532
530
|
* (`hover` | `load` | `none`, default `none`). Falls back to a solid tint
|
|
533
531
|
* without `backdrop-filter` and under `prefers-reduced-transparency` or
|
|
@@ -594,7 +592,7 @@ declare global {
|
|
|
594
592
|
* React / Vue / Svelte keep owning them). Style with `::part(panel)`,
|
|
595
593
|
* `::part(backdrop)` and the `--usa-dialog-*` custom properties.
|
|
596
594
|
*
|
|
597
|
-
* Attributes: `open` (reflects; set/remove to open/close), `
|
|
595
|
+
* Attributes: `open` (reflects; set/remove to open/close), `kind`
|
|
598
596
|
* (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`
|
|
599
597
|
* slide from the side, `drawer-bottom` / `sheet` from below), `label`
|
|
600
598
|
* (accessible name), `no-backdrop-close`, `no-esc`. Elements inside
|
|
@@ -1290,6 +1288,92 @@ declare global {
|
|
|
1290
1288
|
}
|
|
1291
1289
|
}
|
|
1292
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
|
+
|
|
1293
1377
|
/** The component categories and their default tags. */
|
|
1294
1378
|
declare const COMPONENT_CATEGORIES: {
|
|
1295
1379
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
@@ -1303,6 +1387,7 @@ declare const COMPONENT_CATEGORIES: {
|
|
|
1303
1387
|
readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
|
|
1304
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"];
|
|
1305
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"];
|
|
1306
1391
|
};
|
|
1307
1392
|
type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
|
|
1308
1393
|
|
package/dist/components/vue.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { defineComponents } from '../components.js';
|
|
2
2
|
import './reveal.js';
|
|
3
|
-
import '../chunks/base-
|
|
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-
|
|
8
|
+
import '../chunks/variants-BQ3gCb5L.js';
|
|
9
9
|
import './transitions.js';
|
|
10
10
|
import './physics.js';
|
|
11
|
-
import '../chunks/spring-
|
|
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 '
|
|
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":"
|
|
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;;;;;"}
|
package/dist/components.cjs
CHANGED
|
@@ -11,10 +11,11 @@ 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
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
14
|
+
var components_timeline = require('./components/timeline.cjs');
|
|
15
|
+
var variants = require('./chunks/variants-BNIrn4ch.cjs');
|
|
16
|
+
var base = require('./chunks/base-CXx7jZ-o.cjs');
|
|
17
|
+
var indexTags = require('./chunks/index-tags-Gw1G06Pb.cjs');
|
|
18
|
+
var spring = require('./chunks/spring-2OTnYCzm.cjs');
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* use-scroll-animate/components
|
|
@@ -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;
|
package/dist/components.cjs.map
CHANGED
|
@@ -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":"
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/components.css
CHANGED
|
@@ -15,12 +15,12 @@ usa-ripple{position:relative;display:inline-block;overflow:hidden;isolation:isol
|
|
|
15
15
|
usa-spotlight{display:block;--usa-spot-size:160px;--usa-spot-color:rgb(255 255 255 / 0.55);--usa-spot-border:1px}usa-spotlight .usa-spotlight-item{position:relative;isolation:isolate}usa-spotlight .usa-spotlight-item::before,usa-spotlight .usa-spotlight-item::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity 0.25s ease}usa-spotlight .usa-spotlight-item::before{padding:var(--usa-spot-border);background:radial-gradient(var(--usa-spot-size) circle at var(--usa-spot-x,-999px) var(--usa-spot-y,-999px),var(--usa-spot-color),transparent 70%);-webkit-mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}usa-spotlight .usa-spotlight-item::after{z-index:-1;background:radial-gradient(calc(var(--usa-spot-size) * 0.9) circle at var(--usa-spot-x,-999px) var(--usa-spot-y,-999px),color-mix(in srgb,var(--usa-spot-color) 30%,transparent),transparent 70%)}usa-spotlight[data-lit] .usa-spotlight-item::before{opacity:1}usa-spotlight[data-lit] .usa-spotlight-item:hover::after{opacity:1}usa-spotlight[no-fill] .usa-spotlight-item::after{display:none}
|
|
16
16
|
usa-tilt{display:block;position:relative;transform-style:preserve-3d;transition:transform 0.5s cubic-bezier(0.22,1,0.36,1);will-change:transform}usa-tilt[data-active]{transition-duration:0.12s}usa-tilt .usa-tilt-glare{position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity 0.3s ease;background:radial-gradient(circle at var(--usa-glare-x,50%) var(--usa-glare-y,50%),rgb(255 255 255 / 0.35),transparent 55%);mix-blend-mode:soft-light}usa-tilt[data-active] .usa-tilt-glare{opacity:1}
|
|
17
17
|
usa-toggle{--usa-toggle-w:40px;--usa-toggle-h:20px;--usa-toggle-on:var(--usa-accent,#7c5cff);--usa-toggle-off:transparent;--usa-toggle-line:currentColor;display:inline-flex;align-items:center;gap:0.6em;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;vertical-align:middle}usa-toggle[disabled]{cursor:not-allowed;opacity:0.45}usa-toggle .usa-toggle-track{position:relative;flex:none;width:var(--usa-toggle-w);height:var(--usa-toggle-h);border-radius:999px;box-sizing:border-box;border:1px solid color-mix(in srgb,var(--usa-toggle-line) 60%,transparent);background:var(--usa-toggle-off);transition:background-color 0.2s ease,border-color 0.2s ease}usa-toggle .usa-toggle-knob{position:absolute;top:50%;left:3px;width:calc(var(--usa-toggle-h) - 8px);height:calc(var(--usa-toggle-h) - 8px);margin-top:calc((var(--usa-toggle-h) - 8px) / -2);border-radius:999px;background:color-mix(in srgb,var(--usa-toggle-line) 75%,transparent);transform-origin:left center;transition:transform 0.28s cubic-bezier(0.34,1.4,0.64,1),background-color 0.2s ease}usa-toggle:hover .usa-toggle-knob{transform:scale(1.15)}usa-toggle[data-pressed] .usa-toggle-knob{transform:scaleX(1.45)}usa-toggle[checked] .usa-toggle-track{background:var(--usa-toggle-on);border-color:var(--usa-toggle-on)}usa-toggle[checked] .usa-toggle-knob{background:#fff;transform:translateX(calc(var(--usa-toggle-w) - var(--usa-toggle-h)));transform-origin:right center}usa-toggle[checked]:hover .usa-toggle-knob{transform:translateX(calc(var(--usa-toggle-w) - var(--usa-toggle-h))) scale(1.15)}usa-toggle[checked][data-pressed] .usa-toggle-knob{transform:translateX(calc(var(--usa-toggle-w) - var(--usa-toggle-h) - 4px)) scaleX(1.45)}usa-toggle:focus-visible{outline:none}usa-toggle:focus-visible .usa-toggle-track{outline:2px solid var(--usa-toggle-on);outline-offset:2px}
|
|
18
|
-
usa-check{--usa-check-size:56px;--usa-check-color:#0f9d58;display:inline-block;width:var(--usa-check-size);height:var(--usa-check-size);vertical-align:middle}usa-check[data-
|
|
18
|
+
usa-check{--usa-check-size:56px;--usa-check-color:#0f9d58;display:inline-block;width:var(--usa-check-size);height:var(--usa-check-size);vertical-align:middle}usa-check[data-kind="error"]{--usa-check-color:#d13438}usa-check[data-kind="warning"]{--usa-check-color:#c19c00}usa-check svg{width:100%;height:100%;overflow:visible}usa-check circle,usa-check path{fill:none;stroke:var(--usa-check-color);stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 1}usa-check[data-state="idle"] circle,usa-check[data-state="idle"] path{stroke-dashoffset:1}usa-check[data-state="done"] circle,usa-check[data-state="done"] path{stroke-dashoffset:0}
|
|
19
19
|
usa-progress{--usa-progress-color:var(--usa-accent,#7c5cff);--usa-progress-track:color-mix(in srgb,currentColor 14%,transparent);position:relative;display:block;height:var(--usa-progress-height,4px);border-radius:999px;overflow:hidden;background:var(--usa-progress-track);contain:paint}usa-progress .usa-progress-bar{position:absolute;inset:0;border-radius:inherit;background:var(--usa-progress-color);transform:scaleX(0);transform-origin:0 50%;transition:transform 0.45s cubic-bezier(0.22,1,0.36,1)}usa-progress .usa-progress-bar2{display:none}usa-progress[data-indeterminate] .usa-progress-bar{right:auto;width:40%;transform:translateX(-100%);transition:none;animation:usa-indet 2s cubic-bezier(0.4,0,0.6,1) infinite}usa-progress[data-indeterminate] .usa-progress-bar2{display:block;width:60%;animation:usa-indet2 2s cubic-bezier(0.4,0,0.6,1) 1s infinite}usa-progress[state="paused"]{--usa-progress-color:#c19c00}usa-progress[state="error"]{--usa-progress-color:#d13438}usa-progress[state="paused"] .usa-progress-bar,usa-progress[state="error"] .usa-progress-bar{animation-play-state:paused}@keyframes usa-indet{from{transform:translateX(-100%)}to{transform:translateX(250%)}}@keyframes usa-indet2{from{transform:translateX(-100%)}to{transform:translateX(167%)}}@media (prefers-reduced-motion:reduce){usa-progress .usa-progress-bar{transition:none}usa-progress[data-indeterminate] .usa-progress-bar{width:100%;transform:none;animation:usa-calm-bar 2.4s ease-in-out infinite}usa-progress[data-indeterminate] .usa-progress-bar2{display:none}}@keyframes usa-calm-bar{0%,100%{opacity:1}50%{opacity:0.4}}
|
|
20
20
|
usa-skeleton{display:block;--usa-skeleton-base:color-mix(in srgb,currentColor 10%,transparent);--usa-skeleton-shine:color-mix(in srgb,currentColor 9%,transparent);--usa-skeleton-radius:8px}usa-skeleton[loading]>:not(.usa-skeleton-ph){display:none !important}usa-skeleton .usa-skeleton-ph{display:flex;gap:14px;align-items:flex-start}usa-skeleton .usa-bone-lines{flex:1;display:grid;gap:10px;min-width:0}usa-skeleton .usa-bone{position:relative;display:block;overflow:hidden;height:0.9em;border-radius:var(--usa-skeleton-radius);background:var(--usa-skeleton-base)}usa-skeleton .usa-bone-last{width:62%}usa-skeleton .usa-bone-block{height:120px}usa-skeleton .usa-bone-circle{border-radius:50%;flex:none}usa-skeleton .usa-bone-avatar{width:44px;height:44px}usa-skeleton .usa-bone::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,var(--usa-skeleton-shine),transparent);animation:usa-skeleton 1.5s ease-in-out infinite}@keyframes usa-skeleton{to{transform:translateX(100%)}}@media (prefers-reduced-motion:reduce){usa-skeleton .usa-bone::after{animation:none}}
|
|
21
|
-
usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-
|
|
21
|
+
usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-kind="windows"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-kind="windows"] i::after{content:"";position:absolute;left:50%;top:0;width:12%;height:12%;margin-left:-6%;border-radius:50%;background:currentColor}usa-spinner[data-kind="windows"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-kind="windows"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-kind="windows"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-kind="windows"] i:nth-child(5){animation-delay:960ms;--n:4}@keyframes usa-orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%,100%{transform:rotate(945deg);opacity:0}}usa-spinner[data-kind="ring"] i{inset:0;border-radius:50%;border:calc(var(--usa-spinner-size) / 9) solid color-mix(in srgb,currentColor 20%,transparent);border-top-color:currentColor;animation:usa-spin 0.8s linear infinite}usa-spinner[data-kind="dots"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-kind="dots"] i{position:static;width:22%;aspect-ratio:1;border-radius:50%;background:currentColor;animation:usa-dot 1.2s ease-in-out infinite}usa-spinner[data-kind="dots"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-kind="dots"] i:nth-child(3){animation-delay:0.3s}@keyframes usa-dot{0%,60%,100%{transform:translateY(0);opacity:0.35}30%{transform:translateY(-70%);opacity:1}}usa-spinner[data-kind="pulse"] i{inset:0;border-radius:50%;background:currentColor;opacity:0;animation:usa-pulse 1.6s cubic-bezier(0.22,1,0.36,1) infinite}usa-spinner[data-kind="pulse"] i:nth-child(2){animation-delay:0.8s}@keyframes usa-pulse{from{transform:scale(0.1);opacity:0.8}to{transform:scale(1);opacity:0}}usa-spinner[data-kind="bars"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-kind="bars"] i{position:static;width:16%;height:100%;border-radius:2px;background:currentColor;transform:scaleY(0.35);animation:usa-bar 1s ease-in-out infinite}usa-spinner[data-kind="bars"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-kind="bars"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-kind="bars"] i:nth-child(4){animation-delay:0.36s}@keyframes usa-bar{0%,100%{transform:scaleY(0.35)}40%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){usa-spinner svg,usa-spinner i,usa-spinner i::after{animation:usa-calm 2.4s ease-in-out infinite !important}usa-spinner[data-kind="windows"] i{transform:rotate(calc(var(--n,0) * 72deg))}usa-spinner svg circle{animation:none;stroke-dasharray:30 100}}@keyframes usa-calm{0%,100%{opacity:1}50%{opacity:0.4}}
|
|
22
22
|
usa-toaster{position:fixed;z-index:2147483000;right:16px;bottom:16px;display:flex;flex-direction:column;gap:10px;width:min(360px,calc(100vw - 32px));pointer-events:none}usa-toaster[position^="top"]{bottom:auto;top:16px}usa-toaster[position$="left"]{right:auto;left:16px}usa-toaster[position$="center"]{right:auto;left:50%;translate:-50% 0}usa-toaster .usa-toast{--usa-toast-accent:#0078d4;pointer-events:auto;display:flex;align-items:flex-start;gap:10px;padding:12px 12px 12px 14px;border-radius:10px;background:var(--usa-toast-bg,color-mix(in srgb,Canvas 92%,transparent));color:var(--usa-toast-fg,CanvasText);border:1px solid color-mix(in srgb,CanvasText 12%,transparent);border-left:3px solid var(--usa-toast-accent);box-shadow:0 8px 28px -8px rgb(0 0 0 / 0.35);font:inherit;font-size:14px;line-height:1.4;-webkit-backdrop-filter:blur(20px) saturate(1.4);backdrop-filter:blur(20px) saturate(1.4)}usa-toaster .usa-toast[data-type="success"]{--usa-toast-accent:#0f9d58}usa-toaster .usa-toast[data-type="warning"]{--usa-toast-accent:#c19c00}usa-toaster .usa-toast[data-type="error"]{--usa-toast-accent:#d13438}usa-toaster .usa-toast-icon{flex:none;width:20px;height:20px;fill:none;stroke:var(--usa-toast-accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}usa-toaster .usa-toast-msg{flex:1;min-width:0;padding-top:1px;overflow-wrap:anywhere}usa-toaster .usa-toast-action,usa-toaster .usa-toast-close{flex:none;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;border-radius:6px;padding:2px 6px}usa-toaster .usa-toast-action{color:var(--usa-toast-accent);font-weight:600}usa-toaster .usa-toast-close{opacity:0.6;line-height:0;padding:3px}usa-toaster .usa-toast-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}usa-toaster .usa-toast-action:hover,usa-toaster .usa-toast-close:hover{background:color-mix(in srgb,currentColor 10%,transparent);opacity:1}
|
|
23
|
-
usa-acrylic{--usa-acrylic-tint:#f3f3f3;--usa-acrylic-opacity:55%;--usa-acrylic-blur:30px;position:relative;display:block;isolation:isolate;overflow:hidden;background-color:color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent);-webkit-backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);border:1px solid color-mix(in srgb,#fff 22%,transparent)}@media (prefers-color-scheme:dark){usa-acrylic{--usa-acrylic-tint:#2c2c2c}}usa-acrylic::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0.035;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}usa-acrylic::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;transform:translateX(-120%);background:linear-gradient(105deg,transparent 30%,rgb(255 255 255 / 0.28) 50%,transparent 70%)}usa-acrylic[shimmer="hover"]:hover::after,usa-acrylic[data-shine]::after{animation:usa-acrylic-shine 1.1s cubic-bezier(0.22,1,0.36,1) both}@keyframes usa-acrylic-shine{from{transform:translateX(-120%)}to{transform:translateX(120%)}}usa-acrylic
|
|
23
|
+
usa-acrylic{--usa-acrylic-tint:#f3f3f3;--usa-acrylic-opacity:55%;--usa-acrylic-blur:30px;position:relative;display:block;isolation:isolate;overflow:hidden;background-color:color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent);-webkit-backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);border:1px solid color-mix(in srgb,#fff 22%,transparent)}@media (prefers-color-scheme:dark){usa-acrylic{--usa-acrylic-tint:#2c2c2c}}usa-acrylic::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0.035;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}usa-acrylic::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;transform:translateX(-120%);background:linear-gradient(105deg,transparent 30%,rgb(255 255 255 / 0.28) 50%,transparent 70%)}usa-acrylic[shimmer="hover"]:hover::after,usa-acrylic[data-shine]::after{animation:usa-acrylic-shine 1.1s cubic-bezier(0.22,1,0.36,1) both}@keyframes usa-acrylic-shine{from{transform:translateX(-120%)}to{transform:translateX(120%)}}usa-acrylic[kind="mica"]{--usa-acrylic-opacity:80%;-webkit-backdrop-filter:none;backdrop-filter:none;background:linear-gradient(color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent),color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent)),var(--usa-mica-source,linear-gradient(135deg,#b8c6ff,#ffd6e8));border-color:transparent}@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){usa-acrylic{background-color:var(--usa-acrylic-tint)}}@media (prefers-reduced-transparency:reduce){usa-acrylic{background:var(--usa-acrylic-tint);-webkit-backdrop-filter:none;backdrop-filter:none}}@media (forced-colors:active){usa-acrylic{background:Canvas;-webkit-backdrop-filter:none;backdrop-filter:none;border-color:CanvasText}usa-acrylic::before,usa-acrylic::after{display:none}}
|
|
24
24
|
usa-aurora{position:relative;display:block;isolation:isolate;overflow:hidden}usa-aurora .usa-aurora-layer{position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:var(--usa-aurora-opacity,0.7);overflow:hidden;contain:strict}usa-aurora .usa-aurora-layer i{position:absolute;display:block;width:70%;aspect-ratio:1;border-radius:50%;background:radial-gradient(closest-side,var(--c),transparent);will-change:transform;animation:usa-aurora-a var(--usa-aurora-speed,18s) ease-in-out infinite alternate}usa-aurora .usa-aurora-layer i:nth-child(1){left:-15%;top:-30%}usa-aurora .usa-aurora-layer i:nth-child(2){right:-20%;top:-10%;animation-name:usa-aurora-b;animation-duration:calc(var(--usa-aurora-speed,18s) * 1.3)}usa-aurora .usa-aurora-layer i:nth-child(3){left:10%;bottom:-45%;animation-name:usa-aurora-c;animation-duration:calc(var(--usa-aurora-speed,18s) * 0.9)}usa-aurora .usa-aurora-layer i:nth-child(4){right:0;bottom:-30%;width:50%;animation-name:usa-aurora-b;animation-direction:alternate-reverse}usa-aurora[paused] .usa-aurora-layer i,usa-aurora[data-offscreen] .usa-aurora-layer i{animation-play-state:paused}@keyframes usa-aurora-a{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(30%,20%,0) scale(1.25)}}@keyframes usa-aurora-b{from{transform:translate3d(0,0,0) scale(1.1)}to{transform:translate3d(-35%,25%,0) scale(0.85)}}@keyframes usa-aurora-c{from{transform:translate3d(0,0,0) rotate(0deg) scale(1)}to{transform:translate3d(25%,-30%,0) rotate(40deg) scale(1.2)}}@media (prefers-reduced-motion:reduce){usa-aurora .usa-aurora-layer i,usa-grain .usa-grain-layer,usa-acrylic::after{animation:none !important}}
|
|
25
25
|
usa-grid-glow,usa-blobs,usa-water-ripple,usa-dot-network{position:relative;display:block;isolation:isolate;overflow:hidden}usa-grid-glow{--usa-grid:32px;--usa-grid-r:220px;--usa-grid-color:var(--usa-accent,#7c5cff);--usa-grid-x:50%;--usa-grid-y:50%}usa-grid-glow::before,usa-grid-glow::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(to right,var(--l) 1px,transparent 1px),linear-gradient(to bottom,var(--l) 1px,transparent 1px);background-size:var(--usa-grid) var(--usa-grid)}usa-grid-glow::before{--l:color-mix(in srgb,currentColor 9%,transparent)}usa-grid-glow::after{--l:var(--usa-grid-color);-webkit-mask:radial-gradient(var(--usa-grid-r) circle at var(--usa-grid-x) var(--usa-grid-y),#000,transparent 70%);mask:radial-gradient(var(--usa-grid-r) circle at var(--usa-grid-x) var(--usa-grid-y),#000,transparent 70%)}usa-blobs .usa-blobs-layer{position:absolute;inset:-20%;z-index:-1;filter:blur(var(--usa-blobs-blur,60px)) saturate(1.3);pointer-events:none}usa-blobs .usa-blobs-layer i{position:absolute;width:45%;aspect-ratio:1;border-radius:42% 58% 60% 40% / 45% 45% 55% 55%;background:var(--c);opacity:0.75;left:calc(10% + var(--i) * 18%);top:calc(10% + var(--i) * 14%);animation:usa-blob calc(14s / var(--usa-blobs-speed,1)) ease-in-out infinite alternate;animation-delay:calc(var(--i) * -3.5s)}@keyframes usa-blob{0%{transform:translate(0,0) rotate(0) scale(1);border-radius:42% 58% 60% 40% / 45% 45% 55% 55%}50%{transform:translate(18%,-12%) rotate(120deg) scale(1.15);border-radius:60% 40% 35% 65% / 55% 60% 40% 45%}100%{transform:translate(-14%,14%) rotate(240deg) scale(0.9);border-radius:38% 62% 55% 45% / 62% 38% 62% 38%}}usa-water-ripple .usa-bg-canvas{position:absolute;inset:0;z-index:1;pointer-events:none;mix-blend-mode:screen}usa-dot-network .usa-bg-canvas{position:absolute;inset:0;z-index:-1;pointer-events:none}@media (prefers-reduced-motion:reduce){usa-blobs .usa-blobs-layer i{animation:none}}
|
|
26
26
|
.usa-fluent{font-family:"Segoe UI Variable","Segoe UI",system-ui,sans-serif;accent-color:var(--usa-accent,#0067c0)}.usa-fluent-mica body{background:linear-gradient(135deg,color-mix(in srgb,var(--usa-accent,#0067c0) 8%,#f3f3f3),#f3f3f3 60%)}@media (prefers-color-scheme:dark){.usa-fluent-mica body{background:linear-gradient(135deg,color-mix(in srgb,var(--usa-accent,#4cc2ff) 10%,#202020),#202020 60%)}}.usa-fluent :is(.usa-acrylic,[data-acrylic]){background:color-mix(in srgb,var(--usa-surface) 70%,transparent);-webkit-backdrop-filter:blur(30px) saturate(1.25);backdrop-filter:blur(30px) saturate(1.25);border:var(--usa-border);border-radius:var(--usa-radius)}.usa-fluent :is(button,[role="button"],[data-fluent-reveal],.usa-fluent-item){position:relative}.usa-fluent [data-reveal]::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;padding:1px;background:radial-gradient(90px circle at var(--usa-reveal-x) var(--usa-reveal-y),rgb(255 255 255 / 0.55),transparent 70%);-webkit-mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}.usa-fluent [data-reveal]{background-image:radial-gradient(120px circle at var(--usa-reveal-x) var(--usa-reveal-y),rgb(255 255 255 / 0.1),transparent 70%)}@media (prefers-reduced-transparency:reduce),(forced-colors:active){.usa-fluent :is(.usa-acrylic,[data-acrylic]){background:var(--usa-surface);-webkit-backdrop-filter:none;backdrop-filter:none}}
|
|
@@ -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}}
|