@motionscript/core 0.1.0-alpha.6 → 0.1.0-alpha.8

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 (804) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/NOTICE +15 -14
  3. package/README.md +5 -7
  4. package/dist/assets/errors.js +4 -5
  5. package/dist/assets/errors.js.map +1 -1
  6. package/dist/assets/manager.d.ts.map +1 -1
  7. package/dist/assets/manager.js +7 -5
  8. package/dist/assets/manager.js.map +1 -1
  9. package/dist/assets/scope.d.ts +1 -1
  10. package/dist/assets/scope.d.ts.map +1 -1
  11. package/dist/assets/scope.js +1 -1
  12. package/dist/assets/scope.js.map +1 -1
  13. package/dist/attributes/audio/effects/chain.d.ts +73 -0
  14. package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
  15. package/dist/attributes/audio/effects/chain.js +67 -0
  16. package/dist/attributes/audio/effects/chain.js.map +1 -0
  17. package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
  18. package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
  19. package/dist/attributes/audio/effects/implementations/echo.js +11 -0
  20. package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
  21. package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
  22. package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
  23. package/dist/attributes/audio/effects/implementations/gain.js +6 -0
  24. package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
  25. package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
  26. package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
  27. package/dist/attributes/audio/effects/implementations/highpass.js +10 -0
  28. package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
  29. package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
  30. package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
  31. package/dist/attributes/audio/effects/implementations/lowpass.js +10 -0
  32. package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
  33. package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
  34. package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
  35. package/dist/attributes/audio/effects/implementations/tremolo.js +10 -0
  36. package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
  37. package/dist/attributes/audio/effects/index.d.ts +12 -0
  38. package/dist/attributes/audio/effects/index.d.ts.map +1 -0
  39. package/dist/attributes/audio/effects/index.js +4 -0
  40. package/dist/attributes/audio/effects/index.js.map +1 -0
  41. package/dist/attributes/audio/effects/registry.d.ts +36 -0
  42. package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
  43. package/dist/attributes/audio/effects/registry.js +80 -0
  44. package/dist/attributes/audio/effects/registry.js.map +1 -0
  45. package/dist/attributes/audio/effects/union.d.ts +14 -0
  46. package/dist/attributes/audio/effects/union.d.ts.map +1 -0
  47. package/dist/attributes/audio/effects/union.js +24 -0
  48. package/dist/attributes/audio/effects/union.js.map +1 -0
  49. package/dist/attributes/audio/ramp.d.ts +103 -0
  50. package/dist/attributes/audio/ramp.d.ts.map +1 -0
  51. package/dist/attributes/audio/ramp.js +246 -0
  52. package/dist/attributes/audio/ramp.js.map +1 -0
  53. package/dist/attributes/audio/request.d.ts +24 -13
  54. package/dist/attributes/audio/request.d.ts.map +1 -1
  55. package/dist/attributes/audio/request.js +4 -3
  56. package/dist/attributes/audio/request.js.map +1 -1
  57. package/dist/attributes/audio/schedule.d.ts +24 -31
  58. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  59. package/dist/attributes/audio/schedule.js +42 -28
  60. package/dist/attributes/audio/schedule.js.map +1 -1
  61. package/dist/attributes/audio/sound.d.ts +15 -12
  62. package/dist/attributes/audio/sound.d.ts.map +1 -1
  63. package/dist/attributes/audio/sound.js +8 -10
  64. package/dist/attributes/audio/sound.js.map +1 -1
  65. package/dist/attributes/audio/transition.d.ts +33 -0
  66. package/dist/attributes/audio/transition.d.ts.map +1 -0
  67. package/dist/attributes/audio/transition.js +48 -0
  68. package/dist/attributes/audio/transition.js.map +1 -0
  69. package/dist/attributes/index.d.ts +7 -8
  70. package/dist/attributes/index.d.ts.map +1 -1
  71. package/dist/attributes/index.js +6 -9
  72. package/dist/attributes/index.js.map +1 -1
  73. package/dist/attributes/layout/insets.d.ts +1 -1
  74. package/dist/attributes/layout/insets.js.map +1 -1
  75. package/dist/attributes/layout/matrix2d.d.ts +2 -2
  76. package/dist/attributes/layout/matrix2d.js.map +1 -1
  77. package/dist/attributes/layout/size.d.ts +1 -1
  78. package/dist/attributes/layout/size.js +1 -1
  79. package/dist/attributes/layout/size.js.map +1 -1
  80. package/dist/attributes/layout/space3d.js +1 -1
  81. package/dist/attributes/layout/space3d.js.map +1 -1
  82. package/dist/attributes/properties/decorator.d.ts +44 -11
  83. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  84. package/dist/attributes/properties/decorator.js +37 -9
  85. package/dist/attributes/properties/decorator.js.map +1 -1
  86. package/dist/attributes/properties/inputs.d.ts +1 -1
  87. package/dist/attributes/properties/inputs.js +1 -1
  88. package/dist/attributes/properties/inputs.js.map +1 -1
  89. package/dist/attributes/properties/typed.d.ts +24 -145
  90. package/dist/attributes/properties/typed.d.ts.map +1 -1
  91. package/dist/attributes/properties/typed.js +16 -112
  92. package/dist/attributes/properties/typed.js.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
  94. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  95. package/dist/attributes/shape/corners/corner-radius.js +2 -3
  96. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  97. package/dist/attributes/shape/effects/chain.d.ts +96 -409
  98. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  99. package/dist/attributes/shape/effects/chain.js +93 -283
  100. package/dist/attributes/shape/effects/chain.js.map +1 -1
  101. package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
  102. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
  104. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  105. package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
  106. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
  108. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
  110. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
  112. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
  114. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
  116. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
  118. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
  120. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/blur.js +13 -5
  122. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
  124. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
  126. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
  128. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
  130. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
  132. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
  134. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
  136. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  137. package/dist/attributes/shape/effects/implementations/curves.js +26 -23
  138. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  139. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
  140. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  141. package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
  142. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  143. package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
  144. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  145. package/dist/attributes/shape/effects/implementations/dither.js +26 -20
  146. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  147. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +47 -15
  148. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  149. package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
  150. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  151. package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
  152. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  153. package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
  154. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  155. package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
  156. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  157. package/dist/attributes/shape/effects/implementations/edges.js +17 -14
  158. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  159. package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
  160. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  161. package/dist/attributes/shape/effects/implementations/glass.js +28 -22
  162. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  163. package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
  164. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  165. package/dist/attributes/shape/effects/implementations/glow.js +74 -72
  166. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  167. package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
  168. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  169. package/dist/attributes/shape/effects/implementations/grain.js +21 -18
  170. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  171. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
  172. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  173. package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
  174. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  175. package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
  176. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  177. package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
  178. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  179. package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
  180. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  181. package/dist/attributes/shape/effects/implementations/invert.js +15 -10
  182. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  183. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
  184. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  185. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
  186. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  187. package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
  188. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  189. package/dist/attributes/shape/effects/implementations/lut.js +20 -16
  190. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  191. package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
  192. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  193. package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
  194. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  195. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
  196. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  197. package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
  198. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  199. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
  200. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  201. package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
  202. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  203. package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
  204. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  205. package/dist/attributes/shape/effects/implementations/outline.js +18 -17
  206. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  207. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
  208. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  209. package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
  210. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  211. package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
  212. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  213. package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
  214. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  215. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
  216. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  217. package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
  218. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  219. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
  220. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  221. package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
  222. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  223. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
  224. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  225. package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
  226. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  227. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
  228. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  229. package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
  230. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  231. package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
  232. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  233. package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
  234. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  235. package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
  236. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  237. package/dist/attributes/shape/effects/implementations/shader.js +42 -26
  238. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  239. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
  240. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  241. package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
  242. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  243. package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
  244. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  245. package/dist/attributes/shape/effects/implementations/streak.js +19 -16
  246. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  247. package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
  248. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  249. package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
  250. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  251. package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
  252. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  253. package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
  254. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  255. package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
  256. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  257. package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
  258. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  259. package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
  260. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  261. package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
  262. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  263. package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
  264. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  265. package/dist/attributes/shape/effects/implementations/wave.js +26 -23
  266. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  267. package/dist/attributes/shape/effects/index.d.ts +4 -2
  268. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  269. package/dist/attributes/shape/effects/index.js +1 -1
  270. package/dist/attributes/shape/effects/index.js.map +1 -1
  271. package/dist/attributes/shape/effects/registry.d.ts +11 -0
  272. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  273. package/dist/attributes/shape/effects/registry.js +113 -102
  274. package/dist/attributes/shape/effects/registry.js.map +1 -1
  275. package/dist/attributes/shape/effects/spec.d.ts +229 -0
  276. package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
  277. package/dist/attributes/shape/effects/spec.js +178 -0
  278. package/dist/attributes/shape/effects/spec.js.map +1 -0
  279. package/dist/attributes/shape/fill/chain.d.ts +7 -9
  280. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  281. package/dist/attributes/shape/fill/chain.js +9 -11
  282. package/dist/attributes/shape/fill/chain.js.map +1 -1
  283. package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
  284. package/dist/attributes/shape/fill/color/parser.js +1 -1
  285. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  286. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
  287. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  288. package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
  289. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  290. package/dist/attributes/shape/fill/implementations/shader.js +20 -14
  291. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  292. package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
  293. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  294. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  295. package/dist/attributes/shape/fill/index.d.ts +1 -1
  296. package/dist/attributes/shape/fill/index.d.ts.map +1 -1
  297. package/dist/attributes/shape/fill/index.js.map +1 -1
  298. package/dist/attributes/shape/fill/lerp.d.ts +1 -1
  299. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  300. package/dist/attributes/shape/fill/registry.d.ts +1 -2
  301. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  302. package/dist/attributes/shape/fill/registry.js +1 -2
  303. package/dist/attributes/shape/fill/registry.js.map +1 -1
  304. package/dist/attributes/shape/filters/chain.d.ts +3 -7
  305. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  306. package/dist/attributes/shape/filters/chain.js +2 -6
  307. package/dist/attributes/shape/filters/chain.js.map +1 -1
  308. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
  309. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  310. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  311. package/dist/attributes/shape/filters/registry.d.ts +1 -1
  312. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  313. package/dist/attributes/shape/filters/registry.js +3 -3
  314. package/dist/attributes/shape/filters/registry.js.map +1 -1
  315. package/dist/attributes/shape/filters/union.d.ts +6 -6
  316. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  317. package/dist/attributes/shape/filters/union.js.map +1 -1
  318. package/dist/attributes/shape/path/ops.d.ts +1 -2
  319. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  320. package/dist/attributes/shape/path/ops.js.map +1 -1
  321. package/dist/attributes/shape/shaders/index.d.ts +2 -0
  322. package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
  323. package/dist/attributes/shape/shaders/index.js +2 -0
  324. package/dist/attributes/shape/shaders/index.js.map +1 -1
  325. package/dist/attributes/shape/shaders/language.d.ts +26 -0
  326. package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
  327. package/dist/attributes/shape/shaders/language.js +20 -0
  328. package/dist/attributes/shape/shaders/language.js.map +1 -0
  329. package/dist/attributes/shape/shaders/pack.d.ts +25 -11
  330. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  331. package/dist/attributes/shape/shaders/pack.js +9 -4
  332. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  333. package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
  334. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  335. package/dist/attributes/shape/shaders/resolve.js +3 -6
  336. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  337. package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
  338. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
  339. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  340. package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
  341. package/dist/attributes/shared/operators.d.ts +2 -2
  342. package/dist/attributes/shared/operators.js.map +1 -1
  343. package/dist/attributes/text/types.d.ts +2 -3
  344. package/dist/attributes/text/types.d.ts.map +1 -1
  345. package/dist/attributes/text/types.js.map +1 -1
  346. package/dist/browser/chunks/chunk-AOT33LMS.js +13 -0
  347. package/dist/browser/chunks/chunk-AOT33LMS.js.map +7 -0
  348. package/dist/browser/chunks/chunk-GKM6UZJR.js +6 -0
  349. package/dist/browser/chunks/chunk-GKM6UZJR.js.map +7 -0
  350. package/dist/browser/chunks/chunk-LKUYVFU3.js +2 -0
  351. package/dist/browser/chunks/{chunk-DHB4COFY.js.map → chunk-LKUYVFU3.js.map} +4 -4
  352. package/dist/browser/chunks/chunk-ZRPZPWZU.js +3 -0
  353. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +7 -0
  354. package/dist/browser/component.js +1 -1
  355. package/dist/browser/component.js.map +4 -4
  356. package/dist/browser/experimental.js +1 -1
  357. package/dist/browser/experimental.js.map +4 -4
  358. package/dist/browser/index.js +1 -1
  359. package/dist/browser/index.js.map +4 -4
  360. package/dist/browser/manifest.json +2 -4
  361. package/dist/browser/sdk.js +1 -1
  362. package/dist/component.d.ts +10 -18
  363. package/dist/component.d.ts.map +1 -1
  364. package/dist/component.js +10 -17
  365. package/dist/component.js.map +1 -1
  366. package/dist/components/builtins/audio/audio.d.ts +62 -0
  367. package/dist/components/builtins/audio/audio.d.ts.map +1 -0
  368. package/dist/components/builtins/audio/audio.js +38 -0
  369. package/dist/components/builtins/audio/audio.js.map +1 -0
  370. package/dist/components/builtins/geometry/composite.d.ts +93 -0
  371. package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
  372. package/dist/components/builtins/geometry/composite.js +25 -0
  373. package/dist/components/builtins/geometry/composite.js.map +1 -0
  374. package/dist/components/builtins/geometry/geometry.d.ts +921 -0
  375. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
  376. package/dist/components/builtins/geometry/geometry.js +107 -0
  377. package/dist/components/builtins/geometry/geometry.js.map +1 -0
  378. package/dist/components/builtins/geometry/shape-outline.d.ts +93 -0
  379. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
  380. package/dist/components/builtins/geometry/shape-outline.js +470 -0
  381. package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
  382. package/dist/components/builtins/layout/layout.d.ts +186 -0
  383. package/dist/components/builtins/layout/layout.d.ts.map +1 -0
  384. package/dist/components/builtins/layout/layout.js +84 -0
  385. package/dist/components/builtins/layout/layout.js.map +1 -0
  386. package/dist/components/builtins/media/media.d.ts +240 -0
  387. package/dist/components/builtins/media/media.d.ts.map +1 -0
  388. package/dist/components/builtins/media/media.js +143 -0
  389. package/dist/components/builtins/media/media.js.map +1 -0
  390. package/dist/components/builtins/providers/providers.d.ts +47 -0
  391. package/dist/components/builtins/providers/providers.d.ts.map +1 -0
  392. package/dist/components/builtins/providers/providers.js +30 -0
  393. package/dist/components/builtins/providers/providers.js.map +1 -0
  394. package/dist/components/builtins/text/number-format.d.ts +66 -0
  395. package/dist/components/builtins/text/number-format.d.ts.map +1 -0
  396. package/dist/components/builtins/text/number-format.js +227 -0
  397. package/dist/components/builtins/text/number-format.js.map +1 -0
  398. package/dist/components/builtins/text/number-pattern.d.ts +51 -0
  399. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
  400. package/dist/components/builtins/text/number-pattern.js +77 -0
  401. package/dist/components/builtins/text/number-pattern.js.map +1 -0
  402. package/dist/components/builtins/text/text-defaults.d.ts +32 -0
  403. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
  404. package/dist/components/builtins/text/text-defaults.js +37 -0
  405. package/dist/components/builtins/text/text-defaults.js.map +1 -0
  406. package/dist/components/builtins/text/text-layout.d.ts +82 -0
  407. package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
  408. package/dist/components/builtins/text/text-layout.js +331 -0
  409. package/dist/components/builtins/text/text-layout.js.map +1 -0
  410. package/dist/components/builtins/text/text.d.ts +409 -0
  411. package/dist/components/builtins/text/text.d.ts.map +1 -0
  412. package/dist/components/builtins/text/text.js +116 -0
  413. package/dist/components/builtins/text/text.js.map +1 -0
  414. package/dist/components/builtins/three/canvas3d.d.ts +245 -0
  415. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
  416. package/dist/components/builtins/three/canvas3d.js +21 -0
  417. package/dist/components/builtins/three/canvas3d.js.map +1 -0
  418. package/dist/components/builtins/three/grid-geometry3d.d.ts +62 -0
  419. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
  420. package/dist/components/builtins/three/grid-geometry3d.js +114 -0
  421. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
  422. package/dist/components/builtins/three/three.d.ts +1889 -0
  423. package/dist/components/builtins/three/three.d.ts.map +1 -0
  424. package/dist/components/builtins/three/three.js +305 -0
  425. package/dist/components/builtins/three/three.js.map +1 -0
  426. package/dist/components/factory/api.d.ts +543 -0
  427. package/dist/components/factory/api.d.ts.map +1 -0
  428. package/dist/components/factory/api.js +4 -0
  429. package/dist/components/factory/api.js.map +1 -0
  430. package/dist/components/factory/clip-of.d.ts +5 -0
  431. package/dist/components/factory/clip-of.d.ts.map +1 -0
  432. package/dist/components/factory/clip-of.js +33 -0
  433. package/dist/components/factory/clip-of.js.map +1 -0
  434. package/dist/components/factory/commands-for.d.ts +19 -0
  435. package/dist/components/factory/commands-for.d.ts.map +1 -0
  436. package/dist/components/factory/commands-for.js +5 -0
  437. package/dist/components/factory/commands-for.js.map +1 -0
  438. package/dist/components/factory/component-audio.d.ts +9 -0
  439. package/dist/components/factory/component-audio.d.ts.map +1 -0
  440. package/dist/components/factory/component-audio.js +18 -0
  441. package/dist/components/factory/component-audio.js.map +1 -0
  442. package/dist/components/factory/component2d.d.ts +8 -0
  443. package/dist/components/factory/component2d.d.ts.map +1 -0
  444. package/dist/components/factory/component2d.js +240 -0
  445. package/dist/components/factory/component2d.js.map +1 -0
  446. package/dist/components/factory/component3d.d.ts +9 -0
  447. package/dist/components/factory/component3d.d.ts.map +1 -0
  448. package/dist/components/factory/component3d.js +107 -0
  449. package/dist/components/factory/component3d.js.map +1 -0
  450. package/dist/components/factory/factory.d.ts +66 -0
  451. package/dist/components/factory/factory.d.ts.map +1 -0
  452. package/dist/components/factory/factory.js +347 -0
  453. package/dist/components/factory/factory.js.map +1 -0
  454. package/dist/components/factory/timeline.d.ts +22 -0
  455. package/dist/components/factory/timeline.d.ts.map +1 -0
  456. package/dist/components/factory/timeline.js +128 -0
  457. package/dist/components/factory/timeline.js.map +1 -0
  458. package/dist/components/factory/type-def.d.ts +26 -0
  459. package/dist/components/factory/type-def.d.ts.map +1 -0
  460. package/dist/components/factory/type-def.js +16 -0
  461. package/dist/components/factory/type-def.js.map +1 -0
  462. package/dist/components/factory/types.d.ts +91 -0
  463. package/dist/components/factory/types.d.ts.map +1 -0
  464. package/dist/components/factory/types.js +88 -0
  465. package/dist/components/factory/types.js.map +1 -0
  466. package/dist/components/factory/views.d.ts +121 -0
  467. package/dist/components/factory/views.d.ts.map +1 -0
  468. package/dist/components/factory/views.js +413 -0
  469. package/dist/components/factory/views.js.map +1 -0
  470. package/dist/components/modules/aim.d.ts +30 -0
  471. package/dist/components/modules/aim.d.ts.map +1 -0
  472. package/dist/components/modules/aim.js +39 -0
  473. package/dist/components/modules/aim.js.map +1 -0
  474. package/dist/components/modules/corners.d.ts +13 -0
  475. package/dist/components/modules/corners.d.ts.map +1 -0
  476. package/dist/components/modules/corners.js +12 -0
  477. package/dist/components/modules/corners.js.map +1 -0
  478. package/dist/components/modules/flow.d.ts +26 -0
  479. package/dist/components/modules/flow.d.ts.map +1 -0
  480. package/dist/components/modules/flow.js +57 -0
  481. package/dist/components/modules/flow.js.map +1 -0
  482. package/dist/components/modules/material.d.ts +40 -0
  483. package/dist/components/modules/material.d.ts.map +1 -0
  484. package/dist/components/modules/material.js +75 -0
  485. package/dist/components/modules/material.js.map +1 -0
  486. package/dist/components/modules/paint.d.ts +71 -0
  487. package/dist/components/modules/paint.d.ts.map +1 -0
  488. package/dist/components/modules/paint.js +106 -0
  489. package/dist/components/modules/paint.js.map +1 -0
  490. package/dist/components/modules/shapes.d.ts +31 -0
  491. package/dist/components/modules/shapes.d.ts.map +1 -0
  492. package/dist/components/modules/shapes.js +43 -0
  493. package/dist/components/modules/shapes.js.map +1 -0
  494. package/dist/components/modules/text-layout.d.ts +26 -0
  495. package/dist/components/modules/text-layout.d.ts.map +1 -0
  496. package/dist/components/modules/text-layout.js +57 -0
  497. package/dist/components/modules/text-layout.js.map +1 -0
  498. package/dist/components/modules/text-style.d.ts +48 -0
  499. package/dist/components/modules/text-style.d.ts.map +1 -0
  500. package/dist/components/modules/text-style.js +63 -0
  501. package/dist/components/modules/text-style.js.map +1 -0
  502. package/dist/components/modules/three-entries.d.ts +23 -0
  503. package/dist/components/modules/three-entries.d.ts.map +1 -0
  504. package/dist/components/modules/three-entries.js +41 -0
  505. package/dist/components/modules/three-entries.js.map +1 -0
  506. package/dist/components/modules/view3d.d.ts +59 -0
  507. package/dist/components/modules/view3d.d.ts.map +1 -0
  508. package/dist/components/modules/view3d.js +171 -0
  509. package/dist/components/modules/view3d.js.map +1 -0
  510. package/dist/components/trees/2d/group-bounds.d.ts +56 -0
  511. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
  512. package/dist/components/trees/2d/group-bounds.js +87 -0
  513. package/dist/components/trees/2d/group-bounds.js.map +1 -0
  514. package/dist/components/trees/2d/node-lifecycle.d.ts +46 -0
  515. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
  516. package/dist/components/trees/2d/node-lifecycle.js +264 -0
  517. package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
  518. package/dist/components/trees/2d/node-motion.d.ts +56 -0
  519. package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
  520. package/dist/components/trees/2d/node-motion.js +86 -0
  521. package/dist/components/trees/2d/node-motion.js.map +1 -0
  522. package/dist/components/trees/2d/node-render.d.ts +36 -0
  523. package/dist/components/trees/2d/node-render.d.ts.map +1 -0
  524. package/dist/components/trees/2d/node-render.js +67 -0
  525. package/dist/components/trees/2d/node-render.js.map +1 -0
  526. package/dist/components/trees/2d/node-space.d.ts +63 -0
  527. package/dist/components/trees/2d/node-space.d.ts.map +1 -0
  528. package/dist/components/trees/2d/node-space.js +131 -0
  529. package/dist/components/trees/2d/node-space.js.map +1 -0
  530. package/dist/components/trees/2d/node-transform.d.ts +55 -0
  531. package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
  532. package/dist/components/trees/2d/node-transform.js +73 -0
  533. package/dist/components/trees/2d/node-transform.js.map +1 -0
  534. package/dist/components/trees/2d/node2d.d.ts +1020 -0
  535. package/dist/components/trees/2d/node2d.d.ts.map +1 -0
  536. package/dist/components/trees/2d/node2d.js +1481 -0
  537. package/dist/components/trees/2d/node2d.js.map +1 -0
  538. package/dist/components/trees/audio/index.d.ts +2 -0
  539. package/dist/components/trees/audio/index.d.ts.map +1 -0
  540. package/dist/components/trees/audio/index.js +2 -0
  541. package/dist/components/trees/audio/index.js.map +1 -0
  542. package/dist/components/trees/audio/node-audio.d.ts +116 -0
  543. package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
  544. package/dist/components/trees/audio/node-audio.js +171 -0
  545. package/dist/components/trees/audio/node-audio.js.map +1 -0
  546. package/dist/components/trees/index.d.ts +10 -0
  547. package/dist/components/trees/index.d.ts.map +1 -0
  548. package/dist/components/trees/index.js +14 -0
  549. package/dist/components/trees/index.js.map +1 -0
  550. package/dist/components/trees/node/node-editor-state.d.ts +53 -0
  551. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
  552. package/dist/components/trees/node/node-editor-state.js +23 -0
  553. package/dist/components/trees/node/node-editor-state.js.map +1 -0
  554. package/dist/components/trees/node/node-reactive.d.ts +89 -0
  555. package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
  556. package/dist/components/trees/node/node-reactive.js +135 -0
  557. package/dist/components/trees/node/node-reactive.js.map +1 -0
  558. package/dist/components/trees/node/node-time.d.ts +39 -0
  559. package/dist/components/trees/node/node-time.d.ts.map +1 -0
  560. package/dist/components/trees/node/node-time.js +14 -0
  561. package/dist/components/trees/node/node-time.js.map +1 -0
  562. package/dist/components/trees/node/node-walk.d.ts +46 -0
  563. package/dist/components/trees/node/node-walk.d.ts.map +1 -0
  564. package/dist/components/trees/node/node-walk.js +74 -0
  565. package/dist/components/trees/node/node-walk.js.map +1 -0
  566. package/dist/components/trees/node/node.d.ts +401 -0
  567. package/dist/components/trees/node/node.d.ts.map +1 -0
  568. package/dist/components/trees/node/node.js +680 -0
  569. package/dist/components/trees/node/node.js.map +1 -0
  570. package/dist/components/trees/root/canvas2d-node.d.ts +163 -0
  571. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
  572. package/dist/components/trees/root/canvas2d-node.js +216 -0
  573. package/dist/components/trees/root/canvas2d-node.js.map +1 -0
  574. package/dist/components/trees/three/node3d.d.ts +222 -0
  575. package/dist/components/trees/three/node3d.d.ts.map +1 -0
  576. package/dist/components/trees/three/node3d.js +289 -0
  577. package/dist/components/trees/three/node3d.js.map +1 -0
  578. package/dist/document/builtins.js +13 -13
  579. package/dist/document/builtins.js.map +1 -1
  580. package/dist/document/command-traits.d.ts +14 -4
  581. package/dist/document/command-traits.d.ts.map +1 -1
  582. package/dist/document/command-traits.js +35 -7
  583. package/dist/document/command-traits.js.map +1 -1
  584. package/dist/document/deny-globals.d.ts +2 -2
  585. package/dist/document/deny-globals.js +2 -2
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/expression/index.d.ts +1 -1
  588. package/dist/document/expression/index.js +1 -1
  589. package/dist/document/expression/index.js.map +1 -1
  590. package/dist/document/expression/ops.js +1 -1
  591. package/dist/document/expression/ops.js.map +1 -1
  592. package/dist/document/index.d.ts +9 -2
  593. package/dist/document/index.d.ts.map +1 -1
  594. package/dist/document/index.js +5 -2
  595. package/dist/document/index.js.map +1 -1
  596. package/dist/document/migrate.d.ts +70 -0
  597. package/dist/document/migrate.d.ts.map +1 -0
  598. package/dist/document/migrate.js +202 -0
  599. package/dist/document/migrate.js.map +1 -0
  600. package/dist/document/missing-node.d.ts +27 -0
  601. package/dist/document/missing-node.d.ts.map +1 -0
  602. package/dist/document/missing-node.js +48 -0
  603. package/dist/document/missing-node.js.map +1 -0
  604. package/dist/document/node-decorator.d.ts +14 -10
  605. package/dist/document/node-decorator.d.ts.map +1 -1
  606. package/dist/document/node-decorator.js +14 -10
  607. package/dist/document/node-decorator.js.map +1 -1
  608. package/dist/document/node-descriptor.d.ts +7 -3
  609. package/dist/document/node-descriptor.d.ts.map +1 -1
  610. package/dist/document/node-descriptor.js.map +1 -1
  611. package/dist/document/placement.d.ts +2 -1
  612. package/dist/document/placement.d.ts.map +1 -1
  613. package/dist/document/placement.js.map +1 -1
  614. package/dist/document/project.d.ts +2 -0
  615. package/dist/document/project.d.ts.map +1 -1
  616. package/dist/document/project.js +1 -0
  617. package/dist/document/project.js.map +1 -1
  618. package/dist/document/prop-evolution.d.ts +51 -0
  619. package/dist/document/prop-evolution.d.ts.map +1 -0
  620. package/dist/document/prop-evolution.js +83 -0
  621. package/dist/document/prop-evolution.js.map +1 -0
  622. package/dist/document/registry.d.ts +39 -25
  623. package/dist/document/registry.d.ts.map +1 -1
  624. package/dist/document/registry.js +41 -21
  625. package/dist/document/registry.js.map +1 -1
  626. package/dist/document/settled-index.d.ts +2 -0
  627. package/dist/document/settled-index.d.ts.map +1 -1
  628. package/dist/document/settled-index.js +5 -5
  629. package/dist/document/settled-index.js.map +1 -1
  630. package/dist/document/timeline-patch.d.ts +4 -0
  631. package/dist/document/timeline-patch.d.ts.map +1 -1
  632. package/dist/document/timeline-patch.js +28 -3
  633. package/dist/document/timeline-patch.js.map +1 -1
  634. package/dist/document/timeline.d.ts +48 -4
  635. package/dist/document/timeline.d.ts.map +1 -1
  636. package/dist/document/timeline.js +174 -44
  637. package/dist/document/timeline.js.map +1 -1
  638. package/dist/document/types.d.ts +18 -32
  639. package/dist/document/types.d.ts.map +1 -1
  640. package/dist/document/types.js.map +1 -1
  641. package/dist/document/validate.d.ts +18 -6
  642. package/dist/document/validate.d.ts.map +1 -1
  643. package/dist/document/validate.js +158 -21
  644. package/dist/document/validate.js.map +1 -1
  645. package/dist/document/vocabulary.d.ts +28 -0
  646. package/dist/document/vocabulary.d.ts.map +1 -0
  647. package/dist/document/vocabulary.js +42 -0
  648. package/dist/document/vocabulary.js.map +1 -0
  649. package/dist/experimental.d.ts +79 -19
  650. package/dist/experimental.d.ts.map +1 -1
  651. package/dist/experimental.js +31 -17
  652. package/dist/experimental.js.map +1 -1
  653. package/dist/index.d.ts +10 -11
  654. package/dist/index.d.ts.map +1 -1
  655. package/dist/index.js +10 -11
  656. package/dist/index.js.map +1 -1
  657. package/dist/layout/types.d.ts +1 -1
  658. package/dist/layout/types.js.map +1 -1
  659. package/dist/platform/exporter.d.ts +13 -0
  660. package/dist/platform/exporter.d.ts.map +1 -1
  661. package/dist/platform/exporter.js.map +1 -1
  662. package/dist/props/host.d.ts +1 -1
  663. package/dist/props/host.js.map +1 -1
  664. package/dist/props/slot.d.ts +1 -1
  665. package/dist/props/slot.js +1 -1
  666. package/dist/props/slot.js.map +1 -1
  667. package/dist/renamed-scene-names.d.ts +1 -1
  668. package/dist/renamed-scene-names.d.ts.map +1 -1
  669. package/dist/renamed-scene-names.js +1 -1
  670. package/dist/renamed-scene-names.js.map +1 -1
  671. package/dist/render/canvas-render-context2d.d.ts +9 -0
  672. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  673. package/dist/render/canvas-render-context2d.js +10 -0
  674. package/dist/render/canvas-render-context2d.js.map +1 -1
  675. package/dist/render/clip-contains.js +1 -1
  676. package/dist/render/clip-contains.js.map +1 -1
  677. package/dist/render/clip.d.ts +1 -1
  678. package/dist/render/clip.js +1 -1
  679. package/dist/render/clip.js.map +1 -1
  680. package/dist/render/descriptors/rect.js.map +1 -1
  681. package/dist/render/descriptors/text.d.ts +13 -7
  682. package/dist/render/descriptors/text.d.ts.map +1 -1
  683. package/dist/render/descriptors/text.js +9 -3
  684. package/dist/render/descriptors/text.js.map +1 -1
  685. package/dist/render/index.d.ts +2 -0
  686. package/dist/render/index.d.ts.map +1 -1
  687. package/dist/render/index.js +1 -0
  688. package/dist/render/index.js.map +1 -1
  689. package/dist/render/render-context2d.d.ts +3 -3
  690. package/dist/render/render-context2d.js.map +1 -1
  691. package/dist/render/render-issue.d.ts +39 -0
  692. package/dist/render/render-issue.d.ts.map +1 -0
  693. package/dist/render/render-issue.js +29 -0
  694. package/dist/render/render-issue.js.map +1 -0
  695. package/dist/render/surface.d.ts +2 -2
  696. package/dist/render/surface.js.map +1 -1
  697. package/dist/render3d/builders.d.ts +1 -1
  698. package/dist/render3d/builders.js +1 -1
  699. package/dist/render3d/builders.js.map +1 -1
  700. package/dist/render3d/graphics3d.d.ts +13 -19
  701. package/dist/render3d/graphics3d.d.ts.map +1 -1
  702. package/dist/render3d/graphics3d.js +67 -24
  703. package/dist/render3d/graphics3d.js.map +1 -1
  704. package/dist/render3d/scene3d.d.ts +1 -1
  705. package/dist/render3d/scene3d.js +1 -1
  706. package/dist/render3d/scene3d.js.map +1 -1
  707. package/dist/render3d/texture.d.ts +2 -2
  708. package/dist/render3d/texture.d.ts.map +1 -1
  709. package/dist/render3d/texture.js.map +1 -1
  710. package/dist/render3d/vector3.d.ts +2 -2
  711. package/dist/render3d/vector3.js +2 -2
  712. package/dist/render3d/vector3.js.map +1 -1
  713. package/dist/runtime/asset-refine.d.ts +1 -1
  714. package/dist/runtime/asset-refine.d.ts.map +1 -1
  715. package/dist/runtime/asset-refine.js +3 -2
  716. package/dist/runtime/asset-refine.js.map +1 -1
  717. package/dist/runtime/asset-timeline.d.ts +10 -0
  718. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  719. package/dist/runtime/asset-timeline.js.map +1 -1
  720. package/dist/runtime/asset-update.d.ts.map +1 -1
  721. package/dist/runtime/asset-update.js +8 -1
  722. package/dist/runtime/asset-update.js.map +1 -1
  723. package/dist/runtime/audio-index.d.ts +0 -11
  724. package/dist/runtime/audio-index.d.ts.map +1 -1
  725. package/dist/runtime/audio-index.js +0 -25
  726. package/dist/runtime/audio-index.js.map +1 -1
  727. package/dist/runtime/clip-instance.d.ts +6 -4
  728. package/dist/runtime/clip-instance.d.ts.map +1 -1
  729. package/dist/runtime/clip-instance.js +8 -4
  730. package/dist/runtime/clip-instance.js.map +1 -1
  731. package/dist/runtime/clip-store.d.ts +2 -3
  732. package/dist/runtime/clip-store.d.ts.map +1 -1
  733. package/dist/runtime/clip-store.js +34 -37
  734. package/dist/runtime/clip-store.js.map +1 -1
  735. package/dist/runtime/engine.d.ts +8 -6
  736. package/dist/runtime/engine.d.ts.map +1 -1
  737. package/dist/runtime/engine.js +4 -3
  738. package/dist/runtime/engine.js.map +1 -1
  739. package/dist/runtime/node-picking.d.ts +2 -2
  740. package/dist/runtime/node-picking.d.ts.map +1 -1
  741. package/dist/runtime/node-picking.js +3 -3
  742. package/dist/runtime/node-picking.js.map +1 -1
  743. package/dist/runtime/node-picking3d.d.ts +2 -2
  744. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  745. package/dist/runtime/node-picking3d.js +1 -1
  746. package/dist/runtime/node-picking3d.js.map +1 -1
  747. package/dist/runtime/playback-controller.d.ts +2 -2
  748. package/dist/runtime/playback-controller.d.ts.map +1 -1
  749. package/dist/runtime/playback-controller.js +15 -5
  750. package/dist/runtime/playback-controller.js.map +1 -1
  751. package/dist/runtime/session.d.ts +7 -3
  752. package/dist/runtime/session.d.ts.map +1 -1
  753. package/dist/runtime/session.js +11 -4
  754. package/dist/runtime/session.js.map +1 -1
  755. package/dist/runtime/state-evaluator.d.ts +2 -2
  756. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  757. package/dist/runtime/state-evaluator.js.map +1 -1
  758. package/dist/runtime/text-geometry.d.ts +2 -2
  759. package/dist/runtime/text-geometry.d.ts.map +1 -1
  760. package/dist/runtime/text-geometry.js +4 -5
  761. package/dist/runtime/text-geometry.js.map +1 -1
  762. package/dist/sdk/index.d.ts +50 -44
  763. package/dist/sdk/index.d.ts.map +1 -1
  764. package/dist/sdk/index.js +35 -29
  765. package/dist/sdk/index.js.map +1 -1
  766. package/dist/tween/command-decorator.d.ts +14 -9
  767. package/dist/tween/command-decorator.d.ts.map +1 -1
  768. package/dist/tween/command-decorator.js +3 -2
  769. package/dist/tween/command-decorator.js.map +1 -1
  770. package/dist/tween/command.d.ts +1 -1
  771. package/dist/tween/command.js.map +1 -1
  772. package/dist/tween/ease/describe.d.ts +2 -0
  773. package/dist/tween/ease/describe.d.ts.map +1 -1
  774. package/dist/tween/ease/describe.js +4 -0
  775. package/dist/tween/ease/describe.js.map +1 -1
  776. package/dist/tween/ease/spec.d.ts +31 -0
  777. package/dist/tween/ease/spec.d.ts.map +1 -0
  778. package/dist/tween/ease/spec.js +51 -0
  779. package/dist/tween/ease/spec.js.map +1 -0
  780. package/dist/tween/index.d.ts +3 -1
  781. package/dist/tween/index.d.ts.map +1 -1
  782. package/dist/tween/index.js +2 -1
  783. package/dist/tween/index.js.map +1 -1
  784. package/dist/tween/loop.d.ts +1 -1
  785. package/dist/tween/loop.js +1 -1
  786. package/dist/tween/loop.js.map +1 -1
  787. package/dist/util/reference.d.ts +6 -6
  788. package/dist/util/reference.js.map +1 -1
  789. package/package.json +3 -11
  790. package/dist/browser/chunks/chunk-2RIYH36X.js +0 -3
  791. package/dist/browser/chunks/chunk-2RIYH36X.js.map +0 -7
  792. package/dist/browser/chunks/chunk-DDJN3QII.js +0 -15
  793. package/dist/browser/chunks/chunk-DDJN3QII.js.map +0 -7
  794. package/dist/browser/chunks/chunk-DHB4COFY.js +0 -2
  795. package/dist/browser/chunks/chunk-EJDPYDQI.js +0 -5
  796. package/dist/browser/chunks/chunk-EJDPYDQI.js.map +0 -7
  797. package/dist/browser/chunks/chunk-SFNJRPBV.js +0 -2
  798. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +0 -7
  799. package/dist/browser/chunks/chunk-XAWE4EAK.js +0 -2
  800. package/dist/browser/chunks/chunk-XAWE4EAK.js.map +0 -7
  801. package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
  802. package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
  803. package/dist/browser/jsx-jsx-runtime.js +0 -2
  804. package/dist/browser/jsx-jsx-runtime.js.map +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"node-descriptor.d.ts","sourceRoot":"","sources":["../../src/document/node-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,8GAA8G;IAC9G,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MA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9B,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,8GAA8G;IAC9G,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACpD,sHAAsH;IACtH,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9C;AAED,iDAAiD;AACjD,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC1D,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wGAAwG;IACxG,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,iBAAiB,CAAC,EAAE,YAAY,CAAC;IACjC,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"node-descriptor.js","sourceRoot":"","sources":["../../src/document/node-descriptor.ts"],"names":[],"mappings":"","sourcesContent":["import type { PropertyEditor } from \"@/attributes/properties/decorator\";\r\nimport type { NodeDimension } from \"@/nodes/node/node\";\r\n\r\n/**\r\n * What a node type declares about itself beyond its key.\r\n *\r\n * The **technical** description of a type — how it lays children out, what a\r\n * fresh one is seeded with, what it inherits from. Deliberately *not* how it is\r\n * presented: no display name, no icon, no shelf, no copy. Those are a host's to\r\n * resolve and to translate, and a component that carried them would be shipping\r\n * one language's product decisions inside an engine artifact.\r\n *\r\n * It replaced a `manifest.json` written beside each package. Two descriptions of\r\n * one class is the shape that drifts, and it did: eight of nine packages ended\r\n * up promising commands their classes had never implemented.\r\n *\r\n * **Nothing here is read while rendering.** A frame is identical whether a type\r\n * declares a seed or not. It exists so a host has one place to ask.\r\n */\r\nexport interface NodeTypeDescriptor {\r\n /**\r\n * The document key, matching `NodeSpec.type`.\r\n *\r\n * **Frozen** for anything already published: a stored document naming it has\r\n * to keep meaning the same thing forever.\r\n */\r\n key: string;\r\n /** The type it inherits editing sections and commands from, for a host that groups them. */\r\n parentKey?: string;\r\n /**\r\n * Which scene graph the type belongs to — **derived from the class**, never\r\n * written here, for the same reason {@link properties} is.\r\n *\r\n * `dimension` is a getter on the prototype precisely so it answers before a\r\n * node is constructed, which is what lets a host ask \"can this type go in\r\n * that tree?\" from the registry alone rather than by building one and\r\n * catching the throw.\r\n */\r\n dimension?: NodeDimension;\r\n /**\r\n * The trees it takes children from: its own, or a viewport's two (a Canvas\r\n * 3D takes 2D and 3D); empty for a type that takes none. **Derived** from\r\n * the class, as {@link dimension} is.\r\n */\r\n holds?: readonly NodeDimension[];\r\n /**\r\n * Whether a host may copy this component's source.\r\n *\r\n * False for anything a host reaches into by identity — its own primitives. A\r\n * type is forkable exactly when the host knows nothing about it beyond this.\r\n */\r\n forkable?: boolean;\r\n\r\n layout?: NodeLayoutDescriptor;\r\n /** What a freshly placed one's props are seeded with. */\r\n seed?: Record<string, unknown>;\r\n\r\n /**\r\n * The types this one goes inside: a plot in a coordinate system, a tangent\r\n * in a plot. A name also stands for every type built on it ({@link parentKey}).\r\n * Unsaid, it goes wherever its {@link dimension} allows.\r\n *\r\n * A statement about the class, not a rule the engine enforces: a node put\r\n * elsewhere still builds and usually draws nothing, which is exactly what\r\n * a host is told here so it can offer the type only where it works. See\r\n * `placement.ts`.\r\n */\r\n within?: readonly string[];\r\n /**\r\n * Types it needs at least one of beside it, under the same parent: an area\r\n * between curves needs a curve. For a requirement that is not a parent,\r\n * because the thing needed is shared or there may be several of it.\r\n */\r\n beside?: readonly string[];\r\n /** Takes only the children that name it in their {@link within}: a plot holds its marks, not a photograph. */\r\n closed?: boolean;\r\n\r\n /**\r\n * The editable properties, by key — **derived from `@property`**, never\r\n * written here.\r\n *\r\n * A hand-written list of a class's properties, beside a class of\r\n * properties, is exactly the restatement this whole descriptor exists to\r\n * remove. What a host needs beyond the key — a range, an enum's choices, the\r\n * controls inside an object-valued prop — is declared on the `@property`\r\n * itself, which is the thing being edited.\r\n */\r\n properties?: Record<string, NodePropertyDescriptor>;\r\n}\r\n\r\n/** One editable property, as a host draws it. */\r\nexport interface NodePropertyDescriptor extends PropertyEditor {\r\n /** The control to draw. Always present here, inferred when not declared. */\r\n kind: string;\r\n /** What a freshly placed node holds, when the class declares one. */\r\n default?: unknown;\r\n}\r\n\r\n/** The layout answer a node type's children get from it. */\r\nexport interface NodeLayoutDescriptor {\r\n children?: \"flow\" | \"horizontal\" | \"vertical\" | \"grid\" | \"freeform\";\r\n acceptsChildren?: boolean;\r\n defaultWidthMode?: NodeSizeMode;\r\n defaultHeightMode?: NodeSizeMode;\r\n /** What a freshly placed one is sized to. */\r\n defaultWidth?: number;\r\n defaultHeight?: number;\r\n /** A locked width:height, for a type whose box *is* its design. */\r\n aspectRatio?: number;\r\n}\r\n\r\n/** How a node type sizes one axis. */\r\nexport type NodeSizeMode = \"fixed\" | \"hug\" | \"fill\";\r\n"]}
