@streamsai/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +57 -2
- package/dist/components/ui/agent-avatar.d.ts +50 -0
- package/dist/components/ui/agent-avatar.js +38 -0
- package/dist/components/ui/alert-dialog.d.ts +12 -0
- package/dist/components/ui/alert-dialog.js +37 -0
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/alert.js +28 -0
- package/dist/components/ui/assets/loader.json.js +1 -0
- package/dist/components/ui/avatar-frame.d.ts +11 -0
- package/dist/components/ui/avatar-frame.js +20 -0
- package/dist/components/ui/avatar.d.ts +23 -0
- package/dist/components/ui/avatar.js +54 -0
- package/dist/components/ui/badge.d.ts +7 -0
- package/dist/components/ui/badge.js +36 -0
- package/dist/components/ui/bar-list.d.ts +40 -0
- package/dist/components/ui/bar-list.js +37 -0
- package/dist/components/ui/breadcrumb.d.ts +8 -0
- package/dist/components/ui/breadcrumb.js +21 -0
- package/dist/components/ui/button-group.d.ts +10 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +9 -0
- package/dist/components/ui/button.js +39 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.js +25 -0
- package/dist/components/ui/checkbox.d.ts +3 -0
- package/dist/components/ui/checkbox.js +16 -0
- package/dist/components/ui/chip.d.ts +13 -0
- package/dist/components/ui/chip.js +22 -0
- package/dist/components/ui/clickable.d.ts +27 -0
- package/dist/components/ui/clickable.js +54 -0
- package/dist/components/ui/code-block.d.ts +68 -0
- package/dist/components/ui/code-block.js +112 -0
- package/dist/components/ui/code-view.d.ts +21 -0
- package/dist/components/ui/code-view.js +20 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.js +18 -0
- package/dist/components/ui/combobox.d.ts +14 -0
- package/dist/components/ui/combobox.js +37 -0
- package/dist/components/ui/command.d.ts +15 -0
- package/dist/components/ui/command.js +34 -0
- package/dist/components/ui/context-menu.d.ts +21 -0
- package/dist/components/ui/context-menu.js +60 -0
- package/dist/components/ui/counter.d.ts +11 -0
- package/dist/components/ui/counter.js +20 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.js +41 -0
- package/dist/components/ui/disabled-reason.d.ts +22 -0
- package/dist/components/ui/disabled-reason.js +16 -0
- package/dist/components/ui/dropdown-menu.d.ts +33 -0
- package/dist/components/ui/dropdown-menu.js +58 -0
- package/dist/components/ui/editable-text.d.ts +95 -0
- package/dist/components/ui/editable-text.js +191 -0
- package/dist/components/ui/heading.d.ts +24 -0
- package/dist/components/ui/heading.js +92 -0
- package/dist/components/ui/hover-card.d.ts +9 -0
- package/dist/components/ui/hover-card.js +16 -0
- package/dist/components/ui/icon-button.d.ts +23 -0
- package/dist/components/ui/icon-button.js +32 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +8 -0
- package/dist/components/ui/kbd.d.ts +12 -0
- package/dist/components/ui/kbd.js +12 -0
- package/dist/components/ui/label.d.ts +3 -0
- package/dist/components/ui/label.js +7 -0
- package/dist/components/ui/loader.d.ts +19 -0
- package/dist/components/ui/loader.js +157 -0
- package/dist/components/ui/message-toolbar.d.ts +20 -0
- package/dist/components/ui/message-toolbar.js +17 -0
- package/dist/components/ui/modal.d.ts +30 -0
- package/dist/components/ui/modal.js +41 -0
- package/dist/components/ui/nav-item.d.ts +25 -0
- package/dist/components/ui/nav-item.js +66 -0
- package/dist/components/ui/panel-section.d.ts +22 -0
- package/dist/components/ui/panel-section.js +26 -0
- package/dist/components/ui/popover.d.ts +14 -0
- package/dist/components/ui/popover.js +30 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.js +16 -0
- package/dist/components/ui/provider-badge.d.ts +22 -0
- package/dist/components/ui/provider-badge.js +38 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +21 -0
- package/dist/components/ui/reply-summary.d.ts +16 -0
- package/dist/components/ui/reply-summary.js +8 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.js +15 -0
- package/dist/components/ui/rich-text-editor.d.ts +447 -0
- package/dist/components/ui/rich-text-editor.js +2419 -0
- package/dist/components/ui/running-indicator.d.ts +17 -0
- package/dist/components/ui/running-indicator.js +34 -0
- package/dist/components/ui/sandboxed-frame.d.ts +29 -0
- package/dist/components/ui/sandboxed-frame.js +77 -0
- package/dist/components/ui/scroll-area.d.ts +14 -0
- package/dist/components/ui/scroll-area.js +17 -0
- package/dist/components/ui/section-header.d.ts +12 -0
- package/dist/components/ui/section-header.js +12 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/select.js +40 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/separator.js +13 -0
- package/dist/components/ui/sheet.d.ts +23 -0
- package/dist/components/ui/sheet.js +48 -0
- package/dist/components/ui/shimmer-text.d.ts +26 -0
- package/dist/components/ui/shimmer-text.js +32 -0
- package/dist/components/ui/sidebar.d.ts +63 -0
- package/dist/components/ui/sidebar.js +283 -0
- package/dist/components/ui/skeleton.d.ts +14 -0
- package/dist/components/ui/skeleton.js +12 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.js +14 -0
- package/dist/components/ui/spark-bars.d.ts +29 -0
- package/dist/components/ui/spark-bars.js +24 -0
- package/dist/components/ui/spinner.d.ts +16 -0
- package/dist/components/ui/spinner.js +26 -0
- package/dist/components/ui/stacked-bar.d.ts +37 -0
- package/dist/components/ui/stacked-bar.js +56 -0
- package/dist/components/ui/status-dot.d.ts +16 -0
- package/dist/components/ui/status-dot.js +32 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.js +13 -0
- package/dist/components/ui/tabs.d.ts +14 -0
- package/dist/components/ui/tabs.js +55 -0
- package/dist/components/ui/text.d.ts +27 -0
- package/dist/components/ui/text.js +100 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +7 -0
- package/dist/components/ui/theme-toggle.d.ts +21 -0
- package/dist/components/ui/theme-toggle.js +17 -0
- package/dist/components/ui/toggle-group.d.ts +6 -0
- package/dist/components/ui/toggle-group.js +12 -0
- package/dist/components/ui/tooltip.d.ts +11 -0
- package/dist/components/ui/tooltip.js +21 -0
- package/dist/components/ui/trace.d.ts +24 -0
- package/dist/components/ui/trace.js +57 -0
- package/dist/components/ui/trend-line.d.ts +93 -0
- package/dist/components/ui/trend-line.js +215 -0
- package/dist/components/ui/truncate.d.ts +30 -0
- package/dist/components/ui/truncate.js +54 -0
- package/dist/components/ui/viewer-shell.d.ts +55 -0
- package/dist/components/ui/viewer-shell.js +15 -0
- package/dist/components/ui/virtual-list.d.ts +91 -0
- package/dist/components/ui/virtual-list.js +406 -0
- package/dist/components/ui/visually-hidden.d.ts +15 -0
- package/dist/components/ui/visually-hidden.js +19 -0
- package/dist/direction/index.d.ts +19 -0
- package/dist/direction/index.js +32 -0
- package/dist/hooks/use-code-highlighting.d.ts +22 -0
- package/dist/hooks/use-code-highlighting.js +47 -0
- package/dist/hooks/use-is-truncated.d.ts +7 -0
- package/dist/hooks/use-is-truncated.js +23 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/icons/custom.d.ts +29 -0
- package/dist/icons/custom.js +48 -0
- package/dist/icons/index.d.ts +49 -0
- package/dist/icons/index.js +50 -0
- package/dist/icons/provider-logos.d.ts +17 -0
- package/dist/icons/provider-logos.js +28 -0
- package/dist/icons/providers.d.ts +9 -0
- package/dist/icons/providers.js +51 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +124 -0
- package/dist/lib/code-highlighter.d.ts +9 -0
- package/dist/lib/code-highlighter.js +65 -0
- package/dist/lib/code-language.d.ts +13 -0
- package/dist/lib/code-language.js +103 -0
- package/dist/lib/code-tokens.d.ts +9 -0
- package/dist/lib/code-tokens.js +27 -0
- package/dist/lib/copy-text.d.ts +6 -0
- package/dist/lib/copy-text.js +46 -0
- package/dist/lib/home-tile.d.ts +12 -0
- package/dist/lib/home-tile.js +45 -0
- package/dist/lib/reveal-mask.d.ts +9 -0
- package/dist/lib/reveal-mask.js +16 -0
- package/dist/lib/text-direction.d.ts +28 -0
- package/dist/lib/text-direction.js +119 -0
- package/dist/lib/utils.d.ts +11 -0
- package/dist/lib/utils.js +30 -0
- package/dist/motion/components.d.ts +184 -0
- package/dist/motion/components.js +211 -0
- package/dist/motion/config.d.ts +849 -0
- package/dist/motion/config.js +429 -0
- package/dist/motion/index.d.ts +8 -0
- package/dist/motion/index.js +8 -0
- package/dist/motion/modal-presence.d.ts +5 -0
- package/dist/motion/modal-presence.js +27 -0
- package/dist/motion/popup.d.ts +77 -0
- package/dist/motion/popup.js +103 -0
- package/dist/platform/index.d.ts +29 -0
- package/dist/platform/index.js +63 -0
- package/dist/styles/base.css +319 -0
- package/dist/styles/fonts/Figtree-Variable.woff2 +0 -0
- package/dist/styles/fonts/OFL.txt +93 -0
- package/dist/styles/fonts/Poppins-Medium.woff2 +0 -0
- package/dist/styles/fonts/Poppins-Regular.woff2 +0 -0
- package/dist/styles/fonts/Poppins-SemiBold.woff2 +0 -0
- package/dist/styles/fonts.css +28 -0
- package/dist/styles/globals.css +8 -0
- package/dist/styles/mcp-host.css +76 -0
- package/dist/styles/tokens.css +387 -0
- package/dist/styles/tokens.d.mts +57 -0
- package/dist/styles/tokens.mjs +59 -0
- package/dist/theme/index.d.ts +28 -0
- package/dist/theme/index.js +65 -0
- package/package.json +136 -3
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
import type { Transition } from 'motion/react';
|
|
2
|
+
/**
|
|
3
|
+
* The one place motion is tuned. Every animation in the product is a `motion` (motion.dev)
|
|
4
|
+
* animation that reads its timing from here: popups, dialogs, sheets, collapses, route and pane
|
|
5
|
+
* changes, lists, progress, loops. CSS does not animate, with two exceptions that cannot be
|
|
6
|
+
* `motion` without real cost: hover/focus/press feedback on colour, border, shadow and opacity
|
|
7
|
+
* (driven by pseudo-classes), and the mobile View Transitions. Those read the `--motion-*`
|
|
8
|
+
* custom properties in `styles/tokens.css`, which mirror `duration` and `ease` below;
|
|
9
|
+
* `config.test.ts` fails when the two drift, so a change here is a change in tokens.css too.
|
|
10
|
+
*
|
|
11
|
+
* The house style is quick and quiet: things arrive with a short fade and a few pixels of travel,
|
|
12
|
+
* leave faster than they came, and nothing bounces more than a hair. Reduced motion is honoured
|
|
13
|
+
* globally (`MotionProvider` and the reset in `globals.css`), so no call site checks it.
|
|
14
|
+
*/
|
|
15
|
+
type CubicBezier = [number, number, number, number];
|
|
16
|
+
/** Seconds (what `motion` takes). tokens.css carries the same numbers in ms. */
|
|
17
|
+
export declare const duration: {
|
|
18
|
+
/** Sense `short-100`: a small element leaving (`presets.scaleIn`'s exit). */
|
|
19
|
+
readonly short: 0.1;
|
|
20
|
+
/** Hover washes, icon swaps, press feedback: anything the pointer is already on. */
|
|
21
|
+
readonly fast: 0.12;
|
|
22
|
+
/** The default: popups, panels, rows entering, route content, collapses. */
|
|
23
|
+
readonly base: 0.2;
|
|
24
|
+
/** Large surfaces travelling a long way: sheets, the details pane, the viewer. */
|
|
25
|
+
readonly slow: 0.32;
|
|
26
|
+
/** One orchestrated page-load moment (brand and auth pages, `presets.reveal`). */
|
|
27
|
+
readonly reveal: 0.48;
|
|
28
|
+
};
|
|
29
|
+
export declare const ease: {
|
|
30
|
+
/** Symmetric, for things that change in place (colour, width, rotation). */
|
|
31
|
+
readonly standard: CubicBezier;
|
|
32
|
+
/** Entrances: fast start, long soft landing. */
|
|
33
|
+
readonly out: CubicBezier;
|
|
34
|
+
/** Exits: leave quickly, no lingering. */
|
|
35
|
+
readonly in: CubicBezier;
|
|
36
|
+
/** Sense `ease-enter`: decelerates into place, for scale entrances. */
|
|
37
|
+
readonly enter: CubicBezier;
|
|
38
|
+
/** Sense `ease-exit`: accelerates away, for scale exits. */
|
|
39
|
+
readonly exit: CubicBezier;
|
|
40
|
+
};
|
|
41
|
+
/** Springs for things that move because the layout moved (reorders, pills, indicators). */
|
|
42
|
+
export declare const spring: {
|
|
43
|
+
/** Layout shifts, reorders, a tab indicator sliding: settles in about `base`. */
|
|
44
|
+
readonly snappy: {
|
|
45
|
+
readonly type: "spring";
|
|
46
|
+
readonly visualDuration: 0.22;
|
|
47
|
+
readonly bounce: 0.12;
|
|
48
|
+
};
|
|
49
|
+
/** Small things popping into place (reactions, badges): a touch of overshoot. */
|
|
50
|
+
readonly pop: {
|
|
51
|
+
readonly type: "spring";
|
|
52
|
+
readonly visualDuration: 0.24;
|
|
53
|
+
readonly bounce: 0.28;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/** Pixels of travel. Motion here suggests direction, it never carries content across the screen. */
|
|
57
|
+
export declare const distance: {
|
|
58
|
+
/** Rows, route content, toasts: the default rise. */
|
|
59
|
+
readonly nudge: 4;
|
|
60
|
+
/** Cards and empty states arriving on their own. */
|
|
61
|
+
readonly rise: 8;
|
|
62
|
+
/** Panels and drawers sliding in from an edge. */
|
|
63
|
+
readonly slide: 16;
|
|
64
|
+
};
|
|
65
|
+
/** Scale a popping element starts from. */
|
|
66
|
+
export declare const scale: {
|
|
67
|
+
readonly pop: 0.94;
|
|
68
|
+
/** Popups and dialogs growing out of their trigger. */
|
|
69
|
+
readonly popup: 0.96;
|
|
70
|
+
readonly subtle: 0.98;
|
|
71
|
+
/** Sense `scale-enter` / `scale-exit`: never from 0, always from 95%. */
|
|
72
|
+
readonly enter: 0.95;
|
|
73
|
+
};
|
|
74
|
+
/** Seconds between siblings in a staggered group, and the ceiling on the whole cascade. */
|
|
75
|
+
export declare const stagger: {
|
|
76
|
+
readonly step: 0.03;
|
|
77
|
+
/** Sense `short-20`: the offset between peers entering together, and an exit's fade delay. */
|
|
78
|
+
readonly offset: 0.02;
|
|
79
|
+
/** Items beyond this delay arrive together, so a long list never takes long to appear. */
|
|
80
|
+
readonly max: 0.18;
|
|
81
|
+
};
|
|
82
|
+
/** Ready-made transitions for the common cases. */
|
|
83
|
+
export declare const transitions: {
|
|
84
|
+
readonly fast: {
|
|
85
|
+
readonly duration: 0.12;
|
|
86
|
+
readonly ease: CubicBezier;
|
|
87
|
+
};
|
|
88
|
+
readonly base: {
|
|
89
|
+
readonly duration: 0.2;
|
|
90
|
+
readonly ease: CubicBezier;
|
|
91
|
+
};
|
|
92
|
+
readonly enter: {
|
|
93
|
+
readonly duration: 0.2;
|
|
94
|
+
readonly ease: CubicBezier;
|
|
95
|
+
};
|
|
96
|
+
/** Popups, menus and tooltips: they answer a click, so they arrive at `fast`. */
|
|
97
|
+
readonly enterFast: {
|
|
98
|
+
readonly duration: 0.12;
|
|
99
|
+
readonly ease: CubicBezier;
|
|
100
|
+
};
|
|
101
|
+
readonly exit: {
|
|
102
|
+
readonly duration: 0.12;
|
|
103
|
+
readonly ease: CubicBezier;
|
|
104
|
+
};
|
|
105
|
+
readonly slow: {
|
|
106
|
+
readonly duration: 0.32;
|
|
107
|
+
readonly ease: CubicBezier;
|
|
108
|
+
};
|
|
109
|
+
/** A meter that follows a clock ticking every `base`: each step is linear so the sum drains evenly. */
|
|
110
|
+
readonly meter: {
|
|
111
|
+
readonly duration: 0.2;
|
|
112
|
+
readonly ease: "linear";
|
|
113
|
+
};
|
|
114
|
+
readonly layout: {
|
|
115
|
+
readonly type: "spring";
|
|
116
|
+
readonly visualDuration: 0.22;
|
|
117
|
+
readonly bounce: 0.12;
|
|
118
|
+
};
|
|
119
|
+
readonly pop: {
|
|
120
|
+
readonly type: "spring";
|
|
121
|
+
readonly visualDuration: 0.24;
|
|
122
|
+
readonly bounce: 0.28;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Pointer / tap press feedback. Use on a `motion.*` element as
|
|
127
|
+
* `whileTap={press.whileTap}` (and `transition={press.transition}`), never CSS
|
|
128
|
+
* `active:scale-*`. Reduced motion is honoured by `MotionProvider`.
|
|
129
|
+
*
|
|
130
|
+
* `commit.scale` stays a mutable `number[]` so it is assignable to motion's
|
|
131
|
+
* `animate` keyframes (a `readonly` tuple from `as const` is not).
|
|
132
|
+
*/
|
|
133
|
+
export declare const press: {
|
|
134
|
+
/** Scale while the pointer is down — quiet shrink, not a bounce. */
|
|
135
|
+
scale: 0.94;
|
|
136
|
+
whileTap: {
|
|
137
|
+
scale: 0.94;
|
|
138
|
+
};
|
|
139
|
+
transition: {
|
|
140
|
+
readonly duration: 0.12;
|
|
141
|
+
readonly ease: CubicBezier;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* One-shot shrink→grow for keyboard / programmatic commit (e.g. Enter-to-send)
|
|
145
|
+
* where `whileTap` never fires. Drive `animate` from a short-lived flag.
|
|
146
|
+
*/
|
|
147
|
+
commit: {
|
|
148
|
+
scale: number[];
|
|
149
|
+
transition: {
|
|
150
|
+
readonly type: "spring";
|
|
151
|
+
readonly visualDuration: 0.24;
|
|
152
|
+
readonly bounce: 0.28;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Prop bags for `motion.*` elements: `<motion.div {...presets.rise} />`. Each carries its own
|
|
158
|
+
* enter and exit, so it behaves the same inside `AnimatePresence` or on its own. Reach for these
|
|
159
|
+
* before writing an inline `initial` / `animate`; add a preset here rather than tuning one call site.
|
|
160
|
+
*/
|
|
161
|
+
export declare const presets: {
|
|
162
|
+
/** Opacity only. Overlays, content swapping in place, anything that should not move. */
|
|
163
|
+
readonly fade: {
|
|
164
|
+
readonly initial: {
|
|
165
|
+
readonly opacity: 0;
|
|
166
|
+
};
|
|
167
|
+
readonly animate: {
|
|
168
|
+
readonly opacity: 1;
|
|
169
|
+
readonly transition: {
|
|
170
|
+
readonly duration: 0.2;
|
|
171
|
+
readonly ease: CubicBezier;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly exit: {
|
|
175
|
+
readonly opacity: 0;
|
|
176
|
+
readonly transition: {
|
|
177
|
+
readonly duration: 0.12;
|
|
178
|
+
readonly ease: CubicBezier;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
/** The default entrance: fade plus a small rise. Rows, route content, messages. */
|
|
183
|
+
readonly rise: {
|
|
184
|
+
readonly initial: {
|
|
185
|
+
readonly opacity: 0;
|
|
186
|
+
readonly y: 4;
|
|
187
|
+
};
|
|
188
|
+
readonly animate: {
|
|
189
|
+
readonly opacity: 1;
|
|
190
|
+
readonly y: 0;
|
|
191
|
+
readonly transition: {
|
|
192
|
+
readonly duration: 0.2;
|
|
193
|
+
readonly ease: CubicBezier;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
readonly exit: {
|
|
197
|
+
readonly opacity: 0;
|
|
198
|
+
readonly y: number;
|
|
199
|
+
readonly transition: {
|
|
200
|
+
readonly duration: 0.12;
|
|
201
|
+
readonly ease: CubicBezier;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
/** A card or empty state arriving on its own, a little more travel than `rise`. */
|
|
206
|
+
readonly lift: {
|
|
207
|
+
readonly initial: {
|
|
208
|
+
readonly opacity: 0;
|
|
209
|
+
readonly y: 8;
|
|
210
|
+
};
|
|
211
|
+
readonly animate: {
|
|
212
|
+
readonly opacity: 1;
|
|
213
|
+
readonly y: 0;
|
|
214
|
+
readonly transition: {
|
|
215
|
+
readonly duration: 0.32;
|
|
216
|
+
readonly ease: CubicBezier;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
readonly exit: {
|
|
220
|
+
readonly opacity: 0;
|
|
221
|
+
readonly y: 4;
|
|
222
|
+
readonly transition: {
|
|
223
|
+
readonly duration: 0.12;
|
|
224
|
+
readonly ease: CubicBezier;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
/** Small elements appearing (reaction pills, badges, counters, indicators). */
|
|
229
|
+
readonly pop: {
|
|
230
|
+
readonly initial: {
|
|
231
|
+
readonly opacity: 0;
|
|
232
|
+
readonly scale: 0.94;
|
|
233
|
+
};
|
|
234
|
+
readonly animate: {
|
|
235
|
+
readonly opacity: 1;
|
|
236
|
+
readonly scale: 1;
|
|
237
|
+
readonly transition: {
|
|
238
|
+
readonly type: "spring";
|
|
239
|
+
readonly visualDuration: 0.24;
|
|
240
|
+
readonly bounce: 0.28;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
readonly exit: {
|
|
244
|
+
readonly opacity: 0;
|
|
245
|
+
readonly scale: 0.94;
|
|
246
|
+
readonly transition: {
|
|
247
|
+
readonly duration: 0.12;
|
|
248
|
+
readonly ease: CubicBezier;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
/** One piece of content replacing another in the same spot (Copy → Copied, icon swaps). */
|
|
253
|
+
readonly swap: {
|
|
254
|
+
readonly initial: {
|
|
255
|
+
readonly opacity: 0;
|
|
256
|
+
readonly scale: 0.98;
|
|
257
|
+
readonly filter: "blur(2px)";
|
|
258
|
+
};
|
|
259
|
+
readonly animate: {
|
|
260
|
+
readonly opacity: 1;
|
|
261
|
+
readonly scale: 1;
|
|
262
|
+
readonly filter: "blur(0px)";
|
|
263
|
+
readonly transition: {
|
|
264
|
+
readonly duration: 0.12;
|
|
265
|
+
readonly ease: CubicBezier;
|
|
266
|
+
};
|
|
267
|
+
readonly transitionEnd: {
|
|
268
|
+
readonly filter: "none";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
readonly exit: {
|
|
272
|
+
readonly opacity: 0;
|
|
273
|
+
readonly scale: 0.98;
|
|
274
|
+
readonly filter: "blur(2px)";
|
|
275
|
+
readonly transition: {
|
|
276
|
+
readonly duration: 0.12;
|
|
277
|
+
readonly ease: CubicBezier;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* Odometer roll for a rising count: new value enters from the top, old exits downward.
|
|
283
|
+
* Clip the parent (`overflow-hidden`) so the travel stays inside the glyph box.
|
|
284
|
+
*/
|
|
285
|
+
readonly wheelUp: {
|
|
286
|
+
readonly initial: {
|
|
287
|
+
readonly y: "-100%";
|
|
288
|
+
readonly opacity: 0;
|
|
289
|
+
};
|
|
290
|
+
readonly animate: {
|
|
291
|
+
readonly y: 0;
|
|
292
|
+
readonly opacity: 1;
|
|
293
|
+
readonly transition: {
|
|
294
|
+
readonly duration: 0.12;
|
|
295
|
+
readonly ease: CubicBezier;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
readonly exit: {
|
|
299
|
+
readonly y: "100%";
|
|
300
|
+
readonly opacity: 0;
|
|
301
|
+
readonly transition: {
|
|
302
|
+
readonly duration: 0.1;
|
|
303
|
+
readonly ease: CubicBezier;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
/** Reverse of `wheelUp` — a falling count rolls the other way. */
|
|
308
|
+
readonly wheelDown: {
|
|
309
|
+
readonly initial: {
|
|
310
|
+
readonly y: "100%";
|
|
311
|
+
readonly opacity: 0;
|
|
312
|
+
};
|
|
313
|
+
readonly animate: {
|
|
314
|
+
readonly y: 0;
|
|
315
|
+
readonly opacity: 1;
|
|
316
|
+
readonly transition: {
|
|
317
|
+
readonly duration: 0.12;
|
|
318
|
+
readonly ease: CubicBezier;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
readonly exit: {
|
|
322
|
+
readonly y: "-100%";
|
|
323
|
+
readonly opacity: 0;
|
|
324
|
+
readonly transition: {
|
|
325
|
+
readonly duration: 0.1;
|
|
326
|
+
readonly ease: CubicBezier;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
/** A dialog arriving over its backdrop: a fade, a slight grow and a short rise. */
|
|
331
|
+
readonly dialog: {
|
|
332
|
+
readonly initial: {
|
|
333
|
+
readonly opacity: 0;
|
|
334
|
+
readonly scale: 0.96;
|
|
335
|
+
readonly y: 4;
|
|
336
|
+
};
|
|
337
|
+
readonly animate: {
|
|
338
|
+
readonly opacity: 1;
|
|
339
|
+
readonly scale: 1;
|
|
340
|
+
readonly y: 0;
|
|
341
|
+
readonly transition: {
|
|
342
|
+
readonly duration: 0.2;
|
|
343
|
+
readonly ease: CubicBezier;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
readonly exit: {
|
|
347
|
+
readonly opacity: 0;
|
|
348
|
+
readonly scale: 0.98;
|
|
349
|
+
readonly transition: {
|
|
350
|
+
readonly duration: 0.12;
|
|
351
|
+
readonly ease: CubicBezier;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
/** One-off page-load moment for brand surfaces (sign-in, the landing hero). */
|
|
356
|
+
readonly reveal: {
|
|
357
|
+
readonly initial: {
|
|
358
|
+
readonly opacity: 0;
|
|
359
|
+
readonly y: 8;
|
|
360
|
+
readonly filter: "blur(4px)";
|
|
361
|
+
};
|
|
362
|
+
readonly animate: {
|
|
363
|
+
readonly opacity: 1;
|
|
364
|
+
readonly y: 0;
|
|
365
|
+
readonly filter: "blur(0px)";
|
|
366
|
+
readonly transition: {
|
|
367
|
+
readonly duration: 0.48;
|
|
368
|
+
readonly ease: CubicBezier;
|
|
369
|
+
};
|
|
370
|
+
readonly transitionEnd: {
|
|
371
|
+
readonly filter: "none";
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
readonly exit: {
|
|
375
|
+
readonly opacity: 0;
|
|
376
|
+
readonly transition: {
|
|
377
|
+
readonly duration: 0.12;
|
|
378
|
+
readonly ease: CubicBezier;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
/** Height 0 ↔ auto, for disclosure content and rows that expand in place. */
|
|
383
|
+
readonly collapse: {
|
|
384
|
+
readonly initial: {
|
|
385
|
+
readonly height: 0;
|
|
386
|
+
readonly opacity: 0;
|
|
387
|
+
};
|
|
388
|
+
readonly animate: {
|
|
389
|
+
readonly height: "auto";
|
|
390
|
+
readonly opacity: 1;
|
|
391
|
+
readonly transition: {
|
|
392
|
+
readonly height: {
|
|
393
|
+
readonly duration: 0.2;
|
|
394
|
+
readonly ease: CubicBezier;
|
|
395
|
+
};
|
|
396
|
+
readonly opacity: {
|
|
397
|
+
readonly delay: 0.04;
|
|
398
|
+
readonly duration: 0.2;
|
|
399
|
+
readonly ease: CubicBezier;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
readonly exit: {
|
|
404
|
+
readonly height: 0;
|
|
405
|
+
readonly opacity: 0;
|
|
406
|
+
readonly transition: {
|
|
407
|
+
readonly height: {
|
|
408
|
+
readonly duration: 0.2;
|
|
409
|
+
readonly ease: CubicBezier;
|
|
410
|
+
};
|
|
411
|
+
readonly opacity: {
|
|
412
|
+
readonly duration: 0.12;
|
|
413
|
+
readonly ease: CubicBezier;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* Width 0 ↔ auto, for side panels that take space from their neighbour (the details pane): the
|
|
420
|
+
* neighbour narrows with the panel instead of snapping to its final width in one frame. The
|
|
421
|
+
* panel is an opaque surface, so it slides in solid with its edge. A fade on its own clock made
|
|
422
|
+
* the neighbour move while the panel was still invisible (and after it had gone), which read as
|
|
423
|
+
* two animations instead of one.
|
|
424
|
+
*/
|
|
425
|
+
readonly collapseX: {
|
|
426
|
+
readonly initial: {
|
|
427
|
+
readonly width: 0;
|
|
428
|
+
};
|
|
429
|
+
readonly animate: {
|
|
430
|
+
readonly width: "auto";
|
|
431
|
+
readonly transition: {
|
|
432
|
+
readonly duration: 0.2;
|
|
433
|
+
readonly ease: CubicBezier;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
readonly exit: {
|
|
437
|
+
readonly width: 0;
|
|
438
|
+
readonly transition: {
|
|
439
|
+
readonly duration: 0.2;
|
|
440
|
+
readonly ease: CubicBezier;
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* Sense `scale-enter` / `scale-exit`: grows from 95% on `ease.enter` with a linear fade over
|
|
446
|
+
* `base`, and leaves faster (`short`) on `ease.exit` with its fade a beat behind. Chips, thumbnails
|
|
447
|
+
* and cards that appear in place without travelling.
|
|
448
|
+
*/
|
|
449
|
+
readonly scaleIn: {
|
|
450
|
+
readonly initial: {
|
|
451
|
+
readonly opacity: 0;
|
|
452
|
+
readonly scale: 0.95;
|
|
453
|
+
};
|
|
454
|
+
readonly animate: {
|
|
455
|
+
readonly opacity: 1;
|
|
456
|
+
readonly scale: 1;
|
|
457
|
+
readonly transition: {
|
|
458
|
+
readonly scale: {
|
|
459
|
+
readonly duration: 0.2;
|
|
460
|
+
readonly ease: CubicBezier;
|
|
461
|
+
};
|
|
462
|
+
readonly opacity: {
|
|
463
|
+
readonly duration: 0.2;
|
|
464
|
+
readonly ease: "linear";
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
readonly exit: {
|
|
469
|
+
readonly opacity: 0;
|
|
470
|
+
readonly scale: 0.95;
|
|
471
|
+
readonly transition: {
|
|
472
|
+
readonly scale: {
|
|
473
|
+
readonly duration: 0.1;
|
|
474
|
+
readonly ease: CubicBezier;
|
|
475
|
+
};
|
|
476
|
+
readonly opacity: {
|
|
477
|
+
readonly duration: 0.1;
|
|
478
|
+
readonly ease: "linear";
|
|
479
|
+
readonly delay: 0.02;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
/** Where Base UI placed the popup; `'none'` is a select laid over its trigger. */
|
|
486
|
+
type PopupSide = 'top' | 'bottom' | 'left' | 'right' | 'inline-start' | 'inline-end' | 'none';
|
|
487
|
+
/**
|
|
488
|
+
* Menus, popovers, selects, tooltips and hover cards: a quick scale-and-fade that drifts a few
|
|
489
|
+
* pixels out from the trigger. `side` is where the popup sits relative to its trigger.
|
|
490
|
+
*/
|
|
491
|
+
export declare const popup: (side?: PopupSide, dir?: "ltr" | "rtl") => {
|
|
492
|
+
initial: {
|
|
493
|
+
y: 4;
|
|
494
|
+
x: number;
|
|
495
|
+
opacity: number;
|
|
496
|
+
scale: 0.96;
|
|
497
|
+
} | {
|
|
498
|
+
y: number;
|
|
499
|
+
x: number;
|
|
500
|
+
opacity: number;
|
|
501
|
+
scale: 0.96;
|
|
502
|
+
} | {
|
|
503
|
+
x: 4;
|
|
504
|
+
y: number;
|
|
505
|
+
opacity: number;
|
|
506
|
+
scale: 0.96;
|
|
507
|
+
} | {
|
|
508
|
+
x: number;
|
|
509
|
+
y: number;
|
|
510
|
+
opacity: number;
|
|
511
|
+
scale: 0.96;
|
|
512
|
+
} | {
|
|
513
|
+
y: number;
|
|
514
|
+
x: number;
|
|
515
|
+
opacity: number;
|
|
516
|
+
scale: 0.96;
|
|
517
|
+
};
|
|
518
|
+
animate: {
|
|
519
|
+
opacity: number;
|
|
520
|
+
scale: number;
|
|
521
|
+
x: number;
|
|
522
|
+
y: number;
|
|
523
|
+
transition: {
|
|
524
|
+
readonly duration: 0.12;
|
|
525
|
+
readonly ease: CubicBezier;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
exit: {
|
|
529
|
+
opacity: number;
|
|
530
|
+
scale: 0.96;
|
|
531
|
+
transition: {
|
|
532
|
+
readonly duration: 0.12;
|
|
533
|
+
readonly ease: CubicBezier;
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* A popup that fades and drifts a few pixels from the side it opens on, without the scale of
|
|
539
|
+
* `popup`. For a surface that reads as part of the form it belongs to: the dropdown lists and
|
|
540
|
+
* pickers of a dense editor. `tip` arrives faster than a list; `fade` does not move at all (a
|
|
541
|
+
* list that opens on hover).
|
|
542
|
+
*/
|
|
543
|
+
export declare const drift: (side?: PopupSide, kind?: "list" | "tip" | "fade") => {
|
|
544
|
+
initial: {
|
|
545
|
+
opacity: number;
|
|
546
|
+
y: number;
|
|
547
|
+
};
|
|
548
|
+
animate: {
|
|
549
|
+
opacity: number;
|
|
550
|
+
y: number;
|
|
551
|
+
transition: {
|
|
552
|
+
readonly duration: 0.1 | 0.12 | 0.18;
|
|
553
|
+
readonly ease: CubicBezier;
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
exit: {
|
|
557
|
+
opacity: number;
|
|
558
|
+
y: number;
|
|
559
|
+
transition: {
|
|
560
|
+
readonly duration: 0.1 | 0.12 | 0.18;
|
|
561
|
+
readonly ease: CubicBezier;
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
/** Sheets and drawers: the whole panel travels in from its edge and back out. */
|
|
566
|
+
export declare const sheet: (side: "top" | "bottom" | "left" | "right") => {
|
|
567
|
+
initial: {
|
|
568
|
+
y: string;
|
|
569
|
+
x?: undefined;
|
|
570
|
+
} | {
|
|
571
|
+
y: string;
|
|
572
|
+
x?: undefined;
|
|
573
|
+
} | {
|
|
574
|
+
x: string;
|
|
575
|
+
y?: undefined;
|
|
576
|
+
} | {
|
|
577
|
+
x: string;
|
|
578
|
+
y?: undefined;
|
|
579
|
+
};
|
|
580
|
+
animate: {
|
|
581
|
+
transition: {
|
|
582
|
+
readonly duration: 0.32;
|
|
583
|
+
readonly ease: CubicBezier;
|
|
584
|
+
};
|
|
585
|
+
x: number;
|
|
586
|
+
y?: undefined;
|
|
587
|
+
} | {
|
|
588
|
+
transition: {
|
|
589
|
+
readonly duration: 0.32;
|
|
590
|
+
readonly ease: CubicBezier;
|
|
591
|
+
};
|
|
592
|
+
y: number;
|
|
593
|
+
x?: undefined;
|
|
594
|
+
};
|
|
595
|
+
exit: {
|
|
596
|
+
transition: {
|
|
597
|
+
duration: 0.2;
|
|
598
|
+
ease: CubicBezier;
|
|
599
|
+
};
|
|
600
|
+
y: string;
|
|
601
|
+
x?: undefined;
|
|
602
|
+
} | {
|
|
603
|
+
transition: {
|
|
604
|
+
duration: 0.2;
|
|
605
|
+
ease: CubicBezier;
|
|
606
|
+
};
|
|
607
|
+
y: string;
|
|
608
|
+
x?: undefined;
|
|
609
|
+
} | {
|
|
610
|
+
transition: {
|
|
611
|
+
duration: 0.2;
|
|
612
|
+
ease: CubicBezier;
|
|
613
|
+
};
|
|
614
|
+
x: string;
|
|
615
|
+
y?: undefined;
|
|
616
|
+
} | {
|
|
617
|
+
transition: {
|
|
618
|
+
duration: 0.2;
|
|
619
|
+
ease: CubicBezier;
|
|
620
|
+
};
|
|
621
|
+
x: string;
|
|
622
|
+
y?: undefined;
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
/** Inline-start / end slides for panels, drawers and pane swaps. `dir` flips them in RTL. */
|
|
626
|
+
export declare const slide: (from: "start" | "end", dir?: "ltr" | "rtl") => {
|
|
627
|
+
initial: {
|
|
628
|
+
opacity: number;
|
|
629
|
+
x: number;
|
|
630
|
+
};
|
|
631
|
+
animate: {
|
|
632
|
+
opacity: number;
|
|
633
|
+
x: number;
|
|
634
|
+
transition: {
|
|
635
|
+
readonly duration: 0.2;
|
|
636
|
+
readonly ease: CubicBezier;
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
exit: {
|
|
640
|
+
opacity: number;
|
|
641
|
+
x: number;
|
|
642
|
+
transition: {
|
|
643
|
+
readonly duration: 0.12;
|
|
644
|
+
readonly ease: CubicBezier;
|
|
645
|
+
};
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* Height changes of content that stays in place, driven by `AutoHeight`. Symmetric, because a card
|
|
650
|
+
* that grows and shrinks should not snap on either leg (`ease.out` front-loads nearly all of the
|
|
651
|
+
* movement into the first frames). `reveal` is for small things appearing in a card (an error, an
|
|
652
|
+
* input, a list expanding); `step` is for a whole question changing, so it matches `stepSwap`.
|
|
653
|
+
*/
|
|
654
|
+
export declare const resize: {
|
|
655
|
+
readonly reveal: {
|
|
656
|
+
readonly duration: 0.25;
|
|
657
|
+
readonly ease: CubicBezier;
|
|
658
|
+
};
|
|
659
|
+
readonly step: {
|
|
660
|
+
readonly duration: 0.35;
|
|
661
|
+
readonly ease: CubicBezier;
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* A diagram re-flowing around a change (a branch added or removed in the cycle builder): nodes,
|
|
666
|
+
* connectors, chips and the line joining them all travel on this one clock, so they arrive together
|
|
667
|
+
* and nothing is seen jumping. Slightly slower than a card moving alone, because the whole picture moves.
|
|
668
|
+
*/
|
|
669
|
+
export declare const reflow: {
|
|
670
|
+
readonly duration: 0.3;
|
|
671
|
+
readonly ease: CubicBezier;
|
|
672
|
+
};
|
|
673
|
+
/**
|
|
674
|
+
* A row gliding into a list that follows its end (a cycle divider): the rows above rise as it grows,
|
|
675
|
+
* so it is deliberately slower than `reflow`, and symmetric so the lift starts and lands softly.
|
|
676
|
+
*/
|
|
677
|
+
export declare const glide: {
|
|
678
|
+
readonly duration: 0.65;
|
|
679
|
+
readonly ease: CubicBezier;
|
|
680
|
+
};
|
|
681
|
+
/**
|
|
682
|
+
* The edit button of a connector sliding out from behind its "+" (cycle builder). `shift` is the
|
|
683
|
+
* button's width plus the 6px gap. The slide is quick and decelerates hard; the fade is `fast`.
|
|
684
|
+
* Reduced motion drops the transform and keeps the fade (`MotionProvider`).
|
|
685
|
+
*/
|
|
686
|
+
export declare const edgeReveal: {
|
|
687
|
+
readonly shift: 42;
|
|
688
|
+
readonly transition: {
|
|
689
|
+
readonly x: {
|
|
690
|
+
readonly duration: 0.18;
|
|
691
|
+
readonly ease: CubicBezier;
|
|
692
|
+
};
|
|
693
|
+
readonly opacity: {
|
|
694
|
+
readonly duration: 0.12;
|
|
695
|
+
readonly ease: CubicBezier;
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
/**
|
|
700
|
+
* One step of a multi-step flow replacing another, cross-fading (use with `AnimatePresence
|
|
701
|
+
* mode="popLayout" custom={dir}`). `dir` is 1 for forward and -1 for back: the old step leaves
|
|
702
|
+
* toward the side it came from and the new one arrives a beat later from the other, so the two
|
|
703
|
+
* overlap and nothing pops. Travel is `distance.slide`.
|
|
704
|
+
*/
|
|
705
|
+
export declare const stepSwap: {
|
|
706
|
+
initial: (dir: 1 | -1) => {
|
|
707
|
+
opacity: number;
|
|
708
|
+
x: number;
|
|
709
|
+
};
|
|
710
|
+
animate: {
|
|
711
|
+
opacity: number;
|
|
712
|
+
x: number;
|
|
713
|
+
transition: {
|
|
714
|
+
duration: number;
|
|
715
|
+
delay: number;
|
|
716
|
+
ease: CubicBezier;
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
exit: (dir: 1 | -1) => {
|
|
720
|
+
opacity: number;
|
|
721
|
+
x: number;
|
|
722
|
+
transition: {
|
|
723
|
+
duration: number;
|
|
724
|
+
ease: CubicBezier;
|
|
725
|
+
};
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* A clipped one-line label (sidebar stream and session titles) sliding the rest of itself into
|
|
730
|
+
* view while hovered, then holding at the end. `to(px)` runs at a steady reading pace, so a long
|
|
731
|
+
* title takes longer than a short one, after a rest that keeps a pointer sweeping past rows from
|
|
732
|
+
* setting them all moving. `back` snaps home at once when the pointer leaves: no rewind.
|
|
733
|
+
*/
|
|
734
|
+
export declare const scrollReveal: {
|
|
735
|
+
/** Seconds the pointer rests on the row before the title starts moving. */
|
|
736
|
+
delay: number;
|
|
737
|
+
/** Pixels per second. */
|
|
738
|
+
speed: number;
|
|
739
|
+
to: (px: number) => Transition;
|
|
740
|
+
back: {
|
|
741
|
+
duration: number;
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
/** Delay for the `index`-th item of a staggered group, `step` apart and capped at `stagger.max`. */
|
|
745
|
+
export declare const staggerDelay: (index: number, step?: number) => number;
|
|
746
|
+
/**
|
|
747
|
+
* Infinite-loop transitions for loading indicators. These run forever at a steady cadence so the
|
|
748
|
+
* loading state is always perceptible. Under reduced motion anything that moves stops (the spinner
|
|
749
|
+
* stops turning) and the opacity pulses carry on, so loading still shows.
|
|
750
|
+
*/
|
|
751
|
+
export declare const loops: {
|
|
752
|
+
/** Spinner: one full clockwise turn per second, linear. Animate `transform`, not `rotate`, so
|
|
753
|
+
* the browser runs it (motion drives `rotate` in JS, every frame). */
|
|
754
|
+
readonly spin: {
|
|
755
|
+
readonly repeat: number;
|
|
756
|
+
readonly repeatType: "loop";
|
|
757
|
+
readonly ease: "linear";
|
|
758
|
+
readonly duration: 1;
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* Skeleton and status-dot: smooth opacity float, slow enough to read as "still loading". Give it
|
|
762
|
+
* keyframes that come back to where they start (`[1, 0.4, 1]`): it loops rather than mirrors, so
|
|
763
|
+
* the browser runs it off the main thread (motion drives a mirrored loop in JS, every frame).
|
|
764
|
+
*/
|
|
765
|
+
readonly pulse: {
|
|
766
|
+
readonly repeat: number;
|
|
767
|
+
readonly repeatType: "loop";
|
|
768
|
+
readonly ease: CubicBezier;
|
|
769
|
+
readonly duration: 1.4;
|
|
770
|
+
};
|
|
771
|
+
/** Text caret while an agent streams its reply: a soft on/off at a typing cadence. */
|
|
772
|
+
readonly blink: {
|
|
773
|
+
readonly repeat: number;
|
|
774
|
+
readonly repeatType: "mirror";
|
|
775
|
+
readonly ease: CubicBezier;
|
|
776
|
+
readonly duration: 0.53;
|
|
777
|
+
};
|
|
778
|
+
/**
|
|
779
|
+
* AI shimmer text (shadcn AI Shimmer / AI Elements): animate `backgroundPosition` from
|
|
780
|
+
* `100% center` → `0% center` forever so a clipped gradient sweeps across the glyphs.
|
|
781
|
+
* Duration matches the AI Elements default (2s).
|
|
782
|
+
*/
|
|
783
|
+
readonly shimmer: {
|
|
784
|
+
readonly repeat: number;
|
|
785
|
+
readonly repeatType: "loop";
|
|
786
|
+
readonly ease: "linear";
|
|
787
|
+
readonly duration: 2;
|
|
788
|
+
};
|
|
789
|
+
/** Vibe skeleton wave: a highlight band crosses the placeholder, then rests before the next. */
|
|
790
|
+
readonly sweep: {
|
|
791
|
+
readonly repeat: number;
|
|
792
|
+
readonly repeatType: "loop";
|
|
793
|
+
readonly ease: CubicBezier;
|
|
794
|
+
readonly duration: 1.6;
|
|
795
|
+
readonly repeatDelay: 0.4;
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
export declare const runningIndicator: {
|
|
799
|
+
readonly core: {
|
|
800
|
+
readonly transform: ["scale(1)", "scale(0.88)", "scale(1)"];
|
|
801
|
+
};
|
|
802
|
+
readonly halo: {
|
|
803
|
+
readonly opacity: [1, 0, 1];
|
|
804
|
+
};
|
|
805
|
+
readonly transition: {
|
|
806
|
+
readonly repeat: number;
|
|
807
|
+
readonly repeatType: "loop";
|
|
808
|
+
readonly ease: CubicBezier;
|
|
809
|
+
readonly duration: 2;
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
export declare const loopAnimate: {
|
|
813
|
+
/** Spinner / Trace running icon: opacity pulse + WAAPI spin. */
|
|
814
|
+
spinner: {
|
|
815
|
+
opacity: number[];
|
|
816
|
+
transform: string[];
|
|
817
|
+
};
|
|
818
|
+
/** Same pulse without the turn (reduced motion / `prefers-reduced-motion`). */
|
|
819
|
+
spinnerReduced: {
|
|
820
|
+
opacity: number[];
|
|
821
|
+
};
|
|
822
|
+
/** ShimmerText / Trace running title: gradient sweep across glyphs. */
|
|
823
|
+
shimmer: {
|
|
824
|
+
backgroundPosition: string[];
|
|
825
|
+
};
|
|
826
|
+
};
|
|
827
|
+
export declare const loopTransition: {
|
|
828
|
+
spinner: {
|
|
829
|
+
transform: {
|
|
830
|
+
readonly repeat: number;
|
|
831
|
+
readonly repeatType: "loop";
|
|
832
|
+
readonly ease: "linear";
|
|
833
|
+
readonly duration: 1;
|
|
834
|
+
};
|
|
835
|
+
opacity: {
|
|
836
|
+
readonly repeat: number;
|
|
837
|
+
readonly repeatType: "loop";
|
|
838
|
+
readonly ease: CubicBezier;
|
|
839
|
+
readonly duration: 1.4;
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
shimmer: {
|
|
843
|
+
readonly repeat: number;
|
|
844
|
+
readonly repeatType: "loop";
|
|
845
|
+
readonly ease: "linear";
|
|
846
|
+
readonly duration: 2;
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
export {};
|