@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,16 +1,16 @@
1
1
  import type { Node } from "../nodes/node/node.js";
2
- import type { Canvas2D } from "../nodes/scene/canvas2d-node.js";
2
+ import type { Canvas2D } from "../nodes/root/canvas2d-node.js";
3
3
  import { PropSlot } from "../props/slot.js";
4
4
  import type { Registry } from "./registry.js";
5
5
  import { type TimelinePatch } from "./timeline-patch.js";
6
- import type { CommandSpec, SceneDocument, VariableSpec } from "./types.js";
6
+ import type { CommandSpec, VisualDocument, VariableSpec } from "./types.js";
7
7
  /**
8
- * A compiled scene document: the thing that answers "what does this look like
8
+ * A compiled clip document: the thing that answers "what does this look like
9
9
  * at `t`" without having rendered `t - 1`.
10
10
  *
11
- * This is the whole reason the document model exists. A generator scene could
11
+ * This is the whole reason the document model exists. A generator could
12
12
  * only be *advanced*, so a backward seek meant tearing the tree down and
13
- * replaying from frame 0, and a scene's duration was unknowable without running
13
+ * replaying from frame 0, and a clip's duration was unknowable without running
14
14
  * it to the end. A timeline is built once and evaluated in any order, at any
15
15
  * time, as many times as you like — which is what makes scrubbing cheap, export
16
16
  * parallelizable, and a frame reproducible.
@@ -45,13 +45,13 @@ import type { CommandSpec, SceneDocument, VariableSpec } from "./types.js";
45
45
  * to restore, because nothing overwrote it.
46
46
  *
47
47
  * A reference spelled with a dot (`"=[card.x]+20"`) reads another node's prop
48
- * instead, through the same machinery — see `SceneTimeline._resolveVariable`
48
+ * instead, through the same machinery — see `ClipTimeline._resolveVariable`
49
49
  * for why that one resolves at read time rather than at compile time.
50
50
  */
51
51
  /** A placed command as the runtime outside the timeline sees it. */
