@motionscript/core 0.1.0 → 0.1.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1062) hide show
  1. package/CHANGELOG.md +10 -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-3ZIUZZC7.js +13 -0
  446. package/dist/browser/chunks/chunk-3ZIUZZC7.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-7YOYMMXK.js +6 -0
  450. package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
  451. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  452. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/views.d.ts.map +1 -1
  510. package/dist/components/factory/views.js +0 -2
  511. package/dist/components/factory/views.js.map +1 -1
  512. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  513. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  514. package/dist/components/trees/2d/group-bounds.js +3 -22
  515. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  516. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  517. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  518. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  519. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  520. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  521. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  522. package/dist/components/trees/2d/node-motion.js +3 -31
  523. package/dist/components/trees/2d/node-motion.js.map +1 -1
  524. package/dist/components/trees/2d/node-render.d.ts +3 -20
  525. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-render.js +4 -23
  527. package/dist/components/trees/2d/node-render.js.map +1 -1
  528. package/dist/components/trees/2d/node-space.d.ts +4 -23
  529. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-space.js +3 -17
  531. package/dist/components/trees/2d/node-space.js.map +1 -1
  532. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  533. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-transform.js +4 -33
  535. package/dist/components/trees/2d/node-transform.js.map +1 -1
  536. package/dist/components/trees/2d/node2d.d.ts +112 -622
  537. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node2d.js +131 -605
  539. package/dist/components/trees/2d/node2d.js.map +1 -1
  540. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  541. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  542. package/dist/components/trees/audio/node-audio.js +18 -68
  543. package/dist/components/trees/audio/node-audio.js.map +1 -1
  544. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  545. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  546. package/dist/components/trees/node/node-editor-state.js +1 -13
  547. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  548. package/dist/components/trees/node/node-reactive.d.ts +6 -53
  549. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  550. package/dist/components/trees/node/node-reactive.js +4 -33
  551. package/dist/components/trees/node/node-reactive.js.map +1 -1
  552. package/dist/components/trees/node/node-time.d.ts +2 -15
  553. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-time.js.map +1 -1
  555. package/dist/components/trees/node/node-walk.d.ts +7 -32
  556. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  557. package/dist/components/trees/node/node-walk.js +7 -32
  558. package/dist/components/trees/node/node-walk.js.map +1 -1
  559. package/dist/components/trees/node/node.d.ts +43 -248
  560. package/dist/components/trees/node/node.d.ts.map +1 -1
  561. package/dist/components/trees/node/node.js +51 -229
  562. package/dist/components/trees/node/node.js.map +1 -1
  563. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  564. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  565. package/dist/components/trees/root/canvas2d-node.js +7 -47
  566. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  567. package/dist/components/trees/three/node3d.d.ts +24 -112
  568. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  569. package/dist/components/trees/three/node3d.js +22 -104
  570. package/dist/components/trees/three/node3d.js.map +1 -1
  571. package/dist/document/audio.d.ts +9 -21
  572. package/dist/document/audio.d.ts.map +1 -1
  573. package/dist/document/audio.js +13 -28
  574. package/dist/document/audio.js.map +1 -1
  575. package/dist/document/builtins.d.ts +3 -9
  576. package/dist/document/builtins.d.ts.map +1 -1
  577. package/dist/document/builtins.js +43 -89
  578. package/dist/document/builtins.js.map +1 -1
  579. package/dist/document/command-traits.d.ts +14 -37
  580. package/dist/document/command-traits.d.ts.map +1 -1
  581. package/dist/document/command-traits.js +22 -39
  582. package/dist/document/command-traits.js.map +1 -1
  583. package/dist/document/deny-globals.d.ts +9 -43
  584. package/dist/document/deny-globals.d.ts.map +1 -1
  585. package/dist/document/deny-globals.js +18 -58
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/diff.d.ts +6 -16
  588. package/dist/document/diff.d.ts.map +1 -1
  589. package/dist/document/diff.js +5 -11
  590. package/dist/document/diff.js.map +1 -1
  591. package/dist/document/doc-index.d.ts +5 -13
  592. package/dist/document/doc-index.d.ts.map +1 -1
  593. package/dist/document/doc-index.js +0 -2
  594. package/dist/document/doc-index.js.map +1 -1
  595. package/dist/document/expression/compile.d.ts +2 -2
  596. package/dist/document/expression/compile.d.ts.map +1 -1
  597. package/dist/document/expression/compile.js +8 -18
  598. package/dist/document/expression/compile.js.map +1 -1
  599. package/dist/document/expression/index.d.ts +11 -41
  600. package/dist/document/expression/index.d.ts.map +1 -1
  601. package/dist/document/expression/index.js +11 -41
  602. package/dist/document/expression/index.js.map +1 -1
  603. package/dist/document/expression/ops.d.ts +3 -12
  604. package/dist/document/expression/ops.d.ts.map +1 -1
  605. package/dist/document/expression/ops.js +4 -20
  606. package/dist/document/expression/ops.js.map +1 -1
  607. package/dist/document/expression/parse.d.ts +4 -14
  608. package/dist/document/expression/parse.d.ts.map +1 -1
  609. package/dist/document/expression/parse.js +34 -55
  610. package/dist/document/expression/parse.js.map +1 -1
  611. package/dist/document/expression/refs.d.ts +2 -8
  612. package/dist/document/expression/refs.d.ts.map +1 -1
  613. package/dist/document/expression/refs.js +2 -6
  614. package/dist/document/expression/refs.js.map +1 -1
  615. package/dist/document/expression/types.d.ts +18 -63
  616. package/dist/document/expression/types.d.ts.map +1 -1
  617. package/dist/document/expression/types.js +4 -15
  618. package/dist/document/expression/types.js.map +1 -1
  619. package/dist/document/expression/walk.d.ts +6 -20
  620. package/dist/document/expression/walk.d.ts.map +1 -1
  621. package/dist/document/expression/walk.js +18 -44
  622. package/dist/document/expression/walk.js.map +1 -1
  623. package/dist/document/index.js +2 -3
  624. package/dist/document/index.js.map +1 -1
  625. package/dist/document/migrate.d.ts +7 -22
  626. package/dist/document/migrate.d.ts.map +1 -1
  627. package/dist/document/migrate.js +44 -15
  628. package/dist/document/migrate.js.map +1 -1
  629. package/dist/document/missing-node.d.ts +4 -11
  630. package/dist/document/missing-node.d.ts.map +1 -1
  631. package/dist/document/missing-node.js +2 -5
  632. package/dist/document/missing-node.js.map +1 -1
  633. package/dist/document/node-decorator.d.ts +12 -53
  634. package/dist/document/node-decorator.d.ts.map +1 -1
  635. package/dist/document/node-decorator.js +16 -57
  636. package/dist/document/node-decorator.js.map +1 -1
  637. package/dist/document/node-descriptor.d.ts +25 -62
  638. package/dist/document/node-descriptor.d.ts.map +1 -1
  639. package/dist/document/node-descriptor.js.map +1 -1
  640. package/dist/document/placement.d.ts +18 -41
  641. package/dist/document/placement.d.ts.map +1 -1
  642. package/dist/document/placement.js +4 -11
  643. package/dist/document/placement.js.map +1 -1
  644. package/dist/document/project.d.ts +19 -52
  645. package/dist/document/project.d.ts.map +1 -1
  646. package/dist/document/project.js +2 -6
  647. package/dist/document/project.js.map +1 -1
  648. package/dist/document/prop-evolution.d.ts +10 -20
  649. package/dist/document/prop-evolution.d.ts.map +1 -1
  650. package/dist/document/prop-evolution.js +3 -7
  651. package/dist/document/prop-evolution.js.map +1 -1
  652. package/dist/document/registry.d.ts +80 -318
  653. package/dist/document/registry.d.ts.map +1 -1
  654. package/dist/document/registry.js +43 -147
  655. package/dist/document/registry.js.map +1 -1
  656. package/dist/document/settled-index.d.ts +11 -23
  657. package/dist/document/settled-index.d.ts.map +1 -1
  658. package/dist/document/settled-index.js +15 -34
  659. package/dist/document/settled-index.js.map +1 -1
  660. package/dist/document/timeline-patch.d.ts +6 -15
  661. package/dist/document/timeline-patch.d.ts.map +1 -1
  662. package/dist/document/timeline-patch.js +12 -21
  663. package/dist/document/timeline-patch.js.map +1 -1
  664. package/dist/document/timeline.d.ts +56 -263
  665. package/dist/document/timeline.d.ts.map +1 -1
  666. package/dist/document/timeline.js +71 -275
  667. package/dist/document/timeline.js.map +1 -1
  668. package/dist/document/types.d.ts +90 -264
  669. package/dist/document/types.d.ts.map +1 -1
  670. package/dist/document/types.js +13 -30
  671. package/dist/document/types.js.map +1 -1
  672. package/dist/document/validate.d.ts +10 -40
  673. package/dist/document/validate.d.ts.map +1 -1
  674. package/dist/document/validate.js +72 -137
  675. package/dist/document/validate.js.map +1 -1
  676. package/dist/document/vocabulary.d.ts +4 -7
  677. package/dist/document/vocabulary.d.ts.map +1 -1
  678. package/dist/document/vocabulary.js +0 -1
  679. package/dist/document/vocabulary.js.map +1 -1
  680. package/dist/index.d.ts +0 -1
  681. package/dist/index.d.ts.map +1 -1
  682. package/dist/index.js +0 -1
  683. package/dist/index.js.map +1 -1
  684. package/dist/layout/bounds.d.ts +1 -11
  685. package/dist/layout/bounds.d.ts.map +1 -1
  686. package/dist/layout/bounds.js.map +1 -1
  687. package/dist/layout/flex.d.ts +6 -20
  688. package/dist/layout/flex.d.ts.map +1 -1
  689. package/dist/layout/flex.js +7 -28
  690. package/dist/layout/flex.js.map +1 -1
  691. package/dist/layout/ops.d.ts +2 -11
  692. package/dist/layout/ops.d.ts.map +1 -1
  693. package/dist/layout/ops.js +2 -22
  694. package/dist/layout/ops.js.map +1 -1
  695. package/dist/layout/types.d.ts +11 -55
  696. package/dist/layout/types.d.ts.map +1 -1
  697. package/dist/layout/types.js.map +1 -1
  698. package/dist/platform/audio-sink.d.ts +7 -43
  699. package/dist/platform/audio-sink.d.ts.map +1 -1
  700. package/dist/platform/audio-sink.js +4 -29
  701. package/dist/platform/audio-sink.js.map +1 -1
  702. package/dist/platform/exporter.d.ts +5 -31
  703. package/dist/platform/exporter.d.ts.map +1 -1
  704. package/dist/platform/exporter.js.map +1 -1
  705. package/dist/platform/stepped-clock.d.ts +1 -16
  706. package/dist/platform/stepped-clock.d.ts.map +1 -1
  707. package/dist/platform/stepped-clock.js +1 -16
  708. package/dist/platform/stepped-clock.js.map +1 -1
  709. package/dist/platform/storage-adapter.d.ts +8 -68
  710. package/dist/platform/storage-adapter.d.ts.map +1 -1
  711. package/dist/platform/storage-adapter.js +8 -60
  712. package/dist/platform/storage-adapter.js.map +1 -1
  713. package/dist/platform/ticker.d.ts +11 -45
  714. package/dist/platform/ticker.d.ts.map +1 -1
  715. package/dist/platform/ticker.js +10 -37
  716. package/dist/platform/ticker.js.map +1 -1
  717. package/dist/project/config.d.ts +4 -14
  718. package/dist/project/config.d.ts.map +1 -1
  719. package/dist/project/config.js.map +1 -1
  720. package/dist/project/tree.d.ts +6 -35
  721. package/dist/project/tree.d.ts.map +1 -1
  722. package/dist/project/tree.js +1 -8
  723. package/dist/project/tree.js.map +1 -1
  724. package/dist/props/host.d.ts +2 -13
  725. package/dist/props/host.d.ts.map +1 -1
  726. package/dist/props/host.js.map +1 -1
  727. package/dist/props/layout.d.ts +1 -12
  728. package/dist/props/layout.d.ts.map +1 -1
  729. package/dist/props/layout.js +1 -12
  730. package/dist/props/layout.js.map +1 -1
  731. package/dist/props/observer.d.ts +1 -7
  732. package/dist/props/observer.d.ts.map +1 -1
  733. package/dist/props/observer.js.map +1 -1
  734. package/dist/props/slot.d.ts +6 -19
  735. package/dist/props/slot.d.ts.map +1 -1
  736. package/dist/props/slot.js +5 -14
  737. package/dist/props/slot.js.map +1 -1
  738. package/dist/render/canvas-render-context2d.d.ts +8 -68
  739. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  740. package/dist/render/canvas-render-context2d.js +8 -69
  741. package/dist/render/canvas-render-context2d.js.map +1 -1
  742. package/dist/render/clip-contains.d.ts +2 -16
  743. package/dist/render/clip-contains.d.ts.map +1 -1
  744. package/dist/render/clip-contains.js +21 -82
  745. package/dist/render/clip-contains.js.map +1 -1
  746. package/dist/render/clip.d.ts +7 -25
  747. package/dist/render/clip.d.ts.map +1 -1
  748. package/dist/render/clip.js +5 -17
  749. package/dist/render/clip.js.map +1 -1
  750. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  751. package/dist/render/descriptors/ellipse.js +0 -1
  752. package/dist/render/descriptors/ellipse.js.map +1 -1
  753. package/dist/render/descriptors/line.d.ts.map +1 -1
  754. package/dist/render/descriptors/line.js +0 -1
  755. package/dist/render/descriptors/line.js.map +1 -1
  756. package/dist/render/descriptors/path-builder.d.ts +4 -32
  757. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  758. package/dist/render/descriptors/path-builder.js +3 -25
  759. package/dist/render/descriptors/path-builder.js.map +1 -1
  760. package/dist/render/descriptors/path.d.ts +1 -11
  761. package/dist/render/descriptors/path.d.ts.map +1 -1
  762. package/dist/render/descriptors/path.js +0 -1
  763. package/dist/render/descriptors/path.js.map +1 -1
  764. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  765. package/dist/render/descriptors/polygon.js +0 -1
  766. package/dist/render/descriptors/polygon.js.map +1 -1
  767. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  768. package/dist/render/descriptors/polygram.js +0 -1
  769. package/dist/render/descriptors/polygram.js.map +1 -1
  770. package/dist/render/descriptors/rect.d.ts.map +1 -1
  771. package/dist/render/descriptors/rect.js +0 -1
  772. package/dist/render/descriptors/rect.js.map +1 -1
  773. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  774. package/dist/render/descriptors/richtext.js +0 -1
  775. package/dist/render/descriptors/richtext.js.map +1 -1
  776. package/dist/render/descriptors/shape.d.ts +17 -77
  777. package/dist/render/descriptors/shape.d.ts.map +1 -1
  778. package/dist/render/descriptors/shape.js +13 -47
  779. package/dist/render/descriptors/shape.js.map +1 -1
  780. package/dist/render/descriptors/text.d.ts +15 -94
  781. package/dist/render/descriptors/text.d.ts.map +1 -1
  782. package/dist/render/descriptors/text.js +8 -50
  783. package/dist/render/descriptors/text.js.map +1 -1
  784. package/dist/render/descriptors/transform.d.ts +5 -16
  785. package/dist/render/descriptors/transform.d.ts.map +1 -1
  786. package/dist/render/descriptors/transform.js +1 -17
  787. package/dist/render/descriptors/transform.js.map +1 -1
  788. package/dist/render/graphics2d.d.ts +24 -116
  789. package/dist/render/graphics2d.d.ts.map +1 -1
  790. package/dist/render/graphics2d.js +23 -108
  791. package/dist/render/graphics2d.js.map +1 -1
  792. package/dist/render/measure-context.d.ts +5 -29
  793. package/dist/render/measure-context.d.ts.map +1 -1
  794. package/dist/render/measure-context.js.map +1 -1
  795. package/dist/render/null-render-context.d.ts +2 -20
  796. package/dist/render/null-render-context.d.ts.map +1 -1
  797. package/dist/render/null-render-context.js +2 -20
  798. package/dist/render/null-render-context.js.map +1 -1
  799. package/dist/render/render-context2d.d.ts +52 -208
  800. package/dist/render/render-context2d.d.ts.map +1 -1
  801. package/dist/render/render-context2d.js.map +1 -1
  802. package/dist/render/surface.d.ts +2 -19
  803. package/dist/render/surface.d.ts.map +1 -1
  804. package/dist/render/surface.js.map +1 -1
  805. package/dist/render/text-defaults.d.ts +1 -17
  806. package/dist/render/text-defaults.d.ts.map +1 -1
  807. package/dist/render/text-defaults.js +6 -40
  808. package/dist/render/text-defaults.js.map +1 -1
  809. package/dist/render/text-layout.d.ts +12 -55
  810. package/dist/render/text-layout.d.ts.map +1 -1
  811. package/dist/render/text-layout.js +2 -16
  812. package/dist/render/text-layout.js.map +1 -1
  813. package/dist/render3d/bounds3d.d.ts +10 -32
  814. package/dist/render3d/bounds3d.d.ts.map +1 -1
  815. package/dist/render3d/bounds3d.js +2 -12
  816. package/dist/render3d/bounds3d.js.map +1 -1
  817. package/dist/render3d/builders.d.ts +8 -35
  818. package/dist/render3d/builders.d.ts.map +1 -1
  819. package/dist/render3d/builders.js +8 -35
  820. package/dist/render3d/builders.js.map +1 -1
  821. package/dist/render3d/camera.d.ts +10 -57
  822. package/dist/render3d/camera.d.ts.map +1 -1
  823. package/dist/render3d/camera.js +4 -26
  824. package/dist/render3d/camera.js.map +1 -1
  825. package/dist/render3d/fill3d.d.ts +7 -45
  826. package/dist/render3d/fill3d.d.ts.map +1 -1
  827. package/dist/render3d/fill3d.js +15 -85
  828. package/dist/render3d/fill3d.js.map +1 -1
  829. package/dist/render3d/geometry.d.ts +18 -106
  830. package/dist/render3d/geometry.d.ts.map +1 -1
  831. package/dist/render3d/geometry.js +2 -20
  832. package/dist/render3d/geometry.js.map +1 -1
  833. package/dist/render3d/graphics3d.d.ts +29 -133
  834. package/dist/render3d/graphics3d.d.ts.map +1 -1
  835. package/dist/render3d/graphics3d.js +23 -110
  836. package/dist/render3d/graphics3d.js.map +1 -1
  837. package/dist/render3d/index.d.ts +1 -16
  838. package/dist/render3d/index.d.ts.map +1 -1
  839. package/dist/render3d/index.js +1 -16
  840. package/dist/render3d/index.js.map +1 -1
  841. package/dist/render3d/inert.d.ts.map +1 -1
  842. package/dist/render3d/inert.js +1 -14
  843. package/dist/render3d/inert.js.map +1 -1
  844. package/dist/render3d/light.d.ts +3 -26
  845. package/dist/render3d/light.d.ts.map +1 -1
  846. package/dist/render3d/light.js.map +1 -1
  847. package/dist/render3d/material.d.ts +13 -87
  848. package/dist/render3d/material.d.ts.map +1 -1
  849. package/dist/render3d/material.js +2 -16
  850. package/dist/render3d/material.js.map +1 -1
  851. package/dist/render3d/matrix4.d.ts +14 -68
  852. package/dist/render3d/matrix4.d.ts.map +1 -1
  853. package/dist/render3d/matrix4.js +11 -60
  854. package/dist/render3d/matrix4.js.map +1 -1
  855. package/dist/render3d/render-context3d.d.ts +13 -51
  856. package/dist/render3d/render-context3d.d.ts.map +1 -1
  857. package/dist/render3d/render-context3d.js +9 -21
  858. package/dist/render3d/render-context3d.js.map +1 -1
  859. package/dist/render3d/resources.d.ts +9 -53
  860. package/dist/render3d/resources.d.ts.map +1 -1
  861. package/dist/render3d/resources.js +8 -48
  862. package/dist/render3d/resources.js.map +1 -1
  863. package/dist/render3d/rounded-box.d.ts +7 -21
  864. package/dist/render3d/rounded-box.d.ts.map +1 -1
  865. package/dist/render3d/rounded-box.js +7 -46
  866. package/dist/render3d/rounded-box.js.map +1 -1
  867. package/dist/render3d/scene-settings.d.ts +20 -78
  868. package/dist/render3d/scene-settings.d.ts.map +1 -1
  869. package/dist/render3d/scene-settings.js.map +1 -1
  870. package/dist/render3d/scene3d.d.ts +11 -53
  871. package/dist/render3d/scene3d.d.ts.map +1 -1
  872. package/dist/render3d/scene3d.js +12 -59
  873. package/dist/render3d/scene3d.js.map +1 -1
  874. package/dist/render3d/segments.d.ts +2 -25
  875. package/dist/render3d/segments.d.ts.map +1 -1
  876. package/dist/render3d/segments.js +1 -11
  877. package/dist/render3d/segments.js.map +1 -1
  878. package/dist/render3d/texture.d.ts +25 -112
  879. package/dist/render3d/texture.d.ts.map +1 -1
  880. package/dist/render3d/texture.js +3 -27
  881. package/dist/render3d/texture.js.map +1 -1
  882. package/dist/render3d/tracking.d.ts +2 -19
  883. package/dist/render3d/tracking.d.ts.map +1 -1
  884. package/dist/render3d/tracking.js +2 -19
  885. package/dist/render3d/tracking.js.map +1 -1
  886. package/dist/render3d/transform.d.ts +14 -60
  887. package/dist/render3d/transform.d.ts.map +1 -1
  888. package/dist/render3d/transform.js +0 -2
  889. package/dist/render3d/transform.js.map +1 -1
  890. package/dist/render3d/vector3.d.ts +6 -48
  891. package/dist/render3d/vector3.d.ts.map +1 -1
  892. package/dist/render3d/vector3.js +4 -38
  893. package/dist/render3d/vector3.js.map +1 -1
  894. package/dist/render3d/walk.d.ts +3 -27
  895. package/dist/render3d/walk.d.ts.map +1 -1
  896. package/dist/render3d/walk.js +5 -33
  897. package/dist/render3d/walk.js.map +1 -1
  898. package/dist/runtime/asset-refine.d.ts +34 -20
  899. package/dist/runtime/asset-refine.d.ts.map +1 -1
  900. package/dist/runtime/asset-refine.js +127 -31
  901. package/dist/runtime/asset-refine.js.map +1 -1
  902. package/dist/runtime/asset-timeline.d.ts +14 -53
  903. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  904. package/dist/runtime/asset-timeline.js +6 -27
  905. package/dist/runtime/asset-timeline.js.map +1 -1
  906. package/dist/runtime/asset-update.d.ts +7 -26
  907. package/dist/runtime/asset-update.d.ts.map +1 -1
  908. package/dist/runtime/asset-update.js +6 -18
  909. package/dist/runtime/asset-update.js.map +1 -1
  910. package/dist/runtime/audio-index.d.ts +0 -2
  911. package/dist/runtime/audio-index.d.ts.map +1 -1
  912. package/dist/runtime/audio-index.js +0 -2
  913. package/dist/runtime/audio-index.js.map +1 -1
  914. package/dist/runtime/builtin-context.d.ts +3 -9
  915. package/dist/runtime/builtin-context.d.ts.map +1 -1
  916. package/dist/runtime/builtin-context.js +3 -9
  917. package/dist/runtime/builtin-context.js.map +1 -1
  918. package/dist/runtime/clip-instance.d.ts +12 -39
  919. package/dist/runtime/clip-instance.d.ts.map +1 -1
  920. package/dist/runtime/clip-instance.js +21 -45
  921. package/dist/runtime/clip-instance.js.map +1 -1
  922. package/dist/runtime/clip-store.d.ts +26 -68
  923. package/dist/runtime/clip-store.d.ts.map +1 -1
  924. package/dist/runtime/clip-store.js +47 -81
  925. package/dist/runtime/clip-store.js.map +1 -1
  926. package/dist/runtime/engine.d.ts +31 -85
  927. package/dist/runtime/engine.d.ts.map +1 -1
  928. package/dist/runtime/engine.js +16 -49
  929. package/dist/runtime/engine.js.map +1 -1
  930. package/dist/runtime/frame-time.d.ts +4 -15
  931. package/dist/runtime/frame-time.d.ts.map +1 -1
  932. package/dist/runtime/frame-time.js +5 -12
  933. package/dist/runtime/frame-time.js.map +1 -1
  934. package/dist/runtime/index.d.ts +0 -1
  935. package/dist/runtime/index.d.ts.map +1 -1
  936. package/dist/runtime/index.js +0 -1
  937. package/dist/runtime/index.js.map +1 -1
  938. package/dist/runtime/node-picking.d.ts +59 -139
  939. package/dist/runtime/node-picking.d.ts.map +1 -1
  940. package/dist/runtime/node-picking.js +87 -157
  941. package/dist/runtime/node-picking.js.map +1 -1
  942. package/dist/runtime/node-picking3d.d.ts +39 -96
  943. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  944. package/dist/runtime/node-picking3d.js +98 -141
  945. package/dist/runtime/node-picking3d.js.map +1 -1
  946. package/dist/runtime/placement.d.ts +8 -17
  947. package/dist/runtime/placement.d.ts.map +1 -1
  948. package/dist/runtime/placement.js +7 -16
  949. package/dist/runtime/placement.js.map +1 -1
  950. package/dist/runtime/playback-controller.d.ts +78 -207
  951. package/dist/runtime/playback-controller.d.ts.map +1 -1
  952. package/dist/runtime/playback-controller.js +111 -226
  953. package/dist/runtime/playback-controller.js.map +1 -1
  954. package/dist/runtime/playback.d.ts +6 -14
  955. package/dist/runtime/playback.d.ts.map +1 -1
  956. package/dist/runtime/playback.js +6 -14
  957. package/dist/runtime/playback.js.map +1 -1
  958. package/dist/runtime/project-assets.d.ts +6 -14
  959. package/dist/runtime/project-assets.d.ts.map +1 -1
  960. package/dist/runtime/project-assets.js +7 -16
  961. package/dist/runtime/project-assets.js.map +1 -1
  962. package/dist/runtime/session.d.ts +22 -45
  963. package/dist/runtime/session.d.ts.map +1 -1
  964. package/dist/runtime/session.js +26 -46
  965. package/dist/runtime/session.js.map +1 -1
  966. package/dist/runtime/settle.d.ts +4 -10
  967. package/dist/runtime/settle.d.ts.map +1 -1
  968. package/dist/runtime/settle.js +4 -10
  969. package/dist/runtime/settle.js.map +1 -1
  970. package/dist/runtime/state-evaluator.d.ts +15 -37
  971. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  972. package/dist/runtime/state-evaluator.js +27 -44
  973. package/dist/runtime/state-evaluator.js.map +1 -1
  974. package/dist/runtime/text-geometry.d.ts +18 -47
  975. package/dist/runtime/text-geometry.d.ts.map +1 -1
  976. package/dist/runtime/text-geometry.js +13 -27
  977. package/dist/runtime/text-geometry.js.map +1 -1
  978. package/dist/sdk/index.d.ts +1 -7
  979. package/dist/sdk/index.d.ts.map +1 -1
  980. package/dist/sdk/index.js +30 -138
  981. package/dist/sdk/index.js.map +1 -1
  982. package/dist/tween/command-decorator.d.ts +6 -26
  983. package/dist/tween/command-decorator.d.ts.map +1 -1
  984. package/dist/tween/command-decorator.js +1 -6
  985. package/dist/tween/command-decorator.js.map +1 -1
  986. package/dist/tween/command.d.ts +6 -53
  987. package/dist/tween/command.d.ts.map +1 -1
  988. package/dist/tween/command.js +5 -40
  989. package/dist/tween/command.js.map +1 -1
  990. package/dist/tween/ease/curve.d.ts +2 -17
  991. package/dist/tween/ease/curve.d.ts.map +1 -1
  992. package/dist/tween/ease/curve.js +1 -6
  993. package/dist/tween/ease/curve.js.map +1 -1
  994. package/dist/tween/ease/describe.d.ts +0 -11
  995. package/dist/tween/ease/describe.d.ts.map +1 -1
  996. package/dist/tween/ease/describe.js +0 -23
  997. package/dist/tween/ease/describe.js.map +1 -1
  998. package/dist/tween/ease/spec.d.ts +2 -18
  999. package/dist/tween/ease/spec.d.ts.map +1 -1
  1000. package/dist/tween/ease/spec.js.map +1 -1
  1001. package/dist/tween/inert.d.ts +1 -14
  1002. package/dist/tween/inert.d.ts.map +1 -1
  1003. package/dist/tween/inert.js +1 -14
  1004. package/dist/tween/inert.js.map +1 -1
  1005. package/dist/tween/lerp.d.ts +2 -26
  1006. package/dist/tween/lerp.d.ts.map +1 -1
  1007. package/dist/tween/lerp.js +2 -26
  1008. package/dist/tween/lerp.js.map +1 -1
  1009. package/dist/tween/loop.d.ts +9 -50
  1010. package/dist/tween/loop.d.ts.map +1 -1
  1011. package/dist/tween/loop.js +6 -31
  1012. package/dist/tween/loop.js.map +1 -1
  1013. package/dist/tween/prepare.d.ts +2 -30
  1014. package/dist/tween/prepare.d.ts.map +1 -1
  1015. package/dist/tween/prepare.js +2 -30
  1016. package/dist/tween/prepare.js.map +1 -1
  1017. package/dist/tween/stepper.d.ts +4 -25
  1018. package/dist/tween/stepper.d.ts.map +1 -1
  1019. package/dist/tween/stepper.js.map +1 -1
  1020. package/dist/tween/to-command.d.ts +1 -8
  1021. package/dist/tween/to-command.d.ts.map +1 -1
  1022. package/dist/tween/to-command.js +2 -25
  1023. package/dist/tween/to-command.js.map +1 -1
  1024. package/dist/util/context.d.ts +4 -29
  1025. package/dist/util/context.d.ts.map +1 -1
  1026. package/dist/util/context.js +3 -15
  1027. package/dist/util/context.js.map +1 -1
  1028. package/dist/util/csv.d.ts +4 -29
  1029. package/dist/util/csv.d.ts.map +1 -1
  1030. package/dist/util/csv.js +3 -22
  1031. package/dist/util/csv.js.map +1 -1
  1032. package/dist/util/metrics.d.ts +2 -26
  1033. package/dist/util/metrics.d.ts.map +1 -1
  1034. package/dist/util/metrics.js +2 -26
  1035. package/dist/util/metrics.js.map +1 -1
  1036. package/dist/util/random.d.ts +20 -87
  1037. package/dist/util/random.d.ts.map +1 -1
  1038. package/dist/util/random.js +20 -87
  1039. package/dist/util/random.js.map +1 -1
  1040. package/dist/util/reference.d.ts +6 -35
  1041. package/dist/util/reference.d.ts.map +1 -1
  1042. package/dist/util/reference.js +1 -4
  1043. package/dist/util/reference.js.map +1 -1
  1044. package/dist/util/scheduler.d.ts +6 -27
  1045. package/dist/util/scheduler.d.ts.map +1 -1
  1046. package/dist/util/scheduler.js +8 -35
  1047. package/dist/util/scheduler.js.map +1 -1
  1048. package/package.json +1 -1
  1049. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1050. package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
  1051. package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
  1052. package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
  1053. package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
  1054. package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
  1055. package/dist/renamed-scene-names.d.ts +0 -17
  1056. package/dist/renamed-scene-names.d.ts.map +0 -1
  1057. package/dist/renamed-scene-names.js +0 -9
  1058. package/dist/renamed-scene-names.js.map +0 -1
  1059. package/dist/runtime/precompisition.d.ts +0 -24
  1060. package/dist/runtime/precompisition.d.ts.map +0 -1
  1061. package/dist/runtime/precompisition.js +0 -7
  1062. package/dist/runtime/precompisition.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @motionscript/core
