@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.
Files changed (165) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +21 -0
  3. package/README.md +55 -6
  4. package/addon-main.cjs +4 -0
  5. package/declarations/anchors.d.ts +26 -0
  6. package/declarations/anchors.d.ts.map +1 -0
  7. package/declarations/arming.d.ts +33 -0
  8. package/declarations/arming.d.ts.map +1 -0
  9. package/declarations/beacon.d.ts +9 -0
  10. package/declarations/beacon.d.ts.map +1 -0
  11. package/declarations/beacons.d.ts +23 -0
  12. package/declarations/beacons.d.ts.map +1 -0
  13. package/declarations/changeset.d.ts +46 -0
  14. package/declarations/changeset.d.ts.map +1 -0
  15. package/declarations/choreo.d.ts +261 -0
  16. package/declarations/choreo.d.ts.map +1 -0
  17. package/declarations/compile.d.ts +45 -0
  18. package/declarations/compile.d.ts.map +1 -0
  19. package/declarations/deliver.d.ts +44 -0
  20. package/declarations/deliver.d.ts.map +1 -0
  21. package/declarations/easings.d.ts +20 -0
  22. package/declarations/easings.d.ts.map +1 -0
  23. package/declarations/far.d.ts +33 -0
  24. package/declarations/far.d.ts.map +1 -0
  25. package/declarations/film/clip.d.ts +51 -0
  26. package/declarations/film/clip.d.ts.map +1 -0
  27. package/declarations/film/clips.d.ts +155 -0
  28. package/declarations/film/clips.d.ts.map +1 -0
  29. package/declarations/film/film.d.ts +1208 -0
  30. package/declarations/film/film.d.ts.map +1 -0
  31. package/declarations/film/graph/adjust.d.ts +112 -0
  32. package/declarations/film/graph/adjust.d.ts.map +1 -0
  33. package/declarations/film/graph/compile.d.ts +140 -0
  34. package/declarations/film/graph/compile.d.ts.map +1 -0
  35. package/declarations/film/graph/host.d.ts +67 -0
  36. package/declarations/film/graph/host.d.ts.map +1 -0
  37. package/declarations/film/graph/nodes.d.ts +287 -0
  38. package/declarations/film/graph/nodes.d.ts.map +1 -0
  39. package/declarations/film/index.d.ts +24 -0
  40. package/declarations/film/index.d.ts.map +1 -0
  41. package/declarations/film/joins.d.ts +143 -0
  42. package/declarations/film/joins.d.ts.map +1 -0
  43. package/declarations/film/math.d.ts +15 -0
  44. package/declarations/film/math.d.ts.map +1 -0
  45. package/declarations/film/overlays.d.ts +54 -0
  46. package/declarations/film/overlays.d.ts.map +1 -0
  47. package/declarations/film/picture.d.ts +104 -0
  48. package/declarations/film/picture.d.ts.map +1 -0
  49. package/declarations/film/plate.d.ts +37 -0
  50. package/declarations/film/plate.d.ts.map +1 -0
  51. package/declarations/film/player.d.ts +120 -0
  52. package/declarations/film/player.d.ts.map +1 -0
  53. package/declarations/film/rail.d.ts +40 -0
  54. package/declarations/film/rail.d.ts.map +1 -0
  55. package/declarations/film/schedule.d.ts +93 -0
  56. package/declarations/film/schedule.d.ts.map +1 -0
  57. package/declarations/film/seam.d.ts +38 -0
  58. package/declarations/film/seam.d.ts.map +1 -0
  59. package/declarations/film/titles.d.ts +37 -0
  60. package/declarations/film/titles.d.ts.map +1 -0
  61. package/declarations/film/types.d.ts +544 -0
  62. package/declarations/film/types.d.ts.map +1 -0
  63. package/declarations/film.d.ts +3 -0
  64. package/declarations/film.d.ts.map +1 -0
  65. package/declarations/gesture.d.ts +33 -0
  66. package/declarations/gesture.d.ts.map +1 -0
  67. package/declarations/index.d.ts +26 -0
  68. package/declarations/index.d.ts.map +1 -0
  69. package/declarations/measure.d.ts +29 -0
  70. package/declarations/measure.d.ts.map +1 -0
  71. package/declarations/path.d.ts +73 -0
  72. package/declarations/path.d.ts.map +1 -0
  73. package/declarations/registry.d.ts +46 -0
  74. package/declarations/registry.d.ts.map +1 -0
  75. package/declarations/run.d.ts +406 -0
  76. package/declarations/run.d.ts.map +1 -0
  77. package/declarations/space.d.ts +31 -0
  78. package/declarations/space.d.ts.map +1 -0
  79. package/declarations/steps.d.ts +479 -0
  80. package/declarations/steps.d.ts.map +1 -0
  81. package/declarations/test-support/index.d.ts +30 -0
  82. package/declarations/test-support/index.d.ts.map +1 -0
  83. package/declarations/types.d.ts +761 -0
  84. package/declarations/types.d.ts.map +1 -0
  85. package/dist/anchors.js +34 -0
  86. package/dist/anchors.js.map +1 -0
  87. package/dist/arming.js +120 -0
  88. package/dist/arming.js.map +1 -0
  89. package/dist/beacon.js +25 -0
  90. package/dist/beacon.js.map +1 -0
  91. package/dist/beacons.js +77 -0
  92. package/dist/beacons.js.map +1 -0
  93. package/dist/changeset.js +129 -0
  94. package/dist/changeset.js.map +1 -0
  95. package/dist/choreo.js +1026 -0
  96. package/dist/choreo.js.map +1 -0
  97. package/dist/compile.js +1403 -0
  98. package/dist/compile.js.map +1 -0
  99. package/dist/deliver.js +326 -0
  100. package/dist/deliver.js.map +1 -0
  101. package/dist/easings.js +39 -0
  102. package/dist/easings.js.map +1 -0
  103. package/dist/far.js +147 -0
  104. package/dist/far.js.map +1 -0
  105. package/dist/film/clip.js +100 -0
  106. package/dist/film/clip.js.map +1 -0
  107. package/dist/film/clips.js +147 -0
  108. package/dist/film/clips.js.map +1 -0
  109. package/dist/film/film.js +4424 -0
  110. package/dist/film/film.js.map +1 -0
  111. package/dist/film/graph/adjust.js +160 -0
  112. package/dist/film/graph/adjust.js.map +1 -0
  113. package/dist/film/graph/compile.js +225 -0
  114. package/dist/film/graph/compile.js.map +1 -0
  115. package/dist/film/graph/host.js +77 -0
  116. package/dist/film/graph/host.js.map +1 -0
  117. package/dist/film/graph/nodes.js +500 -0
  118. package/dist/film/graph/nodes.js.map +1 -0
  119. package/dist/film/index.js +18 -0
  120. package/dist/film/index.js.map +1 -0
  121. package/dist/film/joins.js +260 -0
  122. package/dist/film/joins.js.map +1 -0
  123. package/dist/film/math.js +49 -0
  124. package/dist/film/math.js.map +1 -0
  125. package/dist/film/overlays.js +66 -0
  126. package/dist/film/overlays.js.map +1 -0
  127. package/dist/film/picture.js +58 -0
  128. package/dist/film/picture.js.map +1 -0
  129. package/dist/film/plate.js +36 -0
  130. package/dist/film/plate.js.map +1 -0
  131. package/dist/film/player.js +79 -0
  132. package/dist/film/player.js.map +1 -0
  133. package/dist/film/rail.js +38 -0
  134. package/dist/film/rail.js.map +1 -0
  135. package/dist/film/schedule.js +238 -0
  136. package/dist/film/schedule.js.map +1 -0
  137. package/dist/film/seam.js +64 -0
  138. package/dist/film/seam.js.map +1 -0
  139. package/dist/film/titles.js +45 -0
  140. package/dist/film/titles.js.map +1 -0
  141. package/dist/film/types.js +2 -0
  142. package/dist/film/types.js.map +1 -0
  143. package/dist/film.js +18 -0
  144. package/dist/film.js.map +1 -0
  145. package/dist/gesture.js +111 -0
  146. package/dist/gesture.js.map +1 -0
  147. package/dist/index.js +9 -0
  148. package/dist/index.js.map +1 -0
  149. package/dist/measure.js +99 -0
  150. package/dist/measure.js.map +1 -0
  151. package/dist/path.js +272 -0
  152. package/dist/path.js.map +1 -0
  153. package/dist/registry.js +55 -0
  154. package/dist/registry.js.map +1 -0
  155. package/dist/run.js +2423 -0
  156. package/dist/run.js.map +1 -0
  157. package/dist/space.js +57 -0
  158. package/dist/space.js.map +1 -0
  159. package/dist/steps.js +831 -0
  160. package/dist/steps.js.map +1 -0
  161. package/dist/test-support/index.js +150 -0
  162. package/dist/test-support/index.js.map +1 -0
  163. package/dist/types.js +2 -0
  164. package/dist/types.js.map +1 -0
  165. package/package.json +202 -6
