use-scroll-animate 3.4.0 → 3.5.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 +11 -0
- package/README.md +1 -0
- package/README_ja.md +1 -0
- package/README_zh.md +1 -0
- package/dist/chunks/{base-Cu-86Z31.js → base-BpROOcey.js} +2 -2
- package/dist/chunks/{base-Cu-86Z31.js.map → base-BpROOcey.js.map} +1 -1
- package/dist/chunks/core-IaorbTdu.cjs +185 -0
- package/dist/chunks/core-IaorbTdu.cjs.map +1 -0
- package/dist/chunks/core-uxs3ETou.js +181 -0
- package/dist/chunks/core-uxs3ETou.js.map +1 -0
- package/dist/chunks/{index-tags-BKcHAxBK.cjs → index-tags-CLFrjVR7.cjs} +2 -1
- package/dist/chunks/{index-tags-BKcHAxBK.cjs.map → index-tags-CLFrjVR7.cjs.map} +1 -1
- package/dist/chunks/{index-tags-qc6OWsJ8.js → index-tags-uw1Fospg.js} +2 -1
- package/dist/chunks/{index-tags-qc6OWsJ8.js.map → index-tags-uw1Fospg.js.map} +1 -1
- package/dist/chunks/{spring-BV-cpTHC.js → spring-C-fw7_9f.js} +2 -2
- package/dist/chunks/{spring-BV-cpTHC.js.map → spring-C-fw7_9f.js.map} +1 -1
- package/dist/chunks/{variants-BQ3gCb5L.js → variants-CHe1VbSn.js} +2 -2
- package/dist/chunks/{variants-BQ3gCb5L.js.map → variants-CHe1VbSn.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/depth.cjs +252 -0
- package/dist/components/depth.cjs.map +1 -0
- package/dist/components/depth.css +3 -0
- package/dist/components/depth.d.cts +121 -0
- package/dist/components/depth.d.ts +121 -0
- package/dist/components/depth.js +243 -0
- package/dist/components/depth.js.map +1 -0
- package/dist/components/feedback.js +2 -2
- package/dist/components/gesture.cjs +6 -182
- package/dist/components/gesture.cjs.map +1 -1
- package/dist/components/gesture.js +6 -181
- package/dist/components/gesture.js.map +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.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/svg.js +2 -2
- package/dist/components/text.js +2 -2
- package/dist/components/timeline.js +2 -2
- 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 +47 -0
- package/dist/components/vue.d.ts +47 -0
- package/dist/components/vue.js +6 -4
- package/dist/components/vue.js.map +1 -1
- package/dist/components/webgl.js +2 -2
- package/dist/components.cjs +14 -4
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +1 -0
- package/dist/components.d.cts +77 -2
- package/dist/components.d.ts +77 -2
- package/dist/components.js +12 -8
- 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 +10 -0
- package/package.json +13 -2
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* use-scroll-animate/components — shared base for the `<usa-*>` custom elements.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is lazy: nothing touches `window`, `document`,
|
|
5
|
+
* `HTMLElement` or `matchMedia` at import time, so the components can be
|
|
6
|
+
* imported during SSR (Next, Nuxt, Astro…) and in Electron/Tauri preload
|
|
7
|
+
* scripts. Classes are created the first time a `define*()` function runs.
|
|
8
|
+
*/
|
|
9
|
+
interface ComponentsConfig {
|
|
10
|
+
/**
|
|
11
|
+
* Inject each component's CSS when it is defined (default `true`). Uses a
|
|
12
|
+
* constructable stylesheet (`document.adoptedStyleSheets`, which a strict
|
|
13
|
+
* `style-src` CSP does not block) and falls back to a `<style>` tag. Set
|
|
14
|
+
* to `false` when you load `use-scroll-animate/components.css` yourself.
|
|
15
|
+
*/
|
|
16
|
+
injectStyles?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `'user'` (default) follows `prefers-reduced-motion`; `'reduce'` always
|
|
19
|
+
* uses the reduced variants (e.g. a kiosk / battery-saver mode);
|
|
20
|
+
* `'no-preference'` ignores the OS setting (only for demos — respect your users).
|
|
21
|
+
*/
|
|
22
|
+
reducedMotion?: 'user' | 'reduce' | 'no-preference';
|
|
23
|
+
/**
|
|
24
|
+
* Global motion intensity (v2.7): `'off'` (same as reduced motion),
|
|
25
|
+
* `'low'` (shorter, calmer), `'normal'` (default) or `'high'`. Scales every
|
|
26
|
+
* component animation's duration and sets `--usa-motion` (0 / 0.6 / 1 /
|
|
27
|
+
* 1.25) on `<html>` for your own CSS. See `setMotionIntensity()`.
|
|
28
|
+
*/
|
|
29
|
+
motionIntensity?: MotionIntensity;
|
|
30
|
+
}
|
|
31
|
+
type MotionIntensity = 'off' | 'low' | 'normal' | 'high';
|
|
32
|
+
/** Change global component settings (call before `define*()` for `injectStyles`). */
|
|
33
|
+
declare function configureComponents(options: ComponentsConfig): void;
|
|
34
|
+
/** `true` when animations should be reduced (OS setting or `configureComponents`). */
|
|
35
|
+
declare function prefersReducedMotion(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Members shared by every `<usa-*>` element. Attribute helpers, a cleanup
|
|
38
|
+
* bag that is emptied on disconnect, and motion helpers that degrade to the
|
|
39
|
+
* final state without WAAPI or under reduced motion.
|
|
40
|
+
*/
|
|
41
|
+
interface UsaElement extends HTMLElement {
|
|
42
|
+
/** `true` while reduced motion applies to this element. */
|
|
43
|
+
readonly reduced: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* `<usa-cube>` — a CSS 3D cube whose up-to-six element children are its faces
|
|
48
|
+
* (front, right, back, left, top, bottom). Rotate with drag / swipe, arrow
|
|
49
|
+
* keys, `autoplay` (ms) or `show(face | index)`; spring-driven.
|
|
50
|
+
* Attributes: `size` (px, 200), `autoplay`, `perspective` (900).
|
|
51
|
+
* `usa:change` (`{ index, face }`). Reduced motion: instant face switch.
|
|
52
|
+
*/
|
|
53
|
+
interface UsaCubeElement extends UsaElement {
|
|
54
|
+
readonly index: number;
|
|
55
|
+
show(face: number | string): void;
|
|
56
|
+
next(): void;
|
|
57
|
+
prev(): void;
|
|
58
|
+
}
|
|
59
|
+
declare function defineCube(tag?: string): CustomElementConstructor | undefined;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* `<usa-depth>` — depth parallax: children with `data-depth` (-1…1, 0 = the
|
|
63
|
+
* screen plane) move and scale by depth as the pointer moves, the device
|
|
64
|
+
* tilts (`orientation`) or the page scrolls (`scroll`).
|
|
65
|
+
* Attributes: `source` (`pointer` default · `orientation` · `scroll` ·
|
|
66
|
+
* space-separated mix), `strength` (px at depth 1, 40), `rotate` (max tilt
|
|
67
|
+
* of the whole scene in deg, 0). `requestPermission()` for iOS motion.
|
|
68
|
+
* Reduced motion: layers stay flat.
|
|
69
|
+
*/
|
|
70
|
+
interface UsaDepthElement extends UsaElement {
|
|
71
|
+
/** Current -1…1 input. */
|
|
72
|
+
readonly tilt: {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
};
|
|
76
|
+
requestPermission(): Promise<boolean>;
|
|
77
|
+
}
|
|
78
|
+
declare function defineDepth(tag?: string): CustomElementConstructor | undefined;
|
|
79
|
+
|
|
80
|
+
interface TiltReading {
|
|
81
|
+
/** Left/right tilt, -1…1. */
|
|
82
|
+
x: number;
|
|
83
|
+
/** Front/back tilt, -1…1. */
|
|
84
|
+
y: number;
|
|
85
|
+
}
|
|
86
|
+
/** Map a DeviceOrientation reading (beta/gamma degrees) to -1…1 tilt around a resting pose (pure). */
|
|
87
|
+
declare function orientationToTilt(beta: number | null, gamma: number | null, range?: number, rest?: number): TiltReading;
|
|
88
|
+
/** `true` when DeviceOrientation events exist. */
|
|
89
|
+
declare const supportsOrientation: () => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Ask for motion-sensor permission where required (iOS 13+; must run inside
|
|
92
|
+
* a user gesture). Resolves `true` when tilt events can be used.
|
|
93
|
+
*/
|
|
94
|
+
declare function requestOrientationPermission(): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Listen to device tilt (smoothed); falls back to nothing on desktops.
|
|
97
|
+
* Returns a stop function.
|
|
98
|
+
*/
|
|
99
|
+
declare function deviceTilt(cb: (t: TiltReading) => void, o?: {
|
|
100
|
+
range?: number;
|
|
101
|
+
smooth?: number;
|
|
102
|
+
}): () => void;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* use-scroll-animate/components/depth — 3D (v3.5).
|
|
106
|
+
* `<usa-cube>` (CSS 3D cube), `<usa-depth>` (layered depth parallax driven by
|
|
107
|
+
* pointer, device orientation or scroll) and `deviceTilt()`. The 3D ring
|
|
108
|
+
* carousel is `<usa-carousel-3d>` in `components/cards`.
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/** Register every component of this category under its default tag. */
|
|
112
|
+
declare function defineDepthComponents(): void;
|
|
113
|
+
declare global {
|
|
114
|
+
interface HTMLElementTagNameMap {
|
|
115
|
+
'usa-cube': UsaCubeElement;
|
|
116
|
+
'usa-depth': UsaDepthElement;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { configureComponents, defineCube, defineDepth, defineDepthComponents, deviceTilt, orientationToTilt, prefersReducedMotion, requestOrientationPermission, supportsOrientation };
|
|
121
|
+
export type { ComponentsConfig, TiltReading, UsaCubeElement, UsaDepthElement, UsaElement };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* use-scroll-animate/components — shared base for the `<usa-*>` custom elements.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is lazy: nothing touches `window`, `document`,
|
|
5
|
+
* `HTMLElement` or `matchMedia` at import time, so the components can be
|
|
6
|
+
* imported during SSR (Next, Nuxt, Astro…) and in Electron/Tauri preload
|
|
7
|
+
* scripts. Classes are created the first time a `define*()` function runs.
|
|
8
|
+
*/
|
|
9
|
+
interface ComponentsConfig {
|
|
10
|
+
/**
|
|
11
|
+
* Inject each component's CSS when it is defined (default `true`). Uses a
|
|
12
|
+
* constructable stylesheet (`document.adoptedStyleSheets`, which a strict
|
|
13
|
+
* `style-src` CSP does not block) and falls back to a `<style>` tag. Set
|
|
14
|
+
* to `false` when you load `use-scroll-animate/components.css` yourself.
|
|
15
|
+
*/
|
|
16
|
+
injectStyles?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `'user'` (default) follows `prefers-reduced-motion`; `'reduce'` always
|
|
19
|
+
* uses the reduced variants (e.g. a kiosk / battery-saver mode);
|
|
20
|
+
* `'no-preference'` ignores the OS setting (only for demos — respect your users).
|
|
21
|
+
*/
|
|
22
|
+
reducedMotion?: 'user' | 'reduce' | 'no-preference';
|
|
23
|
+
/**
|
|
24
|
+
* Global motion intensity (v2.7): `'off'` (same as reduced motion),
|
|
25
|
+
* `'low'` (shorter, calmer), `'normal'` (default) or `'high'`. Scales every
|
|
26
|
+
* component animation's duration and sets `--usa-motion` (0 / 0.6 / 1 /
|
|
27
|
+
* 1.25) on `<html>` for your own CSS. See `setMotionIntensity()`.
|
|
28
|
+
*/
|
|
29
|
+
motionIntensity?: MotionIntensity;
|
|
30
|
+
}
|
|
31
|
+
type MotionIntensity = 'off' | 'low' | 'normal' | 'high';
|
|
32
|
+
/** Change global component settings (call before `define*()` for `injectStyles`). */
|
|
33
|
+
declare function configureComponents(options: ComponentsConfig): void;
|
|
34
|
+
/** `true` when animations should be reduced (OS setting or `configureComponents`). */
|
|
35
|
+
declare function prefersReducedMotion(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Members shared by every `<usa-*>` element. Attribute helpers, a cleanup
|
|
38
|
+
* bag that is emptied on disconnect, and motion helpers that degrade to the
|
|
39
|
+
* final state without WAAPI or under reduced motion.
|
|
40
|
+
*/
|
|
41
|
+
interface UsaElement extends HTMLElement {
|
|
42
|
+
/** `true` while reduced motion applies to this element. */
|
|
43
|
+
readonly reduced: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* `<usa-cube>` — a CSS 3D cube whose up-to-six element children are its faces
|
|
48
|
+
* (front, right, back, left, top, bottom). Rotate with drag / swipe, arrow
|
|
49
|
+
* keys, `autoplay` (ms) or `show(face | index)`; spring-driven.
|
|
50
|
+
* Attributes: `size` (px, 200), `autoplay`, `perspective` (900).
|
|
51
|
+
* `usa:change` (`{ index, face }`). Reduced motion: instant face switch.
|
|
52
|
+
*/
|
|
53
|
+
interface UsaCubeElement extends UsaElement {
|
|
54
|
+
readonly index: number;
|
|
55
|
+
show(face: number | string): void;
|
|
56
|
+
next(): void;
|
|
57
|
+
prev(): void;
|
|
58
|
+
}
|
|
59
|
+
declare function defineCube(tag?: string): CustomElementConstructor | undefined;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* `<usa-depth>` — depth parallax: children with `data-depth` (-1…1, 0 = the
|
|
63
|
+
* screen plane) move and scale by depth as the pointer moves, the device
|
|
64
|
+
* tilts (`orientation`) or the page scrolls (`scroll`).
|
|
65
|
+
* Attributes: `source` (`pointer` default · `orientation` · `scroll` ·
|
|
66
|
+
* space-separated mix), `strength` (px at depth 1, 40), `rotate` (max tilt
|
|
67
|
+
* of the whole scene in deg, 0). `requestPermission()` for iOS motion.
|
|
68
|
+
* Reduced motion: layers stay flat.
|
|
69
|
+
*/
|
|
70
|
+
interface UsaDepthElement extends UsaElement {
|
|
71
|
+
/** Current -1…1 input. */
|
|
72
|
+
readonly tilt: {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
};
|
|
76
|
+
requestPermission(): Promise<boolean>;
|
|
77
|
+
}
|
|
78
|
+
declare function defineDepth(tag?: string): CustomElementConstructor | undefined;
|
|
79
|
+
|
|
80
|
+
interface TiltReading {
|
|
81
|
+
/** Left/right tilt, -1…1. */
|
|
82
|
+
x: number;
|
|
83
|
+
/** Front/back tilt, -1…1. */
|
|
84
|
+
y: number;
|
|
85
|
+
}
|
|
86
|
+
/** Map a DeviceOrientation reading (beta/gamma degrees) to -1…1 tilt around a resting pose (pure). */
|
|
87
|
+
declare function orientationToTilt(beta: number | null, gamma: number | null, range?: number, rest?: number): TiltReading;
|
|
88
|
+
/** `true` when DeviceOrientation events exist. */
|
|
89
|
+
declare const supportsOrientation: () => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Ask for motion-sensor permission where required (iOS 13+; must run inside
|
|
92
|
+
* a user gesture). Resolves `true` when tilt events can be used.
|
|
93
|
+
*/
|
|
94
|
+
declare function requestOrientationPermission(): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Listen to device tilt (smoothed); falls back to nothing on desktops.
|
|
97
|
+
* Returns a stop function.
|
|
98
|
+
*/
|
|
99
|
+
declare function deviceTilt(cb: (t: TiltReading) => void, o?: {
|
|
100
|
+
range?: number;
|
|
101
|
+
smooth?: number;
|
|
102
|
+
}): () => void;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* use-scroll-animate/components/depth — 3D (v3.5).
|
|
106
|
+
* `<usa-cube>` (CSS 3D cube), `<usa-depth>` (layered depth parallax driven by
|
|
107
|
+
* pointer, device orientation or scroll) and `deviceTilt()`. The 3D ring
|
|
108
|
+
* carousel is `<usa-carousel-3d>` in `components/cards`.
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/** Register every component of this category under its default tag. */
|
|
112
|
+
declare function defineDepthComponents(): void;
|
|
113
|
+
declare global {
|
|
114
|
+
interface HTMLElementTagNameMap {
|
|
115
|
+
'usa-cube': UsaCubeElement;
|
|
116
|
+
'usa-depth': UsaDepthElement;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { configureComponents, defineCube, defineDepth, defineDepthComponents, deviceTilt, orientationToTilt, prefersReducedMotion, requestOrientationPermission, supportsOrientation };
|
|
121
|
+
export type { ComponentsConfig, TiltReading, UsaCubeElement, UsaDepthElement, UsaElement };
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { h as defineElement, b as clamp, r as raf, e as caf } from '../chunks/base-BpROOcey.js';
|
|
2
|
+
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-BpROOcey.js';
|
|
3
|
+
import { c as createSpring } from '../chunks/spring-C-fw7_9f.js';
|
|
4
|
+
import { g as gesture } from '../chunks/core-uxs3ETou.js';
|
|
5
|
+
|
|
6
|
+
var css = "usa-cube{--usa-cube-size:200px;display:block;width:var(--usa-cube-size);height:var(--usa-cube-size);perspective:var(--usa-cube-perspective,900px);touch-action:pan-y;user-select:none;-webkit-user-select:none;position:relative}usa-cube>[data-face]{position:absolute;inset:0;backface-visibility:hidden;transform:translateZ(calc(var(--usa-cube-size) / -2)) rotateX(var(--usa-cube-rx,0deg)) rotateY(var(--usa-cube-ry,0deg)) var(--usa-face) translateZ(calc(var(--usa-cube-size) / 2));transform-origin:50% 50%}usa-cube>[data-face=\"front\"]{--usa-face:rotateY(0deg)}usa-cube>[data-face=\"right\"]{--usa-face:rotateY(90deg)}usa-cube>[data-face=\"back\"]{--usa-face:rotateY(180deg)}usa-cube>[data-face=\"left\"]{--usa-face:rotateY(-90deg)}usa-cube>[data-face=\"top\"]{--usa-face:rotateX(90deg)}usa-cube>[data-face=\"bottom\"]{--usa-face:rotateX(-90deg)}usa-cube:focus-visible{outline:2px solid currentColor;outline-offset:6px}usa-depth{display:block;position:relative;perspective:1000px}usa-depth>*{transform:var(--usa-depth-rot,none);transform-style:preserve-3d}usa-depth [data-depth]{will-change:transform;transition:transform 0.12s linear}@media (prefers-reduced-motion:reduce){usa-depth [data-depth]{transform:none !important}}";
|
|
7
|
+
|
|
8
|
+
const FACES = ['front', 'right', 'back', 'left', 'top', 'bottom'];
|
|
9
|
+
/** Rotation (deg) that brings each face to the front. */
|
|
10
|
+
const ROT = { front: [0, 0], right: [0, -90], back: [0, -180], left: [0, 90], top: [-90, 0], bottom: [90, 0] };
|
|
11
|
+
function defineCube(tag = 'usa-cube') {
|
|
12
|
+
return defineElement(tag, (Base) => class UsaCube extends Base {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this._i = 0;
|
|
16
|
+
this._base = [0, 0];
|
|
17
|
+
}
|
|
18
|
+
static get observedAttributes() {
|
|
19
|
+
return ['size', 'autoplay'];
|
|
20
|
+
}
|
|
21
|
+
get index() {
|
|
22
|
+
return this._i;
|
|
23
|
+
}
|
|
24
|
+
faces() {
|
|
25
|
+
return Array.from(this.children).filter((c) => c instanceof HTMLElement && !c.hasAttribute('slot')).slice(0, 6);
|
|
26
|
+
}
|
|
27
|
+
paint() {
|
|
28
|
+
this.style.setProperty('--usa-cube-rx', `${this._rx.value}deg`);
|
|
29
|
+
this.style.setProperty('--usa-cube-ry', `${this._ry.value}deg`);
|
|
30
|
+
}
|
|
31
|
+
show(face) {
|
|
32
|
+
const n = this.faces().length || 1;
|
|
33
|
+
const i = typeof face === 'number' ? ((face % n) + n) % n : Math.max(0, FACES.indexOf(face));
|
|
34
|
+
this._i = i;
|
|
35
|
+
const [rx, ry] = ROT[FACES[i]];
|
|
36
|
+
// take the shortest way round on Y
|
|
37
|
+
const cur = this._ry.target;
|
|
38
|
+
const ty = ry + Math.round((cur - ry) / 360) * 360;
|
|
39
|
+
this._base = [rx, ty];
|
|
40
|
+
if (this.reduced) {
|
|
41
|
+
this._rx.jump(rx);
|
|
42
|
+
this._ry.jump(ty);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this._rx.set(rx);
|
|
46
|
+
this._ry.set(ty);
|
|
47
|
+
}
|
|
48
|
+
this.faces().forEach((f, j) => f.setAttribute('aria-hidden', String(j !== i)));
|
|
49
|
+
this.emit('change', { index: i, face: FACES[i] });
|
|
50
|
+
}
|
|
51
|
+
next() {
|
|
52
|
+
this.show(this._i + 1);
|
|
53
|
+
}
|
|
54
|
+
prev() {
|
|
55
|
+
this.show(this._i - 1);
|
|
56
|
+
}
|
|
57
|
+
mount() {
|
|
58
|
+
this.style.setProperty('--usa-cube-size', `${this.num('size', 200)}px`);
|
|
59
|
+
this.style.setProperty('--usa-cube-perspective', `${this.num('perspective', 900)}px`);
|
|
60
|
+
this.faces().forEach((f, j) => f.setAttribute('data-face', FACES[j]));
|
|
61
|
+
if (!this.hasAttribute('tabindex'))
|
|
62
|
+
this.tabIndex = 0;
|
|
63
|
+
if (!this.hasAttribute('role'))
|
|
64
|
+
this.setAttribute('role', 'region');
|
|
65
|
+
if (!this.hasAttribute('aria-roledescription'))
|
|
66
|
+
this.setAttribute('aria-roledescription', 'cube');
|
|
67
|
+
this._rx = createSpring({ spring: 'gentle', onUpdate: () => this.paint() });
|
|
68
|
+
this._ry = createSpring({ spring: 'gentle', onUpdate: () => this.paint() });
|
|
69
|
+
this.show(this._i);
|
|
70
|
+
this.paint();
|
|
71
|
+
this.onCleanup(gesture(this, {
|
|
72
|
+
onPan: ({ dx, dy, last }) => {
|
|
73
|
+
if (this.reduced)
|
|
74
|
+
return;
|
|
75
|
+
if (!last) {
|
|
76
|
+
this._ry.jump(this._base[1] + dx * 0.5);
|
|
77
|
+
this._rx.jump(this._base[0] - dy * 0.5);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (Math.abs(dx) > 40 && Math.abs(dx) >= Math.abs(dy))
|
|
81
|
+
return dx < 0 ? this.next() : this.prev();
|
|
82
|
+
if (Math.abs(dy) > 40 && this.faces().length > 4)
|
|
83
|
+
return this.show(dy < 0 ? 'bottom' : 'top');
|
|
84
|
+
this.show(this._i);
|
|
85
|
+
},
|
|
86
|
+
}));
|
|
87
|
+
this.listen(this, 'keydown', (e) => {
|
|
88
|
+
const k = { ArrowRight: () => this.next(), ArrowLeft: () => this.prev(), ArrowUp: () => this.show('bottom'), ArrowDown: () => this.show('top'), Home: () => this.show(0) };
|
|
89
|
+
if (!k[e.key] || ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && this.faces().length < 6))
|
|
90
|
+
return;
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
k[e.key]();
|
|
93
|
+
});
|
|
94
|
+
const ms = this.num('autoplay', 0);
|
|
95
|
+
if (ms > 0 && !this.reduced) {
|
|
96
|
+
let paused = false;
|
|
97
|
+
const id = setInterval(() => !paused && this.show((this._i + 1) % Math.min(4, this.faces().length || 1)), ms);
|
|
98
|
+
this.listen(this, 'pointerenter', () => (paused = true));
|
|
99
|
+
this.listen(this, 'pointerleave', () => (paused = false));
|
|
100
|
+
this.listen(this, 'focusin', () => (paused = true));
|
|
101
|
+
this.listen(this, 'focusout', () => (paused = false));
|
|
102
|
+
this.onCleanup(() => clearInterval(id));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
unmount() {
|
|
106
|
+
this._rx?.stop();
|
|
107
|
+
this._ry?.stop();
|
|
108
|
+
}
|
|
109
|
+
}, { id: 'depth', text: css });
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Map a DeviceOrientation reading (beta/gamma degrees) to -1…1 tilt around a resting pose (pure). */
|
|
113
|
+
function orientationToTilt(beta, gamma, range = 30, rest = 45) {
|
|
114
|
+
return {
|
|
115
|
+
x: clamp((gamma ?? 0) / range, -1, 1),
|
|
116
|
+
y: clamp(((beta ?? rest) - rest) / range, -1, 1),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/** `true` when DeviceOrientation events exist. */
|
|
120
|
+
const supportsOrientation = () => typeof window !== 'undefined' && 'DeviceOrientationEvent' in window;
|
|
121
|
+
/**
|
|
122
|
+
* Ask for motion-sensor permission where required (iOS 13+; must run inside
|
|
123
|
+
* a user gesture). Resolves `true` when tilt events can be used.
|
|
124
|
+
*/
|
|
125
|
+
async function requestOrientationPermission() {
|
|
126
|
+
if (!supportsOrientation())
|
|
127
|
+
return false;
|
|
128
|
+
const D = window.DeviceOrientationEvent;
|
|
129
|
+
if (typeof D.requestPermission !== 'function')
|
|
130
|
+
return true;
|
|
131
|
+
try {
|
|
132
|
+
return (await D.requestPermission()) === 'granted';
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Listen to device tilt (smoothed); falls back to nothing on desktops.
|
|
140
|
+
* Returns a stop function.
|
|
141
|
+
*/
|
|
142
|
+
function deviceTilt(cb, o = {}) {
|
|
143
|
+
if (!supportsOrientation())
|
|
144
|
+
return () => { };
|
|
145
|
+
let cur = { x: 0, y: 0 };
|
|
146
|
+
const k = 1 - clamp(o.smooth ?? 0.2, 0, 0.95);
|
|
147
|
+
const on = (e) => {
|
|
148
|
+
const t = orientationToTilt(e.beta, e.gamma, o.range ?? 30);
|
|
149
|
+
cur = { x: cur.x + (t.x - cur.x) * k, y: cur.y + (t.y - cur.y) * k };
|
|
150
|
+
cb(cur);
|
|
151
|
+
};
|
|
152
|
+
window.addEventListener('deviceorientation', on);
|
|
153
|
+
return () => window.removeEventListener('deviceorientation', on);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function defineDepth(tag = 'usa-depth') {
|
|
157
|
+
return defineElement(tag, (Base) => class UsaDepth extends Base {
|
|
158
|
+
constructor() {
|
|
159
|
+
super(...arguments);
|
|
160
|
+
this._t = { x: 0, y: 0 };
|
|
161
|
+
this._id = 0;
|
|
162
|
+
}
|
|
163
|
+
static get observedAttributes() {
|
|
164
|
+
return ['source', 'strength', 'rotate'];
|
|
165
|
+
}
|
|
166
|
+
get tilt() {
|
|
167
|
+
return { ...this._t };
|
|
168
|
+
}
|
|
169
|
+
requestPermission() {
|
|
170
|
+
return requestOrientationPermission().then((ok) => {
|
|
171
|
+
if (ok) {
|
|
172
|
+
this.changed('source');
|
|
173
|
+
}
|
|
174
|
+
return ok;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
apply() {
|
|
178
|
+
this._id = 0;
|
|
179
|
+
const s = this.num('strength', 40);
|
|
180
|
+
const r = this.num('rotate', 0);
|
|
181
|
+
const { x, y } = this._t;
|
|
182
|
+
this.style.setProperty('--usa-depth-x', x.toFixed(4));
|
|
183
|
+
this.style.setProperty('--usa-depth-y', y.toFixed(4));
|
|
184
|
+
if (r)
|
|
185
|
+
this.style.setProperty('--usa-depth-rot', `rotateX(${(-y * r).toFixed(2)}deg) rotateY(${(x * r).toFixed(2)}deg)`);
|
|
186
|
+
this.querySelectorAll('[data-depth]').forEach((el) => {
|
|
187
|
+
const d = clamp(Number(el.dataset.depth) || 0, -1, 1);
|
|
188
|
+
el.style.transform = `translate3d(${(x * d * s).toFixed(2)}px, ${(y * d * s).toFixed(2)}px, 0) scale(${(1 + d * 0.04).toFixed(4)})`;
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
set(x, y) {
|
|
192
|
+
this._t = { x: clamp(x, -1, 1), y: clamp(y, -1, 1) };
|
|
193
|
+
if (!this._id)
|
|
194
|
+
this._id = raf(() => this.apply());
|
|
195
|
+
}
|
|
196
|
+
mount() {
|
|
197
|
+
if (this.reduced)
|
|
198
|
+
return;
|
|
199
|
+
const src = this.str('source', 'pointer').split(/\s+/);
|
|
200
|
+
if (src.includes('pointer')) {
|
|
201
|
+
this.listen(this, 'pointermove', (e) => {
|
|
202
|
+
const r = this.getBoundingClientRect();
|
|
203
|
+
this.set(((e.clientX - r.left) / (r.width || 1)) * 2 - 1, ((e.clientY - r.top) / (r.height || 1)) * 2 - 1);
|
|
204
|
+
});
|
|
205
|
+
this.listen(this, 'pointerleave', () => this.set(0, 0));
|
|
206
|
+
}
|
|
207
|
+
if (src.includes('orientation') && supportsOrientation())
|
|
208
|
+
this.onCleanup(deviceTilt((t) => this.set(t.x, t.y)));
|
|
209
|
+
if (src.includes('scroll')) {
|
|
210
|
+
const on = () => {
|
|
211
|
+
const r = this.getBoundingClientRect();
|
|
212
|
+
const vh = window.innerHeight || 1;
|
|
213
|
+
this.set(this._t.x, clamp(((r.top + r.height / 2) / vh) * 2 - 1, -1, 1));
|
|
214
|
+
};
|
|
215
|
+
this.listen(window, 'scroll', on, { passive: true });
|
|
216
|
+
on();
|
|
217
|
+
}
|
|
218
|
+
this.onCleanup(() => {
|
|
219
|
+
caf(this._id);
|
|
220
|
+
this._id = 0;
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
unmount() {
|
|
224
|
+
this._t = { x: 0, y: 0 };
|
|
225
|
+
this.querySelectorAll('[data-depth]').forEach((el) => (el.style.transform = ''));
|
|
226
|
+
}
|
|
227
|
+
}, { id: 'depth', text: css });
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* use-scroll-animate/components/depth — 3D (v3.5).
|
|
232
|
+
* `<usa-cube>` (CSS 3D cube), `<usa-depth>` (layered depth parallax driven by
|
|
233
|
+
* pointer, device orientation or scroll) and `deviceTilt()`. The 3D ring
|
|
234
|
+
* carousel is `<usa-carousel-3d>` in `components/cards`.
|
|
235
|
+
*/
|
|
236
|
+
/** Register every component of this category under its default tag. */
|
|
237
|
+
function defineDepthComponents() {
|
|
238
|
+
defineCube();
|
|
239
|
+
defineDepth();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { defineCube, defineDepth, defineDepthComponents, deviceTilt, orientationToTilt, requestOrientationPermission, supportsOrientation };
|
|
243
|
+
//# sourceMappingURL=depth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth.js","sources":["../../src/components/depth/cube.ts","../../src/components/depth/core.ts","../../src/components/depth/depth-el.ts","../../src/components/depth/index.ts"],"sourcesContent":["import { defineElement, type UsaElement } from '../base';\nimport { createSpring, type SpringValue } from '../physics/spring';\nimport { gesture } from '../gesture/core';\nimport css from './depth.css?raw';\n\nconst FACES = ['front', 'right', 'back', 'left', 'top', 'bottom'] as const;\n/** Rotation (deg) that brings each face to the front. */\nconst ROT: Record<string, [number, number]> = { front: [0, 0], right: [0, -90], back: [0, -180], left: [0, 90], top: [-90, 0], bottom: [90, 0] };\n\n/**\n * `<usa-cube>` — a CSS 3D cube whose up-to-six element children are its faces\n * (front, right, back, left, top, bottom). Rotate with drag / swipe, arrow\n * keys, `autoplay` (ms) or `show(face | index)`; spring-driven.\n * Attributes: `size` (px, 200), `autoplay`, `perspective` (900).\n * `usa:change` (`{ index, face }`). Reduced motion: instant face switch.\n */\nexport interface UsaCubeElement extends UsaElement {\n readonly index: number;\n show(face: number | string): void;\n next(): void;\n prev(): void;\n}\n\nexport function defineCube(tag = 'usa-cube'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaCube extends Base {\n static get observedAttributes(): string[] {\n return ['size', 'autoplay'];\n }\n private _i = 0;\n private _rx!: SpringValue;\n private _ry!: SpringValue;\n private _base: [number, number] = [0, 0];\n\n get index(): number {\n return this._i;\n }\n\n private faces(): HTMLElement[] {\n return Array.from(this.children).filter((c) => c instanceof HTMLElement && !c.hasAttribute('slot')).slice(0, 6) as HTMLElement[];\n }\n\n private paint(): void {\n this.style.setProperty('--usa-cube-rx', `${this._rx.value}deg`);\n this.style.setProperty('--usa-cube-ry', `${this._ry.value}deg`);\n }\n\n show(face: number | string): void {\n const n = this.faces().length || 1;\n const i = typeof face === 'number' ? ((face % n) + n) % n : Math.max(0, FACES.indexOf(face as any));\n this._i = i;\n const [rx, ry] = ROT[FACES[i]];\n // take the shortest way round on Y\n const cur = this._ry.target;\n const ty = ry + Math.round((cur - ry) / 360) * 360;\n this._base = [rx, ty];\n if (this.reduced) {\n this._rx.jump(rx);\n this._ry.jump(ty);\n } else {\n this._rx.set(rx);\n this._ry.set(ty);\n }\n this.faces().forEach((f, j) => f.setAttribute('aria-hidden', String(j !== i)));\n this.emit('change', { index: i, face: FACES[i] });\n }\n\n next(): void {\n this.show(this._i + 1);\n }\n\n prev(): void {\n this.show(this._i - 1);\n }\n\n mount(): void {\n this.style.setProperty('--usa-cube-size', `${this.num('size', 200)}px`);\n this.style.setProperty('--usa-cube-perspective', `${this.num('perspective', 900)}px`);\n this.faces().forEach((f, j) => f.setAttribute('data-face', FACES[j]));\n if (!this.hasAttribute('tabindex')) this.tabIndex = 0;\n if (!this.hasAttribute('role')) this.setAttribute('role', 'region');\n if (!this.hasAttribute('aria-roledescription')) this.setAttribute('aria-roledescription', 'cube');\n this._rx = createSpring({ spring: 'gentle', onUpdate: () => this.paint() });\n this._ry = createSpring({ spring: 'gentle', onUpdate: () => this.paint() });\n this.show(this._i);\n this.paint();\n this.onCleanup(\n gesture(this, {\n onPan: ({ dx, dy, last }) => {\n if (this.reduced) return;\n if (!last) {\n this._ry.jump(this._base[1] + dx * 0.5);\n this._rx.jump(this._base[0] - dy * 0.5);\n return;\n }\n if (Math.abs(dx) > 40 && Math.abs(dx) >= Math.abs(dy)) return dx < 0 ? this.next() : this.prev();\n if (Math.abs(dy) > 40 && this.faces().length > 4) return this.show(dy < 0 ? 'bottom' : 'top');\n this.show(this._i);\n },\n })\n );\n this.listen(this, 'keydown', (e: KeyboardEvent) => {\n const k: Record<string, () => void> = { ArrowRight: () => this.next(), ArrowLeft: () => this.prev(), ArrowUp: () => this.show('bottom'), ArrowDown: () => this.show('top'), Home: () => this.show(0) };\n if (!k[e.key] || ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && this.faces().length < 6)) return;\n e.preventDefault();\n k[e.key]();\n });\n const ms = this.num('autoplay', 0);\n if (ms > 0 && !this.reduced) {\n let paused = false;\n const id = setInterval(() => !paused && this.show((this._i + 1) % Math.min(4, this.faces().length || 1)), ms);\n this.listen(this, 'pointerenter', () => (paused = true));\n this.listen(this, 'pointerleave', () => (paused = false));\n this.listen(this, 'focusin', () => (paused = true));\n this.listen(this, 'focusout', () => (paused = false));\n this.onCleanup(() => clearInterval(id));\n }\n }\n\n unmount(): void {\n this._rx?.stop();\n this._ry?.stop();\n }\n },\n { id: 'depth', text: css }\n );\n}\n","import { clamp } from '../base';\n\nexport interface TiltReading {\n /** Left/right tilt, -1…1. */\n x: number;\n /** Front/back tilt, -1…1. */\n y: number;\n}\n\n/** Map a DeviceOrientation reading (beta/gamma degrees) to -1…1 tilt around a resting pose (pure). */\nexport function orientationToTilt(beta: number | null, gamma: number | null, range = 30, rest = 45): TiltReading {\n return {\n x: clamp((gamma ?? 0) / range, -1, 1),\n y: clamp(((beta ?? rest) - rest) / range, -1, 1),\n };\n}\n\n/** `true` when DeviceOrientation events exist. */\nexport const supportsOrientation = (): boolean => typeof window !== 'undefined' && 'DeviceOrientationEvent' in window;\n\n/**\n * Ask for motion-sensor permission where required (iOS 13+; must run inside\n * a user gesture). Resolves `true` when tilt events can be used.\n */\nexport async function requestOrientationPermission(): Promise<boolean> {\n if (!supportsOrientation()) return false;\n const D = (window as any).DeviceOrientationEvent;\n if (typeof D.requestPermission !== 'function') return true;\n try {\n return (await D.requestPermission()) === 'granted';\n } catch {\n return false;\n }\n}\n\n/**\n * Listen to device tilt (smoothed); falls back to nothing on desktops.\n * Returns a stop function.\n */\nexport function deviceTilt(cb: (t: TiltReading) => void, o: { range?: number; smooth?: number } = {}): () => void {\n if (!supportsOrientation()) return () => {};\n let cur: TiltReading = { x: 0, y: 0 };\n const k = 1 - clamp(o.smooth ?? 0.2, 0, 0.95);\n const on = (e: DeviceOrientationEvent) => {\n const t = orientationToTilt(e.beta, e.gamma, o.range ?? 30);\n cur = { x: cur.x + (t.x - cur.x) * k, y: cur.y + (t.y - cur.y) * k };\n cb(cur);\n };\n window.addEventListener('deviceorientation', on);\n return () => window.removeEventListener('deviceorientation', on);\n}\n","import { defineElement, raf, caf, clamp, type UsaElement } from '../base';\nimport { deviceTilt, requestOrientationPermission, supportsOrientation } from './core';\nimport css from './depth.css?raw';\n\n/**\n * `<usa-depth>` — depth parallax: children with `data-depth` (-1…1, 0 = the\n * screen plane) move and scale by depth as the pointer moves, the device\n * tilts (`orientation`) or the page scrolls (`scroll`).\n * Attributes: `source` (`pointer` default · `orientation` · `scroll` ·\n * space-separated mix), `strength` (px at depth 1, 40), `rotate` (max tilt\n * of the whole scene in deg, 0). `requestPermission()` for iOS motion.\n * Reduced motion: layers stay flat.\n */\nexport interface UsaDepthElement extends UsaElement {\n /** Current -1…1 input. */\n readonly tilt: { x: number; y: number };\n requestPermission(): Promise<boolean>;\n}\n\nexport function defineDepth(tag = 'usa-depth'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaDepth extends Base {\n static get observedAttributes(): string[] {\n return ['source', 'strength', 'rotate'];\n }\n private _t = { x: 0, y: 0 };\n private _id = 0;\n\n get tilt(): { x: number; y: number } {\n return { ...this._t };\n }\n\n requestPermission(): Promise<boolean> {\n return requestOrientationPermission().then((ok) => {\n if (ok) {\n this.changed('source');\n }\n return ok;\n });\n }\n\n private apply(): void {\n this._id = 0;\n const s = this.num('strength', 40);\n const r = this.num('rotate', 0);\n const { x, y } = this._t;\n this.style.setProperty('--usa-depth-x', x.toFixed(4));\n this.style.setProperty('--usa-depth-y', y.toFixed(4));\n if (r) this.style.setProperty('--usa-depth-rot', `rotateX(${(-y * r).toFixed(2)}deg) rotateY(${(x * r).toFixed(2)}deg)`);\n this.querySelectorAll<HTMLElement>('[data-depth]').forEach((el) => {\n const d = clamp(Number(el.dataset.depth) || 0, -1, 1);\n el.style.transform = `translate3d(${(x * d * s).toFixed(2)}px, ${(y * d * s).toFixed(2)}px, 0) scale(${(1 + d * 0.04).toFixed(4)})`;\n });\n }\n\n private set(x: number, y: number): void {\n this._t = { x: clamp(x, -1, 1), y: clamp(y, -1, 1) };\n if (!this._id) this._id = raf(() => this.apply());\n }\n\n mount(): void {\n if (this.reduced) return;\n const src = this.str('source', 'pointer').split(/\\s+/);\n if (src.includes('pointer')) {\n this.listen(this, 'pointermove', (e: PointerEvent) => {\n const r = this.getBoundingClientRect();\n this.set(((e.clientX - r.left) / (r.width || 1)) * 2 - 1, ((e.clientY - r.top) / (r.height || 1)) * 2 - 1);\n });\n this.listen(this, 'pointerleave', () => this.set(0, 0));\n }\n if (src.includes('orientation') && supportsOrientation()) this.onCleanup(deviceTilt((t) => this.set(t.x, t.y)));\n if (src.includes('scroll')) {\n const on = () => {\n const r = this.getBoundingClientRect();\n const vh = window.innerHeight || 1;\n this.set(this._t.x, clamp(((r.top + r.height / 2) / vh) * 2 - 1, -1, 1));\n };\n this.listen(window, 'scroll', on, { passive: true });\n on();\n }\n this.onCleanup(() => {\n caf(this._id);\n this._id = 0;\n });\n }\n\n unmount(): void {\n this._t = { x: 0, y: 0 };\n this.querySelectorAll<HTMLElement>('[data-depth]').forEach((el) => (el.style.transform = ''));\n }\n },\n { id: 'depth', text: css }\n );\n}\n","/**\n * use-scroll-animate/components/depth — 3D (v3.5).\n * `<usa-cube>` (CSS 3D cube), `<usa-depth>` (layered depth parallax driven by\n * pointer, device orientation or scroll) and `deviceTilt()`. The 3D ring\n * carousel is `<usa-carousel-3d>` in `components/cards`.\n */\nimport { defineCube, type UsaCubeElement } from './cube';\nimport { defineDepth, type UsaDepthElement } from './depth-el';\n\nexport { defineCube, defineDepth };\nexport { deviceTilt, orientationToTilt, requestOrientationPermission, supportsOrientation } from './core';\nexport type { TiltReading } from './core';\nexport type { UsaCubeElement, UsaDepthElement };\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 defineDepthComponents(): void {\n defineCube();\n defineDepth();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-cube': UsaCubeElement;\n 'usa-depth': UsaDepthElement;\n }\n}\n"],"names":[],"mappings":";;;;;;;AAKA,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAU;AAC1E;AACA,MAAM,GAA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ACpD,gBAAA,EAAE,EAAE;YACN;AACA,YAAA,IAAI,CAAC,SAAS,CAAC,MAAK;AAClB,gBAAA,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;AACb,gBAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACd,YAAA,CAAC,CAAC;QACJ;QAEA,OAAO,GAAA;AACL,YAAA,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;YACxB,IAAI,CAAC,gBAAgB,CAAc,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC;QAC/F;KACD,EACH,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAC3B;AACH;;AC/FA;;;;;AAKG;AAWH;SACgB,qBAAqB,GAAA;AACnC,IAAA,UAAU,EAAE;AACZ,IAAA,WAAW,EAAE;AACf;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as defineElement, k as kindOf, i as EASE_OUT,
|
|
2
|
-
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-
|
|
1
|
+
import { h as defineElement, k as kindOf, i as EASE_OUT, b as clamp, F as FLUENT_DECELERATE, E as EASE_SPRING } from '../chunks/base-BpROOcey.js';
|
|
2
|
+
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-BpROOcey.js';
|
|
3
3
|
|
|
4
4
|
var css$4 = "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}}";
|
|
5
5
|
|