@motionscript/core 0.1.0 → 0.1.1-alpha.1

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 (1072) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/assets/asset-index.d.ts +1 -8
  3. package/dist/assets/asset-index.d.ts.map +1 -1
  4. package/dist/assets/asset-index.js +1 -8
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +10 -72
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +3 -29
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts +8 -20
  11. package/dist/assets/errors.d.ts.map +1 -1
  12. package/dist/assets/errors.js +8 -20
  13. package/dist/assets/errors.js.map +1 -1
  14. package/dist/assets/index.d.ts.map +1 -1
  15. package/dist/assets/index.js.map +1 -1
  16. package/dist/assets/manager.d.ts +9 -51
  17. package/dist/assets/manager.d.ts.map +1 -1
  18. package/dist/assets/manager.js +13 -78
  19. package/dist/assets/manager.js.map +1 -1
  20. package/dist/assets/record.d.ts +2 -18
  21. package/dist/assets/record.d.ts.map +1 -1
  22. package/dist/assets/record.js.map +1 -1
  23. package/dist/assets/scope.d.ts +3 -18
  24. package/dist/assets/scope.d.ts.map +1 -1
  25. package/dist/assets/scope.js +2 -11
  26. package/dist/assets/scope.js.map +1 -1
  27. package/dist/attributes/audio/effects/chain.d.ts +2 -12
  28. package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
  29. package/dist/attributes/audio/effects/chain.js +1 -7
  30. package/dist/attributes/audio/effects/chain.js.map +1 -1
  31. package/dist/attributes/audio/effects/registry.d.ts +3 -18
  32. package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
  33. package/dist/attributes/audio/effects/registry.js +4 -23
  34. package/dist/attributes/audio/effects/registry.js.map +1 -1
  35. package/dist/attributes/audio/ramp.d.ts +5 -38
  36. package/dist/attributes/audio/ramp.d.ts.map +1 -1
  37. package/dist/attributes/audio/ramp.js +3 -28
  38. package/dist/attributes/audio/ramp.js.map +1 -1
  39. package/dist/attributes/audio/request.d.ts +10 -80
  40. package/dist/attributes/audio/request.d.ts.map +1 -1
  41. package/dist/attributes/audio/request.js +1 -4
  42. package/dist/attributes/audio/request.js.map +1 -1
  43. package/dist/attributes/audio/schedule.d.ts +2 -12
  44. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  45. package/dist/attributes/audio/schedule.js +2 -11
  46. package/dist/attributes/audio/schedule.js.map +1 -1
  47. package/dist/attributes/audio/sound.d.ts +2 -26
  48. package/dist/attributes/audio/sound.d.ts.map +1 -1
  49. package/dist/attributes/audio/sound.js +1 -9
  50. package/dist/attributes/audio/sound.js.map +1 -1
  51. package/dist/attributes/audio/transition.d.ts +1 -8
  52. package/dist/attributes/audio/transition.d.ts.map +1 -1
  53. package/dist/attributes/audio/transition.js.map +1 -1
  54. package/dist/attributes/layout/alignment.d.ts +6 -38
  55. package/dist/attributes/layout/alignment.d.ts.map +1 -1
  56. package/dist/attributes/layout/alignment.js.map +1 -1
  57. package/dist/attributes/layout/insets.d.ts +2 -27
  58. package/dist/attributes/layout/insets.d.ts.map +1 -1
  59. package/dist/attributes/layout/insets.js.map +1 -1
  60. package/dist/attributes/layout/matrix2d.d.ts +29 -114
  61. package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js +26 -110
  63. package/dist/attributes/layout/matrix2d.js.map +1 -1
  64. package/dist/attributes/layout/size.d.ts +3 -25
  65. package/dist/attributes/layout/size.d.ts.map +1 -1
  66. package/dist/attributes/layout/size.js +2 -18
  67. package/dist/attributes/layout/size.js.map +1 -1
  68. package/dist/attributes/layout/space3d.d.ts +16 -79
  69. package/dist/attributes/layout/space3d.d.ts.map +1 -1
  70. package/dist/attributes/layout/space3d.js +17 -81
  71. package/dist/attributes/layout/space3d.js.map +1 -1
  72. package/dist/attributes/layout/transform3d.d.ts +2 -23
  73. package/dist/attributes/layout/transform3d.d.ts.map +1 -1
  74. package/dist/attributes/layout/transform3d.js +1 -7
  75. package/dist/attributes/layout/transform3d.js.map +1 -1
  76. package/dist/attributes/layout/world-transform.d.ts +2 -16
  77. package/dist/attributes/layout/world-transform.d.ts.map +1 -1
  78. package/dist/attributes/layout/world-transform.js.map +1 -1
  79. package/dist/attributes/properties/decorator.d.ts +13 -73
  80. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  81. package/dist/attributes/properties/decorator.js +9 -40
  82. package/dist/attributes/properties/decorator.js.map +1 -1
  83. package/dist/attributes/properties/typed.d.ts +6 -45
  84. package/dist/attributes/properties/typed.d.ts.map +1 -1
  85. package/dist/attributes/properties/typed.js +6 -37
  86. package/dist/attributes/properties/typed.js.map +1 -1
  87. package/dist/attributes/render3d/orbit.d.ts +11 -83
  88. package/dist/attributes/render3d/orbit.d.ts.map +1 -1
  89. package/dist/attributes/render3d/orbit.js +10 -73
  90. package/dist/attributes/render3d/orbit.js.map +1 -1
  91. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
  92. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  94. package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
  95. package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
  96. package/dist/attributes/shape/corners/corner-style.js +2 -12
  97. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  98. package/dist/attributes/shape/corners/corners.d.ts +2 -21
  99. package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js +2 -12
  101. package/dist/attributes/shape/corners/corners.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
  103. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  104. package/dist/attributes/shape/effects/backdrop.js +3 -26
  105. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  106. package/dist/attributes/shape/effects/chain.d.ts +36 -328
  107. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  108. package/dist/attributes/shape/effects/chain.js +24 -242
  109. package/dist/attributes/shape/effects/chain.js.map +1 -1
  110. package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
  111. package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
  112. package/dist/attributes/shape/effects/effect-data.js +6 -33
  113. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
  115. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
  117. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
  119. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
  121. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
  123. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
  125. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
  127. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
  129. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
  131. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/blur.js +0 -1
  133. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
  135. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
  137. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
  139. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
  141. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  142. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
  143. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  144. package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
  145. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  146. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
  147. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  148. package/dist/attributes/shape/effects/implementations/curves.js +1 -6
  149. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  150. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
  151. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  152. package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
  153. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  154. package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
  155. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  156. package/dist/attributes/shape/effects/implementations/dither.js +1 -7
  157. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  158. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
  159. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  160. package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
  161. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  162. package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
  163. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  164. package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
  165. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  166. package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
  167. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  168. package/dist/attributes/shape/effects/implementations/edges.js +0 -1
  169. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  170. package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
  171. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  172. package/dist/attributes/shape/effects/implementations/glass.js +0 -1
  173. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  174. package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
  175. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  176. package/dist/attributes/shape/effects/implementations/glow.js +1 -9
  177. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  178. package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
  179. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  180. package/dist/attributes/shape/effects/implementations/grain.js +0 -1
  181. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  182. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
  183. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  184. package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
  185. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  186. package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
  187. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  188. package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
  189. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  190. package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
  191. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  192. package/dist/attributes/shape/effects/implementations/invert.js +0 -1
  193. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  194. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
  195. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  196. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
  197. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  198. package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
  199. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  200. package/dist/attributes/shape/effects/implementations/lut.js +2 -8
  201. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  202. package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
  203. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  204. package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
  205. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  206. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
  207. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  208. package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
  209. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  210. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
  211. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  212. package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
  213. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  214. package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
  215. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  216. package/dist/attributes/shape/effects/implementations/outline.js +0 -1
  217. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  218. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
  219. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  220. package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
  221. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  222. package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
  223. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  224. package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
  225. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  226. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
  227. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  228. package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
  229. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  230. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
  231. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  232. package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
  233. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  234. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
  235. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  236. package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
  237. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  238. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
  239. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  240. package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
  241. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  242. package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
  243. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  244. package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
  245. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  246. package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
  247. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  248. package/dist/attributes/shape/effects/implementations/shader.js +2 -9
  249. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  250. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
  251. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  252. package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
  253. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  254. package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
  255. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  256. package/dist/attributes/shape/effects/implementations/streak.js +0 -1
  257. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  258. package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
  259. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  260. package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
  261. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  262. package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
  263. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  264. package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
  265. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  266. package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
  267. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  268. package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
  269. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  270. package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
  271. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  272. package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
  273. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  274. package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
  275. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  276. package/dist/attributes/shape/effects/implementations/wave.js +1 -5
  277. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  278. package/dist/attributes/shape/effects/registry.d.ts +6 -41
  279. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  280. package/dist/attributes/shape/effects/registry.js +7 -45
  281. package/dist/attributes/shape/effects/registry.js.map +1 -1
  282. package/dist/attributes/shape/effects/spec.d.ts +6 -30
  283. package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
  284. package/dist/attributes/shape/effects/spec.js +3 -9
  285. package/dist/attributes/shape/effects/spec.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.d.ts +1 -17
  287. package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
  288. package/dist/attributes/shape/fill/blend.js +2 -15
  289. package/dist/attributes/shape/fill/blend.js.map +1 -1
  290. package/dist/attributes/shape/fill/chain.d.ts +17 -125
  291. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  292. package/dist/attributes/shape/fill/chain.js +22 -109
  293. package/dist/attributes/shape/fill/chain.js.map +1 -1
  294. package/dist/attributes/shape/fill/coerce.d.ts +10 -35
  295. package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
  296. package/dist/attributes/shape/fill/coerce.js +12 -47
  297. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  298. package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
  299. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  300. package/dist/attributes/shape/fill/color/parser.js +15 -91
  301. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  302. package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
  303. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
  304. package/dist/attributes/shape/fill/gradient-stops.js +2 -13
  305. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  306. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
  307. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
  308. package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
  309. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
  311. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
  312. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  313. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
  314. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  315. package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
  316. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  317. package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
  318. package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
  319. package/dist/attributes/shape/fill/implementations/grid.js +2 -8
  320. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  321. package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
  322. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  323. package/dist/attributes/shape/fill/implementations/image.js +6 -23
  324. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  325. package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
  326. package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
  327. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  328. package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
  329. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  330. package/dist/attributes/shape/fill/implementations/shader.js +5 -17
  331. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  332. package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
  333. package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
  334. package/dist/attributes/shape/fill/implementations/video.js +12 -50
  335. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  336. package/dist/attributes/shape/fill/lerp.d.ts +2 -13
  337. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  338. package/dist/attributes/shape/fill/lerp.js +2 -9
  339. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  340. package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
  341. package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
  342. package/dist/attributes/shape/fill/media-preset.js +8 -35
  343. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  344. package/dist/attributes/shape/fill/registry.d.ts +2 -26
  345. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  346. package/dist/attributes/shape/fill/registry.js +5 -40
  347. package/dist/attributes/shape/fill/registry.js.map +1 -1
  348. package/dist/attributes/shape/fill/union.d.ts +6 -30
  349. package/dist/attributes/shape/fill/union.d.ts.map +1 -1
  350. package/dist/attributes/shape/fill/union.js +1 -9
  351. package/dist/attributes/shape/fill/union.js.map +1 -1
  352. package/dist/attributes/shape/filters/chain.d.ts +15 -168
  353. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  354. package/dist/attributes/shape/filters/chain.js +8 -132
  355. package/dist/attributes/shape/filters/chain.js.map +1 -1
  356. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
  357. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  358. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  359. package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
  360. package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
  361. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  362. package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
  363. package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
  364. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  365. package/dist/attributes/shape/filters/index.d.ts +1 -6
  366. package/dist/attributes/shape/filters/index.d.ts.map +1 -1
  367. package/dist/attributes/shape/filters/index.js +0 -2
  368. package/dist/attributes/shape/filters/index.js.map +1 -1
  369. package/dist/attributes/shape/filters/registry.d.ts +5 -35
  370. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  371. package/dist/attributes/shape/filters/registry.js +7 -50
  372. package/dist/attributes/shape/filters/registry.js.map +1 -1
  373. package/dist/attributes/shape/filters/union.d.ts +10 -51
  374. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  375. package/dist/attributes/shape/filters/union.js.map +1 -1
  376. package/dist/attributes/shape/path/anchors.d.ts +18 -106
  377. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  378. package/dist/attributes/shape/path/anchors.js +15 -124
  379. package/dist/attributes/shape/path/anchors.js.map +1 -1
  380. package/dist/attributes/shape/path/bezier.d.ts +6 -54
  381. package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
  382. package/dist/attributes/shape/path/bezier.js +10 -98
  383. package/dist/attributes/shape/path/bezier.js.map +1 -1
  384. package/dist/attributes/shape/path/index.d.ts +1 -11
  385. package/dist/attributes/shape/path/index.d.ts.map +1 -1
  386. package/dist/attributes/shape/path/index.js +1 -11
  387. package/dist/attributes/shape/path/index.js.map +1 -1
  388. package/dist/attributes/shape/path/measure.d.ts +5 -41
  389. package/dist/attributes/shape/path/measure.d.ts.map +1 -1
  390. package/dist/attributes/shape/path/measure.js +8 -57
  391. package/dist/attributes/shape/path/measure.js.map +1 -1
  392. package/dist/attributes/shape/path/morph.d.ts +4 -41
  393. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  394. package/dist/attributes/shape/path/morph.js +17 -117
  395. package/dist/attributes/shape/path/morph.js.map +1 -1
  396. package/dist/attributes/shape/path/ops.d.ts +5 -19
  397. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  398. package/dist/attributes/shape/path/ops.js.map +1 -1
  399. package/dist/attributes/shape/path/types.d.ts +10 -67
  400. package/dist/attributes/shape/path/types.d.ts.map +1 -1
  401. package/dist/attributes/shape/path/types.js +0 -1
  402. package/dist/attributes/shape/path/types.js.map +1 -1
  403. package/dist/attributes/shape/path/walk.d.ts +9 -63
  404. package/dist/attributes/shape/path/walk.d.ts.map +1 -1
  405. package/dist/attributes/shape/path/walk.js +21 -100
  406. package/dist/attributes/shape/path/walk.js.map +1 -1
  407. package/dist/attributes/shape/shaders/language.d.ts +2 -14
  408. package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
  409. package/dist/attributes/shape/shaders/language.js +1 -8
  410. package/dist/attributes/shape/shaders/language.js.map +1 -1
  411. package/dist/attributes/shape/shaders/pack.d.ts +13 -78
  412. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  413. package/dist/attributes/shape/shaders/pack.js +1 -10
  414. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  415. package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
  416. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  417. package/dist/attributes/shape/shaders/resolve.js +3 -28
  418. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  419. package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
  420. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
  421. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  422. package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
  423. package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
  424. package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
  425. package/dist/attributes/shape/shadow/shadow.js +0 -3
  426. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  427. package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
  428. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  429. package/dist/attributes/shape/stroke/stroke.js +0 -6
  430. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  431. package/dist/attributes/shared/operators.d.ts +1 -8
  432. package/dist/attributes/shared/operators.d.ts.map +1 -1
  433. package/dist/attributes/shared/operators.js.map +1 -1
  434. package/dist/attributes/text/index.d.ts +1 -11
  435. package/dist/attributes/text/index.d.ts.map +1 -1
  436. package/dist/attributes/text/index.js +1 -11
  437. package/dist/attributes/text/index.js.map +1 -1
  438. package/dist/attributes/text/ops.d.ts +4 -30
  439. package/dist/attributes/text/ops.d.ts.map +1 -1
  440. package/dist/attributes/text/ops.js +7 -23
  441. package/dist/attributes/text/ops.js.map +1 -1
  442. package/dist/attributes/text/types.d.ts +5 -28
  443. package/dist/attributes/text/types.d.ts.map +1 -1
  444. package/dist/attributes/text/types.js.map +1 -1
  445. package/dist/browser/chunks/chunk-5GLXFSCC.js +13 -0
  446. package/dist/browser/chunks/chunk-5GLXFSCC.js.map +7 -0
  447. package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
  448. package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
  449. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  450. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  451. package/dist/browser/chunks/chunk-MNMIIGNE.js +6 -0
  452. package/dist/browser/chunks/chunk-MNMIIGNE.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/style.d.ts +38 -0
  510. package/dist/components/factory/style.d.ts.map +1 -0
  511. package/dist/components/factory/style.js +104 -0
  512. package/dist/components/factory/style.js.map +1 -0
  513. package/dist/components/factory/types.d.ts +9 -0
  514. package/dist/components/factory/types.d.ts.map +1 -1
  515. package/dist/components/factory/types.js +11 -0
  516. package/dist/components/factory/types.js.map +1 -1
  517. package/dist/components/factory/views.d.ts.map +1 -1
  518. package/dist/components/factory/views.js +0 -2
  519. package/dist/components/factory/views.js.map +1 -1
  520. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  521. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  522. package/dist/components/trees/2d/group-bounds.js +3 -22
  523. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  524. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  525. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  527. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  528. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  529. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-motion.js +3 -31
  531. package/dist/components/trees/2d/node-motion.js.map +1 -1
  532. package/dist/components/trees/2d/node-render.d.ts +3 -20
  533. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-render.js +4 -23
  535. package/dist/components/trees/2d/node-render.js.map +1 -1
  536. package/dist/components/trees/2d/node-space.d.ts +4 -23
  537. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node-space.js +3 -17
  539. package/dist/components/trees/2d/node-space.js.map +1 -1
  540. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  541. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  542. package/dist/components/trees/2d/node-transform.js +4 -33
  543. package/dist/components/trees/2d/node-transform.js.map +1 -1
  544. package/dist/components/trees/2d/node2d.d.ts +112 -622
  545. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  546. package/dist/components/trees/2d/node2d.js +131 -605
  547. package/dist/components/trees/2d/node2d.js.map +1 -1
  548. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  549. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  550. package/dist/components/trees/audio/node-audio.js +18 -68
  551. package/dist/components/trees/audio/node-audio.js.map +1 -1
  552. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  553. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-editor-state.js +1 -13
  555. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  556. package/dist/components/trees/node/node-reactive.d.ts +6 -53
  557. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  558. package/dist/components/trees/node/node-reactive.js +4 -33
  559. package/dist/components/trees/node/node-reactive.js.map +1 -1
  560. package/dist/components/trees/node/node-time.d.ts +2 -15
  561. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  562. package/dist/components/trees/node/node-time.js.map +1 -1
  563. package/dist/components/trees/node/node-walk.d.ts +7 -32
  564. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  565. package/dist/components/trees/node/node-walk.js +7 -32
  566. package/dist/components/trees/node/node-walk.js.map +1 -1
  567. package/dist/components/trees/node/node.d.ts +43 -248
  568. package/dist/components/trees/node/node.d.ts.map +1 -1
  569. package/dist/components/trees/node/node.js +51 -229
  570. package/dist/components/trees/node/node.js.map +1 -1
  571. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  572. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  573. package/dist/components/trees/root/canvas2d-node.js +7 -47
  574. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  575. package/dist/components/trees/three/node3d.d.ts +24 -112
  576. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  577. package/dist/components/trees/three/node3d.js +22 -104
  578. package/dist/components/trees/three/node3d.js.map +1 -1
  579. package/dist/document/audio.d.ts +9 -21
  580. package/dist/document/audio.d.ts.map +1 -1
  581. package/dist/document/audio.js +13 -28
  582. package/dist/document/audio.js.map +1 -1
  583. package/dist/document/builtins.d.ts +3 -9
  584. package/dist/document/builtins.d.ts.map +1 -1
  585. package/dist/document/builtins.js +43 -89
  586. package/dist/document/builtins.js.map +1 -1
  587. package/dist/document/command-traits.d.ts +14 -37
  588. package/dist/document/command-traits.d.ts.map +1 -1
  589. package/dist/document/command-traits.js +22 -39
  590. package/dist/document/command-traits.js.map +1 -1
  591. package/dist/document/deny-globals.d.ts +9 -43
  592. package/dist/document/deny-globals.d.ts.map +1 -1
  593. package/dist/document/deny-globals.js +18 -58
  594. package/dist/document/deny-globals.js.map +1 -1
  595. package/dist/document/diff.d.ts +6 -16
  596. package/dist/document/diff.d.ts.map +1 -1
  597. package/dist/document/diff.js +5 -11
  598. package/dist/document/diff.js.map +1 -1
  599. package/dist/document/doc-index.d.ts +5 -13
  600. package/dist/document/doc-index.d.ts.map +1 -1
  601. package/dist/document/doc-index.js +0 -2
  602. package/dist/document/doc-index.js.map +1 -1
  603. package/dist/document/expression/compile.d.ts +2 -2
  604. package/dist/document/expression/compile.d.ts.map +1 -1
  605. package/dist/document/expression/compile.js +8 -18
  606. package/dist/document/expression/compile.js.map +1 -1
  607. package/dist/document/expression/index.d.ts +11 -41
  608. package/dist/document/expression/index.d.ts.map +1 -1
  609. package/dist/document/expression/index.js +11 -41
  610. package/dist/document/expression/index.js.map +1 -1
  611. package/dist/document/expression/ops.d.ts +3 -12
  612. package/dist/document/expression/ops.d.ts.map +1 -1
  613. package/dist/document/expression/ops.js +4 -20
  614. package/dist/document/expression/ops.js.map +1 -1
  615. package/dist/document/expression/parse.d.ts +4 -14
  616. package/dist/document/expression/parse.d.ts.map +1 -1
  617. package/dist/document/expression/parse.js +34 -55
  618. package/dist/document/expression/parse.js.map +1 -1
  619. package/dist/document/expression/refs.d.ts +2 -8
  620. package/dist/document/expression/refs.d.ts.map +1 -1
  621. package/dist/document/expression/refs.js +2 -6
  622. package/dist/document/expression/refs.js.map +1 -1
  623. package/dist/document/expression/types.d.ts +18 -63
  624. package/dist/document/expression/types.d.ts.map +1 -1
  625. package/dist/document/expression/types.js +4 -15
  626. package/dist/document/expression/types.js.map +1 -1
  627. package/dist/document/expression/walk.d.ts +6 -20
  628. package/dist/document/expression/walk.d.ts.map +1 -1
  629. package/dist/document/expression/walk.js +18 -44
  630. package/dist/document/expression/walk.js.map +1 -1
  631. package/dist/document/index.js +2 -3
  632. package/dist/document/index.js.map +1 -1
  633. package/dist/document/migrate.d.ts +7 -22
  634. package/dist/document/migrate.d.ts.map +1 -1
  635. package/dist/document/migrate.js +44 -15
  636. package/dist/document/migrate.js.map +1 -1
  637. package/dist/document/missing-node.d.ts +4 -11
  638. package/dist/document/missing-node.d.ts.map +1 -1
  639. package/dist/document/missing-node.js +2 -5
  640. package/dist/document/missing-node.js.map +1 -1
  641. package/dist/document/node-decorator.d.ts +12 -53
  642. package/dist/document/node-decorator.d.ts.map +1 -1
  643. package/dist/document/node-decorator.js +16 -57
  644. package/dist/document/node-decorator.js.map +1 -1
  645. package/dist/document/node-descriptor.d.ts +25 -62
  646. package/dist/document/node-descriptor.d.ts.map +1 -1
  647. package/dist/document/node-descriptor.js.map +1 -1
  648. package/dist/document/placement.d.ts +18 -41
  649. package/dist/document/placement.d.ts.map +1 -1
  650. package/dist/document/placement.js +4 -11
  651. package/dist/document/placement.js.map +1 -1
  652. package/dist/document/project.d.ts +19 -52
  653. package/dist/document/project.d.ts.map +1 -1
  654. package/dist/document/project.js +2 -6
  655. package/dist/document/project.js.map +1 -1
  656. package/dist/document/prop-evolution.d.ts +10 -20
  657. package/dist/document/prop-evolution.d.ts.map +1 -1
  658. package/dist/document/prop-evolution.js +3 -7
  659. package/dist/document/prop-evolution.js.map +1 -1
  660. package/dist/document/registry.d.ts +80 -318
  661. package/dist/document/registry.d.ts.map +1 -1
  662. package/dist/document/registry.js +43 -147
  663. package/dist/document/registry.js.map +1 -1
  664. package/dist/document/settled-index.d.ts +11 -23
  665. package/dist/document/settled-index.d.ts.map +1 -1
  666. package/dist/document/settled-index.js +15 -34
  667. package/dist/document/settled-index.js.map +1 -1
  668. package/dist/document/timeline-patch.d.ts +6 -15
  669. package/dist/document/timeline-patch.d.ts.map +1 -1
  670. package/dist/document/timeline-patch.js +12 -21
  671. package/dist/document/timeline-patch.js.map +1 -1
  672. package/dist/document/timeline.d.ts +56 -263
  673. package/dist/document/timeline.d.ts.map +1 -1
  674. package/dist/document/timeline.js +71 -275
  675. package/dist/document/timeline.js.map +1 -1
  676. package/dist/document/types.d.ts +90 -264
  677. package/dist/document/types.d.ts.map +1 -1
  678. package/dist/document/types.js +13 -30
  679. package/dist/document/types.js.map +1 -1
  680. package/dist/document/validate.d.ts +10 -40
  681. package/dist/document/validate.d.ts.map +1 -1
  682. package/dist/document/validate.js +72 -137
  683. package/dist/document/validate.js.map +1 -1
  684. package/dist/document/vocabulary.d.ts +4 -7
  685. package/dist/document/vocabulary.d.ts.map +1 -1
  686. package/dist/document/vocabulary.js +0 -1
  687. package/dist/document/vocabulary.js.map +1 -1
  688. package/dist/experimental.d.ts +2 -0
  689. package/dist/experimental.d.ts.map +1 -1
  690. package/dist/index.d.ts +0 -1
  691. package/dist/index.d.ts.map +1 -1
  692. package/dist/index.js +0 -1
  693. package/dist/index.js.map +1 -1
  694. package/dist/layout/bounds.d.ts +1 -11
  695. package/dist/layout/bounds.d.ts.map +1 -1
  696. package/dist/layout/bounds.js.map +1 -1
  697. package/dist/layout/flex.d.ts +6 -20
  698. package/dist/layout/flex.d.ts.map +1 -1
  699. package/dist/layout/flex.js +7 -28
  700. package/dist/layout/flex.js.map +1 -1
  701. package/dist/layout/ops.d.ts +2 -11
  702. package/dist/layout/ops.d.ts.map +1 -1
  703. package/dist/layout/ops.js +2 -22
  704. package/dist/layout/ops.js.map +1 -1
  705. package/dist/layout/types.d.ts +11 -55
  706. package/dist/layout/types.d.ts.map +1 -1
  707. package/dist/layout/types.js.map +1 -1
  708. package/dist/platform/audio-sink.d.ts +7 -43
  709. package/dist/platform/audio-sink.d.ts.map +1 -1
  710. package/dist/platform/audio-sink.js +4 -29
  711. package/dist/platform/audio-sink.js.map +1 -1
  712. package/dist/platform/exporter.d.ts +5 -31
  713. package/dist/platform/exporter.d.ts.map +1 -1
  714. package/dist/platform/exporter.js.map +1 -1
  715. package/dist/platform/stepped-clock.d.ts +1 -16
  716. package/dist/platform/stepped-clock.d.ts.map +1 -1
  717. package/dist/platform/stepped-clock.js +1 -16
  718. package/dist/platform/stepped-clock.js.map +1 -1
  719. package/dist/platform/storage-adapter.d.ts +8 -68
  720. package/dist/platform/storage-adapter.d.ts.map +1 -1
  721. package/dist/platform/storage-adapter.js +8 -60
  722. package/dist/platform/storage-adapter.js.map +1 -1
  723. package/dist/platform/ticker.d.ts +11 -45
  724. package/dist/platform/ticker.d.ts.map +1 -1
  725. package/dist/platform/ticker.js +10 -37
  726. package/dist/platform/ticker.js.map +1 -1
  727. package/dist/project/config.d.ts +4 -14
  728. package/dist/project/config.d.ts.map +1 -1
  729. package/dist/project/config.js.map +1 -1
  730. package/dist/project/tree.d.ts +6 -35
  731. package/dist/project/tree.d.ts.map +1 -1
  732. package/dist/project/tree.js +1 -8
  733. package/dist/project/tree.js.map +1 -1
  734. package/dist/props/host.d.ts +2 -13
  735. package/dist/props/host.d.ts.map +1 -1
  736. package/dist/props/host.js.map +1 -1
  737. package/dist/props/layout.d.ts +1 -12
  738. package/dist/props/layout.d.ts.map +1 -1
  739. package/dist/props/layout.js +1 -12
  740. package/dist/props/layout.js.map +1 -1
  741. package/dist/props/observer.d.ts +1 -7
  742. package/dist/props/observer.d.ts.map +1 -1
  743. package/dist/props/observer.js.map +1 -1
  744. package/dist/props/slot.d.ts +6 -19
  745. package/dist/props/slot.d.ts.map +1 -1
  746. package/dist/props/slot.js +5 -14
  747. package/dist/props/slot.js.map +1 -1
  748. package/dist/render/canvas-render-context2d.d.ts +8 -68
  749. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  750. package/dist/render/canvas-render-context2d.js +8 -69
  751. package/dist/render/canvas-render-context2d.js.map +1 -1
  752. package/dist/render/clip-contains.d.ts +2 -16
  753. package/dist/render/clip-contains.d.ts.map +1 -1
  754. package/dist/render/clip-contains.js +21 -82
  755. package/dist/render/clip-contains.js.map +1 -1
  756. package/dist/render/clip.d.ts +7 -25
  757. package/dist/render/clip.d.ts.map +1 -1
  758. package/dist/render/clip.js +5 -17
  759. package/dist/render/clip.js.map +1 -1
  760. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  761. package/dist/render/descriptors/ellipse.js +0 -1
  762. package/dist/render/descriptors/ellipse.js.map +1 -1
  763. package/dist/render/descriptors/line.d.ts.map +1 -1
  764. package/dist/render/descriptors/line.js +0 -1
  765. package/dist/render/descriptors/line.js.map +1 -1
  766. package/dist/render/descriptors/path-builder.d.ts +4 -32
  767. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  768. package/dist/render/descriptors/path-builder.js +3 -25
  769. package/dist/render/descriptors/path-builder.js.map +1 -1
  770. package/dist/render/descriptors/path.d.ts +1 -11
  771. package/dist/render/descriptors/path.d.ts.map +1 -1
  772. package/dist/render/descriptors/path.js +0 -1
  773. package/dist/render/descriptors/path.js.map +1 -1
  774. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  775. package/dist/render/descriptors/polygon.js +0 -1
  776. package/dist/render/descriptors/polygon.js.map +1 -1
  777. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  778. package/dist/render/descriptors/polygram.js +0 -1
  779. package/dist/render/descriptors/polygram.js.map +1 -1
  780. package/dist/render/descriptors/rect.d.ts.map +1 -1
  781. package/dist/render/descriptors/rect.js +0 -1
  782. package/dist/render/descriptors/rect.js.map +1 -1
  783. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  784. package/dist/render/descriptors/richtext.js +0 -1
  785. package/dist/render/descriptors/richtext.js.map +1 -1
  786. package/dist/render/descriptors/shape.d.ts +17 -77
  787. package/dist/render/descriptors/shape.d.ts.map +1 -1
  788. package/dist/render/descriptors/shape.js +13 -47
  789. package/dist/render/descriptors/shape.js.map +1 -1
  790. package/dist/render/descriptors/text.d.ts +15 -94
  791. package/dist/render/descriptors/text.d.ts.map +1 -1
  792. package/dist/render/descriptors/text.js +8 -50
  793. package/dist/render/descriptors/text.js.map +1 -1
  794. package/dist/render/descriptors/transform.d.ts +5 -16
  795. package/dist/render/descriptors/transform.d.ts.map +1 -1
  796. package/dist/render/descriptors/transform.js +1 -17
  797. package/dist/render/descriptors/transform.js.map +1 -1
  798. package/dist/render/graphics2d.d.ts +24 -116
  799. package/dist/render/graphics2d.d.ts.map +1 -1
  800. package/dist/render/graphics2d.js +23 -108
  801. package/dist/render/graphics2d.js.map +1 -1
  802. package/dist/render/measure-context.d.ts +5 -29
  803. package/dist/render/measure-context.d.ts.map +1 -1
  804. package/dist/render/measure-context.js.map +1 -1
  805. package/dist/render/null-render-context.d.ts +2 -20
  806. package/dist/render/null-render-context.d.ts.map +1 -1
  807. package/dist/render/null-render-context.js +2 -20
  808. package/dist/render/null-render-context.js.map +1 -1
  809. package/dist/render/render-context2d.d.ts +52 -208
  810. package/dist/render/render-context2d.d.ts.map +1 -1
  811. package/dist/render/render-context2d.js.map +1 -1
  812. package/dist/render/surface.d.ts +2 -19
  813. package/dist/render/surface.d.ts.map +1 -1
  814. package/dist/render/surface.js.map +1 -1
  815. package/dist/render/text-defaults.d.ts +1 -17
  816. package/dist/render/text-defaults.d.ts.map +1 -1
  817. package/dist/render/text-defaults.js +6 -40
  818. package/dist/render/text-defaults.js.map +1 -1
  819. package/dist/render/text-layout.d.ts +12 -55
  820. package/dist/render/text-layout.d.ts.map +1 -1
  821. package/dist/render/text-layout.js +2 -16
  822. package/dist/render/text-layout.js.map +1 -1
  823. package/dist/render3d/bounds3d.d.ts +10 -32
  824. package/dist/render3d/bounds3d.d.ts.map +1 -1
  825. package/dist/render3d/bounds3d.js +2 -12
  826. package/dist/render3d/bounds3d.js.map +1 -1
  827. package/dist/render3d/builders.d.ts +8 -35
  828. package/dist/render3d/builders.d.ts.map +1 -1
  829. package/dist/render3d/builders.js +8 -35
  830. package/dist/render3d/builders.js.map +1 -1
  831. package/dist/render3d/camera.d.ts +10 -57
  832. package/dist/render3d/camera.d.ts.map +1 -1
  833. package/dist/render3d/camera.js +4 -26
  834. package/dist/render3d/camera.js.map +1 -1
  835. package/dist/render3d/fill3d.d.ts +7 -45
  836. package/dist/render3d/fill3d.d.ts.map +1 -1
  837. package/dist/render3d/fill3d.js +15 -85
  838. package/dist/render3d/fill3d.js.map +1 -1
  839. package/dist/render3d/geometry.d.ts +18 -106
  840. package/dist/render3d/geometry.d.ts.map +1 -1
  841. package/dist/render3d/geometry.js +2 -20
  842. package/dist/render3d/geometry.js.map +1 -1
  843. package/dist/render3d/graphics3d.d.ts +29 -133
  844. package/dist/render3d/graphics3d.d.ts.map +1 -1
  845. package/dist/render3d/graphics3d.js +23 -110
  846. package/dist/render3d/graphics3d.js.map +1 -1
  847. package/dist/render3d/index.d.ts +1 -16
  848. package/dist/render3d/index.d.ts.map +1 -1
  849. package/dist/render3d/index.js +1 -16
  850. package/dist/render3d/index.js.map +1 -1
  851. package/dist/render3d/inert.d.ts.map +1 -1
  852. package/dist/render3d/inert.js +1 -14
  853. package/dist/render3d/inert.js.map +1 -1
  854. package/dist/render3d/light.d.ts +3 -26
  855. package/dist/render3d/light.d.ts.map +1 -1
  856. package/dist/render3d/light.js.map +1 -1
  857. package/dist/render3d/material.d.ts +13 -87
  858. package/dist/render3d/material.d.ts.map +1 -1
  859. package/dist/render3d/material.js +2 -16
  860. package/dist/render3d/material.js.map +1 -1
  861. package/dist/render3d/matrix4.d.ts +14 -68
  862. package/dist/render3d/matrix4.d.ts.map +1 -1
  863. package/dist/render3d/matrix4.js +11 -60
  864. package/dist/render3d/matrix4.js.map +1 -1
  865. package/dist/render3d/render-context3d.d.ts +13 -51
  866. package/dist/render3d/render-context3d.d.ts.map +1 -1
  867. package/dist/render3d/render-context3d.js +9 -21
  868. package/dist/render3d/render-context3d.js.map +1 -1
  869. package/dist/render3d/resources.d.ts +9 -53
  870. package/dist/render3d/resources.d.ts.map +1 -1
  871. package/dist/render3d/resources.js +8 -48
  872. package/dist/render3d/resources.js.map +1 -1
  873. package/dist/render3d/rounded-box.d.ts +7 -21
  874. package/dist/render3d/rounded-box.d.ts.map +1 -1
  875. package/dist/render3d/rounded-box.js +7 -46
  876. package/dist/render3d/rounded-box.js.map +1 -1
  877. package/dist/render3d/scene-settings.d.ts +20 -78
  878. package/dist/render3d/scene-settings.d.ts.map +1 -1
  879. package/dist/render3d/scene-settings.js.map +1 -1
  880. package/dist/render3d/scene3d.d.ts +11 -53
  881. package/dist/render3d/scene3d.d.ts.map +1 -1
  882. package/dist/render3d/scene3d.js +12 -59
  883. package/dist/render3d/scene3d.js.map +1 -1
  884. package/dist/render3d/segments.d.ts +2 -25
  885. package/dist/render3d/segments.d.ts.map +1 -1
  886. package/dist/render3d/segments.js +1 -11
  887. package/dist/render3d/segments.js.map +1 -1
  888. package/dist/render3d/texture.d.ts +25 -112
  889. package/dist/render3d/texture.d.ts.map +1 -1
  890. package/dist/render3d/texture.js +3 -27
  891. package/dist/render3d/texture.js.map +1 -1
  892. package/dist/render3d/tracking.d.ts +2 -19
  893. package/dist/render3d/tracking.d.ts.map +1 -1
  894. package/dist/render3d/tracking.js +2 -19
  895. package/dist/render3d/tracking.js.map +1 -1
  896. package/dist/render3d/transform.d.ts +14 -60
  897. package/dist/render3d/transform.d.ts.map +1 -1
  898. package/dist/render3d/transform.js +0 -2
  899. package/dist/render3d/transform.js.map +1 -1
  900. package/dist/render3d/vector3.d.ts +6 -48
  901. package/dist/render3d/vector3.d.ts.map +1 -1
  902. package/dist/render3d/vector3.js +4 -38
  903. package/dist/render3d/vector3.js.map +1 -1
  904. package/dist/render3d/walk.d.ts +3 -27
  905. package/dist/render3d/walk.d.ts.map +1 -1
  906. package/dist/render3d/walk.js +5 -33
  907. package/dist/render3d/walk.js.map +1 -1
  908. package/dist/runtime/asset-refine.d.ts +34 -20
  909. package/dist/runtime/asset-refine.d.ts.map +1 -1
  910. package/dist/runtime/asset-refine.js +127 -31
  911. package/dist/runtime/asset-refine.js.map +1 -1
  912. package/dist/runtime/asset-timeline.d.ts +14 -53
  913. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  914. package/dist/runtime/asset-timeline.js +6 -27
  915. package/dist/runtime/asset-timeline.js.map +1 -1
  916. package/dist/runtime/asset-update.d.ts +7 -26
  917. package/dist/runtime/asset-update.d.ts.map +1 -1
  918. package/dist/runtime/asset-update.js +6 -18
  919. package/dist/runtime/asset-update.js.map +1 -1
  920. package/dist/runtime/audio-index.d.ts +0 -2
  921. package/dist/runtime/audio-index.d.ts.map +1 -1
  922. package/dist/runtime/audio-index.js +0 -2
  923. package/dist/runtime/audio-index.js.map +1 -1
  924. package/dist/runtime/builtin-context.d.ts +3 -9
  925. package/dist/runtime/builtin-context.d.ts.map +1 -1
  926. package/dist/runtime/builtin-context.js +3 -9
  927. package/dist/runtime/builtin-context.js.map +1 -1
  928. package/dist/runtime/clip-instance.d.ts +12 -39
  929. package/dist/runtime/clip-instance.d.ts.map +1 -1
  930. package/dist/runtime/clip-instance.js +21 -45
  931. package/dist/runtime/clip-instance.js.map +1 -1
  932. package/dist/runtime/clip-store.d.ts +26 -68
  933. package/dist/runtime/clip-store.d.ts.map +1 -1
  934. package/dist/runtime/clip-store.js +47 -81
  935. package/dist/runtime/clip-store.js.map +1 -1
  936. package/dist/runtime/engine.d.ts +31 -85
  937. package/dist/runtime/engine.d.ts.map +1 -1
  938. package/dist/runtime/engine.js +16 -49
  939. package/dist/runtime/engine.js.map +1 -1
  940. package/dist/runtime/frame-time.d.ts +4 -15
  941. package/dist/runtime/frame-time.d.ts.map +1 -1
  942. package/dist/runtime/frame-time.js +5 -12
  943. package/dist/runtime/frame-time.js.map +1 -1
  944. package/dist/runtime/index.d.ts +0 -1
  945. package/dist/runtime/index.d.ts.map +1 -1
  946. package/dist/runtime/index.js +0 -1
  947. package/dist/runtime/index.js.map +1 -1
  948. package/dist/runtime/node-picking.d.ts +59 -139
  949. package/dist/runtime/node-picking.d.ts.map +1 -1
  950. package/dist/runtime/node-picking.js +87 -157
  951. package/dist/runtime/node-picking.js.map +1 -1
  952. package/dist/runtime/node-picking3d.d.ts +39 -96
  953. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  954. package/dist/runtime/node-picking3d.js +98 -141
  955. package/dist/runtime/node-picking3d.js.map +1 -1
  956. package/dist/runtime/placement.d.ts +8 -17
  957. package/dist/runtime/placement.d.ts.map +1 -1
  958. package/dist/runtime/placement.js +7 -16
  959. package/dist/runtime/placement.js.map +1 -1
  960. package/dist/runtime/playback-controller.d.ts +78 -207
  961. package/dist/runtime/playback-controller.d.ts.map +1 -1
  962. package/dist/runtime/playback-controller.js +111 -226
  963. package/dist/runtime/playback-controller.js.map +1 -1
  964. package/dist/runtime/playback.d.ts +6 -14
  965. package/dist/runtime/playback.d.ts.map +1 -1
  966. package/dist/runtime/playback.js +6 -14
  967. package/dist/runtime/playback.js.map +1 -1
  968. package/dist/runtime/project-assets.d.ts +6 -14
  969. package/dist/runtime/project-assets.d.ts.map +1 -1
  970. package/dist/runtime/project-assets.js +7 -16
  971. package/dist/runtime/project-assets.js.map +1 -1
  972. package/dist/runtime/session.d.ts +22 -45
  973. package/dist/runtime/session.d.ts.map +1 -1
  974. package/dist/runtime/session.js +26 -46
  975. package/dist/runtime/session.js.map +1 -1
  976. package/dist/runtime/settle.d.ts +4 -10
  977. package/dist/runtime/settle.d.ts.map +1 -1
  978. package/dist/runtime/settle.js +4 -10
  979. package/dist/runtime/settle.js.map +1 -1
  980. package/dist/runtime/state-evaluator.d.ts +15 -37
  981. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  982. package/dist/runtime/state-evaluator.js +27 -44
  983. package/dist/runtime/state-evaluator.js.map +1 -1
  984. package/dist/runtime/text-geometry.d.ts +18 -47
  985. package/dist/runtime/text-geometry.d.ts.map +1 -1
  986. package/dist/runtime/text-geometry.js +13 -27
  987. package/dist/runtime/text-geometry.js.map +1 -1
  988. package/dist/sdk/index.d.ts +2 -7
  989. package/dist/sdk/index.d.ts.map +1 -1
  990. package/dist/sdk/index.js +30 -138
  991. package/dist/sdk/index.js.map +1 -1
  992. package/dist/tween/command-decorator.d.ts +6 -26
  993. package/dist/tween/command-decorator.d.ts.map +1 -1
  994. package/dist/tween/command-decorator.js +1 -6
  995. package/dist/tween/command-decorator.js.map +1 -1
  996. package/dist/tween/command.d.ts +6 -53
  997. package/dist/tween/command.d.ts.map +1 -1
  998. package/dist/tween/command.js +5 -40
  999. package/dist/tween/command.js.map +1 -1
  1000. package/dist/tween/ease/curve.d.ts +2 -17
  1001. package/dist/tween/ease/curve.d.ts.map +1 -1
  1002. package/dist/tween/ease/curve.js +1 -6
  1003. package/dist/tween/ease/curve.js.map +1 -1
  1004. package/dist/tween/ease/describe.d.ts +0 -11
  1005. package/dist/tween/ease/describe.d.ts.map +1 -1
  1006. package/dist/tween/ease/describe.js +0 -23
  1007. package/dist/tween/ease/describe.js.map +1 -1
  1008. package/dist/tween/ease/spec.d.ts +2 -18
  1009. package/dist/tween/ease/spec.d.ts.map +1 -1
  1010. package/dist/tween/ease/spec.js.map +1 -1
  1011. package/dist/tween/inert.d.ts +1 -14
  1012. package/dist/tween/inert.d.ts.map +1 -1
  1013. package/dist/tween/inert.js +1 -14
  1014. package/dist/tween/inert.js.map +1 -1
  1015. package/dist/tween/lerp.d.ts +2 -26
  1016. package/dist/tween/lerp.d.ts.map +1 -1
  1017. package/dist/tween/lerp.js +2 -26
  1018. package/dist/tween/lerp.js.map +1 -1
  1019. package/dist/tween/loop.d.ts +9 -50
  1020. package/dist/tween/loop.d.ts.map +1 -1
  1021. package/dist/tween/loop.js +6 -31
  1022. package/dist/tween/loop.js.map +1 -1
  1023. package/dist/tween/prepare.d.ts +2 -30
  1024. package/dist/tween/prepare.d.ts.map +1 -1
  1025. package/dist/tween/prepare.js +2 -30
  1026. package/dist/tween/prepare.js.map +1 -1
  1027. package/dist/tween/stepper.d.ts +4 -25
  1028. package/dist/tween/stepper.d.ts.map +1 -1
  1029. package/dist/tween/stepper.js.map +1 -1
  1030. package/dist/tween/to-command.d.ts +1 -8
  1031. package/dist/tween/to-command.d.ts.map +1 -1
  1032. package/dist/tween/to-command.js +2 -25
  1033. package/dist/tween/to-command.js.map +1 -1
  1034. package/dist/util/context.d.ts +4 -29
  1035. package/dist/util/context.d.ts.map +1 -1
  1036. package/dist/util/context.js +3 -15
  1037. package/dist/util/context.js.map +1 -1
  1038. package/dist/util/csv.d.ts +4 -29
  1039. package/dist/util/csv.d.ts.map +1 -1
  1040. package/dist/util/csv.js +3 -22
  1041. package/dist/util/csv.js.map +1 -1
  1042. package/dist/util/metrics.d.ts +2 -26
  1043. package/dist/util/metrics.d.ts.map +1 -1
  1044. package/dist/util/metrics.js +2 -26
  1045. package/dist/util/metrics.js.map +1 -1
  1046. package/dist/util/random.d.ts +20 -87
  1047. package/dist/util/random.d.ts.map +1 -1
  1048. package/dist/util/random.js +20 -87
  1049. package/dist/util/random.js.map +1 -1
  1050. package/dist/util/reference.d.ts +6 -35
  1051. package/dist/util/reference.d.ts.map +1 -1
  1052. package/dist/util/reference.js +1 -4
  1053. package/dist/util/reference.js.map +1 -1
  1054. package/dist/util/scheduler.d.ts +6 -27
  1055. package/dist/util/scheduler.d.ts.map +1 -1
  1056. package/dist/util/scheduler.js +8 -35
  1057. package/dist/util/scheduler.js.map +1 -1
  1058. package/package.json +1 -1
  1059. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1060. package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
  1061. package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
  1062. package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
  1063. package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
  1064. package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
  1065. package/dist/renamed-scene-names.d.ts +0 -17
  1066. package/dist/renamed-scene-names.d.ts.map +0 -1
  1067. package/dist/renamed-scene-names.js +0 -9
  1068. package/dist/renamed-scene-names.js.map +0 -1
  1069. package/dist/runtime/precompisition.d.ts +0 -24
  1070. package/dist/runtime/precompisition.d.ts.map +0 -1
  1071. package/dist/runtime/precompisition.js +0 -7
  1072. package/dist/runtime/precompisition.js.map +0 -1