2
2
 
3
+ ## 0.1.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 3630b74: Editing a node whose own commands animate what its asset declaration reads no longer re-runs that declaration on every frame the commands cover. A sweep after an edit takes back what an owner declared on a frame when every slot it read there holds what it held, so moving a 3D component with a build-in command costs about 10 ms per edit instead of re-running its whole `render` a few hundred times (about 215 ms for a 19-tile board). A declaration that read anything else runs again as before.
8
+ - 1c43a37: `projectNode3D` also reports `bounds`: what the node and its children draw, as a box in the node's own frame. Projected through `localPoints`, it is a selection box that turns and scales with the mesh, where the screen box `getNodeBox` reports is only the upright rectangle around it.
9
+ - e279864: **Breaking:** the deprecated shims and dead exports are gone. Core drops the `SceneDocument`, `SceneEffect`, `SceneTimeline`, `integrateSpeedToSceneTime` and `sourceTimeAtSceneElapsed` aliases, `Sound.sceneDurationFor`, the `Precomp*` aliases of the asset-timeline names, `ImageFilters` and `VideoFilters` (use `Adjustments` and `VideoAdjustments`), `PropertyMeta.withdrawn`, `AssetTimelineOptions.lifespans`, and the unused `opacity` and `blend` of per-shape descriptors (`ShapeState`). The `filters` prop of image and video fills is removed too: write the grade as `preset: { adjustments }`. Documents move to format 3, and opening one that carries `filters` on a media fill moves it into `preset.adjustments`. Also removed as unused: `sampleParam`, `IDENTITY_AFFINE3`, `neutralPreset`, `resolveMediaPreset`'s second argument, `paramAtDistance`, `arcPointFunction`, `segmentChord`, `isStyleOnlySegment`, `withTransformDescriptor`, `easeKey`, `isParentNode`, `AudioParams`, `ResolvedSoundProps`, `StarProps`, `RotatedBoxProps`, `ModelView3DProps` and `NumberNodeFormat`. In headless, `Semaphore`, `withDeadline`, `toRenderError` and `cleanPageErrorMessage` were internal and are deleted.
10
+
11
+ Migration: a stored document needs nothing done to it. Opening a format 2 document moves a media fill's `filters` into `preset.adjustments` (dropped where `preset.adjustments` already states the grade), and saving it writes format 3. Code that named a removed export uses what it aliased: `Adjustments` for `ImageFilters`, `VideoAdjustments` for `VideoFilters`, and the asset-timeline names for the `Precomp*` aliases.
12
+
3
13
  ## 0.1.0
