@motionscript/core 0.1.0-alpha.8 → 0.1.0-alpha.9

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 (791) hide show
  1. package/CHANGELOG.md +6 -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.js.map +1 -1
  105. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  106. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  107. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  108. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  109. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  110. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  111. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  112. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  113. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  114. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  115. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  116. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  117. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  118. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  119. package/dist/attributes/shape/fill/index.js.map +1 -1
  120. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  121. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  122. package/dist/attributes/shape/fill/registry.js.map +1 -1
  123. package/dist/attributes/shape/fill/union.js.map +1 -1
  124. package/dist/attributes/shape/filters/chain.js.map +1 -1
  125. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  126. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  127. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  128. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  129. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  130. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  131. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  132. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  133. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  134. package/dist/attributes/shape/filters/index.js.map +1 -1
  135. package/dist/attributes/shape/filters/registry.js.map +1 -1
  136. package/dist/attributes/shape/filters/union.js.map +1 -1
  137. package/dist/attributes/shape/path/anchors.js.map +1 -1
  138. package/dist/attributes/shape/path/bezier.js.map +1 -1
  139. package/dist/attributes/shape/path/index.js.map +1 -1
  140. package/dist/attributes/shape/path/measure.js.map +1 -1
  141. package/dist/attributes/shape/path/morph.js.map +1 -1
  142. package/dist/attributes/shape/path/ops.js.map +1 -1
  143. package/dist/attributes/shape/path/types.js.map +1 -1
  144. package/dist/attributes/shape/path/walk.js.map +1 -1
  145. package/dist/attributes/shape/shaders/index.js.map +1 -1
  146. package/dist/attributes/shape/shaders/language.js.map +1 -1
  147. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  148. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  149. package/dist/attributes/shape/shadow/index.js.map +1 -1
  150. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  151. package/dist/attributes/shape/stroke/index.js.map +1 -1
  152. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  153. package/dist/attributes/shared/operators.js.map +1 -1
  154. package/dist/attributes/text/index.js.map +1 -1
  155. package/dist/attributes/text/ops.js.map +1 -1
  156. package/dist/attributes/text/types.js.map +1 -1
  157. package/dist/browser/chunks/{chunk-LKUYVFU3.js → chunk-4BDLFEOC.js} +1 -1
  158. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +7 -0
  159. package/dist/browser/chunks/{chunk-GKM6UZJR.js → chunk-7DB6BI27.js} +2 -2
  160. package/dist/browser/chunks/chunk-7DB6BI27.js.map +7 -0
  161. package/dist/browser/chunks/{chunk-AOT33LMS.js → chunk-IX53IFBD.js} +2 -2
  162. package/dist/browser/chunks/chunk-IX53IFBD.js.map +7 -0
  163. package/dist/browser/chunks/{chunk-ZRPZPWZU.js → chunk-Q55UPA3E.js} +1 -1
  164. package/dist/browser/chunks/chunk-Q55UPA3E.js.map +7 -0
  165. package/dist/browser/component.js +1 -1
  166. package/dist/browser/experimental.js +1 -1
  167. package/dist/browser/experimental.js.map +1 -1
  168. package/dist/browser/index.js +1 -1
  169. package/dist/browser/index.js.map +1 -1
  170. package/dist/browser/sdk.js +1 -1
  171. package/dist/component.js.map +1 -1
  172. package/dist/components/builtins/audio/audio.js.map +1 -1
  173. package/dist/components/builtins/geometry/composite.js.map +1 -1
  174. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  175. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  176. package/dist/components/builtins/layout/layout.js.map +1 -1
  177. package/dist/components/builtins/media/media.js.map +1 -1
  178. package/dist/components/builtins/providers/providers.js.map +1 -1
  179. package/dist/components/builtins/text/number-format.js.map +1 -1
  180. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  181. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  182. package/dist/components/builtins/text/text-layout.js.map +1 -1
  183. package/dist/components/builtins/text/text.d.ts +9 -9
  184. package/dist/components/builtins/text/text.js.map +1 -1
  185. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  186. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  187. package/dist/components/builtins/three/three.js.map +1 -1
  188. package/dist/components/factory/api.js.map +1 -1
  189. package/dist/components/factory/clip-of.js.map +1 -1
  190. package/dist/components/factory/commands-for.js.map +1 -1
  191. package/dist/components/factory/component-audio.js.map +1 -1
  192. package/dist/components/factory/component2d.js.map +1 -1
  193. package/dist/components/factory/component3d.js.map +1 -1
  194. package/dist/components/factory/factory.js.map +1 -1
  195. package/dist/components/factory/timeline.js.map +1 -1
  196. package/dist/components/factory/type-def.js.map +1 -1
  197. package/dist/components/factory/types.js.map +1 -1
  198. package/dist/components/factory/views.js.map +1 -1
  199. package/dist/components/modules/aim.js.map +1 -1
  200. package/dist/components/modules/corners.js.map +1 -1
  201. package/dist/components/modules/flow.js.map +1 -1
  202. package/dist/components/modules/material.js.map +1 -1
  203. package/dist/components/modules/paint.js.map +1 -1
  204. package/dist/components/modules/shapes.js.map +1 -1
  205. package/dist/components/modules/text-layout.js.map +1 -1
  206. package/dist/components/modules/text-style.d.ts +1 -1
  207. package/dist/components/modules/text-style.js.map +1 -1
  208. package/dist/components/modules/three-entries.js.map +1 -1
  209. package/dist/components/modules/view3d.js.map +1 -1
  210. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  211. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  212. package/dist/components/trees/2d/node-motion.js.map +1 -1
  213. package/dist/components/trees/2d/node-render.js.map +1 -1
  214. package/dist/components/trees/2d/node-space.js.map +1 -1
  215. package/dist/components/trees/2d/node-transform.js.map +1 -1
  216. package/dist/components/trees/2d/node2d.js.map +1 -1
  217. package/dist/components/trees/audio/index.js.map +1 -1
  218. package/dist/components/trees/audio/node-audio.js.map +1 -1
  219. package/dist/components/trees/index.js.map +1 -1
  220. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  221. package/dist/components/trees/node/node-reactive.js.map +1 -1
  222. package/dist/components/trees/node/node-time.js.map +1 -1
  223. package/dist/components/trees/node/node-walk.js.map +1 -1
  224. package/dist/components/trees/node/node.js.map +1 -1
  225. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  226. package/dist/components/trees/three/node3d.js.map +1 -1
  227. package/dist/document/audio.js.map +1 -1
  228. package/dist/document/builtins.js.map +1 -1
  229. package/dist/document/command-traits.js.map +1 -1
  230. package/dist/document/deny-globals.js.map +1 -1
  231. package/dist/document/diff.js.map +1 -1
  232. package/dist/document/doc-index.js.map +1 -1
  233. package/dist/document/expression/compile.js.map +1 -1
  234. package/dist/document/expression/index.js.map +1 -1
  235. package/dist/document/expression/ops.js.map +1 -1
  236. package/dist/document/expression/parse.js.map +1 -1
  237. package/dist/document/expression/refs.js.map +1 -1
  238. package/dist/document/expression/types.js.map +1 -1
  239. package/dist/document/expression/walk.js.map +1 -1
  240. package/dist/document/index.js.map +1 -1
  241. package/dist/document/migrate.js.map +1 -1
  242. package/dist/document/missing-node.js.map +1 -1
  243. package/dist/document/node-decorator.js.map +1 -1
  244. package/dist/document/node-descriptor.js.map +1 -1
  245. package/dist/document/placement.js.map +1 -1
  246. package/dist/document/project.js.map +1 -1
  247. package/dist/document/prop-evolution.js.map +1 -1
  248. package/dist/document/registry.js.map +1 -1
  249. package/dist/document/settled-index.js.map +1 -1
  250. package/dist/document/timeline-patch.js.map +1 -1
  251. package/dist/document/timeline.js.map +1 -1
  252. package/dist/document/types.js.map +1 -1
  253. package/dist/document/validate.js.map +1 -1
  254. package/dist/document/vocabulary.js.map +1 -1
  255. package/dist/experimental.d.ts.map +1 -1
  256. package/dist/experimental.js.map +1 -1
  257. package/dist/index.js.map +1 -1
  258. package/dist/layout/bounds.js.map +1 -1
  259. package/dist/layout/constraints.js.map +1 -1
  260. package/dist/layout/flex.js.map +1 -1
  261. package/dist/layout/freeform.js.map +1 -1
  262. package/dist/layout/grid.js.map +1 -1
  263. package/dist/layout/index.js.map +1 -1
  264. package/dist/layout/item.js.map +1 -1
  265. package/dist/layout/ops.js.map +1 -1
  266. package/dist/layout/types.js.map +1 -1
  267. package/dist/platform/audio-sink.js.map +1 -1
  268. package/dist/platform/exporter.js.map +1 -1
  269. package/dist/platform/index.js.map +1 -1
  270. package/dist/platform/stepped-clock.js.map +1 -1
  271. package/dist/platform/storage-adapter.js.map +1 -1
  272. package/dist/platform/ticker.js.map +1 -1
  273. package/dist/project/config.js.map +1 -1
  274. package/dist/project/index.js.map +1 -1
  275. package/dist/project/tree.js.map +1 -1
  276. package/dist/props/host.js.map +1 -1
  277. package/dist/props/index.js.map +1 -1
  278. package/dist/props/observer.js.map +1 -1
  279. package/dist/props/slot.js.map +1 -1
  280. package/dist/renamed-scene-names.js.map +1 -1
  281. package/dist/render/canvas-render-context2d.js.map +1 -1
  282. package/dist/render/clip-contains.js.map +1 -1
  283. package/dist/render/clip.js.map +1 -1
  284. package/dist/render/descriptors/ellipse.js.map +1 -1
  285. package/dist/render/descriptors/line.js.map +1 -1
  286. package/dist/render/descriptors/path-builder.js.map +1 -1
  287. package/dist/render/descriptors/path.js.map +1 -1
  288. package/dist/render/descriptors/polygon.js.map +1 -1
  289. package/dist/render/descriptors/polygram.js.map +1 -1
  290. package/dist/render/descriptors/rect.js.map +1 -1
  291. package/dist/render/descriptors/richtext.js.map +1 -1
  292. package/dist/render/descriptors/shape.js.map +1 -1
  293. package/dist/render/descriptors/text.js.map +1 -1
  294. package/dist/render/descriptors/transform.js.map +1 -1
  295. package/dist/render/graphics2d.js.map +1 -1
  296. package/dist/render/index.js.map +1 -1
  297. package/dist/render/measure-context.js.map +1 -1
  298. package/dist/render/null-render-context.js.map +1 -1
  299. package/dist/render/render-context2d.js.map +1 -1
  300. package/dist/render/render-issue.js.map +1 -1
  301. package/dist/render/surface.js.map +1 -1
  302. package/dist/render/text-defaults.js.map +1 -1
  303. package/dist/render/text-layout.js.map +1 -1
  304. package/dist/render3d/bounds3d.js.map +1 -1
  305. package/dist/render3d/builders.js.map +1 -1
  306. package/dist/render3d/camera.js.map +1 -1
  307. package/dist/render3d/fill3d.js.map +1 -1
  308. package/dist/render3d/geometry.js.map +1 -1
  309. package/dist/render3d/graphics3d.js.map +1 -1
  310. package/dist/render3d/index.js.map +1 -1
  311. package/dist/render3d/inert.js.map +1 -1
  312. package/dist/render3d/light.js.map +1 -1
  313. package/dist/render3d/material.js.map +1 -1
  314. package/dist/render3d/matrix4.js.map +1 -1
  315. package/dist/render3d/render-context3d.js.map +1 -1
  316. package/dist/render3d/resources.js.map +1 -1
  317. package/dist/render3d/rounded-box.js.map +1 -1
  318. package/dist/render3d/scene-settings.js.map +1 -1
  319. package/dist/render3d/scene3d.js.map +1 -1
  320. package/dist/render3d/segments.js.map +1 -1
  321. package/dist/render3d/texture.js.map +1 -1
  322. package/dist/render3d/tracking.js.map +1 -1
  323. package/dist/render3d/transform.js.map +1 -1
  324. package/dist/render3d/vector3.js.map +1 -1
  325. package/dist/render3d/walk.js.map +1 -1
  326. package/dist/runtime/asset-refine.js.map +1 -1
  327. package/dist/runtime/asset-timeline.js.map +1 -1
  328. package/dist/runtime/asset-update.js.map +1 -1
  329. package/dist/runtime/audio-index.js.map +1 -1
  330. package/dist/runtime/builtin-context.js.map +1 -1
  331. package/dist/runtime/clip-instance.js.map +1 -1
  332. package/dist/runtime/clip-store.js.map +1 -1
  333. package/dist/runtime/engine.js.map +1 -1
  334. package/dist/runtime/frame-time.js.map +1 -1
  335. package/dist/runtime/index.js.map +1 -1
  336. package/dist/runtime/node-picking.js.map +1 -1
  337. package/dist/runtime/node-picking3d.js.map +1 -1
  338. package/dist/runtime/placement.js.map +1 -1
  339. package/dist/runtime/playback-controller.js.map +1 -1
  340. package/dist/runtime/playback.js.map +1 -1
  341. package/dist/runtime/precompisition.js.map +1 -1
  342. package/dist/runtime/project-assets.js.map +1 -1
  343. package/dist/runtime/session.js.map +1 -1
  344. package/dist/runtime/settle.js.map +1 -1
  345. package/dist/runtime/state-evaluator.js.map +1 -1
  346. package/dist/runtime/text-geometry.js.map +1 -1
  347. package/dist/sdk/index.js.map +1 -1
  348. package/dist/tween/command-decorator.js.map +1 -1
  349. package/dist/tween/command.js.map +1 -1
  350. package/dist/tween/ease/constants.js.map +1 -1
  351. package/dist/tween/ease/curve.js.map +1 -1
  352. package/dist/tween/ease/describe.js.map +1 -1
  353. package/dist/tween/ease/spec.js.map +1 -1
  354. package/dist/tween/ease/type.js.map +1 -1
  355. package/dist/tween/index.js.map +1 -1
  356. package/dist/tween/inert.js.map +1 -1
  357. package/dist/tween/lerp.js.map +1 -1
  358. package/dist/tween/loop.js.map +1 -1
  359. package/dist/tween/prepare.js.map +1 -1
  360. package/dist/tween/stepper.js.map +1 -1
  361. package/dist/tween/to-command.js.map +1 -1
  362. package/dist/util/clamp.js.map +1 -1
  363. package/dist/util/context.js.map +1 -1
  364. package/dist/util/csv.js.map +1 -1
  365. package/dist/util/generateList.js.map +1 -1
  366. package/dist/util/index.js.map +1 -1
  367. package/dist/util/metrics.js.map +1 -1
  368. package/dist/util/random.js.map +1 -1
  369. package/dist/util/reference.js.map +1 -1
  370. package/dist/util/scheduler.js.map +1 -1
  371. package/package.json +1 -1
  372. package/dist/attributes/audio/filters/chain.d.ts +0 -113
  373. package/dist/attributes/audio/filters/chain.d.ts.map +0 -1
  374. package/dist/attributes/audio/filters/chain.js +0 -104
  375. package/dist/attributes/audio/filters/chain.js.map +0 -1
  376. package/dist/attributes/audio/filters/curve.d.ts +0 -152
  377. package/dist/attributes/audio/filters/curve.d.ts.map +0 -1
  378. package/dist/attributes/audio/filters/curve.js +0 -250
  379. package/dist/attributes/audio/filters/curve.js.map +0 -1
  380. package/dist/attributes/audio/filters/implementations/echo.d.ts +0 -14
  381. package/dist/attributes/audio/filters/implementations/echo.d.ts.map +0 -1
  382. package/dist/attributes/audio/filters/implementations/echo.js +0 -11
  383. package/dist/attributes/audio/filters/implementations/echo.js.map +0 -1
  384. package/dist/attributes/audio/filters/implementations/gain.d.ts +0 -10
  385. package/dist/attributes/audio/filters/implementations/gain.d.ts.map +0 -1
  386. package/dist/attributes/audio/filters/implementations/gain.js +0 -6
  387. package/dist/attributes/audio/filters/implementations/gain.js.map +0 -1
  388. package/dist/attributes/audio/filters/implementations/highpass.d.ts +0 -12
  389. package/dist/attributes/audio/filters/implementations/highpass.d.ts.map +0 -1
  390. package/dist/attributes/audio/filters/implementations/highpass.js +0 -10
  391. package/dist/attributes/audio/filters/implementations/highpass.js.map +0 -1
  392. package/dist/attributes/audio/filters/implementations/lowpass.d.ts +0 -12
  393. package/dist/attributes/audio/filters/implementations/lowpass.d.ts.map +0 -1
  394. package/dist/attributes/audio/filters/implementations/lowpass.js +0 -10
  395. package/dist/attributes/audio/filters/implementations/lowpass.js.map +0 -1
  396. package/dist/attributes/audio/filters/implementations/speed.d.ts +0 -18
  397. package/dist/attributes/audio/filters/implementations/speed.d.ts.map +0 -1
  398. package/dist/attributes/audio/filters/implementations/speed.js +0 -6
  399. package/dist/attributes/audio/filters/implementations/speed.js.map +0 -1
  400. package/dist/attributes/audio/filters/implementations/tremolo.d.ts +0 -12
  401. package/dist/attributes/audio/filters/implementations/tremolo.d.ts.map +0 -1
  402. package/dist/attributes/audio/filters/implementations/tremolo.js +0 -10
  403. package/dist/attributes/audio/filters/implementations/tremolo.js.map +0 -1
  404. package/dist/attributes/audio/filters/index.d.ts +0 -22
  405. package/dist/attributes/audio/filters/index.d.ts.map +0 -1
  406. package/dist/attributes/audio/filters/index.js +0 -8
  407. package/dist/attributes/audio/filters/index.js.map +0 -1
  408. package/dist/attributes/audio/filters/registry.d.ts +0 -36
  409. package/dist/attributes/audio/filters/registry.d.ts.map +0 -1
  410. package/dist/attributes/audio/filters/registry.js +0 -82
  411. package/dist/attributes/audio/filters/registry.js.map +0 -1
  412. package/dist/attributes/audio/filters/union.d.ts +0 -18
  413. package/dist/attributes/audio/filters/union.d.ts.map +0 -1
  414. package/dist/attributes/audio/filters/union.js +0 -28
  415. package/dist/attributes/audio/filters/union.js.map +0 -1
  416. package/dist/attributes/shape/sksl-uniforms.d.ts +0 -146
  417. package/dist/attributes/shape/sksl-uniforms.d.ts.map +0 -1
  418. package/dist/attributes/shape/sksl-uniforms.js +0 -0
  419. package/dist/attributes/shape/sksl-uniforms.js.map +0 -1
  420. package/dist/browser/chunks/chunk-AOT33LMS.js.map +0 -7
  421. package/dist/browser/chunks/chunk-GKM6UZJR.js.map +0 -7
  422. package/dist/browser/chunks/chunk-LKUYVFU3.js.map +0 -7
  423. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +0 -7
  424. package/dist/component/api.d.ts +0 -508
  425. package/dist/component/api.d.ts.map +0 -1
  426. package/dist/component/api.js +0 -4
  427. package/dist/component/api.js.map +0 -1
  428. package/dist/component/builtins/audio.d.ts +0 -26
  429. package/dist/component/builtins/audio.d.ts.map +0 -1
  430. package/dist/component/builtins/audio.js +0 -41
  431. package/dist/component/builtins/audio.js.map +0 -1
  432. package/dist/component/builtins/canvas3d.d.ts +0 -98
  433. package/dist/component/builtins/canvas3d.d.ts.map +0 -1
  434. package/dist/component/builtins/canvas3d.js +0 -21
  435. package/dist/component/builtins/canvas3d.js.map +0 -1
  436. package/dist/component/builtins/composite.d.ts +0 -56
  437. package/dist/component/builtins/composite.d.ts.map +0 -1
  438. package/dist/component/builtins/composite.js +0 -25
  439. package/dist/component/builtins/composite.js.map +0 -1
  440. package/dist/component/builtins/geometry.d.ts +0 -505
  441. package/dist/component/builtins/geometry.d.ts.map +0 -1
  442. package/dist/component/builtins/geometry.js +0 -107
  443. package/dist/component/builtins/geometry.js.map +0 -1
  444. package/dist/component/builtins/layout.d.ts +0 -88
  445. package/dist/component/builtins/layout.d.ts.map +0 -1
  446. package/dist/component/builtins/layout.js +0 -84
  447. package/dist/component/builtins/layout.js.map +0 -1
  448. package/dist/component/builtins/media.d.ts +0 -95
  449. package/dist/component/builtins/media.d.ts.map +0 -1
  450. package/dist/component/builtins/media.js +0 -149
  451. package/dist/component/builtins/media.js.map +0 -1
  452. package/dist/component/builtins/providers.d.ts +0 -23
  453. package/dist/component/builtins/providers.d.ts.map +0 -1
  454. package/dist/component/builtins/providers.js +0 -30
  455. package/dist/component/builtins/providers.js.map +0 -1
  456. package/dist/component/builtins/text.d.ts +0 -193
  457. package/dist/component/builtins/text.d.ts.map +0 -1
  458. package/dist/component/builtins/text.js +0 -113
  459. package/dist/component/builtins/text.js.map +0 -1
  460. package/dist/component/builtins/three.d.ts +0 -1085
  461. package/dist/component/builtins/three.d.ts.map +0 -1
  462. package/dist/component/builtins/three.js +0 -265
  463. package/dist/component/builtins/three.js.map +0 -1
  464. package/dist/component/clip-of.d.ts +0 -5
  465. package/dist/component/clip-of.d.ts.map +0 -1
  466. package/dist/component/clip-of.js +0 -33
  467. package/dist/component/clip-of.js.map +0 -1
  468. package/dist/component/commands-for.d.ts +0 -19
  469. package/dist/component/commands-for.d.ts.map +0 -1
  470. package/dist/component/commands-for.js +0 -5
  471. package/dist/component/commands-for.js.map +0 -1
  472. package/dist/component/component-audio.d.ts +0 -9
  473. package/dist/component/component-audio.d.ts.map +0 -1
  474. package/dist/component/component-audio.js +0 -18
  475. package/dist/component/component-audio.js.map +0 -1
  476. package/dist/component/component2d.d.ts +0 -9
  477. package/dist/component/component2d.d.ts.map +0 -1
  478. package/dist/component/component2d.js +0 -239
  479. package/dist/component/component2d.js.map +0 -1
  480. package/dist/component/component3d.d.ts +0 -9
  481. package/dist/component/component3d.d.ts.map +0 -1
  482. package/dist/component/component3d.js +0 -99
  483. package/dist/component/component3d.js.map +0 -1
  484. package/dist/component/factory.d.ts +0 -63
  485. package/dist/component/factory.d.ts.map +0 -1
  486. package/dist/component/factory.js +0 -313
  487. package/dist/component/factory.js.map +0 -1
  488. package/dist/component/modules/aim.d.ts +0 -30
  489. package/dist/component/modules/aim.d.ts.map +0 -1
  490. package/dist/component/modules/aim.js +0 -39
  491. package/dist/component/modules/aim.js.map +0 -1
  492. package/dist/component/modules/corners.d.ts +0 -13
  493. package/dist/component/modules/corners.d.ts.map +0 -1
  494. package/dist/component/modules/corners.js +0 -12
  495. package/dist/component/modules/corners.js.map +0 -1
  496. package/dist/component/modules/flow.d.ts +0 -26
  497. package/dist/component/modules/flow.d.ts.map +0 -1
  498. package/dist/component/modules/flow.js +0 -55
  499. package/dist/component/modules/flow.js.map +0 -1
  500. package/dist/component/modules/material.d.ts +0 -40
  501. package/dist/component/modules/material.d.ts.map +0 -1
  502. package/dist/component/modules/material.js +0 -75
  503. package/dist/component/modules/material.js.map +0 -1
  504. package/dist/component/modules/paint.d.ts +0 -71
  505. package/dist/component/modules/paint.d.ts.map +0 -1
  506. package/dist/component/modules/paint.js +0 -106
  507. package/dist/component/modules/paint.js.map +0 -1
  508. package/dist/component/modules/shapes.d.ts +0 -31
  509. package/dist/component/modules/shapes.d.ts.map +0 -1
  510. package/dist/component/modules/shapes.js +0 -43
  511. package/dist/component/modules/shapes.js.map +0 -1
  512. package/dist/component/modules/text-layout.d.ts +0 -26
  513. package/dist/component/modules/text-layout.d.ts.map +0 -1
  514. package/dist/component/modules/text-layout.js +0 -57
  515. package/dist/component/modules/text-layout.js.map +0 -1
  516. package/dist/component/modules/text-style.d.ts +0 -48
  517. package/dist/component/modules/text-style.d.ts.map +0 -1
  518. package/dist/component/modules/text-style.js +0 -63
  519. package/dist/component/modules/text-style.js.map +0 -1
  520. package/dist/component/modules/three-entries.d.ts +0 -23
  521. package/dist/component/modules/three-entries.d.ts.map +0 -1
  522. package/dist/component/modules/three-entries.js +0 -41
  523. package/dist/component/modules/three-entries.js.map +0 -1
  524. package/dist/component/modules/view3d.d.ts +0 -55
  525. package/dist/component/modules/view3d.d.ts.map +0 -1
  526. package/dist/component/modules/view3d.js +0 -160
  527. package/dist/component/modules/view3d.js.map +0 -1
  528. package/dist/component/timeline.d.ts +0 -22
  529. package/dist/component/timeline.d.ts.map +0 -1
  530. package/dist/component/timeline.js +0 -128
  531. package/dist/component/timeline.js.map +0 -1
  532. package/dist/component/type-def.d.ts +0 -26
  533. package/dist/component/type-def.d.ts.map +0 -1
  534. package/dist/component/type-def.js +0 -16
  535. package/dist/component/type-def.js.map +0 -1
  536. package/dist/component/types.d.ts +0 -91
  537. package/dist/component/types.d.ts.map +0 -1
  538. package/dist/component/types.js +0 -88
  539. package/dist/component/types.js.map +0 -1
  540. package/dist/component/views.d.ts +0 -121
  541. package/dist/component/views.d.ts.map +0 -1
  542. package/dist/component/views.js +0 -413
  543. package/dist/component/views.js.map +0 -1
  544. package/dist/document/withdraw.d.ts +0 -28
  545. package/dist/document/withdraw.d.ts.map +0 -1
  546. package/dist/document/withdraw.js +0 -61
  547. package/dist/document/withdraw.js.map +0 -1
  548. package/dist/jsx/jsx-dev-runtime.d.ts +0 -3
  549. package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
  550. package/dist/jsx/jsx-dev-runtime.js +0 -3
  551. package/dist/jsx/jsx-dev-runtime.js.map +0 -1
  552. package/dist/jsx/jsx-runtime.d.ts +0 -27
  553. package/dist/jsx/jsx-runtime.d.ts.map +0 -1
  554. package/dist/jsx/jsx-runtime.js +0 -26
  555. package/dist/jsx/jsx-runtime.js.map +0 -1
  556. package/dist/nodes/2d/node-lifecycle.d.ts +0 -46
  557. package/dist/nodes/2d/node-lifecycle.d.ts.map +0 -1
  558. package/dist/nodes/2d/node-lifecycle.js +0 -264
  559. package/dist/nodes/2d/node-lifecycle.js.map +0 -1
  560. package/dist/nodes/2d/node-motion.d.ts +0 -56
  561. package/dist/nodes/2d/node-motion.d.ts.map +0 -1
  562. package/dist/nodes/2d/node-motion.js +0 -86
  563. package/dist/nodes/2d/node-motion.js.map +0 -1
  564. package/dist/nodes/2d/node-render.d.ts +0 -44
  565. package/dist/nodes/2d/node-render.d.ts.map +0 -1
  566. package/dist/nodes/2d/node-render.js +0 -80
  567. package/dist/nodes/2d/node-render.js.map +0 -1
  568. package/dist/nodes/2d/node-space.d.ts +0 -63
  569. package/dist/nodes/2d/node-space.d.ts.map +0 -1
  570. package/dist/nodes/2d/node-space.js +0 -131
  571. package/dist/nodes/2d/node-space.js.map +0 -1
  572. package/dist/nodes/2d/node-transform.d.ts +0 -55
  573. package/dist/nodes/2d/node-transform.d.ts.map +0 -1
  574. package/dist/nodes/2d/node-transform.js +0 -73
  575. package/dist/nodes/2d/node-transform.js.map +0 -1
  576. package/dist/nodes/2d/node2d.d.ts +0 -1111
  577. package/dist/nodes/2d/node2d.d.ts.map +0 -1
  578. package/dist/nodes/2d/node2d.js +0 -1665
  579. package/dist/nodes/2d/node2d.js.map +0 -1
  580. package/dist/nodes/2d/paint-node.d.ts +0 -142
  581. package/dist/nodes/2d/paint-node.d.ts.map +0 -1
  582. package/dist/nodes/2d/paint-node.js +0 -232
  583. package/dist/nodes/2d/paint-node.js.map +0 -1
  584. package/dist/nodes/audio/audio-bus.d.ts +0 -28
  585. package/dist/nodes/audio/audio-bus.d.ts.map +0 -1
  586. package/dist/nodes/audio/audio-bus.js +0 -33
  587. package/dist/nodes/audio/audio-bus.js.map +0 -1
  588. package/dist/nodes/audio/index.d.ts +0 -4
  589. package/dist/nodes/audio/index.d.ts.map +0 -1
  590. package/dist/nodes/audio/index.js +0 -2
  591. package/dist/nodes/audio/index.js.map +0 -1
  592. package/dist/nodes/audio/node-audio.d.ts +0 -107
  593. package/dist/nodes/audio/node-audio.d.ts.map +0 -1
  594. package/dist/nodes/audio/node-audio.js +0 -179
  595. package/dist/nodes/audio/node-audio.js.map +0 -1
  596. package/dist/nodes/audio/sound-node.d.ts +0 -41
  597. package/dist/nodes/audio/sound-node.d.ts.map +0 -1
  598. package/dist/nodes/audio/sound-node.js +0 -71
  599. package/dist/nodes/audio/sound-node.js.map +0 -1
  600. package/dist/nodes/geometry/boolean-node.d.ts +0 -28
  601. package/dist/nodes/geometry/boolean-node.d.ts.map +0 -1
  602. package/dist/nodes/geometry/boolean-node.js +0 -81
  603. package/dist/nodes/geometry/boolean-node.js.map +0 -1
  604. package/dist/nodes/geometry/bounds-shape-node.d.ts +0 -149
  605. package/dist/nodes/geometry/bounds-shape-node.d.ts.map +0 -1
  606. package/dist/nodes/geometry/bounds-shape-node.js +0 -181
  607. package/dist/nodes/geometry/bounds-shape-node.js.map +0 -1
  608. package/dist/nodes/geometry/box-path-node.d.ts +0 -89
  609. package/dist/nodes/geometry/box-path-node.d.ts.map +0 -1
  610. package/dist/nodes/geometry/box-path-node.js +0 -116
  611. package/dist/nodes/geometry/box-path-node.js.map +0 -1
  612. package/dist/nodes/geometry/ellipse-node.d.ts +0 -18
  613. package/dist/nodes/geometry/ellipse-node.d.ts.map +0 -1
  614. package/dist/nodes/geometry/ellipse-node.js +0 -45
  615. package/dist/nodes/geometry/ellipse-node.js.map +0 -1
  616. package/dist/nodes/geometry/group-bounds.d.ts +0 -56
  617. package/dist/nodes/geometry/group-bounds.d.ts.map +0 -1
  618. package/dist/nodes/geometry/group-bounds.js +0 -87
  619. package/dist/nodes/geometry/group-bounds.js.map +0 -1
  620. package/dist/nodes/geometry/mask-node.d.ts +0 -33
  621. package/dist/nodes/geometry/mask-node.d.ts.map +0 -1
  622. package/dist/nodes/geometry/mask-node.js +0 -66
  623. package/dist/nodes/geometry/mask-node.js.map +0 -1
  624. package/dist/nodes/geometry/path-node.d.ts +0 -26
  625. package/dist/nodes/geometry/path-node.d.ts.map +0 -1
  626. package/dist/nodes/geometry/path-node.js +0 -58
  627. package/dist/nodes/geometry/path-node.js.map +0 -1
  628. package/dist/nodes/geometry/polygon-node.d.ts +0 -26
  629. package/dist/nodes/geometry/polygon-node.d.ts.map +0 -1
  630. package/dist/nodes/geometry/polygon-node.js +0 -47
  631. package/dist/nodes/geometry/polygon-node.js.map +0 -1
  632. package/dist/nodes/geometry/polygram-node.d.ts +0 -33
  633. package/dist/nodes/geometry/polygram-node.d.ts.map +0 -1
  634. package/dist/nodes/geometry/polygram-node.js +0 -52
  635. package/dist/nodes/geometry/polygram-node.js.map +0 -1
  636. package/dist/nodes/geometry/rect-node.d.ts +0 -38
  637. package/dist/nodes/geometry/rect-node.d.ts.map +0 -1
  638. package/dist/nodes/geometry/rect-node.js +0 -56
  639. package/dist/nodes/geometry/rect-node.js.map +0 -1
  640. package/dist/nodes/geometry/shape-node.d.ts +0 -71
  641. package/dist/nodes/geometry/shape-node.d.ts.map +0 -1
  642. package/dist/nodes/geometry/shape-node.js +0 -140
  643. package/dist/nodes/geometry/shape-node.js.map +0 -1
  644. package/dist/nodes/geometry/shape-outline.d.ts +0 -93
  645. package/dist/nodes/geometry/shape-outline.d.ts.map +0 -1
  646. package/dist/nodes/geometry/shape-outline.js +0 -470
  647. package/dist/nodes/geometry/shape-outline.js.map +0 -1
  648. package/dist/nodes/index.d.ts +0 -53
  649. package/dist/nodes/index.d.ts.map +0 -1
  650. package/dist/nodes/index.js +0 -35
  651. package/dist/nodes/index.js.map +0 -1
  652. package/dist/nodes/layout/camera-node.d.ts +0 -80
  653. package/dist/nodes/layout/camera-node.d.ts.map +0 -1
  654. package/dist/nodes/layout/camera-node.js +0 -153
  655. package/dist/nodes/layout/camera-node.js.map +0 -1
  656. package/dist/nodes/layout/orbit-camera-node.d.ts +0 -80
  657. package/dist/nodes/layout/orbit-camera-node.d.ts.map +0 -1
  658. package/dist/nodes/layout/orbit-camera-node.js +0 -118
  659. package/dist/nodes/layout/orbit-camera-node.js.map +0 -1
  660. package/dist/nodes/layout/rotated-box.d.ts +0 -20
  661. package/dist/nodes/layout/rotated-box.d.ts.map +0 -1
  662. package/dist/nodes/layout/rotated-box.js +0 -76
  663. package/dist/nodes/layout/rotated-box.js.map +0 -1
  664. package/dist/nodes/media/video-node.d.ts +0 -229
  665. package/dist/nodes/media/video-node.d.ts.map +0 -1
  666. package/dist/nodes/media/video-node.js +0 -350
  667. package/dist/nodes/media/video-node.js.map +0 -1
  668. package/dist/nodes/node/declare-paints.d.ts +0 -19
  669. package/dist/nodes/node/declare-paints.d.ts.map +0 -1
  670. package/dist/nodes/node/declare-paints.js +0 -27
  671. package/dist/nodes/node/declare-paints.js.map +0 -1
  672. package/dist/nodes/node/node-editor-state.d.ts +0 -53
  673. package/dist/nodes/node/node-editor-state.d.ts.map +0 -1
  674. package/dist/nodes/node/node-editor-state.js +0 -23
  675. package/dist/nodes/node/node-editor-state.js.map +0 -1
  676. package/dist/nodes/node/node-reactive.d.ts +0 -89
  677. package/dist/nodes/node/node-reactive.d.ts.map +0 -1
  678. package/dist/nodes/node/node-reactive.js +0 -135
  679. package/dist/nodes/node/node-reactive.js.map +0 -1
  680. package/dist/nodes/node/node-time.d.ts +0 -39
  681. package/dist/nodes/node/node-time.d.ts.map +0 -1
  682. package/dist/nodes/node/node-time.js +0 -14
  683. package/dist/nodes/node/node-time.js.map +0 -1
  684. package/dist/nodes/node/node-walk.d.ts +0 -46
  685. package/dist/nodes/node/node-walk.d.ts.map +0 -1
  686. package/dist/nodes/node/node-walk.js +0 -74
  687. package/dist/nodes/node/node-walk.js.map +0 -1
  688. package/dist/nodes/node/node.d.ts +0 -445
  689. package/dist/nodes/node/node.d.ts.map +0 -1
  690. package/dist/nodes/node/node.js +0 -745
  691. package/dist/nodes/node/node.js.map +0 -1
  692. package/dist/nodes/node/text-defaults.d.ts +0 -32
  693. package/dist/nodes/node/text-defaults.d.ts.map +0 -1
  694. package/dist/nodes/node/text-defaults.js +0 -37
  695. package/dist/nodes/node/text-defaults.js.map +0 -1
  696. package/dist/nodes/root/canvas2d-node.d.ts +0 -163
  697. package/dist/nodes/root/canvas2d-node.d.ts.map +0 -1
  698. package/dist/nodes/root/canvas2d-node.js +0 -264
  699. package/dist/nodes/root/canvas2d-node.js.map +0 -1
  700. package/dist/nodes/root/provider-node.d.ts +0 -47
  701. package/dist/nodes/root/provider-node.d.ts.map +0 -1
  702. package/dist/nodes/root/provider-node.js +0 -63
  703. package/dist/nodes/root/provider-node.js.map +0 -1
  704. package/dist/nodes/root/theme-provider-node.d.ts +0 -29
  705. package/dist/nodes/root/theme-provider-node.d.ts.map +0 -1
  706. package/dist/nodes/root/theme-provider-node.js +0 -43
  707. package/dist/nodes/root/theme-provider-node.js.map +0 -1
  708. package/dist/nodes/text/default-text-style-node.d.ts +0 -103
  709. package/dist/nodes/text/default-text-style-node.d.ts.map +0 -1
  710. package/dist/nodes/text/default-text-style-node.js +0 -146
  711. package/dist/nodes/text/default-text-style-node.js.map +0 -1
  712. package/dist/nodes/text/number-format.d.ts +0 -66
  713. package/dist/nodes/text/number-format.d.ts.map +0 -1
  714. package/dist/nodes/text/number-format.js +0 -227
  715. package/dist/nodes/text/number-format.js.map +0 -1
  716. package/dist/nodes/text/number-node.d.ts +0 -94
  717. package/dist/nodes/text/number-node.d.ts.map +0 -1
  718. package/dist/nodes/text/number-node.js +0 -86
  719. package/dist/nodes/text/number-node.js.map +0 -1
  720. package/dist/nodes/text/number-pattern.d.ts +0 -51
  721. package/dist/nodes/text/number-pattern.d.ts.map +0 -1
  722. package/dist/nodes/text/number-pattern.js +0 -77
  723. package/dist/nodes/text/number-pattern.js.map +0 -1
  724. package/dist/nodes/text/richtext-node.d.ts +0 -68
  725. package/dist/nodes/text/richtext-node.d.ts.map +0 -1
  726. package/dist/nodes/text/richtext-node.js +0 -78
  727. package/dist/nodes/text/richtext-node.js.map +0 -1
  728. package/dist/nodes/text/text-base.d.ts +0 -118
  729. package/dist/nodes/text/text-base.d.ts.map +0 -1
  730. package/dist/nodes/text/text-base.js +0 -153
  731. package/dist/nodes/text/text-base.js.map +0 -1
  732. package/dist/nodes/text/text-layout.d.ts +0 -87
  733. package/dist/nodes/text/text-layout.d.ts.map +0 -1
  734. package/dist/nodes/text/text-layout.js +0 -368
  735. package/dist/nodes/text/text-layout.js.map +0 -1
  736. package/dist/nodes/text/text-node.d.ts +0 -84
  737. package/dist/nodes/text/text-node.d.ts.map +0 -1
  738. package/dist/nodes/text/text-node.js +0 -188
  739. package/dist/nodes/text/text-node.js.map +0 -1
  740. package/dist/nodes/text/text-selection.d.ts +0 -125
  741. package/dist/nodes/text/text-selection.d.ts.map +0 -1
  742. package/dist/nodes/text/text-selection.js +0 -209
  743. package/dist/nodes/text/text-selection.js.map +0 -1
  744. package/dist/nodes/three/camera-nodes.d.ts +0 -109
  745. package/dist/nodes/three/camera-nodes.d.ts.map +0 -1
  746. package/dist/nodes/three/camera-nodes.js +0 -112
  747. package/dist/nodes/three/camera-nodes.js.map +0 -1
  748. package/dist/nodes/three/canvas3d-node.d.ts +0 -295
  749. package/dist/nodes/three/canvas3d-node.d.ts.map +0 -1
  750. package/dist/nodes/three/canvas3d-node.js +0 -486
  751. package/dist/nodes/three/canvas3d-node.js.map +0 -1
  752. package/dist/nodes/three/drawable-nodes.d.ts +0 -173
  753. package/dist/nodes/three/drawable-nodes.d.ts.map +0 -1
  754. package/dist/nodes/three/drawable-nodes.js +0 -284
  755. package/dist/nodes/three/drawable-nodes.js.map +0 -1
  756. package/dist/nodes/three/environment-nodes.d.ts +0 -106
  757. package/dist/nodes/three/environment-nodes.d.ts.map +0 -1
  758. package/dist/nodes/three/environment-nodes.js +0 -134
  759. package/dist/nodes/three/environment-nodes.js.map +0 -1
  760. package/dist/nodes/three/geometry-nodes.d.ts +0 -197
  761. package/dist/nodes/three/geometry-nodes.d.ts.map +0 -1
  762. package/dist/nodes/three/geometry-nodes.js +0 -322
  763. package/dist/nodes/three/geometry-nodes.js.map +0 -1
  764. package/dist/nodes/three/grid-geometry3d.d.ts +0 -62
  765. package/dist/nodes/three/grid-geometry3d.d.ts.map +0 -1
  766. package/dist/nodes/three/grid-geometry3d.js +0 -114
  767. package/dist/nodes/three/grid-geometry3d.js.map +0 -1
  768. package/dist/nodes/three/group3d.d.ts +0 -23
  769. package/dist/nodes/three/group3d.d.ts.map +0 -1
  770. package/dist/nodes/three/group3d.js +0 -21
  771. package/dist/nodes/three/group3d.js.map +0 -1
  772. package/dist/nodes/three/light-nodes.d.ts +0 -120
  773. package/dist/nodes/three/light-nodes.d.ts.map +0 -1
  774. package/dist/nodes/three/light-nodes.js +0 -173
  775. package/dist/nodes/three/light-nodes.js.map +0 -1
  776. package/dist/nodes/three/mesh3d.d.ts +0 -117
  777. package/dist/nodes/three/mesh3d.d.ts.map +0 -1
  778. package/dist/nodes/three/mesh3d.js +0 -147
  779. package/dist/nodes/three/mesh3d.js.map +0 -1
  780. package/dist/nodes/three/node3d.d.ts +0 -230
  781. package/dist/nodes/three/node3d.d.ts.map +0 -1
  782. package/dist/nodes/three/node3d.js +0 -337
  783. package/dist/nodes/three/node3d.js.map +0 -1
  784. package/dist/render/descriptors/latex.d.ts +0 -6
  785. package/dist/render/descriptors/latex.d.ts.map +0 -1
  786. package/dist/render/descriptors/latex.js +0 -2
  787. package/dist/render/descriptors/latex.js.map +0 -1
  788. package/dist/tween/seekable.d.ts +0 -81
  789. package/dist/tween/seekable.d.ts.map +0 -1
  790. package/dist/tween/seekable.js +0 -137
  791. package/dist/tween/seekable.js.map +0 -1
