@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
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAElC,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './attributes';\r\nexport * from './nodes';\r\nexport * from './project';\r\nexport * from './document';\r\nexport * from './render';\r\nexport * from './render3d';\r\nexport * from './runtime';\r\nexport * from './platform';\r\nexport * from './assets';\r\nexport * from './util'\r\nexport * from './tween';\r\nexport * from './props';\r\nexport * from './layout';\r\nexport * from './jsx/jsx-runtime';\r\n\r\nexport * from './renamed-scene-names';\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './attributes';\r\nexport * from './components/trees';\r\nexport * from './components/builtins/geometry/geometry';\r\nexport * from './components/builtins/geometry/composite';\r\nexport * from './components/builtins/layout/layout';\r\nexport * from './components/builtins/text/text';\r\nexport * from './components/builtins/providers/providers';\r\nexport * from './components/builtins/audio/audio';\r\nexport * from './components/builtins/media/media';\r\nexport * from './components/builtins/three/three';\r\nexport * from './components/builtins/three/canvas3d';\r\nexport * from './project';\r\nexport * from './document';\r\nexport * from './render';\r\nexport * from './render3d';\r\nexport * from './runtime';\r\nexport * from './platform';\r\nexport * from './assets';\r\nexport * from './util'\r\nexport * from './tween';\r\nexport * from './props';\r\nexport * from './layout';\r\n\r\nexport * from './renamed-scene-names';\r\n"]}
@@ -63,7 +63,7 @@ export interface FlowProps {
63
63
  }
64
64
  /**
65
65
  * What `flowOps` arranges by: the {@link FlowProps} vocabulary, every field
66
- * optional and defaulting as the prop does. A `ShapeNode` or `Canvas2D` is one
66
+ * optional and defaulting as the prop does. A shape's state or a `Canvas2D` is one
67
67
  * as it stands.
68
68
  */
