@motionscript/core 0.1.0-alpha.8 → 0.1.0

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 (817) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +49 -49
  4. package/README.md +91 -91
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.js.map +1 -1
  7. package/dist/assets/errors.js.map +1 -1
  8. package/dist/assets/index.js.map +1 -1
  9. package/dist/assets/manager.js.map +1 -1
  10. package/dist/assets/manifest.js.map +1 -1
  11. package/dist/assets/record.js.map +1 -1
  12. package/dist/assets/scope.js.map +1 -1
  13. package/dist/attributes/audio/effects/chain.js.map +1 -1
  14. package/dist/attributes/audio/effects/implementations/echo.js.map +1 -1
  15. package/dist/attributes/audio/effects/implementations/gain.js.map +1 -1
  16. package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -1
  17. package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -1
  18. package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -1
  19. package/dist/attributes/audio/effects/index.js.map +1 -1
  20. package/dist/attributes/audio/effects/registry.js.map +1 -1
  21. package/dist/attributes/audio/effects/union.js.map +1 -1
  22. package/dist/attributes/audio/ramp.js.map +1 -1
  23. package/dist/attributes/audio/request.js.map +1 -1
  24. package/dist/attributes/audio/schedule.js.map +1 -1
  25. package/dist/attributes/audio/sound.js.map +1 -1
  26. package/dist/attributes/audio/transition.js.map +1 -1
  27. package/dist/attributes/index.js.map +1 -1
  28. package/dist/attributes/layout/alignment.js.map +1 -1
  29. package/dist/attributes/layout/index.js.map +1 -1
  30. package/dist/attributes/layout/insets.js.map +1 -1
  31. package/dist/attributes/layout/matrix2d.js.map +1 -1
  32. package/dist/attributes/layout/size.js.map +1 -1
  33. package/dist/attributes/layout/space3d.js.map +1 -1
  34. package/dist/attributes/layout/transform3d.js.map +1 -1
  35. package/dist/attributes/layout/vector2.js.map +1 -1
  36. package/dist/attributes/layout/world-transform.js.map +1 -1
  37. package/dist/attributes/mask/boolean.js.map +1 -1
  38. package/dist/attributes/mask/mask.js.map +1 -1
  39. package/dist/attributes/properties/decorator.js.map +1 -1
  40. package/dist/attributes/properties/inputs.js.map +1 -1
  41. package/dist/attributes/properties/typed.js.map +1 -1
  42. package/dist/attributes/render3d/orbit.js.map +1 -1
  43. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  44. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  45. package/dist/attributes/shape/corners/corners.js.map +1 -1
  46. package/dist/attributes/shape/corners/index.js.map +1 -1
  47. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  48. package/dist/attributes/shape/effects/chain.js.map +1 -1
  49. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  50. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  51. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  52. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  53. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  54. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  55. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  56. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  57. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  58. package/dist/attributes/shape/effects/implementations/curves.d.ts +2 -2
  59. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  60. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  61. package/dist/attributes/shape/effects/implementations/dither.d.ts +2 -2
  62. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  63. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  64. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  65. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  66. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  67. package/dist/attributes/shape/effects/implementations/glow.d.ts +4 -4
  68. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  69. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  70. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  71. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  72. package/dist/attributes/shape/effects/implementations/invert.d.ts +2 -2
  73. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  74. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  75. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  76. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  77. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  78. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  79. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  80. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  81. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  82. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  83. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  84. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  85. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  86. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  87. package/dist/attributes/shape/effects/implementations/shader.d.ts +2 -2
  88. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  89. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  90. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  91. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  92. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  93. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  94. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  95. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  96. package/dist/attributes/shape/effects/index.js.map +1 -1
  97. package/dist/attributes/shape/effects/registry.js.map +1 -1
  98. package/dist/attributes/shape/effects/spec.js.map +1 -1
  99. package/dist/attributes/shape/effects/union.js.map +1 -1
  100. package/dist/attributes/shape/fill/blend.js.map +1 -1
  101. package/dist/attributes/shape/fill/chain.js.map +1 -1
  102. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  103. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  104. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  105. package/dist/attributes/shape/fill/color/parser.js +20 -5
  106. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  107. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  108. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  109. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  110. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  111. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  112. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  113. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  114. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  115. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  116. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  117. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  118. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  119. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  120. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  121. package/dist/attributes/shape/fill/index.js.map +1 -1
  122. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  123. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  124. package/dist/attributes/shape/fill/registry.js.map +1 -1
  125. package/dist/attributes/shape/fill/union.js.map +1 -1
  126. package/dist/attributes/shape/filters/chain.js.map +1 -1
  127. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  128. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  129. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  130. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  131. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  132. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  133. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  134. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  135. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  136. package/dist/attributes/shape/filters/index.js.map +1 -1
  137. package/dist/attributes/shape/filters/registry.js.map +1 -1
  138. package/dist/attributes/shape/filters/union.js.map +1 -1
  139. package/dist/attributes/shape/path/anchors.js.map +1 -1
  140. package/dist/attributes/shape/path/bezier.js.map +1 -1
  141. package/dist/attributes/shape/path/index.js.map +1 -1
  142. package/dist/attributes/shape/path/measure.js.map +1 -1
  143. package/dist/attributes/shape/path/morph.js.map +1 -1
  144. package/dist/attributes/shape/path/ops.js.map +1 -1
  145. package/dist/attributes/shape/path/types.js.map +1 -1
  146. package/dist/attributes/shape/path/walk.js.map +1 -1
  147. package/dist/attributes/shape/shaders/index.js.map +1 -1
  148. package/dist/attributes/shape/shaders/language.js.map +1 -1
  149. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  150. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  151. package/dist/attributes/shape/shadow/index.js.map +1 -1
  152. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  153. package/dist/attributes/shape/stroke/index.js.map +1 -1
  154. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  155. package/dist/attributes/shared/operators.js.map +1 -1
  156. package/dist/attributes/text/index.js.map +1 -1
  157. package/dist/attributes/text/ops.js.map +1 -1
  158. package/dist/attributes/text/types.js.map +1 -1
  159. package/dist/browser/chunks/{chunk-LKUYVFU3.js → chunk-4BDLFEOC.js} +1 -1
  160. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
  161. package/dist/browser/chunks/chunk-CCGVIR4F.js +3 -0
  162. package/dist/browser/chunks/chunk-CCGVIR4F.js.map +7 -0
  163. package/dist/browser/chunks/chunk-N4WSN5WY.js +13 -0
  164. package/dist/browser/chunks/chunk-N4WSN5WY.js.map +7 -0
  165. package/dist/browser/chunks/chunk-WZSI3GSK.js +6 -0
  166. package/dist/browser/chunks/chunk-WZSI3GSK.js.map +7 -0
  167. package/dist/browser/component.js +1 -1
  168. package/dist/browser/experimental.js +1 -1
  169. package/dist/browser/experimental.js.map +1 -1
  170. package/dist/browser/index.js +1 -1
  171. package/dist/browser/index.js.map +1 -1
  172. package/dist/browser/manifest.json +1 -1
  173. package/dist/browser/sdk.js +1 -1
  174. package/dist/component.js.map +1 -1
  175. package/dist/components/builtins/audio/audio.js.map +1 -1
  176. package/dist/components/builtins/geometry/composite.js.map +1 -1
  177. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  178. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  179. package/dist/components/builtins/layout/layout.js.map +1 -1
  180. package/dist/components/builtins/media/media.js.map +1 -1
  181. package/dist/components/builtins/providers/providers.js.map +1 -1
  182. package/dist/components/builtins/text/number-format.js.map +1 -1
  183. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  184. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  185. package/dist/components/builtins/text/text-layout.js.map +1 -1
  186. package/dist/components/builtins/text/text.d.ts +9 -9
  187. package/dist/components/builtins/text/text.js.map +1 -1
  188. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  189. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  190. package/dist/components/builtins/three/three.js.map +1 -1
  191. package/dist/components/factory/api.js.map +1 -1
  192. package/dist/components/factory/clip-of.js.map +1 -1
  193. package/dist/components/factory/commands-for.js.map +1 -1
  194. package/dist/components/factory/component-audio.js.map +1 -1
  195. package/dist/components/factory/component2d.js.map +1 -1
  196. package/dist/components/factory/component3d.js.map +1 -1
  197. package/dist/components/factory/factory.js.map +1 -1
  198. package/dist/components/factory/timeline.js.map +1 -1
  199. package/dist/components/factory/type-def.js.map +1 -1
  200. package/dist/components/factory/types.js.map +1 -1
  201. package/dist/components/factory/views.d.ts.map +1 -1
  202. package/dist/components/factory/views.js +41 -1
  203. package/dist/components/factory/views.js.map +1 -1
  204. package/dist/components/modules/aim.js.map +1 -1
  205. package/dist/components/modules/corners.js.map +1 -1
  206. package/dist/components/modules/flow.js.map +1 -1
  207. package/dist/components/modules/material.js.map +1 -1
  208. package/dist/components/modules/paint.js.map +1 -1
  209. package/dist/components/modules/shapes.js.map +1 -1
  210. package/dist/components/modules/text-layout.js.map +1 -1
  211. package/dist/components/modules/text-style.d.ts +1 -1
  212. package/dist/components/modules/text-style.js.map +1 -1
  213. package/dist/components/modules/three-entries.js.map +1 -1
  214. package/dist/components/modules/view3d.js.map +1 -1
  215. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  216. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  217. package/dist/components/trees/2d/node-motion.js.map +1 -1
  218. package/dist/components/trees/2d/node-render.js.map +1 -1
  219. package/dist/components/trees/2d/node-space.js.map +1 -1
  220. package/dist/components/trees/2d/node-transform.js.map +1 -1
  221. package/dist/components/trees/2d/node2d.js.map +1 -1
  222. package/dist/components/trees/audio/index.js.map +1 -1
  223. package/dist/components/trees/audio/node-audio.js.map +1 -1
  224. package/dist/components/trees/index.js.map +1 -1
  225. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  226. package/dist/components/trees/node/node-reactive.d.ts +3 -4
  227. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  228. package/dist/components/trees/node/node-reactive.js +13 -10
  229. package/dist/components/trees/node/node-reactive.js.map +1 -1
  230. package/dist/components/trees/node/node-time.js.map +1 -1
  231. package/dist/components/trees/node/node-walk.js.map +1 -1
  232. package/dist/components/trees/node/node.js.map +1 -1
  233. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  234. package/dist/components/trees/three/node3d.js.map +1 -1
  235. package/dist/document/audio.js.map +1 -1
  236. package/dist/document/builtins.js.map +1 -1
  237. package/dist/document/command-traits.d.ts +8 -0
  238. package/dist/document/command-traits.d.ts.map +1 -1
  239. package/dist/document/command-traits.js +17 -0
  240. package/dist/document/command-traits.js.map +1 -1
  241. package/dist/document/deny-globals.js.map +1 -1
  242. package/dist/document/diff.js.map +1 -1
  243. package/dist/document/doc-index.js.map +1 -1
  244. package/dist/document/expression/compile.js.map +1 -1
  245. package/dist/document/expression/index.js.map +1 -1
  246. package/dist/document/expression/ops.js.map +1 -1
  247. package/dist/document/expression/parse.js.map +1 -1
  248. package/dist/document/expression/refs.js.map +1 -1
  249. package/dist/document/expression/types.js.map +1 -1
  250. package/dist/document/expression/walk.js.map +1 -1
  251. package/dist/document/index.js.map +1 -1
  252. package/dist/document/migrate.js.map +1 -1
  253. package/dist/document/missing-node.js.map +1 -1
  254. package/dist/document/node-decorator.js.map +1 -1
  255. package/dist/document/node-descriptor.js.map +1 -1
  256. package/dist/document/placement.js.map +1 -1
  257. package/dist/document/project.js.map +1 -1
  258. package/dist/document/prop-evolution.js.map +1 -1
  259. package/dist/document/registry.js.map +1 -1
  260. package/dist/document/settled-index.d.ts +6 -0
  261. package/dist/document/settled-index.d.ts.map +1 -1
  262. package/dist/document/settled-index.js +18 -1
  263. package/dist/document/settled-index.js.map +1 -1
  264. package/dist/document/timeline-patch.js.map +1 -1
  265. package/dist/document/timeline.d.ts.map +1 -1
  266. package/dist/document/timeline.js +26 -6
  267. package/dist/document/timeline.js.map +1 -1
  268. package/dist/document/types.js.map +1 -1
  269. package/dist/document/validate.js.map +1 -1
  270. package/dist/document/vocabulary.js.map +1 -1
  271. package/dist/experimental.d.ts.map +1 -1
  272. package/dist/experimental.js.map +1 -1
  273. package/dist/index.js.map +1 -1
  274. package/dist/layout/bounds.js.map +1 -1
  275. package/dist/layout/constraints.js.map +1 -1
  276. package/dist/layout/flex.js.map +1 -1
  277. package/dist/layout/freeform.js.map +1 -1
  278. package/dist/layout/grid.js.map +1 -1
  279. package/dist/layout/index.js.map +1 -1
  280. package/dist/layout/item.js.map +1 -1
  281. package/dist/layout/ops.js.map +1 -1
  282. package/dist/layout/types.js.map +1 -1
  283. package/dist/platform/audio-sink.js.map +1 -1
  284. package/dist/platform/exporter.js.map +1 -1
  285. package/dist/platform/index.js.map +1 -1
  286. package/dist/platform/stepped-clock.js.map +1 -1
  287. package/dist/platform/storage-adapter.js.map +1 -1
  288. package/dist/platform/ticker.js.map +1 -1
  289. package/dist/project/config.js.map +1 -1
  290. package/dist/project/index.js.map +1 -1
  291. package/dist/project/tree.js.map +1 -1
  292. package/dist/props/host.d.ts +5 -0
  293. package/dist/props/host.d.ts.map +1 -1
  294. package/dist/props/host.js +3 -1
  295. package/dist/props/host.js.map +1 -1
  296. package/dist/props/index.js.map +1 -1
  297. package/dist/props/layout.d.ts +29 -0
  298. package/dist/props/layout.d.ts.map +1 -0
  299. package/dist/props/layout.js +84 -0
  300. package/dist/props/layout.js.map +1 -0
  301. package/dist/props/observer.js.map +1 -1
  302. package/dist/props/slot.js.map +1 -1
  303. package/dist/renamed-scene-names.js.map +1 -1
  304. package/dist/render/canvas-render-context2d.js.map +1 -1
  305. package/dist/render/clip-contains.js.map +1 -1
  306. package/dist/render/clip.js.map +1 -1
  307. package/dist/render/descriptors/ellipse.js.map +1 -1
  308. package/dist/render/descriptors/line.js.map +1 -1
  309. package/dist/render/descriptors/path-builder.js.map +1 -1
  310. package/dist/render/descriptors/path.js.map +1 -1
  311. package/dist/render/descriptors/polygon.js.map +1 -1
  312. package/dist/render/descriptors/polygram.js.map +1 -1
  313. package/dist/render/descriptors/rect.js.map +1 -1
  314. package/dist/render/descriptors/richtext.js.map +1 -1
  315. package/dist/render/descriptors/shape.js.map +1 -1
  316. package/dist/render/descriptors/text.js.map +1 -1
  317. package/dist/render/descriptors/transform.js.map +1 -1
  318. package/dist/render/graphics2d.js.map +1 -1
  319. package/dist/render/index.js.map +1 -1
  320. package/dist/render/measure-context.js.map +1 -1
  321. package/dist/render/null-render-context.js.map +1 -1
  322. package/dist/render/render-context2d.js.map +1 -1
  323. package/dist/render/render-issue.js.map +1 -1
  324. package/dist/render/surface.js.map +1 -1
  325. package/dist/render/text-defaults.js.map +1 -1
  326. package/dist/render/text-layout.js.map +1 -1
  327. package/dist/render3d/bounds3d.js.map +1 -1
  328. package/dist/render3d/builders.js.map +1 -1
  329. package/dist/render3d/camera.js.map +1 -1
  330. package/dist/render3d/fill3d.js.map +1 -1
  331. package/dist/render3d/geometry.js.map +1 -1
  332. package/dist/render3d/graphics3d.js.map +1 -1
  333. package/dist/render3d/index.js.map +1 -1
  334. package/dist/render3d/inert.js.map +1 -1
  335. package/dist/render3d/light.js.map +1 -1
  336. package/dist/render3d/material.js.map +1 -1
  337. package/dist/render3d/matrix4.js.map +1 -1
  338. package/dist/render3d/render-context3d.js.map +1 -1
  339. package/dist/render3d/resources.js.map +1 -1
  340. package/dist/render3d/rounded-box.js.map +1 -1
  341. package/dist/render3d/scene-settings.js.map +1 -1
  342. package/dist/render3d/scene3d.js.map +1 -1
  343. package/dist/render3d/segments.js.map +1 -1
  344. package/dist/render3d/texture.js.map +1 -1
  345. package/dist/render3d/tracking.js.map +1 -1
  346. package/dist/render3d/transform.js.map +1 -1
  347. package/dist/render3d/vector3.js.map +1 -1
  348. package/dist/render3d/walk.js.map +1 -1
  349. package/dist/runtime/asset-refine.js.map +1 -1
  350. package/dist/runtime/asset-timeline.js.map +1 -1
  351. package/dist/runtime/asset-update.js.map +1 -1
  352. package/dist/runtime/audio-index.js.map +1 -1
  353. package/dist/runtime/builtin-context.js.map +1 -1
  354. package/dist/runtime/clip-instance.js.map +1 -1
  355. package/dist/runtime/clip-store.js.map +1 -1
  356. package/dist/runtime/engine.js.map +1 -1
  357. package/dist/runtime/frame-time.js.map +1 -1
  358. package/dist/runtime/index.js.map +1 -1
  359. package/dist/runtime/node-picking.js.map +1 -1
  360. package/dist/runtime/node-picking3d.js.map +1 -1
  361. package/dist/runtime/placement.js.map +1 -1
  362. package/dist/runtime/playback-controller.js.map +1 -1
  363. package/dist/runtime/playback.js.map +1 -1
  364. package/dist/runtime/precompisition.js.map +1 -1
  365. package/dist/runtime/project-assets.js.map +1 -1
  366. package/dist/runtime/session.js.map +1 -1
  367. package/dist/runtime/settle.js.map +1 -1
  368. package/dist/runtime/state-evaluator.js.map +1 -1
  369. package/dist/runtime/text-geometry.js.map +1 -1
  370. package/dist/sdk/index.js.map +1 -1
  371. package/dist/tween/command-decorator.js.map +1 -1
  372. package/dist/tween/command.js.map +1 -1
  373. package/dist/tween/ease/constants.js.map +1 -1
  374. package/dist/tween/ease/curve.js.map +1 -1
  375. package/dist/tween/ease/describe.js.map +1 -1
  376. package/dist/tween/ease/spec.js.map +1 -1
  377. package/dist/tween/ease/type.js.map +1 -1
  378. package/dist/tween/index.js.map +1 -1
  379. package/dist/tween/inert.js.map +1 -1
  380. package/dist/tween/lerp.js.map +1 -1
  381. package/dist/tween/loop.js.map +1 -1
  382. package/dist/tween/prepare.js.map +1 -1
  383. package/dist/tween/stepper.js.map +1 -1
  384. package/dist/tween/to-command.js.map +1 -1
  385. package/dist/util/clamp.js.map +1 -1
  386. package/dist/util/context.js.map +1 -1
  387. package/dist/util/csv.js.map +1 -1
  388. package/dist/util/generateList.js.map +1 -1
  389. package/dist/util/index.js.map +1 -1
  390. package/dist/util/metrics.js.map +1 -1
  391. package/dist/util/random.js.map +1 -1
  392. package/dist/util/reference.js.map +1 -1
  393. package/dist/util/scheduler.js.map +1 -1
  394. package/package.json +1 -1
  395. package/dist/attributes/audio/filters/chain.d.ts +0 -113
  396. package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
  397. package/dist/attributes/audio/filters/chain.js +0 -104
  398. package/dist/attributes/audio/filters/chain.js.map +0 -1
  399. package/dist/attributes/audio/filters/curve.d.ts +0 -152
  400. package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
  401. package/dist/attributes/audio/filters/curve.js +0 -250
  402. package/dist/attributes/audio/filters/curve.js.map +0 -1
  403. package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
  404. package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
  405. package/dist/attributes/audio/filters/implementations/echo.js +0 -11
  406. package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
  407. package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
  408. package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
  409. package/dist/attributes/audio/filters/implementations/gain.js +0 -6
  410. package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
  411. package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
  412. package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
  413. package/dist/attributes/audio/filters/implementations/highpass.js +0 -10
  414. package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
  415. package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
  416. package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
  417. package/dist/attributes/audio/filters/implementations/lowpass.js +0 -10
  418. package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
  419. package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
  420. package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
  421. package/dist/attributes/audio/filters/implementations/speed.js +0 -6
  422. package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
  423. package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
  424. package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
  425. package/dist/attributes/audio/filters/implementations/tremolo.js +0 -10
  426. package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
  427. package/dist/attributes/audio/filters/index.d.ts +0 -22
  428. package/dist/attributes/audio/filters/index.d.ts.map +0 -1
  429. package/dist/attributes/audio/filters/index.js +0 -8
  430. package/dist/attributes/audio/filters/index.js.map +0 -1
  431. package/dist/attributes/audio/filters/registry.d.ts +0 -36
  432. package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
  433. package/dist/attributes/audio/filters/registry.js +0 -82
  434. package/dist/attributes/audio/filters/registry.js.map +0 -1
  435. package/dist/attributes/audio/filters/union.d.ts +0 -18
  436. package/dist/attributes/audio/filters/union.d.ts.map +0 -1
  437. package/dist/attributes/audio/filters/union.js +0 -28
  438. package/dist/attributes/audio/filters/union.js.map +0 -1
  439. package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
  440. package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
  441. package/dist/attributes/shape/sksl-uniforms.js +0 -0
  442. package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
  443. package/dist/browser/chunks/chunk-AOT33LMS.js +0 -13
  444. package/dist/browser/chunks/chunk-AOT33LMS.js.map +0 -7
  445. package/dist/browser/chunks/chunk-GKM6UZJR.js +0 -6
  446. package/dist/browser/chunks/chunk-GKM6UZJR.js.map +0 -7
  447. package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
  448. package/dist/browser/chunks/chunk-ZRPZPWZU.js +0 -3
  449. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +0 -7
  450. package/dist/component/api.d.ts +0 -508
  451. package/dist/component/api.d.ts.map +0 -1
  452. package/dist/component/api.js +0 -4
  453. package/dist/component/api.js.map +0 -1
  454. package/dist/component/builtins/audio.d.ts +0 -26
  455. package/dist/component/builtins/audio.d.ts.map +0 -1
  456. package/dist/component/builtins/audio.js +0 -41
  457. package/dist/component/builtins/audio.js.map +0 -1
  458. package/dist/component/builtins/canvas3d.d.ts +0 -98
  459. package/dist/component/builtins/canvas3d.d.ts.map +0 -1
  460. package/dist/component/builtins/canvas3d.js +0 -21
  461. package/dist/component/builtins/canvas3d.js.map +0 -1
  462. package/dist/component/builtins/composite.d.ts +0 -56
  463. package/dist/component/builtins/composite.d.ts.map +0 -1
  464. package/dist/component/builtins/composite.js +0 -25
  465. package/dist/component/builtins/composite.js.map +0 -1
  466. package/dist/component/builtins/geometry.d.ts +0 -505
  467. package/dist/component/builtins/geometry.d.ts.map +0 -1
  468. package/dist/component/builtins/geometry.js +0 -107
  469. package/dist/component/builtins/geometry.js.map +0 -1
  470. package/dist/component/builtins/layout.d.ts +0 -88
  471. package/dist/component/builtins/layout.d.ts.map +0 -1
  472. package/dist/component/builtins/layout.js +0 -84
  473. package/dist/component/builtins/layout.js.map +0 -1
  474. package/dist/component/builtins/media.d.ts +0 -95
  475. package/dist/component/builtins/media.d.ts.map +0 -1
  476. package/dist/component/builtins/media.js +0 -149
  477. package/dist/component/builtins/media.js.map +0 -1
  478. package/dist/component/builtins/providers.d.ts +0 -23
  479. package/dist/component/builtins/providers.d.ts.map +0 -1
  480. package/dist/component/builtins/providers.js +0 -30
  481. package/dist/component/builtins/providers.js.map +0 -1
  482. package/dist/component/builtins/text.d.ts +0 -193
  483. package/dist/component/builtins/text.d.ts.map +0 -1
  484. package/dist/component/builtins/text.js +0 -113
  485. package/dist/component/builtins/text.js.map +0 -1
  486. package/dist/component/builtins/three.d.ts +0 -1085
  487. package/dist/component/builtins/three.d.ts.map +0 -1
  488. package/dist/component/builtins/three.js +0 -265
  489. package/dist/component/builtins/three.js.map +0 -1
  490. package/dist/component/clip-of.d.ts +0 -5
  491. package/dist/component/clip-of.d.ts.map +0 -1
  492. package/dist/component/clip-of.js +0 -33
  493. package/dist/component/clip-of.js.map +0 -1
  494. package/dist/component/commands-for.d.ts +0 -19
  495. package/dist/component/commands-for.d.ts.map +0 -1
  496. package/dist/component/commands-for.js +0 -5
  497. package/dist/component/commands-for.js.map +0 -1
  498. package/dist/component/component-audio.d.ts +0 -9
  499. package/dist/component/component-audio.d.ts.map +0 -1
  500. package/dist/component/component-audio.js +0 -18
  501. package/dist/component/component-audio.js.map +0 -1
  502. package/dist/component/component2d.d.ts +0 -9
  503. package/dist/component/component2d.d.ts.map +0 -1
  504. package/dist/component/component2d.js +0 -239
  505. package/dist/component/component2d.js.map +0 -1
  506. package/dist/component/component3d.d.ts +0 -9
  507. package/dist/component/component3d.d.ts.map +0 -1
  508. package/dist/component/component3d.js +0 -99
  509. package/dist/component/component3d.js.map +0 -1
  510. package/dist/component/factory.d.ts +0 -63
  511. package/dist/component/factory.d.ts.map +0 -1
  512. package/dist/component/factory.js +0 -313
  513. package/dist/component/factory.js.map +0 -1
  514. package/dist/component/modules/aim.d.ts +0 -30
  515. package/dist/component/modules/aim.d.ts.map +0 -1
  516. package/dist/component/modules/aim.js +0 -39
  517. package/dist/component/modules/aim.js.map +0 -1
  518. package/dist/component/modules/corners.d.ts +0 -13
  519. package/dist/component/modules/corners.d.ts.map +0 -1
  520. package/dist/component/modules/corners.js +0 -12
  521. package/dist/component/modules/corners.js.map +0 -1
  522. package/dist/component/modules/flow.d.ts +0 -26
  523. package/dist/component/modules/flow.d.ts.map +0 -1
  524. package/dist/component/modules/flow.js +0 -55
  525. package/dist/component/modules/flow.js.map +0 -1
  526. package/dist/component/modules/material.d.ts +0 -40
  527. package/dist/component/modules/material.d.ts.map +0 -1
  528. package/dist/component/modules/material.js +0 -75
  529. package/dist/component/modules/material.js.map +0 -1
  530. package/dist/component/modules/paint.d.ts +0 -71
  531. package/dist/component/modules/paint.d.ts.map +0 -1
  532. package/dist/component/modules/paint.js +0 -106
  533. package/dist/component/modules/paint.js.map +0 -1
  534. package/dist/component/modules/shapes.d.ts +0 -31
  535. package/dist/component/modules/shapes.d.ts.map +0 -1
  536. package/dist/component/modules/shapes.js +0 -43
  537. package/dist/component/modules/shapes.js.map +0 -1
  538. package/dist/component/modules/text-layout.d.ts +0 -26
  539. package/dist/component/modules/text-layout.d.ts.map +0 -1
  540. package/dist/component/modules/text-layout.js +0 -57
  541. package/dist/component/modules/text-layout.js.map +0 -1
  542. package/dist/component/modules/text-style.d.ts +0 -48
  543. package/dist/component/modules/text-style.d.ts.map +0 -1
  544. package/dist/component/modules/text-style.js +0 -63
  545. package/dist/component/modules/text-style.js.map +0 -1
  546. package/dist/component/modules/three-entries.d.ts +0 -23
  547. package/dist/component/modules/three-entries.d.ts.map +0 -1
  548. package/dist/component/modules/three-entries.js +0 -41
  549. package/dist/component/modules/three-entries.js.map +0 -1
  550. package/dist/component/modules/view3d.d.ts +0 -55
  551. package/dist/component/modules/view3d.d.ts.map +0 -1
  552. package/dist/component/modules/view3d.js +0 -160
  553. package/dist/component/modules/view3d.js.map +0 -1
  554. package/dist/component/timeline.d.ts +0 -22
  555. package/dist/component/timeline.d.ts.map +0 -1
  556. package/dist/component/timeline.js +0 -128
  557. package/dist/component/timeline.js.map +0 -1
  558. package/dist/component/type-def.d.ts +0 -26
  559. package/dist/component/type-def.d.ts.map +0 -1
  560. package/dist/component/type-def.js +0 -16
  561. package/dist/component/type-def.js.map +0 -1
  562. package/dist/component/types.d.ts +0 -91
  563. package/dist/component/types.d.ts.map +0 -1
  564. package/dist/component/types.js +0 -88
  565. package/dist/component/types.js.map +0 -1
  566. package/dist/component/views.d.ts +0 -121
  567. package/dist/component/views.d.ts.map +0 -1
  568. package/dist/component/views.js +0 -413
  569. package/dist/component/views.js.map +0 -1
  570. package/dist/document/withdraw.d.ts +0 -28
  571. package/dist/document/withdraw.d.ts.map +0 -1
  572. package/dist/document/withdraw.js +0 -61
  573. package/dist/document/withdraw.js.map +0 -1
  574. package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
  575. package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
  576. package/dist/jsx/jsx-dev-runtime.js +0 -3
  577. package/dist/jsx/jsx-dev-runtime.js.map +0 -1
  578. package/dist/jsx/jsx-runtime.d.ts +0 -27
  579. package/dist/jsx/jsx-runtime.d.ts.map +0 -1
  580. package/dist/jsx/jsx-runtime.js +0 -26
  581. package/dist/jsx/jsx-runtime.js.map +0 -1
  582. package/dist/nodes/2d/node-lifecycle.d.ts +0 -46
  583. package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
  584. package/dist/nodes/2d/node-lifecycle.js +0 -264
  585. package/dist/nodes/2d/node-lifecycle.js.map +0 -1
  586. package/dist/nodes/2d/node-motion.d.ts +0 -56
  587. package/dist/nodes/2d/node-motion.d.ts.map +0 -1
  588. package/dist/nodes/2d/node-motion.js +0 -86
  589. package/dist/nodes/2d/node-motion.js.map +0 -1
  590. package/dist/nodes/2d/node-render.d.ts +0 -44
  591. package/dist/nodes/2d/node-render.d.ts.map +0 -1
  592. package/dist/nodes/2d/node-render.js +0 -80
  593. package/dist/nodes/2d/node-render.js.map +0 -1
  594. package/dist/nodes/2d/node-space.d.ts +0 -63
  595. package/dist/nodes/2d/node-space.d.ts.map +0 -1
  596. package/dist/nodes/2d/node-space.js +0 -131
  597. package/dist/nodes/2d/node-space.js.map +0 -1
  598. package/dist/nodes/2d/node-transform.d.ts +0 -55
  599. package/dist/nodes/2d/node-transform.d.ts.map +0 -1
  600. package/dist/nodes/2d/node-transform.js +0 -73
  601. package/dist/nodes/2d/node-transform.js.map +0 -1
  602. package/dist/nodes/2d/node2d.d.ts +0 -1111
  603. package/dist/nodes/2d/node2d.d.ts.map +0 -1
  604. package/dist/nodes/2d/node2d.js +0 -1665
  605. package/dist/nodes/2d/node2d.js.map +0 -1
  606. package/dist/nodes/2d/paint-node.d.ts +0 -142
  607. package/dist/nodes/2d/paint-node.d.ts.map +0 -1
  608. package/dist/nodes/2d/paint-node.js +0 -232
  609. package/dist/nodes/2d/paint-node.js.map +0 -1
  610. package/dist/nodes/audio/audio-bus.d.ts +0 -28
  611. package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
  612. package/dist/nodes/audio/audio-bus.js +0 -33
  613. package/dist/nodes/audio/audio-bus.js.map +0 -1
  614. package/dist/nodes/audio/index.d.ts +0 -4
  615. package/dist/nodes/audio/index.d.ts.map +0 -1
  616. package/dist/nodes/audio/index.js +0 -2
  617. package/dist/nodes/audio/index.js.map +0 -1
  618. package/dist/nodes/audio/node-audio.d.ts +0 -107
  619. package/dist/nodes/audio/node-audio.d.ts.map +0 -1
  620. package/dist/nodes/audio/node-audio.js +0 -179
  621. package/dist/nodes/audio/node-audio.js.map +0 -1
  622. package/dist/nodes/audio/sound-node.d.ts +0 -41
  623. package/dist/nodes/audio/sound-node.d.ts.map +0 -1
  624. package/dist/nodes/audio/sound-node.js +0 -71
  625. package/dist/nodes/audio/sound-node.js.map +0 -1
  626. package/dist/nodes/geometry/boolean-node.d.ts +0 -28
  627. package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
  628. package/dist/nodes/geometry/boolean-node.js +0 -81
  629. package/dist/nodes/geometry/boolean-node.js.map +0 -1
  630. package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
  631. package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
  632. package/dist/nodes/geometry/bounds-shape-node.js +0 -181
  633. package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
  634. package/dist/nodes/geometry/box-path-node.d.ts +0 -89
  635. package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
  636. package/dist/nodes/geometry/box-path-node.js +0 -116
  637. package/dist/nodes/geometry/box-path-node.js.map +0 -1
  638. package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
  639. package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
  640. package/dist/nodes/geometry/ellipse-node.js +0 -45
  641. package/dist/nodes/geometry/ellipse-node.js.map +0 -1
  642. package/dist/nodes/geometry/group-bounds.d.ts +0 -56
  643. package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
  644. package/dist/nodes/geometry/group-bounds.js +0 -87
  645. package/dist/nodes/geometry/group-bounds.js.map +0 -1
  646. package/dist/nodes/geometry/mask-node.d.ts +0 -33
  647. package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
  648. package/dist/nodes/geometry/mask-node.js +0 -66
  649. package/dist/nodes/geometry/mask-node.js.map +0 -1
  650. package/dist/nodes/geometry/path-node.d.ts +0 -26
  651. package/dist/nodes/geometry/path-node.d.ts.map +0 -1
  652. package/dist/nodes/geometry/path-node.js +0 -58
  653. package/dist/nodes/geometry/path-node.js.map +0 -1
  654. package/dist/nodes/geometry/polygon-node.d.ts +0 -26
  655. package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
  656. package/dist/nodes/geometry/polygon-node.js +0 -47
  657. package/dist/nodes/geometry/polygon-node.js.map +0 -1
  658. package/dist/nodes/geometry/polygram-node.d.ts +0 -33
  659. package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
  660. package/dist/nodes/geometry/polygram-node.js +0 -52
  661. package/dist/nodes/geometry/polygram-node.js.map +0 -1
  662. package/dist/nodes/geometry/rect-node.d.ts +0 -38
  663. package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
  664. package/dist/nodes/geometry/rect-node.js +0 -56
  665. package/dist/nodes/geometry/rect-node.js.map +0 -1
  666. package/dist/nodes/geometry/shape-node.d.ts +0 -71
  667. package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
  668. package/dist/nodes/geometry/shape-node.js +0 -140
  669. package/dist/nodes/geometry/shape-node.js.map +0 -1
  670. package/dist/nodes/geometry/shape-outline.d.ts +0 -93
  671. package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
  672. package/dist/nodes/geometry/shape-outline.js +0 -470
  673. package/dist/nodes/geometry/shape-outline.js.map +0 -1
  674. package/dist/nodes/index.d.ts +0 -53
  675. package/dist/nodes/index.d.ts.map +0 -1
  676. package/dist/nodes/index.js +0 -35
  677. package/dist/nodes/index.js.map +0 -1
  678. package/dist/nodes/layout/camera-node.d.ts +0 -80
  679. package/dist/nodes/layout/camera-node.d.ts.map +0 -1
  680. package/dist/nodes/layout/camera-node.js +0 -153
  681. package/dist/nodes/layout/camera-node.js.map +0 -1
  682. package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
  683. package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
  684. package/dist/nodes/layout/orbit-camera-node.js +0 -118
  685. package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
  686. package/dist/nodes/layout/rotated-box.d.ts +0 -20
  687. package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
  688. package/dist/nodes/layout/rotated-box.js +0 -76
  689. package/dist/nodes/layout/rotated-box.js.map +0 -1
  690. package/dist/nodes/media/video-node.d.ts +0 -229
  691. package/dist/nodes/media/video-node.d.ts.map +0 -1
  692. package/dist/nodes/media/video-node.js +0 -350
  693. package/dist/nodes/media/video-node.js.map +0 -1
  694. package/dist/nodes/node/declare-paints.d.ts +0 -19
  695. package/dist/nodes/node/declare-paints.d.ts.map +0 -1
  696. package/dist/nodes/node/declare-paints.js +0 -27
  697. package/dist/nodes/node/declare-paints.js.map +0 -1
  698. package/dist/nodes/node/node-editor-state.d.ts +0 -53
  699. package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
  700. package/dist/nodes/node/node-editor-state.js +0 -23
  701. package/dist/nodes/node/node-editor-state.js.map +0 -1
  702. package/dist/nodes/node/node-reactive.d.ts +0 -89
  703. package/dist/nodes/node/node-reactive.d.ts.map +0 -1
  704. package/dist/nodes/node/node-reactive.js +0 -135
  705. package/dist/nodes/node/node-reactive.js.map +0 -1
  706. package/dist/nodes/node/node-time.d.ts +0 -39
  707. package/dist/nodes/node/node-time.d.ts.map +0 -1
  708. package/dist/nodes/node/node-time.js +0 -14
  709. package/dist/nodes/node/node-time.js.map +0 -1
  710. package/dist/nodes/node/node-walk.d.ts +0 -46
  711. package/dist/nodes/node/node-walk.d.ts.map +0 -1
  712. package/dist/nodes/node/node-walk.js +0 -74
  713. package/dist/nodes/node/node-walk.js.map +0 -1
  714. package/dist/nodes/node/node.d.ts +0 -445
  715. package/dist/nodes/node/node.d.ts.map +0 -1
  716. package/dist/nodes/node/node.js +0 -745
  717. package/dist/nodes/node/node.js.map +0 -1
  718. package/dist/nodes/node/text-defaults.d.ts +0 -32
  719. package/dist/nodes/node/text-defaults.d.ts.map +0 -1
  720. package/dist/nodes/node/text-defaults.js +0 -37
  721. package/dist/nodes/node/text-defaults.js.map +0 -1
  722. package/dist/nodes/root/canvas2d-node.d.ts +0 -163
  723. package/dist/nodes/root/canvas2d-node.d.ts.map +0 -1
  724. package/dist/nodes/root/canvas2d-node.js +0 -264
  725. package/dist/nodes/root/canvas2d-node.js.map +0 -1
  726. package/dist/nodes/root/provider-node.d.ts +0 -47
  727. package/dist/nodes/root/provider-node.d.ts.map +0 -1
  728. package/dist/nodes/root/provider-node.js +0 -63
  729. package/dist/nodes/root/provider-node.js.map +0 -1
  730. package/dist/nodes/root/theme-provider-node.d.ts +0 -29
  731. package/dist/nodes/root/theme-provider-node.d.ts.map +0 -1
  732. package/dist/nodes/root/theme-provider-node.js +0 -43
  733. package/dist/nodes/root/theme-provider-node.js.map +0 -1
  734. package/dist/nodes/text/default-text-style-node.d.ts +0 -103
  735. package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
  736. package/dist/nodes/text/default-text-style-node.js +0 -146
  737. package/dist/nodes/text/default-text-style-node.js.map +0 -1
  738. package/dist/nodes/text/number-format.d.ts +0 -66
  739. package/dist/nodes/text/number-format.d.ts.map +0 -1
  740. package/dist/nodes/text/number-format.js +0 -227
  741. package/dist/nodes/text/number-format.js.map +0 -1
  742. package/dist/nodes/text/number-node.d.ts +0 -94
  743. package/dist/nodes/text/number-node.d.ts.map +0 -1
  744. package/dist/nodes/text/number-node.js +0 -86
  745. package/dist/nodes/text/number-node.js.map +0 -1
  746. package/dist/nodes/text/number-pattern.d.ts +0 -51
  747. package/dist/nodes/text/number-pattern.d.ts.map +0 -1
  748. package/dist/nodes/text/number-pattern.js +0 -77
  749. package/dist/nodes/text/number-pattern.js.map +0 -1
  750. package/dist/nodes/text/richtext-node.d.ts +0 -68
  751. package/dist/nodes/text/richtext-node.d.ts.map +0 -1
  752. package/dist/nodes/text/richtext-node.js +0 -78
  753. package/dist/nodes/text/richtext-node.js.map +0 -1
  754. package/dist/nodes/text/text-base.d.ts +0 -118
  755. package/dist/nodes/text/text-base.d.ts.map +0 -1
  756. package/dist/nodes/text/text-base.js +0 -153
  757. package/dist/nodes/text/text-base.js.map +0 -1
  758. package/dist/nodes/text/text-layout.d.ts +0 -87
  759. package/dist/nodes/text/text-layout.d.ts.map +0 -1
  760. package/dist/nodes/text/text-layout.js +0 -368
  761. package/dist/nodes/text/text-layout.js.map +0 -1
  762. package/dist/nodes/text/text-node.d.ts +0 -84
  763. package/dist/nodes/text/text-node.d.ts.map +0 -1
  764. package/dist/nodes/text/text-node.js +0 -188
  765. package/dist/nodes/text/text-node.js.map +0 -1
  766. package/dist/nodes/text/text-selection.d.ts +0 -125
  767. package/dist/nodes/text/text-selection.d.ts.map +0 -1
  768. package/dist/nodes/text/text-selection.js +0 -209
  769. package/dist/nodes/text/text-selection.js.map +0 -1
  770. package/dist/nodes/three/camera-nodes.d.ts +0 -109
  771. package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
  772. package/dist/nodes/three/camera-nodes.js +0 -112
  773. package/dist/nodes/three/camera-nodes.js.map +0 -1
  774. package/dist/nodes/three/canvas3d-node.d.ts +0 -295
  775. package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
  776. package/dist/nodes/three/canvas3d-node.js +0 -486
  777. package/dist/nodes/three/canvas3d-node.js.map +0 -1
  778. package/dist/nodes/three/drawable-nodes.d.ts +0 -173
  779. package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
  780. package/dist/nodes/three/drawable-nodes.js +0 -284
  781. package/dist/nodes/three/drawable-nodes.js.map +0 -1
  782. package/dist/nodes/three/environment-nodes.d.ts +0 -106
  783. package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
  784. package/dist/nodes/three/environment-nodes.js +0 -134
  785. package/dist/nodes/three/environment-nodes.js.map +0 -1
  786. package/dist/nodes/three/geometry-nodes.d.ts +0 -197
  787. package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
  788. package/dist/nodes/three/geometry-nodes.js +0 -322
  789. package/dist/nodes/three/geometry-nodes.js.map +0 -1
  790. package/dist/nodes/three/grid-geometry3d.d.ts +0 -62
  791. package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
  792. package/dist/nodes/three/grid-geometry3d.js +0 -114
  793. package/dist/nodes/three/grid-geometry3d.js.map +0 -1
  794. package/dist/nodes/three/group3d.d.ts +0 -23
  795. package/dist/nodes/three/group3d.d.ts.map +0 -1
  796. package/dist/nodes/three/group3d.js +0 -21
  797. package/dist/nodes/three/group3d.js.map +0 -1
  798. package/dist/nodes/three/light-nodes.d.ts +0 -120
  799. package/dist/nodes/three/light-nodes.d.ts.map +0 -1
  800. package/dist/nodes/three/light-nodes.js +0 -173
  801. package/dist/nodes/three/light-nodes.js.map +0 -1
  802. package/dist/nodes/three/mesh3d.d.ts +0 -117
  803. package/dist/nodes/three/mesh3d.d.ts.map +0 -1
  804. package/dist/nodes/three/mesh3d.js +0 -147
  805. package/dist/nodes/three/mesh3d.js.map +0 -1
  806. package/dist/nodes/three/node3d.d.ts +0 -230
  807. package/dist/nodes/three/node3d.d.ts.map +0 -1
  808. package/dist/nodes/three/node3d.js +0 -337
  809. package/dist/nodes/three/node3d.js.map +0 -1
  810. package/dist/render/descriptors/latex.d.ts +0 -6
  811. package/dist/render/descriptors/latex.d.ts.map +0 -1
  812. package/dist/render/descriptors/latex.js +0 -2
  813. package/dist/render/descriptors/latex.js.map +0 -1
  814. package/dist/tween/seekable.d.ts +0 -81
  815. package/dist/tween/seekable.d.ts.map +0 -1
  816. package/dist/tween/seekable.js +0 -137
  817. package/dist/tween/seekable.js.map +0 -1