@@ -0,0 +1,544 @@
1
+ /**
2
+ * THE FILM VOCABULARY — what a shot list is made of, and what a picture
3
+ * has to offer before a score can cut it.
4
+ *
5
+ * Two hand-built films (Towers, Sagrada) share these one for one; the
6
+ * types are lifted from them rather than designed, which is the only
7
+ * honest way a construct gets its shape. See notes/film-construct.md.
8
+ */
9
+ import type { FunctionBasedModifier } from 'ember-modifier';
10
+ import type { ClipSpec } from './clips.ts';
11
+ export type Pt3 = [number, number, number];
12
+ /** a film's handle on one of its own elements, passed to a sub-component */
13
+ /**
14
+ * A HANDLE THE FILM PUTS ON AN ELEMENT SOMEBODY ELSE RENDERS. The
15
+ * positionals are the caller's: a clip passes its lane, because the film
16
+ * keeps one handle per lane and the element cannot say which it is.
17
+ */
18
+ export type ElementModifier<E extends Element = HTMLElement, P extends unknown[] = unknown[]> = FunctionBasedModifier<{
19
+ Args: {
20
+ Named: object;
21
+ Positional: P;
22
+ };
23
+ Element: E;
24
+ }>;
25
+ /** the pose the film speaks in — an orbit rig with a focus on the ground */
26
+ export interface Cam {
27
+ /** magnification: 1 fits the whole subject, bigger is tighter */
28
+ dolly: number;
29
+ /** where on the ground the lens aims, world units; 0,0 is the subject's axis */
30
+ fx?: number;
31
+ fz?: number;
32
+ /** how far up the building the lens aims, world units from the rig's mid-height */
33
+ lookY: number;
34
+ /** the frame's off-centre, in fractions of the frame */
35
+ ox?: number;
36
+ /** elevation, degrees */
37
+ pitch: number;
38
+ /** the orbit's azimuth, degrees */
39
+ yaw: number;
40
+ }
41
+ export type Join = 'blend' | 'blur' | 'cut' | 'defocus' | 'dip' | 'flash' | 'iris' | 'luma' | 'melt' | 'sweep' | 'whip' | 'wipe';
42
+ /** a seam by name: one of the film's twelve, or one a score brought as a presentation */
43
+ export type JoinName = Join | (string & {});
44
+ /**
45
+ * HOW DEEP A SEAM GOES.
46
+ *
47
+ * `picture` is what every seam did until now: the transition happens to
48
+ * the picture and to nothing else, so the incoming shot's type, insert
49
+ * and clip have to wait for the seam to finish before they may enter —
50
+ * otherwise a caption for the new setting is read over a still of the old
51
+ * one. `everything` puts the seam ABOVE that furniture instead: the still
52
+ * covers the whole frame, the incoming shot plays under it WITH its type
53
+ * already running, and the sweep reveals a setting that is under way
54
+ * rather than one that starts when the sweep is over.
55
+ *
56
+ * It costs a frame read-back on the three seams the picture would
57
+ * otherwise dissolve in its own glass (`blend`, `melt`, `dip`): glass is
58
+ * inside the canvas and cannot cover anything outside it, so a seam that
59
+ * covers the furniture is always a seam with a still in the DOM.
60
+ */
61
+ export type Over = 'everything' | 'picture';
62
+ /**
63
+ * WHAT A PICTURE IS TOLD ABOUT A SEAM, every frame.
64
+ *
65
+ * Two ways to read it. Without a `name` the picture runs its own law:
66
+ * `mix` of the held frame over the live one, `veil` of `color` over both.
67
+ * With a `name` the picture runs the seam it DECLARED under that name
68
+ * (`PictureSpec.seams`) and reads `p`, its progress — plus whatever
69
+ * `params` that seam takes. The held frame and the live one are the two
70
+ * textures such a seam mixes, which is the contract every shader
71
+ * transition in the wild already has.
72
+ */
73
+ export interface SeamSpec {
74
+ /** the colour the film's own veil passes through */
75
+ color?: string;
76
+ /** the held frame over the live one, 0..1 (the picture's own law) */
77
+ mix: number;
78
+ /** a seam the picture declared; absent, and the picture runs its own law */
79
+ name?: string;
80
+ /** the seam's progress, 0..1 — what a named seam is driven by */
81
+ p: number;
82
+ /** whatever the named seam takes, by its own names */
83
+ params?: Record<string, number>;
84
+ /** the colour over both, 0..1 (the picture's own law) */
85
+ veil: number;
86
+ }
87
+ export type PlateMode = 'clear' | 'lower' | 'plate' | 'point' | 'title';
88
+ /**
89
+ * ONE BEAT IS ONE SHOT. The shot list is data: an agent edits a film by
90
+ * editing this table, and every field is a fact about the shot rather
91
+ * than a keyframe. The one-task behaviours (walk-then-tilt, the follow
92
+ * rule, the trace gate) read their handles from here.
93
+ */
94
+ export interface Beat {
95
+ /** no scrim behind the type: the block sits on the picture bare */
96
+ bare?: boolean;
97
+ /** degrees of vertical sway laid over the shot — a drone breathing */
98
+ bob?: number;
99
+ /** the construction clock (page seconds): one number holds it, a pair runs it */
100
+ build?: [number, number] | number;
101
+ /** the fraction of the beat by which a ranged build is FINISHED (default 1) */
102
+ buildBy?: number;
103
+ /** the pose crossed at the head of this beat */
104
+ cam: Cam;
105
+ /** the chapter this belongs to */
106
+ ch: number;
107
+ /** the surroundings: frosted glass (the default), solid, or gone */
108
+ city?: 'glass' | 'off' | 'on';
109
+ /** a video, a still or a freeze of the picture, over the frame for a window on the film's clock */
110
+ /** the clips this beat puts on screen, one per lane (`ClipSpec.lane`) */
111
+ clips?: ClipSpec[];
112
+ /** CUT to this pose rather than travel to it */
113
+ cut?: boolean;
114
+ /**
115
+ * THE LINEUP: cycle through subjects inside one held shot, a stamp over
116
+ * each. `style` picks a subject by index, `year` sets the clock through
117
+ * the film's own clock; a step with neither shows the standing subject.
118
+ */
119
+ cycle?: {
120
+ kanji: string;
121
+ style?: number;
122
+ year?: number;
123
+ }[];
124
+ /** the colour a 'dip' passes through */
125
+ dipTo?: string;
126
+ /** the model leaves by fading, not by sinking */
127
+ dissolve?: boolean;
128
+ /** a ground-level eye with a wide lens: standing at `at`, walking to `to` */
129
+ eye?: {
130
+ at: Pt3;
131
+ fov: number;
132
+ to?: Pt3;
133
+ };
134
+ /** while a part is rising, aim at its top and cap the zoom; a name follows that campaign */
135
+ follow?: false | string;
136
+ /** the English of the word, set small under it */
137
+ gloss?: string;
138
+ /** the mood, by name; overrides the chapter's */
139
+ grade?: string;
140
+ /** the field at the edge of the grid */
141
+ grass?: boolean;
142
+ /** how thick the air is, 0 the hour's own and 1 as heavy as it goes */
143
+ haze?: number;
144
+ /** aim: true holds the subject's mid-height, 'top' holds the cut line */
145
+ hold?: boolean | 'top';
146
+ /** times of day to walk across the beat, evenly */
147
+ hours?: number[];
148
+ /** the share of the beat the hours walk across (default 1): with 0.7
149
+ * the last hour arrives at 70% and holds for the rest */
150
+ hoursOver?: number;
151
+ /** a designed silence: the boundary fades whatever is still speaking */
152
+ hush?: boolean;
153
+ id: string;
154
+ join?: JoinName;
155
+ /** the key term — a word in any script */
156
+ kanji?: string;
157
+ /** the eyebrow */
158
+ kicker?: string;
159
+ /** ticks spent arriving, before this beat's own first waypoint */
160
+ lead?: number;
161
+ /** the fraction of the beat spent walking before the head goes back */
162
+ lift?: number;
163
+ /** a bolt, this many seconds into the beat */
164
+ lightning?: number;
165
+ /** a named look, when the chapter's is not wanted */
166
+ look?: string;
167
+ /** the stock: a look the page bakes, a .cube under `assets/luts/`, or null for none */
168
+ lut?: null | string;
169
+ /** a label that stands in the scene at the height it names */
170
+ mark?: {
171
+ at?: number;
172
+ bearing: number;
173
+ hold?: number;
174
+ lines: string[];
175
+ r: number;
176
+ size: number;
177
+ to: number;
178
+ };
179
+ /** trims on the page's buses for this beat (0..1) */
180
+ mix?: {
181
+ music?: number;
182
+ sfx?: number;
183
+ voice?: number;
184
+ wx?: number;
185
+ };
186
+ /** how the front layer is set */
187
+ mode: PlateMode;
188
+ /** how deep this beat's seam goes: over the picture alone, or over the furniture too */
189
+ over?: Over;
190
+ /** a photograph cut in beside the model; `src` resolves under `assets` */
191
+ photo?: {
192
+ caption: string;
193
+ credit: string;
194
+ src: string;
195
+ };
196
+ /** pin the page's pixel ratio for this beat */
197
+ quality?: number;
198
+ /** how hard it rains, over and above the weather preset */
199
+ rain?: number;
200
+ /** a backlight, standing opposite the lens */
201
+ rim?: number;
202
+ /** the word's reading */
203
+ romaji?: string;
204
+ /** up to four short phrases, delivered across the beat against the read */
205
+ says?: string[];
206
+ /** seconds of stillness before a build clock starts moving */
207
+ settle?: number;
208
+ /** type standing out in the world, behind the subject */
209
+ sky?: {
210
+ az?: number;
211
+ dist?: number;
212
+ lines: string[];
213
+ opacity?: number;
214
+ size: number;
215
+ track?: number;
216
+ y: number;
217
+ };
218
+ /** the year the voice says, written enormous in the scene at `at` of the read */
219
+ stamp?: {
220
+ at?: number;
221
+ y: number;
222
+ };
223
+ /** which subject stands here, for a scene with several */
224
+ style?: number;
225
+ /** where the sun is for this shot, degrees */
226
+ sun?: {
227
+ az: number;
228
+ el: number;
229
+ };
230
+ /** time of day: 0 morning, 1 noon, 2 sunset, 3 night */
231
+ theme?: number;
232
+ /** how long it runs, in TICKS */
233
+ ticks: number;
234
+ /** a point on the subject this beat is naming, world units */
235
+ to?: Pt3;
236
+ /** the pose at its tail; without one the shot holds */
237
+ toCam?: Cam;
238
+ /** lines drawn ON the subject, in world coordinates */
239
+ trace?: {
240
+ pts: Pt3[];
241
+ wide?: boolean;
242
+ }[];
243
+ /** the voice-over — the script, read and not drawn */
244
+ vo?: string;
245
+ /** settled snow and a pinned blizzard; null clears */
246
+ winter?: null | {
247
+ gust: number;
248
+ pack: number;
249
+ };
250
+ /** weather: 0 clear, 1 rain, 2 storm, 3 snow */
251
+ wx?: number;
252
+ /** the weather changes at the beat's head even on a flight (no thaw) */
253
+ wxCut?: boolean;
254
+ }
255
+ export interface Chapter {
256
+ /** the mood the chapter's shots wear unless a beat says otherwise */
257
+ grade?: string;
258
+ /** the stock the chapter's shots wear unless a beat says otherwise */
259
+ lut?: string;
260
+ /** the chapter's numeral, as the film writes it */
261
+ n: string;
262
+ /** the chapter's accent on a light frame, and on a dark one */
263
+ tint?: string;
264
+ tintD?: string;
265
+ title: string;
266
+ }
267
+ /** a mood, as numbers the glass can take */
268
+ export interface FilmGrade {
269
+ bri: number;
270
+ con: number;
271
+ cool: [number, number, number];
272
+ gradeA: number;
273
+ hue: number;
274
+ rake?: number;
275
+ sat: number;
276
+ sep: number;
277
+ vigA: number;
278
+ warm: [number, number, number];
279
+ }
280
+ /** how a named look is worn: its strength and the artefacts around it */
281
+ export interface LookFx {
282
+ amount: number;
283
+ ca?: number;
284
+ grain?: number;
285
+ lift?: number;
286
+ tone?: number;
287
+ vig?: number;
288
+ }
289
+ /**
290
+ * THE FILM'S OWN CLOCK, when the picture has one (years, for a building
291
+ * that took a century). `tAt` maps the film's unit to page seconds and
292
+ * `yearAt` back; `span` is the ends of the rule the timeline draws.
293
+ */
294
+ export interface FilmClock {
295
+ span: [number, number];
296
+ tAt: (unit: number) => number;
297
+ yearAt: (t: number) => number;
298
+ }
299
+ /**
300
+ * THE PICTURE — what draws the frame. A separate WebGL page in an iframe
301
+ * for both reference films, addressed through about a hundred plain
302
+ * calls; nothing in the construct knows what is behind this interface,
303
+ * and a third film may put a three.js scene or a video here.
304
+ *
305
+ * Required members are the ones every picture must offer for the score
306
+ * to cut it; the rest are honoured when present.
307
+ */
308
+ export interface Picture {
309
+ city?(mode: string, alpha?: number): void;
310
+ clearTrace(id: string): void;
311
+ /**
312
+ * A CLOUD CROSSING THE FRAME, in the picture's own glass (optional).
313
+ * `k` is 0..1 and `rakeDeg` the sun's rake, the same two numbers the
314
+ * film used to write to `--cf-cloud` and `--cf-rake` for a CSS plate
315
+ * over the canvas. A picture that takes it gets the cloud into the
316
+ * post pass, which is the only way a seam can dissolve it: the film
317
+ * stops drawing its own.
318
+ */
319
+ cloud?(k: number, rakeDeg: number): void;
320
+ /**
321
+ * THE DIM, in the picture's own glass (optional). `k` is 0..1: the wash
322
+ * a lecturer puts on the plate when the annotation goes up. It belongs
323
+ * with the wash and the cloud rather than with the type, because it is
324
+ * a grade ON the picture — and a seam that covers the furniture would
325
+ * otherwise sweep an UNDIMMED still over a dimmed frame.
326
+ */
327
+ dim?(k: number): void;
328
+ /** the freeze-blend done in the glass; false when the page cannot */
329
+ dissolve(kind: 'blend' | 'dip' | 'melt', ms?: number, live?: boolean): boolean;
330
+ duck(v: number): void;
331
+ dur: number;
332
+ fade(id: string, opacity: number): void;
333
+ /**
334
+ * HOLD THE FRAME THAT IS ON SCREEN, in the picture's own glass
335
+ * (optional). `freeze(true)` copies the last drawn frame and shows it
336
+ * until `freeze(false)`.
337
+ *
338
+ * The film needs this for a few milliseconds at every seam with a
339
+ * still. The still is a JPEG the browser has not decoded yet, so the
340
+ * cut waits for it (`film/seam.ts`) — but the BEAT does not: the hour,
341
+ * the build clock, the model and the weather all land the instant the
342
+ * beat does, and for those two or three frames the canvas showed the
343
+ * incoming world naked, before the seam had anything over it. Pinning
344
+ * the outgoing frame in the glass costs nothing and closes the window.
345
+ */
346
+ freeze?(on: boolean): void;
347
+ grade(g: FilmGrade, instant?: boolean): void;
348
+ grass?(on: boolean): void;
349
+ haze(v: null | number): void;
350
+ height(): number;
351
+ /** hold the page's own clock: weather, grass, build, lens — the picture stands */
352
+ hold?(v: boolean): void;
353
+ idle(v: boolean): void;
354
+ light(p: null | {
355
+ az?: number;
356
+ el?: number;
357
+ }): void;
358
+ lightning(): void;
359
+ looks?(): string[];
360
+ lut?(spec: null | {
361
+ amount?: number;
362
+ ca?: number;
363
+ grain?: number;
364
+ lift?: number;
365
+ look?: string;
366
+ tone?: number;
367
+ url?: string;
368
+ vig?: number;
369
+ }, instant?: boolean): void;
370
+ mix(m: null | {
371
+ music?: number;
372
+ sfx?: number;
373
+ voice?: number;
374
+ wx?: number;
375
+ }): void;
376
+ modelFade(k: number | null): void;
377
+ outro?(ms?: number): void;
378
+ palette(): {
379
+ accent: string;
380
+ ink: string;
381
+ ink2: string;
382
+ ink3: string;
383
+ paper: string;
384
+ rule: string;
385
+ time: string;
386
+ };
387
+ pause(v: boolean): void;
388
+ perf?(): {
389
+ cap: number;
390
+ dpr: number;
391
+ frameMs: number;
392
+ pinned: null | number;
393
+ };
394
+ ping(i: number): void;
395
+ plan?(mode: string): void;
396
+ pose(p: {
397
+ az?: number;
398
+ el?: number;
399
+ fov?: null | number;
400
+ fx?: number;
401
+ fz?: number;
402
+ lookY?: number;
403
+ near?: null | Pt3;
404
+ ox?: number;
405
+ oy?: number;
406
+ snap?: boolean;
407
+ zoom?: number;
408
+ }): void;
409
+ project(x: number, y: number, z: number): {
410
+ on: boolean;
411
+ x: number;
412
+ y: number;
413
+ z: number;
414
+ };
415
+ quality?(k: null | number): void;
416
+ rain(k: number | null): void;
417
+ rewind(): void;
418
+ rim(k: number | null, back?: boolean): void;
419
+ rising?(id?: string): null | {
420
+ base: number;
421
+ done: boolean;
422
+ id: string;
423
+ k: number;
424
+ rising: boolean;
425
+ top: number;
426
+ y1: number;
427
+ };
428
+ /**
429
+ * THE SEAM, HALF ONE (optional). Two numbers, written every frame: how
430
+ * much of the HELD frame is over the live one, and how much of a colour
431
+ * is over both. Call `freeze(true)` first to take the frame it holds,
432
+ * and `seam(0, 0)` to end it.
433
+ *
434
+ * The film owns the clock and the shape; the picture owns the
435
+ * compositing, and does both mixes in LIGHT — which is the whole reason
436
+ * the seam moved in here. An `<img>` faded over the canvas by the
437
+ * parent mixes two DISPLAY values, and sRGB is a curve, so the middle
438
+ * of a crossfade sags: about 4.6 of 255 on a measured blend. The
439
+ * parent's other half is the furniture, revealed by the same two
440
+ * leaves over.
441
+ */
442
+ seam?(spec: SeamSpec | null): void;
443
+ shot?(name: string): void;
444
+ sky(id: string, spec: object, place: object): void;
445
+ snapshot(): string;
446
+ sound(on: boolean): void;
447
+ speaking(): boolean;
448
+ style?(i: number): number;
449
+ styleIndex?(): number;
450
+ sun(): {
451
+ h: number;
452
+ on: boolean;
453
+ w: number;
454
+ x: number;
455
+ y: number;
456
+ };
457
+ tag(v: boolean): void;
458
+ theme(i: number, instant?: boolean): void;
459
+ themeDur(s: null | number): void;
460
+ time(v: number): void;
461
+ trace(id: string, spec: {
462
+ color?: string;
463
+ glow?: string;
464
+ pts: Pt3[];
465
+ r?: number;
466
+ }): void;
467
+ traceDraw(id: string, t: number): void;
468
+ traceFade(id: string, k: number): void;
469
+ traceUndraw?(id: string, t: number): void;
470
+ view(): {
471
+ az: number;
472
+ el: number;
473
+ fov: number;
474
+ h: number;
475
+ w: number;
476
+ zoom: number;
477
+ };
478
+ /** a line of narration through the page's own graph, at `gain` (0..1), from `at` seconds in */
479
+ voice(url: string, gain?: number, at?: number): void;
480
+ voicePrime(url: string): void;
481
+ voiceStop(ms?: number): void;
482
+ /** the master fader, 0..1, under the mix and the mute */
483
+ volume?(v: number): void;
484
+ /**
485
+ * THE PAPER WASH, in the picture's own glass (optional). `mode` is the
486
+ * shot's own (`lower`, `title`, `plate`, `point`, or `''` for a bare
487
+ * beat) and `paper` the palette's paper colour — the same two things
488
+ * the film used to spell as `.cf-scrim-<mode>` and `--cf-paper-*` on a
489
+ * CSS layer over the canvas. A picture that takes it gets the wash
490
+ * into the post pass, where a seam can dissolve it; the film stops
491
+ * drawing its own. The picture eases a change of mode itself, the way
492
+ * the stylesheet's `transition: background 700ms` did.
493
+ */
494
+ wash?(mode: string, paper: string): void;
495
+ winter(w: null | {
496
+ gust: number;
497
+ pack: number;
498
+ }): void;
499
+ wx(i: number, instant?: boolean): void;
500
+ year?(y: number): void;
501
+ }
502
+ /** the state the score hands the film every frame the shot changes */
503
+ export interface ShotState {
504
+ dolly: number;
505
+ look?: {
506
+ x: number;
507
+ y: number;
508
+ z: number;
509
+ };
510
+ pitch: number;
511
+ x: number;
512
+ y: number;
513
+ yaw: number;
514
+ }
515
+ /**
516
+ * THE FILM'S HANDLES — what the front door and the end card are given,
517
+ * and what a film's own furniture may call. Every one of these is a
518
+ * gesture the player also makes; a block never reaches into the engine.
519
+ */
520
+ export interface FilmHandle {
521
+ /** the beat on screen */
522
+ beat: Beat;
523
+ /** open the door, with or without sound */
524
+ begin: (withSound: boolean) => void;
525
+ /** the chapter on screen */
526
+ chapter: Chapter;
527
+ /** cut to a beat's head — an edit, never a seek */
528
+ cutTo: (index: number) => void;
529
+ /** play any join as a pure overlay on whatever is showing — no cut, no snap */
530
+ preview: (join: Join) => void;
531
+ /** the scene is seated behind the door — the buttons may be pressed */
532
+ ready: boolean;
533
+ /** stand the film at a time and draw it (exact); the nearest shot's head (cut) */
534
+ renderAt: (seconds: number) => Promise<void>;
535
+ /** put the door back up */
536
+ restart: () => void;
537
+ /** the whole film's running time, said the way a poster says it */
538
+ runtime: string;
539
+ /** move the playhead: to the time (exact), or to the nearest shot's head (cut) */
540
+ seek: (seconds: number) => void;
541
+ /** open or close the chapter menu */
542
+ toc: () => void;
543
+ }
544
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/film/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3C,4EAA4E;AAC5E;;;;GAIG;AACH,MAAM,MAAM,eAAe,CACzB,CAAC,SAAS,OAAO,GAAG,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,CAAC,IAAI,CAAC,CAAC;IAC7C,2BAA2B;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,qCAAqC;IACrC,GAAG,EAAE,MAAM,IAAI,CAAC;CACjB"}
@@ -0,0 +1,3 @@
1
+ /** `@cardstack/choreo/film` — see ./film/index.ts */
2
+ export * from './film/index.ts';
3
+ //# sourceMappingURL=film.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"film.d.ts","sourceRoot":"","sources":["../src/film.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * `c.gesture` — the live drag as a first-class geometry source (§6.1, §6.4).
3
+ *
4
+ * A document-level pointer tracker (listeners, not timers) keeps the last
5
+ * pointer position and a short velocity window. A Move that borrows
6
+ * `{{c.gesture}}` as its `@from` starts from wherever the finger let go —
7
+ * sized as the sprite, centred on the pointer — and any spring that flies
8
+ * it inherits the pointer's velocity, so a toss leaves at the speed it was
9
+ * thrown.
10
+ */
11
+ import type { Bounds, Rect } from './types.ts';
12
+ export interface GestureRef {
13
+ gesture: true;
14
+ }
15
+ export declare const GESTURE: GestureRef;
16
+ export declare function isGestureRef(v: unknown): v is GestureRef;
17
+ /** idempotent; the first <Choreo> turns it on */
18
+ export declare function trackGestures(): void;
19
+ /** the pointer's page position now, or null before any pointer event */
20
+ export declare function gesturePoint(): {
21
+ x: number;
22
+ y: number;
23
+ } | null;
24
+ /** units per second over the recent window — what a spring inherits */
25
+ export declare function gestureVelocity(): {
26
+ x: number;
27
+ y: number;
28
+ };
29
+ /** the gesture as a box: the sprite\'s own size, centred on the pointer */
30
+ export declare function gestureBounds(size: Rect): Bounds | null;
31
+ /** test-support: forget everything between tests */
32
+ export declare function resetGestures(): void;
33
+ //# sourceMappingURL=gesture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../src/gesture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,eAAO,MAAM,OAAO,EAAE,UAA8B,CAAC;AAErD,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAMxD;AAmBD,iDAAiD;AACjD,wBAAgB,aAAa,SAiB5B;AAED,wEAAwE;AACxE,wBAAgB,YAAY,IAAI;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAG9D;AAED,uEAAuE;AACvE,wBAAgB,eAAe,IAAI;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAa1D;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAYvD;AAED,oDAAoD;AACpD,wBAAgB,aAAa,SAE5B"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @cardstack/choreo — <Choreo>: a changeset and a timeline over a whole render
3
+ * pass, on glimmer-motion's elements and the motion-dom engine underneath it.
4
+ * The film construct is at `@cardstack/choreo/film`; test helpers are at
5
+ * `@cardstack/choreo/test-support`. Deep imports (`@cardstack/choreo/compile`,
6
+ * …) are the same modules.
7
+ */
8
+ export type { AnchorRef } from './anchors.ts';
9
+ export { after, at } from './anchors.ts';
10
+ export type { Arming, ArmingOptions, ArmingRegion } from './arming.ts';
11
+ export { createArming } from './arming.ts';
12
+ export { beacon } from './beacon.ts';
13
+ export type { BeaconRef } from './beacons.ts';
14
+ export type { Changeset } from './changeset.ts';
15
+ export type { ChoreoContext } from './choreo';
16
+ export { Choreo } from './choreo';
17
+ export { easeIn, easeInAndOut, easeOut } from './easings.ts';
18
+ export type { GestureRef } from './gesture.ts';
19
+ export { type ChoreoHost, choreoHostAt, choreoHostById, type ChoreoProvider, closestChoreo, } from './registry.ts';
20
+ export type { ChoreoRun } from './run.ts';
21
+ export type { PlanePoint } from './space.ts';
22
+ export { appliedCamera, toLocal, toPage } from './space.ts';
23
+ export type { StepArgs, StepArgsBase } from './steps';
24
+ export { StepComponent, toMs } from './steps';
25
+ export type { Block, Bounds, Camera3DState, Camera3DWaypoint, CameraState, DeliveryBy, DeliveryOrder, DeriveContext, Easing, FollowSource, GateNode, PerformCommand, PropSource, PropValue, Query, Rect, SpringSpec, Sprite, Step, TimelineNode, } from './types.ts';
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EACL,KAAK,UAAU,EACf,YAAY,EACZ,cAAc,EACd,KAAK,cAAc,EACnB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC5D,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EACV,KAAK,EACL,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,aAAa,EACb,aAAa,EACb,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,UAAU,EACV,SAAS,EACT,KAAK,EACL,IAAI,EACJ,UAAU,EACV,MAAM,EACN,IAAI,EACJ,YAAY,GACb,MAAM,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { Bounds, Rect } from './types.ts';
2
+ /** a box in page space */
3
+ export declare const rect: (r: DOMRect) => Rect;
4
+ /** `a` expressed relative to `b`'s top-left, keeping a's size */
5
+ export declare const minus: (a: DOMRect, b: DOMRect) => Rect;
6
+ /** an element's box together with the box it is positioned inside */
7
+ export interface Snapshot {
8
+ el: DOMRect;
9
+ /** the computed background at measure time — see Bounds.paint */
10
+ paint?: string;
11
+ parent: DOMRect;
12
+ /** the declared subject's box at measure time — see Bounds.substance */
13
+ substance?: DOMRect;
14
+ }
15
+ /**
16
+ * The shrink-wrap of `el`'s contents — the ink — not the stretched layout
17
+ * box. A full-bleed title (`left:0; right:0; width:auto`) still has a
18
+ * word-sized range; Crossing crop must match THAT, or the type explodes
19
+ * into a viewport strip. Empty / collapsed → undefined, so the frame wins.
20
+ */
21
+ export declare const inkBox: (el: Element) => DOMRect | undefined;
22
+ /** the containing block a `position: absolute` child would be placed against */
23
+ export declare const offsetBox: (el: Element) => DOMRect;
24
+ export declare const measure: (el: Element) => Snapshot;
25
+ /** the three spaces, from a snapshot and the region's own box */
26
+ export declare const boundsOf: (snap: Snapshot, root: DOMRect) => Bounds;
27
+ /** measure an element straight into bounds — what a beacon needs */
28
+ export declare const measureBounds: (el: Element, root: DOMRect) => Bounds;
29
+ //# sourceMappingURL=measure.d.ts.map