@motionscript/core 0.1.0-alpha.0 → 0.1.0-alpha.5

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 (767) hide show
  1. package/CHANGELOG.md +282 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +48 -0
  4. package/README.md +93 -72
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +9 -0
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +11 -0
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts.map +1 -1
  11. package/dist/assets/errors.js +8 -3
  12. package/dist/assets/errors.js.map +1 -1
  13. package/dist/assets/index.js.map +1 -1
  14. package/dist/assets/manager.d.ts +26 -1
  15. package/dist/assets/manager.d.ts.map +1 -1
  16. package/dist/assets/manager.js +93 -11
  17. package/dist/assets/manager.js.map +1 -1
  18. package/dist/assets/manifest.js.map +1 -1
  19. package/dist/assets/record.js.map +1 -1
  20. package/dist/assets/scope.d.ts +3 -3
  21. package/dist/assets/scope.d.ts.map +1 -1
  22. package/dist/assets/scope.js.map +1 -1
  23. package/dist/attributes/audio/filters/chain.d.ts +1 -1
  24. package/dist/attributes/audio/filters/chain.js.map +1 -1
  25. package/dist/attributes/audio/filters/curve.d.ts +8 -8
  26. package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
  27. package/dist/attributes/audio/filters/curve.js +20 -19
  28. package/dist/attributes/audio/filters/curve.js.map +1 -1
  29. package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
  30. package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
  31. package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
  32. package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
  33. package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
  34. package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
  35. package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
  36. package/dist/attributes/audio/filters/index.d.ts +1 -1
  37. package/dist/attributes/audio/filters/index.d.ts.map +1 -1
  38. package/dist/attributes/audio/filters/index.js +1 -1
  39. package/dist/attributes/audio/filters/index.js.map +1 -1
  40. package/dist/attributes/audio/filters/registry.js.map +1 -1
  41. package/dist/attributes/audio/filters/union.js.map +1 -1
  42. package/dist/attributes/audio/request.d.ts +32 -4
  43. package/dist/attributes/audio/request.d.ts.map +1 -1
  44. package/dist/attributes/audio/request.js +9 -1
  45. package/dist/attributes/audio/request.js.map +1 -1
  46. package/dist/attributes/audio/schedule.d.ts +11 -2
  47. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  48. package/dist/attributes/audio/schedule.js +15 -8
  49. package/dist/attributes/audio/schedule.js.map +1 -1
  50. package/dist/attributes/audio/sound.d.ts +4 -2
  51. package/dist/attributes/audio/sound.d.ts.map +1 -1
  52. package/dist/attributes/audio/sound.js +8 -4
  53. package/dist/attributes/audio/sound.js.map +1 -1
  54. package/dist/attributes/index.d.ts +1 -0
  55. package/dist/attributes/index.d.ts.map +1 -1
  56. package/dist/attributes/index.js +1 -0
  57. package/dist/attributes/index.js.map +1 -1
  58. package/dist/attributes/layout/alignment.js +1 -1
  59. package/dist/attributes/layout/alignment.js.map +1 -1
  60. package/dist/attributes/layout/index.js.map +1 -1
  61. package/dist/attributes/layout/insets.js.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js.map +1 -1
  63. package/dist/attributes/layout/size.js.map +1 -1
  64. package/dist/attributes/layout/transform3d.js.map +1 -1
  65. package/dist/attributes/layout/vector2.js.map +1 -1
  66. package/dist/attributes/layout/world-transform.js.map +1 -1
  67. package/dist/attributes/mask/boolean.js.map +1 -1
  68. package/dist/attributes/mask/mask.js.map +1 -1
  69. package/dist/attributes/properties/decorator.d.ts +17 -6
  70. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  71. package/dist/attributes/properties/decorator.js +26 -14
  72. package/dist/attributes/properties/decorator.js.map +1 -1
  73. package/dist/attributes/properties/inputs.js.map +1 -1
  74. package/dist/attributes/properties/typed.d.ts +9 -2
  75. package/dist/attributes/properties/typed.d.ts.map +1 -1
  76. package/dist/attributes/properties/typed.js +15 -1
  77. package/dist/attributes/properties/typed.js.map +1 -1
  78. package/dist/attributes/render3d/orbit.d.ts +8 -8
  79. package/dist/attributes/render3d/orbit.js +7 -7
  80. package/dist/attributes/render3d/orbit.js.map +1 -1
  81. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  82. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  83. package/dist/attributes/shape/corners/corners.js.map +1 -1
  84. package/dist/attributes/shape/corners/index.js.map +1 -1
  85. package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
  86. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  87. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  88. package/dist/attributes/shape/effects/chain.d.ts +28 -120
  89. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  90. package/dist/attributes/shape/effects/chain.js +16 -88
  91. package/dist/attributes/shape/effects/chain.js.map +1 -1
  92. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  93. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  94. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  95. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  96. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  97. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  98. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  99. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  100. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +2 -2
  101. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  102. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
  103. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  104. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  105. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  106. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  108. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/glass.d.ts +15 -24
  110. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  112. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/lut.d.ts +1 -1
  119. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/shader.js +15 -8
  133. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  137. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  139. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  141. package/dist/attributes/shape/effects/index.d.ts +2 -6
  142. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  143. package/dist/attributes/shape/effects/index.js.map +1 -1
  144. package/dist/attributes/shape/effects/registry.d.ts +23 -6
  145. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  146. package/dist/attributes/shape/effects/registry.js +44 -10
  147. package/dist/attributes/shape/effects/registry.js.map +1 -1
  148. package/dist/attributes/shape/effects/union.d.ts +2 -6
  149. package/dist/attributes/shape/effects/union.d.ts.map +1 -1
  150. package/dist/attributes/shape/effects/union.js.map +1 -1
  151. package/dist/attributes/shape/fill/blend.js.map +1 -1
  152. package/dist/attributes/shape/fill/chain.js.map +1 -1
  153. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  154. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  155. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  156. package/dist/attributes/shape/fill/color/parser.js +81 -44
  157. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  158. package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
  159. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
  160. package/dist/attributes/shape/fill/gradient-stops.js +65 -0
  161. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
  162. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  163. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  164. package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
  165. package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
  166. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  167. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  168. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  169. package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
  170. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  171. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  172. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  173. package/dist/attributes/shape/fill/implementations/image.js +5 -4
  174. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  175. package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
  176. package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
  177. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  178. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  179. package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
  180. package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
  181. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  182. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  183. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  184. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  185. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  186. package/dist/attributes/shape/fill/index.js.map +1 -1
  187. package/dist/attributes/shape/fill/lerp.d.ts +9 -1
  188. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  189. package/dist/attributes/shape/fill/lerp.js +12 -1
  190. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  191. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  192. package/dist/attributes/shape/fill/registry.js.map +1 -1
  193. package/dist/attributes/shape/fill/union.js.map +1 -1
  194. package/dist/attributes/shape/filters/chain.d.ts +4 -10
  195. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  196. package/dist/attributes/shape/filters/chain.js +1 -13
  197. package/dist/attributes/shape/filters/chain.js.map +1 -1
  198. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  199. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  200. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  201. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  202. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  203. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  204. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  205. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  206. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  207. package/dist/attributes/shape/filters/index.d.ts +1 -1
  208. package/dist/attributes/shape/filters/index.js.map +1 -1
  209. package/dist/attributes/shape/filters/registry.d.ts +2 -2
  210. package/dist/attributes/shape/filters/registry.js +3 -3
  211. package/dist/attributes/shape/filters/registry.js.map +1 -1
  212. package/dist/attributes/shape/filters/union.d.ts +6 -7
  213. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  214. package/dist/attributes/shape/filters/union.js.map +1 -1
  215. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  216. package/dist/attributes/shape/path/anchors.js +12 -5
  217. package/dist/attributes/shape/path/anchors.js.map +1 -1
  218. package/dist/attributes/shape/path/bezier.js.map +1 -1
  219. package/dist/attributes/shape/path/index.js.map +1 -1
  220. package/dist/attributes/shape/path/measure.js.map +1 -1
  221. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  222. package/dist/attributes/shape/path/morph.js +16 -4
  223. package/dist/attributes/shape/path/morph.js.map +1 -1
  224. package/dist/attributes/shape/path/ops.js.map +1 -1
  225. package/dist/attributes/shape/path/types.js.map +1 -1
  226. package/dist/attributes/shape/path/walk.js.map +1 -1
  227. package/dist/attributes/shape/shaders/index.js.map +1 -1
  228. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  229. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  230. package/dist/attributes/shape/shadow/index.js.map +1 -1
  231. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  232. package/dist/attributes/shape/stroke/index.d.ts +2 -2
  233. package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
  234. package/dist/attributes/shape/stroke/index.js +1 -1
  235. package/dist/attributes/shape/stroke/index.js.map +1 -1
  236. package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
  237. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  238. package/dist/attributes/shape/stroke/stroke.js +22 -2
  239. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  240. package/dist/attributes/shared/operators.js.map +1 -1
  241. package/dist/attributes/text/index.js.map +1 -1
  242. package/dist/attributes/text/ops.d.ts +6 -0
  243. package/dist/attributes/text/ops.d.ts.map +1 -1
  244. package/dist/attributes/text/ops.js +1 -0
  245. package/dist/attributes/text/ops.js.map +1 -1
  246. package/dist/attributes/text/types.js.map +1 -1
  247. package/dist/browser/chunks/chunk-FUZVFT3W.js +18 -0
  248. package/dist/browser/chunks/chunk-FUZVFT3W.js.map +7 -0
  249. package/dist/browser/chunks/chunk-QG6C23IJ.js +3 -0
  250. package/dist/browser/chunks/chunk-QG6C23IJ.js.map +7 -0
  251. package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
  252. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
  253. package/dist/browser/component.js +1 -1
  254. package/dist/browser/component.js.map +3 -3
  255. package/dist/browser/index.js +1 -1
  256. package/dist/browser/index.js.map +4 -4
  257. package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
  258. package/dist/browser/jsx-jsx-runtime.js +1 -1
  259. package/dist/browser/manifest.json +3 -2
  260. package/dist/browser/sdk.js +1 -1
  261. package/dist/component.js.map +1 -1
  262. package/dist/document/audio.d.ts +1 -1
  263. package/dist/document/audio.js +4 -4
  264. package/dist/document/audio.js.map +1 -1
  265. package/dist/document/builtins.d.ts.map +1 -1
  266. package/dist/document/builtins.js +8 -14
  267. package/dist/document/builtins.js.map +1 -1
  268. package/dist/document/command-traits.d.ts +1 -1
  269. package/dist/document/command-traits.d.ts.map +1 -1
  270. package/dist/document/command-traits.js +17 -3
  271. package/dist/document/command-traits.js.map +1 -1
  272. package/dist/document/deny-globals.js.map +1 -1
  273. package/dist/document/diff.js.map +1 -1
  274. package/dist/document/doc-index.d.ts +2 -2
  275. package/dist/document/doc-index.d.ts.map +1 -1
  276. package/dist/document/doc-index.js.map +1 -1
  277. package/dist/document/expression/compile.d.ts.map +1 -1
  278. package/dist/document/expression/compile.js +8 -5
  279. package/dist/document/expression/compile.js.map +1 -1
  280. package/dist/document/expression/index.js.map +1 -1
  281. package/dist/document/expression/ops.js +1 -1
  282. package/dist/document/expression/ops.js.map +1 -1
  283. package/dist/document/expression/parse.d.ts.map +1 -1
  284. package/dist/document/expression/parse.js +15 -6
  285. package/dist/document/expression/parse.js.map +1 -1
  286. package/dist/document/expression/refs.d.ts +1 -1
  287. package/dist/document/expression/refs.js +1 -1
  288. package/dist/document/expression/refs.js.map +1 -1
  289. package/dist/document/expression/types.js.map +1 -1
  290. package/dist/document/expression/walk.d.ts.map +1 -1
  291. package/dist/document/expression/walk.js +2 -1
  292. package/dist/document/expression/walk.js.map +1 -1
  293. package/dist/document/index.d.ts +2 -0
  294. package/dist/document/index.d.ts.map +1 -1
  295. package/dist/document/index.js +2 -0
  296. package/dist/document/index.js.map +1 -1
  297. package/dist/document/node-decorator.js.map +1 -1
  298. package/dist/document/node-descriptor.d.ts +19 -0
  299. package/dist/document/node-descriptor.d.ts.map +1 -1
  300. package/dist/document/node-descriptor.js.map +1 -1
  301. package/dist/document/placement.d.ts +70 -0
  302. package/dist/document/placement.d.ts.map +1 -0
  303. package/dist/document/placement.js +83 -0
  304. package/dist/document/placement.js.map +1 -0
  305. package/dist/document/project.d.ts +2 -2
  306. package/dist/document/project.d.ts.map +1 -1
  307. package/dist/document/project.js.map +1 -1
  308. package/dist/document/registry.d.ts +34 -16
  309. package/dist/document/registry.d.ts.map +1 -1
  310. package/dist/document/registry.js +51 -12
  311. package/dist/document/registry.js.map +1 -1
  312. package/dist/document/timeline-patch.js.map +1 -1
  313. package/dist/document/timeline.d.ts +73 -18
  314. package/dist/document/timeline.d.ts.map +1 -1
  315. package/dist/document/timeline.js +192 -40
  316. package/dist/document/timeline.js.map +1 -1
  317. package/dist/document/types.d.ts +12 -12
  318. package/dist/document/types.d.ts.map +1 -1
  319. package/dist/document/types.js +2 -2
  320. package/dist/document/types.js.map +1 -1
  321. package/dist/document/validate.d.ts +2 -2
  322. package/dist/document/validate.d.ts.map +1 -1
  323. package/dist/document/validate.js +37 -31
  324. package/dist/document/validate.js.map +1 -1
  325. package/dist/document/withdraw.d.ts +28 -0
  326. package/dist/document/withdraw.d.ts.map +1 -0
  327. package/dist/document/withdraw.js +61 -0
  328. package/dist/document/withdraw.js.map +1 -0
  329. package/dist/index.d.ts +1 -0
  330. package/dist/index.d.ts.map +1 -1
  331. package/dist/index.js +1 -0
  332. package/dist/index.js.map +1 -1
  333. package/dist/jsx/jsx-dev-runtime.js.map +1 -1
  334. package/dist/jsx/jsx-runtime.d.ts +9 -1
  335. package/dist/jsx/jsx-runtime.d.ts.map +1 -1
  336. package/dist/jsx/jsx-runtime.js +13 -3
  337. package/dist/jsx/jsx-runtime.js.map +1 -1
  338. package/dist/layout/bounds.d.ts +0 -1
  339. package/dist/layout/bounds.d.ts.map +1 -1
  340. package/dist/layout/bounds.js.map +1 -1
  341. package/dist/layout/constraints.js.map +1 -1
  342. package/dist/layout/flex.d.ts +4 -2
  343. package/dist/layout/flex.d.ts.map +1 -1
  344. package/dist/layout/flex.js +27 -11
  345. package/dist/layout/flex.js.map +1 -1
  346. package/dist/layout/freeform.js.map +1 -1
  347. package/dist/layout/grid.js.map +1 -1
  348. package/dist/layout/index.js.map +1 -1
  349. package/dist/layout/item.js.map +1 -1
  350. package/dist/layout/ops.d.ts +6 -0
  351. package/dist/layout/ops.d.ts.map +1 -1
  352. package/dist/layout/ops.js +6 -0
  353. package/dist/layout/ops.js.map +1 -1
  354. package/dist/layout/types.js.map +1 -1
  355. package/dist/nodes/2d/node-lifecycle.js.map +1 -1
  356. package/dist/nodes/2d/node-motion.js.map +1 -1
  357. package/dist/nodes/2d/node-render.d.ts +3 -3
  358. package/dist/nodes/2d/node-render.d.ts.map +1 -1
  359. package/dist/nodes/2d/node-render.js.map +1 -1
  360. package/dist/nodes/2d/node-transform.js.map +1 -1
  361. package/dist/nodes/2d/node2d.d.ts +115 -3
  362. package/dist/nodes/2d/node2d.d.ts.map +1 -1
  363. package/dist/nodes/2d/node2d.js +188 -32
  364. package/dist/nodes/2d/node2d.js.map +1 -1
  365. package/dist/nodes/2d/paint-node.d.ts +27 -0
  366. package/dist/nodes/2d/paint-node.d.ts.map +1 -1
  367. package/dist/nodes/2d/paint-node.js +42 -0
  368. package/dist/nodes/2d/paint-node.js.map +1 -1
  369. package/dist/nodes/audio/audio-bus.js.map +1 -1
  370. package/dist/nodes/audio/index.js.map +1 -1
  371. package/dist/nodes/audio/node-audio.d.ts +3 -2
  372. package/dist/nodes/audio/node-audio.d.ts.map +1 -1
  373. package/dist/nodes/audio/node-audio.js +8 -5
  374. package/dist/nodes/audio/node-audio.js.map +1 -1
  375. package/dist/nodes/audio/sound-node.d.ts +2 -2
  376. package/dist/nodes/audio/sound-node.d.ts.map +1 -1
  377. package/dist/nodes/audio/sound-node.js +2 -2
  378. package/dist/nodes/audio/sound-node.js.map +1 -1
  379. package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
  380. package/dist/nodes/geometry/bounds-shape-node.js +2 -2
  381. package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
  382. package/dist/nodes/geometry/box-path-node.d.ts +3 -3
  383. package/dist/nodes/geometry/box-path-node.js +2 -2
  384. package/dist/nodes/geometry/box-path-node.js.map +1 -1
  385. package/dist/nodes/geometry/ellipse-node.js.map +1 -1
  386. package/dist/nodes/geometry/group-bounds.d.ts +2 -2
  387. package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
  388. package/dist/nodes/geometry/group-bounds.js +1 -2
  389. package/dist/nodes/geometry/group-bounds.js.map +1 -1
  390. package/dist/nodes/geometry/path-node.d.ts.map +1 -1
  391. package/dist/nodes/geometry/path-node.js +6 -0
  392. package/dist/nodes/geometry/path-node.js.map +1 -1
  393. package/dist/nodes/geometry/polygon-node.js.map +1 -1
  394. package/dist/nodes/geometry/polygram-node.js.map +1 -1
  395. package/dist/nodes/geometry/rect-node.js.map +1 -1
  396. package/dist/nodes/geometry/shape-node.js.map +1 -1
  397. package/dist/nodes/geometry/shape-outline.d.ts +2 -2
  398. package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
  399. package/dist/nodes/geometry/shape-outline.js +2 -13
  400. package/dist/nodes/geometry/shape-outline.js.map +1 -1
  401. package/dist/nodes/index.d.ts +3 -8
  402. package/dist/nodes/index.d.ts.map +1 -1
  403. package/dist/nodes/index.js +3 -8
  404. package/dist/nodes/index.js.map +1 -1
  405. package/dist/nodes/layout/camera-node.d.ts +9 -0
  406. package/dist/nodes/layout/camera-node.d.ts.map +1 -1
  407. package/dist/nodes/layout/camera-node.js +38 -3
  408. package/dist/nodes/layout/camera-node.js.map +1 -1
  409. package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
  410. package/dist/nodes/layout/orbit-camera-node.js +1 -1
  411. package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
  412. package/dist/nodes/layout/rotated-box.js.map +1 -1
  413. package/dist/nodes/media/video-node.d.ts.map +1 -1
  414. package/dist/nodes/media/video-node.js +5 -3
  415. package/dist/nodes/media/video-node.js.map +1 -1
  416. package/dist/nodes/node/declare-paints.js.map +1 -1
  417. package/dist/nodes/node/node-editor-state.js.map +1 -1
  418. package/dist/nodes/node/node-reactive.js.map +1 -1
  419. package/dist/nodes/node/node-time.d.ts +3 -3
  420. package/dist/nodes/node/node-time.d.ts.map +1 -1
  421. package/dist/nodes/node/node-time.js +1 -1
  422. package/dist/nodes/node/node-time.js.map +1 -1
  423. package/dist/nodes/node/node-walk.js.map +1 -1
  424. package/dist/nodes/node/node.d.ts +5 -3
  425. package/dist/nodes/node/node.d.ts.map +1 -1
  426. package/dist/nodes/node/node.js +44 -19
  427. package/dist/nodes/node/node.js.map +1 -1
  428. package/dist/nodes/node/text-defaults.d.ts +10 -12
  429. package/dist/nodes/node/text-defaults.d.ts.map +1 -1
  430. package/dist/nodes/node/text-defaults.js +10 -12
  431. package/dist/nodes/node/text-defaults.js.map +1 -1
  432. package/dist/nodes/{scene → root}/canvas2d-node.d.ts +2 -2
  433. package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
  434. package/dist/nodes/{scene → root}/canvas2d-node.js +2 -2
  435. package/dist/nodes/root/canvas2d-node.js.map +1 -0
  436. package/dist/nodes/root/provider-node.d.ts.map +1 -0
  437. package/dist/nodes/root/provider-node.js.map +1 -0
  438. package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
  439. package/dist/nodes/root/theme-provider-node.js.map +1 -0
  440. package/dist/nodes/text/default-text-style-node.d.ts +5 -2
  441. package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
  442. package/dist/nodes/text/default-text-style-node.js +10 -4
  443. package/dist/nodes/text/default-text-style-node.js.map +1 -1
  444. package/dist/nodes/text/number-format.d.ts +1 -1
  445. package/dist/nodes/text/number-format.js +1 -1
  446. package/dist/nodes/text/number-format.js.map +1 -1
  447. package/dist/nodes/text/number-node.js.map +1 -1
  448. package/dist/nodes/text/number-pattern.js.map +1 -1
  449. package/dist/nodes/text/richtext-node.js +1 -1
  450. package/dist/nodes/text/richtext-node.js.map +1 -1
  451. package/dist/nodes/text/text-base.d.ts.map +1 -1
  452. package/dist/nodes/text/text-base.js +1 -1
  453. package/dist/nodes/text/text-base.js.map +1 -1
  454. package/dist/nodes/text/text-node.js.map +1 -1
  455. package/dist/nodes/text/text-selection.js.map +1 -1
  456. package/dist/nodes/three/camera-nodes.d.ts +21 -3
  457. package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
  458. package/dist/nodes/three/camera-nodes.js +42 -1
  459. package/dist/nodes/three/camera-nodes.js.map +1 -1
  460. package/dist/nodes/three/canvas3d-node.d.ts +29 -6
  461. package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
  462. package/dist/nodes/three/canvas3d-node.js +44 -2
  463. package/dist/nodes/three/canvas3d-node.js.map +1 -1
  464. package/dist/nodes/three/drawable-nodes.d.ts +25 -11
  465. package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
  466. package/dist/nodes/three/drawable-nodes.js +43 -13
  467. package/dist/nodes/three/drawable-nodes.js.map +1 -1
  468. package/dist/nodes/three/environment-nodes.d.ts +9 -3
  469. package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
  470. package/dist/nodes/three/environment-nodes.js.map +1 -1
  471. package/dist/nodes/three/geometry-nodes.d.ts +2 -2
  472. package/dist/nodes/three/geometry-nodes.js +2 -2
  473. package/dist/nodes/three/geometry-nodes.js.map +1 -1
  474. package/dist/nodes/three/grid-geometry3d.js.map +1 -1
  475. package/dist/nodes/three/group3d.js.map +1 -1
  476. package/dist/nodes/three/light-nodes.d.ts.map +1 -1
  477. package/dist/nodes/three/light-nodes.js +3 -3
  478. package/dist/nodes/three/light-nodes.js.map +1 -1
  479. package/dist/nodes/three/mesh3d.js.map +1 -1
  480. package/dist/nodes/three/node3d.d.ts +48 -0
  481. package/dist/nodes/three/node3d.d.ts.map +1 -1
  482. package/dist/nodes/three/node3d.js +53 -3
  483. package/dist/nodes/three/node3d.js.map +1 -1
  484. package/dist/platform/audio-sink.d.ts +2 -2
  485. package/dist/platform/audio-sink.d.ts.map +1 -1
  486. package/dist/platform/audio-sink.js.map +1 -1
  487. package/dist/platform/exporter.d.ts +13 -8
  488. package/dist/platform/exporter.d.ts.map +1 -1
  489. package/dist/platform/exporter.js.map +1 -1
  490. package/dist/platform/index.d.ts +1 -1
  491. package/dist/platform/index.d.ts.map +1 -1
  492. package/dist/platform/index.js.map +1 -1
  493. package/dist/platform/stepped-clock.js.map +1 -1
  494. package/dist/platform/storage-adapter.d.ts +12 -6
  495. package/dist/platform/storage-adapter.d.ts.map +1 -1
  496. package/dist/platform/storage-adapter.js +4 -0
  497. package/dist/platform/storage-adapter.js.map +1 -1
  498. package/dist/platform/ticker.d.ts +6 -0
  499. package/dist/platform/ticker.d.ts.map +1 -1
  500. package/dist/platform/ticker.js +6 -0
  501. package/dist/platform/ticker.js.map +1 -1
  502. package/dist/project/config.js.map +1 -1
  503. package/dist/project/index.js.map +1 -1
  504. package/dist/project/tree.d.ts +3 -3
  505. package/dist/project/tree.d.ts.map +1 -1
  506. package/dist/project/tree.js.map +1 -1
  507. package/dist/props/host.js.map +1 -1
  508. package/dist/props/index.js.map +1 -1
  509. package/dist/props/observer.js.map +1 -1
  510. package/dist/props/slot.js.map +1 -1
  511. package/dist/renamed-scene-names.d.ts +17 -0
  512. package/dist/renamed-scene-names.d.ts.map +1 -0
  513. package/dist/renamed-scene-names.js +9 -0
  514. package/dist/renamed-scene-names.js.map +1 -0
  515. package/dist/render/canvas-render-context2d.d.ts +10 -3
  516. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  517. package/dist/render/canvas-render-context2d.js +10 -0
  518. package/dist/render/canvas-render-context2d.js.map +1 -1
  519. package/dist/render/clip-contains.js.map +1 -1
  520. package/dist/render/clip.js.map +1 -1
  521. package/dist/render/descriptors/ellipse.js.map +1 -1
  522. package/dist/render/descriptors/latex.js.map +1 -1
  523. package/dist/render/descriptors/line.js.map +1 -1
  524. package/dist/render/descriptors/path-builder.js.map +1 -1
  525. package/dist/render/descriptors/path.js.map +1 -1
  526. package/dist/render/descriptors/polygon.js.map +1 -1
  527. package/dist/render/descriptors/polygram.js.map +1 -1
  528. package/dist/render/descriptors/rect.js.map +1 -1
  529. package/dist/render/descriptors/richtext.js.map +1 -1
  530. package/dist/render/descriptors/shape.d.ts +12 -0
  531. package/dist/render/descriptors/shape.d.ts.map +1 -1
  532. package/dist/render/descriptors/shape.js.map +1 -1
  533. package/dist/render/descriptors/text.d.ts +2 -2
  534. package/dist/render/descriptors/text.js +2 -2
  535. package/dist/render/descriptors/text.js.map +1 -1
  536. package/dist/render/descriptors/transform.d.ts +2 -2
  537. package/dist/render/descriptors/transform.d.ts.map +1 -1
  538. package/dist/render/descriptors/transform.js.map +1 -1
  539. package/dist/render/graphics2d.d.ts +3 -3
  540. package/dist/render/graphics2d.d.ts.map +1 -1
  541. package/dist/render/graphics2d.js +1 -1
  542. package/dist/render/graphics2d.js.map +1 -1
  543. package/dist/render/index.js.map +1 -1
  544. package/dist/render/measure-context.js.map +1 -1
  545. package/dist/render/null-render-context.js.map +1 -1
  546. package/dist/render/render-context2d.d.ts +5 -5
  547. package/dist/render/render-context2d.d.ts.map +1 -1
  548. package/dist/render/render-context2d.js.map +1 -1
  549. package/dist/render/surface.js.map +1 -1
  550. package/dist/render/text-defaults.js.map +1 -1
  551. package/dist/render/text-layout.js.map +1 -1
  552. package/dist/render3d/bounds3d.d.ts.map +1 -1
  553. package/dist/render3d/bounds3d.js +4 -2
  554. package/dist/render3d/bounds3d.js.map +1 -1
  555. package/dist/render3d/builders.js.map +1 -1
  556. package/dist/render3d/camera.d.ts +6 -0
  557. package/dist/render3d/camera.d.ts.map +1 -1
  558. package/dist/render3d/camera.js +5 -3
  559. package/dist/render3d/camera.js.map +1 -1
  560. package/dist/render3d/fill3d.d.ts +2 -9
  561. package/dist/render3d/fill3d.d.ts.map +1 -1
  562. package/dist/render3d/fill3d.js +2 -13
  563. package/dist/render3d/fill3d.js.map +1 -1
  564. package/dist/render3d/geometry.d.ts +8 -1
  565. package/dist/render3d/geometry.d.ts.map +1 -1
  566. package/dist/render3d/geometry.js.map +1 -1
  567. package/dist/render3d/graphics3d.d.ts +8 -4
  568. package/dist/render3d/graphics3d.d.ts.map +1 -1
  569. package/dist/render3d/graphics3d.js +18 -10
  570. package/dist/render3d/graphics3d.js.map +1 -1
  571. package/dist/render3d/index.d.ts +1 -1
  572. package/dist/render3d/index.js +1 -1
  573. package/dist/render3d/index.js.map +1 -1
  574. package/dist/render3d/inert.d.ts +14 -0
  575. package/dist/render3d/inert.d.ts.map +1 -0
  576. package/dist/render3d/inert.js +62 -0
  577. package/dist/render3d/inert.js.map +1 -0
  578. package/dist/render3d/light.js.map +1 -1
  579. package/dist/render3d/material.d.ts +10 -5
  580. package/dist/render3d/material.d.ts.map +1 -1
  581. package/dist/render3d/material.js.map +1 -1
  582. package/dist/render3d/matrix4.js.map +1 -1
  583. package/dist/render3d/render-context3d.js.map +1 -1
  584. package/dist/render3d/resources.d.ts +2 -2
  585. package/dist/render3d/resources.js +2 -2
  586. package/dist/render3d/resources.js.map +1 -1
  587. package/dist/render3d/rounded-box.js.map +1 -1
  588. package/dist/render3d/scene-settings.d.ts +23 -4
  589. package/dist/render3d/scene-settings.d.ts.map +1 -1
  590. package/dist/render3d/scene-settings.js.map +1 -1
  591. package/dist/render3d/scene3d.d.ts +11 -0
  592. package/dist/render3d/scene3d.d.ts.map +1 -1
  593. package/dist/render3d/scene3d.js +39 -6
  594. package/dist/render3d/scene3d.js.map +1 -1
  595. package/dist/render3d/segments.js.map +1 -1
  596. package/dist/render3d/texture.d.ts +9 -0
  597. package/dist/render3d/texture.d.ts.map +1 -1
  598. package/dist/render3d/texture.js +13 -0
  599. package/dist/render3d/texture.js.map +1 -1
  600. package/dist/render3d/tracking.js.map +1 -1
  601. package/dist/render3d/transform.d.ts +1 -1
  602. package/dist/render3d/transform.js.map +1 -1
  603. package/dist/render3d/vector3.d.ts +18 -1
  604. package/dist/render3d/vector3.d.ts.map +1 -1
  605. package/dist/render3d/vector3.js +27 -0
  606. package/dist/render3d/vector3.js.map +1 -1
  607. package/dist/render3d/walk.d.ts +1 -1
  608. package/dist/render3d/walk.d.ts.map +1 -1
  609. package/dist/render3d/walk.js +5 -1
  610. package/dist/render3d/walk.js.map +1 -1
  611. package/dist/runtime/asset-refine.js.map +1 -1
  612. package/dist/runtime/asset-timeline.js.map +1 -1
  613. package/dist/runtime/asset-update.js.map +1 -1
  614. package/dist/runtime/audio-index.d.ts +2 -2
  615. package/dist/runtime/audio-index.d.ts.map +1 -1
  616. package/dist/runtime/audio-index.js +8 -2
  617. package/dist/runtime/audio-index.js.map +1 -1
  618. package/dist/runtime/builtin-context.js.map +1 -1
  619. package/dist/runtime/clip-instance.d.ts +5 -3
  620. package/dist/runtime/clip-instance.d.ts.map +1 -1
  621. package/dist/runtime/clip-instance.js +10 -6
  622. package/dist/runtime/clip-instance.js.map +1 -1
  623. package/dist/runtime/clip-store.d.ts +9 -0
  624. package/dist/runtime/clip-store.d.ts.map +1 -1
  625. package/dist/runtime/clip-store.js +33 -3
  626. package/dist/runtime/clip-store.js.map +1 -1
  627. package/dist/runtime/engine.d.ts +5 -0
  628. package/dist/runtime/engine.d.ts.map +1 -1
  629. package/dist/runtime/engine.js +2 -0
  630. package/dist/runtime/engine.js.map +1 -1
  631. package/dist/runtime/frame-time.d.ts +31 -0
  632. package/dist/runtime/frame-time.d.ts.map +1 -0
  633. package/dist/runtime/frame-time.js +29 -0
  634. package/dist/runtime/frame-time.js.map +1 -0
  635. package/dist/runtime/index.d.ts +1 -0
  636. package/dist/runtime/index.d.ts.map +1 -1
  637. package/dist/runtime/index.js +1 -0
  638. package/dist/runtime/index.js.map +1 -1
  639. package/dist/runtime/node-picking.d.ts +44 -3
  640. package/dist/runtime/node-picking.d.ts.map +1 -1
  641. package/dist/runtime/node-picking.js +118 -3
  642. package/dist/runtime/node-picking.js.map +1 -1
  643. package/dist/runtime/node-picking3d.d.ts +2 -1
  644. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  645. package/dist/runtime/node-picking3d.js +5 -2
  646. package/dist/runtime/node-picking3d.js.map +1 -1
  647. package/dist/runtime/placement.d.ts.map +1 -1
  648. package/dist/runtime/placement.js +4 -5
  649. package/dist/runtime/placement.js.map +1 -1
  650. package/dist/runtime/playback-controller.d.ts +31 -2
  651. package/dist/runtime/playback-controller.d.ts.map +1 -1
  652. package/dist/runtime/playback-controller.js +63 -6
  653. package/dist/runtime/playback-controller.js.map +1 -1
  654. package/dist/runtime/playback.js.map +1 -1
  655. package/dist/runtime/precompisition.js.map +1 -1
  656. package/dist/runtime/project-assets.js.map +1 -1
  657. package/dist/runtime/session.d.ts +9 -7
  658. package/dist/runtime/session.d.ts.map +1 -1
  659. package/dist/runtime/session.js +12 -4
  660. package/dist/runtime/session.js.map +1 -1
  661. package/dist/runtime/settle.js.map +1 -1
  662. package/dist/runtime/state-evaluator.d.ts +1 -1
  663. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  664. package/dist/runtime/state-evaluator.js +4 -3
  665. package/dist/runtime/state-evaluator.js.map +1 -1
  666. package/dist/runtime/text-geometry.js.map +1 -1
  667. package/dist/sdk/index.d.ts +27 -22
  668. package/dist/sdk/index.d.ts.map +1 -1
  669. package/dist/sdk/index.js +23 -9
  670. package/dist/sdk/index.js.map +1 -1
  671. package/dist/tween/command-decorator.d.ts +12 -4
  672. package/dist/tween/command-decorator.d.ts.map +1 -1
  673. package/dist/tween/command-decorator.js +10 -22
  674. package/dist/tween/command-decorator.js.map +1 -1
  675. package/dist/tween/command.js.map +1 -1
  676. package/dist/tween/ease/constants.d.ts.map +1 -1
  677. package/dist/tween/ease/constants.js +8 -5
  678. package/dist/tween/ease/constants.js.map +1 -1
  679. package/dist/tween/ease/curve.d.ts.map +1 -1
  680. package/dist/tween/ease/curve.js +4 -3
  681. package/dist/tween/ease/curve.js.map +1 -1
  682. package/dist/tween/ease/describe.d.ts +15 -0
  683. package/dist/tween/ease/describe.d.ts.map +1 -0
  684. package/dist/tween/ease/describe.js +37 -0
  685. package/dist/tween/ease/describe.js.map +1 -0
  686. package/dist/tween/ease/type.js.map +1 -1
  687. package/dist/tween/index.js.map +1 -1
  688. package/dist/tween/inert.js.map +1 -1
  689. package/dist/tween/lerp.js.map +1 -1
  690. package/dist/tween/loop.js.map +1 -1
  691. package/dist/tween/prepare.d.ts +3 -3
  692. package/dist/tween/prepare.js +3 -3
  693. package/dist/tween/prepare.js.map +1 -1
  694. package/dist/tween/seekable.d.ts +12 -1
  695. package/dist/tween/seekable.d.ts.map +1 -1
  696. package/dist/tween/seekable.js +15 -0
  697. package/dist/tween/seekable.js.map +1 -1
  698. package/dist/tween/stepper.js.map +1 -1
  699. package/dist/tween/to-command.js.map +1 -1
  700. package/dist/util/clamp.js.map +1 -1
  701. package/dist/util/context.js.map +1 -1
  702. package/dist/util/csv.js.map +1 -1
  703. package/dist/util/generateList.js.map +1 -1
  704. package/dist/util/index.js.map +1 -1
  705. package/dist/util/metrics.d.ts +1 -1
  706. package/dist/util/metrics.js +1 -1
  707. package/dist/util/metrics.js.map +1 -1
  708. package/dist/util/random.js.map +1 -1
  709. package/dist/util/reference.js.map +1 -1
  710. package/dist/util/scheduler.js.map +1 -1
  711. package/package.json +2 -1
  712. package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
  713. package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
  714. package/dist/attributes/shape/effects/implementations/displace.js +0 -30
  715. package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
  716. package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
  717. package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
  718. package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
  719. package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
  720. package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
  721. package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
  722. package/dist/attributes/shape/effects/implementations/texture.js +0 -25
  723. package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
  724. package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
  725. package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
  726. package/dist/attributes/shape/effects/implementations/trails.js +0 -22
  727. package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
  728. package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
  729. package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
  730. package/dist/browser/chunks/chunk-P3XQCHDW.js +0 -16
  731. package/dist/browser/chunks/chunk-P3XQCHDW.js.map +0 -7
  732. package/dist/browser/chunks/chunk-VJQMKHGQ.js +0 -3
  733. package/dist/browser/chunks/chunk-VJQMKHGQ.js.map +0 -7
  734. package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
  735. package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
  736. package/dist/nodes/geometry/dot-grid-node.js +0 -142
  737. package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
  738. package/dist/nodes/geometry/grid-lines.d.ts +0 -101
  739. package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
  740. package/dist/nodes/geometry/grid-lines.js +0 -128
  741. package/dist/nodes/geometry/grid-lines.js.map +0 -1
  742. package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
  743. package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
  744. package/dist/nodes/geometry/grid-pattern-node.js +0 -172
  745. package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
  746. package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
  747. package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
  748. package/dist/nodes/geometry/line-grid-node.js +0 -127
  749. package/dist/nodes/geometry/line-grid-node.js.map +0 -1
  750. package/dist/nodes/geometry/line-node.d.ts +0 -58
  751. package/dist/nodes/geometry/line-node.d.ts.map +0 -1
  752. package/dist/nodes/geometry/line-node.js +0 -123
  753. package/dist/nodes/geometry/line-node.js.map +0 -1
  754. package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
  755. package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
  756. package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
  757. package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
  758. package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
  759. package/dist/nodes/scene/canvas2d-node.js.map +0 -1
  760. package/dist/nodes/scene/provider-node.d.ts.map +0 -1
  761. package/dist/nodes/scene/provider-node.js.map +0 -1
  762. package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
  763. package/dist/nodes/scene/theme-provider-node.js.map +0 -1
  764. /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
  765. /package/dist/nodes/{scene → root}/provider-node.js +0 -0
  766. /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
  767. /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../src/document/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAqC,MAAM,4BAA4B,CAAC;AAGjH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAqB,MAAM,kBAAkB,CAAC;AACzH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAgB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAmB,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACt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,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAChC,IAAI,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;QACvD,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,GAAG,CAAC,EAAU;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IAEgB,OAAO,GAAyC,EAAE,CAAC;IACnD,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IACxD,qDAAqD;IAC7C,OAAO,GAAG,CAAC,CAAC;IACZ,KAAK,GAAG,CAAC,CAAC;IAElB,oFAAoF;IAC5E,WAAW,CAAC,OAAe;QAC/B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QAC7B,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;YACb,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;YAC5B,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,OAAO;gBAAE,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;;gBAC/C,EAAE,GAAG,GAAG,CAAC;QAClB,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAED,MAAM,OAAO,GAA2B,EAAE,CAAC","sourcesContent":["import { clamp01 } from \"@/util/clamp\";\nimport { applySnapshotLayer, captureLayer, type PropLayer, type ReactiveHost } from \"@/nodes/node/node-reactive\";\nimport type { Node } from \"@/nodes/node/node\";\nimport type { Canvas2D } from \"@/nodes/scene/canvas2d-node\";\nimport { _observer, PropSlot } from \"@/props/slot\";\nimport { LAYOUT_SLOT, observeSlots, PRESENCE_PREFIX, unobserved, VAR_PREFIX, type SlotObserver } from \"@/props/observer\";\nimport { driveCommand, loopCommand, type Command } from \"@/tween/command\";\nimport { loopRepeats } from \"@/tween/loop\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport { easeIn, easeInOut, easeOut, linear, type EaseParams } from \"@/tween/ease/constants\";\nimport { curveEase, isEaseCurve } from \"@/tween/ease/curve\";\nimport { commandNodeRefs, commandTraits, hasNodeRef, isContextProvider, isLayoutNeutralProp } from \"./command-traits\";\nimport { diffClip } from \"./diff\";\nimport { indexDocument, type DocIndex } from \"./doc-index\";\nimport { expressionOps } from \"./expression/ops\";\nimport type { VariableResolver } from \"./expression/types\";\nimport type { Registry, VariableTarget } from \"./registry\";\nimport { planTimelinePatch, type PatchEnvironment, type TimelinePatch } from \"./timeline-patch\";\nimport type { CommandSpec, EaseSpec, NodeSpec, NodeSpan, SceneDocument, VariableSpec } from \"./types\";\nimport { documentDuration, isStillDocument, nodeSpan, ROOT_NODE_ID } from \"./types\";\n\n/**\n * A compiled scene document: the thing that answers \"what does this look like\n * at `t`\" without having rendered `t - 1`.\n *\n * This is the whole reason the document model exists. A generator scene could\n * only be *advanced*, so a backward seek meant tearing the tree down and\n * replaying from frame 0, and a scene's duration was unknowable without running\n * it to the end. A timeline is built once and evaluated in any order, at any\n * time, as many times as you like — which is what makes scrubbing cheap, export\n * parallelizable, and a frame reproducible.\n *\n * ### The two phases, and why `from` needs both\n *\n * **Build** instantiates every node the document mentions and parents it.\n *\n * **Compile** then walks the commands in `at` order and asks each one's factory\n * for a {@link Command}. That order is load-bearing: a command's *start* value\n * is read from the node at the moment it is constructed (`node.to({x: 100})`\n * snapshots whatever `x` is now), so each command has to be built with the node\n * in the state its predecessors left. Compile therefore runs every command to\n * `at(1)` before building the next — see {@link compile}. Once built, a\n * `Command.at(t)` is pure, and the mutations compile caused are undone by\n * restoring the baseline.\n *\n * Building is O(commands) and happens once. Evaluating is what happens per\n * frame, and is O(commands) with no allocation.\n *\n * ### Variables and expressions\n *\n * A third thing gets built alongside the tree: one {@link PropSlot} per declared\n * {@link VariableSpec}, and a binding on every prop whose authored value is an\n * expression (`\"=4[g]+3\"` — see `document/expression.ts`). Those two together\n * are how one command drives many nodes.\n *\n * A binding is a thunk that reads the variable, and a bound prop recomputes on\n * every read — so `variableTo` writing the slot is visible to every prop that\n * names it, with nothing to invalidate and no edge to declare. A node driven\n * only by expressions is not in the animated list at all: there is no baseline\n * to restore, because nothing overwrote it.\n *\n * A reference spelled with a dot (`\"=[card.x]+20\"`) reads another node's prop\n * instead, through the same machinery — see `SceneTimeline._resolveVariable`\n * for why that one resolves at read time rather than at compile time.\n */\n\n/** A placed command as the runtime outside the timeline sees it. */\nexport interface PlacedCommandInfo {\n readonly spec: CommandSpec;\n /** Seconds from scene start. */\n readonly start: number;\n /** Seconds. Zero is a stamp — it applies in full from `start` onward. */\n readonly duration: number;\n /** Every slot building it and running it to its end wrote. */\n readonly writes: ReadonlySet<PropSlot<unknown>>;\n readonly readsLayout: boolean;\n}\n\ninterface PlacedCommand extends PlacedCommandInfo {\n readonly command: Command<Record<string, unknown>>;\n readonly writes: Set<PropSlot<unknown>>;\n /** What it acts on, so the animated lists can be rebuilt without resolving it again. */\n readonly owner: LiveNode | LiveVariable;\n}\n\n/**\n * A live variable: a slot nothing draws, that props read through an expression.\n *\n * A plain {@link PropSlot} rather than a node, because that is all a variable\n * needs to be. A prop bound to `() => slot.get()` re-reads it every time it is\n * read, so a `variableTo` writing this slot is picked up by every prop naming it\n * — with nothing in the node layer, the layout pass or the renderer knowing\n * variables exist.\n */\ninterface LiveVariable {\n spec: VariableSpec;\n /** Kept across an update: every binding compiled against it captured {@link read}, which reads this. */\n cell: PropSlot<unknown>;\n /** What an expression calls. Stable across the life of the build. */\n read: () => unknown;\n /** Handed to a variable command's factory. */\n target: VariableTarget;\n /** The declared value, restored before every evaluation. */\n baseline: unknown;\n}\n\n/** What `build` records about one node so evaluation can find and reset it. */\ninterface LiveNode {\n spec: NodeSpec;\n node: Node;\n /** Every reactive cell as the build left it, before any command or arrival touched it. */\n initial: PropLayer;\n initialStackDepth: number;\n /** What evaluation restores: {@link initial}, or the node as it arrived when it enters later. */\n baseline: PropLayer;\n /** Depth of the node's save stack at the baseline — see {@link SceneTimeline._restoreBaselines}. */\n baseStackDepth: number;\n /**\n * Whether the row is in the tree, as a slot, so a `[key.prop]` read taken under\n * an observer depends on it — the node answering can come and go.\n */\n presence: PropSlot<boolean>;\n}\n\n/** One stop of an update's walk: a command to build or replay, or an arrival baseline to take. */\ninterface WalkStep {\n at: number;\n spec?: CommandSpec;\n capture?: string;\n}\n\n/** Resolve an {@link EaseSpec} to the function the tween actually calls. */\nfunction resolveEase(ease: EaseSpec | undefined, registry: Registry): EasingFunction | undefined {\n if (!ease) return undefined;\n switch (ease.kind) {\n case \"linear\": return linear();\n case \"in\": return easeIn(ease.args as EaseParams | undefined);\n case \"out\": return easeOut(ease.args as EaseParams | undefined);\n case \"inOut\": return easeInOut(ease.args as EaseParams | undefined);\n case \"custom\": {\n const key = ease.args;\n if (isEaseCurve(key)) return curveEase(key);\n if (typeof key !== \"string\") {\n throw new Error(`A \"custom\" ease needs a curve or its Registry.addEase key in \\`args\\` (got ${JSON.stringify(ease.args)}).`);\n }\n const fn = registry.ease(key);\n if (!fn) {\n throw new Error(`No ease registered under \"${key}\". Registered: ${registry.easeKeys().join(\", \") || \"none\"}.`);\n }\n return fn;\n }\n }\n}\n\n/**\n * Order commands for compilation and evaluation.\n *\n * By `at`, then by the order they appear in the document. The tiebreak matters:\n * two commands sharing an `at` is how the model spells \"in parallel\", and when\n * both write the same prop the later one in the array wins — the same\n * last-writer rule `commandParallel` already uses, so the two compose\n * predictably.\n */\nfunction inTimelineOrder(commands: readonly CommandSpec[]): CommandSpec[] {\n return commands\n .map((spec, index) => ({ spec, index }))\n .sort((a, b) => (a.spec.at - b.spec.at) || (a.index - b.index))\n .map((e) => e.spec);\n}\n\n/** The scene root when a document doesn't author one explicitly. */\nfunction defaultRootSpec(): NodeSpec {\n return { id: ROOT_NODE_ID, type: \"canvas2d\", parentId: null, layerOrder: 0, props: {} };\n}\n\n/**\n * Split the scene root — the row with {@link ROOT_NODE_ID} and `type: \"canvas2d\"`\n * — out of the document's nodes.\n *\n * The root is an ordinary row, not a special field, but it is not an ordinary\n * *child*: it is the canvas itself, not something `build` instantiates or\n * `syncPresence` parents. Every other place that walks the nodes needs it removed\n * first; this is the one place that removal happens, synthesizing the default\n * when the document left it out.\n */\nfunction splitRoot(specs: NodeSpec[]): { root: NodeSpec; rest: NodeSpec[] } {\n const rest: NodeSpec[] = [];\n let root: NodeSpec | undefined;\n for (const spec of specs) {\n if (spec.id === ROOT_NODE_ID && spec.type === \"canvas2d\") {\n root = spec;\n continue;\n }\n rest.push(spec);\n }\n return { root: root ?? defaultRootSpec(), rest };\n}\n\n/**\n * When each node is in the tree.\n *\n * Read off the document rather than accumulated during playback: a span of\n * `[2, 5)` says the node is present at every seek in it, whether the playhead\n * arrived from 1s or from 9s. A still's nodes carry no span, so they are present\n * always.\n */\nfunction presenceOf(doc: SceneDocument): Map<string, NodeSpan> {\n const spans = new Map<string, NodeSpan>();\n for (const node of doc.nodes) spans.set(node.id, nodeSpan(node));\n // The root is always present; it is not synced like an ordinary child.\n spans.delete(ROOT_NODE_ID);\n return spans;\n}\n\n/**\n * The scene document, compiled and evaluable, over the one canvas it builds\n * into — its live nodes, presence and baselines all belong to that tree.\n */\nexport class SceneTimeline {\n constructor(doc: SceneDocument, registry: Registry, private readonly canvas: Canvas2D) {\n this._doc = doc;\n this._registry = registry;\n const { root, rest } = splitRoot(doc.nodes);\n this._rootSpec = root;\n this._specs = rest;\n this._varSpecs = doc.variables ?? [];\n // Built from the rows rather than from the tree: an expression resolves its\n // references the moment it compiles, which is before most nodes exist.\n this._keyed = new Map(\n [root, ...rest]\n .filter((spec): spec is NodeSpec & { key: string } => !!spec.key)\n .map((spec) => [spec.key, spec.id]),\n );\n this._spans = presenceOf(doc);\n // Declared, not measured, so it is known before anything is built.\n this._duration = documentDuration(doc);\n }\n\n /** How long the scene runs. Read by the runtime after {@link build}. */\n get duration(): number {\n return this._duration;\n }\n\n /** Instantiate the tree into the canvas. Once per timeline: the nodes it makes belong to that canvas. */\n build(): void {\n // Variables first: everything below may compile an expression, and an\n // expression resolves its `[id]`s the moment it is compiled.\n this._buildVariables();\n\n this._pristineRoot = captureLayer(this.canvas as unknown as ReactiveHost);\n this._applyRootProps();\n\n for (const spec of this._specs) {\n this._live.set(spec.id, {\n spec,\n node: this._instantiate(spec),\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\n });\n }\n\n // Record what each parent built for itself *before* any document child\n // lands, so a composite node's own children keep their indices. A\n // document child is always placed after them.\n this._baseChildCount.set(ROOT_NODE_ID, this.canvas._allChildren.length);\n for (const [id, entry] of this._live) {\n this._baseChildCount.set(id, entry.node._allChildren.length);\n }\n\n this.syncPresence(0);\n\n // The root's baseline is captured too: `targetId: null` commands animate\n // the camera and the scene fill, and those need resetting like anything\n // else.\n this._root = {\n spec: this._rootSpec,\n node: this.canvas,\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(true, null, PRESENCE_PREFIX + ROOT_NODE_ID),\n };\n for (const entry of this._live.values()) captureInitial(entry);\n captureInitial(this._root);\n this._baselined = new Set(this._present);\n }\n\n /**\n * Build every command against the laid-out tree, then put the tree back.\n *\n * Separate from {@link build} because a command may read post-layout state to\n * decide what it animates *from*: an animated `removeChildAt` pins the\n * departing child to its rendered width, which is zero until layout runs.\n *\n * `settle` re-lays the tree out. It runs whenever the walk brings a node in or\n * takes one out, so a command is built against the tree as it stands at its\n * own `at` — see {@link _compileCommands}.\n */\n compile(settle: () => void = () => { }): void {\n this._compileCommands(settle);\n this._restoreBaselines();\n if (this.syncPresence(0)) settle();\n }\n\n /** What a variable holds at the last evaluated time. For a host's inspector. */\n variableValue(id: string): unknown {\n return this._vars.get(id)?.cell.get();\n }\n\n /** Every variable this document declares, in declaration order. */\n variables(): readonly VariableSpec[] {\n return this._varSpecs;\n }\n\n /** Every compiled command, in timeline order — the indices {@link evaluateAt} reports writes under. */\n placedCommands(): readonly PlacedCommandInfo[] {\n return this._placed;\n }\n\n /**\n * Put every node into the state it holds at `seconds`.\n *\n * A pure function of `seconds`: called in any order, repeatedly, and with\n * time going backwards. Restoring the baseline first is what makes it so —\n * without it a prop written by a command that has *not started yet* would\n * keep whatever the last evaluation left, and the same frame would look\n * different depending on how the playhead reached it.\n *\n * `onWrite` reports each slot a command writes, with its index in\n * {@link placedCommands}; the baseline restore is not reported.\n */\n evaluateAt(seconds: number, onWrite?: (index: number, slot: PropSlot<unknown>) => void): void {\n if (onWrite) {\n // Unobserved: a baseline holds prop cells, never presence or structure, so\n // an observer watching for those learns nothing from a write per cell.\n unobserved(() => this._restoreBaselines());\n this._evaluateObserved(seconds, onWrite);\n return;\n }\n\n this._restoreBaselines();\n for (const placed of this._placed) {\n if (seconds < placed.start) continue;\n const local = placed.duration > 0\n ? (seconds - placed.start) / placed.duration\n : 1;\n // A finished command is held at `at(1)` rather than dropped, so a prop\n // written early and never touched again keeps its value — the same\n // rule `commandSequence` uses.\n placed.command.at(clamp01(local));\n }\n }\n\n /**\n * Add and remove document nodes so the tree matches `seconds`. Returns whether\n * anything moved.\n *\n * Separate from {@link evaluateAt} because it is structural: it changes what\n * layout walks, not what a prop holds. Called ahead of the evaluation for\n * the same time.\n */\n syncPresence(seconds: number): boolean {\n const rows = this._presenceIndex().crossed(seconds);\n // Nothing to do on the overwhelming majority of frames.\n if (rows.length === 0) return false;\n\n const arrivals: PresenceRow[] = [];\n const departures: PresenceRow[] = [];\n for (const row of rows) {\n const wanted = within(row, seconds);\n if (wanted !== this._present.has(row.id)) (wanted ? arrivals : departures).push(row);\n }\n this._arrived = arrivals;\n if (arrivals.length === 0 && departures.length === 0) return false;\n\n // Detach first: `remove` unmounts the whole subtree, so a node moving\n // parents is never briefly in two places.\n departures.sort(byDocumentOrder);\n for (const row of departures) {\n this._present.delete(row.id);\n row.siblings.add(row.slot, -1);\n const entry = this._live.get(row.id);\n if (!entry) continue;\n entry.presence.set(false);\n this._parentNodeOf(entry.spec)?.remove(entry.node);\n }\n\n // Insert after whatever the parent built for itself, at the row's place\n // among the siblings present, so `layerOrder` really is sibling order and a\n // composite's own children keep their indices. Ascending per parent, so\n // every sibling before a row is already in place when it lands.\n arrivals.sort(byDocumentOrder);\n const byParent = new Map<SiblingCounts, PresenceRow[]>();\n for (const row of arrivals) {\n const group = byParent.get(row.siblings);\n if (group) group.push(row);\n else byParent.set(row.siblings, [row]);\n }\n for (const [siblings, group] of byParent) {\n group.sort((a, b) => a.slot - b.slot);\n const parent = siblings.parentId === ROOT_NODE_ID ? this.canvas : this._live.get(siblings.parentId)?.node;\n const base = this._baseChildCount.get(siblings.parentId) ?? 0;\n for (const row of group) {\n this._present.add(row.id);\n const index = base + siblings.before(row.slot);\n siblings.add(row.slot, 1);\n const child = this._live.get(row.id);\n if (!child) continue;\n child.presence.set(true);\n parent?.addChildAt({ data: { child: child.node, index } });\n }\n }\n return true;\n }\n\n /** The node a row built, mounted or not; the canvas for the root. */\n liveNode(id: string): Node | undefined {\n return id === ROOT_NODE_ID ? this.canvas : this._live.get(id)?.node;\n }\n\n presenceSlot(id: string): PropSlot<boolean> | undefined {\n return id === ROOT_NODE_ID ? this._root?.presence : this._live.get(id)?.presence;\n }\n\n variableSlot(id: string): PropSlot<unknown> | undefined {\n return this._vars.get(id)?.cell;\n }\n\n /**\n * How to bring this built timeline to `next` in place, or `null` when only a\n * fresh build is sound. An audio document must be lowered by the caller first.\n */\n planUpdate(next: SceneDocument): TimelinePatch | null {\n const prev = this._docIndex ??= indexDocument(this._doc);\n return planTimelinePatch(prev, indexDocument(next), diffClip(this._doc, next), this._patchEnvironment());\n }\n\n /**\n * Apply a {@link planUpdate} result. The canvas must be attached at time 0\n * first, as for {@link build}; `prepare` samples and lays out like the step\n * between build and compile, `settle` like compile's. A throw leaves the\n * timeline unusable — dispose it and build fresh.\n */\n applyUpdate(patch: TimelinePatch, settle: () => void, prepare: () => void): void {\n if (!this._root) throw new Error(\"SceneTimeline.applyUpdate needs a built timeline.\");\n if (patch.prev !== this._docIndex) {\n throw new Error(\"This patch was planned against a different version of the document.\");\n }\n\n this._restoreBaselines();\n this.syncPresence(0);\n\n this._updateVariables(patch);\n this._keyed.clear();\n for (const [key, id] of patch.next.keyed) this._keyed.set(key, id);\n\n const fresh = this._updateStructure(patch);\n\n for (const entry of fresh) {\n captureInitial(entry);\n if (this._present.has(entry.spec.id)) this._baselined.add(entry.spec.id);\n }\n if (patch.diff.rootChanged) {\n const host = this.canvas as unknown as ReactiveHost;\n applySnapshotLayer(host, this._pristineRoot);\n host._stateStack.length = 0;\n this._applyRootProps();\n captureInitial(this._root);\n }\n for (const id of patch.dirtyNodes) {\n const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);\n if (entry && !fresh.has(entry)) resetToInitial(entry);\n }\n prepare();\n\n const previous = new Map<string, PlacedCommand>();\n for (const placed of this._placed) previous.set(placed.spec.id, placed);\n const rebuilt = this._walkPatch(patch, previous, settle);\n\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\n const placed: PlacedCommand[] = [];\n const touched = new Set<LiveNode | LiveVariable>();\n this._animated = [];\n this._animatedVars = [];\n if (!isStillDocument(this._doc)) {\n for (const spec of patch.next.ordered) {\n let entry = rebuilt.get(spec.id);\n if (!entry && !dirty(patch.next.targetOf(spec))) {\n const old = previous.get(spec.id);\n if (old) entry = old.spec === spec ? old : { ...old, spec };\n }\n if (!entry) continue;\n placed.push(entry);\n this._touch(entry, touched);\n }\n }\n this._placed = placed;\n\n this._restoreBaselines();\n if (this.syncPresence(0)) settle();\n }\n\n private _doc: SceneDocument;\n /** The vocabulary this document is compiled against — see `document/registry.ts`. */\n private readonly _registry: Registry;\n /** The scene root row — see {@link splitRoot}. */\n private _rootSpec: NodeSpec;\n private _specs: NodeSpec[];\n private _varSpecs: readonly VariableSpec[];\n private _spans: Map<string, NodeSpan>;\n private _duration: number;\n /** The current document's index, built on the first {@link planUpdate}. */\n private _docIndex: DocIndex | null = null;\n /** The canvas's cells before the root row was applied — what a patched root row resets to. */\n private _pristineRoot: PropLayer = NO_LAYER;\n\n /** Live nodes by id, valid between {@link build} and the next rebuild. */\n private readonly _live = new Map<string, LiveNode>();\n /** Live variables by id, same lifetime as {@link _live}. */\n private readonly _vars = new Map<string, LiveVariable>();\n /** Node ids by {@link NodeSpec.key}. Read off the document, so it needs no build. */\n private readonly _keyed: Map<string, string>;\n private _placed: PlacedCommand[] = [];\n /** The scene root (`targetId: null`), plus its baseline. */\n private _root: LiveNode | null = null;\n /**\n * Only the nodes some command writes to. Everything else keeps its authored\n * props for the life of the scene, so restoring it every frame would be pure\n * waste — and on a large static scene that waste is most of the frame.\n *\n * A prop bound to a variable needs no restoring at all, which falls out of\n * this for free: the binding *is* the per-frame recompute, so a node driven\n * only by expressions never enters this list.\n */\n private _animated: LiveNode[] = [];\n /** Only the variables some command writes to. Same reasoning. */\n private _animatedVars: LiveVariable[] = [];\n /** Children each parent built for itself, which the document must not disturb. */\n private readonly _baseChildCount = new Map<string, number>();\n /** Node ids currently in the tree, so presence only churns when it changes. */\n private readonly _present = new Set<string>();\n /** Node ids whose baseline was taken while mounted — see {@link _compileCommands}. */\n private _baselined = new Set<string>();\n private _presence: PresenceIndex | null = null;\n /** The rows the last {@link syncPresence} brought in, in document order. */\n private _arrived: readonly PresenceRow[] = [];\n\n /**\n * What a compiled expression resolves a reference against: a variable, or —\n * spelled with a dot — another node's prop.\n *\n * The dot is the whole discriminator, and it has to be: a node is not a value,\n * so `[card]` could never mean one, while a variable reference never carries a\n * prop. `document/validate.ts` reads the same split.\n *\n * A node reference resolves **late**. Nothing about the node is looked up here:\n * `build` binds in document order, so the node named may not exist yet, and\n * `syncPresence` adds and removes nodes as time moves, so one that exists can\n * still be legitimately absent at *t*. The thunk therefore does the lookup on\n * every read and answers `undefined` for a node that is not there — which is\n * `NaN` through arithmetic, loud in the first frame, and an unset prop on its\n * own. Throwing instead would make an `add` at 2s a crash at 0s.\n */\n private readonly _resolveVariable: VariableResolver = (name) => {\n const dot = name.indexOf(\".\");\n if (dot > 0) {\n const id = this._keyed.get(name.slice(0, dot));\n if (id === undefined) return undefined;\n const prop = name.slice(dot + 1);\n return () => (this._nodeById(id) as unknown as Record<string, unknown> | undefined)?.[prop];\n }\n return this._vars.get(name)?.read;\n };\n\n /**\n * The live node `id` names, or `undefined` while it is unbuilt or out of the\n * tree.\n *\n * Gated on `mounted` rather than on {@link _present}, which is only settled at\n * the end of {@link syncPresence} — so a prop read *during* the insertion walk\n * would see an out-of-date answer.\n */\n private _nodeById(id: string): Node | undefined {\n if (id === ROOT_NODE_ID) return this.canvas;\n const entry = this._live.get(id);\n if (!entry) return undefined;\n if (_observer !== null) this._readPresence(entry);\n return entry.node.mounted ? entry.node : undefined;\n }\n\n /** The row's presence and every document ancestor's — an ancestor leaving unmounts it too. */\n private _readPresence(entry: LiveNode): void {\n let at: LiveNode | undefined = entry;\n for (let depth = 0; at && depth <= this._live.size; depth++) {\n at.presence.get();\n at = at.spec.parentId === null ? undefined : this._live.get(at.spec.parentId);\n }\n }\n\n private _applyRootProps(): void {\n const { literal, bindings } = expressionOps.bindProps(this._rootSpec.props, this._resolveVariable);\n this.canvas.set({ ...literal, ...bindings } as never);\n }\n\n /** A row's node with its literal props passed to the constructor and its expressions bound after. */\n private _instantiate(spec: NodeSpec): Node {\n const { literal, bindings, hasBindings } = expressionOps.bindProps(spec.props, this._resolveVariable);\n const node = this._registry.instantiate(spec, literal);\n // Applied after construction rather than through it: see `instantiate`.\n if (hasBindings) node.set(bindings as never);\n return node;\n }\n\n /**\n * Create a slot per declared variable.\n *\n * The slot is created once per build and lives for the whole scene: a\n * variable has no presence span (see {@link VariableSpec}), so there is\n * nothing to sync and nothing that can be missing when an expression\n * compiled against it runs.\n */\n private _buildVariables(): void {\n for (const spec of this._varSpecs) {\n if (this._vars.has(spec.id)) {\n throw new Error(\n `Duplicate variable id \"${spec.id}\". Ids must be unique — an expression ` +\n `writing \"[${spec.id}]\" would otherwise name whichever declaration was read last.`,\n );\n }\n this._vars.set(spec.id, this._liveVariable(spec));\n }\n }\n\n private _liveVariable(spec: VariableSpec): LiveVariable {\n const cell = new PropSlot<unknown>(spec.value, null, VAR_PREFIX + spec.id);\n return {\n spec,\n cell,\n read: () => cell.get(),\n target: this._variableTarget(spec, cell),\n baseline: spec.value,\n };\n }\n\n private _variableTarget(spec: VariableSpec, cell: PropSlot<unknown>): VariableTarget {\n const lerp = this._registry.requireLerp(spec.lerp, spec.value, `variable \"${spec.id}\"`);\n return { id: spec.id, get: () => cell.get(), set: (v) => cell.set(v), lerp };\n }\n\n /**\n * Put every animated node back to its authored state.\n *\n * The save stack is truncated alongside the props, and that is not\n * housekeeping. `save`/`restore` are commands, so a `save` re-runs on every\n * evaluation of a frame after it — without the truncation the stack would\n * grow by one layer per frame forever, and a later `restore` would pop a\n * layer pushed by some *other* seek instead of the one its own `save` made.\n * Truncating is what keeps the pair a function of the chain rather than of\n * how the playhead got here.\n */\n private _restoreBaselines(): void {\n // Variables first, so a prop bound to one recomputes against the restored\n // value rather than a stale one.\n for (const entry of this._animatedVars) entry.cell.set(entry.baseline);\n\n for (const entry of this._animated) {\n const host = entry.node as unknown as ReactiveHost;\n applySnapshotLayer(host, entry.baseline);\n if (host._stateStack.length > entry.baseStackDepth) {\n host._stateStack.length = entry.baseStackDepth;\n }\n }\n }\n\n /**\n * Build every command, in timeline order, against a node already holding\n * what its predecessors left.\n *\n * The tree is moved to each command's `at` before it is built: an unmounted\n * node hands back an inert stepper and the command caches it, so a tween on a\n * node that enters at 2s built against the t=0 tree would never move. A node\n * entering here is baselined on arrival, before anything has touched it.\n *\n * The tree is re-laid-out only where something reads it — see\n * {@link _settleWindows}.\n */\n private _compileCommands(settle: () => void): void {\n if (isStillDocument(this._doc)) return;\n\n const touched = new Set<LiveNode | LiveVariable>();\n const ordered = inTimelineOrder(this._doc.commands);\n const refBound = this._refBound(ordered);\n const settles = this._settleWindows(ordered, (i) => this._readsLayout(ordered[i], refBound));\n\n for (let i = 0; i < ordered.length; i++) {\n const spec = ordered[i];\n if (this.syncPresence(spec.at)) {\n // Every node present but not yet baselined arrived in this sync:\n // one that left and came back was baselined the first time.\n for (const row of this._arrived) {\n if (this._baselined.has(row.id)) continue;\n const arrived = this._live.get(row.id);\n if (arrived) captureBaseline(arrived);\n this._baselined.add(row.id);\n }\n if (settles[i]) settle();\n }\n\n const placed = this._buildPlaced(spec);\n if (!placed) continue;\n this._placed.push(placed);\n this._touch(placed, touched);\n }\n }\n\n /**\n * Build one command against the tree as it stands and run it to its end —\n * which is what leaves its target where the next command's `from` must start.\n * Undone wholesale by {@link _restoreBaselines}. `null` when its target node\n * does not exist.\n *\n * The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`\n * when the command is *constructed*, so a chain built against the untouched\n * tree would give every step the same `from` and each would jump back to the\n * start.\n */\n private _buildPlaced(spec: CommandSpec): PlacedCommand | null {\n // Resolved in two tiers. The global table holds only what must resolve\n // *without* a node — the variable-scoped commands, whose target is not a\n // node at all, and the generic prop writers. That is why it is consulted\n // first: `scope` is what decides whether there is a node to look anything\n // up on. Everything else is a method on the target's own type, where it\n // cannot collide with another type's command of the same name.\n let entry = this._registry.command(spec.type);\n if (!entry) {\n const target = this._targetOf(spec);\n const typeKey = target?.entry.spec.type;\n const factory = typeKey ? this._registry.nodeCommand(typeKey, spec.type) : undefined;\n if (!factory) {\n throw new Error(\n `Node type \"${typeKey ?? \"?\"}\" has no command \"${spec.type}\" ` +\n `(command ${spec.id}). It publishes: ` +\n `${typeKey ? this._registry.commandKeys(typeKey).join(\", \") || \"none\" : \"—\"}.` +\n (LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : \"\"),\n );\n }\n entry = { key: spec.type, scope: \"node\", factory };\n }\n\n const duration = spec.duration ?? 0;\n const easing = resolveEase(spec.easing, this._registry);\n const recorder = new WriteRecorder();\n // Applied inside `buildToEnd`, so the `at(1)` that leaves the target where\n // the next command's `from` starts is the *loop's* end — which for an odd\n // number of `alternate` passes is back where it began. A looped command\n // then carries the span of every pass, which is what the placed duration\n // has to be for a seek into the fourth repetition to land in it.\n const loop = loopRepeats(spec.loop) ? spec.loop : undefined;\n const repeat = (made: Command<Record<string, unknown>> | void) =>\n (made && loop ? loopCommand(made, loop, this._unlimitedFill(spec.at)) : made);\n\n if (entry.scope === \"variable\") {\n const variable = spec.targetId === null ? undefined : this._vars.get(spec.targetId);\n if (!variable) {\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") targets variable \"${spec.targetId}\", ` +\n `which this document does not declare.`,\n );\n }\n this._assertNoExpressions(spec);\n const { factory } = entry;\n const command = observeSlots(recorder, () =>\n buildToEnd(() => repeat(factory(variable.target, spec.args, duration, easing))));\n return { spec, start: spec.at, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: variable };\n }\n\n const target = this._targetOf(spec);\n if (!target) return null;\n\n const args = entry.binds ? this._bindArgs(spec.args) : (this._assertNoExpressions(spec), spec.args);\n const { factory } = entry;\n const command = observeSlots(recorder, () =>\n buildToEnd(() => repeat(factory(target.node, args, duration, easing))));\n return { spec, start: spec.at, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: target.entry };\n }\n\n /**\n * Seconds an unlimited loop starting at `at` has to fill.\n *\n * The clip's own length, which `documentDuration` answers counting one pass\n * of every unlimited loop — so a scene made of nothing but a spinner is one\n * turn long, and that same spinner in a ten-second scene turns for ten\n * seconds rather than stretching the scene to forever.\n */\n private _unlimitedFill(at: number): number {\n return Math.max(0, this._duration - at);\n }\n\n /**\n * Put everything a command writes into the restore lists — its target, and\n * any *other* node it wrote.\n *\n * A command is not confined to its target: `Cursor.click` names a control and\n * throws it, the way the lifecycle commands tween the child they move. Only\n * the target used to be restored, which left the other node holding whatever\n * the last evaluation happened to leave — a frame that depends on how the\n * playhead reached it, which is the one thing the whole design forbids.\n *\n * `writes` is already recorded (see {@link WriteRecorder}) and a slot carries\n * its owner, so this needs no declaration from the command. A slot whose host\n * is no document row — a variable's, or a cell on a child a composite built\n * for itself — has no baseline of its own and is skipped: the variable\n * arrives as {@link PlacedCommand.owner}, and the composite's child is\n * rebuilt with its parent.\n */\n private _touch(placed: PlacedCommand, touched: Set<LiveNode | LiveVariable>): void {\n this._touchOwner(placed.owner, touched);\n for (const slot of placed.writes) {\n const host = slot._host;\n if (host === null) continue;\n const entry = host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);\n if (entry) this._touchOwner(entry, touched);\n }\n }\n\n private _touchOwner(owner: LiveNode | LiveVariable, touched: Set<LiveNode | LiveVariable>): void {\n if (touched.has(owner)) return;\n touched.add(owner);\n if (\"cell\" in owner) this._animatedVars.push(owner);\n else this._animated.push(owner);\n }\n\n /**\n * Compile the expressions in a binding command's args.\n *\n * A command declaring `binds` is saying its args *are* a props diff that\n * reaches `node.set()` — `set` is the only built-in that does — where a\n * function is a binding.\n */\n private _bindArgs(args: Record<string, unknown>): Record<string, unknown> {\n const { literal, bindings } = expressionOps.bindProps(args, this._resolveVariable, \"args\");\n return { ...literal, ...bindings };\n }\n\n /**\n * Refuse an expression in a command that cannot bind one.\n *\n * An expression is a *binding*: it says a prop follows a variable for as\n * long as it is set. A tween's destination is a **value** — `to` reads it\n * once, when the command compiles, to work out what it is interpolating\n * towards — so a formula there could only ever mean \"the value this happened\n * to have at build time\", which is never what anyone writing it meant.\n * Failing here rather than coercing is the same call `NodeSpec.type` makes:\n * a document that half-renders is worse than one that refuses to.\n */\n private _assertNoExpressions(spec: CommandSpec): void {\n const found = expressionOps.collect(spec.args, \"args\");\n if (found.length === 0) return;\n const { path, source } = found[0];\n throw new Error(\n `Command ${spec.id} (\"${spec.type}\") carries an expression at ${path}: ${JSON.stringify(source)}. ` +\n `Expressions bind a prop to a variable; they are not tween destinations. ` +\n `Bind the prop where the node is authored (or with a \"set\" command) and animate the variable ` +\n `with \"variableTo\" instead.`,\n );\n }\n\n /** Resolve a command's `targetId` to a live node, or `null` if it names nothing. */\n private _targetOf(spec: CommandSpec): { id: string; node: Node; entry: LiveNode } | null {\n if (spec.targetId === null) {\n return this._root ? { id: ROOT_NODE_ID, node: this._root.node, entry: this._root } : null;\n }\n const entry = this._live.get(spec.targetId);\n return entry ? { id: spec.targetId, node: entry.node, entry } : null;\n }\n\n private _evaluateObserved(seconds: number, onWrite: (index: number, slot: PropSlot<unknown>) => void): void {\n let index = 0;\n const observer: SlotObserver = { read: () => { }, write: (slot) => onWrite(index, slot) };\n observeSlots(observer, () => {\n for (; index < this._placed.length; index++) {\n const placed = this._placed[index];\n if (seconds < placed.start) continue;\n const local = placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;\n placed.command.at(clamp01(local));\n }\n });\n }\n\n /**\n * Mark the steps that open a presence window needing a settle: a window is\n * the run of steps between two changes to the tree, and it needs one only\n * when a step in it reads layout.\n *\n * At the window's start rather than just before its first reader, because a\n * reader must see the boxes as they stood when the window opened — a size tween\n * built earlier in the same window has already run to its end by then, and a\n * settle after it would hand the reader that end state instead.\n */\n private _settleWindows(steps: readonly { at: number }[], reads: (index: number) => boolean): Uint8Array {\n const index = this._presenceIndex();\n const settles = new Uint8Array(steps.length);\n // -1 is the window the tree was already laid out for.\n let opener = -1;\n let previous = index.time;\n for (let i = 0; i < steps.length; i++) {\n const { at } = steps[i];\n if (index.differs(previous, at)) opener = i;\n previous = at;\n if (opener < 0 || settles[opener]) continue;\n if (reads(i)) settles[opener] = 1;\n }\n return settles;\n }\n\n private _readsLayout(spec: CommandSpec, refBound: ReadonlySet<string>): boolean {\n const id = spec.targetId ?? ROOT_NODE_ID;\n const target = spec.targetId === null ? this._rootSpec : this._live.get(spec.targetId)?.spec;\n const traits = commandTraits(this._registry, spec, target);\n return traits === null || traits.readsLayout || refBound.has(id);\n }\n\n /**\n * Targets of a binding command carrying a node reference: a binding a `set`\n * installs mid-scene can read another node's box, and a `from` taken over it\n * later evaluates it.\n */\n private _refBound(commands: readonly CommandSpec[]): Set<string> {\n const out = new Set<string>();\n for (const spec of commands) {\n const entry = this._registry.command(spec.type);\n if (entry?.scope === \"node\" && entry.binds && hasNodeRef(spec.args)) out.add(spec.targetId ?? ROOT_NODE_ID);\n }\n return out;\n }\n\n /** Built on first use, from the rows as they stand. */\n private _presenceIndex(): PresenceIndex {\n return this._presence ??= new PresenceIndex(this._specs, this._spans);\n }\n\n /** The live node a spec's `parentId` names, or the scene root. */\n private _parentNodeOf(spec: NodeSpec): Node | undefined {\n if (spec.parentId === null) return this.canvas;\n return this._live.get(spec.parentId)?.node;\n }\n\n private _patchEnvironment(): PatchEnvironment {\n const registry = this._registry;\n return {\n traits: (spec, target) => commandTraits(registry, spec, target),\n nodeRefs: (spec, target) => commandNodeRefs(registry, spec, target),\n isContextProvider: (type) => isContextProvider(registry, type),\n isLayoutNeutralProp: (type, key) => isLayoutNeutralProp(registry, type, key),\n ctorOf: (id) => this._live.get(id)?.node.constructor,\n registeredCtor: (type) => registry.node(type)?.ctor,\n dimensionOf: (type) => registry.node(type)?.descriptor.dimension,\n };\n }\n\n private _updateVariables(patch: TimelinePatch): void {\n const { added, removed, changed } = patch.diff.variables;\n for (const id of removed) this._vars.delete(id);\n for (const id of added) this._vars.set(id, this._liveVariable(patch.next.variables.get(id)!));\n for (const id of changed) {\n const spec = patch.next.variables.get(id)!;\n const entry = this._vars.get(id);\n if (!entry) {\n this._vars.set(id, this._liveVariable(spec));\n continue;\n }\n entry.baseline = spec.value;\n entry.target = this._variableTarget(spec, entry.cell);\n }\n for (const spec of patch.next.variables.values()) {\n const entry = this._vars.get(spec.id);\n if (entry) entry.spec = spec;\n }\n // Restoring only resets animated variables, so a changed value nothing animates would never land.\n for (const id of patch.dirtyVariables) {\n const entry = this._vars.get(id);\n if (entry) entry.cell.set(entry.baseline);\n }\n }\n\n /**\n * Take detached rows out of the tree, replace and add instances, swap in the\n * next document's rows, and re-insert whatever is present at 0. Returns the\n * entries holding a new instance.\n */\n private _updateStructure(patch: TimelinePatch): Set<LiveNode> {\n const { next } = patch;\n\n for (const id of patch.detach) {\n const entry = this._live.get(id);\n if (!entry) continue;\n entry.node.parent?.remove(entry.node);\n entry.presence.set(false);\n this._present.delete(id);\n }\n\n const isDocumentNode = (node: Node) => this._live.get(node.id)?.node === node;\n for (const id of patch.removed) {\n const entry = this._live.get(id);\n if (!entry) continue;\n disposeBuilt(entry.node, isDocumentNode);\n this._live.delete(id);\n this._baseChildCount.delete(id);\n this._baselined.delete(id);\n }\n for (const id of patch.reinstantiate) {\n const entry = this._live.get(id);\n if (entry) disposeBuilt(entry.node, isDocumentNode);\n }\n\n const { root, rest } = splitRoot(next.doc.nodes);\n const fresh = new Set<LiveNode>();\n for (const spec of rest) {\n let entry = this._live.get(spec.id);\n if (entry && !patch.reinstantiate.has(spec.id)) {\n entry.spec = spec;\n continue;\n }\n const node = this._instantiate(spec);\n if (entry) {\n entry.spec = spec;\n entry.node = node;\n this._baselined.delete(spec.id);\n } else {\n entry = {\n spec,\n node,\n initial: NO_LAYER,\n initialStackDepth: 0,\n baseline: NO_LAYER,\n baseStackDepth: 0,\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\n };\n this._live.set(spec.id, entry);\n }\n this._baseChildCount.set(spec.id, node._allChildren.length);\n fresh.add(entry);\n }\n\n this._doc = next.doc;\n this._docIndex = next;\n this._rootSpec = root;\n this._root!.spec = root;\n this._specs = rest;\n this._varSpecs = next.doc.variables ?? [];\n this._spans = presenceOf(next.doc);\n this._duration = documentDuration(next.doc);\n\n // A fresh index knows nothing is in the tree, so seed it with what still is.\n const index = this._presence = new PresenceIndex(this._specs, this._spans);\n for (const id of [...this._present]) {\n const row = index.row(id);\n if (row && within(row, 0)) {\n row.siblings.add(row.slot, 1);\n continue;\n }\n this._present.delete(id);\n const entry = this._live.get(id);\n if (!entry) continue;\n entry.presence.set(false);\n entry.node.parent?.remove(entry.node);\n }\n this.syncPresence(0);\n return fresh;\n }\n\n /**\n * Rebuild the dirty chains in the next document's timeline order, replaying the\n * clean chains they build against and taking arrival baselines where compile\n * would have. Returns the rebuilt commands by id.\n */\n private _walkPatch(\n patch: TimelinePatch,\n previous: ReadonlyMap<string, PlacedCommand>,\n settle: () => void,\n ): Map<string, PlacedCommand> {\n const rebuilt = new Map<string, PlacedCommand>();\n if (isStillDocument(this._doc)) return rebuilt;\n\n const { next } = patch;\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\n const refBound = this._refBound(next.ordered);\n let replay = patch.replay;\n // A settle for a binding over another node's box has to see every chain at its `at`.\n if (replay !== \"all\" && [...refBound].some(dirty)) replay = \"all\";\n\n const steps: WalkStep[] = [];\n const { captures } = patch;\n let c = 0;\n for (const spec of next.ordered) {\n while (c < captures.length && captures[c].at <= spec.at) steps.push({ at: captures[c].at, capture: captures[c++].id });\n const id = next.targetOf(spec);\n if (replay === \"all\" || dirty(id) || replay.has(id)) steps.push({ at: spec.at, spec });\n }\n for (; c < captures.length; c++) steps.push({ at: captures[c].at, capture: captures[c].id });\n\n const settles = this._settleWindows(steps, (i) => {\n const spec = steps[i].spec;\n return spec !== undefined && dirty(next.targetOf(spec)) && this._readsLayout(spec, refBound);\n });\n\n let pending = false;\n for (let i = 0; i < steps.length; i++) {\n const step = steps[i];\n if (settles[i]) pending = true;\n this.syncPresence(step.at);\n if (step.capture !== undefined) {\n const entry = this._live.get(step.capture);\n if (entry) captureBaseline(entry);\n this._baselined.add(step.capture);\n continue;\n }\n // After this `at`'s captures, as compile baselines arrivals before it settles.\n if (pending) {\n settle();\n pending = false;\n }\n const spec = step.spec!;\n const old = previous.get(spec.id);\n if (old && !dirty(next.targetOf(spec))) {\n old.command.at(1);\n continue;\n }\n const placed = this._buildPlaced(spec);\n if (placed) rebuilt.set(spec.id, placed);\n }\n return rebuilt;\n }\n}\n\n/**\n * What to say when a command type the format no longer has fails to resolve.\n * A document written before nodes carried their own spans is otherwise a\n * \"no command\" error that names nothing it could be fixed with.\n */\nconst LEGACY_COMMAND_HINTS: Readonly<Record<string, string>> = {\n add: \"A node is a row in `nodes`, entering at its `startAt`.\",\n remove: \"A node leaves at its `endAt`.\",\n variable: \"A variable is declared in `variables`.\",\n};\n\nconst NO_LAYER: PropLayer = new Map();\n\n/** Records what building one command wrote, and whether it read a laid-out box. */\nclass WriteRecorder implements SlotObserver {\n readonly writes = new Set<PropSlot<unknown>>();\n readsLayout = false;\n\n read(slot: PropSlot<unknown>): void {\n if (slot._name === LAYOUT_SLOT) this.readsLayout = true;\n }\n\n write(slot: PropSlot<unknown>): void {\n this.writes.add(slot);\n }\n}\n\n/**\n * Build a command and run it to its end. A factory that acts at once and returns\n * nothing (`restore` with no duration) has already done this build's `at(1)`, so\n * it becomes a stamp that acts again on every later evaluation.\n */\nfunction buildToEnd(make: () => Command<Record<string, unknown>> | void): Command<Record<string, unknown>> {\n const made = make();\n if (made) {\n made.at(1);\n return made;\n }\n return driveCommand(0, () => {\n make();\n }) as unknown as Command<Record<string, unknown>>;\n}\n\n/**\n * Snapshot a node's prop slots at its authored state. Taken while it is mounted:\n * an unmounted node's cells hold pre-attach values.\n */\nfunction captureBaseline(entry: LiveNode): void {\n const host = entry.node as unknown as ReactiveHost;\n entry.baseline = captureLayer(host);\n entry.baseStackDepth = host._stateStack.length;\n}\n\nfunction captureInitial(entry: LiveNode): void {\n captureBaseline(entry);\n entry.initial = entry.baseline;\n entry.initialStackDepth = entry.baseStackDepth;\n}\n\nfunction resetToInitial(entry: LiveNode): void {\n const host = entry.node as unknown as ReactiveHost;\n applySnapshotLayer(host, entry.initial);\n if (host._stateStack.length > entry.initialStackDepth) host._stateStack.length = entry.initialStackDepth;\n entry.baseline = entry.initial;\n entry.baseStackDepth = entry.initialStackDepth;\n}\n\n/** Dispose `node` and whatever it built for itself; a document child it still holds is left alone. */\nfunction disposeBuilt(node: Node, isDocumentNode: (node: Node) => boolean): void {\n for (const child of node._allChildren) {\n if (!isDocumentNode(child)) disposeBuilt(child, isDocumentNode);\n }\n node.dispose();\n}\n\n/** One document row's place in a {@link PresenceIndex}. */\ninterface PresenceRow {\n id: string;\n start: number;\n end: number;\n /** Position in the document's rows. */\n order: number;\n /** Position among its parent's document children, in `layerOrder` order. */\n slot: number;\n siblings: SiblingCounts;\n /** The last {@link PresenceIndex.crossed} pass that collected this row. */\n pass: number;\n}\n\nfunction within(row: PresenceRow, seconds: number): boolean {\n return seconds >= row.start && seconds < row.end;\n}\n\nfunction byDocumentOrder(a: PresenceRow, b: PresenceRow): number {\n return a.order - b.order;\n}\n\n/**\n * How many of one parent's document children are present before a given slot — a\n * Fenwick tree, so an insert index costs O(log siblings) rather than a walk over\n * every sibling.\n */\nclass SiblingCounts {\n constructor(readonly parentId: string, size: number) {\n this._tree = new Int32Array(size + 1);\n }\n\n add(slot: number, delta: number): void {\n for (let i = slot + 1; i < this._tree.length; i += i & -i) this._tree[i] += delta;\n }\n\n before(slot: number): number {\n let count = 0;\n for (let i = slot; i > 0; i -= i & -i) count += this._tree[i];\n return count;\n }\n\n private readonly _tree: Int32Array;\n}\n\n/**\n * Every span boundary, sorted by time, and a cursor at the last time synced.\n *\n * Moving to another time visits only the rows with a boundary between the two, in\n * either direction and however far — which is what keeps a scrub, and a compile\n * walking its commands, from rescanning every node per step.\n */\nclass PresenceIndex {\n /** The last time {@link crossed} was asked for. Nothing is present before the first. */\n time = -Infinity;\n\n constructor(specs: readonly NodeSpec[], spans: ReadonlyMap<string, NodeSpan>) {\n const byParent = new Map<string, { spec: NodeSpec; order: number }[]>();\n specs.forEach((spec, order) => {\n if (!spans.has(spec.id)) return;\n const parentId = spec.parentId ?? ROOT_NODE_ID;\n const group = byParent.get(parentId);\n if (group) group.push({ spec, order });\n else byParent.set(parentId, [{ spec, order }]);\n });\n for (const [parentId, group] of byParent) {\n // Stable, so a `layerOrder` tie keeps document order.\n group.sort((a, b) => a.spec.layerOrder - b.spec.layerOrder);\n const siblings = new SiblingCounts(parentId, group.length);\n group.forEach(({ spec, order }, slot) => {\n const { start, end } = spans.get(spec.id)!;\n const row: PresenceRow = { id: spec.id, start, end, order, slot, siblings, pass: 0 };\n this._rows.set(spec.id, row);\n this._events.push({ time: start, row });\n if (Number.isFinite(end)) this._events.push({ time: end, row });\n });\n }\n this._events.sort((a, b) => a.time - b.time);\n }\n\n /** Each row with a boundary between the last time synced and `seconds`, once. Moves the cursor. */\n crossed(seconds: number): readonly PresenceRow[] {\n this.time = seconds;\n const target = this._upperBound(seconds);\n if (target === this._cursor) return NO_ROWS;\n const from = Math.min(target, this._cursor);\n const to = Math.max(target, this._cursor);\n this._cursor = target;\n const pass = ++this._pass;\n const rows: PresenceRow[] = [];\n for (let k = from; k < to; k++) {\n const { row } = this._events[k];\n if (row.pass === pass) continue;\n row.pass = pass;\n rows.push(row);\n }\n return rows;\n }\n\n /** Whether any row is present at one of `a`, `b` and not the other. Moves nothing. */\n differs(a: number, b: number): boolean {\n const from = this._upperBound(Math.min(a, b));\n const to = this._upperBound(Math.max(a, b));\n for (let k = from; k < to; k++) {\n const { row } = this._events[k];\n if (within(row, a) !== within(row, b)) return true;\n }\n return false;\n }\n\n row(id: string): PresenceRow | undefined {\n return this._rows.get(id);\n }\n\n private readonly _events: { time: number; row: PresenceRow }[] = [];\n private readonly _rows = new Map<string, PresenceRow>();\n /** How many events are at or before {@link time}. */\n private _cursor = 0;\n private _pass = 0;\n\n /** The first event after `seconds` — every event before it has happened by then. */\n private _upperBound(seconds: number): number {\n let lo = 0;\n let hi = this._events.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (this._events[mid].time <= seconds) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n}\n\nconst NO_ROWS: readonly PresenceRow[] = [];\n"]}