1
+ {"version":3,"file":"node-descriptor.js","sourceRoot":"","sources":["../../src/document/node-descriptor.ts"],"names":[],"mappings":"","sourcesContent":["import type { PropertyEditor } from \"@/attributes/properties/decorator\";\r\nimport type { NodeDimension } from \"@/components/trees/node/node\";\r\n\r\n/**\r\n * What a node type declares about itself beyond its key.\r\n *\r\n * The **technical** description of a type — how it lays children out, what a\r\n * fresh one is seeded with, what it inherits from. Deliberately *not* how it is\r\n * presented: no display name, no icon, no shelf, no copy. Those are a host's to\r\n * resolve and to translate, and a component that carried them would be shipping\r\n * one language's product decisions inside an engine artifact.\r\n *\r\n * It replaced a `manifest.json` written beside each package. Two descriptions of\r\n * one class is the shape that drifts, and it did: eight of nine packages ended\r\n * up promising commands their classes had never implemented.\r\n *\r\n * **Nothing here is read while rendering.** A frame is identical whether a type\r\n * declares a seed or not. It exists so a host has one place to ask.\r\n */\r\nexport interface NodeTypeDescriptor {\r\n /**\r\n * The document key, matching `NodeSpec.type`.\r\n *\r\n * **Frozen** for anything already published: a stored document naming it has\r\n * to keep meaning the same thing forever.\r\n */\r\n key: string;\r\n /** The type it inherits editing sections and commands from, for a host that groups them. */\r\n parentKey?: string;\r\n /**\r\n * Which scene graph the type belongs to — **derived from the class**, never\r\n * written here, for the same reason {@link properties} is.\r\n *\r\n * `dimension` is a getter on the prototype precisely so it answers before a\r\n * node is constructed, which is what lets a host ask \"can this type go in\r\n * that tree?\" from the registry alone rather than by building one and\r\n * catching the throw.\r\n */\r\n dimension?: NodeDimension;\r\n /**\r\n * The trees it takes children from: its own, or a viewport's two (a Canvas\r\n * 3D takes 2D and 3D); empty for a type that takes none. **Derived** from\r\n * the class, as {@link dimension} is.\r\n */\r\n holds?: readonly NodeDimension[];\r\n /**\r\n * Whether a host may copy this component's source.\r\n *\r\n * False for anything a host reaches into by identity — its own primitives. A\r\n * type is forkable exactly when the host knows nothing about it beyond this.\r\n */\r\n forkable?: boolean;\r\n\r\n layout?: NodeLayoutDescriptor;\r\n /** What a freshly placed one's props are seeded with. */\r\n seed?: Record<string, unknown>;\r\n\r\n /**\r\n * The types this one goes inside: a plot in a coordinate system, a tangent\r\n * in a plot. A name also stands for every type built on it ({@link parentKey}).\r\n * Unsaid, it goes wherever its {@link dimension} allows.\r\n *\r\n * A statement about the class, not a rule the engine enforces: a node put\r\n * elsewhere still builds and usually draws nothing, which is exactly what\r\n * a host is told here so it can offer the type only where it works. See\r\n * `placement.ts`.\r\n */\r\n within?: readonly string[];\r\n /**\r\n * Types it needs at least one of beside it, under the same parent: an area\r\n * between curves needs a curve. For a requirement that is not a parent,\r\n * because the thing needed is shared or there may be several of it.\r\n */\r\n beside?: readonly string[];\r\n /** Takes only the children that name it in their {@link within}: a plot holds its marks, not a photograph. */\r\n closed?: boolean;\r\n\r\n /**\r\n * The editable properties, by key — **derived from `property`**, never\r\n * written here.\r\n *\r\n * A hand-written list of a class's properties, beside a class of\r\n * properties, is exactly the restatement this whole descriptor exists to\r\n * remove. What a host needs beyond the key — a range, an enum's choices, the\r\n * controls inside an object-valued prop — is declared on the `property`\r\n * itself, which is the thing being edited.\r\n */\r\n properties?: Record<string, NodePropertyDescriptor>;\r\n /** Old prop keys a stored row may still carry → the entry each became. **Derived** from the component's `renamed`. */\r\n renamed?: Readonly<Record<string, string>>;\r\n}\r\n\r\n/** One editable property, as a host draws it. */\r\nexport interface NodePropertyDescriptor extends PropertyEditor {\r\n /** The control to draw. Always present here, inferred when not declared. */\r\n kind: string;\r\n /** What a freshly placed node holds, when the class declares one. */\r\n default?: unknown;\r\n /** Present when the component deprecated it: why, and what to use instead. A host stops offering it. */\r\n deprecated?: string;\r\n}\r\n\r\n/** The layout answer a node type's children get from it. */\r\nexport interface NodeLayoutDescriptor {\r\n children?: \"flow\" | \"horizontal\" | \"vertical\" | \"grid\" | \"freeform\";\r\n acceptsChildren?: boolean;\r\n defaultWidthMode?: NodeSizeMode;\r\n defaultHeightMode?: NodeSizeMode;\r\n /** What a freshly placed one is sized to. */\r\n defaultWidth?: number;\r\n defaultHeight?: number;\r\n /** A locked width:height, for a type whose box *is* its design. */\r\n aspectRatio?: number;\r\n}\r\n\r\n/** How a node type sizes one axis. */\r\nexport type NodeSizeMode = \"fixed\" | \"hug\" | \"fill\";\r\n"]}
@@ -13,7 +13,8 @@ import { type NodeSpec } from "./types.js";
13
13
  * are about the parent; {@link NodeTypeDescriptor.beside} is about the
