@motionscript/core 0.1.0-alpha.3 → 0.1.0-alpha.5

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 (746) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +48 -0
  4. package/README.md +93 -72
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +9 -0
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +11 -0
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts.map +1 -1
  11. package/dist/assets/errors.js +8 -3
  12. package/dist/assets/errors.js.map +1 -1
  13. package/dist/assets/index.js.map +1 -1
  14. package/dist/assets/manager.d.ts +26 -1
  15. package/dist/assets/manager.d.ts.map +1 -1
  16. package/dist/assets/manager.js +79 -4
  17. package/dist/assets/manager.js.map +1 -1
  18. package/dist/assets/manifest.js.map +1 -1
  19. package/dist/assets/record.js.map +1 -1
  20. package/dist/assets/scope.d.ts +3 -3
  21. package/dist/assets/scope.d.ts.map +1 -1
  22. package/dist/assets/scope.js.map +1 -1
  23. package/dist/attributes/audio/filters/chain.d.ts +1 -1
  24. package/dist/attributes/audio/filters/chain.js.map +1 -1
  25. package/dist/attributes/audio/filters/curve.d.ts +8 -8
  26. package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
  27. package/dist/attributes/audio/filters/curve.js +20 -19
  28. package/dist/attributes/audio/filters/curve.js.map +1 -1
  29. package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
  30. package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
  31. package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
  32. package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
  33. package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
  34. package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
  35. package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
  36. package/dist/attributes/audio/filters/index.d.ts +1 -1
  37. package/dist/attributes/audio/filters/index.d.ts.map +1 -1
  38. package/dist/attributes/audio/filters/index.js +1 -1
  39. package/dist/attributes/audio/filters/index.js.map +1 -1
  40. package/dist/attributes/audio/filters/registry.js.map +1 -1
  41. package/dist/attributes/audio/filters/union.js.map +1 -1
  42. package/dist/attributes/audio/request.d.ts +17 -2
  43. package/dist/attributes/audio/request.d.ts.map +1 -1
  44. package/dist/attributes/audio/request.js.map +1 -1
  45. package/dist/attributes/audio/schedule.d.ts +4 -2
  46. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  47. package/dist/attributes/audio/schedule.js +15 -8
  48. package/dist/attributes/audio/schedule.js.map +1 -1
  49. package/dist/attributes/audio/sound.d.ts +4 -2
  50. package/dist/attributes/audio/sound.d.ts.map +1 -1
  51. package/dist/attributes/audio/sound.js +8 -4
  52. package/dist/attributes/audio/sound.js.map +1 -1
  53. package/dist/attributes/index.js.map +1 -1
  54. package/dist/attributes/layout/alignment.js +1 -1
  55. package/dist/attributes/layout/alignment.js.map +1 -1
  56. package/dist/attributes/layout/index.js.map +1 -1
  57. package/dist/attributes/layout/insets.js.map +1 -1
  58. package/dist/attributes/layout/matrix2d.js.map +1 -1
  59. package/dist/attributes/layout/size.js.map +1 -1
  60. package/dist/attributes/layout/transform3d.js.map +1 -1
  61. package/dist/attributes/layout/vector2.js.map +1 -1
  62. package/dist/attributes/layout/world-transform.js.map +1 -1
  63. package/dist/attributes/mask/boolean.js.map +1 -1
  64. package/dist/attributes/mask/mask.js.map +1 -1
  65. package/dist/attributes/properties/decorator.d.ts +3 -1
  66. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  67. package/dist/attributes/properties/decorator.js.map +1 -1
  68. package/dist/attributes/properties/inputs.js.map +1 -1
  69. package/dist/attributes/properties/typed.d.ts +9 -2
  70. package/dist/attributes/properties/typed.d.ts.map +1 -1
  71. package/dist/attributes/properties/typed.js +15 -1
  72. package/dist/attributes/properties/typed.js.map +1 -1
  73. package/dist/attributes/render3d/orbit.d.ts +8 -8
  74. package/dist/attributes/render3d/orbit.js +7 -7
  75. package/dist/attributes/render3d/orbit.js.map +1 -1
  76. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  77. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  78. package/dist/attributes/shape/corners/corners.js.map +1 -1
  79. package/dist/attributes/shape/corners/index.js.map +1 -1
  80. package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
  81. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  82. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  83. package/dist/attributes/shape/effects/chain.d.ts +28 -120
  84. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  85. package/dist/attributes/shape/effects/chain.js +16 -88
  86. package/dist/attributes/shape/effects/chain.js.map +1 -1
  87. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  88. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  89. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  90. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  91. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  92. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  93. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  94. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  95. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +2 -2
  96. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  97. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
  98. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  99. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  100. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  101. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  102. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  104. package/dist/attributes/shape/effects/implementations/glass.d.ts +15 -24
  105. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  106. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  108. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  110. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  112. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/lut.d.ts +1 -1
  114. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/shader.js +15 -8
  128. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  136. package/dist/attributes/shape/effects/index.d.ts +2 -6
  137. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  138. package/dist/attributes/shape/effects/index.js.map +1 -1
  139. package/dist/attributes/shape/effects/registry.d.ts +23 -6
  140. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  141. package/dist/attributes/shape/effects/registry.js +44 -10
  142. package/dist/attributes/shape/effects/registry.js.map +1 -1
  143. package/dist/attributes/shape/effects/union.d.ts +2 -6
  144. package/dist/attributes/shape/effects/union.d.ts.map +1 -1
  145. package/dist/attributes/shape/effects/union.js.map +1 -1
  146. package/dist/attributes/shape/fill/blend.js.map +1 -1
  147. package/dist/attributes/shape/fill/chain.js.map +1 -1
  148. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  149. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  150. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  151. package/dist/attributes/shape/fill/color/parser.js +81 -44
  152. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  153. package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
  154. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
  155. package/dist/attributes/shape/fill/gradient-stops.js +65 -0
  156. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
  157. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  158. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  159. package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
  160. package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
  161. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  162. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  163. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  164. package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
  165. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  166. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  167. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  168. package/dist/attributes/shape/fill/implementations/image.js +5 -4
  169. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  170. package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
  171. package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
  172. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  173. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  174. package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
  175. package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
  176. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  177. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  178. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  179. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  180. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  181. package/dist/attributes/shape/fill/index.js.map +1 -1
  182. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  183. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  184. package/dist/attributes/shape/fill/registry.js.map +1 -1
  185. package/dist/attributes/shape/fill/union.js.map +1 -1
  186. package/dist/attributes/shape/filters/chain.d.ts +4 -10
  187. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  188. package/dist/attributes/shape/filters/chain.js +1 -13
  189. package/dist/attributes/shape/filters/chain.js.map +1 -1
  190. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  191. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  192. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  193. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  194. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  195. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  196. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  197. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  198. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  199. package/dist/attributes/shape/filters/index.d.ts +1 -1
  200. package/dist/attributes/shape/filters/index.js.map +1 -1
  201. package/dist/attributes/shape/filters/registry.d.ts +2 -2
  202. package/dist/attributes/shape/filters/registry.js +3 -3
  203. package/dist/attributes/shape/filters/registry.js.map +1 -1
  204. package/dist/attributes/shape/filters/union.d.ts +6 -7
  205. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  206. package/dist/attributes/shape/filters/union.js.map +1 -1
  207. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  208. package/dist/attributes/shape/path/anchors.js +12 -5
  209. package/dist/attributes/shape/path/anchors.js.map +1 -1
  210. package/dist/attributes/shape/path/bezier.js.map +1 -1
  211. package/dist/attributes/shape/path/index.js.map +1 -1
  212. package/dist/attributes/shape/path/measure.js.map +1 -1
  213. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  214. package/dist/attributes/shape/path/morph.js +16 -4
  215. package/dist/attributes/shape/path/morph.js.map +1 -1
  216. package/dist/attributes/shape/path/ops.js.map +1 -1
  217. package/dist/attributes/shape/path/types.js.map +1 -1
  218. package/dist/attributes/shape/path/walk.js.map +1 -1
  219. package/dist/attributes/shape/shaders/index.js.map +1 -1
  220. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  221. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  222. package/dist/attributes/shape/shadow/index.js.map +1 -1
  223. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  224. package/dist/attributes/shape/stroke/index.d.ts +2 -2
  225. package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
  226. package/dist/attributes/shape/stroke/index.js +1 -1
  227. package/dist/attributes/shape/stroke/index.js.map +1 -1
  228. package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
  229. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  230. package/dist/attributes/shape/stroke/stroke.js +22 -2
  231. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  232. package/dist/attributes/shared/operators.js.map +1 -1
  233. package/dist/attributes/text/index.js.map +1 -1
  234. package/dist/attributes/text/ops.d.ts +6 -0
  235. package/dist/attributes/text/ops.d.ts.map +1 -1
  236. package/dist/attributes/text/ops.js +1 -0
  237. package/dist/attributes/text/ops.js.map +1 -1
  238. package/dist/attributes/text/types.js.map +1 -1
  239. package/dist/browser/chunks/chunk-FUZVFT3W.js +18 -0
  240. package/dist/browser/chunks/chunk-FUZVFT3W.js.map +7 -0
  241. package/dist/browser/chunks/chunk-QG6C23IJ.js +3 -0
  242. package/dist/browser/chunks/chunk-QG6C23IJ.js.map +7 -0
  243. package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
  244. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
  245. package/dist/browser/component.js +1 -1
  246. package/dist/browser/component.js.map +1 -1
  247. package/dist/browser/index.js +1 -1
  248. package/dist/browser/index.js.map +4 -4
  249. package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
  250. package/dist/browser/jsx-jsx-runtime.js +1 -1
  251. package/dist/browser/manifest.json +3 -2
  252. package/dist/browser/sdk.js +1 -1
  253. package/dist/component.js.map +1 -1
  254. package/dist/document/audio.d.ts +1 -1
  255. package/dist/document/audio.js +4 -4
  256. package/dist/document/audio.js.map +1 -1
  257. package/dist/document/builtins.d.ts.map +1 -1
  258. package/dist/document/builtins.js +8 -14
  259. package/dist/document/builtins.js.map +1 -1
  260. package/dist/document/command-traits.d.ts +1 -1
  261. package/dist/document/command-traits.js +13 -1
  262. package/dist/document/command-traits.js.map +1 -1
  263. package/dist/document/deny-globals.js.map +1 -1
  264. package/dist/document/diff.js.map +1 -1
  265. package/dist/document/doc-index.d.ts +2 -2
  266. package/dist/document/doc-index.d.ts.map +1 -1
  267. package/dist/document/doc-index.js.map +1 -1
  268. package/dist/document/expression/compile.d.ts.map +1 -1
  269. package/dist/document/expression/compile.js +8 -5
  270. package/dist/document/expression/compile.js.map +1 -1
  271. package/dist/document/expression/index.js.map +1 -1
  272. package/dist/document/expression/ops.js +1 -1
  273. package/dist/document/expression/ops.js.map +1 -1
  274. package/dist/document/expression/parse.d.ts.map +1 -1
  275. package/dist/document/expression/parse.js +15 -6
  276. package/dist/document/expression/parse.js.map +1 -1
  277. package/dist/document/expression/refs.d.ts +1 -1
  278. package/dist/document/expression/refs.js +1 -1
  279. package/dist/document/expression/refs.js.map +1 -1
  280. package/dist/document/expression/types.js.map +1 -1
  281. package/dist/document/expression/walk.d.ts.map +1 -1
  282. package/dist/document/expression/walk.js +2 -1
  283. package/dist/document/expression/walk.js.map +1 -1
  284. package/dist/document/index.d.ts +2 -0
  285. package/dist/document/index.d.ts.map +1 -1
  286. package/dist/document/index.js +2 -0
  287. package/dist/document/index.js.map +1 -1
  288. package/dist/document/node-decorator.js.map +1 -1
  289. package/dist/document/node-descriptor.d.ts +19 -0
  290. package/dist/document/node-descriptor.d.ts.map +1 -1
  291. package/dist/document/node-descriptor.js.map +1 -1
  292. package/dist/document/placement.d.ts +70 -0
  293. package/dist/document/placement.d.ts.map +1 -0
  294. package/dist/document/placement.js +83 -0
  295. package/dist/document/placement.js.map +1 -0
  296. package/dist/document/project.d.ts +2 -2
  297. package/dist/document/project.d.ts.map +1 -1
  298. package/dist/document/project.js.map +1 -1
  299. package/dist/document/registry.d.ts +17 -0
  300. package/dist/document/registry.d.ts.map +1 -1
  301. package/dist/document/registry.js +29 -2
  302. package/dist/document/registry.js.map +1 -1
  303. package/dist/document/timeline-patch.js.map +1 -1
  304. package/dist/document/timeline.d.ts +73 -18
  305. package/dist/document/timeline.d.ts.map +1 -1
  306. package/dist/document/timeline.js +192 -40
  307. package/dist/document/timeline.js.map +1 -1
  308. package/dist/document/types.d.ts +12 -12
  309. package/dist/document/types.d.ts.map +1 -1
  310. package/dist/document/types.js +2 -2
  311. package/dist/document/types.js.map +1 -1
  312. package/dist/document/validate.d.ts +2 -2
  313. package/dist/document/validate.d.ts.map +1 -1
  314. package/dist/document/validate.js +37 -31
  315. package/dist/document/validate.js.map +1 -1
  316. package/dist/document/withdraw.d.ts +28 -0
  317. package/dist/document/withdraw.d.ts.map +1 -0
  318. package/dist/document/withdraw.js +61 -0
  319. package/dist/document/withdraw.js.map +1 -0
  320. package/dist/index.d.ts +1 -0
  321. package/dist/index.d.ts.map +1 -1
  322. package/dist/index.js +1 -0
  323. package/dist/index.js.map +1 -1
  324. package/dist/jsx/jsx-dev-runtime.js.map +1 -1
  325. package/dist/jsx/jsx-runtime.d.ts +9 -1
  326. package/dist/jsx/jsx-runtime.d.ts.map +1 -1
  327. package/dist/jsx/jsx-runtime.js +13 -3
  328. package/dist/jsx/jsx-runtime.js.map +1 -1
  329. package/dist/layout/bounds.d.ts +0 -1
  330. package/dist/layout/bounds.d.ts.map +1 -1
  331. package/dist/layout/bounds.js.map +1 -1
  332. package/dist/layout/constraints.js.map +1 -1
  333. package/dist/layout/flex.d.ts +4 -2
  334. package/dist/layout/flex.d.ts.map +1 -1
  335. package/dist/layout/flex.js +27 -11
  336. package/dist/layout/flex.js.map +1 -1
  337. package/dist/layout/freeform.js.map +1 -1
  338. package/dist/layout/grid.js.map +1 -1
  339. package/dist/layout/index.js.map +1 -1
  340. package/dist/layout/item.js.map +1 -1
  341. package/dist/layout/ops.d.ts +6 -0
  342. package/dist/layout/ops.d.ts.map +1 -1
  343. package/dist/layout/ops.js +6 -0
  344. package/dist/layout/ops.js.map +1 -1
  345. package/dist/layout/types.js.map +1 -1
  346. package/dist/nodes/2d/node-lifecycle.js.map +1 -1
  347. package/dist/nodes/2d/node-motion.js.map +1 -1
  348. package/dist/nodes/2d/node-render.d.ts +3 -3
  349. package/dist/nodes/2d/node-render.d.ts.map +1 -1
  350. package/dist/nodes/2d/node-render.js.map +1 -1
  351. package/dist/nodes/2d/node-transform.js.map +1 -1
  352. package/dist/nodes/2d/node2d.d.ts +115 -3
  353. package/dist/nodes/2d/node2d.d.ts.map +1 -1
  354. package/dist/nodes/2d/node2d.js +180 -28
  355. package/dist/nodes/2d/node2d.js.map +1 -1
  356. package/dist/nodes/2d/paint-node.d.ts +27 -0
  357. package/dist/nodes/2d/paint-node.d.ts.map +1 -1
  358. package/dist/nodes/2d/paint-node.js +42 -0
  359. package/dist/nodes/2d/paint-node.js.map +1 -1
  360. package/dist/nodes/audio/audio-bus.js.map +1 -1
  361. package/dist/nodes/audio/index.js.map +1 -1
  362. package/dist/nodes/audio/node-audio.js.map +1 -1
  363. package/dist/nodes/audio/sound-node.d.ts +2 -2
  364. package/dist/nodes/audio/sound-node.d.ts.map +1 -1
  365. package/dist/nodes/audio/sound-node.js +1 -1
  366. package/dist/nodes/audio/sound-node.js.map +1 -1
  367. package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
  368. package/dist/nodes/geometry/bounds-shape-node.js +2 -2
  369. package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
  370. package/dist/nodes/geometry/box-path-node.d.ts +3 -3
  371. package/dist/nodes/geometry/box-path-node.js +2 -2
  372. package/dist/nodes/geometry/box-path-node.js.map +1 -1
  373. package/dist/nodes/geometry/ellipse-node.js.map +1 -1
  374. package/dist/nodes/geometry/group-bounds.d.ts +2 -2
  375. package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
  376. package/dist/nodes/geometry/group-bounds.js +1 -2
  377. package/dist/nodes/geometry/group-bounds.js.map +1 -1
  378. package/dist/nodes/geometry/path-node.d.ts.map +1 -1
  379. package/dist/nodes/geometry/path-node.js +6 -0
  380. package/dist/nodes/geometry/path-node.js.map +1 -1
  381. package/dist/nodes/geometry/polygon-node.js.map +1 -1
  382. package/dist/nodes/geometry/polygram-node.js.map +1 -1
  383. package/dist/nodes/geometry/rect-node.js.map +1 -1
  384. package/dist/nodes/geometry/shape-node.js.map +1 -1
  385. package/dist/nodes/geometry/shape-outline.d.ts +2 -2
  386. package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
  387. package/dist/nodes/geometry/shape-outline.js +2 -13
  388. package/dist/nodes/geometry/shape-outline.js.map +1 -1
  389. package/dist/nodes/index.d.ts +3 -8
  390. package/dist/nodes/index.d.ts.map +1 -1
  391. package/dist/nodes/index.js +3 -8
  392. package/dist/nodes/index.js.map +1 -1
  393. package/dist/nodes/layout/camera-node.d.ts +9 -0
  394. package/dist/nodes/layout/camera-node.d.ts.map +1 -1
  395. package/dist/nodes/layout/camera-node.js +38 -3
  396. package/dist/nodes/layout/camera-node.js.map +1 -1
  397. package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
  398. package/dist/nodes/layout/orbit-camera-node.js +1 -1
  399. package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
  400. package/dist/nodes/layout/rotated-box.js.map +1 -1
  401. package/dist/nodes/media/video-node.d.ts.map +1 -1
  402. package/dist/nodes/media/video-node.js +2 -0
  403. package/dist/nodes/media/video-node.js.map +1 -1
  404. package/dist/nodes/node/declare-paints.js.map +1 -1
  405. package/dist/nodes/node/node-editor-state.js.map +1 -1
  406. package/dist/nodes/node/node-reactive.js.map +1 -1
  407. package/dist/nodes/node/node-time.d.ts +3 -3
  408. package/dist/nodes/node/node-time.d.ts.map +1 -1
  409. package/dist/nodes/node/node-time.js +1 -1
  410. package/dist/nodes/node/node-time.js.map +1 -1
  411. package/dist/nodes/node/node-walk.js.map +1 -1
  412. package/dist/nodes/node/node.d.ts +5 -3
  413. package/dist/nodes/node/node.d.ts.map +1 -1
  414. package/dist/nodes/node/node.js +44 -19
  415. package/dist/nodes/node/node.js.map +1 -1
  416. package/dist/nodes/node/text-defaults.d.ts +10 -12
  417. package/dist/nodes/node/text-defaults.d.ts.map +1 -1
  418. package/dist/nodes/node/text-defaults.js +10 -12
  419. package/dist/nodes/node/text-defaults.js.map +1 -1
  420. package/dist/nodes/{scene → root}/canvas2d-node.d.ts +2 -2
  421. package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
  422. package/dist/nodes/{scene → root}/canvas2d-node.js +2 -2
  423. package/dist/nodes/root/canvas2d-node.js.map +1 -0
  424. package/dist/nodes/root/provider-node.d.ts.map +1 -0
  425. package/dist/nodes/root/provider-node.js.map +1 -0
  426. package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
  427. package/dist/nodes/root/theme-provider-node.js.map +1 -0
  428. package/dist/nodes/text/default-text-style-node.d.ts +5 -2
  429. package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
  430. package/dist/nodes/text/default-text-style-node.js +10 -4
  431. package/dist/nodes/text/default-text-style-node.js.map +1 -1
  432. package/dist/nodes/text/number-format.d.ts +1 -1
  433. package/dist/nodes/text/number-format.js +1 -1
  434. package/dist/nodes/text/number-format.js.map +1 -1
  435. package/dist/nodes/text/number-node.js.map +1 -1
  436. package/dist/nodes/text/number-pattern.js.map +1 -1
  437. package/dist/nodes/text/richtext-node.js +1 -1
  438. package/dist/nodes/text/richtext-node.js.map +1 -1
  439. package/dist/nodes/text/text-base.d.ts.map +1 -1
  440. package/dist/nodes/text/text-base.js +1 -1
  441. package/dist/nodes/text/text-base.js.map +1 -1
  442. package/dist/nodes/text/text-node.js.map +1 -1
  443. package/dist/nodes/text/text-selection.js.map +1 -1
  444. package/dist/nodes/three/camera-nodes.d.ts +21 -3
  445. package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
  446. package/dist/nodes/three/camera-nodes.js +42 -1
  447. package/dist/nodes/three/camera-nodes.js.map +1 -1
  448. package/dist/nodes/three/canvas3d-node.d.ts +29 -6
  449. package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
  450. package/dist/nodes/three/canvas3d-node.js +44 -2
  451. package/dist/nodes/three/canvas3d-node.js.map +1 -1
  452. package/dist/nodes/three/drawable-nodes.d.ts +25 -11
  453. package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
  454. package/dist/nodes/three/drawable-nodes.js +43 -13
  455. package/dist/nodes/three/drawable-nodes.js.map +1 -1
  456. package/dist/nodes/three/environment-nodes.d.ts +9 -3
  457. package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
  458. package/dist/nodes/three/environment-nodes.js.map +1 -1
  459. package/dist/nodes/three/geometry-nodes.d.ts +2 -2
  460. package/dist/nodes/three/geometry-nodes.js +2 -2
  461. package/dist/nodes/three/geometry-nodes.js.map +1 -1
  462. package/dist/nodes/three/grid-geometry3d.js.map +1 -1
  463. package/dist/nodes/three/group3d.js.map +1 -1
  464. package/dist/nodes/three/light-nodes.d.ts.map +1 -1
  465. package/dist/nodes/three/light-nodes.js +3 -3
  466. package/dist/nodes/three/light-nodes.js.map +1 -1
  467. package/dist/nodes/three/mesh3d.js.map +1 -1
  468. package/dist/nodes/three/node3d.d.ts +48 -0
  469. package/dist/nodes/three/node3d.d.ts.map +1 -1
  470. package/dist/nodes/three/node3d.js +53 -3
  471. package/dist/nodes/three/node3d.js.map +1 -1
  472. package/dist/platform/audio-sink.d.ts +2 -2
  473. package/dist/platform/audio-sink.d.ts.map +1 -1
  474. package/dist/platform/audio-sink.js.map +1 -1
  475. package/dist/platform/exporter.d.ts +13 -8
  476. package/dist/platform/exporter.d.ts.map +1 -1
  477. package/dist/platform/exporter.js.map +1 -1
  478. package/dist/platform/index.d.ts +1 -1
  479. package/dist/platform/index.d.ts.map +1 -1
  480. package/dist/platform/index.js.map +1 -1
  481. package/dist/platform/stepped-clock.js.map +1 -1
  482. package/dist/platform/storage-adapter.d.ts +12 -6
  483. package/dist/platform/storage-adapter.d.ts.map +1 -1
  484. package/dist/platform/storage-adapter.js +4 -0
  485. package/dist/platform/storage-adapter.js.map +1 -1
  486. package/dist/platform/ticker.d.ts +6 -0
  487. package/dist/platform/ticker.d.ts.map +1 -1
  488. package/dist/platform/ticker.js +6 -0
  489. package/dist/platform/ticker.js.map +1 -1
  490. package/dist/project/config.js.map +1 -1
  491. package/dist/project/index.js.map +1 -1
  492. package/dist/project/tree.d.ts +3 -3
  493. package/dist/project/tree.d.ts.map +1 -1
  494. package/dist/project/tree.js.map +1 -1
  495. package/dist/props/host.js.map +1 -1
  496. package/dist/props/index.js.map +1 -1
  497. package/dist/props/observer.js.map +1 -1
  498. package/dist/props/slot.js.map +1 -1
  499. package/dist/renamed-scene-names.d.ts +17 -0
  500. package/dist/renamed-scene-names.d.ts.map +1 -0
  501. package/dist/renamed-scene-names.js +9 -0
  502. package/dist/renamed-scene-names.js.map +1 -0
  503. package/dist/render/canvas-render-context2d.d.ts +2 -2
  504. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  505. package/dist/render/canvas-render-context2d.js.map +1 -1
  506. package/dist/render/clip-contains.js.map +1 -1
  507. package/dist/render/clip.js.map +1 -1
  508. package/dist/render/descriptors/ellipse.js.map +1 -1
  509. package/dist/render/descriptors/latex.js.map +1 -1
  510. package/dist/render/descriptors/line.js.map +1 -1
  511. package/dist/render/descriptors/path-builder.js.map +1 -1
  512. package/dist/render/descriptors/path.js.map +1 -1
  513. package/dist/render/descriptors/polygon.js.map +1 -1
  514. package/dist/render/descriptors/polygram.js.map +1 -1
  515. package/dist/render/descriptors/rect.js.map +1 -1
  516. package/dist/render/descriptors/richtext.js.map +1 -1
  517. package/dist/render/descriptors/shape.d.ts +12 -0
  518. package/dist/render/descriptors/shape.d.ts.map +1 -1
  519. package/dist/render/descriptors/shape.js.map +1 -1
  520. package/dist/render/descriptors/text.d.ts +2 -2
  521. package/dist/render/descriptors/text.js +2 -2
  522. package/dist/render/descriptors/text.js.map +1 -1
  523. package/dist/render/descriptors/transform.d.ts +2 -2
  524. package/dist/render/descriptors/transform.d.ts.map +1 -1
  525. package/dist/render/descriptors/transform.js.map +1 -1
  526. package/dist/render/graphics2d.d.ts +3 -3
  527. package/dist/render/graphics2d.d.ts.map +1 -1
  528. package/dist/render/graphics2d.js +1 -1
  529. package/dist/render/graphics2d.js.map +1 -1
  530. package/dist/render/index.js.map +1 -1
  531. package/dist/render/measure-context.js.map +1 -1
  532. package/dist/render/null-render-context.js.map +1 -1
  533. package/dist/render/render-context2d.d.ts +2 -2
  534. package/dist/render/render-context2d.d.ts.map +1 -1
  535. package/dist/render/render-context2d.js.map +1 -1
  536. package/dist/render/surface.js.map +1 -1
  537. package/dist/render/text-defaults.js.map +1 -1
  538. package/dist/render/text-layout.js.map +1 -1
  539. package/dist/render3d/bounds3d.d.ts.map +1 -1
  540. package/dist/render3d/bounds3d.js +4 -2
  541. package/dist/render3d/bounds3d.js.map +1 -1
  542. package/dist/render3d/builders.js.map +1 -1
  543. package/dist/render3d/camera.d.ts +6 -0
  544. package/dist/render3d/camera.d.ts.map +1 -1
  545. package/dist/render3d/camera.js +5 -3
  546. package/dist/render3d/camera.js.map +1 -1
  547. package/dist/render3d/fill3d.d.ts +2 -9
  548. package/dist/render3d/fill3d.d.ts.map +1 -1
  549. package/dist/render3d/fill3d.js +2 -13
  550. package/dist/render3d/fill3d.js.map +1 -1
  551. package/dist/render3d/geometry.d.ts +8 -1
  552. package/dist/render3d/geometry.d.ts.map +1 -1
  553. package/dist/render3d/geometry.js.map +1 -1
  554. package/dist/render3d/graphics3d.d.ts +8 -4
  555. package/dist/render3d/graphics3d.d.ts.map +1 -1
  556. package/dist/render3d/graphics3d.js +18 -10
  557. package/dist/render3d/graphics3d.js.map +1 -1
  558. package/dist/render3d/index.d.ts +1 -1
  559. package/dist/render3d/index.js +1 -1
  560. package/dist/render3d/index.js.map +1 -1
  561. package/dist/render3d/inert.d.ts +14 -0
  562. package/dist/render3d/inert.d.ts.map +1 -0
  563. package/dist/render3d/inert.js +62 -0
  564. package/dist/render3d/inert.js.map +1 -0
  565. package/dist/render3d/light.js.map +1 -1
  566. package/dist/render3d/material.d.ts +10 -5
  567. package/dist/render3d/material.d.ts.map +1 -1
  568. package/dist/render3d/material.js.map +1 -1
  569. package/dist/render3d/matrix4.js.map +1 -1
  570. package/dist/render3d/render-context3d.js.map +1 -1
  571. package/dist/render3d/resources.js.map +1 -1
  572. package/dist/render3d/rounded-box.js.map +1 -1
  573. package/dist/render3d/scene-settings.d.ts +23 -4
  574. package/dist/render3d/scene-settings.d.ts.map +1 -1
  575. package/dist/render3d/scene-settings.js.map +1 -1
  576. package/dist/render3d/scene3d.d.ts +11 -0
  577. package/dist/render3d/scene3d.d.ts.map +1 -1
  578. package/dist/render3d/scene3d.js +39 -6
  579. package/dist/render3d/scene3d.js.map +1 -1
  580. package/dist/render3d/segments.js.map +1 -1
  581. package/dist/render3d/texture.d.ts +9 -0
  582. package/dist/render3d/texture.d.ts.map +1 -1
  583. package/dist/render3d/texture.js +13 -0
  584. package/dist/render3d/texture.js.map +1 -1
  585. package/dist/render3d/tracking.js.map +1 -1
  586. package/dist/render3d/transform.d.ts +1 -1
  587. package/dist/render3d/transform.js.map +1 -1
  588. package/dist/render3d/vector3.d.ts +18 -1
  589. package/dist/render3d/vector3.d.ts.map +1 -1
  590. package/dist/render3d/vector3.js +27 -0
  591. package/dist/render3d/vector3.js.map +1 -1
  592. package/dist/render3d/walk.d.ts +1 -1
  593. package/dist/render3d/walk.d.ts.map +1 -1
  594. package/dist/render3d/walk.js +5 -1
  595. package/dist/render3d/walk.js.map +1 -1
  596. package/dist/runtime/asset-refine.js.map +1 -1
  597. package/dist/runtime/asset-timeline.js.map +1 -1
  598. package/dist/runtime/asset-update.js.map +1 -1
  599. package/dist/runtime/audio-index.js.map +1 -1
  600. package/dist/runtime/builtin-context.js.map +1 -1
  601. package/dist/runtime/clip-instance.d.ts +5 -3
  602. package/dist/runtime/clip-instance.d.ts.map +1 -1
  603. package/dist/runtime/clip-instance.js +10 -6
  604. package/dist/runtime/clip-instance.js.map +1 -1
  605. package/dist/runtime/clip-store.d.ts +9 -0
  606. package/dist/runtime/clip-store.d.ts.map +1 -1
  607. package/dist/runtime/clip-store.js +19 -0
  608. package/dist/runtime/clip-store.js.map +1 -1
  609. package/dist/runtime/engine.d.ts +5 -0
  610. package/dist/runtime/engine.d.ts.map +1 -1
  611. package/dist/runtime/engine.js +2 -0
  612. package/dist/runtime/engine.js.map +1 -1
  613. package/dist/runtime/frame-time.d.ts +31 -0
  614. package/dist/runtime/frame-time.d.ts.map +1 -0
  615. package/dist/runtime/frame-time.js +29 -0
  616. package/dist/runtime/frame-time.js.map +1 -0
  617. package/dist/runtime/index.d.ts +1 -0
  618. package/dist/runtime/index.d.ts.map +1 -1
  619. package/dist/runtime/index.js +1 -0
  620. package/dist/runtime/index.js.map +1 -1
  621. package/dist/runtime/node-picking.d.ts +44 -3
  622. package/dist/runtime/node-picking.d.ts.map +1 -1
  623. package/dist/runtime/node-picking.js +118 -3
  624. package/dist/runtime/node-picking.js.map +1 -1
  625. package/dist/runtime/node-picking3d.d.ts +2 -1
  626. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  627. package/dist/runtime/node-picking3d.js +5 -2
  628. package/dist/runtime/node-picking3d.js.map +1 -1
  629. package/dist/runtime/placement.d.ts.map +1 -1
  630. package/dist/runtime/placement.js +4 -5
  631. package/dist/runtime/placement.js.map +1 -1
  632. package/dist/runtime/playback-controller.d.ts +31 -2
  633. package/dist/runtime/playback-controller.d.ts.map +1 -1
  634. package/dist/runtime/playback-controller.js +63 -6
  635. package/dist/runtime/playback-controller.js.map +1 -1
  636. package/dist/runtime/playback.js.map +1 -1
  637. package/dist/runtime/precompisition.js.map +1 -1
  638. package/dist/runtime/project-assets.js.map +1 -1
  639. package/dist/runtime/session.d.ts +9 -7
  640. package/dist/runtime/session.d.ts.map +1 -1
  641. package/dist/runtime/session.js +12 -4
  642. package/dist/runtime/session.js.map +1 -1
  643. package/dist/runtime/settle.js.map +1 -1
  644. package/dist/runtime/state-evaluator.d.ts +1 -1
  645. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  646. package/dist/runtime/state-evaluator.js +4 -3
  647. package/dist/runtime/state-evaluator.js.map +1 -1
  648. package/dist/runtime/text-geometry.js.map +1 -1
  649. package/dist/sdk/index.d.ts +19 -15
  650. package/dist/sdk/index.d.ts.map +1 -1
  651. package/dist/sdk/index.js +11 -6
  652. package/dist/sdk/index.js.map +1 -1
  653. package/dist/tween/command-decorator.d.ts +2 -0
  654. package/dist/tween/command-decorator.d.ts.map +1 -1
  655. package/dist/tween/command-decorator.js.map +1 -1
  656. package/dist/tween/command.js.map +1 -1
  657. package/dist/tween/ease/constants.d.ts.map +1 -1
  658. package/dist/tween/ease/constants.js +8 -5
  659. package/dist/tween/ease/constants.js.map +1 -1
  660. package/dist/tween/ease/curve.d.ts.map +1 -1
  661. package/dist/tween/ease/curve.js +4 -3
  662. package/dist/tween/ease/curve.js.map +1 -1
  663. package/dist/tween/ease/describe.d.ts +15 -0
  664. package/dist/tween/ease/describe.d.ts.map +1 -0
  665. package/dist/tween/ease/describe.js +37 -0
  666. package/dist/tween/ease/describe.js.map +1 -0
  667. package/dist/tween/ease/type.js.map +1 -1
  668. package/dist/tween/index.js.map +1 -1
  669. package/dist/tween/inert.js.map +1 -1
  670. package/dist/tween/lerp.js.map +1 -1
  671. package/dist/tween/loop.js.map +1 -1
  672. package/dist/tween/prepare.d.ts +3 -3
  673. package/dist/tween/prepare.js +3 -3
  674. package/dist/tween/prepare.js.map +1 -1
  675. package/dist/tween/seekable.d.ts +1 -1
  676. package/dist/tween/seekable.js.map +1 -1
  677. package/dist/tween/stepper.js.map +1 -1
  678. package/dist/tween/to-command.js.map +1 -1
  679. package/dist/util/clamp.js.map +1 -1
  680. package/dist/util/context.js.map +1 -1
  681. package/dist/util/csv.js.map +1 -1
  682. package/dist/util/generateList.js.map +1 -1
  683. package/dist/util/index.js.map +1 -1
  684. package/dist/util/metrics.d.ts +1 -1
  685. package/dist/util/metrics.js +1 -1
  686. package/dist/util/metrics.js.map +1 -1
  687. package/dist/util/random.js.map +1 -1
  688. package/dist/util/reference.js.map +1 -1
  689. package/dist/util/scheduler.js.map +1 -1
  690. package/package.json +2 -1
  691. package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
  692. package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
  693. package/dist/attributes/shape/effects/implementations/displace.js +0 -30
  694. package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
  695. package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
  696. package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
  697. package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
  698. package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
  699. package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
  700. package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
  701. package/dist/attributes/shape/effects/implementations/texture.js +0 -25
  702. package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
  703. package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
  704. package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
  705. package/dist/attributes/shape/effects/implementations/trails.js +0 -22
  706. package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
  707. package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
  708. package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
  709. package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
  710. package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
  711. package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
  712. package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
  713. package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
  714. package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
  715. package/dist/nodes/geometry/dot-grid-node.js +0 -142
  716. package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
  717. package/dist/nodes/geometry/grid-lines.d.ts +0 -101
  718. package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
  719. package/dist/nodes/geometry/grid-lines.js +0 -128
  720. package/dist/nodes/geometry/grid-lines.js.map +0 -1
  721. package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
  722. package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
  723. package/dist/nodes/geometry/grid-pattern-node.js +0 -172
  724. package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
  725. package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
  726. package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
  727. package/dist/nodes/geometry/line-grid-node.js +0 -127
  728. package/dist/nodes/geometry/line-grid-node.js.map +0 -1
  729. package/dist/nodes/geometry/line-node.d.ts +0 -58
  730. package/dist/nodes/geometry/line-node.d.ts.map +0 -1
  731. package/dist/nodes/geometry/line-node.js +0 -123
  732. package/dist/nodes/geometry/line-node.js.map +0 -1
  733. package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
  734. package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
  735. package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
  736. package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
  737. package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
  738. package/dist/nodes/scene/canvas2d-node.js.map +0 -1
  739. package/dist/nodes/scene/provider-node.d.ts.map +0 -1
  740. package/dist/nodes/scene/provider-node.js.map +0 -1
  741. package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
  742. package/dist/nodes/scene/theme-provider-node.js.map +0 -1
  743. /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
  744. /package/dist/nodes/{scene → root}/provider-node.js +0 -0
  745. /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
  746. /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
