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

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 (251) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/browser/chunks/chunk-2RIYH36X.js +3 -0
  3. package/dist/browser/chunks/{chunk-QG6C23IJ.js.map → chunk-2RIYH36X.js.map} +4 -4
  4. package/dist/browser/chunks/chunk-DDJN3QII.js +15 -0
  5. package/dist/browser/chunks/chunk-DDJN3QII.js.map +7 -0
  6. package/dist/browser/chunks/chunk-DHB4COFY.js +2 -0
  7. package/dist/browser/chunks/chunk-DHB4COFY.js.map +7 -0
  8. package/dist/browser/chunks/chunk-EJDPYDQI.js +5 -0
  9. package/dist/browser/chunks/chunk-EJDPYDQI.js.map +7 -0
  10. package/dist/browser/chunks/chunk-XAWE4EAK.js +2 -0
  11. package/dist/browser/chunks/chunk-XAWE4EAK.js.map +7 -0
  12. package/dist/browser/component.js +1 -1
  13. package/dist/browser/component.js.map +4 -4
  14. package/dist/browser/experimental.js +2 -0
  15. package/dist/browser/experimental.js.map +7 -0
  16. package/dist/browser/index.js +1 -1
  17. package/dist/browser/index.js.map +4 -4
  18. package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
  19. package/dist/browser/jsx-jsx-runtime.js +1 -1
  20. package/dist/browser/manifest.json +2 -1
  21. package/dist/browser/sdk.js +1 -1
  22. package/dist/component/api.d.ts +508 -0
  23. package/dist/component/api.d.ts.map +1 -0
  24. package/dist/component/api.js +4 -0
  25. package/dist/component/api.js.map +1 -0
  26. package/dist/component/builtins/audio.d.ts +26 -0
  27. package/dist/component/builtins/audio.d.ts.map +1 -0
  28. package/dist/component/builtins/audio.js +41 -0
  29. package/dist/component/builtins/audio.js.map +1 -0
  30. package/dist/component/builtins/canvas3d.d.ts +98 -0
  31. package/dist/component/builtins/canvas3d.d.ts.map +1 -0
  32. package/dist/component/builtins/canvas3d.js +21 -0
  33. package/dist/component/builtins/canvas3d.js.map +1 -0
  34. package/dist/component/builtins/composite.d.ts +56 -0
  35. package/dist/component/builtins/composite.d.ts.map +1 -0
  36. package/dist/component/builtins/composite.js +25 -0
  37. package/dist/component/builtins/composite.js.map +1 -0
  38. package/dist/component/builtins/geometry.d.ts +505 -0
  39. package/dist/component/builtins/geometry.d.ts.map +1 -0
  40. package/dist/component/builtins/geometry.js +107 -0
  41. package/dist/component/builtins/geometry.js.map +1 -0
  42. package/dist/component/builtins/layout.d.ts +88 -0
  43. package/dist/component/builtins/layout.d.ts.map +1 -0
  44. package/dist/component/builtins/layout.js +84 -0
  45. package/dist/component/builtins/layout.js.map +1 -0
  46. package/dist/component/builtins/media.d.ts +95 -0
  47. package/dist/component/builtins/media.d.ts.map +1 -0
  48. package/dist/component/builtins/media.js +149 -0
  49. package/dist/component/builtins/media.js.map +1 -0
  50. package/dist/component/builtins/providers.d.ts +23 -0
  51. package/dist/component/builtins/providers.d.ts.map +1 -0
  52. package/dist/component/builtins/providers.js +30 -0
  53. package/dist/component/builtins/providers.js.map +1 -0
  54. package/dist/component/builtins/text.d.ts +193 -0
  55. package/dist/component/builtins/text.d.ts.map +1 -0
  56. package/dist/component/builtins/text.js +113 -0
  57. package/dist/component/builtins/text.js.map +1 -0
  58. package/dist/component/builtins/three.d.ts +1085 -0
  59. package/dist/component/builtins/three.d.ts.map +1 -0
  60. package/dist/component/builtins/three.js +265 -0
  61. package/dist/component/builtins/three.js.map +1 -0
  62. package/dist/component/clip-of.d.ts +5 -0
  63. package/dist/component/clip-of.d.ts.map +1 -0
  64. package/dist/component/clip-of.js +33 -0
  65. package/dist/component/clip-of.js.map +1 -0
  66. package/dist/component/commands-for.d.ts +19 -0
  67. package/dist/component/commands-for.d.ts.map +1 -0
  68. package/dist/component/commands-for.js +5 -0
  69. package/dist/component/commands-for.js.map +1 -0
  70. package/dist/component/component-audio.d.ts +9 -0
  71. package/dist/component/component-audio.d.ts.map +1 -0
  72. package/dist/component/component-audio.js +18 -0
  73. package/dist/component/component-audio.js.map +1 -0
  74. package/dist/component/component2d.d.ts +9 -0
  75. package/dist/component/component2d.d.ts.map +1 -0
  76. package/dist/component/component2d.js +239 -0
  77. package/dist/component/component2d.js.map +1 -0
  78. package/dist/component/component3d.d.ts +9 -0
  79. package/dist/component/component3d.d.ts.map +1 -0
  80. package/dist/component/component3d.js +99 -0
  81. package/dist/component/component3d.js.map +1 -0
  82. package/dist/component/factory.d.ts +63 -0
  83. package/dist/component/factory.d.ts.map +1 -0
  84. package/dist/component/factory.js +313 -0
  85. package/dist/component/factory.js.map +1 -0
  86. package/dist/component/modules/aim.d.ts +30 -0
  87. package/dist/component/modules/aim.d.ts.map +1 -0
  88. package/dist/component/modules/aim.js +39 -0
  89. package/dist/component/modules/aim.js.map +1 -0
  90. package/dist/component/modules/corners.d.ts +13 -0
  91. package/dist/component/modules/corners.d.ts.map +1 -0
  92. package/dist/component/modules/corners.js +12 -0
  93. package/dist/component/modules/corners.js.map +1 -0
  94. package/dist/component/modules/flow.d.ts +26 -0
  95. package/dist/component/modules/flow.d.ts.map +1 -0
  96. package/dist/component/modules/flow.js +55 -0
  97. package/dist/component/modules/flow.js.map +1 -0
  98. package/dist/component/modules/material.d.ts +40 -0
  99. package/dist/component/modules/material.d.ts.map +1 -0
  100. package/dist/component/modules/material.js +75 -0
  101. package/dist/component/modules/material.js.map +1 -0
  102. package/dist/component/modules/paint.d.ts +71 -0
  103. package/dist/component/modules/paint.d.ts.map +1 -0
  104. package/dist/component/modules/paint.js +106 -0
  105. package/dist/component/modules/paint.js.map +1 -0
  106. package/dist/component/modules/shapes.d.ts +31 -0
  107. package/dist/component/modules/shapes.d.ts.map +1 -0
  108. package/dist/component/modules/shapes.js +43 -0
  109. package/dist/component/modules/shapes.js.map +1 -0
  110. package/dist/component/modules/text-layout.d.ts +26 -0
  111. package/dist/component/modules/text-layout.d.ts.map +1 -0
  112. package/dist/component/modules/text-layout.js +57 -0
  113. package/dist/component/modules/text-layout.js.map +1 -0
  114. package/dist/component/modules/text-style.d.ts +48 -0
  115. package/dist/component/modules/text-style.d.ts.map +1 -0
  116. package/dist/component/modules/text-style.js +63 -0
  117. package/dist/component/modules/text-style.js.map +1 -0
  118. package/dist/component/modules/three-entries.d.ts +23 -0
  119. package/dist/component/modules/three-entries.d.ts.map +1 -0
  120. package/dist/component/modules/three-entries.js +41 -0
  121. package/dist/component/modules/three-entries.js.map +1 -0
  122. package/dist/component/modules/view3d.d.ts +55 -0
  123. package/dist/component/modules/view3d.d.ts.map +1 -0
  124. package/dist/component/modules/view3d.js +160 -0
  125. package/dist/component/modules/view3d.js.map +1 -0
  126. package/dist/component/timeline.d.ts +22 -0
  127. package/dist/component/timeline.d.ts.map +1 -0
  128. package/dist/component/timeline.js +128 -0
  129. package/dist/component/timeline.js.map +1 -0
  130. package/dist/component/type-def.d.ts +26 -0
  131. package/dist/component/type-def.d.ts.map +1 -0
  132. package/dist/component/type-def.js +16 -0
  133. package/dist/component/type-def.js.map +1 -0
  134. package/dist/component/types.d.ts +91 -0
  135. package/dist/component/types.d.ts.map +1 -0
  136. package/dist/component/types.js +88 -0
  137. package/dist/component/types.js.map +1 -0
  138. package/dist/component/views.d.ts +121 -0
  139. package/dist/component/views.d.ts.map +1 -0
  140. package/dist/component/views.js +413 -0
  141. package/dist/component/views.js.map +1 -0
  142. package/dist/component.d.ts +4 -5
  143. package/dist/component.d.ts.map +1 -1
  144. package/dist/component.js +3 -5
  145. package/dist/component.js.map +1 -1
  146. package/dist/document/audio.d.ts +9 -1
  147. package/dist/document/audio.d.ts.map +1 -1
  148. package/dist/document/audio.js +41 -0
  149. package/dist/document/audio.js.map +1 -1
  150. package/dist/document/builtins.d.ts.map +1 -1
  151. package/dist/document/builtins.js +9 -27
  152. package/dist/document/builtins.js.map +1 -1
  153. package/dist/document/command-traits.js +3 -0
  154. package/dist/document/command-traits.js.map +1 -1
  155. package/dist/document/diff.d.ts.map +1 -1
  156. package/dist/document/diff.js +3 -3
  157. package/dist/document/diff.js.map +1 -1
  158. package/dist/document/doc-index.d.ts.map +1 -1
  159. package/dist/document/doc-index.js +3 -3
  160. package/dist/document/doc-index.js.map +1 -1
  161. package/dist/document/node-descriptor.d.ts +6 -0
  162. package/dist/document/node-descriptor.d.ts.map +1 -1
  163. package/dist/document/node-descriptor.js.map +1 -1
  164. package/dist/document/placement.js +2 -2
  165. package/dist/document/placement.js.map +1 -1
  166. package/dist/document/registry.d.ts +6 -11
  167. package/dist/document/registry.d.ts.map +1 -1
  168. package/dist/document/registry.js +17 -17
  169. package/dist/document/registry.js.map +1 -1
  170. package/dist/document/settled-index.d.ts +49 -0
  171. package/dist/document/settled-index.d.ts.map +1 -0
  172. package/dist/document/settled-index.js +247 -0
  173. package/dist/document/settled-index.js.map +1 -0
  174. package/dist/document/timeline.d.ts +27 -1
  175. package/dist/document/timeline.d.ts.map +1 -1
  176. package/dist/document/timeline.js +98 -2
  177. package/dist/document/timeline.js.map +1 -1
  178. package/dist/experimental.d.ts +22 -0
  179. package/dist/experimental.d.ts.map +1 -0
  180. package/dist/experimental.js +20 -0
  181. package/dist/experimental.js.map +1 -0
  182. package/dist/index.d.ts +9 -0
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +9 -0
  185. package/dist/index.js.map +1 -1
  186. package/dist/nodes/audio/index.d.ts +2 -2
  187. package/dist/nodes/audio/index.d.ts.map +1 -1
  188. package/dist/nodes/audio/index.js +0 -2
  189. package/dist/nodes/audio/index.js.map +1 -1
  190. package/dist/nodes/audio/sound-node.d.ts +2 -1
  191. package/dist/nodes/audio/sound-node.d.ts.map +1 -1
  192. package/dist/nodes/audio/sound-node.js +3 -0
  193. package/dist/nodes/audio/sound-node.js.map +1 -1
  194. package/dist/nodes/index.d.ts +39 -27
  195. package/dist/nodes/index.d.ts.map +1 -1
  196. package/dist/nodes/index.js +16 -30
  197. package/dist/nodes/index.js.map +1 -1
  198. package/dist/nodes/node/node.d.ts +7 -1
  199. package/dist/nodes/node/node.d.ts.map +1 -1
  200. package/dist/nodes/node/node.js +23 -8
  201. package/dist/nodes/node/node.js.map +1 -1
  202. package/dist/nodes/root/canvas2d-node.d.ts +2 -1
  203. package/dist/nodes/root/canvas2d-node.d.ts.map +1 -1
  204. package/dist/nodes/root/canvas2d-node.js +3 -0
  205. package/dist/nodes/root/canvas2d-node.js.map +1 -1
  206. package/dist/nodes/text/richtext-node.d.ts +0 -5
  207. package/dist/nodes/text/richtext-node.d.ts.map +1 -1
  208. package/dist/nodes/text/richtext-node.js +5 -71
  209. package/dist/nodes/text/richtext-node.js.map +1 -1
  210. package/dist/nodes/text/text-base.d.ts +5 -22
  211. package/dist/nodes/text/text-base.d.ts.map +1 -1
  212. package/dist/nodes/text/text-base.js +12 -363
  213. package/dist/nodes/text/text-base.js.map +1 -1
  214. package/dist/nodes/text/text-layout.d.ts +87 -0
  215. package/dist/nodes/text/text-layout.d.ts.map +1 -0
  216. package/dist/nodes/text/text-layout.js +368 -0
  217. package/dist/nodes/text/text-layout.js.map +1 -0
  218. package/dist/nodes/three/canvas3d-node.d.ts +3 -1
  219. package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
  220. package/dist/nodes/three/canvas3d-node.js +6 -0
  221. package/dist/nodes/three/canvas3d-node.js.map +1 -1
  222. package/dist/runtime/clip-instance.d.ts +4 -1
  223. package/dist/runtime/clip-instance.d.ts.map +1 -1
  224. package/dist/runtime/clip-instance.js +17 -3
  225. package/dist/runtime/clip-instance.js.map +1 -1
  226. package/dist/runtime/clip-store.d.ts +9 -0
  227. package/dist/runtime/clip-store.d.ts.map +1 -1
  228. package/dist/runtime/clip-store.js +78 -0
  229. package/dist/runtime/clip-store.js.map +1 -1
  230. package/dist/runtime/node-picking.d.ts.map +1 -1
  231. package/dist/runtime/node-picking.js +6 -7
  232. package/dist/runtime/node-picking.js.map +1 -1
  233. package/dist/runtime/node-picking3d.d.ts +11 -4
  234. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  235. package/dist/runtime/node-picking3d.js +5 -0
  236. package/dist/runtime/node-picking3d.js.map +1 -1
  237. package/dist/runtime/text-geometry.d.ts.map +1 -1
  238. package/dist/runtime/text-geometry.js +7 -3
  239. package/dist/runtime/text-geometry.js.map +1 -1
  240. package/dist/sdk/index.d.ts +35 -14
  241. package/dist/sdk/index.d.ts.map +1 -1
  242. package/dist/sdk/index.js +47 -42
  243. package/dist/sdk/index.js.map +1 -1
  244. package/dist/tween/command.d.ts +12 -0
  245. package/dist/tween/command.d.ts.map +1 -1
  246. package/dist/tween/command.js +14 -0
  247. package/dist/tween/command.js.map +1 -1
  248. package/package.json +6 -1
  249. package/dist/browser/chunks/chunk-FUZVFT3W.js +0 -18
  250. package/dist/browser/chunks/chunk-FUZVFT3W.js.map +0 -7
  251. package/dist/browser/chunks/chunk-QG6C23IJ.js +0 -3
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The component factories while the class surface still ships beside them: the
3
+ * same names the sdk exports, for code that wants only the new surface.
4
+ */
5
+ export { component2d } from "./component/component2d.js";
6
+ export { componentAudio } from "./component/component-audio.js";
7
+ export { component3d } from "./component/component3d.js";
8
+ export { commandsFor } from "./component/commands-for.js";
9
+ export { Types } from "./component/types.js";
10
+ export { provides } from "./component/api.js";
11
+ export * as Paint from "./component/modules/paint.js";
12
+ export * as Flow from "./component/modules/flow.js";
13
+ export * as Corners from "./component/modules/corners.js";
14
+ export * as Shapes from "./component/modules/shapes.js";
15
+ export * as Aim from "./component/modules/aim.js";
16
+ export * as TextStyle from "./component/modules/text-style.js";
17
+ export * as TextLayout from "./component/modules/text-layout.js";
18
+ export * as Material from "./component/modules/material.js";
19
+ export * as View3D from "./component/modules/view3d.js";
20
+ //# sourceMappingURL=experimental.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experimental.js","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAO3C,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,SAAS,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC","sourcesContent":["/**\r\n * The component factories while the class surface still ships beside them: the\r\n * same names the sdk exports, for code that wants only the new surface.\r\n */\r\nexport { component2d } from \"@/component/component2d\";\r\nexport { componentAudio } from \"@/component/component-audio\";\r\nexport { component3d } from \"@/component/component3d\";\r\nexport { commandsFor } from \"@/component/commands-for\";\r\nexport { Types } from \"@/component/types\";\r\nexport { provides } from \"@/component/api\";\r\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from \"@/component/types\";\r\nexport type {\r\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\r\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, RenderContext2D, SoundOptions, StateSpec,\r\n Timeline, Type, Values, Writes, Merge, CallProps3D, Placement3DProps, RenderContext3D, Transform3DState, Handle, LayoutBox, NodeFrame,\r\n} from \"@/component/api\";\r\nexport * as Paint from \"@/component/modules/paint\";\r\nexport * as Flow from \"@/component/modules/flow\";\r\nexport * as Corners from \"@/component/modules/corners\";\r\nexport * as Shapes from \"@/component/modules/shapes\";\r\nexport * as Aim from \"@/component/modules/aim\";\r\nexport * as TextStyle from \"@/component/modules/text-style\";\r\nexport * as TextLayout from \"@/component/modules/text-layout\";\r\nexport * as Material from \"@/component/modules/material\";\r\nexport * as View3D from \"@/component/modules/view3d\";\r\n"]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  export * from './attributes/index.js';
2
2
  export * from './nodes/index.js';
