@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,500 @@
1
+ import Component from '@glimmer/component';
2
+ import { modifier } from 'ember-modifier';
3
+ import { precompileTemplate } from '@ember/template-compilation';
4
+ import { setComponentTemplate } from '@ember/component';
5
+
6
+ const providers = new WeakMap();
7
+ /** the host a marker belongs to: the nearest `[data-film-graph]` ancestor */
8
+
9
+ const hosts = new WeakMap();
10
+ function setGraphHost(el, host) {
11
+ if (host) {
12
+ hosts.set(el, host);
13
+ } else {
14
+ hosts.delete(el);
15
+ }
16
+ }
17
+ /** the nodes directly inside an element, in document order, nesting by markup */
18
+ function collectGraph(el) {
19
+ const out = [];
20
+ for (const child of Array.from(el.children)) {
21
+ const provider = providers.get(child);
22
+ if (provider) {
23
+ const node = provider.node();
24
+ if (node.kind === 'group' || node.kind === 'shot') {
25
+ node.children = collectGraph(child);
26
+ if (node.kind === 'group') {
27
+ // attachments placed directly under a group are its patches,
28
+ // in force for every shot in it; they are not items
29
+ const items = [];
30
+ for (const c of node.children) {
31
+ if (c.kind === 'patch') {
32
+ node.patches.push(c.patch);
33
+ } else {
34
+ items.push(c);
35
+ }
36
+ }
37
+ node.children = items;
38
+ }
39
+ } else if (node.kind === 'attach') {
40
+ const inner = collectGraph(child);
41
+ const media = inner.find(n => n.kind === 'attach')?.media;
42
+ if (media) {
43
+ node.media = media;
44
+ }
45
+ /* a look under a clip is the CLIP's, not the beat's — the first
46
+ adjustment in this vocabulary that belongs to something other
47
+ than the picture */
48
+ const look = inner.filter(n => n.kind === 'look').reduce((all, n) => ({
49
+ ...all,
50
+ ...n.look
51
+ }), undefined);
52
+ if (look && node.media && node.media.kind !== 'photo') {
53
+ node.media = {
54
+ ...node.media,
55
+ look
56
+ };
57
+ }
58
+ }
59
+ out.push(node);
60
+ } else {
61
+ out.push(...collectGraph(child));
62
+ }
63
+ }
64
+ return out;
65
+ }
66
+ /** drop undefined members so a patch says only what it says */
67
+ function tidy(o) {
68
+ const out = {};
69
+ for (const [k, v] of Object.entries(o)) {
70
+ if (v !== undefined) {
71
+ out[k] = v;
72
+ }
73
+ }
74
+ return out;
75
+ }
76
+ /**
77
+ * A node component: a hidden marker in the tree, a provider in the map.
78
+ * Groups and shots yield, so their children's markers nest under theirs.
79
+ * The marker re-registers when its args change, and tells the host.
80
+ */
81
+ class GraphNodeComponent extends Component {
82
+ mark = modifier(el => {
83
+ providers.set(el, this);
84
+ // reading node() here makes the modifier track everything it reads, so
85
+ // an edited arg re-runs it — and the host learns the tree changed
86
+ void this.node();
87
+ const host = el.parentElement?.closest('[data-film-graph]');
88
+ (host ? hosts.get(host) : undefined)?.invalidate();
89
+ return () => {
90
+ providers.delete(el);
91
+ (host ? hosts.get(host) : undefined)?.invalidate();
92
+ };
93
+ });
94
+ static {
95
+ setComponentTemplate(precompileTemplate("<span hidden data-film-node {{this.mark}}>{{yield}}</span>", {
96
+ strictMode: true
97
+ }), this);
98
+ }
99
+ }
100
+ /* ---- groups ---------------------------------------------------------- */
101
+
102
+ function groupDefaults(args) {
103
+ return tidy({
104
+ bob: args.bob,
105
+ cut: args.cut,
106
+ hold: args.hold,
107
+ lead: args.lead
108
+ });
109
+ }
110
+ /** the film's spine: a sequence of chapters and shots; `@join` is what a shot gets when nothing names one */
111
+ class Spine extends GraphNodeComponent {
112
+ node() {
113
+ return {
114
+ children: [],
115
+ defaults: groupDefaults(this.args),
116
+ join: this.args.join,
117
+ kind: 'group',
118
+ name: this.args.name,
119
+ over: this.args.over,
120
+ patches: [],
121
+ role: 'spine'
122
+ };
123
+ }
124
+ }
125
+ /** a chapter: a named sequence the menu and the rail read; its grade and stock are the chapter's, not its shots' */
126
+ class Chapter extends GraphNodeComponent {
127
+ node() {
128
+ const {
129
+ grade,
130
+ lut,
131
+ n,
132
+ tint,
133
+ tintD,
134
+ title
135
+ } = this.args;
136
+ return {
137
+ chapter: tidy({
138
+ grade,
139
+ lut,
140
+ n,
141
+ tint,
142
+ tintD,
143
+ title
144
+ }),
145
+ children: [],
146
+ defaults: groupDefaults(this.args),
147
+ join: this.args.join,
148
+ kind: 'group',
149
+ name: this.args.name,
150
+ over: this.args.over,
151
+ patches: [],
152
+ role: 'chapter'
153
+ };
154
+ }
155
+ }
156
+ /** a group of shots inside a chapter: `c.Sequence` wearing the film's defaults */
157
+ class Sequence extends GraphNodeComponent {
158
+ node() {
159
+ return {
160
+ children: [],
161
+ defaults: groupDefaults(this.args),
162
+ join: this.args.join,
163
+ kind: 'group',
164
+ name: this.args.name,
165
+ over: this.args.over,
166
+ patches: [],
167
+ role: 'sequence'
168
+ };
169
+ }
170
+ }
171
+ /* ---- the shot -------------------------------------------------------- */ /** the pose the film speaks in, as flat arguments */
172
+
173
+ function cam(a) {
174
+ return tidy({
175
+ dolly: a.dolly,
176
+ fx: a.fx,
177
+ fz: a.fz,
178
+ lookY: a.lookY,
179
+ ox: a.ox,
180
+ pitch: a.pitch,
181
+ yaw: a.yaw
182
+ });
183
+ }
184
+ /** one shot: its head pose as its own args, its facts, and everything attached under it */
185
+ class Shot extends GraphNodeComponent {
186
+ node() {
187
+ const a = this.args;
188
+ return {
189
+ cam: cam(a),
190
+ children: [],
191
+ facts: tidy({
192
+ bob: a.bob,
193
+ cut: a.cut,
194
+ dissolve: a.dissolve,
195
+ follow: a.follow,
196
+ hold: a.hold,
197
+ lead: a.lead,
198
+ lift: a.lift,
199
+ quality: a.quality,
200
+ to: a.to
201
+ }),
202
+ id: a.name,
203
+ kind: 'shot',
204
+ ticks: a.ticks
205
+ };
206
+ }
207
+ }
208
+ /** the pose at the shot's tail; without one the shot holds */
209
+ class To extends GraphNodeComponent {
210
+ node() {
211
+ return {
212
+ cam: cam(this.args),
213
+ kind: 'to'
214
+ };
215
+ }
216
+ }
217
+ /** a ground-level eye with a wide lens: standing at `@from`, walking to `@to` */
218
+ class Eye extends GraphNodeComponent {
219
+ node() {
220
+ return {
221
+ eye: tidy({
222
+ at: this.args.from,
223
+ fov: this.args.fov,
224
+ to: this.args.to
225
+ }),
226
+ kind: 'eye'
227
+ };
228
+ }
229
+ }
230
+ /**
231
+ * The seam INTO the shot that follows it: one of the film's twelve by
232
+ * name, or a presentation component the score brings — given the still,
233
+ * told how long it has (`@secs`), and known to the film by nothing else.
234
+ */
235
+ class JoinInto extends GraphNodeComponent {
236
+ node() {
237
+ const p = this.args.presentation;
238
+ if (typeof p === 'string') {
239
+ /* `@secs` counts for a NAMED seam too: it is how a seam the film
240
+ does not know — one the picture declared — gets its length, and
241
+ how a score retimes one of the film's own. Without it a
242
+ picture-declared seam compiled to a length of zero and ended on
243
+ the frame it began. */
244
+ return {
245
+ dipTo: this.args.to,
246
+ join: p,
247
+ kind: 'join',
248
+ over: this.args.over,
249
+ secs: this.args.secs
250
+ };
251
+ }
252
+ return {
253
+ dipTo: this.args.to,
254
+ join: '',
255
+ kind: 'join',
256
+ over: this.args.over,
257
+ presentation: p,
258
+ secs: this.args.secs
259
+ };
260
+ }
261
+ }
262
+ /* ---- the film's own attachments --------------------------------------- */ /** a patch node: an attachment that says what it adds to the row */
263
+ class PatchComponent extends GraphNodeComponent {
264
+ node() {
265
+ return {
266
+ kind: 'patch',
267
+ patch: tidy(this.patch())
268
+ };
269
+ }
270
+ }
271
+ /** the type: the lower third, the title, the plate and the point */
272
+ class Type extends PatchComponent {
273
+ patch() {
274
+ const a = this.args;
275
+ return {
276
+ bare: a.bare,
277
+ gloss: a.gloss,
278
+ kanji: a.word,
279
+ kicker: a.kicker,
280
+ mode: a.mode,
281
+ romaji: a.reading,
282
+ says: a.says
283
+ };
284
+ }
285
+ }
286
+ /** the narration: the line, the measured read it was cut to, and the level it was mixed to */
287
+ class Voice extends GraphNodeComponent {
288
+ node() {
289
+ const {
290
+ gain,
291
+ hush,
292
+ line,
293
+ read
294
+ } = this.args;
295
+ return tidy({
296
+ gain,
297
+ hush,
298
+ kind: 'voice',
299
+ line,
300
+ read
301
+ });
302
+ }
303
+ }
304
+ /** the year the voice says, written enormous in the scene */
305
+ class Stamp extends PatchComponent {
306
+ patch() {
307
+ return {
308
+ stamp: tidy({
309
+ at: this.args.at,
310
+ y: this.args.year
311
+ })
312
+ };
313
+ }
314
+ }
315
+ /** type standing out in the world, behind the subject */
316
+ class Sky extends PatchComponent {
317
+ patch() {
318
+ const a = this.args;
319
+ return {
320
+ sky: tidy({
321
+ az: a.az,
322
+ dist: a.dist,
323
+ lines: a.lines,
324
+ opacity: a.opacity,
325
+ size: a.size,
326
+ track: a.track,
327
+ y: a.y
328
+ })
329
+ };
330
+ }
331
+ }
332
+ /** a label that stands in the scene at the height it names */
333
+ class Mark extends PatchComponent {
334
+ patch() {
335
+ const a = this.args;
336
+ return {
337
+ mark: tidy({
338
+ at: a.at,
339
+ bearing: a.bearing,
340
+ hold: a.hold,
341
+ lines: a.lines,
342
+ r: a.r,
343
+ size: a.size,
344
+ to: a.to
345
+ })
346
+ };
347
+ }
348
+ }
349
+ /** a line drawn ON the subject, in world coordinates; several add up */
350
+ class Trace extends PatchComponent {
351
+ patch() {
352
+ return {
353
+ trace: [tidy({
354
+ pts: this.args.pts,
355
+ wide: this.args.wide
356
+ })]
357
+ };
358
+ }
359
+ }
360
+ /** the lineup: cycle through subjects inside one held shot */
361
+ class Lineup extends PatchComponent {
362
+ patch() {
363
+ return {
364
+ cycle: this.args.steps
365
+ };
366
+ }
367
+ }
368
+ /* ---- windows over regions the film does not own ------------------------ */ /** a window on the shot's clock over a photograph, a freeze or a video */
369
+ class Attach extends GraphNodeComponent {
370
+ node() {
371
+ return tidy({
372
+ at: this.args.at,
373
+ end: this.args.end,
374
+ for: this.args.for,
375
+ kind: 'attach'
376
+ });
377
+ }
378
+ }
379
+ /** a photograph cut in beside the model; `@src` resolves under the film's assets */
380
+ class Insert extends GraphNodeComponent {
381
+ node() {
382
+ const {
383
+ caption,
384
+ credit,
385
+ src
386
+ } = this.args;
387
+ return {
388
+ kind: 'attach',
389
+ media: {
390
+ caption,
391
+ credit,
392
+ kind: 'photo',
393
+ src
394
+ }
395
+ };
396
+ }
397
+ }
398
+ /** a freeze of the picture itself, read back and held */
399
+ class Freeze extends GraphNodeComponent {
400
+ node() {
401
+ const {
402
+ caption,
403
+ credit,
404
+ fit
405
+ } = this.args;
406
+ return {
407
+ kind: 'attach',
408
+ media: tidy({
409
+ caption,
410
+ credit,
411
+ fit,
412
+ kind: 'freeze'
413
+ })
414
+ };
415
+ }
416
+ }
417
+ /**
418
+ * A LOOK HELD ON A CLIP — `f.clip.Look`. The clip actor's own adjustment,
419
+ * declared by the film because the film draws the clip layer, in the same
420
+ * shape as `f.picture.Look`: a value held on an actor for the window it
421
+ * is attached to, applying to everything under it.
422
+ *
423
+ * ```hbs
424
+ * <f.Inset @src="b-roll.mp4" @x={{62}} @y={{14}} @w={{30}}>
425
+ * <f.clip.Look @sat={{0.15}} @con={{1.2}} @blur={{1}} />
426
+ * </f.Inset>
427
+ * ```
428
+ */
429
+ class ClipLookNode extends GraphNodeComponent {
430
+ node() {
431
+ const a = this.args;
432
+ return {
433
+ kind: 'look',
434
+ look: tidy({
435
+ blur: a.blur,
436
+ bri: a.bri,
437
+ con: a.con,
438
+ gray: a.gray,
439
+ hue: a.hue,
440
+ opacity: a.opacity,
441
+ sat: a.sat,
442
+ sepia: a.sepia
443
+ })
444
+ };
445
+ }
446
+ }
447
+ /**
448
+ * A PICTURE IN THE PICTURE: a video or a still placed as a LAYER, sized
449
+ * and positioned in percent of the frame, with its own fade in and out.
450
+ * Not the editorial photograph (`Insert`), which is a paper card in a
451
+ * fixed corner — this one is a layer the score places.
452
+ */
453
+ class Inset extends GraphNodeComponent {
454
+ node() {
455
+ const a = this.args;
456
+ return {
457
+ at: a.at,
458
+ end: a.end,
459
+ for: a.for,
460
+ kind: 'attach',
461
+ media: tidy({
462
+ fade: a.fade,
463
+ fit: 'pip',
464
+ in: a.in,
465
+ kind: a.still ? 'image' : 'video',
466
+ out: a.out,
467
+ radius: a.radius,
468
+ rate: a.rate,
469
+ src: a.src,
470
+ volume: a.volume,
471
+ w: a.w,
472
+ x: a.x,
473
+ y: a.y
474
+ })
475
+ };
476
+ }
477
+ }
478
+ /** a video or a still, over the frame for the window */
479
+ class Video extends GraphNodeComponent {
480
+ node() {
481
+ const a = this.args;
482
+ return {
483
+ kind: 'attach',
484
+ media: tidy({
485
+ caption: a.caption,
486
+ credit: a.credit,
487
+ fit: a.fit,
488
+ in: a.in,
489
+ kind: a.still ? 'image' : 'video',
490
+ out: a.out,
491
+ rate: a.rate,
492
+ src: a.src,
493
+ volume: a.volume
494
+ })
495
+ };
496
+ }
497
+ }
498
+
499
+ export { Attach, Chapter, ClipLookNode, Eye, Freeze, GraphNodeComponent, Insert, Inset, JoinInto, Lineup, Mark, PatchComponent, Sequence, Shot, Sky, Spine, Stamp, To, Trace, Type, Video, Voice, collectGraph, setGraphHost };
500
+ //# sourceMappingURL=nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodes.js","sources":["../../../src/film/graph/nodes.gts"],"sourcesContent":["/**\n * THE GRAPH'S NODES, as components.\n *\n * Each renders a hidden marker and puts itself in a WeakMap the host walks\n * in document order — the same discovery `<Choreo>` uses for its steps —\n * so a shot's children are the markers inside its marker, a chapter's\n * shots are the markers inside its, and the template's nesting IS the\n * tree. `node()` is pure and cheap: it reads args and returns plain data;\n * the host compiles the tree to the table (`compile.ts`).\n *\n * The vocabulary is what the six sketches in docs/film-graph settled on:\n * `Spine` / `Chapter` / `Sequence` (groups, with defaults), `Shot` (the\n * head pose as its own args), `To`, `Eye`, `Join` (a sibling before the\n * shot it cuts into), `Type`, `Voice`, `Stamp`, `Sky`, `Mark`, `Trace`,\n * `Lineup`, and `Attach` around `Insert` / `Freeze` / `Video`. Adjustments\n * — the picture's own knobs — are in `adjust.gts`.\n */\nimport Component from '@glimmer/component';\nimport { modifier } from 'ember-modifier';\n\nimport type { ClipLook, ClipSpec } from '../clips.ts';\nimport type { PresentationComponent } from '../joins.gts';\nimport type {\n Beat,\n Cam,\n Join,\n JoinName,\n Over,\n PlateMode,\n Pt3,\n} from '../types.ts';\nimport type {\n AttachNode,\n EyeNode,\n GraphNode,\n GroupNode,\n JoinNode,\n LookNode,\n Patch,\n PatchNode,\n ShotNode,\n ToNode,\n VoiceNode,\n} from './compile.ts';\n\nexport interface GraphProvider {\n node(): GraphNode;\n}\n\nconst providers = new WeakMap<Element, GraphProvider>();\n\n/** the host a marker belongs to: the nearest `[data-film-graph]` ancestor */\nexport interface GraphHost {\n invalidate(): void;\n}\nconst hosts = new WeakMap<Element, GraphHost>();\n\nexport function setGraphHost(el: Element, host: GraphHost | undefined) {\n if (host) {\n hosts.set(el, host);\n } else {\n hosts.delete(el);\n }\n}\n\n/** the nodes directly inside an element, in document order, nesting by markup */\nexport function collectGraph(el: Element): GraphNode[] {\n const out: GraphNode[] = [];\n for (const child of Array.from(el.children)) {\n const provider = providers.get(child);\n if (provider) {\n const node = provider.node();\n if (node.kind === 'group' || node.kind === 'shot') {\n node.children = collectGraph(child);\n if (node.kind === 'group') {\n // attachments placed directly under a group are its patches,\n // in force for every shot in it; they are not items\n const items: GraphNode[] = [];\n for (const c of node.children) {\n if (c.kind === 'patch') {\n node.patches.push(c.patch);\n } else {\n items.push(c);\n }\n }\n node.children = items;\n }\n } else if (node.kind === 'attach') {\n const inner = collectGraph(child);\n const media = inner.find((n) => n.kind === 'attach')?.media;\n if (media) {\n node.media = media;\n }\n /* a look under a clip is the CLIP's, not the beat's — the first\n adjustment in this vocabulary that belongs to something other\n than the picture */\n const look = inner\n .filter((n): n is LookNode => n.kind === 'look')\n .reduce<\n ClipLook | undefined\n >((all, n) => ({ ...all, ...n.look }), undefined);\n if (look && node.media && node.media.kind !== 'photo') {\n node.media = { ...node.media, look };\n }\n }\n out.push(node);\n } else {\n out.push(...collectGraph(child));\n }\n }\n return out;\n}\n\n/** drop undefined members so a patch says only what it says */\nfunction tidy<T extends object>(o: T): T {\n const out = {} as T;\n for (const [k, v] of Object.entries(o)) {\n if (v !== undefined) {\n (out as Record<string, unknown>)[k] = v;\n }\n }\n return out;\n}\n\n/**\n * A node component: a hidden marker in the tree, a provider in the map.\n * Groups and shots yield, so their children's markers nest under theirs.\n * The marker re-registers when its args change, and tells the host.\n */\nexport abstract class GraphNodeComponent<A extends object> extends Component<{\n Args: A;\n Blocks: { default: [] };\n}> {\n abstract node(): GraphNode;\n\n protected mark = modifier((el: Element) => {\n providers.set(el, this);\n // reading node() here makes the modifier track everything it reads, so\n // an edited arg re-runs it — and the host learns the tree changed\n void this.node();\n const host = el.parentElement?.closest('[data-film-graph]');\n (host ? hosts.get(host) : undefined)?.invalidate();\n return () => {\n providers.delete(el);\n (host ? hosts.get(host) : undefined)?.invalidate();\n };\n });\n\n <template>\n <span hidden data-film-node {{this.mark}}>{{yield}}</span>\n </template>\n}\n\n/* ---- groups ---------------------------------------------------------- */\n\ninterface GroupArgs {\n /** the same hand for every shot in the group, unless the shot says otherwise */\n bob?: number;\n cut?: boolean;\n hold?: boolean | 'top';\n /** the seam every shot in the group is entered through, unless a join sibling says otherwise */\n join?: Join;\n lead?: number;\n name?: string;\n /** how deep those seams go: over the picture alone, or over the type and the inserts too */\n over?: Over;\n}\n\nfunction groupDefaults(args: GroupArgs): Patch {\n return tidy({\n bob: args.bob,\n cut: args.cut,\n hold: args.hold,\n lead: args.lead,\n });\n}\n\n/** the film's spine: a sequence of chapters and shots; `@join` is what a shot gets when nothing names one */\nexport class Spine extends GraphNodeComponent<GroupArgs> {\n node(): GroupNode {\n return {\n children: [],\n defaults: groupDefaults(this.args),\n join: this.args.join,\n kind: 'group',\n name: this.args.name,\n over: this.args.over,\n patches: [],\n role: 'spine',\n };\n }\n}\n\n/** a chapter: a named sequence the menu and the rail read; its grade and stock are the chapter's, not its shots' */\nexport class Chapter extends GraphNodeComponent<\n GroupArgs & {\n grade?: string;\n lut?: string;\n n: string;\n tint?: string;\n tintD?: string;\n title: string;\n }\n> {\n node(): GroupNode {\n const { grade, lut, n, tint, tintD, title } = this.args;\n return {\n chapter: tidy({ grade, lut, n, tint, tintD, title }),\n children: [],\n defaults: groupDefaults(this.args),\n join: this.args.join,\n kind: 'group',\n name: this.args.name,\n over: this.args.over,\n patches: [],\n role: 'chapter',\n };\n }\n}\n\n/** a group of shots inside a chapter: `c.Sequence` wearing the film's defaults */\nexport class Sequence extends GraphNodeComponent<GroupArgs> {\n node(): GroupNode {\n return {\n children: [],\n defaults: groupDefaults(this.args),\n join: this.args.join,\n kind: 'group',\n name: this.args.name,\n over: this.args.over,\n patches: [],\n role: 'sequence',\n };\n }\n}\n\n/* ---- the shot -------------------------------------------------------- */\n\n/** the pose the film speaks in, as flat arguments */\ninterface PoseArgs {\n dolly: number;\n fx?: number;\n fz?: number;\n lookY: number;\n ox?: number;\n pitch: number;\n yaw: number;\n}\n\nfunction cam(a: PoseArgs): Cam {\n return tidy({\n dolly: a.dolly,\n fx: a.fx,\n fz: a.fz,\n lookY: a.lookY,\n ox: a.ox,\n pitch: a.pitch,\n yaw: a.yaw,\n });\n}\n\n/** one shot: its head pose as its own args, its facts, and everything attached under it */\nexport class Shot extends GraphNodeComponent<\n PoseArgs & {\n bob?: number;\n cut?: boolean;\n dissolve?: boolean;\n follow?: false | string;\n hold?: boolean | 'top';\n lead?: number;\n lift?: number;\n name: string;\n quality?: number;\n ticks: number;\n /** a point on the subject this shot is naming — the callout's leader and ring */\n to?: Pt3;\n }\n> {\n node(): ShotNode {\n const a = this.args;\n return {\n cam: cam(a),\n children: [],\n facts: tidy({\n bob: a.bob,\n cut: a.cut,\n dissolve: a.dissolve,\n follow: a.follow,\n hold: a.hold,\n lead: a.lead,\n lift: a.lift,\n quality: a.quality,\n to: a.to,\n }),\n id: a.name,\n kind: 'shot',\n ticks: a.ticks,\n };\n }\n}\n\n/** the pose at the shot's tail; without one the shot holds */\nexport class To extends GraphNodeComponent<PoseArgs> {\n node(): ToNode {\n return { cam: cam(this.args), kind: 'to' };\n }\n}\n\n/** a ground-level eye with a wide lens: standing at `@from`, walking to `@to` */\nexport class Eye extends GraphNodeComponent<{\n fov: number;\n from: Pt3;\n to?: Pt3;\n}> {\n node(): EyeNode {\n return {\n eye: tidy({ at: this.args.from, fov: this.args.fov, to: this.args.to }),\n kind: 'eye',\n };\n }\n}\n\n/**\n * The seam INTO the shot that follows it: one of the film's twelve by\n * name, or a presentation component the score brings — given the still,\n * told how long it has (`@secs`), and known to the film by nothing else.\n */\nexport class JoinInto extends GraphNodeComponent<{\n /** how deep this seam goes: over the picture alone, or over the furniture too */\n over?: Over;\n presentation: JoinName | PresentationComponent;\n /** seconds a brought presentation holds the picture */\n secs?: number;\n to?: string;\n}> {\n node(): JoinNode {\n const p = this.args.presentation;\n if (typeof p === 'string') {\n /* `@secs` counts for a NAMED seam too: it is how a seam the film\n does not know — one the picture declared — gets its length, and\n how a score retimes one of the film's own. Without it a\n picture-declared seam compiled to a length of zero and ended on\n the frame it began. */\n return {\n dipTo: this.args.to,\n join: p,\n kind: 'join',\n over: this.args.over,\n secs: this.args.secs,\n };\n }\n return {\n dipTo: this.args.to,\n join: '',\n kind: 'join',\n over: this.args.over,\n presentation: p,\n secs: this.args.secs,\n };\n }\n}\n\n/* ---- the film's own attachments --------------------------------------- */\n\n/** a patch node: an attachment that says what it adds to the row */\nexport abstract class PatchComponent<\n A extends object,\n> extends GraphNodeComponent<A> {\n abstract patch(): Patch;\n node(): PatchNode {\n return { kind: 'patch', patch: tidy(this.patch()) };\n }\n}\n\n/** the type: the lower third, the title, the plate and the point */\nexport class Type extends PatchComponent<{\n bare?: boolean;\n gloss?: string;\n kicker?: string;\n mode?: PlateMode;\n reading?: string;\n says?: string[];\n word?: string;\n}> {\n patch(): Patch {\n const a = this.args;\n return {\n bare: a.bare,\n gloss: a.gloss,\n kanji: a.word,\n kicker: a.kicker,\n mode: a.mode,\n romaji: a.reading,\n says: a.says,\n };\n }\n}\n\n/** the narration: the line, the measured read it was cut to, and the level it was mixed to */\nexport class Voice extends GraphNodeComponent<{\n gain?: number;\n hush?: boolean;\n line?: string;\n read?: number;\n}> {\n node(): VoiceNode {\n const { gain, hush, line, read } = this.args;\n return tidy({ gain, hush, kind: 'voice', line, read }) as VoiceNode;\n }\n}\n\n/** the year the voice says, written enormous in the scene */\nexport class Stamp extends PatchComponent<{ at?: number; year: number }> {\n patch(): Patch {\n return { stamp: tidy({ at: this.args.at, y: this.args.year }) };\n }\n}\n\n/** type standing out in the world, behind the subject */\nexport class Sky extends PatchComponent<{\n az?: number;\n dist?: number;\n lines: string[];\n opacity?: number;\n size: number;\n track?: number;\n y: number;\n}> {\n patch(): Patch {\n const a = this.args;\n return {\n sky: tidy({\n az: a.az,\n dist: a.dist,\n lines: a.lines,\n opacity: a.opacity,\n size: a.size,\n track: a.track,\n y: a.y,\n }),\n };\n }\n}\n\n/** a label that stands in the scene at the height it names */\nexport class Mark extends PatchComponent<{\n at?: number;\n bearing: number;\n hold?: number;\n lines: string[];\n r: number;\n size: number;\n to: number;\n}> {\n patch(): Patch {\n const a = this.args;\n return {\n mark: tidy({\n at: a.at,\n bearing: a.bearing,\n hold: a.hold,\n lines: a.lines,\n r: a.r,\n size: a.size,\n to: a.to,\n }),\n };\n }\n}\n\n/** a line drawn ON the subject, in world coordinates; several add up */\nexport class Trace extends PatchComponent<{ pts: Pt3[]; wide?: boolean }> {\n patch(): Patch {\n return { trace: [tidy({ pts: this.args.pts, wide: this.args.wide })] };\n }\n}\n\n/** the lineup: cycle through subjects inside one held shot */\nexport class Lineup extends PatchComponent<{\n steps: NonNullable<Beat['cycle']>;\n}> {\n patch(): Patch {\n return { cycle: this.args.steps };\n }\n}\n\n/* ---- windows over regions the film does not own ------------------------ */\n\n/** a window on the shot's clock over a photograph, a freeze or a video */\nexport class Attach extends GraphNodeComponent<{\n at?: number;\n end?: ClipSpec['end'];\n for?: number;\n lane?: number;\n}> {\n node(): AttachNode {\n return tidy({\n at: this.args.at,\n end: this.args.end,\n for: this.args.for,\n kind: 'attach',\n }) as AttachNode;\n }\n}\n\n/** a photograph cut in beside the model; `@src` resolves under the film's assets */\nexport class Insert extends GraphNodeComponent<{\n caption: string;\n credit: string;\n src: string;\n}> {\n node(): AttachNode {\n const { caption, credit, src } = this.args;\n return { kind: 'attach', media: { caption, credit, kind: 'photo', src } };\n }\n}\n\n/** a freeze of the picture itself, read back and held */\nexport class Freeze extends GraphNodeComponent<{\n caption?: string;\n credit?: string;\n fit?: ClipSpec['fit'];\n}> {\n node(): AttachNode {\n const { caption, credit, fit } = this.args;\n return {\n kind: 'attach',\n media: tidy({ caption, credit, fit, kind: 'freeze' as const }),\n };\n }\n}\n\n/**\n * A LOOK HELD ON A CLIP — `f.clip.Look`. The clip actor's own adjustment,\n * declared by the film because the film draws the clip layer, in the same\n * shape as `f.picture.Look`: a value held on an actor for the window it\n * is attached to, applying to everything under it.\n *\n * ```hbs\n * <f.Inset @src=\"b-roll.mp4\" @x={{62}} @y={{14}} @w={{30}}>\n * <f.clip.Look @sat={{0.15}} @con={{1.2}} @blur={{1}} />\n * </f.Inset>\n * ```\n */\nexport class ClipLookNode extends GraphNodeComponent<ClipLook> {\n node(): LookNode {\n const a = this.args;\n return {\n kind: 'look',\n look: tidy({\n blur: a.blur,\n bri: a.bri,\n con: a.con,\n gray: a.gray,\n hue: a.hue,\n opacity: a.opacity,\n sat: a.sat,\n sepia: a.sepia,\n }),\n };\n }\n}\n\n/**\n * A PICTURE IN THE PICTURE: a video or a still placed as a LAYER, sized\n * and positioned in percent of the frame, with its own fade in and out.\n * Not the editorial photograph (`Insert`), which is a paper card in a\n * fixed corner — this one is a layer the score places.\n */\nexport class Inset extends GraphNodeComponent<{\n at?: number;\n end?: ClipSpec['end'];\n fade?: number;\n for?: number;\n in?: number;\n out?: number;\n radius?: number;\n rate?: number;\n src: string;\n still?: boolean;\n volume?: number;\n w?: number;\n x?: number;\n y?: number;\n}> {\n node(): AttachNode {\n const a = this.args;\n return {\n at: a.at,\n end: a.end,\n for: a.for,\n kind: 'attach',\n media: tidy({\n fade: a.fade,\n fit: 'pip' as const,\n in: a.in,\n kind: a.still ? ('image' as const) : ('video' as const),\n out: a.out,\n radius: a.radius,\n rate: a.rate,\n src: a.src,\n volume: a.volume,\n w: a.w,\n x: a.x,\n y: a.y,\n }),\n };\n }\n}\n\n/** a video or a still, over the frame for the window */\nexport class Video extends GraphNodeComponent<{\n caption?: string;\n credit?: string;\n fit?: ClipSpec['fit'];\n in?: number;\n out?: number;\n rate?: number;\n src: string;\n still?: boolean;\n volume?: number;\n}> {\n node(): AttachNode {\n const a = this.args;\n return {\n kind: 'attach',\n media: tidy({\n caption: a.caption,\n credit: a.credit,\n fit: a.fit,\n in: a.in,\n kind: a.still ? ('image' as const) : ('video' as const),\n out: a.out,\n rate: a.rate,\n src: a.src,\n volume: a.volume,\n }),\n };\n }\n}\n"],"names":["providers","WeakMap","hosts","setGraphHost","el","host","set","delete","collectGraph","out","child","Array","from","children","provider","get","node","kind","items","c","patches","push","patch","inner","media","find","n","look","filter","reduce","all","undefined","tidy","o","k","v","Object","entries","GraphNodeComponent","Component","mark","modifier","parentElement","closest","invalidate","setComponentTemplate","precompileTemplate","strictMode","groupDefaults","args","bob","cut","hold","lead","Spine","defaults","join","name","over","role","Chapter","grade","lut","tint","tintD","title","chapter","Sequence","cam","a","dolly","fx","fz","lookY","ox","pitch","yaw","Shot","facts","dissolve","follow","lift","quality","to","id","ticks","To","Eye","eye","at","fov","JoinInto","p","presentation","dipTo","secs","PatchComponent","Type","bare","gloss","kanji","word","kicker","mode","romaji","reading","says","Voice","gain","hush","line","read","Stamp","stamp","y","year","Sky","sky","az","dist","lines","opacity","size","track","Mark","bearing","r","Trace","trace","pts","wide","Lineup","cycle","steps","Attach","end","for","Insert","caption","credit","src","Freeze","fit","ClipLookNode","blur","bri","con","gray","hue","sat","sepia","Inset","fade","in","still","radius","rate","volume","w","x","Video"],"mappings":";;;;;AAiDA,MAAMA,SAAA,GAAY,IAAIC,OAAA,EAAiB;AAEvC;;AAIA,MAAMC,KAAA,GAAQ,IAAID,OAAA,EAAiB;AAE5B,SAASE,YAAAA,CAAaC,EAAW,EAAEC,IAA2B,EAAA;AACnE,EAAA,IAAIA,IAAA,EAAM;AACRH,IAAAA,KAAA,CAAMI,GAAG,CAACF,EAAA,EAAIC,IAAA,CAAA;AAChB,EAAA,CAAA,MAAO;AACLH,IAAAA,KAAA,CAAMK,MAAM,CAACH,EAAA,CAAA;AACf,EAAA;AACF;AAEA;AACO,SAASI,YAAAA,CAAaJ,EAAW,EAAG;EACzC,MAAMK,MAAmB,EAAE;EAC3B,KAAK,MAAMC,KAAA,IAASC,KAAA,CAAMC,IAAI,CAACR,EAAA,CAAGS,QAAQ,CAAA,EAAG;AAC3C,IAAA,MAAMC,QAAA,GAAWd,SAAA,CAAUe,GAAG,CAACL,KAAA,CAAA;AAC/B,IAAA,IA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1
+ export { Clip } from './clip.js';
2
+ export { clipLanes, clipWindow, resolveClip, resolveClips } from './clips.js';
3
+ export { Film } from './film.js';
4
+ export { Adjustment, Build, Filter, IFRAME_PICTURE, Light, Look, Mix, SOUND, Set, Sun, Weather, Winter } from './graph/adjust.js';
5
+ export { compileGraph } from './graph/compile.js';
6
+ export { FilmGraph, VOCABULARY } from './graph/host.js';
7
+ export { Eye, Freeze, Attach as GraphAttach, Chapter as GraphChapter, Insert as GraphInsert, GraphNodeComponent, Stamp as GraphStamp, JoinInto, Lineup, Mark, PatchComponent, Sequence, Shot, Sky, Spine, To, Trace, Type, Video, Voice, collectGraph } from './graph/nodes.js';
8
+ export { Blend, Blur, Dip, Flash, Iris, JOIN_SECS, Joins, Luma, Melt, PRESENTATIONS, STILL_JOINS, Wipe, inGlass, retire, seamShape } from './joins.js';
9
+ export { RAD, clamp01, hex, lerp, luminance, mmss, rgba, smooth } from './math.js';
10
+ export { Captions, Insert, Stamp, Track } from './overlays.js';
11
+ export { IframePicture } from './picture.js';
12
+ export { Plate } from './plate.js';
13
+ export { Burst, Menu, Player } from './player.js';
14
+ export { Rail } from './rail.js';
15
+ export { TICK, beatStart, chapterHeads, contents, cues, joinInto, schedule, secsBefore, tailFor, totalSecs, waypoints } from './schedule.js';
16
+ export { Seam } from './seam.js';
17
+ export { EndCard, Gate } from './titles.js';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}