@@ -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,8BAA8B,CAAC;AAElE;;;;;;;;;;;;;;;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;;;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],"names":[],"mappings":"","sourcesContent":["import type { PropertyEditor } from \"@/attributes/properties/decorator\";\nimport type { NodeDimension } from \"@/components/trees/node/node\";\n\n/**\n * What a node type declares about itself beyond its key.\n *\n * The **technical** description of a type — how it lays children out, what a\n * fresh one is seeded with, what it inherits from. Deliberately *not* how it is\n * presented: no display name, no icon, no shelf, no copy. Those are a host's to\n * resolve and to translate, and a component that carried them would be shipping\n * one language's product decisions inside an engine artifact.\n *\n * It replaced a `manifest.json` written beside each package. Two descriptions of\n * one class is the shape that drifts, and it did: eight of nine packages ended\n * up promising commands their classes had never implemented.\n *\n * **Nothing here is read while rendering.** A frame is identical whether a type\n * declares a seed or not. It exists so a host has one place to ask.\n */\nexport interface NodeTypeDescriptor {\n /**\n * The document key, matching `NodeSpec.type`.\n *\n * **Frozen** for anything already published: a stored document naming it has\n * to keep meaning the same thing forever.\n */\n key: string;\n /** The type it inherits editing sections and commands from, for a host that groups them. */\n parentKey?: string;\n /**\n * Which scene graph the type belongs to — **derived from the class**, never\n * written here, for the same reason {@link properties} is.\n *\n * `dimension` is a getter on the prototype precisely so it answers before a\n * node is constructed, which is what lets a host ask \"can this type go in\n * that tree?\" from the registry alone rather than by building one and\n * catching the throw.\n */\n dimension?: NodeDimension;\n /**\n * The trees it takes children from: its own, or a viewport's two (a Canvas\n * 3D takes 2D and 3D); empty for a type that takes none. **Derived** from\n * the class, as {@link dimension} is.\n */\n holds?: readonly NodeDimension[];\n /**\n * Whether a host may copy this component's source.\n *\n * False for anything a host reaches into by identity — its own primitives. A\n * type is forkable exactly when the host knows nothing about it beyond this.\n */\n forkable?: boolean;\n\n layout?: NodeLayoutDescriptor;\n /** What a freshly placed one's props are seeded with. */\n seed?: Record<string, unknown>;\n\n /**\n * The types this one goes inside: a plot in a coordinate system, a tangent\n * in a plot. A name also stands for every type built on it ({@link parentKey}).\n * Unsaid, it goes wherever its {@link dimension} allows.\n *\n * A statement about the class, not a rule the engine enforces: a node put\n * elsewhere still builds and usually draws nothing, which is exactly what\n * a host is told here so it can offer the type only where it works. See\n * `placement.ts`.\n */\n within?: readonly string[];\n /**\n * Types it needs at least one of beside it, under the same parent: an area\n * between curves needs a curve. For a requirement that is not a parent,\n * because the thing needed is shared or there may be several of it.\n */\n beside?: readonly string[];\n /** Takes only the children that name it in their {@link within}: a plot holds its marks, not a photograph. */\n closed?: boolean;\n\n /**\n * The editable properties, by key — **derived from `property`**, never\n * written here.\n *\n * A hand-written list of a class's properties, beside a class of\n * properties, is exactly the restatement this whole descriptor exists to\n * remove. What a host needs beyond the key — a range, an enum's choices, the\n * controls inside an object-valued prop — is declared on the `property`\n * itself, which is the thing being edited.\n */\n properties?: Record<string, NodePropertyDescriptor>;\n /** Old prop keys a stored row may still carry → the entry each became. **Derived** from the component's `renamed`. */\n renamed?: Readonly<Record<string, string>>;\n}\n\n/** One editable property, as a host draws it. */\nexport interface NodePropertyDescriptor extends PropertyEditor {\n /** The control to draw. Always present here, inferred when not declared. */\n kind: string;\n /** What a freshly placed node holds, when the class declares one. */\n default?: unknown;\n /** Present when the component deprecated it: why, and what to use instead. A host stops offering it. */\n deprecated?: string;\n}\n\n/** The layout answer a node type's children get from it. */\nexport interface NodeLayoutDescriptor {\n children?: \"flow\" | \"horizontal\" | \"vertical\" | \"grid\" | \"freeform\";\n acceptsChildren?: boolean;\n defaultWidthMode?: NodeSizeMode;\n defaultHeightMode?: NodeSizeMode;\n /** What a freshly placed one is sized to. */\n defaultWidth?: number;\n defaultHeight?: number;\n /** A locked width:height, for a type whose box *is* its design. */\n aspectRatio?: number;\n}\n\n/** How a node type sizes one axis. */\nexport type NodeSizeMode = \"fixed\" | \"hug\" | \"fill\";\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\";\nimport type { NodeDimension } from \"@/components/trees/node/node\";\n\n/**\n * The technical description of a type: how it lays children out, what a fresh one is seeded with, what it\n * inherits from. Deliberately not how it is presented (no display name, icon, shelf or copy): those are a\n * host's to resolve and translate. Nothing here is read while rendering; it exists so a host has one place to\n * ask.\n */\nexport interface NodeTypeDescriptor {\n /** Frozen once published: a stored document naming it must keep meaning the same thing. */\n key: string;\n parentKey?: string;\n /**\n * Derived from the class, never written here. `dimension` is a getter on the prototype so it answers before a\n * node is constructed, letting a host ask \"can this type go in that tree?\" from the registry alone rather than\n * by building one and catching the throw.\n */\n dimension?: NodeDimension;\n /**\n * The trees it takes children from: its own, or a viewport's two (a Canvas3D takes 2D and 3D); empty for a\n * type that takes none. Derived from the class, as {@link dimension} is.\n */\n holds?: readonly NodeDimension[];\n /**\n * False for anything a host reaches into by identity (its own primitives). A type is forkable exactly when the\n * host knows nothing about it beyond this.\n */\n forkable?: boolean;\n\n layout?: NodeLayoutDescriptor;\n seed?: Record<string, unknown>;\n\n /**\n * The types this one goes inside: a plot in a coordinate system, a tangent in a plot. A name also stands for\n * every type built on it ({@link parentKey}). Unsaid, it goes wherever its {@link dimension} allows.\n *\n * A statement about the class, not an enforced rule: a node put elsewhere still builds and usually draws\n * nothing, which is what a host is told so it can offer the type only where it works. See `placement.ts`.\n */\n within?: readonly string[];\n /**\n * Types it needs at least one of beside it, under the same parent: an area between curves needs a curve. For a\n * requirement that is not a parent.\n */\n beside?: readonly string[];\n /** Takes only the children that name it in their {@link within}: a plot holds its marks, not a photograph. */\n closed?: boolean;\n\n /**\n * Derived from `property`, never written here: a hand-written list beside a class of properties is the\n * restatement this descriptor exists to remove. What a host needs beyond the key (a range, an enum's choices)\n * is declared on the `property` itself.\n */\n properties?: Record<string, NodePropertyDescriptor>;\n /**\n * Old prop keys a stored row may still carry, mapped to the entry each became. Derived from the component's\n * `renamed`.\n */\n renamed?: Readonly<Record<string, string>>;\n}\n\nexport interface NodePropertyDescriptor extends PropertyEditor {\n kind: string;\n default?: unknown;\n /** Present when the component deprecated it: why, and what to use instead. A host stops offering it. */\n deprecated?: string;\n}\n\nexport interface NodeLayoutDescriptor {\n children?: \"flow\" | \"horizontal\" | \"vertical\" | \"grid\" | \"freeform\";\n acceptsChildren?: boolean;\n defaultWidthMode?: NodeSizeMode;\n defaultHeightMode?: NodeSizeMode;\n defaultWidth?: number;\n defaultHeight?: number;\n aspectRatio?: number;\n}\n\nexport type NodeSizeMode = \"fixed\" | \"hug\" | \"fill\";\n"]}
@@ -1,71 +1,48 @@
1
1
  import type { Registry } from "./registry.js";
