onda-engine 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 +106 -0
- package/LICENSE-APACHE +202 -0
- package/README.md +84 -0
- package/dist/chunk-NCNYMPIQ.js +12763 -0
- package/dist/chunk-NCNYMPIQ.js.map +1 -0
- package/dist/cinema.d.ts +580 -0
- package/dist/cinema.js +1687 -0
- package/dist/cinema.js.map +1 -0
- package/dist/components-manifest.d.ts +2 -0
- package/dist/components-manifest.js +3 -0
- package/dist/components-manifest.js.map +1 -0
- package/dist/components.d.ts +3480 -0
- package/dist/components.js +11486 -0
- package/dist/components.js.map +1 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest-7N3yu9tB.d.ts +131 -0
- package/dist/player.d.ts +177 -0
- package/dist/player.js +1749 -0
- package/dist/player.js.map +1 -0
- package/dist/react.d.ts +2141 -0
- package/dist/react.js +2052 -0
- package/dist/react.js.map +1 -0
- package/dist/render.d.ts +42 -0
- package/dist/render.js +113 -0
- package/dist/render.js.map +1 -0
- package/dist/wasm/pkg/onda_wasm.js +598 -0
- package/dist/wasm/pkg/onda_wasm_bg.wasm +0 -0
- package/dist/wasm-audio/pkg/onda_wasm_audio.js +417 -0
- package/dist/wasm-audio/pkg/onda_wasm_audio_bg.wasm +0 -0
- package/dist/wasm-vello/index.js +32 -0
- package/dist/wasm-vello/pkg/onda_wasm_vello.js +1325 -0
- package/dist/wasm-vello/pkg/onda_wasm_vello_bg.wasm +0 -0
- package/package.json +112 -0
|
@@ -0,0 +1,3480 @@
|
|
|
1
|
+
import { EasingFn } from './interpolate.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Scene } from './scene.js';
|
|
4
|
+
export { B as Backend, C as COMPONENT_FIDELITY, a as ComponentFidelity, E as ENGINE_CAPABILITIES, F as FIDELITY_SUMMARY, b as Fidelity, M as MANIFEST, c as MANIFEST_NAMES, d as ManifestEntry, P as PropMeta, R as RECOMMENDED_PALETTE, e as compactCatalog, f as firstClassEntries, m as manifestEntry } from './manifest-7N3yu9tB.js';
|
|
5
|
+
import * as react from 'react';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
import { NodeProps } from './components.js';
|
|
8
|
+
import { GradientInput } from './gradient.js';
|
|
9
|
+
import { SpringConfig } from './spring.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Duration scale in frames at 30fps. Reach for these before hardcoding a frame
|
|
13
|
+
* count. At other framerates, scale via `Math.round(DURATION.x * fps / 30)`.
|
|
14
|
+
*
|
|
15
|
+
* - `instant` (6f / 0.20s) — micro shifts
|
|
16
|
+
* - `fast` (10f / 0.33s) — exits, small moves
|
|
17
|
+
* - `base` (22f / 0.73s) — default entrance
|
|
18
|
+
* - `slow` (28f / 0.93s) — large entrances, hero moves
|
|
19
|
+
* - `slower` (34f / 1.13s) — full scene transitions
|
|
20
|
+
* - `hold` (48f / 1.60s) — minimum settled hold
|
|
21
|
+
*
|
|
22
|
+
* Pacing note: entrances run on the slower side and every reveal is meant to
|
|
23
|
+
* *settle and hold* before the next move — confidence reads as stillness, not
|
|
24
|
+
* constant motion. Keep one primary move per beat.
|
|
25
|
+
*/
|
|
26
|
+
declare const DURATION: {
|
|
27
|
+
readonly instant: 6;
|
|
28
|
+
readonly fast: 10;
|
|
29
|
+
readonly base: 22;
|
|
30
|
+
readonly slow: 28;
|
|
31
|
+
readonly slower: 34;
|
|
32
|
+
readonly hold: 48;
|
|
33
|
+
};
|
|
34
|
+
/** Keys of {@link DURATION} — useful for typed props that pick a duration. */
|
|
35
|
+
type DurationToken = keyof typeof DURATION;
|
|
36
|
+
/** Canonical stagger between sibling elements (lists, words, grouped reveals).
|
|
37
|
+
* `5` frames @ 30fps ≈ 0.17s — a pronounced, orchestrated wave that choreographs
|
|
38
|
+
* the eye. One value, used everywhere. */
|
|
39
|
+
declare const STAGGER = 5;
|
|
40
|
+
/** Hero-landing overshoot magnitude — a 3% scale bump that settles back to 1.
|
|
41
|
+
* Reserved for the two-phase landing pattern (see `heroReveal`). */
|
|
42
|
+
declare const OVERSHOOT = 0.03;
|
|
43
|
+
/** The house spring — smooth, settled, no overshoot. The Onda fingerprint.
|
|
44
|
+
* Heavily overdamped (damping ratio ≈ 10): a confident settle, never a bounce. */
|
|
45
|
+
declare const SPRING_SMOOTH: {
|
|
46
|
+
readonly damping: 200;
|
|
47
|
+
readonly stiffness: 100;
|
|
48
|
+
readonly mass: 1;
|
|
49
|
+
};
|
|
50
|
+
/** Faster spring for decisive elements (counters, value swaps, cursor moves).
|
|
51
|
+
* Still heavily overdamped — snappiness via higher stiffness, not less damping. */
|
|
52
|
+
declare const SPRING_SNAPPY: {
|
|
53
|
+
readonly damping: 120;
|
|
54
|
+
readonly stiffness: 180;
|
|
55
|
+
readonly mass: 1;
|
|
56
|
+
};
|
|
57
|
+
/** Stagger offset in frames for the i-th sibling in a grouped reveal. The single
|
|
58
|
+
* canonical helper — every cascade goes through here so stagger stays
|
|
59
|
+
* consistent and greppable. */
|
|
60
|
+
declare const staggerFrames: (index: number, increment?: number) => number;
|
|
61
|
+
|
|
62
|
+
/** The house easing curve — a restrained ease-out (`cubic-bezier(0.16, 1, 0.3, 1)`).
|
|
63
|
+
* Use for opacity / color fades and anything the eye tracks but that doesn't
|
|
64
|
+
* move physically. (ondajs uses Remotion's `Easing.bezier`; `@onda-engine/react`
|
|
65
|
+
* exposes the same curve as `cubicBezier`.) */
|
|
66
|
+
declare const HOUSE_EASE: EasingFn;
|
|
67
|
+
|
|
68
|
+
/** A duration/delay value: frames as a number (the historical form) or a human
|
|
69
|
+
* time string — `'0.5s'`, `'500ms'`, `'12f'`, `'1:30'`. */
|
|
70
|
+
type TimeInput = number | string;
|
|
71
|
+
/** Parse a {@link TimeInput} to FRAMES (rounded). Numbers pass through as
|
|
72
|
+
* frames; strings parse per the cinema time grammar. Invalid/empty strings
|
|
73
|
+
* and `undefined` resolve to `fallback` (default 0). Never throws. */
|
|
74
|
+
declare function framesOf(value: TimeInput | undefined, fps: number, fallback?: number): number;
|
|
75
|
+
/** The Zod schema for a {@link TimeInput} prop — shared by the component
|
|
76
|
+
* schemas so the Studio agent validates one duration grammar. */
|
|
77
|
+
declare const timeSchema: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
78
|
+
/** One-line description suffix for converted manifest/schema props. */
|
|
79
|
+
declare const TIME_DESCRIPTION = "Accepts frames (number) or a time string ('0.5s', '500ms', '12f', '1:30').";
|
|
80
|
+
|
|
81
|
+
/** `delay + (n−1)×stagger + duration` — the settle of a staggered entrance.
|
|
82
|
+
* All values in FRAMES. */
|
|
83
|
+
declare function staggeredSettle(count: number, staggerFrames: number, durationFrames: number, delayFrames?: number): number;
|
|
84
|
+
/** Loose prop bag — the registry reads only the timing-relevant keys. */
|
|
85
|
+
type Props = Record<string, unknown>;
|
|
86
|
+
/** A per-component settle calculator: total frames from the component's local
|
|
87
|
+
* frame 0 until its entrance has fully settled (defaults applied). */
|
|
88
|
+
type SettleFn = (props: Props, fps: number) => number;
|
|
89
|
+
/** Settle calculators, keyed by the PascalCase component name. Formulas mirror
|
|
90
|
+
* the component implementations (see each component's source for the beats). */
|
|
91
|
+
declare const COMPONENT_SETTLE: Record<string, SettleFn>;
|
|
92
|
+
/** Total settle time in FRAMES for `component` with `props` — `delay` included,
|
|
93
|
+
* defaults applied — or `null` when the component isn't in the registry (not
|
|
94
|
+
* animated, or its end isn't statically computable). "Does it land before the
|
|
95
|
+
* cut?" is `settleTime(...) <= clipFrames`. */
|
|
96
|
+
declare function settleTime(component: string, props?: Props, fps?: number): number | null;
|
|
97
|
+
/** Clip-fit props shared by the animated components. */
|
|
98
|
+
interface FitToClipOpts {
|
|
99
|
+
/** Compress the WHOLE timing envelope (delay, stagger, durations) so the
|
|
100
|
+
* entrance settles at least `hold` before the end of the enclosing clip
|
|
101
|
+
* (`useVideoConfig().durationInFrames`, Sequence-scoped). Opt-in. */
|
|
102
|
+
fitToClip?: boolean;
|
|
103
|
+
/** Hard cap on the settle time (frames or '0.5s' string). Wins over
|
|
104
|
+
* `fitToClip` when both are given. */
|
|
105
|
+
maxSettle?: TimeInput;
|
|
106
|
+
/** Breathing room before the cut for `fitToClip` (default `DURATION.instant`
|
|
107
|
+
* = 6 frames). */
|
|
108
|
+
hold?: TimeInput;
|
|
109
|
+
}
|
|
110
|
+
/** Resolve {@link FitToClipOpts} against a natural settle time (frames) into a
|
|
111
|
+
* time-scale factor ≤ 1. Multiply every delay/stagger/duration by it. Returns
|
|
112
|
+
* 1 when no fit is requested or the entrance already lands. The compressed
|
|
113
|
+
* settle never drops below 1 frame. */
|
|
114
|
+
declare function useTimeScale(naturalSettleFrames: number, opts: FitToClipOpts): number;
|
|
115
|
+
|
|
116
|
+
interface TextMetrics {
|
|
117
|
+
/** Shaped advance width — the true rendered width of the string (px). */
|
|
118
|
+
width: number;
|
|
119
|
+
/** Total laid-out height (px). */
|
|
120
|
+
height: number;
|
|
121
|
+
/** Top of the line box to the baseline (px). */
|
|
122
|
+
ascent: number;
|
|
123
|
+
/** Baseline to the bottom of the line box (px). */
|
|
124
|
+
descent: number;
|
|
125
|
+
/** Baseline-to-baseline line height (px). */
|
|
126
|
+
lineHeight: number;
|
|
127
|
+
}
|
|
128
|
+
interface MeasureOpts {
|
|
129
|
+
fontFamily?: string;
|
|
130
|
+
fontWeight?: number;
|
|
131
|
+
italic?: boolean;
|
|
132
|
+
/** Extra px between glyphs (CSS letter-spacing) — included in the width so a
|
|
133
|
+
* component can center/size letter-spaced text faithfully. */
|
|
134
|
+
letterSpacing?: number;
|
|
135
|
+
}
|
|
136
|
+
/** Font-level vertical metrics returned by `fontMetrics()`. Derived by
|
|
137
|
+
* rasterizing 'H' and 'x' — pixel-accurate for the actual rendered font.
|
|
138
|
+
* Call once per (fontSize, family, weight) combo, not per frame. */
|
|
139
|
+
interface FontMetrics {
|
|
140
|
+
/** Distance from the Text node's `y` to the top of capital letters (px). */
|
|
141
|
+
capTop: number;
|
|
142
|
+
/** Height of capital letters from their top to the baseline (px). */
|
|
143
|
+
capHeight: number;
|
|
144
|
+
/** Distance from the Text node's `y` to the top of lowercase 'x' (px). */
|
|
145
|
+
xTop: number;
|
|
146
|
+
/** x-height: height of lowercase letters from their top to the baseline (px). */
|
|
147
|
+
xHeight: number;
|
|
148
|
+
/** Distance from node's `y` to the baseline (px). Same as `TextMetrics.ascent`. */
|
|
149
|
+
ascent: number;
|
|
150
|
+
/** Baseline to bottom of the line box (px). */
|
|
151
|
+
descent: number;
|
|
152
|
+
/** Baseline-to-baseline line height (px). */
|
|
153
|
+
lineHeight: number;
|
|
154
|
+
}
|
|
155
|
+
/** One kerning-aware character cluster from `glyphLayout()`. */
|
|
156
|
+
interface GlyphInfo {
|
|
157
|
+
/** Byte offset of this cluster's start in the original string. */
|
|
158
|
+
start: number;
|
|
159
|
+
/** Byte offset of this cluster's end (exclusive). */
|
|
160
|
+
end: number;
|
|
161
|
+
/** Pen x relative to the layout origin (includes letter-spacing). */
|
|
162
|
+
x: number;
|
|
163
|
+
/** Advance width to the next cluster — includes kern pairs. */
|
|
164
|
+
advance: number;
|
|
165
|
+
}
|
|
166
|
+
/** Load + init `@onda-engine/wasm` once and build the shared engine. Idempotent. In the
|
|
167
|
+
* browser the wasm auto-locates next to its JS; in Node we read the bytes and
|
|
168
|
+
* `initSync` (the auto-locate is browser-only). */
|
|
169
|
+
declare function preloadTextMetrics(): Promise<void>;
|
|
170
|
+
/** Measure `content` at `fontSize` synchronously: real shaped metrics if the
|
|
171
|
+
* engine is warm (Node export, or browser after `useTextMetrics` loads it),
|
|
172
|
+
* else the glyph-count estimate. Never throws. */
|
|
173
|
+
declare function measureText(content: string, fontSize: number, opts?: MeasureOpts): TextMetrics;
|
|
174
|
+
/** Font-level vertical metrics for `fontSize` + optional family/weight — derived
|
|
175
|
+
* by rasterizing 'H' and 'x'. Call ONCE per (fontSize, family, weight) combo
|
|
176
|
+
* (not per frame). Use `capTop`/`capHeight` to center text without guessing:
|
|
177
|
+
* ```
|
|
178
|
+
* const m = fontMetrics(SIZE, { fontFamily: SANS })
|
|
179
|
+
* const y = height / 2 - m.capTop - m.capHeight / 2 // centers caps at height/2
|
|
180
|
+
* const cursorY = y + m.capTop // cursor aligned to cap top
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
declare function fontMetrics(fontSize: number, opts?: MeasureOpts): FontMetrics;
|
|
184
|
+
/** Like `fontMetrics` but loads the engine in the browser and re-renders when
|
|
185
|
+
* ready. Returns estimates until the engine is warm. */
|
|
186
|
+
declare function useFontMetrics(fontSize: number, opts?: MeasureOpts): FontMetrics;
|
|
187
|
+
declare function glyphLayout(content: string, fontSize: number, opts?: MeasureOpts): GlyphInfo[];
|
|
188
|
+
/** Like `glyphLayout` but loads the engine in the browser and re-renders when
|
|
189
|
+
* ready. Returns the no-kerning fallback until the engine is warm. */
|
|
190
|
+
declare function useGlyphLayout(content: string, fontSize: number, opts?: MeasureOpts): GlyphInfo[];
|
|
191
|
+
/** Measure `content`, loading the engine in the browser on first use and
|
|
192
|
+
* re-rendering when it's ready. Returns the estimate until then. In Node it
|
|
193
|
+
* returns whatever `measureText` has (real metrics when `preloadTextMetrics`
|
|
194
|
+
* ran before the render; the estimate otherwise). */
|
|
195
|
+
declare function useTextMetrics(content: string, fontSize: number, opts?: MeasureOpts): TextMetrics;
|
|
196
|
+
/** Loader-only companion to {@link measureText} for components that measure a
|
|
197
|
+
* VARIABLE number of strings (a `.map`/loop), where the {@link useTextMetrics}
|
|
198
|
+
* hook can't be called per item without breaking the rules of hooks. Call this
|
|
199
|
+
* ONCE at the top of the component, then `measureText(...)` synchronously in the
|
|
200
|
+
* loop. It loads the engine in the browser and re-renders when ready; returns
|
|
201
|
+
* `true` once measurements are real. In Node it reflects whether the engine is
|
|
202
|
+
* warm (the export path warms it via `preloadTextMetrics`). */
|
|
203
|
+
declare function useTextMetricsReady(): boolean;
|
|
204
|
+
/** Load a custom font (`.ttf`/`.otf` bytes) into the author-time measurement
|
|
205
|
+
* engine so `measureText`/`glyphLayout`/`fontMetrics` — and therefore
|
|
206
|
+
* `<TextAnimator>` / `KineticText` glyph placement — are kerning-accurate for
|
|
207
|
+
* that family instead of silently falling back to the bundled default. Select
|
|
208
|
+
* the font by a returned family name on `<Text fontFamily=…>` or `TextAnimator`'s
|
|
209
|
+
* `fontFamily`. Resolves to the family name(s) the font provides.
|
|
210
|
+
*
|
|
211
|
+
* Parity: the RENDERER must be given the SAME bytes (CLI `--font <path>`, or the
|
|
212
|
+
* wasm preview's own `loadFont`). Identical bytes + identical cosmic-text shaping
|
|
213
|
+
* ⇒ the positions measured here match the glyphs the engine draws. Loading the
|
|
214
|
+
* same family twice is harmless. Awaits engine init; never throws (logs + returns
|
|
215
|
+
* `[]` if the engine is unavailable or the bytes don't parse). */
|
|
216
|
+
declare function loadFont(data: Uint8Array): Promise<string[]>;
|
|
217
|
+
|
|
218
|
+
/** The render backends a scene can be judged on. `'export'` is the reference. */
|
|
219
|
+
type RenderBackend = 'export' | 'preview-webgpu' | 'preview-cpu' | 'native-cpu';
|
|
220
|
+
/** One feature that renders differently on the target backend than on export. */
|
|
221
|
+
interface Divergence {
|
|
222
|
+
/** Slash path of node indices from the root (e.g. `root/0/2`); `composition`
|
|
223
|
+
* for composition-level features. */
|
|
224
|
+
path: string;
|
|
225
|
+
/** The node's `id`, when it has one. */
|
|
226
|
+
nodeId?: string;
|
|
227
|
+
/** What diverges — `transform:rotation`, `node:clip`, `node:blend`,
|
|
228
|
+
* `node:video`, `text:runs`, `effect:light_wrap`, `effect:goo`,
|
|
229
|
+
* `gradient:fbm`, `composition:finish`, `composition:linear`,
|
|
230
|
+
* `composition:motionBlur`. */
|
|
231
|
+
feature: string;
|
|
232
|
+
/** `missing` = not drawn/applied at all; `degraded` = drawn approximately. */
|
|
233
|
+
severity: 'missing' | 'degraded';
|
|
234
|
+
/** Human note (mirrors the engine doc comments). */
|
|
235
|
+
note: string;
|
|
236
|
+
}
|
|
237
|
+
/** Options for composition-level features that do NOT survive into per-frame
|
|
238
|
+
* scene JSON (and so can't be detected by walking it). */
|
|
239
|
+
interface DivergenceOpts {
|
|
240
|
+
/** The composition declares `<Composition motionBlur={…}>` (an export-time
|
|
241
|
+
* frame expansion — pass it explicitly, the per-frame scene can't show it). */
|
|
242
|
+
motionBlur?: boolean;
|
|
243
|
+
}
|
|
244
|
+
/** Every node/effect/composition feature in `scene` whose render on `backend`
|
|
245
|
+
* diverges from the native export. Empty for `'export'` (modulo
|
|
246
|
+
* `opts.motionBlur`, which only export applies). */
|
|
247
|
+
declare function divergenceReport(scene: Scene, backend: RenderBackend, opts?: DivergenceOpts): Divergence[];
|
|
248
|
+
/** True when `scene` renders identically to export on `backend`. */
|
|
249
|
+
declare function matchesExport(scene: Scene, backend: RenderBackend, opts?: DivergenceOpts): boolean;
|
|
250
|
+
|
|
251
|
+
/** Engine line-box height as a multiple of font size (typography crate). */
|
|
252
|
+
declare const LINE_RATIO = 1.2;
|
|
253
|
+
/** One laid-out character cluster. */
|
|
254
|
+
interface GlyphCell {
|
|
255
|
+
/** The cluster's text (one user-perceived character). */
|
|
256
|
+
ch: string;
|
|
257
|
+
/** Pen x of the cluster's left edge, relative to the line's left edge. */
|
|
258
|
+
x: number;
|
|
259
|
+
/** Advance width to the next cluster (kerning + letter-spacing included). */
|
|
260
|
+
width: number;
|
|
261
|
+
/** Index among ALL cells (spaces included) — the historical stagger index. */
|
|
262
|
+
index: number;
|
|
263
|
+
/** Index among RENDERED (non-space) cells, or -1 for whitespace. */
|
|
264
|
+
renderIndex: number;
|
|
265
|
+
/** True for whitespace cells (advance only; usually not drawn). */
|
|
266
|
+
space: boolean;
|
|
267
|
+
}
|
|
268
|
+
/** A laid-out single line. */
|
|
269
|
+
interface GlyphLine {
|
|
270
|
+
/** Every cluster, spaces included, left-to-right. */
|
|
271
|
+
cells: GlyphCell[];
|
|
272
|
+
/** The non-space cells (what actually draws). */
|
|
273
|
+
rendered: GlyphCell[];
|
|
274
|
+
/** Total advance width of the line (px). */
|
|
275
|
+
width: number;
|
|
276
|
+
/** Line-box height (`fontSize × 1.2`). */
|
|
277
|
+
height: number;
|
|
278
|
+
}
|
|
279
|
+
interface GlyphLineOpts extends MeasureOpts {
|
|
280
|
+
/** Fixed per-character advance instead of measured shaping — for column-
|
|
281
|
+
* locked layouts (e.g. the slot-roll's estimated monospace cell). Receives
|
|
282
|
+
* the character; returns its advance in px. */
|
|
283
|
+
cellAdvance?: (ch: string) => number;
|
|
284
|
+
}
|
|
285
|
+
/** Lay out one line of text as positioned glyph cells. Measured, kerning-
|
|
286
|
+
* accurate advances by default (one `glyphLayout` call; estimate fallback
|
|
287
|
+
* until the wasm engine warms); fixed `cellAdvance` when supplied. */
|
|
288
|
+
declare function layoutGlyphLine(text: string, fontSize: number, opts?: GlyphLineOpts): GlyphLine;
|
|
289
|
+
/** Left-edge x of a line of `lineWidth` aligned about `anchorX` — the single
|
|
290
|
+
* alignment formula ('center' centers on the anchor, 'right' ends at it,
|
|
291
|
+
* 'left' starts at it). */
|
|
292
|
+
declare function lineStartX(align: 'left' | 'center' | 'right', anchorX: number, lineWidth: number): number;
|
|
293
|
+
/** Top y of a single line whose VERTICAL CENTER should sit at `anchorY` — the
|
|
294
|
+
* house nudge (`anchor − 0.6×fontSize`, half the 1.2 line box), rounded like
|
|
295
|
+
* every text component historically did. */
|
|
296
|
+
declare function lineTopY(anchorY: number, fontSize: number): number;
|
|
297
|
+
|
|
298
|
+
/** The resolved box of a measured line, px and frame-relative. */
|
|
299
|
+
interface ResolvedBounds {
|
|
300
|
+
/** Shaped line width (px). */
|
|
301
|
+
width: number;
|
|
302
|
+
/** Line-box height (px). */
|
|
303
|
+
height: number;
|
|
304
|
+
/** Width as a fraction of the frame width. */
|
|
305
|
+
widthFrac: number;
|
|
306
|
+
/** Height as a fraction of the frame height. */
|
|
307
|
+
heightFrac: number;
|
|
308
|
+
/** True when the line is wider than the frame's safe band
|
|
309
|
+
* (`frameWidth × (1 − 2×margin)`). */
|
|
310
|
+
overflows: boolean;
|
|
311
|
+
}
|
|
312
|
+
/** Measure `content` against the live frame: px box + %-of-frame + an overflow
|
|
313
|
+
* verdict against the safe band (`margin` per side, default the shared
|
|
314
|
+
* {@link SAFE_MARGIN} = 10%). Loads the metrics engine in the browser and
|
|
315
|
+
* re-renders when real metrics arrive. */
|
|
316
|
+
declare function useResolvedBounds(content: string, fontSize: number, opts?: MeasureOpts & {
|
|
317
|
+
margin?: number;
|
|
318
|
+
}): ResolvedBounds;
|
|
319
|
+
/** The largest font size ≤ `fontSize` at which `content` measures ≤ `maxWidth`
|
|
320
|
+
* px. Pure + synchronous (uses whatever metrics `measureText` has). The
|
|
321
|
+
* caller's `letterSpacing` (given at the ORIGINAL `fontSize`) is scaled
|
|
322
|
+
* proportionally, so tracked type fits exactly. Never scales UP. */
|
|
323
|
+
declare function fitFontSize(content: string, fontSize: number, maxWidth: number, opts?: MeasureOpts): number;
|
|
324
|
+
/** Auto-fit options shared by the text-bearing components. */
|
|
325
|
+
interface FitOpts {
|
|
326
|
+
/** `'frame'` caps the line to the frame width minus the safe margins
|
|
327
|
+
* (10% per side). Opt-in; default `'none'` (the historical behavior). */
|
|
328
|
+
fit?: 'none' | 'frame';
|
|
329
|
+
/** Explicit width cap in px. Combines with `fit` (the smaller cap wins). */
|
|
330
|
+
maxWidth?: number;
|
|
331
|
+
/** Safe-margin fraction per side for `fit: 'frame'` (default 0.1). */
|
|
332
|
+
fitMargin?: number;
|
|
333
|
+
}
|
|
334
|
+
/** Resolve the effective width cap in px for {@link FitOpts} against a frame
|
|
335
|
+
* width — `undefined` when no fit is requested. */
|
|
336
|
+
declare function fitMaxWidth(opts: FitOpts, frameWidth: number): number | undefined;
|
|
337
|
+
/** Hook form of {@link fitFontSize} driven by {@link FitOpts}: returns the
|
|
338
|
+
* (possibly reduced) font size for `content` against the live frame. Returns
|
|
339
|
+
* `fontSize` untouched when no fit is requested. Loads the metrics engine in
|
|
340
|
+
* the browser and re-renders when real metrics arrive. */
|
|
341
|
+
declare function useFittedFontSize(content: string, fontSize: number, opts?: MeasureOpts & FitOpts): number;
|
|
342
|
+
|
|
343
|
+
/** The region keywords the placement contract understands. */
|
|
344
|
+
type PlacementRegion = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'upper-third' | 'lower-third';
|
|
345
|
+
/** A normalized canvas point — 0..1 fractions, anchored at the element CENTER.
|
|
346
|
+
* Omitted axes default to 0.5 (centered on that axis). */
|
|
347
|
+
interface PlacementPoint {
|
|
348
|
+
x?: number;
|
|
349
|
+
y?: number;
|
|
350
|
+
}
|
|
351
|
+
/** What a `placement` prop accepts: a region keyword or a normalized point. */
|
|
352
|
+
type Placement = PlacementRegion | PlacementPoint;
|
|
353
|
+
/** Region → fraction of the canvas the element's CENTER targets. Mirrors the
|
|
354
|
+
* cinema bridge's `PLACEMENT_COORDS` exactly so geometry is stable when a
|
|
355
|
+
* component graduates from bridge-offset to self-anchoring. */
|
|
356
|
+
declare const PLACEMENT_REGIONS: Record<PlacementRegion, readonly [number, number]>;
|
|
357
|
+
/** Safe-area inset as a fraction of each canvas axis — the broadcast 10% margin
|
|
358
|
+
* (`LowerThird`'s `REGION_MAP` inset). Edge/corner regions flush to this. */
|
|
359
|
+
declare const SAFE_MARGIN = 0.1;
|
|
360
|
+
/** Canvas size in px. */
|
|
361
|
+
interface FrameSize {
|
|
362
|
+
width: number;
|
|
363
|
+
height: number;
|
|
364
|
+
}
|
|
365
|
+
/** The element's laid-out size in px, when the component knows it (measured
|
|
366
|
+
* text, explicit width/height). Lets edge/corner regions sit flush on the safe
|
|
367
|
+
* margin instead of approximating with a centered anchor. */
|
|
368
|
+
interface ElementSize {
|
|
369
|
+
width?: number;
|
|
370
|
+
height?: number;
|
|
371
|
+
}
|
|
372
|
+
/** A resolved placement, in px. */
|
|
373
|
+
interface ResolvedPlacement {
|
|
374
|
+
/** The element's center point. */
|
|
375
|
+
x: number;
|
|
376
|
+
y: number;
|
|
377
|
+
/** Top-left origin for an element of the given {@link ElementSize} (equals
|
|
378
|
+
* `x`/`y` when the size is unknown — treat as the center then). */
|
|
379
|
+
originX: number;
|
|
380
|
+
originY: number;
|
|
381
|
+
/** Offset from the canvas center — what a self-centering component adds to
|
|
382
|
+
* move its (already centered) assembly onto the placement. (0,0) for
|
|
383
|
+
* `'center'`. */
|
|
384
|
+
dx: number;
|
|
385
|
+
dy: number;
|
|
386
|
+
}
|
|
387
|
+
/** Narrowing helper: is this value a placement region/point at all? Useful for
|
|
388
|
+
* components that accept legacy props alongside `placement`. */
|
|
389
|
+
declare function isPlacement(value: unknown): value is Placement;
|
|
390
|
+
/** Resolve a `placement` to canvas px. Pure — see {@link usePlacement} for the
|
|
391
|
+
* hook form. `element` (when known) lets edge/corner regions sit flush on the
|
|
392
|
+
* safe margin; `{x,y}` points are always element-center anchored. */
|
|
393
|
+
declare function resolvePlacement(placement: Placement | undefined, frame: FrameSize, element?: ElementSize): ResolvedPlacement;
|
|
394
|
+
/** Resolve a `placement` against the live video config. The hook every
|
|
395
|
+
* placeable component calls. */
|
|
396
|
+
declare function usePlacement(placement: Placement | undefined, element?: ElementSize): ResolvedPlacement;
|
|
397
|
+
interface PlacedProps {
|
|
398
|
+
/** Where the box sits (region keyword or normalized `{x,y}`). Default `'center'`. */
|
|
399
|
+
placement?: Placement;
|
|
400
|
+
/** The content's local box width in px (content drawn in `[0,width]×[0,height]`). */
|
|
401
|
+
width?: number;
|
|
402
|
+
/** The content's local box height in px. */
|
|
403
|
+
height?: number;
|
|
404
|
+
children?: ReactNode;
|
|
405
|
+
}
|
|
406
|
+
/** Place an origin-relative subtree (content drawn from its local top-left in a
|
|
407
|
+
* `width`×`height` box) per the shared contract: wraps it in a `<Group>` whose
|
|
408
|
+
* origin puts the box's CENTER at the resolved placement point. */
|
|
409
|
+
declare function Placed({ placement, width, height, children }: PlacedProps): react.FunctionComponentElement<NodeProps>;
|
|
410
|
+
interface PlacementShiftProps {
|
|
411
|
+
/** Where the (self-centered) content should sit. `undefined`/`'center'` → no
|
|
412
|
+
* shift, the tree renders exactly as before. */
|
|
413
|
+
placement?: Placement;
|
|
414
|
+
children?: ReactNode;
|
|
415
|
+
}
|
|
416
|
+
/** Move an already self-centering subtree (e.g. an `<AbsoluteFill
|
|
417
|
+
* justify="center">` card) onto a placement by shifting it by the
|
|
418
|
+
* center→target delta. The cheap migration path for layout-centered
|
|
419
|
+
* components whose laid-out size isn't known author-side. */
|
|
420
|
+
declare function PlacementShift({ placement, children }: PlacementShiftProps): react.FunctionComponentElement<NodeProps> | react.FunctionComponentElement<react.FragmentProps>;
|
|
421
|
+
/** The Zod schema for a `placement` prop — shared by every component schema so
|
|
422
|
+
* the Studio agent validates one contract, not eighty dialects. */
|
|
423
|
+
declare const placementSchema: z.ZodUnion<[z.ZodEnum<["center", "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right", "upper-third", "lower-third"]>, z.ZodObject<{
|
|
424
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
425
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
x?: number | undefined;
|
|
428
|
+
y?: number | undefined;
|
|
429
|
+
}, {
|
|
430
|
+
x?: number | undefined;
|
|
431
|
+
y?: number | undefined;
|
|
432
|
+
}>]>;
|
|
433
|
+
/** Manifest prop-metadata blurb for `placement` — one wording everywhere. */
|
|
434
|
+
declare const PLACEMENT_DESCRIPTION = "Where the element sits: a region keyword ('center', 'lower-third', 'upper-third', 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right') or normalized {x,y} (0-1 canvas fractions, anchored at the element's center).";
|
|
435
|
+
|
|
436
|
+
interface Theme {
|
|
437
|
+
/** Primary brand color — the earned accent (bars, rules, highlights, glows). */
|
|
438
|
+
accent: string;
|
|
439
|
+
/** A soft, translucent accent for fills/washes behind content. Must be an
|
|
440
|
+
* engine color (`#rrggbbaa`), not a CSS `rgba()` string — it is used directly
|
|
441
|
+
* as a scene fill. */
|
|
442
|
+
accentSoft: string;
|
|
443
|
+
/** Primary text. */
|
|
444
|
+
text: string;
|
|
445
|
+
/** Secondary / supporting text. */
|
|
446
|
+
textMuted: string;
|
|
447
|
+
/** Canvas background. */
|
|
448
|
+
background: string;
|
|
449
|
+
/** Cards / panels / surfaces. */
|
|
450
|
+
surface: string;
|
|
451
|
+
/** Hairlines / borders. */
|
|
452
|
+
border: string;
|
|
453
|
+
/** Extra series colors for multi-bar / multi-slice charts (after the accent). */
|
|
454
|
+
palette: string[];
|
|
455
|
+
/** Body font family (a *loaded* family name; `undefined` = the engine default). */
|
|
456
|
+
fontFamily?: string;
|
|
457
|
+
/** Heading font family (falls back to `fontFamily`). */
|
|
458
|
+
headingFamily?: string;
|
|
459
|
+
/** Monospace font family for code (falls back to a generic mono). */
|
|
460
|
+
monoFamily?: string;
|
|
461
|
+
/** Base corner radius in px. */
|
|
462
|
+
radius: number;
|
|
463
|
+
/** Brand logo, for `LogoSting` / watermarks / outros. */
|
|
464
|
+
logo?: {
|
|
465
|
+
src?: string;
|
|
466
|
+
markup?: string;
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
/** The Onda house theme — the values components shipped with before theming. */
|
|
470
|
+
declare const defaultTheme: Theme;
|
|
471
|
+
/** Read the active theme. Returns {@link defaultTheme} when there's no provider. */
|
|
472
|
+
declare function useTheme(): Theme;
|
|
473
|
+
interface ThemeProviderProps {
|
|
474
|
+
/** Partial overrides merged over the inherited (or default) theme. */
|
|
475
|
+
theme?: Partial<Theme>;
|
|
476
|
+
children?: ReactNode;
|
|
477
|
+
}
|
|
478
|
+
/** Provide a theme to descendant components. Merges over any parent theme, so
|
|
479
|
+
* providers can nest (a section can tweak a few tokens). */
|
|
480
|
+
declare function ThemeProvider({ theme, children }: ThemeProviderProps): react.FunctionComponentElement<react.ProviderProps<Theme>>;
|
|
481
|
+
|
|
482
|
+
/** Numeric motion for a scene node. Spread the relevant fields onto a `<Group>`:
|
|
483
|
+
* `x`/`y` (px translate), `scaleX`/`scaleY` (1 = identity), `opacity` (0..1),
|
|
484
|
+
* `rotation` (degrees; optional — only keyframe animation emits it). */
|
|
485
|
+
type Motion = {
|
|
486
|
+
opacity: number;
|
|
487
|
+
x: number;
|
|
488
|
+
y: number;
|
|
489
|
+
scaleX: number;
|
|
490
|
+
scaleY: number;
|
|
491
|
+
rotation?: number;
|
|
492
|
+
};
|
|
493
|
+
type PatternInput = {
|
|
494
|
+
frame: number;
|
|
495
|
+
fps: number;
|
|
496
|
+
/** Frames (number) or a time string ('0.5s', '500ms', '12f'). */
|
|
497
|
+
delay?: TimeInput;
|
|
498
|
+
/** Frames (number) or a time string ('0.5s', '500ms', '12f'). */
|
|
499
|
+
durationInFrames?: TimeInput;
|
|
500
|
+
travelPx?: number;
|
|
501
|
+
};
|
|
502
|
+
/** Pure opacity 0 → 1 on {@link SPRING_SMOOTH}. No translate, no scale — the
|
|
503
|
+
* simplest reveal, for elements where presence alone changes. */
|
|
504
|
+
declare const entryFade: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, }: Omit<PatternInput, "travelPx">) => Motion;
|
|
505
|
+
/** Direction-parameterized translate + fade on {@link SPRING_SMOOTH}. `direction`
|
|
506
|
+
* names the *settling* direction — `'up'` rises into place (origin below),
|
|
507
|
+
* `'left'` slides in from the right. Travel is the 12–24px Onda envelope. */
|
|
508
|
+
declare const entrySlide: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, direction, distance, }: Omit<PatternInput, "travelPx"> & {
|
|
509
|
+
direction: "up" | "down" | "left" | "right";
|
|
510
|
+
distance?: number;
|
|
511
|
+
}) => Motion;
|
|
512
|
+
/** Opacity + scale from N → 1 on {@link SPRING_SMOOTH}. Restrained on purpose:
|
|
513
|
+
* default `from` is `0.9`; below ~0.85 reads as dramatic zoom.
|
|
514
|
+
*
|
|
515
|
+
* Note: scene scale is about the node's local origin (0,0), not its center —
|
|
516
|
+
* for centered growth, wrap a subtree whose origin sits where you want the
|
|
517
|
+
* scale anchored. (Per-node transform-origin is a planned engine feature.) */
|
|
518
|
+
declare const entryScale: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, from, }: Omit<PatternInput, "travelPx"> & {
|
|
519
|
+
from?: number;
|
|
520
|
+
}) => Motion;
|
|
521
|
+
/** The default entrance — translate up + fade in on {@link SPRING_SMOOTH} at
|
|
522
|
+
* `DURATION.base`. Appropriate for ~80% of entering elements. */
|
|
523
|
+
declare const entryFadeRise: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, travelPx, }: PatternInput) => Motion;
|
|
524
|
+
/** Plain fade OUT — opacity 1 → 0 on {@link HOUSE_EASE}, no transform. The exit
|
|
525
|
+
* counterpart to {@link entryFade}. */
|
|
526
|
+
declare const exitFade: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, }: Omit<PatternInput, "travelPx" | "fps"> & {
|
|
527
|
+
fps?: number;
|
|
528
|
+
}) => Motion;
|
|
529
|
+
/** The default exit — translate down + fade out at `DURATION.fast` on
|
|
530
|
+
* {@link HOUSE_EASE}. Exits are ~30% faster than entries. */
|
|
531
|
+
declare const exitFadeFall: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, travelPx, }: Omit<PatternInput, "fps"> & {
|
|
532
|
+
fps?: number;
|
|
533
|
+
}) => Motion;
|
|
534
|
+
/** Directional fade + translate OUT — the exit counterpart to {@link entrySlide}.
|
|
535
|
+
* `direction` names where the element LEAVES toward. On {@link HOUSE_EASE}. */
|
|
536
|
+
declare const exitSlide: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, direction, distance, }: Omit<PatternInput, "travelPx" | "fps"> & {
|
|
537
|
+
fps?: number;
|
|
538
|
+
direction: "up" | "down" | "left" | "right";
|
|
539
|
+
distance?: number;
|
|
540
|
+
}) => Motion;
|
|
541
|
+
/** Fade + scale OUT — the exit counterpart to {@link entryScale}. Scales from 1
|
|
542
|
+
* to `to` (default 0.9) while fading, on {@link HOUSE_EASE}. */
|
|
543
|
+
declare const exitScale: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, to, }: Omit<PatternInput, "travelPx" | "fps"> & {
|
|
544
|
+
fps?: number;
|
|
545
|
+
to?: number;
|
|
546
|
+
}) => Motion;
|
|
547
|
+
/** The two-phase hero landing — the Onda signature pattern. Phase 1: a
|
|
548
|
+
* {@link SPRING_SMOOTH} translate + fade over the full duration. Phase 2: a 3%
|
|
549
|
+
* scale overshoot ({@link OVERSHOOT}) near the end that settles back to 1.0. The
|
|
550
|
+
* two read as one continuous landing. Reserve for ≤1 element per scene. */
|
|
551
|
+
declare const heroReveal: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, travelPx, }: PatternInput) => Motion;
|
|
552
|
+
/** In-place state swap — for a value/label changing while its container stays
|
|
553
|
+
* put. Crossfade on {@link HOUSE_EASE}. Returns `{ outOpacity, inOpacity }` —
|
|
554
|
+
* apply to the old and new values (both rendered, layered, so it stays put). */
|
|
555
|
+
declare const stateSwap: ({ frame, fps, delay: delayIn, durationInFrames: durationIn, }: Omit<PatternInput, "travelPx" | "fps"> & {
|
|
556
|
+
fps?: number;
|
|
557
|
+
}) => {
|
|
558
|
+
outOpacity: number;
|
|
559
|
+
inOpacity: number;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
/** The entrance flavors {@link useEntrance} can produce. */
|
|
563
|
+
type EntranceType = 'fade' | 'rise' | 'scale' | 'slide';
|
|
564
|
+
/** Shared entrance options. `type` picks the choreography pattern. */
|
|
565
|
+
type EntranceOptions = {
|
|
566
|
+
type?: EntranceType;
|
|
567
|
+
delay?: TimeInput;
|
|
568
|
+
durationInFrames?: TimeInput;
|
|
569
|
+
/** For `type: 'slide'` — the settling direction. */
|
|
570
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
571
|
+
/** For `type: 'slide'` — travel distance in px (12–24 envelope). */
|
|
572
|
+
distance?: number;
|
|
573
|
+
/** For `type: 'scale'` — starting scale (default 0.9). */
|
|
574
|
+
from?: number;
|
|
575
|
+
};
|
|
576
|
+
/** The workhorse entrance hook — returns the {@link Motion} for the current
|
|
577
|
+
* frame. Dispatches to the choreography vocabulary so the fingerprint stays
|
|
578
|
+
* consistent. Spread the relevant fields onto a `<Group>`. */
|
|
579
|
+
declare function useEntrance(opts?: EntranceOptions): Motion;
|
|
580
|
+
/** Call once, get a function that yields the entrance {@link Motion} for sibling
|
|
581
|
+
* `i`, staggered by {@link STAGGER}. The clean way to animate a list/grid
|
|
582
|
+
* without calling a hook in a loop. */
|
|
583
|
+
declare function useStaggeredEntrance(opts?: EntranceOptions & {
|
|
584
|
+
increment?: TimeInput;
|
|
585
|
+
}): (index: number) => Motion;
|
|
586
|
+
/** The house spring value (0→1) for the current frame — the one-liner most
|
|
587
|
+
* components reach for to drive a custom interpolation. */
|
|
588
|
+
declare function useSpringValue(opts?: {
|
|
589
|
+
delay?: TimeInput;
|
|
590
|
+
durationInFrames?: TimeInput;
|
|
591
|
+
snappy?: boolean;
|
|
592
|
+
}): number;
|
|
593
|
+
/** Normalized progress (0→1) across a window, eased with {@link HOUSE_EASE} by
|
|
594
|
+
* default. For opacity/color ramps and anything that isn't physical motion
|
|
595
|
+
* (use {@link useSpringValue} for position/scale). */
|
|
596
|
+
declare function useSceneProgress(opts?: {
|
|
597
|
+
delay?: TimeInput;
|
|
598
|
+
durationInFrames?: TimeInput;
|
|
599
|
+
eased?: boolean;
|
|
600
|
+
}): number;
|
|
601
|
+
/** How many units (chars or words) of a reveal are visible at the current frame.
|
|
602
|
+
* Drives typewriter / decode / slot-roll effects. Linear by default — a steady
|
|
603
|
+
* cadence reads better than an eased one. Returns an integer in `[0, length]`. */
|
|
604
|
+
declare function useTextReveal(opts: {
|
|
605
|
+
length: number;
|
|
606
|
+
delay?: TimeInput;
|
|
607
|
+
durationInFrames?: TimeInput;
|
|
608
|
+
eased?: boolean;
|
|
609
|
+
}): number;
|
|
610
|
+
|
|
611
|
+
/** `@onda-engine/wasm-audio`'s `Beats` handle — beat/onset/tempo analysis in frame units. */
|
|
612
|
+
interface BeatsHandle {
|
|
613
|
+
readonly tempo: number;
|
|
614
|
+
readonly beats: Uint32Array;
|
|
615
|
+
readonly onsets: Uint32Array;
|
|
616
|
+
readonly onsetEnv: Float32Array;
|
|
617
|
+
}
|
|
618
|
+
/** Beat / onset / tempo analysis of a clip, in VIDEO-FRAME units — for syncing motion
|
|
619
|
+
* to the music. Returned by {@link useAudioBeats}; pair with {@link beatPulse}. */
|
|
620
|
+
interface Beats {
|
|
621
|
+
/** Estimated tempo, beats per minute (0 if undetectable). */
|
|
622
|
+
tempo: number;
|
|
623
|
+
/** Frame indices on the beat grid (ascending). */
|
|
624
|
+
beats: number[];
|
|
625
|
+
/** Frame indices of picked onsets — any transient (drum hit, note, accent). */
|
|
626
|
+
onsets: number[];
|
|
627
|
+
/** Per-frame onset strength `0..1` (one value per frame) — a continuous envelope. */
|
|
628
|
+
onsetEnv: Float32Array;
|
|
629
|
+
}
|
|
630
|
+
/** Minimal shape of `@onda-engine/wasm-audio`'s `AudioAnalyzer` — kept local so this
|
|
631
|
+
* file doesn't hard-depend on the generated wasm types at build time. */
|
|
632
|
+
interface AudioAnalyzer {
|
|
633
|
+
/** Per-frame spectrum: flat, frame-major (`frames * bands`), each `0..1`,
|
|
634
|
+
* low→high. Deterministic — identical to the native export. */
|
|
635
|
+
spectrogram(fps: number, frames: number, bands: number): Float32Array;
|
|
636
|
+
/** Beat / onset / tempo analysis over `frames` frames at `fps`. Deterministic. */
|
|
637
|
+
beats(fps: number, frames: number): BeatsHandle;
|
|
638
|
+
/** Clip duration in seconds. */
|
|
639
|
+
duration_secs(): number;
|
|
640
|
+
/** Decoded sample rate (Hz). */
|
|
641
|
+
sample_rate(): number;
|
|
642
|
+
}
|
|
643
|
+
/** Load + decode `src` (cached + shared) and return its analyzer once ready, or
|
|
644
|
+
* `null` while loading / on failure (the caller uses a procedural fallback). The
|
|
645
|
+
* component re-renders when the analyzer becomes available. Browser only —
|
|
646
|
+
* returns `null` outside a browser (export preloads the cache separately). */
|
|
647
|
+
declare function useAudioData(src: string | undefined): AudioAnalyzer | null;
|
|
648
|
+
/** Analyze `src` for BEATS / onsets / tempo (frame units, from the composition's fps +
|
|
649
|
+
* duration) so you can sync motion to the music. Returns `null` while the audio loads
|
|
650
|
+
* or on failure (browser only — the export path preloads). Pair with {@link beatPulse}:
|
|
651
|
+
* `scaleX={1 + 0.3 * beatPulse(frame, b.beats)}` punches an element on every beat.
|
|
652
|
+
*
|
|
653
|
+
* For deterministic export an agent can instead bake the `beats` array into the
|
|
654
|
+
* composition as a constant and use the pure helpers directly. */
|
|
655
|
+
declare function useAudioBeats(src: string | undefined): Beats | null;
|
|
656
|
+
/** Frames since the most recent beat at or before `frame` (`Infinity` before the first).
|
|
657
|
+
* `beats` must be ascending (as {@link useAudioBeats} returns it). */
|
|
658
|
+
declare function framesSinceBeat(frame: number, beats: readonly number[]): number;
|
|
659
|
+
/** A `1 → 0` PUNCH that fires on each beat and decays over `decay` frames — the core
|
|
660
|
+
* audio-sync primitive. Drive a scale / opacity / glow with it so the element hits on
|
|
661
|
+
* the beat: `scaleX={1 + amount * beatPulse(frame, beats)}`. */
|
|
662
|
+
declare function beatPulse(frame: number, beats: readonly number[], decay?: number): number;
|
|
663
|
+
/** True when `frame` is on a beat (within `tolerance` frames) — for hard cuts/swaps. */
|
|
664
|
+
declare function isBeat(frame: number, beats: readonly number[], tolerance?: number): boolean;
|
|
665
|
+
|
|
666
|
+
/** Time spec — seconds (number) or a string like `"0:04"`, `"30s"`, `"500ms"`, `"90f"`. */
|
|
667
|
+
type TimeSpec = string | number;
|
|
668
|
+
interface AudioClipProps {
|
|
669
|
+
/** URL or path to the audio file. AAC-in-MP4 or WAV preferred. */
|
|
670
|
+
src?: string;
|
|
671
|
+
/**
|
|
672
|
+
* Where to start in the source audio. Time spec — `"0:04"`, `"30s"`,
|
|
673
|
+
* `"500ms"`, `"90f"`, or a raw number of seconds.
|
|
674
|
+
*/
|
|
675
|
+
startAt?: TimeSpec;
|
|
676
|
+
/**
|
|
677
|
+
* Where to stop in the source. Same time spec as `startAt`. When omitted,
|
|
678
|
+
* plays to the source's end. Required for `loop`. (Not yet applied in preview.)
|
|
679
|
+
*/
|
|
680
|
+
endAt?: TimeSpec;
|
|
681
|
+
/** Amplitude volume `0..1`. */
|
|
682
|
+
volume?: number;
|
|
683
|
+
/**
|
|
684
|
+
* Advanced gain in dB. When set, wins over `volume`. Converted via
|
|
685
|
+
* `10 ** (dB / 20)`: `0` = unity, `-6` ≈ 0.5, `-12` ≈ 0.25, `-20` ≈ 0.1.
|
|
686
|
+
*/
|
|
687
|
+
gainDb?: number;
|
|
688
|
+
/**
|
|
689
|
+
* Apply an entry/exit volume envelope. Default `true`. (Not yet applied in
|
|
690
|
+
* preview; accepted for API parity.)
|
|
691
|
+
*/
|
|
692
|
+
fade?: boolean;
|
|
693
|
+
/** Frames the fade-in / fade-out takes. Default 2 (~67ms @ 30fps). */
|
|
694
|
+
fadeDuration?: TimeInput;
|
|
695
|
+
/** Loop the trimmed clip. Requires `endAt`. (Not yet applied in preview.) */
|
|
696
|
+
loop?: boolean;
|
|
697
|
+
/** Mute the clip. */
|
|
698
|
+
muted?: boolean;
|
|
699
|
+
/** Playback speed. (Not yet applied in preview.) */
|
|
700
|
+
playbackRate?: number;
|
|
701
|
+
/** Acceptable time-shift threshold before resync (seconds). */
|
|
702
|
+
acceptableTimeShiftSeconds?: number;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Schedule an audio clip. Plays from the composition start (place inside a
|
|
706
|
+
* `<Sequence>` to offset — Sequence-relative start is a follow-up), trimming the
|
|
707
|
+
* source by `startAt`, at `volume` (or `gainDb`). Emits a `<Audio>` node, which
|
|
708
|
+
* draws nothing; the player plays it for preview.
|
|
709
|
+
*/
|
|
710
|
+
declare function AudioClip({ src, startAt, volume, gainDb, muted, }?: AudioClipProps): react.JSX.Element;
|
|
711
|
+
|
|
712
|
+
/** Visualizer render style. Every style draws from the same amplitude array, so
|
|
713
|
+
* switching `type` is purely a change of geometry. */
|
|
714
|
+
type AudioVisualizerType = 'bars' | 'mirrored' | 'waveform' | 'radial' | 'dots';
|
|
715
|
+
interface AudioVisualizerProps {
|
|
716
|
+
/**
|
|
717
|
+
* Render style (default `'bars'`):
|
|
718
|
+
* - `bars` — classic vertical frequency bars.
|
|
719
|
+
* - `mirrored` — bars mirrored around the centre line (symmetric EQ).
|
|
720
|
+
* - `waveform` — a smooth filled ribbon around the centre line.
|
|
721
|
+
* - `radial` — bars radiating from a centre ring (circular spectrum).
|
|
722
|
+
* - `dots` — an LED dot-matrix meter with a brighter peak dot.
|
|
723
|
+
*/
|
|
724
|
+
type?: AudioVisualizerType;
|
|
725
|
+
/**
|
|
726
|
+
* Audio file URL to drive the bars with REAL frequency data (decoded + FFT'd by
|
|
727
|
+
* `@onda-engine/wasm-audio` — identical spectra in preview and export). Omit for the
|
|
728
|
+
* built-in procedural animation. For the browser preview the source must be
|
|
729
|
+
* same-origin or CORS-enabled; `onda export` accepts any direct URL. When set,
|
|
730
|
+
* the player also PLAYS the audio (use the volume/mute control to silence it).
|
|
731
|
+
*/
|
|
732
|
+
src?: string;
|
|
733
|
+
/** Number of frequency bands. */
|
|
734
|
+
barCount?: number;
|
|
735
|
+
/**
|
|
736
|
+
* Bar color. Pass a single hex string for a one-tone visualizer, or a
|
|
737
|
+
* two-entry array `[top, bottom]` for a vertical gradient ramp. The FIRST
|
|
738
|
+
* entry is the meaningful color on the CPU backend (see header). (default:
|
|
739
|
+
* theme `accent` for the top, theme `palette[1]` for the bottom)
|
|
740
|
+
*/
|
|
741
|
+
color?: string | string[];
|
|
742
|
+
/** Overall width of the visualizer, in px. */
|
|
743
|
+
width?: number;
|
|
744
|
+
/** Overall height of the visualizer (the tallest a band can reach), in px. */
|
|
745
|
+
height?: number;
|
|
746
|
+
/** Vertical placement of the bars within `height` (`bars` style only). */
|
|
747
|
+
align?: 'top' | 'middle' | 'bottom';
|
|
748
|
+
/** Pixel gap between adjacent bars. */
|
|
749
|
+
gap?: number;
|
|
750
|
+
/** Bar corner radius in px (also the minimum bar height so idle bars read) (default: theme `radius`). */
|
|
751
|
+
barRadius?: number;
|
|
752
|
+
/** Animation speed multiplier for the fake spectrum's drift. */
|
|
753
|
+
speed?: number;
|
|
754
|
+
/** Deterministic seed for the fake spectrum. */
|
|
755
|
+
seed?: number | string;
|
|
756
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
757
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
758
|
+
* = the default take (identical to today's output). */
|
|
759
|
+
variant?: number;
|
|
760
|
+
/** Frames before the visualizer fades/grows in. */
|
|
761
|
+
delay?: TimeInput;
|
|
762
|
+
/** Frames for the entrance grow-in. */
|
|
763
|
+
durationInFrames?: TimeInput;
|
|
764
|
+
}
|
|
765
|
+
declare function AudioVisualizer({ type, src, barCount, color: colorProp, width, height, align, gap, barRadius: barRadiusProp, speed, seed: seedProp, variant, delay, durationInFrames, }: AudioVisualizerProps): react.JSX.Element;
|
|
766
|
+
|
|
767
|
+
interface TextStyleProps {
|
|
768
|
+
/** Text color (hex `#rrggbb` / `#rrggbbaa`). Default: theme `text`. */
|
|
769
|
+
color?: string;
|
|
770
|
+
/** Loaded font family by name (any Google family; set it via `onda render
|
|
771
|
+
* --font` or a brand profile). Default: theme `fontFamily`. */
|
|
772
|
+
fontFamily?: string;
|
|
773
|
+
/** Font weight (100–900). */
|
|
774
|
+
fontWeight?: number;
|
|
775
|
+
/** Italic / oblique. */
|
|
776
|
+
italic?: boolean;
|
|
777
|
+
/** TRACKING — extra px between glyphs (CSS `letter-spacing`). Positive opens
|
|
778
|
+
* type up (premium display type + fast-moving text want air); negative
|
|
779
|
+
* tightens. Default `0` (the font's natural spacing). */
|
|
780
|
+
letterSpacing?: number;
|
|
781
|
+
/** Uppercase the text — a motion-graphics staple (bold geometric-sans all-caps).
|
|
782
|
+
* Applied to the string itself, so it survives per-glyph layout. */
|
|
783
|
+
uppercase?: boolean;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/** One bar: a label and its numeric value. */
|
|
787
|
+
interface BarChartDatum {
|
|
788
|
+
label: string;
|
|
789
|
+
value: number;
|
|
790
|
+
}
|
|
791
|
+
interface BarChartProps extends TextStyleProps {
|
|
792
|
+
/** Bars to render. Order is preserved — top to bottom. */
|
|
793
|
+
data?: BarChartDatum[];
|
|
794
|
+
/** Value mapped to a full-width bar. Bars cap at 100% of the track. */
|
|
795
|
+
max?: number;
|
|
796
|
+
/** Frames before the **first** bar starts. */
|
|
797
|
+
delay?: TimeInput;
|
|
798
|
+
/** Per-bar grow duration. Bars want more time than text (default `slow`). */
|
|
799
|
+
duration?: TimeInput;
|
|
800
|
+
/** Frames between consecutive bars (default canonical `STAGGER` = 4). */
|
|
801
|
+
stagger?: TimeInput;
|
|
802
|
+
/** Bar (and track) height in px. */
|
|
803
|
+
barHeight?: number;
|
|
804
|
+
/** Pixel gap between rows. */
|
|
805
|
+
gap?: number;
|
|
806
|
+
/** Pixels reserved for the label column (left of the track). */
|
|
807
|
+
labelWidth?: number;
|
|
808
|
+
/** Gap between the label column and the track, in px. */
|
|
809
|
+
labelGap?: number;
|
|
810
|
+
/** Track length in px — the full-width target for a bar at `max`. */
|
|
811
|
+
trackWidth?: number;
|
|
812
|
+
/** Color of the **largest** bar — the earned accent (Onda rose). */
|
|
813
|
+
accentColor?: string;
|
|
814
|
+
/** Color of non-largest bars. */
|
|
815
|
+
barColor?: string;
|
|
816
|
+
/** Bar track (background) color. */
|
|
817
|
+
trackColor?: string;
|
|
818
|
+
/** Show the numeric value at the end of each bar. */
|
|
819
|
+
showValues?: boolean;
|
|
820
|
+
/** Count each value up from 0 in sync with its bar's growth (lands exactly on
|
|
821
|
+
* the true value). Only applies when `showValues` is on. Default `true`. */
|
|
822
|
+
countUp?: boolean;
|
|
823
|
+
/** Optional headline above the chart — tells viewers what the numbers measure
|
|
824
|
+
* (e.g. "Frames per second"). */
|
|
825
|
+
title?: string;
|
|
826
|
+
/** Title font size in px. Default ~1.5× the label `fontSize`. */
|
|
827
|
+
titleSize?: number;
|
|
828
|
+
/** Title color. Defaults to `color`. */
|
|
829
|
+
titleColor?: string;
|
|
830
|
+
/** Label / value font size in px. */
|
|
831
|
+
fontSize?: number;
|
|
832
|
+
}
|
|
833
|
+
declare function BarChart({ data, max, delay: delayIn, duration: durationIn, stagger: staggerIn, barHeight, gap, labelWidth, labelGap, trackWidth, accentColor: accentColorProp, barColor: barColorProp, trackColor: trackColorProp, color: colorProp, showValues, countUp, title, titleSize, titleColor: titleColorProp, fontSize, fontFamily: fontFamilyProp, letterSpacing, uppercase, }: BarChartProps): react.JSX.Element;
|
|
834
|
+
|
|
835
|
+
/** A single bento cell. Spans default to 1×1; `accent` earns the rose tint. */
|
|
836
|
+
interface BentoItem {
|
|
837
|
+
/** Cell title (display font). */
|
|
838
|
+
title: string;
|
|
839
|
+
/** Optional headline figure shown large above the title (e.g. `'98%'`). */
|
|
840
|
+
value?: string;
|
|
841
|
+
/** Optional caption beneath the title. */
|
|
842
|
+
caption?: string;
|
|
843
|
+
/** Columns this cell spans. Clamped to the grid's `columns` (default 1). */
|
|
844
|
+
colSpan?: number;
|
|
845
|
+
/** Rows this cell spans (default 1). */
|
|
846
|
+
rowSpan?: number;
|
|
847
|
+
/** Marks the one earned-accent cell — rose value + accent border. */
|
|
848
|
+
accent?: boolean;
|
|
849
|
+
}
|
|
850
|
+
interface BentoGridProps extends TextStyleProps {
|
|
851
|
+
/** The cells, laid out left-to-right, top-to-bottom. Spans drive the rhythm. */
|
|
852
|
+
items?: BentoItem[];
|
|
853
|
+
/** Number of grid columns (default 3). */
|
|
854
|
+
columns?: number;
|
|
855
|
+
/** Gap between cells in px (default 24). */
|
|
856
|
+
gap?: number;
|
|
857
|
+
/** Overall grid width in px (default 960). */
|
|
858
|
+
width?: number;
|
|
859
|
+
/** Row-track height in px. Defaults to the column-track width (≈ square cells). */
|
|
860
|
+
rowHeight?: number;
|
|
861
|
+
/** Inner padding of each cell in px (default 34). */
|
|
862
|
+
padding?: number;
|
|
863
|
+
/** Frames before the first cell enters (default 0). */
|
|
864
|
+
delay?: TimeInput;
|
|
865
|
+
/** Frames between successive cells rising in. House stagger is 4. */
|
|
866
|
+
stagger?: TimeInput;
|
|
867
|
+
/** Base title font size in px (default 30). */
|
|
868
|
+
fontSize?: number;
|
|
869
|
+
/** Caption color (default: theme `textMuted`). */
|
|
870
|
+
captionColor?: string;
|
|
871
|
+
/** Accent color for the earned `accent` cell (default: theme `accent`). */
|
|
872
|
+
accentColor?: string;
|
|
873
|
+
/** Card fill — translucent dark, approximating glass (default: theme `surface`). */
|
|
874
|
+
cardColor?: string;
|
|
875
|
+
/** Card border color (default: theme `border`). */
|
|
876
|
+
borderColor?: string;
|
|
877
|
+
/** Body font family for captions (default: theme `fontFamily`). */
|
|
878
|
+
captionFontFamily?: string;
|
|
879
|
+
}
|
|
880
|
+
declare function BentoGrid({ items, columns, gap, width, rowHeight, padding, delay, stagger, fontSize, color: colorProp, captionColor: captionColorProp, accentColor: accentColorProp, cardColor: cardColorProp, borderColor: borderColorProp, fontFamily: fontFamilyProp, captionFontFamily: captionFontFamilyProp, }: BentoGridProps): react.JSX.Element;
|
|
881
|
+
|
|
882
|
+
interface BlurRevealProps extends TextStyleProps {
|
|
883
|
+
/** What to reveal. Rendered as a single-line `<Text>` unless `children` is
|
|
884
|
+
* provided. */
|
|
885
|
+
text?: string;
|
|
886
|
+
/** Custom content to reveal instead of `text` (wins over `text` when both are
|
|
887
|
+
* given). Lets BlurReveal wrap any subtree, not just a string. */
|
|
888
|
+
children?: ReactNode;
|
|
889
|
+
/** Frames before the reveal starts. */
|
|
890
|
+
delay?: TimeInput;
|
|
891
|
+
/** Frames until the reveal fully settles (default `DURATION.base` = 18). With
|
|
892
|
+
* `SPRING_SMOOTH` the visible motion settles in roughly this range. */
|
|
893
|
+
durationInFrames?: TimeInput;
|
|
894
|
+
/** Text size in px. Ignored when `children` is set. */
|
|
895
|
+
fontSize?: number;
|
|
896
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
897
|
+
* measured line cannot exceed the frame minus the safe margins. Default
|
|
898
|
+
* `'none'` (the historical behavior). */
|
|
899
|
+
fit?: 'none' | 'frame';
|
|
900
|
+
/** Explicit width cap in px for the line; combines with `fit` (the smaller
|
|
901
|
+
* cap wins). */
|
|
902
|
+
maxWidth?: number;
|
|
903
|
+
/** Where the reveal sits. The legacy `'top'`/`'bottom'` keywords keep their
|
|
904
|
+
* historical edge-flush meaning (layout `justify`); every other region
|
|
905
|
+
* keyword and normalized `{x,y}` (0-1, content center) goes through the
|
|
906
|
+
* shared placement contract. Default `'center'`. */
|
|
907
|
+
placement?: Placement;
|
|
908
|
+
/** Rise distance in px (the original's 16px envelope; small on purpose). */
|
|
909
|
+
travelPx?: number;
|
|
910
|
+
/** Starting blur in px (gaussian sigma) for the soft→sharp focus-pull; ramps
|
|
911
|
+
* to 0 as the reveal settles (the ondajs original's `blur(10px → 0)`). */
|
|
912
|
+
fromBlur?: number;
|
|
913
|
+
}
|
|
914
|
+
declare function BlurReveal({ text: textProp, children, delay: delayIn, durationInFrames: durationInFramesIn, color: colorProp, fontSize: fontSizeProp, fit, maxWidth, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, placement, travelPx, fromBlur, }: BlurRevealProps): react.JSX.Element;
|
|
915
|
+
|
|
916
|
+
interface BoundingBoxProps extends TextStyleProps {
|
|
917
|
+
/** Box left edge as a `0..1` fraction of the composition width. */
|
|
918
|
+
x?: number;
|
|
919
|
+
/** Box top edge as a `0..1` fraction of the composition height. */
|
|
920
|
+
y?: number;
|
|
921
|
+
/** Box width as a `0..1` fraction of the composition width. */
|
|
922
|
+
width?: number;
|
|
923
|
+
/** Box height as a `0..1` fraction of the composition height. */
|
|
924
|
+
height?: number;
|
|
925
|
+
/** Optional label tag pinned to the box's top-left corner. Empty hides it. */
|
|
926
|
+
label?: string;
|
|
927
|
+
/** Frames before the outline starts revealing. */
|
|
928
|
+
delay?: TimeInput;
|
|
929
|
+
/** Frames to reveal the full outline (default `DURATION.slow` = 28). */
|
|
930
|
+
drawDuration?: number;
|
|
931
|
+
/** Outline stroke width in px. */
|
|
932
|
+
strokeWidth?: number;
|
|
933
|
+
/** Reserved (kept for API compatibility). The perimeter draw-on traces sharp
|
|
934
|
+
* corners (the selection-marquee look), so outline rounding is not applied. */
|
|
935
|
+
cornerRadius?: number;
|
|
936
|
+
/** Label text color — a dark for contrast on the accent tag by default. */
|
|
937
|
+
labelColor?: string;
|
|
938
|
+
/** Label font size in px. */
|
|
939
|
+
fontSize?: number;
|
|
940
|
+
}
|
|
941
|
+
declare function BoundingBox({ x, y, width, height, label: labelProp, color: colorProp, delay: delayIn, drawDuration, strokeWidth, cornerRadius, labelColor, fontSize, fontFamily: fontFamilyProp, letterSpacing, uppercase, }: BoundingBoxProps): react.JSX.Element;
|
|
942
|
+
|
|
943
|
+
interface BrowserFrameProps {
|
|
944
|
+
/** URL shown in the address pill (and as the placeholder when empty). */
|
|
945
|
+
url?: string;
|
|
946
|
+
/** Image to show inside the frame when no `children` are passed. Scaled to
|
|
947
|
+
* fill the content width (see approximations). */
|
|
948
|
+
src?: string;
|
|
949
|
+
/** Frames before the entrance. */
|
|
950
|
+
delay?: TimeInput;
|
|
951
|
+
/** Scale-and-fade the frame in on the house spring. */
|
|
952
|
+
animate?: boolean;
|
|
953
|
+
/** Frame (and content) width in px. */
|
|
954
|
+
width?: number;
|
|
955
|
+
/** Content height in px (excludes the chrome bar). */
|
|
956
|
+
height?: number;
|
|
957
|
+
/** Starting scale for the entrance (default 0.96 — restrained, like ondajs). */
|
|
958
|
+
from?: number;
|
|
959
|
+
/** Card body fill (default: theme `surface`). */
|
|
960
|
+
surface?: string;
|
|
961
|
+
/** 1px card border and chrome divider (default: theme `border`). */
|
|
962
|
+
border?: string;
|
|
963
|
+
/** Traffic-light dot color (default: theme `border`). */
|
|
964
|
+
borderLit?: string;
|
|
965
|
+
/** Address-pill fill (default: theme `surface`). */
|
|
966
|
+
surface2?: string;
|
|
967
|
+
/** Content canvas background (default: theme `background`). */
|
|
968
|
+
bg?: string;
|
|
969
|
+
/** Pill/URL text color (default: theme `textMuted`). */
|
|
970
|
+
dim?: string;
|
|
971
|
+
/** Placeholder text color (default: theme `textMuted`). */
|
|
972
|
+
faint?: string;
|
|
973
|
+
/** Card corner radius in px (default: theme `radius`). */
|
|
974
|
+
cardRadius?: number;
|
|
975
|
+
/** Address-pill corner radius in px (default: theme `radius`). */
|
|
976
|
+
pillRadius?: number;
|
|
977
|
+
/** Content to wrap; renders at the content area's local origin (0,0). */
|
|
978
|
+
children?: ReactNode;
|
|
979
|
+
}
|
|
980
|
+
declare function BrowserFrame({ url, src, delay, animate, width, height, from, surface: surfaceProp, border: borderProp, borderLit: borderLitProp, surface2: surface2Prop, bg: bgProp, dim: dimProp, faint: faintProp, cardRadius: cardRadiusProp, pillRadius: pillRadiusProp, children, }: BrowserFrameProps): react.JSX.Element;
|
|
981
|
+
|
|
982
|
+
interface ButtonProps extends TextStyleProps {
|
|
983
|
+
/** The button label. */
|
|
984
|
+
label?: string;
|
|
985
|
+
/** `'primary'` = filled with `color`; `'ghost'` = transparent with a `color`
|
|
986
|
+
* border and `color`-tinted label. */
|
|
987
|
+
variant?: 'primary' | 'ghost';
|
|
988
|
+
/** Accent color — the primary fill and the ghost border/label tint
|
|
989
|
+
* (default: theme `accent`). */
|
|
990
|
+
color?: string;
|
|
991
|
+
/** Label color on the primary variant (default: theme `text`). Ignored
|
|
992
|
+
* by `'ghost'`, which tints the label with `color`. */
|
|
993
|
+
textColor?: string;
|
|
994
|
+
/** Pill width in px (default 280). */
|
|
995
|
+
width?: number;
|
|
996
|
+
/** Pill height in px (default 72). */
|
|
997
|
+
height?: number;
|
|
998
|
+
/** Corner radius in px (default: theme `radius`). */
|
|
999
|
+
cornerRadius?: number;
|
|
1000
|
+
/** Border thickness in px for the `'ghost'` variant (default 2). */
|
|
1001
|
+
borderWidth?: number;
|
|
1002
|
+
/** Label font size in px (default 24). */
|
|
1003
|
+
fontSize?: number;
|
|
1004
|
+
/** Loaded font family (e.g. a `--font` passed to `onda render`) (default: theme `fontFamily`). */
|
|
1005
|
+
fontFamily?: string;
|
|
1006
|
+
/** Label font weight (display default 600). */
|
|
1007
|
+
fontWeight?: number;
|
|
1008
|
+
/** Where the button sits: a region keyword (`'center'`, `'lower-third'`, …)
|
|
1009
|
+
* or normalized `{x,y}` (0–1, button center). The shared placement contract;
|
|
1010
|
+
* default `'center'`. */
|
|
1011
|
+
placement?: Placement;
|
|
1012
|
+
/** @deprecated Legacy alias for `placement={{ x }}` — horizontal center as a
|
|
1013
|
+
* 0–1 fraction of canvas width. */
|
|
1014
|
+
centerX?: number;
|
|
1015
|
+
/** @deprecated Legacy alias for `placement={{ y }}` — vertical center as a
|
|
1016
|
+
* 0–1 fraction of canvas height. */
|
|
1017
|
+
centerY?: number;
|
|
1018
|
+
/** Play the entrance (fade + rise on the house spring). */
|
|
1019
|
+
entrance?: boolean;
|
|
1020
|
+
/** Frames before the entrance begins. */
|
|
1021
|
+
delay?: TimeInput;
|
|
1022
|
+
/** Entrance duration in frames (default `DURATION.base` = 18). */
|
|
1023
|
+
durationInFrames?: TimeInput;
|
|
1024
|
+
/** Play the click-dip press animation. */
|
|
1025
|
+
press?: boolean;
|
|
1026
|
+
/** Frame the press dip lands on (relative to the local timeline). */
|
|
1027
|
+
pressFrame?: TimeInput;
|
|
1028
|
+
}
|
|
1029
|
+
declare function Button({ label, variant, color: colorProp, textColor: textColorProp, width, height, cornerRadius: cornerRadiusProp, borderWidth, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, placement, centerX, centerY, entrance, delay: delayIn, durationInFrames: durationInFramesIn, press, pressFrame: pressFrameIn, }: ButtonProps): react.JSX.Element;
|
|
1030
|
+
|
|
1031
|
+
/** Which side of the bubble the pointer triangle sticks out from (and thus the
|
|
1032
|
+
* rough direction the callout is aimed). */
|
|
1033
|
+
type CalloutDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
1034
|
+
interface CalloutProps extends TextStyleProps {
|
|
1035
|
+
/** Bubble label. Single line — no auto-wrap. */
|
|
1036
|
+
label?: string;
|
|
1037
|
+
/** Where the bubble sits: a region keyword (`'center'`, `'lower-third'`, …)
|
|
1038
|
+
* or normalized `{x,y}` (0–1, bubble center). The shared placement contract;
|
|
1039
|
+
* default `'center'`. */
|
|
1040
|
+
placement?: Placement;
|
|
1041
|
+
/** @deprecated Legacy alias for `placement={{ x }}` — bubble-center X as a
|
|
1042
|
+
* 0..1 fraction of canvas width. */
|
|
1043
|
+
x?: number;
|
|
1044
|
+
/** @deprecated Legacy alias for `placement={{ y }}` — bubble-center Y as a
|
|
1045
|
+
* 0..1 fraction of canvas height. */
|
|
1046
|
+
y?: number;
|
|
1047
|
+
/** Side the pointer triangle sticks out from (default `'bottom'`). */
|
|
1048
|
+
direction?: CalloutDirection;
|
|
1049
|
+
/** Frames before the bubble starts revealing. */
|
|
1050
|
+
delay?: TimeInput;
|
|
1051
|
+
/** Bubble scale-and-fade reveal duration in frames (default `DURATION.base`). */
|
|
1052
|
+
duration?: TimeInput;
|
|
1053
|
+
/** Frames after the bubble starts before the pointer eases in (default 6). */
|
|
1054
|
+
lineDelay?: TimeInput;
|
|
1055
|
+
/** Pointer reveal duration in frames (default `DURATION.base`). */
|
|
1056
|
+
lineDuration?: TimeInput;
|
|
1057
|
+
/** Bubble background fill (default: an elevated translucent-white surface that
|
|
1058
|
+
* lifts the bubble off the dark canvas). */
|
|
1059
|
+
bgColor?: string;
|
|
1060
|
+
/** Bubble border color (default: a bright translucent-white hairline). */
|
|
1061
|
+
borderColor?: string;
|
|
1062
|
+
/** Bubble border width in px (default 1). */
|
|
1063
|
+
borderWidth?: number;
|
|
1064
|
+
/** Label font size in px (default 20). */
|
|
1065
|
+
fontSize?: number;
|
|
1066
|
+
/** Horizontal padding inside the bubble (default 14). */
|
|
1067
|
+
paddingX?: number;
|
|
1068
|
+
/** Vertical padding inside the bubble (default 8). */
|
|
1069
|
+
paddingY?: number;
|
|
1070
|
+
/** Bubble corner radius (default: theme `radius`). */
|
|
1071
|
+
cornerRadius?: number;
|
|
1072
|
+
/** Pointer triangle base width in px (default 18). */
|
|
1073
|
+
pointerWidth?: number;
|
|
1074
|
+
/** Pointer triangle length (how far it pokes out) in px (default 12). */
|
|
1075
|
+
pointerLength?: number;
|
|
1076
|
+
/** Explicit bubble width in px. Overrides the measured text extent. */
|
|
1077
|
+
width?: number;
|
|
1078
|
+
}
|
|
1079
|
+
declare function Callout({ label, placement, x, y, direction, delay: delayIn, duration: durationIn, lineDelay: lineDelayIn, lineDuration: lineDurationIn, color: colorProp, bgColor: bgColorProp, borderColor: borderColorProp, borderWidth, fontSize, fontFamily: fontFamilyProp, fontWeight, letterSpacing, uppercase, paddingX, paddingY, cornerRadius: cornerRadiusProp, pointerWidth, pointerLength, width, }: CalloutProps): react.JSX.Element;
|
|
1080
|
+
|
|
1081
|
+
interface CameraShakeProps {
|
|
1082
|
+
/** Frames before the shake starts. Outside the window, offset is 0. */
|
|
1083
|
+
delay?: TimeInput;
|
|
1084
|
+
/** Frames the shake lasts. Before `delay` / after `delay + duration`, the
|
|
1085
|
+
* offset is exactly 0 and content is still. */
|
|
1086
|
+
duration?: TimeInput;
|
|
1087
|
+
/** Maximum positional offset in px. Restrained by default — bump for impact
|
|
1088
|
+
* moments. */
|
|
1089
|
+
intensity?: number;
|
|
1090
|
+
/** Maximum rotation amplitude in degrees (GPU/Vello only). A subtle wobble by
|
|
1091
|
+
* default; set `0` for pure translational shake. */
|
|
1092
|
+
rotationIntensity?: number;
|
|
1093
|
+
/** PRNG seed — same seed always produces the same shake. */
|
|
1094
|
+
seed?: number;
|
|
1095
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
1096
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
1097
|
+
* = the default take (identical to today's output). */
|
|
1098
|
+
variant?: number;
|
|
1099
|
+
/** Linearly decay intensity (and rotation) to 0 over `duration`, so the camera
|
|
1100
|
+
* settles to rest by the end. Default `true`. */
|
|
1101
|
+
decay?: boolean;
|
|
1102
|
+
/** Rest x of the wrapper in px (the shake jitters around this). */
|
|
1103
|
+
x?: number;
|
|
1104
|
+
/** Rest y of the wrapper in px (the shake jitters around this). */
|
|
1105
|
+
y?: number;
|
|
1106
|
+
/** Content to shake. */
|
|
1107
|
+
children?: ReactNode;
|
|
1108
|
+
}
|
|
1109
|
+
declare function CameraShake({ delay: delayIn, duration: durationIn, intensity, rotationIntensity, seed: seedProp, variant, decay, x, y, children, }: CameraShakeProps): react.JSX.Element;
|
|
1110
|
+
|
|
1111
|
+
interface CardShowcaseProps {
|
|
1112
|
+
brand?: string;
|
|
1113
|
+
network?: string;
|
|
1114
|
+
cardNumber?: string;
|
|
1115
|
+
heroColor?: string;
|
|
1116
|
+
heroTextColor?: string;
|
|
1117
|
+
tierColors?: string[];
|
|
1118
|
+
background?: string;
|
|
1119
|
+
tilt?: number;
|
|
1120
|
+
/** Slide speed in px/sec (rightward magnitude; per-row direction is applied). */
|
|
1121
|
+
speed?: number;
|
|
1122
|
+
/** Center logo text revealed at the end (e.g. a brand). Empty = no logo. */
|
|
1123
|
+
logo?: string;
|
|
1124
|
+
logoColor?: string;
|
|
1125
|
+
duration?: TimeInput;
|
|
1126
|
+
}
|
|
1127
|
+
declare function CardShowcase({ brand, network, cardNumber, heroColor, heroTextColor, tierColors, background, tilt, speed, logo, logoColor, duration: durationIn, }: CardShowcaseProps): react.JSX.Element;
|
|
1128
|
+
|
|
1129
|
+
/** One word inside a phrase, with its own spoken `[startMs, endMs)` window. */
|
|
1130
|
+
interface CaptionWord {
|
|
1131
|
+
text: string;
|
|
1132
|
+
startMs: number;
|
|
1133
|
+
endMs: number;
|
|
1134
|
+
}
|
|
1135
|
+
/** One transcript entry: a word and its `[startMs, endMs)` activation window. */
|
|
1136
|
+
interface CaptionEntry {
|
|
1137
|
+
text: string;
|
|
1138
|
+
startMs: number;
|
|
1139
|
+
endMs: number;
|
|
1140
|
+
/** Optional per-word timing. When present, the WHOLE phrase shows at once and
|
|
1141
|
+
* each word lights up the instant it is spoken (`currentMs` inside that word's
|
|
1142
|
+
* `[startMs, endMs)`) — true word-synced karaoke — instead of the default
|
|
1143
|
+
* cascade-timed reveal where words fade in on a fixed stagger and the accent
|
|
1144
|
+
* follows that wave. The shape `onda transcribe` emits per segment. */
|
|
1145
|
+
words?: CaptionWord[];
|
|
1146
|
+
}
|
|
1147
|
+
interface CaptionsProps extends TextStyleProps {
|
|
1148
|
+
/** The transcript timeline. Each entry is a word + its `[startMs, endMs)`
|
|
1149
|
+
* window — the format every STT / transcript tool already speaks. */
|
|
1150
|
+
captions?: CaptionEntry[];
|
|
1151
|
+
/** Frames before the timeline starts (shifts every `startMs` by this). */
|
|
1152
|
+
delay?: TimeInput;
|
|
1153
|
+
/** Active word color — the one earned accent, carried by the word the eye is
|
|
1154
|
+
* currently landing on as the line cascades in (default: theme `accent`). */
|
|
1155
|
+
accentColor?: string;
|
|
1156
|
+
/** Font size in px. */
|
|
1157
|
+
fontSize?: number;
|
|
1158
|
+
/** Unitless line height. Accepted for prop-shape parity with ondajs; the scene
|
|
1159
|
+
* `<Text>` has a fixed text box, so it is NOT applied (see `approximations`). */
|
|
1160
|
+
lineHeight?: number;
|
|
1161
|
+
/** Text alignment of the caption block within its line(s). */
|
|
1162
|
+
align?: 'left' | 'center' | 'right';
|
|
1163
|
+
/** Vertical placement band of the block. Captions sit in the lower third by
|
|
1164
|
+
* default; `'center'`/`'top'`/`'upper-third'`/`'bottom'` reposition it (the
|
|
1165
|
+
* historical band values). A normalized `{x,y}` point (0-1, line center) is
|
|
1166
|
+
* also accepted per the shared placement contract. */
|
|
1167
|
+
placement?: 'center' | 'top' | 'bottom' | 'upper-third' | 'lower-third' | {
|
|
1168
|
+
x?: number;
|
|
1169
|
+
y?: number;
|
|
1170
|
+
};
|
|
1171
|
+
/** Max line width as a 0–1 fraction of canvas width — the block wraps to more
|
|
1172
|
+
* lines within this (default 0.8) instead of overflowing the frame. */
|
|
1173
|
+
maxWidth?: number;
|
|
1174
|
+
/** Legibility backing so captions read over any footage (Text has no native
|
|
1175
|
+
* stroke). `'shadow'` (default) drops a soft dark copy behind each word;
|
|
1176
|
+
* `'outline'` rings each word in dark — the classic black-border caption that
|
|
1177
|
+
* reads over ANYTHING; `'box'` lays a rounded translucent card behind the
|
|
1178
|
+
* whole block (the CapCut subtitle look); `'none'` for clean plates. */
|
|
1179
|
+
backdrop?: 'none' | 'shadow' | 'outline' | 'box';
|
|
1180
|
+
/** Backing color for `'shadow'`/`'outline'`/`'box'` (default near-black). */
|
|
1181
|
+
backdropColor?: string;
|
|
1182
|
+
/** How the active word is emphasized. `'color'` (default) recolors it to the
|
|
1183
|
+
* accent; `'box'` seats it in a rounded accent pill with dark text (the
|
|
1184
|
+
* dominant short-form caption look). */
|
|
1185
|
+
highlight?: 'color' | 'box';
|
|
1186
|
+
}
|
|
1187
|
+
declare function Captions({ captions, delay: delayIn, color: colorProp, accentColor: accentColorProp, fontSize, fontFamily: fontFamilyProp, fontWeight, letterSpacing, uppercase, align, placement, maxWidth, backdrop, backdropColor, highlight, }: CaptionsProps): react.JSX.Element | null;
|
|
1188
|
+
|
|
1189
|
+
interface ChapterCardProps extends TextStyleProps {
|
|
1190
|
+
/** The chapter heading — the focal text on the card. */
|
|
1191
|
+
chapter: string;
|
|
1192
|
+
/** Numbered index above the chapter. String so leading zeros (`"01"`) read as intended. */
|
|
1193
|
+
number?: string;
|
|
1194
|
+
/** Frames before the number starts fading in. The whole card sequences off this. */
|
|
1195
|
+
delay?: TimeInput;
|
|
1196
|
+
/** When `true`, the number takes `numberColor` (the rose) and an underline punctuates the title. */
|
|
1197
|
+
accent?: boolean;
|
|
1198
|
+
/** Number color when `accent` is `true` (the Onda rose) (default: theme `accent`). */
|
|
1199
|
+
numberColor?: string;
|
|
1200
|
+
/** Number color when `accent` is `false` — quiet metadata dim (default: theme `textMuted`). */
|
|
1201
|
+
subtitleColor?: string;
|
|
1202
|
+
/** Number font size in px — smaller than the title, sitting above it. */
|
|
1203
|
+
numberFontSize?: number;
|
|
1204
|
+
/** Number font weight. */
|
|
1205
|
+
numberFontWeight?: number;
|
|
1206
|
+
/** Chapter title font size in px — the focal element. */
|
|
1207
|
+
titleFontSize?: number;
|
|
1208
|
+
/** Opt-in auto-fit: `'frame'` scales the TITLE size DOWN (never up) so the
|
|
1209
|
+
* title line cannot exceed the frame minus the safe margins. Default
|
|
1210
|
+
* `'none'` (the historical behavior). */
|
|
1211
|
+
fit?: 'none' | 'frame';
|
|
1212
|
+
/** Explicit width cap in px for the title line; combines with `fit` (the
|
|
1213
|
+
* smaller cap wins). */
|
|
1214
|
+
maxWidth?: number;
|
|
1215
|
+
/** Title font weight. */
|
|
1216
|
+
titleFontWeight?: number;
|
|
1217
|
+
/** Where the card sits: a region keyword (`'center'`, `'lower-third'`, ...) or
|
|
1218
|
+
* normalized `{x,y}` (0-1, card center). The shared placement contract;
|
|
1219
|
+
* default `'center'` (the historical self-centering). */
|
|
1220
|
+
placement?: Placement;
|
|
1221
|
+
}
|
|
1222
|
+
declare function ChapterCard({ chapter, number, delay: delayIn, accent, numberColor: numberColorProp, color: colorProp, subtitleColor: subtitleColorProp, numberFontSize, numberFontWeight, titleFontSize: titleFontSizeProp, fit, maxWidth, titleFontWeight, fontFamily: fontFamilyProp, letterSpacing, uppercase, placement, }: ChapterCardProps): react.JSX.Element;
|
|
1223
|
+
|
|
1224
|
+
interface CodeBlockProps extends TextStyleProps {
|
|
1225
|
+
/** The source to render. Newlines split into reveal-able lines. */
|
|
1226
|
+
code?: string;
|
|
1227
|
+
/** Filename shown in the title bar. Empty hides the title (dots still show if `chrome`). */
|
|
1228
|
+
title?: string;
|
|
1229
|
+
/** Show the macOS-style window chrome (three dots + title bar). */
|
|
1230
|
+
chrome?: boolean;
|
|
1231
|
+
/** Reveal lines one-by-one instead of all at once. */
|
|
1232
|
+
revealLines?: boolean;
|
|
1233
|
+
/** Frames before the first line appears. */
|
|
1234
|
+
delay?: TimeInput;
|
|
1235
|
+
/** Frames between successive line reveals. */
|
|
1236
|
+
lineDelay?: TimeInput;
|
|
1237
|
+
/** Code font size in px. Sized for a video canvas, not a screen UI. */
|
|
1238
|
+
fontSize?: number;
|
|
1239
|
+
/** Panel width in px. */
|
|
1240
|
+
width?: number;
|
|
1241
|
+
/** Default text color — identifiers, punctuation, operators (default: theme `text`). */
|
|
1242
|
+
textColor?: string;
|
|
1243
|
+
/** Keyword color. A muted, dusty violet — reads as syntax, not the brand accent (default: theme `palette[1]`). */
|
|
1244
|
+
keywordColor?: string;
|
|
1245
|
+
/** String literal color — dusty sage (default: theme `palette[3]`). */
|
|
1246
|
+
stringColor?: string;
|
|
1247
|
+
/** Comment color (default: theme `textMuted`). */
|
|
1248
|
+
commentColor?: string;
|
|
1249
|
+
/** Numeric literal color — dusty amber (default: theme `palette[2]`). */
|
|
1250
|
+
numberColor?: string;
|
|
1251
|
+
/** JSX / HTML tag-name color — dusty cyan (default: theme `palette[1]`). */
|
|
1252
|
+
tagColor?: string;
|
|
1253
|
+
/** Panel background fill (the "glass" surface) (default: theme `surface`). */
|
|
1254
|
+
panelColor?: string;
|
|
1255
|
+
/** Panel border color (default: theme `border`). */
|
|
1256
|
+
borderColor?: string;
|
|
1257
|
+
}
|
|
1258
|
+
declare function CodeBlock({ code, title, chrome, revealLines, delay, lineDelay, fontFamily: fontFamilyProp, letterSpacing, fontSize, width, textColor: textColorProp, keywordColor: keywordColorProp, stringColor: stringColorProp, commentColor: commentColorProp, numberColor: numberColorProp, tagColor: tagColorProp, panelColor: panelColorProp, borderColor: borderColorProp, }: CodeBlockProps): react.JSX.Element;
|
|
1259
|
+
|
|
1260
|
+
/** Line kind — drives gutter symbol, color, and row treatment. */
|
|
1261
|
+
type DiffLineType = 'add' | 'remove' | 'context';
|
|
1262
|
+
/** A single diff line. */
|
|
1263
|
+
interface DiffLine {
|
|
1264
|
+
/** The line text (no leading +/−; the gutter adds it). */
|
|
1265
|
+
text: string;
|
|
1266
|
+
/** Line kind. Defaults to `'context'` when omitted. */
|
|
1267
|
+
type?: DiffLineType;
|
|
1268
|
+
}
|
|
1269
|
+
interface CodeDiffProps extends TextStyleProps {
|
|
1270
|
+
/** The diff lines, top to bottom. */
|
|
1271
|
+
lines?: DiffLine[];
|
|
1272
|
+
/** Filename shown in the title bar. */
|
|
1273
|
+
title?: string;
|
|
1274
|
+
/** Show window chrome (dots + title bar). */
|
|
1275
|
+
chrome?: boolean;
|
|
1276
|
+
/** Reveal lines one-by-one (else all appear together). */
|
|
1277
|
+
revealLines?: boolean;
|
|
1278
|
+
/** Frames before the first line appears. */
|
|
1279
|
+
delay?: TimeInput;
|
|
1280
|
+
/** Frames between consecutive line reveals (default canonical `STAGGER` = 5). */
|
|
1281
|
+
lineDelay?: TimeInput;
|
|
1282
|
+
/** Code font size in px. */
|
|
1283
|
+
fontSize?: number;
|
|
1284
|
+
/** Panel width in px. */
|
|
1285
|
+
width?: number;
|
|
1286
|
+
/** Default (context) text color (default: theme `textMuted`). */
|
|
1287
|
+
textColor?: string;
|
|
1288
|
+
/** Added-line color — a restrained green (default: theme `palette[3]`). */
|
|
1289
|
+
addColor?: string;
|
|
1290
|
+
/** Removed-line color — a restrained red tinted toward bg (default: `#cf6f7e`). */
|
|
1291
|
+
removeColor?: string;
|
|
1292
|
+
/** Panel surface (glass) fill (default: theme `surface`). */
|
|
1293
|
+
surfaceColor?: string;
|
|
1294
|
+
/** Panel border / chrome divider color (default: theme `border`). */
|
|
1295
|
+
borderColor?: string;
|
|
1296
|
+
/** Panel corner radius in px (default: theme `radius`). */
|
|
1297
|
+
cornerRadius?: number;
|
|
1298
|
+
/** Window-chrome traffic-light dot color (default: theme `border`). */
|
|
1299
|
+
chromeDotsColor?: string;
|
|
1300
|
+
/** Window-chrome title (filename) color — the one earned accent: it names the
|
|
1301
|
+
* file under change (default: theme `accent`). */
|
|
1302
|
+
chromeTitleColor?: string;
|
|
1303
|
+
}
|
|
1304
|
+
declare function CodeDiff({ lines, title, chrome, revealLines, delay: delayIn, lineDelay: lineDelayIn, fontFamily: fontFamilyProp, letterSpacing, fontSize, width, textColor: textColorProp, addColor: addColorProp, removeColor: removeColorProp, surfaceColor: surfaceColorProp, borderColor: borderColorProp, cornerRadius: cornerRadiusProp, chromeDotsColor: chromeDotsColorProp, chromeTitleColor: chromeTitleColorProp, }: CodeDiffProps): react.JSX.Element;
|
|
1305
|
+
|
|
1306
|
+
interface ConfettiProps {
|
|
1307
|
+
/** Seed for every per-piece random (angle, reach, opacity, size, colour) — the
|
|
1308
|
+
* same seed always produces the same bloom (§1). */
|
|
1309
|
+
seed?: number;
|
|
1310
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
1311
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
1312
|
+
* = the default take (identical to today's output). */
|
|
1313
|
+
variant?: number;
|
|
1314
|
+
/** Number of motes. ~80 reads full without thrashing the render. */
|
|
1315
|
+
count?: number;
|
|
1316
|
+
/** Palette motes are picked from. Defaults to the theme accent plus a soft
|
|
1317
|
+
* accent tint and tasteful neutrals; all rendered translucent. */
|
|
1318
|
+
colors?: string[];
|
|
1319
|
+
/** Bloom origin X, as a fraction of canvas width (0 = left, 1 = right). */
|
|
1320
|
+
originX?: number;
|
|
1321
|
+
/** Bloom origin Y, as a fraction of canvas height (0 = top, 1 = bottom). */
|
|
1322
|
+
originY?: number;
|
|
1323
|
+
/** Frames before the bloom begins. */
|
|
1324
|
+
delay?: TimeInput;
|
|
1325
|
+
/** Frames over which a mote drifts and fades out. */
|
|
1326
|
+
duration?: TimeInput;
|
|
1327
|
+
/** Drift spread, in degrees, around straight up. Wider = more fan-out. */
|
|
1328
|
+
spread?: number;
|
|
1329
|
+
/** Gentle downward bias added over the drift (0 = pure rise; 1 = a soft settle). */
|
|
1330
|
+
gravity?: number;
|
|
1331
|
+
/** Base mote size in pixels — each varies around this (small motes .. soft bokeh). */
|
|
1332
|
+
pieceSize?: number;
|
|
1333
|
+
}
|
|
1334
|
+
declare function Confetti({ seed: seedProp, variant, count, colors: colorsProp, originX, originY, delay: delayIn, duration: durationIn, spread, gravity, pieceSize, }: ConfettiProps): react.JSX.Element;
|
|
1335
|
+
|
|
1336
|
+
interface CountUpProps extends TextStyleProps {
|
|
1337
|
+
/** Starting value (default `0`). */
|
|
1338
|
+
from?: number;
|
|
1339
|
+
/** Ending value (default `100`). */
|
|
1340
|
+
to?: number;
|
|
1341
|
+
/** Time before the count starts (default `0`) — frames or '0.5s'. */
|
|
1342
|
+
delay?: TimeInput;
|
|
1343
|
+
/** Time to count from `from` to `to`. Numbers want more time than text
|
|
1344
|
+
* (default `DURATION.slow` = 24 frames). */
|
|
1345
|
+
durationInFrames?: TimeInput;
|
|
1346
|
+
/** Compress the whole timing envelope (delay, stagger, durations) so the
|
|
1347
|
+
* entrance settles at least `hold` before the end of the enclosing clip
|
|
1348
|
+
* (`useVideoConfig().durationInFrames`, Sequence-scoped). Opt-in. */
|
|
1349
|
+
fitToClip?: boolean;
|
|
1350
|
+
/** Hard cap on the settle time (frames or '0.5s'). Wins over `fitToClip`. */
|
|
1351
|
+
maxSettle?: TimeInput;
|
|
1352
|
+
/** Breathing room before the cut for `fitToClip` (default 6 frames). */
|
|
1353
|
+
hold?: TimeInput;
|
|
1354
|
+
/** Fraction digits to render (default `0`). */
|
|
1355
|
+
decimals?: number;
|
|
1356
|
+
/** Insert en-US thousands separators (default `true`). */
|
|
1357
|
+
useGrouping?: boolean;
|
|
1358
|
+
/** Prepended to the number, e.g. `'$'` (default `''`). */
|
|
1359
|
+
prefix?: string;
|
|
1360
|
+
/** Appended to the number, e.g. `'%'` (default `''`). */
|
|
1361
|
+
suffix?: string;
|
|
1362
|
+
/** Font size in px. Counters are usually large (default `120`). */
|
|
1363
|
+
fontSize?: number;
|
|
1364
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
1365
|
+
* measured line cannot exceed the frame minus the safe margins. Default
|
|
1366
|
+
* `'none'` (the historical behavior). */
|
|
1367
|
+
fit?: 'none' | 'frame';
|
|
1368
|
+
/** Explicit width cap in px for the line; combines with `fit` (the smaller
|
|
1369
|
+
* cap wins). */
|
|
1370
|
+
maxWidth?: number;
|
|
1371
|
+
/** Use the snappier spring (`SPRING_SNAPPY`) for the count (default `false`,
|
|
1372
|
+
* i.e. `SPRING_SMOOTH` — matches ondajs). */
|
|
1373
|
+
snappy?: boolean;
|
|
1374
|
+
/** Where the counter sits: a region keyword (`'center'`, `'lower-third'`, …)
|
|
1375
|
+
* or normalized `{x,y}` (0–1, anchored at the FINAL value's measured
|
|
1376
|
+
* center, so the line never slides as it counts). The shared placement
|
|
1377
|
+
* contract. Omitted → the legacy origin-relative `x`/`y` translate. */
|
|
1378
|
+
placement?: Placement;
|
|
1379
|
+
/** @deprecated Legacy — pixel translate from the local origin. Prefer
|
|
1380
|
+
* `placement`. */
|
|
1381
|
+
x?: number;
|
|
1382
|
+
/** @deprecated Legacy — pixel translate from the local origin. Prefer
|
|
1383
|
+
* `placement`. */
|
|
1384
|
+
y?: number;
|
|
1385
|
+
}
|
|
1386
|
+
declare function CountUp({ from, to, delay: delayIn, durationInFrames: durationIn, fitToClip, maxSettle, hold, decimals, useGrouping, prefix, suffix, color: colorProp, fontSize: fontSizeProp, fit, maxWidth, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, snappy, placement, x, y, }: CountUpProps): react.JSX.Element;
|
|
1387
|
+
|
|
1388
|
+
interface CursorProps {
|
|
1389
|
+
/** Start X as a 0..1 fraction of canvas width. */
|
|
1390
|
+
fromX?: number;
|
|
1391
|
+
/** Start Y as a 0..1 fraction of canvas height. */
|
|
1392
|
+
fromY?: number;
|
|
1393
|
+
/** End X as a 0..1 fraction of canvas width. */
|
|
1394
|
+
toX?: number;
|
|
1395
|
+
/** End Y as a 0..1 fraction of canvas height. */
|
|
1396
|
+
toY?: number;
|
|
1397
|
+
/** Frames before the cursor starts moving. */
|
|
1398
|
+
delay?: TimeInput;
|
|
1399
|
+
/** Frames to travel from start to end on the house spring. */
|
|
1400
|
+
travelDuration?: number;
|
|
1401
|
+
/** Emit a click ripple on arrival. */
|
|
1402
|
+
click?: boolean;
|
|
1403
|
+
/** Frames after arrival before the click fires. */
|
|
1404
|
+
clickDelay?: number;
|
|
1405
|
+
/** Pointer + ripple color (hex `#rrggbb` / `#rrggbbaa`) (default: theme `text`). */
|
|
1406
|
+
color?: string;
|
|
1407
|
+
/** Pointer height in px. */
|
|
1408
|
+
size?: number;
|
|
1409
|
+
}
|
|
1410
|
+
declare function Cursor({ fromX, fromY, toX, toY, delay: delayIn, travelDuration, click, clickDelay, color: colorProp, size, }: CursorProps): react.JSX.Element;
|
|
1411
|
+
|
|
1412
|
+
interface DeviceFrameProps {
|
|
1413
|
+
/** Which device bezel to draw. */
|
|
1414
|
+
device?: 'phone' | 'laptop';
|
|
1415
|
+
/** Image src shown inside when no `children` are passed (use the literal
|
|
1416
|
+
* `"DEMO_IMAGE"` token in demos). Sized via the engine, not `object-fit`. */
|
|
1417
|
+
src?: string;
|
|
1418
|
+
/** Frames before the entrance begins. */
|
|
1419
|
+
delay?: TimeInput;
|
|
1420
|
+
/** Scale-and-fade the device in on the house spring. */
|
|
1421
|
+
animate?: boolean;
|
|
1422
|
+
/** Device width in px (height is derived from the device aspect). */
|
|
1423
|
+
width?: number;
|
|
1424
|
+
/** Bezel color (hex `#rrggbb` / `#rrggbbaa`) (default: theme `surface`). */
|
|
1425
|
+
color?: string;
|
|
1426
|
+
/** Content to wrap (scene nodes). Takes precedence over `src`. */
|
|
1427
|
+
children?: ReactNode;
|
|
1428
|
+
}
|
|
1429
|
+
declare function DeviceFrame({ device, src, delay, animate, width, color: colorProp, children, }: DeviceFrameProps): react.JSX.Element;
|
|
1430
|
+
|
|
1431
|
+
interface DrawOnProps {
|
|
1432
|
+
/** SVG path `d` attribute (in the path's own coordinate space). The default is
|
|
1433
|
+
* a gentle wave — on-brand. */
|
|
1434
|
+
d?: string;
|
|
1435
|
+
/** Stroke color (hex `#rrggbb` / `#rrggbbaa`) (default: theme `text`). */
|
|
1436
|
+
color?: string;
|
|
1437
|
+
/** Stroke width in path coordinate units. */
|
|
1438
|
+
strokeWidth?: number;
|
|
1439
|
+
/** Frames before the draw-on starts. */
|
|
1440
|
+
delay?: TimeInput;
|
|
1441
|
+
/** Frames to fully draw the path in (default `DURATION.slow` = 24). */
|
|
1442
|
+
durationInFrames?: TimeInput;
|
|
1443
|
+
}
|
|
1444
|
+
declare function DrawOn({ d, color: colorProp, strokeWidth, delay, durationInFrames, }: DrawOnProps): react.JSX.Element | null;
|
|
1445
|
+
|
|
1446
|
+
interface DynamicGridProps {
|
|
1447
|
+
/** Cell size in px (the lattice pitch). */
|
|
1448
|
+
cell?: number;
|
|
1449
|
+
/** Ruled lines or a dot lattice. */
|
|
1450
|
+
variant?: 'lines' | 'dots';
|
|
1451
|
+
/** Grid color (hex `#rrggbb` / `#rrggbbaa`) (default: theme `border`). */
|
|
1452
|
+
color?: string;
|
|
1453
|
+
/** Diagonal drift speed in px/frame. Negative drifts the other way. */
|
|
1454
|
+
speed?: number;
|
|
1455
|
+
/** Grid opacity, 0..1 — a grid is scaffold, not subject. */
|
|
1456
|
+
opacity?: number;
|
|
1457
|
+
/** Add a centered accent glow over the grid. */
|
|
1458
|
+
glow?: boolean;
|
|
1459
|
+
/** Glow color (hex). The meaningful color on the CPU fallback (first stop) (default: theme `accent`). */
|
|
1460
|
+
glowColor?: string;
|
|
1461
|
+
/** Canvas color painted behind the grid (default: theme `background`). */
|
|
1462
|
+
background?: string;
|
|
1463
|
+
/** Stroke thickness (lines) / dot radius in px (dots). */
|
|
1464
|
+
thickness?: number;
|
|
1465
|
+
}
|
|
1466
|
+
declare function DynamicGrid({ cell, variant, color: colorProp, speed, opacity, glow, glowColor: glowColorProp, background: backgroundProp, thickness, }: DynamicGridProps): react.JSX.Element;
|
|
1467
|
+
|
|
1468
|
+
interface EndCardProps extends TextStyleProps {
|
|
1469
|
+
/** Hero CTA / headline line. */
|
|
1470
|
+
cta?: string;
|
|
1471
|
+
/** Social handles or URLs displayed in a row beneath the CTA. */
|
|
1472
|
+
handles?: string[];
|
|
1473
|
+
/** Time before the CTA starts (frames, or '0.5s'/'500ms'/'12f'). The whole card is sequenced relative to this. */
|
|
1474
|
+
delay?: TimeInput;
|
|
1475
|
+
/** Where the card sits: a region keyword (`'center'`, `'lower-third'`, ...) or
|
|
1476
|
+
* normalized `{x,y}` (0-1, card center). The shared placement contract;
|
|
1477
|
+
* default `'center'` (the historical self-centering). */
|
|
1478
|
+
placement?: Placement;
|
|
1479
|
+
/** Show the accent underline beneath the CTA (default `true`). */
|
|
1480
|
+
accent?: boolean;
|
|
1481
|
+
/** CTA font size in px (default 96). */
|
|
1482
|
+
ctaFontSize?: number;
|
|
1483
|
+
/** Font weight for the CTA (default 600). */
|
|
1484
|
+
ctaFontWeight?: number;
|
|
1485
|
+
/** Handles row font size in px (default 24). */
|
|
1486
|
+
handlesFontSize?: number;
|
|
1487
|
+
/** Font weight for the handles row (default 600). */
|
|
1488
|
+
handlesFontWeight?: number;
|
|
1489
|
+
/** Handles color — defaults so the row reads quiet (default: theme `textMuted`). */
|
|
1490
|
+
handlesColor?: string;
|
|
1491
|
+
/** Underline color — the earned rose (default: theme `accent`). */
|
|
1492
|
+
accentColor?: string;
|
|
1493
|
+
}
|
|
1494
|
+
declare function EndCard({ cta, handles, delay: delayIn, placement, accent, ctaFontSize, ctaFontWeight, handlesFontSize, handlesFontWeight, color: colorProp, handlesColor: handlesColorProp, accentColor: accentColorProp, fontFamily: fontFamilyProp, letterSpacing, uppercase, }: EndCardProps): react.JSX.Element;
|
|
1495
|
+
|
|
1496
|
+
interface FadeInProps {
|
|
1497
|
+
/** Frames to wait before starting. */
|
|
1498
|
+
delay?: TimeInput;
|
|
1499
|
+
/** Frames the fade takes to settle (default `DURATION.base` = 18). */
|
|
1500
|
+
durationInFrames?: TimeInput;
|
|
1501
|
+
children?: ReactNode;
|
|
1502
|
+
}
|
|
1503
|
+
declare function FadeIn({ delay, durationInFrames, children }: FadeInProps): react.JSX.Element;
|
|
1504
|
+
|
|
1505
|
+
interface FadeOutProps {
|
|
1506
|
+
/** Frame at which the exit begins. */
|
|
1507
|
+
delay?: TimeInput;
|
|
1508
|
+
/** Frames the fade-out takes (default `DURATION.fast` = 10 — exits are quick). */
|
|
1509
|
+
durationInFrames?: TimeInput;
|
|
1510
|
+
children?: ReactNode;
|
|
1511
|
+
}
|
|
1512
|
+
declare function FadeOut({ delay, durationInFrames, children }: FadeOutProps): react.JSX.Element;
|
|
1513
|
+
|
|
1514
|
+
/** The named cinematic looks. */
|
|
1515
|
+
type FilmLook = 'warm' | 'cool' | 'noir' | 'teal-orange' | 'vibrant' | 'film' | 'faded';
|
|
1516
|
+
interface FilmGradeProps {
|
|
1517
|
+
/** The named cinematic look applied to the whole subtree. Default `'film'`. */
|
|
1518
|
+
look?: FilmLook;
|
|
1519
|
+
/**
|
|
1520
|
+
* Strength of the look, `0..1`. Lerps every grade param from the neutral
|
|
1521
|
+
* identity toward the look: `0` = no grade (pass-through), `1` = the full
|
|
1522
|
+
* look. Default `1`.
|
|
1523
|
+
*/
|
|
1524
|
+
intensity?: number;
|
|
1525
|
+
/** Explicit linear-exposure override (`2^exposure`; 0 = identity), applied on
|
|
1526
|
+
* top of the resolved look. */
|
|
1527
|
+
exposure?: number;
|
|
1528
|
+
/** Explicit contrast override (1 = identity), applied on top of the look. */
|
|
1529
|
+
contrast?: number;
|
|
1530
|
+
/** Explicit saturation override (1 = identity, 0 = grayscale), on top of the look. */
|
|
1531
|
+
saturation?: number;
|
|
1532
|
+
/** Explicit warm/cool override (R up / B down for positive; 0 = neutral), on top. */
|
|
1533
|
+
temperature?: number;
|
|
1534
|
+
/** Explicit green/magenta override (positive = green; 0 = neutral), on top. */
|
|
1535
|
+
tint?: number;
|
|
1536
|
+
/** The graded subtree — typically the whole composition. */
|
|
1537
|
+
children?: ReactNode;
|
|
1538
|
+
}
|
|
1539
|
+
declare function FilmGrade({ look, intensity, exposure, contrast, saturation, temperature, tint, children, }: FilmGradeProps): react.JSX.Element;
|
|
1540
|
+
|
|
1541
|
+
interface GradientShiftProps {
|
|
1542
|
+
/** Gradient start color (`#rrggbb` / `#rrggbbaa`). Default is the canvas tone
|
|
1543
|
+
* — near-identical to `to`, so the drift reads as a dark-on-dark breath
|
|
1544
|
+
* (default: theme `background`). */
|
|
1545
|
+
from?: string;
|
|
1546
|
+
/** Gradient end color. Default is one step warmer than `from`, intentionally
|
|
1547
|
+
* near-identical so the shift is a whisper rather than a colored wash
|
|
1548
|
+
* (default: theme `surface`). */
|
|
1549
|
+
to?: string;
|
|
1550
|
+
/** Starting gradient angle in degrees (CSS convention: `0deg` points up,
|
|
1551
|
+
* increasing clockwise). Default `135`. */
|
|
1552
|
+
angle?: number;
|
|
1553
|
+
/** Rotation rate in degrees per frame. Keep low — atmospheric, not focal.
|
|
1554
|
+
* At 30fps the default `0.5` produces a 24-second full rotation. */
|
|
1555
|
+
speed?: number;
|
|
1556
|
+
/** Frames before the drift starts. While `frame < delay` the gradient sits at
|
|
1557
|
+
* `angle`. Default `0`. */
|
|
1558
|
+
delay?: TimeInput;
|
|
1559
|
+
}
|
|
1560
|
+
declare function GradientShift({ from: fromProp, to: toProp, angle, speed, delay: delayIn, }: GradientShiftProps): react.JSX.Element;
|
|
1561
|
+
|
|
1562
|
+
interface GrainOverlayProps {
|
|
1563
|
+
/** Grain strength (peak luminance deviation). Capped at `0.15` to match the
|
|
1564
|
+
* house 2–15% range (ondajs caps grain at ~2–4%). Default `0.05`. */
|
|
1565
|
+
opacity?: number;
|
|
1566
|
+
/** Grain fineness: higher = finer, tighter speckle (noise nearer full
|
|
1567
|
+
* resolution); lower = coarser photo-grain (a lower-res field, upscaled).
|
|
1568
|
+
* Default `0.9`. */
|
|
1569
|
+
baseFrequency?: number;
|
|
1570
|
+
/** Grain contrast: widens the deviation so the texture gains punch. Clamped to
|
|
1571
|
+
* `1..4` like ondajs. Default `1`. */
|
|
1572
|
+
numOctaves?: number;
|
|
1573
|
+
/** Deterministic variation — the same seed always produces the same grain. Default `0`. */
|
|
1574
|
+
seed?: number;
|
|
1575
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
1576
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
1577
|
+
* = the default take (identical to today's output). */
|
|
1578
|
+
variant?: number;
|
|
1579
|
+
/** When `true`, the field re-seeds on a frame bucket so the grain shimmers. Off
|
|
1580
|
+
* by default — ondajs grain is intentionally static set-dressing. */
|
|
1581
|
+
animate?: boolean;
|
|
1582
|
+
/** Frames per re-seed bucket when `animate` is on. Lower = busier. Default `2`. */
|
|
1583
|
+
animateEvery?: TimeInput;
|
|
1584
|
+
/** @deprecated The grain is now a continuous per-pixel field, not scattered
|
|
1585
|
+
* dots — `count` no longer applies. Accepted for compat. */
|
|
1586
|
+
count?: number;
|
|
1587
|
+
/** @deprecated Grain is monochrome luminance noise (overlay-blended), so a
|
|
1588
|
+
* colour no longer applies. Accepted for compat. */
|
|
1589
|
+
color?: string;
|
|
1590
|
+
}
|
|
1591
|
+
declare function GrainOverlay({ opacity, baseFrequency, numOctaves, seed: seedProp, variant, animate, animateEvery: animateEveryIn, }: GrainOverlayProps): react.JSX.Element;
|
|
1592
|
+
|
|
1593
|
+
interface HighlightProps extends TextStyleProps {
|
|
1594
|
+
/** Text to highlight. */
|
|
1595
|
+
text?: string;
|
|
1596
|
+
/** Frames before the text starts revealing. */
|
|
1597
|
+
delay?: TimeInput;
|
|
1598
|
+
/** Text reveal duration in frames (default `DURATION.base` = 18). */
|
|
1599
|
+
duration?: TimeInput;
|
|
1600
|
+
/** Frames to wait after the text appears before the accent bar wipes in. */
|
|
1601
|
+
lineDelay?: TimeInput;
|
|
1602
|
+
/** Accent-bar wipe duration. Fast on purpose — emphatic (default `DURATION.fast`). */
|
|
1603
|
+
lineDuration?: TimeInput;
|
|
1604
|
+
/** Accent (highlight) bar color (default: theme `accent`). */
|
|
1605
|
+
accentColor?: string;
|
|
1606
|
+
/** Font size in px (default 64). */
|
|
1607
|
+
fontSize?: number;
|
|
1608
|
+
/** Pixels past the text edges that the accent bar extends (default 8). */
|
|
1609
|
+
paddingX?: number;
|
|
1610
|
+
/** Explicit text width in px. Overrides the glyph-count estimate when known. */
|
|
1611
|
+
width?: number;
|
|
1612
|
+
/** Local-space placement of the component's top-left. */
|
|
1613
|
+
x?: number;
|
|
1614
|
+
/** Local-space placement of the component's top-left. */
|
|
1615
|
+
y?: number;
|
|
1616
|
+
}
|
|
1617
|
+
declare function Highlight({ text: textProp, delay: delayIn, duration: durationIn, lineDelay: lineDelayIn, lineDuration: lineDurationIn, color: colorProp, accentColor: accentColorProp, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, paddingX, width, x, y, }: HighlightProps): react.JSX.Element;
|
|
1618
|
+
|
|
1619
|
+
/** The four built-in shape icons, matching ondajs (inside a 0–24 viewBox). */
|
|
1620
|
+
type IconShape = 'check' | 'cross' | 'dot' | 'star';
|
|
1621
|
+
interface IconPopProps extends TextStyleProps {
|
|
1622
|
+
/** A character/emoji to pop in (e.g. "✦", "★", "🎉"). Takes precedence over
|
|
1623
|
+
* `shape` when set. Rendered via `<Text>` so it works on both backends. */
|
|
1624
|
+
glyph?: string;
|
|
1625
|
+
/** One of the four built-in shapes (check/cross/dot/star). Used when `glyph`
|
|
1626
|
+
* is not set. Drawn as `<Path>` — GPU/Vello only. */
|
|
1627
|
+
shape?: IconShape;
|
|
1628
|
+
/** Icon size in px (the icon is square-ish, centered on its placement point). */
|
|
1629
|
+
iconSize?: number;
|
|
1630
|
+
/** Icon color (default: theme `accent`). */
|
|
1631
|
+
color?: string;
|
|
1632
|
+
/** Stroke width for the outline shapes (check, cross). Ignored by glyph and by
|
|
1633
|
+
* the filled shapes (dot, star). */
|
|
1634
|
+
strokeWidth?: number;
|
|
1635
|
+
/** Frames before the pop starts. */
|
|
1636
|
+
delay?: TimeInput;
|
|
1637
|
+
/** Frames the pop takes to settle (default `DURATION.base` = 18). */
|
|
1638
|
+
durationInFrames?: TimeInput;
|
|
1639
|
+
/** Overshoot amount — how far past 1.0 the scale peaks before settling, as a
|
|
1640
|
+
* fraction (default 0.18 ≈ an 18% bump). 0 disables the overshoot. */
|
|
1641
|
+
overshoot?: number;
|
|
1642
|
+
/** Canvas x of the icon's CENTER (the pop grows from here). */
|
|
1643
|
+
x?: number;
|
|
1644
|
+
/** Canvas y of the icon's CENTER. */
|
|
1645
|
+
y?: number;
|
|
1646
|
+
}
|
|
1647
|
+
declare function IconPop({ glyph, shape, iconSize, color: colorProp, strokeWidth, delay: delayIn, durationInFrames: durationInFramesIn, overshoot, letterSpacing, uppercase, x, y, }: IconPopProps): react.JSX.Element;
|
|
1648
|
+
|
|
1649
|
+
/** Which entrance fingerprint the image uses. `'blur'` is the ondajs default —
|
|
1650
|
+
* a real soft→sharp focus pull via the engine's `Image.blur` gaussian.
|
|
1651
|
+
* `'none'` skips the entrance entirely: the image is placed and held still
|
|
1652
|
+
* (the bare `<Image>` primitive, but with this component's box / fit /
|
|
1653
|
+
* rounded-corner ergonomics) — for logos and precise product stills that
|
|
1654
|
+
* shouldn't drift or reveal. */
|
|
1655
|
+
type ImageRevealMotion = 'blur' | 'fade' | 'scale' | 'wipe' | 'none';
|
|
1656
|
+
/** How the image fills its box. Both require `srcWidth`/`srcHeight` to differ
|
|
1657
|
+
* from a plain stretch — see the file doc comment. */
|
|
1658
|
+
type ImageRevealFit = 'cover' | 'contain';
|
|
1659
|
+
interface ImageRevealProps {
|
|
1660
|
+
/** Image URL or path (resolved at render time). */
|
|
1661
|
+
src: string;
|
|
1662
|
+
/** Which motion fingerprint the entrance uses (default `'blur'`). */
|
|
1663
|
+
motion?: ImageRevealMotion;
|
|
1664
|
+
/** Peak blur for the `'blur'` motion — the sigma (source px) the image starts
|
|
1665
|
+
* at before resolving to sharp. Ignored by the other motions. Default `24`. */
|
|
1666
|
+
blurAmount?: number;
|
|
1667
|
+
/** How the image fits its box (default `'cover'`). */
|
|
1668
|
+
fit?: ImageRevealFit;
|
|
1669
|
+
/** Frames to fully reveal (default `DURATION.base` = 18). */
|
|
1670
|
+
durationInFrames?: TimeInput;
|
|
1671
|
+
/** Frames before the reveal starts. */
|
|
1672
|
+
delay?: TimeInput;
|
|
1673
|
+
/** Box top-left X in px (default 0). */
|
|
1674
|
+
x?: number;
|
|
1675
|
+
/** Box top-left Y in px (default 0). */
|
|
1676
|
+
y?: number;
|
|
1677
|
+
/** Box width in px. Defaults to the full composition width (fill mode). */
|
|
1678
|
+
width?: number;
|
|
1679
|
+
/** Box height in px. Defaults to the full composition height (fill mode). */
|
|
1680
|
+
height?: number;
|
|
1681
|
+
/** Corner radius of the box (clips the image to a rounded rect) (default: theme `radius`). */
|
|
1682
|
+
cornerRadius?: number;
|
|
1683
|
+
}
|
|
1684
|
+
declare function ImageReveal({ src, motion, blurAmount, fit, durationInFrames, delay, x, y, width, height, cornerRadius: cornerRadiusProp, }: ImageRevealProps): react.JSX.Element;
|
|
1685
|
+
|
|
1686
|
+
interface InputFieldProps extends TextStyleProps {
|
|
1687
|
+
/** The field's value. With `typed` on, this is what types itself in. */
|
|
1688
|
+
value?: string;
|
|
1689
|
+
/** Placeholder shown while the field is empty (before any glyph is revealed). */
|
|
1690
|
+
placeholder?: string;
|
|
1691
|
+
/** Label above the field. Empty string hides it. */
|
|
1692
|
+
label?: string;
|
|
1693
|
+
/** Animate `value` typing itself in character-by-character (`useTextReveal`). */
|
|
1694
|
+
typed?: boolean;
|
|
1695
|
+
/** Frames before typing starts. */
|
|
1696
|
+
delay?: TimeInput;
|
|
1697
|
+
/** Frames to type the whole value (linear pacing). */
|
|
1698
|
+
typeDuration?: TimeInput;
|
|
1699
|
+
/** Show the accent focus ring around the field once typing begins. */
|
|
1700
|
+
focusRing?: boolean;
|
|
1701
|
+
/** Field width in px. Sized for a 1080p+ video canvas, not a screen UI. */
|
|
1702
|
+
width?: number;
|
|
1703
|
+
/** Text size in px. */
|
|
1704
|
+
fontSize?: number;
|
|
1705
|
+
/** Value text color (default: theme `text`). */
|
|
1706
|
+
textColor?: string;
|
|
1707
|
+
/** Placeholder text color (default: theme `textMuted`). */
|
|
1708
|
+
placeholderColor?: string;
|
|
1709
|
+
/** Label text color (default: theme `textMuted`). */
|
|
1710
|
+
labelColor?: string;
|
|
1711
|
+
/** Caret + focus-ring color — the one earned accent (the Onda rose) (default: theme `accent`). */
|
|
1712
|
+
accentColor?: string;
|
|
1713
|
+
/** Resting (unfocused) field border color (default: theme `border`). */
|
|
1714
|
+
borderColor?: string;
|
|
1715
|
+
/** Field background fill (the "glass" surface) (default: theme `surface`). */
|
|
1716
|
+
fieldColor?: string;
|
|
1717
|
+
/** Where the field sits: a region keyword (`'center'`, `'lower-third'`, …)
|
|
1718
|
+
* or normalized `{x,y}` (0–1, field center). The shared placement contract;
|
|
1719
|
+
* default `'center'`. */
|
|
1720
|
+
placement?: Placement;
|
|
1721
|
+
/** @deprecated Legacy alias for `placement={{ x }}` — horizontal center of
|
|
1722
|
+
* the field as a 0–1 fraction of canvas width. */
|
|
1723
|
+
x?: number;
|
|
1724
|
+
/** @deprecated Legacy alias for `placement={{ y }}` — vertical center of the
|
|
1725
|
+
* field as a 0–1 fraction of canvas height. */
|
|
1726
|
+
y?: number;
|
|
1727
|
+
}
|
|
1728
|
+
declare function InputField({ value, placeholder, label, typed, delay: delayIn, typeDuration: typeDurationIn, focusRing, width, fontSize, fontFamily: fontFamilyProp, letterSpacing, uppercase, textColor: textColorProp, placeholderColor: placeholderColorProp, labelColor: labelColorProp, accentColor: accentColorProp, borderColor: borderColorProp, fieldColor: fieldColorProp, placement, x, y, }: InputFieldProps): react.JSX.Element;
|
|
1729
|
+
|
|
1730
|
+
/** A single Kanban column: a header, an optional accent, and its ticket cards. */
|
|
1731
|
+
interface KanbanColumn {
|
|
1732
|
+
/** Column header, e.g. `'In Progress'`. */
|
|
1733
|
+
title: string;
|
|
1734
|
+
/** Status-dot + count color for this column. Defaults to a neutral faint token;
|
|
1735
|
+
* one column should earn the accent. */
|
|
1736
|
+
accent?: string;
|
|
1737
|
+
/** Ticket labels — one small card per entry, top-to-bottom. Single-line each. */
|
|
1738
|
+
cards?: string[];
|
|
1739
|
+
}
|
|
1740
|
+
interface KanbanBoardProps extends TextStyleProps {
|
|
1741
|
+
/** The columns, laid out left-to-right. Each holds its own ticket cards. */
|
|
1742
|
+
columns?: KanbanColumn[];
|
|
1743
|
+
/** Overall board width in px. Split evenly across the columns. */
|
|
1744
|
+
width?: number;
|
|
1745
|
+
/** Gap between columns (and between cards within a column) in px. */
|
|
1746
|
+
gap?: number;
|
|
1747
|
+
/** Frames before the first card enters. */
|
|
1748
|
+
delay?: TimeInput;
|
|
1749
|
+
/** Frames between successive cards rising in (house stagger = 4). */
|
|
1750
|
+
stagger?: TimeInput;
|
|
1751
|
+
/** Base column-header font size in px. */
|
|
1752
|
+
fontSize?: number;
|
|
1753
|
+
/** Default accent for the dot/count when a column omits its own (default: theme `accent`). */
|
|
1754
|
+
accent?: string;
|
|
1755
|
+
/** Header / title text color (default: theme `text`). */
|
|
1756
|
+
textColor?: string;
|
|
1757
|
+
/** Ticket-label text color (default: theme `textMuted`). */
|
|
1758
|
+
cardTextColor?: string;
|
|
1759
|
+
/** Faint color for neutral dots, counts, and card accent stripes (default: theme `textMuted`). */
|
|
1760
|
+
faintColor?: string;
|
|
1761
|
+
/** Glass column fill (translucent — see approximations) (default: theme `surface`). */
|
|
1762
|
+
columnFill?: string;
|
|
1763
|
+
/** Glass column border color (default: theme `border`). */
|
|
1764
|
+
columnStroke?: string;
|
|
1765
|
+
/** Ticket card fill (translucent — see approximations) (default: theme `surface`). */
|
|
1766
|
+
cardFill?: string;
|
|
1767
|
+
}
|
|
1768
|
+
declare function KanbanBoard({ columns, width, gap, delay: delayIn, stagger: staggerIn, fontSize, fontFamily: fontFamilyProp, letterSpacing, uppercase, accent: accentProp, textColor: textColorProp, cardTextColor: cardTextColorProp, faintColor: faintColorProp, columnFill: columnFillProp, columnStroke: columnStrokeProp, cardFill: cardFillProp, }: KanbanBoardProps): react.JSX.Element;
|
|
1769
|
+
|
|
1770
|
+
interface KenBurnsProps {
|
|
1771
|
+
/** Image source (resolved at render time by `onda render`). */
|
|
1772
|
+
src: string;
|
|
1773
|
+
/** Frames before the drift starts. */
|
|
1774
|
+
delay?: TimeInput;
|
|
1775
|
+
/** Frames over which the zoom + pan completes. 150f ≈ 5s @ 30fps. */
|
|
1776
|
+
duration?: TimeInput;
|
|
1777
|
+
/** Starting scale (atop the cover fit). Default 1.0. */
|
|
1778
|
+
fromScale?: number;
|
|
1779
|
+
/** Ending scale — keep the delta restrained (1.0 → 1.1). Default 1.1. */
|
|
1780
|
+
toScale?: number;
|
|
1781
|
+
/** Starting pan origin X. `0` = left, `1` = right. Default 0.5 (center). */
|
|
1782
|
+
fromX?: number;
|
|
1783
|
+
/** Starting pan origin Y. `0` = top, `1` = bottom. Default 0.5 (center). */
|
|
1784
|
+
fromY?: number;
|
|
1785
|
+
/** Ending pan origin X. Default 0.5. */
|
|
1786
|
+
toX?: number;
|
|
1787
|
+
/** Ending pan origin Y. Default 0.5. */
|
|
1788
|
+
toY?: number;
|
|
1789
|
+
}
|
|
1790
|
+
declare function KenBurns({ src, delay: delayIn, duration: durationIn, fromScale, toScale, fromX, fromY, toX, toY, }: KenBurnsProps): react.JSX.Element;
|
|
1791
|
+
|
|
1792
|
+
type Ease = 'linear' | 'ease' | 'easeIn' | 'easeOut' | 'easeInOut' | [number, number, number, number];
|
|
1793
|
+
/** One position keyframe. `ease` is the TEMPORAL curve of the segment ENDING at this
|
|
1794
|
+
* key (speed). `ti`/`to` are SPATIAL bezier tangents — handle offsets RELATIVE to
|
|
1795
|
+
* this key's (x,y): `to` shapes the path LEAVING this key, `ti` the path ARRIVING.
|
|
1796
|
+
* Both absent ⇒ a straight segment (legacy behaviour, unchanged). */
|
|
1797
|
+
interface PosKey {
|
|
1798
|
+
at: number;
|
|
1799
|
+
x: number;
|
|
1800
|
+
y: number;
|
|
1801
|
+
ease?: Ease;
|
|
1802
|
+
ti?: [number, number];
|
|
1803
|
+
to?: [number, number];
|
|
1804
|
+
}
|
|
1805
|
+
/** One scalar keyframe (opacity 0–1, scale, rotation°). */
|
|
1806
|
+
interface ValKey {
|
|
1807
|
+
at: number;
|
|
1808
|
+
v: number;
|
|
1809
|
+
ease?: Ease;
|
|
1810
|
+
}
|
|
1811
|
+
interface KeyframeTracks {
|
|
1812
|
+
position?: PosKey[];
|
|
1813
|
+
opacity?: ValKey[];
|
|
1814
|
+
scale?: ValKey[];
|
|
1815
|
+
/** Non-uniform horizontal scale — wins over `scale` when present. */
|
|
1816
|
+
scaleX?: ValKey[];
|
|
1817
|
+
/** Non-uniform vertical scale — wins over `scale` when present. */
|
|
1818
|
+
scaleY?: ValKey[];
|
|
1819
|
+
rotation?: ValKey[];
|
|
1820
|
+
}
|
|
1821
|
+
interface SampledKeyframes {
|
|
1822
|
+
x: number;
|
|
1823
|
+
y: number;
|
|
1824
|
+
opacity: number;
|
|
1825
|
+
scale: number;
|
|
1826
|
+
scaleX: number;
|
|
1827
|
+
scaleY: number;
|
|
1828
|
+
rotation: number;
|
|
1829
|
+
}
|
|
1830
|
+
/** Sample one channel of a track at `frame` — clamps to the end keys; between two
|
|
1831
|
+
* keys, eases `t` by the LATER key's `ease` (the segment's curve). */
|
|
1832
|
+
declare function sampleTrack<T extends {
|
|
1833
|
+
at: number;
|
|
1834
|
+
ease?: Ease;
|
|
1835
|
+
}>(track: T[] | undefined, frame: number, get: (k: T) => number, dflt: number): number;
|
|
1836
|
+
/** Sample every channel at `frame`. Absent channels return their neutral default
|
|
1837
|
+
* (position offset 0, opacity 1, scale 1, rotation 0). */
|
|
1838
|
+
declare function sampleKeyframes(tracks: KeyframeTracks, frame: number): SampledKeyframes;
|
|
1839
|
+
/** True if `params` carries any keyframe track — lets a renderer/editor detect a
|
|
1840
|
+
* `pattern:"keyframes"` animation. */
|
|
1841
|
+
declare function hasKeyframeTracks(params: Record<string, unknown> | undefined): boolean;
|
|
1842
|
+
|
|
1843
|
+
interface SlotRef<T> {
|
|
1844
|
+
slot: string;
|
|
1845
|
+
default: T;
|
|
1846
|
+
value?: T;
|
|
1847
|
+
}
|
|
1848
|
+
type Slottable<T> = T | SlotRef<T>;
|
|
1849
|
+
interface KeyframesImageContent {
|
|
1850
|
+
kind: 'image';
|
|
1851
|
+
/** Image source — a literal URL or a `{slot}` to swap. Omit for a `gradient`/`color` placeholder. */
|
|
1852
|
+
src?: Slottable<string>;
|
|
1853
|
+
/** Gradient fill (linear/radial/fbm or a `{slot}`) used when `src` is absent — wins over `color`. */
|
|
1854
|
+
gradient?: Slottable<GradientInput>;
|
|
1855
|
+
/** Solid fill — a hex, a brand-token name, or a `{slot}`; used when neither `src` nor `gradient` is set. Defaults to the theme surface. */
|
|
1856
|
+
color?: Slottable<string>;
|
|
1857
|
+
/** Outline color (hex/token/`{slot}`) — for a stroked/outline rect. */
|
|
1858
|
+
stroke?: Slottable<string>;
|
|
1859
|
+
/** Outline thickness (px) — a literal or a `{slot}`. */
|
|
1860
|
+
strokeWidth?: Slottable<number>;
|
|
1861
|
+
/** Width (px) — a literal or a `{slot}` (resize). */
|
|
1862
|
+
width: Slottable<number>;
|
|
1863
|
+
/** Height (px) — a literal or a `{slot}` (resize). */
|
|
1864
|
+
height: Slottable<number>;
|
|
1865
|
+
/** Corner rounding (px) — a literal or a `{slot}`. */
|
|
1866
|
+
cornerRadius?: Slottable<number>;
|
|
1867
|
+
/** Pivot in content space (defaults to the tile CENTER). */
|
|
1868
|
+
anchorX?: number;
|
|
1869
|
+
anchorY?: number;
|
|
1870
|
+
}
|
|
1871
|
+
/** An ellipse/ring leaf — fill via `color`/`gradient`, or `stroke` only for a ring. */
|
|
1872
|
+
interface KeyframesEllipseContent {
|
|
1873
|
+
kind: 'ellipse';
|
|
1874
|
+
width: Slottable<number>;
|
|
1875
|
+
height: Slottable<number>;
|
|
1876
|
+
color?: Slottable<string>;
|
|
1877
|
+
gradient?: Slottable<GradientInput>;
|
|
1878
|
+
stroke?: Slottable<string>;
|
|
1879
|
+
strokeWidth?: Slottable<number>;
|
|
1880
|
+
anchorX?: number;
|
|
1881
|
+
anchorY?: number;
|
|
1882
|
+
}
|
|
1883
|
+
/** An arbitrary vector path leaf (SVG `d`, local space). Native/GPU render. */
|
|
1884
|
+
interface KeyframesPathContent {
|
|
1885
|
+
kind: 'path';
|
|
1886
|
+
d: string;
|
|
1887
|
+
color?: Slottable<string>;
|
|
1888
|
+
gradient?: Slottable<GradientInput>;
|
|
1889
|
+
stroke?: Slottable<string>;
|
|
1890
|
+
strokeWidth?: Slottable<number>;
|
|
1891
|
+
anchorX?: number;
|
|
1892
|
+
anchorY?: number;
|
|
1893
|
+
}
|
|
1894
|
+
interface KeyframesTextContent {
|
|
1895
|
+
kind: 'text';
|
|
1896
|
+
text: Slottable<string>;
|
|
1897
|
+
/** Text size (px) — a literal or a `{slot}` (resize). */
|
|
1898
|
+
fontSize: Slottable<number>;
|
|
1899
|
+
color?: Slottable<string>;
|
|
1900
|
+
/** Typeface — a literal family name or a `{slot}` (the brand `font`). */
|
|
1901
|
+
fontFamily?: Slottable<string>;
|
|
1902
|
+
/** Weight — a literal or a `{slot}`. */
|
|
1903
|
+
fontWeight?: Slottable<number>;
|
|
1904
|
+
letterSpacing?: number;
|
|
1905
|
+
/** Horizontal alignment of the text about its `position` x. `'left'` (default,
|
|
1906
|
+
* and the legacy behaviour) anchors the LEFT edge at the position; `'center'`
|
|
1907
|
+
* measures the rendered text and centres it on the position; `'right'` ends at
|
|
1908
|
+
* it. When set, it OVERRIDES `anchorX` (the engine computes the pivot). This is
|
|
1909
|
+
* what lets the agent "centre this text" on a raw-positioned Keyframes element. */
|
|
1910
|
+
align?: 'left' | 'center' | 'right';
|
|
1911
|
+
/** Vertical alignment of the text about its `position` y. `'top'` (default, the
|
|
1912
|
+
* legacy behaviour) anchors the TOP of the line box at the position; `'middle'`
|
|
1913
|
+
* centres it vertically; `'bottom'` anchors the bottom edge. When set, it
|
|
1914
|
+
* OVERRIDES `anchorY`. Combine with `align` for the full 9-point grid — e.g.
|
|
1915
|
+
* `align:'right' + vAlign:'top'` = top-right corner, `align:'center' +
|
|
1916
|
+
* vAlign:'middle'` = dead-centre on the position. */
|
|
1917
|
+
vAlign?: 'top' | 'middle' | 'bottom';
|
|
1918
|
+
/** Pivot in content space (defaults to top-left 0,0). `anchorX` ignored when
|
|
1919
|
+
* `align` is set; `anchorY` ignored when `vAlign` is set. */
|
|
1920
|
+
anchorX?: number;
|
|
1921
|
+
anchorY?: number;
|
|
1922
|
+
}
|
|
1923
|
+
type KeyframesContent = KeyframesImageContent | KeyframesTextContent | KeyframesEllipseContent | KeyframesPathContent;
|
|
1924
|
+
/** A keyframe on the path-`d` MORPH track: the `content.kind:"path"` `d` at frame `at`. */
|
|
1925
|
+
interface DMorphKey {
|
|
1926
|
+
at: number;
|
|
1927
|
+
d: string;
|
|
1928
|
+
}
|
|
1929
|
+
interface KeyframesProps {
|
|
1930
|
+
position?: PosKey[];
|
|
1931
|
+
opacity?: ValKey[];
|
|
1932
|
+
scale?: ValKey[];
|
|
1933
|
+
/** Non-uniform horizontal scale — wins over `scale` (e.g. a bar growing wide). */
|
|
1934
|
+
scaleX?: ValKey[];
|
|
1935
|
+
/** Non-uniform vertical scale — wins over `scale`. */
|
|
1936
|
+
scaleY?: ValKey[];
|
|
1937
|
+
rotation?: ValKey[];
|
|
1938
|
+
/** Path-`d` MORPH track — interpolates a `content.kind:"path"` element's `d` across
|
|
1939
|
+
* keyframes so the SHAPE itself transforms (a wave reforming, a logo morphing). The
|
|
1940
|
+
* forms must share segment structure (same command sequence) → numeric lerp with
|
|
1941
|
+
* ease-in-out, exactly like CSS `d:path()`. Ignored for non-path content. */
|
|
1942
|
+
morph?: DMorphKey[];
|
|
1943
|
+
content: KeyframesContent;
|
|
1944
|
+
}
|
|
1945
|
+
declare function Keyframes({ position, opacity, scale, scaleX, scaleY, rotation, morph, content, }: KeyframesProps): react.JSX.Element | null;
|
|
1946
|
+
|
|
1947
|
+
interface Box {
|
|
1948
|
+
width: number;
|
|
1949
|
+
height: number;
|
|
1950
|
+
}
|
|
1951
|
+
/** The `<Group>` transform that re-frames a design-space element onto the output. */
|
|
1952
|
+
interface ResponsiveTransform {
|
|
1953
|
+
x: number;
|
|
1954
|
+
y: number;
|
|
1955
|
+
scale: number;
|
|
1956
|
+
}
|
|
1957
|
+
/** The representative design-space point an element "lives at" — the mean of its
|
|
1958
|
+
* position track, nudged to the visual CENTRE of image content (whose pivot defaults
|
|
1959
|
+
* to a corner). Returns `null` for elements with NO absolute position: those already
|
|
1960
|
+
* self-place against the output canvas (`placement`), so they must NOT be re-anchored. */
|
|
1961
|
+
declare function entryDesignAnchor(props: Record<string, unknown> | undefined): {
|
|
1962
|
+
x: number;
|
|
1963
|
+
y: number;
|
|
1964
|
+
} | null;
|
|
1965
|
+
/** The per-element Magic-Resize transform: anchor pinned per-axis, size scaled
|
|
1966
|
+
* uniformly by the smaller axis ratio so the element always fits the frame and never
|
|
1967
|
+
* distorts. A `null` anchor or a matching canvas ⇒ identity (the element self-places). */
|
|
1968
|
+
declare function responsiveEntryTransform(anchor: {
|
|
1969
|
+
x: number;
|
|
1970
|
+
y: number;
|
|
1971
|
+
} | null, design: Box, out: Box): ResponsiveTransform;
|
|
1972
|
+
|
|
1973
|
+
/** The per-glyph entrance presets. */
|
|
1974
|
+
type KineticTextPreset = 'rise' | 'fade' | 'scale' | 'blur' | 'wave';
|
|
1975
|
+
interface KineticTextProps extends TextStyleProps {
|
|
1976
|
+
/** The line to choreograph. Laid out as one row of absolutely-placed glyphs. */
|
|
1977
|
+
text?: string;
|
|
1978
|
+
/** Font size in px (default 96). */
|
|
1979
|
+
fontSize?: number;
|
|
1980
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
1981
|
+
* line cannot exceed the frame minus the safe margins. Default `'none'`
|
|
1982
|
+
* (the historical behavior). */
|
|
1983
|
+
fit?: 'none' | 'frame';
|
|
1984
|
+
/** Explicit width cap in px for the line; combines with `fit` (the smaller
|
|
1985
|
+
* cap wins). */
|
|
1986
|
+
maxWidth?: number;
|
|
1987
|
+
/** Per-glyph entrance flavor (default `'rise'`). */
|
|
1988
|
+
preset?: KineticTextPreset;
|
|
1989
|
+
/** Time between consecutive glyphs entering (default `STAGGER` = 5 frames). */
|
|
1990
|
+
stagger?: TimeInput;
|
|
1991
|
+
/** Time each glyph's entrance takes to settle (default `DURATION.base`). */
|
|
1992
|
+
durationInFrames?: TimeInput;
|
|
1993
|
+
/** Time before the FIRST glyph starts (default 0). */
|
|
1994
|
+
delay?: TimeInput;
|
|
1995
|
+
/** Compress the whole timing envelope (delay, stagger, durations) so the
|
|
1996
|
+
* entrance settles at least `hold` before the end of the enclosing clip
|
|
1997
|
+
* (`useVideoConfig().durationInFrames`, Sequence-scoped). Opt-in. */
|
|
1998
|
+
fitToClip?: boolean;
|
|
1999
|
+
/** Hard cap on the settle time (frames or '0.5s'). Wins over `fitToClip`. */
|
|
2000
|
+
maxSettle?: TimeInput;
|
|
2001
|
+
/** Breathing room before the cut for `fitToClip` (default 6 frames). */
|
|
2002
|
+
hold?: TimeInput;
|
|
2003
|
+
/** Horizontal alignment of the line about its anchor (default `'center'`). */
|
|
2004
|
+
align?: 'left' | 'center' | 'right';
|
|
2005
|
+
/** Where the line sits: a region keyword (`'center'`, `'lower-third'`, …) or
|
|
2006
|
+
* normalized `{x,y}` (0–1, line center). The shared placement contract;
|
|
2007
|
+
* default `'center'` (the historical centering). */
|
|
2008
|
+
placement?: Placement;
|
|
2009
|
+
}
|
|
2010
|
+
declare function KineticText({ text: textProp, fontSize, fit, maxWidth, preset, stagger, durationInFrames, delay, fitToClip, maxSettle, hold, align, color, fontFamily, fontWeight, italic, letterSpacing, uppercase, placement, }: KineticTextProps): react.JSX.Element;
|
|
2011
|
+
|
|
2012
|
+
interface LineChartProps {
|
|
2013
|
+
/** The series values, left to right. */
|
|
2014
|
+
data?: number[];
|
|
2015
|
+
/** Frames before the line starts drawing. */
|
|
2016
|
+
delay?: TimeInput;
|
|
2017
|
+
/** Frames for the line to fully draw on. */
|
|
2018
|
+
duration?: TimeInput;
|
|
2019
|
+
/** Line + dot color — the earned accent (default: theme `accent`). */
|
|
2020
|
+
color?: string;
|
|
2021
|
+
/** Stroke width in px. */
|
|
2022
|
+
strokeWidth?: number;
|
|
2023
|
+
/** Chart width in px. */
|
|
2024
|
+
width?: number;
|
|
2025
|
+
/** Chart height in px. */
|
|
2026
|
+
height?: number;
|
|
2027
|
+
/** Fill a soft gradient area under the line. */
|
|
2028
|
+
fill?: boolean;
|
|
2029
|
+
/** Show a dot at each data point as the line reaches it. */
|
|
2030
|
+
showDots?: boolean;
|
|
2031
|
+
}
|
|
2032
|
+
declare function LineChart({ data, delay, duration, color: colorProp, strokeWidth, width, height, fill, showDots, }: LineChartProps): react.JSX.Element;
|
|
2033
|
+
|
|
2034
|
+
type LogoRevealPreset = 'focus' | 'rise' | 'scale';
|
|
2035
|
+
interface LogoRevealProps {
|
|
2036
|
+
/** Logo image source (resolved at render time by `onda render`). */
|
|
2037
|
+
src?: string;
|
|
2038
|
+
/** Logo box width in px (the image is `fit="contain"` inside it — never cropped). */
|
|
2039
|
+
width?: number;
|
|
2040
|
+
/** Logo box height in px. */
|
|
2041
|
+
height?: number;
|
|
2042
|
+
/** Frames before the reveal starts. */
|
|
2043
|
+
delay?: number;
|
|
2044
|
+
/** Frames over which the reveal completes (the house-spring duration). */
|
|
2045
|
+
durationInFrames?: number;
|
|
2046
|
+
/** Reveal style — `focus` (blur pull, default), `rise`, or `scale`. */
|
|
2047
|
+
preset?: LogoRevealPreset;
|
|
2048
|
+
/** Starting blur sigma (px) for the `focus` pull. Default 14. */
|
|
2049
|
+
fromBlur?: number;
|
|
2050
|
+
}
|
|
2051
|
+
declare function LogoReveal({ src, width, height, delay, durationInFrames, preset, fromBlur, }: LogoRevealProps): react.JSX.Element;
|
|
2052
|
+
|
|
2053
|
+
interface LogoStingProps extends TextStyleProps {
|
|
2054
|
+
/** SVG path `d` for the logo mark, in `viewBox` coordinate space. */
|
|
2055
|
+
d?: string;
|
|
2056
|
+
/** The brand / product title beneath the mark. */
|
|
2057
|
+
title?: string;
|
|
2058
|
+
/** Frames before the sting starts. */
|
|
2059
|
+
delay?: TimeInput;
|
|
2060
|
+
/** Draw the accent rule beneath the title (the single earned-color moment). */
|
|
2061
|
+
accent?: boolean;
|
|
2062
|
+
/** SVG viewBox `"minX minY width height"` — must match the space of `d`. */
|
|
2063
|
+
viewBox?: string;
|
|
2064
|
+
/** Rendered width of the mark in px. */
|
|
2065
|
+
pathWidth?: number;
|
|
2066
|
+
/** Rendered height of the mark in px. */
|
|
2067
|
+
pathHeight?: number;
|
|
2068
|
+
/** Stroke width, in px (after the viewBox→pixel scale; see note below). */
|
|
2069
|
+
strokeWidth?: number;
|
|
2070
|
+
/** Logo stroke color (default: theme `text`). */
|
|
2071
|
+
stroke?: string;
|
|
2072
|
+
/** Underline accent color — the signature dusty rose (default: theme `accent`). */
|
|
2073
|
+
accentColor?: string;
|
|
2074
|
+
/** Title font size in px. */
|
|
2075
|
+
titleFontSize?: number;
|
|
2076
|
+
}
|
|
2077
|
+
declare function LogoSting({ d, title, delay: delayIn, accent, viewBox, pathWidth, pathHeight, strokeWidth, stroke: strokeProp, accentColor: accentColorProp, titleFontSize, color: colorProp, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, }: LogoStingProps): react.JSX.Element;
|
|
2078
|
+
|
|
2079
|
+
type LookbookLayout = 'spread-right' | 'spread-left' | 'centered';
|
|
2080
|
+
interface LookbookShotProps extends TextStyleProps {
|
|
2081
|
+
/** Product photo source (resolved at render time by `onda render`). */
|
|
2082
|
+
src?: string;
|
|
2083
|
+
/** Product name — the headline, set in the display face. */
|
|
2084
|
+
name?: string;
|
|
2085
|
+
/** Small letterspaced eyebrow above the name (category), in the body face. */
|
|
2086
|
+
eyebrow?: string;
|
|
2087
|
+
/** Quiet supporting line under the name (material / method), in the body face. */
|
|
2088
|
+
detail?: string;
|
|
2089
|
+
/** Page composition (default `spread-right`). Alternate sides across shots. */
|
|
2090
|
+
layout?: LookbookLayout;
|
|
2091
|
+
/** Frames before the card enters. */
|
|
2092
|
+
delay?: number;
|
|
2093
|
+
/** Name font size in px (default 86 for spreads, auto-reduced for `centered`). */
|
|
2094
|
+
nameFontSize?: number;
|
|
2095
|
+
/** The mat/frame color (the print border). Default a near-white off the bg. */
|
|
2096
|
+
matColor?: string;
|
|
2097
|
+
/** Soft shadow color under the mat. Default a low-alpha warm dark. */
|
|
2098
|
+
shadowColor?: string;
|
|
2099
|
+
/** Eyebrow + rule color (default: theme `accent`). */
|
|
2100
|
+
accentColor?: string;
|
|
2101
|
+
/** Detail line color (default: theme `textMuted`). */
|
|
2102
|
+
detailColor?: string;
|
|
2103
|
+
/** Body font for eyebrow + detail (default: theme `fontFamily`). */
|
|
2104
|
+
bodyFamily?: string;
|
|
2105
|
+
/** Frames over which the card's slow "breath" scale completes (default 150). */
|
|
2106
|
+
lifeDurationInFrames?: number;
|
|
2107
|
+
}
|
|
2108
|
+
declare function LookbookShot({ src, name, eyebrow, detail, layout, delay, nameFontSize, matColor, shadowColor, color: colorProp, accentColor: accentColorProp, detailColor: detailColorProp, fontFamily: fontFamilyProp, bodyFamily: bodyFamilyProp, letterSpacing, uppercase, lifeDurationInFrames, }: LookbookShotProps): react.JSX.Element;
|
|
2109
|
+
|
|
2110
|
+
/** Broadcast lower-third placement regions — the corners (or centered edge) a
|
|
2111
|
+
* name bar lives in. The `*-center` variants center the block on the canvas
|
|
2112
|
+
* mid-line, for a single credit/URL line under a closing card. */
|
|
2113
|
+
type LowerThirdPlacement = 'bottom-left' | 'bottom-right' | 'bottom-center' | 'top-left' | 'top-right' | 'top-center';
|
|
2114
|
+
interface LowerThirdProps extends TextStyleProps {
|
|
2115
|
+
/** The person's name (the primary line). */
|
|
2116
|
+
name?: string;
|
|
2117
|
+
/** The person's role / title (the secondary line). */
|
|
2118
|
+
role?: string;
|
|
2119
|
+
/** Which canvas corner the bar sits in (default `'bottom-left'`). Drives the
|
|
2120
|
+
* slide-in direction and flush alignment. */
|
|
2121
|
+
placement?: LowerThirdPlacement;
|
|
2122
|
+
/** Frames before the name slides in. */
|
|
2123
|
+
delay?: TimeInput;
|
|
2124
|
+
/** Show the accent rule beneath the name (default `true`). */
|
|
2125
|
+
accent?: boolean;
|
|
2126
|
+
/** Role color (default: theme `textMuted`). */
|
|
2127
|
+
roleColor?: string;
|
|
2128
|
+
/** Accent rule color (default: theme `accent`). */
|
|
2129
|
+
accentColor?: string;
|
|
2130
|
+
/** Name font size in px (default 48). */
|
|
2131
|
+
fontSize?: number;
|
|
2132
|
+
/** Name font weight (default 600). */
|
|
2133
|
+
nameFontWeight?: number;
|
|
2134
|
+
/** Role font size in px (default 22). */
|
|
2135
|
+
roleFontSize?: number;
|
|
2136
|
+
/** Role font weight (default 500). */
|
|
2137
|
+
roleFontWeight?: number;
|
|
2138
|
+
/** Accent rule corner radius in px (capped so a thin sliver never bulges) (default: theme `radius`). */
|
|
2139
|
+
cornerRadius?: number;
|
|
2140
|
+
}
|
|
2141
|
+
declare function LowerThird({ name, role, placement, delay: delayIn, accent, color: colorProp, roleColor: roleColorProp, accentColor: accentColorProp, fontSize, nameFontWeight, roleFontSize, roleFontWeight, fontFamily: fontFamilyProp, letterSpacing, uppercase, cornerRadius: cornerRadiusProp, }: LowerThirdProps): react.JSX.Element;
|
|
2142
|
+
|
|
2143
|
+
interface MarqueeProps extends TextStyleProps {
|
|
2144
|
+
/** Items to scroll. The list is repeated as needed for a seamless wrap. */
|
|
2145
|
+
items?: string[];
|
|
2146
|
+
/** Scroll speed in pixels per second. Keep low for restraint (default 30). */
|
|
2147
|
+
speed?: number;
|
|
2148
|
+
/** Scroll direction (default `'left'`). */
|
|
2149
|
+
direction?: 'left' | 'right';
|
|
2150
|
+
/** Pixels between items (default 64). */
|
|
2151
|
+
gap?: number;
|
|
2152
|
+
/** Font size in px (default 32). */
|
|
2153
|
+
fontSize?: number;
|
|
2154
|
+
/** Viewport width to scroll within. Defaults to the full composition width. */
|
|
2155
|
+
width?: number;
|
|
2156
|
+
/** Viewport height (the clip band). Defaults to the full composition height. */
|
|
2157
|
+
height?: number;
|
|
2158
|
+
}
|
|
2159
|
+
declare function Marquee({ items: itemsProp, speed, direction, gap, color: colorProp, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, width, height, }: MarqueeProps): react.JSX.Element;
|
|
2160
|
+
|
|
2161
|
+
interface MaskRevealProps extends TextStyleProps {
|
|
2162
|
+
/** What to reveal (single line). Ignored when `children` is supplied. */
|
|
2163
|
+
text?: string;
|
|
2164
|
+
/** Frames before the reveal starts. */
|
|
2165
|
+
delay?: TimeInput;
|
|
2166
|
+
/** Frames for the mask to fully retreat. */
|
|
2167
|
+
duration?: TimeInput;
|
|
2168
|
+
/** The side the content appears to come IN from (mirrors `SlideIn`). The mask
|
|
2169
|
+
* retreats toward this side. */
|
|
2170
|
+
direction?: 'left' | 'right' | 'top' | 'bottom';
|
|
2171
|
+
/** Text size in px (default 96). */
|
|
2172
|
+
fontSize?: number;
|
|
2173
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
2174
|
+
* padded clip box cannot exceed the frame minus the safe margins. Default
|
|
2175
|
+
* `'none'` (the historical behavior). Text mode only. */
|
|
2176
|
+
fit?: 'none' | 'frame';
|
|
2177
|
+
/** Explicit width cap in px for the padded clip box; combines with `fit`
|
|
2178
|
+
* (the smaller cap wins). Text mode only. */
|
|
2179
|
+
maxWidth?: number;
|
|
2180
|
+
/** Clip-box width in px. Required for `children`; otherwise estimated from `text`. */
|
|
2181
|
+
width?: number;
|
|
2182
|
+
/** Clip-box height in px. Required for `children`; otherwise `fontSize × 1.2`. */
|
|
2183
|
+
height?: number;
|
|
2184
|
+
/** Where the clip box sits: a region keyword (`'center'`, `'lower-third'`, …)
|
|
2185
|
+
* or normalized `{x,y}` (0–1, box center). The shared placement contract;
|
|
2186
|
+
* default `'center'` (the historical behavior). */
|
|
2187
|
+
placement?: Placement;
|
|
2188
|
+
/** Arbitrary subtree to reveal instead of `text`. Supply `width`/`height`. */
|
|
2189
|
+
children?: ReactNode;
|
|
2190
|
+
}
|
|
2191
|
+
declare function MaskReveal({ text: textProp, delay, duration, direction, color: colorProp, fontSize: fontSizeProp, fit, maxWidth, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, width, height, placement, children, }: MaskRevealProps): react.JSX.Element;
|
|
2192
|
+
|
|
2193
|
+
interface MatrixDecodeProps extends TextStyleProps {
|
|
2194
|
+
/** The text that decodes into place. */
|
|
2195
|
+
text?: string;
|
|
2196
|
+
/** Time before decoding starts — frames or '0.5s'. */
|
|
2197
|
+
delay?: TimeInput;
|
|
2198
|
+
/** Time between successive characters settling (left-to-right). */
|
|
2199
|
+
charDelay?: TimeInput;
|
|
2200
|
+
/** Time each character scrambles before it settles (min 1 frame). */
|
|
2201
|
+
scrambleDuration?: TimeInput;
|
|
2202
|
+
/** Time between glyph swaps while scrambling. Lower = faster flicker (min 1 frame). */
|
|
2203
|
+
scrambleSpeed?: TimeInput;
|
|
2204
|
+
/** Compress the whole timing envelope (delay, stagger, durations) so the
|
|
2205
|
+
* entrance settles at least `hold` before the end of the enclosing clip
|
|
2206
|
+
* (`useVideoConfig().durationInFrames`, Sequence-scoped). Opt-in. */
|
|
2207
|
+
fitToClip?: boolean;
|
|
2208
|
+
/** Hard cap on the settle time (frames or '0.5s'). Wins over `fitToClip`. */
|
|
2209
|
+
maxSettle?: TimeInput;
|
|
2210
|
+
/** Breathing room before the cut for `fitToClip` (default 6 frames). */
|
|
2211
|
+
hold?: TimeInput;
|
|
2212
|
+
/** Seed for the (deterministic) glyph picks. */
|
|
2213
|
+
seed?: number;
|
|
2214
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
2215
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
2216
|
+
* = the default take (identical to today's output). */
|
|
2217
|
+
variant?: number;
|
|
2218
|
+
/** Glyph pool drawn from while scrambling. */
|
|
2219
|
+
charset?: string;
|
|
2220
|
+
/** Color of still-scrambling glyphs — the earned accent (default: theme `accent`). */
|
|
2221
|
+
scrambleColor?: string;
|
|
2222
|
+
/** Font size in px (default 120). */
|
|
2223
|
+
fontSize?: number;
|
|
2224
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
2225
|
+
* measured line cannot exceed the frame minus the safe margins. Default
|
|
2226
|
+
* `'none'` (the historical behavior). */
|
|
2227
|
+
fit?: 'none' | 'frame';
|
|
2228
|
+
/** Explicit width cap in px for the line; combines with `fit` (the smaller
|
|
2229
|
+
* cap wins). */
|
|
2230
|
+
maxWidth?: number;
|
|
2231
|
+
/** Horizontal anchoring of the single line (approximate — see file notes).
|
|
2232
|
+
* Only applies to the legacy default/`x` anchoring — `placement` anchors the
|
|
2233
|
+
* line's measured center. */
|
|
2234
|
+
align?: 'left' | 'center' | 'right';
|
|
2235
|
+
/** Where the line sits: a region keyword (`'center'`, `'lower-third'`, …) or
|
|
2236
|
+
* normalized `{x,y}` (0–1, line center). The shared placement contract;
|
|
2237
|
+
* default `'center'`. */
|
|
2238
|
+
placement?: Placement;
|
|
2239
|
+
/** @deprecated Legacy alias — absolute x of the line's left edge in px.
|
|
2240
|
+
* Prefer `placement`. */
|
|
2241
|
+
x?: number;
|
|
2242
|
+
/** @deprecated Legacy alias — absolute y (top-ish) of the line in px. Prefer
|
|
2243
|
+
* `placement`. */
|
|
2244
|
+
y?: number;
|
|
2245
|
+
}
|
|
2246
|
+
declare function MatrixDecode({ text: textProp, delay: delayIn, charDelay: charDelayIn, scrambleDuration: scrambleDurationIn, scrambleSpeed: scrambleSpeedIn, fitToClip, maxSettle, hold, seed: seedProp, variant, charset, color: colorProp, scrambleColor: scrambleColorProp, fontSize: fontSizeProp, fit, maxWidth, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, align, placement, x, y, }: MatrixDecodeProps): react.JSX.Element;
|
|
2247
|
+
|
|
2248
|
+
interface MeshGradientProps {
|
|
2249
|
+
/** Blob colors. 2–4 reads best; they drift over the `background` canvas (default: theme `palette[0]`). */
|
|
2250
|
+
colors?: string[];
|
|
2251
|
+
/** Base canvas color behind the blobs (default: theme `background`). */
|
|
2252
|
+
background?: string;
|
|
2253
|
+
/** Drift speed multiplier. Keep low — this is atmosphere, not motion. */
|
|
2254
|
+
speed?: number;
|
|
2255
|
+
/** Seed for the blob phase/amplitude offsets (deterministic). */
|
|
2256
|
+
seed?: number;
|
|
2257
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
2258
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
2259
|
+
* = the default take (identical to today's output). */
|
|
2260
|
+
variant?: number;
|
|
2261
|
+
/** Overall blob opacity over the canvas (0..1). */
|
|
2262
|
+
opacity?: number;
|
|
2263
|
+
}
|
|
2264
|
+
declare function MeshGradient({ colors: colorsProp, background: backgroundProp, speed, seed: seedProp, variant, opacity, }: MeshGradientProps): react.JSX.Element;
|
|
2265
|
+
|
|
2266
|
+
interface MoodboardProps {
|
|
2267
|
+
/** Tile image sources (resolved at render). Distributed around the center. */
|
|
2268
|
+
images?: string[];
|
|
2269
|
+
/** Layout seed — same seed → same scatter (deterministic). */
|
|
2270
|
+
seed?: number;
|
|
2271
|
+
/** Coarse grid the tiles snap to (before jitter). */
|
|
2272
|
+
columns?: number;
|
|
2273
|
+
rows?: number;
|
|
2274
|
+
/** Central exclusion rect (no tiles), as fractions of the canvas — sized to the
|
|
2275
|
+
* title that sits there. */
|
|
2276
|
+
exclusionWidth?: number;
|
|
2277
|
+
exclusionHeight?: number;
|
|
2278
|
+
/** Frames between successive tiles ENTERING — keep it visible (default 3). */
|
|
2279
|
+
stagger?: TimeInput;
|
|
2280
|
+
/** Per-tile entrance duration (default '0.5s'). */
|
|
2281
|
+
tileEnter?: TimeInput;
|
|
2282
|
+
/** Frames between successive tiles EXITING (default 2). */
|
|
2283
|
+
exitStagger?: TimeInput;
|
|
2284
|
+
/** Per-tile exit duration (default '0.4s'). */
|
|
2285
|
+
tileExit?: TimeInput;
|
|
2286
|
+
/** Total clip length; defaults to the enclosing Sequence duration. */
|
|
2287
|
+
durationInFrames?: TimeInput;
|
|
2288
|
+
/** Entrance start scale (default 1 — the look is fade + slide, no scale). */
|
|
2289
|
+
scaleFrom?: number;
|
|
2290
|
+
/** Entrance drift distance in px (tiles rise into place). */
|
|
2291
|
+
driftPx?: number;
|
|
2292
|
+
/** Rounded-corner radius for each tile in px (default 16). */
|
|
2293
|
+
cornerRadius?: number;
|
|
2294
|
+
/** Position jitter as a fraction of the cell (default 0.12). */
|
|
2295
|
+
jitter?: number;
|
|
2296
|
+
/** Tile aspect-ratio pool (w/h) the scatter draws from (default landscape + square). */
|
|
2297
|
+
aspects?: number[];
|
|
2298
|
+
}
|
|
2299
|
+
declare function Moodboard({ images, seed, columns, rows, exclusionWidth, exclusionHeight, stagger, tileEnter, exitStagger, tileExit, durationInFrames, scaleFrom, driftPx, cornerRadius, jitter, aspects, }: MoodboardProps): react.JSX.Element | null;
|
|
2300
|
+
|
|
2301
|
+
/** One orbiting satellite node in the constellation. */
|
|
2302
|
+
interface Satellite {
|
|
2303
|
+
/** Short label inside the node — a word or single character reads best. */
|
|
2304
|
+
label: string;
|
|
2305
|
+
/** Orbit radius in px (distance from the hub). Varying radii read as depth. */
|
|
2306
|
+
radius: number;
|
|
2307
|
+
/** Angular speed in radians per frame; signed for either direction. */
|
|
2308
|
+
speed: number;
|
|
2309
|
+
/** Starting angle in radians — where the satellite sits at frame 0. */
|
|
2310
|
+
startAngle: number;
|
|
2311
|
+
}
|
|
2312
|
+
interface NodeGraphProps extends TextStyleProps {
|
|
2313
|
+
/** Label inside the central hub node — a single character or short word. */
|
|
2314
|
+
hubLabel?: string;
|
|
2315
|
+
/** The orbiting satellites. Each flies in from off-frame, then settles into
|
|
2316
|
+
* its elliptical orbit. ~5 reads as a believable constellation. */
|
|
2317
|
+
satellites?: Satellite[];
|
|
2318
|
+
/** The earned accent — hub fill tint, the connection lines, and the glow (default: theme `accent`). */
|
|
2319
|
+
accent?: string;
|
|
2320
|
+
/** Vertical squash of every orbit (1 = circular, <1 = elliptical). A strong
|
|
2321
|
+
* squash makes the even-angled spokes *read* as lopsided (nodes bunch toward
|
|
2322
|
+
* the 3/9-o'clock sides and gaps open top/bottom), so the default keeps the
|
|
2323
|
+
* ring near-circular. */
|
|
2324
|
+
ellipse?: number;
|
|
2325
|
+
/** Seed for the deterministic fly-in directions and connection-pulse phases. */
|
|
2326
|
+
seed?: number;
|
|
2327
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
2328
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
2329
|
+
* = the default take (identical to today's output). */
|
|
2330
|
+
variant?: number;
|
|
2331
|
+
/** Frames before the constellation begins assembling. */
|
|
2332
|
+
delay?: TimeInput;
|
|
2333
|
+
/** Show the soft accent glow behind the hub. */
|
|
2334
|
+
glow?: boolean;
|
|
2335
|
+
/** Hub node diameter in px. */
|
|
2336
|
+
hubDiameter?: number;
|
|
2337
|
+
/** Hub label size in px. */
|
|
2338
|
+
hubFontSize?: number;
|
|
2339
|
+
/** Background canvas color behind the constellation (default: theme `background`). */
|
|
2340
|
+
background?: string;
|
|
2341
|
+
/** Surface (fill) color of the satellite pills (default: theme `surface`). */
|
|
2342
|
+
surface?: string;
|
|
2343
|
+
/** Border color of the satellite pills (default: theme `border`). */
|
|
2344
|
+
borderColor?: string;
|
|
2345
|
+
/** Text color of every label (default: theme `text`). */
|
|
2346
|
+
textColor?: string;
|
|
2347
|
+
/** Satellite label font size in px. */
|
|
2348
|
+
satelliteFontSize?: number;
|
|
2349
|
+
/** Horizontal center of the constellation as a 0–1 fraction of canvas width. */
|
|
2350
|
+
centerX?: number;
|
|
2351
|
+
/** Vertical center of the constellation as a 0–1 fraction of canvas height. */
|
|
2352
|
+
centerY?: number;
|
|
2353
|
+
}
|
|
2354
|
+
declare function NodeGraph({ hubLabel, satellites, accent: accentProp, ellipse, seed: seedProp, variant, delay: delayIn, glow, hubDiameter, hubFontSize, background: backgroundProp, surface: surfaceProp, borderColor: borderColorProp, textColor: textColorProp, satelliteFontSize, fontFamily: fontFamilyProp, letterSpacing, uppercase, centerX, centerY, }: NodeGraphProps): react.JSX.Element;
|
|
2355
|
+
|
|
2356
|
+
/** One drifting image layer. */
|
|
2357
|
+
interface ParallaxLayer {
|
|
2358
|
+
/** Image URL/path (resolved at render time). */
|
|
2359
|
+
src: string;
|
|
2360
|
+
/** Drift-rate multiplier vs the base `distance` (1 = full distance over the
|
|
2361
|
+
* duration). Lower = slower/further-back layer; higher = faster/closer. */
|
|
2362
|
+
speed?: number;
|
|
2363
|
+
/** Per-layer oversize so the drift never exposes a canvas edge (default 1.05). */
|
|
2364
|
+
scale?: number;
|
|
2365
|
+
/** Per-layer opacity, 0..1 (default 1). */
|
|
2366
|
+
opacity?: number;
|
|
2367
|
+
}
|
|
2368
|
+
interface ParallaxProps {
|
|
2369
|
+
/** Single image layer. Use `src` OR `layers`; `layers` wins when both are set. */
|
|
2370
|
+
src?: string;
|
|
2371
|
+
/** Multiple layers, drawn back-to-front, each drifting at its own `speed`. */
|
|
2372
|
+
layers?: ParallaxLayer[];
|
|
2373
|
+
/** Frames before the drift starts. */
|
|
2374
|
+
delay?: TimeInput;
|
|
2375
|
+
/** Frames over which the drift completes (180f ≈ 6s @ 30fps — parallax wants time). */
|
|
2376
|
+
duration?: TimeInput;
|
|
2377
|
+
/** The edge the layers drift *toward* as time advances. */
|
|
2378
|
+
direction?: 'left' | 'right' | 'up' | 'down';
|
|
2379
|
+
/** Base drift in pixels across `duration` (per-layer scaled by `speed`). Keep
|
|
2380
|
+
* restrained — past ~120px it reads as a pan, not parallax. */
|
|
2381
|
+
distance?: number;
|
|
2382
|
+
/** Default oversize applied to layers that don't set their own `scale` (1.05). */
|
|
2383
|
+
scale?: number;
|
|
2384
|
+
}
|
|
2385
|
+
declare function Parallax({ src, layers, delay: delayIn, duration: durationIn, direction, distance, scale, }: ParallaxProps): react.JSX.Element;
|
|
2386
|
+
|
|
2387
|
+
interface PathMorphProps {
|
|
2388
|
+
/** SVG path `d` to morph FROM (e.g. a logo emblem, or a line), in its own space. */
|
|
2389
|
+
from: string;
|
|
2390
|
+
/** SVG path `d` to morph TO (e.g. a divider, or another line), in the SAME space. */
|
|
2391
|
+
to: string;
|
|
2392
|
+
/** Ink color (hex). FILL for closed shapes, STROKE for open lines. Defaults theme `text`. */
|
|
2393
|
+
color?: string;
|
|
2394
|
+
/** Force STROKE (line) rendering. Auto-true when BOTH paths are OPEN (no `Z`). */
|
|
2395
|
+
stroke?: boolean;
|
|
2396
|
+
/** Stroke width in path-coordinate units (when stroked). Default 4. */
|
|
2397
|
+
strokeWidth?: number;
|
|
2398
|
+
/** Frames before the `from` shape appears. */
|
|
2399
|
+
delay?: number;
|
|
2400
|
+
/** Frames to HOLD the `from` shape (recognizable) before the morph begins. */
|
|
2401
|
+
holdFrames?: number;
|
|
2402
|
+
/** Frames the morph itself takes (default `DURATION.slow` = 24). */
|
|
2403
|
+
durationInFrames?: number;
|
|
2404
|
+
/** Composition position of the morph's local origin. */
|
|
2405
|
+
x?: number;
|
|
2406
|
+
y?: number;
|
|
2407
|
+
/** Uniform scale of the path's coordinate space. */
|
|
2408
|
+
scale?: number;
|
|
2409
|
+
/** Fade the shape in over the first 8 frames (default true). */
|
|
2410
|
+
fadeIn?: boolean;
|
|
2411
|
+
}
|
|
2412
|
+
declare function PathMorph({ from, to, color, stroke, strokeWidth, delay, durationInFrames, x, y, scale, fadeIn, }: PathMorphProps): react.JSX.Element;
|
|
2413
|
+
|
|
2414
|
+
/** One pie slice: a numeric weight and its color. */
|
|
2415
|
+
interface PieRevealSlice {
|
|
2416
|
+
/** Relative weight of the slice. The full circle is split proportionally. */
|
|
2417
|
+
value: number;
|
|
2418
|
+
/** Slice fill color (hex `#rrggbb` / `#rrggbbaa`). */
|
|
2419
|
+
color: string;
|
|
2420
|
+
/** Optional label, drawn just outside the ring at the slice's mid-angle when
|
|
2421
|
+
* {@link PieRevealProps.showLabel} is set. Also used for React keying. */
|
|
2422
|
+
label?: string;
|
|
2423
|
+
}
|
|
2424
|
+
interface PieRevealProps extends TextStyleProps {
|
|
2425
|
+
/** Slices to render, drawn clockwise from 12 o'clock in array order. */
|
|
2426
|
+
data?: PieRevealSlice[];
|
|
2427
|
+
/** Outer radius of the pie, in px. */
|
|
2428
|
+
radius?: number;
|
|
2429
|
+
/** Inner radius (donut hole) in px. `0` is a solid pie. The hole is filled
|
|
2430
|
+
* with {@link holeColor}, so set that to match the background. */
|
|
2431
|
+
innerRadius?: number;
|
|
2432
|
+
/** Color filling the donut hole — match the composition background (default: theme `background`). */
|
|
2433
|
+
holeColor?: string;
|
|
2434
|
+
/** Frames before the **first** slice starts sweeping. */
|
|
2435
|
+
delay?: TimeInput;
|
|
2436
|
+
/** Per-slice sweep duration on the house spring. */
|
|
2437
|
+
duration?: TimeInput;
|
|
2438
|
+
/** Frames between consecutive slices starting (default canonical `STAGGER`). */
|
|
2439
|
+
stagger?: TimeInput;
|
|
2440
|
+
/** Horizontal center as a 0–1 fraction of canvas width. */
|
|
2441
|
+
x?: number;
|
|
2442
|
+
/** Vertical center as a 0–1 fraction of canvas height. */
|
|
2443
|
+
y?: number;
|
|
2444
|
+
/** Show labels: the center total (donut only) plus each slice's `label`
|
|
2445
|
+
* drawn just outside the ring. */
|
|
2446
|
+
showLabel?: boolean;
|
|
2447
|
+
/** Center label text. Defaults to the slice count. */
|
|
2448
|
+
label?: string;
|
|
2449
|
+
/** Center label color (default: theme `text`). */
|
|
2450
|
+
labelColor?: string;
|
|
2451
|
+
/** Center label font size in px. */
|
|
2452
|
+
fontSize?: number;
|
|
2453
|
+
}
|
|
2454
|
+
declare function PieReveal({ data, radius, innerRadius, holeColor: holeColorProp, delay: delayIn, duration: durationIn, stagger: staggerIn, x, y, showLabel, label, labelColor: labelColorProp, fontSize, fontFamily: fontFamilyProp, }: PieRevealProps): react.JSX.Element;
|
|
2455
|
+
|
|
2456
|
+
interface PriceTagProps extends TextStyleProps {
|
|
2457
|
+
/** Product name — the label, set in the display face. */
|
|
2458
|
+
name?: string;
|
|
2459
|
+
/** Price as a string so any currency works (e.g. `'$70'`, `'€19'`, `'£12.50'`). */
|
|
2460
|
+
price?: string;
|
|
2461
|
+
/** Show the SOLD state — dims + strikes the price and appends a muted pill. */
|
|
2462
|
+
sold?: boolean;
|
|
2463
|
+
/** The SOLD pill label. */
|
|
2464
|
+
soldLabel?: string;
|
|
2465
|
+
/** Frames before the chip enters. */
|
|
2466
|
+
delay?: number;
|
|
2467
|
+
/** Base scale for the chip (1 = the default size). Scales type + padding together. */
|
|
2468
|
+
size?: number;
|
|
2469
|
+
/** Price text color (default: theme `accent`). */
|
|
2470
|
+
priceColor?: string;
|
|
2471
|
+
/** Divider + SOLD-pill accent color (default: theme `accent`). */
|
|
2472
|
+
accentColor?: string;
|
|
2473
|
+
/** Chip fill color (default: theme `surface`). */
|
|
2474
|
+
surface?: string;
|
|
2475
|
+
/** Chip hairline border color (default: theme `border`). */
|
|
2476
|
+
border?: string;
|
|
2477
|
+
/** Body font for the price + SOLD pill (default: theme `fontFamily`). */
|
|
2478
|
+
bodyFamily?: string;
|
|
2479
|
+
/** Local-space x of the chip's top-left. Omit to center on the composition. */
|
|
2480
|
+
x?: number;
|
|
2481
|
+
/** Local-space y of the chip's top-left. Omit to center on the composition. */
|
|
2482
|
+
y?: number;
|
|
2483
|
+
}
|
|
2484
|
+
declare function PriceTag({ name, price, sold, soldLabel, delay, size, color: colorProp, priceColor: priceColorProp, accentColor: accentColorProp, surface: surfaceProp, border: borderProp, fontFamily: fontFamilyProp, bodyFamily: bodyFamilyProp, letterSpacing, uppercase, x, y, }: PriceTagProps): react.JSX.Element;
|
|
2485
|
+
|
|
2486
|
+
interface PricingCardProps extends TextStyleProps {
|
|
2487
|
+
/** Tier name above the price (e.g. `'Pro'`). Rendered uppercase. */
|
|
2488
|
+
tier?: string;
|
|
2489
|
+
/** The headline price, rendered large. Free-form: `'$29'`, `'€19'`, `'Free'`. */
|
|
2490
|
+
price?: string;
|
|
2491
|
+
/** Billing period beneath the price (e.g. `'/month'`). Empty hides it. */
|
|
2492
|
+
period?: string;
|
|
2493
|
+
/** Feature checklist — each item gets an accent checkmark, revealed on a stagger. */
|
|
2494
|
+
features?: string[];
|
|
2495
|
+
/** Call-to-action button label. */
|
|
2496
|
+
cta?: string;
|
|
2497
|
+
/** Lifts + scales the card and shows an accent badge — the highlighted tier. */
|
|
2498
|
+
recommended?: boolean;
|
|
2499
|
+
/** The earned accent — checkmarks, badge, CTA, recommended border + glow (default: theme `accent`). */
|
|
2500
|
+
accent?: string;
|
|
2501
|
+
/** Frames before the card enters. */
|
|
2502
|
+
delay?: TimeInput;
|
|
2503
|
+
/** Card width in px. */
|
|
2504
|
+
width?: number;
|
|
2505
|
+
/** Price font size in px (the large display number). */
|
|
2506
|
+
priceSize?: number;
|
|
2507
|
+
/** Panel fill color (default: theme `surface`). */
|
|
2508
|
+
background?: string;
|
|
2509
|
+
/** Panel border color (when not `recommended`) (default: theme `border`). */
|
|
2510
|
+
borderColor?: string;
|
|
2511
|
+
/** Dim color for the tier label (default: theme `textMuted`). */
|
|
2512
|
+
dimColor?: string;
|
|
2513
|
+
/** Faint color for the billing period (default: theme `textMuted`). */
|
|
2514
|
+
faintColor?: string;
|
|
2515
|
+
/** Body font for tier / features / CTA (default: theme `fontFamily`). */
|
|
2516
|
+
bodyFontFamily?: string;
|
|
2517
|
+
/** Where the card sits: a region keyword (`'center'`, `'lower-third'`, …) or
|
|
2518
|
+
* normalized `{x,y}` (0–1, card center). The shared placement contract;
|
|
2519
|
+
* default `'center'`. */
|
|
2520
|
+
placement?: Placement;
|
|
2521
|
+
/** @deprecated Legacy alias — x of the card's top-left in px. Prefer
|
|
2522
|
+
* `placement`. */
|
|
2523
|
+
x?: number;
|
|
2524
|
+
/** @deprecated Legacy alias — y of the card's top-left in px. Prefer
|
|
2525
|
+
* `placement`. */
|
|
2526
|
+
y?: number;
|
|
2527
|
+
}
|
|
2528
|
+
declare function PricingCard({ tier, price, period, features, cta, recommended, accent: accentProp, delay: delayIn, width, priceSize, background: backgroundProp, borderColor: borderColorProp, color: colorProp, dimColor: dimColorProp, faintColor: faintColorProp, fontFamily: fontFamilyProp, bodyFontFamily: bodyFontFamilyProp, letterSpacing, uppercase, placement, x, y, }: PricingCardProps): react.JSX.Element;
|
|
2529
|
+
|
|
2530
|
+
interface ProductWallProps {
|
|
2531
|
+
/** Product photo sources (resolved at render time by `onda render`). */
|
|
2532
|
+
images?: string[];
|
|
2533
|
+
/** Per-image `[colSpan, rowSpan]` for the bento rhythm; cycled if shorter than
|
|
2534
|
+
* `images`. Omit for a uniform 1×1 grid. */
|
|
2535
|
+
spans?: Array<[number, number]>;
|
|
2536
|
+
/** Grid columns (default 4). */
|
|
2537
|
+
columns?: number;
|
|
2538
|
+
/** Gap between tiles in px (default 16). */
|
|
2539
|
+
gap?: number;
|
|
2540
|
+
/** Overall grid width in px (default 1680). */
|
|
2541
|
+
width?: number;
|
|
2542
|
+
/** Row-track height in px. Defaults to the column-track width (≈ square tiles). */
|
|
2543
|
+
rowHeight?: number;
|
|
2544
|
+
/** Frames before the first tile enters (default 0). */
|
|
2545
|
+
delay?: number;
|
|
2546
|
+
/** Frames between successive tiles rising in (default `STAGGER` = 4). */
|
|
2547
|
+
stagger?: number;
|
|
2548
|
+
/** Tile hairline border color (default: theme `border`). */
|
|
2549
|
+
borderColor?: string;
|
|
2550
|
+
/** Tile hairline border width in px (default 0 = no border). */
|
|
2551
|
+
borderWidth?: number;
|
|
2552
|
+
/** Optional dark veil over every tile, 0..1, to unify a mixed set (default 0). */
|
|
2553
|
+
scrim?: number;
|
|
2554
|
+
/** Camera scale at the start of the move (default 1.06). */
|
|
2555
|
+
cameraFrom?: number;
|
|
2556
|
+
/** Camera scale at the end — keep the delta gentle (default 1.18). */
|
|
2557
|
+
cameraTo?: number;
|
|
2558
|
+
/** Horizontal camera drift in px across the move (default -44). */
|
|
2559
|
+
cameraDriftX?: number;
|
|
2560
|
+
/** Vertical camera drift in px across the move (default 26). */
|
|
2561
|
+
cameraDriftY?: number;
|
|
2562
|
+
/** Frames over which the camera completes its push + drift (default 150). */
|
|
2563
|
+
cameraDurationInFrames?: number;
|
|
2564
|
+
}
|
|
2565
|
+
declare function ProductWall({ images, spans, columns, gap, width, rowHeight, delay, stagger, borderColor, borderWidth, scrim, cameraFrom, cameraTo, cameraDriftX, cameraDriftY, cameraDurationInFrames, }: ProductWallProps): react.JSX.Element;
|
|
2566
|
+
|
|
2567
|
+
interface ProgressBarProps extends TextStyleProps {
|
|
2568
|
+
/** Target fill, 0–100. The bar grows from 0 to this value. */
|
|
2569
|
+
value?: number;
|
|
2570
|
+
/** Frames before the animation starts. */
|
|
2571
|
+
delay?: TimeInput;
|
|
2572
|
+
/** Frames to reach the full target value (default `DURATION.slow` = 24). */
|
|
2573
|
+
duration?: TimeInput;
|
|
2574
|
+
/** Track width in px — the full 0%→100% travel. */
|
|
2575
|
+
width?: number;
|
|
2576
|
+
/** Bar thickness in px. */
|
|
2577
|
+
height?: number;
|
|
2578
|
+
/** Corner radius in px. Defaults to a full pill. */
|
|
2579
|
+
radius?: number;
|
|
2580
|
+
/** Track color — the unfilled portion (default: theme `surface`). */
|
|
2581
|
+
trackColor?: string;
|
|
2582
|
+
/** Fill color (default: theme `accent`). */
|
|
2583
|
+
accentColor?: string;
|
|
2584
|
+
/** Whether to render the `${value}%` label beside the bar. */
|
|
2585
|
+
showValue?: boolean;
|
|
2586
|
+
/** Label font size in px. */
|
|
2587
|
+
fontSize?: number;
|
|
2588
|
+
}
|
|
2589
|
+
declare function ProgressBar({ value, delay: delayIn, duration: durationIn, width, height, radius, trackColor: trackColorProp, accentColor: accentColorProp, showValue, color: colorProp, fontSize, fontFamily: fontFamilyProp, }: ProgressBarProps): react.JSX.Element;
|
|
2590
|
+
|
|
2591
|
+
interface ProgressStepsProps extends TextStyleProps {
|
|
2592
|
+
/** Step labels, left to right. */
|
|
2593
|
+
steps?: string[];
|
|
2594
|
+
/** How many steps are complete — the fill animates to this index (0-based count). */
|
|
2595
|
+
current?: number;
|
|
2596
|
+
/** Frames before the fill animates. */
|
|
2597
|
+
delay?: TimeInput;
|
|
2598
|
+
/** Frames for the fill to travel to `current`. */
|
|
2599
|
+
duration?: TimeInput;
|
|
2600
|
+
/** Completed / active color — the earned accent (Onda rose) (default: theme `accent`). */
|
|
2601
|
+
accentColor?: string;
|
|
2602
|
+
/** Pending color (dots + connector track) (default: theme `border`). */
|
|
2603
|
+
dimColor?: string;
|
|
2604
|
+
/** Label color (default: theme `textMuted`). */
|
|
2605
|
+
labelColor?: string;
|
|
2606
|
+
/** Label font size in px. */
|
|
2607
|
+
fontSize?: number;
|
|
2608
|
+
/** Overall width in px (dots are spaced across this). */
|
|
2609
|
+
width?: number;
|
|
2610
|
+
/** Dot diameter in px. */
|
|
2611
|
+
dotSize?: number;
|
|
2612
|
+
/** Connector track thickness in px. */
|
|
2613
|
+
trackThickness?: number;
|
|
2614
|
+
}
|
|
2615
|
+
declare function ProgressSteps({ steps, current, delay, duration, accentColor: accentColorProp, dimColor: dimColorProp, labelColor: labelColorProp, fontFamily: fontFamilyProp, fontSize, width, dotSize, trackThickness, }: ProgressStepsProps): react.JSX.Element;
|
|
2616
|
+
|
|
2617
|
+
interface PulsingIndicatorProps extends TextStyleProps {
|
|
2618
|
+
/** Dot + ring color (default: theme `accent`). Note: this is the dot/ring fill,
|
|
2619
|
+
* not the label text color — set the label color via `labelColor`. */
|
|
2620
|
+
color?: string;
|
|
2621
|
+
/** Dot diameter in px. */
|
|
2622
|
+
size?: number;
|
|
2623
|
+
/** Optional label to the right of the dot. Empty hides it. */
|
|
2624
|
+
label?: string;
|
|
2625
|
+
/** Label color (default: theme `textMuted`). */
|
|
2626
|
+
labelColor?: string;
|
|
2627
|
+
/** Label font size in px. */
|
|
2628
|
+
fontSize?: number;
|
|
2629
|
+
/** Frames per pulse cycle. */
|
|
2630
|
+
period?: number;
|
|
2631
|
+
/**
|
|
2632
|
+
* Placement of the indicator's top-left (the dot's bounding box). When
|
|
2633
|
+
* omitted, the dot + label assembly is centered on the composition.
|
|
2634
|
+
*/
|
|
2635
|
+
x?: number;
|
|
2636
|
+
y?: number;
|
|
2637
|
+
}
|
|
2638
|
+
declare function PulsingIndicator({ color: colorProp, size, label, labelColor: labelColorProp, fontFamily: fontFamilyProp, letterSpacing, fontSize, period, x: xProp, y: yProp, }: PulsingIndicatorProps): react.JSX.Element;
|
|
2639
|
+
|
|
2640
|
+
interface QuoteCardProps extends TextStyleProps {
|
|
2641
|
+
/** The pull-quote body. Revealed word-by-word on a slower-than-canonical
|
|
2642
|
+
* stagger. */
|
|
2643
|
+
quote?: string;
|
|
2644
|
+
/** Attribution name. */
|
|
2645
|
+
author?: string;
|
|
2646
|
+
/** Attribution role / title. */
|
|
2647
|
+
role?: string;
|
|
2648
|
+
/** Frames before the quote starts. */
|
|
2649
|
+
delay?: TimeInput;
|
|
2650
|
+
/** Show the accent divider between quote and attribution. */
|
|
2651
|
+
accent?: boolean;
|
|
2652
|
+
/** Quote font size in px. */
|
|
2653
|
+
quoteFontSize?: number;
|
|
2654
|
+
/** Quote font weight (display default 600). */
|
|
2655
|
+
quoteFontWeight?: number;
|
|
2656
|
+
/** Author / role font size in px. */
|
|
2657
|
+
authorFontSize?: number;
|
|
2658
|
+
/** Author / role font weight. */
|
|
2659
|
+
authorFontWeight?: number;
|
|
2660
|
+
/** Author / role color (default: theme `textMuted`). */
|
|
2661
|
+
authorColor?: string;
|
|
2662
|
+
/** Divider color (default: theme `accent`). */
|
|
2663
|
+
accentColor?: string;
|
|
2664
|
+
/** Wrap width for the quote in px. Defaults to ~44% of the composition width
|
|
2665
|
+
* (the ondajs `40vw` pull-quote feel), so long quotes wrap onto multiple
|
|
2666
|
+
* lines. */
|
|
2667
|
+
quoteWidth?: number;
|
|
2668
|
+
/** Where the card sits: a region keyword (`'center'`, `'lower-third'`, ...) or
|
|
2669
|
+
* normalized `{x,y}` (0-1, card center). The shared placement contract;
|
|
2670
|
+
* default `'center'` (the historical self-centering). */
|
|
2671
|
+
placement?: Placement;
|
|
2672
|
+
}
|
|
2673
|
+
declare function QuoteCard({ quote, author, role, delay: delayIn, accent, quoteFontSize, quoteFontWeight, authorFontSize, authorFontWeight, color: colorProp, authorColor: authorColorProp, accentColor: accentColorProp, fontFamily: fontFamilyProp, uppercase, quoteWidth, placement, }: QuoteCardProps): react.JSX.Element;
|
|
2674
|
+
|
|
2675
|
+
interface RgbGlitchProps extends TextStyleProps {
|
|
2676
|
+
/** The text to glitch. */
|
|
2677
|
+
text?: string;
|
|
2678
|
+
/** Frames before the effect starts. */
|
|
2679
|
+
delay?: TimeInput;
|
|
2680
|
+
/** Constant baseline channel split in px (the always-on chromatic edge). */
|
|
2681
|
+
baseSplit?: number;
|
|
2682
|
+
/** Peak extra split in px during a glitch burst. */
|
|
2683
|
+
intensity?: number;
|
|
2684
|
+
/** Frames between glitch bursts. */
|
|
2685
|
+
glitchPeriod?: number;
|
|
2686
|
+
/** Frames a glitch burst lasts. */
|
|
2687
|
+
glitchDuration?: number;
|
|
2688
|
+
/** Seed for the (deterministic) burst jitter. */
|
|
2689
|
+
seed?: number;
|
|
2690
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
2691
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
2692
|
+
* = the default take (identical to today's output). */
|
|
2693
|
+
variant?: number;
|
|
2694
|
+
/** Red-channel copy color (default: theme `accent`). */
|
|
2695
|
+
redColor?: string;
|
|
2696
|
+
/** Cyan-channel copy color (default: theme `palette[1]`). */
|
|
2697
|
+
cyanColor?: string;
|
|
2698
|
+
/** Opacity of the coloured channel copies (the screen-blend approximation —
|
|
2699
|
+
* lower keeps the center read as clean white). Default 0.85. */
|
|
2700
|
+
channelOpacity?: number;
|
|
2701
|
+
/** Font size in px. */
|
|
2702
|
+
fontSize?: number;
|
|
2703
|
+
/** Line alignment relative to the placement point. Default `'center'`. */
|
|
2704
|
+
align?: 'left' | 'center' | 'right';
|
|
2705
|
+
/** Absolute x of the alignment anchor. Defaults to canvas horizontal center. */
|
|
2706
|
+
x?: number;
|
|
2707
|
+
/** Absolute y (top-ish) of the line. Defaults to vertical center. */
|
|
2708
|
+
y?: number;
|
|
2709
|
+
}
|
|
2710
|
+
declare function RgbGlitch({ text: textProp, delay: delayIn, baseSplit, intensity, glitchPeriod, glitchDuration, seed: seedProp, variant, color: colorProp, redColor: redColorProp, cyanColor: cyanColorProp, channelOpacity, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, align, x, y, }: RgbGlitchProps): react.JSX.Element;
|
|
2711
|
+
|
|
2712
|
+
interface RotateInProps {
|
|
2713
|
+
/** Frames to wait before starting. */
|
|
2714
|
+
delay?: TimeInput;
|
|
2715
|
+
/** Frames to settle to 0° (default `DURATION.base` = 18). */
|
|
2716
|
+
durationInFrames?: TimeInput;
|
|
2717
|
+
/** Starting angle in degrees (clockwise). Safe zone: `[-12, +12]`. Default -8. */
|
|
2718
|
+
fromDegrees?: number;
|
|
2719
|
+
children?: ReactNode;
|
|
2720
|
+
}
|
|
2721
|
+
declare function RotateIn({ delay: delayIn, durationInFrames: durationInFramesIn, fromDegrees, children, }: RotateInProps): react.JSX.Element;
|
|
2722
|
+
|
|
2723
|
+
interface ScaleInProps {
|
|
2724
|
+
delay?: TimeInput;
|
|
2725
|
+
durationInFrames?: TimeInput;
|
|
2726
|
+
/** Starting scale (default 0.9; below ~0.85 reads as dramatic zoom). */
|
|
2727
|
+
from?: number;
|
|
2728
|
+
children?: ReactNode;
|
|
2729
|
+
}
|
|
2730
|
+
declare function ScaleIn({ delay, durationInFrames, from, children, }: ScaleInProps): react.JSX.Element;
|
|
2731
|
+
|
|
2732
|
+
interface ScrimProps {
|
|
2733
|
+
/** Veil color (hex). Default white — lifts a busy photo so dark text reads. */
|
|
2734
|
+
color?: string;
|
|
2735
|
+
/** Veil strength 0..1 (default 0.3). */
|
|
2736
|
+
opacity?: number;
|
|
2737
|
+
/** Frames before it appears. */
|
|
2738
|
+
delay?: number;
|
|
2739
|
+
/** Fade the veil in over the first 8 frames (default true). */
|
|
2740
|
+
fadeIn?: boolean;
|
|
2741
|
+
}
|
|
2742
|
+
declare function Scrim({ color, opacity, delay, fadeIn }: ScrimProps): react.JSX.Element;
|
|
2743
|
+
|
|
2744
|
+
interface SiteRevealProps {
|
|
2745
|
+
/** Full-page screenshot (tall) — the homepage to scroll. */
|
|
2746
|
+
src?: string;
|
|
2747
|
+
/** Address-bar text. */
|
|
2748
|
+
url?: string;
|
|
2749
|
+
/** Page height / width of `src` (drives the scroll extent). Default ~4.48. */
|
|
2750
|
+
pageAspect?: number;
|
|
2751
|
+
/** Card content width in px (default 1360). */
|
|
2752
|
+
width?: number;
|
|
2753
|
+
/** Viewport height in px below the chrome bar (default 770). */
|
|
2754
|
+
height?: number;
|
|
2755
|
+
/** Vertical nudge of the whole card from center (default 56, slightly low to
|
|
2756
|
+
* leave room for a headline above). */
|
|
2757
|
+
offsetY?: number;
|
|
2758
|
+
/** Frames before the card enters. */
|
|
2759
|
+
delay?: number;
|
|
2760
|
+
/** Type the URL into the address bar (with a blinking cursor) before scrolling
|
|
2761
|
+
* — the "navigate to the site" beat. Default true. */
|
|
2762
|
+
typeUrl?: boolean;
|
|
2763
|
+
/** Frames the URL takes to type in (default 26). */
|
|
2764
|
+
typeDurationInFrames?: number;
|
|
2765
|
+
/** Page fraction (0..1) shown at the start of the scroll (default 0 = top). */
|
|
2766
|
+
scrollStart?: number;
|
|
2767
|
+
/** Page fraction (0..1) reached at the end (default 0.62 — stop before footer). */
|
|
2768
|
+
scrollEnd?: number;
|
|
2769
|
+
/** Frames over which the scroll completes (default 150). */
|
|
2770
|
+
scrollDurationInFrames?: number;
|
|
2771
|
+
/** Card body fill (default near-white). */
|
|
2772
|
+
surface?: string;
|
|
2773
|
+
/** Chrome bar fill (default a light warm gray). */
|
|
2774
|
+
barColor?: string;
|
|
2775
|
+
/** 1px card border + chrome divider (default: theme `border`). */
|
|
2776
|
+
border?: string;
|
|
2777
|
+
/** Address pill text color (default: theme `textMuted`). */
|
|
2778
|
+
dim?: string;
|
|
2779
|
+
/** Soft shadow color under the card (default a low-alpha warm dark). */
|
|
2780
|
+
shadowColor?: string;
|
|
2781
|
+
/** Card corner radius in px (default 16). */
|
|
2782
|
+
cardRadius?: number;
|
|
2783
|
+
}
|
|
2784
|
+
declare function SiteReveal({ src, url, pageAspect, width, height, offsetY, delay, typeUrl, typeDurationInFrames, scrollStart, scrollEnd, scrollDurationInFrames, surface, barColor, border: borderProp, dim: dimProp, shadowColor, cardRadius, }: SiteRevealProps): react.JSX.Element;
|
|
2785
|
+
|
|
2786
|
+
interface ShimmerSweepProps extends TextStyleProps {
|
|
2787
|
+
/** The single line of text to sweep light across. */
|
|
2788
|
+
text?: string;
|
|
2789
|
+
/** Frames before the sweep starts. */
|
|
2790
|
+
delay?: TimeInput;
|
|
2791
|
+
/** Frames for one sweep pass (default `DURATION.slower` = 30). */
|
|
2792
|
+
duration?: TimeInput;
|
|
2793
|
+
/** Loop the sweep instead of a single pass. */
|
|
2794
|
+
loop?: boolean;
|
|
2795
|
+
/** Frames between sweeps when looping. */
|
|
2796
|
+
interval?: TimeInput;
|
|
2797
|
+
/** The sweeping highlight color (default: theme `text`). */
|
|
2798
|
+
shimmerColor?: string;
|
|
2799
|
+
/** Sweep angle in degrees (approximated by tilting the gradient band). */
|
|
2800
|
+
angle?: number;
|
|
2801
|
+
/** Font size in px (default 96). */
|
|
2802
|
+
fontSize?: number;
|
|
2803
|
+
/** Explicit text-box width in px. Overrides the measured width. */
|
|
2804
|
+
width?: number;
|
|
2805
|
+
/** Top-left x in px. Defaults to centering the word on the canvas. */
|
|
2806
|
+
x?: number;
|
|
2807
|
+
/** Top-left y in px. Defaults to centering the word on the canvas. */
|
|
2808
|
+
y?: number;
|
|
2809
|
+
}
|
|
2810
|
+
declare function ShimmerSweep({ text: textProp, delay: delayIn, duration: durationIn, loop, interval: intervalIn, color: colorProp, shimmerColor: shimmerColorProp, angle, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, width, x, y, }: ShimmerSweepProps): react.JSX.Element;
|
|
2811
|
+
|
|
2812
|
+
interface SkeletonCardProps {
|
|
2813
|
+
/** Number of placeholder text bars below the (optional) thumbnail. */
|
|
2814
|
+
lines?: number;
|
|
2815
|
+
/** Show the leading thumbnail block above the bars. */
|
|
2816
|
+
thumbnail?: boolean;
|
|
2817
|
+
/** Frames for one shimmer pass across the card. Lower = faster sweep. The
|
|
2818
|
+
* default runs slow on purpose — a settled, premium loading state. */
|
|
2819
|
+
shimmerSpeed?: number;
|
|
2820
|
+
/** The travelling highlight color — a soft sheen over the bars (default: theme `border`). */
|
|
2821
|
+
shimmerColor?: string;
|
|
2822
|
+
/** Resting fill of the placeholder bars / thumbnail (default: theme `surface`). */
|
|
2823
|
+
barColor?: string;
|
|
2824
|
+
/** Card (panel) background — the translucent glass fill (default: theme `background`). */
|
|
2825
|
+
cardColor?: string;
|
|
2826
|
+
/** Card border color (the 1px-equivalent stroke) (default: theme `border`). */
|
|
2827
|
+
borderColor?: string;
|
|
2828
|
+
/** Frames before the card enters. */
|
|
2829
|
+
delay?: TimeInput;
|
|
2830
|
+
/** Card width in px. */
|
|
2831
|
+
width?: number;
|
|
2832
|
+
/** Card height in px. `undefined` sizes the card to its content. */
|
|
2833
|
+
height?: number;
|
|
2834
|
+
/** Base bar height in px. */
|
|
2835
|
+
barHeight?: number;
|
|
2836
|
+
/** Inner padding of the card in px. */
|
|
2837
|
+
padding?: number;
|
|
2838
|
+
}
|
|
2839
|
+
declare function SkeletonCard({ lines, thumbnail, shimmerSpeed, shimmerColor: shimmerColorProp, barColor: barColorProp, cardColor: cardColorProp, borderColor: borderColorProp, delay: delayIn, width, height, barHeight, padding, }: SkeletonCardProps): react.JSX.Element;
|
|
2840
|
+
|
|
2841
|
+
interface SlideInProps {
|
|
2842
|
+
delay?: TimeInput;
|
|
2843
|
+
durationInFrames?: TimeInput;
|
|
2844
|
+
/** Settling direction (default `'up'`). */
|
|
2845
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
2846
|
+
/** Travel distance in px (12–24 Onda envelope; default 12). */
|
|
2847
|
+
distance?: number;
|
|
2848
|
+
children?: ReactNode;
|
|
2849
|
+
}
|
|
2850
|
+
declare function SlideIn({ delay, durationInFrames, direction, distance, children, }: SlideInProps): react.JSX.Element;
|
|
2851
|
+
|
|
2852
|
+
interface SlideOutProps {
|
|
2853
|
+
delay?: TimeInput;
|
|
2854
|
+
durationInFrames?: TimeInput;
|
|
2855
|
+
/** Direction the element leaves toward (default `'down'`). */
|
|
2856
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
2857
|
+
distance?: number;
|
|
2858
|
+
children?: ReactNode;
|
|
2859
|
+
}
|
|
2860
|
+
declare function SlideOut({ delay, durationInFrames, direction, distance, children, }: SlideOutProps): react.JSX.Element;
|
|
2861
|
+
|
|
2862
|
+
interface SlotMachineRollProps extends TextStyleProps {
|
|
2863
|
+
/** The text that rolls into place. Best on short strings (years, counts). */
|
|
2864
|
+
text?: string;
|
|
2865
|
+
/** Time before rolling starts — frames or '0.5s'. */
|
|
2866
|
+
delay?: TimeInput;
|
|
2867
|
+
/** Time between successive characters starting their roll (default the house
|
|
2868
|
+
* `STAGGER` = 5 frames — a settled, orchestrated wave left-to-right). */
|
|
2869
|
+
charDelay?: TimeInput;
|
|
2870
|
+
/** Time for each character's reel to settle (default `DURATION.slower` = 34
|
|
2871
|
+
* frames — a slow, hard-decelerating odometer drop, not a constant-velocity
|
|
2872
|
+
* spin). */
|
|
2873
|
+
durationInFrames?: TimeInput;
|
|
2874
|
+
/** Compress the whole timing envelope (delay, stagger, durations) so the
|
|
2875
|
+
* entrance settles at least `hold` before the end of the enclosing clip
|
|
2876
|
+
* (`useVideoConfig().durationInFrames`, Sequence-scoped). Opt-in. */
|
|
2877
|
+
fitToClip?: boolean;
|
|
2878
|
+
/** Hard cap on the settle time (frames or '0.5s'). Wins over `fitToClip`. */
|
|
2879
|
+
maxSettle?: TimeInput;
|
|
2880
|
+
/** Breathing room before the cut for `fitToClip` (default 6 frames). */
|
|
2881
|
+
hold?: TimeInput;
|
|
2882
|
+
/** How many filler glyphs spin past before the target lands. */
|
|
2883
|
+
reelLength?: number;
|
|
2884
|
+
/** Seed for the (deterministic) filler glyphs. */
|
|
2885
|
+
seed?: number;
|
|
2886
|
+
/** Integer "take" selector: derives a new deterministic seed from (seed,
|
|
2887
|
+
* variant), so alternates never require hand-edited magic seeds. 0/omitted
|
|
2888
|
+
* = the default take (identical to today's output). */
|
|
2889
|
+
variant?: number;
|
|
2890
|
+
/** Glyph pool the reel spins through. */
|
|
2891
|
+
charset?: string;
|
|
2892
|
+
/** Font size in px (default 140). The cell height equals this. */
|
|
2893
|
+
fontSize?: number;
|
|
2894
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
2895
|
+
* line cannot exceed the frame minus the safe margins. Default `'none'`
|
|
2896
|
+
* (the historical behavior). */
|
|
2897
|
+
fit?: 'none' | 'frame';
|
|
2898
|
+
/** Explicit width cap in px for the line; combines with `fit` (the smaller
|
|
2899
|
+
* cap wins). */
|
|
2900
|
+
maxWidth?: number;
|
|
2901
|
+
/** Render a soft accent bloom behind the landed row. Default `false` — OFF.
|
|
2902
|
+
* It was a filled ellipse at half opacity faking a glow, so it read as a
|
|
2903
|
+
* muddy lozenge (a shape, not light), not a real radial falloff. Opt in with
|
|
2904
|
+
* `true` only if you know a theme's accent wants it. */
|
|
2905
|
+
glow?: boolean;
|
|
2906
|
+
/** Horizontal anchoring of the whole block (default `'center'`). Only applies
|
|
2907
|
+
* to the legacy `x` anchor — `placement` always anchors the block's center. */
|
|
2908
|
+
align?: 'left' | 'center' | 'right';
|
|
2909
|
+
/** Where the row sits: a region keyword (`'center'`, `'lower-third'`,
|
|
2910
|
+
* `'top-left'`, …) or normalized `{x,y}` (0–1, block center). The shared
|
|
2911
|
+
* placement contract; default `'center'`. */
|
|
2912
|
+
placement?: Placement;
|
|
2913
|
+
/** @deprecated Legacy alias — absolute x of the block's anchor in px
|
|
2914
|
+
* (respecting `align`). Prefer `placement`. */
|
|
2915
|
+
x?: number;
|
|
2916
|
+
/** @deprecated Legacy alias — absolute y of the block's top in px. Prefer
|
|
2917
|
+
* `placement`. */
|
|
2918
|
+
y?: number;
|
|
2919
|
+
}
|
|
2920
|
+
declare function SlotMachineRoll({ text: textProp, delay: delayIn, charDelay: charDelayIn, durationInFrames: durationIn, fitToClip, maxSettle, hold, reelLength, seed: seedProp, variant, charset, color: colorProp, fontSize: fontSizeProp, fit, maxWidth, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, glow, align, placement, x, y, }: SlotMachineRollProps): react.JSX.Element;
|
|
2921
|
+
|
|
2922
|
+
interface SplitScreenProps extends TextStyleProps {
|
|
2923
|
+
/** Content for the left (or top) pane — any scene subtree. */
|
|
2924
|
+
left?: ReactNode;
|
|
2925
|
+
/** Content for the right (or bottom) pane — any scene subtree. */
|
|
2926
|
+
right?: ReactNode;
|
|
2927
|
+
/** Pane axis: `horizontal` = side-by-side, `vertical` = stacked. */
|
|
2928
|
+
orientation?: 'horizontal' | 'vertical';
|
|
2929
|
+
/** Fraction (0..1) of the main axis given to the `left` (or top) pane. */
|
|
2930
|
+
ratio?: number;
|
|
2931
|
+
/** Gap between the two panes in px. */
|
|
2932
|
+
gap?: number;
|
|
2933
|
+
/** Draw a thin token divider in the gap between the panes. */
|
|
2934
|
+
divider?: boolean;
|
|
2935
|
+
/** Slide the two panes apart from the center seam on the house spring. */
|
|
2936
|
+
animate?: boolean;
|
|
2937
|
+
/** Frames before the entrance. */
|
|
2938
|
+
delay?: TimeInput;
|
|
2939
|
+
/** Overall width in px. Defaults to the full composition width. */
|
|
2940
|
+
width?: number;
|
|
2941
|
+
/** Overall height in px. Defaults to the full composition height. */
|
|
2942
|
+
height?: number;
|
|
2943
|
+
/** Pane background fill (default: theme `surface`). */
|
|
2944
|
+
paneBackground?: string;
|
|
2945
|
+
/** Outer (gutter) background fill, seen in the gap behind the divider (default: theme `background`). */
|
|
2946
|
+
background?: string;
|
|
2947
|
+
/** Divider color (thin token line) (default: theme `border`). */
|
|
2948
|
+
dividerColor?: string;
|
|
2949
|
+
/** Placeholder label color for an empty pane (default: theme `textMuted`). */
|
|
2950
|
+
placeholderColor?: string;
|
|
2951
|
+
}
|
|
2952
|
+
declare function SplitScreen({ left, right, orientation, ratio, gap, divider, animate, delay: delayIn, width, height, paneBackground: paneBackgroundProp, background: backgroundProp, dividerColor: dividerColorProp, placeholderColor: placeholderColorProp, fontFamily: fontFamilyProp, }: SplitScreenProps): react.JSX.Element;
|
|
2953
|
+
|
|
2954
|
+
interface SpotlightProps {
|
|
2955
|
+
/** Horizontal center of the spotlight as a 0–1 fraction of canvas width. */
|
|
2956
|
+
x?: number;
|
|
2957
|
+
/** Vertical center of the spotlight as a 0–1 fraction of canvas height. */
|
|
2958
|
+
y?: number;
|
|
2959
|
+
/** Final radius as a percentage of the canvas's smaller dimension. */
|
|
2960
|
+
radius?: number;
|
|
2961
|
+
/** Frames before the reveal starts. */
|
|
2962
|
+
delay?: TimeInput;
|
|
2963
|
+
/** Frames until the spotlight reaches its full radius. */
|
|
2964
|
+
durationInFrames?: TimeInput;
|
|
2965
|
+
/** Light color (default: theme `text`). Hex `#rrggbb` / `#rrggbbaa`. */
|
|
2966
|
+
color?: string;
|
|
2967
|
+
/** Gradient softness — % of the radius given over to the fade-to-transparent
|
|
2968
|
+
* tail. `0` is a hard disc; `100` fades from the very center. */
|
|
2969
|
+
softness?: number;
|
|
2970
|
+
}
|
|
2971
|
+
declare function Spotlight({ x, y, radius, delay, durationInFrames, color: colorProp, softness, }: SpotlightProps): react.JSX.Element;
|
|
2972
|
+
|
|
2973
|
+
interface SpotlightCardProps extends TextStyleProps {
|
|
2974
|
+
/** Small uppercase kicker above the title. Empty hides it. */
|
|
2975
|
+
eyebrow?: string;
|
|
2976
|
+
/** Card headline (display font). */
|
|
2977
|
+
title?: string;
|
|
2978
|
+
/** Supporting body copy. Empty hides it. Single line (engine `<Text>` is
|
|
2979
|
+
* single-line; pass a short string). */
|
|
2980
|
+
body?: string;
|
|
2981
|
+
/** Frames before the card enters. */
|
|
2982
|
+
delay?: TimeInput;
|
|
2983
|
+
/** The drifting spotlight color — the earned accent (default: theme `accent`). */
|
|
2984
|
+
glowColor?: string;
|
|
2985
|
+
/** Card width in px. */
|
|
2986
|
+
width?: number;
|
|
2987
|
+
/** Card height in px. If omitted, sized from the content + padding. */
|
|
2988
|
+
height?: number;
|
|
2989
|
+
/** Inner padding in px. */
|
|
2990
|
+
padding?: number;
|
|
2991
|
+
/** Text alignment within the card. */
|
|
2992
|
+
align?: 'left' | 'center';
|
|
2993
|
+
/** Font family for the eyebrow + body copy (default: theme `fontFamily`). */
|
|
2994
|
+
bodyFontFamily?: string;
|
|
2995
|
+
/** Title font size in px (default 44). */
|
|
2996
|
+
titleSize?: number;
|
|
2997
|
+
/** Body font size in px (default 20). */
|
|
2998
|
+
bodySize?: number;
|
|
2999
|
+
/** Eyebrow font size in px (default 15). */
|
|
3000
|
+
eyebrowSize?: number;
|
|
3001
|
+
/** Title color (default: theme `text`). */
|
|
3002
|
+
titleColor?: string;
|
|
3003
|
+
/** Body color (default: theme `textMuted`). */
|
|
3004
|
+
bodyColor?: string;
|
|
3005
|
+
/** Eyebrow color (default: theme `textMuted`). */
|
|
3006
|
+
eyebrowColor?: string;
|
|
3007
|
+
/** Card glass fill (translucent dark by default) (default: theme `surface`). */
|
|
3008
|
+
background?: string;
|
|
3009
|
+
/** Card border (stroke) color (default: theme `border`). */
|
|
3010
|
+
borderColor?: string;
|
|
3011
|
+
/** Corner radius in px (default: theme `radius`). */
|
|
3012
|
+
cornerRadius?: number;
|
|
3013
|
+
}
|
|
3014
|
+
declare function SpotlightCard({ eyebrow, title, body, delay: delayIn, glowColor: glowColorProp, width, height, padding, align, fontFamily: fontFamilyProp, letterSpacing, uppercase, bodyFontFamily: bodyFontFamilyProp, titleSize, bodySize, eyebrowSize, titleColor: titleColorProp, bodyColor: bodyColorProp, eyebrowColor: eyebrowColorProp, background: backgroundProp, borderColor: borderColorProp, cornerRadius: cornerRadiusProp, }: SpotlightCardProps): react.JSX.Element;
|
|
3015
|
+
|
|
3016
|
+
interface StaggerGroupProps extends TextStyleProps {
|
|
3017
|
+
/** The items to reveal, in source order (default: four short lines). */
|
|
3018
|
+
items?: string[];
|
|
3019
|
+
/** Frames before the FIRST item starts (default 0). */
|
|
3020
|
+
delay?: TimeInput;
|
|
3021
|
+
/** Frames between consecutive items. Canonical Onda stagger is `4`. */
|
|
3022
|
+
stagger?: TimeInput;
|
|
3023
|
+
/** Per-item reveal duration (default `DURATION.base` = 18). */
|
|
3024
|
+
duration?: TimeInput;
|
|
3025
|
+
/** Layout direction for the items (default `'column'`). */
|
|
3026
|
+
direction?: 'row' | 'column';
|
|
3027
|
+
/** Pixels between items (default 16). */
|
|
3028
|
+
gap?: number;
|
|
3029
|
+
/** Cross-axis alignment of items (default `'center'`). */
|
|
3030
|
+
align?: 'start' | 'center' | 'end';
|
|
3031
|
+
/** Font size in px (default 48). */
|
|
3032
|
+
fontSize?: number;
|
|
3033
|
+
}
|
|
3034
|
+
declare function StaggerGroup({ items, delay: delayIn, stagger: staggerIn, duration: durationIn, direction, gap, align, color: colorProp, fontSize, fontFamily: fontFamilyProp, fontWeight, }: StaggerGroupProps): react.JSX.Element;
|
|
3035
|
+
|
|
3036
|
+
interface SplitLockupProps {
|
|
3037
|
+
/** Top line of the lockup (default 'NEW'). */
|
|
3038
|
+
line1?: string;
|
|
3039
|
+
/** Bottom line of the lockup (default 'PROJECT'). */
|
|
3040
|
+
line2?: string;
|
|
3041
|
+
/** Font size in px (default 200). */
|
|
3042
|
+
fontSize?: number;
|
|
3043
|
+
/** Ink color (defaults to theme `text`). */
|
|
3044
|
+
color?: string;
|
|
3045
|
+
fontFamily?: string;
|
|
3046
|
+
fontWeight?: number;
|
|
3047
|
+
/** Tracking in px — the look wants it generous (default fontSize × 0.04). */
|
|
3048
|
+
letterSpacing?: number;
|
|
3049
|
+
/** How far each line pulls HORIZONTALLY to its corner, px from center
|
|
3050
|
+
* (default 26% of the frame width). */
|
|
3051
|
+
splitX?: number;
|
|
3052
|
+
/** How far each line pulls VERTICALLY to its corner, px from center
|
|
3053
|
+
* (default 28% of the frame height). */
|
|
3054
|
+
splitY?: number;
|
|
3055
|
+
/** Vertical gap between the two stacked lines in the lockup (default fontSize × 0.12). */
|
|
3056
|
+
lineGap?: number;
|
|
3057
|
+
/** Time of the assemble (split → center) move (default '0.7s'). */
|
|
3058
|
+
assembleFrames?: TimeInput;
|
|
3059
|
+
/** Time of the disassemble (center → split) move (default '0.5s'). */
|
|
3060
|
+
disassembleFrames?: TimeInput;
|
|
3061
|
+
/** Total clip length; defaults to the enclosing Sequence duration. */
|
|
3062
|
+
durationInFrames?: TimeInput;
|
|
3063
|
+
}
|
|
3064
|
+
declare function SplitLockup({ line1, line2, fontSize, color, fontFamily, fontWeight, letterSpacing, splitX, splitY, lineGap, assembleFrames, disassembleFrames, durationInFrames, }: SplitLockupProps): react.JSX.Element;
|
|
3065
|
+
|
|
3066
|
+
interface StatCardProps extends TextStyleProps {
|
|
3067
|
+
/** The headline metric, e.g. "26.8 fps" or "100×" (number is stringified).
|
|
3068
|
+
* Defaults to "—" so an under-specified card renders a placeholder, not nothing. */
|
|
3069
|
+
value?: string | number;
|
|
3070
|
+
/** The label beneath, e.g. "faster than Remotion". */
|
|
3071
|
+
label?: string;
|
|
3072
|
+
valueSize?: number;
|
|
3073
|
+
labelSize?: number;
|
|
3074
|
+
/** Value color (default: theme `text`). */
|
|
3075
|
+
valueColor?: string;
|
|
3076
|
+
/** Label color (default: theme `textMuted`). */
|
|
3077
|
+
labelColor?: string;
|
|
3078
|
+
/** Show the accent rule beneath the value. `true`/undefined → show (theme
|
|
3079
|
+
* accent); `false` → hide; a string → show in that color. Matches the
|
|
3080
|
+
* ondajs/Studio `accent: boolean` contract (a color goes via `accentColor`). */
|
|
3081
|
+
accent?: boolean | string;
|
|
3082
|
+
/** Accent rule color (default: theme `accent`). */
|
|
3083
|
+
accentColor?: string;
|
|
3084
|
+
delay?: TimeInput;
|
|
3085
|
+
/** Where the stat sits: a region keyword (`'center'`, `'lower-third'`, …) or
|
|
3086
|
+
* normalized `{x,y}` (0–1, stat center). The shared placement contract;
|
|
3087
|
+
* default `'center'` (the historical self-centering). */
|
|
3088
|
+
placement?: Placement;
|
|
3089
|
+
}
|
|
3090
|
+
declare function StatCard({ value, label, valueSize, labelSize, valueColor, labelColor, accent, accentColor, fontFamily, letterSpacing, uppercase, delay: delayIn, placement, }: StatCardProps): react.JSX.Element;
|
|
3091
|
+
|
|
3092
|
+
interface TerminalProps extends TextStyleProps {
|
|
3093
|
+
/** The command that types itself out after the prompt. */
|
|
3094
|
+
command?: string;
|
|
3095
|
+
/** Output lines that appear, staggered, once the command finishes typing. */
|
|
3096
|
+
output?: string[];
|
|
3097
|
+
/** The shell prompt glyph. */
|
|
3098
|
+
prompt?: string;
|
|
3099
|
+
/** Title-bar label. Empty hides it (dots still show if `chrome` is on). */
|
|
3100
|
+
title?: string;
|
|
3101
|
+
/** Show window chrome (dots + title bar). */
|
|
3102
|
+
chrome?: boolean;
|
|
3103
|
+
/** Frames before typing starts. */
|
|
3104
|
+
delay?: TimeInput;
|
|
3105
|
+
/** Frames to type the whole command (linear cadence). */
|
|
3106
|
+
typeSpeed?: TimeInput;
|
|
3107
|
+
/** Frames after the command finishes before output begins. */
|
|
3108
|
+
outputDelay?: TimeInput;
|
|
3109
|
+
/** Font size in px. Sized for a 1080p+ video canvas, not a screen UI. */
|
|
3110
|
+
fontSize?: number;
|
|
3111
|
+
/** Width of the window in px. Fixed so the frame is stable while the command
|
|
3112
|
+
* types into it — a terminal has a defined size, it doesn't grow char by char. */
|
|
3113
|
+
width?: number;
|
|
3114
|
+
/** Command text color (default: theme `text`). */
|
|
3115
|
+
textColor?: string;
|
|
3116
|
+
/** Prompt glyph color — the earned accent (default: theme `accent`). */
|
|
3117
|
+
promptColor?: string;
|
|
3118
|
+
/** Output line color (default: theme `textMuted`). */
|
|
3119
|
+
outputColor?: string;
|
|
3120
|
+
/** Window background color (default: theme `background`). */
|
|
3121
|
+
background?: string;
|
|
3122
|
+
/** Window corner radius in px (default: theme `radius`). */
|
|
3123
|
+
cornerRadius?: number;
|
|
3124
|
+
/** Where the window sits: a region keyword (`'center'`, `'lower-third'`, …)
|
|
3125
|
+
* or normalized `{x,y}` (0–1, window center). The shared placement contract;
|
|
3126
|
+
* default `'center'`. */
|
|
3127
|
+
placement?: Placement;
|
|
3128
|
+
/** @deprecated Legacy alias — absolute x of the window's top-left in px.
|
|
3129
|
+
* Prefer `placement`. */
|
|
3130
|
+
x?: number;
|
|
3131
|
+
/** @deprecated Legacy alias — absolute y of the window's top-left in px.
|
|
3132
|
+
* Prefer `placement`. */
|
|
3133
|
+
y?: number;
|
|
3134
|
+
}
|
|
3135
|
+
declare function Terminal({ command, output, prompt, title, chrome, delay: delayIn, typeSpeed: typeSpeedIn, outputDelay: outputDelayIn, fontFamily: fontFamilyProp, letterSpacing: letterSpacingProp, fontSize, width, textColor: textColorProp, promptColor: promptColorProp, outputColor: outputColorProp, background: backgroundProp, cornerRadius: cornerRadiusProp, placement, x, y, }: TerminalProps): react.JSX.Element;
|
|
3136
|
+
|
|
3137
|
+
/** What a unit is: a single glyph, a whitespace-delimited word, or a `\n` line. */
|
|
3138
|
+
type TextAnimatorUnit = 'glyph' | 'word' | 'line';
|
|
3139
|
+
/** Stagger order across the units — which one leads the wipe. */
|
|
3140
|
+
type TextAnimatorDirection = 'forward' | 'backward' | 'center' | 'edges';
|
|
3141
|
+
/** A `[from, to]` numeric pair animated over each unit's 0→1 progress. */
|
|
3142
|
+
type Pair = readonly [number, number];
|
|
3143
|
+
/** The channels a TextAnimator can drive per unit. Omitted channels stay at rest;
|
|
3144
|
+
* a present channel eases from `from` (progress 0) to `to` (progress 1). */
|
|
3145
|
+
interface TextAnimate {
|
|
3146
|
+
/** Opacity `[from, to]` (e.g. `[0, 1]` to fade in). */
|
|
3147
|
+
opacity?: Pair;
|
|
3148
|
+
/** translateX in px `[from, to]`. */
|
|
3149
|
+
x?: Pair;
|
|
3150
|
+
/** translateY in px `[from, to]` (e.g. `[24, 0]` to rise). */
|
|
3151
|
+
y?: Pair;
|
|
3152
|
+
/** Uniform scale `[from, to]`, pivoted about the unit's own center. */
|
|
3153
|
+
scale?: Pair;
|
|
3154
|
+
/** Rotation in degrees `[from, to]`, pivoted about the unit's own center. */
|
|
3155
|
+
rotate?: Pair;
|
|
3156
|
+
/** Blur sigma in px `[from, to]` (RTT focus-pull — judge on native/export). */
|
|
3157
|
+
blur?: Pair;
|
|
3158
|
+
/** Color `[from, to]` (any ColorInput string). */
|
|
3159
|
+
color?: readonly [string, string];
|
|
3160
|
+
}
|
|
3161
|
+
interface TextAnimatorProps extends TextStyleProps {
|
|
3162
|
+
/** The text to choreograph. `\n` starts a new line. */
|
|
3163
|
+
text?: string;
|
|
3164
|
+
/** Unit granularity (default `'glyph'`). */
|
|
3165
|
+
units?: TextAnimatorUnit;
|
|
3166
|
+
/** Channels to animate per unit (default `{ opacity: [0, 1], y: [24, 0] }`). */
|
|
3167
|
+
animate?: TextAnimate;
|
|
3168
|
+
/** Time between consecutive units entering (default `STAGGER` = 5 frames). */
|
|
3169
|
+
stagger?: TimeInput;
|
|
3170
|
+
/** Time each unit takes to settle (default `DURATION.base`). */
|
|
3171
|
+
durationInFrames?: TimeInput;
|
|
3172
|
+
/** Time before the FIRST unit starts (default 0). */
|
|
3173
|
+
delay?: TimeInput;
|
|
3174
|
+
/** Compress the whole timing envelope (delay, stagger, durations) so the
|
|
3175
|
+
* entrance settles at least `hold` before the end of the enclosing clip
|
|
3176
|
+
* (`useVideoConfig().durationInFrames`, Sequence-scoped). Opt-in. */
|
|
3177
|
+
fitToClip?: boolean;
|
|
3178
|
+
/** Hard cap on the settle time (frames or '0.5s'). Wins over `fitToClip`. */
|
|
3179
|
+
maxSettle?: TimeInput;
|
|
3180
|
+
/** Breathing room before the cut for `fitToClip` (default 6 frames). */
|
|
3181
|
+
hold?: TimeInput;
|
|
3182
|
+
/** Stagger order across units (default `'forward'`). */
|
|
3183
|
+
direction?: TextAnimatorDirection;
|
|
3184
|
+
/** Physical settle spring; pass `false` to use `ease` instead (default `SPRING_SMOOTH`). */
|
|
3185
|
+
spring?: SpringConfig | false;
|
|
3186
|
+
/** Easing used when `spring` is `false` (default the house ease-out). */
|
|
3187
|
+
ease?: (t: number) => number;
|
|
3188
|
+
/** Font size in px (default 96). */
|
|
3189
|
+
fontSize?: number;
|
|
3190
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
3191
|
+
* line cannot exceed the frame minus the safe margins. Default `'none'`
|
|
3192
|
+
* (the historical behavior). */
|
|
3193
|
+
fit?: 'none' | 'frame';
|
|
3194
|
+
/** Explicit width cap in px for the line; combines with `fit` (the smaller
|
|
3195
|
+
* cap wins). */
|
|
3196
|
+
maxWidth?: number;
|
|
3197
|
+
/** Horizontal alignment of each line about the placement anchor (default `'center'`). */
|
|
3198
|
+
align?: 'left' | 'center' | 'right';
|
|
3199
|
+
/** Where the text block sits: a region keyword (`'center'`, `'lower-third'`,
|
|
3200
|
+
* …) or normalized `{x,y}` (0–1, block center). The shared placement
|
|
3201
|
+
* contract; default `'center'` (the historical centering). */
|
|
3202
|
+
placement?: Placement;
|
|
3203
|
+
}
|
|
3204
|
+
declare function TextAnimator({ text: textProp, units, animate, stagger: staggerIn, durationInFrames: durationIn, delay: delayIn, fitToClip, maxSettle, hold, direction, spring: springConfig, ease, fontSize: fontSizeProp, fit, maxWidth, color: colorProp, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, align, placement, }: TextAnimatorProps): react.JSX.Element;
|
|
3205
|
+
|
|
3206
|
+
interface TextFadeReplaceProps extends TextStyleProps {
|
|
3207
|
+
/** The outgoing phrase (shown first, fades out). */
|
|
3208
|
+
from: string;
|
|
3209
|
+
/** The incoming phrase (fades in over `from`). */
|
|
3210
|
+
to: string;
|
|
3211
|
+
/** Frames before the crossfade begins. Until then only `from` is shown
|
|
3212
|
+
* (default `DURATION.hold` = 45, a settled beat before the swap). */
|
|
3213
|
+
delay?: TimeInput;
|
|
3214
|
+
/** Frames the crossfade takes — old out over the first half, new in over the
|
|
3215
|
+
* second (default `DURATION.base` = 18). */
|
|
3216
|
+
durationInFrames?: TimeInput;
|
|
3217
|
+
/** Font size in px (default `96`, matching the ondajs display default). */
|
|
3218
|
+
fontSize?: number;
|
|
3219
|
+
}
|
|
3220
|
+
declare function TextFadeReplace({ from: fromProp, to: toProp, delay, durationInFrames, fontSize, color: colorProp, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, }: TextFadeReplaceProps): react.JSX.Element;
|
|
3221
|
+
|
|
3222
|
+
/** One anchor on the timeline. */
|
|
3223
|
+
interface TimelineEvent {
|
|
3224
|
+
label: string;
|
|
3225
|
+
}
|
|
3226
|
+
interface TimelineProps extends TextStyleProps {
|
|
3227
|
+
/** Anchor points down the timeline. Order is preserved — top to bottom. */
|
|
3228
|
+
events?: TimelineEvent[];
|
|
3229
|
+
/** Frames before the line begins to draw. */
|
|
3230
|
+
delay?: TimeInput;
|
|
3231
|
+
/** Frames over which the vertical line reveals itself top→bottom. */
|
|
3232
|
+
lineDuration?: TimeInput;
|
|
3233
|
+
/** Frames between the line completing and the first dot appearing. */
|
|
3234
|
+
dotDelay?: number;
|
|
3235
|
+
/** Frames between consecutive dot entrances (canonical Onda stagger = 4). */
|
|
3236
|
+
dotStagger?: number;
|
|
3237
|
+
/** Per-dot entrance duration. */
|
|
3238
|
+
dotDuration?: number;
|
|
3239
|
+
/** Dot diameter in px. */
|
|
3240
|
+
dotSize?: number;
|
|
3241
|
+
/** Vertical distance between consecutive events, in px. */
|
|
3242
|
+
spacing?: number;
|
|
3243
|
+
/** Line thickness in px. */
|
|
3244
|
+
lineWidth?: number;
|
|
3245
|
+
/** Line color (default: theme `border`). */
|
|
3246
|
+
lineColor?: string;
|
|
3247
|
+
/** Non-final dot color (default: theme `text`). */
|
|
3248
|
+
dotColor?: string;
|
|
3249
|
+
/** Final dot color — the earned accent (Onda rose) (default: theme `accent`). */
|
|
3250
|
+
accentColor?: string;
|
|
3251
|
+
/** Label color (default: theme `textMuted`). */
|
|
3252
|
+
labelColor?: string;
|
|
3253
|
+
/** Label font size in px. */
|
|
3254
|
+
fontSize?: number;
|
|
3255
|
+
}
|
|
3256
|
+
declare function Timeline({ events, delay: delayIn, lineDuration: lineDurationIn, dotDelay, dotStagger, dotDuration, dotSize, spacing, lineWidth, lineColor: lineColorProp, dotColor: dotColorProp, accentColor: accentColorProp, labelColor: labelColorProp, fontSize, fontFamily: fontFamilyProp, }: TimelineProps): react.JSX.Element;
|
|
3257
|
+
|
|
3258
|
+
interface TitleCardProps extends TextStyleProps {
|
|
3259
|
+
title: string;
|
|
3260
|
+
subtitle?: string;
|
|
3261
|
+
/** Title font size in px (default 120). */
|
|
3262
|
+
titleSize?: number;
|
|
3263
|
+
/** Opt-in auto-fit: `'frame'` scales the TITLE size DOWN (never up) so the
|
|
3264
|
+
* title line cannot exceed the frame minus the safe margins. Default
|
|
3265
|
+
* `'none'` (the historical behavior). */
|
|
3266
|
+
fit?: 'none' | 'frame';
|
|
3267
|
+
/** Explicit width cap in px for the title line; combines with `fit` (the
|
|
3268
|
+
* smaller cap wins). */
|
|
3269
|
+
maxWidth?: number;
|
|
3270
|
+
/** Subtitle font size in px (default 36). */
|
|
3271
|
+
subtitleSize?: number;
|
|
3272
|
+
/** Title color (default: theme `text`). */
|
|
3273
|
+
titleColor?: string;
|
|
3274
|
+
/** Subtitle color (default: theme `textMuted`). */
|
|
3275
|
+
subtitleColor?: string;
|
|
3276
|
+
/** Frame the title begins fading in (subtitle follows by one stagger step). */
|
|
3277
|
+
delay?: TimeInput;
|
|
3278
|
+
/** Where the card sits: a region keyword (`'center'`, `'lower-third'`, …) or
|
|
3279
|
+
* normalized `{x,y}` (0–1, card center). The shared placement contract;
|
|
3280
|
+
* default `'center'` (the historical self-centering). */
|
|
3281
|
+
placement?: Placement;
|
|
3282
|
+
}
|
|
3283
|
+
declare function TitleCard({ title, subtitle, titleSize: titleSizeProp, fit, maxWidth, subtitleSize, titleColor, subtitleColor, fontFamily, letterSpacing, uppercase, delay: delayIn, placement, }: TitleCardProps): react.JSX.Element;
|
|
3284
|
+
|
|
3285
|
+
interface TrackingInProps extends TextStyleProps {
|
|
3286
|
+
/** The text to settle in. */
|
|
3287
|
+
text?: string;
|
|
3288
|
+
/** Frames before the entrance starts. */
|
|
3289
|
+
delay?: TimeInput;
|
|
3290
|
+
/** Frames until the text settles (default `DURATION.slow` = 24). */
|
|
3291
|
+
durationInFrames?: TimeInput;
|
|
3292
|
+
/** Starting letter-spacing in em — the text begins spread wide and contracts. */
|
|
3293
|
+
fromTracking?: number;
|
|
3294
|
+
/** Resting letter-spacing in em. */
|
|
3295
|
+
tracking?: number;
|
|
3296
|
+
/** Start the text soft and sharpen as it settles (approximated; see doc). */
|
|
3297
|
+
blur?: boolean;
|
|
3298
|
+
/** Font size in px. */
|
|
3299
|
+
fontSize?: number;
|
|
3300
|
+
/** Horizontal alignment of the line about `x`. Default `'center'`. */
|
|
3301
|
+
align?: 'left' | 'center' | 'right';
|
|
3302
|
+
/** @deprecated No longer used — the line now uses real shaped letter-spacing
|
|
3303
|
+
* metrics, so no per-glyph advance estimate is needed. Accepted for compat. */
|
|
3304
|
+
advanceFactor?: number;
|
|
3305
|
+
/** Absolute x anchor of the line (default canvas center). */
|
|
3306
|
+
x?: number;
|
|
3307
|
+
/** Absolute y of the line's top (default vertical center). */
|
|
3308
|
+
y?: number;
|
|
3309
|
+
}
|
|
3310
|
+
declare function TrackingIn({ text: textProp, delay, durationInFrames, color: colorProp, fromTracking, tracking, blur, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, align, x, y, }: TrackingInProps): react.JSX.Element;
|
|
3311
|
+
|
|
3312
|
+
interface TypewriterProps extends TextStyleProps {
|
|
3313
|
+
/** What to type out. */
|
|
3314
|
+
text?: string;
|
|
3315
|
+
/** Time before typing starts — frames or '0.5s'. */
|
|
3316
|
+
delay?: TimeInput;
|
|
3317
|
+
/** Time to type the full string. Linear pacing — chars-per-frame is
|
|
3318
|
+
* constant. Default `DURATION.slow` (24 frames). */
|
|
3319
|
+
durationInFrames?: TimeInput;
|
|
3320
|
+
/** Compress the whole timing envelope (delay, stagger, durations) so the
|
|
3321
|
+
* entrance settles at least `hold` before the end of the enclosing clip
|
|
3322
|
+
* (`useVideoConfig().durationInFrames`, Sequence-scoped). Opt-in. */
|
|
3323
|
+
fitToClip?: boolean;
|
|
3324
|
+
/** Hard cap on the settle time (frames or '0.5s'). Wins over `fitToClip`. */
|
|
3325
|
+
maxSettle?: TimeInput;
|
|
3326
|
+
/** Breathing room before the cut for `fitToClip` (default 6 frames). */
|
|
3327
|
+
hold?: TimeInput;
|
|
3328
|
+
/** Show a blinking cursor at the leading edge while typing. Default `true`. */
|
|
3329
|
+
cursor?: boolean;
|
|
3330
|
+
/** Cursor color (default: theme `accent`). */
|
|
3331
|
+
cursorColor?: string;
|
|
3332
|
+
/** Font size in px (default 64). */
|
|
3333
|
+
fontSize?: number;
|
|
3334
|
+
/** Opt-in auto-fit: `'frame'` scales the font size DOWN (never up) so the
|
|
3335
|
+
* measured line cannot exceed the frame minus the safe margins. Default
|
|
3336
|
+
* `'none'` (the historical behavior). */
|
|
3337
|
+
fit?: 'none' | 'frame';
|
|
3338
|
+
/** Explicit width cap in px for the line; combines with `fit` (the smaller
|
|
3339
|
+
* cap wins). */
|
|
3340
|
+
maxWidth?: number;
|
|
3341
|
+
/** Where the line sits: a region keyword (`'center'`, `'lower-third'`, …) or
|
|
3342
|
+
* normalized `{x,y}` (0–1, anchored at the FULL line's measured center). The
|
|
3343
|
+
* shared placement contract; default `'center'`. */
|
|
3344
|
+
placement?: Placement;
|
|
3345
|
+
/** @deprecated Legacy alias — absolute x of the text's left edge in px.
|
|
3346
|
+
* Prefer `placement`. */
|
|
3347
|
+
x?: number;
|
|
3348
|
+
/** @deprecated Legacy alias — absolute y (baseline-ish top) in px. Prefer
|
|
3349
|
+
* `placement`. */
|
|
3350
|
+
y?: number;
|
|
3351
|
+
}
|
|
3352
|
+
declare function Typewriter({ text: textProp, delay: delayIn, durationInFrames: durationIn, fitToClip, maxSettle, hold, cursor, cursorColor: cursorColorProp, color: colorProp, fontSize: fontSizeProp, fit, maxWidth, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, placement, x, y, }: TypewriterProps): react.JSX.Element;
|
|
3353
|
+
|
|
3354
|
+
interface UnderlineProps extends TextStyleProps {
|
|
3355
|
+
/** Text to reveal. Pass `""` to draw the rule alone. */
|
|
3356
|
+
text?: string;
|
|
3357
|
+
/** Frames before the text starts revealing. */
|
|
3358
|
+
delay?: TimeInput;
|
|
3359
|
+
/** Text reveal duration in frames (default `DURATION.base` = 18). */
|
|
3360
|
+
duration?: TimeInput;
|
|
3361
|
+
/** Frames to wait after the text lands before the rule starts drawing. */
|
|
3362
|
+
lineDelay?: TimeInput;
|
|
3363
|
+
/** Rule draw duration. Fast on purpose — emphatic (default `DURATION.fast`). */
|
|
3364
|
+
lineDuration?: TimeInput;
|
|
3365
|
+
/** Rule color (default: theme `accent`). */
|
|
3366
|
+
accentColor?: string;
|
|
3367
|
+
/** Rule thickness in px. */
|
|
3368
|
+
lineThickness?: number;
|
|
3369
|
+
/** Pixel gap between the text box and the rule. */
|
|
3370
|
+
lineOffset?: number;
|
|
3371
|
+
/** Text size in px (default 64). */
|
|
3372
|
+
fontSize?: number;
|
|
3373
|
+
/** Horizontal alignment of the rule under the text. */
|
|
3374
|
+
align?: 'left' | 'center' | 'right';
|
|
3375
|
+
}
|
|
3376
|
+
declare function Underline({ text: textProp, delay: delayIn, duration: durationIn, lineDelay: lineDelayIn, lineDuration: lineDurationIn, color: colorProp, accentColor: accentColorProp, lineThickness, lineOffset, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, align, }: UnderlineProps): react.JSX.Element;
|
|
3377
|
+
|
|
3378
|
+
interface VideoClipProps {
|
|
3379
|
+
/** URL or path to the video. The current frame is decoded per composition
|
|
3380
|
+
* frame by the player (browser) or `onda export` (native ffmpeg). */
|
|
3381
|
+
src: string;
|
|
3382
|
+
/** Seconds into the source shown at the clip's frame 0 (trim the head). Default 0. */
|
|
3383
|
+
startAt?: number;
|
|
3384
|
+
/** Source seconds advanced per composition second (1 = realtime). Default 1. */
|
|
3385
|
+
playbackRate?: number;
|
|
3386
|
+
/** Seconds into the source to stop at (trim the tail). Past it the clip holds
|
|
3387
|
+
* its last frame unless `loop` is set. Omit to play to the source's end. */
|
|
3388
|
+
endAt?: number;
|
|
3389
|
+
/** Loop the trimmed span `[startAt, endAt)` (requires `endAt`) for as long as
|
|
3390
|
+
* the clip is visible. */
|
|
3391
|
+
loop?: boolean;
|
|
3392
|
+
/** Preview-only: how the player previews a source it can't composite (a
|
|
3393
|
+
* cross-origin URL without CORS). `'skip'` (default) blanks it + warns;
|
|
3394
|
+
* `'element'` overlays a plain `<video>` so it still plays in preview. Never
|
|
3395
|
+
* affects `onda export`. See {@link VideoProps.previewFallback}. */
|
|
3396
|
+
previewFallback?: 'skip' | 'element';
|
|
3397
|
+
/** Frames the clip waits before its fade-in begins (default 0). */
|
|
3398
|
+
delay?: TimeInput;
|
|
3399
|
+
/** Frames the fade-in takes (default `DURATION.base` = 18). `0` = hard cut in. */
|
|
3400
|
+
fadeIn?: number;
|
|
3401
|
+
/** Frames the fade-out takes (default `DURATION.base` = 18). `0` = hard cut out. */
|
|
3402
|
+
fadeOut?: number;
|
|
3403
|
+
/** Visible hold of the clip in frames, used to time the fade-out (the fade-out
|
|
3404
|
+
* lands on the last `fadeOut` frames). When omitted, the clip never fades out —
|
|
3405
|
+
* mirrors ondajs skipping the fade-out when `endAt` is unset. */
|
|
3406
|
+
durationInFrames?: TimeInput;
|
|
3407
|
+
/** How the poster fits its box. `'cover'` crops to fill (default); `'contain'`
|
|
3408
|
+
* letterboxes against black. */
|
|
3409
|
+
fit?: 'cover' | 'contain';
|
|
3410
|
+
/** Box width in px the clip occupies (default = full composition width). */
|
|
3411
|
+
width?: number;
|
|
3412
|
+
/** Box height in px the clip occupies (default = full composition height). */
|
|
3413
|
+
height?: number;
|
|
3414
|
+
/** Top-left x of the box in px (default 0 — canvas-filling). */
|
|
3415
|
+
x?: number;
|
|
3416
|
+
/** Top-left y of the box in px (default 0 — canvas-filling). */
|
|
3417
|
+
y?: number;
|
|
3418
|
+
/** Rounded corner radius of the box in px (default: theme `radius`). */
|
|
3419
|
+
borderRadius?: number;
|
|
3420
|
+
/** Draw cinematic black letterbox bars top & bottom, each this many px tall
|
|
3421
|
+
* (default 0 = none). Drawn over the poster, inside the box. */
|
|
3422
|
+
letterbox?: number;
|
|
3423
|
+
/** Backing color shown behind/around the poster (default: theme `background`). */
|
|
3424
|
+
backgroundColor?: string;
|
|
3425
|
+
}
|
|
3426
|
+
declare function VideoClip({ src, startAt, playbackRate, endAt, loop, previewFallback, delay: delayIn, fadeIn, fadeOut, durationInFrames: durationInFramesIn, fit, width, height, x, y, borderRadius: borderRadiusProp, letterbox, backgroundColor: backgroundColorProp, }: VideoClipProps): react.JSX.Element;
|
|
3427
|
+
|
|
3428
|
+
interface VignetteProps {
|
|
3429
|
+
/** Edge darkness. `0` = no vignette, `1` = fully dark edges. Default `0.5`. */
|
|
3430
|
+
intensity?: number;
|
|
3431
|
+
/**
|
|
3432
|
+
* Percent (0..100) from center where the darkening begins. Larger = bigger
|
|
3433
|
+
* clean middle. Default `40`.
|
|
3434
|
+
*/
|
|
3435
|
+
innerRadius?: number;
|
|
3436
|
+
/** Edge color. Defaults to pure black for the classic cinematic frame (default: theme `background`). */
|
|
3437
|
+
color?: string;
|
|
3438
|
+
}
|
|
3439
|
+
declare function Vignette({ intensity, innerRadius, color: colorProp }: VignetteProps): react.JSX.Element;
|
|
3440
|
+
|
|
3441
|
+
interface WordRotateProps extends TextStyleProps {
|
|
3442
|
+
/** Phrases cycled in place, in order. One is visible at a time. */
|
|
3443
|
+
phrases?: string[];
|
|
3444
|
+
/** Frames before the first phrase begins to enter (default `0`). */
|
|
3445
|
+
delay?: TimeInput;
|
|
3446
|
+
/** Frames each phrase holds at full opacity before the next arrives
|
|
3447
|
+
* (default `30`). */
|
|
3448
|
+
holdDuration?: TimeInput;
|
|
3449
|
+
/** Frames for a single phrase to fade in (and, separately, fade out)
|
|
3450
|
+
* (default `12`). */
|
|
3451
|
+
transitionDuration?: number;
|
|
3452
|
+
/** Font size in px. Phrases are usually large (default `96`). */
|
|
3453
|
+
fontSize?: number;
|
|
3454
|
+
/** Horizontal anchor of each phrase relative to `x` (default `'left'`).
|
|
3455
|
+
* `'center'`/`'right'` use an estimated text width (see doc comment). */
|
|
3456
|
+
align?: 'left' | 'center' | 'right';
|
|
3457
|
+
/** Absolute x of the anchor point. Defaults to the composition center. */
|
|
3458
|
+
x?: number;
|
|
3459
|
+
/** Absolute y (top-ish) of the text. Defaults to vertical center. */
|
|
3460
|
+
y?: number;
|
|
3461
|
+
}
|
|
3462
|
+
declare function WordRotate({ phrases: phrasesProp, delay: delayIn, holdDuration: holdDurationIn, transitionDuration, color: colorProp, fontSize, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, align, x, y, }: WordRotateProps): react.JSX.Element;
|
|
3463
|
+
|
|
3464
|
+
interface WordStaggerProps extends TextStyleProps {
|
|
3465
|
+
/** The phrase. Split on whitespace into one reveal per word. */
|
|
3466
|
+
text?: string;
|
|
3467
|
+
/** Font size in px (default 64). */
|
|
3468
|
+
fontSize?: number;
|
|
3469
|
+
/** Container width in px — the line wraps within this (default 1080). */
|
|
3470
|
+
width?: number;
|
|
3471
|
+
/** Horizontal alignment of words within each line (default `'start'`). */
|
|
3472
|
+
justify?: 'start' | 'center' | 'end';
|
|
3473
|
+
/** Frames before the FIRST word starts (default 0). */
|
|
3474
|
+
delay?: TimeInput;
|
|
3475
|
+
/** Frames between consecutive words (default `STAGGER` = 4). */
|
|
3476
|
+
stagger?: TimeInput;
|
|
3477
|
+
}
|
|
3478
|
+
declare function WordStagger({ text: textProp, fontSize, color: colorProp, width, fontFamily: fontFamilyProp, fontWeight, italic, letterSpacing, uppercase, justify, delay: delayIn, stagger: staggerIn, }: WordStaggerProps): react.JSX.Element;
|
|
3479
|
+
|
|
3480
|
+
export { type AudioAnalyzer, AudioClip, type AudioClipProps, AudioVisualizer, type AudioVisualizerProps, BarChart, type BarChartDatum, type BarChartProps, type Beats, type BeatsHandle, BentoGrid, type BentoGridProps, type BentoItem, BlurReveal, type BlurRevealProps, BoundingBox, type BoundingBoxProps, type Box, BrowserFrame, type BrowserFrameProps, Button, type ButtonProps, COMPONENT_SETTLE, Callout, type CalloutDirection, type CalloutProps, CameraShake, type CameraShakeProps, type CaptionEntry, Captions, type CaptionsProps, CardShowcase, type CardShowcaseProps, ChapterCard, type ChapterCardProps, CodeBlock, type CodeBlockProps, CodeDiff, type CodeDiffProps, Confetti, type ConfettiProps, CountUp, type CountUpProps, Cursor, type CursorProps, DURATION, DeviceFrame, type DeviceFrameProps, type DiffLine, type DiffLineType, type Divergence, type DivergenceOpts, DrawOn, type DrawOnProps, type DurationToken, DynamicGrid, type DynamicGridProps, type Ease, type ElementSize, EndCard, type EndCardProps, type EntranceOptions, type EntranceType, FadeIn, type FadeInProps, FadeOut, type FadeOutProps, FilmGrade, type FilmGradeProps, type FilmLook, type FitOpts, type FitToClipOpts, type FontMetrics, type FrameSize, type GlyphCell, type GlyphInfo, type GlyphLine, type GlyphLineOpts, GradientShift, type GradientShiftProps, GrainOverlay, type GrainOverlayProps, HOUSE_EASE, Highlight, type HighlightProps, IconPop, type IconPopProps, type IconShape, ImageReveal, type ImageRevealFit, type ImageRevealMotion, type ImageRevealProps, InputField, type InputFieldProps, KanbanBoard, type KanbanBoardProps, type KanbanColumn, KenBurns, type KenBurnsProps, type KeyframeTracks, Keyframes, type KeyframesImageContent, type KeyframesProps, type KeyframesTextContent, KineticText, type KineticTextPreset, type KineticTextProps, LINE_RATIO, LineChart, type LineChartProps, LogoReveal, type LogoRevealPreset, type LogoRevealProps, LogoSting, type LogoStingProps, type LookbookLayout, LookbookShot, type LookbookShotProps, LowerThird, type LowerThirdProps, Marquee, type MarqueeProps, MaskReveal, type MaskRevealProps, MatrixDecode, type MatrixDecodeProps, type MeasureOpts, MeshGradient, type MeshGradientProps, Moodboard, type MoodboardProps, type Motion, NodeGraph, type NodeGraphProps, OVERSHOOT, PLACEMENT_DESCRIPTION, PLACEMENT_REGIONS, Parallax, type ParallaxLayer, type ParallaxProps, PathMorph, type PathMorphProps, type PatternInput, PieReveal, type PieRevealProps, type PieRevealSlice, Placed, type PlacedProps, type Placement, type PlacementPoint, type PlacementRegion, PlacementShift, type PlacementShiftProps, type PosKey, PriceTag, type PriceTagProps, PricingCard, type PricingCardProps, ProductWall, type ProductWallProps, ProgressBar, type ProgressBarProps, ProgressSteps, type ProgressStepsProps, PulsingIndicator, type PulsingIndicatorProps, QuoteCard, type QuoteCardProps, type RenderBackend, type ResolvedBounds, type ResolvedPlacement, type ResponsiveTransform, RgbGlitch, type RgbGlitchProps, RotateIn, type RotateInProps, SAFE_MARGIN, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER, type SampledKeyframes, type Satellite, ScaleIn, type ScaleInProps, Scrim, type ScrimProps, type SettleFn, ShimmerSweep, type ShimmerSweepProps, SiteReveal, type SiteRevealProps, SkeletonCard, type SkeletonCardProps, SlideIn, type SlideInProps, SlideOut, type SlideOutProps, SlotMachineRoll, type SlotMachineRollProps, SplitLockup, type SplitLockupProps, SplitScreen, type SplitScreenProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, StaggerGroup, type StaggerGroupProps, StatCard, type StatCardProps, TIME_DESCRIPTION, Terminal, type TerminalProps, type TextAnimate, TextAnimator, type TextAnimatorDirection, type TextAnimatorProps, type TextAnimatorUnit, TextFadeReplace, type TextFadeReplaceProps, type TextMetrics, type Theme, ThemeProvider, type ThemeProviderProps, type TimeInput, Timeline, type TimelineEvent, type TimelineProps, TitleCard, type TitleCardProps, TrackingIn, type TrackingInProps, Typewriter, type TypewriterProps, Underline, type UnderlineProps, type ValKey, VideoClip, type VideoClipProps, Vignette, type VignetteProps, WordRotate, type WordRotateProps, WordStagger, type WordStaggerProps, beatPulse, defaultTheme, divergenceReport, entryDesignAnchor, entryFade, entryFadeRise, entryScale, entrySlide, exitFade, exitFadeFall, exitScale, exitSlide, fitFontSize, fitMaxWidth, fontMetrics, framesOf, framesSinceBeat, glyphLayout, hasKeyframeTracks, heroReveal, isBeat, isPlacement, layoutGlyphLine, lineStartX, lineTopY, loadFont, matchesExport, measureText, placementSchema, preloadTextMetrics, resolvePlacement, responsiveEntryTransform, sampleKeyframes, sampleTrack, settleTime, staggerFrames, staggeredSettle, stateSwap, timeSchema, useAudioBeats, useAudioData, useEntrance, useFittedFontSize, useFontMetrics, useGlyphLayout, usePlacement, useResolvedBounds, useSceneProgress, useSpringValue, useStaggeredEntrance, useTextMetrics, useTextMetricsReady, useTextReveal, useTheme, useTimeScale };
|