52
52
  export interface PlacedCommandInfo {
53
53
  readonly spec: CommandSpec;
54
- /** Seconds from scene start. */
54
+ /** Seconds from clip start. */
55
55
  readonly start: number;
56
56
  /** Seconds. Zero is a stamp — it applies in full from `start` onward. */
57
57
  readonly duration: number;
@@ -60,12 +60,12 @@ export interface PlacedCommandInfo {
60
60
  readonly readsLayout: boolean;
61
61
  }
62
62
  /**
63
- * The scene document, compiled and evaluable, over the one canvas it builds
63
+ * The clip document, compiled and evaluable, over the one canvas it builds
64
64
  * into — its live nodes, presence and baselines all belong to that tree.
65
65
  */
66
- export declare class SceneTimeline {
66
+ export declare class ClipTimeline {
67
67
  private readonly canvas;
68
- constructor(doc: SceneDocument, registry: Registry, canvas: Canvas2D);
68
+ constructor(doc: VisualDocument, registry: Registry, canvas: Canvas2D);
69
69
  /** How long the scene runs. Read by the runtime after {@link build}. */
70
70
  get duration(): number;
71
71
  /** Instantiate the tree into the canvas. Once per timeline: the nodes it makes belong to that canvas. */
@@ -112,13 +112,20 @@ export declare class SceneTimeline {
112
112
  syncPresence(seconds: number): boolean;
113
113
  /** The node a row built, mounted or not; the canvas for the root. */
114
114
  liveNode(id: string): Node | undefined;
115
+ /**
116
+ * What a row holds before any command has acted on it: its props as it
117
+ * arrived, or as built for one that has not arrived yet. The same at every
118
+ * time, which is what tells it from the node's live props. A bound prop is
119
+ * read through its binding, so it answers for the tree as it stands.
120
+ */
121
+ baselineProps(id: string): Record<string, unknown> | undefined;
115
122
  presenceSlot(id: string): PropSlot<boolean> | undefined;
116
123
  variableSlot(id: string): PropSlot<unknown> | undefined;
117
124
  /**
118
125
  * How to bring this built timeline to `next` in place, or `null` when only a
119
126
  * fresh build is sound. An audio document must be lowered by the caller first.
120
127
  */
121
- planUpdate(next: SceneDocument): TimelinePatch | null;
128
+ planUpdate(next: VisualDocument): TimelinePatch | null;
122
129
  /**
123
130
  * Apply a {@link planUpdate} result. The canvas must be attached at time 0
124
131
  * first, as for {@link build}; `prepare` samples and lays out like the step
@@ -160,12 +167,28 @@ export declare class SceneTimeline {
160
167
  private _animated;
161
168
  /** Only the variables some command writes to. Same reasoning. */
162
169
  private _animatedVars;
170
+ /**
171
+ * Slots on a part a node built for itself that some command writes, restored
172
+ * alongside {@link _animated}. A part is no document row, so its baseline is
173
+ * the slot's state the first time a command wrote it — see {@link _notePartWrite}.
174
+ */
175
+ private _animatedParts;
176
+ private readonly _partBaselines;
163
177
  /** Children each parent built for itself, which the document must not disturb. */
164
178
  private readonly _baseChildCount;
165
179
  /** Node ids currently in the tree, so presence only churns when it changes. */
166
180
  private readonly _present;
167
181
  /** Node ids whose baseline was taken while mounted — see {@link _compileCommands}. */
168
182
  private _baselined;
183
+ /**
184
+ * Rows present at time 0 that a lifecycle command (`removeChildAt`,
185
+ * `reparent`) took out of the parent their row names, as compile left them.
186
+ * Presence only moves a row across its own span, so nothing else would put
187
+ * one back before its command starts.
188
+ */
189
+ private _displaced;
190
+ /** Rows that arrived, or were built, while an ancestor was out of the tree and wait for it — see {@link _baselineArrival}. */
191
+ private readonly _unmounted;
169
192
  private _presence;
170
193
  /** The rows the last {@link syncPresence} brought in, in document order. */
171
194
  private _arrived;
@@ -236,11 +259,32 @@ export declare class SceneTimeline {
236
259
  * {@link _settleWindows}.
237
260
  */
238
261
  private _compileCommands;
262
+ /** The present rows whose node is no longer under the parent its row names. */
263
+ private _collectDisplaced;
264
+ /**
265
+ * Put displaced rows back where {@link syncPresence} would have inserted them.
266
+ * Returns whether any moved.
267
+ */
268
+ private _restoreDisplaced;
269
+ /** The node a row's `parentId` names: the canvas for the root, `undefined` while that row is unbuilt. */
270
+ private _declaredParent;
271
+ /**
272
+ * Take the baseline of a row that has just arrived, if it is mounted.
273
+ *
274
+ * A baseline is the node as it stands once attached: an unmounted node's cells
275
+ * hold pre-attach values, without what it inherits from its ancestors. A row
276
+ * can arrive while an ancestor is still out of the tree (a child entering
277
+ * before its parent), so its baseline waits in {@link _unmounted} until
278
+ * {@link _baselineMounted} finds it mounted.
279
+ */
280
+ private _baselineArrival;
281
+ /** Baseline the rows that arrived unmounted and have since been mounted by an ancestor arriving. */
282
+ private _baselineMounted;
239
283
  /**
240
284
  * Build one command against the tree as it stands and run it to its end —
241
285
  * which is what leaves its target where the next command's `from` must start.
242
- * Undone wholesale by {@link _restoreBaselines}. `null` when its target node
243
- * does not exist.
286
+ * Undone wholesale by {@link _restoreBaselines}. Throws when its target names
287
+ * no row, for a node-scoped command of any kind.
244
288
  *
245
289
  * The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`
246
290
  * when the command is *constructed*, so a chain built against the untouched
@@ -268,14 +312,23 @@ export declare class SceneTimeline {
268
312
  * playhead reached it, which is the one thing the whole design forbids.
269
313
  *
270
314
  * `writes` is already recorded (see {@link WriteRecorder}) and a slot carries
271
- * its owner, so this needs no declaration from the command. A slot whose host
272
- * is no document row — a variable's, or a cell on a child a composite built
273
- * for itself — has no baseline of its own and is skipped: the variable
274
- * arrives as {@link PlacedCommand.owner}, and the composite's child is
275
- * rebuilt with its parent.
315
+ * its owner, so this needs no declaration from the command. A variable's slot
316
+ * arrives as {@link PlacedCommand.owner}. A slot on a part a node built for
317
+ * itself has no row to be restored through, so it is restored on its own, to
318
+ * the state {@link _notePartWrite} saw before any command wrote it.
276
319
  */
277
320
  private _touch;
278
321
  private _touchOwner;
322
+ /**
323
+ * Save a part's slot the first time a command is about to write it.
324
+ *
325
+ * Called by the observer *before* the write lands, while a command is built:
326
+ * every earlier command has run to its end by then, but none of them wrote
327
+ * this slot, so what it holds is what the part was built with (plus whatever
328
+ * the command's own factory primed, which is part of the command, not of the
329
+ * part).
330
+ */
331
+ private readonly _notePartWrite;
279
332
  /**
280
333
  * Compile the expressions in a binding command's args.
281
334
  *
@@ -296,6 +349,8 @@ export declare class SceneTimeline {
296
349
  * a document that half-renders is worse than one that refuses to.
297
350
  */
298
351
  private _assertNoExpressions;
352
+ /** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */
353
+ private _targetOrThrow;
299
354
  /** Resolve a command's `targetId` to a live node, or `null` if it names nothing. */
300
355
  private _targetOf;
301
356
  private _evaluateObserved;
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/document/timeline.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAa,QAAQ,EAAE,MAAM,cAAc,CAAC;AAYnD,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AAC3D,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAgC,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,gCAAgC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CACjC;AA0ID;;;GAGG;AACH,qBAAa,aAAa;IAC8B,OAAO,CAAC,QAAQ,C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AO,CAAC,oBAAoB;IAY5B,yGAAyG;IACzG,OAAO,CAAC,cAAc;IAWtB,oFAAoF;IACpF,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,iBAAiB;IAazB;;;;;;;;;OASG;IACH,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,YAAY;IAOpB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IASjB,uDAAuD;IACvD,OAAO,CAAC,cAAc;IAItB,kEAAkE;IAClE,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,gBAAgB;IAyBxB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAmFxB;;;;OAIG;IACH,OAAO,CAAC,UAAU;CAuDrB"}
@@ -94,10 +94,10 @@ function presenceOf(doc) {
94
94
  return spans;
95
95
  }
96
96
  /**
97
- * The scene document, compiled and evaluable, over the one canvas it builds
97
+ * The clip document, compiled and evaluable, over the one canvas it builds
98
98
  * into — its live nodes, presence and baselines all belong to that tree.
99
99
  */
100
- export class SceneTimeline {
100
+ export class ClipTimeline {
101
101
  canvas;
102
102
  constructor(doc, registry, canvas) {
103
103
  this.canvas = canvas;
@@ -162,6 +162,12 @@ export class SceneTimeline {
162
162
  captureInitial(entry);
163
163
  captureInitial(this._root);
164
164
  this._baselined = new Set(this._present);
165
+ for (const id of this._present) {
166
+ if (this._live.get(id)?.node.mounted === false) {
167
+ this._baselined.delete(id);
168
+ this._unmounted.add(id);
169
+ }
170
+ }
165
171
  }
166
172
  /**
167
173
  * Build every command against the laid-out tree, then put the tree back.
@@ -177,7 +183,8 @@ export class SceneTimeline {
177
183
  compile(settle = () => { }) {
178
184
  this._compileCommands(settle);
179
185
  this._restoreBaselines();
180
- if (this.syncPresence(0))
186
+ const moved = this.syncPresence(0);
187
+ if (this._restoreDisplaced(this._collectDisplaced()) || moved)
181
188
  settle();
182
189
  }
183
190
  /** What a variable holds at the last evaluated time. For a host's inspector. */
@@ -294,6 +301,22 @@ export class SceneTimeline {
294
301
  liveNode(id) {
295
302
  return id === ROOT_NODE_ID ? this.canvas : this._live.get(id)?.node;
296
303
  }
304
+ /**
305
+ * What a row holds before any command has acted on it: its props as it
306
+ * arrived, or as built for one that has not arrived yet. The same at every
307
+ * time, which is what tells it from the node's live props. A bound prop is
308
+ * read through its binding, so it answers for the tree as it stands.
309
+ */
310
+ baselineProps(id) {
311
+ const entry = id === ROOT_NODE_ID ? this._root : this._live.get(id);
312
+ if (!entry)
313
+ return undefined;
314
+ const layer = entry.baseline === NO_LAYER ? entry.initial : entry.baseline;
315
+ const props = {};
316
+ for (const [key, snap] of layer)
317
+ props[key] = snap.fn ? snap.fn() : snap.value;
318
+ return props;
319
+ }
297
320
  presenceSlot(id) {
298
321
  return id === ROOT_NODE_ID ? this._root?.presence : this._live.get(id)?.presence;
299
322
  }
@@ -316,7 +339,7 @@ export class SceneTimeline {
316
339
  */
317
340
  applyUpdate(patch, settle, prepare) {
318
341
  if (!this._root)
319
- throw new Error("SceneTimeline.applyUpdate needs a built timeline.");
342
+ throw new Error("ClipTimeline.applyUpdate needs a built timeline.");
320
343
  if (patch.prev !== this._docIndex) {
321
344
  throw new Error("This patch was planned against a different version of the document.");
322
345
  }
@@ -329,8 +352,13 @@ export class SceneTimeline {
329
352
  const fresh = this._updateStructure(patch);
330
353
  for (const entry of fresh) {
331
354
  captureInitial(entry);
332
- if (this._present.has(entry.spec.id))
333
- this._baselined.add(entry.spec.id);
355
+ const id = entry.spec.id;
356
+ if (!this._present.has(id))
357
+ continue;
358
+ if (entry.node.mounted)
359
+ this._baselined.add(id);
360
+ else
361
+ this._unmounted.add(id);
334
362
  }
335
363
  if (patch.diff.rootChanged) {
336
364
  const host = this.canvas;
@@ -354,6 +382,7 @@ export class SceneTimeline {
354
382
  const touched = new Set();
355
383
  this._animated = [];
356
384
  this._animatedVars = [];
385
+ this._animatedParts = [];
357
386
  if (!isStillDocument(this._doc)) {
358
387
  for (const spec of patch.next.ordered) {
359
388
  let entry = rebuilt.get(spec.id);
@@ -370,7 +399,8 @@ export class SceneTimeline {
370
399
  }
371
400
  this._placed = placed;
372
401
  this._restoreBaselines();
373
- if (this.syncPresence(0))
402
+ const moved = this.syncPresence(0);
403
+ if (this._restoreDisplaced(this._collectDisplaced()) || moved)
374
404
  settle();
375
405
  }
376
406
  _doc;
@@ -407,12 +437,28 @@ export class SceneTimeline {
407
437
  _animated = [];
408
438
  /** Only the variables some command writes to. Same reasoning. */
409
439
  _animatedVars = [];
440
+ /**
441
+ * Slots on a part a node built for itself that some command writes, restored
442
+ * alongside {@link _animated}. A part is no document row, so its baseline is
443
+ * the slot's state the first time a command wrote it — see {@link _notePartWrite}.
444
+ */
445
+ _animatedParts = [];
446
+ _partBaselines = new WeakMap();
410
447
  /** Children each parent built for itself, which the document must not disturb. */
411
448
  _baseChildCount = new Map();
412
449
  /** Node ids currently in the tree, so presence only churns when it changes. */
413
450
  _present = new Set();
414
451
  /** Node ids whose baseline was taken while mounted — see {@link _compileCommands}. */
415
452
  _baselined = new Set();
453
+ /**
454
+ * Rows present at time 0 that a lifecycle command (`removeChildAt`,
455
+ * `reparent`) took out of the parent their row names, as compile left them.
456
+ * Presence only moves a row across its own span, so nothing else would put
457
+ * one back before its command starts.
458
+ */
459
+ _displaced = [];
460
+ /** Rows that arrived, or were built, while an ancestor was out of the tree and wait for it — see {@link _baselineArrival}. */
461
+ _unmounted = new Set();
416
462
  _presence = null;
417
463
  /** The rows the last {@link syncPresence} brought in, in document order. */
418
464
  _arrived = [];
@@ -525,6 +571,9 @@ export class SceneTimeline {
525
571
  * how the playhead got here.
526
572
  */
527
573
  _restoreBaselines() {
574
+ // Structure before props: a node put back is attached, and the baseline is
575
+ // what it holds once attached.
576
+ this._restoreDisplaced(this._displaced);
528
577
  // Variables first, so a prop bound to one recomputes against the restored
529
578
  // value rather than a stale one.
530
579
  for (const entry of this._animatedVars)
@@ -536,6 +585,8 @@ export class SceneTimeline {
536
585
  host._stateStack.length = entry.baseStackDepth;
537
586
  }
538
587
  }
588
+ for (const slot of this._animatedParts)
589
+ slot.restoreFrom(this._partBaselines.get(slot));
539
590
  }
540
591
  /**
541
592
  * Build every command, in timeline order, against a node already holding
@@ -562,28 +613,95 @@ export class SceneTimeline {
562
613
  // Every node present but not yet baselined arrived in this sync:
563
614
  // one that left and came back was baselined the first time.
564
615
  for (const row of this._arrived) {
565
- if (this._baselined.has(row.id))
566
- continue;
567
- const arrived = this._live.get(row.id);
568
- if (arrived)
569
- captureBaseline(arrived);
570
- this._baselined.add(row.id);
616
+ if (!this._baselined.has(row.id))
617
+ this._baselineArrival(row.id);
571
618
  }
619
+ this._baselineMounted();
572
620
  if (settles[i])
573
621
  settle();
574
622
  }
575
623
  const placed = this._buildPlaced(spec);
576
- if (!placed)
577
- continue;
578
624
  this._placed.push(placed);
579
625
  this._touch(placed, touched);
580
626
  }
581
627
  }
628
+ /** The present rows whose node is no longer under the parent its row names. */
629
+ _collectDisplaced() {
630
+ const out = [];
631
+ for (const id of this._present) {
632
+ const entry = this._live.get(id);
633
+ const parent = entry && this._declaredParent(id);
634
+ if (entry && parent && entry.node.parent !== parent)
635
+ out.push(entry);
636
+ }
637
+ out.sort((a, b) => this._presenceIndex().row(a.spec.id).slot - this._presenceIndex().row(b.spec.id).slot);
638
+ return (this._displaced = out);
639
+ }
640
+ /**
641
+ * Put displaced rows back where {@link syncPresence} would have inserted them.
642
+ * Returns whether any moved.
643
+ */
644
+ _restoreDisplaced(entries) {
645
+ let moved = false;
646
+ for (const entry of entries) {
647
+ const id = entry.spec.id;
648
+ const row = this._presenceIndex().row(id);
649
+ const parent = this._declaredParent(id);
650
+ if (!row || !parent || !this._present.has(id) || entry.node.parent === parent)
651
+ continue;
652
+ entry.node.parent?.remove(entry.node);
653
+ const base = this._baseChildCount.get(row.siblings.parentId) ?? 0;
654
+ parent.addChildAt({ data: { child: entry.node, index: base + row.siblings.before(row.slot) } });
655
+ moved = true;
656
+ }
657
+ return moved;
658
+ }
659
+ /** The node a row's `parentId` names: the canvas for the root, `undefined` while that row is unbuilt. */
660
+ _declaredParent(id) {
661
+ const parentId = this._presenceIndex().row(id)?.siblings.parentId;
662
+ if (parentId === undefined)
663
+ return undefined;
664
+ return parentId === ROOT_NODE_ID ? this.canvas : this._live.get(parentId)?.node;
665
+ }
666
+ /**
667
+ * Take the baseline of a row that has just arrived, if it is mounted.
668
+ *
669
+ * A baseline is the node as it stands once attached: an unmounted node's cells
670
+ * hold pre-attach values, without what it inherits from its ancestors. A row
671
+ * can arrive while an ancestor is still out of the tree (a child entering
672
+ * before its parent), so its baseline waits in {@link _unmounted} until
673
+ * {@link _baselineMounted} finds it mounted.
674
+ */
675
+ _baselineArrival(id) {
676
+ const entry = this._live.get(id);
677
+ if (entry && !entry.node.mounted) {
678
+ this._unmounted.add(id);
679
+ return;
680
+ }
681
+ if (entry)
682
+ captureBaseline(entry);
683
+ this._baselined.add(id);
684
+ this._unmounted.delete(id);
685
+ }
686
+ /** Baseline the rows that arrived unmounted and have since been mounted by an ancestor arriving. */
687
+ _baselineMounted() {
688
+ for (const id of this._unmounted) {
689
+ const entry = this._live.get(id);
690
+ if (!entry) {
691
+ this._unmounted.delete(id);
692
+ }
693
+ else if (entry.node.mounted) {
694
+ captureBaseline(entry);
695
+ this._baselined.add(id);
696
+ this._unmounted.delete(id);
697
+ }
698
+ }
699
+ }
582
700
  /**
583
701
  * Build one command against the tree as it stands and run it to its end —
584
702
  * which is what leaves its target where the next command's `from` must start.
585
- * Undone wholesale by {@link _restoreBaselines}. `null` when its target node
586
- * does not exist.
703
+ * Undone wholesale by {@link _restoreBaselines}. Throws when its target names
704
+ * no row, for a node-scoped command of any kind.
587
705
  *
588
706
  * The running-to-`at(1)` cannot be skipped: `node.to({ x: 100 })` reads `x`
589
707
  * when the command is *constructed*, so a chain built against the untouched
@@ -599,20 +717,19 @@ export class SceneTimeline {
599
717
  // cannot collide with another type's command of the same name.
600
718
  let entry = this._registry.command(spec.type);
601
719
  if (!entry) {
602
- const target = this._targetOf(spec);
603
- const typeKey = target?.entry.spec.type;
604
- const factory = typeKey ? this._registry.nodeCommand(typeKey, spec.type) : undefined;
720
+ const typeKey = this._targetOrThrow(spec).entry.spec.type;
721
+ const factory = this._registry.nodeCommand(typeKey, spec.type);
605
722
  if (!factory) {
606
- throw new Error(`Node type "${typeKey ?? "?"}" has no command "${spec.type}" ` +
723
+ throw new Error(`Node type "${typeKey}" has no command "${spec.type}" ` +
607
724
  `(command ${spec.id}). It publishes: ` +
608
- `${typeKey ? this._registry.commandKeys(typeKey).join(", ") || "none" : "—"}.` +
725
+ `${this._registry.commandKeys(typeKey).join(", ") || "none"}.` +
609
726
  (LEGACY_COMMAND_HINTS[spec.type] ? ` ${LEGACY_COMMAND_HINTS[spec.type]}` : ""));
610
727
  }
611
728
  entry = { key: spec.type, scope: "node", factory };
612
729
  }
613
730
  const duration = spec.duration ?? 0;
614
731
  const easing = resolveEase(spec.easing, this._registry);
615
- const recorder = new WriteRecorder();
732
+ const recorder = new WriteRecorder(this._notePartWrite);
616
733
  // Applied inside `buildToEnd`, so the `at(1)` that leaves the target where
617
734
  // the next command's `from` starts is the *loop's* end — which for an odd
618
735
  // number of `alternate` passes is back where it began. A looped command
@@ -631,9 +748,7 @@ export class SceneTimeline {
631
748
  const command = observeSlots(recorder, () => buildToEnd(() => repeat(factory(variable.target, spec.args, duration, easing))));
632
749
  return { spec, start: spec.at, duration: loop ? command.duration : duration, command, writes: recorder.writes, readsLayout: recorder.readsLayout, owner: variable };
633
750
  }
634
- const target = this._targetOf(spec);
635
- if (!target)
636
- return null;
751
+ const target = this._targetOrThrow(spec);
637
752
  const args = entry.binds ? this._bindArgs(spec.args) : (this._assertNoExpressions(spec), spec.args);
638
753
  const { factory } = entry;
639
754
  const command = observeSlots(recorder, () => buildToEnd(() => repeat(factory(target.node, args, duration, easing))));
@@ -661,11 +776,10 @@ export class SceneTimeline {
661
776
  * playhead reached it, which is the one thing the whole design forbids.
662
777
  *
663
778
  * `writes` is already recorded (see {@link WriteRecorder}) and a slot carries
664
- * its owner, so this needs no declaration from the command. A slot whose host
665
- * is no document row — a variable's, or a cell on a child a composite built
666
- * for itself — has no baseline of its own and is skipped: the variable
667
- * arrives as {@link PlacedCommand.owner}, and the composite's child is
668
- * rebuilt with its parent.
779
+ * its owner, so this needs no declaration from the command. A variable's slot
780
+ * arrives as {@link PlacedCommand.owner}. A slot on a part a node built for
781
+ * itself has no row to be restored through, so it is restored on its own, to
782
+ * the state {@link _notePartWrite} saw before any command wrote it.
669
783
  */
670
784
  _touch(placed, touched) {
671
785
  this._touchOwner(placed.owner, touched);
@@ -674,8 +788,13 @@ export class SceneTimeline {
674
788
  if (host === null)
675
789
  continue;
676
790
  const entry = host.id === ROOT_NODE_ID ? this._root : this._live.get(host.id);
677
- if (entry)
791
+ if (entry) {
678
792
  this._touchOwner(entry, touched);
793
+ }
794
+ else if (this._partBaselines.has(slot) && !touched.has(slot)) {
795
+ touched.add(slot);
796
+ this._animatedParts.push(slot);
797
+ }
679
798
  }
680
799
  }
681
800
  _touchOwner(owner, touched) {
@@ -687,6 +806,23 @@ export class SceneTimeline {
687
806
  else
688
807
  this._animated.push(owner);
689
808
  }
809
+ /**
810
+ * Save a part's slot the first time a command is about to write it.
811
+ *
812
+ * Called by the observer *before* the write lands, while a command is built:
813
+ * every earlier command has run to its end by then, but none of them wrote
814
+ * this slot, so what it holds is what the part was built with (plus whatever
815
+ * the command's own factory primed, which is part of the command, not of the
816
+ * part).
817
+ */
818
+ _notePartWrite = (slot) => {
819
+ const host = slot._host;
820
+ if (host === null || this._partBaselines.has(slot))
821
+ return;
822
+ if (host.id === ROOT_NODE_ID || this._live.has(host.id))
823
+ return;
824
+ this._partBaselines.set(slot, slot.snapshot());
825
+ };
690
826
  /**
691
827
  * Compile the expressions in a binding command's args.
692
828
  *
@@ -719,6 +855,15 @@ export class SceneTimeline {
719
855
  `Bind the prop where the node is authored (or with a "set" command) and animate the variable ` +
720
856
  `with "variableTo" instead.`);
721
857
  }
858
+ /** The live node a node-scoped command targets; one error, naming the `targetId`, when no row has it. */
859
+ _targetOrThrow(spec) {
860
+ const target = this._targetOf(spec);
861
+ if (!target) {
862
+ throw new Error(`Command ${spec.id} ("${spec.type}") targets node "${spec.targetId}", ` +
863
+ `which this document does not declare.`);
864
+ }
865
+ return target;
866
+ }
722
867
  /** Resolve a command's `targetId` to a live node, or `null` if it names nothing. */
723
868
  _targetOf(spec) {
724
869
  if (spec.targetId === null) {
@@ -862,6 +1007,7 @@ export class SceneTimeline {
862
1007
  this._live.delete(id);
863
1008
  this._baseChildCount.delete(id);
864
1009
  this._baselined.delete(id);
1010
+ this._unmounted.delete(id);
865
1011
  }
866
1012
  for (const id of patch.reinstantiate) {
867
1013
  const entry = this._live.get(id);
@@ -881,6 +1027,7 @@ export class SceneTimeline {
881
1027
  entry.spec = spec;
882
1028
  entry.node = node;
883
1029
  this._baselined.delete(spec.id);
1030
+ this._unmounted.delete(spec.id);
884
1031
  }
885
1032
  else {
886
1033
  entry = {
@@ -960,12 +1107,11 @@ export class SceneTimeline {
960
1107
  const step = steps[i];
961
1108
  if (settles[i])
962
1109
  pending = true;
963
- this.syncPresence(step.at);
1110
+ if (this.syncPresence(step.at))
1111
+ this._baselineMounted();
964
1112
  if (step.capture !== undefined) {
965
- const entry = this._live.get(step.capture);
966
- if (entry)
967
- captureBaseline(entry);
968
- this._baselined.add(step.capture);
1113
+ this._baselined.delete(step.capture);
1114
+ this._baselineArrival(step.capture);
969
1115
  continue;
970
1116
  }
971
1117
  // After this `at`'s captures, as compile baselines arrivals before it settles.
@@ -979,9 +1125,7 @@ export class SceneTimeline {
979
1125
  old.command.at(1);
980
1126
  continue;
981
1127
  }
982
- const placed = this._buildPlaced(spec);
983
- if (placed)
984
- rebuilt.set(spec.id, placed);
1128
+ rebuilt.set(spec.id, this._buildPlaced(spec));
985
1129
  }
986
1130
  return rebuilt;
987
1131
  }
@@ -999,13 +1143,21 @@ const LEGACY_COMMAND_HINTS = {
999
1143
  const NO_LAYER = new Map();
1000
1144
  /** Records what building one command wrote, and whether it read a laid-out box. */
1001
1145
  class WriteRecorder {
1146
+ firstWrite;
1002
1147
  writes = new Set();
1003
1148
  readsLayout = false;
1149
+ /** `firstWrite` runs the first time a slot is written, before the write lands. */
1150
+ constructor(firstWrite) {
1151
+ this.firstWrite = firstWrite;
1152
+ }
1004
1153
  read(slot) {
1005
1154
  if (slot._name === LAYOUT_SLOT)
1006
1155
  this.readsLayout = true;
1007
1156
  }
1008
1157
  write(slot) {
1158
+ if (this.writes.has(slot))
1159
+ return;
1160
+ this.firstWrite(slot);
1009
1161
  this.writes.add(slot);
1010
1162
  }
1011
1163
  }