4
14
 
5
15
  ### Minor Changes
@@ -11,14 +11,7 @@ export interface AssetDelta {
11
11
  /** Keys whose record appeared, disappeared, or changed window or content. */
12
12
  readonly keys: ReadonlySet<string>;
13
13
  }
14
- /**
15
- * One clip's asset windows, per owner, in clip-local frames.
16
- *
17
- * Owners replace their segments wholesale, and a key's record — the union window
18
- * over every owner that needs it — is recomputed only for the keys an update
19
- * touched. The records keep today's {@link AssetRecord} shape so the manager,
20
- * exporter and mixer read them unchanged.
21
- */
14
+ /** One clip's asset windows, per owner, in clip-local frames. Owners replace their segments wholesale, and a key's record (the union window over every owner that needs it) is recomputed only for keys an update touched. Records keep the {@link AssetRecord} shape so the manager, exporter and mixer read them unchanged. */
22
15
  export declare class AssetIndex {
23
16
  constructor(frameCount: number);
24
17
  setOwner(ownerKey: string, segments: readonly AssetSegment[]): AssetDelta;
@@ -1 +1 @@
1
- {"version":3,"file":"asset-index.d.ts","sourceRoot":"","sources":["../../src/assets/asset-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACtC;AAeD;;;;;;;GAOG;AACH,qBAAa,UAAU;gBACP,UAAU,EAAE,MAAM;I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,CAAC,KAAK;IASb,OAAO,CAAC,OAAO;IAaf,OAAO,CAAC,QAAQ;IAqBhB,OAAO,CAAC,QAAQ;CAqCnB"}
@@ -1,13 +1,6 @@
1
1
  import { assetKey } from "./scope.js";
2
2
  const NO_OWNERS = new Set();
3
- /**
4
- * One clip's asset windows, per owner, in clip-local frames.
5
- *
6
- * Owners replace their segments wholesale, and a key's record — the union window
7
- * over every owner that needs it — is recomputed only for the keys an update
8
- * touched. The records keep today's {@link AssetRecord} shape so the manager,
9
- * exporter and mixer read them unchanged.
10
- */
3
+ /** One clip's asset windows, per owner, in clip-local frames. Owners replace their segments wholesale, and a key's record (the union window over every owner that needs it) is recomputed only for keys an update touched. Records keep the {@link AssetRecord} shape so the manager, exporter and mixer read them unchanged. */
11
4
  export class AssetIndex {
12
5
  constructor(frameCount) {
13
6
  this._frameCount = Math.max(0, frameCount);
@@ -1 +1 @@
1
- {"version":3,"file":"asset-index.js","sourceRoot":"","sources":["../../src/assets/asset-index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAC;AA0BnD,MAAM,SAAS,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,OAAO,UAAU;IACnB,YAAY,UAAkB;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,QAAQ,CAAC,QAAgB,EAAE,QAAiC;QACxD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,QAAQ;YAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAExD,MAAM,IAAI,GAAkB,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,EAA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CAAC,UAAU,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IACrH,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACb,KAAK,OAAO,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,GAAG,CAAa,CAAC;YACxB,OAAO,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC;QAClE,CAAC;QACD,KAAK,MAAM;YACP,OAAO,CAAC,CAAC,UAAU,KAAM,CAAc,CAAC,UAAU,CAAC;QACvD,KAAK,QAAQ;YACT,OAAO,CAAC,CAAC,IAAI,KAAM,CAAc,CAAC,IAAI,CAAC;QAC3C;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC","sourcesContent":["import type { AssetRecord } from \"./record\";\nimport { assetKey, type AssetDecl } from \"./scope\";\n\nexport interface AssetSegment {\n key: string;\n decl: AssetDecl;\n startFrame: number;\n /** Inclusive. `Infinity` runs to the clip's end. */\n endFrame: number;\n}\n\nexport interface AssetDelta {\n /** Keys whose record appeared, disappeared, or changed window or content. */\n readonly keys: ReadonlySet<string>;\n}\n\ninterface OwnerSegments {\n declared: Map<string, AssetSegment[]>;\n /** Found missing at draw time rather than declared; cleared by the owner's next `setOwner`. */\n learned: Map<string, AssetSegment[]>;\n}\n\ninterface KeyEntry {\n record: AssetRecord;\n layout: boolean;\n}\n\nconst NO_OWNERS: ReadonlySet<string> = new Set();\n\n/**\n * One clip's asset windows, per owner, in clip-local frames.\n *\n * Owners replace their segments wholesale, and a key's record — the union window\n * over every owner that needs it — is recomputed only for the keys an update\n * touched. The records keep today's {@link AssetRecord} shape so the manager,\n * exporter and mixer read them unchanged.\n */\nexport class AssetIndex {\n constructor(frameCount: number) {\n this._frameCount = Math.max(0, frameCount);\n }\n\n setOwner(ownerKey: string, segments: readonly AssetSegment[]): AssetDelta {\n const touched = new Set<string>();\n const previous = this._owners.get(ownerKey);\n if (previous) this._unlink(ownerKey, previous, touched);\n\n const next: OwnerSegments = { declared: new Map(), learned: new Map() };\n for (const segment of segments) {\n if (!(segment.endFrame >= segment.startFrame)) continue;\n appendSegment(next.declared, { ...segment });\n }\n if (next.declared.size > 0) {\n this._owners.set(ownerKey, next);\n this._link(ownerKey, next, touched);\n } else {\n this._owners.delete(ownerKey);\n }\n return this._refresh(touched);\n }\n\n removeOwner(ownerKey: string): AssetDelta {\n const previous = this._owners.get(ownerKey);\n if (!previous) return { keys: new Set() };\n const touched = new Set<string>();\n this._unlink(ownerKey, previous, touched);\n this._owners.delete(ownerKey);\n return this._refresh(touched);\n }\n\n learn(ownerKey: string, decl: AssetDecl, frame: number): AssetDelta {\n const key = assetKey(decl);\n let owner = this._owners.get(ownerKey);\n if (!owner) {\n owner = { declared: new Map(), learned: new Map() };\n this._owners.set(ownerKey, owner);\n }\n const list = owner.learned.get(key) ?? [];\n const at = list.findIndex((s) => frame >= s.startFrame - 1 && frame <= s.endFrame + 1);\n if (at < 0) {\n list.push({ key, decl, startFrame: frame, endFrame: frame });\n } else {\n // Replaced rather than widened in place: `segmentsOf` hands these out.\n const hit = list[at];\n list[at] = {\n ...hit,\n startFrame: Math.min(hit.startFrame, frame),\n endFrame: Math.max(hit.endFrame, frame),\n };\n }\n owner.learned.set(key, list);\n let owners = this._byKey.get(key);\n if (!owners) this._byKey.set(key, (owners = new Set()));\n owners.add(ownerKey);\n return this._refresh(new Set([key]));\n }\n\n setFrameCount(frameCount: number): AssetDelta {\n const next = Math.max(0, frameCount);\n if (next === this._frameCount) return { keys: new Set() };\n this._frameCount = next;\n return this._refresh(new Set(this._byKey.keys()));\n }\n\n owners(key: string): ReadonlySet<string> {\n return this._byKey.get(key) ?? NO_OWNERS;\n }\n\n /** Declared segments, then learned ones. */\n segmentsOf(ownerKey: string): readonly AssetSegment[] {\n const owner = this._owners.get(ownerKey);\n if (!owner) return [];\n const out: AssetSegment[] = [];\n for (const list of owner.declared.values()) out.push(...list);\n for (const list of owner.learned.values()) out.push(...list);\n return out;\n }\n\n /** Declared segments only — what a partial re-declaration keeps the front of. */\n declaredSegmentsOf(ownerKey: string): readonly AssetSegment[] {\n const owner = this._owners.get(ownerKey);\n if (!owner) return [];\n const out: AssetSegment[] = [];\n for (const list of owner.declared.values()) out.push(...list);\n return out;\n }\n\n ownerKeys(): IterableIterator<string> {\n return this._owners.keys();\n }\n\n records(): ReadonlyMap<string, AssetRecord> {\n return this._records;\n }\n\n /** Fonts, and loaders any owner declared with `gate: \"layout\"`. */\n layoutGates(): readonly AssetRecord[] {\n if (this._layoutGates === null) {\n const gates: AssetRecord[] = [];\n for (const entry of this._entries.values()) {\n if (entry.layout) gates.push(entry.record);\n }\n this._layoutGates = gates;\n }\n return this._layoutGates;\n }\n\n private _frameCount: number;\n private readonly _owners = new Map<string, OwnerSegments>();\n private readonly _byKey = new Map<string, Set<string>>();\n private readonly _entries = new Map<string, KeyEntry>();\n private readonly _records = new Map<string, AssetRecord>();\n private _layoutGates: AssetRecord[] | null = null;\n\n private _link(ownerKey: string, owner: OwnerSegments, touched: Set<string>): void {\n for (const key of owner.declared.keys()) {\n let owners = this._byKey.get(key);\n if (!owners) this._byKey.set(key, (owners = new Set()));\n owners.add(ownerKey);\n touched.add(key);\n }\n }\n\n private _unlink(ownerKey: string, owner: OwnerSegments, touched: Set<string>): void {\n for (const map of [owner.declared, owner.learned]) {\n for (const key of map.keys()) {\n const owners = this._byKey.get(key);\n if (owners) {\n owners.delete(ownerKey);\n if (owners.size === 0) this._byKey.delete(key);\n }\n touched.add(key);\n }\n }\n }\n\n private _refresh(keys: ReadonlySet<string>): AssetDelta {\n const changed = new Set<string>();\n for (const key of keys) {\n const previous = this._entries.get(key);\n const next = this._compute(key);\n if (next === undefined) {\n if (previous === undefined) continue;\n this._entries.delete(key);\n this._records.delete(key);\n } else if (previous !== undefined && previous.layout === next.layout && sameRecord(previous.record, next.record)) {\n continue;\n } else {\n this._entries.set(key, next);\n this._records.set(key, next.record);\n }\n changed.add(key);\n }\n if (changed.size > 0) this._layoutGates = null;\n return { keys: changed };\n }\n\n private _compute(key: string): KeyEntry | undefined {\n const owners = this._byKey.get(key);\n if (!owners) return undefined;\n const last = this._frameCount - 1;\n let first: AssetSegment | undefined;\n let start = Infinity;\n let end = -Infinity;\n let layoutLoader = false;\n\n const visit = (list: AssetSegment[] | undefined): void => {\n if (!list) return;\n for (const segment of list) {\n const from = Math.max(0, segment.startFrame);\n const to = Math.min(last, segment.endFrame);\n if (to < from) continue;\n // The earliest segment speaks for the key.\n if (from < start) {\n start = from;\n first = segment;\n }\n if (to > end) end = to;\n if (segment.decl.type === \"loader\" && segment.decl.gate === \"layout\") layoutLoader = true;\n }\n };\n for (const ownerKey of owners) {\n const owner = this._owners.get(ownerKey);\n if (!owner) continue;\n visit(owner.declared.get(key));\n visit(owner.learned.get(key));\n }\n\n if (first === undefined) return undefined;\n return {\n record: recordOf(first.decl, start, end),\n layout: first.decl.type === \"font\" || layoutLoader,\n };\n }\n}\n\nfunction appendSegment(map: Map<string, AssetSegment[]>, segment: AssetSegment): void {\n const list = map.get(segment.key);\n if (list) list.push(segment);\n else map.set(segment.key, [segment]);\n}\n\nfunction recordOf(decl: AssetDecl, startFrame: number, endFrame: number): AssetRecord {\n switch (decl.type) {\n case \"image\":\n return { type: \"image\", startFrame, endFrame, src: decl.src };\n case \"video\":\n return {\n type: \"video\", startFrame, endFrame, src: decl.src,\n trimStart: decl.trimStart, trimEnd: decl.trimEnd,\n };\n case \"font\":\n return { type: \"font\", startFrame, endFrame, fontWeight: decl.weight, fontFamily: decl.family, src: decl.family };\n case \"loader\":\n return { type: \"loader\", src: decl.key, startFrame, endFrame, load: decl.load };\n }\n}\n\nfunction sameRecord(a: AssetRecord, b: AssetRecord): boolean {\n if (a.type !== b.type || a.src !== b.src || a.startFrame !== b.startFrame || a.endFrame !== b.endFrame) return false;\n switch (a.type) {\n case \"video\": {\n const v = b as typeof a;\n return a.trimStart === v.trimStart && a.trimEnd === v.trimEnd;\n }\n case \"font\":\n return a.fontWeight === (b as typeof a).fontWeight;\n case \"loader\":\n return a.load === (b as typeof a).load;\n default:\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"asset-index.js","sourceRoot":"","sources":["../../src/assets/asset-index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAC;AA0BnD,MAAM,SAAS,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEjD,iUAAiU;AACjU,MAAM,OAAO,UAAU;IACnB,YAAY,UAAkB;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,QAAQ,CAAC,QAAgB,EAAE,QAAiC;QACxD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,QAAQ;YAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAExD,MAAM,IAAI,GAAkB,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;QACxE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC7B,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;gBAAE,SAAS;YACxD,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,KAAK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O,CAAC,CAAC,IAAI,KAAM,CAAc,CAAC,IAAI,CAAC;QAC3C;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC","sourcesContent":["import type { AssetRecord } from \"./record\";\nimport { assetKey, type AssetDecl } from \"./scope\";\n\nexport interface AssetSegment {\n key: string;\n decl: AssetDecl;\n startFrame: number;\n /** Inclusive. `Infinity` runs to the clip's end. */\n endFrame: number;\n}\n\nexport interface AssetDelta {\n /** Keys whose record appeared, disappeared, or changed window or content. */\n readonly keys: ReadonlySet<string>;\n}\n\ninterface OwnerSegments {\n declared: Map<string, AssetSegment[]>;\n /** Found missing at draw time rather than declared; cleared by the owner's next `setOwner`. */\n learned: Map<string, AssetSegment[]>;\n}\n\ninterface KeyEntry {\n record: AssetRecord;\n layout: boolean;\n}\n\nconst NO_OWNERS: ReadonlySet<string> = new Set();\n\n/** One clip's asset windows, per owner, in clip-local frames. Owners replace their segments wholesale, and a key's record (the union window over every owner that needs it) is recomputed only for keys an update touched. Records keep the {@link AssetRecord} shape so the manager, exporter and mixer read them unchanged. */\nexport class AssetIndex {\n constructor(frameCount: number) {\n this._frameCount = Math.max(0, frameCount);\n }\n\n setOwner(ownerKey: string, segments: readonly AssetSegment[]): AssetDelta {\n const touched = new Set<string>();\n const previous = this._owners.get(ownerKey);\n if (previous) this._unlink(ownerKey, previous, touched);\n\n const next: OwnerSegments = { declared: new Map(), learned: new Map() };\n for (const segment of segments) {\n if (!(segment.endFrame >= segment.startFrame)) continue;\n appendSegment(next.declared, { ...segment });\n }\n if (next.declared.size > 0) {\n this._owners.set(ownerKey, next);\n this._link(ownerKey, next, touched);\n } else {\n this._owners.delete(ownerKey);\n }\n return this._refresh(touched);\n }\n\n removeOwner(ownerKey: string): AssetDelta {\n const previous = this._owners.get(ownerKey);\n if (!previous) return { keys: new Set() };\n const touched = new Set<string>();\n this._unlink(ownerKey, previous, touched);\n this._owners.delete(ownerKey);\n return this._refresh(touched);\n }\n\n learn(ownerKey: string, decl: AssetDecl, frame: number): AssetDelta {\n const key = assetKey(decl);\n let owner = this._owners.get(ownerKey);\n if (!owner) {\n owner = { declared: new Map(), learned: new Map() };\n this._owners.set(ownerKey, owner);\n }\n const list = owner.learned.get(key) ?? [];\n const at = list.findIndex((s) => frame >= s.startFrame - 1 && frame <= s.endFrame + 1);\n if (at < 0) {\n list.push({ key, decl, startFrame: frame, endFrame: frame });\n } else {\n // Replaced rather than widened in place: `segmentsOf` hands these out.\n const hit = list[at];\n list[at] = {\n ...hit,\n startFrame: Math.min(hit.startFrame, frame),\n endFrame: Math.max(hit.endFrame, frame),\n };\n }\n owner.learned.set(key, list);\n let owners = this._byKey.get(key);\n if (!owners) this._byKey.set(key, (owners = new Set()));\n owners.add(ownerKey);\n return this._refresh(new Set([key]));\n }\n\n setFrameCount(frameCount: number): AssetDelta {\n const next = Math.max(0, frameCount);\n if (next === this._frameCount) return { keys: new Set() };\n this._frameCount = next;\n return this._refresh(new Set(this._byKey.keys()));\n }\n\n owners(key: string): ReadonlySet<string> {\n return this._byKey.get(key) ?? NO_OWNERS;\n }\n\n /** Declared segments, then learned ones. */\n segmentsOf(ownerKey: string): readonly AssetSegment[] {\n const owner = this._owners.get(ownerKey);\n if (!owner) return [];\n const out: AssetSegment[] = [];\n for (const list of owner.declared.values()) out.push(...list);\n for (const list of owner.learned.values()) out.push(...list);\n return out;\n }\n\n /** Declared segments only — what a partial re-declaration keeps the front of. */\n declaredSegmentsOf(ownerKey: string): readonly AssetSegment[] {\n const owner = this._owners.get(ownerKey);\n if (!owner) return [];\n const out: AssetSegment[] = [];\n for (const list of owner.declared.values()) out.push(...list);\n return out;\n }\n\n ownerKeys(): IterableIterator<string> {\n return this._owners.keys();\n }\n\n records(): ReadonlyMap<string, AssetRecord> {\n return this._records;\n }\n\n /** Fonts, and loaders any owner declared with `gate: \"layout\"`. */\n layoutGates(): readonly AssetRecord[] {\n if (this._layoutGates === null) {\n const gates: AssetRecord[] = [];\n for (const entry of this._entries.values()) {\n if (entry.layout) gates.push(entry.record);\n }\n this._layoutGates = gates;\n }\n return this._layoutGates;\n }\n\n private _frameCount: number;\n private readonly _owners = new Map<string, OwnerSegments>();\n private readonly _byKey = new Map<string, Set<string>>();\n private readonly _entries = new Map<string, KeyEntry>();\n private readonly _records = new Map<string, AssetRecord>();\n private _layoutGates: AssetRecord[] | null = null;\n\n private _link(ownerKey: string, owner: OwnerSegments, touched: Set<string>): void {\n for (const key of owner.declared.keys()) {\n let owners = this._byKey.get(key);\n if (!owners) this._byKey.set(key, (owners = new Set()));\n owners.add(ownerKey);\n touched.add(key);\n }\n }\n\n private _unlink(ownerKey: string, owner: OwnerSegments, touched: Set<string>): void {\n for (const map of [owner.declared, owner.learned]) {\n for (const key of map.keys()) {\n const owners = this._byKey.get(key);\n if (owners) {\n owners.delete(ownerKey);\n if (owners.size === 0) this._byKey.delete(key);\n }\n touched.add(key);\n }\n }\n }\n\n private _refresh(keys: ReadonlySet<string>): AssetDelta {\n const changed = new Set<string>();\n for (const key of keys) {\n const previous = this._entries.get(key);\n const next = this._compute(key);\n if (next === undefined) {\n if (previous === undefined) continue;\n this._entries.delete(key);\n this._records.delete(key);\n } else if (previous !== undefined && previous.layout === next.layout && sameRecord(previous.record, next.record)) {\n continue;\n } else {\n this._entries.set(key, next);\n this._records.set(key, next.record);\n }\n changed.add(key);\n }\n if (changed.size > 0) this._layoutGates = null;\n return { keys: changed };\n }\n\n private _compute(key: string): KeyEntry | undefined {\n const owners = this._byKey.get(key);\n if (!owners) return undefined;\n const last = this._frameCount - 1;\n let first: AssetSegment | undefined;\n let start = Infinity;\n let end = -Infinity;\n let layoutLoader = false;\n\n const visit = (list: AssetSegment[] | undefined): void => {\n if (!list) return;\n for (const segment of list) {\n const from = Math.max(0, segment.startFrame);\n const to = Math.min(last, segment.endFrame);\n if (to < from) continue;\n // The earliest segment speaks for the key.\n if (from < start) {\n start = from;\n first = segment;\n }\n if (to > end) end = to;\n if (segment.decl.type === \"loader\" && segment.decl.gate === \"layout\") layoutLoader = true;\n }\n };\n for (const ownerKey of owners) {\n const owner = this._owners.get(ownerKey);\n if (!owner) continue;\n visit(owner.declared.get(key));\n visit(owner.learned.get(key));\n }\n\n if (first === undefined) return undefined;\n return {\n record: recordOf(first.decl, start, end),\n layout: first.decl.type === \"font\" || layoutLoader,\n };\n }\n}\n\nfunction appendSegment(map: Map<string, AssetSegment[]>, segment: AssetSegment): void {\n const list = map.get(segment.key);\n if (list) list.push(segment);\n else map.set(segment.key, [segment]);\n}\n\nfunction recordOf(decl: AssetDecl, startFrame: number, endFrame: number): AssetRecord {\n switch (decl.type) {\n case \"image\":\n return { type: \"image\", startFrame, endFrame, src: decl.src };\n case \"video\":\n return {\n type: \"video\", startFrame, endFrame, src: decl.src,\n trimStart: decl.trimStart, trimEnd: decl.trimEnd,\n };\n case \"font\":\n return { type: \"font\", startFrame, endFrame, fontWeight: decl.weight, fontFamily: decl.family, src: decl.family };\n case \"loader\":\n return { type: \"loader\", src: decl.key, startFrame, endFrame, load: decl.load };\n }\n}\n\nfunction sameRecord(a: AssetRecord, b: AssetRecord): boolean {\n if (a.type !== b.type || a.src !== b.src || a.startFrame !== b.startFrame || a.endFrame !== b.endFrame) return false;\n switch (a.type) {\n case \"video\": {\n const v = b as typeof a;\n return a.trimStart === v.trimStart && a.trimEnd === v.trimEnd;\n }\n case \"font\":\n return a.fontWeight === (b as typeof a).fontWeight;\n case \"loader\":\n return a.load === (b as typeof a).load;\n default:\n return true;\n }\n}\n"]}
@@ -1,60 +1,24 @@
1
1
  import { type AudioMeta, type FontMeta, type ImageMeta, AssetManifest, type VideoMeta } from "./manifest.js";
2
2
  /**
3
- * What a scene can ask about the assets available to it.
3
+ * What a scene can ask about available assets: strictly read-only *metadata* (dimensions, durations, font faces).
4
+ * Loading is the {@link AssetManager}'s job. Reachable as `node.assets` and `stage.assets`.
4
5
  *
5
- * Strictly read-only, and strictly about *metadata*: dimensions, durations, and
6
- * the font faces a family resolves to. Nothing here loads anything — that is
7
- * the {@link AssetManager}'s job, driven by what nodes declare into an
8
- * {@link AssetScope}. Reachable from any node as `node.assets` and from a
9
- * scene generator as `stage.assets`.
10
- *
11
- * **Every lookup throws on a miss rather than returning `undefined`.** A missing
12
- * asset is a typo or a deleted file, and it is worth finding out during the
13
- * precomp pass (where it surfaces as a `BuildError` in the errors panel) rather
14
- * than at playback as a shape that silently fails to paint.
15
- *
16
- * An interface so a host can supply its own — a test double, or a catalog
17
- * backed by something other than a static manifest. {@link ManifestAssetCatalog}
18
- * is the implementation the runtime builds from the project's asset manifest.
6
+ * **Every lookup throws on a miss rather than returning `undefined`**: a missing asset is a typo or deleted file, best
7
+ * surfaced during the precomp pass (a `BuildError`) rather than as a shape that silently fails to paint at playback.
8
+ * An interface so a host can supply its own; {@link ManifestAssetCatalog} is built from the project's manifest.
19
9
  */
20
10
  export interface AssetCatalog {
21
- /**
22
- * Metadata for an image.
23
- * @throws If the image is not in the manifest.
24
- */
25
11
  getImageMeta(src: string): ImageMeta;
26
- /**
27
- * Metadata for a video.
28
- * @throws If the video is not in the manifest.
29
- */
30
12
  getVideoMeta(src: string): VideoMeta;
31
- /**
32
- * Metadata for an audio track.
33
- * @throws If the audio file is not in the manifest.
34
- */
35
13
  getAudioMeta(src: string): AudioMeta;
36
- /**
37
- * Metadata for a single font face, by its `family@weight` lookup key.
38
- * @throws If the key is not in the manifest.
39
- */
40
14
  getFontMeta(key: string): FontMeta;
41
- /**
42
- * Every face registered for a family, across all weights and slants — what
43
- * the renderer registers so its font matcher can resolve any requested
44
- * weight to the nearest available file. Empty if the family is unknown.
45
- */
15
+ /** Every face registered for a family across weights and slants, so the font matcher can resolve any weight to the nearest file. Empty if unknown. */
46
16
  getFontFamilyMetas(fontFamily: string): FontMeta[];
47
17
  /** Playback duration of a video, in seconds. */
48
18
  getVideoDuration(src: string): number;
49
19
  /** Playback duration of an audio file, in seconds. */
50
20
  getAudioDuration(src: string): number;
51
- /**
52
- * Duration of any *playable* source — an audio file, or a video whose audio
53
- * track is being played. Resolves against audio first and falls back to
54
- * video, so a video `src` can drive a `Sound` without a duplicate audio-only
55
- * manifest entry.
56
- * @throws If `src` is in neither manifest.
57
- */
21
+ /** Duration of any *playable* source: audio first, falling back to video, so a video `src` can drive a `Sound` without a duplicate audio-only entry. @throws If `src` is in neither manifest. */
58
22
  getMediaDuration(src: string): number;
59
23
  /** An image's intrinsic pixel dimensions. */
60
24
  getImageSize(src: string): {
@@ -62,39 +26,13 @@ export interface AssetCatalog {
62
26
  height: number;
63
27
  };
64
28
  }
65
- /**
66
- * The {@link AssetCatalog} the runtime builds: a query engine over a static
67
- * {@link AssetManifest}.
68
- *
69
- * @example
70
- * ```ts
71
- * const catalog = new ManifestAssetCatalog(manifest);
72
- * catalog.getImageSize("hero-banner.png"); // { width: 1920, height: 1080 }
73
- * ```
74
- */
29
+ /** The {@link AssetCatalog} the runtime builds: a query engine over a static {@link AssetManifest}. */
75
30
  export declare class ManifestAssetCatalog implements AssetCatalog {
76
31
  private manifest;
77
32
  constructor(manifest: AssetManifest);
78
- /**
79
- * Point this catalog at `manifest`, in place.
80
- *
81
- * A session hands one catalog to the controller, the clip store and every
82
- * node's `assets`, so replacing the catalog object would leave all of them on
83
- * the old one. Reconciling the manifest it reads keeps a manifest change
84
- * visible to everything already built.
85
- */
33
+ /** Points this catalog at `manifest` in place: a session hands one catalog to the controller, clip store and every node's `assets`, so replacing the object would leave them on the old one. */
86
34
  reconcile(manifest: AssetManifest): void;
87
- /**
88
- * Normalize a caller-supplied asset `src` into the manifest's lookup key.
89
- * The manifest stores image/video/audio keys as the file's path relative
90
- * to the scanned public folder, using forward slashes with no leading
91
- * `./` or `/`.
92
- * Scene authors write `src` in whichever equivalent form is natural — a
93
- * bare filename, `"./sub/file.png"`, `"/sub/file.png"`, or a
94
- * Windows-authored backslash path — so normalize all of them to the same
95
- * key. Font lookups are keyed by `family@weight`, not a path, so they
96
- * don't go through this.
97
- */
35
+ /** Normalizes a caller's asset `src` to the manifest key: the path relative to the public folder, forward slashes, no leading `./` or `/`. Authors write bare filenames, `./sub/file.png`, `/sub/file.png` or backslash paths. Fonts are keyed `family@weight` and skip this. */
98
36
  private normalizeKey;
99
37
  getImageMeta(src: string): ImageMeta;
100
38
  getVideoMeta(src: string): VideoMeta;
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/assets/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1G;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEnC;;;;OAIG;IACH,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;IAEnD,gDAAgD;IAChD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC,sDAAsD;IACtD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC;;;;;;OAMG;IACH,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC,6CAA6C;IAC7C,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAChE;AAED;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IACzC,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,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,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC,sDAAsD;IACtD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC,iMAAiM;IACjM,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC,6CAA6C;IAC7C,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAChE;AAED,uGAAuG;AACvG,qBAAa,oBAAqB,YAAW,YAAY;IACzC,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,aAAa;IAE3C,gMAAgM;IAChM,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAIxC,iRAAiR;IACjR,OAAO,CAAC,YAAY;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAMpC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAMpC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAMpC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ;IAMlC,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,EAAE;IAIlD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIrC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIrC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IASrC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CAI/D"}
@@ -1,40 +1,14 @@
1
- /**
2
- * The {@link AssetCatalog} the runtime builds: a query engine over a static
3
- * {@link AssetManifest}.
4
- *
5
- * @example
6
- * ```ts
7
- * const catalog = new ManifestAssetCatalog(manifest);
8
- * catalog.getImageSize("hero-banner.png"); // { width: 1920, height: 1080 }
9
- * ```
10
- */
1
+ /** The {@link AssetCatalog} the runtime builds: a query engine over a static {@link AssetManifest}. */
11
2
  export class ManifestAssetCatalog {
12
3
  manifest;
13
4
  constructor(manifest) {
14
5
  this.manifest = manifest;
15
6
  }
16
- /**
17
- * Point this catalog at `manifest`, in place.
18
- *
19
- * A session hands one catalog to the controller, the clip store and every
20
- * node's `assets`, so replacing the catalog object would leave all of them on
21
- * the old one. Reconciling the manifest it reads keeps a manifest change
22
- * visible to everything already built.
23
- */
7
+ /** Points this catalog at `manifest` in place: a session hands one catalog to the controller, clip store and every node's `assets`, so replacing the object would leave them on the old one. */
24
8
  reconcile(manifest) {
25
9
  this.manifest = manifest;
26
10
  }
27
- /**
28
- * Normalize a caller-supplied asset `src` into the manifest's lookup key.
29
- * The manifest stores image/video/audio keys as the file's path relative
30
- * to the scanned public folder, using forward slashes with no leading
31
- * `./` or `/`.
32
- * Scene authors write `src` in whichever equivalent form is natural — a
33
- * bare filename, `"./sub/file.png"`, `"/sub/file.png"`, or a
34
- * Windows-authored backslash path — so normalize all of them to the same
35
- * key. Font lookups are keyed by `family@weight`, not a path, so they
36
- * don't go through this.
37
- */
11
+ /** Normalizes a caller's asset `src` to the manifest key: the path relative to the public folder, forward slashes, no leading `./` or `/`. Authors write bare filenames, `./sub/file.png`, `/sub/file.png` or backslash paths. Fonts are keyed `family@weight` and skip this. */
38
12
  normalizeKey(src) {
39
13
  return src.replace(/\\/g, '/').replace(/^\.\//, '').replace(/^\/+/, '');
40
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/assets/catalog.ts"],"names":[],"mappings":"AAuEA;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAoB;IACT;IAApB,YAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAI,CAAC;IAEhD;;;;;;;OAOG;IACH,SAAS,CAAC,QAAuB;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B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C,UAAkB;QACjC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC;IAC5F,CAAC;IAED,gBAAgB,CAAC,GAAW;QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAED,gBAAgB,CAAC,GAAW;QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAED,gBAAgB,CAAC,GAAW;QACxB,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC,QAAQ,CAAC;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC,QAAQ,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,kFAAkF,CAAC,CAAC;IACtI,CAAC;IAED,YAAY,CAAC,GAAW;QACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACjD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC7B,CAAC;CACJ","sourcesContent":["import { type AudioMeta, type FontMeta, type ImageMeta, AssetManifest, type VideoMeta } from \"./manifest\";\n\n/**\n * What a scene can ask about the assets available to it.\n *\n * Strictly read-only, and strictly about *metadata*: dimensions, durations, and\n * the font faces a family resolves to. Nothing here loads anything — that is\n * the {@link AssetManager}'s job, driven by what nodes declare into an\n * {@link AssetScope}. Reachable from any node as `node.assets` and from a\n * scene generator as `stage.assets`.\n *\n * **Every lookup throws on a miss rather than returning `undefined`.** A missing\n * asset is a typo or a deleted file, and it is worth finding out during the\n * precomp pass (where it surfaces as a `BuildError` in the errors panel) rather\n * than at playback as a shape that silently fails to paint.\n *\n * An interface so a host can supply its own — a test double, or a catalog\n * backed by something other than a static manifest. {@link ManifestAssetCatalog}\n * is the implementation the runtime builds from the project's asset manifest.\n */\nexport interface AssetCatalog {\n /**\n * Metadata for an image.\n * @throws If the image is not in the manifest.\n */\n getImageMeta(src: string): ImageMeta;\n\n /**\n * Metadata for a video.\n * @throws If the video is not in the manifest.\n */\n getVideoMeta(src: string): VideoMeta;\n\n /**\n * Metadata for an audio track.\n * @throws If the audio file is not in the manifest.\n */\n getAudioMeta(src: string): AudioMeta;\n\n /**\n * Metadata for a single font face, by its `family@weight` lookup key.\n * @throws If the key is not in the manifest.\n */\n getFontMeta(key: string): FontMeta;\n\n /**\n * Every face registered for a family, across all weights and slants — what\n * the renderer registers so its font matcher can resolve any requested\n * weight to the nearest available file. Empty if the family is unknown.\n */\n getFontFamilyMetas(fontFamily: string): FontMeta[];\n\n /** Playback duration of a video, in seconds. */\n getVideoDuration(src: string): number;\n\n /** Playback duration of an audio file, in seconds. */\n getAudioDuration(src: string): number;\n\n /**\n * Duration of any *playable* source — an audio file, or a video whose audio\n * track is being played. Resolves against audio first and falls back to\n * video, so a video `src` can drive a `Sound` without a duplicate audio-only\n * manifest entry.\n * @throws If `src` is in neither manifest.\n */\n getMediaDuration(src: string): number;\n\n /** An image's intrinsic pixel dimensions. */\n getImageSize(src: string): { width: number; height: number };\n}\n\n/**\n * The {@link AssetCatalog} the runtime builds: a query engine over a static\n * {@link AssetManifest}.\n *\n * @example\n * ```ts\n * const catalog = new ManifestAssetCatalog(manifest);\n * catalog.getImageSize(\"hero-banner.png\"); // { width: 1920, height: 1080 }\n * ```\n */\nexport class ManifestAssetCatalog implements AssetCatalog {\n constructor(private manifest: AssetManifest) { }\n\n /**\n * Point this catalog at `manifest`, in place.\n *\n * A session hands one catalog to the controller, the clip store and every\n * node's `assets`, so replacing the catalog object would leave all of them on\n * the old one. Reconciling the manifest it reads keeps a manifest change\n * visible to everything already built.\n */\n reconcile(manifest: AssetManifest): void {\n this.manifest = manifest;\n }\n\n /**\n * Normalize a caller-supplied asset `src` into the manifest's lookup key.\n * The manifest stores image/video/audio keys as the file's path relative\n * to the scanned public folder, using forward slashes with no leading\n * `./` or `/`.\n * Scene authors write `src` in whichever equivalent form is natural — a\n * bare filename, `\"./sub/file.png\"`, `\"/sub/file.png\"`, or a\n * Windows-authored backslash path — so normalize all of them to the same\n * key. Font lookups are keyed by `family@weight`, not a path, so they\n * don't go through this.\n */\n private normalizeKey(src: string): string {\n return src.replace(/\\\\/g, '/').replace(/^\\.\\//, '').replace(/^\\/+/, '');\n }\n\n getImageMeta(src: string): ImageMeta {\n const meta = this.manifest.image[this.normalizeKey(src)];\n if (!meta) throw new Error(`Image asset not found: \"${src}\". Check the file exists in your public folder and the src matches its filename.`);\n return meta;\n }\n\n getVideoMeta(src: string): VideoMeta {\n const meta = this.manifest.video[this.normalizeKey(src)];\n if (!meta) throw new Error(`Video asset not found: \"${src}\". Check the file exists in your public folder and the src matches its filename.`);\n return meta;\n }\n\n getAudioMeta(src: string): AudioMeta {\n const meta = this.manifest.audio[this.normalizeKey(src)];\n if (!meta) throw new Error(`No audio metadata for src: ${src}`);\n return meta;\n }\n\n getFontMeta(key: string): FontMeta {\n const meta = this.manifest.font[key];\n if (!meta) throw new Error(`No font metadata for key: ${key}`);\n return meta;\n }\n\n getFontFamilyMetas(fontFamily: string): FontMeta[] {\n return Object.values(this.manifest.font).filter(meta => meta.fontFamily === fontFamily);\n }\n\n getVideoDuration(src: string): number {\n return this.getVideoMeta(src).duration;\n }\n\n getAudioDuration(src: string): number {\n return this.getAudioMeta(src).duration;\n }\n\n getMediaDuration(src: string): number {\n const key = this.normalizeKey(src);\n const audio = this.manifest.audio[key];\n if (audio) return audio.duration;\n const video = this.manifest.video[key];\n if (video) return video.duration;\n throw new Error(`Audio asset not found: \"${src}\". Check the file exists in your public folder and the src matches its filename.`);\n }\n\n getImageSize(src: string): { width: number; height: number } {\n const { width, height } = this.getImageMeta(src);\n return { width, height };\n }\n}\n"]}
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/assets/catalog.ts"],"names":[],"mappings":"AAmCA,uGAAuG;AACvG,MAAM,OAAO,oBAAoB;IACT;IAApB,YAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAI,CAAC;IAEhD,gMAAgM;IAChM,SAAS,CAAC,QAAuB;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,iRAAiR;IACzQ,YAAY,CAAC,GAAW;QAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,YAAY,CAAC,GAAW;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,kFAAkF,CAAC,CAAC;QAC7I,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,YAAY,CAAC,GAAW;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,kFAAkF,CAAC,CAAC;QAC7I,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,YAAY,CAAC,GAAW;QACpB,MAAM,IAAI,GAAG,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C,2BAA2B,GAAG,kFAAkF,CAAC,CAAC;IACtI,CAAC;IAED,YAAY,CAAC,GAAW;QACpB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACjD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC7B,CAAC;CACJ","sourcesContent":["import { type AudioMeta, type FontMeta, type ImageMeta, AssetManifest, type VideoMeta } from \"./manifest\";\n\n/**\n * What a scene can ask about available assets: strictly read-only *metadata* (dimensions, durations, font faces).\n * Loading is the {@link AssetManager}'s job. Reachable as `node.assets` and `stage.assets`.\n *\n * **Every lookup throws on a miss rather than returning `undefined`**: a missing asset is a typo or deleted file, best\n * surfaced during the precomp pass (a `BuildError`) rather than as a shape that silently fails to paint at playback.\n * An interface so a host can supply its own; {@link ManifestAssetCatalog} is built from the project's manifest.\n */\nexport interface AssetCatalog {\n getImageMeta(src: string): ImageMeta;\n\n getVideoMeta(src: string): VideoMeta;\n\n getAudioMeta(src: string): AudioMeta;\n\n getFontMeta(key: string): FontMeta;\n\n /** Every face registered for a family across weights and slants, so the font matcher can resolve any weight to the nearest file. Empty if unknown. */\n getFontFamilyMetas(fontFamily: string): FontMeta[];\n\n /** Playback duration of a video, in seconds. */\n getVideoDuration(src: string): number;\n\n /** Playback duration of an audio file, in seconds. */\n getAudioDuration(src: string): number;\n\n /** Duration of any *playable* source: audio first, falling back to video, so a video `src` can drive a `Sound` without a duplicate audio-only entry. @throws If `src` is in neither manifest. */\n getMediaDuration(src: string): number;\n\n /** An image's intrinsic pixel dimensions. */\n getImageSize(src: string): { width: number; height: number };\n}\n\n/** The {@link AssetCatalog} the runtime builds: a query engine over a static {@link AssetManifest}. */\nexport class ManifestAssetCatalog implements AssetCatalog {\n constructor(private manifest: AssetManifest) { }\n\n /** Points this catalog at `manifest` in place: a session hands one catalog to the controller, clip store and every node's `assets`, so replacing the object would leave them on the old one. */\n reconcile(manifest: AssetManifest): void {\n this.manifest = manifest;\n }\n\n /** Normalizes a caller's asset `src` to the manifest key: the path relative to the public folder, forward slashes, no leading `./` or `/`. Authors write bare filenames, `./sub/file.png`, `/sub/file.png` or backslash paths. Fonts are keyed `family@weight` and skip this. */\n private normalizeKey(src: string): string {\n return src.replace(/\\\\/g, '/').replace(/^\\.\\//, '').replace(/^\\/+/, '');\n }\n\n getImageMeta(src: string): ImageMeta {\n const meta = this.manifest.image[this.normalizeKey(src)];\n if (!meta) throw new Error(`Image asset not found: \"${src}\". Check the file exists in your public folder and the src matches its filename.`);\n return meta;\n }\n\n getVideoMeta(src: string): VideoMeta {\n const meta = this.manifest.video[this.normalizeKey(src)];\n if (!meta) throw new Error(`Video asset not found: \"${src}\". Check the file exists in your public folder and the src matches its filename.`);\n return meta;\n }\n\n getAudioMeta(src: string): AudioMeta {\n const meta = this.manifest.audio[this.normalizeKey(src)];\n if (!meta) throw new Error(`No audio metadata for src: ${src}`);\n return meta;\n }\n\n getFontMeta(key: string): FontMeta {\n const meta = this.manifest.font[key];\n if (!meta) throw new Error(`No font metadata for key: ${key}`);\n return meta;\n }\n\n getFontFamilyMetas(fontFamily: string): FontMeta[] {\n return Object.values(this.manifest.font).filter(meta => meta.fontFamily === fontFamily);\n }\n\n getVideoDuration(src: string): number {\n return this.getVideoMeta(src).duration;\n }\n\n getAudioDuration(src: string): number {\n return this.getAudioMeta(src).duration;\n }\n\n getMediaDuration(src: string): number {\n const key = this.normalizeKey(src);\n const audio = this.manifest.audio[key];\n if (audio) return audio.duration;\n const video = this.manifest.video[key];\n if (video) return video.duration;\n throw new Error(`Audio asset not found: \"${src}\". Check the file exists in your public folder and the src matches its filename.`);\n }\n\n getImageSize(src: string): { width: number; height: number } {\n const { width, height } = this.getImageMeta(src);\n return { width, height };\n }\n}\n"]}
@@ -1,26 +1,14 @@
1
1
  import type { AssetType } from "./record.js";
2
2
  /**
3
- * A frame reached for an asset that was never loaded.
3
+ * A frame reached for an asset that was never loaded: the counterweight to declared asset tracking. A node states what
4
+ * it needs from `Node.declareAssets`; if it misses something the renderer finds nothing at paint. A skipped layer would
5
+ * be a frame that renders *almost* right (a photo missing, a heading in the fallback face), possibly only seconds in and
6
+ * only on a cold load, so throwing turns it into a located failure: caught per scene during precomp as a `BuildError`,
7
+ * and stopping the frame at playback.
4
8
  *
5
- * This is the counterweight to declared asset tracking. A node states what it
6
- * needs from `Node.declareAssets`; if it
7
- * misses something, the renderer finds nothing when it goes to paint. The old
8
- * inference pass could not really get this wrong — it discovered assets *from*
9
- * the draw calls, so anything drawn was by construction requested — and the
10
- * fills were written to match: a missing decode returned `false` and the layer
11
- * was quietly skipped.
12
- *
13
- * Under declarations that leniency is the wrong default. A skipped layer is a
14
- * frame that renders *almost* right, with a photo missing or a heading in the
15
- * fallback face, on a node that may only appear seconds in and only on a cold
16
- * load. Throwing turns a silent visual gap into a located failure: during precomp
17
- * it is caught per scene and surfaces as a `BuildError` in the errors panel, and
18
- * at playback it stops the frame rather than shipping a wrong one.
19
- *
20
- * It means "declared but not loaded, or never declared". It deliberately does
21
- * **not** cover a *time-varying* miss — a video frame the decode window has not
22
- * reached yet is an asset that loaded fine, and `warmPendingVideo` already exists
23
- * to settle those; those paths still paint the nearest decoded frame.
9
+ * It means "declared but not loaded, or never declared", and deliberately **not** a *time-varying* miss: a video frame
10
+ * the decode window has not reached is an asset that loaded fine, `warmPendingVideo` settles those, and they paint the
11
+ * nearest decoded frame.
24
12
  */
25
13
  export declare class AssetNotLoadedError extends Error {
26
14
  readonly assetType: AssetType;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/assets/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEJ,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAM/D"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/assets/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEJ,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAM/D"}
@@ -1,25 +1,13 @@
1
1
  /**
2
- * A frame reached for an asset that was never loaded.
2
+ * A frame reached for an asset that was never loaded: the counterweight to declared asset tracking. A node states what
3
+ * it needs from `Node.declareAssets`; if it misses something the renderer finds nothing at paint. A skipped layer would
4
+ * be a frame that renders *almost* right (a photo missing, a heading in the fallback face), possibly only seconds in and
5
+ * only on a cold load, so throwing turns it into a located failure: caught per scene during precomp as a `BuildError`,
6
+ * and stopping the frame at playback.
3
7
  *
4
- * This is the counterweight to declared asset tracking. A node states what it
5
- * needs from `Node.declareAssets`; if it
6
- * misses something, the renderer finds nothing when it goes to paint. The old
7
- * inference pass could not really get this wrong — it discovered assets *from*
8
- * the draw calls, so anything drawn was by construction requested — and the
9
- * fills were written to match: a missing decode returned `false` and the layer
10
- * was quietly skipped.
11
- *
12
- * Under declarations that leniency is the wrong default. A skipped layer is a
13
- * frame that renders *almost* right, with a photo missing or a heading in the
14
- * fallback face, on a node that may only appear seconds in and only on a cold
15
- * load. Throwing turns a silent visual gap into a located failure: during precomp
16
- * it is caught per scene and surfaces as a `BuildError` in the errors panel, and
17
- * at playback it stops the frame rather than shipping a wrong one.
18
- *
19
- * It means "declared but not loaded, or never declared". It deliberately does
20
- * **not** cover a *time-varying* miss — a video frame the decode window has not
21
- * reached yet is an asset that loaded fine, and `warmPendingVideo` already exists
22
- * to settle those; those paths still paint the nearest decoded frame.
8
+ * It means "declared but not loaded, or never declared", and deliberately **not** a *time-varying* miss: a video frame
9
+ * the decode window has not reached is an asset that loaded fine, `warmPendingVideo` settles those, and they paint the
10
+ * nearest decoded frame.
23
11
  */
24
12
  export class AssetNotLoadedError extends Error {
25
13
  assetType;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/assets/errors.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACjC,SAAS,CAAY;IACrB,GAAG,CAAS;IACrB,6EAA6E;IAC7E,MAAM,CAAU;IAEhB,YAAY,SAAoB,EAAE,GAAW,EAAE,IAAa;QACxD,KAAK,CAAC,GAAG,SAAS,WAAW,GAAG,mBAAmB,GAAG,CAAC,IAAI,IAAI,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACxF,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;CACJ;AAED,sFAAsF;AACtF,SAAS,WAAW,CAAC,SAAoB;IACrC,IAAI,SAAS,KAAK,OAAO;QAAE,OAAO,yGAAyG,CAAC;IAC5I,OAAO,2DAA2D,SAAS,iEAAiE,CAAC;AACjJ,CAAC","sourcesContent":["import type { AssetType } from \"./record\";\n\n/**\n * A frame reached for an asset that was never loaded.\n *\n * This is the counterweight to declared asset tracking. A node states what it\n * needs from `Node.declareAssets`; if it\n * misses something, the renderer finds nothing when it goes to paint. The old\n * inference pass could not really get this wrong — it discovered assets *from*\n * the draw calls, so anything drawn was by construction requested — and the\n * fills were written to match: a missing decode returned `false` and the layer\n * was quietly skipped.\n *\n * Under declarations that leniency is the wrong default. A skipped layer is a\n * frame that renders *almost* right, with a photo missing or a heading in the\n * fallback face, on a node that may only appear seconds in and only on a cold\n * load. Throwing turns a silent visual gap into a located failure: during precomp\n * it is caught per scene and surfaces as a `BuildError` in the errors panel, and\n * at playback it stops the frame rather than shipping a wrong one.\n *\n * It means \"declared but not loaded, or never declared\". It deliberately does\n * **not** cover a *time-varying* miss — a video frame the decode window has not\n * reached yet is an asset that loaded fine, and `warmPendingVideo` already exists\n * to settle those; those paths still paint the nearest decoded frame.\n */\nexport class AssetNotLoadedError extends Error {\n readonly assetType: AssetType;\n readonly src: string;\n /** The innermost drawing node, stamped by `Node2D.render` on the way out. */\n nodeId?: string;\n\n constructor(assetType: AssetType, src: string, hint?: string) {\n super(`${assetType} asset \"${src}\" is not loaded. ` + (hint ?? declareHint(assetType)));\n this.name = \"AssetNotLoadedError\";\n this.assetType = assetType;\n this.src = src;\n }\n}\n\n/** How to declare an asset of `assetType`: the scope method, or a command's sound. */\nfunction declareHint(assetType: AssetType): string {\n if (assetType === \"audio\") return \"Play it from a command (`timeline.sound(...)`), so the asset timeline loads it before this frame draws.\";\n return `Declare it from the node's declareAssets() (e.g. assets.${assetType}(...)), so the asset timeline loads it before this frame draws.`;\n}\n"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/assets/errors.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACjC,SAAS,CAAY;IACrB,GAAG,CAAS;IACrB,6EAA6E;IAC7E,MAAM,CAAU;IAEhB,YAAY,SAAoB,EAAE,GAAW,EAAE,IAAa;QACxD,KAAK,CAAC,GAAG,SAAS,WAAW,GAAG,mBAAmB,GAAG,CAAC,IAAI,IAAI,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACxF,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;CACJ;AAED,sFAAsF;AACtF,SAAS,WAAW,CAAC,SAAoB;IACrC,IAAI,SAAS,KAAK,OAAO;QAAE,OAAO,yGAAyG,CAAC;IAC5I,OAAO,2DAA2D,SAAS,iEAAiE,CAAC;AACjJ,CAAC","sourcesContent":["import type { AssetType } from \"./record\";\n\n/**\n * A frame reached for an asset that was never loaded: the counterweight to declared asset tracking. A node states what\n * it needs from `Node.declareAssets`; if it misses something the renderer finds nothing at paint. A skipped layer would\n * be a frame that renders *almost* right (a photo missing, a heading in the fallback face), possibly only seconds in and\n * only on a cold load, so throwing turns it into a located failure: caught per scene during precomp as a `BuildError`,\n * and stopping the frame at playback.\n *\n * It means \"declared but not loaded, or never declared\", and deliberately **not** a *time-varying* miss: a video frame\n * the decode window has not reached is an asset that loaded fine, `warmPendingVideo` settles those, and they paint the\n * nearest decoded frame.\n */\nexport class AssetNotLoadedError extends Error {\n readonly assetType: AssetType;\n readonly src: string;\n /** The innermost drawing node, stamped by `Node2D.render` on the way out. */\n nodeId?: string;\n\n constructor(assetType: AssetType, src: string, hint?: string) {\n super(`${assetType} asset \"${src}\" is not loaded. ` + (hint ?? declareHint(assetType)));\n this.name = \"AssetNotLoadedError\";\n this.assetType = assetType;\n this.src = src;\n }\n}\n\n/** How to declare an asset of `assetType`: the scope method, or a command's sound. */\nfunction declareHint(assetType: AssetType): string {\n if (assetType === \"audio\") return \"Play it from a command (`timeline.sound(...)`), so the asset timeline loads it before this frame draws.\";\n return `Declare it from the node's declareAssets() (e.g. assets.${assetType}(...)), so the asset timeline loads it before this frame draws.`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AAAA,gBAAgB,CAAC,YAAY,EA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Y,EAAE,MAAM,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AACA,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAGlE,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAK5D,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAChE,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC","sourcesContent":["/** @internal */ export type { AssetCatalog } from \"./catalog\";\n/** @internal */ export { ManifestAssetCatalog } from \"./catalog\";\n/** @internal */ export type { ImageMeta, VideoMeta, AudioMeta, FontMeta, AssetMeta, AssetManifest } from \"./manifest\";\nexport type { AssetScope, AssetDecl, AssetGate } from \"./scope\";\n/** @internal */ export { AssetDeclaration } from \"./scope\";\n// `AssetRecord` joins these because `StorageAdapter.loadAsset` takes one on an\n// exported abstract class — a subclass outside this package could not otherwise\n// name the parameter type it is obliged to accept.\n/** @internal */ export type { LoaderFn, Disposer, AssetRecord } from \"./record\";\n/** @internal */ export { AssetNotLoadedError } from \"./errors\";\n/** @internal */ export { AssetManager } from \"./manager\";"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AACA,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAGlE,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG5D,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAChE,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC","sourcesContent":["/** @internal */ export type { AssetCatalog } from \"./catalog\";\n/** @internal */ export { ManifestAssetCatalog } from \"./catalog\";\n/** @internal */ export type { ImageMeta, VideoMeta, AudioMeta, FontMeta, AssetMeta, AssetManifest } from \"./manifest\";\nexport type { AssetScope, AssetDecl, AssetGate } from \"./scope\";\n/** @internal */ export { AssetDeclaration } from \"./scope\";\n// `AssetRecord` is exported because `StorageAdapter.loadAsset` takes one: a subclass outside this package must be able to name the parameter type.\n/** @internal */ export type { LoaderFn, Disposer, AssetRecord } from \"./record\";\n/** @internal */ export { AssetNotLoadedError } from \"./errors\";\n/** @internal */ export { AssetManager } from \"./manager\";"]}
@@ -2,10 +2,7 @@ import { AssetRecord } from "../assets/record.js";
2
2
  import { AudioSink } from "../platform/audio-sink.js";
3
3
  import { StorageAdapter } from "../platform/storage-adapter.js";
4
4
  import { AssetTimelineResult } from "../runtime/asset-timeline.js";
5
- /**
6
- * Coordinates asset loading and audio synchronization during playback.
7
- * Wraps a {@link AssetTimelineResult} and delegates storage/audio work to platform adapters.
8
- */
5
+ /** Coordinates asset loading and audio synchronization during playback over an {@link AssetTimelineResult}, delegating storage/audio work to platform adapters. */
9
6
  export declare class AssetManager {
10
7
  private readonly onError;
11
8
  private precomp;
@@ -15,14 +12,7 @@ export declare class AssetManager {
15
12
  private lastAudioRequestKey;
16
13
  private lastAudioSrcs;
17
14
  private audioFetching;
18
- /**
19
- * Sources whose fetch or decode failed, with why, so they are not fetched
20
- * again every sync. A source leaves when no request in the window names it
21
- * any more — and, once it has been reported, when a new precomp arrives —
22
- * so the next time it is wanted it is tried afresh. One that failed quietly
23
- * (see {@link AudioRequest.optional}) is kept across a precomp: a video with
24
- * no audio track would otherwise be fetched whole on every edit.
25
- */
15
+ /** Sources whose fetch or decode failed, with why, so they are not refetched every sync. A source leaves when no request in the window names it any more (and, once reported, when a new precomp arrives) so it is tried afresh when wanted. One that failed quietly (see {@link AudioRequest.optional}) survives a precomp: a video with no audio track would otherwise be fetched whole on every edit. */
26
16
  private audioFailed;
27
17
  /** The failed sources already reported to {@link onError}. */
28
18
  private audioReported;
@@ -31,58 +21,26 @@ export declare class AssetManager {
31
21
  /** Keys of the loaders a track measures against, which no window may evict. */
32
22
  private layoutGateKeys;
33
23
  private disposed;
34
- /** Disposers for loaders whose load has resolved, keyed by loader key. */
35
24
  private loaderDisposers;
36
25
  /** In-flight loader runs, keyed by loader key, to dedupe concurrent calls. */
37
26
  private loaderInFlight;
38
- /**
39
- * @param onError Told once per source when audio a request asked for cannot
40
- * be fetched or decoded. Defaults to `console.error`.
41
- */
27
+ /** @param onError Told once per source when audio a request asked for cannot be fetched or decoded. Defaults to `console.error`. */
42
28
  constructor(precomp: AssetTimelineResult, storageAdapter: StorageAdapter, audioDevice: AudioSink, onError?: (error: Error) => void);
43
- /**
44
- * Swap in a new precomp result (a document swap). The manager keeps its
45
- * warm loader disposers and in-flight audio fetches so a single-track edit
46
- * doesn't re-fetch unchanged assets; the next loadAt/syncAudio picks up the
47
- * new asset windows. Resetting the audio signature forces a reschedule so a
48
- * changed track's audio is re-evaluated against the new timeline — including
49
- * into an empty window, which is how removed audio stops.
50
- */
29
+ /** Swaps in a new precomp (a document swap), keeping warm loader disposers and in-flight audio fetches so a single-track edit doesn't refetch unchanged assets. Resets the audio signature to force a reschedule, including into an empty window (how removed audio stops). */
51
30
  setPrecomp(precomp: AssetTimelineResult): void;
52
- /**
53
- * Blocking load for seek and initial render. Waits for every asset whose
54
- * cacheAt <= frame and endFrame >= frame to be ready, then schedules audio.
55
- */
31
+ /** Blocking load for seek and initial render: waits for every asset whose `cacheAt <= frame <= endFrame`, then schedules audio. */
56
32
  loadAt(frame: number): Promise<void>;
57
33
  /** Whether `key` — a loader key or a stored asset's — is resident now. */
58
34
  isReady(key: string): boolean;
59
- /**
60
- * Load `records` whatever their windows say — for layout gates, which must be
61
- * resident before a track measures regardless of the frame being drawn.
62
- */
35
+ /** Loads `records` whatever their windows say: layout gates must be resident before a track measures regardless of the frame drawn. */
63
36
  loadRecords(records: readonly AssetRecord[]): Promise<void>;
64
- /**
65
- * Non-blocking incremental prefetch called after each render tick. Fires
66
- * loads for assets whose cacheAt window has been reached without blocking.
67
- */
37
+ /** Non-blocking prefetch after each render tick; fires loads for assets whose `cacheAt` window was reached. */
68
38
  prefetch(frame: number): void;
69
- /**
70
- * Drive a single loader track toward the state `frame` requires. If `frame`
71
- * is inside the loader's `[cacheAt, discardAt]` window, run its callback
72
- * (deduped — at most one in-flight run, skipped once loaded) and return the
73
- * pending job, if any. If `frame` is outside the window and the loader was
74
- * loaded, dispose it. Returns the in-flight load promise so a blocking
75
- * caller can await it; `undefined` when there's nothing to wait for.
76
- */
39
+ /** Drives one loader toward the state `frame` requires: inside `[cacheAt, discardAt]` run it (deduped, skipped once loaded), outside dispose it if loaded. Returns the in-flight promise a blocking caller can await, else `undefined`. */
77
40
  private syncLoader;
78
- /** Run a loader unless it is resident or already running. */
79
41
  private runLoader;
80
- /** Run every outstanding loader disposer and clear loader state. */
81
42
  dispose(): void;
82
- /**
83
- * Push the current audio working set to the AudioSink. Called after each
84
- * render tick so the device stays in sync with the tracks' audio requests.
85
- */
43
+ /** Pushes the current audio working set to the AudioSink after each render tick. */
86
44
  syncAudio(frame: number): void;
87
45
  /** Record that `src` could not be loaded, and say so if a request asked for its sound. */
88
46
  private failAudio;
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/assets/manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAsB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAc,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;;GAGG;AACH,qBAAa,YAAY;IAuCjB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAtC5B,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAY;IAExC,sFAAsF;IAC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