@motionscript/core 0.1.0-alpha.3 → 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 (904) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +48 -0
  4. package/README.md +93 -72
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +9 -0
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +11 -0
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts.map +1 -1
  11. package/dist/assets/errors.js +8 -3
  12. package/dist/assets/errors.js.map +1 -1
  13. package/dist/assets/index.js.map +1 -1
  14. package/dist/assets/manager.d.ts +26 -1
  15. package/dist/assets/manager.d.ts.map +1 -1
  16. package/dist/assets/manager.js +79 -4
  17. package/dist/assets/manager.js.map +1 -1
  18. package/dist/assets/manifest.js.map +1 -1
  19. package/dist/assets/record.js.map +1 -1
  20. package/dist/assets/scope.d.ts +3 -3
  21. package/dist/assets/scope.d.ts.map +1 -1
  22. package/dist/assets/scope.js.map +1 -1
  23. package/dist/attributes/audio/filters/chain.d.ts +1 -1
  24. package/dist/attributes/audio/filters/chain.js.map +1 -1
  25. package/dist/attributes/audio/filters/curve.d.ts +8 -8
  26. package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
  27. package/dist/attributes/audio/filters/curve.js +20 -19
  28. package/dist/attributes/audio/filters/curve.js.map +1 -1
  29. package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
  30. package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
  31. package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
  32. package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
  33. package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
  34. package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
  35. package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
  36. package/dist/attributes/audio/filters/index.d.ts +1 -1
  37. package/dist/attributes/audio/filters/index.d.ts.map +1 -1
  38. package/dist/attributes/audio/filters/index.js +1 -1
  39. package/dist/attributes/audio/filters/index.js.map +1 -1
  40. package/dist/attributes/audio/filters/registry.js.map +1 -1
  41. package/dist/attributes/audio/filters/union.js.map +1 -1
  42. package/dist/attributes/audio/request.d.ts +17 -2
  43. package/dist/attributes/audio/request.d.ts.map +1 -1
  44. package/dist/attributes/audio/request.js.map +1 -1
  45. package/dist/attributes/audio/schedule.d.ts +4 -2
  46. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  47. package/dist/attributes/audio/schedule.js +15 -8
  48. package/dist/attributes/audio/schedule.js.map +1 -1
  49. package/dist/attributes/audio/sound.d.ts +4 -2
  50. package/dist/attributes/audio/sound.d.ts.map +1 -1
  51. package/dist/attributes/audio/sound.js +8 -4
  52. package/dist/attributes/audio/sound.js.map +1 -1
  53. package/dist/attributes/index.js.map +1 -1
  54. package/dist/attributes/layout/alignment.js +1 -1
  55. package/dist/attributes/layout/alignment.js.map +1 -1
  56. package/dist/attributes/layout/index.js.map +1 -1
  57. package/dist/attributes/layout/insets.js.map +1 -1
  58. package/dist/attributes/layout/matrix2d.js.map +1 -1
  59. package/dist/attributes/layout/size.js.map +1 -1
  60. package/dist/attributes/layout/transform3d.js.map +1 -1
  61. package/dist/attributes/layout/vector2.js.map +1 -1
  62. package/dist/attributes/layout/world-transform.js.map +1 -1
  63. package/dist/attributes/mask/boolean.js.map +1 -1
  64. package/dist/attributes/mask/mask.js.map +1 -1
  65. package/dist/attributes/properties/decorator.d.ts +3 -1
  66. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  67. package/dist/attributes/properties/decorator.js.map +1 -1
  68. package/dist/attributes/properties/inputs.js.map +1 -1
  69. package/dist/attributes/properties/typed.d.ts +9 -2
  70. package/dist/attributes/properties/typed.d.ts.map +1 -1
  71. package/dist/attributes/properties/typed.js +15 -1
  72. package/dist/attributes/properties/typed.js.map +1 -1
  73. package/dist/attributes/render3d/orbit.d.ts +8 -8
  74. package/dist/attributes/render3d/orbit.js +7 -7
  75. package/dist/attributes/render3d/orbit.js.map +1 -1
  76. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  77. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  78. package/dist/attributes/shape/corners/corners.js.map +1 -1
  79. package/dist/attributes/shape/corners/index.js.map +1 -1
  80. package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
  81. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  82. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  83. package/dist/attributes/shape/effects/chain.d.ts +28 -120
  84. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  85. package/dist/attributes/shape/effects/chain.js +16 -88
  86. package/dist/attributes/shape/effects/chain.js.map +1 -1
  87. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  88. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  89. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  90. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  91. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  92. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  93. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  94. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  95. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +2 -2
  96. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  97. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
  98. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  99. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  100. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  101. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  102. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  104. package/dist/attributes/shape/effects/implementations/glass.d.ts +15 -24
  105. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  106. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  108. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  110. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  112. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/lut.d.ts +1 -1
  114. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/shader.js +15 -8
  128. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  136. package/dist/attributes/shape/effects/index.d.ts +2 -6
  137. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  138. package/dist/attributes/shape/effects/index.js.map +1 -1
  139. package/dist/attributes/shape/effects/registry.d.ts +23 -6
  140. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  141. package/dist/attributes/shape/effects/registry.js +44 -10
  142. package/dist/attributes/shape/effects/registry.js.map +1 -1
  143. package/dist/attributes/shape/effects/union.d.ts +2 -6
  144. package/dist/attributes/shape/effects/union.d.ts.map +1 -1
  145. package/dist/attributes/shape/effects/union.js.map +1 -1
  146. package/dist/attributes/shape/fill/blend.js.map +1 -1
  147. package/dist/attributes/shape/fill/chain.js.map +1 -1
  148. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  149. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  150. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  151. package/dist/attributes/shape/fill/color/parser.js +81 -44
  152. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  153. package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
  154. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
  155. package/dist/attributes/shape/fill/gradient-stops.js +65 -0
  156. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
  157. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  158. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  159. package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
  160. package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
  161. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  162. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  163. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  164. package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
  165. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  166. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  167. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  168. package/dist/attributes/shape/fill/implementations/image.js +5 -4
  169. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  170. package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
  171. package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
  172. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  173. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  174. package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
  175. package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
  176. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  177. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  178. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  179. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  180. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  181. package/dist/attributes/shape/fill/index.js.map +1 -1
  182. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  183. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  184. package/dist/attributes/shape/fill/registry.js.map +1 -1
  185. package/dist/attributes/shape/fill/union.js.map +1 -1
  186. package/dist/attributes/shape/filters/chain.d.ts +4 -10
  187. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  188. package/dist/attributes/shape/filters/chain.js +1 -13
  189. package/dist/attributes/shape/filters/chain.js.map +1 -1
  190. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  191. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  192. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  193. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  194. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  195. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  196. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  197. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  198. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  199. package/dist/attributes/shape/filters/index.d.ts +1 -1
  200. package/dist/attributes/shape/filters/index.js.map +1 -1
  201. package/dist/attributes/shape/filters/registry.d.ts +2 -2
  202. package/dist/attributes/shape/filters/registry.js +3 -3
  203. package/dist/attributes/shape/filters/registry.js.map +1 -1
  204. package/dist/attributes/shape/filters/union.d.ts +6 -7
  205. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  206. package/dist/attributes/shape/filters/union.js.map +1 -1
  207. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  208. package/dist/attributes/shape/path/anchors.js +12 -5
  209. package/dist/attributes/shape/path/anchors.js.map +1 -1
  210. package/dist/attributes/shape/path/bezier.js.map +1 -1
  211. package/dist/attributes/shape/path/index.js.map +1 -1
  212. package/dist/attributes/shape/path/measure.js.map +1 -1
  213. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  214. package/dist/attributes/shape/path/morph.js +16 -4
  215. package/dist/attributes/shape/path/morph.js.map +1 -1
  216. package/dist/attributes/shape/path/ops.js.map +1 -1
  217. package/dist/attributes/shape/path/types.js.map +1 -1
  218. package/dist/attributes/shape/path/walk.js.map +1 -1
  219. package/dist/attributes/shape/shaders/index.js.map +1 -1
  220. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  221. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  222. package/dist/attributes/shape/shadow/index.js.map +1 -1
  223. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  224. package/dist/attributes/shape/stroke/index.d.ts +2 -2
  225. package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
  226. package/dist/attributes/shape/stroke/index.js +1 -1
  227. package/dist/attributes/shape/stroke/index.js.map +1 -1
  228. package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
  229. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  230. package/dist/attributes/shape/stroke/stroke.js +22 -2
  231. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  232. package/dist/attributes/shared/operators.js.map +1 -1
  233. package/dist/attributes/text/index.js.map +1 -1
  234. package/dist/attributes/text/ops.d.ts +6 -0
  235. package/dist/attributes/text/ops.d.ts.map +1 -1
  236. package/dist/attributes/text/ops.js +1 -0
  237. package/dist/attributes/text/ops.js.map +1 -1
  238. package/dist/attributes/text/types.js.map +1 -1
  239. package/dist/browser/chunks/chunk-2RIYH36X.js +3 -0
  240. package/dist/browser/chunks/chunk-2RIYH36X.js.map +7 -0
  241. package/dist/browser/chunks/chunk-DDJN3QII.js +15 -0
  242. package/dist/browser/chunks/chunk-DDJN3QII.js.map +7 -0
  243. package/dist/browser/chunks/chunk-DHB4COFY.js +2 -0
  244. package/dist/browser/chunks/chunk-DHB4COFY.js.map +7 -0
  245. package/dist/browser/chunks/chunk-EJDPYDQI.js +5 -0
  246. package/dist/browser/chunks/chunk-EJDPYDQI.js.map +7 -0
  247. package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
  248. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
  249. package/dist/browser/chunks/chunk-XAWE4EAK.js +2 -0
  250. package/dist/browser/chunks/chunk-XAWE4EAK.js.map +7 -0
  251. package/dist/browser/component.js +1 -1
  252. package/dist/browser/component.js.map +4 -4
  253. package/dist/browser/experimental.js +2 -0
  254. package/dist/browser/experimental.js.map +7 -0
  255. package/dist/browser/index.js +1 -1
  256. package/dist/browser/index.js.map +4 -4
  257. package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
  258. package/dist/browser/jsx-jsx-runtime.js +1 -1
  259. package/dist/browser/manifest.json +4 -2
  260. package/dist/browser/sdk.js +1 -1
  261. package/dist/component/api.d.ts +508 -0
  262. package/dist/component/api.d.ts.map +1 -0
  263. package/dist/component/api.js +4 -0
  264. package/dist/component/api.js.map +1 -0
  265. package/dist/component/builtins/audio.d.ts +26 -0
  266. package/dist/component/builtins/audio.d.ts.map +1 -0
  267. package/dist/component/builtins/audio.js +41 -0
  268. package/dist/component/builtins/audio.js.map +1 -0
  269. package/dist/component/builtins/canvas3d.d.ts +98 -0
  270. package/dist/component/builtins/canvas3d.d.ts.map +1 -0
  271. package/dist/component/builtins/canvas3d.js +21 -0
  272. package/dist/component/builtins/canvas3d.js.map +1 -0
  273. package/dist/component/builtins/composite.d.ts +56 -0
  274. package/dist/component/builtins/composite.d.ts.map +1 -0
  275. package/dist/component/builtins/composite.js +25 -0
  276. package/dist/component/builtins/composite.js.map +1 -0
  277. package/dist/component/builtins/geometry.d.ts +505 -0
  278. package/dist/component/builtins/geometry.d.ts.map +1 -0
  279. package/dist/component/builtins/geometry.js +107 -0
  280. package/dist/component/builtins/geometry.js.map +1 -0
  281. package/dist/component/builtins/layout.d.ts +88 -0
  282. package/dist/component/builtins/layout.d.ts.map +1 -0
  283. package/dist/component/builtins/layout.js +84 -0
  284. package/dist/component/builtins/layout.js.map +1 -0
  285. package/dist/component/builtins/media.d.ts +95 -0
  286. package/dist/component/builtins/media.d.ts.map +1 -0
  287. package/dist/component/builtins/media.js +149 -0
  288. package/dist/component/builtins/media.js.map +1 -0
  289. package/dist/component/builtins/providers.d.ts +23 -0
  290. package/dist/component/builtins/providers.d.ts.map +1 -0
  291. package/dist/component/builtins/providers.js +30 -0
  292. package/dist/component/builtins/providers.js.map +1 -0
  293. package/dist/component/builtins/text.d.ts +193 -0
  294. package/dist/component/builtins/text.d.ts.map +1 -0
  295. package/dist/component/builtins/text.js +113 -0
  296. package/dist/component/builtins/text.js.map +1 -0
  297. package/dist/component/builtins/three.d.ts +1085 -0
  298. package/dist/component/builtins/three.d.ts.map +1 -0
  299. package/dist/component/builtins/three.js +265 -0
  300. package/dist/component/builtins/three.js.map +1 -0
  301. package/dist/component/clip-of.d.ts +5 -0
  302. package/dist/component/clip-of.d.ts.map +1 -0
  303. package/dist/component/clip-of.js +33 -0
  304. package/dist/component/clip-of.js.map +1 -0
  305. package/dist/component/commands-for.d.ts +19 -0
  306. package/dist/component/commands-for.d.ts.map +1 -0
  307. package/dist/component/commands-for.js +5 -0
  308. package/dist/component/commands-for.js.map +1 -0
  309. package/dist/component/component-audio.d.ts +9 -0
  310. package/dist/component/component-audio.d.ts.map +1 -0
  311. package/dist/component/component-audio.js +18 -0
  312. package/dist/component/component-audio.js.map +1 -0
  313. package/dist/component/component2d.d.ts +9 -0
  314. package/dist/component/component2d.d.ts.map +1 -0
  315. package/dist/component/component2d.js +239 -0
  316. package/dist/component/component2d.js.map +1 -0
  317. package/dist/component/component3d.d.ts +9 -0
  318. package/dist/component/component3d.d.ts.map +1 -0
  319. package/dist/component/component3d.js +99 -0
  320. package/dist/component/component3d.js.map +1 -0
  321. package/dist/component/factory.d.ts +63 -0
  322. package/dist/component/factory.d.ts.map +1 -0
  323. package/dist/component/factory.js +313 -0
  324. package/dist/component/factory.js.map +1 -0
  325. package/dist/component/modules/aim.d.ts +30 -0
  326. package/dist/component/modules/aim.d.ts.map +1 -0
  327. package/dist/component/modules/aim.js +39 -0
  328. package/dist/component/modules/aim.js.map +1 -0
  329. package/dist/component/modules/corners.d.ts +13 -0
  330. package/dist/component/modules/corners.d.ts.map +1 -0
  331. package/dist/component/modules/corners.js +12 -0
  332. package/dist/component/modules/corners.js.map +1 -0
  333. package/dist/component/modules/flow.d.ts +26 -0
  334. package/dist/component/modules/flow.d.ts.map +1 -0
  335. package/dist/component/modules/flow.js +55 -0
  336. package/dist/component/modules/flow.js.map +1 -0
  337. package/dist/component/modules/material.d.ts +40 -0
  338. package/dist/component/modules/material.d.ts.map +1 -0
  339. package/dist/component/modules/material.js +75 -0
  340. package/dist/component/modules/material.js.map +1 -0
  341. package/dist/component/modules/paint.d.ts +71 -0
  342. package/dist/component/modules/paint.d.ts.map +1 -0
  343. package/dist/component/modules/paint.js +106 -0
  344. package/dist/component/modules/paint.js.map +1 -0
  345. package/dist/component/modules/shapes.d.ts +31 -0
  346. package/dist/component/modules/shapes.d.ts.map +1 -0
  347. package/dist/component/modules/shapes.js +43 -0
  348. package/dist/component/modules/shapes.js.map +1 -0
  349. package/dist/component/modules/text-layout.d.ts +26 -0
  350. package/dist/component/modules/text-layout.d.ts.map +1 -0
  351. package/dist/component/modules/text-layout.js +57 -0
  352. package/dist/component/modules/text-layout.js.map +1 -0
  353. package/dist/component/modules/text-style.d.ts +48 -0
  354. package/dist/component/modules/text-style.d.ts.map +1 -0
  355. package/dist/component/modules/text-style.js +63 -0
  356. package/dist/component/modules/text-style.js.map +1 -0
  357. package/dist/component/modules/three-entries.d.ts +23 -0
  358. package/dist/component/modules/three-entries.d.ts.map +1 -0
  359. package/dist/component/modules/three-entries.js +41 -0
  360. package/dist/component/modules/three-entries.js.map +1 -0
  361. package/dist/component/modules/view3d.d.ts +55 -0
  362. package/dist/component/modules/view3d.d.ts.map +1 -0
  363. package/dist/component/modules/view3d.js +160 -0
  364. package/dist/component/modules/view3d.js.map +1 -0
  365. package/dist/component/timeline.d.ts +22 -0
  366. package/dist/component/timeline.d.ts.map +1 -0
  367. package/dist/component/timeline.js +128 -0
  368. package/dist/component/timeline.js.map +1 -0
  369. package/dist/component/type-def.d.ts +26 -0
  370. package/dist/component/type-def.d.ts.map +1 -0
  371. package/dist/component/type-def.js +16 -0
  372. package/dist/component/type-def.js.map +1 -0
  373. package/dist/component/types.d.ts +91 -0
  374. package/dist/component/types.d.ts.map +1 -0
  375. package/dist/component/types.js +88 -0
  376. package/dist/component/types.js.map +1 -0
  377. package/dist/component/views.d.ts +121 -0
  378. package/dist/component/views.d.ts.map +1 -0
  379. package/dist/component/views.js +413 -0
  380. package/dist/component/views.js.map +1 -0
  381. package/dist/component.d.ts +4 -5
  382. package/dist/component.d.ts.map +1 -1
  383. package/dist/component.js +3 -5
  384. package/dist/component.js.map +1 -1
  385. package/dist/document/audio.d.ts +10 -2
  386. package/dist/document/audio.d.ts.map +1 -1
  387. package/dist/document/audio.js +45 -4
  388. package/dist/document/audio.js.map +1 -1
  389. package/dist/document/builtins.d.ts.map +1 -1
  390. package/dist/document/builtins.js +15 -39
  391. package/dist/document/builtins.js.map +1 -1
  392. package/dist/document/command-traits.d.ts +1 -1
  393. package/dist/document/command-traits.js +16 -1
  394. package/dist/document/command-traits.js.map +1 -1
  395. package/dist/document/deny-globals.js.map +1 -1
  396. package/dist/document/diff.d.ts.map +1 -1
  397. package/dist/document/diff.js +3 -3
  398. package/dist/document/diff.js.map +1 -1
  399. package/dist/document/doc-index.d.ts +2 -2
  400. package/dist/document/doc-index.d.ts.map +1 -1
  401. package/dist/document/doc-index.js +3 -3
  402. package/dist/document/doc-index.js.map +1 -1
  403. package/dist/document/expression/compile.d.ts.map +1 -1
  404. package/dist/document/expression/compile.js +8 -5
  405. package/dist/document/expression/compile.js.map +1 -1
  406. package/dist/document/expression/index.js.map +1 -1
  407. package/dist/document/expression/ops.js +1 -1
  408. package/dist/document/expression/ops.js.map +1 -1
  409. package/dist/document/expression/parse.d.ts.map +1 -1
  410. package/dist/document/expression/parse.js +15 -6
  411. package/dist/document/expression/parse.js.map +1 -1
  412. package/dist/document/expression/refs.d.ts +1 -1
  413. package/dist/document/expression/refs.js +1 -1
  414. package/dist/document/expression/refs.js.map +1 -1
  415. package/dist/document/expression/types.js.map +1 -1
  416. package/dist/document/expression/walk.d.ts.map +1 -1
  417. package/dist/document/expression/walk.js +2 -1
  418. package/dist/document/expression/walk.js.map +1 -1
  419. package/dist/document/index.d.ts +2 -0
  420. package/dist/document/index.d.ts.map +1 -1
  421. package/dist/document/index.js +2 -0
  422. package/dist/document/index.js.map +1 -1
  423. package/dist/document/node-decorator.js.map +1 -1
  424. package/dist/document/node-descriptor.d.ts +25 -0
  425. package/dist/document/node-descriptor.d.ts.map +1 -1
  426. package/dist/document/node-descriptor.js.map +1 -1
  427. package/dist/document/placement.d.ts +70 -0
  428. package/dist/document/placement.d.ts.map +1 -0
  429. package/dist/document/placement.js +83 -0
  430. package/dist/document/placement.js.map +1 -0
  431. package/dist/document/project.d.ts +2 -2
  432. package/dist/document/project.d.ts.map +1 -1
  433. package/dist/document/project.js.map +1 -1
  434. package/dist/document/registry.d.ts +23 -11
  435. package/dist/document/registry.d.ts.map +1 -1
  436. package/dist/document/registry.js +46 -19
  437. package/dist/document/registry.js.map +1 -1
  438. package/dist/document/settled-index.d.ts +49 -0
  439. package/dist/document/settled-index.d.ts.map +1 -0
  440. package/dist/document/settled-index.js +247 -0
  441. package/dist/document/settled-index.js.map +1 -0
  442. package/dist/document/timeline-patch.js.map +1 -1
  443. package/dist/document/timeline.d.ts +100 -19
  444. package/dist/document/timeline.d.ts.map +1 -1
  445. package/dist/document/timeline.js +290 -42
  446. package/dist/document/timeline.js.map +1 -1
  447. package/dist/document/types.d.ts +12 -12
  448. package/dist/document/types.d.ts.map +1 -1
  449. package/dist/document/types.js +2 -2
  450. package/dist/document/types.js.map +1 -1
  451. package/dist/document/validate.d.ts +2 -2
  452. package/dist/document/validate.d.ts.map +1 -1
  453. package/dist/document/validate.js +37 -31
  454. package/dist/document/validate.js.map +1 -1
  455. package/dist/document/withdraw.d.ts +28 -0
  456. package/dist/document/withdraw.d.ts.map +1 -0
  457. package/dist/document/withdraw.js +61 -0
  458. package/dist/document/withdraw.js.map +1 -0
  459. package/dist/experimental.d.ts +22 -0
  460. package/dist/experimental.d.ts.map +1 -0
  461. package/dist/experimental.js +20 -0
  462. package/dist/experimental.js.map +1 -0
  463. package/dist/index.d.ts +10 -0
  464. package/dist/index.d.ts.map +1 -1
  465. package/dist/index.js +10 -0
  466. package/dist/index.js.map +1 -1
  467. package/dist/jsx/jsx-dev-runtime.js.map +1 -1
  468. package/dist/jsx/jsx-runtime.d.ts +9 -1
  469. package/dist/jsx/jsx-runtime.d.ts.map +1 -1
  470. package/dist/jsx/jsx-runtime.js +13 -3
  471. package/dist/jsx/jsx-runtime.js.map +1 -1
  472. package/dist/layout/bounds.d.ts +0 -1
  473. package/dist/layout/bounds.d.ts.map +1 -1
  474. package/dist/layout/bounds.js.map +1 -1
  475. package/dist/layout/constraints.js.map +1 -1
  476. package/dist/layout/flex.d.ts +4 -2
  477. package/dist/layout/flex.d.ts.map +1 -1
  478. package/dist/layout/flex.js +27 -11
  479. package/dist/layout/flex.js.map +1 -1
  480. package/dist/layout/freeform.js.map +1 -1
  481. package/dist/layout/grid.js.map +1 -1
  482. package/dist/layout/index.js.map +1 -1
  483. package/dist/layout/item.js.map +1 -1
  484. package/dist/layout/ops.d.ts +6 -0
  485. package/dist/layout/ops.d.ts.map +1 -1
  486. package/dist/layout/ops.js +6 -0
  487. package/dist/layout/ops.js.map +1 -1
  488. package/dist/layout/types.js.map +1 -1
  489. package/dist/nodes/2d/node-lifecycle.js.map +1 -1
  490. package/dist/nodes/2d/node-motion.js.map +1 -1
  491. package/dist/nodes/2d/node-render.d.ts +3 -3
  492. package/dist/nodes/2d/node-render.d.ts.map +1 -1
  493. package/dist/nodes/2d/node-render.js.map +1 -1
  494. package/dist/nodes/2d/node-transform.js.map +1 -1
  495. package/dist/nodes/2d/node2d.d.ts +115 -3
  496. package/dist/nodes/2d/node2d.d.ts.map +1 -1
  497. package/dist/nodes/2d/node2d.js +180 -28
  498. package/dist/nodes/2d/node2d.js.map +1 -1
  499. package/dist/nodes/2d/paint-node.d.ts +27 -0
  500. package/dist/nodes/2d/paint-node.d.ts.map +1 -1
  501. package/dist/nodes/2d/paint-node.js +42 -0
  502. package/dist/nodes/2d/paint-node.js.map +1 -1
  503. package/dist/nodes/audio/audio-bus.js.map +1 -1
  504. package/dist/nodes/audio/index.d.ts +2 -2
  505. package/dist/nodes/audio/index.d.ts.map +1 -1
  506. package/dist/nodes/audio/index.js +0 -2
  507. package/dist/nodes/audio/index.js.map +1 -1
  508. package/dist/nodes/audio/node-audio.js.map +1 -1
  509. package/dist/nodes/audio/sound-node.d.ts +4 -3
  510. package/dist/nodes/audio/sound-node.d.ts.map +1 -1
  511. package/dist/nodes/audio/sound-node.js +4 -1
  512. package/dist/nodes/audio/sound-node.js.map +1 -1
  513. package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
  514. package/dist/nodes/geometry/bounds-shape-node.js +2 -2
  515. package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
  516. package/dist/nodes/geometry/box-path-node.d.ts +3 -3
  517. package/dist/nodes/geometry/box-path-node.js +2 -2
  518. package/dist/nodes/geometry/box-path-node.js.map +1 -1
  519. package/dist/nodes/geometry/ellipse-node.js.map +1 -1
  520. package/dist/nodes/geometry/group-bounds.d.ts +2 -2
  521. package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
  522. package/dist/nodes/geometry/group-bounds.js +1 -2
  523. package/dist/nodes/geometry/group-bounds.js.map +1 -1
  524. package/dist/nodes/geometry/path-node.d.ts.map +1 -1
  525. package/dist/nodes/geometry/path-node.js +6 -0
  526. package/dist/nodes/geometry/path-node.js.map +1 -1
  527. package/dist/nodes/geometry/polygon-node.js.map +1 -1
  528. package/dist/nodes/geometry/polygram-node.js.map +1 -1
  529. package/dist/nodes/geometry/rect-node.js.map +1 -1
  530. package/dist/nodes/geometry/shape-node.js.map +1 -1
  531. package/dist/nodes/geometry/shape-outline.d.ts +2 -2
  532. package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
  533. package/dist/nodes/geometry/shape-outline.js +2 -13
  534. package/dist/nodes/geometry/shape-outline.js.map +1 -1
  535. package/dist/nodes/index.d.ts +40 -33
  536. package/dist/nodes/index.d.ts.map +1 -1
  537. package/dist/nodes/index.js +17 -36
  538. package/dist/nodes/index.js.map +1 -1
  539. package/dist/nodes/layout/camera-node.d.ts +9 -0
  540. package/dist/nodes/layout/camera-node.d.ts.map +1 -1
  541. package/dist/nodes/layout/camera-node.js +38 -3
  542. package/dist/nodes/layout/camera-node.js.map +1 -1
  543. package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
  544. package/dist/nodes/layout/orbit-camera-node.js +1 -1
  545. package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
  546. package/dist/nodes/layout/rotated-box.js.map +1 -1
  547. package/dist/nodes/media/video-node.d.ts.map +1 -1
  548. package/dist/nodes/media/video-node.js +2 -0
  549. package/dist/nodes/media/video-node.js.map +1 -1
  550. package/dist/nodes/node/declare-paints.js.map +1 -1
  551. package/dist/nodes/node/node-editor-state.js.map +1 -1
  552. package/dist/nodes/node/node-reactive.js.map +1 -1
  553. package/dist/nodes/node/node-time.d.ts +3 -3
  554. package/dist/nodes/node/node-time.d.ts.map +1 -1
  555. package/dist/nodes/node/node-time.js +1 -1
  556. package/dist/nodes/node/node-time.js.map +1 -1
  557. package/dist/nodes/node/node-walk.js.map +1 -1
  558. package/dist/nodes/node/node.d.ts +12 -4
  559. package/dist/nodes/node/node.d.ts.map +1 -1
  560. package/dist/nodes/node/node.js +67 -27
  561. package/dist/nodes/node/node.js.map +1 -1
  562. package/dist/nodes/node/text-defaults.d.ts +10 -12
  563. package/dist/nodes/node/text-defaults.d.ts.map +1 -1
  564. package/dist/nodes/node/text-defaults.js +10 -12
  565. package/dist/nodes/node/text-defaults.js.map +1 -1
  566. package/dist/nodes/{scene → root}/canvas2d-node.d.ts +4 -3
  567. package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
  568. package/dist/nodes/{scene → root}/canvas2d-node.js +5 -2
  569. package/dist/nodes/root/canvas2d-node.js.map +1 -0
  570. package/dist/nodes/root/provider-node.d.ts.map +1 -0
  571. package/dist/nodes/root/provider-node.js.map +1 -0
  572. package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
  573. package/dist/nodes/root/theme-provider-node.js.map +1 -0
  574. package/dist/nodes/text/default-text-style-node.d.ts +5 -2
  575. package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
  576. package/dist/nodes/text/default-text-style-node.js +10 -4
  577. package/dist/nodes/text/default-text-style-node.js.map +1 -1
  578. package/dist/nodes/text/number-format.d.ts +1 -1
  579. package/dist/nodes/text/number-format.js +1 -1
  580. package/dist/nodes/text/number-format.js.map +1 -1
  581. package/dist/nodes/text/number-node.js.map +1 -1
  582. package/dist/nodes/text/number-pattern.js.map +1 -1
  583. package/dist/nodes/text/richtext-node.d.ts +0 -5
  584. package/dist/nodes/text/richtext-node.d.ts.map +1 -1
  585. package/dist/nodes/text/richtext-node.js +6 -72
  586. package/dist/nodes/text/richtext-node.js.map +1 -1
  587. package/dist/nodes/text/text-base.d.ts +5 -22
  588. package/dist/nodes/text/text-base.d.ts.map +1 -1
  589. package/dist/nodes/text/text-base.js +13 -364
  590. package/dist/nodes/text/text-base.js.map +1 -1
  591. package/dist/nodes/text/text-layout.d.ts +87 -0
  592. package/dist/nodes/text/text-layout.d.ts.map +1 -0
  593. package/dist/nodes/text/text-layout.js +368 -0
  594. package/dist/nodes/text/text-layout.js.map +1 -0
  595. package/dist/nodes/text/text-node.js.map +1 -1
  596. package/dist/nodes/text/text-selection.js.map +1 -1
  597. package/dist/nodes/three/camera-nodes.d.ts +21 -3
  598. package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
  599. package/dist/nodes/three/camera-nodes.js +42 -1
  600. package/dist/nodes/three/camera-nodes.js.map +1 -1
  601. package/dist/nodes/three/canvas3d-node.d.ts +32 -7
  602. package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
  603. package/dist/nodes/three/canvas3d-node.js +50 -2
  604. package/dist/nodes/three/canvas3d-node.js.map +1 -1
  605. package/dist/nodes/three/drawable-nodes.d.ts +25 -11
  606. package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
  607. package/dist/nodes/three/drawable-nodes.js +43 -13
  608. package/dist/nodes/three/drawable-nodes.js.map +1 -1
  609. package/dist/nodes/three/environment-nodes.d.ts +9 -3
  610. package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
  611. package/dist/nodes/three/environment-nodes.js.map +1 -1
  612. package/dist/nodes/three/geometry-nodes.d.ts +2 -2
  613. package/dist/nodes/three/geometry-nodes.js +2 -2
  614. package/dist/nodes/three/geometry-nodes.js.map +1 -1
  615. package/dist/nodes/three/grid-geometry3d.js.map +1 -1
  616. package/dist/nodes/three/group3d.js.map +1 -1
  617. package/dist/nodes/three/light-nodes.d.ts.map +1 -1
  618. package/dist/nodes/three/light-nodes.js +3 -3
  619. package/dist/nodes/three/light-nodes.js.map +1 -1
  620. package/dist/nodes/three/mesh3d.js.map +1 -1
  621. package/dist/nodes/three/node3d.d.ts +48 -0
  622. package/dist/nodes/three/node3d.d.ts.map +1 -1
  623. package/dist/nodes/three/node3d.js +53 -3
  624. package/dist/nodes/three/node3d.js.map +1 -1
  625. package/dist/platform/audio-sink.d.ts +2 -2
  626. package/dist/platform/audio-sink.d.ts.map +1 -1
  627. package/dist/platform/audio-sink.js.map +1 -1
  628. package/dist/platform/exporter.d.ts +13 -8
  629. package/dist/platform/exporter.d.ts.map +1 -1
  630. package/dist/platform/exporter.js.map +1 -1
  631. package/dist/platform/index.d.ts +1 -1
  632. package/dist/platform/index.d.ts.map +1 -1
  633. package/dist/platform/index.js.map +1 -1
  634. package/dist/platform/stepped-clock.js.map +1 -1
  635. package/dist/platform/storage-adapter.d.ts +12 -6
  636. package/dist/platform/storage-adapter.d.ts.map +1 -1
  637. package/dist/platform/storage-adapter.js +4 -0
  638. package/dist/platform/storage-adapter.js.map +1 -1
  639. package/dist/platform/ticker.d.ts +6 -0
  640. package/dist/platform/ticker.d.ts.map +1 -1
  641. package/dist/platform/ticker.js +6 -0
  642. package/dist/platform/ticker.js.map +1 -1
  643. package/dist/project/config.js.map +1 -1
  644. package/dist/project/index.js.map +1 -1
  645. package/dist/project/tree.d.ts +3 -3
  646. package/dist/project/tree.d.ts.map +1 -1
  647. package/dist/project/tree.js.map +1 -1
  648. package/dist/props/host.js.map +1 -1
  649. package/dist/props/index.js.map +1 -1
  650. package/dist/props/observer.js.map +1 -1
  651. package/dist/props/slot.js.map +1 -1
  652. package/dist/renamed-scene-names.d.ts +17 -0
  653. package/dist/renamed-scene-names.d.ts.map +1 -0
  654. package/dist/renamed-scene-names.js +9 -0
  655. package/dist/renamed-scene-names.js.map +1 -0
  656. package/dist/render/canvas-render-context2d.d.ts +2 -2
  657. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  658. package/dist/render/canvas-render-context2d.js.map +1 -1
  659. package/dist/render/clip-contains.js.map +1 -1
  660. package/dist/render/clip.js.map +1 -1
  661. package/dist/render/descriptors/ellipse.js.map +1 -1
  662. package/dist/render/descriptors/latex.js.map +1 -1
  663. package/dist/render/descriptors/line.js.map +1 -1
  664. package/dist/render/descriptors/path-builder.js.map +1 -1
  665. package/dist/render/descriptors/path.js.map +1 -1
  666. package/dist/render/descriptors/polygon.js.map +1 -1
  667. package/dist/render/descriptors/polygram.js.map +1 -1
  668. package/dist/render/descriptors/rect.js.map +1 -1
  669. package/dist/render/descriptors/richtext.js.map +1 -1
  670. package/dist/render/descriptors/shape.d.ts +12 -0
  671. package/dist/render/descriptors/shape.d.ts.map +1 -1
  672. package/dist/render/descriptors/shape.js.map +1 -1
  673. package/dist/render/descriptors/text.d.ts +2 -2
  674. package/dist/render/descriptors/text.js +2 -2
  675. package/dist/render/descriptors/text.js.map +1 -1
  676. package/dist/render/descriptors/transform.d.ts +2 -2
  677. package/dist/render/descriptors/transform.d.ts.map +1 -1
  678. package/dist/render/descriptors/transform.js.map +1 -1
  679. package/dist/render/graphics2d.d.ts +3 -3
  680. package/dist/render/graphics2d.d.ts.map +1 -1
  681. package/dist/render/graphics2d.js +1 -1
  682. package/dist/render/graphics2d.js.map +1 -1
  683. package/dist/render/index.js.map +1 -1
  684. package/dist/render/measure-context.js.map +1 -1
  685. package/dist/render/null-render-context.js.map +1 -1
  686. package/dist/render/render-context2d.d.ts +2 -2
  687. package/dist/render/render-context2d.d.ts.map +1 -1
  688. package/dist/render/render-context2d.js.map +1 -1
  689. package/dist/render/surface.js.map +1 -1
  690. package/dist/render/text-defaults.js.map +1 -1
  691. package/dist/render/text-layout.js.map +1 -1
  692. package/dist/render3d/bounds3d.d.ts.map +1 -1
  693. package/dist/render3d/bounds3d.js +4 -2
  694. package/dist/render3d/bounds3d.js.map +1 -1
  695. package/dist/render3d/builders.js.map +1 -1
  696. package/dist/render3d/camera.d.ts +6 -0
  697. package/dist/render3d/camera.d.ts.map +1 -1
  698. package/dist/render3d/camera.js +5 -3
  699. package/dist/render3d/camera.js.map +1 -1
  700. package/dist/render3d/fill3d.d.ts +2 -9
  701. package/dist/render3d/fill3d.d.ts.map +1 -1
  702. package/dist/render3d/fill3d.js +2 -13
  703. package/dist/render3d/fill3d.js.map +1 -1
  704. package/dist/render3d/geometry.d.ts +8 -1
  705. package/dist/render3d/geometry.d.ts.map +1 -1
  706. package/dist/render3d/geometry.js.map +1 -1
  707. package/dist/render3d/graphics3d.d.ts +8 -4
  708. package/dist/render3d/graphics3d.d.ts.map +1 -1
  709. package/dist/render3d/graphics3d.js +18 -10
  710. package/dist/render3d/graphics3d.js.map +1 -1
  711. package/dist/render3d/index.d.ts +1 -1
  712. package/dist/render3d/index.js +1 -1
  713. package/dist/render3d/index.js.map +1 -1
  714. package/dist/render3d/inert.d.ts +14 -0
  715. package/dist/render3d/inert.d.ts.map +1 -0
  716. package/dist/render3d/inert.js +62 -0
  717. package/dist/render3d/inert.js.map +1 -0
  718. package/dist/render3d/light.js.map +1 -1
  719. package/dist/render3d/material.d.ts +10 -5
  720. package/dist/render3d/material.d.ts.map +1 -1
  721. package/dist/render3d/material.js.map +1 -1
  722. package/dist/render3d/matrix4.js.map +1 -1
  723. package/dist/render3d/render-context3d.js.map +1 -1
  724. package/dist/render3d/resources.js.map +1 -1
  725. package/dist/render3d/rounded-box.js.map +1 -1
  726. package/dist/render3d/scene-settings.d.ts +23 -4
  727. package/dist/render3d/scene-settings.d.ts.map +1 -1
  728. package/dist/render3d/scene-settings.js.map +1 -1
  729. package/dist/render3d/scene3d.d.ts +11 -0
  730. package/dist/render3d/scene3d.d.ts.map +1 -1
  731. package/dist/render3d/scene3d.js +39 -6
  732. package/dist/render3d/scene3d.js.map +1 -1
  733. package/dist/render3d/segments.js.map +1 -1
  734. package/dist/render3d/texture.d.ts +9 -0
  735. package/dist/render3d/texture.d.ts.map +1 -1
  736. package/dist/render3d/texture.js +13 -0
  737. package/dist/render3d/texture.js.map +1 -1
  738. package/dist/render3d/tracking.js.map +1 -1
  739. package/dist/render3d/transform.d.ts +1 -1
  740. package/dist/render3d/transform.js.map +1 -1
  741. package/dist/render3d/vector3.d.ts +18 -1
  742. package/dist/render3d/vector3.d.ts.map +1 -1
  743. package/dist/render3d/vector3.js +27 -0
  744. package/dist/render3d/vector3.js.map +1 -1
  745. package/dist/render3d/walk.d.ts +1 -1
  746. package/dist/render3d/walk.d.ts.map +1 -1
  747. package/dist/render3d/walk.js +5 -1
  748. package/dist/render3d/walk.js.map +1 -1
  749. package/dist/runtime/asset-refine.js.map +1 -1
  750. package/dist/runtime/asset-timeline.js.map +1 -1
  751. package/dist/runtime/asset-update.js.map +1 -1
  752. package/dist/runtime/audio-index.js.map +1 -1
  753. package/dist/runtime/builtin-context.js.map +1 -1
  754. package/dist/runtime/clip-instance.d.ts +9 -4
  755. package/dist/runtime/clip-instance.d.ts.map +1 -1
  756. package/dist/runtime/clip-instance.js +27 -9
  757. package/dist/runtime/clip-instance.js.map +1 -1
  758. package/dist/runtime/clip-store.d.ts +18 -0
  759. package/dist/runtime/clip-store.d.ts.map +1 -1
  760. package/dist/runtime/clip-store.js +97 -0
  761. package/dist/runtime/clip-store.js.map +1 -1
  762. package/dist/runtime/engine.d.ts +5 -0
  763. package/dist/runtime/engine.d.ts.map +1 -1
  764. package/dist/runtime/engine.js +2 -0
  765. package/dist/runtime/engine.js.map +1 -1
  766. package/dist/runtime/frame-time.d.ts +31 -0
  767. package/dist/runtime/frame-time.d.ts.map +1 -0
  768. package/dist/runtime/frame-time.js +29 -0
  769. package/dist/runtime/frame-time.js.map +1 -0
  770. package/dist/runtime/index.d.ts +1 -0
  771. package/dist/runtime/index.d.ts.map +1 -1
  772. package/dist/runtime/index.js +1 -0
  773. package/dist/runtime/index.js.map +1 -1
  774. package/dist/runtime/node-picking.d.ts +44 -3
  775. package/dist/runtime/node-picking.d.ts.map +1 -1
  776. package/dist/runtime/node-picking.js +124 -10
  777. package/dist/runtime/node-picking.js.map +1 -1
  778. package/dist/runtime/node-picking3d.d.ts +13 -5
  779. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  780. package/dist/runtime/node-picking3d.js +10 -2
  781. package/dist/runtime/node-picking3d.js.map +1 -1
  782. package/dist/runtime/placement.d.ts.map +1 -1
  783. package/dist/runtime/placement.js +4 -5
  784. package/dist/runtime/placement.js.map +1 -1
  785. package/dist/runtime/playback-controller.d.ts +31 -2
  786. package/dist/runtime/playback-controller.d.ts.map +1 -1
  787. package/dist/runtime/playback-controller.js +63 -6
  788. package/dist/runtime/playback-controller.js.map +1 -1
  789. package/dist/runtime/playback.js.map +1 -1
  790. package/dist/runtime/precompisition.js.map +1 -1
  791. package/dist/runtime/project-assets.js.map +1 -1
  792. package/dist/runtime/session.d.ts +9 -7
  793. package/dist/runtime/session.d.ts.map +1 -1
  794. package/dist/runtime/session.js +12 -4
  795. package/dist/runtime/session.js.map +1 -1
  796. package/dist/runtime/settle.js.map +1 -1
  797. package/dist/runtime/state-evaluator.d.ts +1 -1
  798. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  799. package/dist/runtime/state-evaluator.js +4 -3
  800. package/dist/runtime/state-evaluator.js.map +1 -1
  801. package/dist/runtime/text-geometry.d.ts.map +1 -1
  802. package/dist/runtime/text-geometry.js +7 -3
  803. package/dist/runtime/text-geometry.js.map +1 -1
  804. package/dist/sdk/index.d.ts +50 -25
  805. package/dist/sdk/index.d.ts.map +1 -1
  806. package/dist/sdk/index.js +52 -42
  807. package/dist/sdk/index.js.map +1 -1
  808. package/dist/tween/command-decorator.d.ts +2 -0
  809. package/dist/tween/command-decorator.d.ts.map +1 -1
  810. package/dist/tween/command-decorator.js.map +1 -1
  811. package/dist/tween/command.d.ts +12 -0
  812. package/dist/tween/command.d.ts.map +1 -1
  813. package/dist/tween/command.js +14 -0
  814. package/dist/tween/command.js.map +1 -1
  815. package/dist/tween/ease/constants.d.ts.map +1 -1
  816. package/dist/tween/ease/constants.js +8 -5
  817. package/dist/tween/ease/constants.js.map +1 -1
  818. package/dist/tween/ease/curve.d.ts.map +1 -1
  819. package/dist/tween/ease/curve.js +4 -3
  820. package/dist/tween/ease/curve.js.map +1 -1
  821. package/dist/tween/ease/describe.d.ts +15 -0
  822. package/dist/tween/ease/describe.d.ts.map +1 -0
  823. package/dist/tween/ease/describe.js +37 -0
  824. package/dist/tween/ease/describe.js.map +1 -0
  825. package/dist/tween/ease/type.js.map +1 -1
  826. package/dist/tween/index.js.map +1 -1
  827. package/dist/tween/inert.js.map +1 -1
  828. package/dist/tween/lerp.js.map +1 -1
  829. package/dist/tween/loop.js.map +1 -1
  830. package/dist/tween/prepare.d.ts +3 -3
  831. package/dist/tween/prepare.js +3 -3
  832. package/dist/tween/prepare.js.map +1 -1
  833. package/dist/tween/seekable.d.ts +1 -1
  834. package/dist/tween/seekable.js.map +1 -1
  835. package/dist/tween/stepper.js.map +1 -1
  836. package/dist/tween/to-command.js.map +1 -1
  837. package/dist/util/clamp.js.map +1 -1
  838. package/dist/util/context.js.map +1 -1
  839. package/dist/util/csv.js.map +1 -1
  840. package/dist/util/generateList.js.map +1 -1
  841. package/dist/util/index.js.map +1 -1
  842. package/dist/util/metrics.d.ts +1 -1
  843. package/dist/util/metrics.js +1 -1
  844. package/dist/util/metrics.js.map +1 -1
  845. package/dist/util/random.js.map +1 -1
  846. package/dist/util/reference.js.map +1 -1
  847. package/dist/util/scheduler.js.map +1 -1
  848. package/package.json +7 -1
  849. package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
  850. package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
  851. package/dist/attributes/shape/effects/implementations/displace.js +0 -30
  852. package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
  853. package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
  854. package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
  855. package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
  856. package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
  857. package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
  858. package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
  859. package/dist/attributes/shape/effects/implementations/texture.js +0 -25
  860. package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
  861. package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
  862. package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
  863. package/dist/attributes/shape/effects/implementations/trails.js +0 -22
  864. package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
  865. package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
  866. package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
  867. package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
  868. package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
  869. package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
  870. package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
  871. package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
  872. package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
  873. package/dist/nodes/geometry/dot-grid-node.js +0 -142
  874. package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
  875. package/dist/nodes/geometry/grid-lines.d.ts +0 -101
  876. package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
  877. package/dist/nodes/geometry/grid-lines.js +0 -128
  878. package/dist/nodes/geometry/grid-lines.js.map +0 -1
  879. package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
  880. package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
  881. package/dist/nodes/geometry/grid-pattern-node.js +0 -172
  882. package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
  883. package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
  884. package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
  885. package/dist/nodes/geometry/line-grid-node.js +0 -127
  886. package/dist/nodes/geometry/line-grid-node.js.map +0 -1
  887. package/dist/nodes/geometry/line-node.d.ts +0 -58
  888. package/dist/nodes/geometry/line-node.d.ts.map +0 -1
  889. package/dist/nodes/geometry/line-node.js +0 -123
  890. package/dist/nodes/geometry/line-node.js.map +0 -1
  891. package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
  892. package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
  893. package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
  894. package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
  895. package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
  896. package/dist/nodes/scene/canvas2d-node.js.map +0 -1
  897. package/dist/nodes/scene/provider-node.d.ts.map +0 -1
  898. package/dist/nodes/scene/provider-node.js.map +0 -1
  899. package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
  900. package/dist/nodes/scene/theme-provider-node.js.map +0 -1
  901. /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
  902. /package/dist/nodes/{scene → root}/provider-node.js +0 -0
  903. /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
  904. /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"matrix2d.js","sourceRoot":"","sources":["../../../src/attributes/layout/matrix2d.ts"],"names":[],"mappings":"AAqCA,0FAA0F;AAC1F,MAAM,UAAU,YAAY,CAAC,CAAW;IACpC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,C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EAAE,CAAC,GAAG,EAAE;QACT,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Vector2 } from \"@/attributes/layout/vector2\";\n\n/**\n * A 2D transform stored as the members of a 3×3 matrix:\n *\n * ```\n * | a c e |\n * | b d f |\n * | g h i |\n * ```\n *\n * Point mapping is `x' = (a·x + c·y + e) / w`, `y' = (b·x + d·y + f) / w`, with\n * `w = g·x + h·y + i`. This is the same column-order convention CanvasKit/DOM\n * use, so matrices compose in draw order: `parent.multiply(child)` is the world\n * transform of `child`.\n *\n * **The bottom row is optional, and leaving it off means `[0 0 1]`** — an\n * ordinary affine transform, where `w` is 1 everywhere and the divide falls\n * away. Every matrix in the engine was exactly that until\n * {@link nodeProjectedMatrix} arrived: a node tilted out of its own plane\n * projects through a *homography*, and a homography does not fit in six numbers.\n * Rather than a second matrix type — with a second `multiply`, `invert` and\n * `applyToPoint` beside it, which is precisely how a renderer and a hit test end\n * up disagreeing about where a node is — the row lives here, and everything that\n * has no use for it simply omits it.\n */\n/** @internal */\nexport interface Matrix2D {\n a: number; b: number; c: number; d: number; e: number; f: number;\n /** Perspective row, x term. Omitted on an affine transform (means `0`). */\n g?: number;\n /** Perspective row, y term. Omitted on an affine transform (means `0`). */\n h?: number;\n /** Perspective row, constant term. Omitted on an affine transform (means `1`). */\n i?: number;\n}\n\n/** @internal Whether `m` carries a perspective row — i.e. whether `w` is not always 1. */\nexport function isProjective(m: Matrix2D): boolean {\n return (m.g ?? 0) !== 0 || (m.h ?? 0) !== 0 || (m.i ?? 1) !== 1;\n}\n\n/**\n * Guard the perspective divide. A point on the vanishing line has `w = 0` and\n * projects to infinity, which is a real answer no coordinate can hold; clamping\n * to a tiny same-signed `w` sends it far off-screen instead, which is where it\n * belongs and is a number the caller can keep doing arithmetic with. Without\n * this, one degenerate corner turns an anchor set into `Infinity`/`NaN` and\n * takes the selection box, the hit test and any layout reading it with it.\n */\nconst MIN_W = 1e-6;\nfunction safeW(w: number): number {\n if (w > MIN_W || w < -MIN_W) return w;\n return w < 0 ? -MIN_W : MIN_W;\n}\n\n/** @internal The identity transform — maps every point to itself. */\nexport function identity(): Matrix2D {\n return { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };\n}\n\n/** @internal Pure translation by (tx, ty). */\nexport function translation(tx: number, ty: number): Matrix2D {\n return { a: 1, b: 0, c: 0, d: 1, e: tx, f: ty };\n}\n\n/**\n * `m1 · m2` — the transform that applies `m2` first, then `m1`. Composing an\n * ancestor with a descendant (`ancestor.multiply(descendant)`) yields the\n * descendant's world transform.\n *\n * Two affine matrices take the six-member path they always did — that is every\n * composition in a scene with no 3D in it, once per node per parent per frame —\n * and the general 3×3 product runs only when one side actually carries a\n * perspective row.\n */\n/** @internal */\nexport function multiply(m1: Matrix2D, m2: Matrix2D): Matrix2D {\n if (isProjective(m1) || isProjective(m2)) return multiplyProjective(m1, m2);\n return {\n a: m1.a * m2.a + m1.c * m2.b,\n b: m1.b * m2.a + m1.d * m2.b,\n c: m1.a * m2.c + m1.c * m2.d,\n d: m1.b * m2.c + m1.d * m2.d,\n e: m1.a * m2.e + m1.c * m2.f + m1.e,\n f: m1.b * m2.e + m1.d * m2.f + m1.f,\n };\n}\n\n/** The full 3×3 product, rows `[a c e] [b d f] [g h i]`. See {@link multiply}. */\nfunction multiplyProjective(m1: Matrix2D, m2: Matrix2D): Matrix2D {\n const g1 = m1.g ?? 0, h1 = m1.h ?? 0, i1 = m1.i ?? 1;\n const g2 = m2.g ?? 0, h2 = m2.h ?? 0, i2 = m2.i ?? 1;\n return {\n a: m1.a * m2.a + m1.c * m2.b + m1.e * g2,\n c: m1.a * m2.c + m1.c * m2.d + m1.e * h2,\n e: m1.a * m2.e + m1.c * m2.f + m1.e * i2,\n b: m1.b * m2.a + m1.d * m2.b + m1.f * g2,\n d: m1.b * m2.c + m1.d * m2.d + m1.f * h2,\n f: m1.b * m2.e + m1.d * m2.f + m1.f * i2,\n g: g1 * m2.a + h1 * m2.b + i1 * g2,\n h: g1 * m2.c + h1 * m2.d + i1 * h2,\n i: g1 * m2.e + h1 * m2.f + i1 * i2,\n };\n}\n\n/** @internal Map a point through the transform. */\nexport function applyToPoint(m: Matrix2D, p: Vector2): Vector2 {\n const x = m.a * p.x + m.c * p.y + m.e;\n const y = m.b * p.x + m.d * p.y + m.f;\n if (!isProjective(m)) return { x, y };\n const w = safeW((m.g ?? 0) * p.x + (m.h ?? 0) * p.y + (m.i ?? 1));\n return { x: x / w, y: y / w };\n}\n\n/**\n * The inverse transform, or `null` when `m` is singular (a zero scale collapses\n * the plane, so no inverse exists). Used to map a viewport-space point back into\n * a node's local space for hit testing.\n */\n/** @internal */\nexport function invert(m: Matrix2D): Matrix2D | null {\n if (isProjective(m)) return invertProjective(m);\n const det = m.a * m.d - m.b * m.c;\n if (det === 0 || !Number.isFinite(det)) return null;\n const inv = 1 / det;\n return {\n a: m.d * inv,\n b: -m.b * inv,\n c: -m.c * inv,\n d: m.a * inv,\n e: (m.c * m.f - m.d * m.e) * inv,\n f: (m.b * m.e - m.a * m.f) * inv,\n };\n}\n\n/**\n * The inverse of a homography — the adjugate over the determinant, written out\n * in this module's row naming. A projective inverse is still a homography, which\n * is what lets picking keep mapping a viewport point back into a node's local\n * space with nothing but {@link applyToPoint} once the node is tilted.\n */\nfunction invertProjective(m: Matrix2D): Matrix2D | null {\n const { a, b, c, d, e, f } = m;\n const g = m.g ?? 0, h = m.h ?? 0, i = m.i ?? 1;\n // Cofactors of the 3×3 | a c e | / | b d f | / | g h i |.\n const A = d * i - f * h;\n const C = f * g - b * i;\n const E = b * h - d * g;\n const det = a * A + c * C + e * E;\n if (det === 0 || !Number.isFinite(det)) return null;\n const inv = 1 / det;\n return {\n a: A * inv,\n c: (e * h - c * i) * inv,\n e: (c * f - e * d) * inv,\n b: C * inv,\n d: (a * i - e * g) * inv,\n f: (e * b - a * f) * inv,\n g: E * inv,\n h: (c * g - a * h) * inv,\n i: (a * d - c * b) * inv,\n };\n}\n\n/**\n * The viewport transform a camera scope pushes, in canvas (y-down) space — a\n * literal transcription of `RenderContext2D.beginCamera`:\n *\n * translate(vx, vy) · rotate(-heading) · scale(zoom) · translate(-lookAt.x, +lookAt.y)\n *\n * `lookAt` is a y-up world point, hence the sign flip on its y. `vx`/`vy` are the\n * viewport centre the camera's callers pass (`layoutBounds.x`, `-layoutBounds.y`).\n * Kept next to {@link nodeLocalMatrix} so the two stay in step with the renderer.\n */\n/** @internal */\nexport function cameraMatrix(\n vx: number, vy: number, lookAt: Vector2, zoom: number, heading: number,\n): Matrix2D {\n const rad = (-heading * Math.PI) / 180;\n const cos = Math.cos(rad);\n const sin = Math.sin(rad);\n // rotate(-heading) · scale(zoom), the same clockwise canvas convention as\n // nodeLocalMatrix's R·S block.\n const a = zoom * cos;\n const b = zoom * sin;\n const c = zoom * -sin;\n const d = zoom * cos;\n // Fold the trailing translate(-lookAt.x, +lookAt.y) into e/f.\n const tx = -lookAt.x;\n const ty = lookAt.y;\n return { a, b, c, d, e: vx + a * tx + c * ty, f: vy + b * tx + d * ty };\n}\n\n/**\n * Build the local transform for a node, matching the renderer's\n * `RenderContext2D.transform` exactly (canvas y-down space):\n * `T(cx + pivotX, cy + pivotY) · R(deg) · S(scale) · T(-pivotX, -pivotY)`.\n *\n * @param cx Canvas-space x of the node's layout-cell lookAt.\n * @param cy Canvas-space y of the node's layout-cell origin (y-down).\n * @param rotation Rotation in degrees, clockwise (canvas convention).\n * @param scale Uniform scale factor.\n * @param pivotX Pivot offset in pixels, x.\n * @param pivotY Pivot offset in pixels, y (canvas y-down).\n */\n/** @internal */\nexport function nodeLocalMatrix(\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\n): Matrix2D {\n const rad = (rotation * Math.PI) / 180;\n const cos = Math.cos(rad);\n const sin = Math.sin(rad);\n // R(deg) · S(scale): clockwise rotation in canvas (y-down) is\n // | cos -sin | · | s 0 | = | s·cos -s·sin |\n // | sin cos | | 0 s | | s·sin s·cos |\n const a = scale * cos;\n const b = scale * sin;\n const c = scale * -sin;\n const d = scale * cos;\n // Fold the pivot translations into e/f:\n // T(cx+pivotX, cy+pivotY) · (RS) · T(-pivotX, -pivotY)\n return {\n a, b, c, d,\n e: cx + pivotX - (a * pivotX + c * pivotY),\n f: cy + pivotY - (b * pivotX + d * pivotY),\n };\n}\n\n/**\n * The out-of-plane half of a node's transform — the mirrors, the two extra\n * rotation axes, the push along z and the perspective divide that makes them\n * read as depth rather than as squashing. See {@link nodeProjectedMatrix}.\n */\n/** @internal */\nexport interface Projection3D {\n /** Tilt about the horizontal axis, degrees. Positive tips the top away. */\n rotationX: number;\n /** Tilt about the vertical axis, degrees. Positive swings the right edge away. */\n rotationY: number;\n /**\n * In-plane rotation belonging to the 3D block, degrees clockwise — the Z axis\n * of `Rx · Ry · Rz`.\n *\n * A prop of its own rather than a second name for the node's `rotation`, and\n * that is a deliberate separation: `rotation` is the node's **shape** — it\n * turns the box, the selection outline turns with it, and handles follow —\n * while this is part of the projection, which is paint. The two compose (a\n * Z rotation is a Z rotation, so they add), but they are two independent\n * numbers and editing one never moves the other.\n */\n rotationZ: number;\n /** Push along the view axis in px, applied after the rotations. Inert without `perspective`. */\n depth: number;\n /** Viewer distance in px. `0` is no perspective at all — a parallel projection. */\n perspective: number;\n /** Mirror across the node's vertical centre line. */\n flipHorizontal: boolean;\n /** Mirror across the node's horizontal centre line. */\n flipVertical: boolean;\n}\n\n/** @internal Every field of a {@link Projection3D} at rest — the plain 2D node. */\nexport const NO_PROJECTION_3D: Projection3D = {\n rotationX: 0,\n rotationY: 0,\n rotationZ: 0,\n depth: 0,\n perspective: 0,\n flipHorizontal: false,\n flipVertical: false,\n};\n\n/**\n * Whether `p` asks for anything {@link nodeLocalMatrix} cannot already express.\n * The gate in front of every projective path in the engine: a scene with no 3D\n * in it keeps the six-number matrix, the decomposed `translate/rotate/scale`\n * render path, and the affine `multiply` it always had.\n */\n/** @internal */\nexport function hasProjection3D(p: Projection3D): boolean {\n return (\n p.rotationX !== 0 ||\n p.rotationY !== 0 ||\n p.rotationZ !== 0 ||\n p.flipHorizontal ||\n p.flipVertical ||\n (p.perspective !== 0 && p.depth !== 0)\n );\n}\n\n/**\n * Whether a plane carrying this projection has turned its back on the viewer —\n * the test behind `backfaceVisible`.\n *\n * Read off the tilt alone. The plane's normal starts at `(0,0,1)` and comes out\n * of `Rx·Ry` with a z of `cos(rotationX)·cos(rotationY)`; the in-plane rotation\n * can't change which way it points, and neither, deliberately, can a *mirror*.\n * CSS derives the answer from the whole accumulated matrix, where a `scaleX(-1)`\n * inverts orientation and hides the element — which is a surprising way to lose\n * a node you only meant to flip. Here a flip is a flip and a turn is a turn.\n */\n/** @internal */\nexport function facesAway(rotationX: number, rotationY: number): boolean {\n const rad = Math.PI / 180;\n return Math.cos(rotationX * rad) * Math.cos(rotationY * rad) < 0;\n}\n\n/**\n * A node's local transform with the out-of-plane half folded in — the same space\n * and the same pivot convention as {@link nodeLocalMatrix}, which this reduces to\n * exactly when {@link hasProjection3D} is false.\n *\n * The composition, innermost first:\n *\n * `T(pivot) · P(perspective) · Tz(depth) · Rx · Ry · Rz(rotationZ + rotation) · S(scale) · T(-pivot) · F(flip)`\n *\n * — everything about the pivot except the mirrors, which reflect about the\n * node's own centre so that flipping cannot move the node (see `F` below),\n *\n * which is CSS's own order for `rotateX(a) rotateY(b) rotateZ(c)` — the in-plane\n * rotation innermost, so that adding a tilt never changes what the node's own\n * `rotation` already meant.\n *\n * The Z angle is the **sum** of the two in-plane rotations the node carries, and\n * they stay two: `rotation` turns the node's *shape* — its box turns with it, and\n * so does anything reading that box — while {@link Projection3D.rotationZ} is\n * part of the projection, which is paint (see `Node2D._localMatrix`). Summing them\n * is not a coupling but the definition of composing two rotations about one axis;\n * neither number moves when the other is edited.\n *\n * The content is planar — every point enters with `z = 0` — so the whole thing\n * collapses to a 3×3 homography over `(x, y, 1)` rather than needing a 4×4 and a\n * separate divide step. The projected z survives only as the perspective row.\n *\n * @param cx Canvas-space x of the node's positioned centre.\n * @param cy Canvas-space y of the node's positioned centre (y-down).\n * @param rotation In-plane rotation in degrees, clockwise (the Z axis).\n * @param scale Uniform scale factor.\n * @param pivotX Pivot offset from the centre in px, x.\n * @param pivotY Pivot offset from the centre in px, y (canvas y-down).\n * @param p The out-of-plane fields.\n */\n/** @internal */\nexport function nodeProjectedMatrix(\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\n p: Projection3D,\n): Matrix2D {\n if (!hasProjection3D(p)) {\n return nodeLocalMatrix(cx, cy, rotation, scale, pivotX, pivotY);\n }\n const rad = Math.PI / 180;\n const ca = Math.cos(p.rotationX * rad), sa = Math.sin(p.rotationX * rad);\n const cb = Math.cos(p.rotationY * rad), sb = Math.sin(p.rotationY * rad);\n // The two in-plane rotations compose into one angle — see the note above.\n const cz = (rotation + p.rotationZ) * rad;\n const cc = Math.cos(cz), sc = Math.sin(cz);\n\n // The two columns of Rx·Ry·Rz that a z = 0 point can reach, scaled.\n const A = cb * cc * scale;\n const C = -cb * sc * scale;\n const B = (sa * sb * cc + ca * sc) * scale;\n const D = (ca * cc - sa * sb * sc) * scale;\n // The row that would have been the projected z, had we kept one.\n const G = (sa * sc - ca * sb * cc) * scale;\n const H = (ca * sb * sc + sa * cc) * scale;\n\n // Perspective: a point at depth z lands at x/w with w = 1 - z/perspective.\n // No perspective means a parallel projection — z is simply dropped, w stays\n // 1, and the result is affine (which is also why `depth` alone does nothing).\n const invP = p.perspective !== 0 ? 1 / p.perspective : 0;\n const g = -G * invP;\n const h = -H * invP;\n // The z the pivot itself sits at: -(G·pivotX + H·pivotY) is what the shift to\n // pivot-relative coordinates leaves in the z row, and `depth` is the push\n // along it, applied after the tilt (so it moves the whole tilted plane).\n const i = 1 - (p.depth - (G * pivotX + H * pivotY)) * invP;\n\n // Numerators about the pivot, then the trailing translate folded in. A\n // translate composes onto a homography as `+ t·w`, hence the g/h/i terms.\n const tx = cx + pivotX;\n const ty = cy + pivotY;\n\n // The mirrors, applied **innermost and about the node's own centre** — a\n // final column negation, which is what `M · diag(fx, fy, 1)` comes to.\n //\n // Not about the pivot, unlike everything else here, and that is the whole\n // point: a flip is an in-place reflection. Composing it with the pivot the\n // way CSS's `scaleX(-1)` does means a node hinged anywhere but its middle\n // *swings* when you flip it — its position readout changes, its corner\n // handles land somewhere else, and the gesture stops meaning \"mirror this\"\n // and starts meaning \"mirror this and move it\". Every design tool flips\n // about the selection's own centre for that reason. Written as a column\n // scale rather than a `T(c)·F·T(-c)` sandwich because that is what one\n // reduces to here — the local frame is already centred on the node — which\n // leaves `e`/`f`/`i` untouched and makes \"a flip cannot move the node\" a\n // property of the arithmetic rather than a thing to remember.\n const fx = p.flipHorizontal ? -1 : 1;\n const fy = p.flipVertical ? -1 : 1;\n return {\n a: (A + tx * g) * fx,\n c: (C + tx * h) * fy,\n e: -(A * pivotX + C * pivotY) + tx * i,\n b: (B + ty * g) * fx,\n d: (D + ty * h) * fy,\n f: -(B * pivotX + D * pivotY) + ty * i,\n g: g * fx,\n h: h * fy,\n i,\n };\n}\n"]}