69
69
  export interface FlowSettings {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/layout/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Alignment } from \"@/attributes/layout/alignment\";\r\nimport type { Insets } from \"@/attributes/layout/insets\";\r\nimport type { Size2D, SizeInput } from \"@/attributes/layout/size\";\r\nimport type { MeasureContext2D } from \"@/render/measure-context\";\r\nimport type { BoxBounds } from \"./bounds\";\r\nimport type { SizeConstraints } from \"./constraints\";\r\n\r\n/**\r\n * How a container arranges the items that take part in its layout:\r\n *\r\n * - `'freeform'` — items overlap, each aligned in the padded content box by\r\n * `align` and offset from there by its own `x`/`y`.\r\n * - `'horizontal'` — a run left-to-right.\r\n * - `'vertical'` — a run top-to-bottom.\r\n * - `'grid'` — N equal columns, rows sized to their content (or divided equally\r\n * when the container's height is bounded). Items place themselves with\r\n * `column`/`row` and span with `colSpan`/`rowSpan`; anything unplaced is\r\n * auto-flowed left-to-right.\r\n *\r\n * A run also answers `wrap` — \"and break onto a new line when you run out of\r\n * room\" — which is a property of the run rather than a fourth direction.\r\n */\r\nexport type FlowMode = \"horizontal\" | \"vertical\" | \"freeform\" | \"grid\";\r\n\r\n/** Spacing between items, or `\"auto\"` to spread the free space evenly between them. */\r\nexport type GapSize = number | \"auto\";\r\n\r\n/**\r\n * What a `flow` prop holds: a mode, or — mid-tween between two — both and how far\r\n * along. The blend lives in the value so that restoring the prop restores it.\r\n */\r\nexport type FlowResolved = FlowMode | { from: FlowMode; to: FlowMode; t: number };\r\n\r\n/** A container's author-facing layout props. */\r\nexport interface FlowProps {\r\n /**\r\n * Layout mode for children: a run (`horizontal` / `vertical`), overlapping\r\n * `freeform`, or a `grid` of N equal columns.\r\n */\r\n flow: FlowMode;\r\n /** Spacing between children along the layout's main axis. */\r\n gap: GapSize;\r\n /**\r\n * Break a `horizontal`/`vertical` run onto new lines once it runs out of\r\n * main-axis room. It needs a bounded main axis to break against, so an axis\r\n * set to `'hug'` stays one line.\r\n */\r\n wrap: boolean;\r\n /**\r\n * Spacing on the **cross** axis: between wrapped lines, and between a grid's\r\n * rows. Omitted, it follows `gap` — \"wrap this row\" almost never means \"and\r\n * stack the lines flush against each other\".\r\n */\r\n crossGap: number;\r\n /** Number of equal columns when `flow` is `'grid'`. At least 1. */\r\n columns: number;\r\n /**\r\n * Where children sit in the content box: a named position (`'center'`,\r\n * `'topLeft'`, …) or a per-axis `Vector2` (x: -1 left … +1 right, y: -1\r\n * bottom … +1 top).\r\n */\r\n align: Alignment;\r\n}\r\n\r\n/**\r\n * What `flowOps` arranges by: the {@link FlowProps} vocabulary, every field\r\n * optional and defaulting as the prop does. A `ShapeNode` or `Canvas2D` is one\r\n * as it stands.\r\n */\r\nexport interface FlowSettings {\r\n readonly flow?: FlowResolved;\r\n readonly gap?: GapSize;\r\n readonly wrap?: boolean;\r\n readonly crossGap?: number;\r\n readonly columns?: number;\r\n readonly align?: Alignment;\r\n /** Read by `flowOps.arrange` only; a node insets its own content box. */\r\n readonly padding?: Insets;\r\n}\r\n\r\n/** One thing a flow arranges — a `Node2D` as it stands, or a plain `{ width, height }`. */\r\nexport interface LayoutItem {\r\n readonly width: SizeInput;\r\n readonly height: SizeInput;\r\n /** Share of a run's free space among its `fill` items. Default 1. */\r\n readonly flex?: number;\r\n /** Fraction of a full gap this item opens on each side, `[0, 1]`. Default 1. */\r\n readonly gapScale?: number;\r\n /** 1-based grid column; with `row`, places the item explicitly. */\r\n readonly column?: number;\r\n readonly row?: number;\r\n readonly colSpan?: number;\r\n readonly rowSpan?: number;\r\n /**\r\n * The item's own size under `constraints`. Without one, a number is the size,\r\n * `'fill'` takes what is offered and `'hug'` is 0.\r\n */\r\n measure?(constraints: SizeConstraints, measurer?: MeasureContext2D): Partial<Size2D>;\r\n}\r\n\r\n/** The content box a flow measures in, and which of its axes hug their content. */\r\nexport interface FlowSpace {\r\n readonly width: number;\r\n readonly height: number;\r\n readonly hugWidth?: boolean;\r\n readonly hugHeight?: boolean;\r\n}\r\n\r\n/** One line of a `horizontal`/`vertical` run: items `[start, end)`. */\r\nexport interface FlowLine {\r\n readonly start: number;\r\n readonly end: number;\r\n /** The line's thickness — its deepest item — on the cross axis. */\r\n readonly cross: number;\r\n}\r\n\r\n/**\r\n * One measure pass: what `flowOps.place` needs to position the items, and the\r\n * extent a hugging container wraps.\r\n */\r\nexport interface FlowMeasure<I extends LayoutItem = LayoutItem> {\r\n readonly mode: FlowMode;\r\n readonly items: readonly I[];\r\n readonly sizes: readonly Size2D[];\r\n readonly hug: Size2D;\r\n /** The content box this was measured in — see `flowOps.reusable`. */\r\n readonly space: FlowSpace;\r\n /** Runs: the lines, and each item's clamped `gapScale` (all 1 when wrapped). */\r\n readonly lines?: readonly FlowLine[];\r\n readonly gapScales?: readonly number[];\r\n /** Grid: each item's cell, from the content box's top-left, y-down. */\r\n readonly cells?: readonly BoxBounds[];\r\n /** A blend between two modes: the measure of the mode being left, and how far along. */\r\n readonly from?: FlowMeasure<I>;\r\n readonly t?: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/layout/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Alignment } from \"@/attributes/layout/alignment\";\r\nimport type { Insets } from \"@/attributes/layout/insets\";\r\nimport type { Size2D, SizeInput } from \"@/attributes/layout/size\";\r\nimport type { MeasureContext2D } from \"@/render/measure-context\";\r\nimport type { BoxBounds } from \"./bounds\";\r\nimport type { SizeConstraints } from \"./constraints\";\r\n\r\n/**\r\n * How a container arranges the items that take part in its layout:\r\n *\r\n * - `'freeform'` — items overlap, each aligned in the padded content box by\r\n * `align` and offset from there by its own `x`/`y`.\r\n * - `'horizontal'` — a run left-to-right.\r\n * - `'vertical'` — a run top-to-bottom.\r\n * - `'grid'` — N equal columns, rows sized to their content (or divided equally\r\n * when the container's height is bounded). Items place themselves with\r\n * `column`/`row` and span with `colSpan`/`rowSpan`; anything unplaced is\r\n * auto-flowed left-to-right.\r\n *\r\n * A run also answers `wrap` — \"and break onto a new line when you run out of\r\n * room\" — which is a property of the run rather than a fourth direction.\r\n */\r\nexport type FlowMode = \"horizontal\" | \"vertical\" | \"freeform\" | \"grid\";\r\n\r\n/** Spacing between items, or `\"auto\"` to spread the free space evenly between them. */\r\nexport type GapSize = number | \"auto\";\r\n\r\n/**\r\n * What a `flow` prop holds: a mode, or — mid-tween between two — both and how far\r\n * along. The blend lives in the value so that restoring the prop restores it.\r\n */\r\nexport type FlowResolved = FlowMode | { from: FlowMode; to: FlowMode; t: number };\r\n\r\n/** A container's author-facing layout props. */\r\nexport interface FlowProps {\r\n /**\r\n * Layout mode for children: a run (`horizontal` / `vertical`), overlapping\r\n * `freeform`, or a `grid` of N equal columns.\r\n */\r\n flow: FlowMode;\r\n /** Spacing between children along the layout's main axis. */\r\n gap: GapSize;\r\n /**\r\n * Break a `horizontal`/`vertical` run onto new lines once it runs out of\r\n * main-axis room. It needs a bounded main axis to break against, so an axis\r\n * set to `'hug'` stays one line.\r\n */\r\n wrap: boolean;\r\n /**\r\n * Spacing on the **cross** axis: between wrapped lines, and between a grid's\r\n * rows. Omitted, it follows `gap` — \"wrap this row\" almost never means \"and\r\n * stack the lines flush against each other\".\r\n */\r\n crossGap: number;\r\n /** Number of equal columns when `flow` is `'grid'`. At least 1. */\r\n columns: number;\r\n /**\r\n * Where children sit in the content box: a named position (`'center'`,\r\n * `'topLeft'`, …) or a per-axis `Vector2` (x: -1 left … +1 right, y: -1\r\n * bottom … +1 top).\r\n */\r\n align: Alignment;\r\n}\r\n\r\n/**\r\n * What `flowOps` arranges by: the {@link FlowProps} vocabulary, every field\r\n * optional and defaulting as the prop does. A shape's state or a `Canvas2D` is one\r\n * as it stands.\r\n */\r\nexport interface FlowSettings {\r\n readonly flow?: FlowResolved;\r\n readonly gap?: GapSize;\r\n readonly wrap?: boolean;\r\n readonly crossGap?: number;\r\n readonly columns?: number;\r\n readonly align?: Alignment;\r\n /** Read by `flowOps.arrange` only; a node insets its own content box. */\r\n readonly padding?: Insets;\r\n}\r\n\r\n/** One thing a flow arranges — a `Node2D` as it stands, or a plain `{ width, height }`. */\r\nexport interface LayoutItem {\r\n readonly width: SizeInput;\r\n readonly height: SizeInput;\r\n /** Share of a run's free space among its `fill` items. Default 1. */\r\n readonly flex?: number;\r\n /** Fraction of a full gap this item opens on each side, `[0, 1]`. Default 1. */\r\n readonly gapScale?: number;\r\n /** 1-based grid column; with `row`, places the item explicitly. */\r\n readonly column?: number;\r\n readonly row?: number;\r\n readonly colSpan?: number;\r\n readonly rowSpan?: number;\r\n /**\r\n * The item's own size under `constraints`. Without one, a number is the size,\r\n * `'fill'` takes what is offered and `'hug'` is 0.\r\n */\r\n measure?(constraints: SizeConstraints, measurer?: MeasureContext2D): Partial<Size2D>;\r\n}\r\n\r\n/** The content box a flow measures in, and which of its axes hug their content. */\r\nexport interface FlowSpace {\r\n readonly width: number;\r\n readonly height: number;\r\n readonly hugWidth?: boolean;\r\n readonly hugHeight?: boolean;\r\n}\r\n\r\n/** One line of a `horizontal`/`vertical` run: items `[start, end)`. */\r\nexport interface FlowLine {\r\n readonly start: number;\r\n readonly end: number;\r\n /** The line's thickness — its deepest item — on the cross axis. */\r\n readonly cross: number;\r\n}\r\n\r\n/**\r\n * One measure pass: what `flowOps.place` needs to position the items, and the\r\n * extent a hugging container wraps.\r\n */\r\nexport interface FlowMeasure<I extends LayoutItem = LayoutItem> {\r\n readonly mode: FlowMode;\r\n readonly items: readonly I[];\r\n readonly sizes: readonly Size2D[];\r\n readonly hug: Size2D;\r\n /** The content box this was measured in — see `flowOps.reusable`. */\r\n readonly space: FlowSpace;\r\n /** Runs: the lines, and each item's clamped `gapScale` (all 1 when wrapped). */\r\n readonly lines?: readonly FlowLine[];\r\n readonly gapScales?: readonly number[];\r\n /** Grid: each item's cell, from the content box's top-left, y-down. */\r\n readonly cells?: readonly BoxBounds[];\r\n /** A blend between two modes: the measure of the mode being left, and how far along. */\r\n readonly from?: FlowMeasure<I>;\r\n readonly t?: number;\r\n}\r\n"]}
