@motionscript/core 0.1.0-alpha.6 → 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 (445) hide show
  1. package/CHANGELOG.md +28 -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-DHB4COFY.js.map → chunk-LKUYVFU3.js.map} +4 -4
  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 +1 -1
  74. package/dist/browser/index.js +1 -1
  75. package/dist/browser/index.js.map +4 -4
  76. package/dist/browser/manifest.json +2 -4
  77. package/dist/browser/sdk.js +1 -1
  78. package/dist/component.d.ts +10 -18
  79. package/dist/component.d.ts.map +1 -1
  80. package/dist/component.js +10 -17
  81. package/dist/component.js.map +1 -1
  82. package/dist/components/builtins/audio/audio.d.ts +53 -0
  83. package/dist/components/builtins/audio/audio.d.ts.map +1 -0
  84. package/dist/components/builtins/audio/audio.js +41 -0
  85. package/dist/components/builtins/audio/audio.js.map +1 -0
  86. package/dist/components/builtins/geometry/composite.d.ts +93 -0
  87. package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
  88. package/dist/components/builtins/geometry/composite.js +25 -0
  89. package/dist/components/builtins/geometry/composite.js.map +1 -0
  90. package/dist/components/builtins/geometry/geometry.d.ts +921 -0
  91. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
  92. package/dist/components/builtins/geometry/geometry.js +107 -0
  93. package/dist/components/builtins/geometry/geometry.js.map +1 -0
  94. package/dist/components/builtins/geometry/shape-outline.d.ts +93 -0
  95. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
  96. package/dist/components/builtins/geometry/shape-outline.js +470 -0
  97. package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
  98. package/dist/components/builtins/layout/layout.d.ts +186 -0
  99. package/dist/components/builtins/layout/layout.d.ts.map +1 -0
  100. package/dist/components/builtins/layout/layout.js +84 -0
  101. package/dist/components/builtins/layout/layout.js.map +1 -0
  102. package/dist/components/builtins/media/media.d.ts +240 -0
  103. package/dist/components/builtins/media/media.d.ts.map +1 -0
  104. package/dist/components/builtins/media/media.js +149 -0
  105. package/dist/components/builtins/media/media.js.map +1 -0
  106. package/dist/components/builtins/providers/providers.d.ts +47 -0
  107. package/dist/components/builtins/providers/providers.d.ts.map +1 -0
  108. package/dist/components/builtins/providers/providers.js +30 -0
  109. package/dist/components/builtins/providers/providers.js.map +1 -0
  110. package/dist/components/builtins/text/number-format.d.ts +66 -0
  111. package/dist/components/builtins/text/number-format.d.ts.map +1 -0
  112. package/dist/components/builtins/text/number-format.js +227 -0
  113. package/dist/components/builtins/text/number-format.js.map +1 -0
  114. package/dist/components/builtins/text/number-pattern.d.ts +51 -0
  115. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
  116. package/dist/components/builtins/text/number-pattern.js +77 -0
  117. package/dist/components/builtins/text/number-pattern.js.map +1 -0
  118. package/dist/components/builtins/text/text-defaults.d.ts +32 -0
  119. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
  120. package/dist/components/builtins/text/text-defaults.js +37 -0
  121. package/dist/components/builtins/text/text-defaults.js.map +1 -0
  122. package/dist/components/builtins/text/text-layout.d.ts +82 -0
  123. package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
  124. package/dist/components/builtins/text/text-layout.js +331 -0
  125. package/dist/components/builtins/text/text-layout.js.map +1 -0
  126. package/dist/components/builtins/text/text.d.ts +409 -0
  127. package/dist/components/builtins/text/text.d.ts.map +1 -0
  128. package/dist/components/builtins/text/text.js +113 -0
  129. package/dist/components/builtins/text/text.js.map +1 -0
  130. package/dist/components/builtins/three/canvas3d.d.ts +245 -0
  131. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
  132. package/dist/components/builtins/three/canvas3d.js +21 -0
  133. package/dist/components/builtins/three/canvas3d.js.map +1 -0
  134. package/dist/components/builtins/three/grid-geometry3d.d.ts +62 -0
  135. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
  136. package/dist/components/builtins/three/grid-geometry3d.js +114 -0
  137. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
  138. package/dist/components/builtins/three/three.d.ts +1889 -0
  139. package/dist/components/builtins/three/three.d.ts.map +1 -0
  140. package/dist/components/builtins/three/three.js +305 -0
  141. package/dist/components/builtins/three/three.js.map +1 -0
  142. package/dist/components/factory/api.d.ts +516 -0
  143. package/dist/components/factory/api.d.ts.map +1 -0
  144. package/dist/components/factory/api.js +4 -0
  145. package/dist/components/factory/api.js.map +1 -0
  146. package/dist/components/factory/clip-of.d.ts +5 -0
  147. package/dist/components/factory/clip-of.d.ts.map +1 -0
  148. package/dist/components/factory/clip-of.js +33 -0
  149. package/dist/components/factory/clip-of.js.map +1 -0
  150. package/dist/components/factory/commands-for.d.ts +19 -0
  151. package/dist/components/factory/commands-for.d.ts.map +1 -0
  152. package/dist/components/factory/commands-for.js +5 -0
  153. package/dist/components/factory/commands-for.js.map +1 -0
  154. package/dist/components/factory/component-audio.d.ts +9 -0
  155. package/dist/components/factory/component-audio.d.ts.map +1 -0
  156. package/dist/components/factory/component-audio.js +18 -0
  157. package/dist/components/factory/component-audio.js.map +1 -0
  158. package/dist/components/factory/component2d.d.ts +8 -0
  159. package/dist/components/factory/component2d.d.ts.map +1 -0
  160. package/dist/components/factory/component2d.js +240 -0
  161. package/dist/components/factory/component2d.js.map +1 -0
  162. package/dist/components/factory/component3d.d.ts +9 -0
  163. package/dist/components/factory/component3d.d.ts.map +1 -0
  164. package/dist/components/factory/component3d.js +99 -0
  165. package/dist/components/factory/component3d.js.map +1 -0
  166. package/dist/components/factory/factory.d.ts +63 -0
  167. package/dist/components/factory/factory.d.ts.map +1 -0
  168. package/dist/components/factory/factory.js +313 -0
  169. package/dist/components/factory/factory.js.map +1 -0
  170. package/dist/components/factory/timeline.d.ts +22 -0
  171. package/dist/components/factory/timeline.d.ts.map +1 -0
  172. package/dist/components/factory/timeline.js +128 -0
  173. package/dist/components/factory/timeline.js.map +1 -0
  174. package/dist/components/factory/type-def.d.ts +26 -0
  175. package/dist/components/factory/type-def.d.ts.map +1 -0
  176. package/dist/components/factory/type-def.js +16 -0
  177. package/dist/components/factory/type-def.js.map +1 -0
  178. package/dist/components/factory/types.d.ts +91 -0
  179. package/dist/components/factory/types.d.ts.map +1 -0
  180. package/dist/components/factory/types.js +88 -0
  181. package/dist/components/factory/types.js.map +1 -0
  182. package/dist/components/factory/views.d.ts +121 -0
  183. package/dist/components/factory/views.d.ts.map +1 -0
  184. package/dist/components/factory/views.js +413 -0
  185. package/dist/components/factory/views.js.map +1 -0
  186. package/dist/components/modules/aim.d.ts +30 -0
  187. package/dist/components/modules/aim.d.ts.map +1 -0
  188. package/dist/components/modules/aim.js +39 -0
  189. package/dist/components/modules/aim.js.map +1 -0
  190. package/dist/components/modules/corners.d.ts +13 -0
  191. package/dist/components/modules/corners.d.ts.map +1 -0
  192. package/dist/components/modules/corners.js +12 -0
  193. package/dist/components/modules/corners.js.map +1 -0
  194. package/dist/components/modules/flow.d.ts +26 -0
  195. package/dist/components/modules/flow.d.ts.map +1 -0
  196. package/dist/components/modules/flow.js +57 -0
  197. package/dist/components/modules/flow.js.map +1 -0
  198. package/dist/components/modules/material.d.ts +40 -0
  199. package/dist/components/modules/material.d.ts.map +1 -0
  200. package/dist/components/modules/material.js +75 -0
  201. package/dist/components/modules/material.js.map +1 -0
  202. package/dist/components/modules/paint.d.ts +71 -0
  203. package/dist/components/modules/paint.d.ts.map +1 -0
  204. package/dist/components/modules/paint.js +106 -0
  205. package/dist/components/modules/paint.js.map +1 -0
  206. package/dist/components/modules/shapes.d.ts +31 -0
  207. package/dist/components/modules/shapes.d.ts.map +1 -0
  208. package/dist/components/modules/shapes.js +43 -0
  209. package/dist/components/modules/shapes.js.map +1 -0
  210. package/dist/components/modules/text-layout.d.ts +26 -0
  211. package/dist/components/modules/text-layout.d.ts.map +1 -0
  212. package/dist/components/modules/text-layout.js +57 -0
  213. package/dist/components/modules/text-layout.js.map +1 -0
  214. package/dist/components/modules/text-style.d.ts +48 -0
  215. package/dist/components/modules/text-style.d.ts.map +1 -0
  216. package/dist/components/modules/text-style.js +63 -0
  217. package/dist/components/modules/text-style.js.map +1 -0
  218. package/dist/components/modules/three-entries.d.ts +23 -0
  219. package/dist/components/modules/three-entries.d.ts.map +1 -0
  220. package/dist/components/modules/three-entries.js +41 -0
  221. package/dist/components/modules/three-entries.js.map +1 -0
  222. package/dist/components/modules/view3d.d.ts +59 -0
  223. package/dist/components/modules/view3d.d.ts.map +1 -0
  224. package/dist/components/modules/view3d.js +171 -0
  225. package/dist/components/modules/view3d.js.map +1 -0
  226. package/dist/components/trees/2d/group-bounds.d.ts +56 -0
  227. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
  228. package/dist/components/trees/2d/group-bounds.js +87 -0
  229. package/dist/components/trees/2d/group-bounds.js.map +1 -0
  230. package/dist/components/trees/2d/node-lifecycle.d.ts +46 -0
  231. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
  232. package/dist/components/trees/2d/node-lifecycle.js +264 -0
  233. package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
  234. package/dist/components/trees/2d/node-motion.d.ts +56 -0
  235. package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
  236. package/dist/components/trees/2d/node-motion.js +86 -0
  237. package/dist/components/trees/2d/node-motion.js.map +1 -0
  238. package/dist/components/trees/2d/node-render.d.ts +36 -0
  239. package/dist/components/trees/2d/node-render.d.ts.map +1 -0
  240. package/dist/components/trees/2d/node-render.js +67 -0
  241. package/dist/components/trees/2d/node-render.js.map +1 -0
  242. package/dist/components/trees/2d/node-space.d.ts +63 -0
  243. package/dist/components/trees/2d/node-space.d.ts.map +1 -0
  244. package/dist/components/trees/2d/node-space.js +131 -0
  245. package/dist/components/trees/2d/node-space.js.map +1 -0
  246. package/dist/components/trees/2d/node-transform.d.ts +55 -0
  247. package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
  248. package/dist/components/trees/2d/node-transform.js +73 -0
  249. package/dist/components/trees/2d/node-transform.js.map +1 -0
  250. package/dist/components/trees/2d/node2d.d.ts +1020 -0
  251. package/dist/components/trees/2d/node2d.d.ts.map +1 -0
  252. package/dist/components/trees/2d/node2d.js +1481 -0
  253. package/dist/components/trees/2d/node2d.js.map +1 -0
  254. package/dist/components/trees/audio/index.d.ts +2 -0
  255. package/dist/components/trees/audio/index.d.ts.map +1 -0
  256. package/dist/components/trees/audio/index.js +2 -0
  257. package/dist/components/trees/audio/index.js.map +1 -0
  258. package/dist/components/trees/audio/node-audio.d.ts +109 -0
  259. package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
  260. package/dist/components/trees/audio/node-audio.js +167 -0
  261. package/dist/components/trees/audio/node-audio.js.map +1 -0
  262. package/dist/components/trees/index.d.ts +10 -0
  263. package/dist/components/trees/index.d.ts.map +1 -0
  264. package/dist/components/trees/index.js +14 -0
  265. package/dist/components/trees/index.js.map +1 -0
  266. package/dist/components/trees/node/node-editor-state.d.ts +53 -0
  267. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
  268. package/dist/components/trees/node/node-editor-state.js +23 -0
  269. package/dist/components/trees/node/node-editor-state.js.map +1 -0
  270. package/dist/components/trees/node/node-reactive.d.ts +89 -0
  271. package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
  272. package/dist/components/trees/node/node-reactive.js +135 -0
  273. package/dist/components/trees/node/node-reactive.js.map +1 -0
  274. package/dist/components/trees/node/node-time.d.ts +39 -0
  275. package/dist/components/trees/node/node-time.d.ts.map +1 -0
  276. package/dist/components/trees/node/node-time.js +14 -0
  277. package/dist/components/trees/node/node-time.js.map +1 -0
  278. package/dist/components/trees/node/node-walk.d.ts +46 -0
  279. package/dist/components/trees/node/node-walk.d.ts.map +1 -0
  280. package/dist/components/trees/node/node-walk.js +74 -0
  281. package/dist/components/trees/node/node-walk.js.map +1 -0
  282. package/dist/components/trees/node/node.d.ts +401 -0
  283. package/dist/components/trees/node/node.d.ts.map +1 -0
  284. package/dist/components/trees/node/node.js +680 -0
  285. package/dist/components/trees/node/node.js.map +1 -0
  286. package/dist/components/trees/root/canvas2d-node.d.ts +163 -0
  287. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
  288. package/dist/components/trees/root/canvas2d-node.js +216 -0
  289. package/dist/components/trees/root/canvas2d-node.js.map +1 -0
  290. package/dist/components/trees/three/node3d.d.ts +222 -0
  291. package/dist/components/trees/three/node3d.d.ts.map +1 -0
  292. package/dist/components/trees/three/node3d.js +289 -0
  293. package/dist/components/trees/three/node3d.js.map +1 -0
  294. package/dist/document/builtins.js +13 -13
  295. package/dist/document/builtins.js.map +1 -1
  296. package/dist/document/command-traits.d.ts +2 -2
  297. package/dist/document/command-traits.js +1 -1
  298. package/dist/document/command-traits.js.map +1 -1
  299. package/dist/document/deny-globals.d.ts +2 -2
  300. package/dist/document/deny-globals.js +2 -2
  301. package/dist/document/deny-globals.js.map +1 -1
  302. package/dist/document/expression/index.d.ts +1 -1
  303. package/dist/document/expression/index.js +1 -1
  304. package/dist/document/expression/index.js.map +1 -1
  305. package/dist/document/expression/ops.js +1 -1
  306. package/dist/document/expression/ops.js.map +1 -1
  307. package/dist/document/index.d.ts +1 -2
  308. package/dist/document/index.d.ts.map +1 -1
  309. package/dist/document/index.js +1 -2
  310. package/dist/document/index.js.map +1 -1
  311. package/dist/document/node-decorator.d.ts +14 -10
  312. package/dist/document/node-decorator.d.ts.map +1 -1
  313. package/dist/document/node-decorator.js +14 -10
  314. package/dist/document/node-decorator.js.map +1 -1
  315. package/dist/document/node-descriptor.d.ts +3 -3
  316. package/dist/document/node-descriptor.d.ts.map +1 -1
  317. package/dist/document/node-descriptor.js.map +1 -1
  318. package/dist/document/registry.d.ts +23 -25
  319. package/dist/document/registry.d.ts.map +1 -1
  320. package/dist/document/registry.js +12 -18
  321. package/dist/document/registry.js.map +1 -1
  322. package/dist/document/timeline.d.ts +3 -3
  323. package/dist/document/timeline.d.ts.map +1 -1
  324. package/dist/document/timeline.js +2 -2
  325. package/dist/document/timeline.js.map +1 -1
  326. package/dist/document/types.d.ts +4 -4
  327. package/dist/document/types.js.map +1 -1
  328. package/dist/document/validate.d.ts +1 -1
  329. package/dist/document/validate.js.map +1 -1
  330. package/dist/experimental.d.ts +19 -19
  331. package/dist/experimental.d.ts.map +1 -1
  332. package/dist/experimental.js +17 -17
  333. package/dist/experimental.js.map +1 -1
  334. package/dist/index.d.ts +10 -11
  335. package/dist/index.d.ts.map +1 -1
  336. package/dist/index.js +10 -11
  337. package/dist/index.js.map +1 -1
  338. package/dist/layout/types.d.ts +1 -1
  339. package/dist/layout/types.js.map +1 -1
  340. package/dist/props/host.d.ts +1 -1
  341. package/dist/props/host.js.map +1 -1
  342. package/dist/props/slot.d.ts +1 -1
  343. package/dist/props/slot.js +1 -1
  344. package/dist/props/slot.js.map +1 -1
  345. package/dist/render/clip.d.ts +1 -1
  346. package/dist/render/clip.js +1 -1
  347. package/dist/render/clip.js.map +1 -1
  348. package/dist/render/descriptors/rect.js.map +1 -1
  349. package/dist/render/descriptors/text.d.ts +11 -5
  350. package/dist/render/descriptors/text.d.ts.map +1 -1
  351. package/dist/render/descriptors/text.js +7 -1
  352. package/dist/render/descriptors/text.js.map +1 -1
  353. package/dist/render/render-context2d.d.ts +2 -2
  354. package/dist/render/render-context2d.js.map +1 -1
  355. package/dist/render3d/builders.d.ts +1 -1
  356. package/dist/render3d/builders.js +1 -1
  357. package/dist/render3d/builders.js.map +1 -1
  358. package/dist/render3d/graphics3d.d.ts +13 -19
  359. package/dist/render3d/graphics3d.d.ts.map +1 -1
  360. package/dist/render3d/graphics3d.js +13 -19
  361. package/dist/render3d/graphics3d.js.map +1 -1
  362. package/dist/render3d/scene3d.d.ts +1 -1
  363. package/dist/render3d/scene3d.js +1 -1
  364. package/dist/render3d/scene3d.js.map +1 -1
  365. package/dist/render3d/texture.d.ts +2 -2
  366. package/dist/render3d/texture.d.ts.map +1 -1
  367. package/dist/render3d/texture.js.map +1 -1
  368. package/dist/render3d/vector3.d.ts +2 -2
  369. package/dist/render3d/vector3.js +2 -2
  370. package/dist/render3d/vector3.js.map +1 -1
  371. package/dist/runtime/asset-refine.d.ts +1 -1
  372. package/dist/runtime/asset-refine.d.ts.map +1 -1
  373. package/dist/runtime/asset-refine.js +1 -1
  374. package/dist/runtime/asset-refine.js.map +1 -1
  375. package/dist/runtime/asset-update.js +1 -1
  376. package/dist/runtime/asset-update.js.map +1 -1
  377. package/dist/runtime/audio-index.d.ts +0 -11
  378. package/dist/runtime/audio-index.d.ts.map +1 -1
  379. package/dist/runtime/audio-index.js +0 -25
  380. package/dist/runtime/audio-index.js.map +1 -1
  381. package/dist/runtime/clip-instance.d.ts +3 -3
  382. package/dist/runtime/clip-instance.d.ts.map +1 -1
  383. package/dist/runtime/clip-instance.js +4 -4
  384. package/dist/runtime/clip-instance.js.map +1 -1
  385. package/dist/runtime/clip-store.d.ts +2 -3
  386. package/dist/runtime/clip-store.d.ts.map +1 -1
  387. package/dist/runtime/clip-store.js +17 -35
  388. package/dist/runtime/clip-store.js.map +1 -1
  389. package/dist/runtime/engine.d.ts +3 -3
  390. package/dist/runtime/engine.js +2 -2
  391. package/dist/runtime/engine.js.map +1 -1
  392. package/dist/runtime/node-picking.d.ts +2 -2
  393. package/dist/runtime/node-picking.d.ts.map +1 -1
  394. package/dist/runtime/node-picking.js +3 -3
  395. package/dist/runtime/node-picking.js.map +1 -1
  396. package/dist/runtime/node-picking3d.d.ts +2 -2
  397. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  398. package/dist/runtime/node-picking3d.js +1 -1
  399. package/dist/runtime/node-picking3d.js.map +1 -1
  400. package/dist/runtime/playback-controller.d.ts +2 -2
  401. package/dist/runtime/playback-controller.d.ts.map +1 -1
  402. package/dist/runtime/playback-controller.js +1 -1
  403. package/dist/runtime/playback-controller.js.map +1 -1
  404. package/dist/runtime/state-evaluator.d.ts +2 -2
  405. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  406. package/dist/runtime/state-evaluator.js.map +1 -1
  407. package/dist/runtime/text-geometry.d.ts +1 -1
  408. package/dist/runtime/text-geometry.d.ts.map +1 -1
  409. package/dist/runtime/text-geometry.js +4 -5
  410. package/dist/runtime/text-geometry.js.map +1 -1
  411. package/dist/sdk/index.d.ts +43 -39
  412. package/dist/sdk/index.d.ts.map +1 -1
  413. package/dist/sdk/index.js +24 -25
  414. package/dist/sdk/index.js.map +1 -1
  415. package/dist/tween/command-decorator.d.ts +7 -9
  416. package/dist/tween/command-decorator.d.ts.map +1 -1
  417. package/dist/tween/command-decorator.js +2 -2
  418. package/dist/tween/command-decorator.js.map +1 -1
  419. package/dist/tween/command.d.ts +1 -1
  420. package/dist/tween/command.js.map +1 -1
  421. package/dist/tween/index.d.ts +2 -1
  422. package/dist/tween/index.d.ts.map +1 -1
  423. package/dist/tween/index.js +1 -1
  424. package/dist/tween/index.js.map +1 -1
  425. package/dist/tween/loop.d.ts +1 -1
  426. package/dist/tween/loop.js +1 -1
  427. package/dist/tween/loop.js.map +1 -1
  428. package/dist/util/reference.d.ts +6 -6
  429. package/dist/util/reference.js.map +1 -1
  430. package/package.json +2 -10
  431. package/dist/browser/chunks/chunk-2RIYH36X.js +0 -3
  432. package/dist/browser/chunks/chunk-2RIYH36X.js.map +0 -7
  433. package/dist/browser/chunks/chunk-DDJN3QII.js +0 -15
  434. package/dist/browser/chunks/chunk-DDJN3QII.js.map +0 -7
  435. package/dist/browser/chunks/chunk-DHB4COFY.js +0 -2
  436. package/dist/browser/chunks/chunk-EJDPYDQI.js +0 -5
  437. package/dist/browser/chunks/chunk-EJDPYDQI.js.map +0 -7
  438. package/dist/browser/chunks/chunk-SFNJRPBV.js +0 -2
  439. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +0 -7
  440. package/dist/browser/chunks/chunk-XAWE4EAK.js +0 -2
  441. package/dist/browser/chunks/chunk-XAWE4EAK.js.map +0 -7
  442. package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
  443. package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
  444. package/dist/browser/jsx-jsx-runtime.js +0 -2
  445. package/dist/browser/jsx-jsx-runtime.js.map +0 -7
