@cardstack/choreo 0.0.0 → 0.1.0-unstable.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/LICENSE +21 -0
- package/README.md +55 -6
- package/addon-main.cjs +4 -0
- package/declarations/anchors.d.ts +26 -0
- package/declarations/anchors.d.ts.map +1 -0
- package/declarations/arming.d.ts +33 -0
- package/declarations/arming.d.ts.map +1 -0
- package/declarations/beacon.d.ts +9 -0
- package/declarations/beacon.d.ts.map +1 -0
- package/declarations/beacons.d.ts +23 -0
- package/declarations/beacons.d.ts.map +1 -0
- package/declarations/changeset.d.ts +46 -0
- package/declarations/changeset.d.ts.map +1 -0
- package/declarations/choreo.d.ts +261 -0
- package/declarations/choreo.d.ts.map +1 -0
- package/declarations/compile.d.ts +45 -0
- package/declarations/compile.d.ts.map +1 -0
- package/declarations/deliver.d.ts +44 -0
- package/declarations/deliver.d.ts.map +1 -0
- package/declarations/easings.d.ts +20 -0
- package/declarations/easings.d.ts.map +1 -0
- package/declarations/far.d.ts +33 -0
- package/declarations/far.d.ts.map +1 -0
- package/declarations/film/clip.d.ts +51 -0
- package/declarations/film/clip.d.ts.map +1 -0
- package/declarations/film/clips.d.ts +155 -0
- package/declarations/film/clips.d.ts.map +1 -0
- package/declarations/film/film.d.ts +1208 -0
- package/declarations/film/film.d.ts.map +1 -0
- package/declarations/film/graph/adjust.d.ts +112 -0
- package/declarations/film/graph/adjust.d.ts.map +1 -0
- package/declarations/film/graph/compile.d.ts +140 -0
- package/declarations/film/graph/compile.d.ts.map +1 -0
- package/declarations/film/graph/host.d.ts +67 -0
- package/declarations/film/graph/host.d.ts.map +1 -0
- package/declarations/film/graph/nodes.d.ts +287 -0
- package/declarations/film/graph/nodes.d.ts.map +1 -0
- package/declarations/film/index.d.ts +24 -0
- package/declarations/film/index.d.ts.map +1 -0
- package/declarations/film/joins.d.ts +143 -0
- package/declarations/film/joins.d.ts.map +1 -0
- package/declarations/film/math.d.ts +15 -0
- package/declarations/film/math.d.ts.map +1 -0
- package/declarations/film/overlays.d.ts +54 -0
- package/declarations/film/overlays.d.ts.map +1 -0
- package/declarations/film/picture.d.ts +104 -0
- package/declarations/film/picture.d.ts.map +1 -0
- package/declarations/film/plate.d.ts +37 -0
- package/declarations/film/plate.d.ts.map +1 -0
- package/declarations/film/player.d.ts +120 -0
- package/declarations/film/player.d.ts.map +1 -0
- package/declarations/film/rail.d.ts +40 -0
- package/declarations/film/rail.d.ts.map +1 -0
- package/declarations/film/schedule.d.ts +93 -0
- package/declarations/film/schedule.d.ts.map +1 -0
- package/declarations/film/seam.d.ts +38 -0
- package/declarations/film/seam.d.ts.map +1 -0
- package/declarations/film/titles.d.ts +37 -0
- package/declarations/film/titles.d.ts.map +1 -0
- package/declarations/film/types.d.ts +544 -0
- package/declarations/film/types.d.ts.map +1 -0
- package/declarations/film.d.ts +3 -0
- package/declarations/film.d.ts.map +1 -0
- package/declarations/gesture.d.ts +33 -0
- package/declarations/gesture.d.ts.map +1 -0
- package/declarations/index.d.ts +26 -0
- package/declarations/index.d.ts.map +1 -0
- package/declarations/measure.d.ts +29 -0
- package/declarations/measure.d.ts.map +1 -0
- package/declarations/path.d.ts +73 -0
- package/declarations/path.d.ts.map +1 -0
- package/declarations/registry.d.ts +46 -0
- package/declarations/registry.d.ts.map +1 -0
- package/declarations/run.d.ts +406 -0
- package/declarations/run.d.ts.map +1 -0
- package/declarations/space.d.ts +31 -0
- package/declarations/space.d.ts.map +1 -0
- package/declarations/steps.d.ts +479 -0
- package/declarations/steps.d.ts.map +1 -0
- package/declarations/test-support/index.d.ts +30 -0
- package/declarations/test-support/index.d.ts.map +1 -0
- package/declarations/types.d.ts +761 -0
- package/declarations/types.d.ts.map +1 -0
- package/dist/anchors.js +34 -0
- package/dist/anchors.js.map +1 -0
- package/dist/arming.js +120 -0
- package/dist/arming.js.map +1 -0
- package/dist/beacon.js +25 -0
- package/dist/beacon.js.map +1 -0
- package/dist/beacons.js +77 -0
- package/dist/beacons.js.map +1 -0
- package/dist/changeset.js +129 -0
- package/dist/changeset.js.map +1 -0
- package/dist/choreo.js +1026 -0
- package/dist/choreo.js.map +1 -0
- package/dist/compile.js +1403 -0
- package/dist/compile.js.map +1 -0
- package/dist/deliver.js +326 -0
- package/dist/deliver.js.map +1 -0
- package/dist/easings.js +39 -0
- package/dist/easings.js.map +1 -0
- package/dist/far.js +147 -0
- package/dist/far.js.map +1 -0
- package/dist/film/clip.js +100 -0
- package/dist/film/clip.js.map +1 -0
- package/dist/film/clips.js +147 -0
- package/dist/film/clips.js.map +1 -0
- package/dist/film/film.js +4424 -0
- package/dist/film/film.js.map +1 -0
- package/dist/film/graph/adjust.js +160 -0
- package/dist/film/graph/adjust.js.map +1 -0
- package/dist/film/graph/compile.js +225 -0
- package/dist/film/graph/compile.js.map +1 -0
- package/dist/film/graph/host.js +77 -0
- package/dist/film/graph/host.js.map +1 -0
- package/dist/film/graph/nodes.js +500 -0
- package/dist/film/graph/nodes.js.map +1 -0
- package/dist/film/index.js +18 -0
- package/dist/film/index.js.map +1 -0
- package/dist/film/joins.js +260 -0
- package/dist/film/joins.js.map +1 -0
- package/dist/film/math.js +49 -0
- package/dist/film/math.js.map +1 -0
- package/dist/film/overlays.js +66 -0
- package/dist/film/overlays.js.map +1 -0
- package/dist/film/picture.js +58 -0
- package/dist/film/picture.js.map +1 -0
- package/dist/film/plate.js +36 -0
- package/dist/film/plate.js.map +1 -0
- package/dist/film/player.js +79 -0
- package/dist/film/player.js.map +1 -0
- package/dist/film/rail.js +38 -0
- package/dist/film/rail.js.map +1 -0
- package/dist/film/schedule.js +238 -0
- package/dist/film/schedule.js.map +1 -0
- package/dist/film/seam.js +64 -0
- package/dist/film/seam.js.map +1 -0
- package/dist/film/titles.js +45 -0
- package/dist/film/titles.js.map +1 -0
- package/dist/film/types.js +2 -0
- package/dist/film/types.js.map +1 -0
- package/dist/film.js +18 -0
- package/dist/film.js.map +1 -0
- package/dist/gesture.js +111 -0
- package/dist/gesture.js.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/measure.js +99 -0
- package/dist/measure.js.map +1 -0
- package/dist/path.js +272 -0
- package/dist/path.js.map +1 -0
- package/dist/registry.js +55 -0
- package/dist/registry.js.map +1 -0
- package/dist/run.js +2423 -0
- package/dist/run.js.map +1 -0
- package/dist/space.js +57 -0
- package/dist/space.js.map +1 -0
- package/dist/steps.js +831 -0
- package/dist/steps.js.map +1 -0
- package/dist/test-support/index.js +150 -0
- package/dist/test-support/index.js.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +202 -6
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The timeline, declared in the template. Each step renders a hidden marker
|
|
3
|
+
* so the region can read the tree back in document order — nesting in the
|
|
4
|
+
* markup IS the sequence/parallel nesting. Nothing here animates; the region
|
|
5
|
+
* compiles these into cues when a render pass produces a changeset.
|
|
6
|
+
*/
|
|
7
|
+
import Component from '@glimmer/component';
|
|
8
|
+
import { type AnchorRef } from './anchors.ts';
|
|
9
|
+
import type { BeaconRef } from './beacons.ts';
|
|
10
|
+
import type { GestureRef } from './gesture.ts';
|
|
11
|
+
import type { Block, Camera3DWaypoint, DeliveryBy, DeliveryOrder, DeriveContext, Easing, PropValue, Query, Rect, SpringSpec, TimelineNode } from './types.ts';
|
|
12
|
+
/** the steps directly inside an element, in document order; a nested <Choreo> is another region's */
|
|
13
|
+
export declare function collect(el: Element): TimelineNode[];
|
|
14
|
+
/**
|
|
15
|
+
* The template speaks seconds, as Motion does; the compiler's clock is ms.
|
|
16
|
+
* A composite step writes node literals, which are BELOW that boundary —
|
|
17
|
+
* so it converts its own seconds args here, and `undefined` stays
|
|
18
|
+
* `undefined` so an unset arg still means "take the default".
|
|
19
|
+
*/
|
|
20
|
+
export declare function toMs<T extends number | undefined>(seconds: T): T extends number ? number : number | undefined;
|
|
21
|
+
/** the args every step shares — a composite step extends this */
|
|
22
|
+
export interface StepArgsBase {
|
|
23
|
+
[prop: string]: unknown;
|
|
24
|
+
/** `{{at 'name' 0.4}}` / `{{after 'name' 0.2}}` — start against a named step */
|
|
25
|
+
at?: AnchorRef;
|
|
26
|
+
/** seconds before the step starts, inside its slot */
|
|
27
|
+
delay?: number;
|
|
28
|
+
/** a label other steps may anchor against */
|
|
29
|
+
name?: string;
|
|
30
|
+
/** seconds between one matched sprite and the next, in document order */
|
|
31
|
+
stagger?: number;
|
|
32
|
+
}
|
|
33
|
+
/** …and the args of a step that names sprites */
|
|
34
|
+
export interface StepArgs extends StepArgsBase {
|
|
35
|
+
of: Query | Query[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The base every step is built on, and the public seam for a COMPOSITE
|
|
39
|
+
* step — a new word in the timeline that expands into the built-in
|
|
40
|
+
* vocabulary. `c.Crossing` is one, and is written in nothing but this.
|
|
41
|
+
*
|
|
42
|
+
* Subclass it, implement `node()`, and render the component anywhere
|
|
43
|
+
* inside a `<Choreo>`: the region reads the tree back in document order
|
|
44
|
+
* and your node takes its place in it.
|
|
45
|
+
*
|
|
46
|
+
* ```gts
|
|
47
|
+
* export class Reveal extends StepComponent<StepArgs & { rise?: number }> {
|
|
48
|
+
* node(): TimelineNode {
|
|
49
|
+
* const { of, name, rise = 12 } = this.args;
|
|
50
|
+
* return {
|
|
51
|
+
* at: this.args.at,
|
|
52
|
+
* children: [
|
|
53
|
+
* { kind: 'tween', generic: true, of, ms: 240, props: { opacity: [0, 1] } },
|
|
54
|
+
* { kind: 'tween', generic: true, of, ms: 240, props: { y: [rise, 0] } },
|
|
55
|
+
* ],
|
|
56
|
+
* kind: 'parallel',
|
|
57
|
+
* name,
|
|
58
|
+
* };
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* **`node()` is called on every pass**, and its result is fingerprinted to
|
|
64
|
+
* decide whether an edited timeline replays the run. So it must be pure
|
|
65
|
+
* and cheap: no measurement, no DOM writes, no tracked writes (a tracked
|
|
66
|
+
* write re-renders, which replays the pass, which calls `node()`). And
|
|
67
|
+
* because functions in the tree are compared by identity, a `node()` that
|
|
68
|
+
* allocates a fresh closure per call declares an edit on every pass —
|
|
69
|
+
* hoist property functions to module scope.
|
|
70
|
+
*
|
|
71
|
+
* Two conventions worth keeping: mark children `generic: true` so a
|
|
72
|
+
* sibling step can claim a sprite away from your defaults (the yield
|
|
73
|
+
* rule, §4.7), and derive any inner `name` from your own `@name` so two
|
|
74
|
+
* of your step in one timeline do not collide.
|
|
75
|
+
*/
|
|
76
|
+
export declare abstract class StepComponent<A extends StepArgsBase> extends Component<{
|
|
77
|
+
Args: A;
|
|
78
|
+
}> {
|
|
79
|
+
abstract node(): TimelineNode;
|
|
80
|
+
mark: import("ember-modifier").FunctionBasedModifier<{
|
|
81
|
+
Args: {
|
|
82
|
+
Positional: unknown[];
|
|
83
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
84
|
+
};
|
|
85
|
+
Element: Element;
|
|
86
|
+
}>;
|
|
87
|
+
}
|
|
88
|
+
export declare class Tween extends StepComponent<StepArgs & {
|
|
89
|
+
/** split a text sprite's delivery: by word, character, or paragraph */
|
|
90
|
+
by?: DeliveryBy;
|
|
91
|
+
/** seconds, as Motion counts them */
|
|
92
|
+
duration: number;
|
|
93
|
+
ease?: Easing;
|
|
94
|
+
order?: DeliveryOrder;
|
|
95
|
+
/** extra plays after the first; `Infinity` is an ambient loop whose phase rides the run clock */
|
|
96
|
+
repeat?: number;
|
|
97
|
+
repeatType?: 'loop' | 'mirror' | 'reverse';
|
|
98
|
+
/** Normalized keyframe offsets, one per value in every keyframe track. */
|
|
99
|
+
times?: number[];
|
|
100
|
+
}> {
|
|
101
|
+
node(): TimelineNode;
|
|
102
|
+
}
|
|
103
|
+
export declare class Spring extends StepComponent<StepArgs & {
|
|
104
|
+
by?: DeliveryBy;
|
|
105
|
+
order?: DeliveryOrder;
|
|
106
|
+
spring?: SpringSpec;
|
|
107
|
+
}> {
|
|
108
|
+
node(): TimelineNode;
|
|
109
|
+
}
|
|
110
|
+
export declare class Move extends StepComponent<StepArgs & {
|
|
111
|
+
/** seconds; with @ease, the tween form of the flight */
|
|
112
|
+
duration?: number;
|
|
113
|
+
ease?: string | readonly number[];
|
|
114
|
+
/** `{{c.beacon 'compose'}}` or `{{c.gesture}}` — fly in from that box */
|
|
115
|
+
from?: BeaconRef | GestureRef;
|
|
116
|
+
/** an SVG path for the journey, drawn from where the sprite stands */
|
|
117
|
+
path?: string;
|
|
118
|
+
/** 'auto' orients along the tangent; a number adds a constant offset */
|
|
119
|
+
rotate?: 'auto' | number;
|
|
120
|
+
size?: boolean | 'crop' | 'scale';
|
|
121
|
+
/** measure the delta in 'page' (default) or the sprite's 'parent' space */
|
|
122
|
+
space?: 'page' | 'parent';
|
|
123
|
+
spring?: SpringSpec;
|
|
124
|
+
/** counterpart skins: 'during' (default), 'settle', or 'none' */
|
|
125
|
+
swap?: 'during' | 'none' | 'settle';
|
|
126
|
+
/** `{{c.beacon 'trash'}}` — fly out to that box rather than to where the sprite landed */
|
|
127
|
+
to?: BeaconRef;
|
|
128
|
+
}> {
|
|
129
|
+
node(): TimelineNode;
|
|
130
|
+
}
|
|
131
|
+
export declare class Hold extends StepComponent<StepArgs & {
|
|
132
|
+
duration?: number;
|
|
133
|
+
fill?: boolean;
|
|
134
|
+
}> {
|
|
135
|
+
node(): TimelineNode;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* `<c.Wait />` — a hole in a sequence. It has no subject: `@of` is accepted
|
|
139
|
+
* (a wait can be laddered across sprites with `@stagger`) but never needed.
|
|
140
|
+
*/
|
|
141
|
+
export declare class Wait extends StepComponent<StepArgsBase & {
|
|
142
|
+
duration: number;
|
|
143
|
+
of?: Query | Query[];
|
|
144
|
+
}> {
|
|
145
|
+
node(): TimelineNode;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* `<c.Perform />` — a semantic command on the timeline (§C4). It occupies
|
|
149
|
+
* an instant, positioned like any step (sequence order, `@at`, `@delay`),
|
|
150
|
+
* and carries `@action` (required), `@target` and `@payload` to the
|
|
151
|
+
* region's dispatcher (`<Choreo @onPerform>`). The fold's law: forward
|
|
152
|
+
* playback dispatches it once as the clock crosses it; a seek past it
|
|
153
|
+
* includes it; a seek before it resets the host and replays the remaining
|
|
154
|
+
* prefix. Commands are idempotent statements of state — `lightbox.open`,
|
|
155
|
+
* never `lightbox.toggle`.
|
|
156
|
+
*/
|
|
157
|
+
export declare class Perform extends StepComponent<StepArgsBase & {
|
|
158
|
+
action: string;
|
|
159
|
+
payload?: unknown;
|
|
160
|
+
target?: string;
|
|
161
|
+
}> {
|
|
162
|
+
node(): TimelineNode;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* `<c.Scroll />` — animate the sprite's scroll container so the sprite lands
|
|
166
|
+
* at `@align`; occupies the sequence like any step (§6.1).
|
|
167
|
+
*/
|
|
168
|
+
/**
|
|
169
|
+
* `<c.Attach @region @duration />` — drive another region's run over a
|
|
170
|
+
* window of this one's clock. Positioned like any step (sequence order,
|
|
171
|
+
* `@at`, `@delay`); `@in` and `@rate` map the window onto the child's own
|
|
172
|
+
* seconds; `@end` says what happens past it; `@exact` refuses a child
|
|
173
|
+
* that cannot be driven exactly (a spring, a follow).
|
|
174
|
+
*/
|
|
175
|
+
export declare class Attach extends StepComponent<StepArgsBase & {
|
|
176
|
+
duration: number;
|
|
177
|
+
end?: 'hold' | 'remove';
|
|
178
|
+
exact?: boolean;
|
|
179
|
+
in?: number;
|
|
180
|
+
rate?: number;
|
|
181
|
+
region: string;
|
|
182
|
+
}> {
|
|
183
|
+
node(): TimelineNode;
|
|
184
|
+
}
|
|
185
|
+
export declare class Scroll extends StepComponent<StepArgs & {
|
|
186
|
+
align?: 'center' | 'end' | 'start';
|
|
187
|
+
duration?: number;
|
|
188
|
+
}> {
|
|
189
|
+
node(): TimelineNode;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* `<c.Raise />` — promote the sprites to the region's elevated layer for the
|
|
193
|
+
* span of its block (or `@duration`): above every stacking context and clip
|
|
194
|
+
* in the region, with measured continuity both ways. `@shadow` casts on the
|
|
195
|
+
* layer below (§6.3).
|
|
196
|
+
*/
|
|
197
|
+
export declare class Raise extends StepComponent<StepArgs & {
|
|
198
|
+
duration?: number;
|
|
199
|
+
shadow?: boolean;
|
|
200
|
+
}> {
|
|
201
|
+
node(): TimelineNode;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* `<c.Camera />` — the region's frame as a step (§6.3): `@zoom` / `@x` /
|
|
205
|
+
* `@y` animate the scene, `@origin` aims the zoom at a sprite, `@steady`
|
|
206
|
+
* names sprites that keep their size against it (damped by default).
|
|
207
|
+
* `@fit` is the other, more common shape — dive on this sprite and CENTRE
|
|
208
|
+
* it, zoom and pan computed from rest-layout geometry (`@margin` sets the
|
|
209
|
+
* share of the frame it fills); pass `null` to fit nothing: back to rest.
|
|
210
|
+
*/
|
|
211
|
+
export declare class Camera extends StepComponent<StepArgsBase & {
|
|
212
|
+
duration?: number;
|
|
213
|
+
ease?: Easing;
|
|
214
|
+
fit?: Query | null;
|
|
215
|
+
margin?: number;
|
|
216
|
+
of?: Query | Query[];
|
|
217
|
+
origin?: Query;
|
|
218
|
+
spring?: SpringSpec;
|
|
219
|
+
steady?: Query | Query[];
|
|
220
|
+
x?: number;
|
|
221
|
+
y?: number;
|
|
222
|
+
zoom?: number;
|
|
223
|
+
}> {
|
|
224
|
+
node(): TimelineNode;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* `<c.Camera3D @yaw={{-24}} @pitch={{-6}} @dolly={{0.9}} />` — the shot,
|
|
228
|
+
* for a scene Choreo is not the one drawing.
|
|
229
|
+
*
|
|
230
|
+
* `c.Camera` moves the region's own frame, which is a 2D transform on real
|
|
231
|
+
* DOM. A 3D scene has no such frame: its camera belongs to whatever is
|
|
232
|
+
* rendering it. So this step carries the POSE and nothing else — yaw and
|
|
233
|
+
* pitch in degrees, dolly as a multiple of the host's own framing — and
|
|
234
|
+
* the region hands it to `@onCamera3D` every frame it changes. The host
|
|
235
|
+
* applies it to three.js, to a CSS 3D stage, to anything that takes three
|
|
236
|
+
* numbers.
|
|
237
|
+
*
|
|
238
|
+
* What Choreo keeps is the part it is actually good at: the pose is a pure
|
|
239
|
+
* function of the clock, so a scrub lands the shot exactly where playing
|
|
240
|
+
* there would, and a preset expands into this one seekable cue rather than
|
|
241
|
+
* a second scheduler.
|
|
242
|
+
*
|
|
243
|
+
* `@by` makes it relative — added to the pose in force when the cue
|
|
244
|
+
* starts, the way `Pan` and `SlowZoom` are relative — so a drift composes
|
|
245
|
+
* with whatever shot preceded it.
|
|
246
|
+
*/
|
|
247
|
+
export declare class Camera3D extends StepComponent<StepArgsBase & {
|
|
248
|
+
by?: boolean;
|
|
249
|
+
dolly?: number;
|
|
250
|
+
duration?: number;
|
|
251
|
+
ease?: Easing;
|
|
252
|
+
/** the orbit centre, in the host's scene units — tweened with the pose */
|
|
253
|
+
look?: {
|
|
254
|
+
x: number;
|
|
255
|
+
y: number;
|
|
256
|
+
z: number;
|
|
257
|
+
};
|
|
258
|
+
of?: Query | Query[];
|
|
259
|
+
pitch?: number;
|
|
260
|
+
/** smoothing window for a path, seconds — see Camera3DStep.settle */
|
|
261
|
+
settle?: number;
|
|
262
|
+
spring?: SpringSpec;
|
|
263
|
+
/** the path's grip, 0 lively .. 1 linear — see Camera3DStep.tension */
|
|
264
|
+
tension?: number;
|
|
265
|
+
/** waypoints for a spline path — see Camera3DStep.through */
|
|
266
|
+
through?: Camera3DWaypoint[];
|
|
267
|
+
x?: number;
|
|
268
|
+
y?: number;
|
|
269
|
+
yaw?: number;
|
|
270
|
+
}> {
|
|
271
|
+
node(): TimelineNode;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* `<c.Frame @of={{c.id 'hero'}} @padding={{0.8}} />` — fit-and-centre the
|
|
275
|
+
* target: the fit camera under its editorial name. `@padding` is the
|
|
276
|
+
* share of the frame the target fills on whichever axis fits first.
|
|
277
|
+
*/
|
|
278
|
+
export declare class Frame extends StepComponent<StepArgsBase & {
|
|
279
|
+
duration?: number;
|
|
280
|
+
ease?: Easing;
|
|
281
|
+
of: Query | null;
|
|
282
|
+
padding?: number;
|
|
283
|
+
spring?: SpringSpec;
|
|
284
|
+
steady?: Query | Query[];
|
|
285
|
+
}> {
|
|
286
|
+
node(): TimelineNode;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* `<c.Aim @of={{c.id 'hero'}} />` — recentre the picture on the target
|
|
290
|
+
* with the zoom HELD: the reframe that does not change magnification.
|
|
291
|
+
*/
|
|
292
|
+
export declare class Aim extends StepComponent<StepArgsBase & {
|
|
293
|
+
duration?: number;
|
|
294
|
+
ease?: Easing;
|
|
295
|
+
of: Query;
|
|
296
|
+
spring?: SpringSpec;
|
|
297
|
+
steady?: Query | Query[];
|
|
298
|
+
}> {
|
|
299
|
+
node(): TimelineNode;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* `<c.Pan @x={{40}} @y={{-20}} />` — shift the picture by exactly this
|
|
303
|
+
* many pixels from wherever it stands. Relative on purpose: a pan after
|
|
304
|
+
* any shot means "from here", not "to there".
|
|
305
|
+
*/
|
|
306
|
+
export declare class Pan extends StepComponent<StepArgsBase & {
|
|
307
|
+
duration?: number;
|
|
308
|
+
ease?: Easing;
|
|
309
|
+
spring?: SpringSpec;
|
|
310
|
+
steady?: Query | Query[];
|
|
311
|
+
x?: number;
|
|
312
|
+
y?: number;
|
|
313
|
+
}> {
|
|
314
|
+
node(): TimelineNode;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* `<c.SlowZoom @by={{1.05}} @duration={{2}} />` — multiply the zoom in
|
|
318
|
+
* force: the push-in (or, below 1, the pull-back) that gives a hold its
|
|
319
|
+
* life. The aim in force is kept, so it pushes toward what the previous
|
|
320
|
+
* shot was looking at.
|
|
321
|
+
*/
|
|
322
|
+
export declare class SlowZoom extends StepComponent<StepArgsBase & {
|
|
323
|
+
by: number;
|
|
324
|
+
duration?: number;
|
|
325
|
+
ease?: Easing;
|
|
326
|
+
spring?: SpringSpec;
|
|
327
|
+
steady?: Query | Query[];
|
|
328
|
+
}> {
|
|
329
|
+
node(): TimelineNode;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* `<c.Tether />` — geometry continuously derived from sprites (§6.1):
|
|
333
|
+
* `@path` receives both endpoints' region-relative boxes every frame and
|
|
334
|
+
* returns the path data the wire draws.
|
|
335
|
+
*/
|
|
336
|
+
export declare class Tether extends StepComponent<StepArgsBase & {
|
|
337
|
+
duration?: number;
|
|
338
|
+
from: Query;
|
|
339
|
+
of?: Query | Query[];
|
|
340
|
+
path: (from: Rect, to: Rect) => string;
|
|
341
|
+
to: Query;
|
|
342
|
+
}> {
|
|
343
|
+
node(): TimelineNode;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* `<c.Crossing />` — the canned scene crossing (§4.7): what only the old
|
|
347
|
+
* scene had fades as the flight lifts off, everything paired flies (skins
|
|
348
|
+
* swapping per `@swap`), and what only the new scene has fades in near the
|
|
349
|
+
* settle. One step in the template; a whole overlapped score on the clock —
|
|
350
|
+
* Keynote's Magic Move does not wait for the dissolve to finish before the
|
|
351
|
+
* movers leave, and a crossing that does reads as three acts, not one.
|
|
352
|
+
*
|
|
353
|
+
* It is also the reference COMPOSITE step, and deliberately written in
|
|
354
|
+
* nothing but the public seam (`StepComponent`, `toMs`, `at`, and node
|
|
355
|
+
* literals): if this needed a privilege an author could not have, the
|
|
356
|
+
* contract on `StepComponent` would be a lie.
|
|
357
|
+
*/
|
|
358
|
+
export declare class Crossing extends StepComponent<StepArgsBase & {
|
|
359
|
+
/** seconds to fade what only the new scene has */
|
|
360
|
+
arrive?: number;
|
|
361
|
+
/** the tween form of the flight */
|
|
362
|
+
duration?: number;
|
|
363
|
+
ease?: Easing;
|
|
364
|
+
/** seconds to fade what only the old scene had */
|
|
365
|
+
leave?: number;
|
|
366
|
+
/** arrivals start at this fraction of the flight — near the settle */
|
|
367
|
+
overlap?: number;
|
|
368
|
+
/**
|
|
369
|
+
* The flight's size mode. Default `'crop'` — uniform scale from
|
|
370
|
+
* width, tops pinned, extra height clipped. `'scale'` stretches
|
|
371
|
+
* per-axis; `true` writes layout width/height (reflows a grid row).
|
|
372
|
+
*/
|
|
373
|
+
size?: boolean | 'crop' | 'scale';
|
|
374
|
+
spring?: SpringSpec;
|
|
375
|
+
/** the counterpart-skin policy, forwarded to the flight */
|
|
376
|
+
swap?: 'during' | 'none' | 'settle';
|
|
377
|
+
}> {
|
|
378
|
+
/**
|
|
379
|
+
* The flight is addressable from outside — `{{at 'page:flight' 0.5}}`
|
|
380
|
+
* for a step that wants to ride the move itself. Derived from this
|
|
381
|
+
* crossing's own `@name` rather than fixed, so two crossings in one
|
|
382
|
+
* timeline do not collide over it; unnamed, it takes a per-instance
|
|
383
|
+
* number, which is stable for the life of the component and so does not
|
|
384
|
+
* disturb the tree fingerprint between passes.
|
|
385
|
+
*/
|
|
386
|
+
private flightName;
|
|
387
|
+
node(): TimelineNode;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* `<c.Follow />` — a value DERIVED from the scene rather than interpolated
|
|
391
|
+
* between two keyframes (§4.10). `@to` names what to read; `@read` gets
|
|
392
|
+
* the pass's measurements every frame — each source's resting boxes
|
|
393
|
+
* (`from`, `to`) and its composed position this frame (`now`), plus the
|
|
394
|
+
* follower's own `rest` — and returns the properties to write; `@rest`
|
|
395
|
+
* says what those properties are when nothing is driving them, so a
|
|
396
|
+
* measure pass can put the element back.
|
|
397
|
+
*
|
|
398
|
+
* ```gts
|
|
399
|
+
* <c.Follow @of={{c.id 'badge'}} @to={{c.id 'card'}}
|
|
400
|
+
* @read={{corner}} @rest={{hash x=0 y=0}} />
|
|
401
|
+
* ```
|
|
402
|
+
*
|
|
403
|
+
* `@read` never sees the live page. Everything it is handed was measured
|
|
404
|
+
* by the pass or composed from the run's own values, so it cannot read
|
|
405
|
+
* back what it wrote last frame and it cannot force a style recalculation
|
|
406
|
+
* mid-move — pure by construction, and correct under interruption because
|
|
407
|
+
* a replacement pass re-measures (docs/postmortem-follow.md).
|
|
408
|
+
*
|
|
409
|
+
* Three things it is not: it is not accelerated (a derived value is
|
|
410
|
+
* computed on the main thread, every frame — the price, and the same one
|
|
411
|
+
* `c.Tether` pays); it may not write layout, only transform, opacity and
|
|
412
|
+
* filter; and `@read` must still be a pure function of its context,
|
|
413
|
+
* because the run is scrubbable in both directions and a value with
|
|
414
|
+
* memory could not be sought back to.
|
|
415
|
+
*/
|
|
416
|
+
export declare class Follow extends StepComponent<StepArgs & {
|
|
417
|
+
duration?: number;
|
|
418
|
+
read: (ctx: DeriveContext) => Record<string, PropValue>;
|
|
419
|
+
rest: Record<string, PropValue>;
|
|
420
|
+
to: Query | Query[];
|
|
421
|
+
}> {
|
|
422
|
+
node(): TimelineNode;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* `<c.Gate />` — park the run until `c.advance()`; `@delay` opens it by
|
|
426
|
+
* itself after that many seconds (§4.1). A gate is a pause, and a pause is
|
|
427
|
+
* a total order: it may only stand in a sequence that no parallel contains.
|
|
428
|
+
*/
|
|
429
|
+
export declare class Gate extends Component<{
|
|
430
|
+
Args: {
|
|
431
|
+
delay?: number;
|
|
432
|
+
};
|
|
433
|
+
}> {
|
|
434
|
+
node(): TimelineNode;
|
|
435
|
+
mark: import("ember-modifier").FunctionBasedModifier<{
|
|
436
|
+
Args: {
|
|
437
|
+
Positional: unknown[];
|
|
438
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
439
|
+
};
|
|
440
|
+
Element: Element;
|
|
441
|
+
}>;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* A block is a step's equal to the anchor system: it takes `@name`, `@at`
|
|
445
|
+
* and `@delay` on the same terms, so a composite step — a `node()` that
|
|
446
|
+
* returns a block — is something the rest of the score can point at.
|
|
447
|
+
*/
|
|
448
|
+
declare abstract class BlockComponent extends Component<{
|
|
449
|
+
Args: {
|
|
450
|
+
/** `{{at 'name' 0.4}}` / `{{after 'name'}}` — start against a named step or block */
|
|
451
|
+
at?: AnchorRef;
|
|
452
|
+
/** seconds before the block's contents start, inside its slot */
|
|
453
|
+
delay?: number;
|
|
454
|
+
/** a label other steps may anchor against; the block's span is its contents */
|
|
455
|
+
name?: string;
|
|
456
|
+
};
|
|
457
|
+
Blocks: {
|
|
458
|
+
default: [];
|
|
459
|
+
};
|
|
460
|
+
}> {
|
|
461
|
+
abstract readonly kind: Block['kind'];
|
|
462
|
+
private el?;
|
|
463
|
+
node(): Block;
|
|
464
|
+
mark: import("ember-modifier").FunctionBasedModifier<{
|
|
465
|
+
Args: {
|
|
466
|
+
Positional: unknown[];
|
|
467
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
468
|
+
};
|
|
469
|
+
Element: Element;
|
|
470
|
+
}>;
|
|
471
|
+
}
|
|
472
|
+
export declare class Sequence extends BlockComponent {
|
|
473
|
+
readonly kind = "sequence";
|
|
474
|
+
}
|
|
475
|
+
export declare class Parallel extends BlockComponent {
|
|
476
|
+
readonly kind = "parallel";
|
|
477
|
+
}
|
|
478
|
+
export {};
|
|
479
|
+
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../src/steps.gts"],"names":[],"mappings":"AAs9BA;;;;;GAKG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,KAAK,SAAS,EAAM,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;A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AC;IACxD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAChC,EAAE,EAAE,KAAK,GAAG,KAAK,EAAE,CAAC;CACrB,CACF;IACC,IAAI,IAAI,YAAY;CAerB;AAED;;;;GAIG;AACH,qBAAa,IAAK,SAAQ,SAAS,CAAC;IAClC,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1B,CAAC;IACA,IAAI,IAAI,YAAY;IAGpB,IAAI;;;;;;OAGD;CAeJ;AAED;;;;GAIG;AACH,uBAAe,cAAe,SAAQ,SAAS,CAAC;IAC9C,IAAI,EAAE;QACJ,qFAAqF;QACrF,EAAE,CAAC,EAAE,SAAS,CAAC;QACf,iEAAiE;QACjE,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,+EAA+E;QAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAC;CACzB,CAAC;IACA,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,CAAC,CAAU;IACrB,IAAI,IAAI,KAAK;IASb,IAAI;;;;;;OAOD;CAgBJ;AAED,qBAAa,QAAS,SAAQ,cAAc;IAC1C,QAAQ,CAAC,IAAI,cAAc;CAC5B;AACD,qBAAa,QAAS,SAAQ,cAAc;IAC1C,QAAQ,CAAC,IAAI,cAAc;CAC5B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { setupMotion } from 'glimmer-motion/test-support';
|
|
2
|
+
/** `setupMotion(hooks)`, with Choreo's resets among the ones it runs */
|
|
3
|
+
export declare function setupChoreo(hooks: Parameters<typeof setupMotion>[0]): void;
|
|
4
|
+
/** open every parked gate and settle the segment it releases */
|
|
5
|
+
export declare function advanceGate(): Promise<void>;
|
|
6
|
+
/** set every live run's clock, in seconds — a scrubbed still */
|
|
7
|
+
export declare function seekTo(seconds: number): Promise<void>;
|
|
8
|
+
/** how many leavers are parked in a <Choreo> orphan layer right now */
|
|
9
|
+
export declare function orphanCount(root?: HTMLElement): number;
|
|
10
|
+
/**
|
|
11
|
+
* The first LIVE match for `selector` — the copy that is still part of the
|
|
12
|
+
* rendered tree, never a leaver parked in a region's orphan layer.
|
|
13
|
+
*
|
|
14
|
+
* Mid-crossing an identity exists twice: the arriving element in the live
|
|
15
|
+
* tree, and the departing skin the region locked into `[data-choreo-orphans]`
|
|
16
|
+
* so it can be flown and faded. That layer is the region's FIRST child, so a
|
|
17
|
+
* bare `querySelector` answers with the ghost — an element whose component
|
|
18
|
+
* has already been torn down, whose listeners are gone, and whose box is
|
|
19
|
+
* where the OLD scene stood. Clicking it does nothing; measuring it measures
|
|
20
|
+
* the past. Neither failure names itself.
|
|
21
|
+
*
|
|
22
|
+
* So any assertion or interaction a test performs while a crossing may be
|
|
23
|
+
* aloft should come through here. A raised sprite (`c.Raise`) is deliberately
|
|
24
|
+
* still live: it is the real element on a different layer, not a copy.
|
|
25
|
+
*/
|
|
26
|
+
export declare function live<E extends Element = HTMLElement>(selector: string, root?: ParentNode): E | null;
|
|
27
|
+
/** every live match for `selector`, in document order — see `live()` */
|
|
28
|
+
export declare function liveAll<E extends Element = HTMLElement>(selector: string, root?: ParentNode): E[];
|
|
29
|
+
export declare function strandedTransforms(root?: HTMLElement): string[];
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AA8BA,OAAO,EAGL,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAiBrC,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,QAEnE;AAID,gEAAgE;AAChE,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAOjD;AAED,gEAAgE;AAChE,wBAAsB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3D;AAOD,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,IAAI,GAAE,WAAwB,GAAG,MAAM,CAKlE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,EAClD,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,UAAuB,GAC5B,CAAC,GAAG,IAAI,CAEV;AAED,wEAAwE;AACxE,wBAAgB,OAAO,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,EACrD,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,UAAuB,GAC5B,CAAC,EAAE,CAIL;AAYD,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,WAAwB,GAAG,MAAM,EAAE,CAkB3E"}
|