@@ -1,4 +1,4 @@
1
1
  export { NodeAudio, busPathOf, busPathTo, findBusById, structuralPathOf, type NodeAudioProps } from "./node-audio.js";
2
- export { AudioBus, type AudioBusProps } from "./audio-bus.js";
3
- export { SoundNode, type SoundNodeProps } from "./sound-node.js";
2
+ export type { AudioBusProps } from "./audio-bus.js";
3
+ export type { SoundNodeProps } from "./sound-node.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nodes/audio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nodes/audio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnH,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -1,4 +1,2 @@
1
1
  export { NodeAudio, busPathOf, busPathTo, findBusById, structuralPathOf } from "./node-audio.js";
2
- export { AudioBus } from "./audio-bus.js";
3
- export { SoundNode } from "./sound-node.js";
4
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nodes/audio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAuB,MAAM,cAAc,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAsB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAuB,MAAM,cAAc,CAAC","sourcesContent":["export { NodeAudio, busPathOf, busPathTo, findBusById, structuralPathOf, type NodeAudioProps } from \"./node-audio\";\r\nexport { AudioBus, type AudioBusProps } from \"./audio-bus\";\r\nexport { SoundNode, type SoundNodeProps } from \"./sound-node\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nodes/audio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAuB,MAAM,cAAc,CAAC","sourcesContent":["export { NodeAudio, busPathOf, busPathTo, findBusById, structuralPathOf, type NodeAudioProps } from \"./node-audio\";\r\n// The audio built-ins are components (`component/builtins/audio`).\r\nexport type { AudioBusProps } from \"./audio-bus\";\r\nexport type { SoundNodeProps } from \"./sound-node\";\r\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { AudioScope } from "../../attributes/audio/schedule.js";
2
- import type { Node } from "../../nodes/node/node.js";
2
+ import type { Node, NodeDimension } from "../../nodes/node/node.js";
3
3
  import { NodeAudio, type NodeAudioProps } from "./node-audio.js";
4
4
  export interface SoundNodeProps extends NodeAudioProps {
5
5
  /** Path/URL of the audio (or video) asset. Must exist in the asset manifest. */
@@ -30,6 +30,7 @@ export declare class SoundNode extends NodeAudio<SoundNodeProps> {
30
30
  declareAudio(audio: AudioScope): void;
31
31
  /** A leaf: nothing routes into a clip. */
32
32
  protected acceptsChild(_child: Node): boolean;
33
+ get _childTrees(): readonly NodeDimension[];
33
34
  /**
34
35
  * This clip's own filters, with its level and speed folded in: a `Curve`
35
36
  * level has nowhere else to go, since `AudioRequest.volume` is a scalar, and a
@@ -1 +1 @@
1
- {"version":3,"file":"sound-node.d.ts","sourceRoot":"","sources":["../../../src/nodes/audio/sound-node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;A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AAO,CAAC;IACd,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,qBAAa,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACE,SAAS,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IAEvC,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAY9C,0CAA0C;cACvB,YAAY,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO;IAItD,IAAa,WAAW,IAAI,SAAS,aAAa,EAAE,CAEnD;IAED;;;;OAIG;IACH,OAAO,CAAC,YAAY;CAUvB"}
@@ -33,6 +33,9 @@ export class SoundNode extends NodeAudio {
33
33
  acceptsChild(_child) {
34
34
  return false;
35
35
  }
36
+ get _childTrees() {
37
+ return [];
38
+ }
36
39
  /**
37
40
  * This clip's own filters, with its level and speed folded in: a `Curve`
38
41
  * level has nowhere else to go, since `AudioRequest.volume` is a scalar, and a
@@ -1 +1 @@
1
- {"version":3,"file":"sound-node.js","sourceRoot":"","sources":["../../../src/nodes/audio/sound-node.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAc,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAuB,MAAM,cAAc,CAAC;AAezE;;;;;;;GAOG;AACH,MAAM,OAAO,SAAU,SAAQ,SAAyB;IAO3C,YAAY,CAAC,KAAiB;QACnC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,KAAK,CAAC,IAAI,CAAC;YACP,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IA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filters/chain\";\r\nimport type { AudioFilterItem } from \"@/attributes/audio/filters/union\";\r\nimport { staticValue, type Param } from \"@/attributes/audio/filters/curve\";\r\nimport type { AudioScope } from \"@/attributes/audio/schedule\";\r\nimport type { Node } from \"@/nodes/node/node\";\r\nimport { busPathOf, NodeAudio, type NodeAudioProps } from \"./node-audio\";\r\n\r\nexport interface SoundNodeProps extends NodeAudioProps {\r\n /** Path/URL of the audio (or video) asset. Must exist in the asset manifest. */\r\n src: string;\r\n /** In-point inside the source file, in seconds. Defaults to 0. */\r\n trimStart: number;\r\n /** Out-point inside the source file. Defaults to the source's full length. */\r\n trimEnd: number | undefined;\r\n /** Repeat the trimmed clip until it is removed. */\r\n loop: boolean;\r\n /** Playback-rate multiplier. 2 plays twice as fast and occupies half the clip time. */\r\n speed: number;\r\n}\r\n\r\n/**\r\n * A leaf in the audio tree: one clip of one file.\r\n *\r\n * **When it plays is its presence span.** Its row's `startAt` starts it and its\r\n * `endAt` cuts it — no `startAt` prop, no `play` command, nothing to keep in sync\r\n * with the row a timeline draws. `trimStart`/`trimEnd` are the other half:\r\n * presence says *when on the timeline*, the trim says *what part of the file*.\r\n */\r\nexport class SoundNode extends NodeAudio<SoundNodeProps> {\r\n @property() declare src: string;\r\n @property({ default: 0 }) declare trimStart: number;\r\n @property({ default: undefined }) declare trimEnd: number | undefined;\r\n @property({ default: false }) declare loop: boolean;\r\n @property({ default: 1 }) declare speed: number;\r\n\r\n override declareAudio(audio: AudioScope): void {\r\n if (!this.src) return;\r\n audio.clip({\r\n src: this.src,\r\n trimStart: this.trimStart,\r\n trimEnd: this.trimEnd,\r\n loop: this.loop,\r\n filters: this._filterChain(),\r\n bus: busPathOf(this, audio),\r\n });\r\n }\r\n\r\n /** A leaf: nothing routes into a clip. */\r\n protected override acceptsChild(_child: Node): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * This clip's own filters, with its level and speed folded in: a `Curve`\r\n * level has nowhere else to go, since `AudioRequest.volume` is a scalar, and a\r\n * speed filter is what `clipDurationFor` integrates to find the clip's length.\r\n */\r\n private _filterChain(): AudioFilterItem[] {\r\n const own = this.filters as unknown as AudioFilterItem[];\r\n const chain: AudioFilterItem[] = [...own];\r\n const volume = this.volume as Param;\r\n if (staticValue(volume, 1) !== 1 || typeof volume !== \"number\") {\r\n chain.push(...AudioFilters.gain(volume));\r\n }\r\n if (this.speed !== 1) chain.push(...AudioFilters.speed(this.speed));\r\n return chain;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"sound-node.js","sourceRoot":"","sources":["../../../src/nodes/audio/sound-node.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAc,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAuB,MAAM,cAAc,CAAC;AAezE;;;;;;;GAOG;AACH,MAAM,OAAO,SAAU,SAAQ,SAAyB;IAO3C,YAAY,CAAC,KAAiB;QACnC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,KAAK,CAAC,IAAI,CAAC;YACP,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE;YAC5B,GAAG,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC;SAC9B,CAAC,CAAC;IACP,CAAC;IAED,0CAA0C;IACvB,YAAY,CAAC,MAAY;QACxC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAa,WAAW;QACpB,OAAO,EAAE,CAAC;IACd,CAAC;IAED;;;;OAIG;IACK,YAAY;QAChB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAuC,CAAC;QACzD,MAAM,KAAK,GAAsB,CAAC,GAAG,GAAG,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAe,CAAC;QACpC,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC7D,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7C,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA1CuB;IAAnB,QAAQ,EAAE;sCAAqB;AACE;IAAjC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;4CAA2B;AACV;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;0CAAqC;AAChC;IAArC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;uCAAuB;AAClB;IAAjC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;wCAAuB","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\r\nimport { AudioFilters } from \"@/attributes/audio/filters/chain\";\r\nimport type { AudioFilterItem } from \"@/attributes/audio/filters/union\";\r\nimport { staticValue, type Param } from \"@/attributes/audio/filters/curve\";\r\nimport type { AudioScope } from \"@/attributes/audio/schedule\";\r\nimport type { Node, NodeDimension } from \"@/nodes/node/node\";\r\nimport { busPathOf, NodeAudio, type NodeAudioProps } from \"./node-audio\";\r\n\r\nexport interface SoundNodeProps extends NodeAudioProps {\r\n /** Path/URL of the audio (or video) asset. Must exist in the asset manifest. */\r\n src: string;\r\n /** In-point inside the source file, in seconds. Defaults to 0. */\r\n trimStart: number;\r\n /** Out-point inside the source file. Defaults to the source's full length. */\r\n trimEnd: number | undefined;\r\n /** Repeat the trimmed clip until it is removed. */\r\n loop: boolean;\r\n /** Playback-rate multiplier. 2 plays twice as fast and occupies half the clip time. */\r\n speed: number;\r\n}\r\n\r\n/**\r\n * A leaf in the audio tree: one clip of one file.\r\n *\r\n * **When it plays is its presence span.** Its row's `startAt` starts it and its\r\n * `endAt` cuts it — no `startAt` prop, no `play` command, nothing to keep in sync\r\n * with the row a timeline draws. `trimStart`/`trimEnd` are the other half:\r\n * presence says *when on the timeline*, the trim says *what part of the file*.\r\n */\r\nexport class SoundNode extends NodeAudio<SoundNodeProps> {\r\n @property() declare src: string;\r\n @property({ default: 0 }) declare trimStart: number;\r\n @property({ default: undefined }) declare trimEnd: number | undefined;\r\n @property({ default: false }) declare loop: boolean;\r\n @property({ default: 1 }) declare speed: number;\r\n\r\n override declareAudio(audio: AudioScope): void {\r\n if (!this.src) return;\r\n audio.clip({\r\n src: this.src,\r\n trimStart: this.trimStart,\r\n trimEnd: this.trimEnd,\r\n loop: this.loop,\r\n filters: this._filterChain(),\r\n bus: busPathOf(this, audio),\r\n });\r\n }\r\n\r\n /** A leaf: nothing routes into a clip. */\r\n protected override acceptsChild(_child: Node): boolean {\r\n return false;\r\n }\r\n\r\n override get _childTrees(): readonly NodeDimension[] {\r\n return [];\r\n }\r\n\r\n /**\r\n * This clip's own filters, with its level and speed folded in: a `Curve`\r\n * level has nowhere else to go, since `AudioRequest.volume` is a scalar, and a\r\n * speed filter is what `clipDurationFor` integrates to find the clip's length.\r\n */\r\n private _filterChain(): AudioFilterItem[] {\r\n const own = this.filters as unknown as AudioFilterItem[];\r\n const chain: AudioFilterItem[] = [...own];\r\n const volume = this.volume as Param;\r\n if (staticValue(volume, 1) !== 1 || typeof volume !== \"number\") {\r\n chain.push(...AudioFilters.gain(volume));\r\n }\r\n if (this.speed !== 1) chain.push(...AudioFilters.speed(this.speed));\r\n return chain;\r\n }\r\n}\r\n"]}
@@ -6,36 +6,48 @@ export type { NodeTime } from "./node/node-time.js";
6
6
  export { applyEditorStates } from "./node/node-editor-state.js";
7
7
  export type { NodeEditorState, NodeEditorStates } from "./node/node-editor-state.js";
8
8
  export * from "./root/canvas2d-node.js";
9
- export * from "./layout/camera-node.js";
10
- export * from "./layout/orbit-camera-node.js";
11
- export * from "./geometry/boolean-node.js";
12
- export * from "./geometry/mask-node.js";
13
- export * from "./root/provider-node.js";
14
- export * from "./root/theme-provider-node.js";
15
- export * from "./text/default-text-style-node.js";
9
+ export type { CameraProps } from "./layout/camera-node.js";
10
+ export type { OrbitCameraProps } from "./layout/orbit-camera-node.js";
11
+ export type { BooleanGroupProps } from "./geometry/boolean-node.js";
12
+ export type { MaskGroupProps } from "./geometry/mask-node.js";
13
+ export type { ProviderProps } from "./root/provider-node.js";
14
+ export type { ThemeProviderProps } from "./root/theme-provider-node.js";
15
+ export { applyTextDefaults } from "./text/default-text-style-node.js";
16
+ export type { DefaultTextStyleProps } from "./text/default-text-style-node.js";
16
17
  export * from "./geometry/shape-node.js";
17
- export * from "./geometry/rect-node.js";
18
- export * from "./geometry/ellipse-node.js";
19
- export * from "./geometry/path-node.js";
20
- export * from "./geometry/polygon-node.js";
21
- export * from "./geometry/polygram-node.js";
22
- export * from "./geometry/bounds-shape-node.js";
23
- export * from "./geometry/box-path-node.js";
18
+ export { Rect as RectBase } from "./geometry/rect-node.js";
19
+ export type { RectProps, FlexSize, FlowMode, GapSize } from "./geometry/rect-node.js";
20
+ export { Ellipse as EllipseBase } from "./geometry/ellipse-node.js";
21
+ export type { EllipseProps } from "./geometry/ellipse-node.js";
22
+ export { Path as PathBase } from "./geometry/path-node.js";
23
+ export type { PathProps } from "./geometry/path-node.js";
24
+ export { Polygon as PolygonBase } from "./geometry/polygon-node.js";
25
+ export type { PolygonProps } from "./geometry/polygon-node.js";
26
+ export { Polygram as PolygramBase } from "./geometry/polygram-node.js";
27
+ export type { PolygramProps } from "./geometry/polygram-node.js";
28
+ export { BoundsShape } from "./geometry/bounds-shape-node.js";
29
+ export type { BoundsShapeProps, StarProps } from "./geometry/bounds-shape-node.js";
30
+ export { PathShape as PathShapeBase } from "./geometry/box-path-node.js";
31
+ export type { PathShapeProps } from "./geometry/box-path-node.js";
24
32
  export * from "./text/text-base.js";
25
- export * from "./text/richtext-node.js";
26
- export * from "./text/text-node.js";
27
- export * from "./text/number-node.js";
33
+ export type { RichTextProps } from "./text/richtext-node.js";
34
+ export type { TextProps } from "./text/text-node.js";
35
+ export type { NumberFormat, NumberProps } from "./text/number-node.js";
28
36
  export * from "./text/text-selection.js";
29
- export * from "./layout/rotated-box.js";
30
- export * from "./media/video-node.js";
37
+ export type { RotatedBoxProps } from "./layout/rotated-box.js";
38
+ export { Video as VideoBase } from "./media/video-node.js";
39
+ export type { VideoProps, VideoSegment } from "./media/video-node.js";
31
40
  export * from "./audio/index.js";
32
41
  export * from "./three/node3d.js";
33
- export * from "./three/group3d.js";
34
- export * from "./three/mesh3d.js";
35
- export * from "./three/geometry-nodes.js";
36
- export * from "./three/drawable-nodes.js";
37
- export * from "./three/light-nodes.js";
38
- export * from "./three/camera-nodes.js";
39
- export * from "./three/environment-nodes.js";
40
- export * from "./three/canvas3d-node.js";
42
+ export type { Group3DProps } from "./three/group3d.js";
43
+ export { Mesh3D as Mesh3DBase } from "./three/mesh3d.js";
44
+ export type { Material3DProps, Mesh3DProps } from "./three/mesh3d.js";
45
+ export type { Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps, Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps, Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps } from "./three/geometry-nodes.js";
46
+ export { ModelView3D } from "./three/drawable-nodes.js";
47
+ export type { Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps, ModelView3DProps } from "./three/drawable-nodes.js";
48
+ export type { AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps, PointLight3DProps, SpotLight3DProps, AreaLight3DProps } from "./three/light-nodes.js";
49
+ export type { Camera3DProps } from "./three/camera-nodes.js";
50
+ export type { Fog3DProps, Environment3DProps } from "./three/environment-nodes.js";
51
+ export { Canvas3D as Canvas3DBase } from "./three/canvas3d-node.js";
52
+ export type { Canvas3DProps } from "./three/canvas3d-node.js";
41
53
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAGA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAClF,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAG/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,sBAAsB,CAAC;AAGrC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AY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC9P,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1I,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvK,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
@@ -8,42 +8,28 @@ export * from "./2d/paint-node.js";
8
8
  /** @internal */ export { primeMotionTree, sampleTree } from "./node/node-walk.js";
9
9
  export { applyEditorStates } from "./node/node-editor-state.js";
10
10
  export * from "./root/canvas2d-node.js";
11
- export * from "./layout/camera-node.js";
12
- export * from "./layout/orbit-camera-node.js";
13
- export * from "./geometry/boolean-node.js";
14
- export * from "./geometry/mask-node.js";
15
- export * from "./root/provider-node.js";
16
- export * from "./root/theme-provider-node.js";
17
- export * from "./text/default-text-style-node.js";
18
- // Geometry
11
+ export { applyTextDefaults } from "./text/default-text-style-node.js";
12
+ // Geometry. The built-ins themselves are components (`component/builtins/geometry`);
13
+ // each class stays reachable as `XBase` while something still extends it.
19
14
  export * from "./geometry/shape-node.js";
20
- export * from "./geometry/rect-node.js";
21
- export * from "./geometry/ellipse-node.js";
22
- export * from "./geometry/path-node.js";
23
- export * from "./geometry/polygon-node.js";
24
- export * from "./geometry/polygram-node.js";
25
- export * from "./geometry/bounds-shape-node.js";
26
- export * from "./geometry/box-path-node.js";
15
+ export { Rect as RectBase } from "./geometry/rect-node.js";
16
+ export { Ellipse as EllipseBase } from "./geometry/ellipse-node.js";
17
+ export { Path as PathBase } from "./geometry/path-node.js";
18
+ export { Polygon as PolygonBase } from "./geometry/polygon-node.js";
19
+ export { Polygram as PolygramBase } from "./geometry/polygram-node.js";
20
+ export { BoundsShape } from "./geometry/bounds-shape-node.js";
21
+ export { PathShape as PathShapeBase } from "./geometry/box-path-node.js";
27
22
  // The glyph tier `Text` and `NumberNode` share — see `text/text-base.ts`.
28
23
  export * from "./text/text-base.js";
29
- export * from "./text/richtext-node.js";
30
- export * from "./text/text-node.js";
31
- export * from "./text/number-node.js";
32
24
  export * from "./text/text-selection.js";
33
- // Layout
34
- export * from "./layout/rotated-box.js";
35
- // Media
36
- export * from "./media/video-node.js";
25
+ // Media. `Video` is a component (`component/builtins/media`).
26
+ export { Video as VideoBase } from "./media/video-node.js";
37
27
  // Audio — the third tree: a bus groups, a sound plays.
38
28
  export * from "./audio/index.js";
39
29
  // 3D
40
30
  export * from "./three/node3d.js";
41
- export * from "./three/group3d.js";
42
- export * from "./three/mesh3d.js";
43
- export * from "./three/geometry-nodes.js";
44
- export * from "./three/drawable-nodes.js";
45
- export * from "./three/light-nodes.js";
46
- export * from "./three/camera-nodes.js";
47
- export * from "./three/environment-nodes.js";
48
- export * from "./three/canvas3d-node.js";
31
+ export { Mesh3D as Mesh3DBase } from "./three/mesh3d.js";
32
+ export { ModelView3D } from "./three/drawable-nodes.js";
33
+ // `Canvas3D` is a component (`component/builtins/canvas3d`); the class stays while a kit extends it.
34
+ export { Canvas3D as Canvas3DBase } from "./three/canvas3d-node.js";
49
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,qEAAqE;AACrE,cAAc,iBAAiB,CAAC;AAEhC,6EAA6E;AAC7E,+CAA+C;AAC/C,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAE/C,WAAW;AACX,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,0EAA0E;AAC1E,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAEtC,SAAS;AACT,cAAc,sBAAsB,CAAC;AAErC,QAAQ;AACR,cAAc,oBAAoB,CAAC;AAEnC,uDAAuD;AACvD,cAAc,SAAS,CAAC;AAExB,KAAK;AACL,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC","sourcesContent":["\r\n\r\n// The two halves of the tree: the dimension-agnostic base, and its 2D side.\r\nexport * from \"./node/node\";\r\nexport * from \"./2d/node2d\";\r\n// The paint + child-layout tier the shapes and the text nodes share.\r\nexport * from \"./2d/paint-node\";\r\nexport type { NodeTime } from \"./node/node-time\";\r\n// The per-frame subtree traversals the runtime drives. Free functions rather\r\n// than node methods — see the module docblock.\r\n/** @internal */ export { primeMotionTree, sampleTree } from \"./node/node-walk\";\r\nexport { applyEditorStates } from \"./node/node-editor-state\";\r\n\r\nexport type { NodeEditorState, NodeEditorStates } from \"./node/node-editor-state\";\r\nexport * from \"./root/canvas2d-node\";\r\nexport * from \"./layout/camera-node\";\r\nexport * from \"./layout/orbit-camera-node\";\r\nexport * from \"./geometry/boolean-node\";\r\nexport * from \"./geometry/mask-node\";\r\nexport * from \"./root/provider-node\";\r\nexport * from \"./root/theme-provider-node\";\r\nexport * from \"./text/default-text-style-node\";\r\n\r\n// Geometry\r\nexport * from \"./geometry/shape-node\";\r\nexport * from \"./geometry/rect-node\";\r\nexport * from \"./geometry/ellipse-node\";\r\nexport * from \"./geometry/path-node\";\r\nexport * from \"./geometry/polygon-node\";\r\nexport * from \"./geometry/polygram-node\";\r\nexport * from \"./geometry/bounds-shape-node\";\r\nexport * from \"./geometry/box-path-node\";\r\n// The glyph tier `Text` and `NumberNode` share — see `text/text-base.ts`.\r\nexport * from \"./text/text-base\";\r\nexport * from \"./text/richtext-node\";\r\nexport * from \"./text/text-node\";\r\nexport * from \"./text/number-node\";\r\nexport * from \"./text/text-selection\";\r\n\r\n// Layout\r\nexport * from \"./layout/rotated-box\";\r\n\r\n// Media\r\nexport * from \"./media/video-node\";\r\n\r\n// Audio — the third tree: a bus groups, a sound plays.\r\nexport * from \"./audio\";\r\n\r\n// 3D\r\nexport * from \"./three/node3d\";\r\nexport * from \"./three/group3d\";\r\nexport * from \"./three/mesh3d\";\r\nexport * from \"./three/geometry-nodes\";\r\nexport * from \"./three/drawable-nodes\";\r\nexport * from \"./three/light-nodes\";\r\nexport * from \"./three/camera-nodes\";\r\nexport * from \"./three/environment-nodes\";\r\nexport * from \"./three/canvas3d-node\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,qEAAqE;AACrE,cAAc,iBAAiB,CAAC;AAEhC,6EAA6E;AAC7E,+CAA+C;AAC/C,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,cAAc,sBAAsB,CAAC;AAOrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,qFAAqF;AACrF,0EAA0E;AAC1E,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEtE,0EAA0E;AAC1E,cAAc,kBAAkB,CAAC;AAKjC,cAAc,uBAAuB,CAAC;AAKtC,8DAA8D;AAC9D,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGxD,uDAAuD;AACvD,cAAc,SAAS,CAAC;AAExB,KAAK;AACL,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAKrD,qGAAqG;AACrG,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["\r\n\r\n// The two halves of the tree: the dimension-agnostic base, and its 2D side.\r\nexport * from \"./node/node\";\r\nexport * from \"./2d/node2d\";\r\n// The paint + child-layout tier the shapes and the text nodes share.\r\nexport * from \"./2d/paint-node\";\r\nexport type { NodeTime } from \"./node/node-time\";\r\n// The per-frame subtree traversals the runtime drives. Free functions rather\r\n// than node methods — see the module docblock.\r\n/** @internal */ export { primeMotionTree, sampleTree } from \"./node/node-walk\";\r\nexport { applyEditorStates } from \"./node/node-editor-state\";\r\n\r\nexport type { NodeEditorState, NodeEditorStates } from \"./node/node-editor-state\";\r\nexport * from \"./root/canvas2d-node\";\r\nexport type { CameraProps } from \"./layout/camera-node\";\r\nexport type { OrbitCameraProps } from \"./layout/orbit-camera-node\";\r\nexport type { BooleanGroupProps } from \"./geometry/boolean-node\";\r\nexport type { MaskGroupProps } from \"./geometry/mask-node\";\r\nexport type { ProviderProps } from \"./root/provider-node\";\r\nexport type { ThemeProviderProps } from \"./root/theme-provider-node\";\r\nexport { applyTextDefaults } from \"./text/default-text-style-node\";\r\nexport type { DefaultTextStyleProps } from \"./text/default-text-style-node\";\r\n\r\n// Geometry. The built-ins themselves are components (`component/builtins/geometry`);\r\n// each class stays reachable as `XBase` while something still extends it.\r\nexport * from \"./geometry/shape-node\";\r\nexport { Rect as RectBase } from \"./geometry/rect-node\";\r\nexport type { RectProps, FlexSize, FlowMode, GapSize } from \"./geometry/rect-node\";\r\nexport { Ellipse as EllipseBase } from \"./geometry/ellipse-node\";\r\nexport type { EllipseProps } from \"./geometry/ellipse-node\";\r\nexport { Path as PathBase } from \"./geometry/path-node\";\r\nexport type { PathProps } from \"./geometry/path-node\";\r\nexport { Polygon as PolygonBase } from \"./geometry/polygon-node\";\r\nexport type { PolygonProps } from \"./geometry/polygon-node\";\r\nexport { Polygram as PolygramBase } from \"./geometry/polygram-node\";\r\nexport type { PolygramProps } from \"./geometry/polygram-node\";\r\nexport { BoundsShape } from \"./geometry/bounds-shape-node\";\r\nexport type { BoundsShapeProps, StarProps } from \"./geometry/bounds-shape-node\";\r\nexport { PathShape as PathShapeBase } from \"./geometry/box-path-node\";\r\nexport type { PathShapeProps } from \"./geometry/box-path-node\";\r\n// The glyph tier `Text` and `NumberNode` share — see `text/text-base.ts`.\r\nexport * from \"./text/text-base\";\r\n// The text built-ins are components (`component/builtins/text`); `TextBase` stays while a host maps it.\r\nexport type { RichTextProps } from \"./text/richtext-node\";\r\nexport type { TextProps } from \"./text/text-node\";\r\nexport type { NumberFormat, NumberProps } from \"./text/number-node\";\r\nexport * from \"./text/text-selection\";\r\n\r\n// Layout\r\nexport type { RotatedBoxProps } from \"./layout/rotated-box\";\r\n\r\n// Media. `Video` is a component (`component/builtins/media`).\r\nexport { Video as VideoBase } from \"./media/video-node\";\r\nexport type { VideoProps, VideoSegment } from \"./media/video-node\";\r\n\r\n// Audio — the third tree: a bus groups, a sound plays.\r\nexport * from \"./audio\";\r\n\r\n// 3D\r\nexport * from \"./three/node3d\";\r\n// The 3D tree is components (`component/builtins/three`); `Mesh3DBase` stays while a kit extends it.\r\nexport type { Group3DProps } from \"./three/group3d\";\r\nexport { Mesh3D as Mesh3DBase } from \"./three/mesh3d\";\r\nexport type { Material3DProps, Mesh3DProps } from \"./three/mesh3d\";\r\nexport type { Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps, Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps, Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps } from \"./three/geometry-nodes\";\r\nexport { ModelView3D } from \"./three/drawable-nodes\";\r\nexport type { Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps, ModelView3DProps } from \"./three/drawable-nodes\";\r\nexport type { AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps, PointLight3DProps, SpotLight3DProps, AreaLight3DProps } from \"./three/light-nodes\";\r\nexport type { Camera3DProps } from \"./three/camera-nodes\";\r\nexport type { Fog3DProps, Environment3DProps } from \"./three/environment-nodes\";\r\n// `Canvas3D` is a component (`component/builtins/canvas3d`); the class stays while a kit extends it.\r\nexport { Canvas3D as Canvas3DBase } from \"./three/canvas3d-node\";\r\nexport type { Canvas3DProps } from \"./three/canvas3d-node\";\r\n"]}
@@ -97,6 +97,8 @@ export declare abstract class Node<P extends NodeProps = NodeProps> implements P
97
97
  * construction, before any subclass field initializer has run.
98
98
  */
99
99
  abstract get dimension(): NodeDimension;
100
+ /** The trees this type takes children from, answerable from the prototype as {@link dimension} is. */
101
+ get _childTrees(): readonly NodeDimension[];
100
102
  constructor(props?: NodeConfig<any, P>);
101
103
  /** See {@link NodeProps.key}. */
102
104
  key?: string;
@@ -142,8 +144,12 @@ export declare abstract class Node<P extends NodeProps = NodeProps> implements P
142
144
  * never appear.
143
145
  */
144
146
  protected acceptsChild(child: Node): boolean;
145
- /** Throw if `child` belongs to another dimension. */
147
+ /** Throw if `child` cannot go here: by its tree, by what this node takes, or by where the child says it goes. */
146
148
  protected assertAcceptsChild(child: Node): void;
149
+ /** What this node takes, for the error when it refuses a child of its own tree. */
150
+ protected _childRule(): string;
151
+ /** Why this node cannot go inside `parent`, or `null`: only a node that names its parents refuses one. */
152
+ _parentRefusal(_parent: Node): string | null;
147
153
  private _assets;
148
154
  protected _parent: Node | null;
149
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AAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAMpG,kEAAkE;IAClE,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAO1D;;;OAGG;IACH,cAAc,IAAI,QAAQ,CAAC,IAAI,CAAC;IAIhC,0HAA0H;IAC1H,iBAAiB,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI;IAK3C,OAAO,CAAC,UAAU,CAA+B;IAEjD,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,YAAY;IAWpB,OAAO,IAAI,IAAI;CAalB"}
@@ -17,9 +17,9 @@ import { advanceNodeTime, createNodeTime } from "../../nodes/node/node-time.js";
17
17
  import { command } from "../../tween/command-decorator.js";
18
18
  /** Where a node of each dimension is allowed to live, for the mismatch error. */
19
19
  const HOSTS_OF = {
20
- "2d": "2D nodes go in the 2D tree, or inside a <Canvas3D> as a HUD over its scene.",
21
- "3d": "Put 3D nodes inside a <Canvas3D>, which is the one node that holds both.",
22
- audio: "Put audio nodes under an <AudioBus>, or directly on the scene root.",
20
+ "2d": "2D nodes go in the 2D tree, or inside a Canvas3D as a HUD over its scene.",
21
+ "3d": "Put 3D nodes inside a Canvas3D, which is the one node that holds both.",
22
+ audio: "Put audio nodes under an AudioBus, or directly on the scene root.",
23
23
  };
24
24
  /** A withdrawn prop's options: every write, a tween's included, maps to the value its default maps to. */
25
25
  function heldAtDefault(meta) {
@@ -41,6 +41,10 @@ function heldAtDefault(meta) {
41
41
  * that don't exist yet.
42
42
  */
43
43
  export class Node {
44
+ /** The trees this type takes children from, answerable from the prototype as {@link dimension} is. */
45
+ get _childTrees() {
46
+ return [this.dimension];
47
+ }
44
48
  constructor(props) {
45
49
  // Retain the raw props (see _props doc) so a provider's provideContext can
46
50
  // read which keys the author passed. Captured before any default
@@ -134,12 +138,23 @@ export class Node {
134
138
  acceptsChild(child) {
135
139
  return child.dimension === this.dimension;
136
140
  }
137
- /** Throw if `child` belongs to another dimension. */
141
+ /** Throw if `child` cannot go here: by its tree, by what this node takes, or by where the child says it goes. */
138
142
  assertAcceptsChild(child) {
139
- if (this.acceptsChild(child))
140
- return;
141
- throw new TypeError(`${this.className} (${this.dimension}) cannot hold ${child.className} (${child.dimension}). ` +
142
- `${HOSTS_OF[child.dimension]}`);
143
+ if (!this.acceptsChild(child)) {
144
+ const why = child.dimension === this.dimension ? this._childRule() : HOSTS_OF[child.dimension];
145
+ throw new TypeError(`${this.className} (${this.dimension}) cannot hold ${child.className} (${child.dimension}).${why ? ` ${why}` : ""}`);
146
+ }
147
+ const refusal = child._parentRefusal(this);
148
+ if (refusal)
149
+ throw new TypeError(refusal);
150
+ }
151
+ /** What this node takes, for the error when it refuses a child of its own tree. */
152
+ _childRule() {
153
+ return "";
154
+ }
155
+ /** Why this node cannot go inside `parent`, or `null`: only a node that names its parents refuses one. */
156
+ _parentRefusal(_parent) {
157
+ return null;
143
158
  }
144
159
  _assets = null;
145
160
  _parent = null;