1
+ {"version":3,"file":"matrix2d.js","sourceRoot":"","sources":["../../../src/attributes/layout/matrix2d.ts"],"names":[],"mappings":"AAqCA,0FAA0F;AAC1F,MAAM,UAAU,YAAY,CAAC,CAAW;IACpC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,KAAK,GAAG,IAAI,CAAC;AACnB,SAAS,KAAK,CAAC,CAAS;IACpB,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;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IAC3E,0EAA0E;IAC1E,uEAAuE;IACvE,2EAA2E;IAC3E,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,2EAA2E;IAC3E,yEAAyE;IACzE,8DAA8D;IAC9D,MAAM,EAAE,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,OAAO;QACH,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;QACtC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE;QACpB,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;QACtC,CAAC,EAAE,CAAC,GAAG,EAAE;QACT,CAAC,EAAE,CAAC,GAAG,EAAE;QACT,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Vector2 } from \"@/attributes/layout/vector2\";\r\n\r\n/**\r\n * A 2D transform stored as the members of a 3×3 matrix:\r\n *\r\n * ```\r\n * | a c e |\r\n * | b d f |\r\n * | g h i |\r\n * ```\r\n *\r\n * Point mapping is `x' = (a·x + c·y + e) / w`, `y' = (b·x + d·y + f) / w`, with\r\n * `w = g·x + h·y + i`. This is the same column-order convention CanvasKit/DOM\r\n * use, so matrices compose in draw order: `parent.multiply(child)` is the world\r\n * transform of `child`.\r\n *\r\n * **The bottom row is optional, and leaving it off means `[0 0 1]`** — an\r\n * ordinary affine transform, where `w` is 1 everywhere and the divide falls\r\n * away. Every matrix in the engine was exactly that until\r\n * {@link nodeProjectedMatrix} arrived: a node tilted out of its own plane\r\n * projects through a *homography*, and a homography does not fit in six numbers.\r\n * Rather than a second matrix type — with a second `multiply`, `invert` and\r\n * `applyToPoint` beside it, which is precisely how a renderer and a hit test end\r\n * up disagreeing about where a node is — the row lives here, and everything that\r\n * has no use for it simply omits it.\r\n */\r\n/** @internal */\r\nexport interface Matrix2D {\r\n a: number; b: number; c: number; d: number; e: number; f: number;\r\n /** Perspective row, x term. Omitted on an affine transform (means `0`). */\r\n g?: number;\r\n /** Perspective row, y term. Omitted on an affine transform (means `0`). */\r\n h?: number;\r\n /** Perspective row, constant term. Omitted on an affine transform (means `1`). */\r\n i?: number;\r\n}\r\n\r\n/** @internal Whether `m` carries a perspective row — i.e. whether `w` is not always 1. */\r\nexport function isProjective(m: Matrix2D): boolean {\r\n return (m.g ?? 0) !== 0 || (m.h ?? 0) !== 0 || (m.i ?? 1) !== 1;\r\n}\r\n\r\n/**\r\n * Guard the perspective divide. A point on the vanishing line has `w = 0` and\r\n * projects to infinity, which is a real answer no coordinate can hold; clamping\r\n * to a tiny same-signed `w` sends it far off-screen instead, which is where it\r\n * belongs and is a number the caller can keep doing arithmetic with. Without\r\n * this, one degenerate corner turns an anchor set into `Infinity`/`NaN` and\r\n * takes the selection box, the hit test and any layout reading it with it.\r\n */\r\nconst MIN_W = 1e-6;\r\nfunction safeW(w: number): number {\r\n if (w > MIN_W || w < -MIN_W) return w;\r\n return w < 0 ? -MIN_W : MIN_W;\r\n}\r\n\r\n/** @internal The identity transform — maps every point to itself. */\r\nexport function identity(): Matrix2D {\r\n return { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };\r\n}\r\n\r\n/** @internal Pure translation by (tx, ty). */\r\nexport function translation(tx: number, ty: number): Matrix2D {\r\n return { a: 1, b: 0, c: 0, d: 1, e: tx, f: ty };\r\n}\r\n\r\n/**\r\n * `m1 · m2` — the transform that applies `m2` first, then `m1`. Composing an\r\n * ancestor with a descendant (`ancestor.multiply(descendant)`) yields the\r\n * descendant's world transform.\r\n *\r\n * Two affine matrices take the six-member path they always did — that is every\r\n * composition in a scene with no 3D in it, once per node per parent per frame —\r\n * and the general 3×3 product runs only when one side actually carries a\r\n * perspective row.\r\n */\r\n/** @internal */\r\nexport function multiply(m1: Matrix2D, m2: Matrix2D): Matrix2D {\r\n if (isProjective(m1) || isProjective(m2)) return multiplyProjective(m1, m2);\r\n return {\r\n a: m1.a * m2.a + m1.c * m2.b,\r\n b: m1.b * m2.a + m1.d * m2.b,\r\n c: m1.a * m2.c + m1.c * m2.d,\r\n d: m1.b * m2.c + m1.d * m2.d,\r\n e: m1.a * m2.e + m1.c * m2.f + m1.e,\r\n f: m1.b * m2.e + m1.d * m2.f + m1.f,\r\n };\r\n}\r\n\r\n/** The full 3×3 product, rows `[a c e] [b d f] [g h i]`. See {@link multiply}. */\r\nfunction multiplyProjective(m1: Matrix2D, m2: Matrix2D): Matrix2D {\r\n const g1 = m1.g ?? 0, h1 = m1.h ?? 0, i1 = m1.i ?? 1;\r\n const g2 = m2.g ?? 0, h2 = m2.h ?? 0, i2 = m2.i ?? 1;\r\n return {\r\n a: m1.a * m2.a + m1.c * m2.b + m1.e * g2,\r\n c: m1.a * m2.c + m1.c * m2.d + m1.e * h2,\r\n e: m1.a * m2.e + m1.c * m2.f + m1.e * i2,\r\n b: m1.b * m2.a + m1.d * m2.b + m1.f * g2,\r\n d: m1.b * m2.c + m1.d * m2.d + m1.f * h2,\r\n f: m1.b * m2.e + m1.d * m2.f + m1.f * i2,\r\n g: g1 * m2.a + h1 * m2.b + i1 * g2,\r\n h: g1 * m2.c + h1 * m2.d + i1 * h2,\r\n i: g1 * m2.e + h1 * m2.f + i1 * i2,\r\n };\r\n}\r\n\r\n/** @internal Map a point through the transform. */\r\nexport function applyToPoint(m: Matrix2D, p: Vector2): Vector2 {\r\n const x = m.a * p.x + m.c * p.y + m.e;\r\n const y = m.b * p.x + m.d * p.y + m.f;\r\n if (!isProjective(m)) return { x, y };\r\n const w = safeW((m.g ?? 0) * p.x + (m.h ?? 0) * p.y + (m.i ?? 1));\r\n return { x: x / w, y: y / w };\r\n}\r\n\r\n/**\r\n * The inverse transform, or `null` when `m` is singular (a zero scale collapses\r\n * the plane, so no inverse exists). Used to map a viewport-space point back into\r\n * a node's local space for hit testing.\r\n */\r\n/** @internal */\r\nexport function invert(m: Matrix2D): Matrix2D | null {\r\n if (isProjective(m)) return invertProjective(m);\r\n const det = m.a * m.d - m.b * m.c;\r\n if (det === 0 || !Number.isFinite(det)) return null;\r\n const inv = 1 / det;\r\n return {\r\n a: m.d * inv,\r\n b: -m.b * inv,\r\n c: -m.c * inv,\r\n d: m.a * inv,\r\n e: (m.c * m.f - m.d * m.e) * inv,\r\n f: (m.b * m.e - m.a * m.f) * inv,\r\n };\r\n}\r\n\r\n/**\r\n * The inverse of a homography — the adjugate over the determinant, written out\r\n * in this module's row naming. A projective inverse is still a homography, which\r\n * is what lets picking keep mapping a viewport point back into a node's local\r\n * space with nothing but {@link applyToPoint} once the node is tilted.\r\n */\r\nfunction invertProjective(m: Matrix2D): Matrix2D | null {\r\n const { a, b, c, d, e, f } = m;\r\n const g = m.g ?? 0, h = m.h ?? 0, i = m.i ?? 1;\r\n // Cofactors of the 3×3 | a c e | / | b d f | / | g h i |.\r\n const A = d * i - f * h;\r\n const C = f * g - b * i;\r\n const E = b * h - d * g;\r\n const det = a * A + c * C + e * E;\r\n if (det === 0 || !Number.isFinite(det)) return null;\r\n const inv = 1 / det;\r\n return {\r\n a: A * inv,\r\n c: (e * h - c * i) * inv,\r\n e: (c * f - e * d) * inv,\r\n b: C * inv,\r\n d: (a * i - e * g) * inv,\r\n f: (e * b - a * f) * inv,\r\n g: E * inv,\r\n h: (c * g - a * h) * inv,\r\n i: (a * d - c * b) * inv,\r\n };\r\n}\r\n\r\n/**\r\n * The viewport transform a camera scope pushes, in canvas (y-down) space — a\r\n * literal transcription of `RenderContext2D.beginCamera`:\r\n *\r\n * translate(vx, vy) · rotate(-heading) · scale(zoom) · translate(-lookAt.x, +lookAt.y)\r\n *\r\n * `lookAt` is a y-up world point, hence the sign flip on its y. `vx`/`vy` are the\r\n * viewport centre the camera's callers pass (`layoutBounds.x`, `-layoutBounds.y`).\r\n * Kept next to {@link nodeLocalMatrix} so the two stay in step with the renderer.\r\n */\r\n/** @internal */\r\nexport function cameraMatrix(\r\n vx: number, vy: number, lookAt: Vector2, zoom: number, heading: number,\r\n): Matrix2D {\r\n const rad = (-heading * Math.PI) / 180;\r\n const cos = Math.cos(rad);\r\n const sin = Math.sin(rad);\r\n // rotate(-heading) · scale(zoom), the same clockwise canvas convention as\r\n // nodeLocalMatrix's R·S block.\r\n const a = zoom * cos;\r\n const b = zoom * sin;\r\n const c = zoom * -sin;\r\n const d = zoom * cos;\r\n // Fold the trailing translate(-lookAt.x, +lookAt.y) into e/f.\r\n const tx = -lookAt.x;\r\n const ty = lookAt.y;\r\n return { a, b, c, d, e: vx + a * tx + c * ty, f: vy + b * tx + d * ty };\r\n}\r\n\r\n/**\r\n * Build the local transform for a node, matching the renderer's\r\n * `RenderContext2D.transform` exactly (canvas y-down space):\r\n * `T(cx + pivotX, cy + pivotY) · R(deg) · S(scale) · T(-pivotX, -pivotY)`.\r\n *\r\n * @param cx Canvas-space x of the node's layout-cell lookAt.\r\n * @param cy Canvas-space y of the node's layout-cell origin (y-down).\r\n * @param rotation Rotation in degrees, clockwise (canvas convention).\r\n * @param scale Uniform scale factor.\r\n * @param pivotX Pivot offset in pixels, x.\r\n * @param pivotY Pivot offset in pixels, y (canvas y-down).\r\n */\r\n/** @internal */\r\nexport function nodeLocalMatrix(\r\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\r\n): Matrix2D {\r\n const rad = (rotation * Math.PI) / 180;\r\n const cos = Math.cos(rad);\r\n const sin = Math.sin(rad);\r\n // R(deg) · S(scale): clockwise rotation in canvas (y-down) is\r\n // | cos -sin | · | s 0 | = | s·cos -s·sin |\r\n // | sin cos | | 0 s | | s·sin s·cos |\r\n const a = scale * cos;\r\n const b = scale * sin;\r\n const c = scale * -sin;\r\n const d = scale * cos;\r\n // Fold the pivot translations into e/f:\r\n // T(cx+pivotX, cy+pivotY) · (RS) · T(-pivotX, -pivotY)\r\n return {\r\n a, b, c, d,\r\n e: cx + pivotX - (a * pivotX + c * pivotY),\r\n f: cy + pivotY - (b * pivotX + d * pivotY),\r\n };\r\n}\r\n\r\n/**\r\n * The out-of-plane half of a node's transform — the mirrors, the two extra\r\n * rotation axes, the push along z and the perspective divide that makes them\r\n * read as depth rather than as squashing. See {@link nodeProjectedMatrix}.\r\n */\r\n/** @internal */\r\nexport interface Projection3D {\r\n /** Tilt about the horizontal axis, degrees. Positive tips the top away. */\r\n rotationX: number;\r\n /** Tilt about the vertical axis, degrees. Positive swings the right edge away. */\r\n rotationY: number;\r\n /**\r\n * In-plane rotation belonging to the 3D block, degrees clockwise — the Z axis\r\n * of `Rx · Ry · Rz`.\r\n *\r\n * A prop of its own rather than a second name for the node's `rotation`, and\r\n * that is a deliberate separation: `rotation` is the node's **shape** — it\r\n * turns the box, the selection outline turns with it, and handles follow —\r\n * while this is part of the projection, which is paint. The two compose (a\r\n * Z rotation is a Z rotation, so they add), but they are two independent\r\n * numbers and editing one never moves the other.\r\n */\r\n rotationZ: number;\r\n /** Push along the view axis in px, applied after the rotations. Inert without `perspective`. */\r\n depth: number;\r\n /** Viewer distance in px. `0` is no perspective at all — a parallel projection. */\r\n perspective: number;\r\n /** Mirror across the node's vertical centre line. */\r\n flipHorizontal: boolean;\r\n /** Mirror across the node's horizontal centre line. */\r\n flipVertical: boolean;\r\n}\r\n\r\n/** @internal Every field of a {@link Projection3D} at rest — the plain 2D node. */\r\nexport const NO_PROJECTION_3D: Projection3D = {\r\n rotationX: 0,\r\n rotationY: 0,\r\n rotationZ: 0,\r\n depth: 0,\r\n perspective: 0,\r\n flipHorizontal: false,\r\n flipVertical: false,\r\n};\r\n\r\n/**\r\n * Whether `p` asks for anything {@link nodeLocalMatrix} cannot already express.\r\n * The gate in front of every projective path in the engine: a scene with no 3D\r\n * in it keeps the six-number matrix, the decomposed `translate/rotate/scale`\r\n * render path, and the affine `multiply` it always had.\r\n */\r\n/** @internal */\r\nexport function hasProjection3D(p: Projection3D): boolean {\r\n return (\r\n p.rotationX !== 0 ||\r\n p.rotationY !== 0 ||\r\n p.rotationZ !== 0 ||\r\n p.flipHorizontal ||\r\n p.flipVertical ||\r\n (p.perspective !== 0 && p.depth !== 0)\r\n );\r\n}\r\n\r\n/**\r\n * Whether a plane carrying this projection has turned its back on the viewer —\r\n * the test behind `backfaceVisible`.\r\n *\r\n * Read off the tilt alone. The plane's normal starts at `(0,0,1)` and comes out\r\n * of `Rx·Ry` with a z of `cos(rotationX)·cos(rotationY)`; the in-plane rotation\r\n * can't change which way it points, and neither, deliberately, can a *mirror*.\r\n * CSS derives the answer from the whole accumulated matrix, where a `scaleX(-1)`\r\n * inverts orientation and hides the element — which is a surprising way to lose\r\n * a node you only meant to flip. Here a flip is a flip and a turn is a turn.\r\n */\r\n/** @internal */\r\nexport function facesAway(rotationX: number, rotationY: number): boolean {\r\n const rad = Math.PI / 180;\r\n return Math.cos(rotationX * rad) * Math.cos(rotationY * rad) < 0;\r\n}\r\n\r\n/**\r\n * A node's local transform with the out-of-plane half folded in — the same space\r\n * and the same pivot convention as {@link nodeLocalMatrix}, which this reduces to\r\n * exactly when {@link hasProjection3D} is false.\r\n *\r\n * The composition, innermost first:\r\n *\r\n * `T(pivot) · P(perspective) · Tz(depth) · Rx · Ry · Rz(rotationZ + rotation) · S(scale) · T(-pivot) · F(flip)`\r\n *\r\n * — everything about the pivot except the mirrors, which reflect about the\r\n * node's own centre so that flipping cannot move the node (see `F` below),\r\n *\r\n * which is CSS's own order for `rotateX(a) rotateY(b) rotateZ(c)` — the in-plane\r\n * rotation innermost, so that adding a tilt never changes what the node's own\r\n * `rotation` already meant.\r\n *\r\n * The Z angle is the **sum** of the two in-plane rotations the node carries, and\r\n * they stay two: `rotation` turns the node's *shape* — its box turns with it, and\r\n * so does anything reading that box — while {@link Projection3D.rotationZ} is\r\n * part of the projection, which is paint (see `Node2D._localMatrix`). Summing them\r\n * is not a coupling but the definition of composing two rotations about one axis;\r\n * neither number moves when the other is edited.\r\n *\r\n * The content is planar — every point enters with `z = 0` — so the whole thing\r\n * collapses to a 3×3 homography over `(x, y, 1)` rather than needing a 4×4 and a\r\n * separate divide step. The projected z survives only as the perspective row.\r\n *\r\n * @param cx Canvas-space x of the node's positioned centre.\r\n * @param cy Canvas-space y of the node's positioned centre (y-down).\r\n * @param rotation In-plane rotation in degrees, clockwise (the Z axis).\r\n * @param scale Uniform scale factor.\r\n * @param pivotX Pivot offset from the centre in px, x.\r\n * @param pivotY Pivot offset from the centre in px, y (canvas y-down).\r\n * @param p The out-of-plane fields.\r\n */\r\n/** @internal */\r\nexport function nodeProjectedMatrix(\r\n cx: number, cy: number, rotation: number, scale: number, pivotX: number, pivotY: number,\r\n p: Projection3D,\r\n): Matrix2D {\r\n if (!hasProjection3D(p)) {\r\n return nodeLocalMatrix(cx, cy, rotation, scale, pivotX, pivotY);\r\n }\r\n const rad = Math.PI / 180;\r\n const ca = Math.cos(p.rotationX * rad), sa = Math.sin(p.rotationX * rad);\r\n const cb = Math.cos(p.rotationY * rad), sb = Math.sin(p.rotationY * rad);\r\n // The two in-plane rotations compose into one angle — see the note above.\r\n const cz = (rotation + p.rotationZ) * rad;\r\n const cc = Math.cos(cz), sc = Math.sin(cz);\r\n\r\n // The two columns of Rx·Ry·Rz that a z = 0 point can reach, scaled.\r\n const A = cb * cc * scale;\r\n const C = -cb * sc * scale;\r\n const B = (sa * sb * cc + ca * sc) * scale;\r\n const D = (ca * cc - sa * sb * sc) * scale;\r\n // The row that would have been the projected z, had we kept one.\r\n const G = (sa * sc - ca * sb * cc) * scale;\r\n const H = (ca * sb * sc + sa * cc) * scale;\r\n\r\n // Perspective: a point at depth z lands at x/w with w = 1 - z/perspective.\r\n // No perspective means a parallel projection — z is simply dropped, w stays\r\n // 1, and the result is affine (which is also why `depth` alone does nothing).\r\n const invP = p.perspective !== 0 ? 1 / p.perspective : 0;\r\n const g = -G * invP;\r\n const h = -H * invP;\r\n // The z the pivot itself sits at: -(G·pivotX + H·pivotY) is what the shift to\r\n // pivot-relative coordinates leaves in the z row, and `depth` is the push\r\n // along it, applied after the tilt (so it moves the whole tilted plane).\r\n const i = 1 - (p.depth - (G * pivotX + H * pivotY)) * invP;\r\n\r\n // Numerators about the pivot, then the trailing translate folded in. A\r\n // translate composes onto a homography as `+ t·w`, hence the g/h/i terms.\r\n const tx = cx + pivotX;\r\n const ty = cy + pivotY;\r\n\r\n // The mirrors, applied **innermost and about the node's own centre** — a\r\n // final column negation, which is what `M · diag(fx, fy, 1)` comes to.\r\n //\r\n // Not about the pivot, unlike everything else here, and that is the whole\r\n // point: a flip is an in-place reflection. Composing it with the pivot the\r\n // way CSS's `scaleX(-1)` does means a node hinged anywhere but its middle\r\n // *swings* when you flip it — its position readout changes, its corner\r\n // handles land somewhere else, and the gesture stops meaning \"mirror this\"\r\n // and starts meaning \"mirror this and move it\". Every design tool flips\r\n // about the selection's own centre for that reason. Written as a column\r\n // scale rather than a `T(c)·F·T(-c)` sandwich because that is what one\r\n // reduces to here — the local frame is already centred on the node — which\r\n // leaves `e`/`f`/`i` untouched and makes \"a flip cannot move the node\" a\r\n // property of the arithmetic rather than a thing to remember.\r\n const fx = p.flipHorizontal ? -1 : 1;\r\n const fy = p.flipVertical ? -1 : 1;\r\n return {\r\n a: (A + tx * g) * fx,\r\n c: (C + tx * h) * fy,\r\n e: -(A * pivotX + C * pivotY) + tx * i,\r\n b: (B + ty * g) * fx,\r\n d: (D + ty * h) * fy,\r\n f: -(B * pivotX + D * pivotY) + ty * i,\r\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AAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/B,CAAC;IACD,aAAa,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE;QACjD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC5C,IAAI,KAAK,KAAK,MAAM;YAAE,OAAO,aAAa,CAAC;QAC3C,IAAI,KAAK,KAAK,KAAK;YAAE,OAAO,WAAW,CAAC;QACxC,OAAO,aAAa,CAAC;IACzB,CAAC;IACD,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ;CAC/C,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\n\n/** Width and height in pixels. */\nexport interface Size2D {\n width: number;\n height: number;\n}\n\n/**\n * The {@link Size2D} attribute's op set: `lerp` interpolates `width`/`height`\n * independently. `expand` fills the `size` shorthand into `width`/`height` on a\n * props-like object, in place. `size` is sugar for \"the same value on both\n * axes\"; explicit `width`/`height` take precedence over it (same precedence as\n * `insetsOps.resolve`'s side-vs-shorthand rule), so `{ size: 200, width: 100 }`\n * keeps `width: 100` and only fills in `height: 200`. No-op when `size` is\n * absent. The reactive-binding form (`size: () => SizeInput`) is supported —\n * both axes are bound to the same callback, re-evaluated independently per axis.\n */\nexport const size2DOps: AttributeOps<Size2D, Size2D> & { expand(props: Record<string, unknown>): void } = {\n resolve: (value) => value,\n lerp: (from, to, t) => ({ width: lerpNumber(from.width, to.width, t), height: lerpNumber(from.height, to.height, t) }),\n expand: (props) => {\n if (props.size === undefined) return;\n if (props.width === undefined) props.width = props.size;\n if (props.height === undefined) props.height = props.size;\n },\n};\n\n/**\n * Sizing behavior for a node dimension.\n * - `\"fill\"`: expand to fill available space from the parent\n * - `\"hug\"`: shrink to fit the node's own content\n */\n/** @internal */\nexport type SizeType = \"fill\" | \"hug\";\n\n/** A dimension can be specified as a behavior keyword or a fixed pixel value. */\n/** @internal */\nexport type SizeInput = SizeType | number;\n\n/**\n * The dimension-keyword `SizeInput` attribute's op set — used by `@sizeProperty`.\n * `lerp` interpolates two numbers; a keyword on either end hard-switches at t=1.\n * `resolveLayout` turns a `SizeInput` into a concrete number for layout, given\n * the space available and the size contents would need; `isAuto` reports\n * whether a dimension needs layout to resolve at all (a keyword) as opposed to\n * being a fixed number.\n */\nexport const sizeInputOps: AttributeOps<SizeInput, SizeInput> & {\n resolveLayout(input: SizeInput, availableSize: number, contentSize: number): number;\n isAuto(input: SizeInput): boolean;\n} = {\n resolve: (value) => value,\n lerp: (from, to, t) => {\n if (typeof from === \"number\" && typeof to === \"number\") {\n return lerpNumber(from, to, t);\n }\n return t === 1 ? to : from;\n },\n resolveLayout: (input, availableSize, contentSize) => {\n if (typeof input === \"number\") return input;\n if (input === \"fill\") return availableSize;\n if (input === \"hug\") return contentSize;\n return availableSize;\n },\n isAuto: (input) => typeof input !== \"number\",\n};\n"]}
1
+ {"version":3,"file":"size.js","sourceRoot":"","sources":["../../../src/attributes/layout/size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,SAAS,GAAoF;IACtG,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACzB,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;IACtH,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;QACd,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO;QACrC,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;YAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxD,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;YAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC;IAC9D,CAAC;CACJ,CAAC;AAcF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAGrB;IACA,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACzB,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;QAClB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;YACrD,OAAO,UAAU,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACnC,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/B,CAAC;IACD,aAAa,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE;QACjD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC5C,IAAI,KAAK,KAAK,MAAM;YAAE,OAAO,aAAa,CAAC;QAC3C,IAAI,KAAK,KAAK,KAAK;YAAE,OAAO,WAAW,CAAC;QACxC,OAAO,aAAa,CAAC;IACzB,CAAC;IACD,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ;CAC/C,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\n\r\n/** Width and height in pixels. */\r\nexport interface Size2D {\r\n width: number;\r\n height: number;\r\n}\r\n\r\n/**\r\n * The {@link Size2D} attribute's op set: `lerp` interpolates `width`/`height`\r\n * independently. `expand` fills the `size` shorthand into `width`/`height` on a\r\n * props-like object, in place. `size` is sugar for \"the same value on both\r\n * axes\"; explicit `width`/`height` take precedence over it (same precedence as\r\n * `insetsOps.resolve`'s side-vs-shorthand rule), so `{ size: 200, width: 100 }`\r\n * keeps `width: 100` and only fills in `height: 200`. No-op when `size` is\r\n * absent. The reactive-binding form (`size: () => SizeInput`) is supported —\r\n * both axes are bound to the same callback, re-evaluated independently per axis.\r\n */\r\nexport const size2DOps: AttributeOps<Size2D, Size2D> & { expand(props: Record<string, unknown>): void } = {\r\n resolve: (value) => value,\r\n lerp: (from, to, t) => ({ width: lerpNumber(from.width, to.width, t), height: lerpNumber(from.height, to.height, t) }),\r\n expand: (props) => {\r\n if (props.size === undefined) return;\r\n if (props.width === undefined) props.width = props.size;\r\n if (props.height === undefined) props.height = props.size;\r\n },\r\n};\r\n\r\n/**\r\n * Sizing behavior for a node dimension.\r\n * - `\"fill\"`: expand to fill available space from the parent\r\n * - `\"hug\"`: shrink to fit the node's own content\r\n */\r\n/** @internal */\r\nexport type SizeType = \"fill\" | \"hug\";\r\n\r\n/** A dimension can be specified as a behavior keyword or a fixed pixel value. */\r\n/** @internal */\r\nexport type SizeInput = SizeType | number;\r\n\r\n/**\r\n * The dimension-keyword `SizeInput` attribute's op set — used by `@sizeProperty`.\r\n * `lerp` interpolates two numbers; a keyword on either end hard-switches at t=1.\r\n * `resolveLayout` turns a `SizeInput` into a concrete number for layout, given\r\n * the space available and the size contents would need; `isAuto` reports\r\n * whether a dimension needs layout to resolve at all (a keyword) as opposed to\r\n * being a fixed number.\r\n */\r\nexport const sizeInputOps: AttributeOps<SizeInput, SizeInput> & {\r\n resolveLayout(input: SizeInput, availableSize: number, contentSize: number): number;\r\n isAuto(input: SizeInput): boolean;\r\n} = {\r\n resolve: (value) => value,\r\n lerp: (from, to, t) => {\r\n if (typeof from === \"number\" && typeof to === \"number\") {\r\n return lerpNumber(from, to, t);\r\n }\r\n return t === 1 ? to : from;\r\n },\r\n resolveLayout: (input, availableSize, contentSize) => {\r\n if (typeof input === \"number\") return input;\r\n if (input === \"fill\") return availableSize;\r\n if (input === \"hug\") return contentSize;\r\n return availableSize;\r\n },\r\n isAuto: (input) => typeof input !== \"number\",\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"transform3d.js","sourceRoot":"","sources":["../../../src/attributes/layout/transform3d.ts"],"names":[],"mappings":"AAuCA,0FAA0F;AAC1F,MAAM,iBAAiB,GAAmD;IACtE,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACtC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACpC,CAAC,cAAc,EAAE,cAAc,CAAC;IAChC,CAAC,QAAQ,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF;;;;;;GAMG;AACH,gBAAgB;AAChB,MAAM,UAAU,iBAAiB,CAAC,KAA8B;IAC5D,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAC9B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO;IACzE,MAAM,MAAM,GAAG,GAA8B,CAAC;IAC9C,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,iBAAiB,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC9E,CAAC;AACL,CAAC","sourcesContent":["import { Alignment } from \"@/attributes/layout/alignment\";\n\n/**\n * The out-of-plane transform as one bag — the shorthand form of the individual\n * `rotationX` / `rotationY` / `depth` / `perspective` / `backfaceVisible` /\n * `flipHorizontal` / `flipVertical` / `transformOrigin` props on {@link Node2D}.\n *\n * Sugar, and only sugar: {@link expandTransform3D} writes each field onto the\n * prop it names before anything reads either, the same way `size` becomes\n * `width`/`height`. That keeps one storage location per value — so a tween of\n * `transform3D.rotationY` and a tween of `rotationY` are the same tween, and a\n * scene can mix the two forms without either shadowing the other.\n *\n * Named `NodeTransform3D` rather than `Transform3D`, which `render3d` already\n * uses for the placement of an object in a *real* 3D scene. These are two\n * different things and the names had to say so: this one tilts a flat node the\n * way a browser tilts a `<div>`, that one puts a mesh in a world with lights in it.\n */\nexport interface NodeTransform3D {\n /** Tilt about the horizontal axis, degrees. Positive tips the top away. */\n rotationX?: number;\n /** Tilt about the vertical axis, degrees. Positive swings the right edge away. */\n rotationY?: number;\n /** In-plane rotation belonging to the 3D block, degrees. Separate from the node's own `rotation`. */\n rotationZ?: number;\n /** Push along the view axis in px (CSS `translateZ`). Inert without `perspective`. */\n depth?: number;\n /** Viewer distance in px. `0` (default) is a parallel projection — no perspective. */\n perspective?: number;\n /** Whether the node still paints once it has turned past edge-on. Default `true`. */\n backfaceVisible?: boolean;\n /** Mirror across the vertical centre line (CSS `scaleX(-1)`). */\n flipHorizontal?: boolean;\n /** Mirror across the horizontal centre line (CSS `scaleY(-1)`). */\n flipVertical?: boolean;\n /** The point the whole transform turns about — CSS `transform-origin`. Defaults to the node's `pivot`. */\n origin?: Alignment;\n}\n\n/** The prop each {@link NodeTransform3D} field expands to. `origin` is the one rename. */\nconst TRANSFORM_3D_KEYS: ReadonlyArray<[keyof NodeTransform3D, string]> = [\n [\"rotationX\", \"rotationX\"],\n [\"rotationY\", \"rotationY\"],\n [\"rotationZ\", \"rotationZ\"],\n [\"depth\", \"depth\"],\n [\"perspective\", \"perspective\"],\n [\"backfaceVisible\", \"backfaceVisible\"],\n [\"flipHorizontal\", \"flipHorizontal\"],\n [\"flipVertical\", \"flipVertical\"],\n [\"origin\", \"transformOrigin\"],\n];\n\n/**\n * Expand the `transform3D` shorthand onto the individual props, in place. An\n * explicitly-named prop in the same object wins over the bag's field, matching\n * `size`-vs-`width` and `padding`-vs-`paddingLeft`; a `transform3D` given as a\n * whole-bag callback is left alone, since there is no per-field value to\n * distribute. No-op when the key is absent, which is nearly always.\n */\n/** @internal */\nexport function expandTransform3D(props: Record<string, unknown>): void {\n const bag = props.transform3D;\n if (bag === undefined || bag === null || typeof bag !== \"object\") return;\n const source = bag as Record<string, unknown>;\n for (const [field, prop] of TRANSFORM_3D_KEYS) {\n const value = source[field];\n if (value !== undefined && props[prop] === undefined) props[prop] = value;\n }\n}\n"]}
1
+ {"version":3,"file":"transform3d.js","sourceRoot":"","sources":["../../../src/attributes/layout/transform3d.ts"],"names":[],"mappings":"AAuCA,0FAA0F;AAC1F,MAAM,iBAAiB,GAAmD;IACtE,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACtC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACpC,CAAC,cAAc,EAAE,cAAc,CAAC;IAChC,CAAC,QAAQ,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF;;;;;;GAMG;AACH,gBAAgB;AAChB,MAAM,UAAU,iBAAiB,CAAC,KAA8B;IAC5D,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAC9B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO;IACzE,MAAM,MAAM,GAAG,GAA8B,CAAC;IAC9C,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,iBAAiB,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC9E,CAAC;AACL,CAAC","sourcesContent":["import { Alignment } from \"@/attributes/layout/alignment\";\r\n\r\n/**\r\n * The out-of-plane transform as one bag — the shorthand form of the individual\r\n * `rotationX` / `rotationY` / `depth` / `perspective` / `backfaceVisible` /\r\n * `flipHorizontal` / `flipVertical` / `transformOrigin` props on {@link Node2D}.\r\n *\r\n * Sugar, and only sugar: {@link expandTransform3D} writes each field onto the\r\n * prop it names before anything reads either, the same way `size` becomes\r\n * `width`/`height`. That keeps one storage location per value — so a tween of\r\n * `transform3D.rotationY` and a tween of `rotationY` are the same tween, and a\r\n * scene can mix the two forms without either shadowing the other.\r\n *\r\n * Named `NodeTransform3D` rather than `Transform3D`, which `render3d` already\r\n * uses for the placement of an object in a *real* 3D scene. These are two\r\n * different things and the names had to say so: this one tilts a flat node the\r\n * way a browser tilts a `<div>`, that one puts a mesh in a world with lights in it.\r\n */\r\nexport interface NodeTransform3D {\r\n /** Tilt about the horizontal axis, degrees. Positive tips the top away. */\r\n rotationX?: number;\r\n /** Tilt about the vertical axis, degrees. Positive swings the right edge away. */\r\n rotationY?: number;\r\n /** In-plane rotation belonging to the 3D block, degrees. Separate from the node's own `rotation`. */\r\n rotationZ?: number;\r\n /** Push along the view axis in px (CSS `translateZ`). Inert without `perspective`. */\r\n depth?: number;\r\n /** Viewer distance in px. `0` (default) is a parallel projection — no perspective. */\r\n perspective?: number;\r\n /** Whether the node still paints once it has turned past edge-on. Default `true`. */\r\n backfaceVisible?: boolean;\r\n /** Mirror across the vertical centre line (CSS `scaleX(-1)`). */\r\n flipHorizontal?: boolean;\r\n /** Mirror across the horizontal centre line (CSS `scaleY(-1)`). */\r\n flipVertical?: boolean;\r\n /** The point the whole transform turns about — CSS `transform-origin`. Defaults to the node's `pivot`. */\r\n origin?: Alignment;\r\n}\r\n\r\n/** The prop each {@link NodeTransform3D} field expands to. `origin` is the one rename. */\r\nconst TRANSFORM_3D_KEYS: ReadonlyArray<[keyof NodeTransform3D, string]> = [\r\n [\"rotationX\", \"rotationX\"],\r\n [\"rotationY\", \"rotationY\"],\r\n [\"rotationZ\", \"rotationZ\"],\r\n [\"depth\", \"depth\"],\r\n [\"perspective\", \"perspective\"],\r\n [\"backfaceVisible\", \"backfaceVisible\"],\r\n [\"flipHorizontal\", \"flipHorizontal\"],\r\n [\"flipVertical\", \"flipVertical\"],\r\n [\"origin\", \"transformOrigin\"],\r\n];\r\n\r\n/**\r\n * Expand the `transform3D` shorthand onto the individual props, in place. An\r\n * explicitly-named prop in the same object wins over the bag's field, matching\r\n * `size`-vs-`width` and `padding`-vs-`paddingLeft`; a `transform3D` given as a\r\n * whole-bag callback is left alone, since there is no per-field value to\r\n * distribute. No-op when the key is absent, which is nearly always.\r\n */\r\n/** @internal */\r\nexport function expandTransform3D(props: Record<string, unknown>): void {\r\n const bag = props.transform3D;\r\n if (bag === undefined || bag === null || typeof bag !== \"object\") return;\r\n const source = bag as Record<string, unknown>;\r\n for (const [field, prop] of TRANSFORM_3D_KEYS) {\r\n const value = source[field];\r\n if (value !== undefined && props[prop] === undefined) props[prop] = value;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"vector2.js","sourceRoot":"","sources":["../../../src/attributes/layout/vector2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,gGAAgG;AAChG,MAAM,UAAU,WAAW,CAAC,IAAa,EAAE,EAAW,EAAE,CAAS;IAC7D,OAAO,EAAE,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,+FAA+F;AAC/F,MAAM,CAAC,MAAM,UAAU,GAAmC;IACtD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACzB,IAAI,EAAE,WAAW;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\n\n/** A 2D point or offset in pixel space. */\nexport interface Vector2 {\n x: number;\n y: number;\n}\n\n/** Linear interpolation between two Vector2 positions. t=0 returns `from`, t=1 returns `to`. */\nexport function lerpVector2(from: Vector2, to: Vector2, t: number): Vector2 {\n return { x: lerpNumber(from.x, to.x, t), y: lerpNumber(from.y, to.y, t) };\n}\n\n/** The `Vector2` attribute's op set: resolve is the identity (already a loose number pair). */\nexport const vector2Ops: AttributeOps<Vector2, Vector2> = {\n resolve: (value) => value,\n lerp: lerpVector2,\n};\n"]}
1
+ {"version":3,"file":"vector2.js","sourceRoot":"","sources":["../../../src/attributes/layout/vector2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,gGAAgG;AAChG,MAAM,UAAU,WAAW,CAAC,IAAa,EAAE,EAAW,EAAE,CAAS;IAC7D,OAAO,EAAE,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,+FAA+F;AAC/F,MAAM,CAAC,MAAM,UAAU,GAAmC;IACtD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACzB,IAAI,EAAE,WAAW;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\r\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\r\n\r\n/** A 2D point or offset in pixel space. */\r\nexport interface Vector2 {\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Linear interpolation between two Vector2 positions. t=0 returns `from`, t=1 returns `to`. */\r\nexport function lerpVector2(from: Vector2, to: Vector2, t: number): Vector2 {\r\n return { x: lerpNumber(from.x, to.x, t), y: lerpNumber(from.y, to.y, t) };\r\n}\r\n\r\n/** The `Vector2` attribute's op set: resolve is the identity (already a loose number pair). */\r\nexport const vector2Ops: AttributeOps<Vector2, Vector2> = {\r\n resolve: (value) => value,\r\n lerp: lerpVector2,\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"world-transform.js","sourceRoot":"","sources":["../../../src/attributes/layout/world-transform.ts"],"names":[],"mappings":"","sourcesContent":["import { Vector2 } from \"./vector2\";\n\n/**\n * A node's resolved transform in global (world / scene-root) space. Unlike the\n * per-node `x`/`y` and anchor getters — which are relative to the node's parent\n * — every field here is folded through the full ancestor chain, so two nodes\n * under different parents can be compared or aligned directly.\n *\n * Positions use the same y-up convention as `x`/`y` (positive y is up). Read\n * inside a reactive callback (`x: () => other().global.topRight.x`) they track\n * changes to this node's *and* every ancestor's layout/transform.\n */\n/** @internal */\nexport interface WorldTransform {\n /** World position of the node's center (its `x`/`y` origin). */\n readonly x: number;\n readonly y: number;\n readonly center: Vector2;\n readonly topLeft: Vector2;\n readonly topRight: Vector2;\n readonly bottomLeft: Vector2;\n readonly bottomRight: Vector2;\n readonly topCenter: Vector2;\n readonly bottomCenter: Vector2;\n readonly centerLeft: Vector2;\n readonly centerRight: Vector2;\n /** Sum of this node's and all ancestors' rotations, in degrees clockwise. */\n readonly rotation: number;\n /** Product of this node's and all ancestors' scale factors. */\n readonly scale: number;\n /**\n * Product of this node's and all ancestors' opacities, in `[0, 1]` — the\n * effective alpha the node renders at. Matches the renderer's pass-through\n * fold: an ancestor at half opacity halves everything beneath it.\n */\n readonly opacity: number;\n}\n"]}
1
+ {"version":3,"file":"world-transform.js","sourceRoot":"","sources":["../../../src/attributes/layout/world-transform.ts"],"names":[],"mappings":"","sourcesContent":["import { Vector2 } from \"./vector2\";\r\n\r\n/**\r\n * A node's resolved transform in global (world / scene-root) space. Unlike the\r\n * per-node `x`/`y` and anchor getters — which are relative to the node's parent\r\n * — every field here is folded through the full ancestor chain, so two nodes\r\n * under different parents can be compared or aligned directly.\r\n *\r\n * Positions use the same y-up convention as `x`/`y` (positive y is up). Read\r\n * inside a reactive callback (`x: () => other().global.topRight.x`) they track\r\n * changes to this node's *and* every ancestor's layout/transform.\r\n */\r\n/** @internal */\r\nexport interface WorldTransform {\r\n /** World position of the node's center (its `x`/`y` origin). */\r\n readonly x: number;\r\n readonly y: number;\r\n readonly center: Vector2;\r\n readonly topLeft: Vector2;\r\n readonly topRight: Vector2;\r\n readonly bottomLeft: Vector2;\r\n readonly bottomRight: Vector2;\r\n readonly topCenter: Vector2;\r\n readonly bottomCenter: Vector2;\r\n readonly centerLeft: Vector2;\r\n readonly centerRight: Vector2;\r\n /** Sum of this node's and all ancestors' rotations, in degrees clockwise. */\r\n readonly rotation: number;\r\n /** Product of this node's and all ancestors' scale factors. */\r\n readonly scale: number;\r\n /**\r\n * Product of this node's and all ancestors' opacities, in `[0, 1]` — the\r\n * effective alpha the node renders at. Matches the renderer's pass-through\r\n * fold: an ancestor at half opacity halves everything beneath it.\r\n */\r\n readonly opacity: number;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../../src/attributes/mask/boolean.ts"],"names":[],"mappings":"","sourcesContent":["// Figma-style boolean operations between child paths.\n// `union` — combine all child paths\n// `subtract` — first child minus the rest\n// `intersect` — area covered by every child\n// `exclude` — symmetric difference (XOR)\nexport type BooleanOperation = \"union\" | \"subtract\" | \"intersect\" | \"exclude\";"]}
1
+ {"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../../src/attributes/mask/boolean.ts"],"names":[],"mappings":"","sourcesContent":["// Figma-style boolean operations between child paths.\r\n// `union` — combine all child paths\r\n// `subtract` — first child minus the rest\r\n// `intersect` — area covered by every child\r\n// `exclude` — symmetric difference (XOR)\r\nexport type BooleanOperation = \"union\" | \"subtract\" | \"intersect\" | \"exclude\";"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mask.js","sourceRoot":"","sources":["../../../src/attributes/mask/mask.ts"],"names":[],"mappings":"","sourcesContent":["// Figma-style mask modes for a MaskGroup.\n// `alpha` — use mask's rendered alpha (default)\n// `vector` — fast path-only clip (uses canvas clipPath under the hood)\n// `luminance` — use mask's luminance as alpha\nexport type MaskMode = \"alpha\" | \"vector\" | \"luminance\";\n\n// Which paint layers the mask is applied to. Unlisted layers render above the\n// masked composite (as if drawn after endMask). Omit to mask all layers (default).\n// Example: apply: 'fill' — fills are masked, strokes/shadows render on top.\nexport type MaskApplyLayer = \"fill\" | \"stroke\";\nexport type MaskApply = MaskApplyLayer | MaskApplyLayer[];\n\nexport interface MaskOptions {\n mode?: MaskMode;\n // When true, content shows where the mask is NOT (subtract / inverse mask).\n inverted?: boolean;\n // Which paint layers the mask applies to (default: all).\n apply?: MaskApply;\n}"]}
1
+ {"version":3,"file":"mask.js","sourceRoot":"","sources":["../../../src/attributes/mask/mask.ts"],"names":[],"mappings":"","sourcesContent":["// Figma-style mask modes for a MaskGroup.\r\n// `alpha` — use mask's rendered alpha (default)\r\n// `vector` — fast path-only clip (uses canvas clipPath under the hood)\r\n// `luminance` — use mask's luminance as alpha\r\nexport type MaskMode = \"alpha\" | \"vector\" | \"luminance\";\r\n\r\n// Which paint layers the mask is applied to. Unlisted layers render above the\r\n// masked composite (as if drawn after endMask). Omit to mask all layers (default).\r\n// Example: apply: 'fill' — fills are masked, strokes/shadows render on top.\r\nexport type MaskApplyLayer = \"fill\" | \"stroke\";\r\nexport type MaskApply = MaskApplyLayer | MaskApplyLayer[];\r\n\r\nexport interface MaskOptions {\r\n mode?: MaskMode;\r\n // When true, content shows where the mask is NOT (subtract / inverse mask).\r\n inverted?: boolean;\r\n // Which paint layers the mask applies to (default: all).\r\n apply?: MaskApply;\r\n}"]}
@@ -1,6 +1,6 @@
1
1
  import { TweenFn } from "../../props/host.js";
2
2
  export interface PropOptions<Ext, Int> {
3
- /** Lerp the *internal* (post-mapper) value during `to()`. */
3
+ /** Lerp the *internal* (post-mapper) value during `to()`. Each step is stored as it returns, not mapped again, so a prop that must hold a range under an overshooting ease clamps here too. */
4
4
  tween?: TweenFn<Int>;
5
5
  /** Converts the external input into the internal stored value. Receives the previous internal value as the second arg when available. */
6
6
  mapper?: (ext: Ext, prev?: Int) => Int;
@@ -11,6 +11,8 @@ export interface PropertyMeta {
11
11
  options?: PropOptions<any, any>;
12
12
  /** How a host edits this prop — see {@link PropertyEditor}. */
13
13
  editor?: PropertyEditor;
14
+ /** Withdrawn by a subclass: undescribed, and held at its default. See `withdraw`. */
15
+ withdrawn?: boolean;
14
16
  }
15
17
  /**
16
18
  * What a host needs to draw a control for a property.
@@ -1 +1 @@
1
- {"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../src/attributes/properties/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,WAAW,WAAW,CAAC,GAAG,EAAE,GAAG;IACjC,6DAA6D;IAC7D,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,yIAAyI;IACzI,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC1C;AAGD,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAChC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,MAA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,EAAE;gBACjG,CAAC,CAAC,SAAS;YACf,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAwB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClF,CAAC;QAEF,yEAAyE;QACzE,iEAAiE;QACjE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC;YAC9D,MAAc,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;QACxC,CAAC;QACD,MAAM,IAAI,GAAoB,MAAc,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\n\nexport interface PropOptions<Ext, Int> {\n /** Lerp the *internal* (post-mapper) value during `to()`. */\n tween?: TweenFn<Int>;\n /** Converts the external input into the internal stored value. Receives the previous internal value as the second arg when available. */\n mapper?: (ext: Ext, prev?: Int) => Int;\n}\n\n\nexport interface PropertyMeta {\n key: string;\n default?: unknown;\n options?: PropOptions<any, any>;\n /** How a host edits this prop — see {@link PropertyEditor}. */\n editor?: PropertyEditor;\n}\n\n/**\n * What a host needs to draw a control for a property.\n *\n * Declared **on the property**, because that is the thing it edits. A node type\n * used to describe its controls in a separate list — a `fields` array beside the\n * class, or a manifest beside the package — and a list of props next to a class\n * of props is the shape that drifts: rename one and nothing says the other is\n * now describing something that no longer exists.\n *\n * Nothing here is read while rendering. A frame is identical whether a prop\n * declares a range or not; this exists so an editor has one place to ask.\n */\nexport interface PropertyEditor {\n /**\n * The control to draw. Inferred when absent — a typed decorator knows its\n * own (`@colorProperty` is a colour), and a plain `@property` reads it off\n * the default's type.\n */\n kind?: string;\n /** Bounds and granularity for a numeric control. */\n min?: number;\n max?: number;\n step?: number;\n /** What the number means, for a host that labels it — `\"°\"`, `\"s\"`, `\"×\"`. */\n unit?: string;\n /** The choices, for an enum. */\n options?: readonly string[];\n /** Whether a document may tween it. Defaults to true. */\n animatable?: boolean;\n /**\n * The controls *inside* an object-valued prop.\n *\n * An axis config or a theme is one property holding several editable values,\n * and a host draws them as a group. Declaring them here keeps them attached\n * to the prop they belong to rather than flattened into a list that has to\n * name its own parent.\n */\n properties?: Record<string, PropertyEditor>;\n /** Whatever a control needs that this vocabulary does not name. */\n [option: string]: unknown;\n}\n\n/** Symbol used to store @property metadata on class prototypes. */\nexport const PROPERTY_META = Symbol(\"propertyMeta\");\n\n/**\n * Every `@property` on an instance's class, inherited included, ordered base →\n * subclass so `initProps` applies them in declaration order. A subclass that\n * redeclares a key replaces the inherited declaration whole — default, mapper,\n * tween and editor — at the position the base gave it.\n */\nexport function getPropertyMeta(instance: object): PropertyMeta[] {\n return mostDerived<PropertyMeta>(instance, PROPERTY_META);\n}\n\n/**\n * The per-key declarations stored under `symbol` along `instance`'s prototype\n * chain: base first, one entry per key, the most-derived declaration of each.\n */\nexport function mostDerived<M extends { key: string }>(instance: object, symbol: symbol): M[] {\n const chain: object[] = [];\n let proto = Object.getPrototypeOf(instance);\n while (proto && proto !== Object.prototype) {\n chain.unshift(proto);\n proto = Object.getPrototypeOf(proto);\n }\n const result: M[] = [];\n const at = new Map<string, number>();\n for (const p of chain) {\n if (!Object.prototype.hasOwnProperty.call(p, symbol)) continue;\n for (const m of (p as Record<symbol, M[]>)[symbol]) {\n const i = at.get(m.key);\n if (i === undefined) {\n at.set(m.key, result.length);\n result.push(m);\n } else {\n result[i] = m;\n }\n }\n }\n return result;\n}\n\n/**\n * Legacy property decorator (`experimentalDecorators: true`) that declares a\n * property on a `Node` subclass. Redeclaring an inherited key overrides it; see\n * {@link getPropertyMeta}.\n *\n * @example\n * ```ts\n * @property({ default: 0 }) declare x: number;\n *\n * @property({ mapper: fillOps.resolve, tween: fillOps.lerp })\n * declare fill: FillResolved[];\n * ```\n *\n * The `default` value is used when the corresponding key is absent from the\n * constructor `props` object. The `mapper` / `tween` options are forwarded\n * directly to `applyProp()`.\n */\nexport function property<Ext = any, Int = Ext>(opts?: {\n default?: Ext;\n mapper?: (ext: Ext, prev?: Int) => Int;\n tween?: TweenFn<Int>;\n} & PropertyEditor) {\n // Legacy decorator: (target: object, propertyKey: string | symbol) => void\n return function (target: object, propertyKey: string | symbol): void {\n const key = propertyKey as string;\n // `default`, `mapper` and `tween` drive the prop slot; everything else is\n // the editor's, and is carried rather than interpreted.\n const { default: fallback, mapper, tween, ...editor } = opts ?? {};\n const meta: PropertyMeta = {\n key,\n default: fallback,\n options: (mapper != null || tween != null)\n ? { mapper: mapper as ((ext: any) => any) | undefined, tween: tween as TweenFn<any> | undefined }\n : undefined,\n ...(Object.keys(editor).length > 0 ? { editor: editor as PropertyEditor } : {}),\n };\n\n // Store metadata on the class prototype (own property so getPropertyMeta\n // can distinguish each class's own entries from inherited ones).\n if (!Object.prototype.hasOwnProperty.call(target, PROPERTY_META)) {\n (target as any)[PROPERTY_META] = [];\n }\n const list: PropertyMeta[] = (target as any)[PROPERTY_META];\n if (!list.some(m => m.key === key)) {\n list.push(meta);\n }\n };\n}\n"]}
1
+ {"version":3,"file":"decorator.js","sourceRoot":"","sources":["../../../src/attributes/properties/decorator.ts"],"names":[],"mappings":"AA8DA,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC5C,OAAO,WAAW,CAAe,QAAQ,EAAE,aAAa,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAA4B,QAAgB,EAAE,MAAc;IACnF,MA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AAK,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;QACnE,MAAM,IAAI,GAAiB;YACvB,GAAG;YACH,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,MAAM,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC;gBACtC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAyC,EAAE,KAAK,EAAE,KAAiC,EAAE;gBACjG,CAAC,CAAC,SAAS;YACf,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAwB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClF,CAAC;QAEF,yEAAyE;QACzE,iEAAiE;QACjE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC;YAC9D,MAAc,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;QACxC,CAAC;QACD,MAAM,IAAI,GAAoB,MAAc,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\r\n\r\nexport interface PropOptions<Ext, Int> {\r\n /** Lerp the *internal* (post-mapper) value during `to()`. Each step is stored as it returns, not mapped again, so a prop that must hold a range under an overshooting ease clamps here too. */\r\n tween?: TweenFn<Int>;\r\n /** Converts the external input into the internal stored value. Receives the previous internal value as the second arg when available. */\r\n mapper?: (ext: Ext, prev?: Int) => Int;\r\n}\r\n\r\n\r\nexport interface PropertyMeta {\r\n key: string;\r\n default?: unknown;\r\n options?: PropOptions<any, any>;\r\n /** How a host edits this prop — see {@link PropertyEditor}. */\r\n editor?: PropertyEditor;\r\n /** Withdrawn by a subclass: undescribed, and held at its default. See `withdraw`. */\r\n withdrawn?: boolean;\r\n}\r\n\r\n/**\r\n * What a host needs to draw a control for a property.\r\n *\r\n * Declared **on the property**, because that is the thing it edits. A node type\r\n * used to describe its controls in a separate list — a `fields` array beside the\r\n * class, or a manifest beside the package — and a list of props next to a class\r\n * of props is the shape that drifts: rename one and nothing says the other is\r\n * now describing something that no longer exists.\r\n *\r\n * Nothing here is read while rendering. A frame is identical whether a prop\r\n * declares a range or not; this exists so an editor has one place to ask.\r\n */\r\nexport interface PropertyEditor {\r\n /**\r\n * The control to draw. Inferred when absent — a typed decorator knows its\r\n * own (`@colorProperty` is a colour), and a plain `@property` reads it off\r\n * the default's type.\r\n */\r\n kind?: string;\r\n /** Bounds and granularity for a numeric control. */\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n /** What the number means, for a host that labels it — `\"°\"`, `\"s\"`, `\"×\"`. */\r\n unit?: string;\r\n /** The choices, for an enum. */\r\n options?: readonly string[];\r\n /** Whether a document may tween it. Defaults to true. */\r\n animatable?: boolean;\r\n /**\r\n * The controls *inside* an object-valued prop.\r\n *\r\n * An axis config or a theme is one property holding several editable values,\r\n * and a host draws them as a group. Declaring them here keeps them attached\r\n * to the prop they belong to rather than flattened into a list that has to\r\n * name its own parent.\r\n */\r\n properties?: Record<string, PropertyEditor>;\r\n /** Whatever a control needs that this vocabulary does not name. */\r\n [option: string]: unknown;\r\n}\r\n\r\n/** Symbol used to store @property metadata on class prototypes. */\r\nexport const PROPERTY_META = Symbol(\"propertyMeta\");\r\n\r\n/**\r\n * Every `@property` on an instance's class, inherited included, ordered base →\r\n * subclass so `initProps` applies them in declaration order. A subclass that\r\n * redeclares a key replaces the inherited declaration whole — default, mapper,\r\n * tween and editor — at the position the base gave it.\r\n */\r\nexport function getPropertyMeta(instance: object): PropertyMeta[] {\r\n return mostDerived<PropertyMeta>(instance, PROPERTY_META);\r\n}\r\n\r\n/**\r\n * The per-key declarations stored under `symbol` along `instance`'s prototype\r\n * chain: base first, one entry per key, the most-derived declaration of each.\r\n */\r\nexport function mostDerived<M extends { key: string }>(instance: object, symbol: symbol): M[] {\r\n const chain: object[] = [];\r\n let proto = Object.getPrototypeOf(instance);\r\n while (proto && proto !== Object.prototype) {\r\n chain.unshift(proto);\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n const result: M[] = [];\r\n const at = new Map<string, number>();\r\n for (const p of chain) {\r\n if (!Object.prototype.hasOwnProperty.call(p, symbol)) continue;\r\n for (const m of (p as Record<symbol, M[]>)[symbol]) {\r\n const i = at.get(m.key);\r\n if (i === undefined) {\r\n at.set(m.key, result.length);\r\n result.push(m);\r\n } else {\r\n result[i] = m;\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Legacy property decorator (`experimentalDecorators: true`) that declares a\r\n * property on a `Node` subclass. Redeclaring an inherited key overrides it; see\r\n * {@link getPropertyMeta}.\r\n *\r\n * @example\r\n * ```ts\r\n * @property({ default: 0 }) declare x: number;\r\n *\r\n * @property({ mapper: fillOps.resolve, tween: fillOps.lerp })\r\n * declare fill: FillResolved[];\r\n * ```\r\n *\r\n * The `default` value is used when the corresponding key is absent from the\r\n * constructor `props` object. The `mapper` / `tween` options are forwarded\r\n * directly to `applyProp()`.\r\n */\r\nexport function property<Ext = any, Int = Ext>(opts?: {\r\n default?: Ext;\r\n mapper?: (ext: Ext, prev?: Int) => Int;\r\n tween?: TweenFn<Int>;\r\n} & PropertyEditor) {\r\n // Legacy decorator: (target: object, propertyKey: string | symbol) => void\r\n return function (target: object, propertyKey: string | symbol): void {\r\n const key = propertyKey as string;\r\n // `default`, `mapper` and `tween` drive the prop slot; everything else is\r\n // the editor's, and is carried rather than interpreted.\r\n const { default: fallback, mapper, tween, ...editor } = opts ?? {};\r\n const meta: PropertyMeta = {\r\n key,\r\n default: fallback,\r\n options: (mapper != null || tween != null)\r\n ? { mapper: mapper as ((ext: any) => any) | undefined, tween: tween as TweenFn<any> | undefined }\r\n : undefined,\r\n ...(Object.keys(editor).length > 0 ? { editor: editor as PropertyEditor } : {}),\r\n };\r\n\r\n // Store metadata on the class prototype (own property so getPropertyMeta\r\n // can distinguish each class's own entries from inherited ones).\r\n if (!Object.prototype.hasOwnProperty.call(target, PROPERTY_META)) {\r\n (target as any)[PROPERTY_META] = [];\r\n }\r\n const list: PropertyMeta[] = (target as any)[PROPERTY_META];\r\n if (!list.some(m => m.key === key)) {\r\n list.push(meta);\r\n }\r\n };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../../src/attributes/properties/inputs.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * Reactive-prop input shapes. A `@property`-backed field accepts either a plain\n * value or a `() => value` callback that binds the prop to a derived value\n * (re-evaluated whenever its dependencies change).\n */\n\n/** @internal A single prop input: a constant value or a reactive callback producing it. */\nexport type PropInput<T> = T | (() => T);\n\n/** @internal Maps every key of a props object to its {@link PropInput} form. */\nexport type PropInputs<P> = {\n [K in keyof P]?: P[K] | (() => P[K]);\n};\n"]}
1
+ {"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../../src/attributes/properties/inputs.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\r\n * Reactive-prop input shapes. A `@property`-backed field accepts either a plain\r\n * value or a `() => value` callback that binds the prop to a derived value\r\n * (re-evaluated whenever its dependencies change).\r\n */\r\n\r\n/** @internal A single prop input: a constant value or a reactive callback producing it. */\r\nexport type PropInput<T> = T | (() => T);\r\n\r\n/** @internal Maps every key of a props object to its {@link PropInput} form. */\r\nexport type PropInputs<P> = {\r\n [K in keyof P]?: P[K] | (() => P[K]);\r\n};\r\n"]}
@@ -5,7 +5,7 @@ import { Color, NormalizedColor } from "../../attributes/shape/fill/color/parser
5
5
  import { type Stroke, StrokeResolved } from "../../attributes/shape/stroke/stroke.js";