@@ -0,0 +1,2 @@
1
+ function o(n,e,t){if(n===i){let r=e?.children??[];return Array.isArray(r)?r:[r]}if(typeof n=="function")return t===void 0||e?.key!==void 0?new n(e):new n({...e,key:String(t)});throw new Error("JSX element must be a Node class (e.g. <Rect />)")}var f=o,i=Symbol.for("motion.fragment");export{o as a,f as b,i as c};
2
+ //# sourceMappingURL=chunk-SFNJRPBV.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/jsx/jsx-runtime.ts"],
4
+ "sourcesContent": ["import type { Node } from \"@/nodes/node/node\";\r\nimport type { Reference } from \"../util/reference\";\r\n\r\n/**\r\n * The automatic JSX runtime's element factory.\r\n *\r\n * TypeScript lowers a `key` attribute to the third argument, not into `props`:\r\n * `<Rect key=\"card\" />` becomes `jsx(Rect, {}, \"card\")`. It is written to the\r\n * node's `key` unless `props` already carries one, so the spread form\r\n * (`<Rect {...{ key: \"card\" }} />`) means the same thing.\r\n */\r\nexport function jsx(type: any, props: any, key?: string | number) {\r\n // Fragment support\r\n if (type === Fragment) {\r\n const children = props?.children ?? [];\r\n // Wrap single child in array if it's not already an array\r\n return Array.isArray(children) ? children : [children];\r\n }\r\n\r\n // Class-based node\r\n if (typeof type === \"function\") {\r\n if (key === undefined || props?.key !== undefined) return new type(props);\r\n return new type({ ...props, key: String(key) });\r\n }\r\n\r\n throw new Error(\r\n \"JSX element must be a Node class (e.g. <Rect />)\"\r\n );\r\n}\r\n\r\nexport const jsxs = jsx;\r\nexport const Fragment = Symbol.for(\"motion.fragment\");\r\n\r\nexport namespace JSX {\r\n // The dimension-agnostic base, so both trees are valid JSX. Which children a\r\n // node will actually accept is a runtime check (`Node.acceptsChild`) rather\r\n // than a type-level one: `children` is one prop shared by every node, and\r\n // splitting JSX by dimension would mean two runtimes for one syntax.\r\n export type Element = Node;\r\n export interface ElementClass extends Node<any> { }\r\n export interface ElementChildrenAttribute { children: {} }\r\n export interface IntrinsicAttributes { ref?: Reference<any> }\r\n export interface IntrinsicElements { }\r\n}\r\n"],
5
+ "mappings": "AAWM,SAAUA,EAAIC,EAAWC,EAAYC,EAAqB,CAE5D,GAAIF,IAASG,EAAU,CACnB,IAAMC,EAAWH,GAAO,UAAY,CAAA,EAEpC,OAAO,MAAM,QAAQG,CAAQ,EAAIA,EAAW,CAACA,CAAQ,CACzD,CAGA,GAAI,OAAOJ,GAAS,WAChB,OAAIE,IAAQ,QAAaD,GAAO,MAAQ,OAAkB,IAAID,EAAKC,CAAK,EACjE,IAAID,EAAK,CAAE,GAAGC,EAAO,IAAK,OAAOC,CAAG,CAAC,CAAE,EAGlD,MAAM,IAAI,MACN,kDAAkD,CAE1D,CAEO,IAAMG,EAAON,EACPI,EAAW,OAAO,IAAI,iBAAiB",
6
+ "names": ["jsx", "type", "props", "key", "Fragment", "children", "jsxs"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{A as k,B as h,C as v,D as M,E as S,F as _,G as g,H as w,I as y,J as C,K as q,L as A,M as P,N as b,O as j,P as z,Q as B,R as D,S as E,T as F,U as G,V as H,u as l,y as d,z as x}from"./chunks/chunk-KJXGRHOL.js";function i(e,t){return{offset:e,part:t}}function J(e){return{duration:e,_stepper:()=>{let o=0;return{seek:n=>{o=n},advance:n=>(o+=n,o>=e)}}}}function K(...e){let t=0;return u(e.map(o=>{let n=i(t,o);return t+=o.duration,n}))}function L(...e){return u(e.map(t=>i(0,t)))}function N(e,t){let o=r=>{t(e>0?Math.min(Math.max(r/e,0),1):1)};return{duration:e,_stepper:()=>{let r=0;return{seek:p=>{r=p,o(p)},advance:p=>(r+=p,o(r),r>=e)}}}}function O(e,t=e.duration){let o=e._stepper(),n=Math.max(t,e.duration);return l(t,r=>o.seek(r*n))}function u(e){let t=e.reduce((n,r)=>Math.max(n,r.offset+r.part.duration),0);return{duration:t,_stepper:()=>{let n=e.map(a=>a.part._stepper()),r=0,p=a=>{for(let f=0;f<e.length;f++){let{offset:c,part:m}=e[f],s=Math.min(Math.max(a-c,0),m.duration);n[f].seek(s)}};return{seek:a=>{r=a,p(a)},advance:a=>(r+=a,p(r),r>=t)}}}}function R(e,t,o){let n=p=>{for(let a of p??[])t.fill(a.fill)},r=e;t.fill(r.fill??[]),t.fill(r.overlay??[]),n(r.stroke);for(let p of r.shadow??[])t.fill(p.fill);for(let p of o?.fills??[])t.fill(p);for(let p of o?.strokes??[])n(p)}export{w as MAX_FRACTION_DIGITS,g as NUMBER_NODE_FORMATS,M as NUMBER_PATTERNS,x as STAR_DEFAULT_POINTS,d as STAR_DEFAULT_RATIO,O as asCommand,i as at,z as cameraOrbit,u as compose,R as declarePaints,N as drive,H as enterBudget,S as formatNumber,v as hasShapeOutline,J as hold,F as hostTextFamily,q as lerpColor3D,P as lerpCount,A as lerpFinite,G as niceStep,y as numberNodePattern,B as orbitPosition,D as orbitProps,_ as patternFor,C as resolveColor3D,K as sequence,E as setHostTextFamily,h as shapeOutline,k as shapeOutlinePixels,j as snapFlag,b as snapValue,L as together};
1
+ import{A as k,B as h,C as v,D as M,E as S,F as _,G as g,H as w,I as y,J as C,K as q,L as A,M as P,N as b,O as j,P as z,Q as B,R as D,S as E,T as F,U as G,V as H,u as l,y as d,z as x}from"./chunks/chunk-QG6C23IJ.js";function i(e,t){return{offset:e,part:t}}function J(e){return{duration:e,_stepper:()=>{let o=0;return{seek:n=>{o=n},advance:n=>(o+=n,o>=e)}}}}function K(...e){let t=0;return u(e.map(o=>{let n=i(t,o);return t+=o.duration,n}))}function L(...e){return u(e.map(t=>i(0,t)))}function N(e,t){let o=r=>{t(e>0?Math.min(Math.max(r/e,0),1):1)};return{duration:e,_stepper:()=>{let r=0;return{seek:p=>{r=p,o(p)},advance:p=>(r+=p,o(r),r>=e)}}}}function O(e,t=e.duration){let o=e._stepper(),n=Math.max(t,e.duration);return l(t,r=>o.seek(r*n))}function u(e){let t=e.reduce((n,r)=>Math.max(n,r.offset+r.part.duration),0);return{duration:t,_stepper:()=>{let n=e.map(a=>a.part._stepper()),r=0,p=a=>{for(let f=0;f<e.length;f++){let{offset:c,part:m}=e[f],s=Math.min(Math.max(a-c,0),m.duration);n[f].seek(s)}};return{seek:a=>{r=a,p(a)},advance:a=>(r+=a,p(r),r>=t)}}}}function R(e,t,o){let n=p=>{for(let a of p??[])t.fill(a.fill)},r=e;t.fill(r.fill??[]),t.fill(r.overlay??[]),n(r.stroke);for(let p of r.shadow??[])t.fill(p.fill);for(let p of o?.fills??[])t.fill(p);for(let p of o?.strokes??[])n(p)}export{w as MAX_FRACTION_DIGITS,g as NUMBER_NODE_FORMATS,M as NUMBER_PATTERNS,x as STAR_DEFAULT_POINTS,d as STAR_DEFAULT_RATIO,O as asCommand,i as at,z as cameraOrbit,u as compose,R as declarePaints,N as drive,H as enterBudget,S as formatNumber,v as hasShapeOutline,J as hold,F as hostTextFamily,q as lerpColor3D,P as lerpCount,A as lerpFinite,G as niceStep,y as numberNodePattern,B as orbitPosition,D as orbitProps,_ as patternFor,C as resolveColor3D,K as sequence,E as setHostTextFamily,h as shapeOutline,k as shapeOutlinePixels,j as snapFlag,b as snapValue,L as together};
2
2
  //# sourceMappingURL=component.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/tween/seekable.ts", "../../src/nodes/node/declare-paints.ts"],
4
- "sourcesContent": ["import { driveCommand, type Command } from \"./command\"\nimport type { Steppable, TweenStepper } from \"./stepper\"\n\n/**\n * Choreography that can be **asked** what it looks like at a time.\n *\n * A node's entrance is usually a stagger: markers landing one after another, a\n * caption following them, a legend after that. Written as a generator — `yield*\n * parallel(...)` over per-item `wait` + `to` — the offsets exist only while it\n * runs, so the only way to know what it looks like 0.4s in is to run it from\n * zero. That is what makes a chart scene fall back to replay-based scrubbing.\n *\n * The offsets are static, though. Nothing about a stagger needs to be discovered\n * by running it. {@link compose} keeps the same parts at the same offsets and\n * hands back something seekable, so a host can jump straight to a time.\n *\n * Each part writes to **its own node**, which is why this is not\n * `commandSequence` from motion-script: that composes one node's props by\n * merging `Partial<P>`, and an axis entrance is a dozen nodes moving at once\n * with nothing to merge. Composing steppers instead lets each part write where\n * it already writes.\n */\n\n/** Something seekable that knows how long it runs. */\nexport interface Seekable extends Steppable {\n readonly duration: number\n}\n\n/** A part, and how far into the composite it starts. */\nexport interface Placed {\n offset: number\n part: Seekable\n}\n\n/** Sugar for {@link compose}: `at(0.2, node.to(...))`. */\nexport function at(offset: number, part: Seekable): Placed {\n return { offset, part }\n}\n\n/**\n * A part that writes nothing for `seconds` — the seekable `wait`.\n *\n * What the no-op branch of a command returns. A command's duration is the slot\n * the timeline lays out for it and the length its parallel siblings are timed\n * against, so a call that happens to have nothing to do still has to take its\n * time; returning something shorter would pull the rest of the scene forward.\n */\nexport function hold(seconds: number): Seekable {\n const makeStepper = (): TweenStepper => {\n let elapsed = 0\n return {\n seek: (s: number) => {\n elapsed = s\n },\n advance: (dt: number): boolean => {\n elapsed += dt\n return elapsed >= seconds\n },\n }\n }\n\n return {\n duration: seconds,\n _stepper: makeStepper,\n }\n}\n\n/** Run `parts` end to end, each starting where the previous one finished. */\nexport function sequence(...parts: Seekable[]): Seekable {\n let cursor = 0\n return compose(\n parts.map((part) => {\n const placed = at(cursor, part)\n cursor += part.duration\n return placed\n })\n )\n}\n\n/** Run `parts` together, all starting at the composite's own start. */\nexport function together(...parts: Seekable[]): Seekable {\n return compose(parts.map((part) => at(0, part)))\n}\n\n/**\n * A seekable `tween`: calls `apply(t)` with `t` running 0 → 1 over `seconds`.\n *\n * The escape hatch for state a `to` cannot reach — a plain field, an array\n * element, anything that is not one of the node's own reactive props. That is\n * most of what the chart commands were using `tween()` for, and `tween()` is a\n * generator, so it was also most of what kept them un-drivable.\n *\n * `apply` **must be a pure function of `t`**. It is called for any `t`, in any\n * order, more than once for the same value, and — unlike a generator's body — it\n * is not run once per frame in sequence. Accumulating into what it writes (`x +=\n * …`) rather than assigning from `t` is the one way to misuse this, and it will\n * look right playing forwards and drift the moment anything scrubs.\n */\nexport function drive(\n seconds: number,\n apply: (t: number) => void\n): Seekable {\n const at = (elapsed: number): void => {\n apply(seconds > 0 ? Math.min(Math.max(elapsed / seconds, 0), 1) : 1)\n }\n\n const makeStepper = (): TweenStepper => {\n let elapsed = 0\n return {\n seek: (s: number) => {\n elapsed = s\n at(s)\n },\n advance: (dt: number): boolean => {\n elapsed += dt\n at(elapsed)\n return elapsed >= seconds\n },\n }\n }\n\n return {\n duration: seconds,\n _stepper: makeStepper,\n }\n}\n\n/**\n * `part` as the {@link Command} a `@command()` method returns, which is what a\n * document's timeline evaluates: a `Seekable` has no `at`.\n *\n * `duration` is the slot the command was given. A part that ends sooner holds its\n * last frame for the rest of it, and one that runs longer is played faster, so\n * the command's end is always the part's end — the state the next command on the\n * node is built against. The part is prepared here, when the command is built.\n */\nexport function asCommand(\n part: Seekable,\n duration: number = part.duration\n): Command<Record<string, never>> {\n const stepper = part._stepper()\n const span = Math.max(duration, part.duration)\n return driveCommand(duration, (t) => stepper.seek(t * span))\n}\n\n/**\n * Combine placed parts into one seekable whole.\n *\n * Every part is seeked on every evaluation, not just the ones that have started:\n * a part still ahead of the playhead is held at its own zero, which is the state\n * it was prepared against and therefore the state that should precede it.\n * Skipping it would leave whatever a *later* evaluation wrote sitting there when\n * the playhead came back.\n */\nexport function compose(parts: Placed[]): Seekable {\n const duration = parts.reduce(\n (max, p) => Math.max(max, p.offset + p.part.duration),\n 0\n )\n\n const makeStepper = (): TweenStepper => {\n // Prepared once. Preparing is what snapshots each part's `from` off its live\n // node, so doing it per seek would make the answer depend on where the\n // playhead came from rather than on the time asked for.\n const steppers = parts.map((p) => p.part._stepper())\n let elapsed = 0\n\n const applyAt = (seconds: number): void => {\n for (let i = 0; i < parts.length; i++) {\n const { offset, part } = parts[i]\n const local = Math.min(Math.max(seconds - offset, 0), part.duration)\n steppers[i].seek(local)\n }\n }\n\n return {\n seek: (seconds: number) => {\n elapsed = seconds\n applyAt(seconds)\n },\n advance: (dt: number): boolean => {\n elapsed += dt\n applyAt(elapsed)\n return elapsed >= duration\n },\n }\n }\n\n return {\n duration,\n _stepper: makeStepper,\n }\n}\n", "import type { AssetScope } from \"@/assets/scope\"\nimport type { FillResolved } from \"@/attributes/shape/fill/union\"\nimport type { ShadowResolved } from \"@/attributes/shape/shadow/shadow\"\nimport type { StrokeResolved } from \"@/attributes/shape/stroke/stroke\"\n\n/** The paints a node computes rather than stores, which no convention can find. */\nexport interface ExtraPaints {\n fills?: readonly FillResolved[][]\n strokes?: readonly StrokeResolved[][]\n}\n\n/**\n * Declare the assets of a node's paint props.\n *\n * `PaintNode` does this for the slots it owns. The chart and diagram internals\n * extend `Node` directly — they draw a raw `Graphics` and want none of a shape's\n * clip or layout — and so inherit no such declaration while still carrying\n * `fill`/`stroke`/`shadow` props of their own; an undeclared asset there is an\n * `AssetNotLoadedError` the moment the renderer reaches for it.\n */\nexport function declarePaints(node: object, assets: AssetScope, extra?: ExtraPaints): void {\n const stroked = (strokes: readonly StrokeResolved[] | undefined): void => {\n for (const stroke of strokes ?? []) assets.fill(stroke.fill)\n }\n\n // Conventional prop names, each already resolved by its `@property` mapper.\n const held = node as {\n fill?: FillResolved[]\n overlay?: FillResolved[]\n stroke?: StrokeResolved[]\n shadow?: ShadowResolved[]\n }\n assets.fill(held.fill ?? [])\n assets.fill(held.overlay ?? [])\n stroked(held.stroke)\n for (const shadow of held.shadow ?? []) assets.fill(shadow.fill)\n\n for (const fills of extra?.fills ?? []) assets.fill(fills)\n for (const strokes of extra?.strokes ?? []) stroked(strokes)\n}\n"],
4
+ "sourcesContent": ["import { driveCommand, type Command } from \"./command\"\r\nimport type { Steppable, TweenStepper } from \"./stepper\"\r\n\r\n/**\r\n * Choreography that can be **asked** what it looks like at a time.\r\n *\r\n * A node's entrance is usually a stagger: markers landing one after another, a\r\n * caption following them, a legend after that. Written as a generator — `yield*\r\n * parallel(...)` over per-item `wait` + `to` — the offsets exist only while it\r\n * runs, so the only way to know what it looks like 0.4s in is to run it from\r\n * zero. That is what makes a chart scene fall back to replay-based scrubbing.\r\n *\r\n * The offsets are static, though. Nothing about a stagger needs to be discovered\r\n * by running it. {@link compose} keeps the same parts at the same offsets and\r\n * hands back something seekable, so a host can jump straight to a time.\r\n *\r\n * Each part writes to **its own node**, which is why this is not\r\n * `commandSequence`: that composes one node's props by\r\n * merging `Partial<P>`, and an axis entrance is a dozen nodes moving at once\r\n * with nothing to merge. Composing steppers instead lets each part write where\r\n * it already writes.\r\n */\r\n\r\n/** Something seekable that knows how long it runs. */\r\nexport interface Seekable extends Steppable {\r\n readonly duration: number\r\n}\r\n\r\n/** A part, and how far into the composite it starts. */\r\nexport interface Placed {\r\n offset: number\r\n part: Seekable\r\n}\r\n\r\n/** Sugar for {@link compose}: `at(0.2, node.to(...))`. */\r\nexport function at(offset: number, part: Seekable): Placed {\r\n return { offset, part }\r\n}\r\n\r\n/**\r\n * A part that writes nothing for `seconds` — the seekable `wait`.\r\n *\r\n * What the no-op branch of a command returns. A command's duration is the slot\r\n * the timeline lays out for it and the length its parallel siblings are timed\r\n * against, so a call that happens to have nothing to do still has to take its\r\n * time; returning something shorter would pull the rest of the scene forward.\r\n */\r\nexport function hold(seconds: number): Seekable {\r\n const makeStepper = (): TweenStepper => {\r\n let elapsed = 0\r\n return {\r\n seek: (s: number) => {\r\n elapsed = s\r\n },\r\n advance: (dt: number): boolean => {\r\n elapsed += dt\r\n return elapsed >= seconds\r\n },\r\n }\r\n }\r\n\r\n return {\r\n duration: seconds,\r\n _stepper: makeStepper,\r\n }\r\n}\r\n\r\n/** Run `parts` end to end, each starting where the previous one finished. */\r\nexport function sequence(...parts: Seekable[]): Seekable {\r\n let cursor = 0\r\n return compose(\r\n parts.map((part) => {\r\n const placed = at(cursor, part)\r\n cursor += part.duration\r\n return placed\r\n })\r\n )\r\n}\r\n\r\n/** Run `parts` together, all starting at the composite's own start. */\r\nexport function together(...parts: Seekable[]): Seekable {\r\n return compose(parts.map((part) => at(0, part)))\r\n}\r\n\r\n/**\r\n * A seekable `tween`: calls `apply(t)` with `t` running 0 → 1 over `seconds`.\r\n *\r\n * The escape hatch for state a `to` cannot reach — a plain field, an array\r\n * element, anything that is not one of the node's own reactive props. That is\r\n * most of what the chart commands were using `tween()` for, and `tween()` is a\r\n * generator, so it was also most of what kept them un-drivable.\r\n *\r\n * `apply` **must be a pure function of `t`**. It is called for any `t`, in any\r\n * order, more than once for the same value, and — unlike a generator's body — it\r\n * is not run once per frame in sequence. Accumulating into what it writes (`x +=\r\n * …`) rather than assigning from `t` is the one way to misuse this, and it will\r\n * look right playing forwards and drift the moment anything scrubs.\r\n */\r\nexport function drive(\r\n seconds: number,\r\n apply: (t: number) => void\r\n): Seekable {\r\n const at = (elapsed: number): void => {\r\n apply(seconds > 0 ? Math.min(Math.max(elapsed / seconds, 0), 1) : 1)\r\n }\r\n\r\n const makeStepper = (): TweenStepper => {\r\n let elapsed = 0\r\n return {\r\n seek: (s: number) => {\r\n elapsed = s\r\n at(s)\r\n },\r\n advance: (dt: number): boolean => {\r\n elapsed += dt\r\n at(elapsed)\r\n return elapsed >= seconds\r\n },\r\n }\r\n }\r\n\r\n return {\r\n duration: seconds,\r\n _stepper: makeStepper,\r\n }\r\n}\r\n\r\n/**\r\n * `part` as the {@link Command} a `@command()` method returns, which is what a\r\n * document's timeline evaluates: a `Seekable` has no `at`.\r\n *\r\n * `duration` is the slot the command was given. A part that ends sooner holds its\r\n * last frame for the rest of it, and one that runs longer is played faster, so\r\n * the command's end is always the part's end — the state the next command on the\r\n * node is built against. The part is prepared here, when the command is built.\r\n */\r\nexport function asCommand(\r\n part: Seekable,\r\n duration: number = part.duration\r\n): Command<Record<string, never>> {\r\n const stepper = part._stepper()\r\n const span = Math.max(duration, part.duration)\r\n return driveCommand(duration, (t) => stepper.seek(t * span))\r\n}\r\n\r\n/**\r\n * Combine placed parts into one seekable whole.\r\n *\r\n * Every part is seeked on every evaluation, not just the ones that have started:\r\n * a part still ahead of the playhead is held at its own zero, which is the state\r\n * it was prepared against and therefore the state that should precede it.\r\n * Skipping it would leave whatever a *later* evaluation wrote sitting there when\r\n * the playhead came back.\r\n */\r\nexport function compose(parts: Placed[]): Seekable {\r\n const duration = parts.reduce(\r\n (max, p) => Math.max(max, p.offset + p.part.duration),\r\n 0\r\n )\r\n\r\n const makeStepper = (): TweenStepper => {\r\n // Prepared once. Preparing is what snapshots each part's `from` off its live\r\n // node, so doing it per seek would make the answer depend on where the\r\n // playhead came from rather than on the time asked for.\r\n const steppers = parts.map((p) => p.part._stepper())\r\n let elapsed = 0\r\n\r\n const applyAt = (seconds: number): void => {\r\n for (let i = 0; i < parts.length; i++) {\r\n const { offset, part } = parts[i]\r\n const local = Math.min(Math.max(seconds - offset, 0), part.duration)\r\n steppers[i].seek(local)\r\n }\r\n }\r\n\r\n return {\r\n seek: (seconds: number) => {\r\n elapsed = seconds\r\n applyAt(seconds)\r\n },\r\n advance: (dt: number): boolean => {\r\n elapsed += dt\r\n applyAt(elapsed)\r\n return elapsed >= duration\r\n },\r\n }\r\n }\r\n\r\n return {\r\n duration,\r\n _stepper: makeStepper,\r\n }\r\n}\r\n", "import type { AssetScope } from \"@/assets/scope\"\r\nimport type { FillResolved } from \"@/attributes/shape/fill/union\"\r\nimport type { ShadowResolved } from \"@/attributes/shape/shadow/shadow\"\r\nimport type { StrokeResolved } from \"@/attributes/shape/stroke/stroke\"\r\n\r\n/** The paints a node computes rather than stores, which no convention can find. */\r\nexport interface ExtraPaints {\r\n fills?: readonly FillResolved[][]\r\n strokes?: readonly StrokeResolved[][]\r\n}\r\n\r\n/**\r\n * Declare the assets of a node's paint props.\r\n *\r\n * `PaintNode` does this for the slots it owns. The chart and diagram internals\r\n * extend `Node` directly — they draw a raw `Graphics` and want none of a shape's\r\n * clip or layout — and so inherit no such declaration while still carrying\r\n * `fill`/`stroke`/`shadow` props of their own; an undeclared asset there is an\r\n * `AssetNotLoadedError` the moment the renderer reaches for it.\r\n */\r\nexport function declarePaints(node: object, assets: AssetScope, extra?: ExtraPaints): void {\r\n const stroked = (strokes: readonly StrokeResolved[] | undefined): void => {\r\n for (const stroke of strokes ?? []) assets.fill(stroke.fill)\r\n }\r\n\r\n // Conventional prop names, each already resolved by its `@property` mapper.\r\n const held = node as {\r\n fill?: FillResolved[]\r\n overlay?: FillResolved[]\r\n stroke?: StrokeResolved[]\r\n shadow?: ShadowResolved[]\r\n }\r\n assets.fill(held.fill ?? [])\r\n assets.fill(held.overlay ?? [])\r\n stroked(held.stroke)\r\n for (const shadow of held.shadow ?? []) assets.fill(shadow.fill)\r\n\r\n for (const fills of extra?.fills ?? []) assets.fill(fills)\r\n for (const strokes of extra?.strokes ?? []) stroked(strokes)\r\n}\r\n"],
5
5
  "mappings": "uNAmCM,SAAUA,EAAGC,EAAgBC,EAAc,CAC/C,MAAO,CAAE,OAAAD,EAAQ,KAAAC,CAAI,CACvB,CAUM,SAAUC,EAAKC,EAAe,CAclC,MAAO,CACL,SAAUA,EACV,SAfkB,IAAmB,CACrC,IAAIC,EAAU,EACd,MAAO,CACL,KAAOC,GAAa,CAClBD,EAAUC,CACZ,EACA,QAAUC,IACRF,GAAWE,EACJF,GAAWD,GAGxB,EAMF,CAGM,SAAUI,KAAYC,EAAiB,CAC3C,IAAIC,EAAS,EACb,OAAOC,EACLF,EAAM,IAAKP,GAAQ,CACjB,IAAMU,EAASZ,EAAGU,EAAQR,CAAI,EAC9B,OAAAQ,GAAUR,EAAK,SACRU,CACT,CAAC,CAAC,CAEN,CAGM,SAAUC,KAAYJ,EAAiB,CAC3C,OAAOE,EAAQF,EAAM,IAAKP,GAASF,EAAG,EAAGE,CAAI,CAAC,CAAC,CACjD,CAgBM,SAAUY,EACdV,EACAW,EAA0B,CAE1B,IAAMf,EAAMK,GAAyB,CACnCU,EAAMX,EAAU,EAAI,KAAK,IAAI,KAAK,IAAIC,EAAUD,EAAS,CAAC,EAAG,CAAC,EAAI,CAAC,CACrE,EAiBA,MAAO,CACL,SAAUA,EACV,SAjBkB,IAAmB,CACrC,IAAIC,EAAU,EACd,MAAO,CACL,KAAOC,GAAa,CAClBD,EAAUC,EACVN,EAAGM,CAAC,CACN,EACA,QAAUC,IACRF,GAAWE,EACXP,EAAGK,CAAO,EACHA,GAAWD,GAGxB,EAMF,CAWM,SAAUY,EACdd,EACAe,EAAmBf,EAAK,SAAQ,CAEhC,IAAMgB,EAAUhB,EAAK,SAAQ,EACvBiB,EAAO,KAAK,IAAIF,EAAUf,EAAK,QAAQ,EAC7C,OAAOkB,EAAaH,EAAWI,GAAMH,EAAQ,KAAKG,EAAIF,CAAI,CAAC,CAC7D,CAWM,SAAUR,EAAQF,EAAe,CACrC,IAAMQ,EAAWR,EAAM,OACrB,CAACa,EAAKC,IAAM,KAAK,IAAID,EAAKC,EAAE,OAASA,EAAE,KAAK,QAAQ,EACpD,CAAC,EA+BH,MAAO,CACL,SAAAN,EACA,SA9BkB,IAAmB,CAIrC,IAAMO,EAAWf,EAAM,IAAKc,GAAMA,EAAE,KAAK,SAAQ,CAAE,EAC/ClB,EAAU,EAERoB,EAAWrB,GAAyB,CACxC,QAASsB,EAAI,EAAGA,EAAIjB,EAAM,OAAQiB,IAAK,CACrC,GAAM,CAAE,OAAAzB,EAAQ,KAAAC,CAAI,EAAKO,EAAMiB,CAAC,EAC1BC,EAAQ,KAAK,IAAI,KAAK,IAAIvB,EAAUH,EAAQ,CAAC,EAAGC,EAAK,QAAQ,EACnEsB,EAASE,CAAC,EAAE,KAAKC,CAAK,CACxB,CACF,EAEA,MAAO,CACL,KAAOvB,GAAmB,CACxBC,EAAUD,EACVqB,EAAQrB,CAAO,CACjB,EACA,QAAUG,IACRF,GAAWE,EACXkB,EAAQpB,CAAO,EACRA,GAAWY,GAGxB,EAMF,CC5KM,SAAUW,EAAcC,EAAcC,EAAoBC,EAAmB,CACjF,IAAMC,EAAWC,GAAwD,CACvE,QAAWC,KAAUD,GAAW,CAAA,EAAIH,EAAO,KAAKI,EAAO,IAAI,CAC7D,EAGMC,EAAON,EAMbC,EAAO,KAAKK,EAAK,MAAQ,CAAA,CAAE,EAC3BL,EAAO,KAAKK,EAAK,SAAW,CAAA,CAAE,EAC9BH,EAAQG,EAAK,MAAM,EACnB,QAAWC,KAAUD,EAAK,QAAU,CAAA,EAAIL,EAAO,KAAKM,EAAO,IAAI,EAE/D,QAAWC,KAASN,GAAO,OAAS,CAAA,EAAID,EAAO,KAAKO,CAAK,EACzD,QAAWJ,KAAWF,GAAO,SAAW,CAAA,EAAIC,EAAQC,CAAO,CAC7D",
6
6
  "names": ["at", "offset", "part", "hold", "seconds", "elapsed", "s", "dt", "sequence", "parts", "cursor", "compose", "placed", "together", "drive", "apply", "asCommand", "duration", "stepper", "span", "driveCommand", "t", "max", "p", "steppers", "applyAt", "i", "local", "declarePaints", "node", "assets", "extra", "stroked", "strokes", "stroke", "held", "shadow", "fills"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{$ as be,$a as Wt,$b as Wr,$c as zs,$d as Bo,$e as zi,$f as p,A as se,Aa as st,Ab as hr,Ac as us,Ad as wo,Ae as wi,Af as ua,Ag as cn,B as oe,Ba as ot,Bb as fr,Bc as ws,Bd as yo,Be as yi,Bf as wa,Bg as mn,C as ie,Ca as it,Cb as cr,Cc as ys,Cd as _o,Ce as _i,Cf as ya,D as ae,Da as at,Db as mr,Dc as _s,Dd as Ao,De as Ai,Df as _a,E as ne,Ea as nt,Eb as lr,Ec as As,Ed as Fo,Ee as Fi,Ef as Aa,F as de,Fa as dt,Fb as gr,Fc as Fs,Fd as Po,Fe as Pi,Ff as Fa,G as pe,Ga as pt,Gb as xr,Gc as Ps,Gd as Lo,Ge as Li,Gf as Pa,H as he,Ha as gt,Hb as ur,Hc as Ls,Hd as So,He as Si,Hf as La,I as fe,Ia as xt,Ib as wr,Ic as Ss,Id as No,Ie as Ni,If as Sa,J as ce,Ja as ut,Jb as yr,Jc as Ns,Jd as Eo,Je as Ei,Jf as x,K as me,Ka as wt,Kb as _r,Kc as Es,Kd as Mo,Ke as Mi,Kf as u,L as le,La as yt,Lb as Ar,Lc as Ms,Ld as To,Le as Ti,Lf as Na,M as ge,Ma as _t,Mb as Fr,Mc as Ts,Md as bo,Me as bi,Mf as Ea,N as xe,Na as At,Nb as Pr,Nc as bs,Nd as Do,Ne as Di,Nf as Ma,O as ue,Oa as Lt,Ob as Lr,Oc as Ds,Od as vo,Oe as vi,Of as Ta,P as we,Pa as St,Pb as Sr,Pc as vs,Pd as Uo,Pe as Ui,Pf as ba,Q as ye,Qa as Nt,Qb as Nr,Qc as Us,Qd as Vo,Qe as Vi,Qf as Da,R as _e,Ra as Et,Rb as Er,Rc as Vs,Rd as Co,Re as Ci,Rf as va,S as Ae,Sa as Mt,Sb as Mr,Sc as Cs,Sd as Io,Se as n,Sf as Ua,T as Fe,Ta as Tt,Tb as Tr,Tc as Is,Td as Wo,Te as Ii,Tf as Va,U as Pe,Ua as bt,Ub as br,Uc as Ws,Ud as Ko,Ue as Wi,Uf as Ca,V as Le,Va as Dt,Vb as Dr,Vc as Ks,Vd as Ro,Ve as Ki,Vf as Ia,W as Se,Wa as vt,Wb as vr,Wc as Rs,Wd as jo,We as Ri,Wf as Wa,X as Ne,Xa as Ut,Xb as Ur,Xc as js,Xd as Yo,Xe as ji,Xf as Ka,Y as Ee,Ya as Vt,Yb as Vr,Yc as Ys,Yd as $o,Ye as Yi,Yf as Ra,Z as Me,Za as Ct,Zb as Cr,Zc as $s,Zd as qo,Ze as $i,Zf as ja,_ as Te,_a as It,_b as Ir,_c as qs,_d as zo,_e as qi,_f as d,a as L,aa as De,ab as Kt,ac as Kr,ad as Bs,ae as Go,af as Bi,ag as Ya,b as S,ba as ve,bb as Rt,bc as Rr,bd as Gs,be as Ho,bf as Gi,bg as $a,c as N,ca as Ue,cb as jt,cc as jr,cd as Hs,ce as Jo,cf as Hi,cg as qa,d as T,da as Ve,db as Yt,dc as Yr,dd as Js,de as Qo,df as Ji,dg as za,e as b,ea as Ce,eb as $t,ec as $r,ed as Qs,ee as Xo,ef as Qi,eg as Ba,f as D,fa as Ie,fb as qt,fc as qr,fd as Xs,fe as Zo,ff as Xi,fg as Ga,g as W,ga as We,gb as zt,gc as zr,gd as Zs,ge as ko,gf as Zi,gg as Ha,h as K,ha as Ke,hb as Bt,hc as m,hd as ks,he as Oo,hf as ki,hg as Ja,i as R,ia as Re,ib as Gt,ic as Br,id as Os,ie as ei,if as Oi,ig as Qa,j,ja as je,jb as Ht,jc as rs,jd as eo,je as ti,jf as ea,jg as Xa,k as Y,ka as Ye,kb as Jt,kc as ss,kd as to,ke as ri,kf as ta,kg as Za,l as $,la as $e,lb as Qt,lc as os,ld as ro,le as si,lf as ra,lg as ka,m as q,ma as qe,mb as Xt,mc as is,md as so,me as oi,mf as sa,mg as Oa,n as z,na as ze,nb as Zt,nc as l,nd as oo,ne as ii,nf as oa,ng as en,o as B,oa as Be,ob as kt,oc as as,od as io,oe as ai,of as ia,og as tn,p as G,pa as Ge,pb as Ot,pc as ns,pd as ao,pe as ni,pf as aa,pg as rn,q as H,qa as He,qb as er,qc as ds,qd as no,qe as di,qf as na,qg as w,r as J,ra as Je,rb as tr,rc as ps,rd as po,re as pi,rf as da,rg as sn,s as Q,sa as Qe,sb as rr,sc as g,sd as ho,se as hi,sf as pa,sg as y,t as X,ta as Xe,tb as sr,tc as hs,td as fo,te as fi,tf as ha,tg as _,u as Z,ua as Ze,ub as or,uc as fs,ud as co,ue as ci,uf as fa,ug as h,v as k,va as ke,vb as ir,vc as cs,vd as mo,ve as mi,vf as ca,vg as on,w as O,wa as Oe,wb as ar,wc as ms,wd as lo,we as li,wf as ma,wg as an,x as ee,xa as et,xb as nr,xc as ls,xd as go,xe as gi,xf as la,xg as nn,y as te,ya as tt,yb as dr,yc as gs,yd as xo,ye as xi,yf as ga,yg as dn,z as re,za as rt,zb as pr,zc as xs,zd as uo,ze as ui,zf as xa,zg as fn}from"./chunks/chunk-TGDX2SS2.js";import{U as pn,V as hn,a as E,b as M,c as v,d as U,e as V,f as C,g as I,h as ht,i as ft,j as ct,k as mt,l as lt,m as Ft,n as Pt,o as Gr,p as Hr,q as Jr,r as Qr,s as Xr,t as Zr,u as kr,v as Or,w as es,x as ts}from"./chunks/chunk-KJXGRHOL.js";import{a as ln,b as gn,c as xn}from"./chunks/chunk-2T3HXSC2.js";var wn=p,yn=d;var A={width:1920,height:1080},F=60,P={image:{},video:{},audio:{},font:{}},f=class{platform;viewport;fps;constructor(e,t={}){this.platform=e,this._registry=new n({nodes:t.nodes,shaders:t.shaders,lerps:t.lerps,dynamicNodes:t.dynamicNodes}),this.viewport=t.viewport??A,this.fps=t.fps??F,this._manifest=t.manifest??P,this._exporter=e.createExporter()}get manifest(){return this._manifest}get exporter(){return this._exporter}setManifest(e){this._manifest=e;for(let t of this._manifestListeners)t(e)}open(e){return new h(this,e)}knows(e){return this._registry.hasNode(e)}get registry(){return this._registry}async registerNode(e,t){return typeof e=="string"?this._registry.addNodeFromSource(e,t):(this._registry.addNode(e,t),e)}registerShader(e,t,r){return this._registry.addShader(e,t,r)}dispose(){this._manifestListeners.clear(),this.platform.dispose?.()}_registry;_manifest;_exporter;_manifestListeners=new Set;_onManifestChange(e){return this._manifestListeners.add(e),()=>this._manifestListeners.delete(e)}};var i=class{get schedulesAudio(){return!0}setMuted(e){}setVolume(e){}dispose(){this.stop()}};var a=class{catalog;viewport;constructor(e,t){this.catalog=e,this.viewport=t}setCatalog(e){this.catalog=e}inFlightLoads=new Map;cachedAssets=new Set;isLoaded(e){return this.cachedAssets.has(e)}async loadAsset(e,t){let r=this.inFlightLoads.get(e);if(r)return r;if(this.cachedAssets.has(e))return;let s=this.runLoad(e,t);this.inFlightLoads.set(e,s);try{await s}finally{this.inFlightLoads.delete(e)}}async runLoad(e,t){let r=!0;switch(t.type){case"image":await this.loadImage(e);break;case"video":await this.loadVideo(e,t.startFrame,t.endFrame,t.trimStart,t.trimEnd);break;case"font":{let{fontFamily:s,fontWeight:c}=this.parseFontKey(e);r=await this.loadFont(e,s,c);break}case"audio":break;case"loader":throw new Error("Loader records must not be routed through StorageAdapter.loadAsset");default:{let s=t;throw new Error(`Unsupported asset type: ${s.type}`)}}r&&this.cachedAssets.add(e)}parseFontKey(e){let[t,r]=e.split("@"),s=r?parseInt(r,10):400;return{fontFamily:t||e,fontWeight:isNaN(s)?400:s}}async warmPendingVideo(){return!1}setDecodePolicy(e){}getDecodePolicy(){return"interactive"}hasPendingDecodes(){return!1}async warmPendingDecodes(){return this.warmPendingVideo()}hasPendingUpgrades(){return!1}async warmPendingUpgrades(){return!1}setPlaying(e){}dispose(){this.inFlightLoads.clear(),this.cachedAssets.clear()}};function In(o){return typeof o?._stepper=="function"}export{G as ASCII_CHARSETS,Ii as AUDIO_ROOT_ID,yo as AUTOFIT_PROBE_SIZE,Se as AdjustmentChain,Ee as Adjustments,Oo as AmbientLight3D,oi as AreaLight3D,u as AssetDeclaration,x as AssetManager,g as AssetNotLoadedError,p as AssetTimeline,Mo as AudioBus,Yt as AudioFilterChain,Ht as AudioFilterRegistry,$t as AudioFilters,i as AudioSink,me as BLEND_MODES_LIST,zs as BooleanGroup,ao as BoundsShape,Uo as Box3D,as as COMMAND_META,$s as Camera,ii as Camera3D,js as Canvas2D,di as Canvas3D,Gi as CanvasRenderContext2D,$o as Capsule3D,jo as Circle3D,hs as Clip,Ca as ClipInstance,Wa as ClipStore,Wo as Cone3D,is as ContextMap,Tt as Curve,Io as Cylinder3D,Lt as DEFAULT_EASE,F as DEFAULT_FPS,Ia as DEFAULT_PRECOMP_BUDGET_MS,A as DEFAULT_VIEWPORT,Re as DRAWABLE_KINDS,Qs as DataToken,ks as DefaultTextStyle,ti as DirectionalLight3D,xo as DotGrid,Y as EFFECT_OPTION_KEYS,P as EMPTY_MANIFEST,ht as EMPTY_PATH_DATA,mr as EMPTY_TEXT_STYLE,ae as EffectChain,ne as Effects,to as Ellipse,f as Engine,ni as Environment3D,Pi as ExpressionError,zo as Extrude3D,xe as FillChain,ue as Fills,ai as Fog3D,xn as Fragment,Qi as Geo,Ie as Graphics2D,Ye as Graphics3D,wo as GridPattern,Do as Group3D,ei as HemisphereLight3D,fo as Hexagon,Pr as IDENTITY_QUATERNION,Te as ImageFilters,Ho as Instances3D,Bo as Lathe3D,ro as Line,Qo as Line3D,go as LineGrid,$r as MAX_SHADER_PROPERTIES,qr as MAX_SHADER_SOURCE,ye as MINOR_WIDTH_RATIO,Fa as MUTABLE_MATERIAL_KEYS,w as ManifestAssetCatalog,Bs as MaskGroup,Xi as Mat,vo as Mesh3D,Zo as Model3D,ko as ModelView3D,Ui as NODE_META,sr as NO_PROJECTION_3D,ps as Node,fs as Node2D,bo as Node3D,Cs as NodeAudio,le as NodeBlendModes,Ji as NullRenderContext,So as NumberNode,co as Octagon,qs as OrbitCamera,ft as PATH_UNIT_EXTENT,ct as PATH_UNIT_HALF,bs as PaintNode,so as Path,Ce as PathBuilder,lo as PathShape,ho as Pentagon,Co as Plane3D,sn as Playback,tn as PlaybackController,ri as PointLight3D,Jo as Points3D,oo as Polygon,io as Polygram,qo as Polyhedron3D,wn as Precomp,m as PropSlot,Gs as Provider,mi as ROOT_NODE_ID,mn as Random,eo as Rect,n as Registry,$e as RenderContext3D,Po as RichText,po as RightTriangle,Yo as Ring3D,No as RotatedBox,Ra as SETTLE_PASSES,ms as SHAPE_ALIGNMENT_KEYS,Pa as STRUCTURAL_MATERIAL_KEYS,ze as Scene3D,Ki as SceneTimeline,cn as SeedGenerator,Xs as SeedToken,h as Session,Ys as ShapeNode,zt as Sound,To as SoundNode,Vo as Sphere3D,si as SpotLight3D,Xo as Sprite3D,mo as Star,Ka as StateEvaluator,_ as SteppedClock,a as StorageAdapter,st as TEXTURE_KEYS,cr as TEXT_SHAPING_KEYS,fr as TEXT_STYLE_KEYS,Zi as Tex,Lo as Text,Fo as TextBase,_o as TextSelection,Hs as TextStyleToken,Zs as ThemeProvider,Js as ThemeToken,y as Ticker,Ko as Torus3D,Ro as TorusKnot3D,no as Triangle,Go as Tube3D,mt as UNIT_PATH_BOX,Eo as Video,Ne as VideoAdjustmentChain,Me as VideoAdjustments,be as VideoFilters,uo as ViewportPattern,Ma as __resetSchedulerForTests,ve as alignmentOps,Wr as alignmentProperty,Vs as applyEditorStates,pa as applyMatrix4,Os as applyTextDefaults,Ot as applyToPoint,Fi as asProjectDocument,vi as assertValidDocument,Di as assertValidProjectDocument,Jt as audioFiltersOps,Wt as audioParamOps,fe as backdropEffects,Is as busPathOf,Ws as busPathTo,Gt as busStopKey,tr as cameraMatrix,nt as canLerpFill,Xe as canvas3DResourceKey,tt as canvas3DResourceLoader,Hi as caretCount,Oa as caretOffsetAt,en as caretRangeQuads,ua as centeredBox3,Ft as clamp,Pt as clamp01,Za as collectBoxes,Ya as collectBoxes3D,B as colorOps,vr as colorProperty,ds as command,ts as commandParallel,es as commandSequence,yi as commandSpan,ha as compose4,Ps as containsClip,Ls as containsOps,te as coordsMatrix,T as cornerRadiusOps,Ur as cornerRadiusProperty,b as cornerStyleOps,Vr as cornerStyleProperty,ya as corners3,d as createAssetTimelineProfile,os as createContext,yn as createPrecompProfile,fn as createRef,Mi as curveEase,Ni as curveSegmentT,Si as curveSegments,sa as cylinderRadii,O as describeUniforms,Ts as distanceToSegment,_i as documentDuration,kr as driveCommand,Nt as easeIn,Mt as easeInOut,Et as easeOut,se as effectSurface,gi as effectiveSpan,ui as effectiveSpanIn,xi as effectiveSpans,pe as effectsOps,Dr as effectsProperty,hn as enterBudget,Kt as equalsParam,Fr as euler3Ops,ia as evaluateParametric,Oi as evaluateRoundedBox,Li as expressionOps,ir as facesAway,vt as fadeIn,Ut as fadeOut,pt as fillOps,Mr as fillProperty,Pe as filterSurface,Bt as filtersKey,Ks as findBusById,ur as flowOps,it as forEachTexture3D,ce as foregroundShaderEffects,Ua as frameTime,dn as generateList,Aa as geometryBounds3D,ge as getBlendModeHash,ns as getCommandMeta,Ci as getNodeDescriptor,l as getPropSlot,gr as getPropertyMeta,C as getTypographyPreset,rt as hasCanvas3DBackend,Ae as hasFilter,or as hasProjection3D,ci as hasTimeline,Dt as hold,Xt as identity,aa as identity4,Ue as insetsOps,Ir as insetsProperty,Rt as integrateSpeedToSceneTime,er as invert,da as invert4,fi as isAudioDocument,he as isBackdropEffect,Xr as isCommand,hi as isCompositionDocument,Vt as isCurve,Ge as isDataTexture3D,Ei as isEaseCurve,Yr as isKnownShaderProperty,La as isOrbitCamera3D,rn as isParentNode,_e as isPixelFilter,Ai as isProjectDocument,Qt as isProjective,In as isSteppable,pi as isStillDocument,Ri as isStyleOnlySegment,He as isSurfaceTexture3D,ot as isTextureLike,N as isUniformCorners,ln as jsx,gn as jsxs,z as lerpColor,D as lerpCornerScalarStyle,S as lerpCorners,oe as lerpEffect,Ar as lerpEuler3,dt as lerpFill,Fe as lerpFilter,Le as lerpFilterArray,nr as lerpLookAt,E as lerpNumber,It as lerpParam,M as lerpPerspective,Z as lerpUniformRecord,Q as lerpUniformValue,v as lerpVector2,yr as lerpVector3,St as linear,fa as lookAtRotation4,Ke as looksLikeAssetPath,Or as loopCommand,Gr as loopPasses,Qr as loopPhase,Hr as loopRepeats,Jr as loopSpan,Wi as loweredAudioDocument,Zr as makeCommand,kt as multiply,na as multiply4,Ms as nearPolyline,pn as niceStep,Vi as node,Ja as nodeAt,Ga as nodeBox,Ha as nodeBoxAt,rr as nodeLocalMatrix,Ds as nodePath,ar as nodeProjectedMatrix,li as nodeSpan,ka as nodeTextLayout,Sr as normalizeQuaternion,Ao as normalizeRanges,zr as normalizeShaderPack,J as normalizeUniforms,Na as now,xa as orthographic4,Ba as parentPlanePointAt,an as parseCSV,Ze as parseCanvas3DResourceKey,I as parseColor,nn as parseData,re as parseShaderChildren,lt as pathOps,Cr as pathProperty,ga as perspective4,Xa as pickNode,qa as pickNode3D,ba as placeTracks,Es as pointInPolygon,Ss as polygonVertices,Ns as polygramVertices,ss as prepareNumericCellTween,rs as prepareNumericTween,Us as primeMotionTree,$a as projectNode3D,Qa as projectNode3DAt,xr as property,Nr as quaternionFromEuler,Er as quaternionOps,bt as ramp,Oe as registerCanvas3DResourceLoader,ke as registerCanvas3DWarmup,za as renderMatrix,ja as renderSettled,ji as requireFontFamily,H as resolveAsciiCharset,qt as resolveAudioFilters,oa as resolveBevel3D,Sa as resolveCameraPlacement,De as resolveChainAdjustments,de as resolveChainEffects,we as resolveChainFill,L as resolveCorners,W as resolveEffectAxis,R as resolveEffectColor,at as resolveFill,We as resolveFill3D,je as resolveMaterialShorthand3D,q as resolveMotionBlurAlignment,us as resolvePivotPosition,on as resolveProjectDocument,ie as resolveShaderProperties,gt as resolveShadow,ra as resolveShadowOptions3D,qe as resolveShadows3D,xs as resolveShapeAlignment,cs as resolveShapePivot,_t as resolveStroke,ut as resolveStrokeAlign,wt as resolveStrokeCap,yt as resolveStrokeJoin,Be as resolveSurfaceSource,Je as resolveTexture3D,wr as resolveVector3,Ve as resolveVideoTimestamp,la as rotationOf4,K as sameEffectAxis,j as sameEffectColor,vs as sampleTree,ki as segmentsOf,V as setTheme,ea as shadowCasts,xt as shadowOps,br as shadowProperty,ta as shadowReceives,pr as size2DOps,hr as sizeInputOps,Rr as sizeProperty,Lr as slerpQuaternion,jt as sourceTimeAtSceneElapsed,dr as space3dOps,Va as spanFrames,va as spansCovering,Ct as staticValue,gs as stripShapeAlignmentKeys,At as strokeOps,Tr as strokeProperty,Rs as structuralPathOf,lr as textOps,jr as textProperty,Qe as texture3DSource,Br as toCommand,zi as toPathString,Da as totalFramesOf,Ta as trackFrameCount,_a as transformBox3,ca as transformMatrix4,Zt as translation,ma as translation4,k as uniformRecordsEqual,X as uniformValuesEqual,wa as unionBox3,wi as untimed,Ti as validateDocument,bi as validateProjectDocument,ls as validateShapeAlignmentProps,U as vector2Ops,Kr as vector2Property,_r as vector3Ops,et as warmCanvas3D,$ as withEffectOptions,ys as withEllipseDescriptor,Fs as withLineDescriptor,Bi as withPathDescriptor,_s as withPolygonDescriptor,As as withPolygramDescriptor,ws as withRectDescriptor,$i as withRichTextDescriptor,Yi as withTextDescriptor,qi as withTransformDescriptor,ee as writeUniforms,Ea as yieldToScheduler};
1
+ import{$ as Ce,$a as $t,$b as Kr,$c as Bs,$d as Go,$e as Bi,$f as Ya,A as ae,Aa as at,Ab as mr,Ac as ws,Ad as yo,Ae as yi,Af as ua,Ag as ln,B as ne,Ba as nt,Bb as cr,Bc as ys,Bd as _o,Be as _i,Bf as wa,Bg as gn,C as de,Ca as dt,Cb as hr,Cc as _s,Cd as Ao,Ce as Ai,Cf as ya,Cg as xn,D as pe,Da as pt,Db as lr,Dc as As,Dd as Po,De as Pi,Df as _a,Dg as T,E as fe,Ea as ft,Eb as gr,Ec as Ps,Ed as To,Ee as Ti,Ef as Aa,Eg as un,F as me,Fa as mt,Fb as xr,Fc as Ts,Fd as Fo,Fe as Fi,Ff as Pa,Fg as F,G as ce,Ga as ct,Gb as ur,Gc as Fs,Gd as Lo,Ge as Li,Gf as Ta,Gg as L,H as he,Ha as wt,Hb as wr,Hc as Ls,Hd as So,He as Si,Hf as Fa,Hg as l,I as le,Ia as yt,Ib as yr,Ic as Ss,Id as Eo,Ie as Ei,If as La,Ig as wn,J as ge,Ja as _t,Jb as _r,Jc as Es,Jd as No,Je as Ni,Jf as Sa,Jg as yn,K as xe,Ka as At,Kb as Ar,Kc as Ns,Kd as bo,Ke as bi,Kf as Ea,Kg as _n,L as ue,La as Pt,Lb as Pr,Lc as bs,Ld as Do,Le as Di,Lf as Na,Lg as An,M as we,Ma as Tt,Mb as Tr,Mc as Ds,Md as Mo,Me as Mi,Mf as ba,Mg as Fn,N as ye,Na as Ft,Nb as Fr,Nc as Ms,Nd as Uo,Ne as Ui,Nf as Da,Ng as Ln,O as _e,Oa as Lt,Ob as Lr,Oc as Us,Od as Co,Oe as Ci,Of as Ma,Og as Sn,P as Ae,Pa as St,Pb as Sr,Pc as Cs,Pd as vo,Pe as vi,Pf as A,Q as Pe,Qa as Et,Qb as Er,Qc as vs,Qd as Vo,Qe as Vi,Qf as P,R as Te,Ra as Dt,Rb as Nr,Rc as Vs,Rd as Io,Re as Ii,Rf as Ua,S as Fe,Sa as Mt,Sb as br,Sc as Is,Sd as Wo,Se as Wi,Sf as Ca,T as Le,Ta as Ut,Tb as Dr,Tc as Ws,Td as Ko,Te as Ki,Tf as va,U as Se,Ua as Ct,Ub as Mr,Uc as Ks,Ud as Ro,Ue as Ri,Uf as Va,V as Ee,Va as vt,Vb as Ur,Vc as Rs,Vd as $o,Ve as f,Vf as Ia,W as Ne,Wa as Vt,Wb as Cr,Wc as $s,Wd as jo,We as $i,Wf as Wa,X as be,Xa as It,Xb as vr,Xc as js,Xd as Yo,Xe as ji,Xf as Ka,Y as De,Ya as Wt,Yb as Vr,Yc as Ys,Yd as qo,Ye as Yi,Yf as Ra,Z as Me,Za as Kt,Zb as Ir,Zc as qs,Zd as zo,Ze as qi,Zf as $a,_ as Ue,_a as Rt,_b as Wr,_c as zs,_d as Bo,_e as zi,_f as ja,a as E,aa as ve,ab as jt,ac as Rr,ad as Gs,ae as Ho,af as Gi,ag as qa,b as N,ba as Ve,bb as Yt,bc as $r,bd as Hs,be as Jo,bf as m,bg as za,c as b,ca as Ie,cb as qt,cc as jr,cd as Js,ce as Qo,cf as Hi,cg as Ba,d as U,da as We,db as zt,dc as Yr,dd as Qs,de as Xo,df as Ji,dg as Ga,e as C,ea as Ke,eb as d,ec as qr,ed as Xs,ee as Zo,ef as Qi,eg as Ha,f as v,fa as Re,fb as p,fc as zr,fd as Zs,fe as ko,ff as Xi,fg as Ja,g as $,ga as $e,gb as Bt,gc as Br,gd as ks,ge as Oo,gf as Zi,gg as Qa,h as j,ha as je,hb as Gt,hc as Gr,hd as Os,he as ei,hf as ki,hg as c,i as Y,ia as Ye,ib as Ht,ic as Hr,id as eo,ie as ti,if as Oi,ig as h,j as q,ja as qe,jb as Jt,jc as Jr,jd as to,je as ri,jf as ea,jg as Xa,k as z,ka as ze,kb as Qt,kc as y,kd as ro,ke as si,kf as ta,kg as Za,l as B,la as Be,lb as Xt,lc as Qr,ld as so,le as oi,lf as ra,lg as ka,m as G,ma as Ge,mb as Zt,mc as as,md as oo,me as ii,mf as sa,mg as Oa,n as H,na as He,nb as kt,nc as ns,nd as io,ne as ai,nf as oa,ng as en,o as J,oa as Je,ob as Ot,oc as ds,od as ao,oe as ni,of as ia,og as tn,p as Q,pa as Qe,pb as er,pc as ps,pd as no,pe as di,pf as aa,pg as rn,q as X,qa as Xe,qb as tr,qc as _,qd as po,qe as pi,qf as na,qg as sn,r as Z,ra as Ze,rb as rr,rc as fs,rd as fo,re as fi,rf as da,rg as on,s as k,sa as ke,sb as sr,sc as ms,sd as mo,se as mi,sf as pa,sg as an,t as O,ta as Oe,tb as or,tc as cs,td as co,te as ci,tf as fa,tg as nn,u as ee,ua as et,ub as ir,uc as hs,ud as ho,ue as hi,uf as ma,ug as dn,v as te,va as tt,vb as ar,vc as i,vd as lo,ve as li,vf as ca,vg as pn,w as re,wa as rt,wb as nr,wc as ls,wd as go,we as gi,wf as ha,wg as fn,x as se,xa as st,xb as dr,xc as gs,xd as xo,xe as xi,xf as la,xg as mn,y as oe,ya as ot,yb as pr,yc as xs,yd as uo,ye as ui,yf as ga,yg as cn,z as ie,za as it,zb as fr,zc as us,zd as wo,ze as wi,zf as xa,zg as hn}from"./chunks/chunk-FUZVFT3W.js";import{U as Pn,V as Tn,a as D,b as M,c as V,d as I,e as W,f as K,g as R,h as ht,i as lt,j as gt,k as xt,l as ut,m as Nt,n as bt,o as Xr,p as Zr,q as kr,r as Or,s as es,t as ts,u as rs,v as ss,w as os,x as is}from"./chunks/chunk-QG6C23IJ.js";import{a as En,b as Nn,c as bn}from"./chunks/chunk-SFNJRPBV.js";var Mn=h,Un=c;var x={width:1920,height:1080},u=60,In={viewport:x,fps:u},S={image:{},video:{},audio:{},font:{}},g=class{platform;viewport;fps;constructor(e,t={}){this.platform=e,this._registry=new f({nodes:t.nodes,shaders:t.shaders,lerps:t.lerps,dynamicNodes:t.dynamicNodes}),this.viewport=t.viewport??x,this.fps=t.fps??u,this._manifest=t.manifest??S,this._exporter=e.createExporter()}get manifest(){return this._manifest}get exporter(){return this._exporter}setManifest(e){this._manifest=e;for(let t of this._manifestListeners)t(e)}open(e){return new l(this,e)}knows(e){return this._registry.hasNode(e)}get registry(){return this._registry}async registerNode(e,t){return typeof e=="string"?this._registry.addNodeFromSource(e,t):(this._registry.addNode(e,t),e)}registerShader(e,t,r){return this._registry.addShader(e,t,r)}dispose(){this._manifestListeners.clear(),this.platform.dispose?.()}_registry;_manifest;_exporter;_manifestListeners=new Set;_onManifestChange(e){return this._manifestListeners.add(e),()=>this._manifestListeners.delete(e)}};var a=class{get schedulesAudio(){return!0}setMuted(e){}setVolume(e){}dispose(){this.stop()}};var n=class{catalog;viewport;constructor(e,t){this.catalog=e,this.viewport=t}setCatalog(e){this.catalog=e}inFlightLoads=new Map;cachedAssets=new Set;isLoaded(e){return this.cachedAssets.has(e)}async loadAsset(e,t){let r=this.inFlightLoads.get(e);if(r)return r;if(this.cachedAssets.has(e))return;let s=this.runLoad(e,t);this.inFlightLoads.set(e,s);try{await s}finally{this.inFlightLoads.delete(e)}}async runLoad(e,t){let r=!0;switch(t.type){case"image":await this.loadImage(e);break;case"video":await this.loadVideo(e,t.startFrame,t.endFrame,t.trimStart,t.trimEnd);break;case"font":{let{fontFamily:s,fontWeight:w}=this.parseFontKey(e);if(r=await this.loadFont(e,s,w),!r&&this.getDecodePolicy()==="exact")throw new i("font",s,`The manifest has no font entry for "${s}", so this frame would be shaped against the fallback face and differ from the one drawn once it is described. Add the family to the manifest's font record.`);break}case"audio":break;case"loader":throw new Error("Loader records must not be routed through StorageAdapter.loadAsset");default:{let s=t;throw new Error(`Unsupported asset type: ${s.type}`)}}r&&this.cachedAssets.add(e)}parseFontKey(e){let[t,r]=e.split("@"),s=r?parseInt(r,10):400;return{fontFamily:t||e,fontWeight:isNaN(s)?400:s}}async warmPendingVideo(){return!1}setDecodePolicy(e){}getDecodePolicy(){return"interactive"}hasPendingDecodes(){return!1}async warmPendingDecodes(){return this.warmPendingVideo()}hasPendingUpgrades(){return!1}async warmPendingUpgrades(){return!1}setPlaying(e){}dispose(){this.inFlightLoads.clear(),this.cachedAssets.clear()}};function Zn(o){return typeof o?._stepper=="function"}var od=m,id=d,ad=p;export{Q as ASCII_CHARSETS,Bi as AUDIO_ROOT_ID,_o as AUTOFIT_PROBE_SIZE,Ne as AdjustmentChain,De as Adjustments,ti as AmbientLight3D,ai as AreaLight3D,P as AssetDeclaration,A as AssetManager,i as AssetNotLoadedError,h as AssetTimeline,bo as AudioBus,Bt as AudioFilterChain,Zt as AudioFilterRegistry,Gt as AudioFilters,a as AudioSink,xe as BLEND_MODES_LIST,Xs as BooleanGroup,co as BoundsShape,Vo as Box3D,fs as COMMAND_META,Js as Camera,pi as Camera3D,Gs as Canvas2D,ci as Canvas3D,ea as CanvasRenderContext2D,zo as Capsule3D,Yo as Circle3D,ls as Clip,za as ClipInstance,Ga as ClipStore,m as ClipTimeline,Ro as Cone3D,ps as ContextMap,Vt as Curve,Ko as Cylinder3D,At as DEFAULT_CAP_SCALE,Dt as DEFAULT_EASE,u as DEFAULT_FPS,In as DEFAULT_OUTPUT,Ba as DEFAULT_PRECOMP_BUDGET_MS,x as DEFAULT_VIEWPORT,He as DRAWABLE_KINDS,to as DataToken,oo as DefaultTextStyle,si as DirectionalLight3D,z as EFFECT_OPTION_KEYS,S as EMPTY_MANIFEST,ht as EMPTY_PATH_DATA,ur as EMPTY_TEXT_STYLE,pe as EffectChain,fe as Effects,no as Ellipse,g as Engine,mi as Environment3D,Ei as ExpressionError,Go as Extrude3D,ye as FillChain,_e as Fills,fi as Fog3D,bn as Fragment,sa as Geo,Re as Graphics2D,Qe as Graphics3D,Co as Group3D,ri as HemisphereLight3D,xo as Hexagon,Er as IDENTITY_QUATERNION,Ue as ImageFilters,Qo as Instances3D,Ho as Lathe3D,Zo as Line3D,Gr as MAX_SHADER_PROPERTIES,Hr as MAX_SHADER_SOURCE,Pe as MINOR_WIDTH_RATIO,Da as MUTABLE_MATERIAL_KEYS,T as ManifestAssetCatalog,Zs as MaskGroup,oa as Mat,vo as Mesh3D,Oo as Model3D,ei as ModelView3D,Wi as NODE_META,nr as NO_PROJECTION_3D,hs as Node,gs as Node2D,Uo as Node3D,js as NodeAudio,ue as NodeBlendModes,ra as NullRenderContext,So as NumberNode,uo as Octagon,Qs as OrbitCamera,lt as PATH_UNIT_EXTENT,gt as PATH_UNIT_HALF,Is as PaintNode,po as Path,Ke as PathBuilder,yo as PathShape,go as Pentagon,Wo as Plane3D,un as Playback,gn as PlaybackController,oi as PointLight3D,Xo as Points3D,fo as Polygon,mo as Polygram,Bo as Polyhedron3D,Mn as Precomp,y as PropSlot,ks as Provider,ui as ROOT_NODE_ID,Sn as Random,ao as Rect,f as Registry,Xe as RenderContext3D,Fo as RichText,lo as RightTriangle,qo as Ring3D,Eo as RotatedBox,Ja as SETTLE_PASSES,ys as SHAPE_ALIGNMENT_KEYS,Ma as STRUCTURAL_MATERIAL_KEYS,ke as Scene3D,od as SceneTimeline,Ln as SeedGenerator,ro as SeedToken,l as Session,Hs as ShapeNode,Jt as Sound,Do as SoundNode,Io as Sphere3D,ii as SpotLight3D,ko as Sprite3D,wo as Star,Ha as StateEvaluator,L as SteppedClock,n as StorageAdapter,at as TEXTURE_KEYS,xr as TEXT_SHAPING_KEYS,gr as TEXT_STYLE_KEYS,ia as Tex,Lo as Text,To as TextBase,Ao as TextSelection,Os as TextStyleToken,so as ThemeProvider,eo as ThemeToken,F as Ticker,$o as Torus3D,jo as TorusKnot3D,ho as Triangle,Jo as Tube3D,xt as UNIT_PATH_BOX,No as Video,be as VideoAdjustmentChain,Me as VideoAdjustments,Ce as VideoFilters,va as __resetSchedulerForTests,Ve as alignmentOps,jr as alignmentProperty,$s as applyEditorStates,ua as applyMatrix4,io as applyTextDefaults,sr as applyToPoint,Si as asProjectDocument,Ii as assertValidDocument,Vi as assertValidProjectDocument,kt as audioFiltersOps,qt as audioParamOps,le as backdropEffects,Ys as busPathOf,qs as busPathTo,Xt as busStopKey,ir as cameraMatrix,ft as canLerpFill,Oe as canvas3DResourceKey,ot as canvas3DResourceLoader,ta as caretCount,hn as caretOffsetAt,ln as caretRangeQuads,La as centeredBox3,tn as childPlanePointAt,Nt as clamp,bt as clamp01,Va as clipFrameToTime,Ia as clipTimeToFrame,mn as collectBoxes,Xa as collectBoxes3D,J as colorOps,Ir as colorProperty,cs as command,is as commandParallel,os as commandSequence,Ti as commandSpan,wa as compose4,bs as containsClip,Ds as containsOps,oe as coordsMatrix,U as cornerRadiusOps,Wr as cornerRadiusProperty,C as cornerStyleOps,Kr as cornerStyleProperty,Ea as corners3,c as createAssetTimelineProfile,ds as createContext,Un as createPrecompProfile,Fn as createRef,Ui as curveEase,Di as curveSegmentT,bi as curveSegments,ma as cylinderRadii,re as describeUniforms,Vs as distanceToSegment,Fi as documentDuration,rs as driveCommand,Ut as easeIn,vt as easeInOut,Ct as easeOut,ae as effectSurface,yi as effectiveSpan,Ai as effectiveSpanIn,_i as effectiveSpans,ce as effectsOps,Vr as effectsProperty,Tn as enterBudget,zt as equalsParam,Sr as euler3Ops,ha as evaluateParametric,na as evaluateRoundedBox,Ni as expressionOps,pr as facesAway,Kt as fadeIn,Rt as fadeOut,ct as fillOps,Ur as fillProperty,Se as filterSurface,Qt as filtersKey,zs as findBusById,xs as findNode2D,Ar as flowOps,dt as forEachTexture3D,ge as foregroundShaderEffects,us as frameIn,Wa as frameSpecAtTime,Ya as frameTime,An as generateList,ba as geometryBounds3D,we as getBlendModeHash,ms as getCommandMeta,Ri as getNodeDescriptor,_ as getPropSlot,yr as getPropertyMeta,K as getTypographyPreset,on as handleValueAt,it as hasCanvas3DBackend,Fe as hasFilter,dr as hasProjection3D,xi as hasTimeline,Wt as hold,er as identity,la as identity4,Ie as insetsOps,$r as insetsProperty,d as integrateSpeedToClipTime,id as integrateSpeedToSceneTime,or as invert,xa as invert4,gi as isAudioDocument,he as isBackdropEffect,es as isCommand,li as isCompositionDocument,$t as isCurve,je as isDataTexture3D,Mi as isEaseCurve,Br as isKnownShaderProperty,ni as isOrbitCamera3D,xn as isParentNode,Te as isPixelFilter,Li as isProjectDocument,Ot as isProjective,Zn as isSteppable,hi as isStillDocument,Pt as isStrokeMarker,Hi as isStyleOnlySegment,Ye as isSurfaceTexture3D,nt as isTextureLike,b as isUniformCorners,En as jsx,Nn as jsxs,H as lerpColor,v as lerpCornerScalarStyle,N as lerpCorners,ne as lerpEffect,Lr as lerpEuler3,mt as lerpFill,Le as lerpFilter,Ee as lerpFilterArray,mr as lerpLookAt,D as lerpNumber,Yt as lerpParam,M as lerpPerspective,ee as lerpUniformRecord,k as lerpUniformValue,V as lerpVector2,Tr as lerpVector3,Mt as linear,ya as lookAtRotation4,Be as looksLikeAssetPath,ss as loopCommand,Xr as loopPasses,Or as loopPhase,Zr as loopRepeats,kr as loopSpan,Gi as loweredAudioDocument,ts as makeCommand,rr as multiply,ga as multiply4,vs as nearPolyline,Pn as niceStep,Ki as node,dn as nodeAt,an as nodeBox,nn as nodeBoxAt,sn as nodeHandlesAt,ar as nodeLocalMatrix,Ws as nodePath,fr as nodeProjectedMatrix,wi as nodeSpan,cn as nodeTextLayout,ji as nodeTypeIsA,br as normalizeQuaternion,Po as normalizeRanges,Jr as normalizeShaderPack,Z as normalizeUniforms,Ua as now,Fa as orthographic4,Yi as parentIssue,en as parentPlanePointAt,Mo as parentSpaceOf,yn as parseCSV,et as parseCanvas3DResourceKey,R as parseColor,_n as parseData,ie as parseShaderChildren,ut as pathOps,Rr as pathProperty,Ta as perspective4,fn as pickNode,ka as pickNode3D,Ra as placeTracks,zi as placementIssues,Cs as pointInPolygon,Ms as polygonVertices,Us as polygramVertices,ns as prepareNumericCellTween,as as prepareNumericTween,Rs as primeMotionTree,Za as projectNode3D,pn as projectNode3DAt,_r as property,Dr as quaternionFromEuler,Mr as quaternionOps,It as ramp,rt as registerCanvas3DResourceLoader,tt as registerCanvas3DWarmup,Oa as renderMatrix,Qa as renderSettled,rn as reparentPlacementAt,Ji as requireFontFamily,X as resolveAsciiCharset,Ht as resolveAudioFilters,ca as resolveBevel3D,di as resolveCameraPlacement,ve as resolveChainAdjustments,me as resolveChainEffects,Ae as resolveChainFill,E as resolveCorners,$ as resolveEffectAxis,Y as resolveEffectColor,pt as resolveFill,Ge as resolveFill3D,Je as resolveMaterialShorthand3D,G as resolveMotionBlurAlignment,Ts as resolvePivotPosition,wn as resolveProjectDocument,de as resolveShaderProperties,wt as resolveShadow,fa as resolveShadowOptions3D,Ze as resolveShadows3D,Ps as resolveShapeAlignment,ws as resolveShapePivot,St as resolveStroke,_t as resolveStrokeAlign,Tt as resolveStrokeCap,Ft as resolveStrokeEnd,Lt as resolveStrokeJoin,$e as resolveSurfaceSource,qe as resolveTexture3D,Pr as resolveVector3,We as resolveVideoTimestamp,Pa as rotationOf4,j as sameEffectAxis,q as sameEffectColor,Ks as sampleTree,aa as segmentsOf,W as setTheme,da as shadowCasts,yt as shadowOps,vr as shadowProperty,pa as shadowReceives,qi as siblingIssue,hr as size2DOps,lr as sizeInputOps,qr as sizeProperty,Nr as slerpQuaternion,p as sourceTimeAtClipElapsed,ad as sourceTimeAtSceneElapsed,cr as space3dOps,qa as spanFrames,ja as spansCovering,jt as staticValue,As as stripShapeAlignmentKeys,Et as strokeOps,Cr as strokeProperty,Bs as structuralPathOf,wr as textOps,zr as textProperty,ze as texture3DSource,Qr as toCommand,ki as toPathString,$a as totalFramesOf,Ka as trackFrameCount,Na as transformBox3,_a as transformMatrix4,tr as translation,Aa as translation4,te as uniformRecordsEqual,O as uniformValuesEqual,Sa as unionBox3,Pi as untimed,Ci as validateDocument,vi as validateProjectDocument,_s as validateShapeAlignmentProps,I as vector2Ops,Yr as vector2Property,Fr as vector3Ops,st as warmCanvas3D,B as withEffectOptions,Ls as withEllipseDescriptor,Ns as withLineDescriptor,Oi as withPathDescriptor,Ss as withPolygonDescriptor,Es as withPolygramDescriptor,Fs as withRectDescriptor,Xi as withRichTextDescriptor,Qi as withTextDescriptor,Zi as withTransformDescriptor,$i as withdraw,se as writeUniforms,Ca as yieldToScheduler};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/runtime/precompisition.ts", "../../src/runtime/engine.ts", "../../src/platform/audio-sink.ts", "../../src/platform/storage-adapter.ts", "../../src/tween/stepper.ts"],
4
- "sourcesContent": ["import {\n AssetTimeline,\n createAssetTimelineProfile,\n type AssetTimelineOptions,\n type AssetTimelinePhase,\n type AssetTimelineProfile,\n type AssetTimelineResult,\n type AssetTimelineTimings,\n type TrackAssets,\n type TrackAssetsProfile,\n type TrackAssetsTiming,\n} from \"./asset-timeline\";\n\n// The names this module had before it became `asset-timeline`, kept for one alpha.\n\n/** @deprecated Renamed to {@link AssetTimeline}. */\nexport const Precomp = AssetTimeline;\n/** @deprecated Renamed to {@link AssetTimeline}. */\nexport type Precomp = AssetTimeline;\n/** @deprecated Renamed to {@link AssetTimelineResult}. */\nexport type PrecompResult = AssetTimelineResult;\n/** @deprecated Renamed to {@link TrackAssets}. */\nexport type TrackPrecomp = TrackAssets;\n/** @deprecated Renamed to {@link AssetTimelineOptions}. */\nexport type PrecompOptions = AssetTimelineOptions;\n/** @deprecated Renamed to {@link AssetTimelineProfile}. */\nexport type PrecompProfile = AssetTimelineProfile;\n/** @deprecated Renamed to {@link createAssetTimelineProfile}. */\nexport const createPrecompProfile = createAssetTimelineProfile;\n/** @deprecated Renamed to {@link AssetTimelinePhase}. */\nexport type PrecompPhase = AssetTimelinePhase;\n/** @deprecated Renamed to {@link AssetTimelineTimings}. */\nexport type PrecompTimings = AssetTimelineTimings;\n/** @deprecated Renamed to {@link TrackAssetsTiming}. */\nexport type TrackPrecompTiming = TrackAssetsTiming;\n/** @deprecated Renamed to {@link TrackAssetsProfile}. */\nexport type TrackPrecompProfile = TrackAssetsProfile;\n", "import { Size2D } from \"@/attributes/layout/size\";\nimport type { Shader } from \"@/attributes/shape/shaders/pack\";\nimport { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetManifest } from \"@/assets/manifest\";\nimport { Registry, type NodeConstructor, type RegistryOptions } from \"@/document/registry\";\nimport { AudioSink } from \"@/platform/audio-sink\";\nimport { Exporter } from \"@/platform/exporter\";\nimport { Ticker } from \"@/platform/ticker\";\nimport { StorageAdapter } from \"@/platform/storage-adapter\";\nimport { CanvasRenderContext2D } from \"@/render/canvas-render-context2d\";\nimport { MeasureContext2D } from \"@/render/measure-context\";\nimport { RenderSurface } from \"@/render/surface\";\nimport { OpenOptions, Session } from \"./session\";\n\n/** A render context that also owns a surface — what a `Session` mounts into. */\nexport type EngineRenderContext = CanvasRenderContext2D & RenderSurface;\n\n/** What a platform is given to build its per-session objects from. */\nexport interface PlatformDeps {\n catalog: AssetCatalog;\n viewport: Size2D;\n fps: number;\n}\n\n/**\n * How one environment supplies the pieces a `Session` runs on.\n *\n * Five of these are the seams `ControllerParams` has always declared; the sixth\n * is the {@link Exporter} port. Each is a **factory**, not an instance, because\n * a storage adapter is per-viewport (it clamps decode resolution, so a cached\n * decode made for one viewport is genuinely wrong at a larger one) while the\n * engine outlives any single session.\n *\n * The type parameter exists so a platform can hand its own factories a storage\n * adapter richer than `StorageAdapter` — `skia-render` requires\n * `StorageAdapter & SkiaAssets` — without `core` ever naming that type. Core\n * stores and forwards these; it never inspects them.\n */\nexport interface EnginePlatform<TStorage extends StorageAdapter = StorageAdapter> {\n createStorageAdapter(deps: PlatformDeps): TStorage;\n createRenderContext(storage: TStorage): EngineRenderContext;\n createMeasureContext(storage: TStorage): MeasureContext2D;\n createAudioSink(): AudioSink;\n /**\n * The clock a session plays against, or `null` when this environment has no\n * realtime playback — a headless export has no wall clock to sync to, and a\n * session there reports `playback === null` rather than faking one.\n *\n * This is the seam that separates **preview from export**, not browser from\n * server: an export is frame-stepped in either environment, because a\n * wall-clock export drifts.\n *\n * Handed the session's `audioDevice` because a clock that drives sound has\n * to share its timebase — the browser's runs on the audio device's own\n * `AudioContext`, and two independent clocks would drift against each other\n * within one session.\n */\n createTicker(fps: number, audioDevice: AudioSink): Ticker | null;\n createExporter(): Exporter;\n /** Torn down with the engine. For a platform holding a device or a process. */\n dispose?(): void;\n}\n\n/** Settings for the engine as a whole. What to render is passed to `open()`. */\nexport interface EngineOptions {\n /**\n * Node types any document opened here may name — decorated classes as an\n * array, or a record naming each key outright.\n */\n nodes?: RegistryOptions[\"nodes\"];\n /** Shader packs any document opened here may name. Plain JSON. */\n shaders?: RegistryOptions[\"shaders\"];\n /** Extra variable interpolations a document may name in `VariableSpec.lerp`. */\n lerps?: RegistryOptions[\"lerps\"];\n /** Enables `Engine.registerNode` with a source string — see `DynamicNodeConfig`. */\n dynamicNodes?: RegistryOptions[\"dynamicNodes\"];\n /**\n * Asset metadata the renderer needs *before* it loads a file — an image's\n * size, a clip's duration. Reconciled with {@link Engine.setManifest} rather\n * than rebuilt, so a manifest change keeps every decode already cached.\n */\n manifest?: AssetManifest;\n /** Viewport used when a source carries none. Defaults to 1920×1080. */\n viewport?: Size2D;\n /** Frame rate used when a source carries none. Defaults to 60. */\n fps?: number;\n}\n\nexport const DEFAULT_VIEWPORT: Size2D = { width: 1920, height: 1080 };\nexport const DEFAULT_FPS = 60;\nexport const EMPTY_MANIFEST: AssetManifest = { image: {}, video: {}, audio: {}, font: {} };\n\n/**\n * The configured environment a document runs in: what node types and shader\n * packs exist, where assets resolve from, who draws and who encodes.\n *\n * Expensive, and meant to be shared — one per app, not one per canvas. The\n * caches underneath it (registered fonts, decoded images, shaped paragraphs) are\n * the whole reason a warm engine beats a cold one, and they live here rather\n * than on a session so that a preview, a filmstrip of thumbnails and an export\n * all draw on the same ones.\n *\n * The rule for what belongs here rather than on a `Session`: **if two open\n * documents could disagree about it, it is session state.** Two documents can\n * disagree about a theme. They cannot disagree about whether `\"pulseRing\"` is a\n * registered type — one of them is simply invalid.\n */\nexport class Engine<TStorage extends StorageAdapter = StorageAdapter> {\n readonly viewport: Size2D;\n readonly fps: number;\n\n constructor(\n readonly platform: EnginePlatform<TStorage>,\n options: EngineOptions = {},\n ) {\n this._registry = new Registry({\n nodes: options.nodes,\n shaders: options.shaders,\n lerps: options.lerps,\n dynamicNodes: options.dynamicNodes,\n });\n this.viewport = options.viewport ?? DEFAULT_VIEWPORT;\n this.fps = options.fps ?? DEFAULT_FPS;\n this._manifest = options.manifest ?? EMPTY_MANIFEST;\n this._exporter = platform.createExporter();\n }\n\n /** The asset metadata sessions are opened against. */\n get manifest(): AssetManifest {\n return this._manifest;\n }\n\n /** How this engine's sessions turn themselves into bytes. */\n get exporter(): Exporter {\n return this._exporter;\n }\n\n /**\n * Swap in new asset metadata. Existing sessions keep every decode already\n * cached — this replaces what the *catalog* reports, not the bytes behind it.\n */\n setManifest(manifest: AssetManifest): void {\n this._manifest = manifest;\n for (const notify of this._manifestListeners) notify(manifest);\n }\n\n /**\n * Bind a document to this engine and a surface.\n *\n * Cheap: the expensive things — CanvasKit, registered fonts, decoded images,\n * shaped paragraphs — belong to the engine and are shared across every\n * session it opens.\n */\n open(options: OpenOptions): Session {\n return new Session(this as Engine, options);\n }\n\n /** Whether a document naming `key` can be compiled here. */\n knows(key: string): boolean {\n return this._registry.hasNode(key);\n }\n\n /**\n * Read-only introspection of this engine's node/command vocabulary — a\n * type's declared commands and each one's own `@command({ args })`\n * descriptors, for a host that renders per-command UI from them (e.g.\n * which prop keys a `rotateTo` animates). Register or replace a type\n * through `registerNode`/`registerShader` instead; this getter exists for\n * reading the table those build, not for mutating it.\n */\n get registry(): Registry {\n return this._registry;\n }\n\n /**\n * Registers a node type at runtime — a class, or a TS/JSX source string\n * compiled through `dynamicNodes` (see `EngineOptions.dynamicNodes`).\n *\n * Always `async`: one calling convention whether the argument resolves\n * immediately (a class) or needs compiling first (a string).\n */\n async registerNode(\n nodeOrSource: NodeConstructor | string,\n options?: { replace?: boolean },\n ): Promise<NodeConstructor> {\n if (typeof nodeOrSource === \"string\") {\n return this._registry.addNodeFromSource(nodeOrSource, options);\n }\n this._registry.addNode(nodeOrSource, options);\n return nodeOrSource;\n }\n\n /**\n * Registers a shader pack at runtime, under an explicit key — see\n * `Registry.addShader` for why the key is never inferred from the pack.\n */\n registerShader(key: string, pack: unknown, options?: { replace?: boolean }): Shader {\n return this._registry.addShader(key, pack, options);\n }\n\n dispose(): void {\n this._manifestListeners.clear();\n this.platform.dispose?.();\n }\n\n /**\n * The node/shader/lerp vocabulary this engine's documents compile\n * against. Not part of the public surface — reach it through\n * `registerNode`/`registerShader`/`knows` instead. A `Session` (same\n * package) still reads this directly; nothing enforces that at the type\n * level, the same un-enforced convention `_onManifestChange` below\n * already uses.\n */\n readonly _registry: Registry;\n private _manifest: AssetManifest;\n private readonly _exporter: Exporter;\n /** Sessions subscribe so a `setManifest` reaches their live catalogs. */\n private readonly _manifestListeners = new Set<(m: AssetManifest) => void>();\n\n /** @internal — a `Session` registers here for the life of its catalog. */\n _onManifestChange(notify: (m: AssetManifest) => void): () => void {\n this._manifestListeners.add(notify);\n return () => this._manifestListeners.delete(notify);\n }\n}\n", "import type { AudioRequest } from \"@/attributes/audio/request\";\n\n\n/**\n * Stackable audio player driven by the AssetManager.\n *\n * The AssetManager decides which audio data is needed within the current\n * look-ahead window and pushes it in via {@link append}; the device caches the\n * decoded form, schedules the matching {@link AudioRequest}s via\n * {@link schedule}, and drives playback through {@link syncTo} on each tick.\n */\nexport abstract class AudioSink {\n /**\n * Whether pushing the audio working set to this device does anything at all.\n *\n * False for a sink that discards everything — an export, whose audio is mixed\n * offline in a single pass at the end. `AssetManager.syncAudio` runs on every\n * frame and rebuilds a `Set`, a per-request id string and a sorted signature\n * each time; against such a device every one of those calls lands on a no-op,\n * so the work is skipped rather than done and thrown away.\n */\n get schedulesAudio(): boolean {\n return true;\n }\n\n /** True if decoded data for `src` is already cached on the device. */\n abstract has(src: string): boolean;\n\n /**\n * Decode and stack `data` under `src`. Idempotent — repeat calls for an\n * already-cached `src` are no-ops.\n */\n abstract append(src: string, data: ArrayBuffer): Promise<void>;\n\n /** Drop cached audio data (and any active sources) for srcs not in `keep`. */\n abstract retain(keep: ReadonlySet<string>): void;\n\n /**\n * Set the working set of audio requests for the current look-ahead window.\n * Requests no longer present are stopped; new ones become eligible for\n * playback via {@link syncTo} as soon as their data is appended.\n */\n abstract schedule(requests: readonly AudioRequest[]): void;\n\n /**\n * Start/stop scheduled sources to match `sceneTime`. Called every tick.\n * Sources whose data has not yet been appended are skipped until it is.\n */\n abstract syncTo(sceneTime: number): void;\n\n abstract play(time: number, speed: number, reverse: boolean): void | Promise<void>;\n abstract stop(): void;\n\n /**\n * Mute or unmute all output. Default is a no-op for devices that produce no\n * sound (e.g. export/noop sinks).\n */\n setMuted(muted: boolean): void {}\n\n /**\n * Set the linear gain applied to all output, on top of each request's own\n * `volume`. Independent of {@link setMuted} — unmuting restores this level\n * rather than resetting to 1, so a host can hold a volume slider and a mute\n * button without the two clobbering each other.\n *\n * Default is a no-op, as for {@link setMuted}.\n */\n setVolume(volume: number): void {}\n\n dispose(): void {\n this.stop();\n }\n}\n", "import { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetRecord } from \"@/assets/record\";\nimport { Size2D } from \"@/attributes/layout/size\";\n\n/**\n * How an adapter picks the resolution to decode media at.\n *\n * `\"exact\"` — export, stills, screenshots: the level follows the current draw\n * alone, so a frame is the same pixels whatever was drawn before it on a reused\n * adapter. `\"interactive\"` — preview: reuse whatever resident level is already\n * good enough, and upgrade in the background.\n */\nexport type DecodePolicy = \"exact\" | \"interactive\";\n\nexport abstract class StorageAdapter {\n protected catalog: AssetCatalog;\n protected viewport: Size2D;\n constructor(catalog: AssetCatalog, viewport: Size2D) {\n this.catalog = catalog;\n this.viewport = viewport;\n }\n\n /**\n * Point the adapter at a different asset catalog, keeping every decode it has\n * already cached.\n *\n * Safe because the catalog supplies *metadata* (durations, intrinsic sizes)\n * while the caches are keyed by source URL: a src the new catalog drops leaves\n * an orphaned decode, and a src it adds simply isn't cached yet. Neither is a\n * correctness problem, which is what lets a long-lived renderer take an\n * updated manifest without paying to re-decode everything still in use.\n *\n * The viewport has no such setter; a host that changes output size rebuilds\n * the adapter.\n */\n setCatalog(catalog: AssetCatalog): void {\n this.catalog = catalog;\n }\n /**\n * Every asset src whose loadXxx is currently in flight, mapped to its\n * pending promise. The render path awaits these to guarantee no draw\n * happens while a load is still resolving. Cleared on completion.\n */\n protected inFlightLoads = new Map<string, Promise<void>>();\n /** Keys of assets that have been fully loaded and are ready to use. */\n protected cachedAssets = new Set<string>();\n\n // ─── Asset loading dispatch ───────────────────────────────────────────────\n\n /** Whether `key` has finished loading and is usable now. */\n isLoaded(key: string): boolean {\n return this.cachedAssets.has(key);\n }\n\n async loadAsset(key: string, value: AssetRecord): Promise<void> {\n const existing = this.inFlightLoads.get(key);\n if (existing) return existing;\n if (this.cachedAssets.has(key)) return;\n\n const job = this.runLoad(key, value);\n this.inFlightLoads.set(key, job);\n try {\n await job;\n } finally {\n this.inFlightLoads.delete(key);\n }\n }\n\n private async runLoad(key: string, value: AssetRecord): Promise<void> {\n let loaded = true;\n switch (value.type) {\n case 'image':\n await this.loadImage(key);\n break;\n case 'video':\n await this.loadVideo(key, value.startFrame, value.endFrame, value.trimStart, value.trimEnd);\n break;\n case 'font': {\n const { fontFamily, fontWeight } = this.parseFontKey(key);\n loaded = await this.loadFont(key, fontFamily, fontWeight);\n break;\n }\n case 'audio':\n // Audio files are loaded on-demand via fetchAudioData / syncAudio, not through loadAsset.\n break;\n case 'loader':\n // Loaders are opaque callbacks run directly by the AssetManager and\n // never dispatched through the storage adapter.\n throw new Error(\"Loader records must not be routed through StorageAdapter.loadAsset\");\n default: {\n const _exhaustive: never = value;\n throw new Error(`Unsupported asset type: ${(_exhaustive as AssetRecord).type}`);\n }\n }\n\n // Only a load that actually happened is cached. This matters for exactly\n // one case: a font family the manifest cannot describe. Caching it anyway\n // marked the family handled for the life of this adapter, so a manifest\n // that *later* described it — which is what installing a typeface does,\n // folded into the live manifest without rebuilding the controller — could\n // never load it, and the text stayed in the fallback face until something\n // else tore the adapter down.\n if (loaded) this.cachedAssets.add(key);\n }\n\n // ─── Font key parsing ─────────────────────────────────────────────────────\n\n protected parseFontKey(key: string): { fontFamily: string; fontWeight: number } {\n const [fontFamily, weightStr] = key.split('@');\n const fontWeight = weightStr ? parseInt(weightStr, 10) : 400;\n return {\n fontFamily: fontFamily || key,\n fontWeight: isNaN(fontWeight) ? 400 : fontWeight,\n };\n }\n\n // ─── Abstract load methods ────────────────────────────────────────────────\n\n /** Decode resolution follows the draw, so a load names only the source. */\n abstract loadImage(src: string): Promise<void>;\n abstract loadVideo(\n src: string,\n startFrame: number,\n endFrame: number,\n trimStart: number,\n trimEnd?: number,\n ): Promise<void>;\n abstract loadAudio(\n src: string,\n startFrame: number,\n endFrame: number,\n trimStart: number,\n trimEnd?: number,\n ): Promise<void>;\n abstract fetchAudioData(src: string): Promise<ArrayBuffer>;\n /**\n * Register every face of `fontFamily` the catalog describes.\n *\n * Returns whether the family was actually loaded. `false` means the manifest\n * has no entry for it — not an error (an undescribed family shapes against\n * the platform fallback, which is what a system font name does), but it must\n * not be remembered as handled: see the note in {@link runLoad}.\n */\n abstract loadFont(src: string, fontFamily: string, fontWeight: number): Promise<boolean>;\n\n // ─── Frame warming ────────────────────────────────────────────────────────\n\n /**\n * Decode any exact media frames the most recent render asked for but couldn't\n * satisfy synchronously (e.g. a video frame at a freshly-seeked timestamp),\n * and report whether there were any. A blocking caller (seek / screenshot /\n * export) renders once, awaits this, and re-renders while it returns true so\n * the frame is accurate even on a cold jump. Defaults to a no-op for adapters\n * with no time-varying media.\n */\n async warmPendingVideo(): Promise<boolean> {\n return false;\n }\n\n setDecodePolicy(policy: DecodePolicy): void {\n // no-op for adapters that decode at one resolution\n }\n\n /** Read back so a caller that borrows the adapter can restore it. */\n getDecodePolicy(): DecodePolicy {\n return \"interactive\";\n }\n\n /** Whether the most recent render left decodes that {@link warmPendingDecodes} would settle. */\n hasPendingDecodes(): boolean {\n return false;\n }\n\n /**\n * Settle what the last render could not draw acceptably under the current\n * policy — video frames, every exact image level under `\"exact\"`, a source\n * drawn with nothing resident under `\"interactive\"` — and report whether there\n * was any. See `renderSettled`.\n *\n * Defaults to {@link warmPendingVideo} so an adapter written against it keeps\n * working; that alias goes away after one release.\n */\n async warmPendingDecodes(): Promise<boolean> {\n return this.warmPendingVideo();\n }\n\n /**\n * Whether an `\"interactive\"` decode is on its way that would draw the last\n * render sharper. Not something a paint waits for: a preview shows what is\n * resident and repaints when {@link warmPendingUpgrades} reports a landing.\n */\n hasPendingUpgrades(): boolean {\n return false;\n }\n\n /** Await the upgrades {@link hasPendingUpgrades} reports; whether one landed. */\n async warmPendingUpgrades(): Promise<boolean> {\n return false;\n }\n\n /**\n * Notify the adapter whether playback is live. Time-varying media (video) uses\n * this to prefetch ahead only while playing and to quiesce on pause, so a\n * paused timeline doesn't drain a backlog of stale decodes. No-op by default.\n */\n setPlaying(playing: boolean): void {\n // no-op for adapters with no time-varying media\n }\n\n // ─── Lifecycle ────────────────────────────────────────────────────────────\n\n dispose(): void {\n this.inFlightLoads.clear();\n this.cachedAssets.clear();\n }\n}\n", "/**\n * A flat animation driver. `advance(dt)` moves the animation forward by `dt`\n * seconds and returns `true` once it has completed (and applied its final\n * value). It must be primed at t=0 before the first `advance` so the starting\n * frame is correct — callers apply the initial value via `seek(0)`.\n *\n * `seek(elapsed)` is the absolute-time half, and is what a {@link Command}'s\n * `at` is built on: a stepper can be asked for any time, in any order, which is\n * what lets a timeline evaluate a frame without having played the ones before\n * it.\n */\n/** @internal */\nexport interface TweenStepper {\n /**\n * Jump to the value corresponding to `elapsed` seconds from the start.\n * Call with `0` to prime the stepper before the first {@link advance}.\n */\n seek(elapsed: number): void;\n /**\n * Advance the animation by `dt` seconds.\n * @returns `true` when the animation has finished and its final value has\n * been applied; `false` if it is still running.\n */\n advance(dt: number): boolean;\n}\n\n/**\n * Implemented by anything that can produce a {@link TweenStepper} — a\n * {@link Command}, and anything a host drives directly.\n */\nexport interface Steppable {\n /** Return a fresh stepper for a single playthrough of this animation. */\n _stepper(): TweenStepper;\n}\n\nexport function isSteppable(x: unknown): x is Steppable {\n return typeof (x as Steppable)?._stepper === \"function\";\n}\n"],
5
- "mappings": "i0HAgBO,IAAMA,GAAUC,EAYVC,GAAuBC,EC4D7B,IAAMC,EAA2B,CAAE,MAAO,KAAM,OAAQ,IAAI,EACtDC,EAAc,GACdC,EAAgC,CAAE,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,KAAM,CAAA,CAAE,EAiB3EC,EAAP,KAAa,CAKF,SAJJ,SACA,IAET,YACaC,EACTC,EAAyB,CAAA,EAAE,CADlB,KAAA,SAAAD,EAGT,KAAK,UAAY,IAAIE,EAAS,CAC1B,MAAOD,EAAQ,MACf,QAASA,EAAQ,QACjB,MAAOA,EAAQ,MACf,aAAcA,EAAQ,aACzB,EACD,KAAK,SAAWA,EAAQ,UAAYL,EACpC,KAAK,IAAMK,EAAQ,KAAOJ,EAC1B,KAAK,UAAYI,EAAQ,UAAYH,EACrC,KAAK,UAAYE,EAAS,eAAc,CAC5C,CAGA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CAGA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CAMA,YAAYG,EAAuB,CAC/B,KAAK,UAAYA,EACjB,QAAWC,KAAU,KAAK,mBAAoBA,EAAOD,CAAQ,CACjE,CASA,KAAKF,EAAoB,CACrB,OAAO,IAAII,EAAQ,KAAgBJ,CAAO,CAC9C,CAGA,MAAMK,EAAW,CACb,OAAO,KAAK,UAAU,QAAQA,CAAG,CACrC,CAUA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CASA,MAAM,aACFC,EACAN,EAA+B,CAE/B,OAAI,OAAOM,GAAiB,SACjB,KAAK,UAAU,kBAAkBA,EAAcN,CAAO,GAEjE,KAAK,UAAU,QAAQM,EAAcN,CAAO,EACrCM,EACX,CAMA,eAAeD,EAAaE,EAAeP,EAA+B,CACtE,OAAO,KAAK,UAAU,UAAUK,EAAKE,EAAMP,CAAO,CACtD,CAEA,SAAO,CACH,KAAK,mBAAmB,MAAK,EAC7B,KAAK,SAAS,UAAS,CAC3B,CAUS,UACD,UACS,UAEA,mBAAqB,IAAI,IAG1C,kBAAkBG,EAAkC,CAChD,YAAK,mBAAmB,IAAIA,CAAM,EAC3B,IAAM,KAAK,mBAAmB,OAAOA,CAAM,CACtD,GCpNE,IAAgBK,EAAhB,KAAyB,CAU3B,IAAI,gBAAc,CACd,MAAO,EACX,CAkCA,SAASC,EAAc,CAAS,CAUhC,UAAUC,EAAc,CAAS,CAEjC,SAAO,CACH,KAAK,KAAI,CACb,GCzDE,IAAgBC,EAAhB,KAA8B,CACtB,QACA,SACV,YAAYC,EAAuBC,EAAgB,CAC/C,KAAK,QAAUD,EACf,KAAK,SAAWC,CACpB,CAeA,WAAWD,EAAqB,CAC5B,KAAK,QAAUA,CACnB,CAMU,cAAgB,IAAI,IAEpB,aAAe,IAAI,IAK7B,SAASE,EAAW,CAChB,OAAO,KAAK,aAAa,IAAIA,CAAG,CACpC,CAEA,MAAM,UAAUA,EAAaC,EAAkB,CAC3C,IAAMC,EAAW,KAAK,cAAc,IAAIF,CAAG,EAC3C,GAAIE,EAAU,OAAOA,EACrB,GAAI,KAAK,aAAa,IAAIF,CAAG,EAAG,OAEhC,IAAMG,EAAM,KAAK,QAAQH,EAAKC,CAAK,EACnC,KAAK,cAAc,IAAID,EAAKG,CAAG,EAC/B,GAAI,CACA,MAAMA,CACV,SACI,KAAK,cAAc,OAAOH,CAAG,CACjC,CACJ,CAEQ,MAAM,QAAQA,EAAaC,EAAkB,CACjD,IAAIG,EAAS,GACb,OAAQH,EAAM,KAAM,CAChB,IAAK,QACD,MAAM,KAAK,UAAUD,CAAG,EACxB,MACJ,IAAK,QACD,MAAM,KAAK,UAAUA,EAAKC,EAAM,WAAYA,EAAM,SAAUA,EAAM,UAAWA,EAAM,OAAO,EAC1F,MACJ,IAAK,OAAQ,CACT,GAAM,CAAE,WAAAI,EAAY,WAAAC,CAAU,EAAK,KAAK,aAAaN,CAAG,EACxDI,EAAS,MAAM,KAAK,SAASJ,EAAKK,EAAYC,CAAU,EACxD,KACJ,CACA,IAAK,QAED,MACJ,IAAK,SAGD,MAAM,IAAI,MAAM,oEAAoE,EACxF,QAAS,CACL,IAAMC,EAAqBN,EAC3B,MAAM,IAAI,MAAM,2BAA4BM,EAA4B,IAAI,EAAE,CAClF,CACJ,CASIH,GAAQ,KAAK,aAAa,IAAIJ,CAAG,CACzC,CAIU,aAAaA,EAAW,CAC9B,GAAM,CAACK,EAAYG,CAAS,EAAIR,EAAI,MAAM,GAAG,EACvCM,EAAaE,EAAY,SAASA,EAAW,EAAE,EAAI,IACzD,MAAO,CACH,WAAYH,GAAcL,EAC1B,WAAY,MAAMM,CAAU,EAAI,IAAMA,EAE9C,CAyCA,MAAM,kBAAgB,CAClB,MAAO,EACX,CAEA,gBAAgBG,EAAoB,CAEpC,CAGA,iBAAe,CACX,MAAO,aACX,CAGA,mBAAiB,CACb,MAAO,EACX,CAWA,MAAM,oBAAkB,CACpB,OAAO,KAAK,iBAAgB,CAChC,CAOA,oBAAkB,CACd,MAAO,EACX,CAGA,MAAM,qBAAmB,CACrB,MAAO,EACX,CAOA,WAAWC,EAAgB,CAE3B,CAIA,SAAO,CACH,KAAK,cAAc,MAAK,EACxB,KAAK,aAAa,MAAK,CAC3B,GCnLE,SAAUC,GAAYC,EAAU,CAClC,OAAO,OAAQA,GAAiB,UAAa,UACjD",
6
- "names": ["Precomp", "AssetTimeline", "createPrecompProfile", "createAssetTimelineProfile", "DEFAULT_VIEWPORT", "DEFAULT_FPS", "EMPTY_MANIFEST", "Engine", "platform", "options", "Registry", "manifest", "notify", "Session", "key", "nodeOrSource", "pack", "AudioSink", "muted", "volume", "StorageAdapter", "catalog", "viewport", "key", "value", "existing", "job", "loaded", "fontFamily", "fontWeight", "_exhaustive", "weightStr", "policy", "playing", "isSteppable", "x"]
3
+ "sources": ["../../src/runtime/precompisition.ts", "../../src/runtime/engine.ts", "../../src/platform/audio-sink.ts", "../../src/platform/storage-adapter.ts", "../../src/tween/stepper.ts", "../../src/renamed-scene-names.ts"],
4
+ "sourcesContent": ["import {\r\n AssetTimeline,\r\n createAssetTimelineProfile,\r\n type AssetTimelineOptions,\r\n type AssetTimelinePhase,\r\n type AssetTimelineProfile,\r\n type AssetTimelineResult,\r\n type AssetTimelineTimings,\r\n type TrackAssets,\r\n type TrackAssetsProfile,\r\n type TrackAssetsTiming,\r\n} from \"./asset-timeline\";\r\n\r\n// The names this module had before it became `asset-timeline`, kept for one alpha.\r\n\r\n/** @deprecated Renamed to {@link AssetTimeline}. */\r\nexport const Precomp = AssetTimeline;\r\n/** @deprecated Renamed to {@link AssetTimeline}. */\r\nexport type Precomp = AssetTimeline;\r\n/** @deprecated Renamed to {@link AssetTimelineResult}. */\r\nexport type PrecompResult = AssetTimelineResult;\r\n/** @deprecated Renamed to {@link TrackAssets}. */\r\nexport type TrackPrecomp = TrackAssets;\r\n/** @deprecated Renamed to {@link AssetTimelineOptions}. */\r\nexport type PrecompOptions = AssetTimelineOptions;\r\n/** @deprecated Renamed to {@link AssetTimelineProfile}. */\r\nexport type PrecompProfile = AssetTimelineProfile;\r\n/** @deprecated Renamed to {@link createAssetTimelineProfile}. */\r\nexport const createPrecompProfile = createAssetTimelineProfile;\r\n/** @deprecated Renamed to {@link AssetTimelinePhase}. */\r\nexport type PrecompPhase = AssetTimelinePhase;\r\n/** @deprecated Renamed to {@link AssetTimelineTimings}. */\r\nexport type PrecompTimings = AssetTimelineTimings;\r\n/** @deprecated Renamed to {@link TrackAssetsTiming}. */\r\nexport type TrackPrecompTiming = TrackAssetsTiming;\r\n/** @deprecated Renamed to {@link TrackAssetsProfile}. */\r\nexport type TrackPrecompProfile = TrackAssetsProfile;\r\n", "import { Size2D } from \"@/attributes/layout/size\";\r\nimport type { Shader } from \"@/attributes/shape/shaders/pack\";\r\nimport { AssetCatalog } from \"@/assets/catalog\";\r\nimport { AssetManifest } from \"@/assets/manifest\";\r\nimport { Registry, type NodeConstructor, type RegistryOptions } from \"@/document/registry\";\r\nimport { AudioSink } from \"@/platform/audio-sink\";\r\nimport { Exporter } from \"@/platform/exporter\";\r\nimport { Ticker } from \"@/platform/ticker\";\r\nimport { StorageAdapter } from \"@/platform/storage-adapter\";\r\nimport { CanvasRenderContext2D } from \"@/render/canvas-render-context2d\";\r\nimport { MeasureContext2D } from \"@/render/measure-context\";\r\nimport { RenderSurface } from \"@/render/surface\";\r\nimport { OpenOptions, Session } from \"./session\";\r\n\r\n/** A render context that also owns a surface — what a `Session` mounts into. */\r\nexport type EngineRenderContext = CanvasRenderContext2D & RenderSurface;\r\n\r\n/** What a platform is given to build its per-session objects from. */\r\nexport interface PlatformDeps {\r\n catalog: AssetCatalog;\r\n viewport: Size2D;\r\n fps: number;\r\n}\r\n\r\n/**\r\n * How one environment supplies the pieces a `Session` runs on.\r\n *\r\n * Five of these are the seams `ControllerParams` has always declared; the sixth\r\n * is the {@link Exporter} port. Each is a **factory**, not an instance, because\r\n * a storage adapter is per-viewport (it clamps decode resolution, so a cached\r\n * decode made for one viewport is genuinely wrong at a larger one) while the\r\n * engine outlives any single session.\r\n *\r\n * The type parameter exists so a platform can hand its own factories a storage\r\n * adapter richer than `StorageAdapter` — `skia-render` requires\r\n * `StorageAdapter & SkiaAssets` — without `core` ever naming that type. Core\r\n * stores and forwards these; it never inspects them.\r\n */\r\nexport interface EnginePlatform<TStorage extends StorageAdapter = StorageAdapter> {\r\n createStorageAdapter(deps: PlatformDeps): TStorage;\r\n createRenderContext(storage: TStorage): EngineRenderContext;\r\n createMeasureContext(storage: TStorage): MeasureContext2D;\r\n createAudioSink(): AudioSink;\r\n /**\r\n * The clock a session plays against, or `null` when this environment has no\r\n * realtime playback — a headless export has no wall clock to sync to, and a\r\n * session there reports `playback === null` rather than faking one.\r\n *\r\n * This is the seam that separates **preview from export**, not browser from\r\n * server: an export is frame-stepped in either environment, because a\r\n * wall-clock export drifts.\r\n *\r\n * Handed the session's `audioDevice` because a clock that drives sound has\r\n * to share its timebase — the browser's runs on the audio device's own\r\n * `AudioContext`, and two independent clocks would drift against each other\r\n * within one session.\r\n */\r\n createTicker(fps: number, audioDevice: AudioSink): Ticker | null;\r\n createExporter(): Exporter;\r\n /** Torn down with the engine. For a platform holding a device or a process. */\r\n dispose?(): void;\r\n}\r\n\r\n/** Settings for the engine as a whole. What to render is passed to `open()`. */\r\nexport interface EngineOptions {\r\n /**\r\n * Node types any document opened here may name — decorated classes as an\r\n * array, or a record naming each key outright.\r\n */\r\n nodes?: RegistryOptions[\"nodes\"];\r\n /** Shader packs any document opened here may name. Plain JSON. */\r\n shaders?: RegistryOptions[\"shaders\"];\r\n /** Extra variable interpolations a document may name in `VariableSpec.lerp`. */\r\n lerps?: RegistryOptions[\"lerps\"];\r\n /** Enables `Engine.registerNode` with a source string — see `DynamicNodeConfig`. */\r\n dynamicNodes?: RegistryOptions[\"dynamicNodes\"];\r\n /**\r\n * Asset metadata the renderer needs *before* it loads a file — an image's\r\n * size, a clip's duration. Reconciled with {@link Engine.setManifest} rather\r\n * than rebuilt, so a manifest change keeps every decode already cached.\r\n */\r\n manifest?: AssetManifest;\r\n /** Viewport used when a source carries none. Defaults to 1920×1080. */\r\n viewport?: Size2D;\r\n /** Frame rate used when a source carries none. Defaults to 60. */\r\n fps?: number;\r\n}\r\n\r\nexport const DEFAULT_VIEWPORT: Size2D = { width: 1920, height: 1080 };\r\nexport const DEFAULT_FPS = 60;\r\n/** What a document renders at when neither the caller nor the document says. */\r\nexport const DEFAULT_OUTPUT: { viewport: Size2D; fps: number } = { viewport: DEFAULT_VIEWPORT, fps: DEFAULT_FPS };\r\nexport const EMPTY_MANIFEST: AssetManifest = { image: {}, video: {}, audio: {}, font: {} };\r\n\r\n/**\r\n * The configured environment a document runs in: what node types and shader\r\n * packs exist, where assets resolve from, who draws and who encodes.\r\n *\r\n * Expensive, and meant to be shared — one per app, not one per canvas. The\r\n * caches underneath it (registered fonts, decoded images, shaped paragraphs) are\r\n * the whole reason a warm engine beats a cold one, and they live here rather\r\n * than on a session so that a preview, a filmstrip of thumbnails and an export\r\n * all draw on the same ones.\r\n *\r\n * The rule for what belongs here rather than on a `Session`: **if two open\r\n * documents could disagree about it, it is session state.** Two documents can\r\n * disagree about a theme. They cannot disagree about whether `\"pulseRing\"` is a\r\n * registered type — one of them is simply invalid.\r\n */\r\nexport class Engine<TStorage extends StorageAdapter = StorageAdapter> {\r\n readonly viewport: Size2D;\r\n readonly fps: number;\r\n\r\n constructor(\r\n readonly platform: EnginePlatform<TStorage>,\r\n options: EngineOptions = {},\r\n ) {\r\n this._registry = new Registry({\r\n nodes: options.nodes,\r\n shaders: options.shaders,\r\n lerps: options.lerps,\r\n dynamicNodes: options.dynamicNodes,\r\n });\r\n this.viewport = options.viewport ?? DEFAULT_VIEWPORT;\r\n this.fps = options.fps ?? DEFAULT_FPS;\r\n this._manifest = options.manifest ?? EMPTY_MANIFEST;\r\n this._exporter = platform.createExporter();\r\n }\r\n\r\n /** The asset metadata sessions are opened against. */\r\n get manifest(): AssetManifest {\r\n return this._manifest;\r\n }\r\n\r\n /** How this engine's sessions turn themselves into bytes. */\r\n get exporter(): Exporter {\r\n return this._exporter;\r\n }\r\n\r\n /**\r\n * Swap in new asset metadata. Existing sessions keep every decode already\r\n * cached — this replaces what the *catalog* reports, not the bytes behind it.\r\n */\r\n setManifest(manifest: AssetManifest): void {\r\n this._manifest = manifest;\r\n for (const notify of this._manifestListeners) notify(manifest);\r\n }\r\n\r\n /**\r\n * Bind a document to this engine and a surface.\r\n *\r\n * Cheap: the expensive things — CanvasKit, registered fonts, decoded images,\r\n * shaped paragraphs — belong to the engine and are shared across every\r\n * session it opens.\r\n */\r\n open(options: OpenOptions): Session {\r\n return new Session(this as Engine, options);\r\n }\r\n\r\n /** Whether a document naming `key` can be compiled here. */\r\n knows(key: string): boolean {\r\n return this._registry.hasNode(key);\r\n }\r\n\r\n /**\r\n * Read-only introspection of this engine's node/command vocabulary — a\r\n * type's declared commands and each one's own `@command({ args })`\r\n * descriptors, for a host that renders per-command UI from them (e.g.\r\n * which prop keys a `rotateTo` animates). Register or replace a type\r\n * through `registerNode`/`registerShader` instead; this getter exists for\r\n * reading the table those build, not for mutating it.\r\n */\r\n get registry(): Registry {\r\n return this._registry;\r\n }\r\n\r\n /**\r\n * Registers a node type at runtime — a class, or a TS/JSX source string\r\n * compiled through `dynamicNodes` (see `EngineOptions.dynamicNodes`).\r\n *\r\n * Always `async`: one calling convention whether the argument resolves\r\n * immediately (a class) or needs compiling first (a string).\r\n */\r\n async registerNode(\r\n nodeOrSource: NodeConstructor | string,\r\n options?: { replace?: boolean },\r\n ): Promise<NodeConstructor> {\r\n if (typeof nodeOrSource === \"string\") {\r\n return this._registry.addNodeFromSource(nodeOrSource, options);\r\n }\r\n this._registry.addNode(nodeOrSource, options);\r\n return nodeOrSource;\r\n }\r\n\r\n /**\r\n * Registers a shader pack at runtime, under an explicit key — see\r\n * `Registry.addShader` for why the key is never inferred from the pack.\r\n */\r\n registerShader(key: string, pack: unknown, options?: { replace?: boolean }): Shader {\r\n return this._registry.addShader(key, pack, options);\r\n }\r\n\r\n dispose(): void {\r\n this._manifestListeners.clear();\r\n this.platform.dispose?.();\r\n }\r\n\r\n /**\r\n * The node/shader/lerp vocabulary this engine's documents compile\r\n * against. Not part of the public surface — reach it through\r\n * `registerNode`/`registerShader`/`knows` instead. A `Session` (same\r\n * package) still reads this directly; nothing enforces that at the type\r\n * level, the same un-enforced convention `_onManifestChange` below\r\n * already uses.\r\n */\r\n readonly _registry: Registry;\r\n private _manifest: AssetManifest;\r\n private readonly _exporter: Exporter;\r\n /** Sessions subscribe so a `setManifest` reaches their live catalogs. */\r\n private readonly _manifestListeners = new Set<(m: AssetManifest) => void>();\r\n\r\n /** @internal — a `Session` registers here for the life of its catalog. */\r\n _onManifestChange(notify: (m: AssetManifest) => void): () => void {\r\n this._manifestListeners.add(notify);\r\n return () => this._manifestListeners.delete(notify);\r\n }\r\n}\r\n", "import type { AudioRequest } from \"@/attributes/audio/request\";\r\n\r\n\r\n/**\r\n * Stackable audio player driven by the AssetManager.\r\n *\r\n * The AssetManager decides which audio data is needed within the current\r\n * look-ahead window and pushes it in via {@link append}; the device caches the\r\n * decoded form, schedules the matching {@link AudioRequest}s via\r\n * {@link schedule}, and drives playback through {@link syncTo} on each tick.\r\n */\r\nexport abstract class AudioSink {\r\n /**\r\n * Whether pushing the audio working set to this device does anything at all.\r\n *\r\n * False for a sink that discards everything — an export, whose audio is mixed\r\n * offline in a single pass at the end. `AssetManager.syncAudio` runs on every\r\n * frame and rebuilds a `Set`, a per-request id string and a sorted signature\r\n * each time; against such a device every one of those calls lands on a no-op,\r\n * so the work is skipped rather than done and thrown away.\r\n */\r\n get schedulesAudio(): boolean {\r\n return true;\r\n }\r\n\r\n /** True if decoded data for `src` is already cached on the device. */\r\n abstract has(src: string): boolean;\r\n\r\n /**\r\n * Decode and stack `data` under `src`. Idempotent — repeat calls for an\r\n * already-cached `src` are no-ops.\r\n */\r\n abstract append(src: string, data: ArrayBuffer): Promise<void>;\r\n\r\n /** Drop cached audio data (and any active sources) for srcs not in `keep`. */\r\n abstract retain(keep: ReadonlySet<string>): void;\r\n\r\n /**\r\n * Set the working set of audio requests for the current look-ahead window.\r\n * Requests no longer present are stopped; new ones become eligible for\r\n * playback via {@link syncTo} as soon as their data is appended.\r\n */\r\n abstract schedule(requests: readonly AudioRequest[]): void;\r\n\r\n /**\r\n * Start/stop scheduled sources to match `clipTime`. Called every tick.\r\n * Sources whose data has not yet been appended are skipped until it is.\r\n */\r\n abstract syncTo(clipTime: number): void;\r\n\r\n abstract play(time: number, speed: number, reverse: boolean): void | Promise<void>;\r\n abstract stop(): void;\r\n\r\n /**\r\n * Mute or unmute all output. Default is a no-op for devices that produce no\r\n * sound (e.g. export/noop sinks).\r\n */\r\n setMuted(muted: boolean): void {}\r\n\r\n /**\r\n * Set the linear gain applied to all output, on top of each request's own\r\n * `volume`. Independent of {@link setMuted} — unmuting restores this level\r\n * rather than resetting to 1, so a host can hold a volume slider and a mute\r\n * button without the two clobbering each other.\r\n *\r\n * Default is a no-op, as for {@link setMuted}.\r\n */\r\n setVolume(volume: number): void {}\r\n\r\n dispose(): void {\r\n this.stop();\r\n }\r\n}\r\n", "import { AssetCatalog } from \"@/assets/catalog\";\r\nimport { AssetNotLoadedError } from \"@/assets/errors\";\r\nimport { AssetRecord } from \"@/assets/record\";\r\nimport { Size2D } from \"@/attributes/layout/size\";\r\n\r\n/**\r\n * How an adapter picks the resolution to decode media at, and how strict it is\r\n * about what it cannot load.\r\n *\r\n * `\"exact\"` — export, stills, screenshots: the level follows the current draw\r\n * alone, so a frame is the same pixels whatever was drawn before it on a reused\r\n * adapter, and a font family the manifest cannot describe is refused rather\r\n * than shaped against the fallback face. `\"interactive\"` — preview: reuse\r\n * whatever resident level is already good enough, and upgrade in the\r\n * background; an undescribed family draws in the fallback face until a manifest\r\n * describes it.\r\n */\r\nexport type DecodePolicy = \"exact\" | \"interactive\";\r\n\r\nexport abstract class StorageAdapter {\r\n protected catalog: AssetCatalog;\r\n protected viewport: Size2D;\r\n constructor(catalog: AssetCatalog, viewport: Size2D) {\r\n this.catalog = catalog;\r\n this.viewport = viewport;\r\n }\r\n\r\n /**\r\n * Point the adapter at a different asset catalog, keeping every decode it has\r\n * already cached.\r\n *\r\n * Safe because the catalog supplies *metadata* (durations, intrinsic sizes)\r\n * while the caches are keyed by source URL: a src the new catalog drops leaves\r\n * an orphaned decode, and a src it adds simply isn't cached yet. Neither is a\r\n * correctness problem, which is what lets a long-lived renderer take an\r\n * updated manifest without paying to re-decode everything still in use.\r\n *\r\n * The viewport has no such setter; a host that changes output size rebuilds\r\n * the adapter.\r\n */\r\n setCatalog(catalog: AssetCatalog): void {\r\n this.catalog = catalog;\r\n }\r\n /**\r\n * Every asset src whose loadXxx is currently in flight, mapped to its\r\n * pending promise. The render path awaits these to guarantee no draw\r\n * happens while a load is still resolving. Cleared on completion.\r\n */\r\n protected inFlightLoads = new Map<string, Promise<void>>();\r\n /** Keys of assets that have been fully loaded and are ready to use. */\r\n protected cachedAssets = new Set<string>();\r\n\r\n // ─── Asset loading dispatch ───────────────────────────────────────────────\r\n\r\n /** Whether `key` has finished loading and is usable now. */\r\n isLoaded(key: string): boolean {\r\n return this.cachedAssets.has(key);\r\n }\r\n\r\n async loadAsset(key: string, value: AssetRecord): Promise<void> {\r\n const existing = this.inFlightLoads.get(key);\r\n if (existing) return existing;\r\n if (this.cachedAssets.has(key)) return;\r\n\r\n const job = this.runLoad(key, value);\r\n this.inFlightLoads.set(key, job);\r\n try {\r\n await job;\r\n } finally {\r\n this.inFlightLoads.delete(key);\r\n }\r\n }\r\n\r\n private async runLoad(key: string, value: AssetRecord): Promise<void> {\r\n let loaded = true;\r\n switch (value.type) {\r\n case 'image':\r\n await this.loadImage(key);\r\n break;\r\n case 'video':\r\n await this.loadVideo(key, value.startFrame, value.endFrame, value.trimStart, value.trimEnd);\r\n break;\r\n case 'font': {\r\n const { fontFamily, fontWeight } = this.parseFontKey(key);\r\n loaded = await this.loadFont(key, fontFamily, fontWeight);\r\n if (!loaded && this.getDecodePolicy() === \"exact\") {\r\n throw new AssetNotLoadedError(\r\n \"font\",\r\n fontFamily,\r\n `The manifest has no font entry for \"${fontFamily}\", so this frame would be shaped against the fallback face and differ from the one drawn once it is described. Add the family to the manifest's font record.`,\r\n );\r\n }\r\n break;\r\n }\r\n case 'audio':\r\n // Audio files are loaded on-demand via fetchAudioData / syncAudio, not through loadAsset.\r\n break;\r\n case 'loader':\r\n // Loaders are opaque callbacks run directly by the AssetManager and\r\n // never dispatched through the storage adapter.\r\n throw new Error(\"Loader records must not be routed through StorageAdapter.loadAsset\");\r\n default: {\r\n const _exhaustive: never = value;\r\n throw new Error(`Unsupported asset type: ${(_exhaustive as AssetRecord).type}`);\r\n }\r\n }\r\n\r\n // Only a load that actually happened is cached. This matters for exactly\r\n // one case: a font family the manifest cannot describe. Caching it anyway\r\n // marked the family handled for the life of this adapter, so a manifest\r\n // that *later* described it — which is what installing a typeface does,\r\n // folded into the live manifest without rebuilding the controller — could\r\n // never load it, and the text stayed in the fallback face until something\r\n // else tore the adapter down.\r\n if (loaded) this.cachedAssets.add(key);\r\n }\r\n\r\n // ─── Font key parsing ─────────────────────────────────────────────────────\r\n\r\n protected parseFontKey(key: string): { fontFamily: string; fontWeight: number } {\r\n const [fontFamily, weightStr] = key.split('@');\r\n const fontWeight = weightStr ? parseInt(weightStr, 10) : 400;\r\n return {\r\n fontFamily: fontFamily || key,\r\n fontWeight: isNaN(fontWeight) ? 400 : fontWeight,\r\n };\r\n }\r\n\r\n // ─── Abstract load methods ────────────────────────────────────────────────\r\n\r\n /** Decode resolution follows the draw, so a load names only the source. */\r\n abstract loadImage(src: string): Promise<void>;\r\n abstract loadVideo(\r\n src: string,\r\n startFrame: number,\r\n endFrame: number,\r\n trimStart: number,\r\n trimEnd?: number,\r\n ): Promise<void>;\r\n abstract loadAudio(\r\n src: string,\r\n startFrame: number,\r\n endFrame: number,\r\n trimStart: number,\r\n trimEnd?: number,\r\n ): Promise<void>;\r\n abstract fetchAudioData(src: string): Promise<ArrayBuffer>;\r\n /**\r\n * Register every face of `fontFamily` the catalog describes.\r\n *\r\n * Returns whether the family was actually loaded. `false` means the manifest\r\n * has no entry for it. Not an error while previewing (an undescribed family\r\n * shapes against the platform fallback, which is what a system font name\r\n * does), but a blocking caller refuses it — see {@link DecodePolicy} — and\r\n * it must not be remembered as handled either way: see the note in\r\n * {@link runLoad}.\r\n */\r\n abstract loadFont(src: string, fontFamily: string, fontWeight: number): Promise<boolean>;\r\n\r\n // ─── Frame warming ────────────────────────────────────────────────────────\r\n\r\n /**\r\n * Decode any exact media frames the most recent render asked for but couldn't\r\n * satisfy synchronously (e.g. a video frame at a freshly-seeked timestamp),\r\n * and report whether there were any. A blocking caller (seek / screenshot /\r\n * export) renders once, awaits this, and re-renders while it returns true so\r\n * the frame is accurate even on a cold jump. Defaults to a no-op for adapters\r\n * with no time-varying media.\r\n */\r\n async warmPendingVideo(): Promise<boolean> {\r\n return false;\r\n }\r\n\r\n setDecodePolicy(policy: DecodePolicy): void {\r\n // no-op for adapters that decode at one resolution\r\n }\r\n\r\n /** Read back so a caller that borrows the adapter can restore it. */\r\n getDecodePolicy(): DecodePolicy {\r\n return \"interactive\";\r\n }\r\n\r\n /** Whether the most recent render left decodes that {@link warmPendingDecodes} would settle. */\r\n hasPendingDecodes(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Settle what the last render could not draw acceptably under the current\r\n * policy — video frames, every exact image level under `\"exact\"`, a source\r\n * drawn with nothing resident under `\"interactive\"` — and report whether there\r\n * was any. See `renderSettled`.\r\n *\r\n * Defaults to {@link warmPendingVideo} so an adapter written against it keeps\r\n * working; that alias goes away after one release.\r\n */\r\n async warmPendingDecodes(): Promise<boolean> {\r\n return this.warmPendingVideo();\r\n }\r\n\r\n /**\r\n * Whether an `\"interactive\"` decode is on its way that would draw the last\r\n * render sharper. Not something a paint waits for: a preview shows what is\r\n * resident and repaints when {@link warmPendingUpgrades} reports a landing.\r\n */\r\n hasPendingUpgrades(): boolean {\r\n return false;\r\n }\r\n\r\n /** Await the upgrades {@link hasPendingUpgrades} reports; whether one landed. */\r\n async warmPendingUpgrades(): Promise<boolean> {\r\n return false;\r\n }\r\n\r\n /**\r\n * Notify the adapter whether playback is live. Time-varying media (video) uses\r\n * this to prefetch ahead only while playing and to quiesce on pause, so a\r\n * paused timeline doesn't drain a backlog of stale decodes. No-op by default.\r\n */\r\n setPlaying(playing: boolean): void {\r\n // no-op for adapters with no time-varying media\r\n }\r\n\r\n // ─── Lifecycle ────────────────────────────────────────────────────────────\r\n\r\n dispose(): void {\r\n this.inFlightLoads.clear();\r\n this.cachedAssets.clear();\r\n }\r\n}\r\n", "/**\r\n * A flat animation driver. `advance(dt)` moves the animation forward by `dt`\r\n * seconds and returns `true` once it has completed (and applied its final\r\n * value). It must be primed at t=0 before the first `advance` so the starting\r\n * frame is correct — callers apply the initial value via `seek(0)`.\r\n *\r\n * `seek(elapsed)` is the absolute-time half, and is what a {@link Command}'s\r\n * `at` is built on: a stepper can be asked for any time, in any order, which is\r\n * what lets a timeline evaluate a frame without having played the ones before\r\n * it.\r\n */\r\n/** @internal */\r\nexport interface TweenStepper {\r\n /**\r\n * Jump to the value corresponding to `elapsed` seconds from the start.\r\n * Call with `0` to prime the stepper before the first {@link advance}.\r\n */\r\n seek(elapsed: number): void;\r\n /**\r\n * Advance the animation by `dt` seconds.\r\n * @returns `true` when the animation has finished and its final value has\r\n * been applied; `false` if it is still running.\r\n */\r\n advance(dt: number): boolean;\r\n}\r\n\r\n/**\r\n * Implemented by anything that can produce a {@link TweenStepper} — a\r\n * {@link Command}, and anything a host drives directly.\r\n */\r\nexport interface Steppable {\r\n /** Return a fresh stepper for a single playthrough of this animation. */\r\n _stepper(): TweenStepper;\r\n}\r\n\r\nexport function isSteppable(x: unknown): x is Steppable {\r\n return typeof (x as Steppable)?._stepper === \"function\";\r\n}\r\n", "import { integrateSpeedToClipTime, sourceTimeAtClipElapsed } from './attributes/audio/filters/curve';\r\nimport type { NodeEffect } from './attributes/shape/effects/union';\r\nimport { ClipTimeline } from './document/timeline';\r\nimport type { VisualDocument } from './document/types';\r\n\r\n// The names the document API had before \"scene\" became \"clip\", kept until 1.0.\r\n\r\n/** @deprecated Renamed to {@link VisualDocument}. */\r\nexport type SceneDocument = VisualDocument;\r\n/** @deprecated Renamed to {@link ClipTimeline}. */\r\nexport const SceneTimeline = ClipTimeline;\r\n/** @deprecated Renamed to {@link ClipTimeline}. */\r\nexport type SceneTimeline = ClipTimeline;\r\n/** @deprecated Renamed to {@link NodeEffect}. */\r\nexport type SceneEffect = NodeEffect;\r\n/** @deprecated Renamed to {@link integrateSpeedToClipTime}. */\r\nexport const integrateSpeedToSceneTime = integrateSpeedToClipTime;\r\n/** @deprecated Renamed to {@link sourceTimeAtClipElapsed}. */\r\nexport const sourceTimeAtSceneElapsed = sourceTimeAtClipElapsed;\r\n"],
5
+ "mappings": "27HAgBO,IAAMA,GAAUC,EAYVC,GAAuBC,EC4D7B,IAAMC,EAA2B,CAAE,MAAO,KAAM,OAAQ,IAAI,EACtDC,EAAc,GAEdC,GAAoD,CAAE,SAAUF,EAAkB,IAAKC,CAAW,EAClGE,EAAgC,CAAE,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,KAAM,CAAA,CAAE,EAiB3EC,EAAP,KAAa,CAKF,SAJJ,SACA,IAET,YACaC,EACTC,EAAyB,CAAA,EAAE,CADlB,KAAA,SAAAD,EAGT,KAAK,UAAY,IAAIE,EAAS,CAC1B,MAAOD,EAAQ,MACf,QAASA,EAAQ,QACjB,MAAOA,EAAQ,MACf,aAAcA,EAAQ,aACzB,EACD,KAAK,SAAWA,EAAQ,UAAYN,EACpC,KAAK,IAAMM,EAAQ,KAAOL,EAC1B,KAAK,UAAYK,EAAQ,UAAYH,EACrC,KAAK,UAAYE,EAAS,eAAc,CAC5C,CAGA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CAGA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CAMA,YAAYG,EAAuB,CAC/B,KAAK,UAAYA,EACjB,QAAWC,KAAU,KAAK,mBAAoBA,EAAOD,CAAQ,CACjE,CASA,KAAKF,EAAoB,CACrB,OAAO,IAAII,EAAQ,KAAgBJ,CAAO,CAC9C,CAGA,MAAMK,EAAW,CACb,OAAO,KAAK,UAAU,QAAQA,CAAG,CACrC,CAUA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CASA,MAAM,aACFC,EACAN,EAA+B,CAE/B,OAAI,OAAOM,GAAiB,SACjB,KAAK,UAAU,kBAAkBA,EAAcN,CAAO,GAEjE,KAAK,UAAU,QAAQM,EAAcN,CAAO,EACrCM,EACX,CAMA,eAAeD,EAAaE,EAAeP,EAA+B,CACtE,OAAO,KAAK,UAAU,UAAUK,EAAKE,EAAMP,CAAO,CACtD,CAEA,SAAO,CACH,KAAK,mBAAmB,MAAK,EAC7B,KAAK,SAAS,UAAS,CAC3B,CAUS,UACD,UACS,UAEA,mBAAqB,IAAI,IAG1C,kBAAkBG,EAAkC,CAChD,YAAK,mBAAmB,IAAIA,CAAM,EAC3B,IAAM,KAAK,mBAAmB,OAAOA,CAAM,CACtD,GCtNE,IAAgBK,EAAhB,KAAyB,CAU3B,IAAI,gBAAc,CACd,MAAO,EACX,CAkCA,SAASC,EAAc,CAAS,CAUhC,UAAUC,EAAc,CAAS,CAEjC,SAAO,CACH,KAAK,KAAI,CACb,GCpDE,IAAgBC,EAAhB,KAA8B,CACtB,QACA,SACV,YAAYC,EAAuBC,EAAgB,CAC/C,KAAK,QAAUD,EACf,KAAK,SAAWC,CACpB,CAeA,WAAWD,EAAqB,CAC5B,KAAK,QAAUA,CACnB,CAMU,cAAgB,IAAI,IAEpB,aAAe,IAAI,IAK7B,SAASE,EAAW,CAChB,OAAO,KAAK,aAAa,IAAIA,CAAG,CACpC,CAEA,MAAM,UAAUA,EAAaC,EAAkB,CAC3C,IAAMC,EAAW,KAAK,cAAc,IAAIF,CAAG,EAC3C,GAAIE,EAAU,OAAOA,EACrB,GAAI,KAAK,aAAa,IAAIF,CAAG,EAAG,OAEhC,IAAMG,EAAM,KAAK,QAAQH,EAAKC,CAAK,EACnC,KAAK,cAAc,IAAID,EAAKG,CAAG,EAC/B,GAAI,CACA,MAAMA,CACV,SACI,KAAK,cAAc,OAAOH,CAAG,CACjC,CACJ,CAEQ,MAAM,QAAQA,EAAaC,EAAkB,CACjD,IAAIG,EAAS,GACb,OAAQH,EAAM,KAAM,CAChB,IAAK,QACD,MAAM,KAAK,UAAUD,CAAG,EACxB,MACJ,IAAK,QACD,MAAM,KAAK,UAAUA,EAAKC,EAAM,WAAYA,EAAM,SAAUA,EAAM,UAAWA,EAAM,OAAO,EAC1F,MACJ,IAAK,OAAQ,CACT,GAAM,CAAE,WAAAI,EAAY,WAAAC,CAAU,EAAK,KAAK,aAAaN,CAAG,EAExD,GADAI,EAAS,MAAM,KAAK,SAASJ,EAAKK,EAAYC,CAAU,EACpD,CAACF,GAAU,KAAK,gBAAe,IAAO,QACtC,MAAM,IAAIG,EACN,OACAF,EACA,uCAAuCA,CAAU,8JAA8J,EAGvN,KACJ,CACA,IAAK,QAED,MACJ,IAAK,SAGD,MAAM,IAAI,MAAM,oEAAoE,EACxF,QAAS,CACL,IAAMG,EAAqBP,EAC3B,MAAM,IAAI,MAAM,2BAA4BO,EAA4B,IAAI,EAAE,CAClF,CACJ,CASIJ,GAAQ,KAAK,aAAa,IAAIJ,CAAG,CACzC,CAIU,aAAaA,EAAW,CAC9B,GAAM,CAACK,EAAYI,CAAS,EAAIT,EAAI,MAAM,GAAG,EACvCM,EAAaG,EAAY,SAASA,EAAW,EAAE,EAAI,IACzD,MAAO,CACH,WAAYJ,GAAcL,EAC1B,WAAY,MAAMM,CAAU,EAAI,IAAMA,EAE9C,CA2CA,MAAM,kBAAgB,CAClB,MAAO,EACX,CAEA,gBAAgBI,EAAoB,CAEpC,CAGA,iBAAe,CACX,MAAO,aACX,CAGA,mBAAiB,CACb,MAAO,EACX,CAWA,MAAM,oBAAkB,CACpB,OAAO,KAAK,iBAAgB,CAChC,CAOA,oBAAkB,CACd,MAAO,EACX,CAGA,MAAM,qBAAmB,CACrB,MAAO,EACX,CAOA,WAAWC,EAAgB,CAE3B,CAIA,SAAO,CACH,KAAK,cAAc,MAAK,EACxB,KAAK,aAAa,MAAK,CAC3B,GCjME,SAAUC,GAAYC,EAAU,CAClC,OAAO,OAAQA,GAAiB,UAAa,UACjD,CC3BO,IAAMC,GAAgBC,EAMhBC,GAA4BC,EAE5BC,GAA2BC",
6
+ "names": ["Precomp", "AssetTimeline", "createPrecompProfile", "createAssetTimelineProfile", "DEFAULT_VIEWPORT", "DEFAULT_FPS", "DEFAULT_OUTPUT", "EMPTY_MANIFEST", "Engine", "platform", "options", "Registry", "manifest", "notify", "Session", "key", "nodeOrSource", "pack", "AudioSink", "muted", "volume", "StorageAdapter", "catalog", "viewport", "key", "value", "existing", "job", "loaded", "fontFamily", "fontWeight", "AssetNotLoadedError", "_exhaustive", "weightStr", "policy", "playing", "isSteppable", "x", "SceneTimeline", "ClipTimeline", "integrateSpeedToSceneTime", "integrateSpeedToClipTime", "sourceTimeAtSceneElapsed", "sourceTimeAtClipElapsed"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as r,c as m}from"./chunks/chunk-2T3HXSC2.js";export{m as Fragment,r as jsxDEV};
1
+ import{a as r,c as m}from"./chunks/chunk-SFNJRPBV.js";export{m as Fragment,r as jsxDEV};
2
2
  //# sourceMappingURL=jsx-jsx-dev-runtime.js.map
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"./chunks/chunk-2T3HXSC2.js";export{c as Fragment,a as jsx,b as jsxs};
1
+ import{a,b,c}from"./chunks/chunk-SFNJRPBV.js";export{c as Fragment,a as jsx,b as jsxs};
2
2
  //# sourceMappingURL=jsx-jsx-runtime.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/core",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.5",
4
4
  "exports": {
5
5
  ".": "dist/browser/index.js",
6
6
  "./component": "dist/browser/component.js",
@@ -9,5 +9,6 @@
9
9
  "./jsx/jsx-dev-runtime": "dist/browser/jsx-jsx-dev-runtime.js"
10
10
  },
11
11
  "peers": [],
12
- "assets": {}
12
+ "assets": {},
13
+ "thirdParty": []
13
14
  }
@@ -1,2 +1,2 @@
1
- import{$ as f,$b as ce,$c as je,$d as vr,$e as $r,Ab as J,Ad as Xe,Ae as qr,Ag as So,Be as Kr,Bg as vo,C as p,Cd as Ye,Ce as Qr,D as i,Da as N,De as _r,E as m,Eb as U,Ed as Ze,Ee as Hr,Fd as $e,Fe as Jr,Ga as L,Gb as W,Gd as er,Ge as Ur,Ha as E,Hb as X,Hd as rr,Ia as B,Ib as Y,Id as or,If as io,Jb as Z,Jd as tr,Kd as ar,Lb as $,Ld as nr,Le as Wr,Ma as G,Md as sr,Na as V,Nc as Be,Nd as pr,O as l,Ob as ee,Od as ir,Oe as Xr,Pa as w,Pb as re,Pd as mr,Pf as mo,Qa as F,Qb as oe,Qd as lr,Qe as Yr,Ra as j,Rd as dr,Sa as I,Sb as te,Sc as Ge,Sd as cr,Se as Zr,Tb as ae,Td as Dr,Ua as M,Ub as ne,Ud as ur,Va as b,Vb as se,Vd as xr,W as d,Wa as z,Wb as pe,Wd as fr,X as c,Xa as q,Xb as ie,Xc as Ve,Xd as Pr,Y as D,Ya as K,Yb as me,Yc as ke,Yd as hr,Z as u,Zb as le,Zc as we,Zd as Cr,_ as x,_b as de,_c as Fe,_d as Sr,a as e,ac as De,ad as Ie,ae as yr,ba as P,bc as ue,bd as Me,be as Or,ca as h,cc as xe,ce as gr,d as o,dc as fe,de as Rr,e as t,ea as C,eb as Q,ee as Tr,ef as eo,eg as lo,fa as S,fe as Nr,ff as ro,fg as co,ga as v,gb as _,gc as Pe,gd as be,gf as oo,hd as ze,he as Lr,hf as to,ie as Ar,if as ao,jd as qe,je as Er,jf as no,jg as Do,ka as y,kd as Ke,ke as Br,kf as so,kg as uo,la as O,lc as ge,ld as Qe,le as Gr,ma as g,mc as Re,md as _e,me as Vr,na as R,nd as He,ne as kr,o as s,oa as T,od as Je,oe as wr,of as po,pc as Te,pe as Fr,qc as Ne,qe as jr,rc as Le,tc as Ae,uc as Ee,ue as Ir,ve as Mr,vg as xo,wd as Ue,we as br,wg as fo,xd as We,xe as zr,xg as Po,yb as H,yg as ho,zg as Co}from"./chunks/chunk-TGDX2SS2.js";import{a as r,c as a,g as n,l as A,m as k,s as he,t as Ce,u as Se,v as ve,w as ye,x as Oe}from"./chunks/chunk-KJXGRHOL.js";export{d as AdjustmentChain,D as Adjustments,Lr as AmbientLight3D,Vr as AreaLight3D,ar as AudioBus,Q as AudioFilters,je as BooleanGroup,mr as Box3D,we as Camera,kr as Camera3D,Ve as Canvas2D,jr as Canvas3D,hr as Capsule3D,fr as Circle3D,Ae as Clip,Dr as Cone3D,Re as ContextMap,cr as Cylinder3D,ze as DefaultTextStyle,Er as DirectionalLight3D,i as EffectChain,m as Effects,Ke as Ellipse,Fr as Environment3D,Jr as ExpressionError,Sr as Extrude3D,l as Fills,wr as Fog3D,eo as Geo,S as Graphics2D,y as Graphics3D,Xe as GridPattern,pr as Group3D,Ar as HemisphereLight3D,x as ImageFilters,Or as Instances3D,vr as Lathe3D,Qe as Line,Rr as Line3D,We as LineGrid,Ie as MaskGroup,ro as Mat,ir as Mesh3D,Nr as Model3D,Le as Node,Ee as Node2D,sr as Node3D,Ge as NodeAudio,rr as NumberNode,Fe as OrbitCamera,Be as PaintNode,_e as Path,C as PathBuilder,Ue as PathShape,dr as Plane3D,Br as PointLight3D,gr as Points3D,He as Polygon,Je as Polygram,Cr as Polyhedron3D,Me as Provider,Mr as ROOT_NODE_ID,vo as Random,qe as Rect,Zr as Registry,O as RenderContext3D,$e as RichText,Pr as Ring3D,or as RotatedBox,R as Scene3D,So as SeedGenerator,ke as ShapeNode,_ as Sound,nr as SoundNode,lr as Sphere3D,Gr as SpotLight3D,Tr as Sprite3D,oo as Tex,er as Text,Ze as TextBase,Ye as TextSelection,be as ThemeProvider,ur as Torus3D,xr as TorusKnot3D,yr as Tube3D,tr as Video,c as VideoAdjustmentChain,u as VideoAdjustments,f as VideoFilters,P as alignmentOps,ce as alignmentProperty,Hr as asProjectDocument,Xr as assertValidDocument,k as clamp,uo as collectBoxes,s as colorOps,pe as colorProperty,Ne as command,Oe as commandParallel,ye as commandSequence,Kr as commandSpan,o as cornerRadiusOps,ie as cornerRadiusProperty,t as cornerStyleOps,me as cornerStyleProperty,ge as createContext,Co as createRef,Qr as documentDuration,Se as driveCommand,F as easeIn,I as easeInOut,j as easeOut,zr as effectiveSpan,se as effectsProperty,po as evaluateParametric,ao as evaluateRoundedBox,Ur as expressionOps,z as fadeIn,q as fadeOut,L as fillOps,te as fillProperty,X as flowOps,ho as generateList,Te as getCommandMeta,Ir as hasTimeline,b as hold,h as insetsOps,de as insetsProperty,he as isCommand,K as isCurve,fe as isKnownShaderProperty,_r as isProjectDocument,$ as lerpEuler3,r as lerpNumber,a as lerpVector2,Z as lerpVector3,w as linear,ve as loopCommand,Ce as makeCommand,Yr as node,co as nodeBox,br as nodeSpan,re as normalizeQuaternion,Pe as normalizeShaderPack,lo as parentPlanePointAt,fo as parseCSV,n as parseColor,Po as parseData,A as pathOps,le as pathProperty,Do as pickNode,mo as placeTracks,W as property,oe as quaternionFromEuler,M as ramp,io as resolveCameraPlacement,e as resolveCorners,N as resolveFill,v as resolveFill3D,xo as resolveProjectDocument,p as resolveShaderProperties,E as resolveShadow,g as resolveShadows3D,G as resolveStroke,T as resolveSurfaceSource,Y as resolveVector3,to as segmentsOf,no as shadowCasts,B as shadowOps,ne as shadowProperty,so as shadowReceives,J as sizeInputOps,ue as sizeProperty,ee as slerpQuaternion,H as space3dOps,V as strokeOps,ae as strokeProperty,U as textOps,xe as textProperty,$r as toPathString,qr as untimed,Wr as validateDocument,De as vector2Property};
1
+ import{$ as x,$a as H,$b as me,$d as So,Ad as We,Ae as qo,Bb as _,C as p,Cd as Xe,D as i,Da as N,Db as J,De as Ho,E as m,Ed as Ye,Ee as Ko,Fd as Ze,Fe as Qo,Ga as R,Gd as $e,Ge as _o,Ha as w,Hb as U,Hd as eo,He as Jo,Ia as E,Id as oo,Ie as Uo,Ig as Or,Jb as W,Jd as ro,Je as Wo,Jg as gr,Kb as X,Kd as to,Kg as Ar,Lb as Y,Ld as ao,Lg as Tr,Mb as Z,Mg as Nr,Nd as no,Ng as Rr,O as l,Ob as $,Od as so,Oe as Xo,Og as Ir,Pa as V,Pd as po,Qa as B,Qd as io,Rb as ee,Rd as mo,Re as Yo,Sa as k,Sb as oe,Sc as Be,Sd as lo,Ta as F,Tb as re,Td as co,Te as Zo,Ua as j,Ud as uo,Va as G,Vb as te,Vd as Do,Ve as $o,W as d,Wb as ae,Wd as fo,We as er,X as c,Xa as b,Xb as ne,Xc as Le,Xd as xo,Xe as or,Y as u,Ya as M,Yb as se,Yd as ho,Ye as rr,Yf as Dr,Z as D,Za as z,Zb as pe,Zd as Po,Ze as tr,_ as f,_a as q,_b as ie,_d as Co,_e as ar,a as e,ac as le,ad as ke,ae as vo,ba as h,bc as de,bd as Fe,be as yo,ca as P,cc as ce,cd as je,ce as Oo,d as r,dc as ue,dd as Ge,de as go,e as t,ea as C,ec as De,ed as be,ee as Ao,fa as S,fc as fe,fd as Me,fe as To,ga as v,gc as xe,gd as ze,ge as No,hb as K,hf as nr,ie as Ro,jb as Q,jc as he,je as Io,ke as wo,ld as qe,le as Eo,ma as y,md as He,me as Vo,mf as sr,ne as Bo,nf as pr,ng as fr,o as s,oc as ge,od as Ke,of as ir,og as xr,pa as O,pc as Ae,pd as Qe,pe as Lo,pf as mr,pg as hr,qa as g,qd as _e,qe as ko,qf as lr,qg as Pr,ra as A,rd as Je,re as Fo,rf as dr,rg as Cr,sa as T,sc as Te,sd as Ue,se as jo,sf as cr,sg as Sr,tc as Ne,te as Go,uc as Re,wc as Ie,wf as ur,wg as vr,xc as we,xe as bo,xg as yr,yc as Ee,ye as Mo,zc as Ve,ze as zo}from"./chunks/chunk-FUZVFT3W.js";import{a as o,c as a,g as n,l as I,m as L,s as Pe,t as Ce,u as Se,v as ve,w as ye,x as Oe}from"./chunks/chunk-QG6C23IJ.js";export{d as AdjustmentChain,u as Adjustments,Ro as AmbientLight3D,Bo as AreaLight3D,to as AudioBus,K as AudioFilters,be as BooleanGroup,io as Box3D,je as Camera,ko as Camera3D,ke as Canvas2D,Go as Canvas3D,Po as Capsule3D,xo as Circle3D,Ie as Clip,uo as Cone3D,Ae as ContextMap,co as Cylinder3D,He as DefaultTextStyle,wo as DirectionalLight3D,i as EffectChain,m as Effects,Qe as Ellipse,jo as Environment3D,Uo as ExpressionError,So as Extrude3D,l as Fills,Fo as Fog3D,sr as Geo,S as Graphics2D,O as Graphics3D,so as Group3D,Io as HemisphereLight3D,f as ImageFilters,Oo as Instances3D,vo as Lathe3D,Ao as Line3D,Me as MaskGroup,pr as Mat,po as Mesh3D,No as Model3D,Re as Node,we as Node2D,no as Node3D,Le as NodeAudio,eo as NumberNode,Ge as OrbitCamera,Be as PaintNode,_e as Path,C as PathBuilder,We as PathShape,lo as Plane3D,Eo as PointLight3D,go as Points3D,Je as Polygon,Ue as Polygram,Co as Polyhedron3D,ze as Provider,Mo as ROOT_NODE_ID,Ir as Random,Ke as Rect,$o as Registry,g as RenderContext3D,Ze as RichText,ho as Ring3D,oo as RotatedBox,T as Scene3D,Rr as SeedGenerator,Fe as ShapeNode,Q as Sound,ao as SoundNode,mo as Sphere3D,Vo as SpotLight3D,To as Sprite3D,ir as Tex,$e as Text,Ye as TextBase,Xe as TextSelection,qe as ThemeProvider,Do as Torus3D,fo as TorusKnot3D,yo as Tube3D,ro as Video,c as VideoAdjustmentChain,D as VideoAdjustments,x as VideoFilters,h as alignmentOps,ce as alignmentProperty,Jo as asProjectDocument,Yo as assertValidDocument,xr as childPlanePointAt,L as clamp,yr as collectBoxes,s as colorOps,pe as colorProperty,Ne as command,Oe as commandParallel,ye as commandSequence,Ko as commandSpan,r as cornerRadiusOps,ie as cornerRadiusProperty,t as cornerStyleOps,me as cornerStyleProperty,ge as createContext,Nr as createRef,Qo as documentDuration,Se as driveCommand,F as easeIn,G as easeInOut,j as easeOut,qo as effectiveSpan,se as effectsProperty,ur as evaluateParametric,lr as evaluateRoundedBox,Wo as expressionOps,z as fadeIn,q as fadeOut,R as fillOps,te as fillProperty,Ee as findNode2D,X as flowOps,Ve as frameIn,Tr as generateList,Te as getCommandMeta,Cr as handleValueAt,bo as hasTimeline,M as hold,P as insetsOps,de as insetsProperty,Pe as isCommand,H as isCurve,xe as isKnownShaderProperty,_o as isProjectDocument,$ as lerpEuler3,o as lerpNumber,a as lerpVector2,Z as lerpVector3,k as linear,ve as loopCommand,Ce as makeCommand,Zo as node,Sr as nodeBox,Pr as nodeHandlesAt,zo as nodeSpan,or as nodeTypeIsA,oe as normalizeQuaternion,he as normalizeShaderPack,rr as parentIssue,fr as parentPlanePointAt,gr as parseCSV,n as parseColor,Ar as parseData,I as pathOps,le as pathProperty,vr as pickNode,Dr as placeTracks,ar as placementIssues,W as property,re as quaternionFromEuler,b as ramp,hr as reparentPlacementAt,Lo as resolveCameraPlacement,e as resolveCorners,N as resolveFill,y as resolveFill3D,Or as resolveProjectDocument,p as resolveShaderProperties,w as resolveShadow,A as resolveShadows3D,V as resolveStroke,v as resolveSurfaceSource,Y as resolveVector3,mr as segmentsOf,dr as shadowCasts,E as shadowOps,ne as shadowProperty,cr as shadowReceives,tr as siblingIssue,J as sizeInputOps,De as sizeProperty,ee as slerpQuaternion,_ as space3dOps,B as strokeOps,ae as strokeProperty,U as textOps,fe as textProperty,nr as toPathString,Ho as untimed,Xo as validateDocument,ue as vector2Property,er as withdraw};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAc,kBAAkB,CAAA;AAChC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA","sourcesContent":["/**\n * What a **component package** built on this engine needs, and cannot supply\n * itself.\n *\n * A subpath rather than the main barrel, and the reason is worth stating:\n * none of this is engine API. A scene author never reaches for it. It is the\n * machinery a `@motionscript/*` component uses to be a component — to\n * choreograph an entrance that can be seeked, to declare the assets of paints\n * it computes rather than stores, to ask what family a host's text falls back\n * to. Putting it in the main barrel would offer three more names to everyone\n * who wanted a `Rect`, and one of them (`hold`) already means something else\n * there — audio automation has its own, and the collision is how this surface\n * announced itself.\n *\n * This file is a **re-export barrel only** — everything it names lives beside\n * whatever actually owns it (the path model beside the Path node, the number\n * formatter beside the Number node, the orbit-camera lerps under `attributes/`)\n * rather than duplicated or reinvented here.\n */\nexport * from \"@/tween/seekable\"\nexport * from \"@/nodes/node/declare-paints\"\nexport * from \"@/nodes/node/text-defaults\"\nexport * from \"@/util/metrics\"\nexport * from \"@/nodes/text/number-format\"\nexport * from \"@/nodes/text/number-pattern\"\nexport * from \"@/attributes/render3d/orbit\"\nexport * from \"@/nodes/geometry/shape-outline\"\n"]}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAc,kBAAkB,CAAA;AAChC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA","sourcesContent":["/**\r\n * What a **component package** built on this engine needs, and cannot supply\r\n * itself.\r\n *\r\n * A subpath rather than the main barrel, and the reason is worth stating:\r\n * none of this is engine API. A scene author never reaches for it. It is the\r\n * machinery a `@motionscript/*` component uses to be a component — to\r\n * choreograph an entrance that can be seeked, to declare the assets of paints\r\n * it computes rather than stores, to ask what family a host's text falls back\r\n * to. Putting it in the main barrel would offer three more names to everyone\r\n * who wanted a `Rect`, and one of them (`hold`) already means something else\r\n * there — audio automation has its own, and the collision is how this surface\r\n * announced itself.\r\n *\r\n * This file is a **re-export barrel only** — everything it names lives beside\r\n * whatever actually owns it (the path model beside the Path node, the number\r\n * formatter beside the Number node, the orbit-camera lerps under `attributes/`)\r\n * rather than duplicated or reinvented here.\r\n */\r\nexport * from \"@/tween/seekable\"\r\nexport * from \"@/nodes/node/declare-paints\"\r\nexport * from \"@/nodes/node/text-defaults\"\r\nexport * from \"@/util/metrics\"\r\nexport * from \"@/nodes/text/number-format\"\r\nexport * from \"@/nodes/text/number-pattern\"\r\nexport * from \"@/attributes/render3d/orbit\"\r\nexport * from \"@/nodes/geometry/shape-outline\"\r\n"]}
@@ -10,7 +10,7 @@ declare const AUDIO_ROOT_ID = "@bus";
10
10
  * An audio document, as the composition it already is.