3
+ export * from './component/builtins/geometry.js';
4
+ export * from './component/builtins/composite.js';
5
+ export * from './component/builtins/layout.js';
6
+ export * from './component/builtins/text.js';
7
+ export * from './component/builtins/providers.js';
8
+ export * from './component/builtins/audio.js';
9
+ export * from './component/builtins/media.js';
10
+ export * from './component/builtins/three.js';
11
+ export * from './component/builtins/canvas3d.js';
3
12
  export * from './project/index.js';
4
13
  export * from './document/index.js';
5
14
  export * from './render/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,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"}
package/dist/index.js CHANGED
@@ -1,5 +1,14 @@
1
1
  export * from './attributes/index.js';
2
2
  export * from './nodes/index.js';
3
+ export * from './component/builtins/geometry.js';
4
+ export * from './component/builtins/composite.js';
5
+ export * from './component/builtins/layout.js';
6
+ export * from './component/builtins/text.js';
7
+ export * from './component/builtins/providers.js';
8
+ export * from './component/builtins/audio.js';
9
+ export * from './component/builtins/media.js';
10
+ export * from './component/builtins/three.js';
11
+ export * from './component/builtins/canvas3d.js';
3
12
  export * from './project/index.js';
4
13
  export * from './document/index.js';
5
14
  export * from './render/index.js';
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,SAAS,CAAC;AACxB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,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 './component/builtins/geometry';\r\nexport * from './component/builtins/composite';\r\nexport * from './component/builtins/layout';\r\nexport * from './component/builtins/text';\r\nexport * from './component/builtins/providers';\r\nexport * from './component/builtins/audio';\r\nexport * from './component/builtins/media';\r\nexport * from './component/builtins/three';\r\nexport * from './component/builtins/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\nexport * from './jsx/jsx-runtime';\r\n\r\nexport * from './renamed-scene-names';\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;AAC9C,OAAO,EAAa,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzE,MAAM,WAAW,cAAe,SAAQ,cAAc;IAClD,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,mDAAmD;IACnD,IAAI,EAAE,OAAO,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;;;;OAIG;IACH,OAAO,CAAC,YAAY;CAUvB"}
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,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAa,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzE,MAAM,WAAW,cAAe,SAAQ,cAAc;IAClD,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,mDAAmD;IACnD,IAAI,EAAE,OAAO,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;AA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uB;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 } 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,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"@/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;AA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;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
155
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/nodes/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,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAmB,WAAW,EAAqB,MAAM,mCAAmC,CAAC;AASpG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAmC,KAAK,eAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,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,EAAE,UAAU,GAAG,IAAI;IAErC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAGrB;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,SAAS,IAAI,EAAE,CAGlC;IAED;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAS9B,wFAAwF;IACxF,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAUjC,+DAA+D;IAC/D,KAAK,IAAI,IAAI;IASb;;;;;;;;OAQG;IAEH,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC;QAAE,KAAK,EAAE,IAAI,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;