@@ -1,209 +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 { toCommand } from "../../tween/to-command.js";
8
- import { fillOps } from "../../attributes/shape/fill/registry.js";
9
- import { strokeOps } from "../../attributes/shape/stroke/stroke.js";
10
- /**
11
- * The size a selection's `fontSize` starts from on an `'autofit'` node.
12
- *
13
- * The same 100 the segmented layout probes with (`layoutTextSegments`), so a
14
- * selection that never touches its size reports the number that block is
15
- * actually shaped at rather than a second, different guess.
16
- */
17
- export const AUTOFIT_PROBE_SIZE = 100;
18
- import { command } from "../../tween/command-decorator.js";
19
- /** The {@link SelectionOverrides} keys that hold a string rather than a number. */
20
- const DISCRETE_KEYS = new Set(["fontFamily", "fontStyle"]);
21
- /**
22
- * A sub-range of a {@link Text} node's glyphs that can be animated
23
- * independently. Returned by the node's selector methods (`find`, `match`,
24
- * `line`, `word`, `words`, `slice`, `filter`).
25
- *
26
- * Implements {@link AnimationTarget} so `selection.to({ ... }, duration)`
27
- * plugs straight into the existing `Command` / `parallel` / `sequence`
28
- * machinery — each tween writes resolved values into {@link overrides}, which
29
- * the node reads when splitting its text into rendered pieces.
30
- *
31
- * @example
32
- * textRef().find("hello").to({ opacity: 0.5, y: -10 }, 1);
33
- */
34
- export class TextSelection {
35
- node;
36
- ranges;
37
- /**
38
- * Current resolved overrides for this selection. Numeric fields default to
39
- * the node's current values (so a partial tween starts from the node's
40
- * style); `fill`/`stroke` start as `null` (inherit) until tweened.
41
- */
42
- overrides;
43
- constructor(node, ranges) {
44
- this.node = node;
45
- this.ranges = normalizeRanges(ranges, node.text.length);
46
- this.overrides = {
47
- opacity: 1,
48
- x: 0,
49
- y: 0,
50
- scale: 1,
51
- rotation: 0,
52
- fontFamily: node.fontFamily,
53
- // `'autofit'` is a *box* decision - the size the whole block settles
54
- // on - so it is not a per-run value at all. A selection on an autofit
55
- // node starts from the probe size the segmented layout shapes with,
56
- // and overriding it there is what "this word, two sizes up" means.
57
- fontSize: typeof node.fontSize === "number" ? node.fontSize : AUTOFIT_PROBE_SIZE,
58
- fontStyle: node.fontStyle,
59
- fontWeight: node.fontWeight,
60
- letterSpacing: node.letterSpacing,
61
- fill: null,
62
- stroke: null,
63
- };
64
- node._registerSelection(this);
65
- }
66
- /** True when this selection has no overrides differing from the node default. */
67
- get isIdentity() {
68
- const o = this.overrides;
69
- const nodeSize = typeof this.node.fontSize === "number"
70
- ? this.node.fontSize
71
- : AUTOFIT_PROBE_SIZE;
72
- return (o.opacity === 1 &&
73
- o.x === 0 &&
74
- o.y === 0 &&
75
- o.scale === 1 &&
76
- o.rotation === 0 &&
77
- o.fontFamily === this.node.fontFamily &&
78
- o.fontSize === nodeSize &&
79
- o.fontStyle === this.node.fontStyle &&
80
- o.fontWeight === this.node.fontWeight &&
81
- o.letterSpacing === this.node.letterSpacing &&
82
- o.fill === null &&
83
- o.stroke === null);
84
- }
85
- /**
86
- * Write overrides straight onto the selection - no tween, no command.
87
- *
88
- * `to()` is the animation door and this is the *styling* one: an editor that
89
- * paints one word red is stating what the run **is**, not scheduling it, and
90
- * a zero-length `to()` would say the same thing while also landing a step on
91
- * the node's timeline for something that never moves. Paints are resolved
92
- * here exactly as `to()` resolves them, so a run styled this way and a run
93
- * tweened to the same value hold identical resolved arrays.
94
- *
95
- * Returns `this`, so a range and its style read as one expression.
96
- */
97
- set(props) {
98
- const o = this.overrides;
99
- for (const key of Object.keys(props)) {
100
- const value = props[key];
101
- if (value === undefined)
102
- continue;
103
- if (key === "fill") {
104
- o.fill = fillOps.resolve(value);
105
- }
106
- else if (key === "stroke") {
107
- o.stroke = strokeOps.resolve(value);
108
- }
109
- else if (DISCRETE_KEYS.has(key)) {
110
- o[key] = value;
111
- }
112
- else if (typeof value === "number") {
113
- o[key] = value;
114
- }
115
- }
116
- return this;
117
- }
118
- to(args) {
119
- return toCommand(this, args.data ?? {}, args.duration, args.easing);
120
- }
121
- /**
122
- * Resolve one `to()` step into a flat {@link TweenStepper}. Numeric props
123
- * (opacity/x/y/scale/rotation/fontWeight/letterSpacing) interpolate
124
- * directly; `fill`/`stroke` resolve their target once and lerp via the
125
- * shared fill/stroke array lerps — mirroring {@link Node2D._prepareStep}.
126
- */
127
- _prepareStep(to, duration, easing) {
128
- const o = this.overrides;
129
- const numeric = [];
130
- const customLerps = [];
131
- for (const key of Object.keys(to)) {
132
- const target = to[key];
133
- if (target === undefined)
134
- continue;
135
- if (key === 'fill') {
136
- const from = o.fill ?? this.node.fill;
137
- const resolved = fillOps.resolve(target);
138
- customLerps.push((t) => { o.fill = fillOps.lerp(from, resolved, t); });
139
- }
140
- else if (key === 'stroke') {
141
- const from = o.stroke ?? this.node.stroke;
142
- const resolved = strokeOps.resolve(target);
143
- customLerps.push((t) => { o.stroke = strokeOps.lerp(from, resolved, t); });
144
- }
145
- else if (DISCRETE_KEYS.has(key)) {
146
- // No half-way between two faces: hold the old one until the step
147
- // completes, then switch. `apply(1)` runs on the seek and the
148
- // advance paths alike, so a scrub past the end lands on it too.
149
- const next = target;
150
- const previous = o[key];
151
- customLerps.push((t) => {
152
- o[key] = t >= 1 ? next : previous;
153
- });
154
- }
155
- else if (typeof target === 'number') {
156
- const k = key;
157
- numeric.push({ key: k, from: o[k], to: target });
158
- }
159
- }
160
- const apply = (t) => {
161
- const easedT = easing ? easing(t) : t;
162
- for (const n of numeric) {
163
- o[n.key] = n.from + (n.to - n.from) * easedT;
164
- }
165
- for (const fn of customLerps)
166
- fn(easedT);
167
- };
168
- let elapsed = 0;
169
- return {
170
- seek: (e) => apply(duration > 0 ? Math.min(e / duration, 1) : 1),
171
- advance: (dt) => {
172
- elapsed += dt;
173
- if (elapsed < duration) {
174
- apply(elapsed / duration);
175
- return false;
176
- }
177
- apply(1);
178
- return true;
179
- },
180
- };
181
- }
182
- }
183
- __decorate([
184
- command()
185
- ], TextSelection.prototype, "to", null);
186
- /**
187
- * Clamp ranges to `[0, length]`, drop empties, sort by start, and merge any
188
- * that touch or overlap so each glyph is covered once per selection. The
189
- * relative order selections were *created* in is preserved across selections by
190
- * the node's registry, not here.
191
- */
192
- export function normalizeRanges(ranges, length) {
193
- const clamped = ranges
194
- .map(r => ({ start: Math.max(0, Math.min(r.start, length)), end: Math.max(0, Math.min(r.end, length)) }))
195
- .filter(r => r.end > r.start)
196
- .sort((a, b) => a.start - b.start);
197
- const merged = [];
198
- for (const r of clamped) {
199
- const last = merged[merged.length - 1];
200
- if (last && r.start <= last.end) {
201
- last.end = Math.max(last.end, r.end);
202
- }
203
- else {
204
- merged.push({ ...r });
205
- }
206
- }
207
- return merged;
208
- }
209
- //# sourceMappingURL=text-selection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text-selection.js","sourceRoot":"","sources":["../../../src/nodes/text/text-selection.ts"],"names":[],"mappings":";;;;;;AAEA,OAAO,EAAE,SAAS,EAAwB,MAAM,oBAAoB,CAAC;AAGrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAA0B,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIrF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAwDpD,mFAAmF;AACnF,MA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AAC,CAAC,KAAK,CAAC,CAAC;IAEvC,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACvC,IAAI,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC9B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { EasingFunction } from \"@/tween/ease/type\";\r\nimport { TweenStepper } from \"@/tween/stepper\";\r\nimport { toCommand, type AnimationTarget } from \"@/tween/to-command\";\r\nimport { Fill } from \"@/attributes/shape/fill/chain\";\r\nimport { FillResolved } from \"@/attributes/shape/fill/union\";\r\nimport { fillOps } from \"@/attributes/shape/fill/registry\";\r\nimport { Stroke, StrokeResolved, strokeOps } from \"@/attributes/shape/stroke/stroke\";\r\nimport type { FontStyle } from \"@/attributes/text/types\";\r\nimport type { Text } from \"./text-node\";\r\n\r\n/**\r\n * The size a selection's `fontSize` starts from on an `'autofit'` node.\r\n *\r\n * The same 100 the segmented layout probes with (`layoutTextSegments`), so a\r\n * selection that never touches its size reports the number that block is\r\n * actually shaped at rather than a second, different guess.\r\n */\r\nexport const AUTOFIT_PROBE_SIZE = 100;\r\nimport { type Command, type CommandArgs } from \"@/tween/command\";\r\nimport { command } from \"@/tween/command-decorator\";\r\n\r\n/** A half-open character range `[start, end)` of a Text node's string. */\r\nexport interface TextRange {\r\n start: number;\r\n end: number;\r\n}\r\n\r\n/**\r\n * Properties a {@link TextSelection} can animate. Transform/opacity/font fields\r\n * are numeric; `fill`/`stroke` accept any author-facing paint and are resolved\r\n * before tweening (mirroring how {@link Text} resolves its own paint).\r\n *\r\n * `fontFamily` and `fontStyle` are the two that cannot tween, and they are here\r\n * anyway: what a selection is for is styling a run differently from its\r\n * neighbours, and a model that can change a word's weight but not its face is\r\n * one an editor has to work around rather than with. They switch at the end of a\r\n * step rather than interpolating - see {@link TextSelection._prepareStep} - for\r\n * the same reason a blend mode does: there is no half-way between two typefaces,\r\n * and inventing one would be a frame of text set in neither.\r\n */\r\nexport interface TextSelectionProps {\r\n opacity: number;\r\n x: number;\r\n y: number;\r\n scale: number;\r\n rotation: number;\r\n fontFamily: string;\r\n fontSize: number;\r\n fontStyle: FontStyle;\r\n fontWeight: number;\r\n letterSpacing: number;\r\n fill: Fill;\r\n stroke: Stroke;\r\n}\r\n\r\n/**\r\n * Live, resolved override state for a selection, read by the Text node each\r\n * frame to build per-piece segments. `fill`/`stroke` are `null` until set,\r\n * meaning \"inherit the node's paint\".\r\n */\r\nexport interface SelectionOverrides {\r\n opacity: number;\r\n x: number;\r\n y: number;\r\n scale: number;\r\n rotation: number;\r\n fontFamily: string;\r\n fontSize: number;\r\n fontStyle: FontStyle;\r\n fontWeight: number;\r\n letterSpacing: number;\r\n fill: FillResolved[] | null;\r\n stroke: StrokeResolved[] | null;\r\n}\r\n\r\n/** The {@link SelectionOverrides} keys that hold a string rather than a number. */\r\nconst DISCRETE_KEYS = new Set<keyof TextSelectionProps>([\"fontFamily\", \"fontStyle\"]);\r\n\r\n/**\r\n * A sub-range of a {@link Text} node's glyphs that can be animated\r\n * independently. Returned by the node's selector methods (`find`, `match`,\r\n * `line`, `word`, `words`, `slice`, `filter`).\r\n *\r\n * Implements {@link AnimationTarget} so `selection.to({ ... }, duration)`\r\n * plugs straight into the existing `Command` / `parallel` / `sequence`\r\n * machinery — each tween writes resolved values into {@link overrides}, which\r\n * the node reads when splitting its text into rendered pieces.\r\n *\r\n * @example\r\n * textRef().find(\"hello\").to({ opacity: 0.5, y: -10 }, 1);\r\n */\r\nexport class TextSelection implements AnimationTarget<TextSelectionProps> {\r\n readonly node: Text;\r\n readonly ranges: TextRange[];\r\n\r\n /**\r\n * Current resolved overrides for this selection. Numeric fields default to\r\n * the node's current values (so a partial tween starts from the node's\r\n * style); `fill`/`stroke` start as `null` (inherit) until tweened.\r\n */\r\n readonly overrides: SelectionOverrides;\r\n\r\n constructor(node: Text, ranges: TextRange[]) {\r\n this.node = node;\r\n this.ranges = normalizeRanges(ranges, node.text.length);\r\n this.overrides = {\r\n opacity: 1,\r\n x: 0,\r\n y: 0,\r\n scale: 1,\r\n rotation: 0,\r\n fontFamily: node.fontFamily,\r\n // `'autofit'` is a *box* decision - the size the whole block settles\r\n // on - so it is not a per-run value at all. A selection on an autofit\r\n // node starts from the probe size the segmented layout shapes with,\r\n // and overriding it there is what \"this word, two sizes up\" means.\r\n fontSize: typeof node.fontSize === \"number\" ? node.fontSize : AUTOFIT_PROBE_SIZE,\r\n fontStyle: node.fontStyle,\r\n fontWeight: node.fontWeight,\r\n letterSpacing: node.letterSpacing,\r\n fill: null,\r\n stroke: null,\r\n };\r\n node._registerSelection(this);\r\n }\r\n\r\n /** True when this selection has no overrides differing from the node default. */\r\n get isIdentity(): boolean {\r\n const o = this.overrides;\r\n const nodeSize = typeof this.node.fontSize === \"number\"\r\n ? this.node.fontSize\r\n : AUTOFIT_PROBE_SIZE;\r\n return (\r\n o.opacity === 1 &&\r\n o.x === 0 &&\r\n o.y === 0 &&\r\n o.scale === 1 &&\r\n o.rotation === 0 &&\r\n o.fontFamily === this.node.fontFamily &&\r\n o.fontSize === nodeSize &&\r\n o.fontStyle === this.node.fontStyle &&\r\n o.fontWeight === this.node.fontWeight &&\r\n o.letterSpacing === this.node.letterSpacing &&\r\n o.fill === null &&\r\n o.stroke === null\r\n );\r\n }\r\n\r\n /**\r\n * Write overrides straight onto the selection - no tween, no command.\r\n *\r\n * `to()` is the animation door and this is the *styling* one: an editor that\r\n * paints one word red is stating what the run **is**, not scheduling it, and\r\n * a zero-length `to()` would say the same thing while also landing a step on\r\n * the node's timeline for something that never moves. Paints are resolved\r\n * here exactly as `to()` resolves them, so a run styled this way and a run\r\n * tweened to the same value hold identical resolved arrays.\r\n *\r\n * Returns `this`, so a range and its style read as one expression.\r\n */\r\n set(props: Partial<TextSelectionProps>): this {\r\n const o = this.overrides;\r\n for (const key of Object.keys(props) as Array<keyof TextSelectionProps>) {\r\n const value = props[key];\r\n if (value === undefined) continue;\r\n if (key === \"fill\") {\r\n o.fill = fillOps.resolve(value as Fill);\r\n } else if (key === \"stroke\") {\r\n o.stroke = strokeOps.resolve(value as Stroke);\r\n } else if (DISCRETE_KEYS.has(key)) {\r\n (o[key as \"fontFamily\" | \"fontStyle\"] as string) = value as string;\r\n } else if (typeof value === \"number\") {\r\n (o[key as \"opacity\"] as number) = value;\r\n }\r\n }\r\n return this;\r\n }\r\n\r\n @command()\r\n to<D extends Partial<TextSelectionProps> = Partial<TextSelectionProps>>(\r\n args: CommandArgs<D> & { duration: number },\r\n ): Command<TextSelectionProps> {\r\n return toCommand<TextSelectionProps>(this, args.data ?? {}, args.duration, args.easing);\r\n }\r\n\r\n /**\r\n * Resolve one `to()` step into a flat {@link TweenStepper}. Numeric props\r\n * (opacity/x/y/scale/rotation/fontWeight/letterSpacing) interpolate\r\n * directly; `fill`/`stroke` resolve their target once and lerp via the\r\n * shared fill/stroke array lerps — mirroring {@link Node2D._prepareStep}.\r\n */\r\n _prepareStep(\r\n to: Partial<TextSelectionProps>,\r\n duration: number,\r\n easing?: EasingFunction,\r\n ): TweenStepper {\r\n const o = this.overrides;\r\n const numeric: Array<{ key: keyof SelectionOverrides; from: number; to: number }> = [];\r\n const customLerps: Array<(t: number) => void> = [];\r\n\r\n for (const key of Object.keys(to) as Array<keyof TextSelectionProps>) {\r\n const target = to[key];\r\n if (target === undefined) continue;\r\n\r\n if (key === 'fill') {\r\n const from = o.fill ?? (this.node.fill as FillResolved[]);\r\n const resolved = fillOps.resolve(target as Fill);\r\n customLerps.push((t) => { o.fill = fillOps.lerp(from, resolved, t); });\r\n } else if (key === 'stroke') {\r\n const from = o.stroke ?? (this.node.stroke as StrokeResolved[]);\r\n const resolved = strokeOps.resolve(target as Stroke);\r\n customLerps.push((t) => { o.stroke = strokeOps.lerp(from, resolved, t); });\r\n } else if (DISCRETE_KEYS.has(key)) {\r\n // No half-way between two faces: hold the old one until the step\r\n // completes, then switch. `apply(1)` runs on the seek and the\r\n // advance paths alike, so a scrub past the end lands on it too.\r\n const next = target as string;\r\n const previous = o[key as \"fontFamily\" | \"fontStyle\"];\r\n customLerps.push((t) => {\r\n (o[key as \"fontFamily\" | \"fontStyle\"] as string) = t >= 1 ? next : previous;\r\n });\r\n } else if (typeof target === 'number') {\r\n const k = key as keyof SelectionOverrides;\r\n numeric.push({ key: k, from: o[k] as number, to: target });\r\n }\r\n }\r\n\r\n const apply = (t: number): void => {\r\n const easedT = easing ? easing(t) : t;\r\n for (const n of numeric) {\r\n (o[n.key] as number) = n.from + (n.to - n.from) * easedT;\r\n }\r\n for (const fn of customLerps) fn(easedT);\r\n };\r\n\r\n let elapsed = 0;\r\n return {\r\n seek: (e: number) => apply(duration > 0 ? Math.min(e / duration, 1) : 1),\r\n advance: (dt: number): boolean => {\r\n elapsed += dt;\r\n if (elapsed < duration) {\r\n apply(elapsed / duration);\r\n return false;\r\n }\r\n apply(1);\r\n return true;\r\n },\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * Clamp ranges to `[0, length]`, drop empties, sort by start, and merge any\r\n * that touch or overlap so each glyph is covered once per selection. The\r\n * relative order selections were *created* in is preserved across selections by\r\n * the node's registry, not here.\r\n */\r\nexport function normalizeRanges(ranges: TextRange[], length: number): TextRange[] {\r\n const clamped = ranges\r\n .map(r => ({ start: Math.max(0, Math.min(r.start, length)), end: Math.max(0, Math.min(r.end, length)) }))\r\n .filter(r => r.end > r.start)\r\n .sort((a, b) => a.start - b.start);\r\n\r\n const merged: TextRange[] = [];\r\n for (const r of clamped) {\r\n const last = merged[merged.length - 1];\r\n if (last && r.start <= last.end) {\r\n last.end = Math.max(last.end, r.end);\r\n } else {\r\n merged.push({ ...r });\r\n }\r\n }\r\n return merged;\r\n}\r\n"]}
@@ -1,109 +0,0 @@
1
- import type { Transform3D } from "../../render3d/transform.js";
2
- import { type CameraData3D } from "../../render3d/camera.js";
3
- import type { Command, CommandArgs } from "../../tween/command.js";
4
- import type { RenderContext3D } from "../../render3d/render-context3d.js";
5
- import type { Vector3Input } from "../../render3d/vector3.js";
6
- import { Node3D, type Node3DProps } from "./node3d.js";
7
- /**
8
- * The camera — where the scene is viewed from.
9
- *
10
- * **One node, two projections.** `<Camera3D type="orthographic">` is the flat
11
- * one; there is no second class, because a perspective and an orthographic
12
- * camera are one object with a projection setting, which is how every editor
13
- * presents it and how a scene switching between them has to be written.
14
- *
15
- * <Camera3D target={[0, 0.2, 0]} orbit={-18} elevation={12} distance={13} fov={42} />
16
- *
17
- * cam().to({ data: { orbit: 160, elevation: 30 }, duration: 4, easing: easeInOut("quad") });
18
- *
19
- * ── Orbit, not trigonometry ───────────────────────────────────────────────────
20
- * `target`/`orbit`/`elevation`/`distance` place the camera in polar coordinates
21
- * around the thing it is looking at, which is what a camera move almost always
22
- * *is*. Written through `position` the same move is a `Math.sin`/`Math.cos` pair
23
- * recomputed every frame in a prop binding — which is exactly what every scene
24
- * did before this existed.
25
- *
26
- * `position` and `lookAt` still work and are right for a shot pinned to
27
- * something; setting any polar field takes over, so the two can never be half
28
- * applied. Either way the camera is a node, so parenting it to a moving
29
- * `Group3D` carries the shot with the rig.
30
- *
31
- * ── What is derived ───────────────────────────────────────────────────────────
32
- * `near`/`far` come from the scene's own bounds unless you set them, and the
33
- * aspect ratio always tracks the viewport's layout box — it was a prop whose
34
- * documentation said "don't set this", and setting it stretched the render.
35
- * An asymmetric orthographic frustum is a `params` override rather than four
36
- * more fields.
37
- *
38
- * A scene with no camera gets a sensible default framing. A scene that declares
39
- * more than one keeps the last, since there is only ever one view.
40
- */
41
- export interface Camera3DProps extends Node3DProps {
42
- /** `"perspective"` (default) or `"orthographic"`. */
43
- type: CameraData3D["type"];
44
- /**
45
- * The point the camera looks at, and orbits around.
46
- *
47
- * On its own it is `lookAt` under a name that reads right beside `orbit`;
48
- * together with any of the three below it is also the centre they turn about.
49
- */
50
- target: Vector3Input | undefined;
51
- /** Azimuth around {@link target}, in **degrees**. */
52
- orbit: number | undefined;
53
- /** Angle above the horizon, in **degrees**. */
54
- elevation: number | undefined;
55
- /** Distance from {@link target}. */
56
- distance: number | undefined;
57
- /** Perspective only: vertical field of view in **degrees**. Default 50. */
58
- fov: number | undefined;
59
- /** Orthographic only: visible world height. Default 10. */
60
- frustumHeight: number | undefined;
61
- near: number | undefined;
62
- far: number | undefined;
63
- zoom: number | undefined;
64
- }
65
- export declare class Camera3D<P extends Camera3DProps = Camera3DProps> extends Node3D<P> {
66
- type: CameraData3D["type"];
67
- target: Vector3Input | undefined;
68
- orbit: number | undefined;
69
- elevation: number | undefined;
70
- distance: number | undefined;
71
- fov: number | undefined;
72
- frustumHeight: number | undefined;
73
- near: number | undefined;
74
- far: number | undefined;
75
- zoom: number | undefined;
76
- /**
77
- * Swing round {@link target}, and pull back or in, whichever are given. A
78
- * camera not yet placed by its polar fields starts from what an unset one
79
- * reads as.
80
- */
81
- orbitTo(args: CommandArgs<{
82
- orbit?: number;
83
- elevation?: number;
84
- distance?: number;
85
- }> & {
86
- duration: number;
87
- }): Command<P>;
88
- /** Turn to look at another point: animates {@link target}. */
89
- lookTo(args: CommandArgs<{
90
- target: Vector3Input;
91
- }> & {
92
- duration: number;
93
- }): Command<P>;
94
- /**
95
- * A camera's group stays identity; the camera places itself.
96
- *
97
- * three aims a camera's **-Z** at `lookAt` and a plain group's **+Z**, so a
98
- * camera sitting inside a group that carried its placement would face exactly
99
- * backwards. Putting the placement on the descriptor hands it to the camera
100
- * object itself, where `Object3D.lookAt` uses the camera convention — and it
101
- * is still parent-relative, so a camera inside a moving rig is carried by it.
102
- */
103
- protected groupTransform(): Transform3D;
104
- protected buildCamera(): CameraData3D;
105
- /** Loads nothing — and recording `renderSelf` would make every orbit tween a dependency. */
106
- declareAssets(): void;
107
- protected renderSelf(ctx: RenderContext3D): void;
108
- }
109
- //# sourceMappingURL=camera-nodes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"camera-nodes.d.ts","sourceRoot":"","sources":["../../../src/nodes/three/camera-nodes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAC9C,qDAAqD;IACrD,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B;;;;;OAKG;IACH,MAAM,EAAE,YAAY,GAAG,SAAS,CAAC;IACjC,qDAAqD;IACrD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,+CAA+C;IAC/C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,oCAAoC;IACpC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,2EAA2E;IAC3E,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,G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 @@
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 { property } from "../../attributes/properties/decorator.js";
8
- import { optionalVector3Property } from "../../attributes/properties/typed.js";
9
- import { ORBIT_CAMERA_DEFAULTS } from "../../render3d/camera.js";
10
- import { command } from "../../tween/command-decorator.js";
11
- import { Node3D } from "./node3d.js";
12
- const CAMERA_KEYS = [
13
- "target", "orbit", "elevation", "distance",
14
- "fov", "frustumHeight", "near", "far", "zoom",
15
- ];
16
- export class Camera3D extends Node3D {
17
- /**
18
- * Swing round {@link target}, and pull back or in, whichever are given. A
19
- * camera not yet placed by its polar fields starts from what an unset one
20
- * reads as.
21
- */
22
- orbitTo(args) {
23
- const to = args.data ?? {};
24
- const from = {
25
- orbit: this.orbit ?? ORBIT_CAMERA_DEFAULTS.orbit,
26
- elevation: this.elevation ?? ORBIT_CAMERA_DEFAULTS.elevation,
27
- distance: this.distance ?? ORBIT_CAMERA_DEFAULTS.distance,
28
- };
29
- return this.command((t) => {
30
- const out = {};
31
- for (const key of ["orbit", "elevation", "distance"]) {
32
- const end = to[key];
33
- if (end !== undefined)
34
- out[key] = from[key] + (end - from[key]) * t;
35
- }
36
- return out;
37
- }, args.duration, args.easing);
38
- }
39
- /** Turn to look at another point: animates {@link target}. */
40
- lookTo(args) {
41
- return this.to({ data: args.data, duration: args.duration, easing: args.easing });
42
- }
43
- /**
44
- * A camera's group stays identity; the camera places itself.
45
- *
46
- * three aims a camera's **-Z** at `lookAt` and a plain group's **+Z**, so a
47
- * camera sitting inside a group that carried its placement would face exactly
48
- * backwards. Putting the placement on the descriptor hands it to the camera
49
- * object itself, where `Object3D.lookAt` uses the camera convention — and it
50
- * is still parent-relative, so a camera inside a moving rig is carried by it.
51
- */
52
- groupTransform() {
53
- return {};
54
- }
55
- buildCamera() {
56
- const out = { type: this.type };
57
- for (const key of CAMERA_KEYS) {
58
- const value = this[key];
59
- if (value !== undefined)
60
- out[key] = value;
61
- }
62
- return out;
63
- }
64
- /** Loads nothing — and recording `renderSelf` would make every orbit tween a dependency. */
65
- declareAssets() { }
66
- renderSelf(ctx) {
67
- ctx.camera({ ...this.transform3D(), ...this.buildCamera() });
68
- }
69
- }
70
- __decorate([
71
- property({ default: "perspective" })
72
- ], Camera3D.prototype, "type", void 0);
73
- __decorate([
74
- optionalVector3Property("origin")
75
- ], Camera3D.prototype, "target", void 0);
76
- __decorate([
77
- property({ default: undefined })
78
- ], Camera3D.prototype, "orbit", void 0);
79
- __decorate([
80
- property({ default: undefined })
81
- ], Camera3D.prototype, "elevation", void 0);
82
- __decorate([
83
- property({ default: undefined })
84
- ], Camera3D.prototype, "distance", void 0);
85
- __decorate([
86
- property({ default: undefined })
87
- ], Camera3D.prototype, "fov", void 0);
88
- __decorate([
89
- property({ default: undefined })
90
- ], Camera3D.prototype, "frustumHeight", void 0);
91
- __decorate([
92
- property({ default: undefined })
93
- ], Camera3D.prototype, "near", void 0);
94
- __decorate([
95
- property({ default: undefined })
96
- ], Camera3D.prototype, "far", void 0);
97
- __decorate([
98
- property({ default: undefined })
99
- ], Camera3D.prototype, "zoom", void 0);
100
- __decorate([
101
- command({
102
- args: [
103
- { key: "orbit", kind: "number", step: 1, unit: "°" },
104
- { key: "elevation", kind: "number", min: -89, max: 89, step: 1, unit: "°" },
105
- { key: "distance", kind: "number", min: 0.01, step: 0.1 },
106
- ],
107
- })
108
- ], Camera3D.prototype, "orbitTo", null);
109
- __decorate([
110
- command({ args: ["target"] })
111
- ], Camera3D.prototype, "lookTo", null);
112
- //# sourceMappingURL=camera-nodes.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SAAS,EAAE,CAAC;2CAAuC;AAC9B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;0CAAsC;AAE7B;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAiC;AACxB;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;+CAA2C;AAClC;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;sCAAkC;AACzB;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;qCAAiC;AACxB;IAAzC,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;sCAAkC;AAcnE;IAPC,OAAO,CAAC;QACL,IAAI,EAAE;YACF,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE;YACpD,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE;YAC3E,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE;SAC5D;KACJ,CAAC;uCAkBD;AAID;IADC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;sCAG7B","sourcesContent":["import { property } from \"@/attributes/properties/decorator\";\r\nimport { optionalVector3Property } from \"@/attributes/properties/typed\";\r\nimport type { Transform3D } from \"@/render3d/transform\";\r\nimport { ORBIT_CAMERA_DEFAULTS, type CameraData3D } from \"@/render3d/camera\";\r\nimport type { Command, CommandArgs } from \"@/tween/command\";\r\nimport { command } from \"@/tween/command-decorator\";\r\nimport type { RenderContext3D } from \"@/render3d/render-context3d\";\r\nimport type { Vector3Input } from \"@/render3d/vector3\";\r\nimport { Node3D, type Node3DProps } from \"./node3d\";\r\n\r\n/**\r\n * The camera — where the scene is viewed from.\r\n *\r\n * **One node, two projections.** `<Camera3D type=\"orthographic\">` is the flat\r\n * one; there is no second class, because a perspective and an orthographic\r\n * camera are one object with a projection setting, which is how every editor\r\n * presents it and how a scene switching between them has to be written.\r\n *\r\n * <Camera3D target={[0, 0.2, 0]} orbit={-18} elevation={12} distance={13} fov={42} />\r\n *\r\n * cam().to({ data: { orbit: 160, elevation: 30 }, duration: 4, easing: easeInOut(\"quad\") });\r\n *\r\n * ── Orbit, not trigonometry ───────────────────────────────────────────────────\r\n * `target`/`orbit`/`elevation`/`distance` place the camera in polar coordinates\r\n * around the thing it is looking at, which is what a camera move almost always\r\n * *is*. Written through `position` the same move is a `Math.sin`/`Math.cos` pair\r\n * recomputed every frame in a prop binding — which is exactly what every scene\r\n * did before this existed.\r\n *\r\n * `position` and `lookAt` still work and are right for a shot pinned to\r\n * something; setting any polar field takes over, so the two can never be half\r\n * applied. Either way the camera is a node, so parenting it to a moving\r\n * `Group3D` carries the shot with the rig.\r\n *\r\n * ── What is derived ───────────────────────────────────────────────────────────\r\n * `near`/`far` come from the scene's own bounds unless you set them, and the\r\n * aspect ratio always tracks the viewport's layout box — it was a prop whose\r\n * documentation said \"don't set this\", and setting it stretched the render.\r\n * An asymmetric orthographic frustum is a `params` override rather than four\r\n * more fields.\r\n *\r\n * A scene with no camera gets a sensible default framing. A scene that declares\r\n * more than one keeps the last, since there is only ever one view.\r\n */\r\nexport interface Camera3DProps extends Node3DProps {\r\n /** `\"perspective\"` (default) or `\"orthographic\"`. */\r\n type: CameraData3D[\"type\"];\r\n /**\r\n * The point the camera looks at, and orbits around.\r\n *\r\n * On its own it is `lookAt` under a name that reads right beside `orbit`;\r\n * together with any of the three below it is also the centre they turn about.\r\n */\r\n target: Vector3Input | undefined;\r\n /** Azimuth around {@link target}, in **degrees**. */\r\n orbit: number | undefined;\r\n /** Angle above the horizon, in **degrees**. */\r\n elevation: number | undefined;\r\n /** Distance from {@link target}. */\r\n distance: number | undefined;\r\n /** Perspective only: vertical field of view in **degrees**. Default 50. */\r\n fov: number | undefined;\r\n /** Orthographic only: visible world height. Default 10. */\r\n frustumHeight: number | undefined;\r\n near: number | undefined;\r\n far: number | undefined;\r\n zoom: number | undefined;\r\n}\r\n\r\nconst CAMERA_KEYS = [\r\n \"target\", \"orbit\", \"elevation\", \"distance\",\r\n \"fov\", \"frustumHeight\", \"near\", \"far\", \"zoom\",\r\n] as const;\r\n\r\nexport class Camera3D<P extends Camera3DProps = Camera3DProps> extends Node3D<P> {\r\n @property({ default: \"perspective\" }) declare type: CameraData3D[\"type\"];\r\n\r\n @optionalVector3Property(\"origin\") declare target: Vector3Input | undefined;\r\n @property({ default: undefined }) declare orbit: number | undefined;\r\n @property({ default: undefined }) declare elevation: number | undefined;\r\n @property({ default: undefined }) declare distance: number | undefined;\r\n\r\n @property({ default: undefined }) declare fov: number | undefined;\r\n @property({ default: undefined }) declare frustumHeight: number | undefined;\r\n @property({ default: undefined }) declare near: number | undefined;\r\n @property({ default: undefined }) declare far: number | undefined;\r\n @property({ default: undefined }) declare zoom: number | undefined;\r\n\r\n /**\r\n * Swing round {@link target}, and pull back or in, whichever are given. A\r\n * camera not yet placed by its polar fields starts from what an unset one\r\n * reads as.\r\n */\r\n @command({\r\n args: [\r\n { key: \"orbit\", kind: \"number\", step: 1, unit: \"°\" },\r\n { key: \"elevation\", kind: \"number\", min: -89, max: 89, step: 1, unit: \"°\" },\r\n { key: \"distance\", kind: \"number\", min: 0.01, step: 0.1 },\r\n ],\r\n })\r\n orbitTo(\r\n args: CommandArgs<{ orbit?: number; elevation?: number; distance?: number }> & { duration: number },\r\n ): Command<P> {\r\n const to = args.data ?? {};\r\n const from = {\r\n orbit: this.orbit ?? ORBIT_CAMERA_DEFAULTS.orbit,\r\n elevation: this.elevation ?? ORBIT_CAMERA_DEFAULTS.elevation,\r\n distance: this.distance ?? ORBIT_CAMERA_DEFAULTS.distance,\r\n };\r\n return this.command<P>((t) => {\r\n const out: Record<string, number> = {};\r\n for (const key of [\"orbit\", \"elevation\", \"distance\"] as const) {\r\n const end = to[key];\r\n if (end !== undefined) out[key] = from[key] + (end - from[key]) * t;\r\n }\r\n return out as Partial<P>;\r\n }, args.duration, args.easing);\r\n }\r\n\r\n /** Turn to look at another point: animates {@link target}. */\r\n @command({ args: [\"target\"] })\r\n lookTo(args: CommandArgs<{ target: Vector3Input }> & { duration: number }): Command<P> {\r\n return this.to({ data: args.data as Partial<P>, duration: args.duration, easing: args.easing });\r\n }\r\n\r\n /**\r\n * A camera's group stays identity; the camera places itself.\r\n *\r\n * three aims a camera's **-Z** at `lookAt` and a plain group's **+Z**, so a\r\n * camera sitting inside a group that carried its placement would face exactly\r\n * backwards. Putting the placement on the descriptor hands it to the camera\r\n * object itself, where `Object3D.lookAt` uses the camera convention — and it\r\n * is still parent-relative, so a camera inside a moving rig is carried by it.\r\n */\r\n protected override groupTransform(): Transform3D {\r\n return {};\r\n }\r\n\r\n protected buildCamera(): CameraData3D {\r\n const out: Record<string, unknown> = { type: this.type };\r\n for (const key of CAMERA_KEYS) {\r\n const value = (this as unknown as Record<string, unknown>)[key];\r\n if (value !== undefined) out[key] = value;\r\n }\r\n return out as unknown as CameraData3D;\r\n }\r\n\r\n /** Loads nothing — and recording `renderSelf` would make every orbit tween a dependency. */\r\n override declareAssets(): void { }\r\n\r\n protected override renderSelf(ctx: RenderContext3D): void {\r\n ctx.camera({ ...this.transform3D(), ...this.buildCamera() } as CameraData3D);\r\n }\r\n}\r\n"]}