2
2
  import { type NodeSpec } from "./types.js";
3
3
  /**
4
- * Where a node type may go, read off the registry without building anything:
5
- * the answer a host needs before it offers a type under a parent, accepts a
6
- * drop, or lets an assistant create a row.
4
+ * Where a node type may go, read off the registry without building anything: what a host needs before offering
5
+ * a type under a parent, accepting a drop, or letting an assistant create a row.
7
6
  *
8
- * Four things decide it. A parent that takes no children takes none. The two
9
- * trees do not mix: a `Node3D` lives under a Canvas 3D or another 3D node, and
10
- * nothing else does. A type that names where it goes ({@link
11
- * NodeTypeDescriptor.within}) goes only there, and a {@link
12
- * NodeTypeDescriptor.closed} parent takes only the types that name it. Those
13
- * are about the parent; {@link NodeTypeDescriptor.beside} is about the
14
- * siblings, and is kept apart because a host can meet it by adding one.
7
+ * A parent that takes no children takes none. The two trees do not mix (a `Node3D` lives under a Canvas 3D or
8
+ * another 3D node, and nothing else does). A type naming where it goes ({@link NodeTypeDescriptor.within})
9
+ * goes only there, and a {@link NodeTypeDescriptor.closed} parent takes only the types that name it. {@link
10
+ * NodeTypeDescriptor.beside} is about siblings and kept apart because a host can meet it by adding one.
15
11
  *
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
18
- * builds and, as a rule, draws nothing; this says why.
12
+ * Only a leaf is enforced when a document is built (`allowedChildren: []` throws on a child); a node in any
13
+ * other wrong place builds and as a rule draws nothing, and this says why.
19
14
  */