@@ -1,264 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { Graphics2D } from "../../render/graphics2d.js";
8
- import { Clip } from "../../render/clip.js";
9
- import { command } from "../../tween/command-decorator.js";
10
- import { lerpLookAt } from "../../attributes/layout/space3d.js";
11
- import { NO_PROJECTION_3D } from "../../attributes/layout/matrix2d.js";
12
- import { fillOps } from "../../attributes/shape/fill/registry.js";
13
- import { Node2D } from "../../nodes/2d/node2d.js";
14
- import { spaceRootFrame } from "../../nodes/2d/node-space.js";
15
- import { NodeAudio } from "../../nodes/audio/node-audio.js";
16
- import { property } from "../../attributes/properties/decorator.js";
17
- import { alignmentProperty, fillProperty, flowProperty } from "../../attributes/properties/typed.js";
18
- /**
19
- * The single root container every clip document builds into.
20
- *
21
- * A `Canvas2D` is a plain {@link Node2D} that doubles as the clip's layout frame
22
- * and camera. It lays its children out (flex `horizontal`/`vertical` or
23
- * `freeform`, with `gap`, `align`, `padding`) and paints a scene-wide background
24
- * (`fill`) and `overlay` — *and* views those laid-out children through a viewport
25
- * transform (`zoom`, `lookAt`, `heading`).
26
- *
27
- * Unlike a {@link Rect} it is **not a shape**: it has no stroke, shadow, corner,
28
- * or `start`/`end` props. It carries only the scene-wide concerns — background
29
- * paint, child layout, and camera — so `stage.fill`, `stage.flow`, etc. read
30
- * the root directly without exposing per-shape geometry the scene root never has.
31
- *
32
- * Its layout props are the arrangement {@link Node2D} lays its children out by,
33
- * the same as a {@link Rect}'s — see {@link flowArrangement}.
34
- */
35
- /** @internal */
36
- export class Canvas2D extends Node2D {
37
- constructor(props) {
38
- super(props);
39
- }
40
- // ---- Camera motion commands -------------------------------------------
41
- // Mirror the Camera node's viewport commands.
42
- /** Animate `zoom`. Values > 1 zoom in; < 1 zoom out. */
43
- zoomTo(args) {
44
- return this.to({ data: args.data, duration: args.duration, easing: args.easing });
45
- }
46
- /** Pan — animate `lookAt`, the world-space point mapped to the viewport center. `z` moves it in depth. */
47
- panTo(args) {
48
- return this.to({ data: args.data, duration: args.duration, easing: args.easing });
49
- }
50
- /**
51
- * Swing the camera round {@link lookAt}. The argument names are the ones the
52
- * 3D components' `orbitTo` takes, less `zoom`: here that is the lens, not a
53
- * distance, and it has a command of its own.
54
- */
55
- orbitTo(args) {
56
- return this.to({ data: args.data, duration: args.duration, easing: args.easing });
57
- }
58
- /** Move the camera in toward {@link lookAt} (positive) or back out. */
59
- dollyTo(args) {
60
- return this.to({ data: args.data, duration: args.duration, easing: args.easing });
61
- }
62
- /** Animate the view rotation (`heading`), in degrees clockwise. */
63
- headingTo(args) {
64
- return this.to({ data: args.data, duration: args.duration, easing: args.easing });
65
- }
66
- fillTo(args) {
67
- const from = this.fill;
68
- const target = fillOps.resolve(args.data);
69
- const lerp = args.lerp ?? fillOps.lerp;
70
- return this.command(t => ({ fill: lerp(from, target, t) }), args.duration, args.easing);
71
- }
72
- overlayTo(args) {
73
- const from = this.overlay;
74
- const target = fillOps.resolve(args.data);
75
- const lerp = args.lerp ?? fillOps.lerp;
76
- return this.command(t => ({ overlay: lerp(from, target, t) }), args.duration, args.easing);
77
- }
78
- // ---- Layout -----------------------------------------------------------
79
- flowArrangement() {
80
- return this;
81
- }
82
- // ---- Drawing ----------------------------------------------------------
83
- // The viewport-sized background box behind the children.
84
- shapeGraphics() {
85
- return new Graphics2D().rect({
86
- width: this.layoutBounds.width,
87
- height: this.layoutBounds.height,
88
- });
89
- }
90
- renderSelf(draw) {
91
- const fill = this.fill;
92
- if (fill.length === 0)
93
- return;
94
- draw.draw(this.shapeGraphics().fill(fill));
95
- }
96
- // Overlay over fill + children, clipped to the viewport silhouette.
97
- renderOverlay(ctx) {
98
- const overlay = this.overlay;
99
- if (overlay.length === 0)
100
- return;
101
- ctx.draw(this.shapeGraphics().fill(overlay));
102
- }
103
- /**
104
- * Accept audio children as well as 2D ones.
105
- *
106
- * The scene root is where the two trees meet, mirroring `Canvas3D` — and for
107
- * the same reason it is *this* node: a composition already carries both
108
- * halves of a clip, so a voiceover belongs in the document that shows the
109
- * picture it is narrating rather than in a second document beside it.
110
- *
111
- * Nothing partitions them by hand. `Node2D.children` already filters to its
112
- * own kind, so layout and render skip the audio subtree for free, and the
113
- * audio declaration walk reads the unfiltered list.
114
- */
115
- acceptsChild(child) {
116
- return child.dimension === "2d" || child.dimension === "audio";
117
- }
118
- get _childTrees() {
119
- return ["2d", "audio"];
120
- }
121
- /** This node's children in the audio tree. */
122
- get childrenAudio() {
123
- return this._allChildren.filter((c) => c instanceof NodeAudio);
124
- }
125
- // The world container, not a shape, so it declares its own `fill`/`overlay`.
126
- declareAssets(assets) {
127
- super.declareAssets(assets);
128
- assets.fill(this.fill);
129
- assets.fill(this.overlay);
130
- }
131
- // The viewport outline — used for `clip` and as the area backdrop effects
132
- // are confined to.
133
- clipSelf() {
134
- return new Clip().rect({
135
- width: this.layoutBounds.width,
136
- height: this.layoutBounds.height,
137
- });
138
- }
139
- // ---- Rendering --------------------------------------------------------
140
- // Children are laid out by the flow engine; here we view that laid-out
141
- // world through the camera viewport transform, the same way the Camera node
142
- // does. When the camera is at rest (zoom 1, no heading, origin at 0) this is
143
- // the identity, so a plain layout root pays nothing extra.
144
- // Non-null exactly when renderChildren below opens a camera, so a consumer
145
- // reproducing the render transform (node picking) inserts the same scope in
146
- // the same place — and skips it on the at-rest fast path, where the renderer
147
- // pushes nothing at all.
148
- _cameraScope() {
149
- if (this.space3D)
150
- return null;
151
- if (this.zoom === 1 && this.heading === 0 && this.lookAt.x === 0 && this.lookAt.y === 0)
152
- return null;
153
- return { lookAt: this.lookAt, zoom: this.zoom, heading: this.heading };
154
- }
155
- _spaceCamera() {
156
- if (!this.space3D)
157
- return null;
158
- const rect = this.layoutBounds;
159
- return {
160
- perspective: this.perspective,
161
- orbit: this.orbit,
162
- elevation: this.elevation,
163
- dolly: this.dolly,
164
- lookAt: this.lookAt,
165
- zoom: this.zoom,
166
- heading: this.heading,
167
- viewportX: rect?.x ?? 0,
168
- viewportY: -(rect?.y ?? 0),
169
- };
170
- }
171
- // In a space the stage's own tilt and depth would turn the whole scene as
172
- // one flat card; its `perspective` is the camera's instead.
173
- _projection() {
174
- return this.space3D ? NO_PROJECTION_3D : super._projection();
175
- }
176
- renderChildren(ctx) {
177
- const camera = this._spaceCamera();
178
- if (camera) {
179
- this._renderInSpace(ctx, spaceRootFrame(this, camera));
180
- return;
181
- }
182
- if (this.zoom === 1 && this.heading === 0 && this.lookAt.x === 0 && this.lookAt.y === 0) {
183
- super.renderChildren(ctx);
184
- return;
185
- }
186
- const rect = this.layoutBounds;
187
- const w = rect?.width ?? 0;
188
- const h = rect?.height ?? 0;
189
- const cx = rect?.x ?? 0;
190
- const cy = rect?.y ?? 0;
191
- ctx.beginCamera({ x: cx, y: -cy, width: w, height: h }, this.lookAt, this.zoom, this.heading);
192
- for (const child of this._children)
193
- if (child instanceof Node2D)
194
- child.render(ctx);
195
- ctx.endCamera();
196
- }
197
- }
198
- __decorate([
199
- fillProperty()
200
- ], Canvas2D.prototype, "fill", void 0);
201
- __decorate([
202
- fillProperty()
203
- ], Canvas2D.prototype, "overlay", void 0);
204
- __decorate([
205
- flowProperty()
206
- ], Canvas2D.prototype, "flow", void 0);
207
- __decorate([
208
- property({ default: 0 })
209
- ], Canvas2D.prototype, "gap", void 0);
210
- __decorate([
211
- property({ default: false })
212
- ], Canvas2D.prototype, "wrap", void 0);
213
- __decorate([
214
- property({ default: undefined })
215
- ], Canvas2D.prototype, "crossGap", void 0);
216
- __decorate([
217
- property({ default: 1 })
218
- ], Canvas2D.prototype, "columns", void 0);
219
- __decorate([
220
- alignmentProperty()
221
- ], Canvas2D.prototype, "align", void 0);
222
- __decorate([
223
- property({ default: 1 })
224
- ], Canvas2D.prototype, "zoom", void 0);
225
- __decorate([
226
- property({ default: { x: 0, y: 0 }, tween: lerpLookAt })
227
- ], Canvas2D.prototype, "lookAt", void 0);
228
- __decorate([
229
- property({ default: 0 })
230
- ], Canvas2D.prototype, "heading", void 0);
231
- __decorate([
232
- property({ default: false })
233
- ], Canvas2D.prototype, "space3D", void 0);
234
- __decorate([
235
- property({ default: 0 })
236
- ], Canvas2D.prototype, "orbit", void 0);
237
- __decorate([
238
- property({ default: 0 })
239
- ], Canvas2D.prototype, "elevation", void 0);
240
- __decorate([
241
- property({ default: 0 })
242
- ], Canvas2D.prototype, "dolly", void 0);
243
- __decorate([
244
- command({ args: [{ key: "zoom", kind: "number", min: 0.01, step: 0.1, unit: "×" }] })
245
- ], Canvas2D.prototype, "zoomTo", null);
246
- __decorate([
247
- command({ args: [{ key: "lookAt", kind: "vector2", properties: { x: { kind: "number" }, y: { kind: "number" }, z: { kind: "number" } } }] })
248
- ], Canvas2D.prototype, "panTo", null);
249
- __decorate([
250
- command({ args: [{ key: "orbit", kind: "number", step: 1, unit: "°" }, { key: "elevation", kind: "number", step: 1, unit: "°" }] })
251
- ], Canvas2D.prototype, "orbitTo", null);
252
- __decorate([
253
- command({ args: [{ key: "dolly", kind: "number", step: 10 }] })
254
- ], Canvas2D.prototype, "dollyTo", null);
255
- __decorate([
256
- command({ args: [{ key: "heading", kind: "number", step: 1, unit: "°" }] })
257
- ], Canvas2D.prototype, "headingTo", null);
258
- __decorate([
259
- command()
260
- ], Canvas2D.prototype, "fillTo", null);
261
- __decorate([
262
- command()
263
- ], Canvas2D.prototype, "overlayTo", null);
264
- //# sourceMappingURL=canvas2d-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvas2d-node.js","sourceRoot":"","sources":["../../../src/nodes/root/canvas2d-node.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAiC,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAqB,MAAM,8BAA8B,CAAC;AAGnF,OAAO,EAAE,OAAO,EAAE,MAAM,kC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ext2D, RenderPass2D } from \"@/render/render-context2d\";\r\nimport { Graphics2D } from \"@/render/graphics2d\";\r\nimport { Clip } from \"@/render/clip\";\r\nimport { type Command, type CommandArgs } from \"@/tween/command\";\r\nimport { command } from \"@/tween/command-decorator\";\r\nimport { lerpLookAt, type LookAt, type SpaceCamera } from \"@/attributes/layout/space3d\";\r\nimport { NO_PROJECTION_3D, type Projection3D } from \"@/attributes/layout/matrix2d\";\r\nimport { Alignment } from \"@/attributes/layout/alignment\";\r\nimport type { FlowMode, FlowProps, FlowSettings, GapSize } from \"@/layout/types\";\r\nimport { fillOps } from \"@/attributes/shape/fill/registry\";\r\nimport { FillResolved } from \"@/attributes/shape/fill/union\";\r\nimport { Fill } from \"@/attributes/shape/fill/chain\";\r\nimport type { AssetScope } from \"@/assets/scope\";\r\nimport { CameraScope, Node2D, NodeConfig, Node2DProps } from \"@/nodes/2d/node2d\";\r\nimport { spaceRootFrame } from \"@/nodes/2d/node-space\";\r\nimport type { Node, NodeDimension } from \"@/nodes/node/node\";\r\nimport { NodeAudio } from \"@/nodes/audio/node-audio\";\r\nimport { property } from \"@/attributes/properties/decorator\";\r\nimport { alignmentProperty, fillProperty, flowProperty } from \"@/attributes/properties/typed\";\r\n\r\n/** @internal */\r\nexport interface Canvas2DProps extends Node2DProps, FlowProps {\r\n /**\r\n * Background fill layer(s). Each item can be a CSS color string, a fill\r\n * prop object, an already-resolved fill, or a {@link FillChain} from the\r\n * `Fills` builder. Painted behind the scene's children.\r\n */\r\n fill: Fill;\r\n /**\r\n * Overlay layer(s) — same loose values as {@link fill}, but painted *over*\r\n * the fill **and** the children (clipped to the viewport). Use for textures\r\n * laid across the whole scene, e.g. a VHS-grain image or video.\r\n */\r\n overlay: Fill;\r\n /** Camera magnification factor. Values > 1 zoom in; < 1 zoom out. */\r\n zoom: number;\r\n /**\r\n * World-space point that maps to the centre of the viewport. In a\r\n * {@link space3D} it is also what the camera orbits, and `z` puts it in\r\n * depth — the same sense as a node's `depth`, so a negative `z` flies in.\r\n */\r\n lookAt: LookAt;\r\n /** Rotation of the camera view in degrees (clockwise). */\r\n heading: number;\r\n /**\r\n * Place the children in one 3D space seen through this camera, rather than\r\n * each projecting through a perspective of its own. Their `depth` and tilt\r\n * are then positions and turns in that space, and siblings paint far to\r\n * near. A switch rather than something read off the camera's numbers, so\r\n * turning it on can never jump a tween.\r\n *\r\n * While it is on, `perspective` is the camera's distance from {@link lookAt}\r\n * at `dolly: 0` — CSS's convention, so that plane draws 1:1 and `0` is a\r\n * parallel projection — and the stage's own tilt and depth are unused.\r\n */\r\n space3D: boolean;\r\n /** Degrees about the vertical axis through {@link lookAt}. 0 is head-on; positive moves the camera to the right. Same as `Camera3D`. */\r\n orbit: number;\r\n /** Degrees above the layers. Positive looks down on them. Same as `Camera3D`. */\r\n elevation: number;\r\n /** Px the camera has moved in toward {@link lookAt}. Inert with no perspective, as depth is. */\r\n dolly: number;\r\n}\r\n\r\n/**\r\n * The single root container every clip document builds into.\r\n *\r\n * A `Canvas2D` is a plain {@link Node2D} that doubles as the clip's layout frame\r\n * and camera. It lays its children out (flex `horizontal`/`vertical` or\r\n * `freeform`, with `gap`, `align`, `padding`) and paints a scene-wide background\r\n * (`fill`) and `overlay` — *and* views those laid-out children through a viewport\r\n * transform (`zoom`, `lookAt`, `heading`).\r\n *\r\n * Unlike a {@link Rect} it is **not a shape**: it has no stroke, shadow, corner,\r\n * or `start`/`end` props. It carries only the scene-wide concerns — background\r\n * paint, child layout, and camera — so `stage.fill`, `stage.flow`, etc. read\r\n * the root directly without exposing per-shape geometry the scene root never has.\r\n *\r\n * Its layout props are the arrangement {@link Node2D} lays its children out by,\r\n * the same as a {@link Rect}'s — see {@link flowArrangement}.\r\n */\r\n/** @internal */\r\nexport class Canvas2D extends Node2D<Canvas2DProps> {\r\n\r\n // ---- Background paint -------------------------------------------------\r\n // Author-facing paint props. Like Rect, the declared type is the loose\r\n // `Fill` so assignment (`this.fill = 'red'`) and reads share one type; the\r\n // @property accessor stores the *resolved* value via the mapper.\r\n @fillProperty()\r\n declare fill: Fill;\r\n @fillProperty()\r\n declare overlay: Fill;\r\n\r\n // ---- Layout container -------------------------------------------------\r\n @flowProperty() declare flow: FlowMode;\r\n @property({ default: 0 }) declare readonly gap: GapSize;\r\n @property({ default: false }) declare readonly wrap: boolean;\r\n // `undefined` means \"follow `gap`\", not \"missing\" — see FlowProps.crossGap.\r\n @property({ default: undefined }) declare readonly crossGap: number | undefined;\r\n @property({ default: 1 }) declare readonly columns: number;\r\n // Declared loose as `Alignment` (covers `this.align = 'center'`); the\r\n // accessor stores the resolved per-axis `Vector2` pivot. See Rect.\r\n @alignmentProperty()\r\n declare align: Alignment;\r\n\r\n // ---- Camera -----------------------------------------------------------\r\n /** Camera magnification factor (default: 1). */\r\n @property({ default: 1 }) declare zoom: number;\r\n /** World-space focus point (default: {x:0, y:0}). */\r\n @property({ default: { x: 0, y: 0 }, tween: lerpLookAt }) declare lookAt: LookAt;\r\n /** Camera view rotation in degrees (default: 0). */\r\n @property({ default: 0 }) declare heading: number;\r\n @property({ default: false }) declare space3D: boolean;\r\n @property({ default: 0 }) declare orbit: number;\r\n @property({ default: 0 }) declare elevation: number;\r\n @property({ default: 0 }) declare dolly: number;\r\n\r\n constructor(props: NodeConfig<Canvas2D, Canvas2DProps>) {\r\n super(props);\r\n }\r\n\r\n // ---- Camera motion commands -------------------------------------------\r\n // Mirror the Camera node's viewport commands.\r\n\r\n /** Animate `zoom`. Values > 1 zoom in; < 1 zoom out. */\r\n @command({ args: [{ key: \"zoom\", kind: \"number\", min: 0.01, step: 0.1, unit: \"×\" }] })\r\n zoomTo(args: CommandArgs<{ zoom: number }> & { duration: number }): Command<Canvas2DProps> {\r\n return this.to({ data: args.data as Partial<Canvas2DProps>, duration: args.duration, easing: args.easing });\r\n }\r\n\r\n /** Pan — animate `lookAt`, the world-space point mapped to the viewport center. `z` moves it in depth. */\r\n @command({ args: [{ key: \"lookAt\", kind: \"vector2\", properties: { x: { kind: \"number\" }, y: { kind: \"number\" }, z: { kind: \"number\" } } }] })\r\n panTo(args: CommandArgs<{ lookAt: LookAt }> & { duration: number }): Command<Canvas2DProps> {\r\n return this.to({ data: args.data as Partial<Canvas2DProps>, duration: args.duration, easing: args.easing });\r\n }\r\n\r\n /**\r\n * Swing the camera round {@link lookAt}. The argument names are the ones the\r\n * 3D components' `orbitTo` takes, less `zoom`: here that is the lens, not a\r\n * distance, and it has a command of its own.\r\n */\r\n @command({ args: [{ key: \"orbit\", kind: \"number\", step: 1, unit: \"°\" }, { key: \"elevation\", kind: \"number\", step: 1, unit: \"°\" }] })\r\n orbitTo(args: CommandArgs<{ orbit?: number; elevation?: number }> & { duration: number }): Command<Canvas2DProps> {\r\n return this.to({ data: args.data as Partial<Canvas2DProps>, duration: args.duration, easing: args.easing });\r\n }\r\n\r\n /** Move the camera in toward {@link lookAt} (positive) or back out. */\r\n @command({ args: [{ key: \"dolly\", kind: \"number\", step: 10 }] })\r\n dollyTo(args: CommandArgs<{ dolly: number }> & { duration: number }): Command<Canvas2DProps> {\r\n return this.to({ data: args.data as Partial<Canvas2DProps>, duration: args.duration, easing: args.easing });\r\n }\r\n\r\n /** Animate the view rotation (`heading`), in degrees clockwise. */\r\n @command({ args: [{ key: \"heading\", kind: \"number\", step: 1, unit: \"°\" }] })\r\n headingTo(args: CommandArgs<{ heading: number }> & { duration: number }): Command<Canvas2DProps> {\r\n return this.to({ data: args.data as Partial<Canvas2DProps>, duration: args.duration, easing: args.easing });\r\n }\r\n\r\n @command()\r\n fillTo(args: CommandArgs<Fill, FillResolved[]> & { duration: number }): Command<Canvas2DProps> {\r\n const from = this.fill as FillResolved[];\r\n const target = fillOps.resolve(args.data as Fill);\r\n const lerp = args.lerp ?? fillOps.lerp;\r\n return this.command<Canvas2DProps>(t => ({ fill: lerp(from, target, t) }) as Partial<Canvas2DProps>, args.duration, args.easing);\r\n }\r\n\r\n @command()\r\n overlayTo(args: CommandArgs<Fill, FillResolved[]> & { duration: number }): Command<Canvas2DProps> {\r\n const from = this.overlay as FillResolved[];\r\n const target = fillOps.resolve(args.data as Fill);\r\n const lerp = args.lerp ?? fillOps.lerp;\r\n return this.command<Canvas2DProps>(t => ({ overlay: lerp(from, target, t) }) as Partial<Canvas2DProps>, args.duration, args.easing);\r\n }\r\n\r\n // ---- Layout -----------------------------------------------------------\r\n\r\n protected override flowArrangement(): FlowSettings {\r\n return this;\r\n }\r\n\r\n // ---- Drawing ----------------------------------------------------------\r\n\r\n // The viewport-sized background box behind the children.\r\n private shapeGraphics(): Graphics2D {\r\n return new Graphics2D().rect({\r\n width: this.layoutBounds.width,\r\n height: this.layoutBounds.height,\r\n });\r\n }\r\n\r\n protected override renderSelf(draw: RenderContext2D): void {\r\n const fill = this.fill as FillResolved[];\r\n if (fill.length === 0) return;\r\n draw.draw(this.shapeGraphics().fill(fill));\r\n }\r\n\r\n // Overlay over fill + children, clipped to the viewport silhouette.\r\n protected override renderOverlay(ctx: RenderContext2D): void {\r\n const overlay = this.overlay as FillResolved[];\r\n if (overlay.length === 0) return;\r\n ctx.draw(this.shapeGraphics().fill(overlay));\r\n }\r\n\r\n /**\r\n * Accept audio children as well as 2D ones.\r\n *\r\n * The scene root is where the two trees meet, mirroring `Canvas3D` — and for\r\n * the same reason it is *this* node: a composition already carries both\r\n * halves of a clip, so a voiceover belongs in the document that shows the\r\n * picture it is narrating rather than in a second document beside it.\r\n *\r\n * Nothing partitions them by hand. `Node2D.children` already filters to its\r\n * own kind, so layout and render skip the audio subtree for free, and the\r\n * audio declaration walk reads the unfiltered list.\r\n */\r\n protected override acceptsChild(child: Node): boolean {\r\n return child.dimension === \"2d\" || child.dimension === \"audio\";\r\n }\r\n\r\n override get _childTrees(): readonly NodeDimension[] {\r\n return [\"2d\", \"audio\"];\r\n }\r\n\r\n /** This node's children in the audio tree. */\r\n get childrenAudio(): NodeAudio[] {\r\n return this._allChildren.filter((c): c is NodeAudio => c instanceof NodeAudio);\r\n }\r\n\r\n // The world container, not a shape, so it declares its own `fill`/`overlay`.\r\n override declareAssets(assets: AssetScope): void {\r\n super.declareAssets(assets);\r\n assets.fill(this.fill as FillResolved[]);\r\n assets.fill(this.overlay as FillResolved[]);\r\n }\r\n\r\n // The viewport outline — used for `clip` and as the area backdrop effects\r\n // are confined to.\r\n protected override clipSelf(): Clip {\r\n return new Clip().rect({\r\n width: this.layoutBounds.width,\r\n height: this.layoutBounds.height,\r\n });\r\n }\r\n\r\n // ---- Rendering --------------------------------------------------------\r\n\r\n // Children are laid out by the flow engine; here we view that laid-out\r\n // world through the camera viewport transform, the same way the Camera node\r\n // does. When the camera is at rest (zoom 1, no heading, origin at 0) this is\r\n // the identity, so a plain layout root pays nothing extra.\r\n // Non-null exactly when renderChildren below opens a camera, so a consumer\r\n // reproducing the render transform (node picking) inserts the same scope in\r\n // the same place — and skips it on the at-rest fast path, where the renderer\r\n // pushes nothing at all.\r\n override _cameraScope(): CameraScope | null {\r\n if (this.space3D) return null;\r\n if (this.zoom === 1 && this.heading === 0 && this.lookAt.x === 0 && this.lookAt.y === 0) return null;\r\n return { lookAt: this.lookAt, zoom: this.zoom, heading: this.heading };\r\n }\r\n\r\n override _spaceCamera(): SpaceCamera | null {\r\n if (!this.space3D) return null;\r\n const rect = this.layoutBounds;\r\n return {\r\n perspective: this.perspective,\r\n orbit: this.orbit,\r\n elevation: this.elevation,\r\n dolly: this.dolly,\r\n lookAt: this.lookAt,\r\n zoom: this.zoom,\r\n heading: this.heading,\r\n viewportX: rect?.x ?? 0,\r\n viewportY: -(rect?.y ?? 0),\r\n };\r\n }\r\n\r\n // In a space the stage's own tilt and depth would turn the whole scene as\r\n // one flat card; its `perspective` is the camera's instead.\r\n protected override _projection(): Projection3D {\r\n return this.space3D ? NO_PROJECTION_3D : super._projection();\r\n }\r\n\r\n protected override renderChildren(ctx: RenderPass2D): void {\r\n const camera = this._spaceCamera();\r\n if (camera) {\r\n this._renderInSpace(ctx, spaceRootFrame(this, camera));\r\n return;\r\n }\r\n if (this.zoom === 1 && this.heading === 0 && this.lookAt.x === 0 && this.lookAt.y === 0) {\r\n super.renderChildren(ctx);\r\n return;\r\n }\r\n\r\n const rect = this.layoutBounds;\r\n const w = rect?.width ?? 0;\r\n const h = rect?.height ?? 0;\r\n const cx = rect?.x ?? 0;\r\n const cy = rect?.y ?? 0;\r\n\r\n ctx.beginCamera(\r\n { x: cx, y: -cy, width: w, height: h },\r\n this.lookAt,\r\n this.zoom,\r\n this.heading,\r\n );\r\n\r\n for (const child of this._children) if (child instanceof Node2D) child.render(ctx);\r\n\r\n ctx.endCamera();\r\n }\r\n}\r\n"]}
@@ -1,47 +0,0 @@
1
- import { Node2D, NodeConfig, Node2DProps } from "../../nodes/2d/node2d.js";
2
- import { Context, ContextMap } from "../../util/context.js";
3
- export interface ProviderProps<T> extends Node2DProps {
4
- /** The context token this provider supplies to its descendants. */
5
- context: Context<T>;
6
- /** The value to provide. Omitted → the token's default value. */
7
- value: T;
8
- }
9
- /**
10
- * Generic context provider — the JSX-facing counterpart to {@link createContext}.
11
- * Wraps its children and supplies a token's value to everything below it;
12
- * descendants read it with `node.useContext(token)`. Nesting providers for the
13
- * same token shadows nearest-ancestor-wins.
14
- *
15
- * @example Inline use
16
- * ```tsx
17
- * const Money = createContext<number>(0, "money");
18
- * <Provider context={Money} value={500}>
19
- * <MyNode /> // useContext(Money) === 500
20
- * </Provider>
21
- * ```
22
- *
23
- * @example Reusable, pre-bound provider — extend and fix the token
24
- * ```tsx
25
- * class MoneyProvider extends Provider<number> {
26
- * protected override resolveContext() { return Money; }
27
- * }
28
- * <MoneyProvider value={500}>…</MoneyProvider>
29
- * ```
30
- *
31
- * It's a layout-transparent container: it has no paint of its own and
32
- * stack-centers its children (the base {@link Node2D} layout), so dropping a
33
- * provider into a tree changes inheritance, not appearance.
34
- */
35
- export declare class Provider<T = unknown> extends Node2D<ProviderProps<T>> {
36
- readonly context?: Context<T>;
37
- readonly value?: T;
38
- constructor(props: NodeConfig<Provider<T>, ProviderProps<T>>);
39
- /** The token to provide. Override in a subclass to bind a fixed token so
40
- * authors don't re-pass `context` on every use. */
41
- protected resolveContext(): Context<T> | undefined;
42
- /** The value to provide. Override alongside {@link resolveContext} for a
43
- * provider that computes its value rather than taking it as a prop. */
44
- protected resolveValue(): T | undefined;
45
- protected provideContext(parent: ContextMap): ContextMap;
46
- }
47
- //# sourceMappingURL=provider-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider-node.d.ts","sourceRoot":"","sources":["../../../src/nodes/root/provider-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,aAAa,CAAC,CAAC,CAAE,SAAQ,WAAW;IACjD,mEAAmE;IACnE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,iEAAiE;IACjE,KAAK,EAAE,CAAC,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/D,SAAmD,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACxE,SAAmD,KAAK,CAAC,EAAE,CAAC,CAAC;gBAEjD,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAI5D;uDACmD;IACnD,SAAS,CAAC,cAAc,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS;IAIlD;2EACuE;IACvE,SAAS,CAAC,YAAY,IAAI,CAAC,GAAG,SAAS;cAIpB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU;CAMpE"}
@@ -1,63 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { Node2D } from "../../nodes/2d/node2d.js";
8
- import { property } from "../../attributes/properties/decorator.js";
9
- /**
10
- * Generic context provider — the JSX-facing counterpart to {@link createContext}.
11
- * Wraps its children and supplies a token's value to everything below it;
12
- * descendants read it with `node.useContext(token)`. Nesting providers for the
13
- * same token shadows nearest-ancestor-wins.
14
- *
15
- * @example Inline use
16
- * ```tsx
17
- * const Money = createContext<number>(0, "money");
18
- * <Provider context={Money} value={500}>
19
- * <MyNode /> // useContext(Money) === 500
20
- * </Provider>
21
- * ```
22
- *
23
- * @example Reusable, pre-bound provider — extend and fix the token
24
- * ```tsx
25
- * class MoneyProvider extends Provider<number> {
26
- * protected override resolveContext() { return Money; }
27
- * }
28
- * <MoneyProvider value={500}>…</MoneyProvider>
29
- * ```
30
- *
31
- * It's a layout-transparent container: it has no paint of its own and
32
- * stack-centers its children (the base {@link Node2D} layout), so dropping a
33
- * provider into a tree changes inheritance, not appearance.
34
- */
35
- export class Provider extends Node2D {
36
- constructor(props) {
37
- super(props);
38
- }
39
- /** The token to provide. Override in a subclass to bind a fixed token so
40
- * authors don't re-pass `context` on every use. */
41
- resolveContext() {
42
- return this.context;
43
- }
44
- /** The value to provide. Override alongside {@link resolveContext} for a
45
- * provider that computes its value rather than taking it as a prop. */
46
- resolveValue() {
47
- return this.value;
48
- }
49
- provideContext(parent) {
50
- const ctx = this.resolveContext();
51
- if (!ctx)
52
- return parent;
53
- const v = this.resolveValue();
54
- return parent.with(ctx, v !== undefined ? v : ctx.defaultValue);
55
- }
56
- }
57
- __decorate([
58
- property({ default: undefined })
59
- ], Provider.prototype, "context", void 0);
60
- __decorate([
61
- property({ default: undefined })
62
- ], Provider.prototype, "value", void 0);
63
- //# sourceMappingURL=provider-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider-node.js","sourceRoot":"","sources":["../../../src/nodes/root/provider-node.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAU7D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,QAAsB,SAAQ,MAAwB;IAI/D,YAAY,KAAgD;QACxD,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;uDACmD;IACzC,cAAc;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;2EACuE;IAC7D,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAEkB,cAAc,CAAC,MAAkB;QAChD,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAClC,IAAI,CAAC,GAAG;YAAE,OAAO,MAAM,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACpE,CAAC;CACJ;AAzBsD;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;yCAAuC;AACrB;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;uCAA4B","sourcesContent":["import { Node2D, NodeConfig, Node2DProps } from \"@/nodes/2d/node2d\";\r\nimport { property } from \"@/attributes/properties/decorator\";\r\nimport { Context, ContextMap } from \"@/util/context\";\r\n\r\nexport interface ProviderProps<T> extends Node2DProps {\r\n /** The context token this provider supplies to its descendants. */\r\n context: Context<T>;\r\n /** The value to provide. Omitted → the token's default value. */\r\n value: T;\r\n}\r\n\r\n/**\r\n * Generic context provider — the JSX-facing counterpart to {@link createContext}.\r\n * Wraps its children and supplies a token's value to everything below it;\r\n * descendants read it with `node.useContext(token)`. Nesting providers for the\r\n * same token shadows nearest-ancestor-wins.\r\n *\r\n * @example Inline use\r\n * ```tsx\r\n * const Money = createContext<number>(0, \"money\");\r\n * <Provider context={Money} value={500}>\r\n * <MyNode /> // useContext(Money) === 500\r\n * </Provider>\r\n * ```\r\n *\r\n * @example Reusable, pre-bound provider — extend and fix the token\r\n * ```tsx\r\n * class MoneyProvider extends Provider<number> {\r\n * protected override resolveContext() { return Money; }\r\n * }\r\n * <MoneyProvider value={500}>…</MoneyProvider>\r\n * ```\r\n *\r\n * It's a layout-transparent container: it has no paint of its own and\r\n * stack-centers its children (the base {@link Node2D} layout), so dropping a\r\n * provider into a tree changes inheritance, not appearance.\r\n */\r\nexport class Provider<T = unknown> extends Node2D<ProviderProps<T>> {\r\n @property({ default: undefined }) declare readonly context?: Context<T>;\r\n @property({ default: undefined }) declare readonly value?: T;\r\n\r\n constructor(props: NodeConfig<Provider<T>, ProviderProps<T>>) {\r\n super(props);\r\n }\r\n\r\n /** The token to provide. Override in a subclass to bind a fixed token so\r\n * authors don't re-pass `context` on every use. */\r\n protected resolveContext(): Context<T> | undefined {\r\n return this.context;\r\n }\r\n\r\n /** The value to provide. Override alongside {@link resolveContext} for a\r\n * provider that computes its value rather than taking it as a prop. */\r\n protected resolveValue(): T | undefined {\r\n return this.value;\r\n }\r\n\r\n protected override provideContext(parent: ContextMap): ContextMap {\r\n const ctx = this.resolveContext();\r\n if (!ctx) return parent;\r\n const v = this.resolveValue();\r\n return parent.with(ctx, v !== undefined ? v : ctx.defaultValue);\r\n }\r\n}\r\n"]}
@@ -1,29 +0,0 @@
1
- import { Node2D, NodeConfig, Node2DProps } from "../../nodes/2d/node2d.js";
2
- import { ContextMap } from "../../util/context.js";
3
- export interface ThemeProviderProps extends Node2DProps {
4
- /** Named values (e.g. colors) merged onto any ancestor theme, read via
5
- * `node.useContext(ThemeToken)`. */
6
- theme: Record<string, unknown>;
7
- /** Arbitrary data merged onto any ancestor data bag, read via
8
- * `node.useContext(DataToken)`. */
9
- data: Record<string, unknown>;
10
- /** A default seed passed down the tree, read via `node.useContext(SeedToken)`. */
11
- seed: string | number;
12
- }
13
- /**
14
- * Provides theme / data / seed to its descendants. A convenience wrapper over
15
- * the same context machinery as {@link Provider}: it sets three built-in tokens
16
- * at once and **merges** `theme`/`data` onto any ancestor provider's values
17
- * (nested `ThemeProvider`s accumulate; nearest wins per key), while `seed`
18
- * overrides the inherited seed.
19
- *
20
- * Layout-transparent like {@link Provider} — it carries context, not appearance.
21
- */
22
- export declare class ThemeProvider extends Node2D<ThemeProviderProps> {
23
- readonly theme?: Record<string, unknown>;
24
- readonly data?: Record<string, unknown>;
25
- readonly seed?: string | number;
26
- constructor(props: NodeConfig<ThemeProvider, ThemeProviderProps>);
27
- protected provideContext(parent: ContextMap): ContextMap;
28
- }
29
- //# sourceMappingURL=theme-provider-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-provider-node.d.ts","sourceRoot":"","sources":["../../../src/nodes/root/theme-provider-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACnD;wCACoC;IACpC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;uCACmC;IACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,kFAAkF;IAClF,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,MAAM,CAAC,kBAAkB,CAAC;IACzD,SAAmD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnF,SAAmD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClF,SAAmD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;gBAE9D,KAAK,EAAE,UAAU,CAAC,aAAa,EAAE,kBAAkB,CAAC;cAI7C,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU;CAOpE"}
@@ -1,43 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { Node2D } from "../../nodes/2d/node2d.js";
8
- import { property } from "../../attributes/properties/decorator.js";
9
- import { ThemeToken, DataToken, SeedToken } from "../../runtime/builtin-context.js";
10
- /**
11
- * Provides theme / data / seed to its descendants. A convenience wrapper over
12
- * the same context machinery as {@link Provider}: it sets three built-in tokens
13
- * at once and **merges** `theme`/`data` onto any ancestor provider's values
14
- * (nested `ThemeProvider`s accumulate; nearest wins per key), while `seed`
15
- * overrides the inherited seed.
16
- *
17
- * Layout-transparent like {@link Provider} — it carries context, not appearance.
18
- */
19
- export class ThemeProvider extends Node2D {
20
- constructor(props) {
21
- super(props);
22
- }
23
- provideContext(parent) {
24
- let next = parent;
25
- if (this.theme)
26
- next = next.with(ThemeToken, { ...parent.get(ThemeToken), ...this.theme });
27
- if (this.data)
28
- next = next.with(DataToken, { ...parent.get(DataToken), ...this.data });
29
- if (this.seed !== undefined)
30
- next = next.with(SeedToken, this.seed);
31
- return next;
32
- }
33
- }
34
- __decorate([
35
- property({ default: undefined })
36
- ], ThemeProvider.prototype, "theme", void 0);
37
- __decorate([
38
- property({ default: undefined })
39
- ], ThemeProvider.prototype, "data", void 0);
40
- __decorate([
41
- property({ default: undefined })
42
- ], ThemeProvider.prototype, "seed", void 0);
43
- //# sourceMappingURL=theme-provider-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-provider-node.js","sourceRoot":"","sources":["../../../src/nodes/root/theme-provider-node.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAa7E;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,MAA0B;IAKzD,YAAY,KAAoD;QAC5D,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAEkB,cAAc,CAAC,MAAkB;QAChD,IAAI,IAAI,GAAG,MAAM,CAAC;QAClB,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3F,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACvF,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAfsD;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;4CAAkD;AAChC;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;2CAAiD;AAC/B;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;2CAAyC","sourcesContent":["import { Node2D, NodeConfig, Node2DProps } from \"@/nodes/2d/node2d\";\r\nimport { property } from \"@/attributes/properties/decorator\";\r\nimport { ContextMap } from \"@/util/context\";\r\nimport { ThemeToken, DataToken, SeedToken } from \"@/runtime/builtin-context\";\r\n\r\nexport interface ThemeProviderProps extends Node2DProps {\r\n /** Named values (e.g. colors) merged onto any ancestor theme, read via\r\n * `node.useContext(ThemeToken)`. */\r\n theme: Record<string, unknown>;\r\n /** Arbitrary data merged onto any ancestor data bag, read via\r\n * `node.useContext(DataToken)`. */\r\n data: Record<string, unknown>;\r\n /** A default seed passed down the tree, read via `node.useContext(SeedToken)`. */\r\n seed: string | number;\r\n}\r\n\r\n/**\r\n * Provides theme / data / seed to its descendants. A convenience wrapper over\r\n * the same context machinery as {@link Provider}: it sets three built-in tokens\r\n * at once and **merges** `theme`/`data` onto any ancestor provider's values\r\n * (nested `ThemeProvider`s accumulate; nearest wins per key), while `seed`\r\n * overrides the inherited seed.\r\n *\r\n * Layout-transparent like {@link Provider} — it carries context, not appearance.\r\n */\r\nexport class ThemeProvider extends Node2D<ThemeProviderProps> {\r\n @property({ default: undefined }) declare readonly theme?: Record<string, unknown>;\r\n @property({ default: undefined }) declare readonly data?: Record<string, unknown>;\r\n @property({ default: undefined }) declare readonly seed?: string | number;\r\n\r\n constructor(props: NodeConfig<ThemeProvider, ThemeProviderProps>) {\r\n super(props);\r\n }\r\n\r\n protected override provideContext(parent: ContextMap): ContextMap {\r\n let next = parent;\r\n if (this.theme) next = next.with(ThemeToken, { ...parent.get(ThemeToken), ...this.theme });\r\n if (this.data) next = next.with(DataToken, { ...parent.get(DataToken), ...this.data });\r\n if (this.seed !== undefined) next = next.with(SeedToken, this.seed);\r\n return next;\r\n }\r\n}\r\n"]}
@@ -1,103 +0,0 @@
1
- import { Node2D, NodeConfig, Node2DProps } from "../../nodes/2d/node2d.js";
2
- import { ContextMap } from "../../util/context.js";
3
- import type { FontStyle, TextAlign } from "../../attributes/text/types.js";
4
- import { Fill } from "../../attributes/shape/fill/chain.js";
5
- import { type Stroke } from "../../attributes/shape/stroke/stroke.js";
6
- import { type Shadow } from "../../attributes/shape/shadow/shadow.js";
7
- import { type RenderPass2D } from "../../render/render-context2d.js";
8
- export interface DefaultTextStyleProps extends Node2DProps {
9
- fontFamily: string;
10
- fontSize: number | 'autofit';
11
- fontWeight: number;
12
- fontStyle: FontStyle;
13
- letterSpacing: number;
14
- lineHeight: number;
15
- textAlign: TextAlign;
16
- fill: Fill;
17
- stroke: Stroke;
18
- shadow: Shadow;
19
- }
20
- /**
21
- * Sets default text styling for everything drawn below it — the {@link Text} /
22
- * {@link RichText} nodes *and* the raw `Graphics2D` `text`/`richText` ops a custom
23
- * node draws. A descendant inherits each style prop it didn't set itself, from
24
- * the nearest ancestor `DefaultTextStyle` that did — author-set props always win
25
- * over inherited ones. Nesting accumulates per key (an inner `fontSize` and an
26
- * outer `fontFamily` both apply).
27
- *
28
- * Two channels carry that, because a node and a drawing have nothing else in
29
- * common:
30
- *
31
- * - **Nodes**, through context. Built on the same machinery as {@link Provider}:
32
- * it contributes the built-in {@link TextStyleToken}, merging only the keys the
33
- * author explicitly passed onto any ancestor's defaults. It contributes the
34
- * author's *raw* prop values (not resolved cell values), so each consumer
35
- * resolves them once through its own mapper — e.g. `fill='red'` is resolved by
36
- * `Text`'s fill mapper, not pre-resolved here. {@link applyTextDefaults} is the
37
- * consuming end.
38
- * - **Graphics2D**, through the render context ({@link RenderContext2D.pushTextStyle}),
39
- * pushed around this node's children for the duration of their draw and folded
40
- * into each under-specified text op. A `Graphics2D` isn't in the tree and has no
41
- * bind step, so the draw scope is the only place it can inherit from.
42
- *
43
- * Only the *shaping* keys reach a drawn op — `fill`/`stroke`/`shadow` are
44
- * group-scoped paint ops in a `Graphics2D`, not per-shape slots, so defaulting
45
- * them would change which shapes a group's paint covers. See
46
- * {@link TEXT_SHAPING_KEYS}.
47
- *
48
- * A node that owns its typography opts out of the second channel with
49
- * `ctx.pushTextStyle(null)`; `@motionscript/code`'s `Code` does exactly that.
50
- *
51
- * Layout-transparent like {@link Provider} — carries style, not appearance.
52
- */
53
- export declare class DefaultTextStyle extends Node2D<DefaultTextStyleProps> {
54
- readonly fontFamily?: string;
55
- readonly fontSize?: number | 'autofit';
56
- readonly fontWeight?: number;
57
- readonly fontStyle?: FontStyle;
58
- readonly letterSpacing?: number;
59
- readonly lineHeight?: number;
60
- readonly textAlign?: TextAlign;
61
- readonly fill?: Fill;
62
- readonly stroke?: Stroke;
63
- readonly shadow?: Shadow;
64
- constructor(props: NodeConfig<DefaultTextStyle, DefaultTextStyleProps>);
65
- protected provideContext(parent: ContextMap): ContextMap;
66
- /**
67
- * Open the render-context text-style scope around this node's children, so
68
- * the `Graphics2D` they draw inherit the same defaults their `Text` nodes do.
69
- *
70
- * `super.renderContent` is what renders those children, so the scope has to
71
- * wrap it — and be closed in a `finally`, since the stack outlives this node
72
- * and a leaked frame would restyle every sibling drawn after it.
73
- */
74
- protected renderContent(ctx: RenderPass2D): void;
75
- /**
76
- * The keys this node currently sets, at their resolved values.
77
- *
78
- * Read off the properties rather than out of `_props` (which
79
- * {@link provideContext} uses): a prop can be a callback or mid-tween, and a
80
- * drawn op needs this frame's *value*. An unset prop defaults to `undefined`,
81
- * which is the same "didn't set it" signal the context channel reads.
82
- */
83
- private currentStyle;
84
- }
85
- /**
86
- * Apply text-style defaults to a `Text`/`RichText` node, for each style key the
87
- * author didn't pass — the node end of {@link DefaultTextStyle}'s context
88
- * channel, run once from the node's `resolveContext`.
89
- *
90
- * Precedence per key, highest to lowest: the author's own prop; the node's
91
- * `variant` preset; the nearest enclosing `<DefaultTextStyle>`; the theme's
92
- * `default` preset; and last the node's `@property` default, which its
93
- * constructor already applied. Each value is written through the property
94
- * setter, so a preset's `fill: 'brand-500'` is resolved exactly as if the author
95
- * had written it. A node with no `'autofit'` size (`modes.autofit` false)
96
- * skips an inherited `'autofit'`, keeping its own size.
97
- *
98
- * @internal
99
- */
100
- export declare function applyTextDefaults(node: Node2D, props?: Record<string, unknown>, modes?: {
101
- autofit: boolean;
102
- }): void;
103
- //# sourceMappingURL=default-text-style-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-text-style-node.d.ts","sourceRoot":"","sources":["../../../src/nodes/text/default-text-style-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,MAAM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