14
14
  * siblings, and is kept apart because a host can meet it by adding one.
15
15
  *
16
- * None of it is enforced when a document is built. A node in the wrong place
16
+ * Only a leaf is enforced when a document is built: a component declaring
17
+ * `allowedChildren: []` throws on a child. A node in any other wrong place
17
18
  * builds and, as a rule, draws nothing; this says why.
18
19
  */
19
20
  /** Why a node of a type is not where it can work. */
@@ -1 +1 @@
1
- {"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../../src/document/placement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AAEH,qDAAqD;AACrD,MAAM,MAAM,cAAc;AACtB,oCAAoC;AAClC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAClC,gEAAgE;GAC9D;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AAC9C,sEAAsE;GACpE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE;AAC/C,oDAAoD;GAClD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACpC,yEAAyE;GACvE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC7B;;;;OAIG;IACH,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK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AAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QACvE,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,UAAU,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC;QACjF,MAAM,KAAK,GACP,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC;YACrD,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;QACjG,IAAI,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,+FAA+F;AAC/F,SAAS,OAAO,CAAC,KAAwB,EAAE,GAAW;IAClD,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import type { Registry } from \"./registry\";\r\nimport { ROOT_NODE_ID, type NodeSpec } from \"./types\";\r\n\r\n/**\r\n * Where a node type may go, read off the registry without building anything:\r\n * the answer a host needs before it offers a type under a parent, accepts a\r\n * drop, or lets an assistant create a row.\r\n *\r\n * Four things decide it. A parent that takes no children takes none. The two\r\n * trees do not mix: a `Node3D` lives under a Canvas 3D or another 3D node, and\r\n * nothing else does. A type that names where it goes ({@link\r\n * NodeTypeDescriptor.within}) goes only there, and a {@link\r\n * NodeTypeDescriptor.closed} parent takes only the types that name it. Those\r\n * are about the parent; {@link NodeTypeDescriptor.beside} is about the\r\n * siblings, and is kept apart because a host can meet it by adding one.\r\n *\r\n * None of it is enforced when a document is built. A node in the wrong place\r\n * builds and, as a rule, draws nothing; this says why.\r\n */\r\n\r\n/** Why a node of a type is not where it can work. */\r\nexport type PlacementIssue =\r\n /** The parent takes no children. */\r\n | { kind: \"leaf\"; parent: string }\r\n /** A 3D node outside a 3D tree, or anything else inside one. */\r\n | { kind: \"dimension\"; parent: string | null }\r\n /** It goes inside one of `within`, and the parent is none of them. */\r\n | { kind: \"within\"; within: readonly string[] }\r\n /** The parent takes only the types that name it. */\r\n | { kind: \"closed\"; parent: string }\r\n /** It needs one of `beside` under the same parent, and there is none. */\r\n | { kind: \"beside\"; beside: readonly string[] };\r\n\r\nexport interface PlacementOptions {\r\n /**\r\n * A host's own sense of one type standing for another, beside the\r\n * registry's: a copy of a component it made under a new key is still that\r\n * component to whatever goes inside it.\r\n */\r\n isA?: (type: string, name: string) => boolean;\r\n}\r\n\r\n/** The one core type whose children are of the other dimension. */\r\nconst CANVAS_3D = \"canvas3d\";\r\n\r\n/** Whether `type` is `name`, or is built on it through `parentKey`. */\r\nexport function nodeTypeIsA(registry: Registry, type: string, name: string): boolean {\r\n const seen = new Set<string>();\r\n for (let at: string | undefined = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {\r\n if (at === name) return true;\r\n seen.add(at);\r\n }\r\n return false;\r\n}\r\n\r\nfunction among(registry: Registry, type: string, names: readonly string[], options: PlacementOptions): boolean {\r\n return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);\r\n}\r\n\r\n/**\r\n * Why a node of `child` cannot go directly inside one of `parent`, or `null`\r\n * when it can. A `null` parent is the document's own root, which is 2D and\r\n * names nothing.\r\n */\r\nexport function parentIssue(\r\n registry: Registry,\r\n child: string,\r\n parent: string | null,\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const own = registry.describe(child);\r\n const holder = parent === null ? undefined : registry.describe(parent);\r\n if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0)) return { kind: \"leaf\", parent };\r\n\r\n const within = own?.within ?? [];\r\n if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {\r\n return { kind: \"within\", within };\r\n }\r\n if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {\r\n return { kind: \"closed\", parent };\r\n }\r\n\r\n const inThree = parent !== null && (holder?.dimension === \"3d\" || holder?.holds?.includes(\"3d\") === true || among(registry, parent, [CANVAS_3D], options));\r\n if ((own?.dimension === \"3d\") !== inThree) return { kind: \"dimension\", parent };\r\n return null;\r\n}\r\n\r\n/** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */\r\nexport function siblingIssue(\r\n registry: Registry,\r\n child: string,\r\n siblings: readonly string[],\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const beside = registry.describe(child)?.beside ?? [];\r\n if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options))) return null;\r\n return { kind: \"beside\", beside };\r\n}\r\n\r\n/**\r\n * Every node of `nodes` that is not where its type says it goes, by id, with\r\n * the first reason. A node of an unregistered type is left out: that is a build\r\n * error, and says so itself.\r\n */\r\nexport function placementIssues(\r\n registry: Registry,\r\n nodes: readonly Pick<NodeSpec, \"id\" | \"type\" | \"parentId\">[],\r\n options: PlacementOptions = {},\r\n): Map<string, PlacementIssue> {\r\n // A document may write its stage as a row or leave it out: either way its children's parent is the root.\r\n const parentOf = (node: Pick<NodeSpec, \"parentId\">) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);\r\n const byId = new Map(nodes.map((node) => [node.id, node]));\r\n const children = new Map<string | null, string[]>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID) continue;\r\n const under = children.get(parentOf(node));\r\n if (under) under.push(node.type);\r\n else children.set(parentOf(node), [node.type]);\r\n }\r\n const issues = new Map<string, PlacementIssue>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type)) continue;\r\n const parentId = parentOf(node);\r\n const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);\r\n const issue =\r\n parentIssue(registry, node.type, parentType, options) ??\r\n siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);\r\n if (issue) issues.set(node.id, issue);\r\n }\r\n return issues;\r\n}\r\n\r\n// The node's own type once: a second area is a sibling of the first, the first is not its own.\r\nfunction without(types: readonly string[], own: string): string[] {\r\n const at = types.indexOf(own);\r\n return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];\r\n}\r\n"]}
1
+ {"version":3,"file":"placement.js","sourceRoot":"","sources":["../../src/document/placement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAC;AA0CtD,mEAAmE;AACnE,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,uEAAuE;AACvE,MAAM,UAAU,WAAW,CAAC,QAAkB,EAAE,IAAY,EAAE,IAAY;IACtE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,IAAI,EAAE,GAAuB,IAAI,EAAE,EAAE,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC;QAC/G,IAAI,EAAE,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,KAAK,CAA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C,CAAC;QACjG,IAAI,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,+FAA+F;AAC/F,SAAS,OAAO,CAAC,KAAwB,EAAE,GAAW;IAClD,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import type { Registry } from \"./registry\";\r\nimport { ROOT_NODE_ID, type NodeSpec } from \"./types\";\r\n\r\n/**\r\n * Where a node type may go, read off the registry without building anything:\r\n * the answer a host needs before it offers a type under a parent, accepts a\r\n * drop, or lets an assistant create a row.\r\n *\r\n * Four things decide it. A parent that takes no children takes none. The two\r\n * trees do not mix: a `Node3D` lives under a Canvas 3D or another 3D node, and\r\n * nothing else does. A type that names where it goes ({@link\r\n * NodeTypeDescriptor.within}) goes only there, and a {@link\r\n * NodeTypeDescriptor.closed} parent takes only the types that name it. Those\r\n * are about the parent; {@link NodeTypeDescriptor.beside} is about the\r\n * siblings, and is kept apart because a host can meet it by adding one.\r\n *\r\n * Only a leaf is enforced when a document is built: a component declaring\r\n * `allowedChildren: []` throws on a child. A node in any other wrong place\r\n * builds and, as a rule, draws nothing; this says why.\r\n */\r\n\r\n/** Why a node of a type is not where it can work. */\r\nexport type PlacementIssue =\r\n /** The parent takes no children. */\r\n | { kind: \"leaf\"; parent: string }\r\n /** A 3D node outside a 3D tree, or anything else inside one. */\r\n | { kind: \"dimension\"; parent: string | null }\r\n /** It goes inside one of `within`, and the parent is none of them. */\r\n | { kind: \"within\"; within: readonly string[] }\r\n /** The parent takes only the types that name it. */\r\n | { kind: \"closed\"; parent: string }\r\n /** It needs one of `beside` under the same parent, and there is none. */\r\n | { kind: \"beside\"; beside: readonly string[] };\r\n\r\nexport interface PlacementOptions {\r\n /**\r\n * A host's own sense of one type standing for another, beside the\r\n * registry's: a copy of a component it made under a new key is still that\r\n * component to whatever goes inside it.\r\n */\r\n isA?: (type: string, name: string) => boolean;\r\n}\r\n\r\n/** The one core type whose children are of the other dimension. */\r\nconst CANVAS_3D = \"canvas3d\";\r\n\r\n/** Whether `type` is `name`, or is built on it through `parentKey`. */\r\nexport function nodeTypeIsA(registry: Registry, type: string, name: string): boolean {\r\n const seen = new Set<string>();\r\n for (let at: string | undefined = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {\r\n if (at === name) return true;\r\n seen.add(at);\r\n }\r\n return false;\r\n}\r\n\r\nfunction among(registry: Registry, type: string, names: readonly string[], options: PlacementOptions): boolean {\r\n return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);\r\n}\r\n\r\n/**\r\n * Why a node of `child` cannot go directly inside one of `parent`, or `null`\r\n * when it can. A `null` parent is the document's own root, which is 2D and\r\n * names nothing.\r\n */\r\nexport function parentIssue(\r\n registry: Registry,\r\n child: string,\r\n parent: string | null,\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const own = registry.describe(child);\r\n const holder = parent === null ? undefined : registry.describe(parent);\r\n if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0)) return { kind: \"leaf\", parent };\r\n\r\n const within = own?.within ?? [];\r\n if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {\r\n return { kind: \"within\", within };\r\n }\r\n if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {\r\n return { kind: \"closed\", parent };\r\n }\r\n\r\n const inThree = parent !== null && (holder?.dimension === \"3d\" || holder?.holds?.includes(\"3d\") === true || among(registry, parent, [CANVAS_3D], options));\r\n if ((own?.dimension === \"3d\") !== inThree) return { kind: \"dimension\", parent };\r\n return null;\r\n}\r\n\r\n/** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */\r\nexport function siblingIssue(\r\n registry: Registry,\r\n child: string,\r\n siblings: readonly string[],\r\n options: PlacementOptions = {},\r\n): PlacementIssue | null {\r\n const beside = registry.describe(child)?.beside ?? [];\r\n if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options))) return null;\r\n return { kind: \"beside\", beside };\r\n}\r\n\r\n/**\r\n * Every node of `nodes` that is not where its type says it goes, by id, with\r\n * the first reason. A node of an unregistered type is left out: that is a build\r\n * error, and says so itself.\r\n */\r\nexport function placementIssues(\r\n registry: Registry,\r\n nodes: readonly Pick<NodeSpec, \"id\" | \"type\" | \"parentId\">[],\r\n options: PlacementOptions = {},\r\n): Map<string, PlacementIssue> {\r\n // A document may write its stage as a row or leave it out: either way its children's parent is the root.\r\n const parentOf = (node: Pick<NodeSpec, \"parentId\">) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);\r\n const byId = new Map(nodes.map((node) => [node.id, node]));\r\n const children = new Map<string | null, string[]>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID) continue;\r\n const under = children.get(parentOf(node));\r\n if (under) under.push(node.type);\r\n else children.set(parentOf(node), [node.type]);\r\n }\r\n const issues = new Map<string, PlacementIssue>();\r\n for (const node of nodes) {\r\n if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type)) continue;\r\n const parentId = parentOf(node);\r\n const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);\r\n const issue =\r\n parentIssue(registry, node.type, parentType, options) ??\r\n siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);\r\n if (issue) issues.set(node.id, issue);\r\n }\r\n return issues;\r\n}\r\n\r\n// The node's own type once: a second area is a sibling of the first, the first is not its own.\r\nfunction without(types: readonly string[], own: string): string[] {\r\n const at = types.indexOf(own);\r\n return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];\r\n}\r\n"]}
@@ -23,6 +23,8 @@ import type { ClipDocument, VisualDocument } from "./types.js";
23
23
  */