20
- /** Why a node of a type is not where it can work. */
21
- export type PlacementIssue =
22
- /** The parent takes no children. */
23
- {
15
+ export type PlacementIssue = {
24
16
  kind: "leaf";
25
17
  parent: string;
26
- }
27
- /** A 3D node outside a 3D tree, or anything else inside one. */
28
- | {
18
+ } | {
29
19
  kind: "dimension";
30
20
  parent: string | null;
31
- }
32
- /** It goes inside one of `within`, and the parent is none of them. */
33
- | {
21
+ } | {
34
22
  kind: "within";
35
23
  within: readonly string[];
36
- }
37
- /** The parent takes only the types that name it. */
38
- | {
24
+ } | {
39
25
  kind: "closed";
40
26
  parent: string;
41
- }
42
- /** It needs one of `beside` under the same parent, and there is none. */
43
- | {
27
+ } | {
44
28
  kind: "beside";
45
29
  beside: readonly string[];
46
30
  };
47
31
  export interface PlacementOptions {
48
32
  /**
49
- * A host's own sense of one type standing for another, beside the
50
- * registry's: a copy of a component it made under a new key is still that
33
+ * A host's own sense of one type standing for another: a copy of a component under a new key is still that
51
34
  * component to whatever goes inside it.
52
35
  */
53
36
  isA?: (type: string, name: string) => boolean;
54
37
  }
55
- /** Whether `type` is `name`, or is built on it through `parentKey`. */
56
38
  export declare function nodeTypeIsA(registry: Registry, type: string, name: string): boolean;
57
- /**
58
- * Why a node of `child` cannot go directly inside one of `parent`, or `null`
59
- * when it can. A `null` parent is the document's own root, which is 2D and
60
- * names nothing.
61
- */
39
+ /** A `null` parent is the document's own root, which is 2D and names nothing. */
62
40
  export declare function parentIssue(registry: Registry, child: string, parent: string | null, options?: PlacementOptions): PlacementIssue | null;
63
- /** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */
41
+ /** `null` when it needs none or has one. */
64
42
  export declare function siblingIssue(registry: Registry, child: string, siblings: readonly string[], options?: PlacementOptions): PlacementIssue | null;
65
43
  /**
66
- * Every node of `nodes` that is not where its type says it goes, by id, with
67
- * the first reason. A node of an unregistered type is left out: that is a build
68
- * error, and says so itself.
44
+ * With the first reason. A node of an unregistered type is left out: that is a build error, and says so
45
+ * itself.
69
46
  */
70
47
  export declare function placementIssues(registry: Registry, nodes: readonly Pick<NodeSpec, "id" | "type" | "parentId">[], options?: PlacementOptions): Map<string, PlacementIssue>;
71
48
  //# sourceMappingURL=placement.d.ts.map
@@ -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;;;;;;;;;;;;;;;;GAgBG;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,OAAO,CAAC;CACjD;AAKD,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOnF;AAMD;;;;GAIG;AACH,wBAAgB,WAAW,CACvB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,OAAO,GAAE,gBAAqB,GAC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wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOnF;AAMD,iFAAiF;AACjF,wBAAgB,WAAW,CACvB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,OAAO,GAAE,gBAAqB,GAC/B,cAAc,GAAG,IAAI,CAgBvB;AAED,4CAA4C;AAC5C,wBAAgB,YAAY,CACxB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,GAAE,gBAAqB,GAC/B,cAAc,GAAG,IAAI,CAIvB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC3B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,SAAS,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC,EAAE,EAC5D,OAAO,GAAE,gBAAqB,GAC/B,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAsB7B"}
@@ -1,7 +1,5 @@
1
1
  import { ROOT_NODE_ID } from "./types.js";
2
- /** The one core type whose children are of the other dimension. */
3
2
  const CANVAS_3D = "canvas3d";
4
- /** Whether `type` is `name`, or is built on it through `parentKey`. */
5
3
  export function nodeTypeIsA(registry, type, name) {
6
4
  const seen = new Set();
7
5
  for (let at = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {
@@ -14,11 +12,7 @@ export function nodeTypeIsA(registry, type, name) {
14
12
  function among(registry, type, names, options) {
15
13
  return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);
16
14
  }
17
- /**
18
- * Why a node of `child` cannot go directly inside one of `parent`, or `null`
19
- * when it can. A `null` parent is the document's own root, which is 2D and
20
- * names nothing.
21
- */
15
+ /** A `null` parent is the document's own root, which is 2D and names nothing. */
22
16
  export function parentIssue(registry, child, parent, options = {}) {
23
17
  const own = registry.describe(child);
24
18
  const holder = parent === null ? undefined : registry.describe(parent);
@@ -36,7 +30,7 @@ export function parentIssue(registry, child, parent, options = {}) {
36
30
  return { kind: "dimension", parent };
37
31
  return null;
38
32
  }
39
- /** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */
33
+ /** `null` when it needs none or has one. */
40
34
  export function siblingIssue(registry, child, siblings, options = {}) {
41
35
  const beside = registry.describe(child)?.beside ?? [];
42
36
  if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options)))
@@ -44,9 +38,8 @@ export function siblingIssue(registry, child, siblings, options = {}) {
44
38
  return { kind: "beside", beside };
45
39
  }
46
40
  /**
47
- * Every node of `nodes` that is not where its type says it goes, by id, with
48
- * the first reason. A node of an unregistered type is left out: that is a build
49
- * error, and says so itself.
41
+ * With the first reason. A node of an unregistered type is left out: that is a build error, and says so
42
+ * itself.
50
43
  */
51
44
  export function placementIssues(registry, nodes, options = {}) {
52
45
  // A document may write its stage as a row or leave it out: either way its children's parent is the root.
@@ -1 +1 @@
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,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,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\";\nimport { ROOT_NODE_ID, type NodeSpec } from \"./types\";\n\n/**\n * Where a node type may go, read off the registry without building anything:\n * the answer a host needs before it offers a type under a parent, accepts a\n * drop, or lets an assistant create a row.\n *\n * Four things decide it. A parent that takes no children takes none. The two\n * trees do not mix: a `Node3D` lives under a Canvas 3D or another 3D node, and\n * nothing else does. A type that names where it goes ({@link\n * NodeTypeDescriptor.within}) goes only there, and a {@link\n * NodeTypeDescriptor.closed} parent takes only the types that name it. Those\n * are about the parent; {@link NodeTypeDescriptor.beside} is about the\n * siblings, and is kept apart because a host can meet it by adding one.\n *\n * Only a leaf is enforced when a document is built: a component declaring\n * `allowedChildren: []` throws on a child. A node in any other wrong place\n * builds and, as a rule, draws nothing; this says why.\n */\n\n/** Why a node of a type is not where it can work. */\nexport type PlacementIssue =\n /** The parent takes no children. */\n | { kind: \"leaf\"; parent: string }\n /** A 3D node outside a 3D tree, or anything else inside one. */\n | { kind: \"dimension\"; parent: string | null }\n /** It goes inside one of `within`, and the parent is none of them. */\n | { kind: \"within\"; within: readonly string[] }\n /** The parent takes only the types that name it. */\n | { kind: \"closed\"; parent: string }\n /** It needs one of `beside` under the same parent, and there is none. */\n | { kind: \"beside\"; beside: readonly string[] };\n\nexport interface PlacementOptions {\n /**\n * A host's own sense of one type standing for another, beside the\n * registry's: a copy of a component it made under a new key is still that\n * component to whatever goes inside it.\n */\n isA?: (type: string, name: string) => boolean;\n}\n\n/** The one core type whose children are of the other dimension. */\nconst CANVAS_3D = \"canvas3d\";\n\n/** Whether `type` is `name`, or is built on it through `parentKey`. */\nexport function nodeTypeIsA(registry: Registry, type: string, name: string): boolean {\n const seen = new Set<string>();\n for (let at: string | undefined = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {\n if (at === name) return true;\n seen.add(at);\n }\n return false;\n}\n\nfunction among(registry: Registry, type: string, names: readonly string[], options: PlacementOptions): boolean {\n return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);\n}\n\n/**\n * Why a node of `child` cannot go directly inside one of `parent`, or `null`\n * when it can. A `null` parent is the document's own root, which is 2D and\n * names nothing.\n */\nexport function parentIssue(\n registry: Registry,\n child: string,\n parent: string | null,\n options: PlacementOptions = {},\n): PlacementIssue | null {\n const own = registry.describe(child);\n const holder = parent === null ? undefined : registry.describe(parent);\n if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0)) return { kind: \"leaf\", parent };\n\n const within = own?.within ?? [];\n if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {\n return { kind: \"within\", within };\n }\n if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {\n return { kind: \"closed\", parent };\n }\n\n const inThree = parent !== null && (holder?.dimension === \"3d\" || holder?.holds?.includes(\"3d\") === true || among(registry, parent, [CANVAS_3D], options));\n if ((own?.dimension === \"3d\") !== inThree) return { kind: \"dimension\", parent };\n return null;\n}\n\n/** The sibling `child` needs that `siblings`, the types already under its parent, do not include; `null` when it needs none or has one. */\nexport function siblingIssue(\n registry: Registry,\n child: string,\n siblings: readonly string[],\n options: PlacementOptions = {},\n): PlacementIssue | null {\n const beside = registry.describe(child)?.beside ?? [];\n if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options))) return null;\n return { kind: \"beside\", beside };\n}\n\n/**\n * Every node of `nodes` that is not where its type says it goes, by id, with\n * the first reason. A node of an unregistered type is left out: that is a build\n * error, and says so itself.\n */\nexport function placementIssues(\n registry: Registry,\n nodes: readonly Pick<NodeSpec, \"id\" | \"type\" | \"parentId\">[],\n options: PlacementOptions = {},\n): Map<string, PlacementIssue> {\n // A document may write its stage as a row or leave it out: either way its children's parent is the root.\n const parentOf = (node: Pick<NodeSpec, \"parentId\">) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);\n const byId = new Map(nodes.map((node) => [node.id, node]));\n const children = new Map<string | null, string[]>();\n for (const node of nodes) {\n if (node.id === ROOT_NODE_ID) continue;\n const under = children.get(parentOf(node));\n if (under) under.push(node.type);\n else children.set(parentOf(node), [node.type]);\n }\n const issues = new Map<string, PlacementIssue>();\n for (const node of nodes) {\n if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type)) continue;\n const parentId = parentOf(node);\n const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);\n const issue =\n parentIssue(registry, node.type, parentType, options) ??\n siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);\n if (issue) issues.set(node.id, issue);\n }\n return issues;\n}\n\n// The node's own type once: a second area is a sibling of the first, the first is not its own.\nfunction without(types: readonly string[], own: string): string[] {\n const at = types.indexOf(own);\n return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];\n}\n"]}
1
+ {"version":3,"file":"placement.js","sourceRoot":"","sources":["../../src/document/placement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAC;AA8BtD,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,MAAM,UAA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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\";\nimport { ROOT_NODE_ID, type NodeSpec } from \"./types\";\n\n/**\n * Where a node type may go, read off the registry without building anything: what a host needs before offering\n * a type under a parent, accepting a drop, or letting an assistant create a row.\n *\n * A parent that takes no children takes none. The two trees do not mix (a `Node3D` lives under a Canvas 3D or\n * another 3D node, and nothing else does). A type naming where it goes ({@link NodeTypeDescriptor.within})\n * goes only there, and a {@link NodeTypeDescriptor.closed} parent takes only the types that name it. {@link\n * NodeTypeDescriptor.beside} is about siblings and kept apart because a host can meet it by adding one.\n *\n * Only a leaf is enforced when a document is built (`allowedChildren: []` throws on a child); a node in any\n * other wrong place builds and as a rule draws nothing, and this says why.\n */\n\nexport type PlacementIssue =\n | { kind: \"leaf\"; parent: string }\n | { kind: \"dimension\"; parent: string | null }\n | { kind: \"within\"; within: readonly string[] }\n | { kind: \"closed\"; parent: string }\n | { kind: \"beside\"; beside: readonly string[] };\n\nexport interface PlacementOptions {\n /**\n * A host's own sense of one type standing for another: a copy of a component under a new key is still that\n * component to whatever goes inside it.\n */\n isA?: (type: string, name: string) => boolean;\n}\n\nconst CANVAS_3D = \"canvas3d\";\n\nexport function nodeTypeIsA(registry: Registry, type: string, name: string): boolean {\n const seen = new Set<string>();\n for (let at: string | undefined = type; at !== undefined && !seen.has(at); at = registry.describe(at)?.parentKey) {\n if (at === name) return true;\n seen.add(at);\n }\n return false;\n}\n\nfunction among(registry: Registry, type: string, names: readonly string[], options: PlacementOptions): boolean {\n return names.some((name) => nodeTypeIsA(registry, type, name) || options.isA?.(type, name) === true);\n}\n\n/** A `null` parent is the document's own root, which is 2D and names nothing. */\nexport function parentIssue(\n registry: Registry,\n child: string,\n parent: string | null,\n options: PlacementOptions = {},\n): PlacementIssue | null {\n const own = registry.describe(child);\n const holder = parent === null ? undefined : registry.describe(parent);\n if (parent !== null && (holder?.layout?.acceptsChildren === false || holder?.holds?.length === 0)) return { kind: \"leaf\", parent };\n\n const within = own?.within ?? [];\n if (within.length > 0 && (parent === null || !among(registry, parent, within, options))) {\n return { kind: \"within\", within };\n }\n if (parent !== null && holder?.closed === true && !among(registry, parent, within, options)) {\n return { kind: \"closed\", parent };\n }\n\n const inThree = parent !== null && (holder?.dimension === \"3d\" || holder?.holds?.includes(\"3d\") === true || among(registry, parent, [CANVAS_3D], options));\n if ((own?.dimension === \"3d\") !== inThree) return { kind: \"dimension\", parent };\n return null;\n}\n\n/** `null` when it needs none or has one. */\nexport function siblingIssue(\n registry: Registry,\n child: string,\n siblings: readonly string[],\n options: PlacementOptions = {},\n): PlacementIssue | null {\n const beside = registry.describe(child)?.beside ?? [];\n if (beside.length === 0 || siblings.some((type) => among(registry, type, beside, options))) return null;\n return { kind: \"beside\", beside };\n}\n\n/**\n * With the first reason. A node of an unregistered type is left out: that is a build error, and says so\n * itself.\n */\nexport function placementIssues(\n registry: Registry,\n nodes: readonly Pick<NodeSpec, \"id\" | \"type\" | \"parentId\">[],\n options: PlacementOptions = {},\n): Map<string, PlacementIssue> {\n // A document may write its stage as a row or leave it out: either way its children's parent is the root.\n const parentOf = (node: Pick<NodeSpec, \"parentId\">) => (node.parentId === ROOT_NODE_ID ? null : node.parentId);\n const byId = new Map(nodes.map((node) => [node.id, node]));\n const children = new Map<string | null, string[]>();\n for (const node of nodes) {\n if (node.id === ROOT_NODE_ID) continue;\n const under = children.get(parentOf(node));\n if (under) under.push(node.type);\n else children.set(parentOf(node), [node.type]);\n }\n const issues = new Map<string, PlacementIssue>();\n for (const node of nodes) {\n if (node.id === ROOT_NODE_ID || !registry.hasNode(node.type)) continue;\n const parentId = parentOf(node);\n const parentType = parentId === null ? null : (byId.get(parentId)?.type ?? null);\n const issue =\n parentIssue(registry, node.type, parentType, options) ??\n siblingIssue(registry, node.type, without(children.get(parentId) ?? [], node.type), options);\n if (issue) issues.set(node.id, issue);\n }\n return issues;\n}\n\n// The node's own type once: a second area is a sibling of the first, the first is not its own.\nfunction without(types: readonly string[], own: string): string[] {\n const at = types.indexOf(own);\n return at === -1 ? [...types] : [...types.slice(0, at), ...types.slice(at + 1)];\n}\n"]}
@@ -2,88 +2,55 @@ import type { Size2D } from "../attributes/layout/size.js";
2
2
  import type { Theme } from "../project/config.js";
3
3
  import type { ClipDocument, VisualDocument } from "./types.js";
4
4
  /**
5
- * The **project** as data: a whole video, not one clip — and the one thing the
6
- * runtime plays.
5
+ * The project as data: a whole video, the one thing the runtime plays. It is the clip document's idea one
6
+ * level up: rows placed at times, evaluated rather than played.
7
7
  *
8
- * A clip document says what happens inside one composition. This says how those
9
- * compositions are laid against each other to make the finished thing — and it
10
- * is the same idea one level up, so it reads the same way: rows placed at times,
11
- * evaluated rather than played.
12
- *
13
- * ### One list of tracks
14
- *
15
- * A {@link ClipDocument} is a still, a composition *or* an audio document, and a
16
- * composition already carries both picture and sound — so there is one list for
17
- * all of it, not a second one for sound.
18
- *
19
- * **Array position is paint order**, first entry at the back, exactly as
20
- * position in a `fill` array is. A background is the first track; an overlay is
21
- * the last; a cross-dissolve is two tracks whose spans overlap and whose clips
22
- * fade themselves.
8
+ * One list of tracks serves picture and sound, since a {@link ClipDocument} is a still, a composition or an
9
+ * audio document and a composition already carries both. Array position is paint order, first entry at the
10
+ * back, as in a `fill` array: a background is the first track, an overlay the last, a cross-dissolve two
11
+ * tracks whose spans overlap and whose clips fade themselves.
23
12
  */
24
13
  export interface ProjectDocument {
25
14
  kind: "project";
26
- /** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */
15
+ /** Absent is format 0 (written before the field existed); see `migrate.ts`. */
27
16
  formatVersion?: number;
28
- /** Human-readable project name. */
29
17
  name: string;
30
18
  /** Target frame rate. Defaults to 60. */
31
19
  fps?: number;
32
20
  /** Output canvas dimensions in pixels. Defaults to 1920×1080. */
33
21
  viewport?: Size2D;
34
- /** Visual design tokens (colors, typography) available to every clip. */
35
22
  theme?: Theme;
36
- /**
37
- * Every clip, placed. **Array position is paint order** — the first entry is
38
- * at the back.
39
- */
23
+ /** Array position is paint order; the first entry is at the back. */
40
24
  tracks: Track[];
41
25
  }
42
26
  /**
43
- * One clip, placed on the project timeline.
44
- *
45
- * The clip document is **inline**, not referenced by id. A shared id would deduplicate JSON and
46
- * cost an id space, a resolution step and a dangling-reference failure mode — and
47
- * it would not buy what it looks like it buys, because the content that actually
48
- * repeats in an edit mostly has to *differ* per placement (a lower third with
49
- * different text, a chapter card with a different label).
27
+ * One clip placed on the project timeline. The clip document is inline, not referenced by id: a shared id
28
+ * would cost an id space, a resolution step and a dangling-reference failure mode, and would not buy
29
+ * deduplication, since repeated content mostly differs per placement (a lower third with different text).
50
30
  */
51
31
  export interface Track {
52
32
  /**
53
- * Stable identity, so a host can address, reorder and diff one row — and so
54
- * the runtime can keep a track's built tree across an edit that leaves its
55
- * clip untouched.
33
+ * Stable identity, so the runtime can keep a track's built tree across an edit that leaves its clip untouched.
56
34
  */
57
35
  id: string;
58
- /** Display label. */
59
36
  name?: string;
60
- /** What plays: a still, a composition, or sound. */
61
37
  clip: ClipDocument;
62
38
  /**
63
- * Second on the **project** timeline at which this clip's own clock reads 0.
64
- * Authored, never derived from the row above it, so a clip's start cannot
65
- * move because a neighbour changed. Defaults to 0.
39
+ * Second on the project timeline at which this clip's own clock reads 0. Authored, never derived from the row
40
+ * above, so a start cannot move because a neighbour changed.
66
41
  */
67
42
  startAt?: number;
68
43
  /**
69
- * Seconds this clip occupies. **Required.**
70
- *
71
- * So a project's length is arithmetic over its tracks rather than something
72
- * measured out of a media file or a timeline — a three-minute music bed
73
- * cannot silently make a thirty-second edit three minutes long. Longer than
74
- * the document holds its last frame; shorter cuts it off, which is also what
75
- * lets a **still**, a document with no length at all, be a backdrop.
44
+ * Required, so a project's length is arithmetic over its tracks rather than measured out of a media file: a
45
+ * three-minute music bed cannot silently stretch a thirty-second edit. Longer than the document holds its last
46
+ * frame; shorter cuts it off, which is also what lets a still (no length at all) be a backdrop.
76
47
  */
77
48
  duration: number;
78
49
  }
79
- /** Narrows an unknown document to a project. */
80
50
  export declare function isProjectDocument(doc: unknown): doc is ProjectDocument;
81
51
  /**
82
- * The project a session plays, from either document it can open.
83
- *
84
- * A lone still or composition becomes the only track of a project around it.
85
- * Viewport and fps describe the output rather than the clip, so they come from
86
- * the caller.
52
+ * A lone still or composition becomes the only track of a project around it. Viewport and fps describe the
53
+ * output, not the clip, so they come from the caller.
87
54
  */
88
55
  export declare function asProjectDocument(doc: ProjectDocument | VisualDocument, output?: {
89
56
  name?: string;
@@ -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,4HAA4H;IAC5H,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,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,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"}
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;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,qEAAqE;IACrE,MAAM,EAAE,KAAK,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,KAAK;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,eAAe,CAEtE;AAED;;;GAGG;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"}
@@ -1,14 +1,10 @@
1
1
  import { documentDuration } from "./types.js";
2
- /** Narrows an unknown document to a project. */
3
2
  export function isProjectDocument(doc) {
4
3
  return typeof doc === "object" && doc !== null && doc.kind === "project";
5
4
  }
6
5
  /**
7
- * The project a session plays, from either document it can open.
8
- *
9
- * A lone still or composition becomes the only track of a project around it.
10
- * Viewport and fps describe the output rather than the clip, so they come from
11
- * the caller.
6
+ * A lone still or composition becomes the only track of a project around it. Viewport and fps describe the
7
+ * output, not the clip, so they come from the caller.
12
8
  */
13
9
  export function asProjectDocument(doc, output = {}) {
14
10
  if (isProjectDocument(doc))
@@ -1 +1 @@
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\";\nimport type { Theme } from \"@/project/config\";\n\nimport type { ClipDocument, VisualDocument } from \"./types\";\nimport { documentDuration } from \"./types\";\n\n/**\n * The **project** as data: a whole video, not one clip — and the one thing the\n * runtime plays.\n *\n * A clip document says what happens inside one composition. This says how those\n * compositions are laid against each other to make the finished thing — and it\n * is the same idea one level up, so it reads the same way: rows placed at times,\n * evaluated rather than played.\n *\n * ### One list of tracks\n *\n * A {@link ClipDocument} is a still, a composition *or* an audio document, and a\n * composition already carries both picture and sound — so there is one list for\n * all of it, not a second one for sound.\n *\n * **Array position is paint order**, first entry at the back, exactly as\n * position in a `fill` array is. A background is the first track; an overlay is\n * the last; a cross-dissolve is two tracks whose spans overlap and whose clips\n * fade themselves.\n */\nexport interface ProjectDocument {\n kind: \"project\";\n /** The format it was written in — see `migrate.ts`. Absent is format 0, every document written before the field existed. */\n formatVersion?: number;\n /** Human-readable project name. */\n name: string;\n /** Target frame rate. Defaults to 60. */\n fps?: number;\n /** Output canvas dimensions in pixels. Defaults to 1920×1080. */\n viewport?: Size2D;\n /** Visual design tokens (colors, typography) available to every clip. */\n theme?: Theme;\n /**\n * Every clip, placed. **Array position is paint order** — the first entry is\n * at the back.\n */\n tracks: Track[];\n}\n\n/**\n * One clip, placed on the project timeline.\n *\n * The clip document is **inline**, not referenced by id. A shared id would deduplicate JSON and\n * cost an id space, a resolution step and a dangling-reference failure mode — and\n * it would not buy what it looks like it buys, because the content that actually\n * repeats in an edit mostly has to *differ* per placement (a lower third with\n * different text, a chapter card with a different label).\n */\nexport interface Track {\n /**\n * Stable identity, so a host can address, reorder and diff one row — and so\n * the runtime can keep a track's built tree across an edit that leaves its\n * clip untouched.\n */\n id: string;\n /** Display label. */\n name?: string;\n /** What plays: a still, a composition, or sound. */\n clip: ClipDocument;\n /**\n * Second on the **project** timeline at which this clip's own clock reads 0.\n * Authored, never derived from the row above it, so a clip's start cannot\n * move because a neighbour changed. Defaults to 0.\n */\n startAt?: number;\n /**\n * Seconds this clip occupies. **Required.**\n *\n * So a project's length is arithmetic over its tracks rather than something\n * measured out of a media file or a timeline — a three-minute music bed\n * cannot silently make a thirty-second edit three minutes long. Longer than\n * the document holds its last frame; shorter cuts it off, which is also what\n * lets a **still**, a document with no length at all, be a backdrop.\n */\n duration: number;\n}\n\n/** Narrows an unknown document to a project. */\nexport function isProjectDocument(doc: unknown): doc is ProjectDocument {\n return typeof doc === \"object\" && doc !== null && (doc as ProjectDocument).kind === \"project\";\n}\n\n/**\n * The project a session plays, from either document it can open.\n *\n * A lone still or composition becomes the only track of a project around it.\n * Viewport and fps describe the output rather than the clip, so they come from\n * the caller.\n */\nexport function asProjectDocument(\n doc: ProjectDocument | VisualDocument,\n output: { name?: string; viewport?: Size2D; fps?: number } = {},\n): ProjectDocument {\n if (isProjectDocument(doc)) return doc;\n return {\n kind: \"project\",\n ...(doc.formatVersion !== undefined && { formatVersion: doc.formatVersion }),\n name: output.name ?? \"Untitled\",\n fps: output.fps,\n viewport: output.viewport,\n theme: doc.theme,\n tracks: [{ id: \"clip\", clip: doc, duration: documentDuration(doc) }],\n };\n}\n"]}
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/document/project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAkD3C,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;;;GAGG;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\";\nimport type { Theme } from \"@/project/config\";\n\nimport type { ClipDocument, VisualDocument } from \"./types\";\nimport { documentDuration } from \"./types\";\n\n/**\n * The project as data: a whole video, the one thing the runtime plays. It is the clip document's idea one\n * level up: rows placed at times, evaluated rather than played.\n *\n * One list of tracks serves picture and sound, since a {@link ClipDocument} is a still, a composition or an\n * audio document and a composition already carries both. Array position is paint order, first entry at the\n * back, as in a `fill` array: a background is the first track, an overlay the last, a cross-dissolve two\n * tracks whose spans overlap and whose clips fade themselves.\n */\nexport interface ProjectDocument {\n kind: \"project\";\n /** Absent is format 0 (written before the field existed); see `migrate.ts`. */\n formatVersion?: number;\n name: string;\n /** Target frame rate. Defaults to 60. */\n fps?: number;\n /** Output canvas dimensions in pixels. Defaults to 1920×1080. */\n viewport?: Size2D;\n theme?: Theme;\n /** Array position is paint order; the first entry is at the back. */\n tracks: Track[];\n}\n\n/**\n * One clip placed on the project timeline. The clip document is inline, not referenced by id: a shared id\n * would cost an id space, a resolution step and a dangling-reference failure mode, and would not buy\n * deduplication, since repeated content mostly differs per placement (a lower third with different text).\n */\nexport interface Track {\n /**\n * Stable identity, so the runtime can keep a track's built tree across an edit that leaves its clip untouched.\n */\n id: string;\n name?: string;\n clip: ClipDocument;\n /**\n * Second on the project timeline at which this clip's own clock reads 0. Authored, never derived from the row\n * above, so a start cannot move because a neighbour changed.\n */\n startAt?: number;\n /**\n * Required, so a project's length is arithmetic over its tracks rather than measured out of a media file: a\n * three-minute music bed cannot silently stretch a thirty-second edit. Longer than the document holds its last\n * frame; shorter cuts it off, which is also what lets a still (no length at all) be a backdrop.\n */\n duration: number;\n}\n\nexport function isProjectDocument(doc: unknown): doc is ProjectDocument {\n return typeof doc === \"object\" && doc !== null && (doc as ProjectDocument).kind === \"project\";\n}\n\n/**\n * A lone still or composition becomes the only track of a project around it. Viewport and fps describe the\n * output, not the clip, so they come from the caller.\n */\nexport function asProjectDocument(\n doc: ProjectDocument | VisualDocument,\n output: { name?: string; viewport?: Size2D; fps?: number } = {},\n): ProjectDocument {\n if (isProjectDocument(doc)) return doc;\n return {\n kind: \"project\",\n ...(doc.formatVersion !== undefined && { formatVersion: doc.formatVersion }),\n name: output.name ?? \"Untitled\",\n fps: output.fps,\n viewport: output.viewport,\n theme: doc.theme,\n tracks: [{ id: \"clip\", clip: doc, duration: documentDuration(doc) }],\n };\n}\n"]}
@@ -1,12 +1,9 @@
1
1
  import type { Registry } from "./registry.js";
2
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.
3
+ * Declared by a component spec's `renamed`, `deprecated` and `migrate`, applied to a row's props whenever one
4
+ * is built, and callable by a host rewriting stored rows. Unlike a document migration there is no version to
5
+ * go by: a row stored a year ago and one stored today pass through the same rules, so every rule must leave a
6
+ * current value alone.
10
7
  */
11
8
  export interface PropEvolution {
12
9
  /** Old key → the entry it became. A row setting both keeps the new one. */
@@ -14,20 +11,17 @@ export interface PropEvolution {
14
11
  /** Entry → why it is deprecated and what to use instead. It still works. */
15
12
  readonly deprecated: Readonly<Record<string, string>>;
16
13
  /**
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.
14
+ * Keyed by an old key from {@link renamed}, it converts only what was stored under that key (a unit change
15
+ * rides on a rename); keyed by an entry, it runs on every stored value and must hand a current one back
16
+ * unchanged. `undefined` drops the prop back to its default.
21
17
  */
22
18
  readonly migrate: Readonly<Record<string, (value: unknown) => unknown>>;
23
19
  }
24
- /** One prop a migration touched, or one a row still sets that is deprecated. */
25
20
  export interface PropNote {
26
21
  prop: string;
27
22
  message: string;
28
23
  }
29
24
  export interface PropMigration {
30
- /** The props given, when nothing changed; a new object otherwise. */
31
25
  props: Record<string, unknown>;
32
26
  changes: PropNote[];
33
27
  deprecated: PropNote[];
@@ -37,13 +31,9 @@ export declare function declarePropEvolution(ctor: abstract new (...args: never[
37
31
  /** @internal What {@link declarePropEvolution} recorded on this exact class. */
38
32
  export declare function propEvolutionOf(ctor: abstract new (...args: never[]) => object): PropEvolution | undefined;
39
33
  /**
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.
34
+ * A type this registry does not know, or one that never changed, hands `props` back as it is. Applies to a
35
+ * `to`/`set` command's args too, which are a props diff. An expression is moved by a rename but handed to no
36
+ * value hook: a formula's result cannot be converted by rewriting it, so it is noted and left as written.
47
37
  */
48
38
  export declare function migrateNodeProps(registry: Registry, type: string, props: Record<string, unknown>): PropMigration;
49
39
  /** @internal {@link migrateNodeProps} once the type's rules are in hand. */
@@ -1 +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;;;;;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AE,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"}
@@ -12,13 +12,9 @@ export function propEvolutionOf(ctor) {
12
12
  return proto[PROP_EVOLUTION];
13
13
  }
14
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.
15
+ * A type this registry does not know, or one that never changed, hands `props` back as it is. Applies to a
16
+ * `to`/`set` command's args too, which are a props diff. An expression is moved by a rename but handed to no
17
+ * value hook: a formula's result cannot be converted by rewriting it, so it is noted and left as written.
22
18
  */
23
19
  export function migrateNodeProps(registry, type, props) {
24
20
  const ctor = registry.node(type)?.ctor;
@@ -1 +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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,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,OAAO,KAAK,SAAS;YAAE,SAAS;QACpC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACxC,IAAI,IAAI,KAAK,OAAO;YAAE,SAAS;QAC/B,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;QACvB,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;;YACtC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACxB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,GAAG,oCAAoC,CAAC,CAAC,CAAC,IAAI,GAAG,iBAAiB,EAAE,CAAC,CAAC;IACtI,CAAC;IAED,KAAK,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\";\nimport type { Registry } from \"./registry\";\n\n/**\n * How a node type's props changed since documents first named it — declared by\n * a component spec's `renamed`, `deprecated` and `migrate`, applied to a row's\n * props whenever one is built, and callable by a host rewriting stored rows.\n *\n * Unlike a document migration this has no version to go by: a row stored a year\n * ago and one stored today pass through the same rules, so every rule has to\n * leave a current value alone.\n */\nexport interface PropEvolution {\n /** Old key → the entry it became. A row setting both keeps the new one. */\n readonly renamed: Readonly<Record<string, string>>;\n /** Entry → why it is deprecated and what to use instead. It still works. */\n readonly deprecated: Readonly<Record<string, string>>;\n /**\n * Key → a value hook. Keyed by an old key from {@link renamed}, it converts\n * only what was stored under that key (a unit change rides on a rename);\n * keyed by an entry, it runs on every stored value and must hand a current\n * one back unchanged. `undefined` drops the prop back to its default.\n */\n readonly migrate: Readonly<Record<string, (value: unknown) => unknown>>;\n}\n\n/** One prop a migration touched, or one a row still sets that is deprecated. */\nexport interface PropNote {\n prop: string;\n message: string;\n}\n\nexport interface PropMigration {\n /** The props given, when nothing changed; a new object otherwise. */\n props: Record<string, unknown>;\n changes: PropNote[];\n deprecated: PropNote[];\n}\n\nconst PROP_EVOLUTION = Symbol(\"propEvolution\");\n\n/** @internal Record `evolution` on a node class; a component factory does this for its generated class. */\nexport function declarePropEvolution(ctor: abstract new (...args: never[]) => object, evolution: PropEvolution): void {\n (ctor.prototype as Record<symbol, unknown>)[PROP_EVOLUTION] = evolution;\n}\n\n/** @internal What {@link declarePropEvolution} recorded on this exact class. */\nexport function propEvolutionOf(ctor: abstract new (...args: never[]) => object): PropEvolution | undefined {\n const proto = ctor.prototype as Record<symbol, unknown> | undefined;\n if (!proto || !Object.prototype.hasOwnProperty.call(proto, PROP_EVOLUTION)) return undefined;\n return proto[PROP_EVOLUTION] as PropEvolution;\n}\n\n/**\n * Bring a stored row's props up to what `type` declares today: old keys\n * renamed, values migrated, deprecated props reported. A type this registry\n * does not know, or one that never changed, hands `props` back as it is.\n *\n * Applies equally to a `to`/`set` command's args, which are a props diff.\n * An expression is moved by a rename but handed to no value hook: a formula's\n * result cannot be converted by rewriting it, so it is noted and left as written.\n */\nexport function migrateNodeProps(registry: Registry, type: string, props: Record<string, unknown>): PropMigration {\n const ctor = registry.node(type)?.ctor;\n const evolution = ctor ? propEvolutionOf(ctor) : undefined;\n return evolution ? applyPropEvolution(evolution, props) : { props, changes: [], deprecated: [] };\n}\n\n/** @internal {@link migrateNodeProps} once the type's rules are in hand. */\nexport function applyPropEvolution(evolution: PropEvolution, props: Record<string, unknown>): PropMigration {\n const changes: PropNote[] = [];\n const deprecated: PropNote[] = [];\n let out: Record<string, unknown> | null = null;\n const write = () => (out ??= { ...props });\n const isExpression = (value: unknown) => expressionOps.collect(value, \"\").length > 0;\n\n const convert = (key: string, value: unknown, at: string): unknown => {\n const hook = evolution.migrate[key];\n if (!hook || value === undefined) return value;\n if (isExpression(value)) {\n changes.push({ prop: at, message: `\"${at}\" is an expression, so its value was left as written.` });\n return value;\n }\n return hook(value);\n };\n\n for (const [from, to] of Object.entries(evolution.renamed)) {\n if (!Object.hasOwn(props, from)) continue;\n const target = write();\n const value = convert(from, props[from], from);\n delete target[from];\n if (props[to] !== undefined) {\n changes.push({ prop: from, message: `\"${from}\" was renamed \"${to}\", which the row also sets; the old value was dropped.` });\n continue;\n }\n if (value === undefined) delete target[to];\n else target[to] = value;\n changes.push({ prop: from, message: `\"${from}\" was renamed \"${to}\".` });\n }\n\n for (const key of Object.keys(evolution.migrate)) {\n if (Object.hasOwn(evolution.renamed, key)) continue;\n const current = (out ?? props)[key];\n if (current === undefined) continue;\n const next = convert(key, current, key);\n if (next === current) continue;\n const target = write();\n if (next === undefined) delete target[key];\n else target[key] = next;\n changes.push({ prop: key, message: next === undefined ? `\"${key}\" was dropped back to its default.` : `\"${key}\" was migrated.` });\n }\n\n for (const [key, message] of Object.entries(evolution.deprecated)) {\n if ((out ?? props)[key] !== undefined) deprecated.push({ prop: key, message });\n }\n return { props: out ?? props, changes, deprecated };\n}\n"]}
1
+ {"version":3,"file":"prop-evolution.js","sourceRoot":"","sources":["../../src/document/prop-evolution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiCjD,MAAM,cAAc,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAE/C,2GAA2G;AAC3G,MAAM,UAAU,oBAAoB,CAAC,IAA+C,EAAE,SAAwB;IACzG,IAAI,CAAC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{ Registry } from \"./registry\";\n\n/**\n * Declared by a component spec's `renamed`, `deprecated` and `migrate`, applied to a row's props whenever one\n * is built, and callable by a host rewriting stored rows. Unlike a document migration there is no version to\n * go by: a row stored a year ago and one stored today pass through the same rules, so every rule must leave a\n * current value alone.\n */\nexport interface PropEvolution {\n /** Old key → the entry it became. A row setting both keeps the new one. */\n readonly renamed: Readonly<Record<string, string>>;\n /** Entry → why it is deprecated and what to use instead. It still works. */\n readonly deprecated: Readonly<Record<string, string>>;\n /**\n * Keyed by an old key from {@link renamed}, it converts only what was stored under that key (a unit change\n * rides on a rename); keyed by an entry, it runs on every stored value and must hand a current one back\n * unchanged. `undefined` drops the prop back to its default.\n */\n readonly migrate: Readonly<Record<string, (value: unknown) => unknown>>;\n}\n\nexport interface PropNote {\n prop: string;\n message: string;\n}\n\nexport interface PropMigration {\n props: Record<string, unknown>;\n changes: PropNote[];\n deprecated: PropNote[];\n}\n\nconst PROP_EVOLUTION = Symbol(\"propEvolution\");\n\n/** @internal Record `evolution` on a node class; a component factory does this for its generated class. */\nexport function declarePropEvolution(ctor: abstract new (...args: never[]) => object, evolution: PropEvolution): void {\n (ctor.prototype as Record<symbol, unknown>)[PROP_EVOLUTION] = evolution;\n}\n\n/** @internal What {@link declarePropEvolution} recorded on this exact class. */\nexport function propEvolutionOf(ctor: abstract new (...args: never[]) => object): PropEvolution | undefined {\n const proto = ctor.prototype as Record<symbol, unknown> | undefined;\n if (!proto || !Object.prototype.hasOwnProperty.call(proto, PROP_EVOLUTION)) return undefined;\n return proto[PROP_EVOLUTION] as PropEvolution;\n}\n\n/**\n * A type this registry does not know, or one that never changed, hands `props` back as it is. Applies to a\n * `to`/`set` command's args too, which are a props diff. An expression is moved by a rename but handed to no\n * value hook: a formula's result cannot be converted by rewriting it, so it is noted and left as written.\n */\nexport function migrateNodeProps(registry: Registry, type: string, props: Record<string, unknown>): PropMigration {\n const ctor = registry.node(type)?.ctor;\n const evolution = ctor ? propEvolutionOf(ctor) : undefined;\n return evolution ? applyPropEvolution(evolution, props) : { props, changes: [], deprecated: [] };\n}\n\n/** @internal {@link migrateNodeProps} once the type's rules are in hand. */\nexport function applyPropEvolution(evolution: PropEvolution, props: Record<string, unknown>): PropMigration {\n const changes: PropNote[] = [];\n const deprecated: PropNote[] = [];\n let out: Record<string, unknown> | null = null;\n const write = () => (out ??= { ...props });\n const isExpression = (value: unknown) => expressionOps.collect(value, \"\").length > 0;\n\n const convert = (key: string, value: unknown, at: string): unknown => {\n const hook = evolution.migrate[key];\n if (!hook || value === undefined) return value;\n if (isExpression(value)) {\n changes.push({ prop: at, message: `\"${at}\" is an expression, so its value was left as written.` });\n return value;\n }\n return hook(value);\n };\n\n for (const [from, to] of Object.entries(evolution.renamed)) {\n if (!Object.hasOwn(props, from)) continue;\n const target = write();\n const value = convert(from, props[from], from);\n delete target[from];\n if (props[to] !== undefined) {\n changes.push({ prop: from, message: `\"${from}\" was renamed \"${to}\", which the row also sets; the old value was dropped.` });\n continue;\n }\n if (value === undefined) delete target[to];\n else target[to] = value;\n changes.push({ prop: from, message: `\"${from}\" was renamed \"${to}\".` });\n }\n\n for (const key of Object.keys(evolution.migrate)) {\n if (Object.hasOwn(evolution.renamed, key)) continue;\n const current = (out ?? props)[key];\n if (current === undefined) continue;\n const next = convert(key, current, key);\n if (next === current) continue;\n const target = write();\n if (next === undefined) delete target[key];\n else target[key] = next;\n changes.push({ prop: key, message: next === undefined ? `\"${key}\" was dropped back to its default.` : `\"${key}\" was migrated.` });\n }\n\n for (const [key, message] of Object.entries(evolution.deprecated)) {\n if ((out ?? props)[key] !== undefined) deprecated.push({ prop: key, message });\n }\n return { props: out ?? props, changes, deprecated };\n}\n"]}