@@ -0,0 +1,1020 @@
1
+ import { EasingFunction } from "../../../tween/ease/type.js";
2
+ import { type Command, type CommandArgs } from "../../../tween/command.js";
3
+ import { TweenStepper } from "../../../tween/stepper.js";
4
+ import type { AssetScope } from "../../../assets/scope.js";
5
+ import type { NodeBlendMode } from "../../../attributes/shape/fill/blend.js";
6
+ import { BoxBounds } from "../../../layout/bounds.js";
7
+ import { Vector2 } from "../../../attributes/layout/vector2.js";
8
+ import { Alignment } from "../../../attributes/layout/alignment.js";
9
+ import type { WorldTransform } from "../../../attributes/layout/world-transform.js";
10
+ import { Node, type NodeConfig, type NodeDimension, type NodeProps } from "../../../components/trees/node/node.js";
11
+ import { Matrix2D, type Projection3D } from "../../../attributes/layout/matrix2d.js";
12
+ import { type NodeTransform3D } from "../../../attributes/layout/transform3d.js";
13
+ import { type Affine3, type SpaceCamera } from "../../../attributes/layout/space3d.js";
14
+ import { type SpaceFrame } from "./node-space.js";
15
+ import { SizeConstraints } from "../../../layout/constraints.js";
16
+ import { RenderContext2D, RenderPass2D, SpaceRects } from "../../../render/render-context2d.js";
17
+ import { Clip } from "../../../render/clip.js";
18
+ import { PathBuilder } from "../../../render/descriptors/path-builder.js";
19
+ import type { PathData } from "../../../render/descriptors/path.js";
20
+ import { Size2D, SizeInput } from "../../../attributes/layout/size.js";
21
+ import { Effect } from "../../../attributes/shape/effects/chain.js";
22
+ import { Insets, InsetsResolved } from "../../../attributes/layout/insets.js";
23
+ import { MeasureContext2D } from "../../../render/measure-context.js";
24
+ import type { FlowSettings } from "../../../layout/types.js";
25
+ /**
26
+ * Where a parent puts a child beyond the box it laid it out in: the turn, size,
27
+ * tilt, depth and fade of a slot in an arrangement — a ring of cards, tiles on a
28
+ * sphere. Applied about the box's centre and *before* the child's own
29
+ * transform, so the child's `x`/`y`/`rotation`/`scale`, and every command on
30
+ * them, keep working relative to the slot.
31
+ *
32
+ * Answered by the parent ({@link Node2D._placementOf}) rather than written onto
33
+ * the child, so a child moved to another parent cannot carry a stale slot, and
34
+ * read by the renderer, picking and `global` alike, so a selection box lands on
35
+ * the pixels.
36
+ */
37
+ export interface ChildPlacement {
38
+ /** In-plane turn, degrees clockwise. */
39
+ readonly rotation: number;
40
+ readonly scale: number;
41
+ /** Tilt, degrees — as the child's own `rotationX`/`rotationY`. */
42
+ readonly rotationX: number;
43
+ readonly rotationY: number;
44
+ /** Push toward the viewer, px. Only a space gives it perspective. */
45
+ readonly depth: number;
46
+ /** Multiplies the child's own opacity. */
47
+ readonly opacity: number;
48
+ }
49
+ /**
50
+ * A parent's own coordinates for where its children sit — the units of a graph,
51
+ * say. Position only: a child keeps its size, turn and scale, so a label on a
52
+ * plot follows the plot's range without being stretched by it.
53
+ *
54
+ * Answered by the parent ({@link Node2D._planeOf}) for the reasons a slot is,
55
+ * and read by the renderer, picking, `global` and `moveTo({ target })` alike.
56
+ */
57
+ export interface ChildPlane {
58
+ /** A child's `x`/`y` as a pixel offset, y-up, from the centre of its layout box. */
59
+ toOffset(x: number, y: number): Vector2;
60
+ /** The inverse: the `x`/`y` that put a child at that offset. */
61
+ toCoords(x: number, y: number): Vector2;
62
+ }
63
+ /**
64
+ * A point of a node an editor can drag to set one of its `Vector2` props: the
65
+ * two ends of an arrow. `at` is in the node's own frame, y-up from its origin,
66
+ * the frame {@link Node2D._localBounds} is in.
67
+ */
68
+ export interface NodeHandle {
69
+ readonly prop: string;
70
+ readonly at: Vector2;
71
+ }
72
+ /** Where a node last placed its children, and by what flow: see {@link Node2D._childSpace}. */
73
+ export interface ChildSpace {
74
+ readonly settings: FlowSettings;
75
+ readonly inner: BoxBounds;
76
+ }
77
+ export { Node } from "../../../components/trees/node/node.js";
78
+ export type { NodeChildren, NodeConfig, NodeMetadata, NodeDimension, NodeProps } from "../../../components/trees/node/node.js";
79
+ export type { WorldTransform } from "../../../attributes/layout/world-transform.js";
80
+ export type { PropInput, PropInputs } from "../../../attributes/properties/inputs.js";
81
+ /**
82
+ * The camera props a node pushes around its children — the three inputs
83
+ * `RenderContext2D.beginCamera` takes beyond the viewport rect. See
84
+ * {@link Node2D._cameraScope}.
85
+ */
86
+ /** @internal */
87
+ export interface CameraScope {
88
+ /** World point (y-up) the viewport centres on — what the camera is aimed at. */
89
+ lookAt: Vector2;
90
+ /** Uniform zoom factor. */
91
+ zoom: number;
92
+ /** Viewport rotation in degrees; the renderer applies it as `rotate(-heading)`. */
93
+ heading: number;
94
+ }
95
+ export interface Node2DProps extends NodeProps {
96
+ x: number;
97
+ y: number;
98
+ width: SizeInput;
99
+ height: SizeInput;
100
+ /**
101
+ * Per-child weight for the gap this node contributes to its parent's flex
102
+ * run, `[0, 1]`. See the property's own note — set it to collapse a child
103
+ * without the surrounding gap popping.
104
+ */
105
+ gapScale: number;
106
+ /**
107
+ * Sets `width` and `height` to the same value in one go. Pure sugar: at
108
+ * construction time, an author-facing `size` is expanded into `width`/
109
+ * `height` before either is applied. Explicit `width` or `height` takes
110
+ * precedence over `size` (mirroring `padding`'s side-vs-shorthand rule),
111
+ * so `{ size: 200, width: 100 }` yields `width: 100, height: 200`.
112
+ * Reactive bindings and `to()`/`set()` targets both work the same as
113
+ * `width`/`height` — `size: 'fill'`, `size: () => ...`, or
114
+ * `node.to({ size: 300 }, 0.5)` are all valid.
115
+ */
116
+ size: SizeInput;
117
+ scale: number;
118
+ rotation: number;
119
+ opacity: number;
120
+ /** Layer blend mode. `'pass-through'` (default) does not isolate the node — its opacity scales each child/fill while they blend against the backdrop. Any other mode isolates the node and blends its flattened result against the backdrop. */
121
+ blend: NodeBlendMode;
122
+ effects: Effect;
123
+ /** Inner spacing between this node's edges and its content/children. */
124
+ padding: Insets;
125
+ /** When true, content drawn outside this node's outline is clipped away (see {@link Node2D.clipSelf}). */
126
+ clip: boolean;
127
+ /**
128
+ * Pivot point for rotation and scale. Either a **named alignment** (`'center'`,
129
+ * `'topRight'`, `'bottomLeft'`, … — the node `align` vocabulary) or an explicit
130
+ * {@link Vector2}: `(0,0)`=center, `(-1,1)`=top-left, `(1,-1)`=bottom-right. Set
131
+ * automatically when an alignment *positioning* prop is used.
132
+ */
133
+ pivot: Alignment;
134
+ /**
135
+ * Mirror the node (and its whole subtree) across its vertical centre line.
136
+ * The same thing CSS's `scaleX(-1)` is: text reads backwards, a left-pointing
137
+ * arrow points right, and nothing about the node's box or its layout moves.
138
+ */
139
+ flipHorizontal: boolean;
140
+ /** Mirror across the horizontal centre line — CSS's `scaleY(-1)`. See {@link flipHorizontal}. */
141
+ flipVertical: boolean;
142
+ /** Tilt about the horizontal axis, in **degrees**. Positive tips the top edge away from the viewer. */
143
+ rotationX: number;
144
+ /** Tilt about the vertical axis, in **degrees**. Positive swings the right edge away from the viewer. */
145
+ rotationY: number;
146
+ /**
147
+ * In-plane rotation belonging to the 3D transform, in **degrees** clockwise —
148
+ * the Z axis of the `rotateX · rotateY · rotateZ` block.
149
+ *
150
+ * **Not a second name for {@link rotation}.** The two are independent numbers
151
+ * and editing one never moves the other. What separates them is which side of
152
+ * the geometry/paint line they fall on: `rotation` turns the node's *shape*,
153
+ * so its box turns with it and everything reading that box follows, while
154
+ * this is part of the projection, which is paint (see `Node2D._localMatrix`).
155
+ * Turning a node with `rotation` turns its selection outline; turning it with
156
+ * `rotationZ` spins the picture inside a box that stays where it was.
157
+ *
158
+ * They compose the only way two rotations about one axis can — they add.
159
+ */
160
+ rotationZ: number;
161
+ /**
162
+ * Push along the view axis, in px — CSS's `translateZ`. Positive brings the
163
+ * node toward the viewer, so it projects larger.
164
+ *
165
+ * **Inert without {@link perspective}.** With no perspective the projection is
166
+ * parallel and z is simply dropped, exactly as in CSS: there is no viewpoint
167
+ * for a thing to be nearer to.
168
+ */
169
+ depth: number;
170
+ /**
171
+ * Distance from the viewer to the plane the node sits in, in px. `0` (the
172
+ * default) is no perspective at all — a parallel projection, where a tilt
173
+ * squashes the node evenly rather than making its far edge recede.
174
+ *
175
+ * Smaller is more dramatic: the node subtends more of the field of view, so
176
+ * the convergence is stronger. Somewhere around 800–1500 reads like a page
177
+ * on a desk; a few hundred reads like a wide-angle lens.
178
+ *
179
+ * Declared per node rather than inherited from an ancestor, which is where
180
+ * CSS puts it. A scene graph has no viewport element to hang it on, and a
181
+ * node that carries its own is one that can be handed around, nested and
182
+ * animated without its depth depending on where it was dropped.
183
+ */
184
+ perspective: number;
185
+ /**
186
+ * Whether the node still paints once it has turned past edge-on and is
187
+ * showing its back — CSS's `backface-visibility`, defaulted the CSS way
188
+ * (`visible`).
189
+ *
190
+ * Set it `false` for the card-flip: two nodes back to back, one at
191
+ * `rotationY: 0` and one at `180`, each hidden exactly while the other faces
192
+ * out. The test is the tilt alone (see `facesAway`) — a {@link flipHorizontal}
193
+ * mirrors the node without turning it around, so it does not hide it.
194
+ */
195
+ backfaceVisible: boolean;
196
+ /**
197
+ * The point every rotation, scale and mirror turns about — CSS's
198
+ * `transform-origin`, in the same `[-1, 1]` vocabulary as {@link pivot}
199
+ * (a named alignment, or a {@link Vector2} where `(0,0)` is the centre).
200
+ *
201
+ * Unset (the default) it *is* the pivot, so a node keeps turning about
202
+ * whatever its alignment positioning gave it and nothing changes. Set, it wins
203
+ * for the whole transform rather than for the 3D half of it — one origin, the
204
+ * way CSS has one. A second origin that only some of the rotations respected
205
+ * would produce a picture nobody could predict.
206
+ */
207
+ transformOrigin: Alignment;
208
+ /**
209
+ * All of the above in one bag — construction sugar, expanded into the
210
+ * individual props before anything reads them (exactly as {@link size} is
211
+ * expanded into `width`/`height`), so `set()`, `to()` and reactive callbacks
212
+ * all behave identically whichever form is used.
213
+ *
214
+ * ```ts
215
+ * Rect({ transform3D: { rotationX: 45, rotationY: -17, perspective: 900 } })
216
+ * card().to({ transform3D: { rotationY: 180 } }, 0.8)
217
+ * ```
218
+ *
219
+ * `rotationZ` is the block's own in-plane rotation and is **not** the node's
220
+ * {@link rotation} under another name — see its note for what separates them.
221
+ */
222
+ transform3D: NodeTransform3D;
223
+ center: Vector2 | (() => Vector2);
224
+ topLeft: Vector2 | (() => Vector2);
225
+ topRight: Vector2 | (() => Vector2);
226
+ bottomLeft: Vector2 | (() => Vector2);
227
+ bottomRight: Vector2 | (() => Vector2);
228
+ topCenter: Vector2 | (() => Vector2);
229
+ bottomCenter: Vector2 | (() => Vector2);
230
+ centerLeft: Vector2 | (() => Vector2);
231
+ centerRight: Vector2 | (() => Vector2);
232
+ /**
233
+ * Proportional share of the free space along the parent's main axis,
234
+ * relative to sibling `fill` children (like Flutter's `Expanded(flex:)`).
235
+ * Only meaningful when this node fills the main axis — in a row that's
236
+ * `width:'fill'`, in a column `height:'fill'`. Two siblings with `flex` 2
237
+ * and 1 split the free space 2:1. Defaults to 1. Specifying `flex` without
238
+ * an explicit `width`/`height` defaults both to `'fill'`.
239
+ */
240
+ flex: number;
241
+ /** 1-based column index for explicit grid placement. Undefined = auto-placed. */
242
+ column: number;
243
+ /** 1-based row index for explicit grid placement. Undefined = auto-placed. */
244
+ row: number;
245
+ /** How many grid columns this child spans. Default 1. */
246
+ colSpan: number;
247
+ /** How many grid rows this child spans. Default 1. */
248
+ rowSpan: number;
249
+ }
250
+ /**
251
+ * The 2D tree's base: what every `component2d` lowers onto, and the scene root
252
+ * ({@link Canvas2D}). It wires together three systems:
253
+ *
254
+ * **Properties** — each declared prop is backed by a {@link PropSlot}, which
255
+ * holds either a value or a thunk. {@link set} updates props imperatively, and
256
+ * a callback `() => expr` binds one to a derived value.
257
+ *
258
+ * **Tweening** — `to({ data, duration, easing })` returns a {@link Command}
259
+ * that animates props to target values, evaluable at a time via `at(t)`.
260
+ * `moveTo`, `fadeTo`, `rotateTo`, `scaleTo` and the rest wrap it.
261
+ *
262
+ * **Layout** — `measure()` is called top-down to resolve sizes, then
263
+ * `layout()` places the node in its allocated `BoxBounds` and its children in
264
+ * its content box.
265
+ *
266
+ * ### Built-in visual props
267
+ * | prop | default | unit / notes |
268
+ * |-----------|----------|---------------------------------------|
269
+ * | `x` | 0 | horizontal offset in scene pixels |
270
+ * | `y` | 0 | vertical offset (positive = up) |
271
+ * | `width` | `'fill'` | `SizeInput`: px, `'fill'`, `'auto'` |
272
+ * | `height` | `'fill'` | same |
273
+ * | `size` | — | sugar: sets `width` and `height` together |
274
+ * | `scale` | 1 | uniform scale factor |
275
+ * | `rotate` | 0 | degrees, clockwise |
276
+ * | `opacity` | 1 | 0–1 |
277
+ * | `blend` | `'pass-through'` | layer blend mode (`NodeBlendMode`) |
278
+ * | `effects` | [] | post-process / blend effects |
279
+ * | `padding` | 0 | inner spacing, all four edges |
280
+ */
281
+ export declare class Node2D<P extends Node2DProps = Node2DProps> extends Node<P> {
282
+ get dimension(): NodeDimension;
283
+ /**
284
+ * This node's parent, when that parent is itself 2D.
285
+ *
286
+ * A `Node2D` can only ever be adopted by another `Node2D` (see
287
+ * {@link Node.acceptsChild}), so this is `null` only for a detached node or
288
+ * the root — but it is typed honestly rather than cast, because the base
289
+ * tree holds both dimensions.
290
+ */
291
+ protected get parent2D(): Node2D | null;
292
+ /**
293
+ * This node's parent, narrowed to the 2D tree.
294
+ *
295
+ * Only a `Node2D` can adopt a `Node2D` (see {@link Node.acceptsChild}), so
296
+ * this never hides a real parent — it just spares every 2D caller a cast.
297
+ */
298
+ get parent(): Node2D | null;
299
+ /**
300
+ * This node's children **in the 2D tree**.
301
+ *
302
+ * `Canvas3D` is the one node that holds both dimensions, and its `Node3D`
303
+ * children are not part of the 2D tree — they describe a scene it paints,
304
+ * not boxes it lays out — so they are reached through its own accessor
305
+ * instead. Every other node's list is already 2D, and this returns the live
306
+ * array untouched in that case rather than allocating a copy per read.
307
+ */
308
+ get children(): Node2D[];
309
+ constructor(props?: NodeConfig<any, P>);
310
+ /**
311
+ * The 2D half of `set()`: `size` and `transform3D` are sugar with no slot of
312
+ * their own, so they are distributed into the props that do have one before
313
+ * the generic write loop runs.
314
+ */
315
+ set(props: {
316
+ [K in keyof P]?: P[K] | (() => P[K]);
317
+ }): void;
318
+ /**
319
+ * The 2D half of `_prepareStep`: expand the positional sugar into the props
320
+ * that actually have cells, then let the base resolve the step.
321
+ *
322
+ * `to` is mutated in place, so the base sees the expanded target — which is
323
+ * why this can run entirely before `super`.
324
+ */
325
+ _prepareStep(to: Partial<P>, duration: number, easing?: EasingFunction): TweenStepper;
326
+ /**
327
+ * A component's paint entries declare themselves, so only a node painting
328
+ * something its attributes do not describe has anything to add.
329
+ */
330
+ declareAssets(assets: AssetScope): void;
331
+ /** Sample this node's own derived render state for the current frame. */
332
+ _sample(): void;
333
+ /**
334
+ * Record this node's current position as the motion history's previous
335
+ * frame, stamped `at`, deriving no velocity — see the base's note.
336
+ */
337
+ _primeMotion(at: number): void;
338
+ x: number;
339
+ y: number;
340
+ width: SizeInput;
341
+ height: SizeInput;
342
+ scale: number;
343
+ rotation: number;
344
+ opacity: number;
345
+ blend: NodeBlendMode;
346
+ effects: Effect;
347
+ padding: Insets;
348
+ readonly pivot: Alignment;
349
+ /** Mirror across the vertical centre line. See {@link Node2DProps.flipHorizontal}. */
350
+ flipHorizontal: boolean;
351
+ /** Mirror across the horizontal centre line. See {@link Node2DProps.flipVertical}. */
352
+ flipVertical: boolean;
353
+ /** Tilt about the horizontal axis, degrees. See {@link Node2DProps.rotationX}. */
354
+ rotationX: number;
355
+ /** Tilt about the vertical axis, degrees. See {@link Node2DProps.rotationY}. */
356
+ rotationY: number;
357
+ /** The 3D block's in-plane rotation, degrees — distinct from {@link rotation}. See {@link Node2DProps.rotationZ}. */
358
+ rotationZ: number;
359
+ /** Push along the view axis, px. See {@link Node2DProps.depth}. */
360
+ depth: number;
361
+ /**
362
+ * Viewer distance in px; `0` is a parallel projection. See
363
+ * {@link Node2DProps.perspective}.
364
+ *
365
+ * Tweened in reciprocal space ({@link lerpPerspective}), not linearly: the
366
+ * renderer's own projection math varies with `1/perspective`, so a plain
367
+ * lerp of the raw distance sweeps through the near-zero numbers next to
368
+ * "off" and flashes an exaggerated, near-degenerate projection right at the
369
+ * start of a `0 → n` tween (or the end of an `n → 0` one) before settling
370
+ * to the depth actually asked for.
371
+ */
372
+ perspective: number;
373
+ /** Whether the node paints while showing its back. See {@link Node2DProps.backfaceVisible}. */
374
+ backfaceVisible: boolean;
375
+ /**
376
+ * The point the transform turns about, overriding {@link pivot}. See
377
+ * {@link Node2DProps.transformOrigin}.
378
+ *
379
+ * `undefined` until set — that absence *is* "follow the pivot", which no
380
+ * default value could say, since every alignment is a real point including the
381
+ * centre. Same shape as the `column`/`row` cells above. Declared with a plain
382
+ * `property` rather than `alignmentProperty()` for exactly that reason: that one
383
+ * folds a missing `default` back onto `'center'`.
384
+ */
385
+ transformOrigin: Alignment | undefined;
386
+ /** When true, content drawn by this node's children is clipped to its outline (see {@link clipSelf}). */
387
+ clip: boolean;
388
+ flex: number;
389
+ /**
390
+ * Per-child weight for the flex gap this node contributes to its parent's
391
+ * main axis, in `[0, 1]`. Default `1` = a full gap on each side (normal
392
+ * layout). Driven `0 → 1` (insert) / `1 → 0` (remove) by the animated
393
+ * `addChildAt`/`removeChildAt` overloads so the surrounding gap opens/closes
394
+ * in lockstep with the child's box instead of popping — see
395
+ * {@link addChildAtAnimated}. Read only by flex containers off their
396
+ * children.
397
+ *
398
+ * Rarely set by hand, but it has to be *settable*: a host collapsing a child
399
+ * in place rather than removing it — which is what makes a show/hide a value
400
+ * a time can produce instead of an effect that has to have run — needs the
401
+ * gap to close with it. Declared on {@link Node2DProps} for that reason; it
402
+ * used to be reachable only through a cast, which is why the lifecycle
403
+ * helpers carry one.
404
+ */
405
+ gapScale: number;
406
+ column: number | undefined;
407
+ row: number | undefined;
408
+ colSpan: number;
409
+ rowSpan: number;
410
+ private readonly _layoutBounds;
411
+ /**
412
+ * The size limits and the measurer threaded through this node's last
413
+ * {@link measure} pass.
414
+ *
415
+ * Retained so off-tree work can measure a not-yet-attached child *in
416
+ * isolation* — the animated child-insert in `node-lifecycle.ts` needs a hug
417
+ * child's natural size without putting it in this node's flow first, or the
418
+ * siblings shift for a frame. Undefined until this node is first measured.
419
+ *
420
+ * One object rather than two loose fields, because the two are only ever
421
+ * useful together and were previously reached through a
422
+ * `{ constraints?; _lastScope? }` structural cast from two other modules —
423
+ * a cast that would have gone on compiling through any rename.
424
+ *
425
+ * @internal
426
+ */
427
+ lastMeasure?: {
428
+ constraints: SizeConstraints;
429
+ measurer: MeasureContext2D;
430
+ };
431
+ /**
432
+ * The box the last layout pass allocated this node: its size, and where it
433
+ * sits in its parent's space (canvas y-down).
434
+ *
435
+ * Reactive — a read inside a binding is tracked, so a prop bound to another
436
+ * node's box re-evaluates when that box moves.
437
+ *
438
+ * **Public, and a single member.** It used to be a `protected layoutRect`
439
+ * plus a public `measuredRect` alias that existed only so the picking walk
440
+ * could reach it — and, in practice, a `(node as any).layoutRect` cast in
441
+ * every test that needed a box. Two names for one value, one of them
442
+ * reachable only by lying to the compiler, is worse than the thing
443
+ * `protected` was buying. Writing it is still {@link setLayoutBounds}, which
444
+ * is where the layout engine's invariants live.
445
+ */
446
+ get layoutBounds(): BoxBounds;
447
+ /**
448
+ * {@link flattenChildrenProp}, narrowed to the children this node will
449
+ * actually lay out — a 3D or audio child sits in the same `children` prop but
450
+ * takes no part in 2D layout, so it can't inform the size defaults either.
451
+ */
452
+ protected static flowChildrenProp(props: {
453
+ children?: unknown;
454
+ } | undefined): Node2D[];
455
+ /**
456
+ * True if any of `children` requests `"fill"` on `axis` — the signal a
457
+ * component's size default reads to decide whether hugging on that axis
458
+ * would strand the child with no space to fill into.
459
+ */
460
+ protected static hasFillChild(children: Node2D[], axis: "width" | "height"): boolean;
461
+ /**
462
+ * Default for `width`/`height`: hug-to-content when the node is given
463
+ * children, fill-the-parent when it's empty. Called once from the
464
+ * constructor (skipped when `flex` is set, since that already implies
465
+ * 'fill'); `component2d` replaces it with the component rule.
466
+ */
467
+ protected applyDefaultSize(props?: NodeConfig<any, P>): void;
468
+ /**
469
+ * Animate `x`/`y` to the given position, along `path`, or onto another node.
470
+ * `pivot` (optional) sets {@link Node2DProps.transformOrigin} — the point
471
+ * later rotate/scale turn about — independent of the node's own permanent
472
+ * {@link pivot}, and it carries forward like any other prop until something
473
+ * restates it.
474
+ *
475
+ * `path` replaces the destination rather than qualifying it — stating both is
476
+ * an error, since the path's own end is where the move ends — and the node
477
+ * walks it by **arc length**, so easing shapes the travel rather than the
478
+ * curve's parameter. Its coordinates *are* `x`/`y` values, in the same y-up
479
+ * space a `PathCommand[]` is authored in library-wide: the path says where
480
+ * the node is at `t`, not how far it has come from wherever the previous
481
+ * command left it.
482
+ *
483
+ * `target` is a node id and `targetAnchor` the point of its box to land on
484
+ * (centre when absent), resolved when the command is built — so moving the
485
+ * target re-aims the move with nothing to re-author, and a target absent at
486
+ * that moment leaves the node where it is. Like `path`, it replaces `x`/`y`.
487
+ * Given a `path` as well, the path is turned and scaled about its own start
488
+ * until its end lands on the target, which is exact where the two already
489
+ * agree and keeps the curve's shape where the target has since moved.
490
+ *
491
+ * @example
492
+ * node.moveTo({ data: { x: 200, y: 100, pivot: 'topRight' }, duration: 0.5 });
493
+ * node.moveTo({ data: { path: new PathBuilder().arc({ width: 600, startAngle: 180, sweep: -180 }) }, duration: 2 });
494
+ * node.moveTo({ data: { target: 'card', targetAnchor: 'topRight' }, duration: 1 });
495
+ */
496
+ moveTo(args: CommandArgs<{
497
+ x?: number;
498
+ y?: number;
499
+ path?: PathData | PathBuilder;
500
+ target?: string;
501
+ targetAnchor?: Alignment;
502
+ pivot?: Alignment;
503
+ }> & {
504
+ duration: number;
505
+ }): Command<P>;
506
+ /** Animate `opacity` to the target value, in `[0, 1]`. */
507
+ fadeTo(args: CommandArgs<{
508
+ opacity: number;
509
+ }> & {
510
+ duration: number;
511
+ }): Command<P>;
512
+ /**
513
+ * Animate `rotation` to the target angle (degrees, clockwise). `pivot`
514
+ * (optional) behaves as in {@link moveTo}.
515
+ *
516
+ * @example
517
+ * node.rotateTo({ data: { rotation: 180, pivot: 'topRight' }, duration: 0.6 });
518
+ */
519
+ rotateTo(args: CommandArgs<{
520
+ rotation: number;
521
+ pivot?: Alignment;
522
+ }> & {
523
+ duration: number;
524
+ }): Command<P>;
525
+ /**
526
+ * Animate `scale` to the target factor. `pivot` (optional) behaves as in
527
+ * {@link moveTo}.
528
+ *
529
+ * @example
530
+ * node.scaleTo({ data: { scale: 2, pivot: 'topRight' }, duration: 0.4 });
531
+ */
532
+ scaleTo(args: CommandArgs<{
533
+ scale: number;
534
+ pivot?: Alignment;
535
+ }> & {
536
+ duration: number;
537
+ }): Command<P>;
538
+ /**
539
+ * Animate the box: `width`, `height` and `padding`, whichever are given.
540
+ * A size keyword (`'fill'`, `'hug'`) snaps; a number interpolates.
541
+ *
542
+ * @example
543
+ * node.layoutTo({ data: { width: 640, height: 360 }, duration: 0.5 });
544
+ */
545
+ layoutTo(args: CommandArgs<{
546
+ width?: SizeInput;
547
+ height?: SizeInput;
548
+ padding?: Insets;
549
+ }> & {
550
+ duration: number;
551
+ }): Command<P>;
552
+ /**
553
+ * Swell to `factor` times the node's size and settle back: a nudge of the
554
+ * eye toward it. It ends as it began, so nothing after it needs restating.
555
+ *
556
+ * @example
557
+ * node.pulse({ data: { factor: 1.3 }, duration: 0.6 });
558
+ */
559
+ pulse(args: CommandArgs<{
560
+ factor?: number;
561
+ }> & {
562
+ duration: number;
563
+ }): Command<P>;
564
+ /**
565
+ * Rock about the node's own turn, `angle` degrees each way for `turns`
566
+ * swings, building up and dying away. It ends as it began.
567
+ *
568
+ * @example
569
+ * node.wiggle({ data: { angle: 10, turns: 4 }, duration: 0.8 });
570
+ */
571
+ wiggle(args: CommandArgs<{
572
+ angle?: number;
573
+ turns?: number;
574
+ }> & {
575
+ duration: number;
576
+ }): Command<P>;
577
+ /** Animate the `effects` stack to another one. */
578
+ effectTo(args: CommandArgs<{
579
+ effects: Effect;
580
+ }> & {
581
+ duration: number;
582
+ }): Command<P>;
583
+ get measuredWidth(): number;
584
+ get measuredHeight(): number;
585
+ /** Rotate offset (ox, oy) by this node's rotation (degrees clockwise) around the node center. */
586
+ private _rotateOffset;
587
+ /** Center of the node — equivalent to its x/y position (0,0 is the center of the layout cell). */
588
+ get center(): Vector2;
589
+ get topLeft(): Vector2;
590
+ get topRight(): Vector2;
591
+ get bottomLeft(): Vector2;
592
+ get bottomRight(): Vector2;
593
+ get topCenter(): Vector2;
594
+ get bottomCenter(): Vector2;
595
+ get centerLeft(): Vector2;
596
+ get centerRight(): Vector2;
597
+ /**
598
+ * This node's local transform in canvas (y-down) space — position, rotation,
599
+ * scale, about its origin. Composed with the parent chain by
600
+ * {@link worldMatrix}, and the matrix every world-space *reading* of the node
601
+ * comes from: {@link global}, `runtime/node-picking.ts`, and so any editor
602
+ * overlay drawn on top of a scene.
603
+ *
604
+ * **It is flat, deliberately, and the renderer's is not.** A node that
605
+ * mirrors or tilts ({@link Node2DProps.rotationX}, {@link Node2DProps.perspective},
606
+ * {@link Node2DProps.flipHorizontal}, …) is *painted* through a projected
607
+ * matrix, but goes on measuring, reporting and hit-testing as the upright
608
+ * rectangle it was — see {@link applyTransform}.
609
+ *
610
+ * That is a choice, not an oversight. Everything that reads a node's box
611
+ * reads it to put a handle on: a selection outline, a resize grip, a rotation
612
+ * dial, `other.global.topRight` as an alignment target. Those all mean
613
+ * something on a rectangle and stop meaning it on a trapezoid — a "width"
614
+ * handle on a foreshortened edge does not correspond to any number, and a
615
+ * corner that has swung behind the viewer has no screen position at all.
616
+ * Letting the projection through would make the tilt a thing that quietly
617
+ * breaks every other tool in the editor; keeping the geometry flat makes it
618
+ * exactly what it looks like, a way of drawing the node.
619
+ */
620
+ /** @internal Composed with the camera scopes in between by `runtime/node-picking.ts`. */
621
+ _localMatrix(): Matrix2D;
622
+ /** @internal The slot {@link _placementOf} puts this node in, from its parent. */
623
+ _placement(): ChildPlacement | null;
624
+ /**
625
+ * The slot this node places `child` in beyond its layout box, or `null` —
626
+ * the default — when the box says it all. A layout that turns, scales or
627
+ * fades each of its children answers here, and the renderer, picking and
628
+ * `global` all follow. See {@link ChildPlacement}.
629
+ */
630
+ /** @internal */
631
+ _placementOf(_child: Node2D): ChildPlacement | null;
632
+ /**
633
+ * The coordinates `child`'s `x`/`y` are in, or `null` — the default — when
634
+ * they are pixels. A `null` child asks for one that is not here yet: where
635
+ * a host would drop or paste it. See {@link ChildPlane}.
636
+ */
637
+ /** @internal */
638
+ _planeOf(_child: Node2D | null): ChildPlane | null;
639
+ /**
640
+ * Where its own layout would centre a child of `size` that is not here yet,
641
+ * y-down from its centre, or `null` when it arranges its children in a run
642
+ * or a grid (the run decides) or has not laid any out.
643
+ */
644
+ /** @internal */
645
+ _slotFor(size: Size2D): Vector2 | null;
646
+ /**
647
+ * Where its centre sits from the point its `x`/`y` place, in its parent's
648
+ * frame, y-down, at `rotation` and `scale`: what turning or scaling about an
649
+ * off-centre pivot adds.
650
+ */
651
+ /** @internal */
652
+ _centreShift(rotation?: number, scale?: number): Vector2;
653
+ /** The points an editor may drag on this node, where they sit now; none by default. See {@link NodeHandle}. */
654
+ /** @internal */
655
+ _handles(): readonly NodeHandle[];
656
+ /** The value `prop` takes for its handle to sit at `at`, in this node's own frame; `null` when it has none. */
657
+ /** @internal */
658
+ _handleValue(_prop: string, _at: Vector2): Vector2 | null;
659
+ private readonly _offsetScratch;
660
+ /**
661
+ * This node's `x`/`y` as the pixel offset its parent sees. Every position
662
+ * read goes through here, which is what keeps paint, picking and `global`
663
+ * agreeing under a {@link ChildPlane}. The result is reused: read it at once.
664
+ */
665
+ /** @internal */
666
+ _offset(): Vector2;
667
+ /**
668
+ * The flat part of this node's slot, as the frame its own `x`/`y` move in —
669
+ * the layout box's centre, turned and scaled by the slot. `null` when it has
670
+ * no slot. With `paint`, the slot's tilt as well, which only paint sees.
671
+ */
672
+ /** @internal Also the plane `runtime/node-picking.ts` drags a placed node across. */
673
+ _slotMatrix(paint?: boolean): Matrix2D | null;
674
+ /** @internal {@link _slotMatrix} in a space, where the slot's tilt and depth are geometry. */
675
+ _slotAffine(): Affine3 | null;
676
+ /**
677
+ * The point this node's transform turns about, normalised: `transformOrigin`
678
+ * where one is set, the alignment-derived `pivot` otherwise. One resolution,
679
+ * read by {@link _localMatrix} and {@link applyTransform} alike.
680
+ */
681
+ private _transformOrigin;
682
+ private readonly _projectionScratch;
683
+ /**
684
+ * This node's out-of-plane fields, gathered for the matrix builders — and for
685
+ * the backface test. A space root overrides it, because its 3D props aim the
686
+ * camera rather than turn the root.
687
+ */
688
+ protected _projection(): Projection3D;
689
+ /** @internal This node's transform in its parent's 3D frame, when it is inside a space. See `node-space.ts`. */
690
+ _spaceMatrix(): Affine3;
691
+ /**
692
+ * This node's full transform in canvas (y-down) world space — the product of
693
+ * every ancestor's local matrix from the root down to this node. Walks the
694
+ * live parent chain on every call, reading each node's transform props.
695
+ */
696
+ protected worldMatrix(): Matrix2D;
697
+ /**
698
+ * Resolved world-space transform — the same alignment points and metrics as the
699
+ * local getters (`center`, `topRight`, `rotation`, …) but folded through the
700
+ * full ancestor chain, so values are absolute scene coordinates rather than
701
+ * parent-relative ones. See {@link WorldTransform}. Every field is reactive.
702
+ *
703
+ * @example
704
+ * // Read another node's absolute corner, regardless of its parent:
705
+ * const p = other.global.topRight; // world-space {x, y}
706
+ *
707
+ * ### Reading vs. placing
708
+ * `global` is for *reading* world coordinates. `x`/`y` (and the alignment props)
709
+ * are **parent-relative**, so assigning a world value to them does not by
710
+ * itself place this node in world space — it offsets it from this node's own
711
+ * parent. To land exactly on another node regardless of either parent,
712
+ * subtract this node's parent's world contribution:
713
+ *
714
+ * @example
715
+ * // Place this node's origin exactly on `other`, any parent:
716
+ * new Rect({
717
+ * x: () => other.global.x - (myParent.global.x),
718
+ * y: () => other.global.y - (myParent.global.y),
719
+ * });
720
+ *
721
+ * When both nodes share the same parent origin (e.g. both at the scene root),
722
+ * `x: () => other.global.x` already lands on target with no compensation.
723
+ */
724
+ get global(): WorldTransform;
725
+ /**
726
+ * The `x`/`y` that put this node on `anchor` of the node `id` names, in this
727
+ * tree — or `null` when there is no such 2D node here right now.
728
+ */
729
+ private _pointOnNode;
730
+ addChildAt(args: CommandArgs<{
731
+ child: Node;
732
+ index: number;
733
+ }> & {
734
+ duration?: undefined;
735
+ }): void;
736
+ addChildAt(args: CommandArgs<{
737
+ child: Node;
738
+ index: number;
739
+ }> & {
740
+ duration: number;
741
+ }): Command<Record<string, never>>;
742
+ removeChildAt(args: CommandArgs<{
743
+ index: number;
744
+ }> & {
745
+ duration?: undefined;
746
+ }): Node2D | null;
747
+ removeChildAt(args: CommandArgs<{
748
+ index: number;
749
+ }> & {
750
+ duration: number;
751
+ }): Command<Record<string, never>>;
752
+ private readonly _transformScratch;
753
+ /** Rolling history for the backward-difference velocity estimate. Allocated once (not per frame); mutated in place by {@link _sampleMotion}. */
754
+ private readonly _motionHistory;
755
+ /** Reused per-node state handed to `ctx.begin()` (mirrors `_transformScratch`). */
756
+ private readonly _renderState;
757
+ /**
758
+ * Compute this frame's motion (velocity/direction/speed/angular/scale) into
759
+ * {@link _renderState} as a backward difference against the previous frame,
760
+ * and roll the history forward. Velocity is `0`/`{0,0}` when no trustworthy
761
+ * delta exists — the first frame, or after a non-monotonic time jump (only
762
+ * `0 < dt <= MAX` is trusted, so a scrub that resets the clock reads as
763
+ * "unknown" rather than a spurious huge velocity). The world position
764
+ * matches {@link applyTransform} (`layoutBounds + x`, `layoutBounds - y`,
765
+ * y-down). Called via {@link _sample} every frame; layout-dependent fields
766
+ * (`rects`/`elapsed`) are filled in by {@link renderState} at draw time.
767
+ */
768
+ protected _sampleMotion(): void;
769
+ /**
770
+ * Push this node's transform (position, scale, rotate, opacity, effects).
771
+ *
772
+ * The decomposed fields are the whole story for a node in its own plane, and
773
+ * that path is untouched: the backend translates, rotates and scales exactly
774
+ * as it always has. A node that mirrors or tilts hands over a precomposed
775
+ * {@link TransformState.matrix} instead, built by the same `localMatrix`
776
+ * {@link _localMatrix} calls — with the out-of-plane half switched on.
777
+ *
778
+ * **This is the one place that half is applied.** The mirrors and the tilt
779
+ * are paint, not geometry: the node goes on measuring and hit-testing as the
780
+ * upright rectangle it was, and only what is drawn is projected. See
781
+ * {@link _localMatrix} for why.
782
+ */
783
+ protected applyTransform(ctx: RenderContext2D): void;
784
+ /** What the node paints under its children, between the transform push and the children render: the root's fill. */
785
+ protected renderSelf(ctx: RenderContext2D): void;
786
+ /** What the node paints over its children, clipped to its silhouette: the root's overlay. */
787
+ protected renderOverlay(ctx: RenderContext2D): void;
788
+ /**
789
+ * This node's outline as a {@link Clip}: the boundary `clip` confines its
790
+ * children to, and the silhouette its backdrop effects are confined to.
791
+ * `null` (the default) is no outline, so its children render unclipped and
792
+ * it gets no backdrop effects. A component answers with the shape its
793
+ * `render` paints.
794
+ */
795
+ protected clipSelf(): Clip | null;
796
+ /**
797
+ * The camera scope this node pushes around its **children** (`beginCamera`),
798
+ * or `null` when it pushes none. Only {@link Canvas2D} and a component whose
799
+ * `render` opens a camera answer, each non-null exactly when it actually
800
+ * opens one — so a consumer can reproduce the renderer's transform *and* its
801
+ * viewport clip without knowing which types have a camera.
802
+ *
803
+ * Read by `runtime/node-picking.ts`: a camera is applied at render time only,
804
+ * so it is not part of {@link worldMatrix}, and a node's on-screen box would
805
+ * be offset without it. `@internal`.
806
+ */
807
+ /** @internal */
808
+ _cameraScope(): CameraScope | null;
809
+ /**
810
+ * The camera this node opens a 2.5D space with, or `null` when it opens none.
811
+ * Only a space root overrides it: its children, and theirs, are then placed
812
+ * in one 3D frame and seen through this camera. See `node-space.ts`.
813
+ */
814
+ /** @internal */
815
+ _spaceCamera(): SpaceCamera | null;
816
+ /**
817
+ * Whether this node hands its children on into the space it sits in. False
818
+ * for a node that composites its children itself — a mask, a boolean, a
819
+ * nested camera — which flattens its subtree into its own plane, where the
820
+ * per-node 3D rules apply again. Picking reads it; the renderer gets the same
821
+ * answer because such a node never reaches the base {@link renderChildren}.
822
+ */
823
+ /** @internal */
824
+ _rendersChildrenInSpace(): boolean;
825
+ /** @internal Set by the parent for the length of this node's render while it is inside a space. */
826
+ _spaceFrame: SpaceFrame | null;
827
+ /**
828
+ * Whether the renderer confines this node's children to its own box — either
829
+ * because `clip` is set *and* the node has an outline to clip to (a bare
830
+ * `clip` with no {@link clipSelf} is a no-op, see {@link applyClip}), or
831
+ * because it opens a camera scope, which clips to the viewport rect.
832
+ *
833
+ * Read by `runtime/node-picking.ts`: a point outside a confining node cannot
834
+ * hit anything inside it, so the whole subtree is skipped. `@internal`.
835
+ */
836
+ /** @internal */
837
+ _confinesChildren(): boolean;
838
+ /**
839
+ * Whether `local` — a point in this node's local space (centred on the node,
840
+ * y-up, rotation and scale already removed) — is inside the node, within
841
+ * `tolerance` scene units of its edge.
842
+ *
843
+ * The default is the layout box, which is the right answer for containers,
844
+ * text, and media: their box *is* their extent. A component narrows it to
845
+ * the outline its `render` paints.
846
+ *
847
+ * `tolerance` is grab-slop, applied outward. An editor passes its
848
+ * zoom-corrected pixel slop so the grab area stays constant on screen
849
+ * regardless of preview zoom.
850
+ */
851
+ protected hitTestSelf(local: Vector2, tolerance: number): boolean;
852
+ /**
853
+ * The extent of this node's ink in its own local space — what an editor draws
854
+ * a selection box around, and the region the default {@link hitTestSelf}
855
+ * grabs.
856
+ *
857
+ * The returned {@link BoxBounds} is **y-up and relative to the node's own
858
+ * centre**: `x`/`y` are where the ink's centre sits relative to the node,
859
+ * normally `(0, 0)`. That is a different space from `layoutBounds`, which is
860
+ * the same type but canvas y-down and relative to the parent — see
861
+ * `BoxBounds`, which deliberately does not encode a space.
862
+ *
863
+ * Defaults to the layout box, centred on the node, which is right for every
864
+ * node whose drawing fills its cell. It is a separate seam from the layout
865
+ * rect because for some nodes the two genuinely differ: a boolean group or
866
+ * a mask is drawn where its children's ink is, which can be both a different
867
+ * size *and* off-centre from its own cell. A component's `bounds` answers
868
+ * here, fixing the box and the grab region together without perturbing layout.
869
+ */
870
+ /** @internal */
871
+ _localBounds(): BoxBounds;
872
+ /** @internal Dispatch seam so `node-picking.ts` can reach the protected override. */
873
+ _hitTestSelf(local: Vector2, tolerance: number): boolean;
874
+ /**
875
+ * Open `clipSelf()`'s outline as a clip scope, confining whatever is drawn
876
+ * until the matching `ctx.endClip()` to the shape. Returns `true` when a
877
+ * clip was actually opened (so the caller knows to close it) and `false`
878
+ * when the node has no outline (the default).
879
+ */
880
+ protected applyClip(ctx: RenderContext2D): boolean;
881
+ /**
882
+ * Apply backdrop effects (any `mode: "backdrop"` effect — blur, grayscale, …;
883
+ * plus magnify and backdrop SkSL) beneath this node, clipped to its
884
+ * silhouette, before the node's own content is drawn — so the content
885
+ * underneath is filtered/warped while the node's own edges stay sharp. One
886
+ * backdrop effect scope, confined to the silhouette clip, runs the lot; the
887
+ * renderer routes each effect to a filter or shader pass. A no-op for nodes
888
+ * without a {@link clipSelf} outline (there's no silhouette to confine to).
889
+ */
890
+ private applyBackdropEffects;
891
+ /**
892
+ * Run `body` (this node's own painting + children) inside the node's effect
893
+ * scopes, so effects behave identically however a node draws. The caller
894
+ * has already pushed the node's transform ({@link applyTransform}).
895
+ * Outermost-first: {@link applyBackdropEffects} beneath the node, confined
896
+ * to its {@link clipSelf} silhouette, then a `foreground` effect scope
897
+ * capturing everything `body` paints.
898
+ */
899
+ protected renderContentWithEffects(ctx: RenderContext2D, body: () => void): void;
900
+ protected renderChildren(ctx: RenderPass2D): void;
901
+ /**
902
+ * Paint the children placed in `frame`, far to near rather than in authored
903
+ * order — each with its frame set for exactly the length of its own render,
904
+ * so a node reached any other way (a mask's children, a `Tex.surface`
905
+ * source) draws flat.
906
+ */
907
+ /** @internal A space root opens its space through this. */
908
+ protected _renderInSpace(ctx: RenderPass2D, frame: SpaceFrame): void;
909
+ /** Run `paint` confined to `cut` — the part of the node in front of the lens — when there is one. */
910
+ private _paintInFront;
911
+ /**
912
+ * This node's per-frame render state, resolved for the scope {@link render}
913
+ * is about to open.
914
+ *
915
+ * Motion was already sampled when the clock advanced; only the
916
+ * layout-dependent fields are filled in here, where layout is current.
917
+ */
918
+ private renderState;
919
+ /**
920
+ * Reference rects for fills with `space:'parent'`, expressed in this node's
921
+ * local space (origin = this node's positioned centre, y-down to match the
922
+ * canvas). The viewport (`space:'global'`) is resolved by the renderer, which
923
+ * knows the surface size. Rotation/scale of this node are not folded in —
924
+ * the rect is the axis-aligned parent box, which is what gradients expect.
925
+ */
926
+ protected _spaceRects(): SpaceRects;
927
+ /**
928
+ * Draw this node and its subtree: the skip checks, then this node's draw
929
+ * scope around {@link renderContent}.
930
+ *
931
+ * Takes a {@link RenderPass2D} rather than a bare {@link RenderContext2D}
932
+ * because opening this node's draw scope is *this* method's job; what it
933
+ * calls is handed the narrower surface, so nothing below can open one.
934
+ */
935
+ render(ctx: RenderPass2D): void;
936
+ /**
937
+ * Everything this node paints: its transform, its effect envelope, its own
938
+ * drawing, its children and its overlay. A component's `render` replaces it,
939
+ * keeping every guard {@link render} performs above it.
940
+ */
941
+ protected renderContent(ctx: RenderPass2D): void;
942
+ /** Whether the node shows its back — to the space's camera when it is in one, else by its own tilt. */
943
+ private _facesAway;
944
+ /** What {@link measure} hands {@link layoutChildren} within a pass; consumed there. */
945
+ private _flowMeasure;
946
+ /**
947
+ * The content box its children were last placed in, y-down from this
948
+ * node's centre, and the flow that placed them: what {@link _slotFor}
949
+ * answers from. A component's flow layout records it too (`Flow.layout`).
950
+ */
951
+ /** @internal */
952
+ _childSpace: ChildSpace | null;
953
+ private _flowWarned;
954
+ /**
955
+ * Record this node's allocated bounds without touching children.
956
+ *
957
+ * Compared field by field, because every caller builds a fresh object literal,
958
+ * so identity always differs — including on every frame of a node that is
959
+ * simply sitting still. Skipping the write keeps the object stable for the
960
+ * aliasing reason below.
961
+ */
962
+ protected setLayoutBounds(rect: BoxBounds): void;
963
+ /**
964
+ * The children this node lays out itself — its 2D children, minus the hidden
965
+ * ones. Every measure and layout pass in a container iterates *this*, not
966
+ * `children`.
967
+ *
968
+ * Returns the live array untouched in the common case, so an ordinary tree
969
+ * allocates nothing per pass.
970
+ */
971
+ flowChildren(): Node2D[];
972
+ /**
973
+ * The inset children are laid out within. A node with a stroke to clear adds
974
+ * the part of it that intrudes (see `Paint.inset`).
975
+ */
976
+ effectivePadding(): InsetsResolved;
977
+ /**
978
+ * How this node arranges its children: centred freeform. The root answers
979
+ * with its own layout props; a component lays its children out with `Flow`.
980
+ */
981
+ protected flowArrangement(): FlowSettings;
982
+ /** Record `rect`, then place the flow children in it — see {@link layoutChildren}. */
983
+ layout(rect: BoxBounds, scope: MeasureContext2D): void;
984
+ /**
985
+ * Place the flow children in `rect`'s content box by {@link flowArrangement}.
986
+ *
987
+ * Reuses what {@link measure} found when the box is the one it measured in —
988
+ * or, on an axis that hugs, exactly what it hugged — and measures again
989
+ * otherwise: a parent laying this node out at a size it did not measure it
990
+ * for would leave the children arranged for the wrong box.
991
+ */
992
+ protected layoutChildren(rect: BoxBounds, scope: MeasureContext2D): void;
993
+ /**
994
+ * Resolve `width`/`height`, measuring the flow children by
995
+ * {@link flowArrangement}: a `'hug'` axis wraps what they come to, plus this
996
+ * node's padding. What it finds is kept for {@link layoutChildren}.
997
+ *
998
+ * Only flow children are measured: a canvas-pinned child is sized against the
999
+ * canvas, so hugging it would shrink-wrap a box this node never contains.
1000
+ */
1001
+ measure(constraints: SizeConstraints, scope: MeasureContext2D): Partial<Size2D>;
1002
+ reparent(args: CommandArgs<{
1003
+ newParent: Node2D;
1004
+ }> & {
1005
+ duration?: undefined;
1006
+ }): void;
1007
+ reparent(args: CommandArgs<{
1008
+ newParent: Node2D;
1009
+ }> & {
1010
+ duration: number;
1011
+ }): Command<Record<string, never>>;
1012
+ }
1013
+ /** The 2D node `id` names anywhere in the tree `from` is in, or `null`. */
1014
+ export declare function findNode2D(from: Node, id: string): Node2D | null;
1015
+ /**
1016
+ * Where `node`'s frame sits in `host`'s, wherever each is in the tree: its
1017
+ * centre as an offset (y-up) from `host`'s, and its turn and scale relative to it.
1018
+ */
1019
+ export declare function frameIn(host: Node2D, node: Node2D): Vector2 & Pick<WorldTransform, "rotation" | "scale">;
1020
+ //# sourceMappingURL=node2d.d.ts.map