@motionscript/core 0.1.0-alpha.7 → 0.1.0-alpha.9

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 (1133) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +49 -48
  4. package/README.md +91 -91
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.js.map +1 -1
  7. package/dist/assets/errors.js.map +1 -1
  8. package/dist/assets/index.js.map +1 -1
  9. package/dist/assets/manager.d.ts.map +1 -1
  10. package/dist/assets/manager.js +7 -5
  11. package/dist/assets/manager.js.map +1 -1
  12. package/dist/assets/manifest.js.map +1 -1
  13. package/dist/assets/record.js.map +1 -1
  14. package/dist/assets/scope.js.map +1 -1
  15. package/dist/attributes/audio/effects/chain.d.ts +73 -0
  16. package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
  17. package/dist/attributes/audio/effects/chain.js +67 -0
  18. package/dist/attributes/audio/effects/chain.js.map +1 -0
  19. package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
  20. package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
  21. package/dist/attributes/audio/{filters → effects}/implementations/echo.js +2 -2
  22. package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
  23. package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
  24. package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
  25. package/dist/attributes/audio/{filters → effects}/implementations/gain.js +2 -2
  26. package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
  27. package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
  28. package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
  29. package/dist/attributes/audio/{filters → effects}/implementations/highpass.js +2 -2
  30. package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
  31. package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
  32. package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
  33. package/dist/attributes/audio/{filters → effects}/implementations/lowpass.js +2 -2
  34. package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
  35. package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
  36. package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
  37. package/dist/attributes/audio/{filters → effects}/implementations/tremolo.js +2 -2
  38. package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
  39. package/dist/attributes/audio/effects/index.d.ts +12 -0
  40. package/dist/attributes/audio/effects/index.d.ts.map +1 -0
  41. package/dist/attributes/audio/effects/index.js +4 -0
  42. package/dist/attributes/audio/effects/index.js.map +1 -0
  43. package/dist/attributes/audio/effects/registry.d.ts +36 -0
  44. package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
  45. package/dist/attributes/audio/effects/registry.js +80 -0
  46. package/dist/attributes/audio/effects/registry.js.map +1 -0
  47. package/dist/attributes/audio/effects/union.d.ts +14 -0
  48. package/dist/attributes/audio/effects/union.d.ts.map +1 -0
  49. package/dist/attributes/audio/effects/union.js +24 -0
  50. package/dist/attributes/audio/effects/union.js.map +1 -0
  51. package/dist/attributes/audio/ramp.d.ts +103 -0
  52. package/dist/attributes/audio/ramp.d.ts.map +1 -0
  53. package/dist/attributes/audio/ramp.js +246 -0
  54. package/dist/attributes/audio/ramp.js.map +1 -0
  55. package/dist/attributes/audio/request.d.ts +24 -13
  56. package/dist/attributes/audio/request.d.ts.map +1 -1
  57. package/dist/attributes/audio/request.js +4 -3
  58. package/dist/attributes/audio/request.js.map +1 -1
  59. package/dist/attributes/audio/schedule.d.ts +21 -13
  60. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  61. package/dist/attributes/audio/schedule.js +42 -28
  62. package/dist/attributes/audio/schedule.js.map +1 -1
  63. package/dist/attributes/audio/sound.d.ts +15 -12
  64. package/dist/attributes/audio/sound.d.ts.map +1 -1
  65. package/dist/attributes/audio/sound.js +8 -10
  66. package/dist/attributes/audio/sound.js.map +1 -1
  67. package/dist/attributes/audio/transition.d.ts +33 -0
  68. package/dist/attributes/audio/transition.d.ts.map +1 -0
  69. package/dist/attributes/audio/transition.js +48 -0
  70. package/dist/attributes/audio/transition.js.map +1 -0
  71. package/dist/attributes/index.d.ts +4 -3
  72. package/dist/attributes/index.d.ts.map +1 -1
  73. package/dist/attributes/index.js +4 -7
  74. package/dist/attributes/index.js.map +1 -1
  75. package/dist/attributes/layout/alignment.js.map +1 -1
  76. package/dist/attributes/layout/index.js.map +1 -1
  77. package/dist/attributes/layout/insets.js.map +1 -1
  78. package/dist/attributes/layout/matrix2d.d.ts +2 -2
  79. package/dist/attributes/layout/matrix2d.js.map +1 -1
  80. package/dist/attributes/layout/size.js.map +1 -1
  81. package/dist/attributes/layout/space3d.js +1 -1
  82. package/dist/attributes/layout/space3d.js.map +1 -1
  83. package/dist/attributes/layout/transform3d.js.map +1 -1
  84. package/dist/attributes/layout/vector2.js.map +1 -1
  85. package/dist/attributes/layout/world-transform.js.map +1 -1
  86. package/dist/attributes/mask/boolean.js.map +1 -1
  87. package/dist/attributes/mask/mask.js.map +1 -1
  88. package/dist/attributes/properties/decorator.js.map +1 -1
  89. package/dist/attributes/properties/inputs.js.map +1 -1
  90. package/dist/attributes/properties/typed.d.ts +7 -7
  91. package/dist/attributes/properties/typed.d.ts.map +1 -1
  92. package/dist/attributes/properties/typed.js +6 -6
  93. package/dist/attributes/properties/typed.js.map +1 -1
  94. package/dist/attributes/render3d/orbit.js.map +1 -1
  95. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -2
  96. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  97. package/dist/attributes/shape/corners/corner-radius.js +1 -2
  98. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  99. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js.map +1 -1
  101. package/dist/attributes/shape/corners/index.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  103. package/dist/attributes/shape/effects/chain.d.ts +96 -409
  104. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  105. package/dist/attributes/shape/effects/chain.js +93 -283
  106. package/dist/attributes/shape/effects/chain.js.map +1 -1
  107. package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
  108. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
  110. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
  112. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
  114. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
  116. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
  118. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
  120. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
  122. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
  124. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
  126. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/blur.js +13 -5
  128. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
  130. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
  132. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
  134. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
  136. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  137. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
  138. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  139. package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
  140. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  141. package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
  142. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  143. package/dist/attributes/shape/effects/implementations/curves.js +26 -23
  144. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  145. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
  146. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  147. package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
  148. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  149. package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
  150. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  151. package/dist/attributes/shape/effects/implementations/dither.js +26 -20
  152. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  153. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +46 -14
  154. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  155. package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
  156. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  157. package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
  158. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  159. package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
  160. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  161. package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
  162. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  163. package/dist/attributes/shape/effects/implementations/edges.js +17 -14
  164. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  165. package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
  166. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  167. package/dist/attributes/shape/effects/implementations/glass.js +28 -22
  168. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  169. package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
  170. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  171. package/dist/attributes/shape/effects/implementations/glow.js +74 -72
  172. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  173. package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
  174. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  175. package/dist/attributes/shape/effects/implementations/grain.js +21 -18
  176. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  177. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
  178. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  179. package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
  180. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  181. package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
  182. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  183. package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
  184. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  185. package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
  186. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  187. package/dist/attributes/shape/effects/implementations/invert.js +15 -10
  188. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  189. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
  190. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  191. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
  192. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  193. package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
  194. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  195. package/dist/attributes/shape/effects/implementations/lut.js +20 -16
  196. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  197. package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
  198. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  199. package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
  200. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  201. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
  202. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  203. package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
  204. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  205. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
  206. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  207. package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
  208. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  209. package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
  210. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  211. package/dist/attributes/shape/effects/implementations/outline.js +18 -17
  212. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  213. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
  214. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  215. package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
  216. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  217. package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
  218. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  219. package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
  220. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  221. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
  222. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  223. package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
  224. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  225. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
  226. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  227. package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
  228. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  229. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
  230. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  231. package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
  232. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  233. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
  234. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  235. package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
  236. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  237. package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
  238. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  239. package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
  240. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  241. package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
  242. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  243. package/dist/attributes/shape/effects/implementations/shader.js +42 -26
  244. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  245. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
  246. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  247. package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
  248. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  249. package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
  250. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  251. package/dist/attributes/shape/effects/implementations/streak.js +19 -16
  252. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  253. package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
  254. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  255. package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
  256. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  257. package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
  258. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  259. package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
  260. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  261. package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
  262. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  263. package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
  264. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  265. package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
  266. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  267. package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
  268. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  269. package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
  270. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  271. package/dist/attributes/shape/effects/implementations/wave.js +26 -23
  272. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  273. package/dist/attributes/shape/effects/index.d.ts +4 -2
  274. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  275. package/dist/attributes/shape/effects/index.js +1 -1
  276. package/dist/attributes/shape/effects/index.js.map +1 -1
  277. package/dist/attributes/shape/effects/registry.d.ts +11 -0
  278. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  279. package/dist/attributes/shape/effects/registry.js +113 -102
  280. package/dist/attributes/shape/effects/registry.js.map +1 -1
  281. package/dist/attributes/shape/effects/spec.d.ts +229 -0
  282. package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
  283. package/dist/attributes/shape/effects/spec.js +178 -0
  284. package/dist/attributes/shape/effects/spec.js.map +1 -0
  285. package/dist/attributes/shape/effects/union.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.js.map +1 -1
  287. package/dist/attributes/shape/fill/chain.d.ts +7 -9
  288. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  289. package/dist/attributes/shape/fill/chain.js +9 -11
  290. package/dist/attributes/shape/fill/chain.js.map +1 -1
  291. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  292. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  293. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  294. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  295. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  296. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  297. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  298. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  299. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  300. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  301. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  302. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  303. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  304. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  305. package/dist/attributes/shape/fill/implementations/shader.d.ts +27 -26
  306. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  307. package/dist/attributes/shape/fill/implementations/shader.js +20 -14
  308. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  309. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  311. package/dist/attributes/shape/fill/index.d.ts +1 -1
  312. package/dist/attributes/shape/fill/index.d.ts.map +1 -1
  313. package/dist/attributes/shape/fill/index.js.map +1 -1
  314. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  315. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  316. package/dist/attributes/shape/fill/registry.d.ts +1 -2
  317. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  318. package/dist/attributes/shape/fill/registry.js +1 -2
  319. package/dist/attributes/shape/fill/registry.js.map +1 -1
  320. package/dist/attributes/shape/fill/union.js.map +1 -1
  321. package/dist/attributes/shape/filters/chain.d.ts +2 -6
  322. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  323. package/dist/attributes/shape/filters/chain.js +1 -5
  324. package/dist/attributes/shape/filters/chain.js.map +1 -1
  325. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  326. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  327. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  328. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
  329. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  330. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  331. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  332. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  333. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  334. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  335. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  336. package/dist/attributes/shape/filters/index.js.map +1 -1
  337. package/dist/attributes/shape/filters/registry.d.ts +1 -1
  338. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  339. package/dist/attributes/shape/filters/registry.js +3 -3
  340. package/dist/attributes/shape/filters/registry.js.map +1 -1
  341. package/dist/attributes/shape/filters/union.d.ts +2 -3
  342. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  343. package/dist/attributes/shape/filters/union.js.map +1 -1
  344. package/dist/attributes/shape/path/anchors.js.map +1 -1
  345. package/dist/attributes/shape/path/bezier.js.map +1 -1
  346. package/dist/attributes/shape/path/index.js.map +1 -1
  347. package/dist/attributes/shape/path/measure.js.map +1 -1
  348. package/dist/attributes/shape/path/morph.js.map +1 -1
  349. package/dist/attributes/shape/path/ops.js.map +1 -1
  350. package/dist/attributes/shape/path/types.js.map +1 -1
  351. package/dist/attributes/shape/path/walk.js.map +1 -1
  352. package/dist/attributes/shape/shaders/index.d.ts +2 -0
  353. package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
  354. package/dist/attributes/shape/shaders/index.js +2 -0
  355. package/dist/attributes/shape/shaders/index.js.map +1 -1
  356. package/dist/attributes/shape/shaders/language.d.ts +26 -0
  357. package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
  358. package/dist/attributes/shape/shaders/language.js +20 -0
  359. package/dist/attributes/shape/shaders/language.js.map +1 -0
  360. package/dist/attributes/shape/shaders/pack.d.ts +25 -11
  361. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  362. package/dist/attributes/shape/shaders/pack.js +9 -4
  363. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  364. package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
  365. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  366. package/dist/attributes/shape/shaders/resolve.js +3 -6
  367. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  368. package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
  369. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
  370. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  371. package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
  372. package/dist/attributes/shape/shadow/index.js.map +1 -1
  373. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  374. package/dist/attributes/shape/stroke/index.js.map +1 -1
  375. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  376. package/dist/attributes/shared/operators.js.map +1 -1
  377. package/dist/attributes/text/index.js.map +1 -1
  378. package/dist/attributes/text/ops.js.map +1 -1
  379. package/dist/attributes/text/types.js.map +1 -1
  380. package/dist/browser/chunks/{chunk-LKUYVFU3.js → chunk-4BDLFEOC.js} +1 -1
  381. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
  382. package/dist/browser/chunks/chunk-7DB6BI27.js +6 -0
  383. package/dist/browser/chunks/chunk-7DB6BI27.js.map +7 -0
  384. package/dist/browser/chunks/chunk-IX53IFBD.js +13 -0
  385. package/dist/browser/chunks/chunk-IX53IFBD.js.map +7 -0
  386. package/dist/browser/chunks/{chunk-ZRPZPWZU.js → chunk-Q55UPA3E.js} +1 -1
  387. package/dist/browser/chunks/chunk-Q55UPA3E.js.map +7 -0
  388. package/dist/browser/component.js +1 -1
  389. package/dist/browser/experimental.js +1 -1
  390. package/dist/browser/experimental.js.map +4 -4
  391. package/dist/browser/index.js +1 -1
  392. package/dist/browser/index.js.map +2 -2
  393. package/dist/browser/manifest.json +1 -1
  394. package/dist/browser/sdk.js +1 -1
  395. package/dist/component.js.map +1 -1
  396. package/dist/components/builtins/audio/audio.d.ts +14 -5
  397. package/dist/components/builtins/audio/audio.d.ts.map +1 -1
  398. package/dist/components/builtins/audio/audio.js +10 -13
  399. package/dist/components/builtins/audio/audio.js.map +1 -1
  400. package/dist/components/builtins/geometry/composite.d.ts +3 -3
  401. package/dist/components/builtins/geometry/composite.js.map +1 -1
  402. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  403. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  404. package/dist/components/builtins/layout/layout.js.map +1 -1
  405. package/dist/components/builtins/media/media.d.ts +7 -7
  406. package/dist/components/builtins/media/media.d.ts.map +1 -1
  407. package/dist/components/builtins/media/media.js +4 -10
  408. package/dist/components/builtins/media/media.js.map +1 -1
  409. package/dist/components/builtins/providers/providers.js.map +1 -1
  410. package/dist/components/builtins/text/number-format.js.map +1 -1
  411. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  412. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  413. package/dist/components/builtins/text/text-layout.js.map +1 -1
  414. package/dist/components/builtins/text/text.d.ts +9 -9
  415. package/dist/components/builtins/text/text.d.ts.map +1 -1
  416. package/dist/components/builtins/text/text.js +3 -0
  417. package/dist/components/builtins/text/text.js.map +1 -1
  418. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  419. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  420. package/dist/components/builtins/three/three.js.map +1 -1
  421. package/dist/components/factory/api.d.ts +38 -11
  422. package/dist/components/factory/api.d.ts.map +1 -1
  423. package/dist/components/factory/api.js.map +1 -1
  424. package/dist/components/factory/clip-of.js.map +1 -1
  425. package/dist/components/factory/commands-for.js.map +1 -1
  426. package/dist/components/factory/component-audio.js.map +1 -1
  427. package/dist/components/factory/component2d.js.map +1 -1
  428. package/dist/components/factory/component3d.d.ts.map +1 -1
  429. package/dist/components/factory/component3d.js +11 -3
  430. package/dist/components/factory/component3d.js.map +1 -1
  431. package/dist/components/factory/factory.d.ts +3 -0
  432. package/dist/components/factory/factory.d.ts.map +1 -1
  433. package/dist/components/factory/factory.js +39 -5
  434. package/dist/components/factory/factory.js.map +1 -1
  435. package/dist/components/factory/timeline.js.map +1 -1
  436. package/dist/components/factory/type-def.js.map +1 -1
  437. package/dist/components/factory/types.js.map +1 -1
  438. package/dist/components/factory/views.js.map +1 -1
  439. package/dist/components/modules/aim.js.map +1 -1
  440. package/dist/components/modules/corners.js.map +1 -1
  441. package/dist/components/modules/flow.js.map +1 -1
  442. package/dist/components/modules/material.js.map +1 -1
  443. package/dist/components/modules/paint.js.map +1 -1
  444. package/dist/components/modules/shapes.js.map +1 -1
  445. package/dist/components/modules/text-layout.js.map +1 -1
  446. package/dist/components/modules/text-style.js.map +1 -1
  447. package/dist/components/modules/three-entries.js.map +1 -1
  448. package/dist/components/modules/view3d.js.map +1 -1
  449. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  450. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  451. package/dist/components/trees/2d/node-motion.js.map +1 -1
  452. package/dist/components/trees/2d/node-render.d.ts +1 -1
  453. package/dist/components/trees/2d/node-render.js +1 -1
  454. package/dist/components/trees/2d/node-render.js.map +1 -1
  455. package/dist/components/trees/2d/node-space.js.map +1 -1
  456. package/dist/components/trees/2d/node-transform.js.map +1 -1
  457. package/dist/components/trees/2d/node2d.d.ts +1 -1
  458. package/dist/components/trees/2d/node2d.js +1 -1
  459. package/dist/components/trees/2d/node2d.js.map +1 -1
  460. package/dist/components/trees/audio/index.js.map +1 -1
  461. package/dist/components/trees/audio/node-audio.d.ts +16 -9
  462. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  463. package/dist/components/trees/audio/node-audio.js +15 -11
  464. package/dist/components/trees/audio/node-audio.js.map +1 -1
  465. package/dist/components/trees/index.js.map +1 -1
  466. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  467. package/dist/components/trees/node/node-reactive.js.map +1 -1
  468. package/dist/components/trees/node/node-time.js.map +1 -1
  469. package/dist/components/trees/node/node-walk.js.map +1 -1
  470. package/dist/components/trees/node/node.js.map +1 -1
  471. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  472. package/dist/components/trees/three/node3d.js.map +1 -1
  473. package/dist/document/audio.js.map +1 -1
  474. package/dist/document/builtins.js.map +1 -1
  475. package/dist/document/command-traits.d.ts +12 -2
  476. package/dist/document/command-traits.d.ts.map +1 -1
  477. package/dist/document/command-traits.js +34 -6
  478. package/dist/document/command-traits.js.map +1 -1
  479. package/dist/document/deny-globals.js.map +1 -1
  480. package/dist/document/diff.js.map +1 -1
  481. package/dist/document/doc-index.js.map +1 -1
  482. package/dist/document/expression/compile.js.map +1 -1
  483. package/dist/document/expression/index.js.map +1 -1
  484. package/dist/document/expression/ops.js.map +1 -1
  485. package/dist/document/expression/parse.js.map +1 -1
  486. package/dist/document/expression/refs.js.map +1 -1
  487. package/dist/document/expression/types.js.map +1 -1
  488. package/dist/document/expression/walk.js.map +1 -1
  489. package/dist/document/index.d.ts +8 -0
  490. package/dist/document/index.d.ts.map +1 -1
  491. package/dist/document/index.js +4 -0
  492. package/dist/document/index.js.map +1 -1
  493. package/dist/document/migrate.d.ts +70 -0
  494. package/dist/document/migrate.d.ts.map +1 -0
  495. package/dist/document/migrate.js +202 -0
  496. package/dist/document/migrate.js.map +1 -0
  497. package/dist/document/missing-node.d.ts +27 -0
  498. package/dist/document/missing-node.d.ts.map +1 -0
  499. package/dist/document/missing-node.js +48 -0
  500. package/dist/document/missing-node.js.map +1 -0
  501. package/dist/document/node-decorator.js.map +1 -1
  502. package/dist/document/node-descriptor.d.ts +4 -0
  503. package/dist/document/node-descriptor.d.ts.map +1 -1
  504. package/dist/document/node-descriptor.js.map +1 -1
  505. package/dist/document/placement.d.ts +2 -1
  506. package/dist/document/placement.d.ts.map +1 -1
  507. package/dist/document/placement.js.map +1 -1
  508. package/dist/document/project.d.ts +2 -0
  509. package/dist/document/project.d.ts.map +1 -1
  510. package/dist/document/project.js +1 -0
  511. package/dist/document/project.js.map +1 -1
  512. package/dist/document/prop-evolution.d.ts +51 -0
  513. package/dist/document/prop-evolution.d.ts.map +1 -0
  514. package/dist/document/prop-evolution.js +83 -0
  515. package/dist/document/prop-evolution.js.map +1 -0
  516. package/dist/document/registry.d.ts +16 -0
  517. package/dist/document/registry.d.ts.map +1 -1
  518. package/dist/document/registry.js +30 -4
  519. package/dist/document/registry.js.map +1 -1
  520. package/dist/document/settled-index.d.ts +2 -0
  521. package/dist/document/settled-index.d.ts.map +1 -1
  522. package/dist/document/settled-index.js +5 -5
  523. package/dist/document/settled-index.js.map +1 -1
  524. package/dist/document/timeline-patch.d.ts +4 -0
  525. package/dist/document/timeline-patch.d.ts.map +1 -1
  526. package/dist/document/timeline-patch.js +28 -3
  527. package/dist/document/timeline-patch.js.map +1 -1
  528. package/dist/document/timeline.d.ts +45 -1
  529. package/dist/document/timeline.d.ts.map +1 -1
  530. package/dist/document/timeline.js +172 -42
  531. package/dist/document/timeline.js.map +1 -1
  532. package/dist/document/types.d.ts +14 -28
  533. package/dist/document/types.d.ts.map +1 -1
  534. package/dist/document/types.js.map +1 -1
  535. package/dist/document/validate.d.ts +17 -5
  536. package/dist/document/validate.d.ts.map +1 -1
  537. package/dist/document/validate.js +158 -21
  538. package/dist/document/validate.js.map +1 -1
  539. package/dist/document/vocabulary.d.ts +28 -0
  540. package/dist/document/vocabulary.d.ts.map +1 -0
  541. package/dist/document/vocabulary.js +42 -0
  542. package/dist/document/vocabulary.js.map +1 -0
  543. package/dist/experimental.d.ts +68 -8
  544. package/dist/experimental.d.ts.map +1 -1
  545. package/dist/experimental.js +22 -8
  546. package/dist/experimental.js.map +1 -1
  547. package/dist/index.js.map +1 -1
  548. package/dist/layout/bounds.js.map +1 -1
  549. package/dist/layout/constraints.js.map +1 -1
  550. package/dist/layout/flex.js.map +1 -1
  551. package/dist/layout/freeform.js.map +1 -1
  552. package/dist/layout/grid.js.map +1 -1
  553. package/dist/layout/index.js.map +1 -1
  554. package/dist/layout/item.js.map +1 -1
  555. package/dist/layout/ops.js.map +1 -1
  556. package/dist/layout/types.js.map +1 -1
  557. package/dist/platform/audio-sink.js.map +1 -1
  558. package/dist/platform/exporter.d.ts +13 -0
  559. package/dist/platform/exporter.d.ts.map +1 -1
  560. package/dist/platform/exporter.js.map +1 -1
  561. package/dist/platform/index.js.map +1 -1
  562. package/dist/platform/stepped-clock.js.map +1 -1
  563. package/dist/platform/storage-adapter.js.map +1 -1
  564. package/dist/platform/ticker.js.map +1 -1
  565. package/dist/project/config.js.map +1 -1
  566. package/dist/project/index.js.map +1 -1
  567. package/dist/project/tree.js.map +1 -1
  568. package/dist/props/host.js.map +1 -1
  569. package/dist/props/index.js.map +1 -1
  570. package/dist/props/observer.js.map +1 -1
  571. package/dist/props/slot.js.map +1 -1
  572. package/dist/renamed-scene-names.d.ts +1 -1
  573. package/dist/renamed-scene-names.d.ts.map +1 -1
  574. package/dist/renamed-scene-names.js +1 -1
  575. package/dist/renamed-scene-names.js.map +1 -1
  576. package/dist/render/canvas-render-context2d.d.ts +9 -0
  577. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  578. package/dist/render/canvas-render-context2d.js +10 -0
  579. package/dist/render/canvas-render-context2d.js.map +1 -1
  580. package/dist/render/clip-contains.js +1 -1
  581. package/dist/render/clip-contains.js.map +1 -1
  582. package/dist/render/clip.js.map +1 -1
  583. package/dist/render/descriptors/ellipse.js.map +1 -1
  584. package/dist/render/descriptors/line.js.map +1 -1
  585. package/dist/render/descriptors/path-builder.js.map +1 -1
  586. package/dist/render/descriptors/path.js.map +1 -1
  587. package/dist/render/descriptors/polygon.js.map +1 -1
  588. package/dist/render/descriptors/polygram.js.map +1 -1
  589. package/dist/render/descriptors/rect.js.map +1 -1
  590. package/dist/render/descriptors/richtext.js.map +1 -1
  591. package/dist/render/descriptors/shape.js.map +1 -1
  592. package/dist/render/descriptors/text.d.ts +2 -2
  593. package/dist/render/descriptors/text.js +2 -2
  594. package/dist/render/descriptors/text.js.map +1 -1
  595. package/dist/render/descriptors/transform.js.map +1 -1
  596. package/dist/render/graphics2d.js.map +1 -1
  597. package/dist/render/index.d.ts +2 -0
  598. package/dist/render/index.d.ts.map +1 -1
  599. package/dist/render/index.js +1 -0
  600. package/dist/render/index.js.map +1 -1
  601. package/dist/render/measure-context.js.map +1 -1
  602. package/dist/render/null-render-context.js.map +1 -1
  603. package/dist/render/render-context2d.d.ts +1 -1
  604. package/dist/render/render-context2d.js.map +1 -1
  605. package/dist/render/render-issue.d.ts +39 -0
  606. package/dist/render/render-issue.d.ts.map +1 -0
  607. package/dist/render/render-issue.js +29 -0
  608. package/dist/render/render-issue.js.map +1 -0
  609. package/dist/render/surface.d.ts +2 -2
  610. package/dist/render/surface.js.map +1 -1
  611. package/dist/render/text-defaults.js.map +1 -1
  612. package/dist/render/text-layout.js.map +1 -1
  613. package/dist/render3d/bounds3d.js.map +1 -1
  614. package/dist/render3d/builders.js.map +1 -1
  615. package/dist/render3d/camera.js.map +1 -1
  616. package/dist/render3d/fill3d.js.map +1 -1
  617. package/dist/render3d/geometry.js.map +1 -1
  618. package/dist/render3d/graphics3d.d.ts.map +1 -1
  619. package/dist/render3d/graphics3d.js +54 -5
  620. package/dist/render3d/graphics3d.js.map +1 -1
  621. package/dist/render3d/index.js.map +1 -1
  622. package/dist/render3d/inert.js.map +1 -1
  623. package/dist/render3d/light.js.map +1 -1
  624. package/dist/render3d/material.js.map +1 -1
  625. package/dist/render3d/matrix4.js.map +1 -1
  626. package/dist/render3d/render-context3d.js.map +1 -1
  627. package/dist/render3d/resources.js.map +1 -1
  628. package/dist/render3d/rounded-box.js.map +1 -1
  629. package/dist/render3d/scene-settings.js.map +1 -1
  630. package/dist/render3d/scene3d.js.map +1 -1
  631. package/dist/render3d/segments.js.map +1 -1
  632. package/dist/render3d/texture.js.map +1 -1
  633. package/dist/render3d/tracking.js.map +1 -1
  634. package/dist/render3d/transform.js.map +1 -1
  635. package/dist/render3d/vector3.js.map +1 -1
  636. package/dist/render3d/walk.js.map +1 -1
  637. package/dist/runtime/asset-refine.js +2 -1
  638. package/dist/runtime/asset-refine.js.map +1 -1
  639. package/dist/runtime/asset-timeline.d.ts +10 -0
  640. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  641. package/dist/runtime/asset-timeline.js.map +1 -1
  642. package/dist/runtime/asset-update.d.ts.map +1 -1
  643. package/dist/runtime/asset-update.js +7 -0
  644. package/dist/runtime/asset-update.js.map +1 -1
  645. package/dist/runtime/audio-index.js.map +1 -1
  646. package/dist/runtime/builtin-context.js.map +1 -1
  647. package/dist/runtime/clip-instance.d.ts +3 -1
  648. package/dist/runtime/clip-instance.d.ts.map +1 -1
  649. package/dist/runtime/clip-instance.js +4 -0
  650. package/dist/runtime/clip-instance.js.map +1 -1
  651. package/dist/runtime/clip-store.d.ts.map +1 -1
  652. package/dist/runtime/clip-store.js +17 -2
  653. package/dist/runtime/clip-store.js.map +1 -1
  654. package/dist/runtime/engine.d.ts +5 -3
  655. package/dist/runtime/engine.d.ts.map +1 -1
  656. package/dist/runtime/engine.js +2 -1
  657. package/dist/runtime/engine.js.map +1 -1
  658. package/dist/runtime/frame-time.js.map +1 -1
  659. package/dist/runtime/index.js.map +1 -1
  660. package/dist/runtime/node-picking.js.map +1 -1
  661. package/dist/runtime/node-picking3d.js.map +1 -1
  662. package/dist/runtime/placement.js.map +1 -1
  663. package/dist/runtime/playback-controller.d.ts.map +1 -1
  664. package/dist/runtime/playback-controller.js +14 -4
  665. package/dist/runtime/playback-controller.js.map +1 -1
  666. package/dist/runtime/playback.js.map +1 -1
  667. package/dist/runtime/precompisition.js.map +1 -1
  668. package/dist/runtime/project-assets.js.map +1 -1
  669. package/dist/runtime/session.d.ts +7 -3
  670. package/dist/runtime/session.d.ts.map +1 -1
  671. package/dist/runtime/session.js +11 -4
  672. package/dist/runtime/session.js.map +1 -1
  673. package/dist/runtime/settle.js.map +1 -1
  674. package/dist/runtime/state-evaluator.js.map +1 -1
  675. package/dist/runtime/text-geometry.d.ts +1 -1
  676. package/dist/runtime/text-geometry.js.map +1 -1
  677. package/dist/sdk/index.d.ts +8 -6
  678. package/dist/sdk/index.d.ts.map +1 -1
  679. package/dist/sdk/index.js +10 -3
  680. package/dist/sdk/index.js.map +1 -1
  681. package/dist/tween/command-decorator.d.ts +7 -0
  682. package/dist/tween/command-decorator.d.ts.map +1 -1
  683. package/dist/tween/command-decorator.js +1 -0
  684. package/dist/tween/command-decorator.js.map +1 -1
  685. package/dist/tween/command.js.map +1 -1
  686. package/dist/tween/ease/constants.js.map +1 -1
  687. package/dist/tween/ease/curve.js.map +1 -1
  688. package/dist/tween/ease/describe.d.ts +2 -0
  689. package/dist/tween/ease/describe.d.ts.map +1 -1
  690. package/dist/tween/ease/describe.js +4 -0
  691. package/dist/tween/ease/describe.js.map +1 -1
  692. package/dist/tween/ease/spec.d.ts +31 -0
  693. package/dist/tween/ease/spec.d.ts.map +1 -0
  694. package/dist/tween/ease/spec.js +51 -0
  695. package/dist/tween/ease/spec.js.map +1 -0
  696. package/dist/tween/ease/type.js.map +1 -1
  697. package/dist/tween/index.d.ts +1 -0
  698. package/dist/tween/index.d.ts.map +1 -1
  699. package/dist/tween/index.js +1 -0
  700. package/dist/tween/index.js.map +1 -1
  701. package/dist/tween/inert.js.map +1 -1
  702. package/dist/tween/lerp.js.map +1 -1
  703. package/dist/tween/loop.js.map +1 -1
  704. package/dist/tween/prepare.js.map +1 -1
  705. package/dist/tween/stepper.js.map +1 -1
  706. package/dist/tween/to-command.js.map +1 -1
  707. package/dist/util/clamp.js.map +1 -1
  708. package/dist/util/context.js.map +1 -1
  709. package/dist/util/csv.js.map +1 -1
  710. package/dist/util/generateList.js.map +1 -1
  711. package/dist/util/index.js.map +1 -1
  712. package/dist/util/metrics.js.map +1 -1
  713. package/dist/util/random.js.map +1 -1
  714. package/dist/util/reference.js.map +1 -1
  715. package/dist/util/scheduler.js.map +1 -1
  716. package/package.json +2 -2
  717. package/dist/attributes/audio/filters/chain.d.ts +0 -113
  718. package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
  719. package/dist/attributes/audio/filters/chain.js +0 -104
  720. package/dist/attributes/audio/filters/chain.js.map +0 -1
  721. package/dist/attributes/audio/filters/curve.d.ts +0 -152
  722. package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
  723. package/dist/attributes/audio/filters/curve.js +0 -250
  724. package/dist/attributes/audio/filters/curve.js.map +0 -1
  725. package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
  726. package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
  727. package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
  728. package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
  729. package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
  730. package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
  731. package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
  732. package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
  733. package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
  734. package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
  735. package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
  736. package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
  737. package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
  738. package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
  739. package/dist/attributes/audio/filters/implementations/speed.js +0 -6
  740. package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
  741. package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
  742. package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
  743. package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
  744. package/dist/attributes/audio/filters/index.d.ts +0 -22
  745. package/dist/attributes/audio/filters/index.d.ts.map +0 -1
  746. package/dist/attributes/audio/filters/index.js +0 -8
  747. package/dist/attributes/audio/filters/index.js.map +0 -1
  748. package/dist/attributes/audio/filters/registry.d.ts +0 -36
  749. package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
  750. package/dist/attributes/audio/filters/registry.js +0 -82
  751. package/dist/attributes/audio/filters/registry.js.map +0 -1
  752. package/dist/attributes/audio/filters/union.d.ts +0 -18
  753. package/dist/attributes/audio/filters/union.d.ts.map +0 -1
  754. package/dist/attributes/audio/filters/union.js +0 -28
  755. package/dist/attributes/audio/filters/union.js.map +0 -1
  756. package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
  757. package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
  758. package/dist/attributes/shape/sksl-uniforms.js +0 -0
  759. package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
  760. package/dist/browser/chunks/chunk-D4FSTPML.js +0 -14
  761. package/dist/browser/chunks/chunk-D4FSTPML.js.map +0 -7
  762. package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
  763. package/dist/browser/chunks/chunk-RTNATFWX.js +0 -5
  764. package/dist/browser/chunks/chunk-RTNATFWX.js.map +0 -7
  765. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +0 -7
  766. package/dist/component/api.d.ts +0 -508
  767. package/dist/component/api.d.ts.map +0 -1
  768. package/dist/component/api.js +0 -4
  769. package/dist/component/api.js.map +0 -1
  770. package/dist/component/builtins/audio.d.ts +0 -26
  771. package/dist/component/builtins/audio.d.ts.map +0 -1
  772. package/dist/component/builtins/audio.js +0 -41
  773. package/dist/component/builtins/audio.js.map +0 -1
  774. package/dist/component/builtins/canvas3d.d.ts +0 -98
  775. package/dist/component/builtins/canvas3d.d.ts.map +0 -1
  776. package/dist/component/builtins/canvas3d.js +0 -21
  777. package/dist/component/builtins/canvas3d.js.map +0 -1
  778. package/dist/component/builtins/composite.d.ts +0 -56
  779. package/dist/component/builtins/composite.d.ts.map +0 -1
  780. package/dist/component/builtins/composite.js +0 -25
  781. package/dist/component/builtins/composite.js.map +0 -1
  782. package/dist/component/builtins/geometry.d.ts +0 -505
  783. package/dist/component/builtins/geometry.d.ts.map +0 -1
  784. package/dist/component/builtins/geometry.js +0 -107
  785. package/dist/component/builtins/geometry.js.map +0 -1
  786. package/dist/component/builtins/layout.d.ts +0 -88
  787. package/dist/component/builtins/layout.d.ts.map +0 -1
  788. package/dist/component/builtins/layout.js +0 -84
  789. package/dist/component/builtins/layout.js.map +0 -1
  790. package/dist/component/builtins/media.d.ts +0 -95
  791. package/dist/component/builtins/media.d.ts.map +0 -1
  792. package/dist/component/builtins/media.js +0 -149
  793. package/dist/component/builtins/media.js.map +0 -1
  794. package/dist/component/builtins/providers.d.ts +0 -23
  795. package/dist/component/builtins/providers.d.ts.map +0 -1
  796. package/dist/component/builtins/providers.js +0 -30
  797. package/dist/component/builtins/providers.js.map +0 -1
  798. package/dist/component/builtins/text.d.ts +0 -193
  799. package/dist/component/builtins/text.d.ts.map +0 -1
  800. package/dist/component/builtins/text.js +0 -113
  801. package/dist/component/builtins/text.js.map +0 -1
  802. package/dist/component/builtins/three.d.ts +0 -1085
  803. package/dist/component/builtins/three.d.ts.map +0 -1
  804. package/dist/component/builtins/three.js +0 -265
  805. package/dist/component/builtins/three.js.map +0 -1
  806. package/dist/component/clip-of.d.ts +0 -5
  807. package/dist/component/clip-of.d.ts.map +0 -1
  808. package/dist/component/clip-of.js +0 -33
  809. package/dist/component/clip-of.js.map +0 -1
  810. package/dist/component/commands-for.d.ts +0 -19
  811. package/dist/component/commands-for.d.ts.map +0 -1
  812. package/dist/component/commands-for.js +0 -5
  813. package/dist/component/commands-for.js.map +0 -1
  814. package/dist/component/component-audio.d.ts +0 -9
  815. package/dist/component/component-audio.d.ts.map +0 -1
  816. package/dist/component/component-audio.js +0 -18
  817. package/dist/component/component-audio.js.map +0 -1
  818. package/dist/component/component2d.d.ts +0 -9
  819. package/dist/component/component2d.d.ts.map +0 -1
  820. package/dist/component/component2d.js +0 -239
  821. package/dist/component/component2d.js.map +0 -1
  822. package/dist/component/component3d.d.ts +0 -9
  823. package/dist/component/component3d.d.ts.map +0 -1
  824. package/dist/component/component3d.js +0 -99
  825. package/dist/component/component3d.js.map +0 -1
  826. package/dist/component/factory.d.ts +0 -63
  827. package/dist/component/factory.d.ts.map +0 -1
  828. package/dist/component/factory.js +0 -313
  829. package/dist/component/factory.js.map +0 -1
  830. package/dist/component/modules/aim.d.ts +0 -30
  831. package/dist/component/modules/aim.d.ts.map +0 -1
  832. package/dist/component/modules/aim.js +0 -39
  833. package/dist/component/modules/aim.js.map +0 -1
  834. package/dist/component/modules/corners.d.ts +0 -13
  835. package/dist/component/modules/corners.d.ts.map +0 -1
  836. package/dist/component/modules/corners.js +0 -12
  837. package/dist/component/modules/corners.js.map +0 -1
  838. package/dist/component/modules/flow.d.ts +0 -26
  839. package/dist/component/modules/flow.d.ts.map +0 -1
  840. package/dist/component/modules/flow.js +0 -55
  841. package/dist/component/modules/flow.js.map +0 -1
  842. package/dist/component/modules/material.d.ts +0 -40
  843. package/dist/component/modules/material.d.ts.map +0 -1
  844. package/dist/component/modules/material.js +0 -75
  845. package/dist/component/modules/material.js.map +0 -1
  846. package/dist/component/modules/paint.d.ts +0 -71
  847. package/dist/component/modules/paint.d.ts.map +0 -1
  848. package/dist/component/modules/paint.js +0 -106
  849. package/dist/component/modules/paint.js.map +0 -1
  850. package/dist/component/modules/shapes.d.ts +0 -31
  851. package/dist/component/modules/shapes.d.ts.map +0 -1
  852. package/dist/component/modules/shapes.js +0 -43
  853. package/dist/component/modules/shapes.js.map +0 -1
  854. package/dist/component/modules/text-layout.d.ts +0 -26
  855. package/dist/component/modules/text-layout.d.ts.map +0 -1
  856. package/dist/component/modules/text-layout.js +0 -57
  857. package/dist/component/modules/text-layout.js.map +0 -1
  858. package/dist/component/modules/text-style.d.ts +0 -48
  859. package/dist/component/modules/text-style.d.ts.map +0 -1
  860. package/dist/component/modules/text-style.js +0 -63
  861. package/dist/component/modules/text-style.js.map +0 -1
  862. package/dist/component/modules/three-entries.d.ts +0 -23
  863. package/dist/component/modules/three-entries.d.ts.map +0 -1
  864. package/dist/component/modules/three-entries.js +0 -41
  865. package/dist/component/modules/three-entries.js.map +0 -1
  866. package/dist/component/modules/view3d.d.ts +0 -55
  867. package/dist/component/modules/view3d.d.ts.map +0 -1
  868. package/dist/component/modules/view3d.js +0 -160
  869. package/dist/component/modules/view3d.js.map +0 -1
  870. package/dist/component/timeline.d.ts +0 -22
  871. package/dist/component/timeline.d.ts.map +0 -1
  872. package/dist/component/timeline.js +0 -128
  873. package/dist/component/timeline.js.map +0 -1
  874. package/dist/component/type-def.d.ts +0 -26
  875. package/dist/component/type-def.d.ts.map +0 -1
  876. package/dist/component/type-def.js +0 -16
  877. package/dist/component/type-def.js.map +0 -1
  878. package/dist/component/types.d.ts +0 -91
  879. package/dist/component/types.d.ts.map +0 -1
  880. package/dist/component/types.js +0 -88
  881. package/dist/component/types.js.map +0 -1
  882. package/dist/component/views.d.ts +0 -121
  883. package/dist/component/views.d.ts.map +0 -1
  884. package/dist/component/views.js +0 -413
  885. package/dist/component/views.js.map +0 -1
  886. package/dist/document/withdraw.d.ts +0 -28
  887. package/dist/document/withdraw.d.ts.map +0 -1
  888. package/dist/document/withdraw.js +0 -61
  889. package/dist/document/withdraw.js.map +0 -1
  890. package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
  891. package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
  892. package/dist/jsx/jsx-dev-runtime.js +0 -3
  893. package/dist/jsx/jsx-dev-runtime.js.map +0 -1
  894. package/dist/jsx/jsx-runtime.d.ts +0 -27
  895. package/dist/jsx/jsx-runtime.d.ts.map +0 -1
  896. package/dist/jsx/jsx-runtime.js +0 -26
  897. package/dist/jsx/jsx-runtime.js.map +0 -1
  898. package/dist/nodes/2d/node-lifecycle.d.ts +0 -46
  899. package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
  900. package/dist/nodes/2d/node-lifecycle.js +0 -264
  901. package/dist/nodes/2d/node-lifecycle.js.map +0 -1
  902. package/dist/nodes/2d/node-motion.d.ts +0 -56
  903. package/dist/nodes/2d/node-motion.d.ts.map +0 -1
  904. package/dist/nodes/2d/node-motion.js +0 -86
  905. package/dist/nodes/2d/node-motion.js.map +0 -1
  906. package/dist/nodes/2d/node-render.d.ts +0 -44
  907. package/dist/nodes/2d/node-render.d.ts.map +0 -1
  908. package/dist/nodes/2d/node-render.js +0 -80
  909. package/dist/nodes/2d/node-render.js.map +0 -1
  910. package/dist/nodes/2d/node-space.d.ts +0 -63
  911. package/dist/nodes/2d/node-space.d.ts.map +0 -1
  912. package/dist/nodes/2d/node-space.js +0 -131
  913. package/dist/nodes/2d/node-space.js.map +0 -1
  914. package/dist/nodes/2d/node-transform.d.ts +0 -55
  915. package/dist/nodes/2d/node-transform.d.ts.map +0 -1
  916. package/dist/nodes/2d/node-transform.js +0 -73
  917. package/dist/nodes/2d/node-transform.js.map +0 -1
  918. package/dist/nodes/2d/node2d.d.ts +0 -1111
  919. package/dist/nodes/2d/node2d.d.ts.map +0 -1
  920. package/dist/nodes/2d/node2d.js +0 -1665
  921. package/dist/nodes/2d/node2d.js.map +0 -1
  922. package/dist/nodes/2d/paint-node.d.ts +0 -142
  923. package/dist/nodes/2d/paint-node.d.ts.map +0 -1
  924. package/dist/nodes/2d/paint-node.js +0 -232
  925. package/dist/nodes/2d/paint-node.js.map +0 -1
  926. package/dist/nodes/audio/audio-bus.d.ts +0 -28
  927. package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
  928. package/dist/nodes/audio/audio-bus.js +0 -33
  929. package/dist/nodes/audio/audio-bus.js.map +0 -1
  930. package/dist/nodes/audio/index.d.ts +0 -4
  931. package/dist/nodes/audio/index.d.ts.map +0 -1
  932. package/dist/nodes/audio/index.js +0 -2
  933. package/dist/nodes/audio/index.js.map +0 -1
  934. package/dist/nodes/audio/node-audio.d.ts +0 -107
  935. package/dist/nodes/audio/node-audio.d.ts.map +0 -1
  936. package/dist/nodes/audio/node-audio.js +0 -179
  937. package/dist/nodes/audio/node-audio.js.map +0 -1
  938. package/dist/nodes/audio/sound-node.d.ts +0 -41
  939. package/dist/nodes/audio/sound-node.d.ts.map +0 -1
  940. package/dist/nodes/audio/sound-node.js +0 -71
  941. package/dist/nodes/audio/sound-node.js.map +0 -1
  942. package/dist/nodes/geometry/boolean-node.d.ts +0 -28
  943. package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
  944. package/dist/nodes/geometry/boolean-node.js +0 -81
  945. package/dist/nodes/geometry/boolean-node.js.map +0 -1
  946. package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
  947. package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
  948. package/dist/nodes/geometry/bounds-shape-node.js +0 -181
  949. package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
  950. package/dist/nodes/geometry/box-path-node.d.ts +0 -89
  951. package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
  952. package/dist/nodes/geometry/box-path-node.js +0 -116
  953. package/dist/nodes/geometry/box-path-node.js.map +0 -1
  954. package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
  955. package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
  956. package/dist/nodes/geometry/ellipse-node.js +0 -45
  957. package/dist/nodes/geometry/ellipse-node.js.map +0 -1
  958. package/dist/nodes/geometry/group-bounds.d.ts +0 -56
  959. package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
  960. package/dist/nodes/geometry/group-bounds.js +0 -87
  961. package/dist/nodes/geometry/group-bounds.js.map +0 -1
  962. package/dist/nodes/geometry/mask-node.d.ts +0 -33
  963. package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
  964. package/dist/nodes/geometry/mask-node.js +0 -66
  965. package/dist/nodes/geometry/mask-node.js.map +0 -1
  966. package/dist/nodes/geometry/path-node.d.ts +0 -26
  967. package/dist/nodes/geometry/path-node.d.ts.map +0 -1
  968. package/dist/nodes/geometry/path-node.js +0 -58
  969. package/dist/nodes/geometry/path-node.js.map +0 -1
  970. package/dist/nodes/geometry/polygon-node.d.ts +0 -26
  971. package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
  972. package/dist/nodes/geometry/polygon-node.js +0 -47
  973. package/dist/nodes/geometry/polygon-node.js.map +0 -1
  974. package/dist/nodes/geometry/polygram-node.d.ts +0 -33
  975. package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
  976. package/dist/nodes/geometry/polygram-node.js +0 -52
  977. package/dist/nodes/geometry/polygram-node.js.map +0 -1
  978. package/dist/nodes/geometry/rect-node.d.ts +0 -38
  979. package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
  980. package/dist/nodes/geometry/rect-node.js +0 -56
  981. package/dist/nodes/geometry/rect-node.js.map +0 -1
  982. package/dist/nodes/geometry/shape-node.d.ts +0 -71
  983. package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
  984. package/dist/nodes/geometry/shape-node.js +0 -140
  985. package/dist/nodes/geometry/shape-node.js.map +0 -1
  986. package/dist/nodes/geometry/shape-outline.d.ts +0 -93
  987. package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
  988. package/dist/nodes/geometry/shape-outline.js +0 -470
  989. package/dist/nodes/geometry/shape-outline.js.map +0 -1
  990. package/dist/nodes/index.d.ts +0 -53
  991. package/dist/nodes/index.d.ts.map +0 -1
  992. package/dist/nodes/index.js +0 -35
  993. package/dist/nodes/index.js.map +0 -1
  994. package/dist/nodes/layout/camera-node.d.ts +0 -80
  995. package/dist/nodes/layout/camera-node.d.ts.map +0 -1
  996. package/dist/nodes/layout/camera-node.js +0 -153
  997. package/dist/nodes/layout/camera-node.js.map +0 -1
  998. package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
  999. package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
  1000. package/dist/nodes/layout/orbit-camera-node.js +0 -118
  1001. package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
  1002. package/dist/nodes/layout/rotated-box.d.ts +0 -20
  1003. package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
  1004. package/dist/nodes/layout/rotated-box.js +0 -76
  1005. package/dist/nodes/layout/rotated-box.js.map +0 -1
  1006. package/dist/nodes/media/video-node.d.ts +0 -229
  1007. package/dist/nodes/media/video-node.d.ts.map +0 -1
  1008. package/dist/nodes/media/video-node.js +0 -350
  1009. package/dist/nodes/media/video-node.js.map +0 -1
  1010. package/dist/nodes/node/declare-paints.d.ts +0 -19
  1011. package/dist/nodes/node/declare-paints.d.ts.map +0 -1
  1012. package/dist/nodes/node/declare-paints.js +0 -27
  1013. package/dist/nodes/node/declare-paints.js.map +0 -1
  1014. package/dist/nodes/node/node-editor-state.d.ts +0 -53
  1015. package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
  1016. package/dist/nodes/node/node-editor-state.js +0 -23
  1017. package/dist/nodes/node/node-editor-state.js.map +0 -1
  1018. package/dist/nodes/node/node-reactive.d.ts +0 -89
  1019. package/dist/nodes/node/node-reactive.d.ts.map +0 -1
  1020. package/dist/nodes/node/node-reactive.js +0 -135
  1021. package/dist/nodes/node/node-reactive.js.map +0 -1
  1022. package/dist/nodes/node/node-time.d.ts +0 -39
  1023. package/dist/nodes/node/node-time.d.ts.map +0 -1
  1024. package/dist/nodes/node/node-time.js +0 -14
  1025. package/dist/nodes/node/node-time.js.map +0 -1
  1026. package/dist/nodes/node/node-walk.d.ts +0 -46
  1027. package/dist/nodes/node/node-walk.d.ts.map +0 -1
  1028. package/dist/nodes/node/node-walk.js +0 -74
  1029. package/dist/nodes/node/node-walk.js.map +0 -1
  1030. package/dist/nodes/node/node.d.ts +0 -445
  1031. package/dist/nodes/node/node.d.ts.map +0 -1
  1032. package/dist/nodes/node/node.js +0 -745
  1033. package/dist/nodes/node/node.js.map +0 -1
  1034. package/dist/nodes/node/text-defaults.d.ts +0 -32
  1035. package/dist/nodes/node/text-defaults.d.ts.map +0 -1
  1036. package/dist/nodes/node/text-defaults.js +0 -37
  1037. package/dist/nodes/node/text-defaults.js.map +0 -1
  1038. package/dist/nodes/root/canvas2d-node.d.ts +0 -163
  1039. package/dist/nodes/root/canvas2d-node.d.ts.map +0 -1
  1040. package/dist/nodes/root/canvas2d-node.js +0 -264
  1041. package/dist/nodes/root/canvas2d-node.js.map +0 -1
  1042. package/dist/nodes/root/provider-node.d.ts +0 -47
  1043. package/dist/nodes/root/provider-node.d.ts.map +0 -1
  1044. package/dist/nodes/root/provider-node.js +0 -63
  1045. package/dist/nodes/root/provider-node.js.map +0 -1
  1046. package/dist/nodes/root/theme-provider-node.d.ts +0 -29
  1047. package/dist/nodes/root/theme-provider-node.d.ts.map +0 -1
  1048. package/dist/nodes/root/theme-provider-node.js +0 -43
  1049. package/dist/nodes/root/theme-provider-node.js.map +0 -1
  1050. package/dist/nodes/text/default-text-style-node.d.ts +0 -103
  1051. package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
  1052. package/dist/nodes/text/default-text-style-node.js +0 -146
  1053. package/dist/nodes/text/default-text-style-node.js.map +0 -1
  1054. package/dist/nodes/text/number-format.d.ts +0 -66
  1055. package/dist/nodes/text/number-format.d.ts.map +0 -1
  1056. package/dist/nodes/text/number-format.js +0 -227
  1057. package/dist/nodes/text/number-format.js.map +0 -1
  1058. package/dist/nodes/text/number-node.d.ts +0 -94
  1059. package/dist/nodes/text/number-node.d.ts.map +0 -1
  1060. package/dist/nodes/text/number-node.js +0 -86
  1061. package/dist/nodes/text/number-node.js.map +0 -1
  1062. package/dist/nodes/text/number-pattern.d.ts +0 -51
  1063. package/dist/nodes/text/number-pattern.d.ts.map +0 -1
  1064. package/dist/nodes/text/number-pattern.js +0 -77
  1065. package/dist/nodes/text/number-pattern.js.map +0 -1
  1066. package/dist/nodes/text/richtext-node.d.ts +0 -68
  1067. package/dist/nodes/text/richtext-node.d.ts.map +0 -1
  1068. package/dist/nodes/text/richtext-node.js +0 -78
  1069. package/dist/nodes/text/richtext-node.js.map +0 -1
  1070. package/dist/nodes/text/text-base.d.ts +0 -118
  1071. package/dist/nodes/text/text-base.d.ts.map +0 -1
  1072. package/dist/nodes/text/text-base.js +0 -153
  1073. package/dist/nodes/text/text-base.js.map +0 -1
  1074. package/dist/nodes/text/text-layout.d.ts +0 -87
  1075. package/dist/nodes/text/text-layout.d.ts.map +0 -1
  1076. package/dist/nodes/text/text-layout.js +0 -368
  1077. package/dist/nodes/text/text-layout.js.map +0 -1
  1078. package/dist/nodes/text/text-node.d.ts +0 -84
  1079. package/dist/nodes/text/text-node.d.ts.map +0 -1
  1080. package/dist/nodes/text/text-node.js +0 -188
  1081. package/dist/nodes/text/text-node.js.map +0 -1
  1082. package/dist/nodes/text/text-selection.d.ts +0 -125
  1083. package/dist/nodes/text/text-selection.d.ts.map +0 -1
  1084. package/dist/nodes/text/text-selection.js +0 -209
  1085. package/dist/nodes/text/text-selection.js.map +0 -1
  1086. package/dist/nodes/three/camera-nodes.d.ts +0 -109
  1087. package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
  1088. package/dist/nodes/three/camera-nodes.js +0 -112
  1089. package/dist/nodes/three/camera-nodes.js.map +0 -1
  1090. package/dist/nodes/three/canvas3d-node.d.ts +0 -295
  1091. package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
  1092. package/dist/nodes/three/canvas3d-node.js +0 -486
  1093. package/dist/nodes/three/canvas3d-node.js.map +0 -1
  1094. package/dist/nodes/three/drawable-nodes.d.ts +0 -173
  1095. package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
  1096. package/dist/nodes/three/drawable-nodes.js +0 -284
  1097. package/dist/nodes/three/drawable-nodes.js.map +0 -1
  1098. package/dist/nodes/three/environment-nodes.d.ts +0 -106
  1099. package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
  1100. package/dist/nodes/three/environment-nodes.js +0 -134
  1101. package/dist/nodes/three/environment-nodes.js.map +0 -1
  1102. package/dist/nodes/three/geometry-nodes.d.ts +0 -197
  1103. package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
  1104. package/dist/nodes/three/geometry-nodes.js +0 -322
  1105. package/dist/nodes/three/geometry-nodes.js.map +0 -1
  1106. package/dist/nodes/three/grid-geometry3d.d.ts +0 -62
  1107. package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
  1108. package/dist/nodes/three/grid-geometry3d.js +0 -114
  1109. package/dist/nodes/three/grid-geometry3d.js.map +0 -1
  1110. package/dist/nodes/three/group3d.d.ts +0 -23
  1111. package/dist/nodes/three/group3d.d.ts.map +0 -1
  1112. package/dist/nodes/three/group3d.js +0 -21
  1113. package/dist/nodes/three/group3d.js.map +0 -1
  1114. package/dist/nodes/three/light-nodes.d.ts +0 -120
  1115. package/dist/nodes/three/light-nodes.d.ts.map +0 -1
  1116. package/dist/nodes/three/light-nodes.js +0 -173
  1117. package/dist/nodes/three/light-nodes.js.map +0 -1
  1118. package/dist/nodes/three/mesh3d.d.ts +0 -117
  1119. package/dist/nodes/three/mesh3d.d.ts.map +0 -1
  1120. package/dist/nodes/three/mesh3d.js +0 -147
  1121. package/dist/nodes/three/mesh3d.js.map +0 -1
  1122. package/dist/nodes/three/node3d.d.ts +0 -230
  1123. package/dist/nodes/three/node3d.d.ts.map +0 -1
  1124. package/dist/nodes/three/node3d.js +0 -337
  1125. package/dist/nodes/three/node3d.js.map +0 -1
  1126. package/dist/render/descriptors/latex.d.ts +0 -6
  1127. package/dist/render/descriptors/latex.d.ts.map +0 -1
  1128. package/dist/render/descriptors/latex.js +0 -2
  1129. package/dist/render/descriptors/latex.js.map +0 -1
  1130. package/dist/tween/seekable.d.ts +0 -81
  1131. package/dist/tween/seekable.d.ts.map +0 -1
  1132. package/dist/tween/seekable.js +0 -137
  1133. package/dist/tween/seekable.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/runtime/session.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAwB,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAGjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoBxD;;;;;;;;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ACxD,QAAQ,CAAkB;IACjB,QAAQ,CAAuB;IAC/B,QAAQ,CAAiB;IACzB,cAAc,CAAsB;IACpC,WAAW,CAAqB;IAChC,SAAS,CAAkB;IAC3B,YAAY,CAAa;CAC7C;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAClC,QAA0C,EAC1C,QAA6C,EAC7C,QAA2C;IAE3C,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAoB;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ;QACpE,GAAG,EAAE,QAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG;KACnD,CAAC;IACF,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO,QAAQ,CAAC;AACpB,CAAC","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\r\nimport { AssetManifest } from \"@/assets/manifest\";\r\nimport { ManifestAssetCatalog } from \"@/assets/catalog\";\r\nimport { setTheme } from \"@/attributes/shape/fill/color/parser\";\r\nimport { asProjectDocument, type ProjectDocument } from \"@/document/project\";\r\nimport type { VisualDocument } from \"@/document/types\";\r\nimport { assertValidProjectDocument } from \"@/document/validate\";\r\nimport { ExportStillRequest, ExportVideoRequest, ExportedStill } from \"@/platform/exporter\";\r\nimport { Engine, EngineRenderContext } from \"./engine\";\r\nimport { Playback } from \"./playback\";\r\nimport { clipTimeToFrame } from \"./frame-time\";\r\nimport { PlaybackController } from \"./playback-controller\";\r\nimport { AssetTimelineResult } from \"./asset-timeline\";\r\nimport { StorageAdapter } from \"@/platform/storage-adapter\";\r\nimport { SteppedClock } from \"@/platform/stepped-clock\";\r\n\r\n/** What to open: a project, or a lone still or composition as the one track of a project around it. */\r\nexport interface SessionSource {\r\n document: ProjectDocument | VisualDocument;\r\n /** The output's size and rate. A lone clip document carries neither; these also win over a project's own. */\r\n viewport?: Size2D;\r\n fps?: number;\r\n}\r\n\r\nexport interface OpenOptions extends SessionSource {\r\n /**\r\n * Where pixels land. A canvas in a browser, a size headlessly — the platform's\r\n * render context narrows it. Omit to open without mounting, for a session that\r\n * only ever exports.\r\n */\r\n target?: unknown;\r\n onPrecompProgress?: (result: AssetTimelineResult) => void;\r\n}\r\n\r\n/**\r\n * One document, bound to one engine and one surface.\r\n *\r\n * Cheap relative to its engine — it holds a surface and a playhead, while the\r\n * caches it draws on belong to the engine — so many sessions over one engine is\r\n * the intended shape: a preview, a filmstrip of thumbnails, an export.\r\n *\r\n * The theme is still applied through a process-global registry (`setTheme`), so\r\n * it is re-applied immediately before anything draws; concurrent sessions with\r\n * different themes would contend. Isolating that means threading a context\r\n * through every colour parse, which is its own change.\r\n */\r\nexport class Session {\r\n readonly viewport: Size2D;\r\n readonly fps: number;\r\n\r\n /** @internal — created by `Engine.open`, never directly. */\r\n constructor(\r\n private readonly engine: Engine,\r\n options: OpenOptions,\r\n ) {\r\n this._override = { viewport: options.viewport, fps: options.fps };\r\n this._project = resolveProjectDocument(options.document, options, engine);\r\n this.viewport = this._project.viewport!;\r\n this.fps = this._project.fps!;\r\n\r\n this._catalog = new ManifestAssetCatalog(engine.manifest);\r\n // One catalog for the session's life, reconciled in place: the controller,\r\n // its clip store and every node's `assets` hold this object, so a new one\r\n // would reach only the storage adapter.\r\n this._unsubscribe = engine._onManifestChange((manifest: AssetManifest) => {\r\n this._catalog.reconcile(manifest);\r\n this._storage.setCatalog(this._catalog);\r\n this._controller.reconcileCatalog();\r\n });\r\n\r\n const deps = { catalog: this._catalog, viewport: this.viewport, fps: this.fps };\r\n this._storage = engine.platform.createStorageAdapter(deps);\r\n this._renderContext = engine.platform.createRenderContext(this._storage);\r\n const measurer = engine.platform.createMeasureContext(this._storage);\r\n const audioDevice = engine.platform.createAudioSink();\r\n const masterClock = engine.platform.createTicker(this.fps, audioDevice);\r\n\r\n // Before the first measuring pass, which resolves theme tokens.\r\n this.applyGlobals();\r\n\r\n if (options.target !== undefined) this._renderContext.mount(options.target);\r\n\r\n // A platform answering `null` means \"no *realtime* transport here\", not\r\n // \"nothing works\": seeking, picking and drawing are the same headlessly,\r\n // so a stepped clock stands in and only `playback` reports the absence.\r\n this._controller = new PlaybackController({\r\n project: this._project,\r\n registry: engine._registry,\r\n renderContext: this._renderContext,\r\n measurer,\r\n storageAdapter: this._storage,\r\n masterClock: masterClock ?? new SteppedClock(),\r\n audioDevice,\r\n assets: this._catalog,\r\n onPrecompProgress: options.onPrecompProgress,\r\n });\r\n this._playback = masterClock === null ? null : new Playback(this._controller);\r\n }\r\n\r\n /** The project this session plays, its fps and viewport resolved. */\r\n get document(): ProjectDocument {\r\n return this._project;\r\n }\r\n\r\n /** Realtime transport, or `null` when this engine has no clock. */\r\n get playback(): Playback | null {\r\n return this._playback;\r\n }\r\n\r\n /**\r\n * The editor-facing surface: node picking, node boxes, text layout, prop\r\n * overrides, tree state, build errors.\r\n *\r\n * Exposed rather than proxied: `Session` covers the *document* — what is\r\n * open, where it draws, how it encodes — and the controller covers\r\n * inspecting and manipulating a live frame, a different job with a surface\r\n * of its own. Always present, including headlessly (see `SteppedClock`).\r\n */\r\n get controller(): PlaybackController {\r\n return this._controller;\r\n }\r\n\r\n /** Where this session draws. A host reads it to resize or re-frame the view. */\r\n get surface(): EngineRenderContext {\r\n return this._renderContext;\r\n }\r\n\r\n get duration(): number {\r\n return this._controller.totalDuration;\r\n }\r\n\r\n get totalFrames(): number {\r\n return this._controller.totalFrames;\r\n }\r\n\r\n /** Move the playhead, in seconds. Resolves once the frame is drawn. */\r\n async seek(seconds: number): Promise<void> {\r\n await this.seekFrame(Math.round(clipTimeToFrame(seconds, this.fps)));\r\n }\r\n\r\n async seekFrame(frame: number): Promise<void> {\r\n this.applyGlobals();\r\n await this._controller.seek(frame);\r\n }\r\n\r\n /**\r\n * Swap what is playing, keeping the surface, audio device and clock. The new\r\n * document is diffed against the playing one and each built tree patched in\r\n * place; a track is rebuilt only when its change cannot be patched, and a\r\n * theme change rebuilds every track. Documents are compared by content with\r\n * identity as the fast path, so treat them as immutable.\r\n *\r\n * The output's size and rate cannot change under a live surface; a document\r\n * that asks for different ones needs a session of its own.\r\n */\r\n replace(document: ProjectDocument | VisualDocument): void {\r\n const next = resolveProjectDocument(document, this._override, this);\r\n if (next.fps !== this.fps || next.viewport!.width !== this.viewport.width\r\n || next.viewport!.height !== this.viewport.height) {\r\n throw new Error(\r\n `Cannot replace a ${this.viewport.width}×${this.viewport.height} @ ${this.fps}fps document with a ` +\r\n `${next.viewport!.width}×${next.viewport!.height} @ ${next.fps}fps one — open a new session.`,\r\n );\r\n }\r\n this._project = next;\r\n this.applyGlobals();\r\n this._controller.setProject(next);\r\n }\r\n\r\n /** Encode one frame. */\r\n image(options: Partial<Omit<ExportStillRequest, \"project\" | \"registry\">> = {}): Promise<ExportedStill> {\r\n this.applyGlobals();\r\n return this.engine.exporter.exportStill({\r\n ...options,\r\n frame: options.frame ?? { kind: \"last\" },\r\n project: this._project,\r\n registry: this.engine._registry,\r\n manifest: options.manifest ?? this.engine.manifest,\r\n });\r\n }\r\n\r\n /** Encode the timeline, or the `frames` of it a request names. */\r\n export(options: Omit<ExportVideoRequest, \"project\" | \"registry\"> = {}): Promise<Uint8Array | void> {\r\n this.applyGlobals();\r\n return this.engine.exporter.exportVideo({\r\n ...options,\r\n project: this._project,\r\n registry: this.engine._registry,\r\n manifest: options.manifest ?? this.engine.manifest,\r\n });\r\n }\r\n\r\n dispose(): void {\r\n this._unsubscribe();\r\n this._controller.dispose();\r\n this._renderContext.dispose();\r\n }\r\n\r\n /** Called before anything that measures or paints, because another session may have written it since. */\r\n private applyGlobals(): void {\r\n setTheme(this._project.theme);\r\n }\r\n\r\n /** The output settings this session was opened with, which win over any document it plays. */\r\n private readonly _override: { viewport?: Size2D; fps?: number };\r\n private _project: ProjectDocument;\r\n private readonly _catalog: ManifestAssetCatalog;\r\n private readonly _storage: StorageAdapter;\r\n private readonly _renderContext: EngineRenderContext;\r\n private readonly _controller: PlaybackController;\r\n private readonly _playback: Playback | null;\r\n private readonly _unsubscribe: () => void;\r\n}\r\n\r\n/**\r\n * The project a document plays as, its output settings resolved: `override`\r\n * first, then the document's own, then `fallback`. Validated once, here, so\r\n * nothing downstream has to — every host that renders a document goes through\r\n * this, so they cannot disagree about which size wins.\r\n */\r\nexport function resolveProjectDocument(\r\n document: ProjectDocument | VisualDocument,\r\n override: { viewport?: Size2D; fps?: number },\r\n fallback: { viewport: Size2D; fps: number },\r\n): ProjectDocument {\r\n const project = asProjectDocument(document);\r\n const resolved: ProjectDocument = {\r\n ...project,\r\n viewport: override.viewport ?? project.viewport ?? fallback.viewport,\r\n fps: override.fps ?? project.fps ?? fallback.fps,\r\n };\r\n assertValidProjectDocument(resolved);\r\n return resolved;\r\n}\r\n"]}
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/runtime/session.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAwB,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoBxD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,OAAO;IAMK;IALZ,QAAQ,CAAS;IACjB,GAAG,CAAS;IAErB,4DAA4D;IAC5D,YACqB,MAAc,EAC/B,OAAoB;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B,YAAY,CAAa;CAC7C;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CAClC,QAA0C,EAC1C,QAA6C,EAC7C,QAA2C;IAE3C,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACzE,MAAM,QAAQ,GAAoB;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ;QACpE,GAAG,EAAE,QAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG;KACnD,CAAC;IACF,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO,QAAQ,CAAC;AACpB,CAAC","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\nimport { AssetManifest } from \"@/assets/manifest\";\nimport { ManifestAssetCatalog } from \"@/assets/catalog\";\nimport { setTheme } from \"@/attributes/shape/fill/color/parser\";\nimport { asProjectDocument, type ProjectDocument } from \"@/document/project\";\nimport type { VisualDocument } from \"@/document/types\";\nimport { assertValidProjectDocument } from \"@/document/validate\";\nimport { migrateDocument } from \"@/document/migrate\";\nimport { ExportStillRequest, ExportVideoRequest, ExportedStill } from \"@/platform/exporter\";\nimport { Engine, EngineRenderContext } from \"./engine\";\nimport { Playback } from \"./playback\";\nimport { clipTimeToFrame } from \"./frame-time\";\nimport { PlaybackController } from \"./playback-controller\";\nimport { AssetTimelineResult } from \"./asset-timeline\";\nimport { StorageAdapter } from \"@/platform/storage-adapter\";\nimport { SteppedClock } from \"@/platform/stepped-clock\";\n\n/** What to open: a project, or a lone still or composition as the one track of a project around it. */\nexport interface SessionSource {\n document: ProjectDocument | VisualDocument;\n /** The output's size and rate. A lone clip document carries neither; these also win over a project's own. */\n viewport?: Size2D;\n fps?: number;\n}\n\nexport interface OpenOptions extends SessionSource {\n /**\n * Where pixels land. A canvas in a browser, a size headlessly — the platform's\n * render context narrows it. Omit to open without mounting, for a session that\n * only ever exports.\n */\n target?: unknown;\n onPrecompProgress?: (result: AssetTimelineResult) => void;\n}\n\n/**\n * One document, bound to one engine and one surface.\n *\n * Cheap relative to its engine — it holds a surface and a playhead, while the\n * caches it draws on belong to the engine — so many sessions over one engine is\n * the intended shape: a preview, a filmstrip of thumbnails, an export.\n *\n * The theme is still applied through a process-global registry (`setTheme`), so\n * it is re-applied immediately before anything draws; concurrent sessions with\n * different themes would contend. Isolating that means threading a context\n * through every colour parse, which is its own change.\n */\nexport class Session {\n readonly viewport: Size2D;\n readonly fps: number;\n\n /** @internal — created by `Engine.open`, never directly. */\n constructor(\n private readonly engine: Engine,\n options: OpenOptions,\n ) {\n this._override = { viewport: options.viewport, fps: options.fps };\n this._project = resolveProjectDocument(options.document, options, engine);\n this.viewport = this._project.viewport!;\n this.fps = this._project.fps!;\n\n this._catalog = new ManifestAssetCatalog(engine.manifest);\n // One catalog for the session's life, reconciled in place: the controller,\n // its clip store and every node's `assets` hold this object, so a new one\n // would reach only the storage adapter.\n this._unsubscribe = engine._onManifestChange((manifest: AssetManifest) => {\n this._catalog.reconcile(manifest);\n this._storage.setCatalog(this._catalog);\n this._controller.reconcileCatalog();\n });\n\n const deps = { catalog: this._catalog, viewport: this.viewport, fps: this.fps };\n this._storage = engine.platform.createStorageAdapter(deps);\n this._renderContext = engine.platform.createRenderContext(this._storage);\n const measurer = engine.platform.createMeasureContext(this._storage);\n const audioDevice = engine.platform.createAudioSink();\n const masterClock = engine.platform.createTicker(this.fps, audioDevice);\n\n // Before the first measuring pass, which resolves theme tokens.\n this.applyGlobals();\n\n if (options.target !== undefined) this._renderContext.mount(options.target);\n\n // A platform answering `null` means \"no *realtime* transport here\", not\n // \"nothing works\": seeking, picking and drawing are the same headlessly,\n // so a stepped clock stands in and only `playback` reports the absence.\n this._controller = new PlaybackController({\n project: this._project,\n registry: engine._registry,\n renderContext: this._renderContext,\n measurer,\n storageAdapter: this._storage,\n masterClock: masterClock ?? new SteppedClock(),\n audioDevice,\n assets: this._catalog,\n onPrecompProgress: options.onPrecompProgress,\n });\n this._playback = masterClock === null ? null : new Playback(this._controller);\n }\n\n /** The project this session plays, its fps and viewport resolved. */\n get document(): ProjectDocument {\n return this._project;\n }\n\n /** Realtime transport, or `null` when this engine has no clock. */\n get playback(): Playback | null {\n return this._playback;\n }\n\n /**\n * The editor-facing surface: node picking, node boxes, text layout, prop\n * overrides, tree state, build errors.\n *\n * Exposed rather than proxied: `Session` covers the *document* — what is\n * open, where it draws, how it encodes — and the controller covers\n * inspecting and manipulating a live frame, a different job with a surface\n * of its own. Always present, including headlessly (see `SteppedClock`).\n */\n get controller(): PlaybackController {\n return this._controller;\n }\n\n /** Where this session draws. A host reads it to resize or re-frame the view. */\n get surface(): EngineRenderContext {\n return this._renderContext;\n }\n\n get duration(): number {\n return this._controller.totalDuration;\n }\n\n get totalFrames(): number {\n return this._controller.totalFrames;\n }\n\n /** Move the playhead, in seconds. Resolves once the frame is drawn. */\n async seek(seconds: number): Promise<void> {\n await this.seekFrame(Math.round(clipTimeToFrame(seconds, this.fps)));\n }\n\n async seekFrame(frame: number): Promise<void> {\n this.applyGlobals();\n await this._controller.seek(frame);\n }\n\n /**\n * Swap what is playing, keeping the surface, audio device and clock. The new\n * document is diffed against the playing one and each built tree patched in\n * place; a track is rebuilt only when its change cannot be patched, and a\n * theme change rebuilds every track. Documents are compared by content with\n * identity as the fast path, so treat them as immutable.\n *\n * The output's size and rate cannot change under a live surface; a document\n * that asks for different ones needs a session of its own.\n */\n replace(document: ProjectDocument | VisualDocument): void {\n const next = resolveProjectDocument(document, this._override, this);\n if (next.fps !== this.fps || next.viewport!.width !== this.viewport.width\n || next.viewport!.height !== this.viewport.height) {\n throw new Error(\n `Cannot replace a ${this.viewport.width}×${this.viewport.height} @ ${this.fps}fps document with a ` +\n `${next.viewport!.width}×${next.viewport!.height} @ ${next.fps}fps one — open a new session.`,\n );\n }\n this._project = next;\n this.applyGlobals();\n this._controller.setProject(next);\n }\n\n /** Encode one frame. */\n image(options: Partial<Omit<ExportStillRequest, \"project\" | \"registry\">> = {}): Promise<ExportedStill> {\n this.applyGlobals();\n return this.engine.exporter.exportStill({\n ...options,\n frame: options.frame ?? { kind: \"last\" },\n project: this._project,\n registry: this.engine._registry,\n manifest: options.manifest ?? this.engine.manifest,\n });\n }\n\n /** Encode the timeline, or the `frames` of it a request names. */\n export(options: Omit<ExportVideoRequest, \"project\" | \"registry\"> = {}): Promise<Uint8Array | void> {\n this.applyGlobals();\n return this.engine.exporter.exportVideo({\n ...options,\n project: this._project,\n registry: this.engine._registry,\n manifest: options.manifest ?? this.engine.manifest,\n });\n }\n\n dispose(): void {\n this._unsubscribe();\n this._controller.dispose();\n this._renderContext.dispose();\n }\n\n /** Called before anything that measures or paints, because another session may have written it since. */\n private applyGlobals(): void {\n setTheme(this._project.theme);\n }\n\n /** The output settings this session was opened with, which win over any document it plays. */\n private readonly _override: { viewport?: Size2D; fps?: number };\n private _project: ProjectDocument;\n private readonly _catalog: ManifestAssetCatalog;\n private readonly _storage: StorageAdapter;\n private readonly _renderContext: EngineRenderContext;\n private readonly _controller: PlaybackController;\n private readonly _playback: Playback | null;\n private readonly _unsubscribe: () => void;\n}\n\n/**\n * The project a document plays as, its output settings resolved: `override`\n * first, then the document's own, then `fallback`. Migrated to the current\n * format and validated once, here, so nothing downstream has to — every host\n * that renders a document goes through this, so they cannot disagree about which\n * size wins. Throws `DocumentTooNewError` for a format this engine cannot read.\n *\n * A migration that changed nothing but the version stamp plays the document as\n * given, so a host replacing the same object keeps the identity fast path.\n */\nexport function resolveProjectDocument(\n document: ProjectDocument | VisualDocument,\n override: { viewport?: Size2D; fps?: number },\n fallback: { viewport: Size2D; fps: number },\n): ProjectDocument {\n const opened = asProjectDocument(document);\n const migrated = migrateDocument(opened);\n const project = migrated.changes.length > 0 ? migrated.document : opened;\n const resolved: ProjectDocument = {\n ...project,\n viewport: override.viewport ?? project.viewport ?? fallback.viewport,\n fps: override.fps ?? project.fps ?? fallback.fps,\n };\n assertValidProjectDocument(resolved);\n return resolved;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"settle.js","sourceRoot":"","sources":["../../src/runtime/settle.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAI/B;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAC/B,MAAkB,EAClB,OAAmD,EACnD,SAAwB;IAExB,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC;QAC9C,IAAI,CAAC,SAAS,EAAE;YAAE,OAAO,YAAY,CAAC;QACtC,MAAM,EAAE,CAAC;QACT,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAClD,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAC9B,IAAI,CAAC,SAAS,EAAE;YAAE,OAAO,YAAY,CAAC;IAC1C,CAAC;IACD,OAAO,WAAW,CAAC;AACvB,CAAC","sourcesContent":["import type { StorageAdapter } from \"@/platform/storage-adapter\";\r\n\r\n/**\r\n * Renders a blocking frame is allowed before it gives up on being exact.\r\n *\r\n * Bounded because a broken asset must degrade a frame rather than hang an\r\n * export; four covers the longest real chain (three runtime → its resources →\r\n * a video frame → an exact image level discovered by that frame's draw).\r\n */\r\nexport const SETTLE_PASSES = 4;\r\n\r\nexport type SettleOutcome = \"settled\" | \"exhausted\" | \"superseded\";\r\n\r\n/**\r\n * Render, settle what the render asked for, and render again until nothing is\r\n * pending.\r\n *\r\n * `isCurrent` is checked before every render and after every await, so a seek\r\n * overtaken by a newer one stops drawing a frame nobody wants.\r\n */\r\nexport async function renderSettled(\r\n render: () => void,\r\n adapter: Pick<StorageAdapter, \"warmPendingDecodes\">,\r\n isCurrent: () => boolean,\r\n): Promise<SettleOutcome> {\r\n for (let pass = 0; pass < SETTLE_PASSES; pass++) {\r\n if (!isCurrent()) return \"superseded\";\r\n render();\r\n const warmed = await adapter.warmPendingDecodes();\r\n if (!warmed) return \"settled\";\r\n if (!isCurrent()) return \"superseded\";\r\n }\r\n return \"exhausted\";\r\n}\r\n"]}
1
+ {"version":3,"file":"settle.js","sourceRoot":"","sources":["../../src/runtime/settle.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAI/B;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAC/B,MAAkB,EAClB,OAAmD,EACnD,SAAwB;IAExB,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC;QAC9C,IAAI,CAAC,SAAS,EAAE;YAAE,OAAO,YAAY,CAAC;QACtC,MAAM,EAAE,CAAC;QACT,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAClD,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAC9B,IAAI,CAAC,SAAS,EAAE;YAAE,OAAO,YAAY,CAAC;IAC1C,CAAC;IACD,OAAO,WAAW,CAAC;AACvB,CAAC","sourcesContent":["import type { StorageAdapter } from \"@/platform/storage-adapter\";\n\n/**\n * Renders a blocking frame is allowed before it gives up on being exact.\n *\n * Bounded because a broken asset must degrade a frame rather than hang an\n * export; four covers the longest real chain (three runtime → its resources →\n * a video frame → an exact image level discovered by that frame's draw).\n */\nexport const SETTLE_PASSES = 4;\n\nexport type SettleOutcome = \"settled\" | \"exhausted\" | \"superseded\";\n\n/**\n * Render, settle what the render asked for, and render again until nothing is\n * pending.\n *\n * `isCurrent` is checked before every render and after every await, so a seek\n * overtaken by a newer one stops drawing a frame nobody wants.\n */\nexport async function renderSettled(\n render: () => void,\n adapter: Pick<StorageAdapter, \"warmPendingDecodes\">,\n isCurrent: () => boolean,\n): Promise<SettleOutcome> {\n for (let pass = 0; pass < SETTLE_PASSES; pass++) {\n if (!isCurrent()) return \"superseded\";\n render();\n const warmed = await adapter.warmPendingDecodes();\n if (!warmed) return \"settled\";\n if (!isCurrent()) return \"superseded\";\n }\n return \"exhausted\";\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"state-evaluator.js","sourceRoot":"","sources":["../../src/runtime/state-evaluator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAC;AAWpF;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,cAAc;IAEgC;IADvD,iEAAiE;IACjE,YAAY,OAAwB,EAAmB,MAAoB,EAAE,KAAiB;QAAvC,WAAM,GAAN,MAAM,CAAc;QACvE,IAAI,CAAC,MAAM,GAAG,KAAK,KAAK,SAAS,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,KAAK,IAAI,IAAI,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QACvF,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC;IACtE,C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AE,IAAI,GAAG,EAAE,CAAC,CAAC;QACxC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC9B,QAAQ,CAAC,MAAM,EAAE,CAAC;QAClB,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAE/B,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1B,QAAQ,CAAC,MAAM,EAAE,CAAC;QAClB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;CACJ;AAED,SAAS,WAAW,CAAC,KAAsB;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,SAAS,CAAC,CAAkB,EAAE,CAAkB;IACrD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IACnE,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["import type { ProjectDocument, Track } from \"@/document/project\";\r\nimport { isAudioDocument } from \"@/document/types\";\r\nimport type { NodeEditorStates } from \"@/components/trees/node/node-editor-state\";\r\nimport type { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\r\nimport type { MeasureContext2D } from \"@/render/measure-context\";\r\nimport type { RenderPass2D } from \"@/render/render-context2d\";\r\nimport type { ClipInstance, RuntimeScope } from \"./clip-instance\";\r\nimport { ClipStore } from \"./clip-store\";\r\nimport { clipFrameToTime } from \"./frame-time\";\r\nimport { frameTime, placeTracks, spansCovering, type TrackSpan } from \"./placement\";\r\n\r\n/** One track, and the tree it was last evaluated on. */\r\ninterface Slot {\r\n track: Track;\r\n span: TrackSpan;\r\n instance: ClipInstance | null;\r\n /** The store's generation for the track when {@link instance} was last evaluated. */\r\n generation: number;\r\n}\r\n\r\n/**\r\n * Puts a project's tracks into the state for a frame, then lays out and draws\r\n * the ones covering it, back to front.\r\n *\r\n * Trees come from a {@link ClipStore}: a track's is built the first time it\r\n * covers a frame — or taken as discovery left it — and thereafter only asked for\r\n * times, so a seek costs the same in either direction and however far. The store\r\n * owns them; anything it does to one (a refinement, a patch, a rebuild) moves\r\n * its generation, and this evaluates again. Nothing isolates overlapping\r\n * tracks: they composite by draw order alone, which is what lets a translucent\r\n * track show the one beneath it.\r\n */\r\nexport class StateEvaluator {\r\n /** Without `store`, the evaluator builds into one of its own. */\r\n constructor(project: ProjectDocument, private readonly _scope: RuntimeScope, store?: ClipStore) {\r\n this._owned = store === undefined;\r\n this._store = store ?? new ClipStore(project, _scope, { assets: false, audio: false });\r\n this._slots = this._slotsFor(project.tracks, new Map());\r\n this._currentTrackId = firstVisual(this._slots)?.track.id ?? null;\r\n }\r\n\r\n /** The frame on screen. {@link invalidate} drops the memo, not the position. */\r\n get currentFrame(): number {\r\n return this._currentFrame;\r\n }\r\n\r\n /**\r\n * The topmost visual track on screen — or, over a hole, the last one there\r\n * was. An audio clip is a canvas drawing nothing, so it is never what an\r\n * editor picks from.\r\n */\r\n get currentTrackId(): string | null {\r\n return this._currentTrackId;\r\n }\r\n\r\n /** {@link currentTrackId}'s tree, once built. */\r\n get currentCanvas(): Canvas2D | null {\r\n return this.currentInstance?.canvas ?? null;\r\n }\r\n\r\n /** {@link currentTrackId}'s clip instance, once built. */\r\n get currentInstance(): ClipInstance | null {\r\n const slot = this._slotOf(this._currentTrackId);\r\n if (!slot?.instance) return null;\r\n return slot.instance === this._store.instanceOf(slot.track.id) ? slot.instance : null;\r\n }\r\n\r\n /** Every track on screen, back to front. Empty over a hole. */\r\n get activeTrackIds(): string[] {\r\n return this._active.map(slot => slot.track.id);\r\n }\r\n\r\n /** Put every track covering `frame` into its state, building any that never has been. */\r\n stateAt(frame: number): void {\r\n if (this._disposed) return;\r\n const target = Math.max(0, Math.floor(frame));\r\n const active = this._slotsToDraw(target);\r\n\r\n // Evaluation is idempotent, so a repeat would only cost. Compared by slot\r\n // rather than by count: a swap can change which tracks are on screen\r\n // without changing how many.\r\n if (!this._stale && target === this._currentFrame && sameSlots(active, this._active)\r\n && active.every(slot => this._settled(slot))) {\r\n return;\r\n }\r\n\r\n this._active = active;\r\n const topmost = firstVisual([...active].reverse());\r\n if (topmost) this._currentTrackId = topmost.track.id;\r\n\r\n for (const slot of active) slot.instance = this._store.ensureBuilt(slot.track.id);\r\n for (const slot of active) {\r\n if (!slot.instance) continue;\r\n this._evaluate(slot, target - slot.span.startFrame);\r\n slot.generation = this._store.generationOf(slot.track.id);\r\n }\r\n\r\n this._currentFrame = target;\r\n this._stale = false;\r\n }\r\n\r\n layout(measurer: MeasureContext2D = this._scope.measurer): void {\r\n for (const slot of this._active) this._live(slot)?.layout(measurer);\r\n }\r\n\r\n render(pass: RenderPass2D): void {\r\n for (const slot of this._active) this._live(slot)?.render(pass);\r\n }\r\n\r\n /** Evaluate the current frame afresh on the next {@link stateAt}. */\r\n invalidate(): void {\r\n this._stale = true;\r\n }\r\n\r\n /**\r\n * Throw a track's tree away so the next {@link stateAt} builds it fresh.\r\n *\r\n * The way back to what the document says for a node nothing animates: the\r\n * timeline restores only what its commands write, so a value written straight\r\n * onto a live prop — an editor's override — survives re-evaluation.\r\n */\r\n rebuild(trackId: string | null = this._currentTrackId): void {\r\n if (trackId === null) return;\r\n this._store.rebuild(trackId);\r\n this._stale = true;\r\n }\r\n\r\n /**\r\n * Take a new document. The store decides what each track keeps — see\r\n * {@link ClipStore.setProject}; a store shared with a precomp has already\r\n * taken it, and taking it twice is a no-op.\r\n */\r\n setProject(next: ProjectDocument): void {\r\n if (this._disposed) return;\r\n this._store.setProject(next);\r\n const prior = new Map(this._slots.map(slot => [slot.track.id, slot]));\r\n this._slots = this._slotsFor(next.tracks, prior);\r\n\r\n const kept = new Set(this._slots);\r\n for (const id of this._editorStates.keys()) {\r\n if (!this._slotOf(id)) this._editorStates.delete(id);\r\n }\r\n\r\n // Keep drawing what survived until the next evaluation: a repaint can land\r\n // in between, and an emptied set would paint a blank frame over an edit.\r\n this._active = this._active.filter(slot => kept.has(slot));\r\n if (!this._slotOf(this._currentTrackId)) {\r\n this._currentTrackId = firstVisual(this._slots)?.track.id ?? null;\r\n }\r\n this._stale = true;\r\n }\r\n\r\n /** Hidden/locked state for one track's nodes — editor state, not authored, so it rides beside the document. */\r\n setEditorStates(trackId: string, states: NodeEditorStates | undefined): void {\r\n if (states) this._editorStates.set(trackId, states);\r\n else this._editorStates.delete(trackId);\r\n this._stale = true;\r\n }\r\n\r\n dispose(): void {\r\n this._disposed = true;\r\n this._active = [];\r\n for (const slot of this._slots) slot.instance = null;\r\n if (this._owned) this._store.dispose();\r\n }\r\n\r\n private readonly _store: ClipStore;\r\n private readonly _owned: boolean;\r\n private _slots: Slot[];\r\n private _active: Slot[] = [];\r\n private _currentFrame = 0;\r\n private _currentTrackId: string | null;\r\n /** Kept apart from the frame, so \"evaluate again\" never reads as \"frame -1\". */\r\n private _stale = false;\r\n private _disposed = false;\r\n private readonly _editorStates = new Map<string, NodeEditorStates>();\r\n\r\n private _slotsFor(tracks: readonly Track[], prior: ReadonlyMap<string, Slot>): Slot[] {\r\n const spans = placeTracks(tracks, this._scope.fps);\r\n return tracks.map((track, i) => {\r\n const old = prior.get(track.id);\r\n if (old) {\r\n old.track = track;\r\n old.span = spans[i];\r\n return old;\r\n }\r\n return { track, span: spans[i], instance: null, generation: -1 };\r\n });\r\n }\r\n\r\n private _slotOf(trackId: string | null): Slot | undefined {\r\n return trackId === null ? undefined : this._slots.find(slot => slot.track.id === trackId);\r\n }\r\n\r\n /** Whether `slot` still holds the tree the store has, in the state it was evaluated to. */\r\n private _settled(slot: Slot): boolean {\r\n const id = slot.track.id;\r\n if (!slot.instance) return this._store.failed(id);\r\n return slot.instance === this._store.instanceOf(id) && slot.generation === this._store.generationOf(id);\r\n }\r\n\r\n /** `slot`'s tree while the store still holds it — a released one must not be drawn. */\r\n private _live(slot: Slot): ClipInstance | null {\r\n return slot.instance && slot.instance === this._store.instanceOf(slot.track.id) ? slot.instance : null;\r\n }\r\n\r\n /**\r\n * The slots to draw at `frame`, holding the final stack past the end of the\r\n * project — a frame parked beyond the last one keeps showing the picture —\r\n * while a gap in the middle is a real hole and draws nothing.\r\n */\r\n private _slotsToDraw(frame: number): Slot[] {\r\n const spans = this._slots.map(slot => slot.span);\r\n let covering = spansCovering(spans, frame);\r\n if (covering.length === 0) {\r\n const last = Math.max(-1, ...spans.map(span => span.endFrame));\r\n if (frame > last && last >= 0) covering = spansCovering(spans, last);\r\n }\r\n return covering.map(span => this._slots[span.index]);\r\n }\r\n\r\n /**\r\n * Put `slot` into the state for `localFrame`.\r\n *\r\n * The track runs on its own clock, so where it sits never changes what it\r\n * draws. The frame before is evaluated too and stamped as motion history:\r\n * motion is a property of the frame, not of the seek that reached it.\r\n */\r\n private _evaluate(slot: Slot, localFrame: number): void {\r\n const instance = slot.instance!;\r\n const dt = clipFrameToTime(1, this._scope.fps);\r\n // Clamped so a frame held past the end shows where the track stops — a\r\n // track can cut its clip short, and the clip goes on past the cut.\r\n const time = frameTime(localFrame, this._scope.fps, slot.track.duration);\r\n instance.attach(time, this._editorStates.get(slot.track.id));\r\n\r\n const previous = Math.max(0, time - dt);\r\n instance.evaluateAt(previous);\r\n instance.layout();\r\n instance.primeMotion(previous);\r\n\r\n instance.evaluateAt(time);\r\n instance.layout();\r\n instance.sample();\r\n }\r\n}\r\n\r\nfunction firstVisual(slots: readonly Slot[]): Slot | undefined {\r\n return slots.find(slot => !isAudioDocument(slot.track.clip));\r\n}\r\n\r\nfunction sameSlots(a: readonly Slot[], b: readonly Slot[]): boolean {\r\n if (a.length !== b.length) return false;\r\n for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\r\n return true;\r\n}\r\n"]}
1
+ {"version":3,"file":"state-evaluator.js","sourceRoot":"","sources":["../../src/runtime/state-evaluator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAC;AAWpF;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,cAAc;IAEgC;IADvD,iEAAiE;IACjE,YAAY,OAAwB,EAAmB,MAAoB,EAAE,KAAiB;QAAvC,WAAM,GAAN,MAAM,CAAc;QACvE,IAAI,CAAC,MAAM,GAAG,KAAK,KAAK,SAAS,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,KAAK,IAAI,IAAI,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QACvF,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC;IACtE,CAAC;IAED,gFAAgF;IAChF,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,iDAAiD;IACjD,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,eAAe,EAAE,MAAM,IAAI,IAAI,CAAC;IAChD,CAAC;IAED,0DAA0D;IAC1D,IAAI,eAAe;QACf,MAAM,IAAI,GAAG,I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SAAS,WAAW,CAAC,KAAsB;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,SAAS,CAAC,CAAkB,EAAE,CAAkB;IACrD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IACnE,OAAO,IAAI,CAAC;AAChB,CAAC","sourcesContent":["import type { ProjectDocument, Track } from \"@/document/project\";\nimport { isAudioDocument } from \"@/document/types\";\nimport type { NodeEditorStates } from \"@/components/trees/node/node-editor-state\";\nimport type { Canvas2D } from \"@/components/trees/root/canvas2d-node\";\nimport type { MeasureContext2D } from \"@/render/measure-context\";\nimport type { RenderPass2D } from \"@/render/render-context2d\";\nimport type { ClipInstance, RuntimeScope } from \"./clip-instance\";\nimport { ClipStore } from \"./clip-store\";\nimport { clipFrameToTime } from \"./frame-time\";\nimport { frameTime, placeTracks, spansCovering, type TrackSpan } from \"./placement\";\n\n/** One track, and the tree it was last evaluated on. */\ninterface Slot {\n track: Track;\n span: TrackSpan;\n instance: ClipInstance | null;\n /** The store's generation for the track when {@link instance} was last evaluated. */\n generation: number;\n}\n\n/**\n * Puts a project's tracks into the state for a frame, then lays out and draws\n * the ones covering it, back to front.\n *\n * Trees come from a {@link ClipStore}: a track's is built the first time it\n * covers a frame — or taken as discovery left it — and thereafter only asked for\n * times, so a seek costs the same in either direction and however far. The store\n * owns them; anything it does to one (a refinement, a patch, a rebuild) moves\n * its generation, and this evaluates again. Nothing isolates overlapping\n * tracks: they composite by draw order alone, which is what lets a translucent\n * track show the one beneath it.\n */\nexport class StateEvaluator {\n /** Without `store`, the evaluator builds into one of its own. */\n constructor(project: ProjectDocument, private readonly _scope: RuntimeScope, store?: ClipStore) {\n this._owned = store === undefined;\n this._store = store ?? new ClipStore(project, _scope, { assets: false, audio: false });\n this._slots = this._slotsFor(project.tracks, new Map());\n this._currentTrackId = firstVisual(this._slots)?.track.id ?? null;\n }\n\n /** The frame on screen. {@link invalidate} drops the memo, not the position. */\n get currentFrame(): number {\n return this._currentFrame;\n }\n\n /**\n * The topmost visual track on screen — or, over a hole, the last one there\n * was. An audio clip is a canvas drawing nothing, so it is never what an\n * editor picks from.\n */\n get currentTrackId(): string | null {\n return this._currentTrackId;\n }\n\n /** {@link currentTrackId}'s tree, once built. */\n get currentCanvas(): Canvas2D | null {\n return this.currentInstance?.canvas ?? null;\n }\n\n /** {@link currentTrackId}'s clip instance, once built. */\n get currentInstance(): ClipInstance | null {\n const slot = this._slotOf(this._currentTrackId);\n if (!slot?.instance) return null;\n return slot.instance === this._store.instanceOf(slot.track.id) ? slot.instance : null;\n }\n\n /** Every track on screen, back to front. Empty over a hole. */\n get activeTrackIds(): string[] {\n return this._active.map(slot => slot.track.id);\n }\n\n /** Put every track covering `frame` into its state, building any that never has been. */\n stateAt(frame: number): void {\n if (this._disposed) return;\n const target = Math.max(0, Math.floor(frame));\n const active = this._slotsToDraw(target);\n\n // Evaluation is idempotent, so a repeat would only cost. Compared by slot\n // rather than by count: a swap can change which tracks are on screen\n // without changing how many.\n if (!this._stale && target === this._currentFrame && sameSlots(active, this._active)\n && active.every(slot => this._settled(slot))) {\n return;\n }\n\n this._active = active;\n const topmost = firstVisual([...active].reverse());\n if (topmost) this._currentTrackId = topmost.track.id;\n\n for (const slot of active) slot.instance = this._store.ensureBuilt(slot.track.id);\n for (const slot of active) {\n if (!slot.instance) continue;\n this._evaluate(slot, target - slot.span.startFrame);\n slot.generation = this._store.generationOf(slot.track.id);\n }\n\n this._currentFrame = target;\n this._stale = false;\n }\n\n layout(measurer: MeasureContext2D = this._scope.measurer): void {\n for (const slot of this._active) this._live(slot)?.layout(measurer);\n }\n\n render(pass: RenderPass2D): void {\n for (const slot of this._active) this._live(slot)?.render(pass);\n }\n\n /** Evaluate the current frame afresh on the next {@link stateAt}. */\n invalidate(): void {\n this._stale = true;\n }\n\n /**\n * Throw a track's tree away so the next {@link stateAt} builds it fresh.\n *\n * The way back to what the document says for a node nothing animates: the\n * timeline restores only what its commands write, so a value written straight\n * onto a live prop — an editor's override — survives re-evaluation.\n */\n rebuild(trackId: string | null = this._currentTrackId): void {\n if (trackId === null) return;\n this._store.rebuild(trackId);\n this._stale = true;\n }\n\n /**\n * Take a new document. The store decides what each track keeps — see\n * {@link ClipStore.setProject}; a store shared with a precomp has already\n * taken it, and taking it twice is a no-op.\n */\n setProject(next: ProjectDocument): void {\n if (this._disposed) return;\n this._store.setProject(next);\n const prior = new Map(this._slots.map(slot => [slot.track.id, slot]));\n this._slots = this._slotsFor(next.tracks, prior);\n\n const kept = new Set(this._slots);\n for (const id of this._editorStates.keys()) {\n if (!this._slotOf(id)) this._editorStates.delete(id);\n }\n\n // Keep drawing what survived until the next evaluation: a repaint can land\n // in between, and an emptied set would paint a blank frame over an edit.\n this._active = this._active.filter(slot => kept.has(slot));\n if (!this._slotOf(this._currentTrackId)) {\n this._currentTrackId = firstVisual(this._slots)?.track.id ?? null;\n }\n this._stale = true;\n }\n\n /** Hidden/locked state for one track's nodes — editor state, not authored, so it rides beside the document. */\n setEditorStates(trackId: string, states: NodeEditorStates | undefined): void {\n if (states) this._editorStates.set(trackId, states);\n else this._editorStates.delete(trackId);\n this._stale = true;\n }\n\n dispose(): void {\n this._disposed = true;\n this._active = [];\n for (const slot of this._slots) slot.instance = null;\n if (this._owned) this._store.dispose();\n }\n\n private readonly _store: ClipStore;\n private readonly _owned: boolean;\n private _slots: Slot[];\n private _active: Slot[] = [];\n private _currentFrame = 0;\n private _currentTrackId: string | null;\n /** Kept apart from the frame, so \"evaluate again\" never reads as \"frame -1\". */\n private _stale = false;\n private _disposed = false;\n private readonly _editorStates = new Map<string, NodeEditorStates>();\n\n private _slotsFor(tracks: readonly Track[], prior: ReadonlyMap<string, Slot>): Slot[] {\n const spans = placeTracks(tracks, this._scope.fps);\n return tracks.map((track, i) => {\n const old = prior.get(track.id);\n if (old) {\n old.track = track;\n old.span = spans[i];\n return old;\n }\n return { track, span: spans[i], instance: null, generation: -1 };\n });\n }\n\n private _slotOf(trackId: string | null): Slot | undefined {\n return trackId === null ? undefined : this._slots.find(slot => slot.track.id === trackId);\n }\n\n /** Whether `slot` still holds the tree the store has, in the state it was evaluated to. */\n private _settled(slot: Slot): boolean {\n const id = slot.track.id;\n if (!slot.instance) return this._store.failed(id);\n return slot.instance === this._store.instanceOf(id) && slot.generation === this._store.generationOf(id);\n }\n\n /** `slot`'s tree while the store still holds it — a released one must not be drawn. */\n private _live(slot: Slot): ClipInstance | null {\n return slot.instance && slot.instance === this._store.instanceOf(slot.track.id) ? slot.instance : null;\n }\n\n /**\n * The slots to draw at `frame`, holding the final stack past the end of the\n * project — a frame parked beyond the last one keeps showing the picture —\n * while a gap in the middle is a real hole and draws nothing.\n */\n private _slotsToDraw(frame: number): Slot[] {\n const spans = this._slots.map(slot => slot.span);\n let covering = spansCovering(spans, frame);\n if (covering.length === 0) {\n const last = Math.max(-1, ...spans.map(span => span.endFrame));\n if (frame > last && last >= 0) covering = spansCovering(spans, last);\n }\n return covering.map(span => this._slots[span.index]);\n }\n\n /**\n * Put `slot` into the state for `localFrame`.\n *\n * The track runs on its own clock, so where it sits never changes what it\n * draws. The frame before is evaluated too and stamped as motion history:\n * motion is a property of the frame, not of the seek that reached it.\n */\n private _evaluate(slot: Slot, localFrame: number): void {\n const instance = slot.instance!;\n const dt = clipFrameToTime(1, this._scope.fps);\n // Clamped so a frame held past the end shows where the track stops — a\n // track can cut its clip short, and the clip goes on past the cut.\n const time = frameTime(localFrame, this._scope.fps, slot.track.duration);\n instance.attach(time, this._editorStates.get(slot.track.id));\n\n const previous = Math.max(0, time - dt);\n instance.evaluateAt(previous);\n instance.layout();\n instance.primeMotion(previous);\n\n instance.evaluateAt(time);\n instance.layout();\n instance.sample();\n }\n}\n\nfunction firstVisual(slots: readonly Slot[]): Slot | undefined {\n return slots.find(slot => !isAudioDocument(slot.track.clip));\n}\n\nfunction sameSlots(a: readonly Slot[], b: readonly Slot[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\n"]}
@@ -12,7 +12,7 @@ import { type TextBlockSource } from "../render/text-layout.js";
12
12
  * **Why the host draws it.** Anything approximating glyph positions outside the
13
13
  * shaper — a DOM input laid over the canvas, say — drifts from the render the
14
14
  * moment the font, the line height or the wrapping does, and CSS `line-height`
15
- * and Skia's height multiplier are not the same quantity to begin with. Handing
15
+ * and the renderer's height multiplier are not the same quantity to begin with. Handing
16
16
  * over the real slots means the rendered text stays the thing being edited.
17
17
  */
18
18
  export interface NodeTextLayout {
@@ -1 +1 @@
1
- {"version":3,"file":"text-geometry.js","sourceRoot":"","sources":["../../src/runtime/text-geometry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAwB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuD9C;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC1B,IAAY,EACZ,IAAY,EACZ,MAAuB;IAEvB,uCAAuC;IACvC,MAAM,KAAK,GAAG,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CA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E,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { Node2D } from \"@/components/trees/2d/node2d\";\r\nimport { Text } from \"@/components/builtins/text/text\";\r\nimport { textStateOf } from \"@/components/modules/text-layout\";\r\nimport { Vector2 } from \"@/attributes/layout/vector2\";\r\nimport { applyToPoint } from \"@/attributes/layout/matrix2d\";\r\nimport { caretCount, type TextBlockSource } from \"@/render/text-layout\";\r\nimport { renderMatrix } from \"./node-picking\";\r\n\r\n/**\r\n * Where a Text node's caret slots landed on screen — the measurement a host\r\n * needs to draw its own text cursor and selection over the rendered glyphs.\r\n *\r\n * **Space.** Viewport space, exactly as {@link NodeBox}: origin at the viewport\r\n * centre, y-up, viewport units, camera folded in. A caret and the selection box\r\n * around it therefore come out of the same walk and cannot disagree.\r\n *\r\n * **Why the host draws it.** Anything approximating glyph positions outside the\r\n * shaper — a DOM input laid over the canvas, say — drifts from the render the\r\n * moment the font, the line height or the wrapping does, and CSS `line-height`\r\n * and Skia's height multiplier are not the same quantity to begin with. Handing\r\n * over the real slots means the rendered text stays the thing being edited.\r\n */\r\nexport interface NodeTextLayout {\r\n /** Structural path of the node measured, as {@link NodeBox.path}. */\r\n path: string;\r\n /** The string the slots describe. */\r\n text: string;\r\n /**\r\n * Every caret slot, in offset order: `carets[i]` sits before character `i`,\r\n * and the last sits after the final character — so there are `text.length + 1`\r\n * of them, and a caret offset is always a valid index.\r\n *\r\n * Each is a *segment*, not a point, because a rotated node's cursor is a\r\n * rotated line: draw from `top` to `bottom`.\r\n */\r\n carets: TextCaret[];\r\n /**\r\n * Line ranges over caret offsets, for Home/End and vertical arrow keys. A\r\n * hard line break belongs to neither line, so `lines[n].end` and\r\n * `lines[n + 1].start` differ by one where the break is.\r\n */\r\n lines: { start: number; end: number }[];\r\n}\r\n\r\n/** One caret slot: the line an editor would draw for a cursor at this offset. */\r\nexport interface TextCaret {\r\n /** Character offset this slot sits before. */\r\n offset: number;\r\n /** Top and bottom of the cursor, viewport space. */\r\n top: Vector2;\r\n bottom: Vector2;\r\n}\r\n\r\n/** One line's worth of a selected range, as a quad in viewport space. */\r\nexport interface TextRangeQuad {\r\n topLeft: Vector2;\r\n topRight: Vector2;\r\n bottomRight: Vector2;\r\n bottomLeft: Vector2;\r\n}\r\n\r\n/**\r\n * Measure `node`'s caret slots in viewport space, or `null` when it has none to\r\n * report — not a {@link Text}, nothing shaped yet, or a shape the caret model\r\n * doesn't cover (see {@link RenderContext2D.layoutTextBlock}).\r\n *\r\n * The block-local layout comes from the backend, because that is where glyphs\r\n * are actually positioned; everything below is the same mapping\r\n * {@link nodeBox} applies to a node's corners.\r\n */\r\nexport function nodeTextLayout(\r\n node: Node2D,\r\n path: string,\r\n source: TextBlockSource,\r\n): NodeTextLayout | null {\r\n // A text's state is what it last drew.\r\n const state = node instanceof Text ? textStateOf(node) : null;\r\n if (!state) return null;\r\n const block = source.layoutTextBlock(state);\r\n if (!block) return null;\r\n\r\n const m = renderMatrix(node);\r\n // The block is laid out about the node's own origin — which is also where\r\n // `_localBounds` centres the box, and what `verticalAlign` offsets it from —\r\n // so a block-local offset is a node-local one, unshifted. Block coordinates are already canvas (y-down), which is\r\n // the space the matrix works in, so unlike `worldAnchors` (which takes y-up\r\n // corner offsets) only the *result* is flipped back to y-up viewport space.\r\n const at = (x: number, y: number): Vector2 => {\r\n const p = applyToPoint(m, { x, y });\r\n return { x: p.x, y: -p.y };\r\n };\r\n\r\n const carets: TextCaret[] = new Array(caretCount(block));\r\n const lines: { start: number; end: number }[] = [];\r\n for (const line of block.lines) {\r\n lines.push({ start: line.start, end: line.end });\r\n for (let i = 0; i < line.carets.length; i++) {\r\n const x = line.carets[i];\r\n carets[line.start + i] = {\r\n offset: line.start + i,\r\n top: at(x, line.top),\r\n bottom: at(x, line.bottom),\r\n };\r\n }\r\n }\r\n\r\n return { path, text: (node as unknown as { text: string }).text, carets, lines };\r\n}\r\n\r\n/**\r\n * The caret offset nearest `point` (viewport space) — what a click or a drag\r\n * over the rendered text should place the cursor at.\r\n *\r\n * Nearest *slot*, by distance to the caret segment rather than to its midpoint:\r\n * a click below a short first line should land on that line's nearest slot, and\r\n * midpoints would pull it toward whichever line's centre happened to be closer.\r\n * Segment distance also keeps this correct for rotated and scaled text without\r\n * needing a separate case, since the slots arrive already transformed.\r\n */\r\nexport function caretOffsetAt(layout: NodeTextLayout, point: Vector2): number {\r\n let best = 0;\r\n let bestDistance = Infinity;\r\n for (const caret of layout.carets) {\r\n const d = distanceToSegment(point, caret.top, caret.bottom);\r\n if (d < bestDistance) {\r\n bestDistance = d;\r\n best = caret.offset;\r\n }\r\n }\r\n return best;\r\n}\r\n\r\n/**\r\n * The quads covering `[start, end)`, one per line the range touches — what a\r\n * host fills to draw a selection highlight.\r\n *\r\n * Per line rather than one box for the whole range, because a range spanning a\r\n * line break covers two disjoint areas and a single enclosing box would paint\r\n * over the gap between them.\r\n */\r\nexport function caretRangeQuads(\r\n layout: NodeTextLayout,\r\n start: number,\r\n end: number,\r\n): TextRangeQuad[] {\r\n const from = Math.max(0, Math.min(start, end));\r\n const to = Math.min(layout.carets.length - 1, Math.max(start, end));\r\n const quads: TextRangeQuad[] = [];\r\n for (const line of layout.lines) {\r\n const a = Math.max(from, line.start);\r\n const b = Math.min(to, line.end);\r\n if (a >= b) continue; // empty on this line\r\n const left = layout.carets[a];\r\n const right = layout.carets[b];\r\n quads.push({\r\n topLeft: left.top,\r\n topRight: right.top,\r\n bottomRight: right.bottom,\r\n bottomLeft: left.bottom,\r\n });\r\n }\r\n return quads;\r\n}\r\n\r\n/** Distance from `p` to the segment `a`–`b`. */\r\nfunction distanceToSegment(p: Vector2, a: Vector2, b: Vector2): number {\r\n const dx = b.x - a.x;\r\n const dy = b.y - a.y;\r\n const lengthSq = dx * dx + dy * dy;\r\n // A degenerate segment (a zero-height line box) is just a point.\r\n const t = lengthSq === 0\r\n ? 0\r\n : Math.max(0, Math.min(1, ((p.x - a.x) * dx + (p.y - a.y) * dy) / lengthSq));\r\n return Math.hypot(p.x - (a.x + t * dx), p.y - (a.y + t * dy));\r\n}\r\n"]}
1
+ {"version":3,"file":"text-geometry.js","sourceRoot":"","sources":["../../src/runtime/text-geometry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAwB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuD9C;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC1B,IAAY,EACZ,IAAY,EACZ,MAAuB;IAEvB,uCAAuC;IACvC,MAAM,KAAK,GAAG,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAC7B,0EAA0E;IAC1E,6EAA6E;IAC7E,kHAAkH;IAClH,4EAA4E;IAC5E,4EAA4E;IAC5E,MAAM,EAAE,GAAG,CAAC,CAAS,EAAE,CAAS,EAAW,EAAE;QACzC,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACpC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,CAAC,CAAC;I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,CAAU,EAAE,CAAU;IACzD,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACnC,iEAAiE;IACjE,MAAM,CAAC,GAAG,QAAQ,KAAK,CAAC;QACpB,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IACjF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { Node2D } from \"@/components/trees/2d/node2d\";\nimport { Text } from \"@/components/builtins/text/text\";\nimport { textStateOf } from \"@/components/modules/text-layout\";\nimport { Vector2 } from \"@/attributes/layout/vector2\";\nimport { applyToPoint } from \"@/attributes/layout/matrix2d\";\nimport { caretCount, type TextBlockSource } from \"@/render/text-layout\";\nimport { renderMatrix } from \"./node-picking\";\n\n/**\n * Where a Text node's caret slots landed on screen — the measurement a host\n * needs to draw its own text cursor and selection over the rendered glyphs.\n *\n * **Space.** Viewport space, exactly as {@link NodeBox}: origin at the viewport\n * centre, y-up, viewport units, camera folded in. A caret and the selection box\n * around it therefore come out of the same walk and cannot disagree.\n *\n * **Why the host draws it.** Anything approximating glyph positions outside the\n * shaper — a DOM input laid over the canvas, say — drifts from the render the\n * moment the font, the line height or the wrapping does, and CSS `line-height`\n * and the renderer's height multiplier are not the same quantity to begin with. Handing\n * over the real slots means the rendered text stays the thing being edited.\n */\nexport interface NodeTextLayout {\n /** Structural path of the node measured, as {@link NodeBox.path}. */\n path: string;\n /** The string the slots describe. */\n text: string;\n /**\n * Every caret slot, in offset order: `carets[i]` sits before character `i`,\n * and the last sits after the final character — so there are `text.length + 1`\n * of them, and a caret offset is always a valid index.\n *\n * Each is a *segment*, not a point, because a rotated node's cursor is a\n * rotated line: draw from `top` to `bottom`.\n */\n carets: TextCaret[];\n /**\n * Line ranges over caret offsets, for Home/End and vertical arrow keys. A\n * hard line break belongs to neither line, so `lines[n].end` and\n * `lines[n + 1].start` differ by one where the break is.\n */\n lines: { start: number; end: number }[];\n}\n\n/** One caret slot: the line an editor would draw for a cursor at this offset. */\nexport interface TextCaret {\n /** Character offset this slot sits before. */\n offset: number;\n /** Top and bottom of the cursor, viewport space. */\n top: Vector2;\n bottom: Vector2;\n}\n\n/** One line's worth of a selected range, as a quad in viewport space. */\nexport interface TextRangeQuad {\n topLeft: Vector2;\n topRight: Vector2;\n bottomRight: Vector2;\n bottomLeft: Vector2;\n}\n\n/**\n * Measure `node`'s caret slots in viewport space, or `null` when it has none to\n * report — not a {@link Text}, nothing shaped yet, or a shape the caret model\n * doesn't cover (see {@link RenderContext2D.layoutTextBlock}).\n *\n * The block-local layout comes from the backend, because that is where glyphs\n * are actually positioned; everything below is the same mapping\n * {@link nodeBox} applies to a node's corners.\n */\nexport function nodeTextLayout(\n node: Node2D,\n path: string,\n source: TextBlockSource,\n): NodeTextLayout | null {\n // A text's state is what it last drew.\n const state = node instanceof Text ? textStateOf(node) : null;\n if (!state) return null;\n const block = source.layoutTextBlock(state);\n if (!block) return null;\n\n const m = renderMatrix(node);\n // The block is laid out about the node's own origin — which is also where\n // `_localBounds` centres the box, and what `verticalAlign` offsets it from —\n // so a block-local offset is a node-local one, unshifted. Block coordinates are already canvas (y-down), which is\n // the space the matrix works in, so unlike `worldAnchors` (which takes y-up\n // corner offsets) only the *result* is flipped back to y-up viewport space.\n const at = (x: number, y: number): Vector2 => {\n const p = applyToPoint(m, { x, y });\n return { x: p.x, y: -p.y };\n };\n\n const carets: TextCaret[] = new Array(caretCount(block));\n const lines: { start: number; end: number }[] = [];\n for (const line of block.lines) {\n lines.push({ start: line.start, end: line.end });\n for (let i = 0; i < line.carets.length; i++) {\n const x = line.carets[i];\n carets[line.start + i] = {\n offset: line.start + i,\n top: at(x, line.top),\n bottom: at(x, line.bottom),\n };\n }\n }\n\n return { path, text: (node as unknown as { text: string }).text, carets, lines };\n}\n\n/**\n * The caret offset nearest `point` (viewport space) — what a click or a drag\n * over the rendered text should place the cursor at.\n *\n * Nearest *slot*, by distance to the caret segment rather than to its midpoint:\n * a click below a short first line should land on that line's nearest slot, and\n * midpoints would pull it toward whichever line's centre happened to be closer.\n * Segment distance also keeps this correct for rotated and scaled text without\n * needing a separate case, since the slots arrive already transformed.\n */\nexport function caretOffsetAt(layout: NodeTextLayout, point: Vector2): number {\n let best = 0;\n let bestDistance = Infinity;\n for (const caret of layout.carets) {\n const d = distanceToSegment(point, caret.top, caret.bottom);\n if (d < bestDistance) {\n bestDistance = d;\n best = caret.offset;\n }\n }\n return best;\n}\n\n/**\n * The quads covering `[start, end)`, one per line the range touches — what a\n * host fills to draw a selection highlight.\n *\n * Per line rather than one box for the whole range, because a range spanning a\n * line break covers two disjoint areas and a single enclosing box would paint\n * over the gap between them.\n */\nexport function caretRangeQuads(\n layout: NodeTextLayout,\n start: number,\n end: number,\n): TextRangeQuad[] {\n const from = Math.max(0, Math.min(start, end));\n const to = Math.min(layout.carets.length - 1, Math.max(start, end));\n const quads: TextRangeQuad[] = [];\n for (const line of layout.lines) {\n const a = Math.max(from, line.start);\n const b = Math.min(to, line.end);\n if (a >= b) continue; // empty on this line\n const left = layout.carets[a];\n const right = layout.carets[b];\n quads.push({\n topLeft: left.top,\n topRight: right.top,\n bottomRight: right.bottom,\n bottomLeft: left.bottom,\n });\n }\n return quads;\n}\n\n/** Distance from `p` to the segment `a`–`b`. */\nfunction distanceToSegment(p: Vector2, a: Vector2, b: Vector2): number {\n const dx = b.x - a.x;\n const dy = b.y - a.y;\n const lengthSq = dx * dx + dy * dy;\n // A degenerate segment (a zero-height line box) is just a point.\n const t = lengthSq === 0\n ? 0\n : Math.max(0, Math.min(1, ((p.x - a.x) * dx + (p.y - a.y) * dy) / lengthSq));\n return Math.hypot(p.x - (a.x + t * dx), p.y - (a.y + t * dy));\n}\n"]}
@@ -7,9 +7,9 @@ export type { Theme, ColorTokens, Typography, TypographyPreset, } from '../proje
7
7
  export type { NodeTime, AttachScope } from '../components/trees/index.js';
8
8
  export type { BoxBounds, Extents } from '../layout/index.js';
9
9
  export type { ImageMeta, VideoMeta, AudioMeta, FontMeta, AssetMeta, AssetManifest, } from '../assets/index.js';
10
- export { validateDocument, assertValidDocument, Registry, } from '../document/index.js';
10
+ export { validateDocument, assertValidDocument, DOCUMENT_FORMAT_VERSION, DocumentTooNewError, documentFormatVersion, migrateDocument, migrateNodeProps, missingNodeOf, Registry, } from '../document/index.js';
11
11
  export { normalizeShaderPack, resolveShaderProperties, isKnownShaderProperty, } from '../attributes/index.js';
12
- export type { RegistryOptions, NodeTypeMap, ShaderPackMap, NodeTypeRecord, NodeCommandEntry, VisualDocument, ClipDocument, StillDocument, CompositionDocument, AudioDocument, NodeSpec, TimedNodeSpec, NodeSpan, CommandSpec, EaseSpec, LoopSpec, LoopDirection, VariableSpec, ValidationIssue, ValidationResult, NodeConstructor, CommandFactory, CommandTypeEntry, VariableCommandFactory, VariableLerp, VariableTarget, } from '../document/index.js';
12
+ export type { RegistryOptions, NodeTypeMap, ShaderPackMap, NodeTypeRecord, NodeCommandEntry, VisualDocument, ClipDocument, StillDocument, CompositionDocument, AudioDocument, NodeSpec, TimedNodeSpec, NodeSpan, CommandSpec, EaseSpec, LoopSpec, LoopDirection, VariableSpec, ValidationIssue, ValidationResult, ValidateOptions, DocumentChange, DocumentMigrationResult, PropMigration, PropNote, MissingNodeInfo, NodeConstructor, CommandFactory, CommandTypeEntry, VariableCommandFactory, VariableLerp, VariableTarget, } from '../document/index.js';
13
13
  export type { Shader, FillShader, EffectShader, ShaderProperty, KnownShaderProperty, ShaderPropertyValues, } from '../attributes/index.js';
14
14
  export { expressionOps, ExpressionError } from '../document/index.js';
15
15
  export type { ParsedExpression, ExpressionNode, ExpressionDialect, VariableResolver, } from '../document/index.js';
@@ -49,10 +49,10 @@ export { Video } from '../components/builtins/media/media.js';
49
49
  export type { VideoProps, VideoSegment, } from '../components/builtins/media/media.js';
50
50
  export type { NodeAudio } from '../components/trees/index.js';
51
51
  export { AudioBus, SoundNode } from '../components/builtins/audio/audio.js';
52
- export { Sound, AudioFilters, ramp, hold, fadeIn, fadeOut, isCurve, } from '../attributes/index.js';
52
+ export { Sound, AudioEffects, ramp, hold, isRamp, } from '../attributes/index.js';
53
53
  export type { NodeAudioProps, } from '../components/trees/index.js';
54
54
  export type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio.js';
55
- export type { SoundProps, AudioRequest, AudioBusStop, AudioFilter, Param, Curve, } from '../attributes/index.js';
55
+ export type { SoundProps, AudioRequest, AudioBusStop, AudioEffect, AudioEffectsInput, AudioTransition, Param, Ramp, RampKey, } from '../attributes/index.js';
56
56
  export { Canvas3D } from '../components/builtins/three/canvas3d.js';
57
57
  export type { Node3D } from '../components/trees/index.js';
58
58
  export { Group3D, Mesh3D, Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D, Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D, Instances3D, Points3D, Line3D, Sprite3D, Model3D, AmbientLight3D, HemisphereLight3D, DirectionalLight3D, PointLight3D, SpotLight3D, AreaLight3D, Camera3D, Fog3D, Environment3D, } from '../components/builtins/three/three.js';
@@ -65,7 +65,7 @@ export { Graphics2D, PathBuilder, Clip, toPathString, } from '../render/index.js
65
65
  export type { RenderContext2D, RenderPass2D, MeasureContext2D, TextBlockSource, GraphicsOp, PathData, PathCommand, PathBounds, EllipseArc, } from '../render/index.js';
66
66
  export type { AssetScope, LoaderFn } from '../assets/index.js';
67
67
  export { Fills, parseColor, resolveFill, fillOps, colorOps, } from '../attributes/index.js';
68
- export type { Fill, FillChain, FillOptions, VideoFillOptions, MediaPlacementOptions, ImageFit, ImageCrop, ImageMatrix, FillResolved, ShaderFillProp, ShaderFillResolved, ShaderFillCoords, ShaderTexture, SkSLUniformRecord, FractalNoiseBasis, Color, NormalizedColor, BlendMode, FillSpace, } from '../attributes/index.js';
68
+ export type { Fill, FillChain, FillOptions, VideoFillOptions, MediaPlacementOptions, ImageFit, ImageCrop, ImageMatrix, FillResolved, ShaderFillProp, ShaderFillResolved, ShaderTexture, ShaderUniformRecord, FractalNoiseBasis, Color, NormalizedColor, BlendMode, FillSpace, } from '../attributes/index.js';
69
69
  export { resolveStroke, strokeOps, resolveShadow, shadowOps, resolveCorners, cornerRadiusOps, cornerStyleOps, pathOps, } from '../attributes/index.js';
70
70
  export type { PathSampler, PathAnchor, PathSubpath, VectorPath, Stroke, StrokeProp, StrokeAlign, StrokeCap, StrokeMarker, StrokeEnd, StrokeJoin, StrokeResolved, Shadow, ShadowProp, ShadowResolved, Corners, CornerStyle, CornerStyleResolved, CornerRadiusResolved, RectCornerRadius, RectCornerStyle, NodeEffect, } from '../attributes/index.js';
71
71
  export { lerpVector2, sizeInputOps, insetsOps, alignmentOps, } from '../attributes/index.js';
@@ -74,6 +74,8 @@ export type { Vector2, Size2D, Insets, InsetsProps, InsetsResolved, AlignmentKey
74
74
  export type { FlowMode, GapSize, FlowResolved, FlowProps, FlowSettings, LayoutItem, FlowSpace, FlowMeasure, FlowLine, SizeConstraints, } from '../layout/index.js';
75
75
  export { space3dOps } from '../attributes/layout/space3d.js';
76
76
  export type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d.js';
77
+ export { describeEffect, effectDescriptors } from '../attributes/index.js';
78
+ export type { EffectDescriptor, EffectParamDescriptor, EffectParamKind, EffectParamUnit, EffectParamControl, EffectGroup, EffectJson, } from '../attributes/index.js';
77
79
  export { Effects, EffectChain, Adjustments, VideoAdjustments, AdjustmentChain, VideoAdjustmentChain,
78
80
  /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */
79
81
  ImageFilters,
@@ -99,7 +101,7 @@ export type { BlurOptions, DirectionalBlurOptions, GrayscaleOptions, PixelateOpt
99
101
  */
100
102
  export type { BlurFilterOptions, GrayscaleFilterOptions, AlphaFilterOptions, ExposureFilterOptions, ColorMatrixFilterOptions, CurvesFilterOptions, ColorAdjustmentFilterOptions, PosterizeTimeFilterOptions, VideoEchoFilterOptions, } from '../attributes/index.js';
101
103
  /** Effect data types, for naming an effect value or building one by hand. */
102
- export type { BlurEffect, DirectionalBlurEffect, GrayscaleEffect, PixelateEffect, BulgeEffect, MagnifyEffect, BloomEffect, VintageEffect, ChromaticAberrationEffect, InvertEffect, InvertChannel, ScatterEffect, PosterizeEffect, MotionBlurEffect, MotionBlurAlignment, ShaderEffect, SkSLUniform, SkSLUniformValue, OutlineEffect, OutlinePosition, VignetteEffect, GrainEffect, SharpenEffect, EdgesEffect, EdgeKernel, ThresholdEffect, RadialBlurEffect, RadialBlurStyle, HalftoneEffect, HalftoneShape, HalftoneSeparation, DitherEffect, DitherMatrix, DuotoneEffect, CurvesEffect, ColorAdjustmentEffect, RgbShiftEffect, ScanlinesEffect, BlockDisplaceEffect, BitCrushEffect, BitCrushPalette, AsciiEffect, AsciiCharset, StreakEffect, GlowEffect, GlowChannel, GlowLoopStyle, GlowOriginal, GlowTint, OilPaintEffect, WaveEffect, WaveShape, TwirlEffect, ProgressiveBlurEffect, ProgressiveBlurShape, KaleidoscopeEffect, GlassEffect, LutEffect, } from '../attributes/index.js';
104
+ export type { BlurEffect, DirectionalBlurEffect, GrayscaleEffect, PixelateEffect, BulgeEffect, MagnifyEffect, BloomEffect, VintageEffect, ChromaticAberrationEffect, InvertEffect, InvertChannel, ScatterEffect, PosterizeEffect, MotionBlurEffect, MotionBlurAlignment, ShaderEffect, ShaderUniform, ShaderUniformValue, OutlineEffect, OutlinePosition, VignetteEffect, GrainEffect, SharpenEffect, EdgesEffect, EdgeKernel, ThresholdEffect, RadialBlurEffect, RadialBlurStyle, HalftoneEffect, HalftoneShape, HalftoneSeparation, DitherEffect, DitherMatrix, DuotoneEffect, CurvesEffect, ColorAdjustmentEffect, RgbShiftEffect, ScanlinesEffect, BlockDisplaceEffect, BitCrushEffect, BitCrushPalette, AsciiEffect, AsciiCharset, StreakEffect, GlowEffect, GlowChannel, GlowLoopStyle, GlowOriginal, GlowTint, OilPaintEffect, WaveEffect, WaveShape, TwirlEffect, ProgressiveBlurEffect, ProgressiveBlurShape, KaleidoscopeEffect, GlassEffect, LutEffect, } from '../attributes/index.js';
103
105
  export { lerpNumber, } from '../tween/index.js';
104
106
  export type { AnimationTarget, Steppable, TweenStepper, LerpFunction, TweenOptions, } from '../tween/index.js';
105
107
  export { getCommandMeta, isCommand, makeCommand, commandSequence, commandParallel, loopCommand, } from '../tween/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD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,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAKlF,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAClB,YAAY,EACR,cAAc,EACd,UAAU,EACV,YAAY,EACf,MAAM,UAAU,CAAC;AAKlB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,eAAe,GAClB,MAAM,SAAS,CAAC;AAejB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChG,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,OAAO,EACP,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC;AACpB,gEAAgE;AAChE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAKrB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P,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC;AACpB,gEAAgE;AAChE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/sdk/index.js CHANGED
@@ -30,6 +30,9 @@ export { placeTracks } from '../runtime/placement.js';
30
30
  // what happens to them over time.
31
31
  // =============================================================
32
32
  export { validateDocument, assertValidDocument,
33
+ // Saved documents carry the format they were written in; these bring one
34
+ // forward, and a host rewriting stored node rows calls `migrateNodeProps`.
35
+ DOCUMENT_FORMAT_VERSION, DocumentTooNewError, documentFormatVersion, migrateDocument, migrateNodeProps, missingNodeOf,
33
36
  // The code half of the model, as one object an engine owns. Not a
34
37
  // singleton: what a document can name is a property of the registry
35
38
  // compiling it, so two engines in one process disagree freely.
@@ -47,8 +50,7 @@ export { expressionOps, ExpressionError } from '../document/index.js';
47
50
  // A component is one object literal: `key`, `state`, `commands`, `children`
48
51
  // and its tree's own fields (`measure`/`layout`/`render` for 2D). Behaviour is
49
52
  // spread in from modules (`...Paint.state`, `...Paint.commands`) and their
50
- // helpers called (`Paint.draw`, `Flow.measure`). See
51
- // `experiments/component-syntax/README.md`.
53
+ // helpers called (`Paint.draw`, `Flow.measure`). See `packages/core/docs/why.md#node-types-are-factory-specs-not-decorated-classes`.
52
54
  // =============================================================
53
55
  export { component2d } from '../components/factory/component2d.js';
54
56
  export { componentAudio } from '../components/factory/component-audio.js';
@@ -98,7 +100,7 @@ export { textOps } from '../attributes/index.js';
98
100
  // =============================================================
99
101
  export { Video } from '../components/builtins/media/media.js';
100
102
  export { AudioBus, SoundNode } from '../components/builtins/audio/audio.js';
101
- export { Sound, AudioFilters, ramp, hold, fadeIn, fadeOut, isCurve, } from '../attributes/index.js';
103
+ export { Sound, AudioEffects, ramp, hold, isRamp, } from '../attributes/index.js';
102
104
  // =============================================================
103
105
  // 3D — the Canvas3D node and the Graphics3D API
104
106
  // =============================================================
@@ -147,7 +149,12 @@ export { flowOps } from '../layout/index.js';
147
149
  export { space3dOps } from '../attributes/layout/space3d.js';
148
150
  // =============================================================
149
151
  // Effects & Media Adjustments
152
+ //
153
+ // `describeEffect` / `effectDescriptors` describe each built-in effect's
154
+ // fields (kind, default, range, unit, inspector hints) as plain JSON, so a
155
+ // host builds its effect UI from the engine rather than a copy of it.
150
156
  // =============================================================
157
+ export { describeEffect, effectDescriptors } from '../attributes/index.js';
151
158
  export { Effects, EffectChain, Adjustments, VideoAdjustments, AdjustmentChain, VideoAdjustmentChain,
152
159
  /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */
153
160
  ImageFilters,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,oCAAoC;AAEpC,gEAAgE;AAChE,UAAU;AACV,EAAE;AACF,4EAA4E;AAC5E,yEAAyE;AACzE,iFAAiF;AACjF,iFAAiF;AACjF,sDAAsD;AACtD,gEAAgE;AAChE,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AAKrB,iFAAiF;AACjF,4EAA4E;AAC5E,0EAA0E;AAC1E,0DAA0D;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA2BnD,gEAAgE;AAChE,oBAAoB;AACpB,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,+EAA+E;AAC/E,kCAAkC;AAClC,gEAAgE;AAChE,OAAO,EACH,gBAAgB,EAChB,mBA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gEAAgE;AAChE,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,2EAA2E;AAC3E,2EAA2E;AAC3E,0CAA0C;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface published as `@motionscript/sdk` (packages/sdk) and,\r\n// via this file, as `@motionscript/core/sdk`. A deliberate SUBSET of core's own\r\n// root barrel (`../index.ts`): no `Engine`/`Session`/platform seams, no\r\n// `@internal`-tagged descriptor plumbing. Every export here is named, traced to\r\n// its real declaring sub-barrel — never a wildcard — so nothing internal leaks\r\n// by accident. Keep this in lockstep with `packages/sdk/src/index.ts`, which\r\n// mirrors this exact named surface.\r\n\r\n// =============================================================\r\n// Project\r\n//\r\n// A clip is **data**: a still is nodes and props, a composition is the same\r\n// nodes placed in time plus the commands that animate them, and an audio\r\n// document is that one tree over. A **project** is one list of tracks over those\r\n// clips, and it is what the runtime plays — a lone still or composition is sugar\r\n// for a project with one track (`asProjectDocument`).\r\n// =============================================================\r\nexport {\r\n isProjectDocument,\r\n asProjectDocument,\r\n documentDuration,\r\n commandSpan,\r\n hasTimeline,\r\n nodeSpan,\r\n effectiveSpan,\r\n untimed,\r\n ROOT_NODE_ID,\r\n} from '../document';\r\nexport type {\r\n ProjectDocument,\r\n Track,\r\n} from '../document';\r\n// `resolveProjectDocument`/`placeTracks` genuinely live in `../runtime` (session\r\n// resolution and track placement are runtime concerns) — deep-imported from\r\n// their concrete files rather than the runtime barrel, which also carries\r\n// `Engine`/`Session` and is never a source for this file.\r\nexport { resolveProjectDocument } from '../runtime/session';\r\nexport { placeTracks } from '../runtime/placement';\r\nexport type { TrackSpan } from '../runtime/placement';\r\nexport type {\r\n Theme,\r\n ColorTokens,\r\n Typography,\r\n TypographyPreset,\r\n} from '../project';\r\nexport type { NodeTime, AttachScope } from '../components/trees';\r\nexport type { BoxBounds, Extents } from '../layout';\r\n\r\n// =============================================================\r\n// Assets\r\n//\r\n// The manifest a host builds a scene against — what images, video, audio and\r\n// fonts it references, resolved before render. An `Engine`'s manifest and\r\n// `@motionscript/headless`'s asset options both take this shape.\r\n// =============================================================\r\nexport type {\r\n ImageMeta,\r\n VideoMeta,\r\n AudioMeta,\r\n FontMeta,\r\n AssetMeta,\r\n AssetManifest,\r\n} from '../assets';\r\n\r\n// =============================================================\r\n// The clip document\r\n//\r\n// The data half of the model. Node types are code — a component registered\r\n// under its key, which is also where a custom node joins the system — and\r\n// everything else is plain JSON: which nodes exist, what props they carry, and\r\n// what happens to them over time.\r\n// =============================================================\r\nexport {\r\n validateDocument,\r\n assertValidDocument,\r\n // The code half of the model, as one object an engine owns. Not a\r\n // singleton: what a document can name is a property of the registry\r\n // compiling it, so two engines in one process disagree freely.\r\n Registry,\r\n} from '../document';\r\n// The shader-pack vocabulary lives beside the rest of the fill/shader attribute\r\n// machinery, not in `../document`.\r\nexport {\r\n normalizeShaderPack,\r\n resolveShaderProperties,\r\n isKnownShaderProperty,\r\n} from '../attributes';\r\nexport type {\r\n RegistryOptions,\r\n NodeTypeMap,\r\n ShaderPackMap,\r\n NodeTypeRecord,\r\n NodeCommandEntry,\r\n VisualDocument,\r\n ClipDocument,\r\n StillDocument,\r\n CompositionDocument,\r\n AudioDocument,\r\n NodeSpec,\r\n TimedNodeSpec,\r\n NodeSpan,\r\n CommandSpec,\r\n EaseSpec,\r\n LoopSpec,\r\n LoopDirection,\r\n VariableSpec,\r\n ValidationIssue,\r\n ValidationResult,\r\n NodeConstructor,\r\n CommandFactory,\r\n CommandTypeEntry,\r\n VariableCommandFactory,\r\n VariableLerp,\r\n VariableTarget,\r\n} from '../document';\r\nexport type {\r\n Shader,\r\n FillShader,\r\n EffectShader,\r\n ShaderProperty,\r\n KnownShaderProperty,\r\n ShaderPropertyValues,\r\n} from '../attributes';\r\n\r\n// Expressions: the string form of a prop that follows a variable — `\"=4[g]+3\"`.\r\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint,\r\n// complete or rewrite one without reimplementing the grammar.\r\nexport { expressionOps, ExpressionError } from '../document';\r\nexport type {\r\n ParsedExpression,\r\n ExpressionNode,\r\n ExpressionDialect,\r\n VariableResolver,\r\n} from '../document';\r\n\r\n// =============================================================\r\n// Components — the factories a node type is written with\r\n//\r\n// A component is one object literal: `key`, `state`, `commands`, `children`\r\n// and its tree's own fields (`measure`/`layout`/`render` for 2D). Behaviour is\r\n// spread in from modules (`...Paint.state`, `...Paint.commands`) and their\r\n// helpers called (`Paint.draw`, `Flow.measure`). See\r\n// `experiments/component-syntax/README.md`.\r\n// =============================================================\r\nexport { component2d } from '../components/factory/component2d';\r\nexport { componentAudio } from '../components/factory/component-audio';\r\nexport { component3d } from '../components/factory/component3d';\r\nexport { commandsFor } from '../components/factory/commands-for';\r\nexport { Types } from '../components/factory/types';\r\nexport { provides } from '../components/factory/api';\r\nexport * as Paint from '../components/modules/paint';\r\nexport * as Flow from '../components/modules/flow';\r\nexport * as Shapes from '../components/modules/shapes';\r\nexport * as Aim from '../components/modules/aim';\r\n// The face text is set in: its entries inherit from the nearest provider.\r\nexport * as Typeface from '../components/modules/text-style';\r\nexport * as TextLayout from '../components/modules/text-layout';\r\n// A mesh's surface: the material entries, and the mesh drawn with them.\r\nexport * as Material from '../components/modules/material';\r\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\r\nexport * as View3D from '../components/modules/view3d';\r\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types';\r\nexport type {\r\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\r\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\r\n Timeline, Type, Values, Writes,\r\n // Named in every component's type, so a package exporting one can declare it.\r\n Merge, BuiltNode,\r\n // What `render` is handed; `RenderContext2D` is the renderer's.\r\n RenderContext2D as RenderContext,\r\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\r\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\r\n RenderContext3D as SceneContext,\r\n} from '../components/factory/api';\r\n\r\n// =============================================================\r\n// Nodes — what code holding a built node names it as\r\n//\r\n// `Node` is dimension-agnostic (tree, props, tweens, context, clock); `Node2D`\r\n// adds layout and 2D drawing; `Node3D` and `NodeAudio` are the other trees.\r\n// Types only: a node type is a component, never a subclass.\r\n// =============================================================\r\nexport type { Node, Node2D } from '../components/trees';\r\nexport {\r\n // A clip's root container: layout frame, background paint and camera in\r\n // one node. Every track builds into one sized to the viewport.\r\n Canvas2D,\r\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\r\n findNode2D,\r\n frameIn,\r\n} from '../components/trees';\r\nexport { Provider, ThemeProvider } from '../components/builtins/providers/providers';\r\nexport type {\r\n NodeProps,\r\n Node2DProps,\r\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\r\n ChildPlacement,\r\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\r\n ChildPlane,\r\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\r\n NodeHandle,\r\n Canvas2DProps,\r\n NodeConfig,\r\n NodeChildren,\r\n NodeDimension,\r\n} from '../components/trees';\r\nexport type { ProviderProps, ThemeProviderProps } from '../components/builtins/providers/providers';\r\n\r\n// =============================================================\r\n// Nodes — Geometry\r\n// =============================================================\r\nexport {\r\n Rect,\r\n Ellipse,\r\n Path,\r\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\r\n // where `Path` draws its `d` at face value.\r\n PathShape,\r\n Polygon,\r\n Polygram,\r\n Triangle,\r\n RightTriangle,\r\n Pentagon,\r\n Hexagon,\r\n Octagon,\r\n Star,\r\n} from '../components/builtins/geometry/geometry';\r\nexport { BooleanGroup, MaskGroup } from '../components/builtins/geometry/composite';\r\nexport type {\r\n PaintProps,\r\n ShapeProps,\r\n RectProps,\r\n FlexSize,\r\n EllipseProps,\r\n PathProps,\r\n PathShapeProps,\r\n PolygonProps,\r\n PolygramProps,\r\n} from '../components/builtins/geometry/geometry';\r\nexport type { BooleanGroupProps, MaskGroupProps } from '../components/builtins/geometry/composite';\r\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\r\n// not node-prop types.\r\nexport type {\r\n BooleanOperation,\r\n MaskMode,\r\n MaskOptions,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Layout\r\n// =============================================================\r\nexport {\r\n Camera,\r\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\r\n OrbitCamera,\r\n RotatedBox,\r\n} from '../components/builtins/layout/layout';\r\nexport type {\r\n CameraProps,\r\n OrbitCameraProps,\r\n} from '../components/builtins/layout/layout';\r\n\r\n// =============================================================\r\n// Nodes — Text\r\n// =============================================================\r\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../components/builtins/text/text';\r\nexport type {\r\n TextProps,\r\n RichTextProps,\r\n NumberProps,\r\n NumberFormat,\r\n DefaultTextStyleProps,\r\n} from '../components/builtins/text/text';\r\nexport { textOps } from '../attributes';\r\nexport type {\r\n TextStyle,\r\n TextAlign,\r\n VerticalAlign,\r\n TextDecoration,\r\n TextCase,\r\n TextSpan,\r\n TextRun,\r\n FontStyle,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Media\r\n// =============================================================\r\nexport { Video } from '../components/builtins/media/media';\r\nexport type {\r\n VideoProps,\r\n VideoSegment,\r\n} from '../components/builtins/media/media';\r\n\r\n// =============================================================\r\n// Nodes — Audio\r\n// =============================================================\r\n// `SoundNode` plays a clip and `AudioBus` groups what feeds it — the third\r\n// scene graph, beside `Node2D` and `Node3D`. Levels are `Param`, so a fade is a\r\n// curve (`fadeIn`/`fadeOut`/`ramp`/`hold`) rather than a `to()`: sound is\r\n// scheduled once, ahead of time, not written once per frame.\r\nexport type { NodeAudio } from '../components/trees';\r\nexport { AudioBus, SoundNode } from '../components/builtins/audio/audio';\r\nexport {\r\n Sound,\r\n AudioFilters,\r\n ramp,\r\n hold,\r\n fadeIn,\r\n fadeOut,\r\n isCurve,\r\n} from '../attributes';\r\nexport type {\r\n NodeAudioProps,\r\n} from '../components/trees';\r\nexport type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio';\r\nexport type {\r\n SoundProps,\r\n AudioRequest,\r\n AudioBusStop,\r\n AudioFilter,\r\n Param,\r\n Curve,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// 3D — the Canvas3D node and the Graphics3D API\r\n// =============================================================\r\n// There is one 3D node; everything inside it is described with `Graphics3D`.\r\n// `Geo`/`Mat`/`Tex` build the geometry/material/texture descriptors, and the lerps\r\n// are what make a Vector3/Euler/Quaternion prop interpolate rather than snap.\r\n// `Surface2D` is the 2D→3D bridge: a child of `Canvas3D` whose 2D content is\r\n// rasterized offscreen and bound to a material by `Tex.surface(name)`.\r\nexport { Canvas3D } from '../components/builtins/three/canvas3d';\r\nexport type { Node3D } from '../components/trees';\r\n// The 3D scene graph: components, each placed by its transform.\r\nexport {\r\n Group3D,\r\n Mesh3D,\r\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\r\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\r\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\r\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\r\n PointLight3D, SpotLight3D, AreaLight3D,\r\n Camera3D,\r\n Fog3D, Environment3D,\r\n} from '../components/builtins/three/three';\r\nexport {\r\n Graphics3D,\r\n Scene3D,\r\n RenderContext3D,\r\n Geo,\r\n Mat,\r\n Tex,\r\n lerpVector3,\r\n lerpEuler3,\r\n slerpQuaternion,\r\n quaternionFromEuler,\r\n normalizeQuaternion,\r\n resolveVector3,\r\n evaluateParametric,\r\n evaluateRoundedBox,\r\n resolveSurfaceSource,\r\n resolveFill3D,\r\n segmentsOf,\r\n resolveCameraPlacement,\r\n resolveShadows3D,\r\n shadowCasts,\r\n shadowReceives,\r\n} from '../render3d';\r\nexport type { Canvas3DProps } from '../components/builtins/three/canvas3d';\r\nexport type {\r\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\r\n ChildSpace3D,\r\n Node3DProps,\r\n} from '../components/trees';\r\nexport type {\r\n Group3DProps, Mesh3DProps, Material3DProps,\r\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\r\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\r\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\r\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\r\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\r\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\r\n Camera3DProps,\r\n Fog3DProps, Environment3DProps,\r\n} from '../components/builtins/three/three';\r\nexport type {\r\n Node3DRenderState,\r\n Graphics3DOp,\r\n Scene3DOp,\r\n Vector3,\r\n Vector3Input,\r\n Euler3,\r\n EulerOrder,\r\n Quaternion,\r\n Transform3D,\r\n Shadow3D,\r\n ShadowOptions3D,\r\n Faces3D,\r\n Blend3D,\r\n Shading3D,\r\n Segments3D,\r\n Sweep3D,\r\n Bevel3D,\r\n Fill3D,\r\n Geometry3D,\r\n BufferGeometry3D,\r\n Material3D,\r\n MaterialCommon3D,\r\n MeshShorthand3D,\r\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\r\n MaterialShorthand3D,\r\n Uniform3D,\r\n Texture3D,\r\n TextureOptions3D,\r\n SurfaceTexture3D,\r\n SurfaceSource3D,\r\n ResolvedSurfaceSource,\r\n LightData3D,\r\n CameraData3D,\r\n FogData3D,\r\n EnvironmentData3D,\r\n Shadows3D,\r\n ShadowSettings3D,\r\n ToneMapping3D,\r\n ToneSettings3D,\r\n PostEffect3D,\r\n LineMode3D,\r\n LineStroke3D,\r\n ModelAnimation3D,\r\n} from '../render3d';\r\n\r\n// =============================================================\r\n// Rendering — Graphics2D builder, RenderContext2D & asset declaration\r\n// =============================================================\r\nexport {\r\n Graphics2D,\r\n PathBuilder,\r\n Clip,\r\n toPathString,\r\n} from '../render';\r\nexport type {\r\n RenderContext2D,\r\n RenderPass2D,\r\n MeasureContext2D,\r\n TextBlockSource,\r\n // One recorded entry of `Graphics2D.ops()`.\r\n GraphicsOp,\r\n PathData,\r\n PathCommand,\r\n PathBounds,\r\n EllipseArc,\r\n} from '../render';\r\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\r\nexport type { AssetScope, LoaderFn } from '../assets';\r\n\r\n// =============================================================\r\n// Fill & Color\r\n// =============================================================\r\nexport {\r\n Fills,\r\n parseColor,\r\n resolveFill,\r\n fillOps,\r\n colorOps,\r\n} from '../attributes';\r\nexport type {\r\n Fill,\r\n FillChain,\r\n FillOptions,\r\n VideoFillOptions,\r\n // Placement of an image/video source inside the shape it paints:\r\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\r\n MediaPlacementOptions,\r\n ImageFit,\r\n ImageCrop,\r\n ImageMatrix,\r\n FillResolved,\r\n // A custom SkSL shader as a fill. `coords` picks what `fragCoord` means;\r\n // uniforms are keyed by their declared name, and a `ShaderTexture` binds an\r\n // image to a `uniform shader` declaration.\r\n ShaderFillProp,\r\n ShaderFillResolved,\r\n ShaderFillCoords,\r\n ShaderTexture,\r\n SkSLUniformRecord,\r\n FractalNoiseBasis,\r\n // The colour type every fill, stroke, shadow and 3D material accepts —\r\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\r\n // pre-normalized RGBA tuple.\r\n Color,\r\n NormalizedColor,\r\n BlendMode,\r\n FillSpace,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Shape Attributes — Stroke, Shadow, Corners\r\n// =============================================================\r\nexport {\r\n resolveStroke,\r\n strokeOps,\r\n resolveShadow,\r\n shadowOps,\r\n resolveCorners,\r\n cornerRadiusOps,\r\n cornerStyleOps,\r\n // Parsing, measuring, sampling, trimming and morphing a path, and the\r\n // anchor model (`VectorPath`) a pen tool edits.\r\n pathOps,\r\n} from '../attributes';\r\nexport type {\r\n PathSampler,\r\n PathAnchor,\r\n PathSubpath,\r\n VectorPath,\r\n Stroke,\r\n StrokeProp,\r\n StrokeAlign,\r\n StrokeCap,\r\n StrokeMarker,\r\n StrokeEnd,\r\n StrokeJoin,\r\n StrokeResolved,\r\n Shadow,\r\n ShadowProp,\r\n ShadowResolved,\r\n Corners,\r\n CornerStyle,\r\n CornerStyleResolved,\r\n CornerRadiusResolved,\r\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\r\n RectCornerRadius,\r\n RectCornerStyle,\r\n NodeEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Layout Attributes — Vector2, Size, Insets, Alignment, Flow\r\n//\r\n// `flowOps` is the layout a container runs on its children, as plain data in\r\n// and boxes out — so a custom node can lay out what it draws the same way.\r\n// =============================================================\r\nexport {\r\n lerpVector2,\r\n sizeInputOps,\r\n insetsOps,\r\n alignmentOps,\r\n} from '../attributes';\r\n// `flowOps` itself is the layout package's, not the attribute layer's —\r\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\r\nexport { flowOps } from '../layout';\r\nexport type {\r\n Vector2,\r\n Size2D,\r\n Insets,\r\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\r\n InsetsProps,\r\n InsetsResolved,\r\n AlignmentKey,\r\n Alignment,\r\n} from '../attributes';\r\nexport type {\r\n FlowMode,\r\n GapSize,\r\n FlowResolved,\r\n FlowProps,\r\n FlowSettings,\r\n LayoutItem,\r\n FlowSpace,\r\n FlowMeasure,\r\n FlowLine,\r\n // What an overriding `measure(constraints, scope)` is handed.\r\n SizeConstraints,\r\n} from '../layout';\r\n\r\n// =============================================================\r\n// 2.5D space — the stage's `space3D` camera\r\n//\r\n// `space3dOps` is the camera's own projection, for a host drawing over the\r\n// picture (a gizmo aiming the camera) rather than keeping a copy of it.\r\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D\r\n// space of its own.\r\n// =============================================================\r\nexport { space3dOps } from '../attributes/layout/space3d';\r\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\r\n\r\n// =============================================================\r\n// Effects & Media Adjustments\r\n// =============================================================\r\nexport {\r\n Effects,\r\n EffectChain,\r\n Adjustments,\r\n VideoAdjustments,\r\n AdjustmentChain,\r\n VideoAdjustmentChain,\r\n /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */\r\n ImageFilters,\r\n /** @deprecated Renamed to {@link VideoAdjustments}. Removed in the next major. */\r\n VideoFilters,\r\n} from '../attributes';\r\n\r\nexport type {\r\n /** The `effects` prop type — what a node actually accepts. */\r\n Effect,\r\n EffectMode,\r\n EffectAxis,\r\n EffectSurface,\r\n EffectOptions,\r\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\r\n ImageAdjustment,\r\n VideoAdjustment,\r\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\r\n EffectAdjustment,\r\n MediaAdjustment,\r\n VideoOnlyAdjustment,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options. Every effect builder takes exactly one argument: one of\r\n * these, or the dominant scalar it wraps.\r\n */\r\nexport type {\r\n BlurOptions,\r\n DirectionalBlurOptions,\r\n GrayscaleOptions,\r\n PixelateOptions,\r\n BulgeOptions,\r\n MagnifyOptions,\r\n BloomOptions,\r\n VintageOptions,\r\n ChromaticAberrationOptions,\r\n InvertOptions,\r\n ScatterOptions,\r\n PosterizeOptions,\r\n MotionBlurOptions,\r\n ShaderEffectOptions,\r\n OutlineOptions,\r\n VignetteOptions,\r\n GrainOptions,\r\n SharpenOptions,\r\n EdgesOptions,\r\n ThresholdOptions,\r\n RadialBlurOptions,\r\n HalftoneOptions,\r\n DitherOptions,\r\n DuotoneOptions,\r\n CurvesOptions,\r\n ColorAdjustmentOptions,\r\n RgbShiftOptions,\r\n ScanlinesOptions,\r\n BlockDisplaceOptions,\r\n BitCrushOptions,\r\n AsciiOptions,\r\n StreakOptions,\r\n GlowOptions,\r\n OilPaintOptions,\r\n WaveOptions,\r\n TwirlOptions,\r\n ProgressiveBlurOptions,\r\n KaleidoscopeOptions,\r\n GlassOptions,\r\n LutOptions,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options for the filters that exist only as filters. Everything\r\n * else on {@link Adjustments} takes the matching effect options above, minus\r\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\r\n * point it at.\r\n */\r\nexport type {\r\n BlurFilterOptions,\r\n GrayscaleFilterOptions,\r\n AlphaFilterOptions,\r\n ExposureFilterOptions,\r\n ColorMatrixFilterOptions,\r\n CurvesFilterOptions,\r\n ColorAdjustmentFilterOptions,\r\n PosterizeTimeFilterOptions,\r\n VideoEchoFilterOptions,\r\n} from '../attributes';\r\n\r\n/** Effect data types, for naming an effect value or building one by hand. */\r\nexport type {\r\n BlurEffect,\r\n DirectionalBlurEffect,\r\n GrayscaleEffect,\r\n PixelateEffect,\r\n BulgeEffect,\r\n MagnifyEffect,\r\n BloomEffect,\r\n VintageEffect,\r\n ChromaticAberrationEffect,\r\n InvertEffect,\r\n InvertChannel,\r\n ScatterEffect,\r\n PosterizeEffect,\r\n MotionBlurEffect,\r\n MotionBlurAlignment,\r\n ShaderEffect,\r\n SkSLUniform,\r\n SkSLUniformValue,\r\n OutlineEffect,\r\n OutlinePosition,\r\n VignetteEffect,\r\n GrainEffect,\r\n SharpenEffect,\r\n EdgesEffect,\r\n EdgeKernel,\r\n ThresholdEffect,\r\n RadialBlurEffect,\r\n RadialBlurStyle,\r\n HalftoneEffect,\r\n HalftoneShape,\r\n HalftoneSeparation,\r\n DitherEffect,\r\n DitherMatrix,\r\n DuotoneEffect,\r\n CurvesEffect,\r\n ColorAdjustmentEffect,\r\n RgbShiftEffect,\r\n ScanlinesEffect,\r\n BlockDisplaceEffect,\r\n BitCrushEffect,\r\n BitCrushPalette,\r\n AsciiEffect,\r\n AsciiCharset,\r\n StreakEffect,\r\n GlowEffect,\r\n GlowChannel,\r\n GlowLoopStyle,\r\n GlowOriginal,\r\n GlowTint,\r\n OilPaintEffect,\r\n WaveEffect,\r\n WaveShape,\r\n TwirlEffect,\r\n ProgressiveBlurEffect,\r\n ProgressiveBlurShape,\r\n KaleidoscopeEffect,\r\n GlassEffect,\r\n LutEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Animation — interpolation\r\n//\r\n// There are no `sequence`/`parallel`/`wait` primitives: a command carries its\r\n// own placement, so sequencing is `at + duration`, running two together is a\r\n// shared `at`, and a wait is a gap between them.\r\n// =============================================================\r\nexport {\r\n lerpNumber,\r\n} from '../tween';\r\nexport type {\r\n AnimationTarget,\r\n Steppable,\r\n TweenStepper,\r\n LerpFunction,\r\n TweenOptions,\r\n} from '../tween';\r\n\r\n// An animation as a **value** rather than as control flow: a declared duration\r\n// plus `at(t)`, so a host can ask what it looks like at a time instead of\r\n// running it to one. That is what lets a host place one on a timeline, and what\r\n// makes a scene scrub in constant time rather than replay. A component's\r\n// `commands` return one, and the command registry — and a host listing what a\r\n// node can do — reads them.\r\n//\r\n// One command shape, always: `node.to(a, 1)` is a single command, not a builder\r\n// you can append to. Two of them are sequenced by where they sit on the\r\n// timeline, which is what makes a scene's shape editable rather than implied by\r\n// the order of calls in a function body.\r\nexport {\r\n getCommandMeta,\r\n isCommand,\r\n makeCommand,\r\n commandSequence,\r\n commandParallel,\r\n loopCommand,\r\n} from '../tween';\r\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\r\n\r\n// =============================================================\r\n// Animation — Easing\r\n// =============================================================\r\nexport {\r\n linear,\r\n easeIn,\r\n easeOut,\r\n easeInOut\r\n} from '../tween';\r\nexport type {\r\n EasingFunction,\r\n EaseParams,\r\n StandardEase\r\n} from '../tween';\r\n\r\n// =============================================================\r\n// Utilities\r\n// =============================================================\r\nexport {\r\n createRef,\r\n clamp,\r\n generateList,\r\n createContext,\r\n ContextMap,\r\n Random,\r\n SeedGenerator,\r\n parseCSV,\r\n parseData,\r\n} from '../util';\r\nexport type {\r\n Reference,\r\n RefTarget,\r\n Context,\r\n DataRecord,\r\n ParseCSVOptions,\r\n} from '../util';\r\n\r\n// =============================================================\r\n// Editor selection — node boxes, hit testing, transient overrides\r\n// =============================================================\r\n// The geometry an editor needs to lay a selection gizmo over the canvas: where a\r\n// node's pixels landed, and which node is under a point. Both are pure functions\r\n// over a scene's node tree, so a host can use them directly; a player embedding\r\n// reaches the same thing through `useMotionPlayer` (`getNodeBox`, `pickNode`,\r\n// `setNodeOverride`). Points and boxes are in viewport space — origin at the\r\n// viewport centre, y-up.\r\n//\r\n// These genuinely live in `../runtime` (node hit-testing and the transient\r\n// override store are runtime concerns) — deep-imported from their concrete\r\n// files, never the runtime barrel itself.\r\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\r\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\r\n\r\nexport {\r\n nodeBox,\r\n pickNode,\r\n collectBoxes,\r\n parentPlanePointAt,\r\n childPlanePointAt,\r\n reparentPlacementAt,\r\n nodeHandlesAt,\r\n handleValueAt,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeBox,\r\n ReparentPlacement,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeOverride,\r\n} from '../runtime/playback-controller';\r\nexport type {\r\n TreeState,\r\n} from '../project';\r\n/** @deprecated Kept until 1.0; see `../renamed-scene-names`. */\r\nexport type { SceneDocument, SceneEffect } from '../renamed-scene-names';\r\n"]}
1
+ {"version":3,"file":"index.js","s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,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface published as `@motionscript/sdk` (packages/sdk) and,\n// via this file, as `@motionscript/core/sdk`. A deliberate SUBSET of core's own\n// root barrel (`../index.ts`): no `Engine`/`Session`/platform seams, no\n// `@internal`-tagged descriptor plumbing. Every export here is named, traced to\n// its real declaring sub-barrel — never a wildcard — so nothing internal leaks\n// by accident. Keep this in lockstep with `packages/sdk/src/index.ts`, which\n// mirrors this exact named surface.\n\n// =============================================================\n// Project\n//\n// A clip is **data**: a still is nodes and props, a composition is the same\n// nodes placed in time plus the commands that animate them, and an audio\n// document is that one tree over. A **project** is one list of tracks over those\n// clips, and it is what the runtime plays — a lone still or composition is sugar\n// for a project with one track (`asProjectDocument`).\n// =============================================================\nexport {\n isProjectDocument,\n asProjectDocument,\n documentDuration,\n commandSpan,\n hasTimeline,\n nodeSpan,\n effectiveSpan,\n untimed,\n ROOT_NODE_ID,\n} from '../document';\nexport type {\n ProjectDocument,\n Track,\n} from '../document';\n// `resolveProjectDocument`/`placeTracks` genuinely live in `../runtime` (session\n// resolution and track placement are runtime concerns) — deep-imported from\n// their concrete files rather than the runtime barrel, which also carries\n// `Engine`/`Session` and is never a source for this file.\nexport { resolveProjectDocument } from '../runtime/session';\nexport { placeTracks } from '../runtime/placement';\nexport type { TrackSpan } from '../runtime/placement';\nexport type {\n Theme,\n ColorTokens,\n Typography,\n TypographyPreset,\n} from '../project';\nexport type { NodeTime, AttachScope } from '../components/trees';\nexport type { BoxBounds, Extents } from '../layout';\n\n// =============================================================\n// Assets\n//\n// The manifest a host builds a scene against — what images, video, audio and\n// fonts it references, resolved before render. An `Engine`'s manifest and\n// `@motionscript/headless`'s asset options both take this shape.\n// =============================================================\nexport type {\n ImageMeta,\n VideoMeta,\n AudioMeta,\n FontMeta,\n AssetMeta,\n AssetManifest,\n} from '../assets';\n\n// =============================================================\n// The clip document\n//\n// The data half of the model. Node types are code — a component registered\n// under its key, which is also where a custom node joins the system — and\n// everything else is plain JSON: which nodes exist, what props they carry, and\n// what happens to them over time.\n// =============================================================\nexport {\n validateDocument,\n assertValidDocument,\n // Saved documents carry the format they were written in; these bring one\n // forward, and a host rewriting stored node rows calls `migrateNodeProps`.\n DOCUMENT_FORMAT_VERSION,\n DocumentTooNewError,\n documentFormatVersion,\n migrateDocument,\n migrateNodeProps,\n missingNodeOf,\n // The code half of the model, as one object an engine owns. Not a\n // singleton: what a document can name is a property of the registry\n // compiling it, so two engines in one process disagree freely.\n Registry,\n} from '../document';\n// The shader-pack vocabulary lives beside the rest of the fill/shader attribute\n// machinery, not in `../document`.\nexport {\n normalizeShaderPack,\n resolveShaderProperties,\n isKnownShaderProperty,\n} from '../attributes';\nexport type {\n RegistryOptions,\n NodeTypeMap,\n ShaderPackMap,\n NodeTypeRecord,\n NodeCommandEntry,\n VisualDocument,\n ClipDocument,\n StillDocument,\n CompositionDocument,\n AudioDocument,\n NodeSpec,\n TimedNodeSpec,\n NodeSpan,\n CommandSpec,\n EaseSpec,\n LoopSpec,\n LoopDirection,\n VariableSpec,\n ValidationIssue,\n ValidationResult,\n ValidateOptions,\n DocumentChange,\n DocumentMigrationResult,\n PropMigration,\n PropNote,\n MissingNodeInfo,\n NodeConstructor,\n CommandFactory,\n CommandTypeEntry,\n VariableCommandFactory,\n VariableLerp,\n VariableTarget,\n} from '../document';\nexport type {\n Shader,\n FillShader,\n EffectShader,\n ShaderProperty,\n KnownShaderProperty,\n ShaderPropertyValues,\n} from '../attributes';\n\n// Expressions: the string form of a prop that follows a variable — `\"=4[g]+3\"`.\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint,\n// complete or rewrite one without reimplementing the grammar.\nexport { expressionOps, ExpressionError } from '../document';\nexport type {\n ParsedExpression,\n ExpressionNode,\n ExpressionDialect,\n VariableResolver,\n} from '../document';\n\n// =============================================================\n// Components — the factories a node type is written with\n//\n// A component is one object literal: `key`, `state`, `commands`, `children`\n// and its tree's own fields (`measure`/`layout`/`render` for 2D). Behaviour is\n// spread in from modules (`...Paint.state`, `...Paint.commands`) and their\n// helpers called (`Paint.draw`, `Flow.measure`). See `packages/core/docs/why.md#node-types-are-factory-specs-not-decorated-classes`.\n// =============================================================\nexport { component2d } from '../components/factory/component2d';\nexport { componentAudio } from '../components/factory/component-audio';\nexport { component3d } from '../components/factory/component3d';\nexport { commandsFor } from '../components/factory/commands-for';\nexport { Types } from '../components/factory/types';\nexport { provides } from '../components/factory/api';\nexport * as Paint from '../components/modules/paint';\nexport * as Flow from '../components/modules/flow';\nexport * as Shapes from '../components/modules/shapes';\nexport * as Aim from '../components/modules/aim';\n// The face text is set in: its entries inherit from the nearest provider.\nexport * as Typeface from '../components/modules/text-style';\nexport * as TextLayout from '../components/modules/text-layout';\n// A mesh's surface: the material entries, and the mesh drawn with them.\nexport * as Material from '../components/modules/material';\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\nexport * as View3D from '../components/modules/view3d';\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types';\nexport type {\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\n Timeline, Type, Values, Writes,\n // Named in every component's type, so a package exporting one can declare it.\n Merge, BuiltNode,\n // What `render` is handed; `RenderContext2D` is the renderer's.\n RenderContext2D as RenderContext,\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\n RenderContext3D as SceneContext,\n} from '../components/factory/api';\n\n// =============================================================\n// Nodes — what code holding a built node names it as\n//\n// `Node` is dimension-agnostic (tree, props, tweens, context, clock); `Node2D`\n// adds layout and 2D drawing; `Node3D` and `NodeAudio` are the other trees.\n// Types only: a node type is a component, never a subclass.\n// =============================================================\nexport type { Node, Node2D } from '../components/trees';\nexport {\n // A clip's root container: layout frame, background paint and camera in\n // one node. Every track builds into one sized to the viewport.\n Canvas2D,\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\n findNode2D,\n frameIn,\n} from '../components/trees';\nexport { Provider, ThemeProvider } from '../components/builtins/providers/providers';\nexport type {\n NodeProps,\n Node2DProps,\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\n ChildPlacement,\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\n ChildPlane,\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\n NodeHandle,\n Canvas2DProps,\n NodeConfig,\n NodeChildren,\n NodeDimension,\n} from '../components/trees';\nexport type { ProviderProps, ThemeProviderProps } from '../components/builtins/providers/providers';\n\n// =============================================================\n// Nodes — Geometry\n// =============================================================\nexport {\n Rect,\n Ellipse,\n Path,\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\n // where `Path` draws its `d` at face value.\n PathShape,\n Polygon,\n Polygram,\n Triangle,\n RightTriangle,\n Pentagon,\n Hexagon,\n Octagon,\n Star,\n} from '../components/builtins/geometry/geometry';\nexport { BooleanGroup, MaskGroup } from '../components/builtins/geometry/composite';\nexport type {\n PaintProps,\n ShapeProps,\n RectProps,\n FlexSize,\n EllipseProps,\n PathProps,\n PathShapeProps,\n PolygonProps,\n PolygramProps,\n} from '../components/builtins/geometry/geometry';\nexport type { BooleanGroupProps, MaskGroupProps } from '../components/builtins/geometry/composite';\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\n// not node-prop types.\nexport type {\n BooleanOperation,\n MaskMode,\n MaskOptions,\n} from '../attributes';\n\n// =============================================================\n// Nodes — Layout\n// =============================================================\nexport {\n Camera,\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\n OrbitCamera,\n RotatedBox,\n} from '../components/builtins/layout/layout';\nexport type {\n CameraProps,\n OrbitCameraProps,\n} from '../components/builtins/layout/layout';\n\n// =============================================================\n// Nodes — Text\n// =============================================================\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../components/builtins/text/text';\nexport type {\n TextProps,\n RichTextProps,\n NumberProps,\n NumberFormat,\n DefaultTextStyleProps,\n} from '../components/builtins/text/text';\nexport { textOps } from '../attributes';\nexport type {\n TextStyle,\n TextAlign,\n VerticalAlign,\n TextDecoration,\n TextCase,\n TextSpan,\n TextRun,\n FontStyle,\n} from '../attributes';\n\n// =============================================================\n// Nodes — Media\n// =============================================================\nexport { Video } from '../components/builtins/media/media';\nexport type {\n VideoProps,\n VideoSegment,\n} from '../components/builtins/media/media';\n\n// =============================================================\n// Nodes — Audio\n// =============================================================\n// `SoundNode` plays a clip and `AudioBus` groups what feeds it — the third\n// scene graph, beside `Node2D` and `Node3D`. Levels are `Param`, so a fade is a\n// ramp (`ramp`/`hold`) or a transition rather than a `to()`: sound is\n// scheduled once, ahead of time, not written once per frame.\nexport type { NodeAudio } from '../components/trees';\nexport { AudioBus, SoundNode } from '../components/builtins/audio/audio';\nexport {\n Sound,\n AudioEffects,\n ramp,\n hold,\n isRamp,\n} from '../attributes';\nexport type {\n NodeAudioProps,\n} from '../components/trees';\nexport type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio';\nexport type {\n SoundProps,\n AudioRequest,\n AudioBusStop,\n AudioEffect,\n AudioEffectsInput,\n AudioTransition,\n Param,\n Ramp,\n RampKey,\n} from '../attributes';\n\n// =============================================================\n// 3D — the Canvas3D node and the Graphics3D API\n// =============================================================\n// There is one 3D node; everything inside it is described with `Graphics3D`.\n// `Geo`/`Mat`/`Tex` build the geometry/material/texture descriptors, and the lerps\n// are what make a Vector3/Euler/Quaternion prop interpolate rather than snap.\n// `Surface2D` is the 2D→3D bridge: a child of `Canvas3D` whose 2D content is\n// rasterized offscreen and bound to a material by `Tex.surface(name)`.\nexport { Canvas3D } from '../components/builtins/three/canvas3d';\nexport type { Node3D } from '../components/trees';\n// The 3D scene graph: components, each placed by its transform.\nexport {\n Group3D,\n Mesh3D,\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\n PointLight3D, SpotLight3D, AreaLight3D,\n Camera3D,\n Fog3D, Environment3D,\n} from '../components/builtins/three/three';\nexport {\n Graphics3D,\n Scene3D,\n RenderContext3D,\n Geo,\n Mat,\n Tex,\n lerpVector3,\n lerpEuler3,\n slerpQuaternion,\n quaternionFromEuler,\n normalizeQuaternion,\n resolveVector3,\n evaluateParametric,\n evaluateRoundedBox,\n resolveSurfaceSource,\n resolveFill3D,\n segmentsOf,\n resolveCameraPlacement,\n resolveShadows3D,\n shadowCasts,\n shadowReceives,\n} from '../render3d';\nexport type { Canvas3DProps } from '../components/builtins/three/canvas3d';\nexport type {\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\n ChildSpace3D,\n Node3DProps,\n} from '../components/trees';\nexport type {\n Group3DProps, Mesh3DProps, Material3DProps,\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\n Camera3DProps,\n Fog3DProps, Environment3DProps,\n} from '../components/builtins/three/three';\nexport type {\n Node3DRenderState,\n Graphics3DOp,\n Scene3DOp,\n Vector3,\n Vector3Input,\n Euler3,\n EulerOrder,\n Quaternion,\n Transform3D,\n Shadow3D,\n ShadowOptions3D,\n Faces3D,\n Blend3D,\n Shading3D,\n Segments3D,\n Sweep3D,\n Bevel3D,\n Fill3D,\n Geometry3D,\n BufferGeometry3D,\n Material3D,\n MaterialCommon3D,\n MeshShorthand3D,\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\n MaterialShorthand3D,\n Uniform3D,\n Texture3D,\n TextureOptions3D,\n SurfaceTexture3D,\n SurfaceSource3D,\n ResolvedSurfaceSource,\n LightData3D,\n CameraData3D,\n FogData3D,\n EnvironmentData3D,\n Shadows3D,\n ShadowSettings3D,\n ToneMapping3D,\n ToneSettings3D,\n PostEffect3D,\n LineMode3D,\n LineStroke3D,\n ModelAnimation3D,\n} from '../render3d';\n\n// =============================================================\n// Rendering — Graphics2D builder, RenderContext2D & asset declaration\n// =============================================================\nexport {\n Graphics2D,\n PathBuilder,\n Clip,\n toPathString,\n} from '../render';\nexport type {\n RenderContext2D,\n RenderPass2D,\n MeasureContext2D,\n TextBlockSource,\n // One recorded entry of `Graphics2D.ops()`.\n GraphicsOp,\n PathData,\n PathCommand,\n PathBounds,\n EllipseArc,\n} from '../render';\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\nexport type { AssetScope, LoaderFn } from '../assets';\n\n// =============================================================\n// Fill & Color\n// =============================================================\nexport {\n Fills,\n parseColor,\n resolveFill,\n fillOps,\n colorOps,\n} from '../attributes';\nexport type {\n Fill,\n FillChain,\n FillOptions,\n VideoFillOptions,\n // Placement of an image/video source inside the shape it paints:\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\n MediaPlacementOptions,\n ImageFit,\n ImageCrop,\n ImageMatrix,\n FillResolved,\n // A custom WGSL shader as a fill. Uniforms are keyed by their declared\n // name, and a `ShaderTexture` is an image it samples.\n ShaderFillProp,\n ShaderFillResolved,\n ShaderTexture,\n ShaderUniformRecord,\n FractalNoiseBasis,\n // The colour type every fill, stroke, shadow and 3D material accepts —\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\n // pre-normalized RGBA tuple.\n Color,\n NormalizedColor,\n BlendMode,\n FillSpace,\n} from '../attributes';\n\n// =============================================================\n// Shape Attributes — Stroke, Shadow, Corners\n// =============================================================\nexport {\n resolveStroke,\n strokeOps,\n resolveShadow,\n shadowOps,\n resolveCorners,\n cornerRadiusOps,\n cornerStyleOps,\n // Parsing, measuring, sampling, trimming and morphing a path, and the\n // anchor model (`VectorPath`) a pen tool edits.\n pathOps,\n} from '../attributes';\nexport type {\n PathSampler,\n PathAnchor,\n PathSubpath,\n VectorPath,\n Stroke,\n StrokeProp,\n StrokeAlign,\n StrokeCap,\n StrokeMarker,\n StrokeEnd,\n StrokeJoin,\n StrokeResolved,\n Shadow,\n ShadowProp,\n ShadowResolved,\n Corners,\n CornerStyle,\n CornerStyleResolved,\n CornerRadiusResolved,\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\n RectCornerRadius,\n RectCornerStyle,\n NodeEffect,\n} from '../attributes';\n\n// =============================================================\n// Layout Attributes — Vector2, Size, Insets, Alignment, Flow\n//\n// `flowOps` is the layout a container runs on its children, as plain data in\n// and boxes out — so a custom node can lay out what it draws the same way.\n// =============================================================\nexport {\n lerpVector2,\n sizeInputOps,\n insetsOps,\n alignmentOps,\n} from '../attributes';\n// `flowOps` itself is the layout package's, not the attribute layer's —\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\nexport { flowOps } from '../layout';\nexport type {\n Vector2,\n Size2D,\n Insets,\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\n InsetsProps,\n InsetsResolved,\n AlignmentKey,\n Alignment,\n} from '../attributes';\nexport type {\n FlowMode,\n GapSize,\n FlowResolved,\n FlowProps,\n FlowSettings,\n LayoutItem,\n FlowSpace,\n FlowMeasure,\n FlowLine,\n // What an overriding `measure(constraints, scope)` is handed.\n SizeConstraints,\n} from '../layout';\n\n// =============================================================\n// 2.5D space — the stage's `space3D` camera\n//\n// `space3dOps` is the camera's own projection, for a host drawing over the\n// picture (a gizmo aiming the camera) rather than keeping a copy of it.\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D\n// space of its own.\n// =============================================================\nexport { space3dOps } from '../attributes/layout/space3d';\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\n\n// =============================================================\n// Effects & Media Adjustments\n//\n// `describeEffect` / `effectDescriptors` describe each built-in effect's\n// fields (kind, default, range, unit, inspector hints) as plain JSON, so a\n// host builds its effect UI from the engine rather than a copy of it.\n// =============================================================\nexport { describeEffect, effectDescriptors } from '../attributes';\nexport type {\n EffectDescriptor,\n EffectParamDescriptor,\n EffectParamKind,\n EffectParamUnit,\n EffectParamControl,\n EffectGroup,\n EffectJson,\n} from '../attributes';\nexport {\n Effects,\n EffectChain,\n Adjustments,\n VideoAdjustments,\n AdjustmentChain,\n VideoAdjustmentChain,\n /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */\n ImageFilters,\n /** @deprecated Renamed to {@link VideoAdjustments}. Removed in the next major. */\n VideoFilters,\n} from '../attributes';\n\nexport type {\n /** The `effects` prop type — what a node actually accepts. */\n Effect,\n EffectMode,\n EffectAxis,\n EffectSurface,\n EffectOptions,\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\n ImageAdjustment,\n VideoAdjustment,\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\n EffectAdjustment,\n MediaAdjustment,\n VideoOnlyAdjustment,\n} from '../attributes';\n\n/**\n * Per-builder options. Every effect builder takes exactly one argument: one of\n * these, or the dominant scalar it wraps.\n */\nexport type {\n BlurOptions,\n DirectionalBlurOptions,\n GrayscaleOptions,\n PixelateOptions,\n BulgeOptions,\n MagnifyOptions,\n BloomOptions,\n VintageOptions,\n ChromaticAberrationOptions,\n InvertOptions,\n ScatterOptions,\n PosterizeOptions,\n MotionBlurOptions,\n ShaderEffectOptions,\n OutlineOptions,\n VignetteOptions,\n GrainOptions,\n SharpenOptions,\n EdgesOptions,\n ThresholdOptions,\n RadialBlurOptions,\n HalftoneOptions,\n DitherOptions,\n DuotoneOptions,\n CurvesOptions,\n ColorAdjustmentOptions,\n RgbShiftOptions,\n ScanlinesOptions,\n BlockDisplaceOptions,\n BitCrushOptions,\n AsciiOptions,\n StreakOptions,\n GlowOptions,\n OilPaintOptions,\n WaveOptions,\n TwirlOptions,\n ProgressiveBlurOptions,\n KaleidoscopeOptions,\n GlassOptions,\n LutOptions,\n} from '../attributes';\n\n/**\n * Per-builder options for the filters that exist only as filters. Everything\n * else on {@link Adjustments} takes the matching effect options above, minus\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\n * point it at.\n */\nexport type {\n BlurFilterOptions,\n GrayscaleFilterOptions,\n AlphaFilterOptions,\n ExposureFilterOptions,\n ColorMatrixFilterOptions,\n CurvesFilterOptions,\n ColorAdjustmentFilterOptions,\n PosterizeTimeFilterOptions,\n VideoEchoFilterOptions,\n} from '../attributes';\n\n/** Effect data types, for naming an effect value or building one by hand. */\nexport type {\n BlurEffect,\n DirectionalBlurEffect,\n GrayscaleEffect,\n PixelateEffect,\n BulgeEffect,\n MagnifyEffect,\n BloomEffect,\n VintageEffect,\n ChromaticAberrationEffect,\n InvertEffect,\n InvertChannel,\n ScatterEffect,\n PosterizeEffect,\n MotionBlurEffect,\n MotionBlurAlignment,\n ShaderEffect,\n ShaderUniform,\n ShaderUniformValue,\n OutlineEffect,\n OutlinePosition,\n VignetteEffect,\n GrainEffect,\n SharpenEffect,\n EdgesEffect,\n EdgeKernel,\n ThresholdEffect,\n RadialBlurEffect,\n RadialBlurStyle,\n HalftoneEffect,\n HalftoneShape,\n HalftoneSeparation,\n DitherEffect,\n DitherMatrix,\n DuotoneEffect,\n CurvesEffect,\n ColorAdjustmentEffect,\n RgbShiftEffect,\n ScanlinesEffect,\n BlockDisplaceEffect,\n BitCrushEffect,\n BitCrushPalette,\n AsciiEffect,\n AsciiCharset,\n StreakEffect,\n GlowEffect,\n GlowChannel,\n GlowLoopStyle,\n GlowOriginal,\n GlowTint,\n OilPaintEffect,\n WaveEffect,\n WaveShape,\n TwirlEffect,\n ProgressiveBlurEffect,\n ProgressiveBlurShape,\n KaleidoscopeEffect,\n GlassEffect,\n LutEffect,\n} from '../attributes';\n\n// =============================================================\n// Animation — interpolation\n//\n// There are no `sequence`/`parallel`/`wait` primitives: a command carries its\n// own placement, so sequencing is `at + duration`, running two together is a\n// shared `at`, and a wait is a gap between them.\n// =============================================================\nexport {\n lerpNumber,\n} from '../tween';\nexport type {\n AnimationTarget,\n Steppable,\n TweenStepper,\n LerpFunction,\n TweenOptions,\n} from '../tween';\n\n// An animation as a **value** rather than as control flow: a declared duration\n// plus `at(t)`, so a host can ask what it looks like at a time instead of\n// running it to one. That is what lets a host place one on a timeline, and what\n// makes a scene scrub in constant time rather than replay. A component's\n// `commands` return one, and the command registry — and a host listing what a\n// node can do — reads them.\n//\n// One command shape, always: `node.to(a, 1)` is a single command, not a builder\n// you can append to. Two of them are sequenced by where they sit on the\n// timeline, which is what makes a scene's shape editable rather than implied by\n// the order of calls in a function body.\nexport {\n getCommandMeta,\n isCommand,\n makeCommand,\n commandSequence,\n commandParallel,\n loopCommand,\n} from '../tween';\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\n\n// =============================================================\n// Animation — Easing\n// =============================================================\nexport {\n linear,\n easeIn,\n easeOut,\n easeInOut\n} from '../tween';\nexport type {\n EasingFunction,\n EaseParams,\n StandardEase\n} from '../tween';\n\n// =============================================================\n// Utilities\n// =============================================================\nexport {\n createRef,\n clamp,\n generateList,\n createContext,\n ContextMap,\n Random,\n SeedGenerator,\n parseCSV,\n parseData,\n} from '../util';\nexport type {\n Reference,\n RefTarget,\n Context,\n DataRecord,\n ParseCSVOptions,\n} from '../util';\n\n// =============================================================\n// Editor selection — node boxes, hit testing, transient overrides\n// =============================================================\n// The geometry an editor needs to lay a selection gizmo over the canvas: where a\n// node's pixels landed, and which node is under a point. Both are pure functions\n// over a scene's node tree, so a host can use them directly; a player embedding\n// reaches the same thing through `useMotionPlayer` (`getNodeBox`, `pickNode`,\n// `setNodeOverride`). Points and boxes are in viewport space — origin at the\n// viewport centre, y-up.\n//\n// These genuinely live in `../runtime` (node hit-testing and the transient\n// override store are runtime concerns) — deep-imported from their concrete\n// files, never the runtime barrel itself.\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\n\nexport {\n nodeBox,\n pickNode,\n collectBoxes,\n parentPlanePointAt,\n childPlanePointAt,\n reparentPlacementAt,\n nodeHandlesAt,\n handleValueAt,\n} from '../runtime/node-picking';\nexport type {\n NodeBox,\n ReparentPlacement,\n} from '../runtime/node-picking';\nexport type {\n NodeOverride,\n} from '../runtime/playback-controller';\nexport type {\n TreeState,\n} from '../project';\n/** @deprecated Kept until 1.0; see `../renamed-scene-names`. */\nexport type { SceneDocument, SceneEffect } from '../renamed-scene-names';\n"]}