11
11
  *
12
12
  * There is no second evaluator for sound, and this is what keeps it that way:
13
- * an audio clip is compiled, seeked and restored by `SceneTimeline` like any
13
+ * an audio clip is compiled, seeked and restored by `ClipTimeline` like any
14
14
  * other, so a bus fade and a rectangle's fade cannot drift because there is only
15
15
  * one machine running them.
16
16
  *
@@ -9,15 +9,15 @@ const AUDIO_ROOT_ID = "@bus";
9
9
  function defaultRootBus() {
10
10
  return { id: AUDIO_ROOT_ID, type: "audioBus", parentId: null, layerOrder: 0, props: {} };
11
11
  }
12
- /** The scene root a lowered audio clip hangs from. Draws nothing; lays out once. */
13
- function sceneRoot() {
12
+ /** The root a lowered audio clip hangs from. Draws nothing; lays out once. */
13
+ function clipRoot() {
14
14
  return { id: "", type: "canvas2d", parentId: null, layerOrder: 0, props: {} };
15
15
  }
16
16
  /**
17
17
  * An audio document, as the composition it already is.
18
18
  *
19
19
  * There is no second evaluator for sound, and this is what keeps it that way:
20
- * an audio clip is compiled, seeked and restored by `SceneTimeline` like any
20
+ * an audio clip is compiled, seeked and restored by `ClipTimeline` like any
21
21
  * other, so a bus fade and a rectangle's fade cannot drift because there is only
22
22
  * one machine running them.
23
23
  *
@@ -29,7 +29,7 @@ function sceneRoot() {
29
29
  * clip that is only sound.
30
30
  */
31
31
  export function loweredAudioDocument(doc) {
32
- const nodes = [sceneRoot()];
32
+ const nodes = [clipRoot()];
33
33
  if (!doc.nodes.some(isRootBus))
34
34
  nodes.push(defaultRootBus());
35
35
  for (const spec of doc.nodes)
@@ -1 +1 @@
1
- {"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/document/audio.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,yEAAyE;AACzE,SAAS,cAAc;IACnB,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAC7F,CAAC;AAED,oFAAoF;AACpF,SAAS,SAAS;IACd,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAClF,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAkB;IACnD,MAAM,KAAK,GAAoB,CAAC,SAAS,EAAE,CAAC,CAAC;IAC7C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7D,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAEzD,OAAO;QACH,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,KAAK;QACL,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;KACvC,CAAC;AACN,CAAC;AAED,uDAAuD;AACvD,SAAS,SAAS,CAAC,IAAc;IAC7B,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AACtD,CAAC;AAED,4EAA4E;AAC5E,SAAS,QAAQ,CAAC,IAAmB;IACjC,IAAI,SAAS,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3E,2EAA2E;IAC3E,uEAAuE;IACvE,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE;QAAE,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IAChG,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,0EAA0E;AAC1E,SAAS,QAAQ,CAAC,OAAoB;IAClC,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC,QAAQ,KAAK,EAAE,EAAE,CAAC;QACvD,OAAO,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import type { AudioDocument, CommandSpec, CompositionDocument, NodeSpec, TimedNodeSpec } from \"./types\";\n\n/**\n * The id the authored root bus is rewritten to.\n *\n * Namespaced like every other synthesized id in the document layer, so it can\n * never collide with one a document authored itself.\n */\nconst AUDIO_ROOT_ID = \"@bus\";\n\n/** The root bus when an audio document doesn't author one explicitly. */\nfunction defaultRootBus(): NodeSpec {\n return { id: AUDIO_ROOT_ID, type: \"audioBus\", parentId: null, layerOrder: 0, props: {} };\n}\n\n/** The scene root a lowered audio clip hangs from. Draws nothing; lays out once. */\nfunction sceneRoot(): NodeSpec {\n return { id: \"\", type: \"canvas2d\", parentId: null, layerOrder: 0, props: {} };\n}\n\n/**\n * An audio document, as the composition it already is.\n *\n * There is no second evaluator for sound, and this is what keeps it that way:\n * an audio clip is compiled, seeked and restored by `SceneTimeline` like any\n * other, so a bus fade and a rectangle's fade cannot drift because there is only\n * one machine running them.\n *\n * The only thing that has to be arranged is the root. An audio document's own\n * root is a bus, but a clip's root is always a `Canvas2D` — so the bus\n * becomes that canvas's single audio child under {@link AUDIO_ROOT_ID}, and\n * every `targetId: null` / `parentId: null` is rewritten to name it. The canvas\n * draws nothing and lays out an empty box once, which is the whole cost of a\n * clip that is only sound.\n */\nexport function loweredAudioDocument(doc: AudioDocument): CompositionDocument {\n const nodes: TimedNodeSpec[] = [sceneRoot()];\n if (!doc.nodes.some(isRootBus)) nodes.push(defaultRootBus());\n for (const spec of doc.nodes) nodes.push(reparent(spec));\n\n return {\n kind: \"composition\",\n duration: doc.duration,\n variables: doc.variables,\n nodes,\n commands: doc.commands.map(retarget),\n };\n}\n\n/** The row an audio document means as its root bus. */\nfunction isRootBus(spec: NodeSpec): boolean {\n return spec.id === \"\" && spec.type === \"audioBus\";\n}\n\n/** A node spec with the implicit root resolved to {@link AUDIO_ROOT_ID}. */\nfunction reparent(spec: TimedNodeSpec): TimedNodeSpec {\n if (isRootBus(spec)) return { ...spec, id: AUDIO_ROOT_ID, parentId: null };\n // `null` is the document's own convention for \"the root\"; `\"\"` is the same\n // row named by id, which `checkTree` also resolves. Both mean the bus.\n if (spec.parentId === null || spec.parentId === \"\") return { ...spec, parentId: AUDIO_ROOT_ID };\n return spec;\n}\n\n/** A command with the implicit root resolved to {@link AUDIO_ROOT_ID}. */\nfunction retarget(command: CommandSpec): CommandSpec {\n if (command.targetId === null || command.targetId === \"\") {\n return { ...command, targetId: AUDIO_ROOT_ID };\n }\n return command;\n}\n\nexport { AUDIO_ROOT_ID };\n"]}
1
+ {"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/document/audio.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,yEAAyE;AACzE,SAAS,cAAc;IACnB,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAC7F,CAAC;AAED,8EAA8E;AAC9E,SAAS,QAAQ;IACb,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAClF,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAkB;IACnD,MAAM,KAAK,GAAoB,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7D,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAEzD,OAAO;QACH,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,KAAK;QACL,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;KACvC,CAAC;AACN,CAAC;AAED,uDAAuD;AACvD,SAAS,SAAS,CAAC,IAAc;IAC7B,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AACtD,CAAC;AAED,4EAA4E;AAC5E,SAAS,QAAQ,CAAC,IAAmB;IACjC,IAAI,SAAS,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3E,2EAA2E;IAC3E,uEAAuE;IACvE,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE;QAAE,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IAChG,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,0EAA0E;AAC1E,SAAS,QAAQ,CAAC,OAAoB;IAClC,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC,QAAQ,KAAK,EAAE,EAAE,CAAC;QACvD,OAAO,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import type { AudioDocument, CommandSpec, CompositionDocument, NodeSpec, TimedNodeSpec } from \"./types\";\r\n\r\n/**\r\n * The id the authored root bus is rewritten to.\r\n *\r\n * Namespaced like every other synthesized id in the document layer, so it can\r\n * never collide with one a document authored itself.\r\n */\r\nconst AUDIO_ROOT_ID = \"@bus\";\r\n\r\n/** The root bus when an audio document doesn't author one explicitly. */\r\nfunction defaultRootBus(): NodeSpec {\r\n return { id: AUDIO_ROOT_ID, type: \"audioBus\", parentId: null, layerOrder: 0, props: {} };\r\n}\r\n\r\n/** The root a lowered audio clip hangs from. Draws nothing; lays out once. */\r\nfunction clipRoot(): NodeSpec {\r\n return { id: \"\", type: \"canvas2d\", parentId: null, layerOrder: 0, props: {} };\r\n}\r\n\r\n/**\r\n * An audio document, as the composition it already is.\r\n *\r\n * There is no second evaluator for sound, and this is what keeps it that way:\r\n * an audio clip is compiled, seeked and restored by `ClipTimeline` like any\r\n * other, so a bus fade and a rectangle's fade cannot drift because there is only\r\n * one machine running them.\r\n *\r\n * The only thing that has to be arranged is the root. An audio document's own\r\n * root is a bus, but a clip's root is always a `Canvas2D` — so the bus\r\n * becomes that canvas's single audio child under {@link AUDIO_ROOT_ID}, and\r\n * every `targetId: null` / `parentId: null` is rewritten to name it. The canvas\r\n * draws nothing and lays out an empty box once, which is the whole cost of a\r\n * clip that is only sound.\r\n */\r\nexport function loweredAudioDocument(doc: AudioDocument): CompositionDocument {\r\n const nodes: TimedNodeSpec[] = [clipRoot()];\r\n if (!doc.nodes.some(isRootBus)) nodes.push(defaultRootBus());\r\n for (const spec of doc.nodes) nodes.push(reparent(spec));\r\n\r\n return {\r\n kind: \"composition\",\r\n duration: doc.duration,\r\n variables: doc.variables,\r\n nodes,\r\n commands: doc.commands.map(retarget),\r\n };\r\n}\r\n\r\n/** The row an audio document means as its root bus. */\r\nfunction isRootBus(spec: NodeSpec): boolean {\r\n return spec.id === \"\" && spec.type === \"audioBus\";\r\n}\r\n\r\n/** A node spec with the implicit root resolved to {@link AUDIO_ROOT_ID}. */\r\nfunction reparent(spec: TimedNodeSpec): TimedNodeSpec {\r\n if (isRootBus(spec)) return { ...spec, id: AUDIO_ROOT_ID, parentId: null };\r\n // `null` is the document's own convention for \"the root\"; `\"\"` is the same\r\n // row named by id, which `checkTree` also resolves. Both mean the bus.\r\n if (spec.parentId === null || spec.parentId === \"\") return { ...spec, parentId: AUDIO_ROOT_ID };\r\n return spec;\r\n}\r\n\r\n/** A command with the implicit root resolved to {@link AUDIO_ROOT_ID}. */\r\nfunction retarget(command: CommandSpec): CommandSpec {\r\n if (command.targetId === null || command.targetId === \"\") {\r\n return { ...command, targetId: AUDIO_ROOT_ID };\r\n }\r\n return command;\r\n}\r\n\r\nexport { AUDIO_ROOT_ID };\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/document/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAkD3D,OAAO,KAAK,EAAmB,QAAQ,EAAgB,MAAM,YAAY,CAAC;AAqJ1E;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAmGxD;AAED,2EAA2E;AAC3E,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/document/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AA+C3D,OAAO,KAAK,EAAmB,QAAQ,EAAgB,MAAM,YAAY,CAAC;AAkJ1E;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAmGxD;AAED,2EAA2E;AAC3E,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC"}
@@ -1,9 +1,6 @@
1
1
  import { driveCommand } from "../tween/command.js";
2
2
  import { BooleanGroup } from "../nodes/geometry/boolean-node.js";
3
3
  import { Ellipse } from "../nodes/geometry/ellipse-node.js";
4
- import { GridPattern } from "../nodes/geometry/grid-pattern-node.js";
5
- import { Line } from "../nodes/geometry/line-node.js";
6
- import { LineGrid } from "../nodes/geometry/line-grid-node.js";
7
4
  import { MaskGroup } from "../nodes/geometry/mask-node.js";
8
5
  import { PathShape } from "../nodes/geometry/box-path-node.js";
9
6
  import { Polygon } from "../nodes/geometry/polygon-node.js";
@@ -15,9 +12,9 @@ import { RotatedBox } from "../nodes/layout/rotated-box.js";
15
12
  import { Video } from "../nodes/media/video-node.js";
16
13
  import { AudioBus } from "../nodes/audio/audio-bus.js";
17
14
  import { SoundNode } from "../nodes/audio/sound-node.js";
18
- import { Canvas2D } from "../nodes/scene/canvas2d-node.js";
19
- import { Provider } from "../nodes/scene/provider-node.js";
20
- import { ThemeProvider } from "../nodes/scene/theme-provider-node.js";
15
+ import { Canvas2D } from "../nodes/root/canvas2d-node.js";
16
+ import { Provider } from "../nodes/root/provider-node.js";
17
+ import { ThemeProvider } from "../nodes/root/theme-provider-node.js";
21
18
  import { DefaultTextStyle } from "../nodes/text/default-text-style-node.js";
22
19
  import { NumberNode } from "../nodes/text/number-node.js";
23
20
  import { RichText } from "../nodes/text/richtext-node.js";
@@ -46,7 +43,7 @@ import { lerpNumber } from "../tween/lerp.js";
46
43
  */
47
44
  /** Every built-in node type, keyed as a document names it. */
48
45
  const NODE_TYPES = {
49
- // Scene root and structural
46
+ // Clip root and structural
50
47
  canvas2d: Canvas2D,
51
48
  provider: Provider,
52
49
  "theme-provider": ThemeProvider,
@@ -54,7 +51,6 @@ const NODE_TYPES = {
54
51
  // Geometry
55
52
  rect: Rect,
56
53
  ellipse: Ellipse,
57
- line: Line,
58
54
  // The **unit-box** path, not `path-node.ts`'s face-value `Path`. A stored
59
55
  // document's `data` is a fraction of the node's own box, so a resize is an
60
56
  // ordinary `width`/`height` write and every editor gizmo works on it
@@ -65,8 +61,6 @@ const NODE_TYPES = {
65
61
  path: PathShape,
66
62
  polygon: Polygon,
67
63
  polygram: Polygram,
68
- "line-grid": LineGrid,
69
- "grid-pattern": GridPattern,
70
64
  boolean: BooleanGroup,
71
65
  mask: MaskGroup,
72
66
  // Layout
@@ -213,10 +207,10 @@ export function installBuiltins(registry) {
213
207
  // table dispatches through.
214
208
  // Each declares the one key it reads, in the kind its property uses, so a
215
209
  // host draws the same paint stack for the command as for the prop.
216
- registry.addCommand("fillTo", paintCommand("fillTo", "fill"), { args: [{ key: "fill", kind: "fills" }] });
217
- registry.addCommand("overlayTo", paintCommand("overlayTo", "overlay"), { args: [{ key: "overlay", kind: "fills" }] });
218
- registry.addCommand("strokeTo", paintCommand("strokeTo", "stroke"), { args: [{ key: "stroke", kind: "strokes" }] });
219
- registry.addCommand("shadowTo", paintCommand("shadowTo", "shadow"), { args: [{ key: "shadow", kind: "shadows" }] });
210
+ registry.addCommand("fillTo", paintCommand("fillTo", "fill"), { args: [{ key: "fill", kind: "fills" }], method: "fillTo" });
211
+ registry.addCommand("overlayTo", paintCommand("overlayTo", "overlay"), { args: [{ key: "overlay", kind: "fills" }], method: "overlayTo" });
212
+ registry.addCommand("strokeTo", paintCommand("strokeTo", "stroke"), { args: [{ key: "stroke", kind: "strokes" }], method: "strokeTo" });
213
+ registry.addCommand("shadowTo", paintCommand("shadowTo", "shadow"), { args: [{ key: "shadow", kind: "shadows" }], method: "shadowTo" });
220
214
  // Transform, camera, text and `restore` commands are not registered here:
221
215
  // they are `@command()` methods, and `Registry.addNode` publishes them off
222
216
  // the classes above. See `document/registry.ts`.