@onmark/cli 0.3.0 → 0.5.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/onmark-release.json +94 -64
- package/package.json +4 -4
- package/packages/authoring/dist/src/frame-motion.d.ts +10 -2
- package/packages/authoring/dist/src/frame-motion.js +29 -6
- package/packages/authoring/dist/src/index.d.ts +2 -2
- package/packages/authoring/dist/src/motion.d.ts +16 -4
- package/packages/authoring/dist/src/presentation.js +160 -6
- package/packages/authoring/dist/src/types.d.ts +1 -1
- package/packages/bundler/dist/src/authored_html.d.ts +19 -7
- package/packages/bundler/dist/src/authored_html.js +109 -21
- package/packages/bundler/dist/src/bundle_projection.d.ts +9 -0
- package/packages/bundler/dist/src/bundle_projection.js +66 -0
- package/packages/bundler/dist/src/command.js +38 -14
- package/packages/bundler/dist/src/generated/bundle-manifest.d.ts +4 -5
- package/packages/bundler/dist/src/generated/bundle-manifest.js +1 -0
- package/packages/bundler/dist/src/generated/bundle-projection-validator.d.ts +7 -0
- package/packages/bundler/dist/src/generated/bundle-projection-validator.js +432 -0
- package/packages/bundler/dist/src/generated/bundle-projection.d.ts +25 -0
- package/packages/bundler/dist/src/generated/bundle-projection.js +2 -0
- package/packages/bundler/dist/src/index.d.ts +1 -1
- package/packages/bundler/dist/src/presentation.d.ts +14 -7
- package/packages/bundler/dist/src/presentation.js +71 -30
- package/packages/motion-gsap/dist/src/index.d.ts +10 -2
- package/packages/motion-gsap/dist/src/index.js +27 -5
- package/packages/runtime/dist/src/generated/browser-request.d.ts +19 -2
- package/packages/runtime/dist/src/generated/browser-response.d.ts +46 -1
- package/packages/runtime/dist/src/generated/bundle-layout.d.ts +1 -1
- package/packages/runtime/dist/src/generated/bundle-layout.js +1 -0
- package/packages/runtime/dist/src/generated/runtime-contract.d.ts +4 -0
- package/packages/runtime/dist/src/generated/runtime-contract.js +4 -0
- package/packages/runtime/dist/src/generated/validators.d.ts +2 -2
- package/packages/runtime/dist/src/generated/validators.js +1482 -572
- package/packages/runtime/dist/src/index.d.ts +4 -4
- package/packages/runtime/dist/src/index.js +1 -1
- package/packages/runtime/dist/src/presentation.d.ts +18 -3
- package/packages/runtime/dist/src/presentation.js +112 -7
- package/packages/runtime/dist/src/session.d.ts +7 -3
- package/packages/runtime/dist/src/session.js +77 -20
- package/packages/runtime/dist/src/types.d.ts +3 -2
package/onmark-release.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "@onmark/cli",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"sourceRevision": "
|
|
4
|
+
"version": "0.5.0",
|
|
5
|
+
"sourceRevision": "770428f38a704d4f08eb117e64d52fc37a164931",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "LICENSE",
|
|
@@ -17,22 +17,22 @@
|
|
|
17
17
|
{
|
|
18
18
|
"path": "package.json",
|
|
19
19
|
"bytes": 1406,
|
|
20
|
-
"sha256": "
|
|
20
|
+
"sha256": "91721649e92466ab8a096460c959146c113b6f3d18a9f8f2617b3b2af6af023d"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"path": "packages/authoring/dist/src/frame-motion.d.ts",
|
|
24
|
-
"bytes":
|
|
25
|
-
"sha256": "
|
|
24
|
+
"bytes": 1476,
|
|
25
|
+
"sha256": "fade0e486ba8fc3013b29ee5ee1467b5f464b3dcd2c28e5d7a06387131ca4427"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "packages/authoring/dist/src/frame-motion.js",
|
|
29
|
-
"bytes":
|
|
30
|
-
"sha256": "
|
|
29
|
+
"bytes": 3603,
|
|
30
|
+
"sha256": "9d227cdaf4880ac434ca1666f2e5bfa88f81f20402c68f0efd3e335ceffe341e"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"path": "packages/authoring/dist/src/index.d.ts",
|
|
34
|
-
"bytes":
|
|
35
|
-
"sha256": "
|
|
34
|
+
"bytes": 948,
|
|
35
|
+
"sha256": "f399c899ff4550dd103f21655bf150deaa516ad20b8e08795ccf2cd9a3500b88"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"path": "packages/authoring/dist/src/index.js",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"path": "packages/authoring/dist/src/motion.d.ts",
|
|
54
|
-
"bytes":
|
|
55
|
-
"sha256": "
|
|
54
|
+
"bytes": 2034,
|
|
55
|
+
"sha256": "f6696a6b9174dead62622fb3f0333106c77b2487e893abb3531fdbb0d5768341"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"path": "packages/authoring/dist/src/motion.js",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"path": "packages/authoring/dist/src/presentation.js",
|
|
69
|
-
"bytes":
|
|
70
|
-
"sha256": "
|
|
69
|
+
"bytes": 14927,
|
|
70
|
+
"sha256": "0a47ca310dce4c37db3a241cb63301d504aa8d767063a395aa520d519e14a874"
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"path": "packages/authoring/dist/src/resource.d.ts",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"path": "packages/authoring/dist/src/types.d.ts",
|
|
94
|
-
"bytes":
|
|
95
|
-
"sha256": "
|
|
94
|
+
"bytes": 221,
|
|
95
|
+
"sha256": "913524b928d11c2c9af64d2f4f4d7fc5df3b3e20f0015e0389bde7f76625e93a"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"path": "packages/authoring/dist/src/types.js",
|
|
@@ -101,13 +101,23 @@
|
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"path": "packages/bundler/dist/src/authored_html.d.ts",
|
|
104
|
-
"bytes":
|
|
105
|
-
"sha256": "
|
|
104
|
+
"bytes": 2278,
|
|
105
|
+
"sha256": "7b40cb7d424b01b0543caf97ac9ed50ca68d94ddf969de7219b5c9c9a29f674c"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"path": "packages/bundler/dist/src/authored_html.js",
|
|
109
|
-
"bytes":
|
|
110
|
-
"sha256": "
|
|
109
|
+
"bytes": 17153,
|
|
110
|
+
"sha256": "841d2fc962b65d7f5cfafd4805eac28990d76f15cf298173ca1d7ac424a2480e"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"path": "packages/bundler/dist/src/bundle_projection.d.ts",
|
|
114
|
+
"bytes": 584,
|
|
115
|
+
"sha256": "fb5f3437d5c3945fe88eb636d47e078abcec6df40acccdc2d38741e1ba1ad653"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"path": "packages/bundler/dist/src/bundle_projection.js",
|
|
119
|
+
"bytes": 2504,
|
|
120
|
+
"sha256": "9aa0933b636d6326197f73ef25d4f1a99533a26ce132c3ee06128bec8cd91c9d"
|
|
111
121
|
},
|
|
112
122
|
{
|
|
113
123
|
"path": "packages/bundler/dist/src/command.d.ts",
|
|
@@ -116,18 +126,38 @@
|
|
|
116
126
|
},
|
|
117
127
|
{
|
|
118
128
|
"path": "packages/bundler/dist/src/command.js",
|
|
119
|
-
"bytes":
|
|
120
|
-
"sha256": "
|
|
129
|
+
"bytes": 6086,
|
|
130
|
+
"sha256": "39a4302c67457825502e2ad525309f3cf26ebb2bf2f957aa4b5d36bd391b53ab"
|
|
121
131
|
},
|
|
122
132
|
{
|
|
123
133
|
"path": "packages/bundler/dist/src/generated/bundle-manifest.d.ts",
|
|
124
|
-
"bytes":
|
|
125
|
-
"sha256": "
|
|
134
|
+
"bytes": 2500,
|
|
135
|
+
"sha256": "8599570ed61765e2f6e167c637f8ca7b2d83bf1c8fc44242c62aa0e2178ec290"
|
|
126
136
|
},
|
|
127
137
|
{
|
|
128
138
|
"path": "packages/bundler/dist/src/generated/bundle-manifest.js",
|
|
129
|
-
"bytes":
|
|
130
|
-
"sha256": "
|
|
139
|
+
"bytes": 646,
|
|
140
|
+
"sha256": "49a7197dfca225e5ab1a296562b6dd9cbf50bd101eefd8650994085b367a50c0"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"path": "packages/bundler/dist/src/generated/bundle-projection-validator.d.ts",
|
|
144
|
+
"bytes": 305,
|
|
145
|
+
"sha256": "86cb81c6de82addd637fd8fa92c51d2c541b22d434ec05eefa221bc51ead05cf"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"path": "packages/bundler/dist/src/generated/bundle-projection-validator.js",
|
|
149
|
+
"bytes": 18179,
|
|
150
|
+
"sha256": "0694b9888e27ba633c0ec73c4999f3c34edad3b09badd63ee04525e76ca88a19"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"path": "packages/bundler/dist/src/generated/bundle-projection.d.ts",
|
|
154
|
+
"bytes": 586,
|
|
155
|
+
"sha256": "a34237f3538de87ba5ac2c6e45d99c8a9043022dcde820b3915c67f210c043aa"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"path": "packages/bundler/dist/src/generated/bundle-projection.js",
|
|
159
|
+
"bytes": 83,
|
|
160
|
+
"sha256": "edf68d2007e1ca8c5aa32394cd7c3131e37265fef1c71bf390f2cc02ff02f559"
|
|
131
161
|
},
|
|
132
162
|
{
|
|
133
163
|
"path": "packages/bundler/dist/src/html_image.d.ts",
|
|
@@ -151,8 +181,8 @@
|
|
|
151
181
|
},
|
|
152
182
|
{
|
|
153
183
|
"path": "packages/bundler/dist/src/index.d.ts",
|
|
154
|
-
"bytes":
|
|
155
|
-
"sha256": "
|
|
184
|
+
"bytes": 381,
|
|
185
|
+
"sha256": "b88d6252d7a66b9cca0990ffa4d0f51474bd6a3715e795b42d932059620b9d1d"
|
|
156
186
|
},
|
|
157
187
|
{
|
|
158
188
|
"path": "packages/bundler/dist/src/index.js",
|
|
@@ -161,13 +191,13 @@
|
|
|
161
191
|
},
|
|
162
192
|
{
|
|
163
193
|
"path": "packages/bundler/dist/src/presentation.d.ts",
|
|
164
|
-
"bytes":
|
|
165
|
-
"sha256": "
|
|
194
|
+
"bytes": 2312,
|
|
195
|
+
"sha256": "b15d3a4c69baccfd6ed56628348dfba180ea698f77993b20b4a249572d7e0cb8"
|
|
166
196
|
},
|
|
167
197
|
{
|
|
168
198
|
"path": "packages/bundler/dist/src/presentation.js",
|
|
169
|
-
"bytes":
|
|
170
|
-
"sha256": "
|
|
199
|
+
"bytes": 20567,
|
|
200
|
+
"sha256": "62524b69029d27972163c19d3bb87832dbb7c1cb6e4b465715f4375e2ed84fca"
|
|
171
201
|
},
|
|
172
202
|
{
|
|
173
203
|
"path": "packages/launcher/dist/desktop-release.json",
|
|
@@ -256,13 +286,13 @@
|
|
|
256
286
|
},
|
|
257
287
|
{
|
|
258
288
|
"path": "packages/motion-gsap/dist/src/index.d.ts",
|
|
259
|
-
"bytes":
|
|
260
|
-
"sha256": "
|
|
289
|
+
"bytes": 1373,
|
|
290
|
+
"sha256": "ba8d7eb2017457cb59456aead7c09b04097ca744e935415db1d7880f02244b79"
|
|
261
291
|
},
|
|
262
292
|
{
|
|
263
293
|
"path": "packages/motion-gsap/dist/src/index.js",
|
|
264
|
-
"bytes":
|
|
265
|
-
"sha256": "
|
|
294
|
+
"bytes": 5806,
|
|
295
|
+
"sha256": "4041d9b2bd3736d4c72c21ed298d65258f8e5703d3e54986f8706553c5c2f354"
|
|
266
296
|
},
|
|
267
297
|
{
|
|
268
298
|
"path": "packages/runtime/dist/src/clock.d.ts",
|
|
@@ -276,8 +306,8 @@
|
|
|
276
306
|
},
|
|
277
307
|
{
|
|
278
308
|
"path": "packages/runtime/dist/src/generated/browser-request.d.ts",
|
|
279
|
-
"bytes":
|
|
280
|
-
"sha256": "
|
|
309
|
+
"bytes": 5010,
|
|
310
|
+
"sha256": "9bd56a97a68aa2a48c4ef94c104a77e18d4b6b95e4444d76fb461468f54640ce"
|
|
281
311
|
},
|
|
282
312
|
{
|
|
283
313
|
"path": "packages/runtime/dist/src/generated/browser-request.js",
|
|
@@ -286,8 +316,8 @@
|
|
|
286
316
|
},
|
|
287
317
|
{
|
|
288
318
|
"path": "packages/runtime/dist/src/generated/browser-response.d.ts",
|
|
289
|
-
"bytes":
|
|
290
|
-
"sha256": "
|
|
319
|
+
"bytes": 2540,
|
|
320
|
+
"sha256": "f0345c35a41f7f09961fa7df181a30d991116769e9ecb28dd0627e76a0a20034"
|
|
291
321
|
},
|
|
292
322
|
{
|
|
293
323
|
"path": "packages/runtime/dist/src/generated/browser-response.js",
|
|
@@ -296,13 +326,13 @@
|
|
|
296
326
|
},
|
|
297
327
|
{
|
|
298
328
|
"path": "packages/runtime/dist/src/generated/bundle-layout.d.ts",
|
|
299
|
-
"bytes":
|
|
300
|
-
"sha256": "
|
|
329
|
+
"bytes": 660,
|
|
330
|
+
"sha256": "213d9166593e39cedf85489b1415834fe95b6d6b95ec00ef0a56c9f10a37c736"
|
|
301
331
|
},
|
|
302
332
|
{
|
|
303
333
|
"path": "packages/runtime/dist/src/generated/bundle-layout.js",
|
|
304
|
-
"bytes":
|
|
305
|
-
"sha256": "
|
|
334
|
+
"bytes": 480,
|
|
335
|
+
"sha256": "f22f9910f25b67d0953fca16488b97531dcefb273938c7ed0fcf9d04552be90e"
|
|
306
336
|
},
|
|
307
337
|
{
|
|
308
338
|
"path": "packages/runtime/dist/src/generated/codec.d.ts",
|
|
@@ -316,23 +346,23 @@
|
|
|
316
346
|
},
|
|
317
347
|
{
|
|
318
348
|
"path": "packages/runtime/dist/src/generated/runtime-contract.d.ts",
|
|
319
|
-
"bytes":
|
|
320
|
-
"sha256": "
|
|
349
|
+
"bytes": 609,
|
|
350
|
+
"sha256": "ba1fac50be3c9494935fbc5d31c1e3037934e2d6dd1ca3adfe3d692575f68d27"
|
|
321
351
|
},
|
|
322
352
|
{
|
|
323
353
|
"path": "packages/runtime/dist/src/generated/runtime-contract.js",
|
|
324
|
-
"bytes":
|
|
325
|
-
"sha256": "
|
|
354
|
+
"bytes": 604,
|
|
355
|
+
"sha256": "3cc8116cc4d37c92643c672ef313bed7aa32ac466aeb8724e9563548a6d981ce"
|
|
326
356
|
},
|
|
327
357
|
{
|
|
328
358
|
"path": "packages/runtime/dist/src/generated/validators.d.ts",
|
|
329
359
|
"bytes": 594,
|
|
330
|
-
"sha256": "
|
|
360
|
+
"sha256": "def2eb2646ee3084b86e3871fae68581ab51f0a1af917e7cdf8913567d9d4667"
|
|
331
361
|
},
|
|
332
362
|
{
|
|
333
363
|
"path": "packages/runtime/dist/src/generated/validators.js",
|
|
334
|
-
"bytes":
|
|
335
|
-
"sha256": "
|
|
364
|
+
"bytes": 274203,
|
|
365
|
+
"sha256": "8e1309412309eeda69cd27a8b3a88935cdb8a8b61d0e6776a0a4ac472039e930"
|
|
336
366
|
},
|
|
337
367
|
{
|
|
338
368
|
"path": "packages/runtime/dist/src/host.d.ts",
|
|
@@ -346,13 +376,13 @@
|
|
|
346
376
|
},
|
|
347
377
|
{
|
|
348
378
|
"path": "packages/runtime/dist/src/index.d.ts",
|
|
349
|
-
"bytes":
|
|
350
|
-
"sha256": "
|
|
379
|
+
"bytes": 1895,
|
|
380
|
+
"sha256": "5faebc8e4726ec5261e174a55811536991ae0cf42135e0f43e5fb67e9df77eba"
|
|
351
381
|
},
|
|
352
382
|
{
|
|
353
383
|
"path": "packages/runtime/dist/src/index.js",
|
|
354
|
-
"bytes":
|
|
355
|
-
"sha256": "
|
|
384
|
+
"bytes": 1152,
|
|
385
|
+
"sha256": "10bb00b68b1aba0106334606c72a68227c2dbc9f997aaf99afd14c0502b18872"
|
|
356
386
|
},
|
|
357
387
|
{
|
|
358
388
|
"path": "packages/runtime/dist/src/media.d.ts",
|
|
@@ -366,13 +396,13 @@
|
|
|
366
396
|
},
|
|
367
397
|
{
|
|
368
398
|
"path": "packages/runtime/dist/src/presentation.d.ts",
|
|
369
|
-
"bytes":
|
|
370
|
-
"sha256": "
|
|
399
|
+
"bytes": 3943,
|
|
400
|
+
"sha256": "9f2abf95bc614f0a41a42c52f2563574afa24b126c1b266983cc72e1a0f83ee1"
|
|
371
401
|
},
|
|
372
402
|
{
|
|
373
403
|
"path": "packages/runtime/dist/src/presentation.js",
|
|
374
|
-
"bytes":
|
|
375
|
-
"sha256": "
|
|
404
|
+
"bytes": 17755,
|
|
405
|
+
"sha256": "de785ba109f6cf446d211cb05387f5d42d406a61f9cb9c5e38925fbd9c4bccbe"
|
|
376
406
|
},
|
|
377
407
|
{
|
|
378
408
|
"path": "packages/runtime/dist/src/resource.d.ts",
|
|
@@ -386,18 +416,18 @@
|
|
|
386
416
|
},
|
|
387
417
|
{
|
|
388
418
|
"path": "packages/runtime/dist/src/session.d.ts",
|
|
389
|
-
"bytes":
|
|
390
|
-
"sha256": "
|
|
419
|
+
"bytes": 2298,
|
|
420
|
+
"sha256": "28b12b59ac2e042ae6e571f861b5b70dec0779a08b6ad1cf8897b262bdbc51db"
|
|
391
421
|
},
|
|
392
422
|
{
|
|
393
423
|
"path": "packages/runtime/dist/src/session.js",
|
|
394
|
-
"bytes":
|
|
395
|
-
"sha256": "
|
|
424
|
+
"bytes": 20533,
|
|
425
|
+
"sha256": "6383f8ff8fda51e0c51b5c20d736c45bf9d36cc76dfb41bb87588ff0b72654b6"
|
|
396
426
|
},
|
|
397
427
|
{
|
|
398
428
|
"path": "packages/runtime/dist/src/types.d.ts",
|
|
399
|
-
"bytes":
|
|
400
|
-
"sha256": "
|
|
429
|
+
"bytes": 753,
|
|
430
|
+
"sha256": "20d1e1c41b5ed7ac43341b928a6ba331dd73fcf2fea2fe8534f0c523233358ff"
|
|
401
431
|
},
|
|
402
432
|
{
|
|
403
433
|
"path": "packages/runtime/dist/src/types.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onmark/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Screenplay-first deterministic browser video compiler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"yauzl": "3.4.0"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"@onmark/cli-darwin-arm64": "0.
|
|
49
|
-
"@onmark/cli-linux-x64": "0.
|
|
50
|
-
"@onmark/cli-win32-x64": "0.
|
|
48
|
+
"@onmark/cli-darwin-arm64": "0.5.0",
|
|
49
|
+
"@onmark/cli-linux-x64": "0.5.0",
|
|
50
|
+
"@onmark/cli-win32-x64": "0.5.0"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PresentationExtension, PresentationExtensionContext,
|
|
1
|
+
import type { PresentationExtension, PresentationExtensionContext, PresentationElementTargetKind } from "./motion.js";
|
|
2
2
|
/** One immutable sample inside a semantic element's solved interval. */
|
|
3
3
|
export interface FrameMotionContext {
|
|
4
4
|
readonly durationFrames: number;
|
|
@@ -9,9 +9,17 @@ export interface FrameMotionContext {
|
|
|
9
9
|
}
|
|
10
10
|
/** Applies browser-owned visual state for one exact local frame. */
|
|
11
11
|
export type FrameMotionHandler = (context: FrameMotionContext) => void;
|
|
12
|
+
/** Exact-frame transition sample with both related shot elements. */
|
|
13
|
+
export interface TransitionFrameMotionContext extends FrameMotionContext {
|
|
14
|
+
readonly incomingElement: HTMLElement;
|
|
15
|
+
readonly outgoingElement: HTMLElement;
|
|
16
|
+
}
|
|
17
|
+
/** Applies browser-owned transition state for one exact overlap frame. */
|
|
18
|
+
export type TransitionFrameMotionHandler = (context: TransitionFrameMotionContext) => void;
|
|
12
19
|
/** Semantic handlers and optional selector handlers for exact-frame motion. */
|
|
13
|
-
export type FrameMotionDefinition = Readonly<Partial<Record<
|
|
20
|
+
export type FrameMotionDefinition = Readonly<Partial<Record<PresentationElementTargetKind, FrameMotionHandler>> & {
|
|
14
21
|
readonly selectors?: Readonly<Record<string, FrameMotionHandler>>;
|
|
22
|
+
readonly transition?: TransitionFrameMotionHandler;
|
|
15
23
|
}>;
|
|
16
24
|
/** Creates local browser effects driven directly by exact runtime frames. */
|
|
17
25
|
export declare function frameMotion(definition: FrameMotionDefinition): PresentationExtension;
|
|
@@ -16,7 +16,7 @@ function bindEffects(rules, context) {
|
|
|
16
16
|
const effects = [];
|
|
17
17
|
for (const target of context.targets) {
|
|
18
18
|
const handlers = matchingHandlers(rules, target);
|
|
19
|
-
if (handlers.length > 0) {
|
|
19
|
+
if (handlers.elements.length > 0 || handlers.transition !== undefined) {
|
|
20
20
|
effects.push(bindEffect(target, handlers, context.frameRate));
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -35,9 +35,12 @@ function bindEffect(target, handlers, frameRate) {
|
|
|
35
35
|
element: target.element,
|
|
36
36
|
frameRate,
|
|
37
37
|
localFrame,
|
|
38
|
-
progress: localFrame
|
|
38
|
+
progress: targetProgress(target, localFrame, durationFrames),
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
if (target.kind === "transition" && handlers.transition !== undefined) {
|
|
41
|
+
handlers.transition(transitionSample(sample, target));
|
|
42
|
+
}
|
|
43
|
+
for (const handler of handlers.elements) {
|
|
41
44
|
handler(sample);
|
|
42
45
|
}
|
|
43
46
|
},
|
|
@@ -57,7 +60,11 @@ function ownRules(definition) {
|
|
|
57
60
|
caption: definition.caption,
|
|
58
61
|
});
|
|
59
62
|
const selectors = Object.freeze(Object.entries(definition.selectors ?? {}).map(ownSelector));
|
|
60
|
-
return Object.freeze({
|
|
63
|
+
return Object.freeze({
|
|
64
|
+
kinds,
|
|
65
|
+
selectors,
|
|
66
|
+
transition: definition.transition,
|
|
67
|
+
});
|
|
61
68
|
}
|
|
62
69
|
function ownSelector([selector, apply]) {
|
|
63
70
|
if (selector.trim().length === 0) {
|
|
@@ -67,7 +74,7 @@ function ownSelector([selector, apply]) {
|
|
|
67
74
|
}
|
|
68
75
|
function matchingHandlers(rules, target) {
|
|
69
76
|
const handlers = [];
|
|
70
|
-
const kind = rules.kinds[target.kind];
|
|
77
|
+
const kind = target.kind === "transition" ? undefined : rules.kinds[target.kind];
|
|
71
78
|
if (kind !== undefined) {
|
|
72
79
|
handlers.push(kind);
|
|
73
80
|
}
|
|
@@ -76,5 +83,21 @@ function matchingHandlers(rules, target) {
|
|
|
76
83
|
handlers.push(rule.apply);
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
|
-
return
|
|
86
|
+
return Object.freeze({
|
|
87
|
+
elements: Object.freeze(handlers),
|
|
88
|
+
transition: target.kind === "transition" ? rules.transition : undefined,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function targetProgress(target, localFrame, durationFrames) {
|
|
92
|
+
if (target.kind !== "transition") {
|
|
93
|
+
return localFrame / durationFrames;
|
|
94
|
+
}
|
|
95
|
+
return durationFrames === 1 ? 1 : localFrame / (durationFrames - 1);
|
|
96
|
+
}
|
|
97
|
+
function transitionSample(sample, target) {
|
|
98
|
+
return Object.freeze({
|
|
99
|
+
...sample,
|
|
100
|
+
incomingElement: target.incomingElement,
|
|
101
|
+
outgoingElement: target.outgoingElement,
|
|
102
|
+
});
|
|
80
103
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { frameMotion, type FrameMotionContext, type FrameMotionDefinition, type FrameMotionHandler, } from "./frame-motion.js";
|
|
1
|
+
export { frameMotion, type FrameMotionContext, type FrameMotionDefinition, type FrameMotionHandler, type TransitionFrameMotionContext, type TransitionFrameMotionHandler, } from "./frame-motion.js";
|
|
2
2
|
export { easing, interpolate, type EasingFunction, type Extrapolation, type InterpolationOptions, } from "./interpolation.js";
|
|
3
3
|
export { spring, type SpringFrame, type SpringOptions } from "./spring.js";
|
|
4
|
-
export { combineMotion, type PresentationExtension, type PresentationExtensionContext, type PresentationTarget, type PresentationTargetKind, } from "./motion.js";
|
|
4
|
+
export { combineMotion, type PresentationExtension, type PresentationExtensionContext, type PresentationElementTarget, type PresentationElementTargetKind, type PresentationTarget, type PresentationTargetKind, type PresentationTransitionTarget, } from "./motion.js";
|
|
5
5
|
export { createDomPresentationBindings, type DomPresentationOptions, type VideoSource, } from "./presentation.js";
|
|
6
6
|
export { createFontResource, createImageResource, type FontResource, type FontResourceOptions, type ImageResource, type ImageResourceOptions, } from "./resource.js";
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { PresentationExtensions, RuntimeNode, RuntimePlan } from "../../../runtime/dist/src/index.js";
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly kind: PresentationTargetKind;
|
|
2
|
+
export type PresentationElementTargetKind = "film" | "scene" | "shot" | "video" | "title" | "callToAction" | "caption";
|
|
3
|
+
export type PresentationTargetKind = PresentationElementTargetKind | "transition";
|
|
4
|
+
interface PresentationTargetBase {
|
|
6
5
|
readonly element: HTMLElement;
|
|
7
6
|
readonly interval: RuntimePlan["evaluation"];
|
|
8
7
|
readonly node: RuntimeNode;
|
|
9
8
|
}
|
|
9
|
+
/** One semantic element and its compiler-owned active interval. */
|
|
10
|
+
export interface PresentationElementTarget extends PresentationTargetBase {
|
|
11
|
+
readonly kind: PresentationElementTargetKind;
|
|
12
|
+
}
|
|
13
|
+
/** One transition marker and the exact adjacent elements it relates. */
|
|
14
|
+
export interface PresentationTransitionTarget extends PresentationTargetBase {
|
|
15
|
+
readonly kind: "transition";
|
|
16
|
+
readonly incomingElement: HTMLElement;
|
|
17
|
+
readonly outgoingElement: HTMLElement;
|
|
18
|
+
}
|
|
19
|
+
/** Closed browser-owned view of one compiler-projected semantic target. */
|
|
20
|
+
export type PresentationTarget = PresentationElementTarget | PresentationTransitionTarget;
|
|
10
21
|
/** Complete immutable DOM view delivered after all solved facts are bound. */
|
|
11
22
|
export interface PresentationExtensionContext {
|
|
12
23
|
readonly frameRate: RuntimePlan["frameRate"];
|
|
@@ -21,3 +32,4 @@ export declare function combineMotion(...extensions: readonly PresentationExtens
|
|
|
21
32
|
export declare const EMPTY_PRESENTATION_EXTENSIONS: PresentationExtensions;
|
|
22
33
|
export declare function ownExtension(extension: PresentationExtension): PresentationExtension;
|
|
23
34
|
export declare function ownExtensions(extensions: PresentationExtensions): PresentationExtensions;
|
|
35
|
+
export {};
|