1
+ {"version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AE,GAAG,GAAG,CAAC;QAClB,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAED,MAAM,OAAO,GAA2B,EAAE,CAAC","sourcesContent":["import { clamp01 } from \"@/util/clamp\";\r\nimport { applySnapshotLayer, captureLayer, type PropLayer, type ReactiveHost } from \"@/nodes/node/node-reactive\";\r\nimport type { Node } from \"@/nodes/node/node\";\r\nimport type { Canvas2D } from \"@/nodes/root/canvas2d-node\";\r\nimport { _observer, PropSlot, type PropSnapshot } from \"@/props/slot\";\r\nimport { LAYOUT_SLOT, observeSlots, PRESENCE_PREFIX, unobserved, VAR_PREFIX, type SlotObserver } from \"@/props/observer\";\r\nimport { driveCommand, loopCommand, type Command } from \"@/tween/command\";\r\nimport { loopRepeats } from \"@/tween/loop\";\r\nimport type { EasingFunction } from \"@/tween/ease/type\";\r\nimport { easeIn, easeInOut, easeOut, linear, type EaseParams } from \"@/tween/ease/constants\";\r\nimport { curveEase, isEaseCurve } from \"@/tween/ease/curve\";\r\nimport { commandNodeRefs, commandTraits, hasNodeRef, isContextProvider, isLayoutNeutralProp } from \"./command-traits\";\r\nimport { diffClip } from \"./diff\";\r\nimport { indexDocument, type DocIndex } from \"./doc-index\";\r\nimport { expressionOps } from \"./expression/ops\";\r\nimport type { VariableResolver } from \"./expression/types\";\r\nimport type { Registry, VariableTarget } from \"./registry\";\r\nimport { planTimelinePatch, type PatchEnvironment, type TimelinePatch } from \"./timeline-patch\";\r\nimport type { CommandSpec, EaseSpec, NodeSpec, NodeSpan, VisualDocument, VariableSpec } from \"./types\";\r\nimport { documentDuration, isStillDocument, nodeSpan, ROOT_NODE_ID } from \"./types\";\r\n\r\n/**\r\n * A compiled clip document: the thing that answers \"what does this look like\r\n * at `t`\" without having rendered `t - 1`.\r\n *\r\n * This is the whole reason the document model exists. A generator could\r\n * only be *advanced*, so a backward seek meant tearing the tree down and\r\n * replaying from frame 0, and a clip's duration was unknowable without running\r\n * it to the end. A timeline is built once and evaluated in any order, at any\r\n * time, as many times as you like — which is what makes scrubbing cheap, export\r\n * parallelizable, and a frame reproducible.\r\n *\r\n * ### The two phases, and why `from` needs both\r\n *\r\n * **Build** instantiates every node the document mentions and parents it.\r\n *\r\n * **Compile** then walks the commands in `at` order and asks each one's factory\r\n * for a {@link Command}. That order is load-bearing: a command's *start* value\r\n * is read from the node at the moment it is constructed (`node.to({x: 100})`\r\n * snapshots whatever `x` is now), so each command has to be built with the node\r\n * in the state its predecessors left. Compile therefore runs every command to\r\n * `at(1)` before building the next — see {@link compile}. Once built, a\r\n * `Command.at(t)` is pure, and the mutations compile caused are undone by\r\n * restoring the baseline.\r\n *\r\n * Building is O(commands) and happens once. Evaluating is what happens per\r\n * frame, and is O(commands) with no allocation.\r\n *\r\n * ### Variables and expressions\r\n *\r\n * A third thing gets built alongside the tree: one {@link PropSlot} per declared\r\n * {@link VariableSpec}, and a binding on every prop whose authored value is an\r\n * expression (`\"=4[g]+3\"` — see `document/expression.ts`). Those two together\r\n * are how one command drives many nodes.\r\n *\r\n * A binding is a thunk that reads the variable, and a bound prop recomputes on\r\n * every read — so `variableTo` writing the slot is visible to every prop that\r\n * names it, with nothing to invalidate and no edge to declare. A node driven\r\n * only by expressions is not in the animated list at all: there is no baseline\r\n * to restore, because nothing overwrote it.\r\n *\r\n * A reference spelled with a dot (`\"=[card.x]+20\"`) reads another node's prop\r\n * instead, through the same machinery — see `ClipTimeline._resolveVariable`\r\n * for why that one resolves at read time rather than at compile time.\r\n */\r\n\r\n/** A placed command as the runtime outside the timeline sees it. */\r\nexport interface PlacedCommandInfo {\r\n readonly spec: CommandSpec;\r\n /** Seconds from clip start. */\r\n readonly start: number;\r\n /** Seconds. Zero is a stamp — it applies in full from `start` onward. */\r\n readonly duration: number;\r\n /** Every slot building it and running it to its end wrote. */\r\n readonly writes: ReadonlySet<PropSlot<unknown>>;\r\n readonly readsLayout: boolean;\r\n}\r\n\r\ninterface PlacedCommand extends PlacedCommandInfo {\r\n readonly command: Command<Record<string, unknown>>;\r\n readonly writes: Set<PropSlot<unknown>>;\r\n /** What it acts on, so the animated lists can be rebuilt without resolving it again. */\r\n readonly owner: LiveNode | LiveVariable;\r\n}\r\n\r\n/**\r\n * A live variable: a slot nothing draws, that props read through an expression.\r\n *\r\n * A plain {@link PropSlot} rather than a node, because that is all a variable\r\n * needs to be. A prop bound to `() => slot.get()` re-reads it every time it is\r\n * read, so a `variableTo` writing this slot is picked up by every prop naming it\r\n * — with nothing in the node layer, the layout pass or the renderer knowing\r\n * variables exist.\r\n */\r\ninterface LiveVariable {\r\n spec: VariableSpec;\r\n /** Kept across an update: every binding compiled against it captured {@link read}, which reads this. */\r\n cell: PropSlot<unknown>;\r\n /** What an expression calls. Stable across the life of the build. */\r\n read: () => unknown;\r\n /** Handed to a variable command's factory. */\r\n target: VariableTarget;\r\n /** The declared value, restored before every evaluation. */\r\n baseline: unknown;\r\n}\r\n\r\n/** What `build` records about one node so evaluation can find and reset it. */\r\ninterface LiveNode {\r\n spec: NodeSpec;\r\n node: Node;\r\n /** Every reactive cell as the build left it, before any command or arrival touched it. */\r\n initial: PropLayer;\r\n initialStackDepth: number;\r\n /** What evaluation restores: {@link initial}, or the node as it arrived when it enters later. */\r\n baseline: PropLayer;\r\n /** Depth of the node's save stack at the baseline — see {@link ClipTimeline._restoreBaselines}. */\r\n baseStackDepth: number;\r\n /**\r\n * Whether the row is in the tree, as a slot, so a `[key.prop]` read taken under\r\n * an observer depends on it — the node answering can come and go.\r\n */\r\n presence: PropSlot<boolean>;\r\n}\r\n\r\n/** One stop of an update's walk: a command to build or replay, or an arrival baseline to take. */\r\ninterface WalkStep {\r\n at: number;\r\n spec?: CommandSpec;\r\n capture?: string;\r\n}\r\n\r\n/** Resolve an {@link EaseSpec} to the function the tween actually calls. */\r\nfunction resolveEase(ease: EaseSpec | undefined, registry: Registry): EasingFunction | undefined {\r\n if (!ease) return undefined;\r\n switch (ease.kind) {\r\n case \"linear\": return linear();\r\n case \"in\": return easeIn(ease.args as EaseParams | undefined);\r\n case \"out\": return easeOut(ease.args as EaseParams | undefined);\r\n case \"inOut\": return easeInOut(ease.args as EaseParams | undefined);\r\n case \"custom\": {\r\n const key = ease.args;\r\n if (isEaseCurve(key)) return curveEase(key);\r\n if (typeof key !== \"string\") {\r\n throw new Error(`A \"custom\" ease needs a curve or its Registry.addEase key in \\`args\\` (got ${JSON.stringify(ease.args)}).`);\r\n }\r\n const fn = registry.ease(key);\r\n if (!fn) {\r\n throw new Error(`No ease registered under \"${key}\". Registered: ${registry.easeKeys().join(\", \") || \"none\"}.`);\r\n }\r\n return fn;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Order commands for compilation and evaluation.\r\n *\r\n * By `at`, then by the order they appear in the document. The tiebreak matters:\r\n * two commands sharing an `at` is how the model spells \"in parallel\", and when\r\n * both write the same prop the later one in the array wins — the same\r\n * last-writer rule `commandParallel` already uses, so the two compose\r\n * predictably.\r\n */\r\nfunction inTimelineOrder(commands: readonly CommandSpec[]): CommandSpec[] {\r\n return commands\r\n .map((spec, index) => ({ spec, index }))\r\n .sort((a, b) => (a.spec.at - b.spec.at) || (a.index - b.index))\r\n .map((e) => e.spec);\r\n}\r\n\r\n/** The scene root when a document doesn't author one explicitly. */\r\nfunction defaultRootSpec(): NodeSpec {\r\n return { id: ROOT_NODE_ID, type: \"canvas2d\", parentId: null, layerOrder: 0, props: {} };\r\n}\r\n\r\n/**\r\n * Split the scene root — the row with {@link ROOT_NODE_ID} and `type: \"canvas2d\"`\r\n * — out of the document's nodes.\r\n *\r\n * The root is an ordinary row, not a special field, but it is not an ordinary\r\n * *child*: it is the canvas itself, not something `build` instantiates or\r\n * `syncPresence` parents. Every other place that walks the nodes needs it removed\r\n * first; this is the one place that removal happens, synthesizing the default\r\n * when the document left it out.\r\n */\r\nfunction splitRoot(specs: NodeSpec[]): { root: NodeSpec; rest: NodeSpec[] } {\r\n const rest: NodeSpec[] = [];\r\n let root: NodeSpec | undefined;\r\n for (const spec of specs) {\r\n if (spec.id === ROOT_NODE_ID && spec.type === \"canvas2d\") {\r\n root = spec;\r\n continue;\r\n }\r\n rest.push(spec);\r\n }\r\n return { root: root ?? defaultRootSpec(), rest };\r\n}\r\n\r\n/**\r\n * When each node is in the tree.\r\n *\r\n * Read off the document rather than accumulated during playback: a span of\r\n * `[2, 5)` says the node is present at every seek in it, whether the playhead\r\n * arrived from 1s or from 9s. A still's nodes carry no span, so they are present\r\n * always.\r\n */\r\nfunction presenceOf(doc: VisualDocument): Map<string, NodeSpan> {\r\n const spans = new Map<string, NodeSpan>();\r\n for (const node of doc.nodes) spans.set(node.id, nodeSpan(node));\r\n // The root is always present; it is not synced like an ordinary child.\r\n spans.delete(ROOT_NODE_ID);\r\n return spans;\r\n}\r\n\r\n/**\r\n * The clip document, compiled and evaluable, over the one canvas it builds\r\n * into — its live nodes, presence and baselines all belong to that tree.\r\n */\r\nexport class ClipTimeline {\r\n constructor(doc: VisualDocument, registry: Registry, private readonly canvas: Canvas2D) {\r\n this._doc = doc;\r\n this._registry = registry;\r\n const { root, rest } = splitRoot(doc.nodes);\r\n this._rootSpec = root;\r\n this._specs = rest;\r\n this._varSpecs = doc.variables ?? [];\r\n // Built from the rows rather than from the tree: an expression resolves its\r\n // references the moment it compiles, which is before most nodes exist.\r\n this._keyed = new Map(\r\n [root, ...rest]\r\n .filter((spec): spec is NodeSpec & { key: string } => !!spec.key)\r\n .map((spec) => [spec.key, spec.id]),\r\n );\r\n this._spans = presenceOf(doc);\r\n // Declared, not measured, so it is known before anything is built.\r\n this._duration = documentDuration(doc);\r\n }\r\n\r\n /** How long the scene runs. Read by the runtime after {@link build}. */\r\n get duration(): number {\r\n return this._duration;\r\n }\r\n\r\n /** Instantiate the tree into the canvas. Once per timeline: the nodes it makes belong to that canvas. */\r\n build(): void {\r\n // Variables first: everything below may compile an expression, and an\r\n // expression resolves its `[id]`s the moment it is compiled.\r\n this._buildVariables();\r\n\r\n this._pristineRoot = captureLayer(this.canvas as unknown as ReactiveHost);\r\n this._applyRootProps();\r\n\r\n for (const spec of this._specs) {\r\n this._live.set(spec.id, {\r\n spec,\r\n node: this._instantiate(spec),\r\n initial: NO_LAYER,\r\n initialStackDepth: 0,\r\n baseline: NO_LAYER,\r\n baseStackDepth: 0,\r\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\r\n });\r\n }\r\n\r\n // Record what each parent built for itself *before* any document child\r\n // lands, so a composite node's own children keep their indices. A\r\n // document child is always placed after them.\r\n this._baseChildCount.set(ROOT_NODE_ID, this.canvas._allChildren.length);\r\n for (const [id, entry] of this._live) {\r\n this._baseChildCount.set(id, entry.node._allChildren.length);\r\n }\r\n\r\n this.syncPresence(0);\r\n\r\n // The root's baseline is captured too: `targetId: null` commands animate\r\n // the camera and the scene fill, and those need resetting like anything\r\n // else.\r\n this._root = {\r\n spec: this._rootSpec,\r\n node: this.canvas,\r\n initial: NO_LAYER,\r\n initialStackDepth: 0,\r\n baseline: NO_LAYER,\r\n baseStackDepth: 0,\r\n presence: new PropSlot<boolean>(true, null, PRESENCE_PREFIX + ROOT_NODE_ID),\r\n };\r\n for (const entry of this._live.values()) captureInitial(entry);\r\n captureInitial(this._root);\r\n this._baselined = new Set(this._present);\r\n for (const id of this._present) {\r\n if (this._live.get(id)?.node.mounted === false) {\r\n this._baselined.delete(id);\r\n this._unmounted.add(id);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Build every command against the laid-out tree, then put the tree back.\r\n *\r\n * Separate from {@link build} because a command may read post-layout state to\r\n * decide what it animates *from*: an animated `removeChildAt` pins the\r\n * departing child to its rendered width, which is zero until layout runs.\r\n *\r\n * `settle` re-lays the tree out. It runs whenever the walk brings a node in or\r\n * takes one out, so a command is built against the tree as it stands at its\r\n * own `at` — see {@link _compileCommands}.\r\n */\r\n compile(settle: () => void = () => { }): void {\r\n this._compileCommands(settle);\r\n this._restoreBaselines();\r\n const moved = this.syncPresence(0);\r\n if (this._restoreDisplaced(this._collectDisplaced()) || moved) settle();\r\n }\r\n\r\n /** What a variable holds at the last evaluated time. For a host's inspector. */\r\n variableValue(id: string): unknown {\r\n return this._vars.get(id)?.cell.get();\r\n }\r\n\r\n /** Every variable this document declares, in declaration order. */\r\n variables(): readonly VariableSpec[] {\r\n return this._varSpecs;\r\n }\r\n\r\n /** Every compiled command, in timeline order — the indices {@link evaluateAt} reports writes under. */\r\n placedCommands(): readonly PlacedCommandInfo[] {\r\n return this._placed;\r\n }\r\n\r\n /**\r\n * Put every node into the state it holds at `seconds`.\r\n *\r\n * A pure function of `seconds`: called in any order, repeatedly, and with\r\n * time going backwards. Restoring the baseline first is what makes it so —\r\n * without it a prop written by a command that has *not started yet* would\r\n * keep whatever the last evaluation left, and the same frame would look\r\n * different depending on how the playhead reached it.\r\n *\r\n * `onWrite` reports each slot a command writes, with its index in\r\n * {@link placedCommands}; the baseline restore is not reported.\r\n */\r\n evaluateAt(seconds: number, onWrite?: (index: number, slot: PropSlot<unknown>) => void): void {\r\n if (onWrite) {\r\n // Unobserved: a baseline holds prop cells, never presence or structure, so\r\n // an observer watching for those learns nothing from a write per cell.\r\n unobserved(() => this._restoreBaselines());\r\n this._evaluateObserved(seconds, onWrite);\r\n return;\r\n }\r\n\r\n this._restoreBaselines();\r\n for (const placed of this._placed) {\r\n if (seconds < placed.start) continue;\r\n const local = placed.duration > 0\r\n ? (seconds - placed.start) / placed.duration\r\n : 1;\r\n // A finished command is held at `at(1)` rather than dropped, so a prop\r\n // written early and never touched again keeps its value — the same\r\n // rule `commandSequence` uses.\r\n placed.command.at(clamp01(local));\r\n }\r\n }\r\n\r\n /**\r\n * Add and remove document nodes so the tree matches `seconds`. Returns whether\r\n * anything moved.\r\n *\r\n * Separate from {@link evaluateAt} because it is structural: it changes what\r\n * layout walks, not what a prop holds. Called ahead of the evaluation for\r\n * the same time.\r\n */\r\n syncPresence(seconds: number): boolean {\r\n const rows = this._presenceIndex().crossed(seconds);\r\n // Nothing to do on the overwhelming majority of frames.\r\n if (rows.length === 0) return false;\r\n\r\n const arrivals: PresenceRow[] = [];\r\n const departures: PresenceRow[] = [];\r\n for (const row of rows) {\r\n const wanted = within(row, seconds);\r\n if (wanted !== this._present.has(row.id)) (wanted ? arrivals : departures).push(row);\r\n }\r\n this._arrived = arrivals;\r\n if (arrivals.length === 0 && departures.length === 0) return false;\r\n\r\n // Detach first: `remove` unmounts the whole subtree, so a node moving\r\n // parents is never briefly in two places.\r\n departures.sort(byDocumentOrder);\r\n for (const row of departures) {\r\n this._present.delete(row.id);\r\n row.siblings.add(row.slot, -1);\r\n const entry = this._live.get(row.id);\r\n if (!entry) continue;\r\n entry.presence.set(false);\r\n this._parentNodeOf(entry.spec)?.remove(entry.node);\r\n }\r\n\r\n // Insert after whatever the parent built for itself, at the row's place\r\n // among the siblings present, so `layerOrder` really is sibling order and a\r\n // composite's own children keep their indices. Ascending per parent, so\r\n // every sibling before a row is already in place when it lands.\r\n arrivals.sort(byDocumentOrder);\r\n const byParent = new Map<SiblingCounts, PresenceRow[]>();\r\n for (const row of arrivals) {\r\n const group = byParent.get(row.siblings);\r\n if (group) group.push(row);\r\n else byParent.set(row.siblings, [row]);\r\n }\r\n for (const [siblings, group] of byParent) {\r\n group.sort((a, b) => a.slot - b.slot);\r\n const parent = siblings.parentId === ROOT_NODE_ID ? this.canvas : this._live.get(siblings.parentId)?.node;\r\n const base = this._baseChildCount.get(siblings.parentId) ?? 0;\r\n for (const row of group) {\r\n this._present.add(row.id);\r\n const index = base + siblings.before(row.slot);\r\n siblings.add(row.slot, 1);\r\n const child = this._live.get(row.id);\r\n if (!child) continue;\r\n child.presence.set(true);\r\n parent?.addChildAt({ data: { child: child.node, index } });\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /** The node a row built, mounted or not; the canvas for the root. */\r\n liveNode(id: string): Node | undefined {\r\n return id === ROOT_NODE_ID ? this.canvas : this._live.get(id)?.node;\r\n }\r\n\r\n /**\r\n * What a row holds before any command has acted on it: its props as it\r\n * arrived, or as built for one that has not arrived yet. The same at every\r\n * time, which is what tells it from the node's live props. A bound prop is\r\n * read through its binding, so it answers for the tree as it stands.\r\n */\r\n baselineProps(id: string): Record<string, unknown> | undefined {\r\n const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);\r\n if (!entry) return undefined;\r\n const layer = entry.baseline === NO_LAYER ? entry.initial : entry.baseline;\r\n const props: Record<string, unknown> = {};\r\n for (const [key, snap] of layer) props[key] = snap.fn ? snap.fn() : snap.value;\r\n return props;\r\n }\r\n\r\n presenceSlot(id: string): PropSlot<boolean> | undefined {\r\n return id === ROOT_NODE_ID ? this._root?.presence : this._live.get(id)?.presence;\r\n }\r\n\r\n variableSlot(id: string): PropSlot<unknown> | undefined {\r\n return this._vars.get(id)?.cell;\r\n }\r\n\r\n /**\r\n * How to bring this built timeline to `next` in place, or `null` when only a\r\n * fresh build is sound. An audio document must be lowered by the caller first.\r\n */\r\n planUpdate(next: VisualDocument): TimelinePatch | null {\r\n const prev = this._docIndex ??= indexDocument(this._doc);\r\n return planTimelinePatch(prev, indexDocument(next), diffClip(this._doc, next), this._patchEnvironment());\r\n }\r\n\r\n /**\r\n * Apply a {@link planUpdate} result. The canvas must be attached at time 0\r\n * first, as for {@link build}; `prepare` samples and lays out like the step\r\n * between build and compile, `settle` like compile's. A throw leaves the\r\n * timeline unusable — dispose it and build fresh.\r\n */\r\n applyUpdate(patch: TimelinePatch, settle: () => void, prepare: () => void): void {\r\n if (!this._root) throw new Error(\"ClipTimeline.applyUpdate needs a built timeline.\");\r\n if (patch.prev !== this._docIndex) {\r\n throw new Error(\"This patch was planned against a different version of the document.\");\r\n }\r\n\r\n this._restoreBaselines();\r\n this.syncPresence(0);\r\n\r\n this._updateVariables(patch);\r\n this._keyed.clear();\r\n for (const [key, id] of patch.next.keyed) this._keyed.set(key, id);\r\n\r\n const fresh = this._updateStructure(patch);\r\n\r\n for (const entry of fresh) {\r\n captureInitial(entry);\r\n const id = entry.spec.id;\r\n if (!this._present.has(id)) continue;\r\n if (entry.node.mounted) this._baselined.add(id);\r\n else this._unmounted.add(id);\r\n }\r\n if (patch.diff.rootChanged) {\r\n const host = this.canvas as unknown as ReactiveHost;\r\n applySnapshotLayer(host, this._pristineRoot);\r\n host._stateStack.length = 0;\r\n this._applyRootProps();\r\n captureInitial(this._root);\r\n }\r\n for (const id of patch.dirtyNodes) {\r\n const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);\r\n if (entry && !fresh.has(entry)) resetToInitial(entry);\r\n }\r\n prepare();\r\n\r\n const previous = new Map<string, PlacedCommand>();\r\n for (const placed of this._placed) previous.set(placed.spec.id, placed);\r\n const rebuilt = this._walkPatch(patch, previous, settle);\r\n\r\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\r\n const placed: PlacedCommand[] = [];\r\n const touched = new Set<TouchedOwner>();\r\n this._animated = [];\r\n this._animatedVars = [];\r\n this._animatedParts = [];\r\n if (!isStillDocument(this._doc)) {\r\n for (const spec of patch.next.ordered) {\r\n let entry = rebuilt.get(spec.id);\r\n if (!entry && !dirty(patch.next.targetOf(spec))) {\r\n const old = previous.get(spec.id);\r\n if (old) entry = old.spec === spec ? old : { ...old, spec };\r\n }\r\n if (!entry) continue;\r\n placed.push(entry);\r\n this._touch(entry, touched);\r\n }\r\n }\r\n this._placed = placed;\r\n\r\n this._restoreBaselines();\r\n const moved = this.syncPresence(0);\r\n if (this._restoreDisplaced(this._collectDisplaced()) || moved) settle();\r\n }\r\n\r\n private _doc: VisualDocument;\r\n /** The vocabulary this document is compiled against — see `document/registry.ts`. */\r\n private readonly _registry: Registry;\r\n /** The scene root row — see {@link splitRoot}. */\r\n private _rootSpec: NodeSpec;\r\n private _specs: NodeSpec[];\r\n private _varSpecs: readonly VariableSpec[];\r\n private _spans: Map<string, NodeSpan>;\r\n private _duration: number;\r\n /** The current document's index, built on the first {@link planUpdate}. */\r\n private _docIndex: DocIndex | null = null;\r\n /** The canvas's cells before the root row was applied — what a patched root row resets to. */\r\n private _pristineRoot: PropLayer = NO_LAYER;\r\n\r\n /** Live nodes by id, valid between {@link build} and the next rebuild. */\r\n private readonly _live = new Map<string, LiveNode>();\r\n /** Live variables by id, same lifetime as {@link _live}. */\r\n private readonly _vars = new Map<string, LiveVariable>();\r\n /** Node ids by {@link NodeSpec.key}. Read off the document, so it needs no build. */\r\n private readonly _keyed: Map<string, string>;\r\n private _placed: PlacedCommand[] = [];\r\n /** The scene root (`targetId: null`), plus its baseline. */\r\n private _root: LiveNode | null = null;\r\n /**\r\n * Only the nodes some command writes to. Everything else keeps its authored\r\n * props for the life of the scene, so restoring it every frame would be pure\r\n * waste — and on a large static scene that waste is most of the frame.\r\n *\r\n * A prop bound to a variable needs no restoring at all, which falls out of\r\n * this for free: the binding *is* the per-frame recompute, so a node driven\r\n * only by expressions never enters this list.\r\n */\r\n private _animated: LiveNode[] = [];\r\n /** Only the variables some command writes to. Same reasoning. */\r\n private _animatedVars: LiveVariable[] = [];\r\n /**\r\n * Slots on a part a node built for itself that some command writes, restored\r\n * alongside {@link _animated}. A part is no document row, so its baseline is\r\n * the slot's state the first time a command wrote it — see {@link _notePartWrite}.\r\n */\r\n private _animatedParts: PropSlot<unknown>[] = [];\r\n private readonly _partBaselines = new WeakMap<PropSlot<unknown>, PropSnapshot<unknown>>();\r\n /** Children each parent built for itself, which the document must not disturb. */\r\n private readonly _baseChildCount = new Map<string, number>();\r\n /** Node ids currently in the tree, so presence only churns when it changes. */\r\n private readonly _present = new Set<string>();\r\n /** Node ids whose baseline was taken while mounted — see {@link _compileCommands}. */\r\n private _baselined = new Set<string>();\r\n /**\r\n * Rows present at time 0 that a lifecycle command (`removeChildAt`,\r\n * `reparent`) took out of the parent their row names, as compile left them.\r\n * Presence only moves a row across its own span, so nothing else would put\r\n * one back before its command starts.\r\n */\r\n private _displaced: LiveNode[] = [];\r\n /** Rows that arrived, or were built, while an ancestor was out of the tree and wait for it — see {@link _baselineArrival}. */\r\n private readonly _unmounted = new Set<string>();\r\n private _presence: PresenceIndex | null = null;\r\n /** The rows the last {@link syncPresence} brought in, in document order. */\r\n private _arrived: readonly PresenceRow[] = [];\r\n\r\n /**\r\n * What a compiled expression resolves a reference against: a variable, or —\r\n * spelled with a dot — another node's prop.\r\n *\r\n * The dot is the whole discriminator, and it has to be: a node is not a value,\r\n * so `[card]` could never mean one, while a variable reference never carries a\r\n * prop. `document/validate.ts` reads the same split.\r\n *\r\n * A node reference resolves **late**. Nothing about the node is looked up here:\r\n * `build` binds in document order, so the node named may not exist yet, and\r\n * `syncPresence` adds and removes nodes as time moves, so one that exists can\r\n * still be legitimately absent at *t*. The thunk therefore does the lookup on\r\n * every read and answers `undefined` for a node that is not there — which is\r\n * `NaN` through arithmetic, loud in the first frame, and an unset prop on its\r\n * own. Throwing instead would make an `add` at 2s a crash at 0s.\r\n */\r\n private readonly _resolveVariable: VariableResolver = (name) => {\r\n const dot = name.indexOf(\".\");\r\n if (dot > 0) {\r\n const id = this._keyed.get(name.slice(0, dot));\r\n if (id === undefined) return undefined;\r\n const prop = name.slice(dot + 1);\r\n return () => (this._nodeById(id) as unknown as Record<string, unknown> | undefined)?.[prop];\r\n }\r\n return this._vars.get(name)?.read;\r\n };\r\n\r\n /**\r\n * The live node `id` names, or `undefined` while it is unbuilt or out of the\r\n * tree.\r\n *\r\n * Gated on `mounted` rather than on {@link _present}, which is only settled at\r\n * the end of {@link syncPresence} — so a prop read *during* the insertion walk\r\n * would see an out-of-date answer.\r\n */\r\n private _nodeById(id: string): Node | undefined {\r\n if (id === ROOT_NODE_ID) return this.canvas;\r\n const entry = this._live.get(id);\r\n if (!entry) return undefined;\r\n if (_observer !== null) this._readPresence(entry);\r\n return entry.node.mounted ? entry.node : undefined;\r\n }\r\n\r\n /** The row's presence and every document ancestor's — an ancestor leaving unmounts it too. */\r\n private _readPresence(entry: LiveNode): void {\r\n let at: LiveNode | undefined = entry;\r\n for (let depth = 0; at && depth <= this._live.size; depth++) {\r\n at.presence.get();\r\n at = at.spec.parentId === null ? undefined : this._live.get(at.spec.parentId);\r\n }\r\n }\r\n\r\n private _applyRootProps(): void {\r\n const { literal, bindings } = expressionOps.bindProps(this._rootSpec.props, this._resolveVariable);\r\n this.canvas.set({ ...literal, ...bindings } as never);\r\n }\r\n\r\n /** A row's node with its literal props passed to the constructor and its expressions bound after. */\r\n private _instantiate(spec: NodeSpec): Node {\r\n const { literal, bindings, hasBindings } = expressionOps.bindProps(spec.props, this._resolveVariable);\r\n const node = this._registry.instantiate(spec, literal);\r\n // Applied after construction rather than through it: see `instantiate`.\r\n if (hasBindings) node.set(bindings as never);\r\n return node;\r\n }\r\n\r\n /**\r\n * Create a slot per declared variable.\r\n *\r\n * The slot is created once per build and lives for the whole scene: a\r\n * variable has no presence span (see {@link VariableSpec}), so there is\r\n * nothing to sync and nothing that can be missing when an expression\r\n * compiled against it runs.\r\n */\r\n private _buildVariables(): void {\r\n for (const spec of this._varSpecs) {\r\n if (this._vars.has(spec.id)) {\r\n throw new Error(\r\n `Duplicate variable id \"${spec.id}\". Ids must be unique — an expression ` +\r\n `writing \"[${spec.id}]\" would otherwise name whichever declaration was read last.`,\r\n );\r\n }\r\n this._vars.set(spec.id, this._liveVariable(spec));\r\n }\r\n }\r\n\r\n private _liveVariable(spec: VariableSpec): LiveVariable {\r\n const cell = new PropSlot<unknown>(spec.value, null, VAR_PREFIX + spec.id);\r\n return {\r\n spec,\r\n cell,\r\n read: () => cell.get(),\r\n target: this._variableTarget(spec, cell),\r\n baseline: spec.value,\r\n };\r\n }\r\n\r\n private _variableTarget(spec: VariableSpec, cell: PropSlot<unknown>): VariableTarget {\r\n const lerp = this._registry.requireLerp(spec.lerp, spec.value, `variable \"${spec.id}\"`);\r\n return { id: spec.id, get: () => cell.get(), set: (v) => cell.set(v), lerp };\r\n }\r\n\r\n /**\r\n * Put every animated node back to its authored state.\r\n *\r\n * The save stack is truncated alongside the props, and that is not\r\n * housekeeping. `save`/`restore` are commands, so a `save` re-runs on every\r\n * evaluation of a frame after it — without the truncation the stack would\r\n * grow by one layer per frame forever, and a later `restore` would pop a\r\n * layer pushed by some *other* seek instead of the one its own `save` made.\r\n * Truncating is what keeps the pair a function of the chain rather than of\r\n * how the playhead got here.\r\n */\r\n private _restoreBaselines(): void {\r\n // Structure before props: a node put back is attached, and the baseline is\r\n // what it holds once attached.\r\n this._restoreDisplaced(this._displaced);\r\n\r\n // Variables first, so a prop bound to one recomputes against the restored\r\n // value rather than a stale one.\r\n for (const entry of this._animatedVars) entry.cell.set(entry.baseline);\r\n\r\n for (const entry of this._animated) {\r\n const host = entry.node as unknown as ReactiveHost;\r\n applySnapshotLayer(host, entry.baseline);\r\n if (host._stateStack.length > entry.baseStackDepth) {\r\n host._stateStack.length = entry.baseStackDepth;\r\n }\r\n }\r\n\r\n for (const slot of this._animatedParts) slot.restoreFrom(this._partBaselines.get(slot)!);\r\n }\r\n\r\n /**\r\n * Build every command, in timeline order, against a node already holding\r\n * what its predecessors left.\r\n *\r\n * The tree is moved to each command's `at` before it is built: an unmounted\r\n * node hands back an inert stepper and the command caches it, so a tween on a\r\n * node that enters at 2s built against the t=0 tree would never move. A node\r\n * entering here is baselined on arrival, before anything has touched it.\r\n *\r\n * The tree is re-laid-out only where something reads it — see\r\n * {@link _settleWindows}.\r\n */\r\n private _compileCommands(settle: () => void): void {\r\n if (isStillDocument(this._doc)) return;\r\n\r\n const touched = new Set<TouchedOwner>();\r\n const ordered = inTimelineOrder(this._doc.commands);\r\n const refBound = this._refBound(ordered);\r\n const settles = this._settleWindows(ordered, (i) => this._readsLayout(ordered[i], refBound));\r\n\r\n for (let i = 0; i < ordered.length; i++) {\r\n const spec = ordered[i];\r\n if (this.syncPresence(spec.at)) {\r\n // Every node present but not yet baselined arrived in this sync:\r\n // one that left and came back was baselined the first time.\r\n for (const row of this._arrived) {\r\n if (!this._baselined.has(row.id)) this._baselineArrival(row.id);\r\n }\r\n this._baselineMounted();\r\n if (settles[i]) settle();\r\n }\r\n\r\n const placed = this._buildPlaced(spec);\r\n this._placed.push(placed);\r\n this._touch(placed, touched);\r\n }\r\n }\r\n\r\n /** The present rows whose node is no longer under the parent its row names. */\r\n private _collectDisplaced(): LiveNode[] {\r\n const out: LiveNode[] = [];\r\n for (const id of this._present) {\r\n const entry = this._live.get(id);\r\n const parent = entry && this._declaredParent(id);\r\n if (entry && parent && entry.node.parent !== parent) out.push(entry);\r\n }\r\n out.sort((a, b) => this._presenceIndex().row(a.spec.id)!.slot - this._presenceIndex().row(b.spec.id)!.slot);\r\n return (this._displaced = out);\r\n }\r\n\r\n /**\r\n * Put displaced rows back where {@link syncPresence} would have inserted them.\r\n * Returns whether any moved.\r\n */\r\n private _restoreDisplaced(entries: readonly LiveNode[]): boolean {\r\n let moved = false;\r\n for (const entry of entries) {\r\n const id = entry.spec.id;\r\n const row = this._presenceIndex().row(id);\r\n const parent = this._declaredParent(id);\r\n if (!row || !parent || !this._present.has(id) || entry.node.parent === parent) continue;\r\n entry.node.parent?.remove(entry.node);\r\n const base = this._baseChildCount.get(row.siblings.parentId) ?? 0;\r\n parent.addChildAt({ data: { child: entry.node, index: base + row.siblings.before(row.slot) } });\r\n moved = true;\r\n }\r\n return moved;\r\n }\r\n\r\n /** The node a row's `parentId` names: the canvas for the root, `undefined` while that row is unbuilt. */\r\n private _declaredParent(id: string): Node | undefined {\r\n const parentId = this._presenceIndex().row(id)?.siblings.parentId;\r\n if (parentId === undefined) return undefined;\r\n return parentId === ROOT_NODE_ID ? this.canvas : this._live.get(parentId)?.node;\r\n }\r\n\r\n /**\r\n * Take the baseline of a row that has just arrived, if it is mounted.\r\n *\r\n * A baseline is the node as it stands once attached: an unmounted node's cells\r\n * hold pre-attach values, without what it inherits from its ancestors. A row\r\n * can arrive while an ancestor is still out of the tree (a child entering\r\n * before its parent), so its baseline waits in {@link _unmounted} until\r\n * {@link _baselineMounted} finds it mounted.\r\n */\r\n private _baselineArrival(id: string): void {\r\n const entry = this._live.get(id);\r\n if (entry && !entry.node.mounted) {\r\n this._unmounted.add(id);\r\n return;\r\n }\r\n if (entry) captureBaseline(entry);\r\n this._baselined.add(id);\r\n this._unmounted.delete(id);\r\n }\r\n\r\n /** Baseline the rows that arrived unmounted and have since been mounted by an ancestor arriving. */\r\n private _baselineMounted(): void {\r\n for (const id of this._unmounted) {\r\n const entry = this._live.get(id);\r\n if (!entry) {\r\n this._unmounted.delete(id);\r\n } else if (entry.node.mounted) {\r\n captureBaseline(entry);\r\n this._baselined.add(id);\r\n this._unmounted.delete(id);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Build one command against the tree as it stands and run it to its end —\r\n * which is what leaves its target where the next command's `from` must start.\r\n * Undone wholesale by {@link _restoreBaselines}. Throws when its target names\r\n * no row, for a node-scoped command of any kind.\r\n *\r\n * The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`\r\n * when the command is *constructed*, so a chain built against the untouched\r\n * tree would give every step the same `from` and each would jump back to the\r\n * start.\r\n */\r\n private _buildPlaced(spec: CommandSpec): PlacedCommand {\r\n // Resolved in two tiers. The global table holds only what must resolve\r\n // *without* a node — the variable-scoped commands, whose target is not a\r\n // node at all, and the generic prop writers. That is why it is consulted\r\n // first: `scope` is what decides whether there is a node to look anything\r\n // up on. Everything else is a method on the target's own type, where it\r\n // cannot collide with another type's command of the same name.\r\n let entry = this._registry.command(spec.type);\r\n if (!entry) {\r\n const typeKey = this._targetOrThrow(spec).entry.spec.type;\r\n const factory = this._registry.nodeCommand(typeKey, spec.type);\r\n if (!factory) {\r\n throw new Error(\r\n `Node type \"${typeKey}\" has no command \"${spec.type}\" ` +\r\n `(command ${spec.id}). It publishes: ` +\r\n `${this._registry.commandKeys(typeKey).join(\", \") || \"none\"}.` +\r\n (LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : \"\"),\r\n );\r\n }\r\n entry = { key: spec.type, scope: \"node\", factory };\r\n }\r\n\r\n const duration = spec.duration ?? 0;\r\n const easing = resolveEase(spec.easing, this._registry);\r\n const recorder = new WriteRecorder(this._notePartWrite);\r\n // Applied inside `buildToEnd`, so the `at(1)` that leaves the target where\r\n // the next command's `from` starts is the *loop's* end — which for an odd\r\n // number of `alternate` passes is back where it began. A looped command\r\n // then carries the span of every pass, which is what the placed duration\r\n // has to be for a seek into the fourth repetition to land in it.\r\n const loop = loopRepeats(spec.loop) ? spec.loop : undefined;\r\n const repeat = (made: Command<Record<string, unknown>> | void) =>\r\n (made && loop ? loopCommand(made, loop, this._unlimitedFill(spec.at)) : made);\r\n\r\n if (entry.scope === \"variable\") {\r\n const variable = spec.targetId === null ? undefined : this._vars.get(spec.targetId);\r\n if (!variable) {\r\n throw new Error(\r\n `Command ${spec.id} (\"${spec.type}\") targets variable \"${spec.targetId}\", ` +\r\n `which this document does not declare.`,\r\n );\r\n }\r\n this._assertNoExpressions(spec);\r\n const { factory } = entry;\r\n const command = observeSlots(recorder, () =>\r\n buildToEnd(() => repeat(factory(variable.target, spec.args, duration, easing))));\r\n return { spec, start: spec.at, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: variable };\r\n }\r\n\r\n const target = this._targetOrThrow(spec);\r\n const args = entry.binds ? this._bindArgs(spec.args) : (this._assertNoExpressions(spec), spec.args);\r\n const { factory } = entry;\r\n const command = observeSlots(recorder, () =>\r\n buildToEnd(() => repeat(factory(target.node, args, duration, easing))));\r\n return { spec, start: spec.at, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: target.entry };\r\n }\r\n\r\n /**\r\n * Seconds an unlimited loop starting at `at` has to fill.\r\n *\r\n * The clip's own length, which `documentDuration` answers counting one pass\r\n * of every unlimited loop — so a scene made of nothing but a spinner is one\r\n * turn long, and that same spinner in a ten-second scene turns for ten\r\n * seconds rather than stretching the scene to forever.\r\n */\r\n private _unlimitedFill(at: number): number {\r\n return Math.max(0, this._duration - at);\r\n }\r\n\r\n /**\r\n * Put everything a command writes into the restore lists — its target, and\r\n * any *other* node it wrote.\r\n *\r\n * A command is not confined to its target: `Cursor.click` names a control and\r\n * throws it, the way the lifecycle commands tween the child they move. Only\r\n * the target used to be restored, which left the other node holding whatever\r\n * the last evaluation happened to leave — a frame that depends on how the\r\n * playhead reached it, which is the one thing the whole design forbids.\r\n *\r\n * `writes` is already recorded (see {@link WriteRecorder}) and a slot carries\r\n * its owner, so this needs no declaration from the command. A variable's slot\r\n * arrives as {@link PlacedCommand.owner}. A slot on a part a node built for\r\n * itself has no row to be restored through, so it is restored on its own, to\r\n * the state {@link _notePartWrite} saw before any command wrote it.\r\n */\r\n private _touch(placed: PlacedCommand, touched: Set<TouchedOwner>): void {\r\n this._touchOwner(placed.owner, touched);\r\n for (const slot of placed.writes) {\r\n const host = slot._host;\r\n if (host === null) continue;\r\n const entry = host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);\r\n if (entry) {\r\n this._touchOwner(entry, touched);\r\n } else if (this._partBaselines.has(slot) && !touched.has(slot)) {\r\n touched.add(slot);\r\n this._animatedParts.push(slot);\r\n }\r\n }\r\n }\r\n\r\n private _touchOwner(owner: LiveNode | LiveVariable, touched: Set<TouchedOwner>): void {\r\n if (touched.has(owner)) return;\r\n touched.add(owner);\r\n if (\"cell\" in owner) this._animatedVars.push(owner);\r\n else this._animated.push(owner);\r\n }\r\n\r\n /**\r\n * Save a part's slot the first time a command is about to write it.\r\n *\r\n * Called by the observer *before* the write lands, while a command is built:\r\n * every earlier command has run to its end by then, but none of them wrote\r\n * this slot, so what it holds is what the part was built with (plus whatever\r\n * the command's own factory primed, which is part of the command, not of the\r\n * part).\r\n */\r\n private readonly _notePartWrite = (slot: PropSlot<unknown>): void => {\r\n const host = slot._host;\r\n if (host === null || this._partBaselines.has(slot)) return;\r\n if (host.id === ROOT_NODE_ID || this._live.has(host.id)) return;\r\n this._partBaselines.set(slot, slot.snapshot());\r\n };\r\n\r\n /**\r\n * Compile the expressions in a binding command's args.\r\n *\r\n * A command declaring `binds` is saying its args *are* a props diff that\r\n * reaches `node.set()` — `set` is the only built-in that does — where a\r\n * function is a binding.\r\n */\r\n private _bindArgs(args: Record<string, unknown>): Record<string, unknown> {\r\n const { literal, bindings } = expressionOps.bindProps(args, this._resolveVariable, \"args\");\r\n return { ...literal, ...bindings };\r\n }\r\n\r\n /**\r\n * Refuse an expression in a command that cannot bind one.\r\n *\r\n * An expression is a *binding*: it says a prop follows a variable for as\r\n * long as it is set. A tween's destination is a **value** — `to` reads it\r\n * once, when the command compiles, to work out what it is interpolating\r\n * towards — so a formula there could only ever mean \"the value this happened\r\n * to have at build time\", which is never what anyone writing it meant.\r\n * Failing here rather than coercing is the same call `NodeSpec.type` makes:\r\n * a document that half-renders is worse than one that refuses to.\r\n */\r\n private _assertNoExpressions(spec: CommandSpec): void {\r\n const found = expressionOps.collect(spec.args, \"args\");\r\n if (found.length === 0) return;\r\n const { path, source } = found[0];\r\n throw new Error(\r\n `Command ${spec.id} (\"${spec.type}\") carries an expression at ${path}: ${JSON.stringify(source)}. ` +\r\n `Expressions bind a prop to a variable; they are not tween destinations. ` +\r\n `Bind the prop where the node is authored (or with a \"set\" command) and animate the variable ` +\r\n `with \"variableTo\" instead.`,\r\n );\r\n }\r\n\r\n /** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */\r\n private _targetOrThrow(spec: CommandSpec): { id: string; node: Node; entry: LiveNode } {\r\n const target = this._targetOf(spec);\r\n if (!target) {\r\n throw new Error(\r\n `Command ${spec.id} (\"${spec.type}\") targets node \"${spec.targetId}\", ` +\r\n `which this document does not declare.`,\r\n );\r\n }\r\n return target;\r\n }\r\n\r\n /** Resolve a command's `targetId` to a live node, or `null` if it names nothing. */\r\n private _targetOf(spec: CommandSpec): { id: string; node: Node; entry: LiveNode } | null {\r\n if (spec.targetId === null) {\r\n return this._root ? { id: ROOT_NODE_ID, node: this._root.node, entry: this._root } : null;\r\n }\r\n const entry = this._live.get(spec.targetId);\r\n return entry ? { id: spec.targetId, node: entry.node, entry } : null;\r\n }\r\n\r\n private _evaluateObserved(seconds: number, onWrite: (index: number, slot: PropSlot<unknown>) => void): void {\r\n let index = 0;\r\n const observer: SlotObserver = { read: () => { }, write: (slot) => onWrite(index, slot) };\r\n observeSlots(observer, () => {\r\n for (; index < this._placed.length; index++) {\r\n const placed = this._placed[index];\r\n if (seconds < placed.start) continue;\r\n const local = placed.duration > 0 ? (seconds - placed.start) / placed.duration : 1;\r\n placed.command.at(clamp01(local));\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Mark the steps that open a presence window needing a settle: a window is\r\n * the run of steps between two changes to the tree, and it needs one only\r\n * when a step in it reads layout.\r\n *\r\n * At the window's start rather than just before its first reader, because a\r\n * reader must see the boxes as they stood when the window opened — a size tween\r\n * built earlier in the same window has already run to its end by then, and a\r\n * settle after it would hand the reader that end state instead.\r\n */\r\n private _settleWindows(steps: readonly { at: number }[], reads: (index: number) => boolean): Uint8Array {\r\n const index = this._presenceIndex();\r\n const settles = new Uint8Array(steps.length);\r\n // -1 is the window the tree was already laid out for.\r\n let opener = -1;\r\n let previous = index.time;\r\n for (let i = 0; i < steps.length; i++) {\r\n const { at } = steps[i];\r\n if (index.differs(previous, at)) opener = i;\r\n previous = at;\r\n if (opener < 0 || settles[opener]) continue;\r\n if (reads(i)) settles[opener] = 1;\r\n }\r\n return settles;\r\n }\r\n\r\n private _readsLayout(spec: CommandSpec, refBound: ReadonlySet<string>): boolean {\r\n const id = spec.targetId ?? ROOT_NODE_ID;\r\n const target = spec.targetId === null ? this._rootSpec : this._live.get(spec.targetId)?.spec;\r\n const traits = commandTraits(this._registry, spec, target);\r\n return traits === null || traits.readsLayout || refBound.has(id);\r\n }\r\n\r\n /**\r\n * Targets of a binding command carrying a node reference: a binding a `set`\r\n * installs mid-scene can read another node's box, and a `from` taken over it\r\n * later evaluates it.\r\n */\r\n private _refBound(commands: readonly CommandSpec[]): Set<string> {\r\n const out = new Set<string>();\r\n for (const spec of commands) {\r\n const entry = this._registry.command(spec.type);\r\n if (entry?.scope === \"node\" && entry.binds && hasNodeRef(spec.args)) out.add(spec.targetId ?? ROOT_NODE_ID);\r\n }\r\n return out;\r\n }\r\n\r\n /** Built on first use, from the rows as they stand. */\r\n private _presenceIndex(): PresenceIndex {\r\n return this._presence ??= new PresenceIndex(this._specs, this._spans);\r\n }\r\n\r\n /** The live node a spec's `parentId` names, or the scene root. */\r\n private _parentNodeOf(spec: NodeSpec): Node | undefined {\r\n if (spec.parentId === null) return this.canvas;\r\n return this._live.get(spec.parentId)?.node;\r\n }\r\n\r\n private _patchEnvironment(): PatchEnvironment {\r\n const registry = this._registry;\r\n return {\r\n traits: (spec, target) => commandTraits(registry, spec, target),\r\n nodeRefs: (spec, target) => commandNodeRefs(registry, spec, target),\r\n isContextProvider: (type) => isContextProvider(registry, type),\r\n isLayoutNeutralProp: (type, key) => isLayoutNeutralProp(registry, type, key),\r\n ctorOf: (id) => this._live.get(id)?.node.constructor,\r\n registeredCtor: (type) => registry.node(type)?.ctor,\r\n dimensionOf: (type) => registry.node(type)?.descriptor.dimension,\r\n };\r\n }\r\n\r\n private _updateVariables(patch: TimelinePatch): void {\r\n const { added, removed, changed } = patch.diff.variables;\r\n for (const id of removed) this._vars.delete(id);\r\n for (const id of added) this._vars.set(id, this._liveVariable(patch.next.variables.get(id)!));\r\n for (const id of changed) {\r\n const spec = patch.next.variables.get(id)!;\r\n const entry = this._vars.get(id);\r\n if (!entry) {\r\n this._vars.set(id, this._liveVariable(spec));\r\n continue;\r\n }\r\n entry.baseline = spec.value;\r\n entry.target = this._variableTarget(spec, entry.cell);\r\n }\r\n for (const spec of patch.next.variables.values()) {\r\n const entry = this._vars.get(spec.id);\r\n if (entry) entry.spec = spec;\r\n }\r\n // Restoring only resets animated variables, so a changed value nothing animates would never land.\r\n for (const id of patch.dirtyVariables) {\r\n const entry = this._vars.get(id);\r\n if (entry) entry.cell.set(entry.baseline);\r\n }\r\n }\r\n\r\n /**\r\n * Take detached rows out of the tree, replace and add instances, swap in the\r\n * next document's rows, and re-insert whatever is present at 0. Returns the\r\n * entries holding a new instance.\r\n */\r\n private _updateStructure(patch: TimelinePatch): Set<LiveNode> {\r\n const { next } = patch;\r\n\r\n for (const id of patch.detach) {\r\n const entry = this._live.get(id);\r\n if (!entry) continue;\r\n entry.node.parent?.remove(entry.node);\r\n entry.presence.set(false);\r\n this._present.delete(id);\r\n }\r\n\r\n const isDocumentNode = (node: Node) => this._live.get(node.id)?.node === node;\r\n for (const id of patch.removed) {\r\n const entry = this._live.get(id);\r\n if (!entry) continue;\r\n disposeBuilt(entry.node, isDocumentNode);\r\n this._live.delete(id);\r\n this._baseChildCount.delete(id);\r\n this._baselined.delete(id);\r\n this._unmounted.delete(id);\r\n }\r\n for (const id of patch.reinstantiate) {\r\n const entry = this._live.get(id);\r\n if (entry) disposeBuilt(entry.node, isDocumentNode);\r\n }\r\n\r\n const { root, rest } = splitRoot(next.doc.nodes);\r\n const fresh = new Set<LiveNode>();\r\n for (const spec of rest) {\r\n let entry = this._live.get(spec.id);\r\n if (entry && !patch.reinstantiate.has(spec.id)) {\r\n entry.spec = spec;\r\n continue;\r\n }\r\n const node = this._instantiate(spec);\r\n if (entry) {\r\n entry.spec = spec;\r\n entry.node = node;\r\n this._baselined.delete(spec.id);\r\n this._unmounted.delete(spec.id);\r\n } else {\r\n entry = {\r\n spec,\r\n node,\r\n initial: NO_LAYER,\r\n initialStackDepth: 0,\r\n baseline: NO_LAYER,\r\n baseStackDepth: 0,\r\n presence: new PropSlot<boolean>(false, null, PRESENCE_PREFIX + spec.id),\r\n };\r\n this._live.set(spec.id, entry);\r\n }\r\n this._baseChildCount.set(spec.id, node._allChildren.length);\r\n fresh.add(entry);\r\n }\r\n\r\n this._doc = next.doc;\r\n this._docIndex = next;\r\n this._rootSpec = root;\r\n this._root!.spec = root;\r\n this._specs = rest;\r\n this._varSpecs = next.doc.variables ?? [];\r\n this._spans = presenceOf(next.doc);\r\n this._duration = documentDuration(next.doc);\r\n\r\n // A fresh index knows nothing is in the tree, so seed it with what still is.\r\n const index = this._presence = new PresenceIndex(this._specs, this._spans);\r\n for (const id of [...this._present]) {\r\n const row = index.row(id);\r\n if (row && within(row, 0)) {\r\n row.siblings.add(row.slot, 1);\r\n continue;\r\n }\r\n this._present.delete(id);\r\n const entry = this._live.get(id);\r\n if (!entry) continue;\r\n entry.presence.set(false);\r\n entry.node.parent?.remove(entry.node);\r\n }\r\n this.syncPresence(0);\r\n return fresh;\r\n }\r\n\r\n /**\r\n * Rebuild the dirty chains in the next document's timeline order, replaying the\r\n * clean chains they build against and taking arrival baselines where compile\r\n * would have. Returns the rebuilt commands by id.\r\n */\r\n private _walkPatch(\r\n patch: TimelinePatch,\r\n previous: ReadonlyMap<string, PlacedCommand>,\r\n settle: () => void,\r\n ): Map<string, PlacedCommand> {\r\n const rebuilt = new Map<string, PlacedCommand>();\r\n if (isStillDocument(this._doc)) return rebuilt;\r\n\r\n const { next } = patch;\r\n const dirty = (id: string) => patch.dirtyNodes.has(id) || patch.dirtyVariables.has(id);\r\n const refBound = this._refBound(next.ordered);\r\n let replay = patch.replay;\r\n // A settle for a binding over another node's box has to see every chain at its `at`.\r\n if (replay !== \"all\" && [...refBound].some(dirty)) replay = \"all\";\r\n\r\n const steps: WalkStep[] = [];\r\n const { captures } = patch;\r\n let c = 0;\r\n for (const spec of next.ordered) {\r\n while (c < captures.length && captures[c].at <= spec.at) steps.push({ at: captures[c].at, capture: captures[c++].id });\r\n const id = next.targetOf(spec);\r\n if (replay === \"all\" || dirty(id) || replay.has(id)) steps.push({ at: spec.at, spec });\r\n }\r\n for (; c < captures.length; c++) steps.push({ at: captures[c].at, capture: captures[c].id });\r\n\r\n const settles = this._settleWindows(steps, (i) => {\r\n const spec = steps[i].spec;\r\n return spec !== undefined && dirty(next.targetOf(spec)) && this._readsLayout(spec, refBound);\r\n });\r\n\r\n let pending = false;\r\n for (let i = 0; i < steps.length; i++) {\r\n const step = steps[i];\r\n if (settles[i]) pending = true;\r\n if (this.syncPresence(step.at)) this._baselineMounted();\r\n if (step.capture !== undefined) {\r\n this._baselined.delete(step.capture);\r\n this._baselineArrival(step.capture);\r\n continue;\r\n }\r\n // After this `at`'s captures, as compile baselines arrivals before it settles.\r\n if (pending) {\r\n settle();\r\n pending = false;\r\n }\r\n const spec = step.spec!;\r\n const old = previous.get(spec.id);\r\n if (old && !dirty(next.targetOf(spec))) {\r\n old.command.at(1);\r\n continue;\r\n }\r\n rebuilt.set(spec.id, this._buildPlaced(spec));\r\n }\r\n return rebuilt;\r\n }\r\n}\r\n\r\n/**\r\n * What to say when a command type the format no longer has fails to resolve.\r\n * A document written before nodes carried their own spans is otherwise a\r\n * \"no command\" error that names nothing it could be fixed with.\r\n */\r\nconst LEGACY_COMMAND_HINTS: Readonly<Record<string, string>> = {\r\n add: \"A node is a row in `nodes`, entering at its `startAt`.\",\r\n remove: \"A node leaves at its `endAt`.\",\r\n variable: \"A variable is declared in `variables`.\",\r\n};\r\n\r\nconst NO_LAYER: PropLayer = new Map();\r\n\r\n/** What {@link ClipTimeline._touch} dedupes: an owner, or a part's slot. */\r\ntype TouchedOwner = LiveNode | LiveVariable | PropSlot<unknown>;\r\n\r\n/** Records what building one command wrote, and whether it read a laid-out box. */\r\nclass WriteRecorder implements SlotObserver {\r\n readonly writes = new Set<PropSlot<unknown>>();\r\n readsLayout = false;\r\n\r\n /** `firstWrite` runs the first time a slot is written, before the write lands. */\r\n constructor(private readonly firstWrite: (slot: PropSlot<unknown>) => void) { }\r\n\r\n read(slot: PropSlot<unknown>): void {\r\n if (slot._name === LAYOUT_SLOT) this.readsLayout = true;\r\n }\r\n\r\n write(slot: PropSlot<unknown>): void {\r\n if (this.writes.has(slot)) return;\r\n this.firstWrite(slot);\r\n this.writes.add(slot);\r\n }\r\n}\r\n\r\n/**\r\n * Build a command and run it to its end. A factory that acts at once and returns\r\n * nothing (`restore` with no duration) has already done this build's `at(1)`, so\r\n * it becomes a stamp that acts again on every later evaluation.\r\n */\r\nfunction buildToEnd(make: () => Command<Record<string, unknown>> | void): Command<Record<string, unknown>> {\r\n const made = make();\r\n if (made) {\r\n made.at(1);\r\n return made;\r\n }\r\n return driveCommand(0, () => {\r\n make();\r\n }) as unknown as Command<Record<string, unknown>>;\r\n}\r\n\r\n/**\r\n * Snapshot a node's prop slots at its authored state. Taken while it is mounted:\r\n * an unmounted node's cells hold pre-attach values.\r\n */\r\nfunction captureBaseline(entry: LiveNode): void {\r\n const host = entry.node as unknown as ReactiveHost;\r\n entry.baseline = captureLayer(host);\r\n entry.baseStackDepth = host._stateStack.length;\r\n}\r\n\r\nfunction captureInitial(entry: LiveNode): void {\r\n captureBaseline(entry);\r\n entry.initial = entry.baseline;\r\n entry.initialStackDepth = entry.baseStackDepth;\r\n}\r\n\r\nfunction resetToInitial(entry: LiveNode): void {\r\n const host = entry.node as unknown as ReactiveHost;\r\n applySnapshotLayer(host, entry.initial);\r\n if (host._stateStack.length > entry.initialStackDepth) host._stateStack.length = entry.initialStackDepth;\r\n entry.baseline = entry.initial;\r\n entry.baseStackDepth = entry.initialStackDepth;\r\n}\r\n\r\n/** Dispose `node` and whatever it built for itself; a document child it still holds is left alone. */\r\nfunction disposeBuilt(node: Node, isDocumentNode: (node: Node) => boolean): void {\r\n for (const child of node._allChildren) {\r\n if (!isDocumentNode(child)) disposeBuilt(child, isDocumentNode);\r\n }\r\n node.dispose();\r\n}\r\n\r\n/** One document row's place in a {@link PresenceIndex}. */\r\ninterface PresenceRow {\r\n id: string;\r\n start: number;\r\n end: number;\r\n /** Position in the document's rows. */\r\n order: number;\r\n /** Position among its parent's document children, in `layerOrder` order. */\r\n slot: number;\r\n siblings: SiblingCounts;\r\n /** The last {@link PresenceIndex.crossed} pass that collected this row. */\r\n pass: number;\r\n}\r\n\r\nfunction within(row: PresenceRow, seconds: number): boolean {\r\n return seconds >= row.start && seconds < row.end;\r\n}\r\n\r\nfunction byDocumentOrder(a: PresenceRow, b: PresenceRow): number {\r\n return a.order - b.order;\r\n}\r\n\r\n/**\r\n * How many of one parent's document children are present before a given slot — a\r\n * Fenwick tree, so an insert index costs O(log siblings) rather than a walk over\r\n * every sibling.\r\n */\r\nclass SiblingCounts {\r\n constructor(readonly parentId: string, size: number) {\r\n this._tree = new Int32Array(size + 1);\r\n }\r\n\r\n add(slot: number, delta: number): void {\r\n for (let i = slot + 1; i < this._tree.length; i += i & -i) this._tree[i] += delta;\r\n }\r\n\r\n before(slot: number): number {\r\n let count = 0;\r\n for (let i = slot; i > 0; i -= i & -i) count += this._tree[i];\r\n return count;\r\n }\r\n\r\n private readonly _tree: Int32Array;\r\n}\r\n\r\n/**\r\n * Every span boundary, sorted by time, and a cursor at the last time synced.\r\n *\r\n * Moving to another time visits only the rows with a boundary between the two, in\r\n * either direction and however far — which is what keeps a scrub, and a compile\r\n * walking its commands, from rescanning every node per step.\r\n */\r\nclass PresenceIndex {\r\n /** The last time {@link crossed} was asked for. Nothing is present before the first. */\r\n time = -Infinity;\r\n\r\n constructor(specs: readonly NodeSpec[], spans: ReadonlyMap<string, NodeSpan>) {\r\n const byParent = new Map<string, { spec: NodeSpec; order: number }[]>();\r\n specs.forEach((spec, order) => {\r\n if (!spans.has(spec.id)) return;\r\n const parentId = spec.parentId ?? ROOT_NODE_ID;\r\n const group = byParent.get(parentId);\r\n if (group) group.push({ spec, order });\r\n else byParent.set(parentId, [{ spec, order }]);\r\n });\r\n for (const [parentId, group] of byParent) {\r\n // Stable, so a `layerOrder` tie keeps document order.\r\n group.sort((a, b) => a.spec.layerOrder - b.spec.layerOrder);\r\n const siblings = new SiblingCounts(parentId, group.length);\r\n group.forEach(({ spec, order }, slot) => {\r\n const { start, end } = spans.get(spec.id)!;\r\n const row: PresenceRow = { id: spec.id, start, end, order, slot, siblings, pass: 0 };\r\n this._rows.set(spec.id, row);\r\n this._events.push({ time: start, row });\r\n if (Number.isFinite(end)) this._events.push({ time: end, row });\r\n });\r\n }\r\n this._events.sort((a, b) => a.time - b.time);\r\n }\r\n\r\n /** Each row with a boundary between the last time synced and `seconds`, once. Moves the cursor. */\r\n crossed(seconds: number): readonly PresenceRow[] {\r\n this.time = seconds;\r\n const target = this._upperBound(seconds);\r\n if (target === this._cursor) return NO_ROWS;\r\n const from = Math.min(target, this._cursor);\r\n const to = Math.max(target, this._cursor);\r\n this._cursor = target;\r\n const pass = ++this._pass;\r\n const rows: PresenceRow[] = [];\r\n for (let k = from; k < to; k++) {\r\n const { row } = this._events[k];\r\n if (row.pass === pass) continue;\r\n row.pass = pass;\r\n rows.push(row);\r\n }\r\n return rows;\r\n }\r\n\r\n /** Whether any row is present at one of `a`, `b` and not the other. Moves nothing. */\r\n differs(a: number, b: number): boolean {\r\n const from = this._upperBound(Math.min(a, b));\r\n const to = this._upperBound(Math.max(a, b));\r\n for (let k = from; k < to; k++) {\r\n const { row } = this._events[k];\r\n if (within(row, a) !== within(row, b)) return true;\r\n }\r\n return false;\r\n }\r\n\r\n row(id: string): PresenceRow | undefined {\r\n return this._rows.get(id);\r\n }\r\n\r\n private readonly _events: { time: number; row: PresenceRow }[] = [];\r\n private readonly _rows = new Map<string, PresenceRow>();\r\n /** How many events are at or before {@link time}. */\r\n private _cursor = 0;\r\n private _pass = 0;\r\n\r\n /** The first event after `seconds` — every event before it has happened by then. */\r\n private _upperBound(seconds: number): number {\r\n let lo = 0;\r\n let hi = this._events.length;\r\n while (lo < hi) {\r\n const mid = (lo + hi) >>> 1;\r\n if (this._events[mid].time <= seconds) lo = mid + 1;\r\n else hi = mid;\r\n }\r\n return lo;\r\n }\r\n}\r\n\r\nconst NO_ROWS: readonly PresenceRow[] = [];\r\n"]}
@@ -9,13 +9,13 @@ import type { Theme } from "../project/config.js";
9
9
  */
