use-scroll-animate 3.0.0 → 3.2.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 +20 -0
- package/README.md +2 -0
- package/README_ja.md +2 -0
- package/README_zh.md +2 -0
- package/dist/chunks/{base-Co98Z2iM.js → base-Cu-86Z31.js} +2 -2
- package/dist/chunks/{base-Co98Z2iM.js.map → base-Cu-86Z31.js.map} +1 -1
- package/dist/chunks/{index-tags-BEM98giN.cjs → index-tags-DCTX4F9b.cjs} +3 -1
- package/dist/chunks/{index-tags-BEM98giN.cjs.map → index-tags-DCTX4F9b.cjs.map} +1 -1
- package/dist/chunks/{index-tags-f37txHmb.js → index-tags-DZ-gjMZc.js} +3 -1
- package/dist/chunks/{index-tags-f37txHmb.js.map → index-tags-DZ-gjMZc.js.map} +1 -1
- package/dist/chunks/{spring-YNUpez2g.js → spring-BV-cpTHC.js} +2 -2
- package/dist/chunks/{spring-YNUpez2g.js.map → spring-BV-cpTHC.js.map} +1 -1
- package/dist/chunks/{variants-Dp_5lJ_J.js → variants-BQ3gCb5L.js} +2 -2
- package/dist/chunks/{variants-Dp_5lJ_J.js.map → variants-BQ3gCb5L.js.map} +1 -1
- package/dist/components/background.js +3 -3
- package/dist/components/cards.js +3 -3
- package/dist/components/click.js +3 -3
- package/dist/components/feedback.js +2 -2
- package/dist/components/gesture.cjs +387 -0
- package/dist/components/gesture.cjs.map +1 -0
- package/dist/components/gesture.css +3 -0
- package/dist/components/gesture.d.cts +169 -0
- package/dist/components/gesture.d.ts +169 -0
- package/dist/components/gesture.js +379 -0
- package/dist/components/gesture.js.map +1 -0
- package/dist/components/interaction.js +2 -2
- package/dist/components/jsx.d.cts +2 -0
- package/dist/components/jsx.d.ts +2 -0
- package/dist/components/lazy.cjs +3 -1
- package/dist/components/lazy.cjs.map +1 -1
- package/dist/components/lazy.d.cts +2 -0
- package/dist/components/lazy.d.ts +2 -0
- package/dist/components/lazy.js +3 -1
- package/dist/components/lazy.js.map +1 -1
- package/dist/components/page.js +3 -3
- 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.js +2 -2
- 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.js +2 -2
- package/dist/components/ui.js +5 -5
- package/dist/components/vue.cjs +3 -1
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.d.cts +135 -0
- package/dist/components/vue.d.ts +135 -0
- package/dist/components/vue.js +6 -4
- package/dist/components/vue.js.map +1 -1
- package/dist/components.cjs +16 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +2 -0
- package/dist/components.d.cts +243 -2
- package/dist/components.d.ts +243 -2
- package/dist/components.js +13 -7
- package/dist/components.js.map +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/docs/components.md +17 -0
- package/package.json +24 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.js","sources":["../../src/components/timeline/core.ts","../../src/components/timeline/timeline-el.ts","../../src/components/timeline/index.ts"],"sourcesContent":["import { prefersReducedMotion, motionScale, applyFrame, raf, caf, now, clamp } from '../base';\n\n/**\n * Where a step starts on a timeline:\n * - a number: absolute time in ms\n * - `'>'` (default): when the previous step ends · `'<'`: when it starts\n * - `'+=200'` / `'-=200'`: after / overlapping the previous end\n * - `'<+=100'`: 100ms after the previous step's start\n * - `'intro'` / `'intro+=150'`: at (or relative to) a label\n */\nexport type TimelinePosition = number | string;\n\nexport interface TimelineStepOptions {\n /** Duration in ms (default: timeline default, 600). */\n duration?: number;\n /** CSS easing (default `cubic-bezier(0.22, 1, 0.36, 1)`). */\n easing?: string;\n /** Start position, see `TimelinePosition`. */\n at?: TimelinePosition;\n /** ms between targets when the selector matches several elements. */\n stagger?: number;\n}\n\nexport interface TimelineOptions {\n /** Defaults for every step. */\n defaults?: Pick<TimelineStepOptions, 'duration' | 'easing' | 'stagger'>;\n /** Playback rate (1 = normal). */\n speed?: number;\n /** Called after `play()` reaches the end (or the start when reversed). */\n onComplete?: () => void;\n /** Called on every frame with progress 0–1. */\n onUpdate?: (progress: number) => void;\n}\n\nexport interface ScrubOptions {\n /** Scroll offset (px) before the source's top reaches the viewport bottom where progress starts. */\n offset?: number;\n /** Smoothing 0–1 (0 = immediate, default 0). */\n smooth?: number;\n}\n\nexport interface Timeline {\n /** Total length in ms. */\n readonly duration: number;\n /** Label positions in ms. */\n readonly labels: Readonly<Record<string, number>>;\n /** Current playhead in ms. */\n readonly time: number;\n /** Add a step: animate `target` with keyframes or a preset name (`fade-up`, `scale`…). */\n to(target: string | Element | Element[] | NodeList, frames: Keyframe[] | string, options?: TimelineStepOptions): Timeline;\n /** Name a position (default: the current end). */\n label(name: string, at?: TimelinePosition): Timeline;\n /** Run `fn` when the playhead passes `at`. */\n call(fn: () => void, at?: TimelinePosition): Timeline;\n /** Play forwards from the playhead (from 0 when at the end). Resolves at the end. */\n play(from?: TimelinePosition): Promise<void>;\n /** Play backwards to 0. */\n reverse(): Promise<void>;\n pause(): Timeline;\n /** Jump to a time (ms) or label. */\n seek(to: TimelinePosition): Timeline;\n /** Get or set progress 0–1. */\n progress(p?: number): number;\n /** Tie progress to the scroll position of `source` (it moves through the viewport). Returns a stop function. */\n scrub(source: Element, options?: ScrubOptions): () => void;\n /** Stop and drop every animation (elements keep their last frame). */\n cancel(): void;\n}\n\n/** Keyframe presets usable by name in `to()` and `data-tl`. */\nexport const TIMELINE_PRESETS: Record<string, Keyframe[]> = {\n fade: [{ opacity: 0 }, { opacity: 1 }],\n 'fade-up': [{ opacity: 0, transform: 'translateY(24px)' }, { opacity: 1, transform: 'none' }],\n 'fade-down': [{ opacity: 0, transform: 'translateY(-24px)' }, { opacity: 1, transform: 'none' }],\n 'fade-left': [{ opacity: 0, transform: 'translateX(24px)' }, { opacity: 1, transform: 'none' }],\n 'fade-right': [{ opacity: 0, transform: 'translateX(-24px)' }, { opacity: 1, transform: 'none' }],\n scale: [{ opacity: 0, transform: 'scale(0.85)' }, { opacity: 1, transform: 'none' }],\n blur: [{ opacity: 0, filter: 'blur(12px)' }, { opacity: 1, filter: 'blur(0)' }],\n rotate: [{ opacity: 0, transform: 'rotate(-12deg) scale(0.9)' }, { opacity: 1, transform: 'none' }],\n 'clip-up': [{ clipPath: 'inset(100% 0 0 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n 'clip-right': [{ clipPath: 'inset(0 100% 0 0)' }, { clipPath: 'inset(0 0 0 0)' }],\n};\n\n/** Resolve a position against the previous step and labels (pure). */\nexport function resolvePosition(\n pos: TimelinePosition | undefined,\n end: number,\n prevStart: number,\n labels: Record<string, number> = {}\n): number {\n if (pos === undefined || pos === '' || pos === '>') return end;\n if (typeof pos === 'number') return Math.max(0, pos);\n const s = String(pos).trim();\n if (/^-?\\d+(\\.\\d+)?$/.test(s)) return Math.max(0, Number(s));\n const m = /^(<|>|[A-Za-z_][\\w-]*)?\\s*(?:([+-])=\\s*(\\d+(?:\\.\\d+)?))?$/.exec(s);\n if (!m) return end;\n const base = m[1] === '<' ? prevStart : m[1] === '>' || !m[1] ? end : labels[m[1]] ?? end;\n const delta = m[2] ? (m[2] === '-' ? -1 : 1) * Number(m[3]) : 0;\n return Math.max(0, base + delta);\n}\n\nconst toEls = (t: string | Element | Element[] | NodeList): Element[] =>\n typeof t === 'string' ? (typeof document === 'undefined' ? [] : Array.from(document.querySelectorAll(t))) : t instanceof Element ? [t] : Array.from(t as ArrayLike<Element>);\n\ninterface Step { el: Element; frames: Keyframe[]; start: number; duration: number; easing: string; anim?: Animation | null }\ninterface Cue { fn: () => void; at: number }\n\n/**\n * Choreograph animations on one clock: chain, overlap, label, seek, reverse and\n * scrub them with scroll. Built on WAAPI (paused animations driven by one\n * playhead); without WAAPI or under reduced motion it jumps to the end state.\n *\n * @example\n * const tl = timeline({ defaults: { duration: 500 } })\n * .to('.title', 'fade-up')\n * .label('cards')\n * .to('.card', 'scale', { stagger: 80, at: '-=200' })\n * .to('.cta', [{ opacity: 0 }, { opacity: 1 }], { at: 'cards+=400' });\n * tl.play(); // or tl.scrub(document.querySelector('.hero'))\n */\nexport function timeline(options: TimelineOptions = {}): Timeline {\n const d = { duration: 600, easing: 'cubic-bezier(0.22, 1, 0.36, 1)', stagger: 0, ...options.defaults };\n const steps: Step[] = [];\n const cues: Cue[] = [];\n const labels: Record<string, number> = {};\n let end = 0;\n let prevStart = 0;\n let t = 0;\n let frame = 0;\n let dir = 1;\n let settle: (() => void) | undefined;\n let built = false;\n\n const total = () => Math.max(end, ...cues.map((c) => c.at), 0);\n const build = () => {\n if (built) return;\n built = true;\n for (const s of steps) {\n if (typeof (s.el as HTMLElement).animate !== 'function') { s.anim = null; continue; }\n s.anim = (s.el as HTMLElement).animate(s.frames, { duration: s.duration, delay: s.start, easing: s.easing, fill: 'both' });\n s.anim.pause();\n }\n };\n const render = (to: number, from: number) => {\n build();\n t = clamp(to, 0, total());\n for (const s of steps) {\n if (s.anim) s.anim.currentTime = t;\n else applyFrame(s.el as HTMLElement, s.frames[t >= s.start ? s.frames.length - 1 : 0]);\n }\n for (const c of cues) if ((from < c.at && t >= c.at) || (from > c.at && t <= c.at)) c.fn();\n options.onUpdate?.(total() ? t / total() : 1);\n };\n const stop = () => {\n if (frame) caf(frame);\n frame = 0;\n };\n const run = (direction: number): Promise<void> => {\n stop();\n settle?.();\n dir = direction;\n const target = dir > 0 ? total() : 0;\n const k = motionScale();\n if (prefersReducedMotion() || k === 0 || !total()) {\n render(target, t);\n options.onComplete?.();\n return Promise.resolve();\n }\n const rate = (options.speed ?? 1) / k;\n return new Promise<void>((resolve) => {\n settle = () => { settle = undefined; resolve(); };\n let last = now();\n const loop = () => {\n const n = now();\n const next = t + (n - last) * rate * dir;\n last = n;\n render(next, t);\n if ((dir > 0 && t >= target) || (dir < 0 && t <= 0)) {\n frame = 0;\n options.onComplete?.();\n settle?.();\n return;\n }\n frame = raf(loop);\n };\n frame = raf(loop);\n });\n };\n\n const api: Timeline = {\n get duration() { return total(); },\n get labels() { return { ...labels }; },\n get time() { return t; },\n to(target, frames, o = {}) {\n const kf = typeof frames === 'string' ? TIMELINE_PRESETS[frames] || TIMELINE_PRESETS.fade : frames;\n const start = resolvePosition(o.at, end, prevStart, labels);\n const duration = o.duration ?? d.duration;\n const stagger = o.stagger ?? d.stagger;\n let last = start;\n toEls(target).forEach((el, i) => {\n const s = start + i * stagger;\n steps.push({ el, frames: kf, start: s, duration, easing: o.easing ?? d.easing });\n last = Math.max(last, s + duration);\n });\n prevStart = start;\n end = Math.max(end, last);\n built = false;\n steps.forEach((s) => s.anim?.cancel());\n return api;\n },\n label(name, at) {\n labels[name] = resolvePosition(at, end, prevStart, labels);\n return api;\n },\n call(fn, at) {\n cues.push({ fn, at: resolvePosition(at, end, prevStart, labels) });\n return api;\n },\n play(from) {\n if (from !== undefined) render(resolvePosition(from, 0, 0, labels), t);\n else if (t >= total()) render(0, -1);\n return run(1);\n },\n reverse() {\n return run(-1);\n },\n pause() {\n stop();\n return api;\n },\n seek(to) {\n stop();\n render(resolvePosition(to, 0, 0, labels), t);\n return api;\n },\n progress(p) {\n if (p !== undefined) api.seek(clamp(p, 0, 1) * total());\n return total() ? t / total() : 0;\n },\n scrub(source, o = {}) {\n stop();\n if (prefersReducedMotion() || typeof window === 'undefined') {\n render(total(), t);\n return () => {};\n }\n let id = 0;\n let cur = t;\n const update = () => {\n id = 0;\n const r = source.getBoundingClientRect();\n const vh = window.innerHeight || 1;\n const p = clamp((vh + (o.offset ?? 0) - r.top) / (vh + r.height || 1), 0, 1);\n const goal = p * total();\n const sm = clamp(o.smooth ?? 0, 0, 0.95);\n cur = sm ? cur + (goal - cur) * (1 - sm) : goal;\n render(cur, t);\n if (sm && Math.abs(goal - cur) > 0.5) id = raf(update);\n };\n const onScroll = () => { if (!id) id = raf(update); };\n window.addEventListener('scroll', onScroll, { passive: true });\n window.addEventListener('resize', onScroll, { passive: true });\n update();\n return () => {\n window.removeEventListener('scroll', onScroll);\n window.removeEventListener('resize', onScroll);\n if (id) caf(id);\n };\n },\n cancel() {\n stop();\n settle?.();\n steps.forEach((s) => s.anim?.cancel());\n built = false;\n },\n };\n return api;\n}\n","import { defineElement, type UsaElement } from '../base';\nimport { timeline, TIMELINE_PRESETS, type Timeline } from './core';\nimport css from './timeline.css?raw';\n\n/**\n * `<usa-timeline>` — declarative choreography. Every descendant with\n * `data-tl=\"<preset>\"` becomes a step, in document order; `data-at`\n * (`'-=200'`, `'<'`, `'label+=100'`, ms), `data-duration` and `data-label`\n * fine-tune it.\n *\n * Attributes: `trigger` (`view` default · `click` · `manual`), `scrub`\n * (progress follows scroll instead of playing), `overlap` (ms each step\n * overlaps the previous, default 0), `duration` (600), `stagger` (ms),\n * `repeat` (replay every time it enters the viewport). Methods: `play()`,\n * `reverse()`, `seek(t)`; property `timeline`. Event `usa:complete`.\n * Reduced motion: steps appear in their final state.\n */\nexport interface UsaTimelineElement extends UsaElement {\n readonly timeline: Timeline | null;\n play(): Promise<void>;\n reverse(): Promise<void>;\n seek(to: number | string): void;\n}\n\nexport function defineTimeline(tag = 'usa-timeline'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaTimeline extends Base {\n static get observedAttributes(): string[] {\n return ['scrub', 'trigger', 'overlap'];\n }\n private _tl: Timeline | null = null;\n\n get timeline(): Timeline | null {\n return this._tl;\n }\n\n play(): Promise<void> {\n return this._tl ? this._tl.play(0).then(() => void this.emit('complete')) : Promise.resolve();\n }\n\n reverse(): Promise<void> {\n return this._tl ? this._tl.reverse() : Promise.resolve();\n }\n\n seek(to: number | string): void {\n this._tl?.seek(to);\n }\n\n mount(): void {\n const overlap = this.num('overlap', 0);\n const tl = (this._tl = timeline({ defaults: { duration: this.num('duration', 600), stagger: this.num('stagger', 0) } }));\n this.querySelectorAll<HTMLElement>('[data-tl]').forEach((el, i) => {\n if (el.dataset.label) tl.label(el.dataset.label);\n const name = el.dataset.tl || 'fade';\n tl.to(el, TIMELINE_PRESETS[name] ? name : 'fade', {\n at: el.dataset.at ?? (i && overlap ? `-=${overlap}` : undefined),\n duration: el.dataset.duration ? Number(el.dataset.duration) : undefined,\n });\n });\n this.onCleanup(() => tl.cancel());\n if (this.reduced) {\n tl.seek(tl.duration);\n return;\n }\n if (this.flag('scrub')) {\n this.onCleanup(tl.scrub(this, { smooth: 0.2 }));\n return;\n }\n tl.seek(0);\n const trigger = this.str('trigger', 'view');\n if (trigger === 'click') this.listen(this, 'click', () => void this.play());\n else if (trigger === 'view') {\n let played = false;\n this.inView((v) => {\n if (v && (!played || this.flag('repeat'))) {\n played = true;\n void this.play();\n } else if (!v && this.flag('repeat')) tl.seek(0);\n }, { threshold: 0.2 });\n }\n }\n\n unmount(): void {\n this._tl = null;\n }\n },\n { id: 'timeline', text: css }\n );\n}\n","/**\n * use-scroll-animate/components/timeline — choreography (v3.1).\n * `timeline()` chains, overlaps, labels, seeks, reverses and scroll-scrubs\n * WAAPI animations on one playhead; `<usa-timeline>` builds one from\n * `data-tl` children.\n */\nimport { defineTimeline, type UsaTimelineElement } from './timeline-el';\n\nexport { defineTimeline };\nexport { timeline, resolvePosition, TIMELINE_PRESETS } from './core';\nexport type { Timeline, TimelineOptions, TimelineStepOptions, TimelinePosition, ScrubOptions } from './core';\nexport type { UsaTimelineElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineTimelineComponents(): void {\n defineTimeline();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-timeline': UsaTimelineElement;\n }\n}\n"],"names":[],"mappings":";;;AAqEA;AACO,MAAM,gBAAgB,GAA+B;A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,CAAC,CAAC,EAAE;wBACzC,MAAM,GAAG,IAAI;AACb,wBAAA,KAAK,IAAI,CAAC,IAAI,EAAE;oBAClB;yBAAO,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;AAAE,wBAAA,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAClD,gBAAA,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;YACxB;QACF;QAEA,OAAO,GAAA;AACL,YAAA,IAAI,CAAC,GAAG,GAAG,IAAI;QACjB;KACD,EACH,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAC9B;AACH;;AC1FA;;;;;AAKG;AAUH;SACgB,wBAAwB,GAAA;AACtC,IAAA,cAAc,EAAE;AAClB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a as configureComponents } from '../chunks/base-
|
|
1
|
+
import { h as defineElement, k as kindOf, s as shadowStyles, i as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-Cu-86Z31.js';
|
|
2
|
+
export { a as configureComponents } from '../chunks/base-Cu-86Z31.js';
|
|
3
3
|
|
|
4
4
|
var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-kind^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-kind=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-kind=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-kind=\"drawer-bottom\"] [part=\"panel\"],dialog[data-kind=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-kind=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
|
|
5
5
|
|
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
|
@@ -15,7 +15,9 @@ 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('./gesture.cjs');
|
|
20
|
+
require('../chunks/index-tags-DCTX4F9b.cjs');
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* 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;;;;;;"}
|
|
@@ -1288,6 +1288,139 @@ 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
|
+
|
|
1377
|
+
type SwipeDirection = 'left' | 'right' | 'up' | 'down';
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* `<usa-swipeable>` — swipe-to-dismiss / swipe actions. The content follows
|
|
1381
|
+
* the finger (rubber-banded past `distance`), flies out on a swipe or a drag
|
|
1382
|
+
* past `distance`, otherwise springs home with the release velocity.
|
|
1383
|
+
*
|
|
1384
|
+
* Attributes: `axis` (`x` default · `y`), `distance` (px, 120), `preset`
|
|
1385
|
+
* (spring), `dismiss` (remove the element after flying out), `disabled`.
|
|
1386
|
+
* Keyboard: Delete/Backspace dismisses, ←/→ swipe. Events `usa:swipe`
|
|
1387
|
+
* (`{ direction }`, cancelable), `usa:dismiss`. Methods `swipe(dir)`, `reset()`.
|
|
1388
|
+
* Reduced motion: no follow / fly-out animation, events still fire.
|
|
1389
|
+
*/
|
|
1390
|
+
interface UsaSwipeableElement extends UsaElement {
|
|
1391
|
+
swipe(direction: SwipeDirection): void;
|
|
1392
|
+
reset(): void;
|
|
1393
|
+
readonly offset: number;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* `<usa-pinch-zoom>` — pinch (two fingers or Ctrl/⌘ + wheel / trackpad
|
|
1398
|
+
* pinch) to zoom its content, pan while zoomed, double-tap to toggle zoom;
|
|
1399
|
+
* scale and position spring back inside the bounds on release.
|
|
1400
|
+
*
|
|
1401
|
+
* Attributes: `min` (1), `max` (4), `double-tap` (zoom level, 2), `preset`.
|
|
1402
|
+
* Keyboard: `+` / `-` / `0`. Property `scale`, method `zoomTo(scale)`.
|
|
1403
|
+
* Event `usa:zoom` (`{ scale }`). Reduced motion: zoom changes instantly.
|
|
1404
|
+
*/
|
|
1405
|
+
interface UsaPinchZoomElement extends UsaElement {
|
|
1406
|
+
readonly scale: number;
|
|
1407
|
+
zoomTo(scale: number): void;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* use-scroll-animate/components/gesture — unified gestures (v3.2).
|
|
1412
|
+
* `gesture()` recognises pan, swipe, pinch, long-press, tap and double-tap
|
|
1413
|
+
* with release velocities for springs; `<usa-swipeable>` (swipe-to-dismiss)
|
|
1414
|
+
* and `<usa-pinch-zoom>` are built on it.
|
|
1415
|
+
*/
|
|
1416
|
+
|
|
1417
|
+
declare global {
|
|
1418
|
+
interface HTMLElementTagNameMap {
|
|
1419
|
+
'usa-swipeable': UsaSwipeableElement;
|
|
1420
|
+
'usa-pinch-zoom': UsaPinchZoomElement;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1291
1424
|
/** The component categories and their default tags. */
|
|
1292
1425
|
declare const COMPONENT_CATEGORIES: {
|
|
1293
1426
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
@@ -1301,6 +1434,8 @@ declare const COMPONENT_CATEGORIES: {
|
|
|
1301
1434
|
readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
|
|
1302
1435
|
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
1436
|
readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
|
|
1437
|
+
readonly timeline: readonly ["usa-timeline"];
|
|
1438
|
+
readonly gesture: readonly ["usa-swipeable", "usa-pinch-zoom"];
|
|
1304
1439
|
};
|
|
1305
1440
|
type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
|
|
1306
1441
|
|
package/dist/components/vue.d.ts
CHANGED
|
@@ -1288,6 +1288,139 @@ 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
|
+
|
|
1377
|
+
type SwipeDirection = 'left' | 'right' | 'up' | 'down';
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* `<usa-swipeable>` — swipe-to-dismiss / swipe actions. The content follows
|
|
1381
|
+
* the finger (rubber-banded past `distance`), flies out on a swipe or a drag
|
|
1382
|
+
* past `distance`, otherwise springs home with the release velocity.
|
|
1383
|
+
*
|
|
1384
|
+
* Attributes: `axis` (`x` default · `y`), `distance` (px, 120), `preset`
|
|
1385
|
+
* (spring), `dismiss` (remove the element after flying out), `disabled`.
|
|
1386
|
+
* Keyboard: Delete/Backspace dismisses, ←/→ swipe. Events `usa:swipe`
|
|
1387
|
+
* (`{ direction }`, cancelable), `usa:dismiss`. Methods `swipe(dir)`, `reset()`.
|
|
1388
|
+
* Reduced motion: no follow / fly-out animation, events still fire.
|
|
1389
|
+
*/
|
|
1390
|
+
interface UsaSwipeableElement extends UsaElement {
|
|
1391
|
+
swipe(direction: SwipeDirection): void;
|
|
1392
|
+
reset(): void;
|
|
1393
|
+
readonly offset: number;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* `<usa-pinch-zoom>` — pinch (two fingers or Ctrl/⌘ + wheel / trackpad
|
|
1398
|
+
* pinch) to zoom its content, pan while zoomed, double-tap to toggle zoom;
|
|
1399
|
+
* scale and position spring back inside the bounds on release.
|
|
1400
|
+
*
|
|
1401
|
+
* Attributes: `min` (1), `max` (4), `double-tap` (zoom level, 2), `preset`.
|
|
1402
|
+
* Keyboard: `+` / `-` / `0`. Property `scale`, method `zoomTo(scale)`.
|
|
1403
|
+
* Event `usa:zoom` (`{ scale }`). Reduced motion: zoom changes instantly.
|
|
1404
|
+
*/
|
|
1405
|
+
interface UsaPinchZoomElement extends UsaElement {
|
|
1406
|
+
readonly scale: number;
|
|
1407
|
+
zoomTo(scale: number): void;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* use-scroll-animate/components/gesture — unified gestures (v3.2).
|
|
1412
|
+
* `gesture()` recognises pan, swipe, pinch, long-press, tap and double-tap
|
|
1413
|
+
* with release velocities for springs; `<usa-swipeable>` (swipe-to-dismiss)
|
|
1414
|
+
* and `<usa-pinch-zoom>` are built on it.
|
|
1415
|
+
*/
|
|
1416
|
+
|
|
1417
|
+
declare global {
|
|
1418
|
+
interface HTMLElementTagNameMap {
|
|
1419
|
+
'usa-swipeable': UsaSwipeableElement;
|
|
1420
|
+
'usa-pinch-zoom': UsaPinchZoomElement;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1291
1424
|
/** The component categories and their default tags. */
|
|
1292
1425
|
declare const COMPONENT_CATEGORIES: {
|
|
1293
1426
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
@@ -1301,6 +1434,8 @@ declare const COMPONENT_CATEGORIES: {
|
|
|
1301
1434
|
readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
|
|
1302
1435
|
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
1436
|
readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
|
|
1437
|
+
readonly timeline: readonly ["usa-timeline"];
|
|
1438
|
+
readonly gesture: readonly ["usa-swipeable", "usa-pinch-zoom"];
|
|
1304
1439
|
};
|
|
1305
1440
|
type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
|
|
1306
1441
|
|
package/dist/components/vue.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
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 './gesture.js';
|
|
18
|
+
import '../chunks/index-tags-DZ-gjMZc.js';
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* 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,9 +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 components_timeline = require('./components/timeline.cjs');
|
|
15
|
+
var components_gesture = require('./components/gesture.cjs');
|
|
14
16
|
var variants = require('./chunks/variants-BNIrn4ch.cjs');
|
|
15
17
|
var base = require('./chunks/base-CXx7jZ-o.cjs');
|
|
16
|
-
var indexTags = require('./chunks/index-tags-
|
|
18
|
+
var indexTags = require('./chunks/index-tags-DCTX4F9b.cjs');
|
|
17
19
|
var spring = require('./chunks/spring-2OTnYCzm.cjs');
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -48,6 +50,8 @@ const BY_CATEGORY = {
|
|
|
48
50
|
click: components_click.defineClickComponents,
|
|
49
51
|
ui: components_ui.defineUiComponents,
|
|
50
52
|
page: components_page.definePageComponents,
|
|
53
|
+
timeline: components_timeline.defineTimelineComponents,
|
|
54
|
+
gesture: components_gesture.defineGestureComponents,
|
|
51
55
|
};
|
|
52
56
|
/**
|
|
53
57
|
* Register every `<usa-*>` component (or only the given categories).
|
|
@@ -177,6 +181,17 @@ exports.setMotionIntensity = components_page.setMotionIntensity;
|
|
|
177
181
|
exports.smoothScroll = components_page.smoothScroll;
|
|
178
182
|
exports.supportsViewTransitions = components_page.supportsViewTransitions;
|
|
179
183
|
exports.themeTransition = components_page.themeTransition;
|
|
184
|
+
exports.TIMELINE_PRESETS = components_timeline.TIMELINE_PRESETS;
|
|
185
|
+
exports.defineTimeline = components_timeline.defineTimeline;
|
|
186
|
+
exports.defineTimelineComponents = components_timeline.defineTimelineComponents;
|
|
187
|
+
exports.resolvePosition = components_timeline.resolvePosition;
|
|
188
|
+
exports.timeline = components_timeline.timeline;
|
|
189
|
+
exports.defineGestureComponents = components_gesture.defineGestureComponents;
|
|
190
|
+
exports.definePinchZoom = components_gesture.definePinchZoom;
|
|
191
|
+
exports.defineSwipeable = components_gesture.defineSwipeable;
|
|
192
|
+
exports.gesture = components_gesture.gesture;
|
|
193
|
+
exports.pinchScale = components_gesture.pinchScale;
|
|
194
|
+
exports.swipeDirection = components_gesture.swipeDirection;
|
|
180
195
|
exports.VARIANTS = variants.VARIANTS;
|
|
181
196
|
exports.adoptVariants = variants.adoptVariants;
|
|
182
197
|
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 { defineGestureComponents } from './gesture/index';\nimport { adoptVariants } from './ui/variants';\nimport { canDefine } from './base';\n\nexport * from './reveal/index';\nexport * from './text/index';\nexport * from './interaction/index';\nexport * from './feedback/index';\nexport * from './background/index';\nexport * from './transitions/index';\nexport * from './physics/index';\nexport * from './cards/index';\nexport * from './click/index';\nexport * from './ui/index';\nexport * from './page/index';\nexport * from './timeline/index';\nexport * from './gesture/index';\n\nexport { COMPONENT_CATEGORIES } from './index-tags';\nexport type { ComponentCategory } from './index-tags';\nimport { COMPONENT_CATEGORIES, type ComponentCategory } from './index-tags';\n\nconst BY_CATEGORY: Record<ComponentCategory, () => void> = {\n reveal: defineRevealComponents,\n text: defineTextComponents,\n interaction: defineInteractionComponents,\n feedback: defineFeedbackComponents,\n background: defineBackgroundComponents,\n transitions: defineTransitionComponents,\n physics: definePhysicsComponents,\n cards: defineCardComponents,\n click: defineClickComponents,\n ui: defineUiComponents,\n page: definePageComponents,\n timeline: defineTimelineComponents,\n gesture: defineGestureComponents,\n};\n\n/**\n * Register every `<usa-*>` component (or only the given categories).\n * Safe to call more than once and on the server (no-op without DOM).\n */\nexport function defineComponents(categories?: ComponentCategory[]): void {\n if (canDefine()) adoptVariants();\n (categories || (Object.keys(BY_CATEGORY) as ComponentCategory[])).forEach((c) => BY_CATEGORY[c]?.());\n}\n"],"names":["defineRevealComponents","defineTextComponents","defineInteractionComponents","defineFeedbackComponents","defineBackgroundComponents","defineTransitionComponents","definePhysicsComponents","defineCardComponents","defineClickComponents","defineUiComponents","definePageComponents","defineTimelineComponents","defineGestureComponents","canDefine","adoptVariants"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAmCH,MAAM,WAAW,GAA0C;AACzD,IAAA,MAAM,EAAEA,wCAAsB;AAC9B,IAAA,IAAI,EAAEC,oCAAoB;AAC1B,IAAA,WAAW,EAAEC,kDAA2B;AACxC,IAAA,QAAQ,EAAEC,4CAAwB;AAClC,IAAA,UAAU,EAAEC,gDAA0B;AACtC,IAAA,WAAW,EAAEC,iDAA0B;AACvC,IAAA,OAAO,EAAEC,0CAAuB;AAChC,IAAA,KAAK,EAAEC,qCAAoB;AAC3B,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,EAAE,EAAEC,gCAAkB;AACtB,IAAA,IAAI,EAAEC,oCAAoB;AAC1B,IAAA,QAAQ,EAAEC,4CAAwB;AAClC,IAAA,OAAO,EAAEC,0CAAuB;CACjC;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
|
@@ -66,3 +66,5 @@ 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}}
|
|
70
|
+
usa-swipeable{display:block;touch-action:pan-y;user-select:none;-webkit-user-select:none}usa-swipeable[axis="y"]{touch-action:pan-x}usa-swipeable>*{transform:translate3d(var(--usa-swipe,0px),0,0);opacity:calc(1 - var(--usa-swipe-p,0) * 0.5)}usa-swipeable[axis="y"]>*{transform:translate3d(0,var(--usa-swipe,0px),0)}usa-swipeable:focus-visible{outline:2px solid currentColor;outline-offset:2px}usa-pinch-zoom{display:block;overflow:hidden;touch-action:none;position:relative}usa-pinch-zoom>*{transform:translate3d(var(--usa-zoom-x,0px),var(--usa-zoom-y,0px),0) scale(var(--usa-zoom,1));transform-origin:50% 50%}usa-pinch-zoom[data-zoomed]{cursor:grab}usa-pinch-zoom:focus-visible{outline:2px solid currentColor;outline-offset:2px}
|