@motionscript/core 0.1.0-alpha.9 → 0.1.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1064) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/assets/asset-index.d.ts +1 -8
  3. package/dist/assets/asset-index.d.ts.map +1 -1
  4. package/dist/assets/asset-index.js +1 -8
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +10 -72
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +3 -29
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts +8 -20
  11. package/dist/assets/errors.d.ts.map +1 -1
  12. package/dist/assets/errors.js +8 -20
  13. package/dist/assets/errors.js.map +1 -1
  14. package/dist/assets/index.d.ts.map +1 -1
  15. package/dist/assets/index.js.map +1 -1
  16. package/dist/assets/manager.d.ts +9 -51
  17. package/dist/assets/manager.d.ts.map +1 -1
  18. package/dist/assets/manager.js +13 -78
  19. package/dist/assets/manager.js.map +1 -1
  20. package/dist/assets/record.d.ts +2 -18
  21. package/dist/assets/record.d.ts.map +1 -1
  22. package/dist/assets/record.js.map +1 -1
  23. package/dist/assets/scope.d.ts +3 -18
  24. package/dist/assets/scope.d.ts.map +1 -1
  25. package/dist/assets/scope.js +2 -11
  26. package/dist/assets/scope.js.map +1 -1
  27. package/dist/attributes/audio/effects/chain.d.ts +2 -12
  28. package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
  29. package/dist/attributes/audio/effects/chain.js +1 -7
  30. package/dist/attributes/audio/effects/chain.js.map +1 -1
  31. package/dist/attributes/audio/effects/registry.d.ts +3 -18
  32. package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
  33. package/dist/attributes/audio/effects/registry.js +4 -23
  34. package/dist/attributes/audio/effects/registry.js.map +1 -1
  35. package/dist/attributes/audio/ramp.d.ts +5 -38
  36. package/dist/attributes/audio/ramp.d.ts.map +1 -1
  37. package/dist/attributes/audio/ramp.js +3 -28
  38. package/dist/attributes/audio/ramp.js.map +1 -1
  39. package/dist/attributes/audio/request.d.ts +10 -80
  40. package/dist/attributes/audio/request.d.ts.map +1 -1
  41. package/dist/attributes/audio/request.js +1 -4
  42. package/dist/attributes/audio/request.js.map +1 -1
  43. package/dist/attributes/audio/schedule.d.ts +2 -12
  44. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  45. package/dist/attributes/audio/schedule.js +2 -11
  46. package/dist/attributes/audio/schedule.js.map +1 -1
  47. package/dist/attributes/audio/sound.d.ts +2 -26
  48. package/dist/attributes/audio/sound.d.ts.map +1 -1
  49. package/dist/attributes/audio/sound.js +1 -9
  50. package/dist/attributes/audio/sound.js.map +1 -1
  51. package/dist/attributes/audio/transition.d.ts +1 -8
  52. package/dist/attributes/audio/transition.d.ts.map +1 -1
  53. package/dist/attributes/audio/transition.js.map +1 -1
  54. package/dist/attributes/layout/alignment.d.ts +6 -38
  55. package/dist/attributes/layout/alignment.d.ts.map +1 -1
  56. package/dist/attributes/layout/alignment.js.map +1 -1
  57. package/dist/attributes/layout/insets.d.ts +2 -27
  58. package/dist/attributes/layout/insets.d.ts.map +1 -1
  59. package/dist/attributes/layout/insets.js.map +1 -1
  60. package/dist/attributes/layout/matrix2d.d.ts +29 -114
  61. package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js +26 -110
  63. package/dist/attributes/layout/matrix2d.js.map +1 -1
  64. package/dist/attributes/layout/size.d.ts +3 -25
  65. package/dist/attributes/layout/size.d.ts.map +1 -1
  66. package/dist/attributes/layout/size.js +2 -18
  67. package/dist/attributes/layout/size.js.map +1 -1
  68. package/dist/attributes/layout/space3d.d.ts +16 -79
  69. package/dist/attributes/layout/space3d.d.ts.map +1 -1
  70. package/dist/attributes/layout/space3d.js +17 -81
  71. package/dist/attributes/layout/space3d.js.map +1 -1
  72. package/dist/attributes/layout/transform3d.d.ts +2 -23
  73. package/dist/attributes/layout/transform3d.d.ts.map +1 -1
  74. package/dist/attributes/layout/transform3d.js +1 -7
  75. package/dist/attributes/layout/transform3d.js.map +1 -1
  76. package/dist/attributes/layout/world-transform.d.ts +2 -16
  77. package/dist/attributes/layout/world-transform.d.ts.map +1 -1
  78. package/dist/attributes/layout/world-transform.js.map +1 -1
  79. package/dist/attributes/properties/decorator.d.ts +13 -73
  80. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  81. package/dist/attributes/properties/decorator.js +9 -40
  82. package/dist/attributes/properties/decorator.js.map +1 -1
  83. package/dist/attributes/properties/typed.d.ts +6 -45
  84. package/dist/attributes/properties/typed.d.ts.map +1 -1
  85. package/dist/attributes/properties/typed.js +6 -37
  86. package/dist/attributes/properties/typed.js.map +1 -1
  87. package/dist/attributes/render3d/orbit.d.ts +11 -83
  88. package/dist/attributes/render3d/orbit.d.ts.map +1 -1
  89. package/dist/attributes/render3d/orbit.js +10 -73
  90. package/dist/attributes/render3d/orbit.js.map +1 -1
  91. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
  92. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  94. package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
  95. package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
  96. package/dist/attributes/shape/corners/corner-style.js +2 -12
  97. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  98. package/dist/attributes/shape/corners/corners.d.ts +2 -21
  99. package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js +2 -12
  101. package/dist/attributes/shape/corners/corners.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
  103. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  104. package/dist/attributes/shape/effects/backdrop.js +3 -26
  105. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  106. package/dist/attributes/shape/effects/chain.d.ts +36 -328
  107. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  108. package/dist/attributes/shape/effects/chain.js +24 -242
  109. package/dist/attributes/shape/effects/chain.js.map +1 -1
  110. package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
  111. package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
  112. package/dist/attributes/shape/effects/effect-data.js +6 -33
  113. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
  115. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
  117. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
  119. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
  121. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
  123. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
  125. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
  127. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
  129. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
  131. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/blur.js +0 -1
  133. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
  135. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
  137. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
  139. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
  141. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  142. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
  143. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  144. package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
  145. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  146. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
  147. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  148. package/dist/attributes/shape/effects/implementations/curves.js +1 -6
  149. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  150. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
  151. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  152. package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
  153. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  154. package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
  155. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  156. package/dist/attributes/shape/effects/implementations/dither.js +1 -7
  157. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  158. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
  159. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  160. package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
  161. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  162. package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
  163. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  164. package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
  165. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  166. package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
  167. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  168. package/dist/attributes/shape/effects/implementations/edges.js +0 -1
  169. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  170. package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
  171. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  172. package/dist/attributes/shape/effects/implementations/glass.js +0 -1
  173. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  174. package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
  175. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  176. package/dist/attributes/shape/effects/implementations/glow.js +1 -9
  177. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  178. package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
  179. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  180. package/dist/attributes/shape/effects/implementations/grain.js +0 -1
  181. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  182. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
  183. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  184. package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
  185. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  186. package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
  187. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  188. package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
  189. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  190. package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
  191. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  192. package/dist/attributes/shape/effects/implementations/invert.js +0 -1
  193. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  194. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
  195. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  196. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
  197. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  198. package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
  199. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  200. package/dist/attributes/shape/effects/implementations/lut.js +2 -8
  201. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  202. package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
  203. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  204. package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
  205. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  206. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
  207. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  208. package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
  209. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  210. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
  211. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  212. package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
  213. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  214. package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
  215. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  216. package/dist/attributes/shape/effects/implementations/outline.js +0 -1
  217. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  218. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
  219. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  220. package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
  221. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  222. package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
  223. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  224. package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
  225. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  226. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
  227. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  228. package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
  229. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  230. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
  231. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  232. package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
  233. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  234. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
  235. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  236. package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
  237. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  238. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
  239. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  240. package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
  241. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  242. package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
  243. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  244. package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
  245. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  246. package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
  247. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  248. package/dist/attributes/shape/effects/implementations/shader.js +2 -9
  249. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  250. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
  251. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  252. package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
  253. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  254. package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
  255. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  256. package/dist/attributes/shape/effects/implementations/streak.js +0 -1
  257. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  258. package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
  259. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  260. package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
  261. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  262. package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
  263. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  264. package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
  265. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  266. package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
  267. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  268. package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
  269. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  270. package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
  271. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  272. package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
  273. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  274. package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
  275. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  276. package/dist/attributes/shape/effects/implementations/wave.js +1 -5
  277. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  278. package/dist/attributes/shape/effects/registry.d.ts +6 -41
  279. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  280. package/dist/attributes/shape/effects/registry.js +7 -45
  281. package/dist/attributes/shape/effects/registry.js.map +1 -1
  282. package/dist/attributes/shape/effects/spec.d.ts +6 -30
  283. package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
  284. package/dist/attributes/shape/effects/spec.js +3 -9
  285. package/dist/attributes/shape/effects/spec.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.d.ts +1 -17
  287. package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
  288. package/dist/attributes/shape/fill/blend.js +2 -15
  289. package/dist/attributes/shape/fill/blend.js.map +1 -1
  290. package/dist/attributes/shape/fill/chain.d.ts +17 -125
  291. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  292. package/dist/attributes/shape/fill/chain.js +22 -109
  293. package/dist/attributes/shape/fill/chain.js.map +1 -1
  294. package/dist/attributes/shape/fill/coerce.d.ts +10 -35
  295. package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
  296. package/dist/attributes/shape/fill/coerce.js +12 -47
  297. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  298. package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
  299. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  300. package/dist/attributes/shape/fill/color/parser.js +35 -96
  301. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  302. package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
  303. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
  304. package/dist/attributes/shape/fill/gradient-stops.js +2 -13
  305. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  306. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
  307. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
  308. package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
  309. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
  311. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
  312. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  313. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
  314. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  315. package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
  316. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  317. package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
  318. package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
  319. package/dist/attributes/shape/fill/implementations/grid.js +2 -8
  320. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  321. package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
  322. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  323. package/dist/attributes/shape/fill/implementations/image.js +6 -23
  324. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  325. package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
  326. package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
  327. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  328. package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
  329. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  330. package/dist/attributes/shape/fill/implementations/shader.js +5 -17
  331. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  332. package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
  333. package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
  334. package/dist/attributes/shape/fill/implementations/video.js +12 -50
  335. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  336. package/dist/attributes/shape/fill/lerp.d.ts +2 -13
  337. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  338. package/dist/attributes/shape/fill/lerp.js +2 -9
  339. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  340. package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
  341. package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
  342. package/dist/attributes/shape/fill/media-preset.js +8 -35
  343. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  344. package/dist/attributes/shape/fill/registry.d.ts +2 -26
  345. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  346. package/dist/attributes/shape/fill/registry.js +5 -40
  347. package/dist/attributes/shape/fill/registry.js.map +1 -1
  348. package/dist/attributes/shape/fill/union.d.ts +6 -30
  349. package/dist/attributes/shape/fill/union.d.ts.map +1 -1
  350. package/dist/attributes/shape/fill/union.js +1 -9
  351. package/dist/attributes/shape/fill/union.js.map +1 -1
  352. package/dist/attributes/shape/filters/chain.d.ts +15 -168
  353. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  354. package/dist/attributes/shape/filters/chain.js +8 -132
  355. package/dist/attributes/shape/filters/chain.js.map +1 -1
  356. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
  357. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  358. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  359. package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
  360. package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
  361. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  362. package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
  363. package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
  364. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  365. package/dist/attributes/shape/filters/index.d.ts +1 -6
  366. package/dist/attributes/shape/filters/index.d.ts.map +1 -1
  367. package/dist/attributes/shape/filters/index.js +0 -2
  368. package/dist/attributes/shape/filters/index.js.map +1 -1
  369. package/dist/attributes/shape/filters/registry.d.ts +5 -35
  370. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  371. package/dist/attributes/shape/filters/registry.js +7 -50
  372. package/dist/attributes/shape/filters/registry.js.map +1 -1
  373. package/dist/attributes/shape/filters/union.d.ts +10 -51
  374. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  375. package/dist/attributes/shape/filters/union.js.map +1 -1
  376. package/dist/attributes/shape/path/anchors.d.ts +18 -106
  377. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  378. package/dist/attributes/shape/path/anchors.js +15 -124
  379. package/dist/attributes/shape/path/anchors.js.map +1 -1
  380. package/dist/attributes/shape/path/bezier.d.ts +6 -54
  381. package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
  382. package/dist/attributes/shape/path/bezier.js +10 -98
  383. package/dist/attributes/shape/path/bezier.js.map +1 -1
  384. package/dist/attributes/shape/path/index.d.ts +1 -11
  385. package/dist/attributes/shape/path/index.d.ts.map +1 -1
  386. package/dist/attributes/shape/path/index.js +1 -11
  387. package/dist/attributes/shape/path/index.js.map +1 -1
  388. package/dist/attributes/shape/path/measure.d.ts +5 -41
  389. package/dist/attributes/shape/path/measure.d.ts.map +1 -1
  390. package/dist/attributes/shape/path/measure.js +8 -57
  391. package/dist/attributes/shape/path/measure.js.map +1 -1
  392. package/dist/attributes/shape/path/morph.d.ts +4 -41
  393. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  394. package/dist/attributes/shape/path/morph.js +17 -117
  395. package/dist/attributes/shape/path/morph.js.map +1 -1
  396. package/dist/attributes/shape/path/ops.d.ts +5 -19
  397. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  398. package/dist/attributes/shape/path/ops.js.map +1 -1
  399. package/dist/attributes/shape/path/types.d.ts +10 -67
  400. package/dist/attributes/shape/path/types.d.ts.map +1 -1
  401. package/dist/attributes/shape/path/types.js +0 -1
  402. package/dist/attributes/shape/path/types.js.map +1 -1
  403. package/dist/attributes/shape/path/walk.d.ts +9 -63
  404. package/dist/attributes/shape/path/walk.d.ts.map +1 -1
  405. package/dist/attributes/shape/path/walk.js +21 -100
  406. package/dist/attributes/shape/path/walk.js.map +1 -1
  407. package/dist/attributes/shape/shaders/language.d.ts +2 -14
  408. package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
  409. package/dist/attributes/shape/shaders/language.js +1 -8
  410. package/dist/attributes/shape/shaders/language.js.map +1 -1
  411. package/dist/attributes/shape/shaders/pack.d.ts +13 -78
  412. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  413. package/dist/attributes/shape/shaders/pack.js +1 -10
  414. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  415. package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
  416. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  417. package/dist/attributes/shape/shaders/resolve.js +3 -28
  418. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  419. package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
  420. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
  421. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  422. package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
  423. package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
  424. package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
  425. package/dist/attributes/shape/shadow/shadow.js +0 -3
  426. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  427. package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
  428. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  429. package/dist/attributes/shape/stroke/stroke.js +0 -6
  430. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  431. package/dist/attributes/shared/operators.d.ts +1 -8
  432. package/dist/attributes/shared/operators.d.ts.map +1 -1
  433. package/dist/attributes/shared/operators.js.map +1 -1
  434. package/dist/attributes/text/index.d.ts +1 -11
  435. package/dist/attributes/text/index.d.ts.map +1 -1
  436. package/dist/attributes/text/index.js +1 -11
  437. package/dist/attributes/text/index.js.map +1 -1
  438. package/dist/attributes/text/ops.d.ts +4 -30
  439. package/dist/attributes/text/ops.d.ts.map +1 -1
  440. package/dist/attributes/text/ops.js +7 -23
  441. package/dist/attributes/text/ops.js.map +1 -1
  442. package/dist/attributes/text/types.d.ts +5 -28
  443. package/dist/attributes/text/types.d.ts.map +1 -1
  444. package/dist/attributes/text/types.js.map +1 -1
  445. package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
  446. package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
  447. package/dist/browser/chunks/chunk-5TDMGUXQ.js +3 -0
  448. package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
  449. package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
  450. package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
  451. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  452. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/views.d.ts.map +1 -1
  510. package/dist/components/factory/views.js +41 -3
  511. package/dist/components/factory/views.js.map +1 -1
  512. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  513. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  514. package/dist/components/trees/2d/group-bounds.js +3 -22
  515. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  516. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  517. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  518. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  519. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  520. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  521. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  522. package/dist/components/trees/2d/node-motion.js +3 -31
  523. package/dist/components/trees/2d/node-motion.js.map +1 -1
  524. package/dist/components/trees/2d/node-render.d.ts +3 -20
  525. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-render.js +4 -23
  527. package/dist/components/trees/2d/node-render.js.map +1 -1
  528. package/dist/components/trees/2d/node-space.d.ts +4 -23
  529. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-space.js +3 -17
  531. package/dist/components/trees/2d/node-space.js.map +1 -1
  532. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  533. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-transform.js +4 -33
  535. package/dist/components/trees/2d/node-transform.js.map +1 -1
  536. package/dist/components/trees/2d/node2d.d.ts +112 -622
  537. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node2d.js +131 -605
  539. package/dist/components/trees/2d/node2d.js.map +1 -1
  540. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  541. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  542. package/dist/components/trees/audio/node-audio.js +18 -68
  543. package/dist/components/trees/audio/node-audio.js.map +1 -1
  544. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  545. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  546. package/dist/components/trees/node/node-editor-state.js +1 -13
  547. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  548. package/dist/components/trees/node/node-reactive.d.ts +6 -54
  549. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  550. package/dist/components/trees/node/node-reactive.js +13 -39
  551. package/dist/components/trees/node/node-reactive.js.map +1 -1
  552. package/dist/components/trees/node/node-time.d.ts +2 -15
  553. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-time.js.map +1 -1
  555. package/dist/components/trees/node/node-walk.d.ts +7 -32
  556. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  557. package/dist/components/trees/node/node-walk.js +7 -32
  558. package/dist/components/trees/node/node-walk.js.map +1 -1
  559. package/dist/components/trees/node/node.d.ts +43 -248
  560. package/dist/components/trees/node/node.d.ts.map +1 -1
  561. package/dist/components/trees/node/node.js +51 -229
  562. package/dist/components/trees/node/node.js.map +1 -1
  563. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  564. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  565. package/dist/components/trees/root/canvas2d-node.js +7 -47
  566. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  567. package/dist/components/trees/three/node3d.d.ts +24 -112
  568. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  569. package/dist/components/trees/three/node3d.js +22 -104
  570. package/dist/components/trees/three/node3d.js.map +1 -1
  571. package/dist/document/audio.d.ts +9 -21
  572. package/dist/document/audio.d.ts.map +1 -1
  573. package/dist/document/audio.js +13 -28
  574. package/dist/document/audio.js.map +1 -1
  575. package/dist/document/builtins.d.ts +3 -9
  576. package/dist/document/builtins.d.ts.map +1 -1
  577. package/dist/document/builtins.js +43 -89
  578. package/dist/document/builtins.js.map +1 -1
  579. package/dist/document/command-traits.d.ts +15 -30
  580. package/dist/document/command-traits.d.ts.map +1 -1
  581. package/dist/document/command-traits.js +31 -31
  582. package/dist/document/command-traits.js.map +1 -1
  583. package/dist/document/deny-globals.d.ts +9 -43
  584. package/dist/document/deny-globals.d.ts.map +1 -1
  585. package/dist/document/deny-globals.js +18 -58
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/diff.d.ts +6 -16
  588. package/dist/document/diff.d.ts.map +1 -1
  589. package/dist/document/diff.js +5 -11
  590. package/dist/document/diff.js.map +1 -1
  591. package/dist/document/doc-index.d.ts +5 -13
  592. package/dist/document/doc-index.d.ts.map +1 -1
  593. package/dist/document/doc-index.js +0 -2
  594. package/dist/document/doc-index.js.map +1 -1
  595. package/dist/document/expression/compile.d.ts +2 -2
  596. package/dist/document/expression/compile.d.ts.map +1 -1
  597. package/dist/document/expression/compile.js +8 -18
  598. package/dist/document/expression/compile.js.map +1 -1
  599. package/dist/document/expression/index.d.ts +11 -41
  600. package/dist/document/expression/index.d.ts.map +1 -1
  601. package/dist/document/expression/index.js +11 -41
  602. package/dist/document/expression/index.js.map +1 -1
  603. package/dist/document/expression/ops.d.ts +3 -12
  604. package/dist/document/expression/ops.d.ts.map +1 -1
  605. package/dist/document/expression/ops.js +4 -20
  606. package/dist/document/expression/ops.js.map +1 -1
  607. package/dist/document/expression/parse.d.ts +4 -14
  608. package/dist/document/expression/parse.d.ts.map +1 -1
  609. package/dist/document/expression/parse.js +34 -55
  610. package/dist/document/expression/parse.js.map +1 -1
  611. package/dist/document/expression/refs.d.ts +2 -8
  612. package/dist/document/expression/refs.d.ts.map +1 -1
  613. package/dist/document/expression/refs.js +2 -6
  614. package/dist/document/expression/refs.js.map +1 -1
  615. package/dist/document/expression/types.d.ts +18 -63
  616. package/dist/document/expression/types.d.ts.map +1 -1
  617. package/dist/document/expression/types.js +4 -15
  618. package/dist/document/expression/types.js.map +1 -1
  619. package/dist/document/expression/walk.d.ts +6 -20
  620. package/dist/document/expression/walk.d.ts.map +1 -1
  621. package/dist/document/expression/walk.js +18 -44
  622. package/dist/document/expression/walk.js.map +1 -1
  623. package/dist/document/index.js +2 -3
  624. package/dist/document/index.js.map +1 -1
  625. package/dist/document/migrate.d.ts +7 -22
  626. package/dist/document/migrate.d.ts.map +1 -1
  627. package/dist/document/migrate.js +44 -15
  628. package/dist/document/migrate.js.map +1 -1
  629. package/dist/document/missing-node.d.ts +4 -11
  630. package/dist/document/missing-node.d.ts.map +1 -1
  631. package/dist/document/missing-node.js +2 -5
  632. package/dist/document/missing-node.js.map +1 -1
  633. package/dist/document/node-decorator.d.ts +12 -53
  634. package/dist/document/node-decorator.d.ts.map +1 -1
  635. package/dist/document/node-decorator.js +16 -57
  636. package/dist/document/node-decorator.js.map +1 -1
  637. package/dist/document/node-descriptor.d.ts +25 -62
  638. package/dist/document/node-descriptor.d.ts.map +1 -1
  639. package/dist/document/node-descriptor.js.map +1 -1
  640. package/dist/document/placement.d.ts +18 -41
  641. package/dist/document/placement.d.ts.map +1 -1
  642. package/dist/document/placement.js +4 -11
  643. package/dist/document/placement.js.map +1 -1
  644. package/dist/document/project.d.ts +19 -52
  645. package/dist/document/project.d.ts.map +1 -1
  646. package/dist/document/project.js +2 -6
  647. package/dist/document/project.js.map +1 -1
  648. package/dist/document/prop-evolution.d.ts +10 -20
  649. package/dist/document/prop-evolution.d.ts.map +1 -1
  650. package/dist/document/prop-evolution.js +3 -7
  651. package/dist/document/prop-evolution.js.map +1 -1
  652. package/dist/document/registry.d.ts +80 -318
  653. package/dist/document/registry.d.ts.map +1 -1
  654. package/dist/document/registry.js +43 -147
  655. package/dist/document/registry.js.map +1 -1
  656. package/dist/document/settled-index.d.ts +12 -18
  657. package/dist/document/settled-index.d.ts.map +1 -1
  658. package/dist/document/settled-index.js +29 -31
  659. package/dist/document/settled-index.js.map +1 -1
  660. package/dist/document/timeline-patch.d.ts +6 -15
  661. package/dist/document/timeline-patch.d.ts.map +1 -1
  662. package/dist/document/timeline-patch.js +12 -21
  663. package/dist/document/timeline-patch.js.map +1 -1
  664. package/dist/document/timeline.d.ts +56 -263
  665. package/dist/document/timeline.d.ts.map +1 -1
  666. package/dist/document/timeline.js +97 -281
  667. package/dist/document/timeline.js.map +1 -1
  668. package/dist/document/types.d.ts +90 -264
  669. package/dist/document/types.d.ts.map +1 -1
  670. package/dist/document/types.js +13 -30
  671. package/dist/document/types.js.map +1 -1
  672. package/dist/document/validate.d.ts +10 -40
  673. package/dist/document/validate.d.ts.map +1 -1
  674. package/dist/document/validate.js +72 -137
  675. package/dist/document/validate.js.map +1 -1
  676. package/dist/document/vocabulary.d.ts +4 -7
  677. package/dist/document/vocabulary.d.ts.map +1 -1
  678. package/dist/document/vocabulary.js +0 -1
  679. package/dist/document/vocabulary.js.map +1 -1
  680. package/dist/index.d.ts +0 -1
  681. package/dist/index.d.ts.map +1 -1
  682. package/dist/index.js +0 -1
  683. package/dist/index.js.map +1 -1
  684. package/dist/layout/bounds.d.ts +1 -11
  685. package/dist/layout/bounds.d.ts.map +1 -1
  686. package/dist/layout/bounds.js.map +1 -1
  687. package/dist/layout/flex.d.ts +6 -20
  688. package/dist/layout/flex.d.ts.map +1 -1
  689. package/dist/layout/flex.js +7 -28
  690. package/dist/layout/flex.js.map +1 -1
  691. package/dist/layout/ops.d.ts +2 -11
  692. package/dist/layout/ops.d.ts.map +1 -1
  693. package/dist/layout/ops.js +2 -22
  694. package/dist/layout/ops.js.map +1 -1
  695. package/dist/layout/types.d.ts +11 -55
  696. package/dist/layout/types.d.ts.map +1 -1
  697. package/dist/layout/types.js.map +1 -1
  698. package/dist/platform/audio-sink.d.ts +7 -43
  699. package/dist/platform/audio-sink.d.ts.map +1 -1
  700. package/dist/platform/audio-sink.js +4 -29
  701. package/dist/platform/audio-sink.js.map +1 -1
  702. package/dist/platform/exporter.d.ts +5 -31
  703. package/dist/platform/exporter.d.ts.map +1 -1
  704. package/dist/platform/exporter.js.map +1 -1
  705. package/dist/platform/stepped-clock.d.ts +1 -16
  706. package/dist/platform/stepped-clock.d.ts.map +1 -1
  707. package/dist/platform/stepped-clock.js +1 -16
  708. package/dist/platform/stepped-clock.js.map +1 -1
  709. package/dist/platform/storage-adapter.d.ts +8 -68
  710. package/dist/platform/storage-adapter.d.ts.map +1 -1
  711. package/dist/platform/storage-adapter.js +8 -60
  712. package/dist/platform/storage-adapter.js.map +1 -1
  713. package/dist/platform/ticker.d.ts +11 -45
  714. package/dist/platform/ticker.d.ts.map +1 -1
  715. package/dist/platform/ticker.js +10 -37
  716. package/dist/platform/ticker.js.map +1 -1
  717. package/dist/project/config.d.ts +4 -14
  718. package/dist/project/config.d.ts.map +1 -1
  719. package/dist/project/config.js.map +1 -1
  720. package/dist/project/tree.d.ts +6 -35
  721. package/dist/project/tree.d.ts.map +1 -1
  722. package/dist/project/tree.js +1 -8
  723. package/dist/project/tree.js.map +1 -1
  724. package/dist/props/host.d.ts +7 -13
  725. package/dist/props/host.d.ts.map +1 -1
  726. package/dist/props/host.js +3 -1
  727. package/dist/props/host.js.map +1 -1
  728. package/dist/props/layout.d.ts +18 -0
  729. package/dist/props/layout.d.ts.map +1 -0
  730. package/dist/props/layout.js +73 -0
  731. package/dist/props/layout.js.map +1 -0
  732. package/dist/props/observer.d.ts +1 -7
  733. package/dist/props/observer.d.ts.map +1 -1
  734. package/dist/props/observer.js.map +1 -1
  735. package/dist/props/slot.d.ts +6 -19
  736. package/dist/props/slot.d.ts.map +1 -1
  737. package/dist/props/slot.js +5 -14
  738. package/dist/props/slot.js.map +1 -1
  739. package/dist/render/canvas-render-context2d.d.ts +8 -68
  740. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  741. package/dist/render/canvas-render-context2d.js +8 -69
  742. package/dist/render/canvas-render-context2d.js.map +1 -1
  743. package/dist/render/clip-contains.d.ts +2 -16
  744. package/dist/render/clip-contains.d.ts.map +1 -1
  745. package/dist/render/clip-contains.js +21 -82
  746. package/dist/render/clip-contains.js.map +1 -1
  747. package/dist/render/clip.d.ts +7 -25
  748. package/dist/render/clip.d.ts.map +1 -1
  749. package/dist/render/clip.js +5 -17
  750. package/dist/render/clip.js.map +1 -1
  751. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  752. package/dist/render/descriptors/ellipse.js +0 -1
  753. package/dist/render/descriptors/ellipse.js.map +1 -1
  754. package/dist/render/descriptors/line.d.ts.map +1 -1
  755. package/dist/render/descriptors/line.js +0 -1
  756. package/dist/render/descriptors/line.js.map +1 -1
  757. package/dist/render/descriptors/path-builder.d.ts +4 -32
  758. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  759. package/dist/render/descriptors/path-builder.js +3 -25
  760. package/dist/render/descriptors/path-builder.js.map +1 -1
  761. package/dist/render/descriptors/path.d.ts +1 -11
  762. package/dist/render/descriptors/path.d.ts.map +1 -1
  763. package/dist/render/descriptors/path.js +0 -1
  764. package/dist/render/descriptors/path.js.map +1 -1
  765. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  766. package/dist/render/descriptors/polygon.js +0 -1
  767. package/dist/render/descriptors/polygon.js.map +1 -1
  768. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  769. package/dist/render/descriptors/polygram.js +0 -1
  770. package/dist/render/descriptors/polygram.js.map +1 -1
  771. package/dist/render/descriptors/rect.d.ts.map +1 -1
  772. package/dist/render/descriptors/rect.js +0 -1
  773. package/dist/render/descriptors/rect.js.map +1 -1
  774. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  775. package/dist/render/descriptors/richtext.js +0 -1
  776. package/dist/render/descriptors/richtext.js.map +1 -1
  777. package/dist/render/descriptors/shape.d.ts +17 -77
  778. package/dist/render/descriptors/shape.d.ts.map +1 -1
  779. package/dist/render/descriptors/shape.js +13 -47
  780. package/dist/render/descriptors/shape.js.map +1 -1
  781. package/dist/render/descriptors/text.d.ts +15 -94
  782. package/dist/render/descriptors/text.d.ts.map +1 -1
  783. package/dist/render/descriptors/text.js +8 -50
  784. package/dist/render/descriptors/text.js.map +1 -1
  785. package/dist/render/descriptors/transform.d.ts +5 -16
  786. package/dist/render/descriptors/transform.d.ts.map +1 -1
  787. package/dist/render/descriptors/transform.js +1 -17
  788. package/dist/render/descriptors/transform.js.map +1 -1
  789. package/dist/render/graphics2d.d.ts +24 -116
  790. package/dist/render/graphics2d.d.ts.map +1 -1
  791. package/dist/render/graphics2d.js +23 -108
  792. package/dist/render/graphics2d.js.map +1 -1
  793. package/dist/render/measure-context.d.ts +5 -29
  794. package/dist/render/measure-context.d.ts.map +1 -1
  795. package/dist/render/measure-context.js.map +1 -1
  796. package/dist/render/null-render-context.d.ts +2 -20
  797. package/dist/render/null-render-context.d.ts.map +1 -1
  798. package/dist/render/null-render-context.js +2 -20
  799. package/dist/render/null-render-context.js.map +1 -1
  800. package/dist/render/render-context2d.d.ts +52 -208
  801. package/dist/render/render-context2d.d.ts.map +1 -1
  802. package/dist/render/render-context2d.js.map +1 -1
  803. package/dist/render/surface.d.ts +2 -19
  804. package/dist/render/surface.d.ts.map +1 -1
  805. package/dist/render/surface.js.map +1 -1
  806. package/dist/render/text-defaults.d.ts +1 -17
  807. package/dist/render/text-defaults.d.ts.map +1 -1
  808. package/dist/render/text-defaults.js +6 -40
  809. package/dist/render/text-defaults.js.map +1 -1
  810. package/dist/render/text-layout.d.ts +12 -55
  811. package/dist/render/text-layout.d.ts.map +1 -1
  812. package/dist/render/text-layout.js +2 -16
  813. package/dist/render/text-layout.js.map +1 -1
  814. package/dist/render3d/bounds3d.d.ts +10 -32
  815. package/dist/render3d/bounds3d.d.ts.map +1 -1
  816. package/dist/render3d/bounds3d.js +2 -12
  817. package/dist/render3d/bounds3d.js.map +1 -1
  818. package/dist/render3d/builders.d.ts +8 -35
  819. package/dist/render3d/builders.d.ts.map +1 -1
  820. package/dist/render3d/builders.js +8 -35
  821. package/dist/render3d/builders.js.map +1 -1
  822. package/dist/render3d/camera.d.ts +10 -57
  823. package/dist/render3d/camera.d.ts.map +1 -1
  824. package/dist/render3d/camera.js +4 -26
  825. package/dist/render3d/camera.js.map +1 -1
  826. package/dist/render3d/fill3d.d.ts +7 -45
  827. package/dist/render3d/fill3d.d.ts.map +1 -1
  828. package/dist/render3d/fill3d.js +15 -85
  829. package/dist/render3d/fill3d.js.map +1 -1
  830. package/dist/render3d/geometry.d.ts +18 -106
  831. package/dist/render3d/geometry.d.ts.map +1 -1
  832. package/dist/render3d/geometry.js +2 -20
  833. package/dist/render3d/geometry.js.map +1 -1
  834. package/dist/render3d/graphics3d.d.ts +29 -133
  835. package/dist/render3d/graphics3d.d.ts.map +1 -1
  836. package/dist/render3d/graphics3d.js +23 -110
  837. package/dist/render3d/graphics3d.js.map +1 -1
  838. package/dist/render3d/index.d.ts +1 -16
  839. package/dist/render3d/index.d.ts.map +1 -1
  840. package/dist/render3d/index.js +1 -16
  841. package/dist/render3d/index.js.map +1 -1
  842. package/dist/render3d/inert.d.ts.map +1 -1
  843. package/dist/render3d/inert.js +1 -14
  844. package/dist/render3d/inert.js.map +1 -1
  845. package/dist/render3d/light.d.ts +3 -26
  846. package/dist/render3d/light.d.ts.map +1 -1
  847. package/dist/render3d/light.js.map +1 -1
  848. package/dist/render3d/material.d.ts +13 -87
  849. package/dist/render3d/material.d.ts.map +1 -1
  850. package/dist/render3d/material.js +2 -16
  851. package/dist/render3d/material.js.map +1 -1
  852. package/dist/render3d/matrix4.d.ts +14 -68
  853. package/dist/render3d/matrix4.d.ts.map +1 -1
  854. package/dist/render3d/matrix4.js +11 -60
  855. package/dist/render3d/matrix4.js.map +1 -1
  856. package/dist/render3d/render-context3d.d.ts +13 -51
  857. package/dist/render3d/render-context3d.d.ts.map +1 -1
  858. package/dist/render3d/render-context3d.js +9 -21
  859. package/dist/render3d/render-context3d.js.map +1 -1
  860. package/dist/render3d/resources.d.ts +9 -53
  861. package/dist/render3d/resources.d.ts.map +1 -1
  862. package/dist/render3d/resources.js +8 -48
  863. package/dist/render3d/resources.js.map +1 -1
  864. package/dist/render3d/rounded-box.d.ts +7 -21
  865. package/dist/render3d/rounded-box.d.ts.map +1 -1
  866. package/dist/render3d/rounded-box.js +7 -46
  867. package/dist/render3d/rounded-box.js.map +1 -1
  868. package/dist/render3d/scene-settings.d.ts +20 -78
  869. package/dist/render3d/scene-settings.d.ts.map +1 -1
  870. package/dist/render3d/scene-settings.js.map +1 -1
  871. package/dist/render3d/scene3d.d.ts +11 -53
  872. package/dist/render3d/scene3d.d.ts.map +1 -1
  873. package/dist/render3d/scene3d.js +12 -59
  874. package/dist/render3d/scene3d.js.map +1 -1
  875. package/dist/render3d/segments.d.ts +2 -25
  876. package/dist/render3d/segments.d.ts.map +1 -1
  877. package/dist/render3d/segments.js +1 -11
  878. package/dist/render3d/segments.js.map +1 -1
  879. package/dist/render3d/texture.d.ts +25 -112
  880. package/dist/render3d/texture.d.ts.map +1 -1
  881. package/dist/render3d/texture.js +3 -27
  882. package/dist/render3d/texture.js.map +1 -1
  883. package/dist/render3d/tracking.d.ts +2 -19
  884. package/dist/render3d/tracking.d.ts.map +1 -1
  885. package/dist/render3d/tracking.js +2 -19
  886. package/dist/render3d/tracking.js.map +1 -1
  887. package/dist/render3d/transform.d.ts +14 -60
  888. package/dist/render3d/transform.d.ts.map +1 -1
  889. package/dist/render3d/transform.js +0 -2
  890. package/dist/render3d/transform.js.map +1 -1
  891. package/dist/render3d/vector3.d.ts +6 -48
  892. package/dist/render3d/vector3.d.ts.map +1 -1
  893. package/dist/render3d/vector3.js +4 -38
  894. package/dist/render3d/vector3.js.map +1 -1
  895. package/dist/render3d/walk.d.ts +3 -27
  896. package/dist/render3d/walk.d.ts.map +1 -1
  897. package/dist/render3d/walk.js +5 -33
  898. package/dist/render3d/walk.js.map +1 -1
  899. package/dist/runtime/asset-refine.d.ts +34 -20
  900. package/dist/runtime/asset-refine.d.ts.map +1 -1
  901. package/dist/runtime/asset-refine.js +127 -31
  902. package/dist/runtime/asset-refine.js.map +1 -1
  903. package/dist/runtime/asset-timeline.d.ts +14 -53
  904. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  905. package/dist/runtime/asset-timeline.js +6 -27
  906. package/dist/runtime/asset-timeline.js.map +1 -1
  907. package/dist/runtime/asset-update.d.ts +7 -26
  908. package/dist/runtime/asset-update.d.ts.map +1 -1
  909. package/dist/runtime/asset-update.js +6 -18
  910. package/dist/runtime/asset-update.js.map +1 -1
  911. package/dist/runtime/audio-index.d.ts +0 -2
  912. package/dist/runtime/audio-index.d.ts.map +1 -1
  913. package/dist/runtime/audio-index.js +0 -2
  914. package/dist/runtime/audio-index.js.map +1 -1
  915. package/dist/runtime/builtin-context.d.ts +3 -9
  916. package/dist/runtime/builtin-context.d.ts.map +1 -1
  917. package/dist/runtime/builtin-context.js +3 -9
  918. package/dist/runtime/builtin-context.js.map +1 -1
  919. package/dist/runtime/clip-instance.d.ts +12 -39
  920. package/dist/runtime/clip-instance.d.ts.map +1 -1
  921. package/dist/runtime/clip-instance.js +21 -45
  922. package/dist/runtime/clip-instance.js.map +1 -1
  923. package/dist/runtime/clip-store.d.ts +26 -68
  924. package/dist/runtime/clip-store.d.ts.map +1 -1
  925. package/dist/runtime/clip-store.js +47 -81
  926. package/dist/runtime/clip-store.js.map +1 -1
  927. package/dist/runtime/engine.d.ts +31 -85
  928. package/dist/runtime/engine.d.ts.map +1 -1
  929. package/dist/runtime/engine.js +16 -49
  930. package/dist/runtime/engine.js.map +1 -1
  931. package/dist/runtime/frame-time.d.ts +4 -15
  932. package/dist/runtime/frame-time.d.ts.map +1 -1
  933. package/dist/runtime/frame-time.js +5 -12
  934. package/dist/runtime/frame-time.js.map +1 -1
  935. package/dist/runtime/index.d.ts +0 -1
  936. package/dist/runtime/index.d.ts.map +1 -1
  937. package/dist/runtime/index.js +0 -1
  938. package/dist/runtime/index.js.map +1 -1
  939. package/dist/runtime/node-picking.d.ts +59 -139
  940. package/dist/runtime/node-picking.d.ts.map +1 -1
  941. package/dist/runtime/node-picking.js +87 -157
  942. package/dist/runtime/node-picking.js.map +1 -1
  943. package/dist/runtime/node-picking3d.d.ts +39 -96
  944. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  945. package/dist/runtime/node-picking3d.js +98 -141
  946. package/dist/runtime/node-picking3d.js.map +1 -1
  947. package/dist/runtime/placement.d.ts +8 -17
  948. package/dist/runtime/placement.d.ts.map +1 -1
  949. package/dist/runtime/placement.js +7 -16
  950. package/dist/runtime/placement.js.map +1 -1
  951. package/dist/runtime/playback-controller.d.ts +78 -207
  952. package/dist/runtime/playback-controller.d.ts.map +1 -1
  953. package/dist/runtime/playback-controller.js +111 -226
  954. package/dist/runtime/playback-controller.js.map +1 -1
  955. package/dist/runtime/playback.d.ts +6 -14
  956. package/dist/runtime/playback.d.ts.map +1 -1
  957. package/dist/runtime/playback.js +6 -14
  958. package/dist/runtime/playback.js.map +1 -1
  959. package/dist/runtime/project-assets.d.ts +6 -14
  960. package/dist/runtime/project-assets.d.ts.map +1 -1
  961. package/dist/runtime/project-assets.js +7 -16
  962. package/dist/runtime/project-assets.js.map +1 -1
  963. package/dist/runtime/session.d.ts +22 -45
  964. package/dist/runtime/session.d.ts.map +1 -1
  965. package/dist/runtime/session.js +26 -46
  966. package/dist/runtime/session.js.map +1 -1
  967. package/dist/runtime/settle.d.ts +4 -10
  968. package/dist/runtime/settle.d.ts.map +1 -1
  969. package/dist/runtime/settle.js +4 -10
  970. package/dist/runtime/settle.js.map +1 -1
  971. package/dist/runtime/state-evaluator.d.ts +15 -37
  972. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  973. package/dist/runtime/state-evaluator.js +27 -44
  974. package/dist/runtime/state-evaluator.js.map +1 -1
  975. package/dist/runtime/text-geometry.d.ts +18 -47
  976. package/dist/runtime/text-geometry.d.ts.map +1 -1
  977. package/dist/runtime/text-geometry.js +13 -27
  978. package/dist/runtime/text-geometry.js.map +1 -1
  979. package/dist/sdk/index.d.ts +1 -7
  980. package/dist/sdk/index.d.ts.map +1 -1
  981. package/dist/sdk/index.js +30 -138
  982. package/dist/sdk/index.js.map +1 -1
  983. package/dist/tween/command-decorator.d.ts +6 -26
  984. package/dist/tween/command-decorator.d.ts.map +1 -1
  985. package/dist/tween/command-decorator.js +1 -6
  986. package/dist/tween/command-decorator.js.map +1 -1
  987. package/dist/tween/command.d.ts +6 -53
  988. package/dist/tween/command.d.ts.map +1 -1
  989. package/dist/tween/command.js +5 -40
  990. package/dist/tween/command.js.map +1 -1
  991. package/dist/tween/ease/curve.d.ts +2 -17
  992. package/dist/tween/ease/curve.d.ts.map +1 -1
  993. package/dist/tween/ease/curve.js +1 -6
  994. package/dist/tween/ease/curve.js.map +1 -1
  995. package/dist/tween/ease/describe.d.ts +0 -11
  996. package/dist/tween/ease/describe.d.ts.map +1 -1
  997. package/dist/tween/ease/describe.js +0 -23
  998. package/dist/tween/ease/describe.js.map +1 -1
  999. package/dist/tween/ease/spec.d.ts +2 -18
  1000. package/dist/tween/ease/spec.d.ts.map +1 -1
  1001. package/dist/tween/ease/spec.js.map +1 -1
  1002. package/dist/tween/inert.d.ts +1 -14
  1003. package/dist/tween/inert.d.ts.map +1 -1
  1004. package/dist/tween/inert.js +1 -14
  1005. package/dist/tween/inert.js.map +1 -1
  1006. package/dist/tween/lerp.d.ts +2 -26
  1007. package/dist/tween/lerp.d.ts.map +1 -1
  1008. package/dist/tween/lerp.js +2 -26
  1009. package/dist/tween/lerp.js.map +1 -1
  1010. package/dist/tween/loop.d.ts +9 -50
  1011. package/dist/tween/loop.d.ts.map +1 -1
  1012. package/dist/tween/loop.js +6 -31
  1013. package/dist/tween/loop.js.map +1 -1
  1014. package/dist/tween/prepare.d.ts +2 -30
  1015. package/dist/tween/prepare.d.ts.map +1 -1
  1016. package/dist/tween/prepare.js +2 -30
  1017. package/dist/tween/prepare.js.map +1 -1
  1018. package/dist/tween/stepper.d.ts +4 -25
  1019. package/dist/tween/stepper.d.ts.map +1 -1
  1020. package/dist/tween/stepper.js.map +1 -1
  1021. package/dist/tween/to-command.d.ts +1 -8
  1022. package/dist/tween/to-command.d.ts.map +1 -1
  1023. package/dist/tween/to-command.js +2 -25
  1024. package/dist/tween/to-command.js.map +1 -1
  1025. package/dist/util/context.d.ts +4 -29
  1026. package/dist/util/context.d.ts.map +1 -1
  1027. package/dist/util/context.js +3 -15
  1028. package/dist/util/context.js.map +1 -1
  1029. package/dist/util/csv.d.ts +4 -29
  1030. package/dist/util/csv.d.ts.map +1 -1
  1031. package/dist/util/csv.js +3 -22
  1032. package/dist/util/csv.js.map +1 -1
  1033. package/dist/util/metrics.d.ts +2 -26
  1034. package/dist/util/metrics.d.ts.map +1 -1
  1035. package/dist/util/metrics.js +2 -26
  1036. package/dist/util/metrics.js.map +1 -1
  1037. package/dist/util/random.d.ts +20 -87
  1038. package/dist/util/random.d.ts.map +1 -1
  1039. package/dist/util/random.js +20 -87
  1040. package/dist/util/random.js.map +1 -1
  1041. package/dist/util/reference.d.ts +6 -35
  1042. package/dist/util/reference.d.ts.map +1 -1
  1043. package/dist/util/reference.js +1 -4
  1044. package/dist/util/reference.js.map +1 -1
  1045. package/dist/util/scheduler.d.ts +6 -27
  1046. package/dist/util/scheduler.d.ts.map +1 -1
  1047. package/dist/util/scheduler.js +8 -35
  1048. package/dist/util/scheduler.js.map +1 -1
  1049. package/package.json +1 -1
  1050. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1051. package/dist/browser/chunks/chunk-7DB6BI27.js +0 -6
  1052. package/dist/browser/chunks/chunk-7DB6BI27.js.map +0 -7
  1053. package/dist/browser/chunks/chunk-IX53IFBD.js +0 -13
  1054. package/dist/browser/chunks/chunk-IX53IFBD.js.map +0 -7
  1055. package/dist/browser/chunks/chunk-Q55UPA3E.js +0 -3
  1056. package/dist/browser/chunks/chunk-Q55UPA3E.js.map +0 -7
  1057. package/dist/renamed-scene-names.d.ts +0 -17
  1058. package/dist/renamed-scene-names.d.ts.map +0 -1
  1059. package/dist/renamed-scene-names.js +0 -9
  1060. package/dist/renamed-scene-names.js.map +0 -1
  1061. package/dist/runtime/precompisition.d.ts +0 -24
  1062. package/dist/runtime/precompisition.d.ts.map +0 -1
  1063. package/dist/runtime/precompisition.js +0 -7
  1064. package/dist/runtime/precompisition.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/document/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAcpD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA2C1C,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAEpE,SAAS,aAAa,CAAC,CAAU;IAC7B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,kFAAkF;AAClF,SAAS,MAAM,CAAC,CAAU;IACtB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,SAAS,CAAC,IAAa,EAAE,IAAY,EAAE,MAAyB;IACrE,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO;IAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,yCAAyC,EAAE,CAAC,CAAC;QAC1E,OAAO;IACX,CAAC;IACD,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAyB,CAAC;IACjD,IAAI,OAAO,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CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,0BAA0B,CAAC,GAAY,EAAE,OAAyB;IAC9E,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,uBAAuB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChE,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,QAAQ,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrF,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY,EAAE,OAAyB;IACvE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzD,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,QAAQ,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrF,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,GAAmB,CAAC;AAC/B,CAAC","sourcesContent":["import { isEaseCurve } from \"@/tween/ease/curve\";\nimport { EASE_KINDS } from \"@/tween/ease/spec\";\nimport { expressionOps } from \"./expression/ops\";\nimport { DOCUMENT_FORMAT_VERSION } from \"./migrate\";\nimport type { Registry } from \"./registry\";\nimport type {\n AudioDocument,\n ClipDocument,\n CommandSpec,\n CompositionDocument,\n EaseSpec,\n LoopSpec,\n NodeSpec,\n StillDocument,\n TimedNodeSpec,\n VariableSpec,\n} from \"./types\";\nimport { effectiveSpanIn } from \"./types\";\n\n/**\n * Schema validation for a {@link VisualDocument}.\n *\n * Hand-rolled rather than pulled from a schema library because\n * `@motionscript/core` has **no runtime dependencies**, and a renderer that\n * makes every consumer install a validator to draw a rectangle has made the\n * wrong trade.\n *\n * It checks *structure*, not props. Whether `cornerRadius` accepts a string is\n * the node class's business — it declares that with `property`, and it is\n * checked where it is applied. What can only be checked here is what spans\n * rows: that a parent exists, that the tree has no cycle, that a command's\n * target is present when the command runs. Audio rows are the exception: a\n * ramp or a transition is JSON their nodes read unchecked, and one a device\n * cannot schedule fails long after the document was accepted.\n */\n\n/** One problem with a document. `path` locates it, JSON-Pointer style. */\nexport interface ValidationIssue {\n /** Where the problem is — `\"nodes[2].parentId\"`, `\"commands[7].at\"`. */\n path: string;\n /** What is wrong, in a sentence a host can show. */\n message: string;\n}\n\n/** What {@link validateDocument} checks against beyond the format itself. */\nexport interface ValidateOptions {\n /**\n * Also report every node type and command this registry cannot build — the\n * strict check a build no longer makes, since a build stands an inert\n * placeholder in for an unknown type and skips an unknown command.\n */\n registry?: Registry;\n}\n\n/** The result of {@link validateDocument}. */\nexport interface ValidationResult {\n valid: boolean;\n issues: ValidationIssue[];\n}\n\nconst LOOP_DIRECTIONS = new Set([\"normal\", \"reverse\", \"alternate\"]);\n\nfunction isPlainObject(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\n/** A finite, non-negative number — what every time and duration field must be. */\nfunction isTime(v: unknown): v is number {\n return typeof v === \"number\" && Number.isFinite(v) && v >= 0;\n}\n\nfunction checkEase(ease: unknown, path: string, issues: ValidationIssue[]): void {\n if (ease === undefined) return;\n if (!isPlainObject(ease)) {\n issues.push({ path, message: \"easing must be an object with a `kind`.\" });\n return;\n }\n const { kind, args } = ease as Partial<EaseSpec>;\n if (typeof kind !== \"string\" || !EASE_KINDS.has(kind)) {\n issues.push({\n path: `${path}.kind`,\n message: `easing kind must be one of ${[...EASE_KINDS].join(\", \")} (got ${JSON.stringify(kind)}).`,\n });\n return;\n }\n if (kind === \"custom\" && args !== undefined && typeof args !== \"string\" && !isEaseCurve(args)) {\n issues.push({\n path: `${path}.args`,\n message: \"a custom easing's args must be its curve — two or more `{ x, y }` points — or a registered ease's key.\",\n });\n }\n}\n\n/** An audio ease runs on a device with no `Registry`, so a custom one has to be its drawn curve. */\nfunction checkAudioEase(ease: unknown, path: string, issues: ValidationIssue[]): void {\n checkEase(ease, path, issues);\n if (isPlainObject(ease) && ease.kind === \"custom\" && !isEaseCurve(ease.args)) {\n issues.push({ path: `${path}.args`, message: \"an audio ease cannot name a registered ease; draw its curve (two or more `{ x, y }` points) instead.\" });\n }\n}\n\nfunction checkParam(value: unknown, path: string, issues: ValidationIssue[]): void {\n if (value === undefined || (typeof value === \"number\" && Number.isFinite(value)) || expressionOps.isSource(value)) return;\n if (!isPlainObject(value) || !Array.isArray(value.keys)) {\n issues.push({ path, message: \"must be a finite number, an expression or a ramp, `{ keys: [{ at, value }, …] }`.\" });\n return;\n }\n value.keys.forEach((key: unknown, i: number) => {\n const at = `${path}.keys[${i}]`;\n if (!isPlainObject(key)) {\n issues.push({ path: at, message: \"a ramp key must be an object.\" });\n return;\n }\n if ((key.at === undefined) === (key.before === undefined) || !isTime(key.at ?? key.before)) {\n issues.push({ path: at, message: \"a ramp key needs exactly one of `at` (seconds after the start) or `before` (seconds before the end), >= 0.\" });\n }\n if (typeof key.value !== \"number\" || !Number.isFinite(key.value)) {\n issues.push({ path: `${at}.value`, message: \"a ramp key's value must be a finite number.\" });\n }\n checkAudioEase(key.ease, `${at}.ease`, issues);\n });\n}\n\nconst TRANSITION_KEYS = new Set([\"duration\", \"curve\"]);\n\nfunction checkTransition(transition: unknown, path: string, issues: ValidationIssue[]): void {\n if (transition === undefined) return;\n if (!isPlainObject(transition)) {\n issues.push({ path, message: \"a transition must be an object, `{ duration, curve? }`.\" });\n return;\n }\n if (!isTime(transition.duration)) {\n issues.push({ path: `${path}.duration`, message: \"a transition's duration must be a finite number of seconds >= 0.\" });\n }\n if (transition.curve !== undefined && transition.curve !== \"equalPower\") checkAudioEase(transition.curve, `${path}.curve`, issues);\n for (const key of Object.keys(transition)) {\n if (!TRANSITION_KEYS.has(key)) issues.push({ path: `${path}.${key}`, message: `a transition has no \"${key}\" (yet): only duration and curve.` });\n }\n}\n\nfunction checkAudioProps(type: string, props: Record<string, unknown>, path: string, issues: ValidationIssue[]): void {\n if (\"filters\" in props) {\n issues.push({ path: `${path}.filters`, message: \"audio `filters` was renamed to `effects`.\" });\n }\n for (const name of [\"volume\", \"pan\", ...(type === \"sound\" ? [\"speed\"] : [])]) checkParam(props[name], `${path}.${name}`, issues);\n if (type === \"sound\" && props.loop === true && isPlainObject(props.speed)) {\n issues.push({ path: `${path}.speed`, message: \"a looping sound cannot ramp its speed: there is no one pass of the source for the ramp to run over.\" });\n }\n const effects = props.effects;\n if (effects !== undefined) {\n const list = Array.isArray(effects) ? effects : [effects];\n list.forEach((effect: unknown, i: number) => {\n const at = Array.isArray(effects) ? `${path}.effects[${i}]` : `${path}.effects`;\n if (!isPlainObject(effect) || typeof effect.type !== \"string\") {\n issues.push({ path: at, message: \"an effect must be an object with a `type`.\" });\n return;\n }\n for (const [field, value] of Object.entries(effect)) {\n if (field !== \"type\") checkParam(value, `${at}.${field}`, issues);\n }\n });\n }\n checkTransition(props.transitionIn, `${path}.transitionIn`, issues);\n checkTransition(props.transitionOut, `${path}.transitionOut`, issues);\n}\n\nfunction checkLoop(loop: unknown, path: string, issues: ValidationIssue[]): void {\n if (loop === undefined) return;\n if (!isPlainObject(loop)) {\n issues.push({ path, message: \"loop must be an object with a `count`.\" });\n return;\n }\n const { direction, count } = loop as Partial<LoopSpec>;\n if (count !== null && (typeof count !== \"number\" || !Number.isInteger(count) || count < 0)) {\n issues.push({\n path: `${path}.count`,\n message: \"loop count must be a whole number of repeats >= 0, or null to repeat for the rest of the clip.\",\n });\n }\n if (direction !== undefined && !LOOP_DIRECTIONS.has(direction)) {\n issues.push({\n path: `${path}.direction`,\n message: `loop direction must be one of ${[...LOOP_DIRECTIONS].join(\", \")} (got ${JSON.stringify(direction)}).`,\n });\n }\n}\n\nfunction checkNodeSpec(node: unknown, path: string, issues: ValidationIssue[]): node is NodeSpec {\n if (!isPlainObject(node)) {\n issues.push({ path, message: \"node must be an object.\" });\n return false;\n }\n let ok = true;\n const { id, type, parentId, layerOrder, props, key } = node as Partial<NodeSpec>;\n\n // \"\" is reserved for the scene root (see `checkRootShape`) — every other\n // node needs a real id, since an empty one could never be a command's target.\n if (typeof id !== \"string\") {\n issues.push({ path: `${path}.id`, message: \"id must be a string.\" });\n ok = false;\n }\n if (typeof type !== \"string\" || type.length === 0) {\n issues.push({ path: `${path}.type`, message: \"type must be a non-empty string.\" });\n ok = false;\n }\n if (parentId !== null && typeof parentId !== \"string\") {\n issues.push({ path: `${path}.parentId`, message: \"parentId must be a node id or null.\" });\n ok = false;\n }\n if (typeof layerOrder !== \"number\" || !Number.isFinite(layerOrder)) {\n issues.push({ path: `${path}.layerOrder`, message: \"layerOrder must be a finite number.\" });\n ok = false;\n }\n if (!isPlainObject(props)) {\n issues.push({ path: `${path}.props`, message: \"props must be an object (`{}` when nothing is set).\" });\n ok = false;\n } else if (type === \"sound\" || type === \"audioBus\") {\n checkAudioProps(type, props, `${path}.props`, issues);\n }\n if (key !== undefined) {\n if (typeof key !== \"string\" || key.length === 0) {\n issues.push({ path: `${path}.key`, message: \"key must be a non-empty string when present.\" });\n ok = false;\n } else if (key.includes(\"]\") || key.includes(\".\")) {\n // `[key.prop]` is the reference syntax, so either character names\n // something an expression could never spell.\n issues.push({\n path: `${path}.key`,\n message: `node key \"${key}\" cannot contain \"]\" or \".\" — it is referenced as \"[${key}.prop]\".`,\n });\n ok = false;\n }\n }\n return ok;\n}\n\n/** One node spec, with where it was declared, so an issue can point at it. */\ninterface NodeSite {\n spec: NodeSpec;\n path: string;\n}\n\n/**\n * Gather every authored {@link NodeSpec.key} and check that no two rows claim one.\n *\n * Keys are their own namespace rather than part of {@link checkIdSpace}'s, and the\n * grammar is why: `[x]` is always a variable and `[x.p]` is always a\n * node, so the two can never be confused for one another — and a key is never a\n * `targetId`, which is the collision that one exists to prevent. Unique among keys\n * all the same: two rows keyed `card` would make `[card.x]` read whichever the\n * build reached last.\n */\nfunction checkNodeKeys(sites: readonly NodeSite[], issues: ValidationIssue[]): Map<string, NodeSite> {\n const byKey = new Map<string, NodeSite>();\n for (const site of sites) {\n const key = site.spec.key;\n if (typeof key !== \"string\" || key.length === 0) continue;\n const existing = byKey.get(key);\n if (existing) {\n issues.push({\n path: `${site.path}.key`,\n message: `duplicate node key \"${key}\" (also declared at ${existing.path}).`,\n });\n continue;\n }\n byKey.set(key, site);\n }\n return byKey;\n}\n\n/**\n * The row with `id: \"\"` is the document's root, and must be unparented and of\n * the type that document kind's root is.\n *\n * `canvas2d` for a scene, `audioBus` for an audio document — one rule, one\n * parameter, because the *convention* is the same in both: the root is an\n * ordinary row rather than a special field, and `targetId: null` names it.\n */\nfunction checkRootShape(\n spec: NodeSpec,\n path: string,\n rootType: string,\n issues: ValidationIssue[],\n): void {\n if (spec.id !== \"\") return;\n if (spec.type !== rootType || spec.parentId !== null) {\n issues.push({\n path,\n message: `the node with id \"\" is this document's root and must be \\`{ type: \"${rootType}\", parentId: null }\\`.`,\n });\n }\n}\n\nfunction checkCommandSpec(cmd: unknown, path: string, issues: ValidationIssue[]): cmd is CommandSpec {\n if (!isPlainObject(cmd)) {\n issues.push({ path, message: \"command must be an object.\" });\n return false;\n }\n let ok = true;\n const { id, type, targetId, at, duration, args } = cmd as Partial<CommandSpec>;\n\n if (typeof id !== \"string\" || id.length === 0) {\n issues.push({ path: `${path}.id`, message: \"id must be a non-empty string.\" });\n ok = false;\n }\n if (typeof type !== \"string\" || type.length === 0) {\n issues.push({ path: `${path}.type`, message: \"type must be a non-empty string.\" });\n ok = false;\n }\n if (targetId !== null && typeof targetId !== \"string\") {\n issues.push({ path: `${path}.targetId`, message: \"targetId must be a node id, or null for the scene root.\" });\n ok = false;\n }\n if (!isTime(at)) {\n issues.push({ path: `${path}.at`, message: \"at must be a finite number of seconds >= 0.\" });\n ok = false;\n }\n if (duration !== undefined && !isTime(duration)) {\n issues.push({ path: `${path}.duration`, message: \"duration must be a finite number of seconds >= 0.\" });\n ok = false;\n }\n if (!isPlainObject(args)) {\n issues.push({ path: `${path}.args`, message: \"args must be an object (`{}` when there are none).\" });\n ok = false;\n }\n checkEase((cmd as Partial<CommandSpec>).easing, `${path}.easing`, issues);\n checkLoop((cmd as Partial<CommandSpec>).loop, `${path}.loop`, issues);\n return ok;\n}\n\n/** One declared variable, with where it was declared, so an issue can point at it. */\ninterface VariableSite {\n spec: VariableSpec;\n path: string;\n}\n\nfunction checkVariableSpec(v: unknown, path: string, issues: ValidationIssue[]): v is VariableSpec {\n if (!isPlainObject(v)) {\n issues.push({ path, message: \"variable must be an object.\" });\n return false;\n }\n let ok = true;\n const { id, name, value, lerp } = v as Partial<VariableSpec>;\n\n if (typeof id !== \"string\" || id.length === 0) {\n issues.push({ path: `${path}.id`, message: \"id must be a non-empty string.\" });\n ok = false;\n } else if (id.includes(\"]\")) {\n // `[id]` is the reference syntax, so a `]` in an id names something an\n // expression could never spell.\n issues.push({ path: `${path}.id`, message: `variable id \"${id}\" cannot contain \"]\" — it is referenced as \"[${id}]\".` });\n ok = false;\n }\n if (name !== undefined && typeof name !== \"string\") {\n issues.push({ path: `${path}.name`, message: \"name must be a string when present.\" });\n ok = false;\n }\n if (!(\"value\" in (v as object))) {\n issues.push({ path: `${path}.value`, message: \"value is required — a variable is what it holds before anything changes it.\" });\n ok = false;\n } else if (expressionOps.isSource(value)) {\n issues.push({\n path: `${path}.value`,\n message: \"a variable holds a value, not an expression — only a node prop can be bound.\",\n });\n ok = false;\n }\n if (lerp !== undefined && typeof lerp !== \"string\") {\n issues.push({ path: `${path}.lerp`, message: \"lerp must be a registered lerp key when present.\" });\n ok = false;\n }\n return ok;\n}\n\n/** Read a document's `variables` rows, checking each row's shape. */\nfunction variableRows(rows: unknown, issues: ValidationIssue[]): VariableSite[] {\n if (rows === undefined) return [];\n if (!Array.isArray(rows)) {\n issues.push({ path: \"variables\", message: \"variables must be an array.\" });\n return [];\n }\n const sites: VariableSite[] = [];\n rows.forEach((v, i) => {\n const path = `variables[${i}]`;\n if (checkVariableSpec(v, path, issues)) sites.push({ spec: v, path });\n });\n return sites;\n}\n\n/** Gather every declared variable and check that no id is claimed twice. */\nfunction checkVariables(sites: VariableSite[], issues: ValidationIssue[]): Map<string, VariableSite> {\n const byId = new Map<string, VariableSite>();\n for (const site of sites) {\n const existing = byId.get(site.spec.id);\n if (existing) {\n issues.push({\n path: `${site.path}.id`,\n message: `duplicate variable id \"${site.spec.id}\" (also declared at ${existing.path}).`,\n });\n continue;\n }\n byId.set(site.spec.id, site);\n }\n return byId;\n}\n\n/**\n * A reference split into the node key and prop it names, or `undefined` when it\n * has no dot and so names a variable instead.\n *\n * The dot is the whole discriminator, in the parser (which hands the bracket's\n * contents over as one opaque name), here, and in `ClipTimeline`.\n */\nfunction splitNodeRef(ref: string): { key: string; prop: string } | undefined {\n const dot = ref.indexOf(\".\");\n return dot < 0 ? undefined : { key: ref.slice(0, dot), prop: ref.slice(dot + 1) };\n}\n\n/**\n * Check every expression inside an authored value.\n *\n * Three failures worth catching before anything is built: a formula that does not\n * parse, one naming a variable nothing declares, and one naming a node key\n * nothing is keyed with. All are silent otherwise — the first would reach the\n * timeline as a throw from deep inside a build, and the other two would bind a\n * prop to nothing at all.\n */\nfunction checkExpressions(\n value: unknown,\n path: string,\n declared: ReadonlySet<string>,\n keyed: ReadonlySet<string>,\n issues: ValidationIssue[],\n): void {\n for (const site of expressionOps.collect(value, path)) {\n const parsed = expressionOps.tryParse(site.source);\n if (\"error\" in parsed) {\n issues.push({ path: site.path, message: parsed.error });\n continue;\n }\n for (const ref of parsed.expression.refs) {\n const node = splitNodeRef(ref);\n if (!node) {\n if (declared.has(ref)) continue;\n issues.push({\n path: site.path,\n message: keyed.has(ref)\n ? `expression references \"[${ref}]\", which is a node key — a node is not a value, ` +\n `so name the prop too: \"[${ref}.x]\".`\n : `expression references \"[${ref}]\", which this document does not declare. ` +\n `Declared: ${[...declared].map((k) => `[${k}]`).join(\", \") || \"none\"}.`,\n });\n continue;\n }\n if (node.key.length === 0 || node.prop.length === 0 || node.prop.includes(\".\")) {\n issues.push({\n path: site.path,\n message: `expression references \"[${ref}]\", which is not a node reference — one is \"[key.prop]\".`,\n });\n continue;\n }\n if (keyed.has(node.key)) continue;\n issues.push({\n path: site.path,\n message:\n `expression references \"[${ref}]\", but no node in this document is keyed \"${node.key}\". ` +\n `Keyed: ${[...keyed].join(\", \") || \"none\"}.`,\n });\n }\n }\n}\n\n/** One expression-bound prop: what it is called in a reference, and what it reads. */\ninterface BoundProp {\n /** `\"key.prop\"` — exactly what another prop would write inside `[…]`. */\n id: string;\n /** Where the prop was authored, so an issue points at the row. */\n path: string;\n /** The `\"key.prop\"`s this prop's expressions read. */\n reads: string[];\n}\n\n/**\n * Collect the {@link BoundProp}s one props bag contributes.\n *\n * Per *top-level* prop, because that is the granularity a binding is installed at\n * — `bindProps` walks a bag's own keys and binds each — so a formula nested inside\n * `padding` makes `padding` the prop that reads.\n */\nfunction boundProps(key: string, props: unknown, path: string, out: BoundProp[]): void {\n if (!isPlainObject(props)) return;\n for (const prop of Object.keys(props)) {\n const reads: string[] = [];\n for (const site of expressionOps.collect(props[prop], `${path}.${prop}`)) {\n const parsed = expressionOps.tryParse(site.source);\n if (\"error\" in parsed) continue;\n for (const ref of parsed.expression.refs) {\n if (splitNodeRef(ref)) reads.push(ref);\n }\n }\n if (reads.length > 0) out.push({ id: `${key}.${prop}`, path: `${path}.${prop}`, reads });\n }\n}\n\n/**\n * Refuse a prop that reads a prop that reads it back.\n *\n * A failure mode `[key.prop]` introduces and variables never had: nothing can read\n * a variable, so no chain of them could close. At runtime it does not crash —\n * `PropSlot.get` refuses to re-enter and hands back the last value it settled on —\n * which is exactly why it is caught here: the cost of a cycle is otherwise a frame\n * that quietly disagrees with the document.\n *\n * Edges are per prop, not per node. `a.x → b.y → a.z` terminates, and rejecting it\n * would reject a working document.\n */\nfunction checkExpressionCycles(bound: readonly BoundProp[], issues: ValidationIssue[]): void {\n const byId = new Map(bound.map((b) => [b.id, b]));\n const settled = new Set<string>();\n const stack: string[] = [];\n const reported = new Set<string>();\n\n const walk = (id: string): void => {\n const entry = byId.get(id);\n // A prop nothing binds cannot continue a chain: it holds a literal.\n if (!entry || settled.has(id)) return;\n const at = stack.indexOf(id);\n if (at >= 0) {\n if (!reported.has(id)) {\n const cycle = [...stack.slice(at), id];\n for (const member of cycle) reported.add(member);\n issues.push({\n path: entry.path,\n message: `expression cycle ${cycle.join(\" → \")} — a prop cannot read a prop that reads it back.`,\n });\n }\n return;\n }\n stack.push(id);\n for (const next of entry.reads) walk(next);\n stack.pop();\n settled.add(id);\n };\n\n for (const entry of bound) walk(entry.id);\n}\n\n/**\n * Check that ids are unique, every `parentId` resolves, and no node is its own\n * ancestor.\n *\n * The cycle check is not defensive padding: a parent loop makes the layout walk\n * recurse until the stack overflows, and the trace points at the layout engine\n * rather than at the two rows that point at each other.\n */\nfunction checkTree(sites: readonly NodeSite[], issues: ValidationIssue[]): void {\n // `sites` holds only the rows that passed their shape check, so a position in\n // it is not a position in the document: every issue path comes from the\n // site, which remembers where its row was authored.\n const bySite = new Map<string, NodeSite>();\n for (const site of sites) {\n if (bySite.has(site.spec.id)) {\n issues.push({ path: `${site.path}.id`, message: `duplicate node id \"${site.spec.id}\".` });\n continue;\n }\n bySite.set(site.spec.id, site);\n }\n\n for (const site of sites) {\n const parent = site.spec.parentId;\n if (parent !== null && !bySite.has(parent)) {\n issues.push({\n path: `${site.path}.parentId`,\n message: `parentId \"${parent}\" is not a node in this document.`,\n });\n }\n }\n\n // Walk each node to the root; a revisit within one walk is a cycle.\n const settled = new Set<string>();\n for (const { spec: node } of sites) {\n if (settled.has(node.id)) continue;\n const seen = new Set<string>();\n let cursor: NodeSpec | undefined = node;\n while (cursor) {\n if (seen.has(cursor.id)) {\n issues.push({\n path: `${bySite.get(cursor.id)?.path}.parentId`,\n message: `node \"${cursor.id}\" is its own ancestor — parent chain forms a cycle.`,\n });\n break;\n }\n seen.add(cursor.id);\n if (settled.has(cursor.id)) break;\n const parentId: string | null = cursor.parentId;\n cursor = parentId === null ? undefined : bySite.get(parentId)?.spec;\n }\n for (const id of seen) settled.add(id);\n }\n}\n\n/**\n * Nodes and variables share one id space.\n *\n * They have to: a command names its target with one field, and which table that\n * field is looked up in is a fact of the command's *type*. Two rows answering to\n * one id would still resolve correctly here, but a host's timeline groups its\n * rows by `targetId` — so the collision would show up as two unrelated things\n * drawn on the same track, which is not a bug anyone would think to look for in\n * the document.\n *\n * A {@link NodeSpec.key} is deliberately *not* in this space — see\n * {@link checkNodeKeys}.\n */\nfunction checkIdSpace(\n nodes: NodeSpec[],\n variables: Map<string, VariableSite>,\n issues: ValidationIssue[],\n): void {\n for (const node of nodes) {\n const clash = variables.get(node.id);\n if (clash) {\n issues.push({\n path: `${clash.path}.id`,\n message: `\"${node.id}\" is already a node id — nodes and variables share one id space.`,\n });\n }\n }\n}\n\n/**\n * Refuse the fields the format folded away, by name.\n *\n * A document written before nodes carried their own spans would otherwise fail\n * as \"nodes must be an array\" or an unresolved `[id]`, neither of which names\n * the fix.\n */\nfunction checkRetiredFields(doc: object, issues: ValidationIssue[]): void {\n if ((doc as { constants?: unknown }).constants !== undefined) {\n issues.push({\n path: \"constants\",\n message: \"constants were merged into `variables` — move each row there and drop its `kind`.\",\n });\n }\n}\n\n/** A `formatVersion`, when present, is one this engine can read. Absent is format 0. */\nfunction checkFormatVersion(doc: object, issues: ValidationIssue[]): void {\n const version = (doc as { formatVersion?: unknown }).formatVersion;\n if (version === undefined) return;\n if (typeof version !== \"number\" || !Number.isInteger(version) || version < 0) {\n issues.push({ path: \"formatVersion\", message: \"formatVersion must be a whole number >= 0 when present.\" });\n } else if (version > DOCUMENT_FORMAT_VERSION) {\n issues.push({\n path: \"formatVersion\",\n message: `format ${version} is newer than this engine reads (${DOCUMENT_FORMAT_VERSION}) — open it with a newer engine.`,\n });\n }\n}\n\n/** A project's fields from before `tracks` was the one list, and where each went. */\nconst RETIRED_PROJECT_FIELDS: Readonly<Record<string, string>> = {\n visualTracks: \"visual and audio tracks were merged into `tracks` — move each row there.\",\n audioTracks: \"visual and audio tracks were merged into `tracks` — move each row there.\",\n backgrounds: \"a background is a track — put it first in `tracks`.\",\n overlays: \"an overlay is a track — put it last in `tracks`.\",\n commands: \"a project has no commands — each clip carries its own.\",\n constants: \"a project has no constants — declare `variables` in each clip.\",\n};\n\n/** Every node type and command a clip names, against `registry`. */\nfunction checkVocabulary(\n sites: readonly NodeSite[],\n commands: readonly { spec: CommandSpec; path: string }[],\n rootType: string,\n variables: ReadonlyMap<string, VariableSite>,\n registry: Registry,\n issues: ValidationIssue[],\n): void {\n const typeOf = new Map<string, string>([[\"\", rootType]]);\n for (const site of sites) {\n typeOf.set(site.spec.id, site.spec.type);\n if (!registry.hasNode(site.spec.type)) {\n issues.push({ path: `${site.path}.type`, message: `node type \"${site.spec.type}\" is not registered.` });\n }\n }\n for (const { spec, path } of commands) {\n if (registry.command(spec.type)) continue;\n if (spec.targetId !== null && variables.has(spec.targetId)) {\n issues.push({ path: `${path}.type`, message: `\"${spec.type}\" is not a variable command.` });\n continue;\n }\n const type = typeOf.get(spec.targetId ?? \"\");\n if (type === undefined || !registry.hasNode(type)) continue;\n if (!registry.takesCommand(type, spec.type)) {\n issues.push({ path: `${path}.type`, message: `node type \"${type}\" has no command \"${spec.type}\".` });\n }\n }\n}\n\n/**\n * The node rows every clip kind shares, checked the same way whichever holds\n * them — a cycle or a missing parent is the same bug in a still and a\n * composition.\n */\nfunction checkNodes(nodes: unknown, rootType: string, issues: ValidationIssue[]): NodeSite[] {\n if (!Array.isArray(nodes)) {\n issues.push({ path: \"nodes\", message: \"nodes must be an array.\" });\n return [];\n }\n const sites: NodeSite[] = [];\n nodes.forEach((n, i) => {\n const path = `nodes[${i}]`;\n if (checkNodeSpec(n, path, issues)) {\n sites.push({ spec: n, path });\n checkRootShape(n, path, rootType, issues);\n }\n });\n checkTree(sites, issues);\n return sites;\n}\n\n/** A timed node's span: two times in order, and none at all on the root. */\nfunction checkSpan(spec: TimedNodeSpec, path: string, issues: ValidationIssue[]): void {\n const { startAt, endAt } = spec;\n if (startAt !== undefined && !isTime(startAt)) {\n issues.push({ path: `${path}.startAt`, message: \"startAt must be a finite number of seconds >= 0.\" });\n }\n if (endAt !== undefined && !isTime(endAt)) {\n issues.push({ path: `${path}.endAt`, message: \"endAt must be a finite number of seconds >= 0.\" });\n }\n if (isTime(endAt) && endAt <= (isTime(startAt) ? startAt : 0)) {\n issues.push({ path: `${path}.endAt`, message: `endAt (${endAt}s) must be after startAt (${startAt ?? 0}s).` });\n }\n if (spec.id === \"\" && (startAt !== undefined || endAt !== undefined)) {\n issues.push({ path, message: \"the root is present for the whole clip — it cannot carry startAt or endAt.\" });\n }\n}\n\n/** Validate a still: a node tree, and nothing about time. */\nfunction validateStill(doc: StillDocument, issues: ValidationIssue[], registry: Registry | undefined): void {\n checkRetiredFields(doc, issues);\n if ((doc as { commands?: unknown }).commands !== undefined) {\n issues.push({\n path: \"commands\",\n message: \"a still has no timeline, so no commands — make it a composition to animate it.\",\n });\n }\n\n const variables = checkVariables(variableRows(doc.variables, issues), issues);\n const sites = checkNodes(doc.nodes, \"canvas2d\", issues);\n for (const site of sites) {\n const { startAt, endAt } = site.spec as TimedNodeSpec;\n if (startAt !== undefined || endAt !== undefined) {\n issues.push({\n path: site.path,\n message: \"a still has no timeline — drop startAt/endAt, or make it a composition.\",\n });\n }\n }\n const ok = sites.map((s) => s.spec);\n checkIdSpace(ok, variables, issues);\n if (registry) checkVocabulary(sites, [], \"canvas2d\", variables, registry, issues);\n const keyed = checkNodeKeys(sites, issues);\n\n const declared = new Set(variables.keys());\n const keys = new Set(keyed.keys());\n const bound: BoundProp[] = [];\n for (const site of sites) {\n checkExpressions(site.spec.props, `${site.path}.props`, declared, keys, issues);\n if (site.spec.key) boundProps(site.spec.key, site.spec.props, `${site.path}.props`, bound);\n }\n checkExpressionCycles(bound, issues);\n}\n\n/** Validate a composition: a still's rules over its nodes, plus their spans and the commands on them. */\nfunction validateComposition(doc: CompositionDocument, issues: ValidationIssue[], registry: Registry | undefined): void {\n validateTimedDocument(doc, \"canvas2d\", issues, registry);\n}\n\n/**\n * Validate an audio document.\n *\n * Every rule a composition has, with `audioBus` as the root type — because an\n * audio document *is* a composition, structurally. Sharing the checks rather\n * than restating them is what keeps a cycle, a duplicate id or a command\n * running before its target the same bug — and the same message — whichever\n * kind of clip it appears in.\n */\nfunction validateAudio(doc: AudioDocument, issues: ValidationIssue[], registry: Registry | undefined): void {\n validateTimedDocument(doc, \"audioBus\", issues, registry);\n}\n\n/** Command types the format no longer has, and where what they did went. */\nconst RETIRED_COMMANDS: Readonly<Record<string, string>> = {\n add: \"a node is a row in `nodes` — its `startAt` is when it enters.\",\n variable: \"a variable is declared in `variables`.\",\n};\n\n/** The shared body of {@link validateComposition} and {@link validateAudio}. */\nfunction validateTimedDocument(\n doc: CompositionDocument | AudioDocument,\n rootType: string,\n issues: ValidationIssue[],\n registry: Registry | undefined,\n): void {\n checkRetiredFields(doc, issues);\n if (!Array.isArray(doc.commands)) {\n issues.push({ path: \"commands\", message: \"commands must be an array.\" });\n return;\n }\n if (doc.duration !== undefined && !isTime(doc.duration)) {\n issues.push({ path: \"duration\", message: \"duration must be a finite number of seconds >= 0.\" });\n }\n\n // Variables, gathered before anything else looks at a prop: every\n // expression check needs to know what is declared.\n const variables = checkVariables(variableRows(doc.variables, issues), issues);\n\n const nodeSites = checkNodes(doc.nodes, rootType, issues);\n for (const site of nodeSites) checkSpan(site.spec as TimedNodeSpec, site.path, issues);\n const nodes = nodeSites.map((s) => s.spec);\n checkIdSpace(nodes, variables, issues);\n const keyed = checkNodeKeys(nodeSites, issues);\n\n // The commands that passed their shape check, each with the row it was\n // authored in: a position in this list is not a position in `commands`.\n const valid: { spec: CommandSpec; path: string }[] = [];\n const ids = new Set<string>();\n doc.commands.forEach((c: unknown, i: number) => {\n if (!checkCommandSpec(c, `commands[${i}]`, issues)) return;\n if (ids.has(c.id)) {\n issues.push({ path: `commands[${i}].id`, message: `duplicate command id \"${c.id}\".` });\n return;\n }\n const retired = RETIRED_COMMANDS[c.type];\n if (retired) {\n issues.push({ path: `commands[${i}].type`, message: `there is no \"${c.type}\" command — ${retired}` });\n return;\n }\n ids.add(c.id);\n valid.push({ spec: c, path: `commands[${i}]` });\n });\n\n // A command cannot act on a node that is not there yet. This is the one\n // ordering rule the document has, and it is the one a timeline editor\n // breaks by dragging a tween earlier than the node it animates. \"There\" is\n // the effective span — a child cannot enter before its parent does.\n //\n // A variable target is exempt because a variable has no lifespan: it holds\n // its declared value from t=0, so there is no \"before it exists\" to run\n // ahead of. See `VariableSpec`.\n const byId = new Map(nodes.map((n) => [n.id, n]));\n if (registry) checkVocabulary(nodeSites, valid, rootType, variables, registry, issues);\n for (const { spec: c, path } of valid) {\n if (c.targetId === null) continue;\n if (variables.has(c.targetId)) continue;\n const span = effectiveSpanIn(byId, c.targetId);\n if (span === undefined) {\n issues.push({\n path: `${path}.targetId`,\n message: `targetId \"${c.targetId}\" is not a node or variable in this document.`,\n });\n } else if (c.at < span.start) {\n issues.push({\n path: `${path}.at`,\n message: `command runs at ${c.at}s but its target \"${c.targetId}\" is not present until ${span.start}s.`,\n });\n }\n }\n\n // Expressions, wherever a prop can be authored: a node's props (the scene\n // root included), a `to`/`set` props bag, or a named command's arguments.\n const declared = new Set(variables.keys());\n const keys = new Set(keyed.keys());\n for (const site of nodeSites) {\n checkExpressions(site.spec.props, `${site.path}.props`, declared, keys, issues);\n }\n for (const { spec: c, path } of valid) checkExpressions(c.args, `${path}.args`, declared, keys, issues);\n\n // Cycles, over the two places a document installs a binding: a node's own\n // props, and a `set` — the one command whose args reach `node.set()`.\n const bound: BoundProp[] = [];\n for (const site of nodeSites) {\n if (site.spec.key) boundProps(site.spec.key, site.spec.props, `${site.path}.props`, bound);\n }\n for (const { spec: c, path } of valid) {\n if (c.type !== \"set\" || c.targetId === null) continue;\n const key = byId.get(c.targetId)?.key;\n if (key) boundProps(key, c.args, `${path}.args`, bound);\n }\n checkExpressionCycles(bound, issues);\n}\n\n/**\n * Validate a clip document.\n *\n * Returns every issue rather than throwing on the first: a host showing a\n * document's problems wants the list, and a fix-one-rerun loop over a large\n * scene is what makes an importer feel broken.\n */\nexport function validateDocument(doc: unknown, options: ValidateOptions = {}): ValidationResult {\n const issues: ValidationIssue[] = [];\n\n if (!isPlainObject(doc)) {\n return { valid: false, issues: [{ path: \"\", message: \"document must be an object.\" }] };\n }\n checkFormatVersion(doc, issues);\n const { registry } = options;\n const kind = (doc as Partial<ClipDocument>).kind;\n if (kind === \"still\") {\n validateStill(doc as unknown as StillDocument, issues, registry);\n } else if (kind === \"composition\") {\n validateComposition(doc as unknown as CompositionDocument, issues, registry);\n } else if (kind === \"audio\") {\n validateAudio(doc as unknown as AudioDocument, issues, registry);\n } else {\n issues.push({\n path: \"kind\",\n message: `kind must be \"still\", \"composition\" or \"audio\" (got ${JSON.stringify(kind)}).`,\n });\n }\n\n return { valid: issues.length === 0, issues };\n}\n\n/**\n * Validate a **project** document: the tracks, and every clip in them.\n *\n * Each clip is validated with the same rules a standalone one gets — a cycle or\n * an unresolved expression is the same bug wherever it appears — with its issues\n * prefixed by the track that carries it, so a host can point at the row rather\n * than at \"some clip\".\n */\nexport function validateProjectDocument(doc: unknown, options: ValidateOptions = {}): ValidationResult {\n const issues: ValidationIssue[] = [];\n\n if (!isPlainObject(doc)) {\n return { valid: false, issues: [{ path: \"\", message: \"document must be an object.\" }] };\n }\n const project = doc as Record<string, unknown>;\n if (project.kind !== \"project\") {\n issues.push({ path: \"kind\", message: `kind must be \"project\" (got ${JSON.stringify(project.kind)}).` });\n }\n if (typeof project.name !== \"string\" || project.name.length === 0) {\n issues.push({ path: \"name\", message: \"name must be a non-empty string.\" });\n }\n if (project.fps !== undefined && (typeof project.fps !== \"number\" || !(project.fps > 0) || !Number.isFinite(project.fps))) {\n issues.push({ path: \"fps\", message: \"fps must be a positive number when present.\" });\n }\n checkFormatVersion(project, issues);\n for (const [field, message] of Object.entries(RETIRED_PROJECT_FIELDS)) {\n if (project[field] !== undefined) issues.push({ path: field, message });\n }\n\n // The one field that used to be three. Zero tracks is a legitimate state,\n // not a mistake to reject — a freshly created project has no clips yet,\n // and every host of this array already treats an empty one as ordinary\n // rather than exceptional (`exportProject`/`mixTimelineAudio` no-op,\n // `screenshotProject` raises its own specific \"nothing to screenshot\").\n // Validation would be the odd one out insisting otherwise.\n if (!Array.isArray(project.tracks)) {\n issues.push({ path: \"tracks\", message: \"tracks must be an array.\" });\n return { valid: false, issues };\n }\n\n const ids = new Set<string>();\n project.tracks.forEach((raw, i) => {\n const path = `tracks[${i}]`;\n if (!isPlainObject(raw)) {\n issues.push({ path, message: \"track must be an object.\" });\n return;\n }\n const track = raw as Record<string, unknown>;\n\n if (typeof track.id !== \"string\" || track.id.length === 0) {\n issues.push({ path: `${path}.id`, message: \"id must be a non-empty string.\" });\n } else if (ids.has(track.id)) {\n issues.push({ path: `${path}.id`, message: `duplicate track id \"${track.id}\".` });\n } else {\n ids.add(track.id);\n }\n if (track.name !== undefined && typeof track.name !== \"string\") {\n issues.push({ path: `${path}.name`, message: \"name must be a string when present.\" });\n }\n if (track.startAt !== undefined && !isTime(track.startAt)) {\n issues.push({ path: `${path}.startAt`, message: \"startAt must be a finite number of seconds >= 0.\" });\n }\n // Required, not defaulted: a length that falls back to whatever a media\n // file happens to be is how a three-minute bed silently stretches a\n // thirty-second edit.\n if (!isTime(track.duration)) {\n issues.push({\n path: `${path}.duration`,\n message: \"duration is required, and must be a finite number of seconds >= 0.\",\n });\n }\n\n if (track.clip === undefined) {\n issues.push({ path: `${path}.clip`, message: \"clip is required — a track places a clip document inline.\" });\n return;\n }\n for (const issue of clipIssuesOf(track.clip, options)) {\n issues.push({ path: `${path}.clip${issue.path ? `.${issue.path}` : \"\"}`, message: issue.message });\n }\n });\n\n return { valid: issues.length === 0, issues };\n}\n\n/**\n * Keyed by clip object, because a host re-validates the whole project after every\n * edit and an edit replaces only the clip it touched. A clip mutated in place is\n * not seen again — the same identity contract `Session.replace` already holds.\n */\nconst CLIP_ISSUES = new WeakMap<object, readonly ValidationIssue[]>();\n\nfunction clipIssuesOf(clip: unknown, options: ValidateOptions): readonly ValidationIssue[] {\n if (!isPlainObject(clip) || options.registry) return validateDocument(clip, options).issues;\n let issues = CLIP_ISSUES.get(clip);\n if (!issues) {\n issues = validateDocument(clip).issues;\n CLIP_ISSUES.set(clip, issues);\n }\n return issues;\n}\n\n/** {@link validateProjectDocument}, but throwing. */\nexport function assertValidProjectDocument(doc: unknown, options?: ValidateOptions): void {\n const { valid, issues } = validateProjectDocument(doc, options);\n if (!valid) {\n const detail = issues.map((i) => ` ${i.path || \"<root>\"}: ${i.message}`).join(\"\\n\");\n throw new Error(`Invalid project document:\\n${detail}`);\n }\n}\n\n/**\n * {@link validateDocument}, but throwing. For a caller that has no UI to show\n * issues in and wants the document or an error.\n */\nexport function assertValidDocument(doc: unknown, options?: ValidateOptions): ClipDocument {\n const { valid, issues } = validateDocument(doc, options);\n if (!valid) {\n const detail = issues.map((i) => ` ${i.path || \"<root>\"}: ${i.message}`).join(\"\\n\");\n throw new Error(`Invalid clip document:\\n${detail}`);\n }\n return doc as ClipDocument;\n}\n"]}
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/document/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,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AO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrF,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,GAAmB,CAAC;AAC/B,CAAC","sourcesContent":["import { isEaseCurve } from \"@/tween/ease/curve\";\nimport { EASE_KINDS } from \"@/tween/ease/spec\";\nimport { expressionOps } from \"./expression/ops\";\nimport { DOCUMENT_FORMAT_VERSION } from \"./migrate\";\nimport type { Registry } from \"./registry\";\nimport type {\n AudioDocument,\n ClipDocument,\n CommandSpec,\n CompositionDocument,\n EaseSpec,\n LoopSpec,\n NodeSpec,\n StillDocument,\n TimedNodeSpec,\n VariableSpec,\n} from \"./types\";\nimport { effectiveSpanIn } from \"./types\";\n\n/**\n * Hand-rolled because `@motionscript/core` has no runtime dependencies. Checks structure, not props (a node\n * class checks those where applied): what spans rows, i.e. that a parent exists, the tree has no cycle, and a\n * command's target is present when it runs. Audio rows are the exception: a ramp or transition is JSON their\n * nodes read unchecked, and one a device cannot schedule fails long after the document was accepted.\n */\n\nexport interface ValidationIssue {\n path: string;\n message: string;\n}\n\nexport interface ValidateOptions {\n /**\n * Also report every node type and command this registry cannot build. A build stands an inert placeholder in\n * for an unknown type and skips an unknown command, so this is the strict check.\n */\n registry?: Registry;\n}\n\nexport interface ValidationResult {\n valid: boolean;\n issues: ValidationIssue[];\n}\n\nconst LOOP_DIRECTIONS = new Set([\"normal\", \"reverse\", \"alternate\"]);\n\nfunction isPlainObject(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\nfunction isTime(v: unknown): v is number {\n return typeof v === \"number\" && Number.isFinite(v) && v >= 0;\n}\n\nfunction checkEase(ease: unknown, path: string, issues: ValidationIssue[]): void {\n if (ease === undefined) return;\n if (!isPlainObject(ease)) {\n issues.push({ path, message: \"easing must be an object with a `kind`.\" });\n return;\n }\n const { kind, args } = ease as Partial<EaseSpec>;\n if (typeof kind !== \"string\" || !EASE_KINDS.has(kind)) {\n issues.push({\n path: `${path}.kind`,\n message: `easing kind must be one of ${[...EASE_KINDS].join(\", \")} (got ${JSON.stringify(kind)}).`,\n });\n return;\n }\n if (kind === \"custom\" && args !== undefined && typeof args !== \"string\" && !isEaseCurve(args)) {\n issues.push({\n path: `${path}.args`,\n message: \"a custom easing's args must be its curve — two or more `{ x, y }` points — or a registered ease's key.\",\n });\n }\n}\n\n/** An audio ease runs on a device with no `Registry`, so a custom one has to be its drawn curve. */\nfunction checkAudioEase(ease: unknown, path: string, issues: ValidationIssue[]): void {\n checkEase(ease, path, issues);\n if (isPlainObject(ease) && ease.kind === \"custom\" && !isEaseCurve(ease.args)) {\n issues.push({ path: `${path}.args`, message: \"an audio ease cannot name a registered ease; draw its curve (two or more `{ x, y }` points) instead.\" });\n }\n}\n\nfunction checkParam(value: unknown, path: string, issues: ValidationIssue[]): void {\n if (value === undefined || (typeof value === \"number\" && Number.isFinite(value)) || expressionOps.isSource(value)) return;\n if (!isPlainObject(value) || !Array.isArray(value.keys)) {\n issues.push({ path, message: \"must be a finite number, an expression or a ramp, `{ keys: [{ at, value }, …] }`.\" });\n return;\n }\n value.keys.forEach((key: unknown, i: number) => {\n const at = `${path}.keys[${i}]`;\n if (!isPlainObject(key)) {\n issues.push({ path: at, message: \"a ramp key must be an object.\" });\n return;\n }\n if ((key.at === undefined) === (key.before === undefined) || !isTime(key.at ?? key.before)) {\n issues.push({ path: at, message: \"a ramp key needs exactly one of `at` (seconds after the start) or `before` (seconds before the end), >= 0.\" });\n }\n if (typeof key.value !== \"number\" || !Number.isFinite(key.value)) {\n issues.push({ path: `${at}.value`, message: \"a ramp key's value must be a finite number.\" });\n }\n checkAudioEase(key.ease, `${at}.ease`, issues);\n });\n}\n\nconst TRANSITION_KEYS = new Set([\"duration\", \"curve\"]);\n\nfunction checkTransition(transition: unknown, path: string, issues: ValidationIssue[]): void {\n if (transition === undefined) return;\n if (!isPlainObject(transition)) {\n issues.push({ path, message: \"a transition must be an object, `{ duration, curve? }`.\" });\n return;\n }\n if (!isTime(transition.duration)) {\n issues.push({ path: `${path}.duration`, message: \"a transition's duration must be a finite number of seconds >= 0.\" });\n }\n if (transition.curve !== undefined && transition.curve !== \"equalPower\") checkAudioEase(transition.curve, `${path}.curve`, issues);\n for (const key of Object.keys(transition)) {\n if (!TRANSITION_KEYS.has(key)) issues.push({ path: `${path}.${key}`, message: `a transition has no \"${key}\" (yet): only duration and curve.` });\n }\n}\n\nfunction checkAudioProps(type: string, props: Record<string, unknown>, path: string, issues: ValidationIssue[]): void {\n if (\"filters\" in props) {\n issues.push({ path: `${path}.filters`, message: \"audio `filters` was renamed to `effects`.\" });\n }\n for (const name of [\"volume\", \"pan\", ...(type === \"sound\" ? [\"speed\"] : [])]) checkParam(props[name], `${path}.${name}`, issues);\n if (type === \"sound\" && props.loop === true && isPlainObject(props.speed)) {\n issues.push({ path: `${path}.speed`, message: \"a looping sound cannot ramp its speed: there is no one pass of the source for the ramp to run over.\" });\n }\n const effects = props.effects;\n if (effects !== undefined) {\n const list = Array.isArray(effects) ? effects : [effects];\n list.forEach((effect: unknown, i: number) => {\n const at = Array.isArray(effects) ? `${path}.effects[${i}]` : `${path}.effects`;\n if (!isPlainObject(effect) || typeof effect.type !== \"string\") {\n issues.push({ path: at, message: \"an effect must be an object with a `type`.\" });\n return;\n }\n for (const [field, value] of Object.entries(effect)) {\n if (field !== \"type\") checkParam(value, `${at}.${field}`, issues);\n }\n });\n }\n checkTransition(props.transitionIn, `${path}.transitionIn`, issues);\n checkTransition(props.transitionOut, `${path}.transitionOut`, issues);\n}\n\nfunction checkLoop(loop: unknown, path: string, issues: ValidationIssue[]): void {\n if (loop === undefined) return;\n if (!isPlainObject(loop)) {\n issues.push({ path, message: \"loop must be an object with a `count`.\" });\n return;\n }\n const { direction, count } = loop as Partial<LoopSpec>;\n if (count !== null && (typeof count !== \"number\" || !Number.isInteger(count) || count < 0)) {\n issues.push({\n path: `${path}.count`,\n message: \"loop count must be a whole number of repeats >= 0, or null to repeat for the rest of the clip.\",\n });\n }\n if (direction !== undefined && !LOOP_DIRECTIONS.has(direction)) {\n issues.push({\n path: `${path}.direction`,\n message: `loop direction must be one of ${[...LOOP_DIRECTIONS].join(\", \")} (got ${JSON.stringify(direction)}).`,\n });\n }\n}\n\nfunction checkNodeSpec(node: unknown, path: string, issues: ValidationIssue[]): node is NodeSpec {\n if (!isPlainObject(node)) {\n issues.push({ path, message: \"node must be an object.\" });\n return false;\n }\n let ok = true;\n const { id, type, parentId, layerOrder, props, key } = node as Partial<NodeSpec>;\n\n /**\n * `\"\"` is reserved for the scene root (see `checkRootShape`); any other node needs a real id, since an empty\n * one could never be a command's target.\n */\n if (typeof id !== \"string\") {\n issues.push({ path: `${path}.id`, message: \"id must be a string.\" });\n ok = false;\n }\n if (typeof type !== \"string\" || type.length === 0) {\n issues.push({ path: `${path}.type`, message: \"type must be a non-empty string.\" });\n ok = false;\n }\n if (parentId !== null && typeof parentId !== \"string\") {\n issues.push({ path: `${path}.parentId`, message: \"parentId must be a node id or null.\" });\n ok = false;\n }\n if (typeof layerOrder !== \"number\" || !Number.isFinite(layerOrder)) {\n issues.push({ path: `${path}.layerOrder`, message: \"layerOrder must be a finite number.\" });\n ok = false;\n }\n if (!isPlainObject(props)) {\n issues.push({ path: `${path}.props`, message: \"props must be an object (`{}` when nothing is set).\" });\n ok = false;\n } else if (type === \"sound\" || type === \"audioBus\") {\n checkAudioProps(type, props, `${path}.props`, issues);\n }\n if (key !== undefined) {\n if (typeof key !== \"string\" || key.length === 0) {\n issues.push({ path: `${path}.key`, message: \"key must be a non-empty string when present.\" });\n ok = false;\n } else if (key.includes(\"]\") || key.includes(\".\")) {\n /**\n * `[key.prop]` is the reference syntax, so either character names something an expression could never spell.\n */\n issues.push({\n path: `${path}.key`,\n message: `node key \"${key}\" cannot contain \"]\" or \".\" — it is referenced as \"[${key}.prop]\".`,\n });\n ok = false;\n }\n }\n return ok;\n}\n\ninterface NodeSite {\n spec: NodeSpec;\n path: string;\n}\n\n/**\n * Keys are their own namespace, separate from {@link checkIdSpace}: `[x]` is always a variable and `[x.p]`\n * always a node, and a key is never a `targetId`. Unique among keys all the same, or `[card.x]` would read\n * whichever row the build reached last.\n */\nfunction checkNodeKeys(sites: readonly NodeSite[], issues: ValidationIssue[]): Map<string, NodeSite> {\n const byKey = new Map<string, NodeSite>();\n for (const site of sites) {\n const key = site.spec.key;\n if (typeof key !== \"string\" || key.length === 0) continue;\n const existing = byKey.get(key);\n if (existing) {\n issues.push({\n path: `${site.path}.key`,\n message: `duplicate node key \"${key}\" (also declared at ${existing.path}).`,\n });\n continue;\n }\n byKey.set(key, site);\n }\n return byKey;\n}\n\n/**\n * The row with `id: \"\"` is the root: unparented and of the document kind's root type (`canvas2d` for a scene,\n * `audioBus` for audio). `targetId: null` names it.\n */\nfunction checkRootShape(\n spec: NodeSpec,\n path: string,\n rootType: string,\n issues: ValidationIssue[],\n): void {\n if (spec.id !== \"\") return;\n if (spec.type !== rootType || spec.parentId !== null) {\n issues.push({\n path,\n message: `the node with id \"\" is this document's root and must be \\`{ type: \"${rootType}\", parentId: null }\\`.`,\n });\n }\n}\n\nfunction checkCommandSpec(cmd: unknown, path: string, issues: ValidationIssue[]): cmd is CommandSpec {\n if (!isPlainObject(cmd)) {\n issues.push({ path, message: \"command must be an object.\" });\n return false;\n }\n let ok = true;\n const { id, type, targetId, at, duration, args } = cmd as Partial<CommandSpec>;\n\n if (typeof id !== \"string\" || id.length === 0) {\n issues.push({ path: `${path}.id`, message: \"id must be a non-empty string.\" });\n ok = false;\n }\n if (typeof type !== \"string\" || type.length === 0) {\n issues.push({ path: `${path}.type`, message: \"type must be a non-empty string.\" });\n ok = false;\n }\n if (targetId !== null && typeof targetId !== \"string\") {\n issues.push({ path: `${path}.targetId`, message: \"targetId must be a node id, or null for the scene root.\" });\n ok = false;\n }\n if (!isTime(at)) {\n issues.push({ path: `${path}.at`, message: \"at must be a finite number of seconds >= 0.\" });\n ok = false;\n }\n if (duration !== undefined && !isTime(duration)) {\n issues.push({ path: `${path}.duration`, message: \"duration must be a finite number of seconds >= 0.\" });\n ok = false;\n }\n if (!isPlainObject(args)) {\n issues.push({ path: `${path}.args`, message: \"args must be an object (`{}` when there are none).\" });\n ok = false;\n }\n checkEase((cmd as Partial<CommandSpec>).easing, `${path}.easing`, issues);\n checkLoop((cmd as Partial<CommandSpec>).loop, `${path}.loop`, issues);\n return ok;\n}\n\ninterface VariableSite {\n spec: VariableSpec;\n path: string;\n}\n\nfunction checkVariableSpec(v: unknown, path: string, issues: ValidationIssue[]): v is VariableSpec {\n if (!isPlainObject(v)) {\n issues.push({ path, message: \"variable must be an object.\" });\n return false;\n }\n let ok = true;\n const { id, name, value, lerp } = v as Partial<VariableSpec>;\n\n if (typeof id !== \"string\" || id.length === 0) {\n issues.push({ path: `${path}.id`, message: \"id must be a non-empty string.\" });\n ok = false;\n } else if (id.includes(\"]\")) {\n /**\n * `[id]` is the reference syntax, so a `]` in an id names something an expression could never spell.\n */\n issues.push({ path: `${path}.id`, message: `variable id \"${id}\" cannot contain \"]\" — it is referenced as \"[${id}]\".` });\n ok = false;\n }\n if (name !== undefined && typeof name !== \"string\") {\n issues.push({ path: `${path}.name`, message: \"name must be a string when present.\" });\n ok = false;\n }\n if (!(\"value\" in (v as object))) {\n issues.push({ path: `${path}.value`, message: \"value is required — a variable is what it holds before anything changes it.\" });\n ok = false;\n } else if (expressionOps.isSource(value)) {\n issues.push({\n path: `${path}.value`,\n message: \"a variable holds a value, not an expression — only a node prop can be bound.\",\n });\n ok = false;\n }\n if (lerp !== undefined && typeof lerp !== \"string\") {\n issues.push({ path: `${path}.lerp`, message: \"lerp must be a registered lerp key when present.\" });\n ok = false;\n }\n return ok;\n}\n\nfunction variableRows(rows: unknown, issues: ValidationIssue[]): VariableSite[] {\n if (rows === undefined) return [];\n if (!Array.isArray(rows)) {\n issues.push({ path: \"variables\", message: \"variables must be an array.\" });\n return [];\n }\n const sites: VariableSite[] = [];\n rows.forEach((v, i) => {\n const path = `variables[${i}]`;\n if (checkVariableSpec(v, path, issues)) sites.push({ spec: v, path });\n });\n return sites;\n}\n\nfunction checkVariables(sites: VariableSite[], issues: ValidationIssue[]): Map<string, VariableSite> {\n const byId = new Map<string, VariableSite>();\n for (const site of sites) {\n const existing = byId.get(site.spec.id);\n if (existing) {\n issues.push({\n path: `${site.path}.id`,\n message: `duplicate variable id \"${site.spec.id}\" (also declared at ${existing.path}).`,\n });\n continue;\n }\n byId.set(site.spec.id, site);\n }\n return byId;\n}\n\n/**\n * `undefined` when the ref has no dot and so names a variable. The dot is the discriminator in the parser,\n * here and in `ClipTimeline`.\n */\nfunction splitNodeRef(ref: string): { key: string; prop: string } | undefined {\n const dot = ref.indexOf(\".\");\n return dot < 0 ? undefined : { key: ref.slice(0, dot), prop: ref.slice(dot + 1) };\n}\n\n/**\n * A formula that does not parse, one naming an undeclared variable, and one naming a node key nothing carries.\n * All are silent otherwise: the first would throw from deep inside a build, the others would bind a prop to\n * nothing.\n */\nfunction checkExpressions(\n value: unknown,\n path: string,\n declared: ReadonlySet<string>,\n keyed: ReadonlySet<string>,\n issues: ValidationIssue[],\n): void {\n for (const site of expressionOps.collect(value, path)) {\n const parsed = expressionOps.tryParse(site.source);\n if (\"error\" in parsed) {\n issues.push({ path: site.path, message: parsed.error });\n continue;\n }\n for (const ref of parsed.expression.refs) {\n const node = splitNodeRef(ref);\n if (!node) {\n if (declared.has(ref)) continue;\n issues.push({\n path: site.path,\n message: keyed.has(ref)\n ? `expression references \"[${ref}]\", which is a node key — a node is not a value, ` +\n `so name the prop too: \"[${ref}.x]\".`\n : `expression references \"[${ref}]\", which this document does not declare. ` +\n `Declared: ${[...declared].map((k) => `[${k}]`).join(\", \") || \"none\"}.`,\n });\n continue;\n }\n if (node.key.length === 0 || node.prop.length === 0 || node.prop.includes(\".\")) {\n issues.push({\n path: site.path,\n message: `expression references \"[${ref}]\", which is not a node reference — one is \"[key.prop]\".`,\n });\n continue;\n }\n if (keyed.has(node.key)) continue;\n issues.push({\n path: site.path,\n message:\n `expression references \"[${ref}]\", but no node in this document is keyed \"${node.key}\". ` +\n `Keyed: ${[...keyed].join(\", \") || \"none\"}.`,\n });\n }\n }\n}\n\ninterface BoundProp {\n id: string;\n path: string;\n reads: string[];\n}\n\n/**\n * Per top-level prop, the granularity a binding is installed at (`bindProps` binds each key), so a formula\n * nested inside `padding` makes `padding` the prop that reads.\n */\nfunction boundProps(key: string, props: unknown, path: string, out: BoundProp[]): void {\n if (!isPlainObject(props)) return;\n for (const prop of Object.keys(props)) {\n const reads: string[] = [];\n for (const site of expressionOps.collect(props[prop], `${path}.${prop}`)) {\n const parsed = expressionOps.tryParse(site.source);\n if (\"error\" in parsed) continue;\n for (const ref of parsed.expression.refs) {\n if (splitNodeRef(ref)) reads.push(ref);\n }\n }\n if (reads.length > 0) out.push({ id: `${key}.${prop}`, path: `${path}.${prop}`, reads });\n }\n}\n\n/**\n * Refuse a prop that reads a prop that reads it back. Variables cannot cycle (nothing reads a variable), but\n * `[key.prop]` can. At runtime `PropSlot.get` refuses to re-enter and returns the last settled value, so a\n * cycle would otherwise be a frame that quietly disagrees with the document.\n *\n * Edges are per prop, not per node: `a.x -> b.y -> a.z` terminates and must not be rejected.\n */\nfunction checkExpressionCycles(bound: readonly BoundProp[], issues: ValidationIssue[]): void {\n const byId = new Map(bound.map((b) => [b.id, b]));\n const settled = new Set<string>();\n const stack: string[] = [];\n const reported = new Set<string>();\n\n const walk = (id: string): void => {\n const entry = byId.get(id);\n // A prop nothing binds cannot continue a chain: it holds a literal.\n if (!entry || settled.has(id)) return;\n const at = stack.indexOf(id);\n if (at >= 0) {\n if (!reported.has(id)) {\n const cycle = [...stack.slice(at), id];\n for (const member of cycle) reported.add(member);\n issues.push({\n path: entry.path,\n message: `expression cycle ${cycle.join(\" → \")} — a prop cannot read a prop that reads it back.`,\n });\n }\n return;\n }\n stack.push(id);\n for (const next of entry.reads) walk(next);\n stack.pop();\n settled.add(id);\n };\n\n for (const entry of bound) walk(entry.id);\n}\n\n/**\n * Check ids are unique, every `parentId` resolves, and no node is its own ancestor. A parent loop makes the\n * layout walk recurse until the stack overflows, with a trace pointing at the layout engine rather than the\n * two rows.\n */\nfunction checkTree(sites: readonly NodeSite[], issues: ValidationIssue[]): void {\n /**\n * `sites` holds only rows that passed their shape check, so a position in it is not a position in the\n * document: every issue path comes from the site.\n */\n const bySite = new Map<string, NodeSite>();\n for (const site of sites) {\n if (bySite.has(site.spec.id)) {\n issues.push({ path: `${site.path}.id`, message: `duplicate node id \"${site.spec.id}\".` });\n continue;\n }\n bySite.set(site.spec.id, site);\n }\n\n for (const site of sites) {\n const parent = site.spec.parentId;\n if (parent !== null && !bySite.has(parent)) {\n issues.push({\n path: `${site.path}.parentId`,\n message: `parentId \"${parent}\" is not a node in this document.`,\n });\n }\n }\n\n // Walk each node to the root; a revisit within one walk is a cycle.\n const settled = new Set<string>();\n for (const { spec: node } of sites) {\n if (settled.has(node.id)) continue;\n const seen = new Set<string>();\n let cursor: NodeSpec | undefined = node;\n while (cursor) {\n if (seen.has(cursor.id)) {\n issues.push({\n path: `${bySite.get(cursor.id)?.path}.parentId`,\n message: `node \"${cursor.id}\" is its own ancestor — parent chain forms a cycle.`,\n });\n break;\n }\n seen.add(cursor.id);\n if (settled.has(cursor.id)) break;\n const parentId: string | null = cursor.parentId;\n cursor = parentId === null ? undefined : bySite.get(parentId)?.spec;\n }\n for (const id of seen) settled.add(id);\n }\n}\n\n/**\n * Nodes and variables share one id space: a command names its target with one field, and a host groups\n * timeline rows by `targetId`, so a collision would draw two unrelated things on one track. A {@link\n * NodeSpec.key} is deliberately not in this space (see {@link checkNodeKeys}).\n */\nfunction checkIdSpace(\n nodes: NodeSpec[],\n variables: Map<string, VariableSite>,\n issues: ValidationIssue[],\n): void {\n for (const node of nodes) {\n const clash = variables.get(node.id);\n if (clash) {\n issues.push({\n path: `${clash.path}.id`,\n message: `\"${node.id}\" is already a node id — nodes and variables share one id space.`,\n });\n }\n }\n}\n\n/**\n * Refuse the fields the format folded away, by name: a document written before nodes carried spans would\n * otherwise fail as \"nodes must be an array\" or an unresolved `[id]`, neither of which names the fix.\n */\nfunction checkRetiredFields(doc: object, issues: ValidationIssue[]): void {\n if ((doc as { constants?: unknown }).constants !== undefined) {\n issues.push({\n path: \"constants\",\n message: \"constants were merged into `variables` — move each row there and drop its `kind`.\",\n });\n }\n}\n\nfunction checkFormatVersion(doc: object, issues: ValidationIssue[]): void {\n const version = (doc as { formatVersion?: unknown }).formatVersion;\n if (version === undefined) return;\n if (typeof version !== \"number\" || !Number.isInteger(version) || version < 0) {\n issues.push({ path: \"formatVersion\", message: \"formatVersion must be a whole number >= 0 when present.\" });\n } else if (version > DOCUMENT_FORMAT_VERSION) {\n issues.push({\n path: \"formatVersion\",\n message: `format ${version} is newer than this engine reads (${DOCUMENT_FORMAT_VERSION}) — open it with a newer engine.`,\n });\n }\n}\n\nconst RETIRED_PROJECT_FIELDS: Readonly<Record<string, string>> = {\n visualTracks: \"visual and audio tracks were merged into `tracks` — move each row there.\",\n audioTracks: \"visual and audio tracks were merged into `tracks` — move each row there.\",\n backgrounds: \"a background is a track — put it first in `tracks`.\",\n overlays: \"an overlay is a track — put it last in `tracks`.\",\n commands: \"a project has no commands — each clip carries its own.\",\n constants: \"a project has no constants — declare `variables` in each clip.\",\n};\n\nfunction checkVocabulary(\n sites: readonly NodeSite[],\n commands: readonly { spec: CommandSpec; path: string }[],\n rootType: string,\n variables: ReadonlyMap<string, VariableSite>,\n registry: Registry,\n issues: ValidationIssue[],\n): void {\n const typeOf = new Map<string, string>([[\"\", rootType]]);\n for (const site of sites) {\n typeOf.set(site.spec.id, site.spec.type);\n if (!registry.hasNode(site.spec.type)) {\n issues.push({ path: `${site.path}.type`, message: `node type \"${site.spec.type}\" is not registered.` });\n }\n }\n for (const { spec, path } of commands) {\n if (registry.command(spec.type)) continue;\n if (spec.targetId !== null && variables.has(spec.targetId)) {\n issues.push({ path: `${path}.type`, message: `\"${spec.type}\" is not a variable command.` });\n continue;\n }\n const type = typeOf.get(spec.targetId ?? \"\");\n if (type === undefined || !registry.hasNode(type)) continue;\n if (!registry.takesCommand(type, spec.type)) {\n issues.push({ path: `${path}.type`, message: `node type \"${type}\" has no command \"${spec.type}\".` });\n }\n }\n}\n\n/**\n * Checked the same way whichever clip kind holds them: a cycle or missing parent is the same bug in a still\n * and a composition.\n */\nfunction checkNodes(nodes: unknown, rootType: string, issues: ValidationIssue[]): NodeSite[] {\n if (!Array.isArray(nodes)) {\n issues.push({ path: \"nodes\", message: \"nodes must be an array.\" });\n return [];\n }\n const sites: NodeSite[] = [];\n nodes.forEach((n, i) => {\n const path = `nodes[${i}]`;\n if (checkNodeSpec(n, path, issues)) {\n sites.push({ spec: n, path });\n checkRootShape(n, path, rootType, issues);\n }\n });\n checkTree(sites, issues);\n return sites;\n}\n\nfunction checkSpan(spec: TimedNodeSpec, path: string, issues: ValidationIssue[]): void {\n const { startAt, endAt } = spec;\n if (startAt !== undefined && !isTime(startAt)) {\n issues.push({ path: `${path}.startAt`, message: \"startAt must be a finite number of seconds >= 0.\" });\n }\n if (endAt !== undefined && !isTime(endAt)) {\n issues.push({ path: `${path}.endAt`, message: \"endAt must be a finite number of seconds >= 0.\" });\n }\n if (isTime(endAt) && endAt <= (isTime(startAt) ? startAt : 0)) {\n issues.push({ path: `${path}.endAt`, message: `endAt (${endAt}s) must be after startAt (${startAt ?? 0}s).` });\n }\n if (spec.id === \"\" && (startAt !== undefined || endAt !== undefined)) {\n issues.push({ path, message: \"the root is present for the whole clip — it cannot carry startAt or endAt.\" });\n }\n}\n\nfunction validateStill(doc: StillDocument, issues: ValidationIssue[], registry: Registry | undefined): void {\n checkRetiredFields(doc, issues);\n if ((doc as { commands?: unknown }).commands !== undefined) {\n issues.push({\n path: \"commands\",\n message: \"a still has no timeline, so no commands — make it a composition to animate it.\",\n });\n }\n\n const variables = checkVariables(variableRows(doc.variables, issues), issues);\n const sites = checkNodes(doc.nodes, \"canvas2d\", issues);\n for (const site of sites) {\n const { startAt, endAt } = site.spec as TimedNodeSpec;\n if (startAt !== undefined || endAt !== undefined) {\n issues.push({\n path: site.path,\n message: \"a still has no timeline — drop startAt/endAt, or make it a composition.\",\n });\n }\n }\n const ok = sites.map((s) => s.spec);\n checkIdSpace(ok, variables, issues);\n if (registry) checkVocabulary(sites, [], \"canvas2d\", variables, registry, issues);\n const keyed = checkNodeKeys(sites, issues);\n\n const declared = new Set(variables.keys());\n const keys = new Set(keyed.keys());\n const bound: BoundProp[] = [];\n for (const site of sites) {\n checkExpressions(site.spec.props, `${site.path}.props`, declared, keys, issues);\n if (site.spec.key) boundProps(site.spec.key, site.spec.props, `${site.path}.props`, bound);\n }\n checkExpressionCycles(bound, issues);\n}\n\nfunction validateComposition(doc: CompositionDocument, issues: ValidationIssue[], registry: Registry | undefined): void {\n validateTimedDocument(doc, \"canvas2d\", issues, registry);\n}\n\n/**\n * An audio document is structurally a composition with `audioBus` as the root type, so the checks are shared:\n * a cycle, duplicate id or command running before its target is the same message in any clip kind.\n */\nfunction validateAudio(doc: AudioDocument, issues: ValidationIssue[], registry: Registry | undefined): void {\n validateTimedDocument(doc, \"audioBus\", issues, registry);\n}\n\n/** Command types the format no longer has, and where what they did went. */\nconst RETIRED_COMMANDS: Readonly<Record<string, string>> = {\n add: \"a node is a row in `nodes` — its `startAt` is when it enters.\",\n variable: \"a variable is declared in `variables`.\",\n};\n\nfunction validateTimedDocument(\n doc: CompositionDocument | AudioDocument,\n rootType: string,\n issues: ValidationIssue[],\n registry: Registry | undefined,\n): void {\n checkRetiredFields(doc, issues);\n if (!Array.isArray(doc.commands)) {\n issues.push({ path: \"commands\", message: \"commands must be an array.\" });\n return;\n }\n if (doc.duration !== undefined && !isTime(doc.duration)) {\n issues.push({ path: \"duration\", message: \"duration must be a finite number of seconds >= 0.\" });\n }\n\n /** Gathered first: every expression check needs to know what is declared. */\n const variables = checkVariables(variableRows(doc.variables, issues), issues);\n\n const nodeSites = checkNodes(doc.nodes, rootType, issues);\n for (const site of nodeSites) checkSpan(site.spec as TimedNodeSpec, site.path, issues);\n const nodes = nodeSites.map((s) => s.spec);\n checkIdSpace(nodes, variables, issues);\n const keyed = checkNodeKeys(nodeSites, issues);\n\n /** Each with the row it was authored in: a position in this list is not a position in `commands`. */\n const valid: { spec: CommandSpec; path: string }[] = [];\n const ids = new Set<string>();\n doc.commands.forEach((c: unknown, i: number) => {\n if (!checkCommandSpec(c, `commands[${i}]`, issues)) return;\n if (ids.has(c.id)) {\n issues.push({ path: `commands[${i}].id`, message: `duplicate command id \"${c.id}\".` });\n return;\n }\n const retired = RETIRED_COMMANDS[c.type];\n if (retired) {\n issues.push({ path: `commands[${i}].type`, message: `there is no \"${c.type}\" command — ${retired}` });\n return;\n }\n ids.add(c.id);\n valid.push({ spec: c, path: `commands[${i}]` });\n });\n\n /**\n * A command cannot act on a node that is not there yet: the one ordering rule, and the one a timeline editor\n * breaks by dragging a tween earlier than its node. \"There\" is the effective span (a child cannot enter before\n * its parent). A variable target is exempt: it holds its declared value from t=0.\n */\n const byId = new Map(nodes.map((n) => [n.id, n]));\n if (registry) checkVocabulary(nodeSites, valid, rootType, variables, registry, issues);\n for (const { spec: c, path } of valid) {\n if (c.targetId === null) continue;\n if (variables.has(c.targetId)) continue;\n const span = effectiveSpanIn(byId, c.targetId);\n if (span === undefined) {\n issues.push({\n path: `${path}.targetId`,\n message: `targetId \"${c.targetId}\" is not a node or variable in this document.`,\n });\n } else if (c.at < span.start) {\n issues.push({\n path: `${path}.at`,\n message: `command runs at ${c.at}s but its target \"${c.targetId}\" is not present until ${span.start}s.`,\n });\n }\n }\n\n /**\n * Expressions wherever a prop can be authored: node props (root included), a `to`/`set` props bag, or a named\n * command's arguments.\n */\n const declared = new Set(variables.keys());\n const keys = new Set(keyed.keys());\n for (const site of nodeSites) {\n checkExpressions(site.spec.props, `${site.path}.props`, declared, keys, issues);\n }\n for (const { spec: c, path } of valid) checkExpressions(c.args, `${path}.args`, declared, keys, issues);\n\n /**\n * Cycles over the two places a binding is installed: a node's own props and `set`, the one command whose args\n * reach `node.set()`.\n */\n const bound: BoundProp[] = [];\n for (const site of nodeSites) {\n if (site.spec.key) boundProps(site.spec.key, site.spec.props, `${site.path}.props`, bound);\n }\n for (const { spec: c, path } of valid) {\n if (c.type !== \"set\" || c.targetId === null) continue;\n const key = byId.get(c.targetId)?.key;\n if (key) boundProps(key, c.args, `${path}.args`, bound);\n }\n checkExpressionCycles(bound, issues);\n}\n\n/** Returns every issue rather than throwing on the first, so a host can show the list. */\nexport function validateDocument(doc: unknown, options: ValidateOptions = {}): ValidationResult {\n const issues: ValidationIssue[] = [];\n\n if (!isPlainObject(doc)) {\n return { valid: false, issues: [{ path: \"\", message: \"document must be an object.\" }] };\n }\n checkFormatVersion(doc, issues);\n const { registry } = options;\n const kind = (doc as Partial<ClipDocument>).kind;\n if (kind === \"still\") {\n validateStill(doc as unknown as StillDocument, issues, registry);\n } else if (kind === \"composition\") {\n validateComposition(doc as unknown as CompositionDocument, issues, registry);\n } else if (kind === \"audio\") {\n validateAudio(doc as unknown as AudioDocument, issues, registry);\n } else {\n issues.push({\n path: \"kind\",\n message: `kind must be \"still\", \"composition\" or \"audio\" (got ${JSON.stringify(kind)}).`,\n });\n }\n\n return { valid: issues.length === 0, issues };\n}\n\n/**\n * Each clip is validated by the same rules as a standalone one, with issues prefixed by the track that carries\n * it.\n */\nexport function validateProjectDocument(doc: unknown, options: ValidateOptions = {}): ValidationResult {\n const issues: ValidationIssue[] = [];\n\n if (!isPlainObject(doc)) {\n return { valid: false, issues: [{ path: \"\", message: \"document must be an object.\" }] };\n }\n const project = doc as Record<string, unknown>;\n if (project.kind !== \"project\") {\n issues.push({ path: \"kind\", message: `kind must be \"project\" (got ${JSON.stringify(project.kind)}).` });\n }\n if (typeof project.name !== \"string\" || project.name.length === 0) {\n issues.push({ path: \"name\", message: \"name must be a non-empty string.\" });\n }\n if (project.fps !== undefined && (typeof project.fps !== \"number\" || !(project.fps > 0) || !Number.isFinite(project.fps))) {\n issues.push({ path: \"fps\", message: \"fps must be a positive number when present.\" });\n }\n checkFormatVersion(project, issues);\n for (const [field, message] of Object.entries(RETIRED_PROJECT_FIELDS)) {\n if (project[field] !== undefined) issues.push({ path: field, message });\n }\n\n /**\n * Zero tracks is legitimate: a new project has no clips, and every host of this array treats an empty one as\n * ordinary (`exportProject`/`mixTimelineAudio` no-op, `screenshotProject` raises its own \"nothing to\n * screenshot\").\n */\n if (!Array.isArray(project.tracks)) {\n issues.push({ path: \"tracks\", message: \"tracks must be an array.\" });\n return { valid: false, issues };\n }\n\n const ids = new Set<string>();\n project.tracks.forEach((raw, i) => {\n const path = `tracks[${i}]`;\n if (!isPlainObject(raw)) {\n issues.push({ path, message: \"track must be an object.\" });\n return;\n }\n const track = raw as Record<string, unknown>;\n\n if (typeof track.id !== \"string\" || track.id.length === 0) {\n issues.push({ path: `${path}.id`, message: \"id must be a non-empty string.\" });\n } else if (ids.has(track.id)) {\n issues.push({ path: `${path}.id`, message: `duplicate track id \"${track.id}\".` });\n } else {\n ids.add(track.id);\n }\n if (track.name !== undefined && typeof track.name !== \"string\") {\n issues.push({ path: `${path}.name`, message: \"name must be a string when present.\" });\n }\n if (track.startAt !== undefined && !isTime(track.startAt)) {\n issues.push({ path: `${path}.startAt`, message: \"startAt must be a finite number of seconds >= 0.\" });\n }\n /**\n * Required, not defaulted: a length that falls back to a media file's would silently stretch a three-minute\n * bed into a thirty-second edit.\n */\n if (!isTime(track.duration)) {\n issues.push({\n path: `${path}.duration`,\n message: \"duration is required, and must be a finite number of seconds >= 0.\",\n });\n }\n\n if (track.clip === undefined) {\n issues.push({ path: `${path}.clip`, message: \"clip is required — a track places a clip document inline.\" });\n return;\n }\n for (const issue of clipIssuesOf(track.clip, options)) {\n issues.push({ path: `${path}.clip${issue.path ? `.${issue.path}` : \"\"}`, message: issue.message });\n }\n });\n\n return { valid: issues.length === 0, issues };\n}\n\n/**\n * Keyed by clip object: a host re-validates the whole project after every edit, which replaces only the clip\n * it touched. A clip mutated in place is not seen again (the identity contract `Session.replace` holds).\n */\nconst CLIP_ISSUES = new WeakMap<object, readonly ValidationIssue[]>();\n\nfunction clipIssuesOf(clip: unknown, options: ValidateOptions): readonly ValidationIssue[] {\n if (!isPlainObject(clip) || options.registry) return validateDocument(clip, options).issues;\n let issues = CLIP_ISSUES.get(clip);\n if (!issues) {\n issues = validateDocument(clip).issues;\n CLIP_ISSUES.set(clip, issues);\n }\n return issues;\n}\n\nexport function assertValidProjectDocument(doc: unknown, options?: ValidateOptions): void {\n const { valid, issues } = validateProjectDocument(doc, options);\n if (!valid) {\n const detail = issues.map((i) => ` ${i.path || \"<root>\"}: ${i.message}`).join(\"\\n\");\n throw new Error(`Invalid project document:\\n${detail}`);\n }\n}\n\n/** For a caller with no UI to show issues in. */\nexport function assertValidDocument(doc: unknown, options?: ValidateOptions): ClipDocument {\n const { valid, issues } = validateDocument(doc, options);\n if (!valid) {\n const detail = issues.map((i) => ` ${i.path || \"<root>\"}: ${i.message}`).join(\"\\n\");\n throw new Error(`Invalid clip document:\\n${detail}`);\n }\n return doc as ClipDocument;\n}\n"]}
@@ -1,10 +1,9 @@
1
1
  import type { Registry } from "./registry.js";