10
10
  export type { LoopDirection, LoopSpec } from "../tween/loop.js";
11
11
  /**
12
- * The scene document: what a scene **is**, as data.
12
+ * The clip document: what a clip **is**, as data.
13
13
  *
14
- * A scene used to be a generator function, so the only way to know what frame N
14
+ * A visual clip used to be a generator function, so the only way to know what frame N
15
15
  * looked like was to run frames 0..N-1. That made a whole class of host
16
16
  * impossible — a document cannot be stored, diffed, synced or evaluated out of
17
17
  * order when its meaning is "whatever running this code does". These types are
18
- * the replacement: a scene is rows, and a frame is a pure function of them.
18
+ * the replacement: a clip is rows, and a frame is a pure function of them.
19
19
  *
20
20
  * The split between what is data and what is code is deliberate and total:
21
21
  *
@@ -24,7 +24,7 @@ export type { LoopDirection, LoopSpec } from "../tween/loop.js";
24
24
  * with its own `@property` declarations, its own `renderSelf`, its own
25
25
  * `@command` methods — and it is where anything a JSON value cannot express
26
26
  * (a computed lookup table, a generated point cloud) belongs.
27
- * - **Scenes are data.** Which nodes exist, what props they carry, and what
27
+ * - **Documents are data.** Which nodes exist, what props they carry, and what
28
28
  * happens to them over time are plain JSON.
29
29
  *
30
30
  * Everything here is JSON-serializable by construction: no functions, no class
@@ -343,10 +343,10 @@ export interface AudioDocument {
343
343
  /** Defaults to the last moment anything happens, same rule as {@link CompositionDocument}. */