6
6
  import { type Shadow, ShadowResolved } from "../../attributes/shape/shadow/shadow.js";
7
7
  import { type Effect } from "../../attributes/shape/effects/chain.js";
8
- import { SceneEffect } from "../../attributes/shape/effects/union.js";
8
+ import { NodeEffect } from "../../attributes/shape/effects/union.js";
9
9
  import { RectCornerRadius, CornerRadiusResolved } from "../../attributes/shape/corners/corner-radius.js";
10
10
  import { RectCornerStyle, CornerStyleResolved } from "../../attributes/shape/corners/corner-style.js";
11
11
  import { Insets, InsetsResolved } from "../../attributes/layout/insets.js";
@@ -81,7 +81,7 @@ export declare const shadowProperty: (opts?: (AttributePropOptions<Shadow, Shado
81
81
  kind?: string;
82
82
  }) | undefined) => (target: object, propertyKey: string | symbol) => void;
83
83
  /** An effect-chain property — the `effects` prop's op set. */
84
- export declare const effectsProperty: (opts?: (AttributePropOptions<Effect, SceneEffect[]> & {
84
+ export declare const effectsProperty: (opts?: (AttributePropOptions<Effect, NodeEffect[]> & {
85
85
  kind?: string;
86
86
  }) | undefined) => (target: object, propertyKey: string | symbol) => void;
87
87
  /**
@@ -167,6 +167,13 @@ export declare const textProperty: (opts?: (AttributePropOptions<string, string>
167
167
  export declare const vector3Property: (opts?: (AttributePropOptions<Vector3Input, Vector3> & {
168
168
  kind?: string;
169
169
  }) | undefined) => (target: object, propertyKey: string | symbol) => void;
170
+ /**
171
+ * A {@link vector3Property} that may be unset: a node's `lookAt`, a camera's or
172
+ * light's `target`. It defaults to unset (not to the origin), stays unset when a
173
+ * binding returns `undefined`, and tweens with `to()` — from `unset`'s reading of
174
+ * an unset start (see {@link lerpOptionalVector3}).
175
+ */
176
+ export declare function optionalVector3Property(unset: "origin" | "snap"): (target: object, propertyKey: string | symbol) => void;
170
177
  /**
171
178
  * A Euler rotation in **degrees**, matching 2D `rotation`.
172
179
  *
@@ -1 +1 @@
1
- {"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,O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ACrF,eAAO,MAAM,oBAAoB;WAjD4B,MAAM;yEAmDlE,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,mBAAmB;WAtD6B,MAAM;yEAwDlE,CAAC;AAEF;;;GAGG;AAGH,eAAO,MAAM,YAAY;WAhEoC,MAAM;yEAgEyC,CAAC;AAI7G,+EAA+E;AAC/E,eAAO,MAAM,cAAc;WArEkC,MAAM;yEAqE0D,CAAC;AAE9H;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;WAlF+B,MAAM;yEAkFyE,CAAC;AAE7I;;;GAGG;AACH,eAAO,MAAM,YAAY;WAxFoC,MAAM;yEAwF6C,CAAC;AAEjH,yDAAyD;AACzD,eAAO,MAAM,eAAe;WA3FiC,MAAM;yEA2F8D,CAAC;AAElI;;;GAGG;AACH,eAAO,MAAM,YAAY;WAjGoC,MAAM;yEAiGoD,CAAC;AAIxH;;;GAGG;AACH,eAAO,MAAM,YAAY;WAzGoC,MAAM;yEAyGqC,CAAC;AAEzG;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;WApHiC,MAAM;yEAsHlE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,0DAO/D;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc;WA7IkC,MAAM;yEA+IlE,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB;WAlJ8B,MAAM;yEAoJlE,CAAC;AAIF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;WAnK8B,MAAM;yEAmKoD,CAAC;AAExH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;WA3K4B,MAAM;yEA6KlE,CAAC"}
@@ -15,7 +15,7 @@ import { flowOps } from "../../layout/ops.js";
15
15
  import { audioFiltersOps } from "../../attributes/audio/filters/registry.js";
16
16
  import { audioParamOps } from "../../attributes/audio/filters/curve.js";
17
17
  import { textOps } from "../../attributes/text/ops.js";
18
- import { vector3Ops, euler3Ops, quaternionOps, } from "../../render3d/vector3.js";
18
+ import { vector3Ops, euler3Ops, quaternionOps, lerpOptionalVector3, resolveOptionalVector3, } from "../../render3d/vector3.js";
19
19
  /**
20
20
  * Build one attribute-typed decorator from its canonical {@link AttributeOps}.
21
21
  *
@@ -125,6 +125,20 @@ export const textProperty = attributeProperty(() => "", undefined, textOps.lerp,
125
125
  * interpolate rather than snap.
126
126
  */
127
127
  export const vector3Property = attributeProperty(() => ({ x: 0, y: 0, z: 0 }), vector3Ops.resolve, vector3Ops.lerp, "vector3");
128
+ /**
129
+ * A {@link vector3Property} that may be unset: a node's `lookAt`, a camera's or
130
+ * light's `target`. It defaults to unset (not to the origin), stays unset when a
131
+ * binding returns `undefined`, and tweens with `to()` — from `unset`'s reading of
132
+ * an unset start (see {@link lerpOptionalVector3}).
133
+ */
134
+ export function optionalVector3Property(unset) {
135
+ return property({
136
+ default: undefined,
137
+ mapper: resolveOptionalVector3,
138
+ tween: (from, to, t) => lerpOptionalVector3(from, to, t, unset),
139
+ kind: "vector3",
140
+ });
141
+ }
128
142
  /**
129
143
  * A Euler rotation in **degrees**, matching 2D `rotation`.
130
144
  *
@@ -1 +1 @@
1
- {"version":3,"file":"typed.js","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvC,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAA+B,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAA+B,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE1F,OAAO,EAAe,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAA0C,eAAe,EAAE,MAAM,0CAA0C,CAAC;AACnH,OAAO,EAAwC,cAAc,EAAE,MAAM,yCAAyC,CAA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,CAAC,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,EAAE,SAAS,CAC/E,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAC3C,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ,CAC5E,CAAC;AAEF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAC/C,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,YAAY,CAClF,CAAC;AAEF,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAe,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAExH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CACjD,GAAG,EAAE,CAAC,EAAE,EAAE,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,cAAc,CAC1E,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\nimport { property } from \"./decorator\";\n\nimport { type Fill } from \"@/attributes/shape/fill/chain\";\nimport { FillResolved } from \"@/attributes/shape/fill/union\";\nimport { fillOps } from \"@/attributes/shape/fill/registry\";\nimport { Color, NormalizedColor } from \"@/attributes/shape/fill/color/parser\";\nimport { colorOps } from \"@/attributes/shape/fill/lerp\";\n\nimport { type Stroke, StrokeResolved, strokeOps } from \"@/attributes/shape/stroke/stroke\";\nimport { type Shadow, ShadowResolved, shadowOps } from \"@/attributes/shape/shadow/shadow\";\n\nimport { type Effect, effectsOps } from \"@/attributes/shape/effects/chain\";\nimport { SceneEffect } from \"@/attributes/shape/effects/union\";\n\nimport { RectCornerRadius, CornerRadiusResolved, cornerRadiusOps } from \"@/attributes/shape/corners/corner-radius\";\nimport { RectCornerStyle, CornerStyleResolved, cornerStyleOps } from \"@/attributes/shape/corners/corner-style\";\nimport { pathOps } from \"@/attributes/shape/path/ops\";\n\nimport { Insets, InsetsResolved, insetsOps } from \"@/attributes/layout/insets\";\nimport { Alignment, alignmentOps } from \"@/attributes/layout/alignment\";\nimport { Vector2, vector2Ops } from \"@/attributes/layout/vector2\";\nimport { SizeInput, sizeInputOps } from \"@/attributes/layout/size\";\nimport { flowOps } from \"@/layout/ops\";\nimport type { FlowMode, FlowResolved } from \"@/layout/types\";\n\nimport { type AudioFilter } from \"@/attributes/audio/filters/chain\";\nimport { audioFiltersOps } from \"@/attributes/audio/filters/registry\";\nimport { AudioFilterItem } from \"@/attributes/audio/filters/union\";\nimport { type Param, audioParamOps } from \"@/attributes/audio/filters/curve\";\n\nimport { textOps } from \"@/attributes/text/ops\";\nimport {\n vector3Ops, euler3Ops, quaternionOps,\n type Euler3, type Quaternion, type Vector3, type Vector3Input,\n} from \"@/render3d/vector3\";\nimport { PathData } from \"@/render/descriptors/path\";\n\n/**\n * Attribute-typed variants of `@property`.\n *\n * A rich attribute (a fill, a stroke, a corner radius) is only declarative and\n * tweenable because its `@property` carries the matching *mapper* (loose author\n * input → resolved value) and *tween* (how the resolved value interpolates) —\n * together, an `AttributeOps` (`attributes/shared/operators.ts`). Getting that\n * pair right means knowing which `resolve`/`lerp` belong together — several are\n * `@internal` — so a custom node that wants a second fill has to copy an\n * incantation out of `ShapeNode`.\n *\n * These decorators pre-bake each attribute's `AttributeOps`. `@fillProperty()` is\n * exactly `@property({ default: [], mapper: fillOps.resolve, tween: fillOps.lerp })`,\n * so everything downstream — `set()`, `to()`, `save()`/`restore()`, `() => …`\n * bindings — behaves identically; only the declaration gets shorter.\n *\n * ```ts\n * class Card extends Rect {\n * @fillProperty({ default: \"white/10\" }) declare glow: Fill;\n * @strokeProperty() declare edge: Stroke;\n * @cornerRadiusProperty({ default: 12 }) declare notch: RectCornerRadius;\n * }\n *\n * // <Card glow=\"red\" /> · card().to({ data: { glow: Fills.linearGradient([...]) }, duration: 0.6 })\n * ```\n *\n * Each takes the same options as `@property` — `default`, plus `mapper`/`tween`\n * to override the built-in pair for a one-off case.\n *\n * As with `@property`, the field is declared with the **loose author-facing**\n * type (`Fill`, not `FillResolved[]`) so assignment and reads share one type;\n * the accessor stores the resolved value and consumers cast at the read site.\n */\nexport interface AttributePropOptions<Ext, Int> {\n /** Initial value, used when the constructor `props` object omits the key. */\n default?: Ext;\n /** Override the attribute's built-in external → internal mapper. */\n mapper?: (ext: Ext, prev?: Int) => Int;\n /** Override the attribute's built-in lerp for `to()`. */\n tween?: TweenFn<Int>;\n}\n\n/**\n * Build one attribute-typed decorator from its canonical {@link AttributeOps}.\n *\n * `fallback` is a factory rather than a value so array/object defaults aren't a\n * single instance shared by every property declared through the decorator.\n *\n * An **explicit** `default: undefined` means \"this prop has no default\" and is\n * honoured as such — the key's presence is what's tested, not its value. That\n * distinction matters for an optional attribute whose absence is meaningful: a\n * light with no `color` must stay absent from the descriptor so the renderer's own\n * default applies, where folding it onto the fallback would silently paint every\n * light black.\n */\nfunction attributeProperty<Ext, Int>(\n fallback: () => Ext,\n mapper?: (ext: Ext, prev?: Int) => Int,\n tween?: TweenFn<Int>,\n /** The control a host draws for this attribute, when it is not the default. */\n kind?: string,\n) {\n return (opts?: AttributePropOptions<Ext, Int> & { kind?: string }) =>\n property<Ext, Int>({\n default: opts && \"default\" in opts ? opts.default : fallback(),\n mapper: opts?.mapper ?? mapper,\n tween: opts?.tween ?? tween,\n // A typed decorator knows what it edits, so a caller never has to\n // say — but may, for an attribute a host draws specially.\n ...(opts?.kind ?? kind ? { kind: opts?.kind ?? kind } : {}),\n });\n}\n\n// ---- Paint ----------------------------------------------------------------\n\n/**\n * A fill-layer property: accepts everything the built-in `fill` prop does (a CSS\n * string, a fill prop object, a `Fills` chain, or an array of them) and lerps\n * layer-by-layer.\n *\n * Note this only makes the *property* behave like `fill`; the node still has to\n * paint it (`ctx.draw(g.fill(this.glow as FillResolved[]))`). Assets referenced\n * by the fill (images, videos, 3D surfaces) are discovered from that draw, so\n * nothing extra is needed to make them load.\n */\nexport const fillProperty = attributeProperty<Fill, FillResolved[]>(() => [], fillOps.resolve, fillOps.lerp, \"fills\");\n\n/** A stroke-layer property — the `stroke` prop's op set. */\nexport const strokeProperty = attributeProperty<Stroke, StrokeResolved[]>(() => [], strokeOps.resolve, strokeOps.lerp, \"strokes\");\n\n/** A shadow-layer property — the `shadow` prop's op set. */\nexport const shadowProperty = attributeProperty<Shadow, ShadowResolved[]>(() => [], shadowOps.resolve, shadowOps.lerp, \"shadows\");\n\n/** An effect-chain property — the `effects` prop's op set. */\nexport const effectsProperty = attributeProperty<Effect, SceneEffect[]>(() => [], effectsOps.resolve, effectsOps.lerp, \"effects\");\n\n/**\n * A tweenable colour property: parses CSS strings, `oklch()`, theme tokens and\n * `\"white/10\"` alpha suffixes, and interpolates in normalized space.\n *\n * The stored value is a {@link NormalizedColor} (a `[r, g, b, a]` tuple), which\n * is *not* a `FillProp` on its own — hand it to a fill rather than painting it\n * directly: `g.fill(Fills.color(this.tint))` or `g.fill({ type: 'solid', color:\n * this.tint })`. For a property that is itself a paint layer, use\n * {@link fillProperty}.\n */\nexport const colorProperty = attributeProperty<Color, NormalizedColor>(() => \"black\", colorOps.resolve, colorOps.lerp, \"color\");\n\n// ---- Geometry -------------------------------------------------------------\n\n/** A corner-radius property: uniform, per-corner or per-axis, tweened per corner. */\nexport const cornerRadiusProperty = attributeProperty<RectCornerRadius, CornerRadiusResolved>(\n () => 0, cornerRadiusOps.resolve, cornerRadiusOps.lerp, \"cornerRadius\",\n);\n\n/** A corner-style property (`'rounded'` / `'angled'`), per corner. */\nexport const cornerStyleProperty = attributeProperty<RectCornerStyle, CornerStyleResolved>(\n () => \"rounded\", cornerStyleOps.resolve, cornerStyleOps.lerp, \"cornerStyle\",\n);\n\n/**\n * A path-geometry property: an SVG path string or command list, morphed between\n * arbitrary shapes by `to()`.\n */\n// `resolve` is identity for these (no mapper is passed) so a write skips the\n// mapper-cell indirection entirely — see `applyProp` in `node-reactive.ts`.\nexport const pathProperty = attributeProperty<PathData, PathData>(() => \"\", undefined, pathOps.lerp, \"path\");\n\n// ---- Layout ---------------------------------------------------------------\n\n/** An edge-inset property: scalar, symmetric or per-edge, tweened per edge. */\nexport const insetsProperty = attributeProperty<Insets, InsetsResolved>(() => 0, insetsOps.resolve, insetsOps.lerp, \"insets\");\n\n/**\n * An alignment property: a named position (`'center'`, `'topLeft'`, …) resolved\n * to a per-axis {@link Vector2} in `[-1, 1]` (x: -1 left … +1 right, y: -1 bottom …\n * +1 top), tweened as a vector so `'centerLeft' → 'centerRight'` slides.\n *\n * One decorator for every \"which point of this box\" prop — `Node2D.pivot`, a\n * container's `align`, an image fill's `anchor`. They previously had two\n * decorators (`alignProperty`/`pivotProperty`) that differed only in whether the\n * default was spelled `'center'` or `{ x: 0, y: 0 }` — the same value either side\n * of `resolveAlignment`.\n */\nexport const alignmentProperty = attributeProperty<Alignment, Vector2>(() => \"center\", alignmentOps.resolve, alignmentOps.lerp, \"alignment\");\n\n/**\n * A layout-mode property. Mid-tween it holds both modes and how far along, so\n * restoring the prop — which is what a seek does — restores the blend with it.\n */\nexport const flowProperty = attributeProperty<FlowMode, FlowResolved>(() => \"freeform\", undefined, flowOps.lerp);\n\n/** A plain 2D point property, tweened component-wise. */\nexport const vector2Property = attributeProperty<Vector2, Vector2>(() => ({ x: 0, y: 0 }), undefined, vector2Ops.lerp, \"vector2\");\n\n/**\n * A size property: a pixel number or the `'fill'` / `'hug'` layout keywords,\n * tweened the way `width`/`height` are (keywords snap; numbers interpolate).\n */\nexport const sizeProperty = attributeProperty<SizeInput, SizeInput>(() => \"fill\", undefined, sizeInputOps.lerp, \"size\");\n\n// ---- Text -----------------------------------------------------------------\n\n/**\n * A text property tweened with the same character-level interpolation as\n * `Text.text`, so `to({ label })` types/untypes rather than snapping.\n */\nexport const textProperty = attributeProperty<string, string>(() => \"\", undefined, textOps.lerp, \"text\");\n\n/**\n * A 3D position or scale, from the loose {@link Vector3Input} an author writes\n * (`[1, 2, 3]`, `{ x, y, z }`, or a scalar for \"all three\") to the resolved\n * {@link Vector3} the renderer reads.\n *\n * The mapper is what makes `position={2}` and `position={[0, 1, 0]}` the same\n * kind of thing, and the tween is what makes `to({ position: [0, 3, 0] })`\n * interpolate rather than snap.\n */\nexport const vector3Property = attributeProperty<Vector3Input, Vector3>(\n () => ({ x: 0, y: 0, z: 0 }), vector3Ops.resolve, vector3Ops.lerp, \"vector3\",\n);\n\n/**\n * A Euler rotation in **degrees**, matching 2D `rotation`.\n *\n * Interpolated per axis. For a tumble where that would gimbal, declare the prop\n * with {@link quaternionProperty} instead and tween the quaternion.\n */\nexport const euler3Property = attributeProperty<Vector3Input | Euler3, Euler3>(\n () => ({ x: 0, y: 0, z: 0 }), euler3Ops.resolve, euler3Ops.lerp, \"euler3\",\n);\n\n/** A rotation as a unit quaternion, interpolated with shortest-arc slerp. */\nexport const quaternionProperty = attributeProperty<Quaternion, Quaternion>(\n () => ({ x: 0, y: 0, z: 0, w: 1 }), undefined, quaternionOps.lerp, \"quaternion\",\n);\n\n// ---- Audio ----------------------------------------------------------------\n\n/**\n * An audio level — a gain, a pan position, anything a clip or a bus schedules.\n *\n * `Param`, not `number`, because an `AudioRequest` is a schedule record built\n * once during precomp: a per-frame prop write would be read on whichever frame\n * happened to create the request and then never again, so a `to()` on a level\n * renders flat. A `Curve` *is* the automation lane — it reaches the Web Audio\n * graph as `setValueCurveAtTime` and the offline mixer identically — which is\n * why the tween here interpolates between whole curves rather than between two\n * numbers a frame apart.\n */\nexport const audioParamProperty = attributeProperty<Param, Param>(() => 0, undefined, audioParamOps.lerp, \"audioParam\");\n\n/**\n * An audio filter chain — the `filters` prop's op set.\n *\n * Without it a chain is an object-valued prop, and `Node._prepareStep` drops\n * those silently: the tween would run its duration and write nothing.\n */\nexport const audioFiltersProperty = attributeProperty<AudioFilter, AudioFilterItem[]>(\n () => [], audioFiltersOps.resolve, audioFiltersOps.lerp, \"audioFilters\",\n);\n"]}
1
+ {"version":3,"file":"typed.js","sourceRoot":"","sources":["../../../src/attributes/properties/typed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvC,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAA+B,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAA+B,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE1F,OAAO,EAAe,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAA0C,eAAe,EAAE,MAAM,0CAA0C,CAAC;AACnH,OAAO,EAAwC,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAC/G,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAA0B,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAa,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAW,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAa,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAc,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACH,UAAU,E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BAAiB,CAC3C,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ,CAC5E,CAAC;AAEF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAC/C,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,YAAY,CAClF,CAAC;AAEF,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAe,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAExH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CACjD,GAAG,EAAE,CAAC,EAAE,EAAE,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,cAAc,CAC1E,CAAC","sourcesContent":["import { TweenFn } from \"@/props/host\";\r\nimport { property } from \"./decorator\";\r\n\r\nimport { type Fill } from \"@/attributes/shape/fill/chain\";\r\nimport { FillResolved } from \"@/attributes/shape/fill/union\";\r\nimport { fillOps } from \"@/attributes/shape/fill/registry\";\r\nimport { Color, NormalizedColor } from \"@/attributes/shape/fill/color/parser\";\r\nimport { colorOps } from \"@/attributes/shape/fill/lerp\";\r\n\r\nimport { type Stroke, StrokeResolved, strokeOps } from \"@/attributes/shape/stroke/stroke\";\r\nimport { type Shadow, ShadowResolved, shadowOps } from \"@/attributes/shape/shadow/shadow\";\r\n\r\nimport { type Effect, effectsOps } from \"@/attributes/shape/effects/chain\";\r\nimport { NodeEffect } from \"@/attributes/shape/effects/union\";\r\n\r\nimport { RectCornerRadius, CornerRadiusResolved, cornerRadiusOps } from \"@/attributes/shape/corners/corner-radius\";\r\nimport { RectCornerStyle, CornerStyleResolved, cornerStyleOps } from \"@/attributes/shape/corners/corner-style\";\r\nimport { pathOps } from \"@/attributes/shape/path/ops\";\r\n\r\nimport { Insets, InsetsResolved, insetsOps } from \"@/attributes/layout/insets\";\r\nimport { Alignment, alignmentOps } from \"@/attributes/layout/alignment\";\r\nimport { Vector2, vector2Ops } from \"@/attributes/layout/vector2\";\r\nimport { SizeInput, sizeInputOps } from \"@/attributes/layout/size\";\r\nimport { flowOps } from \"@/layout/ops\";\r\nimport type { FlowMode, FlowResolved } from \"@/layout/types\";\r\n\r\nimport { type AudioFilter } from \"@/attributes/audio/filters/chain\";\r\nimport { audioFiltersOps } from \"@/attributes/audio/filters/registry\";\r\nimport { AudioFilterItem } from \"@/attributes/audio/filters/union\";\r\nimport { type Param, audioParamOps } from \"@/attributes/audio/filters/curve\";\r\n\r\nimport { textOps } from \"@/attributes/text/ops\";\r\nimport {\r\n vector3Ops, euler3Ops, quaternionOps, lerpOptionalVector3, resolveOptionalVector3,\r\n type Euler3, type Quaternion, type Vector3, type Vector3Input,\r\n} from \"@/render3d/vector3\";\r\nimport { PathData } from \"@/render/descriptors/path\";\r\n\r\n/**\r\n * Attribute-typed variants of `@property`.\r\n *\r\n * A rich attribute (a fill, a stroke, a corner radius) is only declarative and\r\n * tweenable because its `@property` carries the matching *mapper* (loose author\r\n * input → resolved value) and *tween* (how the resolved value interpolates) —\r\n * together, an `AttributeOps` (`attributes/shared/operators.ts`). Getting that\r\n * pair right means knowing which `resolve`/`lerp` belong together — several are\r\n * `@internal` — so a custom node that wants a second fill has to copy an\r\n * incantation out of `ShapeNode`.\r\n *\r\n * These decorators pre-bake each attribute's `AttributeOps`. `@fillProperty()` is\r\n * exactly `@property({ default: [], mapper: fillOps.resolve, tween: fillOps.lerp })`,\r\n * so everything downstream — `set()`, `to()`, `save()`/`restore()`, `() => …`\r\n * bindings — behaves identically; only the declaration gets shorter.\r\n *\r\n * ```ts\r\n * class Card extends Rect {\r\n * @fillProperty({ default: \"white/10\" }) declare glow: Fill;\r\n * @strokeProperty() declare edge: Stroke;\r\n * @cornerRadiusProperty({ default: 12 }) declare notch: RectCornerRadius;\r\n * }\r\n *\r\n * // <Card glow=\"red\" /> · card().to({ data: { glow: Fills.linearGradient([...]) }, duration: 0.6 })\r\n * ```\r\n *\r\n * Each takes the same options as `@property` — `default`, plus `mapper`/`tween`\r\n * to override the built-in pair for a one-off case.\r\n *\r\n * As with `@property`, the field is declared with the **loose author-facing**\r\n * type (`Fill`, not `FillResolved[]`) so assignment and reads share one type;\r\n * the accessor stores the resolved value and consumers cast at the read site.\r\n */\r\nexport interface AttributePropOptions<Ext, Int> {\r\n /** Initial value, used when the constructor `props` object omits the key. */\r\n default?: Ext;\r\n /** Override the attribute's built-in external → internal mapper. */\r\n mapper?: (ext: Ext, prev?: Int) => Int;\r\n /** Override the attribute's built-in lerp for `to()`. */\r\n tween?: TweenFn<Int>;\r\n}\r\n\r\n/**\r\n * Build one attribute-typed decorator from its canonical {@link AttributeOps}.\r\n *\r\n * `fallback` is a factory rather than a value so array/object defaults aren't a\r\n * single instance shared by every property declared through the decorator.\r\n *\r\n * An **explicit** `default: undefined` means \"this prop has no default\" and is\r\n * honoured as such — the key's presence is what's tested, not its value. That\r\n * distinction matters for an optional attribute whose absence is meaningful: a\r\n * light with no `color` must stay absent from the descriptor so the renderer's own\r\n * default applies, where folding it onto the fallback would silently paint every\r\n * light black.\r\n */\r\nfunction attributeProperty<Ext, Int>(\r\n fallback: () => Ext,\r\n mapper?: (ext: Ext, prev?: Int) => Int,\r\n tween?: TweenFn<Int>,\r\n /** The control a host draws for this attribute, when it is not the default. */\r\n kind?: string,\r\n) {\r\n return (opts?: AttributePropOptions<Ext, Int> & { kind?: string }) =>\r\n property<Ext, Int>({\r\n default: opts && \"default\" in opts ? opts.default : fallback(),\r\n mapper: opts?.mapper ?? mapper,\r\n tween: opts?.tween ?? tween,\r\n // A typed decorator knows what it edits, so a caller never has to\r\n // say — but may, for an attribute a host draws specially.\r\n ...(opts?.kind ?? kind ? { kind: opts?.kind ?? kind } : {}),\r\n });\r\n}\r\n\r\n// ---- Paint ----------------------------------------------------------------\r\n\r\n/**\r\n * A fill-layer property: accepts everything the built-in `fill` prop does (a CSS\r\n * string, a fill prop object, a `Fills` chain, or an array of them) and lerps\r\n * layer-by-layer.\r\n *\r\n * Note this only makes the *property* behave like `fill`; the node still has to\r\n * paint it (`ctx.draw(g.fill(this.glow as FillResolved[]))`). Assets referenced\r\n * by the fill (images, videos, 3D surfaces) are discovered from that draw, so\r\n * nothing extra is needed to make them load.\r\n */\r\nexport const fillProperty = attributeProperty<Fill, FillResolved[]>(() => [], fillOps.resolve, fillOps.lerp, \"fills\");\r\n\r\n/** A stroke-layer property — the `stroke` prop's op set. */\r\nexport const strokeProperty = attributeProperty<Stroke, StrokeResolved[]>(() => [], strokeOps.resolve, strokeOps.lerp, \"strokes\");\r\n\r\n/** A shadow-layer property — the `shadow` prop's op set. */\r\nexport const shadowProperty = attributeProperty<Shadow, ShadowResolved[]>(() => [], shadowOps.resolve, shadowOps.lerp, \"shadows\");\r\n\r\n/** An effect-chain property — the `effects` prop's op set. */\r\nexport const effectsProperty = attributeProperty<Effect, NodeEffect[]>(() => [], effectsOps.resolve, effectsOps.lerp, \"effects\");\r\n\r\n/**\r\n * A tweenable colour property: parses CSS strings, `oklch()`, theme tokens and\r\n * `\"white/10\"` alpha suffixes, and interpolates in normalized space.\r\n *\r\n * The stored value is a {@link NormalizedColor} (a `[r, g, b, a]` tuple), which\r\n * is *not* a `FillProp` on its own — hand it to a fill rather than painting it\r\n * directly: `g.fill(Fills.color(this.tint))` or `g.fill({ type: 'solid', color:\r\n * this.tint })`. For a property that is itself a paint layer, use\r\n * {@link fillProperty}.\r\n */\r\nexport const colorProperty = attributeProperty<Color, NormalizedColor>(() => \"black\", colorOps.resolve, colorOps.lerp, \"color\");\r\n\r\n// ---- Geometry -------------------------------------------------------------\r\n\r\n/** A corner-radius property: uniform, per-corner or per-axis, tweened per corner. */\r\nexport const cornerRadiusProperty = attributeProperty<RectCornerRadius, CornerRadiusResolved>(\r\n () => 0, cornerRadiusOps.resolve, cornerRadiusOps.lerp, \"cornerRadius\",\r\n);\r\n\r\n/** A corner-style property (`'rounded'` / `'angled'`), per corner. */\r\nexport const cornerStyleProperty = attributeProperty<RectCornerStyle, CornerStyleResolved>(\r\n () => \"rounded\", cornerStyleOps.resolve, cornerStyleOps.lerp, \"cornerStyle\",\r\n);\r\n\r\n/**\r\n * A path-geometry property: an SVG path string or command list, morphed between\r\n * arbitrary shapes by `to()`.\r\n */\r\n// `resolve` is identity for these (no mapper is passed) so a write skips the\r\n// mapper-cell indirection entirely — see `applyProp` in `node-reactive.ts`.\r\nexport const pathProperty = attributeProperty<PathData, PathData>(() => \"\", undefined, pathOps.lerp, \"path\");\r\n\r\n// ---- Layout ---------------------------------------------------------------\r\n\r\n/** An edge-inset property: scalar, symmetric or per-edge, tweened per edge. */\r\nexport const insetsProperty = attributeProperty<Insets, InsetsResolved>(() => 0, insetsOps.resolve, insetsOps.lerp, \"insets\");\r\n\r\n/**\r\n * An alignment property: a named position (`'center'`, `'topLeft'`, …) resolved\r\n * to a per-axis {@link Vector2} in `[-1, 1]` (x: -1 left … +1 right, y: -1 bottom …\r\n * +1 top), tweened as a vector so `'centerLeft' → 'centerRight'` slides.\r\n *\r\n * One decorator for every \"which point of this box\" prop — `Node2D.pivot`, a\r\n * container's `align`, an image fill's `anchor`. They previously had two\r\n * decorators (`alignProperty`/`pivotProperty`) that differed only in whether the\r\n * default was spelled `'center'` or `{ x: 0, y: 0 }` — the same value either side\r\n * of `resolveAlignment`.\r\n */\r\nexport const alignmentProperty = attributeProperty<Alignment, Vector2>(() => \"center\", alignmentOps.resolve, alignmentOps.lerp, \"alignment\");\r\n\r\n/**\r\n * A layout-mode property. Mid-tween it holds both modes and how far along, so\r\n * restoring the prop — which is what a seek does — restores the blend with it.\r\n */\r\nexport const flowProperty = attributeProperty<FlowMode, FlowResolved>(() => \"freeform\", undefined, flowOps.lerp);\r\n\r\n/** A plain 2D point property, tweened component-wise. */\r\nexport const vector2Property = attributeProperty<Vector2, Vector2>(() => ({ x: 0, y: 0 }), undefined, vector2Ops.lerp, \"vector2\");\r\n\r\n/**\r\n * A size property: a pixel number or the `'fill'` / `'hug'` layout keywords,\r\n * tweened the way `width`/`height` are (keywords snap; numbers interpolate).\r\n */\r\nexport const sizeProperty = attributeProperty<SizeInput, SizeInput>(() => \"fill\", undefined, sizeInputOps.lerp, \"size\");\r\n\r\n// ---- Text -----------------------------------------------------------------\r\n\r\n/**\r\n * A text property tweened with the same character-level interpolation as\r\n * `Text.text`, so `to({ label })` types/untypes rather than snapping.\r\n */\r\nexport const textProperty = attributeProperty<string, string>(() => \"\", undefined, textOps.lerp, \"text\");\r\n\r\n/**\r\n * A 3D position or scale, from the loose {@link Vector3Input} an author writes\r\n * (`[1, 2, 3]`, `{ x, y, z }`, or a scalar for \"all three\") to the resolved\r\n * {@link Vector3} the renderer reads.\r\n *\r\n * The mapper is what makes `position={2}` and `position={[0, 1, 0]}` the same\r\n * kind of thing, and the tween is what makes `to({ position: [0, 3, 0] })`\r\n * interpolate rather than snap.\r\n */\r\nexport const vector3Property = attributeProperty<Vector3Input, Vector3>(\r\n () => ({ x: 0, y: 0, z: 0 }), vector3Ops.resolve, vector3Ops.lerp, \"vector3\",\r\n);\r\n\r\n/**\r\n * A {@link vector3Property} that may be unset: a node's `lookAt`, a camera's or\r\n * light's `target`. It defaults to unset (not to the origin), stays unset when a\r\n * binding returns `undefined`, and tweens with `to()` — from `unset`'s reading of\r\n * an unset start (see {@link lerpOptionalVector3}).\r\n */\r\nexport function optionalVector3Property(unset: \"origin\" | \"snap\") {\r\n return property<Vector3Input | undefined, Vector3 | undefined>({\r\n default: undefined,\r\n mapper: resolveOptionalVector3,\r\n tween: (from, to, t) => lerpOptionalVector3(from, to, t, unset),\r\n kind: \"vector3\",\r\n });\r\n}\r\n\r\n/**\r\n * A Euler rotation in **degrees**, matching 2D `rotation`.\r\n *\r\n * Interpolated per axis. For a tumble where that would gimbal, declare the prop\r\n * with {@link quaternionProperty} instead and tween the quaternion.\r\n */\r\nexport const euler3Property = attributeProperty<Vector3Input | Euler3, Euler3>(\r\n () => ({ x: 0, y: 0, z: 0 }), euler3Ops.resolve, euler3Ops.lerp, \"euler3\",\r\n);\r\n\r\n/** A rotation as a unit quaternion, interpolated with shortest-arc slerp. */\r\nexport const quaternionProperty = attributeProperty<Quaternion, Quaternion>(\r\n () => ({ x: 0, y: 0, z: 0, w: 1 }), undefined, quaternionOps.lerp, \"quaternion\",\r\n);\r\n\r\n// ---- Audio ----------------------------------------------------------------\r\n\r\n/**\r\n * An audio level — a gain, a pan position, anything a clip or a bus schedules.\r\n *\r\n * `Param`, not `number`, because an `AudioRequest` is a schedule record built\r\n * once during precomp: a per-frame prop write would be read on whichever frame\r\n * happened to create the request and then never again, so a `to()` on a level\r\n * renders flat. A `Curve` *is* the automation lane — it reaches the Web Audio\r\n * graph as `setValueCurveAtTime` and the offline mixer identically — which is\r\n * why the tween here interpolates between whole curves rather than between two\r\n * numbers a frame apart.\r\n */\r\nexport const audioParamProperty = attributeProperty<Param, Param>(() => 0, undefined, audioParamOps.lerp, \"audioParam\");\r\n\r\n/**\r\n * An audio filter chain — the `filters` prop's op set.\r\n *\r\n * Without it a chain is an object-valued prop, and `Node._prepareStep` drops\r\n * those silently: the tween would run its duration and write nothing.\r\n */\r\nexport const audioFiltersProperty = attributeProperty<AudioFilter, AudioFilterItem[]>(\r\n () => [], audioFiltersOps.resolve, audioFiltersOps.lerp, \"audioFilters\",\r\n);\r\n"]}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The vocabulary of an orbit camera, and the lerps a 3D component tweens with.
3
3
  *
4
- * Three unrelated node types are flown by one — a globe, a molecule, a surface
5
- * plot — and they are unrelated on purpose: what they share is a camera, not a
6
- * subject. So this belongs to none of them, and a package per subject would
7
- * either duplicate it three times or make two of them depend on the third.
4
+ * Unrelated node types are flown by one — a globe, a surface plot — and they
5
+ * are unrelated on purpose: what they share is a camera, not a subject. So this
6
+ * belongs to none of them, and a package per subject would either duplicate it
7
+ * or make one depend on another.
8
8
  */
9
9
  import { type Color, type NormalizedColor } from "../../attributes/shape/fill/color/parser.js";
10
10
  import type { Vector3 } from "../../render3d/vector3.js";
@@ -36,9 +36,9 @@ export declare function lerpFinite(from: number, to: number, t: number): number;
36
36
  export declare function lerpCount(from: number, to: number, t: number): number;
37
37
  /**
38
38
  * Tweens a value that has no in-between — a flag, a representation, a colour
39
- * scheme, a whole molecule — by holding `from` until the tween lands.
39
+ * scheme — by holding `from` until the tween lands.
40
40
  *
41
- * There is no halfway point between a ribbon and a space-filling model, and a
41
+ * There is no halfway point between a wireframe and a solid surface, and a
42
42
  * mid-tween flip reads as a glitch rather than a transition, so the switch
43
43
  * happens once at the end. Snapping at the *midpoint* would be worse still: the
44
44
  * change would land while the command was still running, so a `to` would appear
@@ -59,7 +59,7 @@ export interface Orbit {
59
59
  /**
60
60
  * A stored `orbit` in the camera's own terms.
61
61
  *
62
- * motion-script's camera takes `orbit`/`elevation`/`distance` directly now,
62
+ * The engine's camera takes `orbit`/`elevation`/`distance` directly now,
63
63
  * which is what these nodes always wanted — but the two conventions disagree
64
64
  * about zero: a stored `orbit` here is measured from **+X**, and the camera
65
65
  * measures from **+Z** (head-on). A quarter turn separates them.
@@ -88,7 +88,7 @@ export declare function orbitPosition({ orbit, elevation, distance }: Orbit): Ve
88
88
  * A camera placement to move *to*, with every axis optional.
89
89
  *
90
90
  * The argument `orbitTo` takes, shared by every node that frames a 3D scene
91
- * spherically — a globe, a molecule, a surface plot. One object rather than
91
+ * spherically — a globe, a surface plot. One object rather than
92
92
  * three positional numbers because the common edit is one axis: "pull back" and
93
93
  * "spin round" are separate intentions, and a positional form would make each
94
94
  * of them restate the two it does not mean.
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The vocabulary of an orbit camera, and the lerps a 3D component tweens with.
3
3
  *
4
- * Three unrelated node types are flown by one — a globe, a molecule, a surface
5
- * plot — and they are unrelated on purpose: what they share is a camera, not a
6
- * subject. So this belongs to none of them, and a package per subject would
7
- * either duplicate it three times or make two of them depend on the third.
4
+ * Unrelated node types are flown by one — a globe, a surface plot — and they
5
+ * are unrelated on purpose: what they share is a camera, not a subject. So this
6
+ * belongs to none of them, and a package per subject would either duplicate it
7
+ * or make one depend on another.
8
8
  */
9
9
  import { parseColor, } from "../../attributes/shape/fill/color/parser.js";
10
10
  // --- Colour ----------------------------------------------------------------
@@ -52,9 +52,9 @@ export function lerpCount(from, to, t) {
52
52
  }
53
53
  /**
54
54
  * Tweens a value that has no in-between — a flag, a representation, a colour
55
- * scheme, a whole molecule — by holding `from` until the tween lands.
55
+ * scheme — by holding `from` until the tween lands.
56
56
  *
57
- * There is no halfway point between a ribbon and a space-filling model, and a
57
+ * There is no halfway point between a wireframe and a solid surface, and a
58
58
  * mid-tween flip reads as a glitch rather than a transition, so the switch
59
59
  * happens once at the end. Snapping at the *midpoint* would be worse still: the
60
60
  * change would land while the command was still running, so a `to` would appear
@@ -68,7 +68,7 @@ export const snapFlag = snapValue;
68
68
  /**
69
69
  * A stored `orbit` in the camera's own terms.
70
70
  *
71
- * motion-script's camera takes `orbit`/`elevation`/`distance` directly now,
71
+ * The engine's camera takes `orbit`/`elevation`/`distance` directly now,
72
72
  * which is what these nodes always wanted — but the two conventions disagree
73
73
  * about zero: a stored `orbit` here is measured from **+X**, and the camera
74
74
  * measures from **+Z** (head-on). A quarter turn separates them.