2
2
  /**
3
- * What a stored document can name and rely on, as JSON: every node type, the
4
- * props it declares with their defaults (a row is sparse, so a changed default
5
- * changes every document that leaves the prop out), and the commands it
6
- * publishes. Each release snapshots it beside its fixture documents, so a test
7
- * can tell what a change takes away from documents already saved.
3
+ * What a stored document can name and rely on, as JSON: every node type, its props with their defaults (a row
4
+ * is sparse, so a changed default changes every document that leaves the prop out), and its commands. Each
5
+ * release snapshots it beside its fixture documents, so a test can tell what a change takes away from
6
+ * documents already saved.
8
7
  */
9
8
  export interface RegistryVocabulary {
10
9
  nodes: Record<string, {
@@ -18,11 +17,9 @@ export interface RegistryVocabulary {
18
17
  commands: string[];
19
18
  }
20
19
  export declare function registryVocabulary(registry: Registry): RegistryVocabulary;
21
- /** One way `next` takes something away from what documents saved against `prev` relied on, named `type.prop`, `type.command` or `type`. */
22
20
  export interface VocabularyBreak {
23
21
  name: string;
24
22
  what: "node type removed" | "prop removed" | "default changed" | "command removed";
25
23
  }
26
- /** What `next` removed or changed relative to `prev`. Anything it adds breaks nothing saved. */
27
24
  export declare function vocabularyBreaks(prev: RegistryVocabulary, next: RegistryVocabulary): VocabularyBreak[];
28
25
  //# sourceMappingURL=vocabulary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/document/vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IAC/G,qGAAqG;IACrG,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,kBAAkB,CAazE;AAED,2IAA2I;AAC3I,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,mBAAmB,GAAG,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;CACtF;AAED,gGAAgG;AAChG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,GAAG,eAAe,EAAE,CAqBtG"}
1
+ {"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/document/vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IAC/G,qGAAqG;IACrG,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,kBAAkB,CAazE;AAED,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,mBAAmB,GAAG,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;CACtF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,GAAG,eAAe,EAAE,CAqBtG"}
@@ -12,7 +12,6 @@ export function registryVocabulary(registry) {
12
12
  }
13
13
  return { nodes, commands: registry.commandKeys() };
14
14
  }
15
- /** What `next` removed or changed relative to `prev`. Anything it adds breaks nothing saved. */
16
15
  export function vocabularyBreaks(prev, next) {
17
16
  const out = [];
18
17
  for (const command of prev.commands) {
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/document/vocabulary.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,kBAAkB,CAAC,QAAkB;IACjD,MAAM,KAAK,GAAgC,EAAE,CAAC;IAC9C,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;QACpC,MAAM,UAAU,GAAsD,EAAE,CAAC;QACzE,KAAK,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,UA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AAE,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACvE,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,CAAC,KAAK;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;iBACnE,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QACtI,CAAC;QACD,KAAK,MAAM,OAAO,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YACjC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,OAAO,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC3G,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["import type { Registry } from \"./registry\";\n\n/**\n * What a stored document can name and rely on, as JSON: every node type, the\n * props it declares with their defaults (a row is sparse, so a changed default\n * changes every document that leaves the prop out), and the commands it\n * publishes. Each release snapshots it beside its fixture documents, so a test\n * can tell what a change takes away from documents already saved.\n */\nexport interface RegistryVocabulary {\n nodes: Record<string, { properties: Record<string, { kind: string; default?: unknown }>; commands: string[] }>;\n /** The commands that resolve without a node type: `to`, `set`, the paints, the variable commands. */\n commands: string[];\n}\n\nexport function registryVocabulary(registry: Registry): RegistryVocabulary {\n const nodes: RegistryVocabulary[\"nodes\"] = {};\n for (const key of registry.nodeKeys()) {\n const properties: RegistryVocabulary[\"nodes\"][string][\"properties\"] = {};\n for (const [prop, described] of Object.entries(registry.describe(key)?.properties ?? {})) {\n properties[prop] = {\n kind: described.kind,\n ...(described.default !== undefined && { default: JSON.parse(JSON.stringify(described.default)) as unknown }),\n };\n }\n nodes[key] = { properties, commands: registry.commandKeys(key) };\n }\n return { nodes, commands: registry.commandKeys() };\n}\n\n/** One way `next` takes something away from what documents saved against `prev` relied on, named `type.prop`, `type.command` or `type`. */\nexport interface VocabularyBreak {\n name: string;\n what: \"node type removed\" | \"prop removed\" | \"default changed\" | \"command removed\";\n}\n\n/** What `next` removed or changed relative to `prev`. Anything it adds breaks nothing saved. */\nexport function vocabularyBreaks(prev: RegistryVocabulary, next: RegistryVocabulary): VocabularyBreak[] {\n const out: VocabularyBreak[] = [];\n for (const command of prev.commands) {\n if (!next.commands.includes(command)) out.push({ name: command, what: \"command removed\" });\n }\n for (const [type, was] of Object.entries(prev.nodes)) {\n const now = next.nodes[type];\n if (!now) {\n out.push({ name: type, what: \"node type removed\" });\n continue;\n }\n for (const [prop, { default: before }] of Object.entries(was.properties)) {\n const after = now.properties[prop];\n if (!after) out.push({ name: `${type}.${prop}`, what: \"prop removed\" });\n else if (JSON.stringify(before) !== JSON.stringify(after.default)) out.push({ name: `${type}.${prop}`, what: \"default changed\" });\n }\n for (const command of was.commands) {\n if (!now.commands.includes(command)) out.push({ name: `${type}.${command}`, what: \"command removed\" });\n }\n }\n return out;\n}\n"]}
1
+ {"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/document/vocabulary.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,kBAAkB,CAAC,QAAkB;IACjD,MAAM,KAAK,GAAgC,EAAE,CAAC;IAC9C,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;QACpC,MAAM,UAAU,GAAsD,EAAE,CAAC;QACzE,KAAK,MAAM,CAAC,IAA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AAmB,EAAE,CAAC,CAAC;YACpD,SAAS;QACb,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACvE,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,CAAC,KAAK;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;iBACnE,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QACtI,CAAC;QACD,KAAK,MAAM,OAAO,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YACjC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,OAAO,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC3G,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["import type { Registry } from \"./registry\";\n\n/**\n * What a stored document can name and rely on, as JSON: every node type, its props with their defaults (a row\n * is sparse, so a changed default changes every document that leaves the prop out), and its commands. Each\n * release snapshots it beside its fixture documents, so a test can tell what a change takes away from\n * documents already saved.\n */\nexport interface RegistryVocabulary {\n nodes: Record<string, { properties: Record<string, { kind: string; default?: unknown }>; commands: string[] }>;\n /** The commands that resolve without a node type: `to`, `set`, the paints, the variable commands. */\n commands: string[];\n}\n\nexport function registryVocabulary(registry: Registry): RegistryVocabulary {\n const nodes: RegistryVocabulary[\"nodes\"] = {};\n for (const key of registry.nodeKeys()) {\n const properties: RegistryVocabulary[\"nodes\"][string][\"properties\"] = {};\n for (const [prop, described] of Object.entries(registry.describe(key)?.properties ?? {})) {\n properties[prop] = {\n kind: described.kind,\n ...(described.default !== undefined && { default: JSON.parse(JSON.stringify(described.default)) as unknown }),\n };\n }\n nodes[key] = { properties, commands: registry.commandKeys(key) };\n }\n return { nodes, commands: registry.commandKeys() };\n}\n\nexport interface VocabularyBreak {\n name: string;\n what: \"node type removed\" | \"prop removed\" | \"default changed\" | \"command removed\";\n}\n\nexport function vocabularyBreaks(prev: RegistryVocabulary, next: RegistryVocabulary): VocabularyBreak[] {\n const out: VocabularyBreak[] = [];\n for (const command of prev.commands) {\n if (!next.commands.includes(command)) out.push({ name: command, what: \"command removed\" });\n }\n for (const [type, was] of Object.entries(prev.nodes)) {\n const now = next.nodes[type];\n if (!now) {\n out.push({ name: type, what: \"node type removed\" });\n continue;\n }\n for (const [prop, { default: before }] of Object.entries(was.properties)) {\n const after = now.properties[prop];\n if (!after) out.push({ name: `${type}.${prop}`, what: \"prop removed\" });\n else if (JSON.stringify(before) !== JSON.stringify(after.default)) out.push({ name: `${type}.${prop}`, what: \"default changed\" });\n }\n for (const command of was.commands) {\n if (!now.commands.includes(command)) out.push({ name: `${type}.${command}`, what: \"command removed\" });\n }\n }\n return out;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -20,5 +20,4 @@ export * from './util/index.js';
20
20
  export * from './tween/index.js';
21
21
  export * from './props/index.js';
22
22
  export * from './layout/index.js';
23
- export * from './renamed-scene-names.js';
24
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -20,5 +20,4 @@ export * from './util/index.js';
20
20
  export * from './tween/index.js';
21
21
  export * from './props/index.js';
22
22
  export * from './layout/index.js';
23
- export * from './renamed-scene-names.js';
24
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './attributes';\nexport * from './components/trees';\nexport * from './components/builtins/geometry/geometry';\nexport * from './components/builtins/geometry/composite';\nexport * from './components/builtins/layout/layout';\nexport * from './components/builtins/text/text';\nexport * from './components/builtins/providers/providers';\nexport * from './components/builtins/audio/audio';\nexport * from './components/builtins/media/media';\nexport * from './components/builtins/three/three';\nexport * from './components/builtins/three/canvas3d';\nexport * from './project';\nexport * from './document';\nexport * from './render';\nexport * from './render3d';\nexport * from './runtime';\nexport * from './platform';\nexport * from './assets';\nexport * from './util'\nexport * from './tween';\nexport * from './props';\nexport * from './layout';\n\nexport * from './renamed-scene-names';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC","sourcesContent":["export * from './attributes';\nexport * from './components/trees';\nexport * from './components/builtins/geometry/geometry';\nexport * from './components/builtins/geometry/composite';\nexport * from './components/builtins/layout/layout';\nexport * from './components/builtins/text/text';\nexport * from './components/builtins/providers/providers';\nexport * from './components/builtins/audio/audio';\nexport * from './components/builtins/media/media';\nexport * from './components/builtins/three/three';\nexport * from './components/builtins/three/canvas3d';\nexport * from './project';\nexport * from './document';\nexport * from './render';\nexport * from './render3d';\nexport * from './runtime';\nexport * from './platform';\nexport * from './assets';\nexport * from './util'\nexport * from './tween';\nexport * from './props';\nexport * from './layout';\n"]}
@@ -1,16 +1,6 @@
1
1
  import { Size2D } from "../attributes/layout/size.js";
2
2
  import { Vector2 } from "../attributes/layout/vector2.js";
3
- /**
4
- * An axis-aligned box as an origin plus a size — `{ x, y, width, height }` in
5
- * pixels. The general shape for "a rectangle somewhere", used for a node's
6
- * laid-out cell, for the extent of what it draws ({@link Node2D._localBounds}),
7
- * and anywhere else a positioned box is passed around.
8
- *
9
- * What `x`/`y` mean is **not** part of the type: the layout engine's rects are
10
- * canvas (y-down) and relative to the parent, while a node's own content bounds
11
- * are y-up and relative to its centre. Each site documents its own space, the
12
- * same way {@link Vector2} is shared across both conventions.
13
- */
3
+ /** An axis-aligned box as an origin plus a size, in pixels: a node's laid-out cell, the extent of what it draws, any positioned box. What `x`/`y` mean is **not** part of the type: layout rects are canvas (y-down) relative to the parent, a node's content bounds y-up relative to its centre; each site documents its own space, as {@link Vector2} is shared across both. */
14
4
  export type BoxBounds = Size2D & Vector2;
15
5
  /** Axis-aligned bounding box expressed as min/max corners rather than origin + size. */
16
6
  export type Extents = {
@@ -1 +1 @@
1
- {"version":3,"file":"bounds.d.ts","sourceRoot":"","sources":["../../src/layout/bounds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzC,wFAAwF;AACxF,MAAM,MAAM,OAAO,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC"}
1
+ {"version":3,"file":"bounds.d.ts","sourceRoot":"","sources":["../../src/layout/bounds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,kXAAkX;AAClX,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzC,wFAAwF;AACxF,MAAM,MAAM,OAAO,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bounds.js","sourceRoot":"","sources":["../../src/layout/bounds.ts"],"names":[],"mappings":"","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\nimport { Vector2 } from \"@/attributes/layout/vector2\";\n\n/**\n * An axis-aligned box as an origin plus a size — `{ x, y, width, height }` in\n * pixels. The general shape for \"a rectangle somewhere\", used for a node's\n * laid-out cell, for the extent of what it draws ({@link Node2D._localBounds}),\n * and anywhere else a positioned box is passed around.\n *\n * What `x`/`y` mean is **not** part of the type: the layout engine's rects are\n * canvas (y-down) and relative to the parent, while a node's own content bounds\n * are y-up and relative to its centre. Each site documents its own space, the\n * same way {@link Vector2} is shared across both conventions.\n */\nexport type BoxBounds = Size2D & Vector2;\n\n/** Axis-aligned bounding box expressed as min/max corners rather than origin + size. */\nexport type Extents = {\n minX: number;\n minY: number;\n maxX: number;\n maxY: number;\n};"]}
1
+ {"version":3,"file":"bounds.js","sourceRoot":"","sources":["../../src/layout/bounds.ts"],"names":[],"mappings":"","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\nimport { Vector2 } from \"@/attributes/layout/vector2\";\n\n/** An axis-aligned box as an origin plus a size, in pixels: a node's laid-out cell, the extent of what it draws, any positioned box. What `x`/`y` mean is **not** part of the type: layout rects are canvas (y-down) relative to the parent, a node's content bounds y-up relative to its centre; each site documents its own space, as {@link Vector2} is shared across both. */\nexport type BoxBounds = Size2D & Vector2;\n\n/** Axis-aligned bounding box expressed as min/max corners rather than origin + size. */\nexport type Extents = {\n minX: number;\n minY: number;\n maxX: number;\n maxY: number;\n};"]}
@@ -4,30 +4,16 @@ import type { MeasureContext2D } from "../render/measure-context.js";
4
4
  import type { BoxBounds } from "./bounds.js";
5
5
  import type { FlowLine, FlowMeasure, FlowSpace, GapSize, LayoutItem } from "./types.js";
6
6
  type RunMeasure = Pick<FlowMeasure, "sizes" | "lines" | "gapScales" | "hug">;
7
- /**
8
- * Measures an unwrapped run, as one line: fixed items first, then `fill` items
9
- * share what is left of the main axis by `flex`.
10
- */
7
+ /** Measures an unwrapped run as one line: fixed items first, then `fill` items share the rest of the main axis by `flex`. */
11
8
  export declare function measureRun(items: readonly LayoutItem[], horizontal: boolean, gap: GapSize, space: FlowSpace, measurer: MeasureContext2D | undefined): RunMeasure;
12
9
  /**
13
- * Measures a wrapped run: every item at its natural size, broken greedily into
14
- * lines that fit the main axis. Two rules differ from {@link measureRun}, both
15
- * Figma's:
16
- *
17
- * - **A hugging main axis does not wrap** — there is nothing to break against.
18
- * - **`fill` on the main axis is not divided.** Which line an item lands on is
19
- * what this pass decides, so it measures to the whole main axis and takes a
20
- * line to itself. (On a hugging main axis there is no line to break and no
21
- * extent to fill, so it measures as {@link measureRun} measures it.)
22
- * Cross-axis `fill` stretches to its own line rather than the whole stack, the
23
- * only reading that survives a reflow.
10
+ * Measures a wrapped run: every item at natural size, broken greedily into lines that fit the main axis. Two rules
11
+ * differ from {@link measureRun}, both Figma's: **a hugging main axis does not wrap**, and **`fill` on the main axis is
12
+ * not divided** (which line an item lands on is what this pass decides, so it measures to the whole main axis and takes
13
+ * a line to itself). Cross-axis `fill` stretches to its own line, the only reading that survives a reflow.
24
14
  */
25
15
  export declare function measureWrap(items: readonly LayoutItem[], horizontal: boolean, gap: GapSize, crossGap: number, space: FlowSpace, measurer: MeasureContext2D | undefined): RunMeasure;
26
- /**
27
- * Places a run's lines in the content box, centre-relative and y-up. Positions
28
- * are worked out in reading order — from the main axis's start edge (left, or
29
- * top) and the cross axis's (top, or left) — and converted once, at the end.
30
- */
16
+ /** Places a run's lines in the content box, centre-relative and y-up. Positions are worked out in reading order (from the start edges) and converted once at the end. */
31
17
  export declare function placeRun(sizes: readonly Size2D[], lines: readonly FlowLine[], gapScales: readonly number[], horizontal: boolean, gap: GapSize, crossGap: number, align: Vector2, inner: Size2D): BoxBounds[];
32
18
  export {};
33
19
  //# sourceMappingURL=flex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flex.d.ts","sourceRoot":"","sources":["../../src/layout/flex.ts"],"names":[],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