344
344
  duration?: number;
345
345
  }
346
- /** Either **scene** document kind — the two that draw. */
347
- export type SceneDocument = StillDocument | CompositionDocument;
346
+ /** Either **visual** document kind — the two that draw. */
347
+ export type VisualDocument = StillDocument | CompositionDocument;
348
348
  /**
349
- * Anything a project track can play: a scene, or sound.
349
+ * Anything a project track can play: a picture, or sound.
350
350
  *
351
351
  * One union rather than two lists, because a track is a placement and a
352
352
  * placement does not care which. A composition already carries both halves —
@@ -354,11 +354,11 @@ export type SceneDocument = StillDocument | CompositionDocument;
354
354
  * {@link AudioDocument} is not "the audio track kind", it is the clip you reach
355
355
  * for when there is no picture to go with the sound.
356
356
  */
357
- export type ClipDocument = SceneDocument | AudioDocument;
358
- /** Narrows a {@link SceneDocument} to a still. */
359
- export declare function isStillDocument(doc: SceneDocument): doc is StillDocument;
360
- /** Narrows a {@link SceneDocument} to a composition. */
361
- export declare function isCompositionDocument(doc: SceneDocument): doc is CompositionDocument;
357
+ export type ClipDocument = VisualDocument | AudioDocument;
358
+ /** Narrows a {@link VisualDocument} to a still. */
359
+ export declare function isStillDocument(doc: VisualDocument): doc is StillDocument;
360
+ /** Narrows a {@link VisualDocument} to a composition. */
361
+ export declare function isCompositionDocument(doc: VisualDocument): doc is CompositionDocument;
362
362
  /** Narrows a {@link ClipDocument} to an audio document. */
363
363
  export declare function isAudioDocument(doc: ClipDocument): doc is AudioDocument;
364
364
  /** Narrows a {@link ClipDocument} to one that has a clock — anything but a still. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/document/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;GAIG;AACH,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,QAAQ;IACrB,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC3C,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,YAAY;IACzB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,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,GAAG,QAAQ,CAGhE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAIxD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAY1D"}
@@ -1,9 +1,9 @@
1
1
  import { loopPasses } from "../tween/loop.js";
2
- /** Narrows a {@link SceneDocument} to a still. */
2
+ /** Narrows a {@link VisualDocument} to a still. */
3
3
  export function isStillDocument(doc) {
4
4
  return doc.kind === "still";
5
5
  }
6
- /** Narrows a {@link SceneDocument} to a composition. */
6
+ /** Narrows a {@link VisualDocument} to a composition. */
7
7
  export function isCompositionDocument(doc) {
8
8
  return doc.kind === "composition";
9
9
  }