24
24
  export interface ProjectDocument {
25
25
  kind: "project";
26
+ /** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */
27
+ formatVersion?: number;
26
28
  /** Human-readable project name. */
27
29
  name: string;
28
30
  /** Target frame rate. Defaults to 60. */
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;OAGG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,KAAK;IAClB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,gDAAgD;AAChD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG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EAAE,OAAO,GAAG,GAAG,IAAI,eAAe,CAEtE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,eAAe,GAAG,cAAc,EACrC,MAAM,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAChE,eAAe,CAWjB"}
@@ -15,6 +15,7 @@ export function asProjectDocument(doc, output = {}) {
15
15
  return doc;
16
16
  return {
17
17
  kind: "project",
18
+ ...(doc.formatVersion !== undefined && { formatVersion: doc.formatVersion }),
18
19
  name: output.name ?? "Untitled",
19
20
  fps: output.fps,
20
21
  viewport: output.viewport,
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA6E3C,gDAAgD;AAChD,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC1C,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAK,GAAuB,CAAC,IAAI,KAAK,SAAS,CAAC;AAClG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC7B,GAAqC,EACrC,SAA6D,EAAE;IAE/D,IAAI,iBAAiB,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACvC,OAAO;QACH,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,UAAU;QAC/B,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;KACvE,CAAC;AACN,CAAC","sourcesContent":["import type { Size2D } from \"@/attributes/layout/size\";\r\nimport type { Theme } from \"@/project/config\";\r\n\r\nimport type { ClipDocument, VisualDocument } from \"./types\";\r\nimport { documentDuration } from \"./types\";\r\n\r\n/**\r\n * The **project** as data: a whole video, not one clip — and the one thing the\r\n * runtime plays.\r\n *\r\n * A clip document says what happens inside one composition. This says how those\r\n * compositions are laid against each other to make the finished thing — and it\r\n * is the same idea one level up, so it reads the same way: rows placed at times,\r\n * evaluated rather than played.\r\n *\r\n * ### One list of tracks\r\n *\r\n * A {@link ClipDocument} is a still, a composition *or* an audio document, and a\r\n * composition already carries both picture and sound — so there is one list for\r\n * all of it, not a second one for sound.\r\n *\r\n * **Array position is paint order**, first entry at the back, exactly as\r\n * position in a `fill` array is. A background is the first track; an overlay is\r\n * the last; a cross-dissolve is two tracks whose spans overlap and whose clips\r\n * fade themselves.\r\n */\r\nexport interface ProjectDocument {\r\n kind: \"project\";\r\n /** Human-readable project name. */\r\n name: string;\r\n /** Target frame rate. Defaults to 60. */\r\n fps?: number;\r\n /** Output canvas dimensions in pixels. Defaults to 1920×1080. */\r\n viewport?: Size2D;\r\n /** Visual design tokens (colors, typography) available to every clip. */\r\n theme?: Theme;\r\n /**\r\n * Every clip, placed. **Array position is paint order** — the first entry is\r\n * at the back.\r\n */\r\n tracks: Track[];\r\n}\r\n\r\n/**\r\n * One clip, placed on the project timeline.\r\n *\r\n * The clip document is **inline**, not referenced by id. A shared id would deduplicate JSON and\r\n * cost an id space, a resolution step and a dangling-reference failure mode — and\r\n * it would not buy what it looks like it buys, because the content that actually\r\n * repeats in an edit mostly has to *differ* per placement (a lower third with\r\n * different text, a chapter card with a different label).\r\n */\r\nexport interface Track {\r\n /**\r\n * Stable identity, so a host can address, reorder and diff one row — and so\r\n * the runtime can keep a track's built tree across an edit that leaves its\r\n * clip untouched.\r\n */\r\n id: string;\r\n /** Display label. */\r\n name?: string;\r\n /** What plays: a still, a composition, or sound. */\r\n clip: ClipDocument;\r\n /**\r\n * Second on the **project** timeline at which this clip's own clock reads 0.\r\n * Authored, never derived from the row above it, so a clip's start cannot\r\n * move because a neighbour changed. Defaults to 0.\r\n */\r\n startAt?: number;\r\n /**\r\n * Seconds this clip occupies. **Required.**\r\n *\r\n * So a project's length is arithmetic over its tracks rather than something\r\n * measured out of a media file or a timeline — a three-minute music bed\r\n * cannot silently make a thirty-second edit three minutes long. Longer than\r\n * the document holds its last frame; shorter cuts it off, which is also what\r\n * lets a **still**, a document with no length at all, be a backdrop.\r\n */\r\n duration: number;\r\n}\r\n\r\n/** Narrows an unknown document to a project. */\r\nexport function isProjectDocument(doc: unknown): doc is ProjectDocument {\r\n return typeof doc === \"object\" && doc !== null && (doc as ProjectDocument).kind === \"project\";\r\n}\r\n\r\n/**\r\n * The project a session plays, from either document it can open.\r\n *\r\n * A lone still or composition becomes the only track of a project around it.\r\n * Viewport and fps describe the output rather than the clip, so they come from\r\n * the caller.\r\n */\r\nexport function asProjectDocument(\r\n doc: ProjectDocument | VisualDocument,\r\n output: { name?: string; viewport?: Size2D; fps?: number } = {},\r\n): ProjectDocument {\r\n if (isProjectDocument(doc)) return doc;\r\n return {\r\n kind: \"project\",\r\n name: output.name ?? \"Untitled\",\r\n fps: output.fps,\r\n viewport: output.viewport,\r\n theme: doc.theme,\r\n tracks: [{ id: \"clip\", clip: doc, duration: documentDuration(doc) }],\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA+E3C,gDAAgD;AAChD,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC1C,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAK,GAAuB,CAAC,IAAI,KAAK,SAAS,CAAC;AAClG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC7B,GAAqC,EACrC,SAA6D,EAAE;IAE/D,IAAI,iBAAiB,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACvC,OAAO;QACH,IAAI,EAAE,SAAS;QACf,GAAG,CAAC,GAAG,CAAC,aAAa,KAAK,SAAS,IAAI,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,CAAC;QAC5E,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,UAAU;QAC/B,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;KACvE,CAAC;AACN,CAAC","sourcesContent":["import type { Size2D } from \"@/attributes/layout/size\";\r\nimport type { Theme } from \"@/project/config\";\r\n\r\nimport type { ClipDocument, VisualDocument } from \"./types\";\r\nimport { documentDuration } from \"./types\";\r\n\r\n/**\r\n * The **project** as data: a whole video, not one clip — and the one thing the\r\n * runtime plays.\r\n *\r\n * A clip document says what happens inside one composition. This says how those\r\n * compositions are laid against each other to make the finished thing — and it\r\n * is the same idea one level up, so it reads the same way: rows placed at times,\r\n * evaluated rather than played.\r\n *\r\n * ### One list of tracks\r\n *\r\n * A {@link ClipDocument} is a still, a composition *or* an audio document, and a\r\n * composition already carries both picture and sound — so there is one list for\r\n * all of it, not a second one for sound.\r\n *\r\n * **Array position is paint order**, first entry at the back, exactly as\r\n * position in a `fill` array is. A background is the first track; an overlay is\r\n * the last; a cross-dissolve is two tracks whose spans overlap and whose clips\r\n * fade themselves.\r\n */\r\nexport interface ProjectDocument {\r\n kind: \"project\";\r\n /** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */\r\n formatVersion?: number;\r\n /** Human-readable project name. */\r\n name: string;\r\n /** Target frame rate. Defaults to 60. */\r\n fps?: number;\r\n /** Output canvas dimensions in pixels. Defaults to 1920×1080. */\r\n viewport?: Size2D;\r\n /** Visual design tokens (colors, typography) available to every clip. */\r\n theme?: Theme;\r\n /**\r\n * Every clip, placed. **Array position is paint order** — the first entry is\r\n * at the back.\r\n */\r\n tracks: Track[];\r\n}\r\n\r\n/**\r\n * One clip, placed on the project timeline.\r\n *\r\n * The clip document is **inline**, not referenced by id. A shared id would deduplicate JSON and\r\n * cost an id space, a resolution step and a dangling-reference failure mode — and\r\n * it would not buy what it looks like it buys, because the content that actually\r\n * repeats in an edit mostly has to *differ* per placement (a lower third with\r\n * different text, a chapter card with a different label).\r\n */\r\nexport interface Track {\r\n /**\r\n * Stable identity, so a host can address, reorder and diff one row — and so\r\n * the runtime can keep a track's built tree across an edit that leaves its\r\n * clip untouched.\r\n */\r\n id: string;\r\n /** Display label. */\r\n name?: string;\r\n /** What plays: a still, a composition, or sound. */\r\n clip: ClipDocument;\r\n /**\r\n * Second on the **project** timeline at which this clip's own clock reads 0.\r\n * Authored, never derived from the row above it, so a clip's start cannot\r\n * move because a neighbour changed. Defaults to 0.\r\n */\r\n startAt?: number;\r\n /**\r\n * Seconds this clip occupies. **Required.**\r\n *\r\n * So a project's length is arithmetic over its tracks rather than something\r\n * measured out of a media file or a timeline — a three-minute music bed\r\n * cannot silently make a thirty-second edit three minutes long. Longer than\r\n * the document holds its last frame; shorter cuts it off, which is also what\r\n * lets a **still**, a document with no length at all, be a backdrop.\r\n */\r\n duration: number;\r\n}\r\n\r\n/** Narrows an unknown document to a project. */\r\nexport function isProjectDocument(doc: unknown): doc is ProjectDocument {\r\n return typeof doc === \"object\" && doc !== null && (doc as ProjectDocument).kind === \"project\";\r\n}\r\n\r\n/**\r\n * The project a session plays, from either document it can open.\r\n *\r\n * A lone still or composition becomes the only track of a project around it.\r\n * Viewport and fps describe the output rather than the clip, so they come from\r\n * the caller.\r\n */\r\nexport function asProjectDocument(\r\n doc: ProjectDocument | VisualDocument,\r\n output: { name?: string; viewport?: Size2D; fps?: number } = {},\r\n): ProjectDocument {\r\n if (isProjectDocument(doc)) return doc;\r\n return {\r\n kind: \"project\",\r\n ...(doc.formatVersion !== undefined && { formatVersion: doc.formatVersion }),\r\n name: output.name ?? \"Untitled\",\r\n fps: output.fps,\r\n viewport: output.viewport,\r\n theme: doc.theme,\r\n tracks: [{ id: \"clip\", clip: doc, duration: documentDuration(doc) }],\r\n };\r\n}\r\n"]}
@@ -0,0 +1,51 @@
1
+ import type { Registry } from "./registry.js";
2
+ /**
3
+ * How a node type's props changed since documents first named it — declared by
4
+ * a component spec's `renamed`, `deprecated` and `migrate`, applied to a row's
5
+ * props whenever one is built, and callable by a host rewriting stored rows.
6
+ *
7
+ * Unlike a document migration this has no version to go by: a row stored a year
8
+ * ago and one stored today pass through the same rules, so every rule has to
9
+ * leave a current value alone.
10
+ */
11
+ export interface PropEvolution {
12
+ /** Old key → the entry it became. A row setting both keeps the new one. */
13
+ readonly renamed: Readonly<Record<string, string>>;
14
+ /** Entry → why it is deprecated and what to use instead. It still works. */
15
+ readonly deprecated: Readonly<Record<string, string>>;
16
+ /**
17
+ * Key → a value hook. Keyed by an old key from {@link renamed}, it converts
18
+ * only what was stored under that key (a unit change rides on a rename);
19
+ * keyed by an entry, it runs on every stored value and must hand a current
20
+ * one back unchanged. `undefined` drops the prop back to its default.
21
+ */
22
+ readonly migrate: Readonly<Record<string, (value: unknown) => unknown>>;
23
+ }
24
+ /** One prop a migration touched, or one a row still sets that is deprecated. */
25
+ export interface PropNote {
26
+ prop: string;
27
+ message: string;
28
+ }
29
+ export interface PropMigration {
30
+ /** The props given, when nothing changed; a new object otherwise. */
31
+ props: Record<string, unknown>;
32
+ changes: PropNote[];
33
+ deprecated: PropNote[];
34
+ }
35
+ /** @internal Record `evolution` on a node class; a component factory does this for its generated class. */
36
+ export declare function declarePropEvolution(ctor: abstract new (...args: never[]) => object, evolution: PropEvolution): void;
37
+ /** @internal What {@link declarePropEvolution} recorded on this exact class. */
38
+ export declare function propEvolutionOf(ctor: abstract new (...args: never[]) => object): PropEvolution | undefined;
39
+ /**
40
+ * Bring a stored row's props up to what `type` declares today: old keys
41
+ * renamed, values migrated, deprecated props reported. A type this registry
42
+ * does not know, or one that never changed, hands `props` back as it is.
43
+ *
44
+ * Applies equally to a `to`/`set` command's args, which are a props diff.
45
+ * An expression is moved by a rename but handed to no value hook: a formula's
46
+ * result cannot be converted by rewriting it, so it is noted and left as written.
47
+ */
48
+ export declare function migrateNodeProps(registry: Registry, type: string, props: Record<string, unknown>): PropMigration;
49
+ /** @internal {@link migrateNodeProps} once the type's rules are in hand. */
50
+ export declare function applyPropEvolution(evolution: PropEvolution, props: Record<string, unknown>): PropMigration;
51
+ //# sourceMappingURL=prop-evolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-evolution.d.ts","sourceRoot":"","sources":["../../src/document/prop-evolution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;CAC3E;AAED,gFAAgF;AAChF,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC1B,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,UAAU,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAID,2GAA2G;AAC3G,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,IAAI,CAEpH;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,GAAG,aAAa,GAAG,SAAS,CAI1G;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CAIhH;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CA+C1G"}
@@ -0,0 +1,83 @@
1
+ import { expressionOps } from "./expression/ops.js";
2
+ const PROP_EVOLUTION = Symbol("propEvolution");
3
+ /** @internal Record `evolution` on a node class; a component factory does this for its generated class. */
4
+ export function declarePropEvolution(ctor, evolution) {
5
+ ctor.prototype[PROP_EVOLUTION] = evolution;
6
+ }
7
+ /** @internal What {@link declarePropEvolution} recorded on this exact class. */
8
+ export function propEvolutionOf(ctor) {
9
+ const proto = ctor.prototype;
10
+ if (!proto || !Object.prototype.hasOwnProperty.call(proto, PROP_EVOLUTION))
11
+ return undefined;
12
+ return proto[PROP_EVOLUTION];
13
+ }
14
+ /**
15
+ * Bring a stored row's props up to what `type` declares today: old keys
16
+ * renamed, values migrated, deprecated props reported. A type this registry
17
+ * does not know, or one that never changed, hands `props` back as it is.
18
+ *
19
+ * Applies equally to a `to`/`set` command's args, which are a props diff.
20
+ * An expression is moved by a rename but handed to no value hook: a formula's
21
+ * result cannot be converted by rewriting it, so it is noted and left as written.
22
+ */
23
+ export function migrateNodeProps(registry, type, props) {
24
+ const ctor = registry.node(type)?.ctor;
25
+ const evolution = ctor ? propEvolutionOf(ctor) : undefined;
26
+ return evolution ? applyPropEvolution(evolution, props) : { props, changes: [], deprecated: [] };
27
+ }
28
+ /** @internal {@link migrateNodeProps} once the type's rules are in hand. */
29
+ export function applyPropEvolution(evolution, props) {
30
+ const changes = [];
31
+ const deprecated = [];
32
+ let out = null;
33
+ const write = () => (out ??= { ...props });
34
+ const isExpression = (value) => expressionOps.collect(value, "").length > 0;
35
+ const convert = (key, value, at) => {
36
+ const hook = evolution.migrate[key];
37
+ if (!hook || value === undefined)
38
+ return value;
39
+ if (isExpression(value)) {
40
+ changes.push({ prop: at, message: `"${at}" is an expression, so its value was left as written.` });
41
+ return value;
42
+ }
43
+ return hook(value);
44
+ };
45
+ for (const [from, to] of Object.entries(evolution.renamed)) {
46
+ if (!Object.hasOwn(props, from))
47
+ continue;
48
+ const target = write();
49
+ const value = convert(from, props[from], from);
50
+ delete target[from];
51
+ if (props[to] !== undefined) {
52
+ changes.push({ prop: from, message: `"${from}" was renamed "${to}", which the row also sets; the old value was dropped.` });
53
+ continue;
54
+ }
55
+ if (value === undefined)
56
+ delete target[to];
57
+ else
58
+ target[to] = value;
59
+ changes.push({ prop: from, message: `"${from}" was renamed "${to}".` });
60
+ }
61
+ for (const key of Object.keys(evolution.migrate)) {
62
+ if (Object.hasOwn(evolution.renamed, key))
63
+ continue;
64
+ const current = (out ?? props)[key];
65
+ if (current === undefined)
66
+ continue;
67
+ const next = convert(key, current, key);
68
+ if (next === current)
69
+ continue;
70
+ const target = write();
71
+ if (next === undefined)
72
+ delete target[key];
73
+ else
74
+ target[key] = next;
75
+ changes.push({ prop: key, message: next === undefined ? `"${key}" was dropped back to its default.` : `"${key}" was migrated.` });
76
+ }
77
+ for (const [key, message] of Object.entries(evolution.deprecated)) {
78
+ if ((out ?? props)[key] !== undefined)
79
+ deprecated.push({ prop: key, message });
80
+ }
81
+ return { props: out ?? props, changes, deprecated };
82
+ }
83
+ //# sourceMappingURL=prop-evolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-evolution.js","sourceRoot":"","sources":["../../src/document/prop-evolution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAuCjD,MAAM,cAAc,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAE/C,2GAA2G;AAC3G,MAAM,UAAU,oBAAoB,CAAC,IAA+C,EAAE,SAAwB;IACzG,IAAI,CAAC,SAAqC,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;AAC5E,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,eAAe,CAAC,IAA+C;IAC3E,MAAM,KAAK,GAAG,IAAI,CAAC,SAAgD,CAAC;IACpE,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC;QAAE,OAAO,SAAS,CAAC;IAC7F,OAAO,KAAK,CAAC,cAAc,CAAkB,CAAC;AAClD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAkB,EAAE,IAAY,EAAE,KAA8B;IAC7F,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,OAAO,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;AACrG,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB,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MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC;QAChE,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,SAAS;YAAE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACxD,CAAC","sourcesContent":["import { expressionOps } from \"./expression/ops\";\r\nimport type { Registry } from \"./registry\";\r\n\r\n/**\r\n * How a node type's props changed since documents first named it — declared by\r\n * a component spec's `renamed`, `deprecated` and `migrate`, applied to a row's\r\n * props whenever one is built, and callable by a host rewriting stored rows.\r\n *\r\n * Unlike a document migration this has no version to go by: a row stored a year\r\n * ago and one stored today pass through the same rules, so every rule has to\r\n * leave a current value alone.\r\n */\r\nexport interface PropEvolution {\r\n /** Old key → the entry it became. A row setting both keeps the new one. */\r\n readonly renamed: Readonly<Record<string, string>>;\r\n /** Entry → why it is deprecated and what to use instead. It still works. */\r\n readonly deprecated: Readonly<Record<string, string>>;\r\n /**\r\n * Key → a value hook. Keyed by an old key from {@link renamed}, it converts\r\n * only what was stored under that key (a unit change rides on a rename);\r\n * keyed by an entry, it runs on every stored value and must hand a current\r\n * one back unchanged. `undefined` drops the prop back to its default.\r\n */\r\n readonly migrate: Readonly<Record<string, (value: unknown) => unknown>>;\r\n}\r\n\r\n/** One prop a migration touched, or one a row still sets that is deprecated. */\r\nexport interface PropNote {\r\n prop: string;\r\n message: string;\r\n}\r\n\r\nexport interface PropMigration {\r\n /** The props given, when nothing changed; a new object otherwise. */\r\n props: Record<string, unknown>;\r\n changes: PropNote[];\r\n deprecated: PropNote[];\r\n}\r\n\r\nconst PROP_EVOLUTION = Symbol(\"propEvolution\");\r\n\r\n/** @internal Record `evolution` on a node class; a component factory does this for its generated class. */\r\nexport function declarePropEvolution(ctor: abstract new (...args: never[]) => object, evolution: PropEvolution): void {\r\n (ctor.prototype as Record<symbol, unknown>)[PROP_EVOLUTION] = evolution;\r\n}\r\n\r\n/** @internal What {@link declarePropEvolution} recorded on this exact class. */\r\nexport function propEvolutionOf(ctor: abstract new (...args: never[]) => object): PropEvolution | undefined {\r\n const proto = ctor.prototype as Record<symbol, unknown> | undefined;\r\n if (!proto || !Object.prototype.hasOwnProperty.call(proto, PROP_EVOLUTION)) return undefined;\r\n return proto[PROP_EVOLUTION] as PropEvolution;\r\n}\r\n\r\n/**\r\n * Bring a stored row's props up to what `type` declares today: old keys\r\n * renamed, values migrated, deprecated props reported. A type this registry\r\n * does not know, or one that never changed, hands `props` back as it is.\r\n *\r\n * Applies equally to a `to`/`set` command's args, which are a props diff.\r\n * An expression is moved by a rename but handed to no value hook: a formula's\r\n * result cannot be converted by rewriting it, so it is noted and left as written.\r\n */\r\nexport function migrateNodeProps(registry: Registry, type: string, props: Record<string, unknown>): PropMigration {\r\n const ctor = registry.node(type)?.ctor;\r\n const evolution = ctor ? propEvolutionOf(ctor) : undefined;\r\n return evolution ? applyPropEvolution(evolution, props) : { props, changes: [], deprecated: [] };\r\n}\r\n\r\n/** @internal {@link migrateNodeProps} once the type's rules are in hand. */\r\nexport function applyPropEvolution(evolution: PropEvolution, props: Record<string, unknown>): PropMigration {\r\n const changes: PropNote[] = [];\r\n const deprecated: PropNote[] = [];\r\n let out: Record<string, unknown> | null = null;\r\n const write = () => (out ??= { ...props });\r\n const isExpression = (value: unknown) => expressionOps.collect(value, \"\").length > 0;\r\n\r\n const convert = (key: string, value: unknown, at: string): unknown => {\r\n const hook = evolution.migrate[key];\r\n if (!hook || value === undefined) return value;\r\n if (isExpression(value)) {\r\n changes.push({ prop: at, message: `\"${at}\" is an expression, so its value was left as written.` });\r\n return value;\r\n }\r\n return hook(value);\r\n };\r\n\r\n for (const [from, to] of Object.entries(evolution.renamed)) {\r\n if (!Object.hasOwn(props, from)) continue;\r\n const target = write();\r\n const value = convert(from, props[from], from);\r\n delete target[from];\r\n if (props[to] !== undefined) {\r\n changes.push({ prop: from, message: `\"${from}\" was renamed \"${to}\", which the row also sets; the old value was dropped.` });\r\n continue;\r\n }\r\n if (value === undefined) delete target[to];\r\n else target[to] = value;\r\n changes.push({ prop: from, message: `\"${from}\" was renamed \"${to}\".` });\r\n }\r\n\r\n for (const key of Object.keys(evolution.migrate)) {\r\n if (Object.hasOwn(evolution.renamed, key)) continue;\r\n const current = (out ?? props)[key];\r\n if (current === undefined) continue;\r\n const next = convert(key, current, key);\r\n if (next === current) continue;\r\n const target = write();\r\n if (next === undefined) delete target[key];\r\n else target[key] = next;\r\n changes.push({ prop: key, message: next === undefined ? `\"${key}\" was dropped back to its default.` : `\"${key}\" was migrated.` });\r\n }\r\n\r\n for (const [key, message] of Object.entries(evolution.deprecated)) {\r\n if ((out ?? props)[key] !== undefined) deprecated.push({ prop: key, message });\r\n }\r\n return { props: out ?? props, changes, deprecated };\r\n}\r\n"]}
@@ -1,4 +1,4 @@
1
- import type { Node } from "../nodes/node/node.js";
1
+ import type { Node } from "../components/trees/node/node.js";
2
2
  import type { Command } from "../tween/command.js";
3
3
  import type { EasingFunction } from "../tween/ease/type.js";
4
4
  import { type CommandArg, type CommandArgDescriptor } from "../tween/command-decorator.js";
@@ -11,14 +11,14 @@ import type { NodeSpec } from "./types.js";
11
11
  * A document names a node type, a command, a lerp and a shader with a string.
12
12
  * Something has to turn `"rect"` into a class and `"fillTo"` into an animation,
13
13
  * and that something is deliberately a registry rather than a table in the
14
- * database: node types are code — a class with `@property` declarations, a
15
- * `renderSelf`, and `@command()` methods — and code is versioned with the
14
+ * database: node types are code — a class with `property` declarations, a
15
+ * `renderSelf`, and `command()` methods — and code is versioned with the
16
16
  * library, not with the document.
17
17
  *
18
18
  * **It is an instance, not a module.** Every table here used to be a
19
19
  * module-scope `Map` behind a dozen free functions, which made a registration
20
20
  * a fact about the *process*: two engines in one process shared one vocabulary,
21
- * a decorated class was registered by the mere act of being imported, whichever
21
+ * a declared class was registered by the mere act of being imported, whichever
22
22
  * host loaded first won a contested key, and a test had to remember to call a
23
23
  * `clearRegistries()` that reached into three modules. A registry is now a value
24
24
  * with an owner — an `Engine`'s own, reached through `registerNode`/`registerShader`
@@ -89,7 +89,7 @@ export type VariableCommandFactory = (target: VariableTarget, args: Record<strin
89
89
  /**
90
90
  * How a variable's value interpolates between two states.
91
91
  *
92
- * The same shape every `@property` tween already has, widened to `unknown`
92
+ * The same shape every `property` tween already has, widened to `unknown`
93
93
  * because a variable's type is a fact of the document rather than of a class:
94
94
  * one holds a number, the next a colour string, the next a whole fill object.
95
95
  */
@@ -137,7 +137,7 @@ export type CommandTypeEntry = {
137
137
  /**
138
138
  * One node type's own command table.
139
139
  *
140
- * Built from the class's `@command()` methods — the **whole** prototype chain,
140
+ * Built from the class's `command()` methods — the **whole** prototype chain,
141
141
  * not just its own — because the table is per type. A `Card` extending `Rect`
142
142
  * answers to `fadeTo` for the same reason it answers to `.fadeTo()`: it has the
143
143
  * method. There is nothing here for two node types to collide over, so
@@ -150,13 +150,11 @@ export interface NodeTypeRecord {
150
150
  ctor: NodeConstructor;
151
151
  /** Its commands, by the key a document names them with. */
152
152
  commands: ReadonlyMap<string, NodeCommandEntry>;
153
- /** Commands it inherits and withdrew (`withdraw`): never offered, still dispatched for a stored document that names one. */
154
- withdrawn: ReadonlyMap<string, NodeCommandEntry>;
155
153
  /**
156
154
  * What the type declares about itself — see {@link NodeTypeDescriptor}.
157
155
  *
158
156
  * Always present, so a host reads one shape whether the type was registered
159
- * with a bare key, a full descriptor, or a decorated class.
157
+ * with a bare key, a full descriptor, or a component.
160
158
  */
161
159
  descriptor: NodeTypeDescriptor;
162
160
  }
@@ -165,12 +163,14 @@ export interface NodeCommandEntry {
165
163
  /** The method to call. */
166
164
  method: string;
167
165
  /**
168
- * Its leading parameters, from `@command({ args })`, always as descriptors.
166
+ * Its leading parameters, from `command({ args })`, always as descriptors.
169
167
  *
170
168
  * A bare name normalises to `{ key, kind: "unknown" }`, so a host reads one
171
169
  * shape whether the method bothered to describe its arguments or not.
172
170
  */
173
171
  args: readonly CommandArgDescriptor[];
172
+ /** Present and true for an entrance (`CommandMeta.entrance`), so a host can offer one when the node is added. */
173
+ entrance?: true;
174
174
  }
175
175
  /**
176
176
  * How a registry compiles and links a node authored as a TS source string
@@ -207,9 +207,9 @@ export interface DynamicNodeConfig {
207
207
  /** What a registry is seeded with, on top of the builtin vocabulary. */
208
208
  export interface RegistryOptions {
209
209
  /**
210
- * Custom node types — decorated classes, or explicit keys.
210
+ * Custom node types — components, or explicit keys.
211
211
  *
212
- * An array reads each class's `@node()` declaration; a record names the key
212
+ * An array reads each class's `node()` declaration; a record names the key
213
213
  * outright, which is also an assertion that the two agree (a rename on
214
214
  * either side throws here rather than surfacing as an unknown type at
215
215
  * render).
@@ -223,6 +223,13 @@ export interface RegistryOptions {
223
223
  eases?: Record<string, EasingFunction>;
224
224
  /** Enables {@link Registry.addNodeFromSource} — see {@link DynamicNodeConfig}. */
225
225
  dynamicNodes?: DynamicNodeConfig;
226
+ /**
227
+ * Fail a track's build on a node type or command this registry lacks, as
228
+ * builds did before placeholders. Off, the build stands an inert
229
+ * placeholder in for the node, skips the command, and records each in
230
+ * `buildErrors`. For a render whose output nobody inspects.
231
+ */
232
+ strict?: boolean;
226
233
  /**
227
234
  * Leave out everything the library itself ships. Only useful to a test
228
235
  * asserting on the seeding, or a host building a deliberately tiny
@@ -234,19 +241,21 @@ export interface RegistryOptions {
234
241
  export declare class Registry {
235
242
  /** Ceiling, so an import cannot evict a workspace's own shaders by volume. */
236
243
  static readonly MAX_SHADERS = 512;
244
+ /** See {@link RegistryOptions.strict}. */
245
+ readonly strict: boolean;
237
246
  constructor(options?: RegistryOptions);
238
247
  /**
239
248
  * Register a node class, with its commands and whatever else it declares.
240
249
  *
241
- * Takes a decorated class on its own, or a bare key / full
250
+ * Takes a component (or a class carrying a `node()` declaration) on its own, or a bare key / full
242
251
  * {@link NodeTypeDescriptor} plus the class. The descriptor is the code half
243
252
  * of what a component package used to restate in a `manifest.json` —
244
253
  * carried, never interpreted, so a host has one place to ask and no second
245
254
  * file to disagree with the class.
246
255
  *
247
- * The commands come off the class, so `@command()` is the only place a
256
+ * The commands come off the class, so `command()` is the only place a
248
257
  * node's animations are written down. Nothing is constructed to read them:
249
- * `@command` records onto the prototype, so an object *over* the prototype
258
+ * `command` records onto the prototype, so an object *over* the prototype
250
259
  * reaches the whole chain without running a constructor that may expect
251
260
  * props, build children, or touch a clock.
252
261
  *
@@ -269,11 +278,11 @@ export declare class Registry {
269
278
  replace?: boolean;
270
279
  }): this;
271
280
  /**
272
- * Compile a TS/JSX source string into a live node class and register it.
281
+ * Compile a TS source string into a live node type and register it.
273
282
  *
274
- * The script must `export default` a class carrying `@node(...)` — that
275
- * decorator is what supplies the registry key, exactly as {@link addNode}
276
- * already reads it off a statically-imported class. There is no separate
283
+ * The script must `export default` a component (`component2d({ key, … })`),
284
+ * whose `key` supplies the registry key, exactly as {@link addNode}
285
+ * already reads it off a statically-imported one. There is no separate
277
286
  * `key` parameter: one way to name a dynamic node's key, not two that
278
287
  * could disagree.
279
288
  *
@@ -295,6 +304,9 @@ export declare class Registry {
295
304
  /**
296
305
  * Build a node from its spec. Throws on an unknown type.
297
306
  *
307
+ * The props pass through the type's own evolution first (`migrateNodeProps`),
308
+ * so a row written before a prop was renamed still sets it.
309
+ *
298
310
  * `props` overrides the spec's own, which is how the timeline keeps an
299
311
  * expression out of a constructor: an expression-bound prop is left out of
300
312
  * what is passed here and written afterwards with `set()`. Constructors read
@@ -342,7 +354,7 @@ export declare class Registry {
342
354
  /**
343
355
  * Whether a node of `nodeTypeKey` takes `commandKey`: one its own table
344
356
  * publishes, or a node-less one that acts on a node (`to`, `fillTo`) unless
345
- * the method it runs is one the type lacks or withdrew. What a host offers a
357
+ * the method it runs is one the type lacks. What a host offers a
346
358
  * node is its table and the node-less commands it takes.
347
359
  */
348
360
  takesCommand(nodeTypeKey: string, commandKey: string): boolean;
@@ -440,13 +452,15 @@ export declare class Registry {
440
452
  /** One key, one factory — see {@link addNode} for why. */
441
453
  private _claimed;
442
454
  /**
443
- * A class's editable properties, read off its `@property` declarations.
455
+ * A class's editable properties, read off its `property` declarations.
444
456
  *
445
- * The whole prototype chain, so a `Card` extending `Rect` publishes the box
446
- * it inherits as well as what it adds — a host editing one edits every
447
- * control it actually has, without the subclass restating any of them.
457
+ * The whole prototype chain, so a component publishes the box its tree's
458
+ * base declares as well as its own entries — a host editing one edits every
459
+ * control it actually has.
448
460
  */
449
461
  private _describeProperties;
462
+ /** A component's `renamed` and `deprecated`, where a host reading the descriptor sees them. */
463
+ private _describeEvolution;
450
464
  /**
451
465
  * A type's dimension, read off the prototype without constructing one.
452
466
  *
@@ -458,7 +472,7 @@ export declare class Registry {
458
472
  private _describeHolds;
459
473
  /**
460
474
  * The control a value's own type implies. Only ever a fallback: a typed
461
- * decorator states its kind, and a plain `@property` may too.
475
+ * property states its kind, and a plain `property` may too.
462
476
  *
463
477
  * A function default is a *reactive binding*, not a value, so it says nothing
464
478
  * about the control; those declare their kind or take "unknown", which a host
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/document/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACvG,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,MAAM,EACd,MAAM,iCAAiC,CAAC;AAIzC,OAAO,KAAK,EAA0B,kBAAkB,EAAE,MAAM,mBAAm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