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

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 (615) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +2 -4
  3. package/dist/assets/errors.js +4 -5
  4. package/dist/assets/errors.js.map +1 -1
  5. package/dist/assets/scope.d.ts +1 -1
  6. package/dist/assets/scope.d.ts.map +1 -1
  7. package/dist/assets/scope.js +1 -1
  8. package/dist/assets/scope.js.map +1 -1
  9. package/dist/attributes/audio/schedule.d.ts +3 -18
  10. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  11. package/dist/attributes/audio/schedule.js.map +1 -1
  12. package/dist/attributes/index.d.ts +3 -5
  13. package/dist/attributes/index.d.ts.map +1 -1
  14. package/dist/attributes/index.js +2 -2
  15. package/dist/attributes/index.js.map +1 -1
  16. package/dist/attributes/layout/insets.d.ts +1 -1
  17. package/dist/attributes/layout/insets.js.map +1 -1
  18. package/dist/attributes/layout/size.d.ts +1 -1
  19. package/dist/attributes/layout/size.js +1 -1
  20. package/dist/attributes/layout/size.js.map +1 -1
  21. package/dist/attributes/properties/decorator.d.ts +44 -11
  22. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  23. package/dist/attributes/properties/decorator.js +37 -9
  24. package/dist/attributes/properties/decorator.js.map +1 -1
  25. package/dist/attributes/properties/inputs.d.ts +1 -1
  26. package/dist/attributes/properties/inputs.js +1 -1
  27. package/dist/attributes/properties/inputs.js.map +1 -1
  28. package/dist/attributes/properties/typed.d.ts +19 -140
  29. package/dist/attributes/properties/typed.d.ts.map +1 -1
  30. package/dist/attributes/properties/typed.js +12 -108
  31. package/dist/attributes/properties/typed.js.map +1 -1
  32. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -1
  33. package/dist/attributes/shape/corners/corner-radius.js +1 -1
  34. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  35. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -1
  36. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  37. package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
  38. package/dist/attributes/shape/fill/color/parser.js +1 -1
  39. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  40. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
  41. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  42. package/dist/attributes/shape/fill/implementations/shader.d.ts +2 -2
  43. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  44. package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
  45. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  46. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  47. package/dist/attributes/shape/fill/lerp.d.ts +1 -1
  48. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  49. package/dist/attributes/shape/filters/chain.d.ts +1 -1
  50. package/dist/attributes/shape/filters/chain.js +1 -1
  51. package/dist/attributes/shape/filters/chain.js.map +1 -1
  52. package/dist/attributes/shape/filters/union.d.ts +4 -3
  53. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  54. package/dist/attributes/shape/filters/union.js.map +1 -1
  55. package/dist/attributes/shape/path/ops.d.ts +1 -2
  56. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  57. package/dist/attributes/shape/path/ops.js.map +1 -1
  58. package/dist/attributes/shared/operators.d.ts +2 -2
  59. package/dist/attributes/shared/operators.js.map +1 -1
  60. package/dist/attributes/text/types.d.ts +2 -3
  61. package/dist/attributes/text/types.d.ts.map +1 -1
  62. package/dist/attributes/text/types.js.map +1 -1
  63. package/dist/browser/chunks/chunk-D4FSTPML.js +14 -0
  64. package/dist/browser/chunks/chunk-D4FSTPML.js.map +7 -0
  65. package/dist/browser/chunks/chunk-LKUYVFU3.js +2 -0
  66. package/dist/browser/chunks/chunk-LKUYVFU3.js.map +7 -0
  67. package/dist/browser/chunks/chunk-RTNATFWX.js +5 -0
  68. package/dist/browser/chunks/chunk-RTNATFWX.js.map +7 -0
  69. package/dist/browser/chunks/chunk-ZRPZPWZU.js +3 -0
  70. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +7 -0
  71. package/dist/browser/component.js +1 -1
  72. package/dist/browser/component.js.map +4 -4
  73. package/dist/browser/experimental.js +2 -0
  74. package/dist/browser/index.js +1 -1
  75. package/dist/browser/index.js.map +4 -4
  76. package/dist/browser/manifest.json +3 -4
  77. package/dist/browser/sdk.js +1 -1
  78. package/dist/component/api.d.ts +508 -0
  79. package/dist/component/api.d.ts.map +1 -0
  80. package/dist/component/api.js +4 -0
  81. package/dist/component/api.js.map +1 -0
  82. package/dist/component/builtins/audio.d.ts +26 -0
  83. package/dist/component/builtins/audio.d.ts.map +1 -0
  84. package/dist/component/builtins/audio.js +41 -0
  85. package/dist/component/builtins/audio.js.map +1 -0
  86. package/dist/component/builtins/canvas3d.d.ts +98 -0
  87. package/dist/component/builtins/canvas3d.d.ts.map +1 -0
  88. package/dist/component/builtins/canvas3d.js +21 -0
  89. package/dist/component/builtins/canvas3d.js.map +1 -0
  90. package/dist/component/builtins/composite.d.ts +56 -0
  91. package/dist/component/builtins/composite.d.ts.map +1 -0
  92. package/dist/component/builtins/composite.js +25 -0
  93. package/dist/component/builtins/composite.js.map +1 -0
  94. package/dist/component/builtins/geometry.d.ts +505 -0
  95. package/dist/component/builtins/geometry.d.ts.map +1 -0
  96. package/dist/component/builtins/geometry.js +107 -0
  97. package/dist/component/builtins/geometry.js.map +1 -0
  98. package/dist/component/builtins/layout.d.ts +88 -0
  99. package/dist/component/builtins/layout.d.ts.map +1 -0
  100. package/dist/component/builtins/layout.js +84 -0
  101. package/dist/component/builtins/layout.js.map +1 -0
  102. package/dist/component/builtins/media.d.ts +95 -0
  103. package/dist/component/builtins/media.d.ts.map +1 -0
  104. package/dist/component/builtins/media.js +149 -0
  105. package/dist/component/builtins/media.js.map +1 -0
  106. package/dist/component/builtins/providers.d.ts +23 -0
  107. package/dist/component/builtins/providers.d.ts.map +1 -0
  108. package/dist/component/builtins/providers.js +30 -0
  109. package/dist/component/builtins/providers.js.map +1 -0
  110. package/dist/component/builtins/text.d.ts +193 -0
  111. package/dist/component/builtins/text.d.ts.map +1 -0
  112. package/dist/component/builtins/text.js +113 -0
  113. package/dist/component/builtins/text.js.map +1 -0
  114. package/dist/component/builtins/three.d.ts +1085 -0
  115. package/dist/component/builtins/three.d.ts.map +1 -0
  116. package/dist/component/builtins/three.js +265 -0
  117. package/dist/component/builtins/three.js.map +1 -0
  118. package/dist/component/clip-of.d.ts +5 -0
  119. package/dist/component/clip-of.d.ts.map +1 -0
  120. package/dist/component/clip-of.js +33 -0
  121. package/dist/component/clip-of.js.map +1 -0
  122. package/dist/component/commands-for.d.ts +19 -0
  123. package/dist/component/commands-for.d.ts.map +1 -0
  124. package/dist/component/commands-for.js +5 -0
  125. package/dist/component/commands-for.js.map +1 -0
  126. package/dist/component/component-audio.d.ts +9 -0
  127. package/dist/component/component-audio.d.ts.map +1 -0
  128. package/dist/component/component-audio.js +18 -0
  129. package/dist/component/component-audio.js.map +1 -0
  130. package/dist/component/component2d.d.ts +9 -0
  131. package/dist/component/component2d.d.ts.map +1 -0
  132. package/dist/component/component2d.js +239 -0
  133. package/dist/component/component2d.js.map +1 -0
  134. package/dist/component/component3d.d.ts +9 -0
  135. package/dist/component/component3d.d.ts.map +1 -0
  136. package/dist/component/component3d.js +99 -0
  137. package/dist/component/component3d.js.map +1 -0
  138. package/dist/component/factory.d.ts +63 -0
  139. package/dist/component/factory.d.ts.map +1 -0
  140. package/dist/component/factory.js +313 -0
  141. package/dist/component/factory.js.map +1 -0
  142. package/dist/component/modules/aim.d.ts +30 -0
  143. package/dist/component/modules/aim.d.ts.map +1 -0
  144. package/dist/component/modules/aim.js +39 -0
  145. package/dist/component/modules/aim.js.map +1 -0
  146. package/dist/component/modules/corners.d.ts +13 -0
  147. package/dist/component/modules/corners.d.ts.map +1 -0
  148. package/dist/component/modules/corners.js +12 -0
  149. package/dist/component/modules/corners.js.map +1 -0
  150. package/dist/component/modules/flow.d.ts +26 -0
  151. package/dist/component/modules/flow.d.ts.map +1 -0
  152. package/dist/component/modules/flow.js +55 -0
  153. package/dist/component/modules/flow.js.map +1 -0
  154. package/dist/component/modules/material.d.ts +40 -0
  155. package/dist/component/modules/material.d.ts.map +1 -0
  156. package/dist/component/modules/material.js +75 -0
  157. package/dist/component/modules/material.js.map +1 -0
  158. package/dist/component/modules/paint.d.ts +71 -0
  159. package/dist/component/modules/paint.d.ts.map +1 -0
  160. package/dist/component/modules/paint.js +106 -0
  161. package/dist/component/modules/paint.js.map +1 -0
  162. package/dist/component/modules/shapes.d.ts +31 -0
  163. package/dist/component/modules/shapes.d.ts.map +1 -0
  164. package/dist/component/modules/shapes.js +43 -0
  165. package/dist/component/modules/shapes.js.map +1 -0
  166. package/dist/component/modules/text-layout.d.ts +26 -0
  167. package/dist/component/modules/text-layout.d.ts.map +1 -0
  168. package/dist/component/modules/text-layout.js +57 -0
  169. package/dist/component/modules/text-layout.js.map +1 -0
  170. package/dist/component/modules/text-style.d.ts +48 -0
  171. package/dist/component/modules/text-style.d.ts.map +1 -0
  172. package/dist/component/modules/text-style.js +63 -0
  173. package/dist/component/modules/text-style.js.map +1 -0
  174. package/dist/component/modules/three-entries.d.ts +23 -0
  175. package/dist/component/modules/three-entries.d.ts.map +1 -0
  176. package/dist/component/modules/three-entries.js +41 -0
  177. package/dist/component/modules/three-entries.js.map +1 -0
  178. package/dist/component/modules/view3d.d.ts +55 -0
  179. package/dist/component/modules/view3d.d.ts.map +1 -0
  180. package/dist/component/modules/view3d.js +160 -0
  181. package/dist/component/modules/view3d.js.map +1 -0
  182. package/dist/component/timeline.d.ts +22 -0
  183. package/dist/component/timeline.d.ts.map +1 -0
  184. package/dist/component/timeline.js +128 -0
  185. package/dist/component/timeline.js.map +1 -0
  186. package/dist/component/type-def.d.ts +26 -0
  187. package/dist/component/type-def.d.ts.map +1 -0
  188. package/dist/component/type-def.js +16 -0
  189. package/dist/component/type-def.js.map +1 -0
  190. package/dist/component/types.d.ts +91 -0
  191. package/dist/component/types.d.ts.map +1 -0
  192. package/dist/component/types.js +88 -0
  193. package/dist/component/types.js.map +1 -0
  194. package/dist/component/views.d.ts +121 -0
  195. package/dist/component/views.d.ts.map +1 -0
  196. package/dist/component/views.js +413 -0
  197. package/dist/component/views.js.map +1 -0
  198. package/dist/component.d.ts +10 -19
  199. package/dist/component.d.ts.map +1 -1
  200. package/dist/component.js +10 -19
  201. package/dist/component.js.map +1 -1
  202. package/dist/components/builtins/audio/audio.d.ts +53 -0
  203. package/dist/components/builtins/audio/audio.d.ts.map +1 -0
  204. package/dist/components/builtins/audio/audio.js +41 -0
  205. package/dist/components/builtins/audio/audio.js.map +1 -0
  206. package/dist/components/builtins/geometry/composite.d.ts +93 -0
  207. package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
  208. package/dist/components/builtins/geometry/composite.js +25 -0
  209. package/dist/components/builtins/geometry/composite.js.map +1 -0
  210. package/dist/components/builtins/geometry/geometry.d.ts +921 -0
  211. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
  212. package/dist/components/builtins/geometry/geometry.js +107 -0
  213. package/dist/components/builtins/geometry/geometry.js.map +1 -0
  214. package/dist/components/builtins/geometry/shape-outline.d.ts +93 -0
  215. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
  216. package/dist/components/builtins/geometry/shape-outline.js +470 -0
  217. package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
  218. package/dist/components/builtins/layout/layout.d.ts +186 -0
  219. package/dist/components/builtins/layout/layout.d.ts.map +1 -0
  220. package/dist/components/builtins/layout/layout.js +84 -0
  221. package/dist/components/builtins/layout/layout.js.map +1 -0
  222. package/dist/components/builtins/media/media.d.ts +240 -0
  223. package/dist/components/builtins/media/media.d.ts.map +1 -0
  224. package/dist/components/builtins/media/media.js +149 -0
  225. package/dist/components/builtins/media/media.js.map +1 -0
  226. package/dist/components/builtins/providers/providers.d.ts +47 -0
  227. package/dist/components/builtins/providers/providers.d.ts.map +1 -0
  228. package/dist/components/builtins/providers/providers.js +30 -0
  229. package/dist/components/builtins/providers/providers.js.map +1 -0
  230. package/dist/components/builtins/text/number-format.d.ts +66 -0
  231. package/dist/components/builtins/text/number-format.d.ts.map +1 -0
  232. package/dist/components/builtins/text/number-format.js +227 -0
  233. package/dist/components/builtins/text/number-format.js.map +1 -0
  234. package/dist/components/builtins/text/number-pattern.d.ts +51 -0
  235. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
  236. package/dist/components/builtins/text/number-pattern.js +77 -0
  237. package/dist/components/builtins/text/number-pattern.js.map +1 -0
  238. package/dist/components/builtins/text/text-defaults.d.ts +32 -0
  239. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
  240. package/dist/components/builtins/text/text-defaults.js +37 -0
  241. package/dist/components/builtins/text/text-defaults.js.map +1 -0
  242. package/dist/components/builtins/text/text-layout.d.ts +82 -0
  243. package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
  244. package/dist/components/builtins/text/text-layout.js +331 -0
  245. package/dist/components/builtins/text/text-layout.js.map +1 -0
  246. package/dist/components/builtins/text/text.d.ts +409 -0
  247. package/dist/components/builtins/text/text.d.ts.map +1 -0
  248. package/dist/components/builtins/text/text.js +113 -0
  249. package/dist/components/builtins/text/text.js.map +1 -0
  250. package/dist/components/builtins/three/canvas3d.d.ts +245 -0
  251. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
  252. package/dist/components/builtins/three/canvas3d.js +21 -0
  253. package/dist/components/builtins/three/canvas3d.js.map +1 -0
  254. package/dist/components/builtins/three/grid-geometry3d.d.ts +62 -0
  255. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
  256. package/dist/components/builtins/three/grid-geometry3d.js +114 -0
  257. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
  258. package/dist/components/builtins/three/three.d.ts +1889 -0
  259. package/dist/components/builtins/three/three.d.ts.map +1 -0
  260. package/dist/components/builtins/three/three.js +305 -0
  261. package/dist/components/builtins/three/three.js.map +1 -0
  262. package/dist/components/factory/api.d.ts +516 -0
  263. package/dist/components/factory/api.d.ts.map +1 -0
  264. package/dist/components/factory/api.js +4 -0
  265. package/dist/components/factory/api.js.map +1 -0
  266. package/dist/components/factory/clip-of.d.ts +5 -0
  267. package/dist/components/factory/clip-of.d.ts.map +1 -0
  268. package/dist/components/factory/clip-of.js +33 -0
  269. package/dist/components/factory/clip-of.js.map +1 -0
  270. package/dist/components/factory/commands-for.d.ts +19 -0
  271. package/dist/components/factory/commands-for.d.ts.map +1 -0
  272. package/dist/components/factory/commands-for.js +5 -0
  273. package/dist/components/factory/commands-for.js.map +1 -0
  274. package/dist/components/factory/component-audio.d.ts +9 -0
  275. package/dist/components/factory/component-audio.d.ts.map +1 -0
  276. package/dist/components/factory/component-audio.js +18 -0
  277. package/dist/components/factory/component-audio.js.map +1 -0
  278. package/dist/components/factory/component2d.d.ts +8 -0
  279. package/dist/components/factory/component2d.d.ts.map +1 -0
  280. package/dist/components/factory/component2d.js +240 -0
  281. package/dist/components/factory/component2d.js.map +1 -0
  282. package/dist/components/factory/component3d.d.ts +9 -0
  283. package/dist/components/factory/component3d.d.ts.map +1 -0
  284. package/dist/components/factory/component3d.js +99 -0
  285. package/dist/components/factory/component3d.js.map +1 -0
  286. package/dist/components/factory/factory.d.ts +63 -0
  287. package/dist/components/factory/factory.d.ts.map +1 -0
  288. package/dist/components/factory/factory.js +313 -0
  289. package/dist/components/factory/factory.js.map +1 -0
  290. package/dist/components/factory/timeline.d.ts +22 -0
  291. package/dist/components/factory/timeline.d.ts.map +1 -0
  292. package/dist/components/factory/timeline.js +128 -0
  293. package/dist/components/factory/timeline.js.map +1 -0
  294. package/dist/components/factory/type-def.d.ts +26 -0
  295. package/dist/components/factory/type-def.d.ts.map +1 -0
  296. package/dist/components/factory/type-def.js +16 -0
  297. package/dist/components/factory/type-def.js.map +1 -0
  298. package/dist/components/factory/types.d.ts +91 -0
  299. package/dist/components/factory/types.d.ts.map +1 -0
  300. package/dist/components/factory/types.js +88 -0
  301. package/dist/components/factory/types.js.map +1 -0
  302. package/dist/components/factory/views.d.ts +121 -0
  303. package/dist/components/factory/views.d.ts.map +1 -0
  304. package/dist/components/factory/views.js +413 -0
  305. package/dist/components/factory/views.js.map +1 -0
  306. package/dist/components/modules/aim.d.ts +30 -0
  307. package/dist/components/modules/aim.d.ts.map +1 -0
  308. package/dist/components/modules/aim.js +39 -0
  309. package/dist/components/modules/aim.js.map +1 -0
  310. package/dist/components/modules/corners.d.ts +13 -0
  311. package/dist/components/modules/corners.d.ts.map +1 -0
  312. package/dist/components/modules/corners.js +12 -0
  313. package/dist/components/modules/corners.js.map +1 -0
  314. package/dist/components/modules/flow.d.ts +26 -0
  315. package/dist/components/modules/flow.d.ts.map +1 -0
  316. package/dist/components/modules/flow.js +57 -0
  317. package/dist/components/modules/flow.js.map +1 -0
  318. package/dist/components/modules/material.d.ts +40 -0
  319. package/dist/components/modules/material.d.ts.map +1 -0
  320. package/dist/components/modules/material.js +75 -0
  321. package/dist/components/modules/material.js.map +1 -0
  322. package/dist/components/modules/paint.d.ts +71 -0
  323. package/dist/components/modules/paint.d.ts.map +1 -0
  324. package/dist/components/modules/paint.js +106 -0
  325. package/dist/components/modules/paint.js.map +1 -0
  326. package/dist/components/modules/shapes.d.ts +31 -0
  327. package/dist/components/modules/shapes.d.ts.map +1 -0
  328. package/dist/components/modules/shapes.js +43 -0
  329. package/dist/components/modules/shapes.js.map +1 -0
  330. package/dist/components/modules/text-layout.d.ts +26 -0
  331. package/dist/components/modules/text-layout.d.ts.map +1 -0
  332. package/dist/components/modules/text-layout.js +57 -0
  333. package/dist/components/modules/text-layout.js.map +1 -0
  334. package/dist/components/modules/text-style.d.ts +48 -0
  335. package/dist/components/modules/text-style.d.ts.map +1 -0
  336. package/dist/components/modules/text-style.js +63 -0
  337. package/dist/components/modules/text-style.js.map +1 -0
  338. package/dist/components/modules/three-entries.d.ts +23 -0
  339. package/dist/components/modules/three-entries.d.ts.map +1 -0
  340. package/dist/components/modules/three-entries.js +41 -0
  341. package/dist/components/modules/three-entries.js.map +1 -0
  342. package/dist/components/modules/view3d.d.ts +59 -0
  343. package/dist/components/modules/view3d.d.ts.map +1 -0
  344. package/dist/components/modules/view3d.js +171 -0
  345. package/dist/components/modules/view3d.js.map +1 -0
  346. package/dist/components/trees/2d/group-bounds.d.ts +56 -0
  347. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
  348. package/dist/components/trees/2d/group-bounds.js +87 -0
  349. package/dist/components/trees/2d/group-bounds.js.map +1 -0
  350. package/dist/components/trees/2d/node-lifecycle.d.ts +46 -0
  351. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
  352. package/dist/components/trees/2d/node-lifecycle.js +264 -0
  353. package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
  354. package/dist/components/trees/2d/node-motion.d.ts +56 -0
  355. package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
  356. package/dist/components/trees/2d/node-motion.js +86 -0
  357. package/dist/components/trees/2d/node-motion.js.map +1 -0
  358. package/dist/components/trees/2d/node-render.d.ts +36 -0
  359. package/dist/components/trees/2d/node-render.d.ts.map +1 -0
  360. package/dist/components/trees/2d/node-render.js +67 -0
  361. package/dist/components/trees/2d/node-render.js.map +1 -0
  362. package/dist/components/trees/2d/node-space.d.ts +63 -0
  363. package/dist/components/trees/2d/node-space.d.ts.map +1 -0
  364. package/dist/components/trees/2d/node-space.js +131 -0
  365. package/dist/components/trees/2d/node-space.js.map +1 -0
  366. package/dist/components/trees/2d/node-transform.d.ts +55 -0
  367. package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
  368. package/dist/components/trees/2d/node-transform.js +73 -0
  369. package/dist/components/trees/2d/node-transform.js.map +1 -0
  370. package/dist/components/trees/2d/node2d.d.ts +1020 -0
  371. package/dist/components/trees/2d/node2d.d.ts.map +1 -0
  372. package/dist/components/trees/2d/node2d.js +1481 -0
  373. package/dist/components/trees/2d/node2d.js.map +1 -0
  374. package/dist/components/trees/audio/index.d.ts +2 -0
  375. package/dist/components/trees/audio/index.d.ts.map +1 -0
  376. package/dist/components/trees/audio/index.js +2 -0
  377. package/dist/components/trees/audio/index.js.map +1 -0
  378. package/dist/components/trees/audio/node-audio.d.ts +109 -0
  379. package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
  380. package/dist/components/trees/audio/node-audio.js +167 -0
  381. package/dist/components/trees/audio/node-audio.js.map +1 -0
  382. package/dist/components/trees/index.d.ts +10 -0
  383. package/dist/components/trees/index.d.ts.map +1 -0
  384. package/dist/components/trees/index.js +14 -0
  385. package/dist/components/trees/index.js.map +1 -0
  386. package/dist/components/trees/node/node-editor-state.d.ts +53 -0
  387. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
  388. package/dist/components/trees/node/node-editor-state.js +23 -0
  389. package/dist/components/trees/node/node-editor-state.js.map +1 -0
  390. package/dist/components/trees/node/node-reactive.d.ts +89 -0
  391. package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
  392. package/dist/components/trees/node/node-reactive.js +135 -0
  393. package/dist/components/trees/node/node-reactive.js.map +1 -0
  394. package/dist/components/trees/node/node-time.d.ts +39 -0
  395. package/dist/components/trees/node/node-time.d.ts.map +1 -0
  396. package/dist/components/trees/node/node-time.js +14 -0
  397. package/dist/components/trees/node/node-time.js.map +1 -0
  398. package/dist/components/trees/node/node-walk.d.ts +46 -0
  399. package/dist/components/trees/node/node-walk.d.ts.map +1 -0
  400. package/dist/components/trees/node/node-walk.js +74 -0
  401. package/dist/components/trees/node/node-walk.js.map +1 -0
  402. package/dist/components/trees/node/node.d.ts +401 -0
  403. package/dist/components/trees/node/node.d.ts.map +1 -0
  404. package/dist/components/trees/node/node.js +680 -0
  405. package/dist/components/trees/node/node.js.map +1 -0
  406. package/dist/components/trees/root/canvas2d-node.d.ts +163 -0
  407. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
  408. package/dist/components/trees/root/canvas2d-node.js +216 -0
  409. package/dist/components/trees/root/canvas2d-node.js.map +1 -0
  410. package/dist/components/trees/three/node3d.d.ts +222 -0
  411. package/dist/components/trees/three/node3d.d.ts.map +1 -0
  412. package/dist/components/trees/three/node3d.js +289 -0
  413. package/dist/components/trees/three/node3d.js.map +1 -0
  414. package/dist/document/audio.d.ts +9 -1
  415. package/dist/document/audio.d.ts.map +1 -1
  416. package/dist/document/audio.js +41 -0
  417. package/dist/document/audio.js.map +1 -1
  418. package/dist/document/builtins.d.ts.map +1 -1
  419. package/dist/document/builtins.js +13 -31
  420. package/dist/document/builtins.js.map +1 -1
  421. package/dist/document/command-traits.d.ts +2 -2
  422. package/dist/document/command-traits.js +4 -1
  423. package/dist/document/command-traits.js.map +1 -1
  424. package/dist/document/deny-globals.d.ts +2 -2
  425. package/dist/document/deny-globals.js +2 -2
  426. package/dist/document/deny-globals.js.map +1 -1
  427. package/dist/document/diff.d.ts.map +1 -1
  428. package/dist/document/diff.js +3 -3
  429. package/dist/document/diff.js.map +1 -1
  430. package/dist/document/doc-index.d.ts.map +1 -1
  431. package/dist/document/doc-index.js +3 -3
  432. package/dist/document/doc-index.js.map +1 -1
  433. package/dist/document/expression/index.d.ts +1 -1
  434. package/dist/document/expression/index.js +1 -1
  435. package/dist/document/expression/index.js.map +1 -1
  436. package/dist/document/expression/ops.js +1 -1
  437. package/dist/document/expression/ops.js.map +1 -1
  438. package/dist/document/index.d.ts +1 -2
  439. package/dist/document/index.d.ts.map +1 -1
  440. package/dist/document/index.js +1 -2
  441. package/dist/document/index.js.map +1 -1
  442. package/dist/document/node-decorator.d.ts +14 -10
  443. package/dist/document/node-decorator.d.ts.map +1 -1
  444. package/dist/document/node-decorator.js +14 -10
  445. package/dist/document/node-decorator.js.map +1 -1
  446. package/dist/document/node-descriptor.d.ts +9 -3
  447. package/dist/document/node-descriptor.d.ts.map +1 -1
  448. package/dist/document/node-descriptor.js.map +1 -1
  449. package/dist/document/placement.js +2 -2
  450. package/dist/document/placement.js.map +1 -1
  451. package/dist/document/registry.d.ts +29 -36
  452. package/dist/document/registry.d.ts.map +1 -1
  453. package/dist/document/registry.js +29 -35
  454. package/dist/document/registry.js.map +1 -1
  455. package/dist/document/settled-index.d.ts +49 -0
  456. package/dist/document/settled-index.d.ts.map +1 -0
  457. package/dist/document/settled-index.js +247 -0
  458. package/dist/document/settled-index.js.map +1 -0
  459. package/dist/document/timeline.d.ts +29 -3
  460. package/dist/document/timeline.d.ts.map +1 -1
  461. package/dist/document/timeline.js +99 -3
  462. package/dist/document/timeline.js.map +1 -1
  463. package/dist/document/types.d.ts +4 -4
  464. package/dist/document/types.js.map +1 -1
  465. package/dist/document/validate.d.ts +1 -1
  466. package/dist/document/validate.js.map +1 -1
  467. package/dist/experimental.d.ts +22 -0
  468. package/dist/experimental.d.ts.map +1 -0
  469. package/dist/experimental.js +20 -0
  470. package/dist/experimental.js.map +1 -0
  471. package/dist/index.d.ts +10 -2
  472. package/dist/index.d.ts.map +1 -1
  473. package/dist/index.js +10 -2
  474. package/dist/index.js.map +1 -1
  475. package/dist/layout/types.d.ts +1 -1
  476. package/dist/layout/types.js.map +1 -1
  477. package/dist/nodes/audio/index.d.ts +2 -2
  478. package/dist/nodes/audio/index.d.ts.map +1 -1
  479. package/dist/nodes/audio/index.js +0 -2
  480. package/dist/nodes/audio/index.js.map +1 -1
  481. package/dist/nodes/audio/sound-node.d.ts +2 -1
  482. package/dist/nodes/audio/sound-node.d.ts.map +1 -1
  483. package/dist/nodes/audio/sound-node.js +3 -0
  484. package/dist/nodes/audio/sound-node.js.map +1 -1
  485. package/dist/nodes/index.d.ts +39 -27
  486. package/dist/nodes/index.d.ts.map +1 -1
  487. package/dist/nodes/index.js +16 -30
  488. package/dist/nodes/index.js.map +1 -1
  489. package/dist/nodes/node/node.d.ts +7 -1
  490. package/dist/nodes/node/node.d.ts.map +1 -1
  491. package/dist/nodes/node/node.js +23 -8
  492. package/dist/nodes/node/node.js.map +1 -1
  493. package/dist/nodes/root/canvas2d-node.d.ts +2 -1
  494. package/dist/nodes/root/canvas2d-node.d.ts.map +1 -1
  495. package/dist/nodes/root/canvas2d-node.js +3 -0
  496. package/dist/nodes/root/canvas2d-node.js.map +1 -1
  497. package/dist/nodes/text/richtext-node.d.ts +0 -5
  498. package/dist/nodes/text/richtext-node.d.ts.map +1 -1
  499. package/dist/nodes/text/richtext-node.js +5 -71
  500. package/dist/nodes/text/richtext-node.js.map +1 -1
  501. package/dist/nodes/text/text-base.d.ts +5 -22
  502. package/dist/nodes/text/text-base.d.ts.map +1 -1
  503. package/dist/nodes/text/text-base.js +12 -363
  504. package/dist/nodes/text/text-base.js.map +1 -1
  505. package/dist/nodes/text/text-layout.d.ts +87 -0
  506. package/dist/nodes/text/text-layout.d.ts.map +1 -0
  507. package/dist/nodes/text/text-layout.js +368 -0
  508. package/dist/nodes/text/text-layout.js.map +1 -0
  509. package/dist/nodes/three/canvas3d-node.d.ts +3 -1
  510. package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
  511. package/dist/nodes/three/canvas3d-node.js +6 -0
  512. package/dist/nodes/three/canvas3d-node.js.map +1 -1
  513. package/dist/props/host.d.ts +1 -1
  514. package/dist/props/host.js.map +1 -1
  515. package/dist/props/slot.d.ts +1 -1
  516. package/dist/props/slot.js +1 -1
  517. package/dist/props/slot.js.map +1 -1
  518. package/dist/render/clip.d.ts +1 -1
  519. package/dist/render/clip.js +1 -1
  520. package/dist/render/clip.js.map +1 -1
  521. package/dist/render/descriptors/rect.js.map +1 -1
  522. package/dist/render/descriptors/text.d.ts +11 -5
  523. package/dist/render/descriptors/text.d.ts.map +1 -1
  524. package/dist/render/descriptors/text.js +7 -1
  525. package/dist/render/descriptors/text.js.map +1 -1
  526. package/dist/render/render-context2d.d.ts +2 -2
  527. package/dist/render/render-context2d.js.map +1 -1
  528. package/dist/render3d/builders.d.ts +1 -1
  529. package/dist/render3d/builders.js +1 -1
  530. package/dist/render3d/builders.js.map +1 -1
  531. package/dist/render3d/graphics3d.d.ts +13 -19
  532. package/dist/render3d/graphics3d.d.ts.map +1 -1
  533. package/dist/render3d/graphics3d.js +13 -19
  534. package/dist/render3d/graphics3d.js.map +1 -1
  535. package/dist/render3d/scene3d.d.ts +1 -1
  536. package/dist/render3d/scene3d.js +1 -1
  537. package/dist/render3d/scene3d.js.map +1 -1
  538. package/dist/render3d/texture.d.ts +2 -2
  539. package/dist/render3d/texture.d.ts.map +1 -1
  540. package/dist/render3d/texture.js.map +1 -1
  541. package/dist/render3d/vector3.d.ts +2 -2
  542. package/dist/render3d/vector3.js +2 -2
  543. package/dist/render3d/vector3.js.map +1 -1
  544. package/dist/runtime/asset-refine.d.ts +1 -1
  545. package/dist/runtime/asset-refine.d.ts.map +1 -1
  546. package/dist/runtime/asset-refine.js +1 -1
  547. package/dist/runtime/asset-refine.js.map +1 -1
  548. package/dist/runtime/asset-update.js +1 -1
  549. package/dist/runtime/asset-update.js.map +1 -1
  550. package/dist/runtime/audio-index.d.ts +0 -11
  551. package/dist/runtime/audio-index.d.ts.map +1 -1
  552. package/dist/runtime/audio-index.js +0 -25
  553. package/dist/runtime/audio-index.js.map +1 -1
  554. package/dist/runtime/clip-instance.d.ts +7 -4
  555. package/dist/runtime/clip-instance.d.ts.map +1 -1
  556. package/dist/runtime/clip-instance.js +21 -7
  557. package/dist/runtime/clip-instance.js.map +1 -1
  558. package/dist/runtime/clip-store.d.ts +11 -3
  559. package/dist/runtime/clip-store.d.ts.map +1 -1
  560. package/dist/runtime/clip-store.js +83 -23
  561. package/dist/runtime/clip-store.js.map +1 -1
  562. package/dist/runtime/engine.d.ts +3 -3
  563. package/dist/runtime/engine.js +2 -2
  564. package/dist/runtime/engine.js.map +1 -1
  565. package/dist/runtime/node-picking.d.ts +2 -2
  566. package/dist/runtime/node-picking.d.ts.map +1 -1
  567. package/dist/runtime/node-picking.js +9 -10
  568. package/dist/runtime/node-picking.js.map +1 -1
  569. package/dist/runtime/node-picking3d.d.ts +12 -5
  570. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  571. package/dist/runtime/node-picking3d.js +6 -1
  572. package/dist/runtime/node-picking3d.js.map +1 -1
  573. package/dist/runtime/playback-controller.d.ts +2 -2
  574. package/dist/runtime/playback-controller.d.ts.map +1 -1
  575. package/dist/runtime/playback-controller.js +1 -1
  576. package/dist/runtime/playback-controller.js.map +1 -1
  577. package/dist/runtime/state-evaluator.d.ts +2 -2
  578. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  579. package/dist/runtime/state-evaluator.js.map +1 -1
  580. package/dist/runtime/text-geometry.d.ts +1 -1
  581. package/dist/runtime/text-geometry.d.ts.map +1 -1
  582. package/dist/runtime/text-geometry.js +6 -3
  583. package/dist/runtime/text-geometry.js.map +1 -1
  584. package/dist/sdk/index.d.ts +46 -21
  585. package/dist/sdk/index.d.ts.map +1 -1
  586. package/dist/sdk/index.js +47 -43
  587. package/dist/sdk/index.js.map +1 -1
  588. package/dist/tween/command-decorator.d.ts +7 -9
  589. package/dist/tween/command-decorator.d.ts.map +1 -1
  590. package/dist/tween/command-decorator.js +2 -2
  591. package/dist/tween/command-decorator.js.map +1 -1
  592. package/dist/tween/command.d.ts +13 -1
  593. package/dist/tween/command.d.ts.map +1 -1
  594. package/dist/tween/command.js +14 -0
  595. package/dist/tween/command.js.map +1 -1
  596. package/dist/tween/index.d.ts +2 -1
  597. package/dist/tween/index.d.ts.map +1 -1
  598. package/dist/tween/index.js +1 -1
  599. package/dist/tween/index.js.map +1 -1
  600. package/dist/tween/loop.d.ts +1 -1
  601. package/dist/tween/loop.js +1 -1
  602. package/dist/tween/loop.js.map +1 -1
  603. package/dist/util/reference.d.ts +6 -6
  604. package/dist/util/reference.js.map +1 -1
  605. package/package.json +7 -10
  606. package/dist/browser/chunks/chunk-FUZVFT3W.js +0 -18
  607. package/dist/browser/chunks/chunk-FUZVFT3W.js.map +0 -7
  608. package/dist/browser/chunks/chunk-QG6C23IJ.js +0 -3
  609. package/dist/browser/chunks/chunk-QG6C23IJ.js.map +0 -7
  610. package/dist/browser/chunks/chunk-SFNJRPBV.js +0 -2
  611. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +0 -7
  612. package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
  613. package/dist/browser/jsx-jsx-runtime.js +0 -2
  614. package/dist/browser/jsx-jsx-runtime.js.map +0 -7
  615. /package/dist/browser/{jsx-jsx-dev-runtime.js.map → experimental.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-time.js","sourceRoot":"","sources":["../../../../src/components/trees/node/node-time.ts"],"names":[],"mappings":"AAoCA,iEAAiE;AACjE,MAAM,UAAU,cAAc;IAC1B,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACjE,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,eAAe,CAAC,IAAqB,EAAE,KAAa;IAChE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC;IACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACnB,IAAI,CAAC,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;AACzC,CAAC","sourcesContent":["/**\r\n * A node's place on the scene's clock, read via `node.time`.\r\n *\r\n * Advanced once per frame by `Node.attach`, and consumed by motion sampling,\r\n * the render context's `elapsed`, and anything a node's own `tick()` derives\r\n * from time.\r\n *\r\n * `creation` is seeded on the node's **first** advance rather than at\r\n * construction, so `elapsed` measures how long a node has been *in the scene* —\r\n * which is what an entrance animation, a video's playhead and a per-node\r\n * dissolve all actually mean. A node built during the generator's third second\r\n * and added then reads `elapsed === 0` on its first frame.\r\n */\r\nexport interface NodeTime {\r\n /** Seconds since the clip started. */\r\n readonly total: number;\r\n /** The clip time at which this node was first advanced. */\r\n readonly creation: number;\r\n /** How long this node has existed: `total - creation`. */\r\n readonly elapsed: number;\r\n}\r\n\r\n/**\r\n * The writable form the runtime advances. Nodes hand out {@link NodeTime}, which\r\n * is the same shape with every field read-only.\r\n *\r\n * @internal\r\n */\r\nexport interface MutableNodeTime {\r\n total: number;\r\n creation: number;\r\n elapsed: number;\r\n /** Whether {@link advanceNodeTime} has seeded `creation` yet. */\r\n started: boolean;\r\n}\r\n\r\n/** The zeroed holder a node keeps for its lifetime. @internal */\r\nexport function createNodeTime(): MutableNodeTime {\r\n return { total: 0, creation: 0, elapsed: 0, started: false };\r\n}\r\n\r\n/** Advance `time` to `total` clip-seconds, seeding `creation` on first tick. @internal */\r\nexport function advanceNodeTime(time: MutableNodeTime, total: number): void {\r\n if (!time.started) {\r\n time.creation = total;\r\n time.started = true;\r\n }\r\n time.total = total;\r\n time.elapsed = total - time.creation;\r\n}\r\n"]}
@@ -0,0 +1,46 @@
1
+ import type { AssetScope } from "../../../assets/scope.js";
2
+ import type { Node } from "./node.js";
3
+ /**
4
+ * The subtree traversals the runtime drives, as free functions over a {@link Node}:
5
+ * what is left on `Node` is what a node *is*, and what is here is what the engine
6
+ * *does to* one. Every walk stops at an unmounted node — see {@link Node.mounted}.
7
+ *
8
+ * @internal
9
+ */
10
+ /**
11
+ * Declare one node's own assets — never its children's, so each node's
12
+ * declarations stay attributable to it.
13
+ */
14
+ export declare function declareNode(node: Node, scope: AssetScope): void;
15
+ /** {@link declareNode} over `root` and every mounted descendant, in every dimension. */
16
+ export declare function declareTree(root: Node, scope: AssetScope): void;
17
+ /**
18
+ * Visit `root` and every mounted descendant with its structural path.
19
+ *
20
+ * Indexed over every dimension's children, so a path does not shift when a sibling
21
+ * of another dimension comes or goes the way a filtered `children` index would.
22
+ */
23
+ export declare function forEachOwner(root: Node, visit: (node: Node, path: string) => void): void;
24
+ /**
25
+ * Bind `node` with `host`'s catalog, context and clock without adopting it — what a
26
+ * runtime passes as `AssetDeclaration`'s `bindSubtree` for a `Tex.surface` source.
27
+ */
28
+ export declare function bindDetached(host: Node, node: Node): void;
29
+ /**
30
+ * Sample every node's derived render state (currently motion) for this frame.
31
+ *
32
+ * Normally done by `attach` as it advances the clock; this is the seam for the
33
+ * priming path, which needs the same state seeded without moving time (see
34
+ * `StateEvaluator.resetSlot`).
35
+ */
36
+ export declare function sampleTree(node: Node): void;
37
+ /**
38
+ * Record the subtree's current positions as the motion history's previous frame,
39
+ * stamped `at`, deriving no velocity.
40
+ *
41
+ * The driven path calls this with the props evaluated one frame back, so the
42
+ * {@link sampleTree} that follows measures against the timeline rather than
43
+ * against wherever the playhead happened to be.
44
+ */
45
+ export declare function primeMotionTree(node: Node, at: number): void;
46
+ //# sourceMappingURL=node-walk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-walk.d.ts","sourceRoot":"","sources":["../../../../src/components/trees/node/node-walk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;;;;GAMG;AAEH;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAE/D;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAK/D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAExF;AASD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAEzD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAG3C;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAG5D"}
@@ -0,0 +1,74 @@
1
+ import { nodePath } from "../../../project/tree.js";
2
+ /**
3
+ * The subtree traversals the runtime drives, as free functions over a {@link Node}:
4
+ * what is left on `Node` is what a node *is*, and what is here is what the engine
5
+ * *does to* one. Every walk stops at an unmounted node — see {@link Node.mounted}.
6
+ *
7
+ * @internal
8
+ */
9
+ /**
10
+ * Declare one node's own assets — never its children's, so each node's
11
+ * declarations stay attributable to it.
12
+ */
13
+ export function declareNode(node, scope) {
14
+ node.declareAssets(scope);
15
+ }
16
+ /** {@link declareNode} over `root` and every mounted descendant, in every dimension. */
17
+ export function declareTree(root, scope) {
18
+ if (!root.mounted)
19
+ return;
20
+ declareNode(root, scope);
21
+ const children = root._allChildren;
22
+ for (let i = 0; i < children.length; i++)
23
+ declareTree(children[i], scope);
24
+ }
25
+ /**
26
+ * Visit `root` and every mounted descendant with its structural path.
27
+ *
28
+ * Indexed over every dimension's children, so a path does not shift when a sibling
29
+ * of another dimension comes or goes the way a filtered `children` index would.
30
+ */
31
+ export function forEachOwner(root, visit) {
32
+ visitOwners(root, "", visit);
33
+ }
34
+ function visitOwners(node, path, visit) {
35
+ if (!node.mounted)
36
+ return;
37
+ visit(node, path);
38
+ const children = node._allChildren;
39
+ for (let i = 0; i < children.length; i++)
40
+ visitOwners(children[i], nodePath(path, i), visit);
41
+ }
42
+ /**
43
+ * Bind `node` with `host`'s catalog, context and clock without adopting it — what a
44
+ * runtime passes as `AssetDeclaration`'s `bindSubtree` for a `Tex.surface` source.
45
+ */
46
+ export function bindDetached(host, node) {
47
+ host.attachDetached(node);
48
+ }
49
+ /**
50
+ * Sample every node's derived render state (currently motion) for this frame.
51
+ *
52
+ * Normally done by `attach` as it advances the clock; this is the seam for the
53
+ * priming path, which needs the same state seeded without moving time (see
54
+ * `StateEvaluator.resetSlot`).
55
+ */
56
+ export function sampleTree(node) {
57
+ node._sample();
58
+ for (const child of node.children)
59
+ sampleTree(child);
60
+ }
61
+ /**
62
+ * Record the subtree's current positions as the motion history's previous frame,
63
+ * stamped `at`, deriving no velocity.
64
+ *
65
+ * The driven path calls this with the props evaluated one frame back, so the
66
+ * {@link sampleTree} that follows measures against the timeline rather than
67
+ * against wherever the playhead happened to be.
68
+ */
69
+ export function primeMotionTree(node, at) {
70
+ node._primeMotion(at);
71
+ for (const child of node.children)
72
+ primeMotionTree(child, at);
73
+ }
74
+ //# sourceMappingURL=node-walk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-walk.js","sourceRoot":"","sources":["../../../../src/components/trees/node/node-walk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI1C;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAU,EAAE,KAAiB;IACrD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,WAAW,CAAC,IAAU,EAAE,KAAiB;IACrD,IAAI,CAAC,IAAI,CAAC,OAAO;QAAE,OAAO;IAC1B,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;IACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAU,EAAE,KAAyC;IAC9E,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,WAAW,CAAC,IAAU,EAAE,IAAY,EAAE,KAAyC;IACpF,IAAI,CAAC,IAAI,CAAC,OAAO;QAAE,OAAO;IAC1B,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClB,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;IACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACjG,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAU,EAAE,IAAU;IAC9C,IAAwD,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACnF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAU;IACjC,IAAI,CAAC,OAAO,EAAE,CAAC;IACf,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ;QAAE,UAAU,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,IAAU,EAAE,EAAU;IAClD,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACtB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ;QAAE,eAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { nodePath } from \"@/project/tree\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\nimport type { Node } from \"./node\";\r\n\r\n/**\r\n * The subtree traversals the runtime drives, as free functions over a {@link Node}:\r\n * what is left on `Node` is what a node *is*, and what is here is what the engine\r\n * *does to* one. Every walk stops at an unmounted node — see {@link Node.mounted}.\r\n *\r\n * @internal\r\n */\r\n\r\n/**\r\n * Declare one node's own assets — never its children's, so each node's\r\n * declarations stay attributable to it.\r\n */\r\nexport function declareNode(node: Node, scope: AssetScope): void {\r\n node.declareAssets(scope);\r\n}\r\n\r\n/** {@link declareNode} over `root` and every mounted descendant, in every dimension. */\r\nexport function declareTree(root: Node, scope: AssetScope): void {\r\n if (!root.mounted) return;\r\n declareNode(root, scope);\r\n const children = root._allChildren;\r\n for (let i = 0; i < children.length; i++) declareTree(children[i], scope);\r\n}\r\n\r\n/**\r\n * Visit `root` and every mounted descendant with its structural path.\r\n *\r\n * Indexed over every dimension's children, so a path does not shift when a sibling\r\n * of another dimension comes or goes the way a filtered `children` index would.\r\n */\r\nexport function forEachOwner(root: Node, visit: (node: Node, path: string) => void): void {\r\n visitOwners(root, \"\", visit);\r\n}\r\n\r\nfunction visitOwners(node: Node, path: string, visit: (node: Node, path: string) => void): void {\r\n if (!node.mounted) return;\r\n visit(node, path);\r\n const children = node._allChildren;\r\n for (let i = 0; i < children.length; i++) visitOwners(children[i], nodePath(path, i), visit);\r\n}\r\n\r\n/**\r\n * Bind `node` with `host`'s catalog, context and clock without adopting it — what a\r\n * runtime passes as `AssetDeclaration`'s `bindSubtree` for a `Tex.surface` source.\r\n */\r\nexport function bindDetached(host: Node, node: Node): void {\r\n (host as unknown as { attachDetached(node: Node): void }).attachDetached(node);\r\n}\r\n\r\n/**\r\n * Sample every node's derived render state (currently motion) for this frame.\r\n *\r\n * Normally done by `attach` as it advances the clock; this is the seam for the\r\n * priming path, which needs the same state seeded without moving time (see\r\n * `StateEvaluator.resetSlot`).\r\n */\r\nexport function sampleTree(node: Node): void {\r\n node._sample();\r\n for (const child of node.children) sampleTree(child);\r\n}\r\n\r\n/**\r\n * Record the subtree's current positions as the motion history's previous frame,\r\n * stamped `at`, deriving no velocity.\r\n *\r\n * The driven path calls this with the props evaluated one frame back, so the\r\n * {@link sampleTree} that follows measures against the timeline rather than\r\n * against wherever the playhead happened to be.\r\n */\r\nexport function primeMotionTree(node: Node, at: number): void {\r\n node._primeMotion(at);\r\n for (const child of node.children) primeMotionTree(child, at);\r\n}\r\n"]}
@@ -0,0 +1,401 @@
1
+ import { PropSlot } from "../../../props/slot.js";
2
+ import { PropHost, type PropCells } from "../../../props/host.js";
3
+ import { EasingFunction } from "../../../tween/ease/type.js";
4
+ import { type Command, type CommandArgs } from "../../../tween/command.js";
5
+ import { TweenStepper } from "../../../tween/stepper.js";
6
+ import { RefTarget } from "../../../util/reference.js";
7
+ import { Context, ContextMap } from "../../../util/context.js";
8
+ import { AssetCatalog } from "../../../assets/catalog.js";
9
+ import type { AssetScope } from "../../../assets/scope.js";
10
+ import { PropOptions } from "../../../attributes/properties/decorator.js";
11
+ import type { PropLayer } from "./node-reactive.js";
12
+ import { type MutableNodeTime, type NodeTime } from "../../../components/trees/node/node-time.js";
13
+ import type { PropInputs } from "../../../attributes/properties/inputs.js";
14
+ export type { NodeTime } from "../../../components/trees/node/node-time.js";
15
+ export type { PropInput, PropInputs } from "../../../attributes/properties/inputs.js";
16
+ /** Which scene graph a node belongs to. See {@link Node.dimension}. */
17
+ export type NodeDimension = "2d" | "3d" | "audio";
18
+ export interface NodeMetadata<T extends Node> {
19
+ /**
20
+ * Handle written with this node at construction. Typed as {@link RefTarget}
21
+ * rather than `Reference<T>` so a ref declared as one of `T`'s *supertypes*
22
+ * is accepted (`createRef<Node2D>()` on a `<Rect>`) — see the note there
23
+ * for why that direction is the sound one.
24
+ */
25
+ ref?: RefTarget<T>;
26
+ }
27
+ export type NodeConfig<T extends Node, P> = PropInputs<P> & NodeMetadata<T>;
28
+ /**
29
+ * Everything {@link Node.attach} needs to put a subtree into a live scene.
30
+ *
31
+ * The three things tree membership supplies, and the only three: what assets are
32
+ * available, what context the ancestors provide, and where the playhead is.
33
+ */
34
+ export interface AttachScope {
35
+ /** Metadata for the assets this scene may declare. */
36
+ assets: AssetCatalog;
37
+ /** The token map the parent provides to this node. */
38
+ context: ContextMap;
39
+ /** Clip-relative time, in seconds. */
40
+ time: number;
41
+ }
42
+ /**
43
+ * A `children` child: a single {@link Node}, an arbitrarily-nested array of
44
+ * children, or a falsy value. Nesting is allowed so `.map()` results can be
45
+ * dropped straight in as a child, and falsy values are allowed so
46
+ * `condition && Rect({ … })` works — the constructor flattens
47
+ * (`.flat(Infinity)`) and filters out everything but `Node` instances.
48
+ */
49
+ export type NodeChildren = Node | false | null | undefined | NodeChildren[];
50
+ /**
51
+ * The props every node has, in either dimension.
52
+ *
53
+ * Deliberately tiny. Everything that reads as "a box on a page" — `x`/`y`,
54
+ * `width`/`height`, `padding`, `flex`, anchors, `opacity` — lives on
55
+ * {@link Node2DProps}, and everything that reads as "a thing in space" —
56
+ * `position`, `quaternion`, `castShadow` — lives on `Node3DProps`, because a
57
+ * prop that means nothing for half the tree is worse than no prop at all.
58
+ */
59
+ export interface NodeProps {
60
+ children: NodeChildren;
61
+ /**
62
+ * Seeds {@link Node.id}. A document's `NodeSpec.id` supplies it — see
63
+ * `Registry.instantiate` — so an instantiated node answers to the identity
64
+ * its row was authored under. Left out, the node falls back to a UUID, which
65
+ * is what every hand-written `new Rect({…})` and component call gets.
66
+ */
67
+ id?: string;
68
+ /**
69
+ * The handle a node is *referenced by*, as against {@link NodeProps.id},
70
+ * which addresses it. `"=[card.x]"` in any prop reads the `x` of the node
71
+ * keyed `card` — see `NodeSpec.key`.
72
+ *
73
+ * Optional and never generated — a node has one only because an author wrote
74
+ * one, which is what makes it safe to point a formula at — and unique per
75
+ * document, which `document/validate.ts` enforces.
76
+ */
77
+ key?: string;
78
+ }
79
+ /**
80
+ * The dimension-agnostic base of the scene graph: tree, identity, reactive
81
+ * properties, commands, context, clock, asset declaration, teardown. Nothing
82
+ * about *where* a node is or *how* it draws — that's {@link Node2D} / `Node3D`.
83
+ * They meet only at `Canvas3D`; mixing them anywhere else throws (see
84
+ * {@link acceptsChild}).
85
+ *
86
+ * Subclasses call {@link initProps} from their own constructor rather than the
87
+ * base doing it: a subclass's field initializers only run *after* `super()`
88
+ * returns, so applying `property` defaults any earlier would write into cells
89
+ * that don't exist yet.
90
+ */
91
+ export declare abstract class Node<P extends NodeProps = NodeProps> implements PropHost {
92
+ /**
93
+ * Which scene graph this node belongs to.
94
+ *
95
+ * A getter rather than a field so it is answerable from the prototype during
96
+ * construction, before any subclass field initializer has run.
97
+ */
98
+ abstract get dimension(): NodeDimension;
99
+ /** The trees this type takes children from, answerable from the prototype as {@link dimension} is. */
100
+ get _childTrees(): readonly NodeDimension[];
101
+ constructor(props?: NodeConfig<any, P>);
102
+ /** See {@link NodeProps.key}. */
103
+ key?: string;
104
+ private _hidden;
105
+ private _locked;
106
+ /**
107
+ * Hidden by the editor — no paint, no pick, no layout slot. See
108
+ * {@link NodeEditorState.hidden}.
109
+ */
110
+ get hidden(): boolean;
111
+ /** Locked by the editor — unpickable, but drawn. See {@link NodeEditorState.locked}. */
112
+ get locked(): boolean;
113
+ /**
114
+ * @internal — written only by `applyEditorStates`, which owns both flags for
115
+ * the whole tree. Not a setter pair, so a caller cannot set one and leave the
116
+ * other holding a previous frame's answer.
117
+ */
118
+ _setEditorState(hidden: boolean, locked: boolean): void;
119
+ /**
120
+ * Fire the `ref` and apply every declared property, reading
121
+ * initial values from `props`.
122
+ *
123
+ * Called by the concrete constructor ({@link Node2D}'s, `Node3D`'s) rather
124
+ * than by this one, because a subclass's field initializers run *after*
125
+ * `super()` returns: doing this here would apply props while the cells those
126
+ * props write into are still `undefined`.
127
+ */
128
+ protected initProps(props?: NodeConfig<any, P>): void;
129
+ /**
130
+ * Adopt the `children` prop. Called by the concrete constructor after its own
131
+ * defaults are in place, so a child never lands in a tree whose parent has not
132
+ * finished sizing itself.
133
+ */
134
+ protected adoptChildrenProp(props?: NodeConfig<any, P>): void;
135
+ /**
136
+ * Whether `child` may be adopted by this node.
137
+ *
138
+ * A node holds children of its own dimension; the places the trees meet are
139
+ * `Canvas3D`, which takes 2D and 3D, and `Canvas2D`, which takes 2D and
140
+ * audio. Both partition what they accept. Rejecting the mix here rather than
141
+ * letting it through is deliberate: a `Box3D` parented to a `Rect` would be
142
+ * silently skipped by both the layout walk and the 3D walk, and would simply
143
+ * never appear.
144
+ */
145
+ protected acceptsChild(child: Node): boolean;
146
+ /** Throw if `child` cannot go here: by its tree, by what this node takes, or by where the child says it goes. */
147
+ protected assertAcceptsChild(child: Node): void;
148
+ /** What this node takes, for the error when it refuses a child of its own tree. */
149
+ protected _childRule(): string;
150
+ /** Why this node cannot go inside `parent`, or `null`: only a node that names its parents refuses one. */
151
+ _parentRefusal(_parent: Node): string | null;
152
+ private _assets;
153
+ protected _parent: Node | null;
154
+ /**
155
+ * Whether this node is in a live scene tree. Gates measure/layout/render,
156
+ * asset declaration and every command — checked at the handful of places
157
+ * the framework dispatches from, not per method.
158
+ */
159
+ private _mounted;
160
+ /** See {@link _mounted}. */
161
+ get mounted(): boolean;
162
+ get parent(): Node | null;
163
+ get assets(): AssetCatalog;
164
+ /** Token→value map pushed down from ancestor providers, bound by {@link attach}. */
165
+ private _context;
166
+ /** True once {@link attach} has reached this node. */
167
+ private _contextBound;
168
+ /** Raw constructor props, retained so {@link provideContext} can see which keys were explicitly passed. Kept through {@link dispose} so a reused instance re-derives context on the next attach. */
169
+ protected _props?: NodeConfig<any, P>;
170
+ /** Read the nearest ancestor provider's value for `ctx` (or its default). */
171
+ useContext<T>(ctx: Context<T>): T;
172
+ /** Assigned in the constructor — see {@link NodeProps.id}. */
173
+ readonly id: string;
174
+ /**
175
+ * The slots behind this node's `property` fields. See {@link PropCells}.
176
+ *
177
+ * @internal — the authoring surface is the declared props themselves, plus
178
+ * `set()`/`to()`/`captureProps()`.
179
+ */
180
+ __cells?: PropCells;
181
+ protected _children: Node[];
182
+ /**
183
+ * Flatten a constructor's raw `children` prop into the `Node` instances it
184
+ * contains, without mutating or adding them — the same normalisation the
185
+ * constructor applies before adding them, exposed standalone so
186
+ * {@link applyDefaultSize} overrides can inspect children's own resolved
187
+ * `width`/`height` *before* they're attached (children are constructed,
188
+ * defaults and all, before being passed in as props).
189
+ */
190
+ protected static flattenChildrenProp(props: {
191
+ children?: unknown;
192
+ } | undefined): Node[];
193
+ /**
194
+ * Declare a prop on this node. Creates a {@link PropSlot}-backed accessor
195
+ * for `field`, applies an initial value (callback → binding; otherwise
196
+ * constant), and registers optional tween/mapper metadata used by `set()`
197
+ * and `to()`.
198
+ *
199
+ * Subsequent calls for the same field reuse the existing slot and act as
200
+ * a value assignment, so subclasses can override a parent's default by
201
+ * calling applyProp again without losing the slot or its bindings.
202
+ */
203
+ protected applyProp<Ext, Int = Ext>(field: string, initial: Ext | (() => Ext) | undefined, options?: PropOptions<Ext, Int>): void;
204
+ /** @internal Hot-path prop write (mapper- and binding-aware). Public-but-underscored like `_prepareStep` so reactive companions in this directory can call it; not part of the authoring surface. */
205
+ _writeProp(field: string, value: unknown): void;
206
+ get properties(): P;
207
+ /**
208
+ * This node's **class** name, for a message or a host's type column. Not an
209
+ * authored identity — those are {@link id} and {@link key}, and nothing in
210
+ * the document model is called a name any more. Nor is it the registry key a
211
+ * document writes in `NodeSpec.type`: a minifier is free to rename a class.
212
+ */
213
+ get className(): string;
214
+ set(props: {
215
+ [K in keyof P]?: P[K] | (() => P[K]);
216
+ }): void;
217
+ to<D extends Partial<P> = Partial<P>>(args: CommandArgs<D> & {
218
+ duration: number;
219
+ }): Command<P>;
220
+ /**
221
+ * Build a {@link Command} from a pure function of normalized time — an
222
+ * animation this node can be *evaluated* at, not only run through. The pair
223
+ * to {@link to}, for the built-in commands whose values at `t` are not a prop
224
+ * list, and what a component command's timeline lowers to.
225
+ *
226
+ * Snapshot whatever the animation starts from *outside* `at`: reading a prop
227
+ * inside it would re-read the value the command is itself writing.
228
+ */
229
+ protected command<Props = P>(at: (t: number) => Partial<Props>, duration?: number, easing?: EasingFunction): Command<Props>;
230
+ /**
231
+ * Resolve a single `to()` step into a flat {@link TweenStepper} — all the
232
+ * per-key setup (mapper, numeric-vs-custom routing) happens once here, then
233
+ * `advance(dt)` is allocation-free. Used by both a chain's iterator path and
234
+ * the batched `parallel` path.
235
+ *
236
+ * A subclass with positional sugar of its own (2D's `size` and anchors)
237
+ * expands `to` in place and then delegates here.
238
+ */
239
+ _prepareStep(to: Partial<P>, duration: number, easing?: EasingFunction): TweenStepper;
240
+ /** What a node constructed without `field` holds: its declared default, through the mapper. */
241
+ private _unsetValue;
242
+ /** @internal LIFO stack of save() snapshot layers. Underscore-internal so the prop companion can read it; not authoring surface. */
243
+ _stateStack: PropLayer[];
244
+ /**
245
+ * Push a snapshot of this node's current state onto its save stack.
246
+ *
247
+ * Every reactive prop (`x`, `y`, `scale`, `opacity`, `fill`, …) is captured,
248
+ * preserving reactive bindings — a prop bound to `() => other().x` is saved
249
+ * as the binding, not just its resolved value, so {@link restore} re-binds
250
+ * it rather than freezing the value. Calls stack: each `save()` pushes a new
251
+ * layer, and each {@link restore} pops the most recent one.
252
+ *
253
+ * @example
254
+ * node.save();
255
+ * node.moveTo({ data: { x: 200, y: 0 }, duration: 1 });
256
+ * node.restore({ duration: 1 }); // animate back to where it was saved
257
+ */
258
+ save(): void;
259
+ /**
260
+ * Pop the most recent {@link save} snapshot and roll this node back to it.
261
+ *
262
+ * Called with no `duration` (or `0`), every prop is reapplied instantly —
263
+ * plain values are set, reactive bindings are re-bound. Called with a
264
+ * positive `duration`, the numeric props (and any with a custom `tween`)
265
+ * animate toward their saved values over that many seconds; once the tween
266
+ * finishes the full snapshot is reapplied, which re-binds any reactive props
267
+ * and snaps non-tweenable props (e.g. strings) to their saved values.
268
+ *
269
+ * A no-op (returns immediately) if there is nothing on the stack.
270
+ */
271
+ restore(): void;
272
+ restore(args: CommandArgs<Record<string, never>> & {
273
+ duration: number;
274
+ }): Command<Record<string, never>>;
275
+ protected _time: MutableNodeTime;
276
+ /** This node's place on the scene clock. See {@link NodeTime}. */
277
+ get time(): NodeTime;
278
+ /**
279
+ * Advance **this node's** clock to `total` clip-seconds and sample its
280
+ * derived render state.
281
+ *
282
+ * Per-node, not per-subtree: {@link attach} already recurses, so a recursive
283
+ * advance here would re-advance every descendant once per ancestor.
284
+ *
285
+ * Sampling happens here, not at render: this runs on every advanced frame in
286
+ * every playback path (forward, scrub, precomp), whereas `render` runs only
287
+ * for displayed frames. Sampling per-frame is what makes velocity correct on
288
+ * the first frame after a scrub/rewind, where sampling only at render time
289
+ * read zero. The advance loop runs before `generator.next()` (so audio
290
+ * scheduling in generator bodies reads the right time), which means x/y here
291
+ * still hold the previous frame's value — velocity therefore trails the
292
+ * rendered position by one frame. That lag is constant and identical forward
293
+ * vs. scrub, and imperceptible for motion blur.
294
+ */
295
+ private _advanceOwnTime;
296
+ /**
297
+ * Sample this node's own derived render state for the current frame. Nothing
298
+ * to derive in the general case; {@link Node2D} samples its motion here.
299
+ *
300
+ * @internal The per-node half of `sampleTree` — a walk, not a node method.
301
+ */
302
+ _sample(): void;
303
+ /**
304
+ * Record this node's current position as the motion history's previous
305
+ * frame, stamped `at`, deriving no velocity.
306
+ *
307
+ * @internal The per-node half of `primeMotionTree`.
308
+ */
309
+ _primeMotion(at: number): void;
310
+ /**
311
+ * Put this subtree into the scene: mark it mounted, bind the asset catalog
312
+ * and inherited context, advance its clock to `scope.time`.
313
+ *
314
+ * Safe and cheap to call every frame — an unchanged catalog/context
315
+ * short-circuits, and {@link resolveContext} fires only on first attach.
316
+ *
317
+ * @internal Driven by `ClipInstance` per frame, and by {@link add} for a mid-frame subtree.
318
+ */
319
+ attach(scope: AttachScope): void;
320
+ /**
321
+ * Take this subtree out of the scene. Not a teardown — props/children/bindings
322
+ * stay, so it can be attached elsewhere (`reparent`). {@link dispose} tears down.
323
+ *
324
+ * @internal Driven by {@link remove}/{@link clear}.
325
+ */
326
+ detach(): void;
327
+ /** The scope this node was last attached with, for handing to a late child. */
328
+ private _currentScope;
329
+ /** Attach `child` if this node is itself attached; otherwise leave it for the walk. */
330
+ /** @internal Shared with `Node2D.addChildAt`, which splices rather than pushes. */
331
+ protected _attachChild(child: Node): void;
332
+ /**
333
+ * Apply inherited context **values** to this node, once, after it's linked
334
+ * into the tree and ancestor providers have resolved: a component's
335
+ * `inherit` entries. Runs exactly once per instance.
336
+ */
337
+ protected resolveContext(ctx: ContextMap): void;
338
+ /**
339
+ * The {@link ContextMap} handed to descendants: a component's `provide`
340
+ * adds its tokens. The base passes the parent's map through unchanged.
341
+ */
342
+ protected provideContext(parent: ContextMap): ContextMap;
343
+ /**
344
+ * Bind `node`'s asset catalog, context and clock without making it a child —
345
+ * for a node used purely as a pixel source (`Tex.surface`), laid out on
346
+ * demand rather than sitting in the tree.
347
+ */
348
+ protected attachDetached(node: Node): void;
349
+ /**
350
+ * Declare what this node draws from its props and inherited context alone —
351
+ * never `layoutBounds` or the clock. The runtime records what this reads and
352
+ * calls it again only when one of those props is written, so anything else it
353
+ * depends on is a change nobody will ask about.
354
+ */
355
+ declareAssets(assets: AssetScope): void;
356
+ get children(): Node[];
357
+ /**
358
+ * Every child, both dimensions, unfiltered — unlike {@link children}, which
359
+ * a {@link Node2D} filters to its own kind. Used where index has to match
360
+ * the authored tree (picking), since filtering would renumber it.
361
+ */
362
+ get _allChildren(): readonly Node[];
363
+ /**
364
+ * Add children — a node, an array, or a nested mix; falsy entries
365
+ * (`cond && node`) are dropped. A child of the other dimension throws —
366
+ * see {@link acceptsChild}.
367
+ */
368
+ add(child: NodeChildren): void;
369
+ /** Remove children — same shapes as {@link add}. Not a child of this one is a no-op. */
370
+ remove(child: NodeChildren): void;
371
+ /** Remove every child, detaching each (see {@link remove}). */
372
+ clear(): void;
373
+ /**
374
+ * Insert `child` at `index` among this node's children.
375
+ *
376
+ * On {@link Node} rather than {@link Node2D} because it is tree machinery —
377
+ * `ClipTimeline.syncPresence` reaches for it on whatever a spec's
378
+ * `parentId` names, which since audio joined the graph is not always a 2D
379
+ * node. `Node2D` overrides it for the animated insert, which measures the
380
+ * child off-tree and so needs a laid-out one.
381
+ */
382
+ addChildAt(args: CommandArgs<{
383
+ child: Node;
384
+ index: number;
385
+ }>): void | Command<Record<string, never>>;
386
+ /** @internal Shared with `Node2D.addChildAt`'s instant branch. */
387
+ protected _insertChildAt(child: Node, index: number): void;
388
+ /**
389
+ * @internal The pseudo-slot {@link children} and {@link parent} report to an
390
+ * observer. Allocated on first observation, so a tree nobody observes carries none.
391
+ */
392
+ _structureSlot(): PropSlot<null>;
393
+ /** @internal Report a child entering or leaving this node — its parent link changes with it. Call only while observed. */
394
+ _structureChanged(child: Node | null): void;
395
+ private _structure;
396
+ private _addChild;
397
+ private _addChildren;
398
+ private _removeChild;
399
+ dispose(): void;
400
+ }
401
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../src/components/trees/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAe,KAAK,OAAO,EAAE,KAAK,WAAW,EAAsB,MAAM,iBAAiB,CAAC;AAGlG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAmC,WAAW,EAAE,MAAM,mCAAmC,CAAC;AASjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAmC,KAAK,eAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACzH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAGjE,YAAY,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,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