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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (904) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/LICENSE +201 -201
  3. package/NOTICE +48 -0
  4. package/README.md +93 -72
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +9 -0
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +11 -0
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts.map +1 -1
  11. package/dist/assets/errors.js +8 -3
  12. package/dist/assets/errors.js.map +1 -1
  13. package/dist/assets/index.js.map +1 -1
  14. package/dist/assets/manager.d.ts +26 -1
  15. package/dist/assets/manager.d.ts.map +1 -1
  16. package/dist/assets/manager.js +79 -4
  17. package/dist/assets/manager.js.map +1 -1
  18. package/dist/assets/manifest.js.map +1 -1
  19. package/dist/assets/record.js.map +1 -1
  20. package/dist/assets/scope.d.ts +3 -3
  21. package/dist/assets/scope.d.ts.map +1 -1
  22. package/dist/assets/scope.js.map +1 -1
  23. package/dist/attributes/audio/filters/chain.d.ts +1 -1
  24. package/dist/attributes/audio/filters/chain.js.map +1 -1
  25. package/dist/attributes/audio/filters/curve.d.ts +8 -8
  26. package/dist/attributes/audio/filters/curve.d.ts.map +1 -1
  27. package/dist/attributes/audio/filters/curve.js +20 -19
  28. package/dist/attributes/audio/filters/curve.js.map +1 -1
  29. package/dist/attributes/audio/filters/implementations/echo.js.map +1 -1
  30. package/dist/attributes/audio/filters/implementations/gain.js.map +1 -1
  31. package/dist/attributes/audio/filters/implementations/highpass.js.map +1 -1
  32. package/dist/attributes/audio/filters/implementations/lowpass.js.map +1 -1
  33. package/dist/attributes/audio/filters/implementations/speed.d.ts +2 -2
  34. package/dist/attributes/audio/filters/implementations/speed.js.map +1 -1
  35. package/dist/attributes/audio/filters/implementations/tremolo.js.map +1 -1
  36. package/dist/attributes/audio/filters/index.d.ts +1 -1
  37. package/dist/attributes/audio/filters/index.d.ts.map +1 -1
  38. package/dist/attributes/audio/filters/index.js +1 -1
  39. package/dist/attributes/audio/filters/index.js.map +1 -1
  40. package/dist/attributes/audio/filters/registry.js.map +1 -1
  41. package/dist/attributes/audio/filters/union.js.map +1 -1
  42. package/dist/attributes/audio/request.d.ts +17 -2
  43. package/dist/attributes/audio/request.d.ts.map +1 -1
  44. package/dist/attributes/audio/request.js.map +1 -1
  45. package/dist/attributes/audio/schedule.d.ts +4 -2
  46. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  47. package/dist/attributes/audio/schedule.js +15 -8
  48. package/dist/attributes/audio/schedule.js.map +1 -1
  49. package/dist/attributes/audio/sound.d.ts +4 -2
  50. package/dist/attributes/audio/sound.d.ts.map +1 -1
  51. package/dist/attributes/audio/sound.js +8 -4
  52. package/dist/attributes/audio/sound.js.map +1 -1
  53. package/dist/attributes/index.js.map +1 -1
  54. package/dist/attributes/layout/alignment.js +1 -1
  55. package/dist/attributes/layout/alignment.js.map +1 -1
  56. package/dist/attributes/layout/index.js.map +1 -1
  57. package/dist/attributes/layout/insets.js.map +1 -1
  58. package/dist/attributes/layout/matrix2d.js.map +1 -1
  59. package/dist/attributes/layout/size.js.map +1 -1
  60. package/dist/attributes/layout/transform3d.js.map +1 -1
  61. package/dist/attributes/layout/vector2.js.map +1 -1
  62. package/dist/attributes/layout/world-transform.js.map +1 -1
  63. package/dist/attributes/mask/boolean.js.map +1 -1
  64. package/dist/attributes/mask/mask.js.map +1 -1
  65. package/dist/attributes/properties/decorator.d.ts +3 -1
  66. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  67. package/dist/attributes/properties/decorator.js.map +1 -1
  68. package/dist/attributes/properties/inputs.js.map +1 -1
  69. package/dist/attributes/properties/typed.d.ts +9 -2
  70. package/dist/attributes/properties/typed.d.ts.map +1 -1
  71. package/dist/attributes/properties/typed.js +15 -1
  72. package/dist/attributes/properties/typed.js.map +1 -1
  73. package/dist/attributes/render3d/orbit.d.ts +8 -8
  74. package/dist/attributes/render3d/orbit.js +7 -7
  75. package/dist/attributes/render3d/orbit.js.map +1 -1
  76. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  77. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  78. package/dist/attributes/shape/corners/corners.js.map +1 -1
  79. package/dist/attributes/shape/corners/index.js.map +1 -1
  80. package/dist/attributes/shape/effects/backdrop.d.ts +4 -4
  81. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  82. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  83. package/dist/attributes/shape/effects/chain.d.ts +28 -120
  84. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  85. package/dist/attributes/shape/effects/chain.js +16 -88
  86. package/dist/attributes/shape/effects/chain.js.map +1 -1
  87. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  88. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  89. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  90. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  91. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  92. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  93. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  94. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  95. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +2 -2
  96. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  97. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -1
  98. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  99. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  100. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  101. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  102. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  104. package/dist/attributes/shape/effects/implementations/glass.d.ts +15 -24
  105. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  106. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  108. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  110. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  112. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/lut.d.ts +1 -1
  114. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/shader.js +15 -8
  128. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  136. package/dist/attributes/shape/effects/index.d.ts +2 -6
  137. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  138. package/dist/attributes/shape/effects/index.js.map +1 -1
  139. package/dist/attributes/shape/effects/registry.d.ts +23 -6
  140. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  141. package/dist/attributes/shape/effects/registry.js +44 -10
  142. package/dist/attributes/shape/effects/registry.js.map +1 -1
  143. package/dist/attributes/shape/effects/union.d.ts +2 -6
  144. package/dist/attributes/shape/effects/union.d.ts.map +1 -1
  145. package/dist/attributes/shape/effects/union.js.map +1 -1
  146. package/dist/attributes/shape/fill/blend.js.map +1 -1
  147. package/dist/attributes/shape/fill/chain.js.map +1 -1
  148. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  149. package/dist/attributes/shape/fill/color/constants.js.map +1 -1
  150. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  151. package/dist/attributes/shape/fill/color/parser.js +81 -44
  152. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  153. package/dist/attributes/shape/fill/gradient-stops.d.ts +16 -0
  154. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -0
  155. package/dist/attributes/shape/fill/gradient-stops.js +65 -0
  156. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -0
  157. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  158. package/dist/attributes/shape/fill/implementations/color.js.map +1 -1
  159. package/dist/attributes/shape/fill/implementations/conic-gradient.d.ts.map +1 -1
  160. package/dist/attributes/shape/fill/implementations/conic-gradient.js +2 -5
  161. package/dist/attributes/shape/fill/implementations/conic-gradient.js.map +1 -1
  162. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  163. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  164. package/dist/attributes/shape/fill/implementations/fractal-noise.js +2 -10
  165. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  166. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  167. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  168. package/dist/attributes/shape/fill/implementations/image.js +5 -4
  169. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  170. package/dist/attributes/shape/fill/implementations/linear-gradient.d.ts.map +1 -1
  171. package/dist/attributes/shape/fill/implementations/linear-gradient.js +2 -6
  172. package/dist/attributes/shape/fill/implementations/linear-gradient.js.map +1 -1
  173. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  174. package/dist/attributes/shape/fill/implementations/radial-gradient.d.ts.map +1 -1
  175. package/dist/attributes/shape/fill/implementations/radial-gradient.js +2 -5
  176. package/dist/attributes/shape/fill/implementations/radial-gradient.js.map +1 -1
  177. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  178. package/dist/attributes/shape/fill/implementations/stripe.js.map +1 -1
  179. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  180. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  181. package/dist/attributes/shape/fill/index.js.map +1 -1
  182. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  183. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  184. package/dist/attributes/shape/fill/registry.js.map +1 -1
  185. package/dist/attributes/shape/fill/union.js.map +1 -1
  186. package/dist/attributes/shape/filters/chain.d.ts +4 -10
  187. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  188. package/dist/attributes/shape/filters/chain.js +1 -13
  189. package/dist/attributes/shape/filters/chain.js.map +1 -1
  190. package/dist/attributes/shape/filters/implementations/alpha.js.map +1 -1
  191. package/dist/attributes/shape/filters/implementations/blur.js.map +1 -1
  192. package/dist/attributes/shape/filters/implementations/color-adjustment.js.map +1 -1
  193. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  194. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  195. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  196. package/dist/attributes/shape/filters/implementations/exposure.js.map +1 -1
  197. package/dist/attributes/shape/filters/implementations/grayscale.js.map +1 -1
  198. package/dist/attributes/shape/filters/implementations/posterize-time.js.map +1 -1
  199. package/dist/attributes/shape/filters/index.d.ts +1 -1
  200. package/dist/attributes/shape/filters/index.js.map +1 -1
  201. package/dist/attributes/shape/filters/registry.d.ts +2 -2
  202. package/dist/attributes/shape/filters/registry.js +3 -3
  203. package/dist/attributes/shape/filters/registry.js.map +1 -1
  204. package/dist/attributes/shape/filters/union.d.ts +6 -7
  205. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  206. package/dist/attributes/shape/filters/union.js.map +1 -1
  207. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  208. package/dist/attributes/shape/path/anchors.js +12 -5
  209. package/dist/attributes/shape/path/anchors.js.map +1 -1
  210. package/dist/attributes/shape/path/bezier.js.map +1 -1
  211. package/dist/attributes/shape/path/index.js.map +1 -1
  212. package/dist/attributes/shape/path/measure.js.map +1 -1
  213. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  214. package/dist/attributes/shape/path/morph.js +16 -4
  215. package/dist/attributes/shape/path/morph.js.map +1 -1
  216. package/dist/attributes/shape/path/ops.js.map +1 -1
  217. package/dist/attributes/shape/path/types.js.map +1 -1
  218. package/dist/attributes/shape/path/walk.js.map +1 -1
  219. package/dist/attributes/shape/shaders/index.js.map +1 -1
  220. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  221. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  222. package/dist/attributes/shape/shadow/index.js.map +1 -1
  223. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  224. package/dist/attributes/shape/stroke/index.d.ts +2 -2
  225. package/dist/attributes/shape/stroke/index.d.ts.map +1 -1
  226. package/dist/attributes/shape/stroke/index.js +1 -1
  227. package/dist/attributes/shape/stroke/index.js.map +1 -1
  228. package/dist/attributes/shape/stroke/stroke.d.ts +27 -6
  229. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  230. package/dist/attributes/shape/stroke/stroke.js +22 -2
  231. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  232. package/dist/attributes/shared/operators.js.map +1 -1
  233. package/dist/attributes/text/index.js.map +1 -1
  234. package/dist/attributes/text/ops.d.ts +6 -0
  235. package/dist/attributes/text/ops.d.ts.map +1 -1
  236. package/dist/attributes/text/ops.js +1 -0
  237. package/dist/attributes/text/ops.js.map +1 -1
  238. package/dist/attributes/text/types.js.map +1 -1
  239. package/dist/browser/chunks/chunk-2RIYH36X.js +3 -0
  240. package/dist/browser/chunks/chunk-2RIYH36X.js.map +7 -0
  241. package/dist/browser/chunks/chunk-DDJN3QII.js +15 -0
  242. package/dist/browser/chunks/chunk-DDJN3QII.js.map +7 -0
  243. package/dist/browser/chunks/chunk-DHB4COFY.js +2 -0
  244. package/dist/browser/chunks/chunk-DHB4COFY.js.map +7 -0
  245. package/dist/browser/chunks/chunk-EJDPYDQI.js +5 -0
  246. package/dist/browser/chunks/chunk-EJDPYDQI.js.map +7 -0
  247. package/dist/browser/chunks/chunk-SFNJRPBV.js +2 -0
  248. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +7 -0
  249. package/dist/browser/chunks/chunk-XAWE4EAK.js +2 -0
  250. package/dist/browser/chunks/chunk-XAWE4EAK.js.map +7 -0
  251. package/dist/browser/component.js +1 -1
  252. package/dist/browser/component.js.map +4 -4
  253. package/dist/browser/experimental.js +2 -0
  254. package/dist/browser/experimental.js.map +7 -0
  255. package/dist/browser/index.js +1 -1
  256. package/dist/browser/index.js.map +4 -4
  257. package/dist/browser/jsx-jsx-dev-runtime.js +1 -1
  258. package/dist/browser/jsx-jsx-runtime.js +1 -1
  259. package/dist/browser/manifest.json +4 -2
  260. package/dist/browser/sdk.js +1 -1
  261. package/dist/component/api.d.ts +508 -0
  262. package/dist/component/api.d.ts.map +1 -0
  263. package/dist/component/api.js +4 -0
  264. package/dist/component/api.js.map +1 -0
  265. package/dist/component/builtins/audio.d.ts +26 -0
  266. package/dist/component/builtins/audio.d.ts.map +1 -0
  267. package/dist/component/builtins/audio.js +41 -0
  268. package/dist/component/builtins/audio.js.map +1 -0
  269. package/dist/component/builtins/canvas3d.d.ts +98 -0
  270. package/dist/component/builtins/canvas3d.d.ts.map +1 -0
  271. package/dist/component/builtins/canvas3d.js +21 -0
  272. package/dist/component/builtins/canvas3d.js.map +1 -0
  273. package/dist/component/builtins/composite.d.ts +56 -0
  274. package/dist/component/builtins/composite.d.ts.map +1 -0
  275. package/dist/component/builtins/composite.js +25 -0
  276. package/dist/component/builtins/composite.js.map +1 -0
  277. package/dist/component/builtins/geometry.d.ts +505 -0
  278. package/dist/component/builtins/geometry.d.ts.map +1 -0
  279. package/dist/component/builtins/geometry.js +107 -0
  280. package/dist/component/builtins/geometry.js.map +1 -0
  281. package/dist/component/builtins/layout.d.ts +88 -0
  282. package/dist/component/builtins/layout.d.ts.map +1 -0
  283. package/dist/component/builtins/layout.js +84 -0
  284. package/dist/component/builtins/layout.js.map +1 -0
  285. package/dist/component/builtins/media.d.ts +95 -0
  286. package/dist/component/builtins/media.d.ts.map +1 -0
  287. package/dist/component/builtins/media.js +149 -0
  288. package/dist/component/builtins/media.js.map +1 -0
  289. package/dist/component/builtins/providers.d.ts +23 -0
  290. package/dist/component/builtins/providers.d.ts.map +1 -0
  291. package/dist/component/builtins/providers.js +30 -0
  292. package/dist/component/builtins/providers.js.map +1 -0
  293. package/dist/component/builtins/text.d.ts +193 -0
  294. package/dist/component/builtins/text.d.ts.map +1 -0
  295. package/dist/component/builtins/text.js +113 -0
  296. package/dist/component/builtins/text.js.map +1 -0
  297. package/dist/component/builtins/three.d.ts +1085 -0
  298. package/dist/component/builtins/three.d.ts.map +1 -0
  299. package/dist/component/builtins/three.js +265 -0
  300. package/dist/component/builtins/three.js.map +1 -0
  301. package/dist/component/clip-of.d.ts +5 -0
  302. package/dist/component/clip-of.d.ts.map +1 -0
  303. package/dist/component/clip-of.js +33 -0
  304. package/dist/component/clip-of.js.map +1 -0
  305. package/dist/component/commands-for.d.ts +19 -0
  306. package/dist/component/commands-for.d.ts.map +1 -0
  307. package/dist/component/commands-for.js +5 -0
  308. package/dist/component/commands-for.js.map +1 -0
  309. package/dist/component/component-audio.d.ts +9 -0
  310. package/dist/component/component-audio.d.ts.map +1 -0
  311. package/dist/component/component-audio.js +18 -0
  312. package/dist/component/component-audio.js.map +1 -0
  313. package/dist/component/component2d.d.ts +9 -0
  314. package/dist/component/component2d.d.ts.map +1 -0
  315. package/dist/component/component2d.js +239 -0
  316. package/dist/component/component2d.js.map +1 -0
  317. package/dist/component/component3d.d.ts +9 -0
  318. package/dist/component/component3d.d.ts.map +1 -0
  319. package/dist/component/component3d.js +99 -0
  320. package/dist/component/component3d.js.map +1 -0
  321. package/dist/component/factory.d.ts +63 -0
  322. package/dist/component/factory.d.ts.map +1 -0
  323. package/dist/component/factory.js +313 -0
  324. package/dist/component/factory.js.map +1 -0
  325. package/dist/component/modules/aim.d.ts +30 -0
  326. package/dist/component/modules/aim.d.ts.map +1 -0
  327. package/dist/component/modules/aim.js +39 -0
  328. package/dist/component/modules/aim.js.map +1 -0
  329. package/dist/component/modules/corners.d.ts +13 -0
  330. package/dist/component/modules/corners.d.ts.map +1 -0
  331. package/dist/component/modules/corners.js +12 -0
  332. package/dist/component/modules/corners.js.map +1 -0
  333. package/dist/component/modules/flow.d.ts +26 -0
  334. package/dist/component/modules/flow.d.ts.map +1 -0
  335. package/dist/component/modules/flow.js +55 -0
  336. package/dist/component/modules/flow.js.map +1 -0
  337. package/dist/component/modules/material.d.ts +40 -0
  338. package/dist/component/modules/material.d.ts.map +1 -0
  339. package/dist/component/modules/material.js +75 -0
  340. package/dist/component/modules/material.js.map +1 -0
  341. package/dist/component/modules/paint.d.ts +71 -0
  342. package/dist/component/modules/paint.d.ts.map +1 -0
  343. package/dist/component/modules/paint.js +106 -0
  344. package/dist/component/modules/paint.js.map +1 -0
  345. package/dist/component/modules/shapes.d.ts +31 -0
  346. package/dist/component/modules/shapes.d.ts.map +1 -0
  347. package/dist/component/modules/shapes.js +43 -0
  348. package/dist/component/modules/shapes.js.map +1 -0
  349. package/dist/component/modules/text-layout.d.ts +26 -0
  350. package/dist/component/modules/text-layout.d.ts.map +1 -0
  351. package/dist/component/modules/text-layout.js +57 -0
  352. package/dist/component/modules/text-layout.js.map +1 -0
  353. package/dist/component/modules/text-style.d.ts +48 -0
  354. package/dist/component/modules/text-style.d.ts.map +1 -0
  355. package/dist/component/modules/text-style.js +63 -0
  356. package/dist/component/modules/text-style.js.map +1 -0
  357. package/dist/component/modules/three-entries.d.ts +23 -0
  358. package/dist/component/modules/three-entries.d.ts.map +1 -0
  359. package/dist/component/modules/three-entries.js +41 -0
  360. package/dist/component/modules/three-entries.js.map +1 -0
  361. package/dist/component/modules/view3d.d.ts +55 -0
  362. package/dist/component/modules/view3d.d.ts.map +1 -0
  363. package/dist/component/modules/view3d.js +160 -0
  364. package/dist/component/modules/view3d.js.map +1 -0
  365. package/dist/component/timeline.d.ts +22 -0
  366. package/dist/component/timeline.d.ts.map +1 -0
  367. package/dist/component/timeline.js +128 -0
  368. package/dist/component/timeline.js.map +1 -0
  369. package/dist/component/type-def.d.ts +26 -0
  370. package/dist/component/type-def.d.ts.map +1 -0
  371. package/dist/component/type-def.js +16 -0
  372. package/dist/component/type-def.js.map +1 -0
  373. package/dist/component/types.d.ts +91 -0
  374. package/dist/component/types.d.ts.map +1 -0
  375. package/dist/component/types.js +88 -0
  376. package/dist/component/types.js.map +1 -0
  377. package/dist/component/views.d.ts +121 -0
  378. package/dist/component/views.d.ts.map +1 -0
  379. package/dist/component/views.js +413 -0
  380. package/dist/component/views.js.map +1 -0
  381. package/dist/component.d.ts +4 -5
  382. package/dist/component.d.ts.map +1 -1
  383. package/dist/component.js +3 -5
  384. package/dist/component.js.map +1 -1
  385. package/dist/document/audio.d.ts +10 -2
  386. package/dist/document/audio.d.ts.map +1 -1
  387. package/dist/document/audio.js +45 -4
  388. package/dist/document/audio.js.map +1 -1
  389. package/dist/document/builtins.d.ts.map +1 -1
  390. package/dist/document/builtins.js +15 -39
  391. package/dist/document/builtins.js.map +1 -1
  392. package/dist/document/command-traits.d.ts +1 -1
  393. package/dist/document/command-traits.js +16 -1
  394. package/dist/document/command-traits.js.map +1 -1
  395. package/dist/document/deny-globals.js.map +1 -1
  396. package/dist/document/diff.d.ts.map +1 -1
  397. package/dist/document/diff.js +3 -3
  398. package/dist/document/diff.js.map +1 -1
  399. package/dist/document/doc-index.d.ts +2 -2
  400. package/dist/document/doc-index.d.ts.map +1 -1
  401. package/dist/document/doc-index.js +3 -3
  402. package/dist/document/doc-index.js.map +1 -1
  403. package/dist/document/expression/compile.d.ts.map +1 -1
  404. package/dist/document/expression/compile.js +8 -5
  405. package/dist/document/expression/compile.js.map +1 -1
  406. package/dist/document/expression/index.js.map +1 -1
  407. package/dist/document/expression/ops.js +1 -1
  408. package/dist/document/expression/ops.js.map +1 -1
  409. package/dist/document/expression/parse.d.ts.map +1 -1
  410. package/dist/document/expression/parse.js +15 -6
  411. package/dist/document/expression/parse.js.map +1 -1
  412. package/dist/document/expression/refs.d.ts +1 -1
  413. package/dist/document/expression/refs.js +1 -1
  414. package/dist/document/expression/refs.js.map +1 -1
  415. package/dist/document/expression/types.js.map +1 -1
  416. package/dist/document/expression/walk.d.ts.map +1 -1
  417. package/dist/document/expression/walk.js +2 -1
  418. package/dist/document/expression/walk.js.map +1 -1
  419. package/dist/document/index.d.ts +2 -0
  420. package/dist/document/index.d.ts.map +1 -1
  421. package/dist/document/index.js +2 -0
  422. package/dist/document/index.js.map +1 -1
  423. package/dist/document/node-decorator.js.map +1 -1
  424. package/dist/document/node-descriptor.d.ts +25 -0
  425. package/dist/document/node-descriptor.d.ts.map +1 -1
  426. package/dist/document/node-descriptor.js.map +1 -1
  427. package/dist/document/placement.d.ts +70 -0
  428. package/dist/document/placement.d.ts.map +1 -0
  429. package/dist/document/placement.js +83 -0
  430. package/dist/document/placement.js.map +1 -0
  431. package/dist/document/project.d.ts +2 -2
  432. package/dist/document/project.d.ts.map +1 -1
  433. package/dist/document/project.js.map +1 -1
  434. package/dist/document/registry.d.ts +23 -11
  435. package/dist/document/registry.d.ts.map +1 -1
  436. package/dist/document/registry.js +46 -19
  437. package/dist/document/registry.js.map +1 -1
  438. package/dist/document/settled-index.d.ts +49 -0
  439. package/dist/document/settled-index.d.ts.map +1 -0
  440. package/dist/document/settled-index.js +247 -0
  441. package/dist/document/settled-index.js.map +1 -0
  442. package/dist/document/timeline-patch.js.map +1 -1
  443. package/dist/document/timeline.d.ts +100 -19
  444. package/dist/document/timeline.d.ts.map +1 -1
  445. package/dist/document/timeline.js +290 -42
  446. package/dist/document/timeline.js.map +1 -1
  447. package/dist/document/types.d.ts +12 -12
  448. package/dist/document/types.d.ts.map +1 -1
  449. package/dist/document/types.js +2 -2
  450. package/dist/document/types.js.map +1 -1
  451. package/dist/document/validate.d.ts +2 -2
  452. package/dist/document/validate.d.ts.map +1 -1
  453. package/dist/document/validate.js +37 -31
  454. package/dist/document/validate.js.map +1 -1
  455. package/dist/document/withdraw.d.ts +28 -0
  456. package/dist/document/withdraw.d.ts.map +1 -0
  457. package/dist/document/withdraw.js +61 -0
  458. package/dist/document/withdraw.js.map +1 -0
  459. package/dist/experimental.d.ts +22 -0
  460. package/dist/experimental.d.ts.map +1 -0
  461. package/dist/experimental.js +20 -0
  462. package/dist/experimental.js.map +1 -0
  463. package/dist/index.d.ts +10 -0
  464. package/dist/index.d.ts.map +1 -1
  465. package/dist/index.js +10 -0
  466. package/dist/index.js.map +1 -1
  467. package/dist/jsx/jsx-dev-runtime.js.map +1 -1
  468. package/dist/jsx/jsx-runtime.d.ts +9 -1
  469. package/dist/jsx/jsx-runtime.d.ts.map +1 -1
  470. package/dist/jsx/jsx-runtime.js +13 -3
  471. package/dist/jsx/jsx-runtime.js.map +1 -1
  472. package/dist/layout/bounds.d.ts +0 -1
  473. package/dist/layout/bounds.d.ts.map +1 -1
  474. package/dist/layout/bounds.js.map +1 -1
  475. package/dist/layout/constraints.js.map +1 -1
  476. package/dist/layout/flex.d.ts +4 -2
  477. package/dist/layout/flex.d.ts.map +1 -1
  478. package/dist/layout/flex.js +27 -11
  479. package/dist/layout/flex.js.map +1 -1
  480. package/dist/layout/freeform.js.map +1 -1
  481. package/dist/layout/grid.js.map +1 -1
  482. package/dist/layout/index.js.map +1 -1
  483. package/dist/layout/item.js.map +1 -1
  484. package/dist/layout/ops.d.ts +6 -0
  485. package/dist/layout/ops.d.ts.map +1 -1
  486. package/dist/layout/ops.js +6 -0
  487. package/dist/layout/ops.js.map +1 -1
  488. package/dist/layout/types.js.map +1 -1
  489. package/dist/nodes/2d/node-lifecycle.js.map +1 -1
  490. package/dist/nodes/2d/node-motion.js.map +1 -1
  491. package/dist/nodes/2d/node-render.d.ts +3 -3
  492. package/dist/nodes/2d/node-render.d.ts.map +1 -1
  493. package/dist/nodes/2d/node-render.js.map +1 -1
  494. package/dist/nodes/2d/node-transform.js.map +1 -1
  495. package/dist/nodes/2d/node2d.d.ts +115 -3
  496. package/dist/nodes/2d/node2d.d.ts.map +1 -1
  497. package/dist/nodes/2d/node2d.js +180 -28
  498. package/dist/nodes/2d/node2d.js.map +1 -1
  499. package/dist/nodes/2d/paint-node.d.ts +27 -0
  500. package/dist/nodes/2d/paint-node.d.ts.map +1 -1
  501. package/dist/nodes/2d/paint-node.js +42 -0
  502. package/dist/nodes/2d/paint-node.js.map +1 -1
  503. package/dist/nodes/audio/audio-bus.js.map +1 -1
  504. package/dist/nodes/audio/index.d.ts +2 -2
  505. package/dist/nodes/audio/index.d.ts.map +1 -1
  506. package/dist/nodes/audio/index.js +0 -2
  507. package/dist/nodes/audio/index.js.map +1 -1
  508. package/dist/nodes/audio/node-audio.js.map +1 -1
  509. package/dist/nodes/audio/sound-node.d.ts +4 -3
  510. package/dist/nodes/audio/sound-node.d.ts.map +1 -1
  511. package/dist/nodes/audio/sound-node.js +4 -1
  512. package/dist/nodes/audio/sound-node.js.map +1 -1
  513. package/dist/nodes/geometry/bounds-shape-node.d.ts +4 -4
  514. package/dist/nodes/geometry/bounds-shape-node.js +2 -2
  515. package/dist/nodes/geometry/bounds-shape-node.js.map +1 -1
  516. package/dist/nodes/geometry/box-path-node.d.ts +3 -3
  517. package/dist/nodes/geometry/box-path-node.js +2 -2
  518. package/dist/nodes/geometry/box-path-node.js.map +1 -1
  519. package/dist/nodes/geometry/ellipse-node.js.map +1 -1
  520. package/dist/nodes/geometry/group-bounds.d.ts +2 -2
  521. package/dist/nodes/geometry/group-bounds.d.ts.map +1 -1
  522. package/dist/nodes/geometry/group-bounds.js +1 -2
  523. package/dist/nodes/geometry/group-bounds.js.map +1 -1
  524. package/dist/nodes/geometry/path-node.d.ts.map +1 -1
  525. package/dist/nodes/geometry/path-node.js +6 -0
  526. package/dist/nodes/geometry/path-node.js.map +1 -1
  527. package/dist/nodes/geometry/polygon-node.js.map +1 -1
  528. package/dist/nodes/geometry/polygram-node.js.map +1 -1
  529. package/dist/nodes/geometry/rect-node.js.map +1 -1
  530. package/dist/nodes/geometry/shape-node.js.map +1 -1
  531. package/dist/nodes/geometry/shape-outline.d.ts +2 -2
  532. package/dist/nodes/geometry/shape-outline.d.ts.map +1 -1
  533. package/dist/nodes/geometry/shape-outline.js +2 -13
  534. package/dist/nodes/geometry/shape-outline.js.map +1 -1
  535. package/dist/nodes/index.d.ts +40 -33
  536. package/dist/nodes/index.d.ts.map +1 -1
  537. package/dist/nodes/index.js +17 -36
  538. package/dist/nodes/index.js.map +1 -1
  539. package/dist/nodes/layout/camera-node.d.ts +9 -0
  540. package/dist/nodes/layout/camera-node.d.ts.map +1 -1
  541. package/dist/nodes/layout/camera-node.js +38 -3
  542. package/dist/nodes/layout/camera-node.js.map +1 -1
  543. package/dist/nodes/layout/orbit-camera-node.d.ts +1 -1
  544. package/dist/nodes/layout/orbit-camera-node.js +1 -1
  545. package/dist/nodes/layout/orbit-camera-node.js.map +1 -1
  546. package/dist/nodes/layout/rotated-box.js.map +1 -1
  547. package/dist/nodes/media/video-node.d.ts.map +1 -1
  548. package/dist/nodes/media/video-node.js +2 -0
  549. package/dist/nodes/media/video-node.js.map +1 -1
  550. package/dist/nodes/node/declare-paints.js.map +1 -1
  551. package/dist/nodes/node/node-editor-state.js.map +1 -1
  552. package/dist/nodes/node/node-reactive.js.map +1 -1
  553. package/dist/nodes/node/node-time.d.ts +3 -3
  554. package/dist/nodes/node/node-time.d.ts.map +1 -1
  555. package/dist/nodes/node/node-time.js +1 -1
  556. package/dist/nodes/node/node-time.js.map +1 -1
  557. package/dist/nodes/node/node-walk.js.map +1 -1
  558. package/dist/nodes/node/node.d.ts +12 -4
  559. package/dist/nodes/node/node.d.ts.map +1 -1
  560. package/dist/nodes/node/node.js +67 -27
  561. package/dist/nodes/node/node.js.map +1 -1
  562. package/dist/nodes/node/text-defaults.d.ts +10 -12
  563. package/dist/nodes/node/text-defaults.d.ts.map +1 -1
  564. package/dist/nodes/node/text-defaults.js +10 -12
  565. package/dist/nodes/node/text-defaults.js.map +1 -1
  566. package/dist/nodes/{scene → root}/canvas2d-node.d.ts +4 -3
  567. package/dist/nodes/root/canvas2d-node.d.ts.map +1 -0
  568. package/dist/nodes/{scene → root}/canvas2d-node.js +5 -2
  569. package/dist/nodes/root/canvas2d-node.js.map +1 -0
  570. package/dist/nodes/root/provider-node.d.ts.map +1 -0
  571. package/dist/nodes/root/provider-node.js.map +1 -0
  572. package/dist/nodes/root/theme-provider-node.d.ts.map +1 -0
  573. package/dist/nodes/root/theme-provider-node.js.map +1 -0
  574. package/dist/nodes/text/default-text-style-node.d.ts +5 -2
  575. package/dist/nodes/text/default-text-style-node.d.ts.map +1 -1
  576. package/dist/nodes/text/default-text-style-node.js +10 -4
  577. package/dist/nodes/text/default-text-style-node.js.map +1 -1
  578. package/dist/nodes/text/number-format.d.ts +1 -1
  579. package/dist/nodes/text/number-format.js +1 -1
  580. package/dist/nodes/text/number-format.js.map +1 -1
  581. package/dist/nodes/text/number-node.js.map +1 -1
  582. package/dist/nodes/text/number-pattern.js.map +1 -1
  583. package/dist/nodes/text/richtext-node.d.ts +0 -5
  584. package/dist/nodes/text/richtext-node.d.ts.map +1 -1
  585. package/dist/nodes/text/richtext-node.js +6 -72
  586. package/dist/nodes/text/richtext-node.js.map +1 -1
  587. package/dist/nodes/text/text-base.d.ts +5 -22
  588. package/dist/nodes/text/text-base.d.ts.map +1 -1
  589. package/dist/nodes/text/text-base.js +13 -364
  590. package/dist/nodes/text/text-base.js.map +1 -1
  591. package/dist/nodes/text/text-layout.d.ts +87 -0
  592. package/dist/nodes/text/text-layout.d.ts.map +1 -0
  593. package/dist/nodes/text/text-layout.js +368 -0
  594. package/dist/nodes/text/text-layout.js.map +1 -0
  595. package/dist/nodes/text/text-node.js.map +1 -1
  596. package/dist/nodes/text/text-selection.js.map +1 -1
  597. package/dist/nodes/three/camera-nodes.d.ts +21 -3
  598. package/dist/nodes/three/camera-nodes.d.ts.map +1 -1
  599. package/dist/nodes/three/camera-nodes.js +42 -1
  600. package/dist/nodes/three/camera-nodes.js.map +1 -1
  601. package/dist/nodes/three/canvas3d-node.d.ts +32 -7
  602. package/dist/nodes/three/canvas3d-node.d.ts.map +1 -1
  603. package/dist/nodes/three/canvas3d-node.js +50 -2
  604. package/dist/nodes/three/canvas3d-node.js.map +1 -1
  605. package/dist/nodes/three/drawable-nodes.d.ts +25 -11
  606. package/dist/nodes/three/drawable-nodes.d.ts.map +1 -1
  607. package/dist/nodes/three/drawable-nodes.js +43 -13
  608. package/dist/nodes/three/drawable-nodes.js.map +1 -1
  609. package/dist/nodes/three/environment-nodes.d.ts +9 -3
  610. package/dist/nodes/three/environment-nodes.d.ts.map +1 -1
  611. package/dist/nodes/three/environment-nodes.js.map +1 -1
  612. package/dist/nodes/three/geometry-nodes.d.ts +2 -2
  613. package/dist/nodes/three/geometry-nodes.js +2 -2
  614. package/dist/nodes/three/geometry-nodes.js.map +1 -1
  615. package/dist/nodes/three/grid-geometry3d.js.map +1 -1
  616. package/dist/nodes/three/group3d.js.map +1 -1
  617. package/dist/nodes/three/light-nodes.d.ts.map +1 -1
  618. package/dist/nodes/three/light-nodes.js +3 -3
  619. package/dist/nodes/three/light-nodes.js.map +1 -1
  620. package/dist/nodes/three/mesh3d.js.map +1 -1
  621. package/dist/nodes/three/node3d.d.ts +48 -0
  622. package/dist/nodes/three/node3d.d.ts.map +1 -1
  623. package/dist/nodes/three/node3d.js +53 -3
  624. package/dist/nodes/three/node3d.js.map +1 -1
  625. package/dist/platform/audio-sink.d.ts +2 -2
  626. package/dist/platform/audio-sink.d.ts.map +1 -1
  627. package/dist/platform/audio-sink.js.map +1 -1
  628. package/dist/platform/exporter.d.ts +13 -8
  629. package/dist/platform/exporter.d.ts.map +1 -1
  630. package/dist/platform/exporter.js.map +1 -1
  631. package/dist/platform/index.d.ts +1 -1
  632. package/dist/platform/index.d.ts.map +1 -1
  633. package/dist/platform/index.js.map +1 -1
  634. package/dist/platform/stepped-clock.js.map +1 -1
  635. package/dist/platform/storage-adapter.d.ts +12 -6
  636. package/dist/platform/storage-adapter.d.ts.map +1 -1
  637. package/dist/platform/storage-adapter.js +4 -0
  638. package/dist/platform/storage-adapter.js.map +1 -1
  639. package/dist/platform/ticker.d.ts +6 -0
  640. package/dist/platform/ticker.d.ts.map +1 -1
  641. package/dist/platform/ticker.js +6 -0
  642. package/dist/platform/ticker.js.map +1 -1
  643. package/dist/project/config.js.map +1 -1
  644. package/dist/project/index.js.map +1 -1
  645. package/dist/project/tree.d.ts +3 -3
  646. package/dist/project/tree.d.ts.map +1 -1
  647. package/dist/project/tree.js.map +1 -1
  648. package/dist/props/host.js.map +1 -1
  649. package/dist/props/index.js.map +1 -1
  650. package/dist/props/observer.js.map +1 -1
  651. package/dist/props/slot.js.map +1 -1
  652. package/dist/renamed-scene-names.d.ts +17 -0
  653. package/dist/renamed-scene-names.d.ts.map +1 -0
  654. package/dist/renamed-scene-names.js +9 -0
  655. package/dist/renamed-scene-names.js.map +1 -0
  656. package/dist/render/canvas-render-context2d.d.ts +2 -2
  657. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  658. package/dist/render/canvas-render-context2d.js.map +1 -1
  659. package/dist/render/clip-contains.js.map +1 -1
  660. package/dist/render/clip.js.map +1 -1
  661. package/dist/render/descriptors/ellipse.js.map +1 -1
  662. package/dist/render/descriptors/latex.js.map +1 -1
  663. package/dist/render/descriptors/line.js.map +1 -1
  664. package/dist/render/descriptors/path-builder.js.map +1 -1
  665. package/dist/render/descriptors/path.js.map +1 -1
  666. package/dist/render/descriptors/polygon.js.map +1 -1
  667. package/dist/render/descriptors/polygram.js.map +1 -1
  668. package/dist/render/descriptors/rect.js.map +1 -1
  669. package/dist/render/descriptors/richtext.js.map +1 -1
  670. package/dist/render/descriptors/shape.d.ts +12 -0
  671. package/dist/render/descriptors/shape.d.ts.map +1 -1
  672. package/dist/render/descriptors/shape.js.map +1 -1
  673. package/dist/render/descriptors/text.d.ts +2 -2
  674. package/dist/render/descriptors/text.js +2 -2
  675. package/dist/render/descriptors/text.js.map +1 -1
  676. package/dist/render/descriptors/transform.d.ts +2 -2
  677. package/dist/render/descriptors/transform.d.ts.map +1 -1
  678. package/dist/render/descriptors/transform.js.map +1 -1
  679. package/dist/render/graphics2d.d.ts +3 -3
  680. package/dist/render/graphics2d.d.ts.map +1 -1
  681. package/dist/render/graphics2d.js +1 -1
  682. package/dist/render/graphics2d.js.map +1 -1
  683. package/dist/render/index.js.map +1 -1
  684. package/dist/render/measure-context.js.map +1 -1
  685. package/dist/render/null-render-context.js.map +1 -1
  686. package/dist/render/render-context2d.d.ts +2 -2
  687. package/dist/render/render-context2d.d.ts.map +1 -1
  688. package/dist/render/render-context2d.js.map +1 -1
  689. package/dist/render/surface.js.map +1 -1
  690. package/dist/render/text-defaults.js.map +1 -1
  691. package/dist/render/text-layout.js.map +1 -1
  692. package/dist/render3d/bounds3d.d.ts.map +1 -1
  693. package/dist/render3d/bounds3d.js +4 -2
  694. package/dist/render3d/bounds3d.js.map +1 -1
  695. package/dist/render3d/builders.js.map +1 -1
  696. package/dist/render3d/camera.d.ts +6 -0
  697. package/dist/render3d/camera.d.ts.map +1 -1
  698. package/dist/render3d/camera.js +5 -3
  699. package/dist/render3d/camera.js.map +1 -1
  700. package/dist/render3d/fill3d.d.ts +2 -9
  701. package/dist/render3d/fill3d.d.ts.map +1 -1
  702. package/dist/render3d/fill3d.js +2 -13
  703. package/dist/render3d/fill3d.js.map +1 -1
  704. package/dist/render3d/geometry.d.ts +8 -1
  705. package/dist/render3d/geometry.d.ts.map +1 -1
  706. package/dist/render3d/geometry.js.map +1 -1
  707. package/dist/render3d/graphics3d.d.ts +8 -4
  708. package/dist/render3d/graphics3d.d.ts.map +1 -1
  709. package/dist/render3d/graphics3d.js +18 -10
  710. package/dist/render3d/graphics3d.js.map +1 -1
  711. package/dist/render3d/index.d.ts +1 -1
  712. package/dist/render3d/index.js +1 -1
  713. package/dist/render3d/index.js.map +1 -1
  714. package/dist/render3d/inert.d.ts +14 -0
  715. package/dist/render3d/inert.d.ts.map +1 -0
  716. package/dist/render3d/inert.js +62 -0
  717. package/dist/render3d/inert.js.map +1 -0
  718. package/dist/render3d/light.js.map +1 -1
  719. package/dist/render3d/material.d.ts +10 -5
  720. package/dist/render3d/material.d.ts.map +1 -1
  721. package/dist/render3d/material.js.map +1 -1
  722. package/dist/render3d/matrix4.js.map +1 -1
  723. package/dist/render3d/render-context3d.js.map +1 -1
  724. package/dist/render3d/resources.js.map +1 -1
  725. package/dist/render3d/rounded-box.js.map +1 -1
  726. package/dist/render3d/scene-settings.d.ts +23 -4
  727. package/dist/render3d/scene-settings.d.ts.map +1 -1
  728. package/dist/render3d/scene-settings.js.map +1 -1
  729. package/dist/render3d/scene3d.d.ts +11 -0
  730. package/dist/render3d/scene3d.d.ts.map +1 -1
  731. package/dist/render3d/scene3d.js +39 -6
  732. package/dist/render3d/scene3d.js.map +1 -1
  733. package/dist/render3d/segments.js.map +1 -1
  734. package/dist/render3d/texture.d.ts +9 -0
  735. package/dist/render3d/texture.d.ts.map +1 -1
  736. package/dist/render3d/texture.js +13 -0
  737. package/dist/render3d/texture.js.map +1 -1
  738. package/dist/render3d/tracking.js.map +1 -1
  739. package/dist/render3d/transform.d.ts +1 -1
  740. package/dist/render3d/transform.js.map +1 -1
  741. package/dist/render3d/vector3.d.ts +18 -1
  742. package/dist/render3d/vector3.d.ts.map +1 -1
  743. package/dist/render3d/vector3.js +27 -0
  744. package/dist/render3d/vector3.js.map +1 -1
  745. package/dist/render3d/walk.d.ts +1 -1
  746. package/dist/render3d/walk.d.ts.map +1 -1
  747. package/dist/render3d/walk.js +5 -1
  748. package/dist/render3d/walk.js.map +1 -1
  749. package/dist/runtime/asset-refine.js.map +1 -1
  750. package/dist/runtime/asset-timeline.js.map +1 -1
  751. package/dist/runtime/asset-update.js.map +1 -1
  752. package/dist/runtime/audio-index.js.map +1 -1
  753. package/dist/runtime/builtin-context.js.map +1 -1
  754. package/dist/runtime/clip-instance.d.ts +9 -4
  755. package/dist/runtime/clip-instance.d.ts.map +1 -1
  756. package/dist/runtime/clip-instance.js +27 -9
  757. package/dist/runtime/clip-instance.js.map +1 -1
  758. package/dist/runtime/clip-store.d.ts +18 -0
  759. package/dist/runtime/clip-store.d.ts.map +1 -1
  760. package/dist/runtime/clip-store.js +97 -0
  761. package/dist/runtime/clip-store.js.map +1 -1
  762. package/dist/runtime/engine.d.ts +5 -0
  763. package/dist/runtime/engine.d.ts.map +1 -1
  764. package/dist/runtime/engine.js +2 -0
  765. package/dist/runtime/engine.js.map +1 -1
  766. package/dist/runtime/frame-time.d.ts +31 -0
  767. package/dist/runtime/frame-time.d.ts.map +1 -0
  768. package/dist/runtime/frame-time.js +29 -0
  769. package/dist/runtime/frame-time.js.map +1 -0
  770. package/dist/runtime/index.d.ts +1 -0
  771. package/dist/runtime/index.d.ts.map +1 -1
  772. package/dist/runtime/index.js +1 -0
  773. package/dist/runtime/index.js.map +1 -1
  774. package/dist/runtime/node-picking.d.ts +44 -3
  775. package/dist/runtime/node-picking.d.ts.map +1 -1
  776. package/dist/runtime/node-picking.js +124 -10
  777. package/dist/runtime/node-picking.js.map +1 -1
  778. package/dist/runtime/node-picking3d.d.ts +13 -5
  779. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  780. package/dist/runtime/node-picking3d.js +10 -2
  781. package/dist/runtime/node-picking3d.js.map +1 -1
  782. package/dist/runtime/placement.d.ts.map +1 -1
  783. package/dist/runtime/placement.js +4 -5
  784. package/dist/runtime/placement.js.map +1 -1
  785. package/dist/runtime/playback-controller.d.ts +31 -2
  786. package/dist/runtime/playback-controller.d.ts.map +1 -1
  787. package/dist/runtime/playback-controller.js +63 -6
  788. package/dist/runtime/playback-controller.js.map +1 -1
  789. package/dist/runtime/playback.js.map +1 -1
  790. package/dist/runtime/precompisition.js.map +1 -1
  791. package/dist/runtime/project-assets.js.map +1 -1
  792. package/dist/runtime/session.d.ts +9 -7
  793. package/dist/runtime/session.d.ts.map +1 -1
  794. package/dist/runtime/session.js +12 -4
  795. package/dist/runtime/session.js.map +1 -1
  796. package/dist/runtime/settle.js.map +1 -1
  797. package/dist/runtime/state-evaluator.d.ts +1 -1
  798. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  799. package/dist/runtime/state-evaluator.js +4 -3
  800. package/dist/runtime/state-evaluator.js.map +1 -1
  801. package/dist/runtime/text-geometry.d.ts.map +1 -1
  802. package/dist/runtime/text-geometry.js +7 -3
  803. package/dist/runtime/text-geometry.js.map +1 -1
  804. package/dist/sdk/index.d.ts +50 -25
  805. package/dist/sdk/index.d.ts.map +1 -1
  806. package/dist/sdk/index.js +52 -42
  807. package/dist/sdk/index.js.map +1 -1
  808. package/dist/tween/command-decorator.d.ts +2 -0
  809. package/dist/tween/command-decorator.d.ts.map +1 -1
  810. package/dist/tween/command-decorator.js.map +1 -1
  811. package/dist/tween/command.d.ts +12 -0
  812. package/dist/tween/command.d.ts.map +1 -1
  813. package/dist/tween/command.js +14 -0
  814. package/dist/tween/command.js.map +1 -1
  815. package/dist/tween/ease/constants.d.ts.map +1 -1
  816. package/dist/tween/ease/constants.js +8 -5
  817. package/dist/tween/ease/constants.js.map +1 -1
  818. package/dist/tween/ease/curve.d.ts.map +1 -1
  819. package/dist/tween/ease/curve.js +4 -3
  820. package/dist/tween/ease/curve.js.map +1 -1
  821. package/dist/tween/ease/describe.d.ts +15 -0
  822. package/dist/tween/ease/describe.d.ts.map +1 -0
  823. package/dist/tween/ease/describe.js +37 -0
  824. package/dist/tween/ease/describe.js.map +1 -0
  825. package/dist/tween/ease/type.js.map +1 -1
  826. package/dist/tween/index.js.map +1 -1
  827. package/dist/tween/inert.js.map +1 -1
  828. package/dist/tween/lerp.js.map +1 -1
  829. package/dist/tween/loop.js.map +1 -1
  830. package/dist/tween/prepare.d.ts +3 -3
  831. package/dist/tween/prepare.js +3 -3
  832. package/dist/tween/prepare.js.map +1 -1
  833. package/dist/tween/seekable.d.ts +1 -1
  834. package/dist/tween/seekable.js.map +1 -1
  835. package/dist/tween/stepper.js.map +1 -1
  836. package/dist/tween/to-command.js.map +1 -1
  837. package/dist/util/clamp.js.map +1 -1
  838. package/dist/util/context.js.map +1 -1
  839. package/dist/util/csv.js.map +1 -1
  840. package/dist/util/generateList.js.map +1 -1
  841. package/dist/util/index.js.map +1 -1
  842. package/dist/util/metrics.d.ts +1 -1
  843. package/dist/util/metrics.js +1 -1
  844. package/dist/util/metrics.js.map +1 -1
  845. package/dist/util/random.js.map +1 -1
  846. package/dist/util/reference.js.map +1 -1
  847. package/dist/util/scheduler.js.map +1 -1
  848. package/package.json +7 -1
  849. package/dist/attributes/shape/effects/implementations/displace.d.ts +0 -48
  850. package/dist/attributes/shape/effects/implementations/displace.d.ts.map +0 -1
  851. package/dist/attributes/shape/effects/implementations/displace.js +0 -30
  852. package/dist/attributes/shape/effects/implementations/displace.js.map +0 -1
  853. package/dist/attributes/shape/effects/implementations/god-rays.d.ts +0 -28
  854. package/dist/attributes/shape/effects/implementations/god-rays.d.ts.map +0 -1
  855. package/dist/attributes/shape/effects/implementations/god-rays.js +0 -26
  856. package/dist/attributes/shape/effects/implementations/god-rays.js.map +0 -1
  857. package/dist/attributes/shape/effects/implementations/texture.d.ts +0 -28
  858. package/dist/attributes/shape/effects/implementations/texture.d.ts.map +0 -1
  859. package/dist/attributes/shape/effects/implementations/texture.js +0 -25
  860. package/dist/attributes/shape/effects/implementations/texture.js.map +0 -1
  861. package/dist/attributes/shape/effects/implementations/trails.d.ts +0 -41
  862. package/dist/attributes/shape/effects/implementations/trails.d.ts.map +0 -1
  863. package/dist/attributes/shape/effects/implementations/trails.js +0 -22
  864. package/dist/attributes/shape/effects/implementations/trails.js.map +0 -1
  865. package/dist/browser/chunks/chunk-2T3HXSC2.js +0 -2
  866. package/dist/browser/chunks/chunk-2T3HXSC2.js.map +0 -7
  867. package/dist/browser/chunks/chunk-KJXGRHOL.js +0 -3
  868. package/dist/browser/chunks/chunk-KJXGRHOL.js.map +0 -7
  869. package/dist/browser/chunks/chunk-TGDX2SS2.js +0 -18
  870. package/dist/browser/chunks/chunk-TGDX2SS2.js.map +0 -7
  871. package/dist/nodes/geometry/dot-grid-node.d.ts +0 -105
  872. package/dist/nodes/geometry/dot-grid-node.d.ts.map +0 -1
  873. package/dist/nodes/geometry/dot-grid-node.js +0 -142
  874. package/dist/nodes/geometry/dot-grid-node.js.map +0 -1
  875. package/dist/nodes/geometry/grid-lines.d.ts +0 -101
  876. package/dist/nodes/geometry/grid-lines.d.ts.map +0 -1
  877. package/dist/nodes/geometry/grid-lines.js +0 -128
  878. package/dist/nodes/geometry/grid-lines.js.map +0 -1
  879. package/dist/nodes/geometry/grid-pattern-node.d.ts +0 -58
  880. package/dist/nodes/geometry/grid-pattern-node.d.ts.map +0 -1
  881. package/dist/nodes/geometry/grid-pattern-node.js +0 -172
  882. package/dist/nodes/geometry/grid-pattern-node.js.map +0 -1
  883. package/dist/nodes/geometry/line-grid-node.d.ts +0 -62
  884. package/dist/nodes/geometry/line-grid-node.d.ts.map +0 -1
  885. package/dist/nodes/geometry/line-grid-node.js +0 -127
  886. package/dist/nodes/geometry/line-grid-node.js.map +0 -1
  887. package/dist/nodes/geometry/line-node.d.ts +0 -58
  888. package/dist/nodes/geometry/line-node.d.ts.map +0 -1
  889. package/dist/nodes/geometry/line-node.js +0 -123
  890. package/dist/nodes/geometry/line-node.js.map +0 -1
  891. package/dist/nodes/geometry/viewport-pattern-node.d.ts +0 -39
  892. package/dist/nodes/geometry/viewport-pattern-node.d.ts.map +0 -1
  893. package/dist/nodes/geometry/viewport-pattern-node.js +0 -79
  894. package/dist/nodes/geometry/viewport-pattern-node.js.map +0 -1
  895. package/dist/nodes/scene/canvas2d-node.d.ts.map +0 -1
  896. package/dist/nodes/scene/canvas2d-node.js.map +0 -1
  897. package/dist/nodes/scene/provider-node.d.ts.map +0 -1
  898. package/dist/nodes/scene/provider-node.js.map +0 -1
  899. package/dist/nodes/scene/theme-provider-node.d.ts.map +0 -1
  900. package/dist/nodes/scene/theme-provider-node.js.map +0 -1
  901. /package/dist/nodes/{scene → root}/provider-node.d.ts +0 -0
  902. /package/dist/nodes/{scene → root}/provider-node.js +0 -0
  903. /package/dist/nodes/{scene → root}/theme-provider-node.d.ts +0 -0
  904. /package/dist/nodes/{scene → root}/theme-provider-node.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"random.js","sourceRoot":"","sources":["../../src/util/random.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Deterministic pseudo-random number generator based on the mulberry32 algorithm.\n * Produces the same sequence for the same seed, making animations reproducible.\n *\n * This is the low-level engine. Scene authors use the higher-level {@link Random}\n * facade (handed out by `stage.random(seed)`), which wraps a `SeedGenerator` and\n * adds typed draws (`nextFloat`/`nextInt`/`gauss`/arrays) plus seeded `noise`.\n */\nexport class SeedGenerator {\n private state: number = 0;\n\n constructor(seed: string | number) {\n this.setSeed(seed);\n }\n\n /**\n * Resets the generator to a new seed.\n * String seeds are hashed via djb2 into a 32-bit integer.\n */\n setSeed(seed: string | number) {\n this.state = typeof seed === 'string'\n ? seed.split('').reduce((a, b) => { a = ((a << 5) - a) + b.charCodeAt(0); return a & a; }, 0)\n : seed;\n }\n\n /** Returns the next pseudo-random float in [0, 1). */\n next() {\n this.state |= 0; this.state = this.state + 0x6D2B79F5 | 0;\n var t = Math.imul(this.state ^ this.state >>> 15, 1 | this.state);\n t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n }\n}\n\n/** Upper bound of {@link Random.nextInt} / {@link Random.intArray} (2^32). */\nconst UINT32_RANGE = 4294967296;\n\n/**\n * A seeded random source handed to scene generators by `stage.random(seed)`.\n *\n * Wraps a {@link SeedGenerator} (mulberry32) and exposes the author-facing draw\n * surface. Because the seed lives on the `Random` instance, determinism is\n * scoped per source: two scenes can each `stage.random(\"name\")` and get their\n * own reproducible stream without touching a shared stage-level seed.\n *\n * const random = stage.random(\"sparkle\");\n * const xs = random.floatArray(40, -100, 100); // 40 reproducible offsets\n * const drift = random.noise(t, 6); // smooth field over time\n *\n * Two families live here, and they are NOT interchangeable:\n * - **Independent draws** — `nextFloat`/`nextInt`/`gauss` and their array\n * forms. Successive calls are uncorrelated; `gauss` only changes the\n * *distribution* (bell curve vs flat), not the independence.\n * - **Correlated field** — `noise(t)`. Nearby inputs return nearby values, so\n * it is the right tool for smooth motion over time/space (drift, shake,\n * waves). No distribution draw can reproduce that smoothness.\n */\nexport class Random {\n /** The seed this source rewinds to; reassign via {@link seed} or\n * {@link reset}. Set by {@link adopt} (definitely assigned via the\n * constructor's `adopt` call). */\n private _seed!: string | number;\n\n /** Numeric form of {@link _seed}, used to mix `noise`'s lattice. Kept in\n * lockstep with `_seed` through {@link adopt}. */\n private numericSeed!: number;\n\n private readonly gen: SeedGenerator;\n\n /** A spare gaussian sample from the last Box–Muller pair (see {@link gauss}). */\n private spareGauss: number | null = null;\n\n constructor(seed: string | number) {\n this.gen = new SeedGenerator(seed);\n this.adopt(seed);\n }\n\n /** The seed this source rewinds to. Assigning a new value re-anchors the\n * source (same effect as `reset(seed)`): the next draws reproduce the\n * sequence for that seed, and `noise`'s lattice shifts to match. */\n get seed(): string | number {\n return this._seed;\n }\n set seed(seed: string | number) {\n this.adopt(seed);\n }\n\n /** Numeric form of a seed: string seeds are hashed (the same djb2-style mix\n * the generator uses), numbers pass through. Shared so the constructor, the\n * {@link seed} setter, and {@link reset} all derive `numericSeed` identically. */\n private static toNumeric(seed: string | number): number {\n return typeof seed === 'string'\n ? seed.split('').reduce((a, b) => (a << 5) - a + b.charCodeAt(0), 0)\n : seed;\n }\n\n /** Take `seed` as the new origin and rewind to it: store it, recompute the\n * `noise` lattice anchor, reset the generator, and drop any spare gauss. The\n * single seed-adoption path behind the constructor, {@link seed}, and a\n * seeded {@link reset}. */\n private adopt(seed: string | number): void {\n this._seed = seed;\n this.numericSeed = Random.toNumeric(seed);\n this.gen.setSeed(seed);\n this.spareGauss = null;\n }\n\n /**\n * The next pseudo-random float in `[from, to)`. Defaults to `[0, 1)`.\n */\n nextFloat(from: number = 0, to: number = 1): number {\n return this.gen.next() * (to - from) + from;\n }\n\n /**\n * The next pseudo-random integer in `[from, to)`. Defaults to the full\n * unsigned 32-bit range `[0, 2^32)`.\n */\n nextInt(from: number = 0, to: number = UINT32_RANGE): number {\n return Math.floor(this.gen.next() * (to - from)) + from;\n }\n\n /** `size` independent floats in `[from, to)`. */\n floatArray(size: number, from: number = 0, to: number = 1): number[] {\n const out = new Array<number>(size);\n for (let i = 0; i < size; i++) out[i] = this.nextFloat(from, to);\n return out;\n }\n\n /** `size` independent integers in `[from, to)`. */\n intArray(size: number, from: number = 0, to: number = UINT32_RANGE): number[] {\n const out = new Array<number>(size);\n for (let i = 0; i < size; i++) out[i] = this.nextInt(from, to);\n return out;\n }\n\n /**\n * A normally-distributed sample with the given `mean` and `stdev` (default\n * standard normal). Values cluster near the mean and tail off — useful for\n * natural-looking scatter where most draws stay central with occasional\n * outliers.\n *\n * Uses the polar Box–Muller transform, which yields two independent normals\n * per pair of uniforms; the spare is cached and returned on the next call.\n */\n gauss(mean: number = 0, stdev: number = 1): number {\n if (this.spareGauss !== null) {\n const z = this.spareGauss;\n this.spareGauss = null;\n return mean + stdev * z;\n }\n // Rejection-sample a point in the unit circle, then map to two normals.\n let u: number, v: number, s: number;\n do {\n u = this.gen.next() * 2 - 1;\n v = this.gen.next() * 2 - 1;\n s = u * u + v * v;\n } while (s >= 1 || s === 0);\n const mul = Math.sqrt(-2 * Math.log(s) / s);\n this.spareGauss = v * mul;\n return mean + stdev * (u * mul);\n }\n\n /**\n * Smooth 1-D value noise in `[0, 1]`.\n *\n * Samples two adjacent lattice points around `time * frequency`, then\n * interpolates with a smoothstep curve (`3t² - 2t³`) to avoid the linear\n * kinks of plain lerp. Unlike {@link nextFloat}/{@link gauss}, nearby\n * `time` inputs return nearby values — this is the correlated field used for\n * organic, continuously varying motion (camera shake, drift, waves).\n *\n * @param time Sample position (e.g. normalized timeline `[0, 1]`, or a\n * spatial index).\n * @param frequency Scales `time` before sampling; higher = faster\n * oscillation / more crests across the same span.\n */\n noise(time: number, frequency: number = 1): number {\n const t = time * frequency;\n const i = Math.floor(t);\n const f = t - i;\n // Smoothstep: maps f through 3f²-2f³ to ease in/out between lattice points.\n const curve = f * f * (3 - 2 * f);\n const r1 = this.latticeValue(i);\n const r2 = this.latticeValue(i + 1);\n return r1 + (r2 - r1) * curve;\n }\n\n /**\n * Rewind this source so the next draws reproduce a sequence from the start.\n *\n * With no argument, rewinds to the current {@link seed} — what authors call to\n * repeat a sequence within a scene. Pass a `seed` to adopt it as the new origin\n * first (equivalent to assigning {@link seed}), so the source both re-seeds and\n * rewinds in one call — e.g. in a node's constructor to give it a distinct\n * reproducible stream.\n */\n reset(seed: string | number = this._seed): void {\n this.adopt(seed);\n }\n\n /**\n * Deterministic value in `[0, 1)` for a given integer lattice point `x`,\n * mixed with this source's seed via `sin`. Pure in `x` (no generator state),\n * so {@link noise} is stable regardless of how many draws preceded it.\n */\n private latticeValue(x: number): number {\n const h = Math.sin(x + this.numericSeed) * 10000;\n return h - Math.floor(h);\n }\n}\n"]}
1
+ {"version":3,"file":"random.js","sourceRoot":"","sources":["../../src/util/random.ts"],"names":[],"mappings":"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","sourcesContent":["/**\r\n * Deterministic pseudo-random number generator based on the mulberry32 algorithm.\r\n * Produces the same sequence for the same seed, making animations reproducible.\r\n *\r\n * This is the low-level engine. Scene authors use the higher-level {@link Random}\r\n * facade (handed out by `stage.random(seed)`), which wraps a `SeedGenerator` and\r\n * adds typed draws (`nextFloat`/`nextInt`/`gauss`/arrays) plus seeded `noise`.\r\n */\r\nexport class SeedGenerator {\r\n private state: number = 0;\r\n\r\n constructor(seed: string | number) {\r\n this.setSeed(seed);\r\n }\r\n\r\n /**\r\n * Resets the generator to a new seed.\r\n * String seeds are hashed via djb2 into a 32-bit integer.\r\n */\r\n setSeed(seed: string | number) {\r\n this.state = typeof seed === 'string'\r\n ? seed.split('').reduce((a, b) => { a = ((a << 5) - a) + b.charCodeAt(0); return a & a; }, 0)\r\n : seed;\r\n }\r\n\r\n /** Returns the next pseudo-random float in [0, 1). */\r\n next() {\r\n this.state |= 0; this.state = this.state + 0x6D2B79F5 | 0;\r\n var t = Math.imul(this.state ^ this.state >>> 15, 1 | this.state);\r\n t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;\r\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\r\n }\r\n}\r\n\r\n/** Upper bound of {@link Random.nextInt} / {@link Random.intArray} (2^32). */\r\nconst UINT32_RANGE = 4294967296;\r\n\r\n/**\r\n * A seeded random source handed to scene generators by `stage.random(seed)`.\r\n *\r\n * Wraps a {@link SeedGenerator} (mulberry32) and exposes the author-facing draw\r\n * surface. Because the seed lives on the `Random` instance, determinism is\r\n * scoped per source: two scenes can each `stage.random(\"name\")` and get their\r\n * own reproducible stream without touching a shared stage-level seed.\r\n *\r\n * const random = stage.random(\"sparkle\");\r\n * const xs = random.floatArray(40, -100, 100); // 40 reproducible offsets\r\n * const drift = random.noise(t, 6); // smooth field over time\r\n *\r\n * Two families live here, and they are NOT interchangeable:\r\n * - **Independent draws** — `nextFloat`/`nextInt`/`gauss` and their array\r\n * forms. Successive calls are uncorrelated; `gauss` only changes the\r\n * *distribution* (bell curve vs flat), not the independence.\r\n * - **Correlated field** — `noise(t)`. Nearby inputs return nearby values, so\r\n * it is the right tool for smooth motion over time/space (drift, shake,\r\n * waves). No distribution draw can reproduce that smoothness.\r\n */\r\nexport class Random {\r\n /** The seed this source rewinds to; reassign via {@link seed} or\r\n * {@link reset}. Set by {@link adopt} (definitely assigned via the\r\n * constructor's `adopt` call). */\r\n private _seed!: string | number;\r\n\r\n /** Numeric form of {@link _seed}, used to mix `noise`'s lattice. Kept in\r\n * lockstep with `_seed` through {@link adopt}. */\r\n private numericSeed!: number;\r\n\r\n private readonly gen: SeedGenerator;\r\n\r\n /** A spare gaussian sample from the last Box–Muller pair (see {@link gauss}). */\r\n private spareGauss: number | null = null;\r\n\r\n constructor(seed: string | number) {\r\n this.gen = new SeedGenerator(seed);\r\n this.adopt(seed);\r\n }\r\n\r\n /** The seed this source rewinds to. Assigning a new value re-anchors the\r\n * source (same effect as `reset(seed)`): the next draws reproduce the\r\n * sequence for that seed, and `noise`'s lattice shifts to match. */\r\n get seed(): string | number {\r\n return this._seed;\r\n }\r\n set seed(seed: string | number) {\r\n this.adopt(seed);\r\n }\r\n\r\n /** Numeric form of a seed: string seeds are hashed (the same djb2-style mix\r\n * the generator uses), numbers pass through. Shared so the constructor, the\r\n * {@link seed} setter, and {@link reset} all derive `numericSeed` identically. */\r\n private static toNumeric(seed: string | number): number {\r\n return typeof seed === 'string'\r\n ? seed.split('').reduce((a, b) => (a << 5) - a + b.charCodeAt(0), 0)\r\n : seed;\r\n }\r\n\r\n /** Take `seed` as the new origin and rewind to it: store it, recompute the\r\n * `noise` lattice anchor, reset the generator, and drop any spare gauss. The\r\n * single seed-adoption path behind the constructor, {@link seed}, and a\r\n * seeded {@link reset}. */\r\n private adopt(seed: string | number): void {\r\n this._seed = seed;\r\n this.numericSeed = Random.toNumeric(seed);\r\n this.gen.setSeed(seed);\r\n this.spareGauss = null;\r\n }\r\n\r\n /**\r\n * The next pseudo-random float in `[from, to)`. Defaults to `[0, 1)`.\r\n */\r\n nextFloat(from: number = 0, to: number = 1): number {\r\n return this.gen.next() * (to - from) + from;\r\n }\r\n\r\n /**\r\n * The next pseudo-random integer in `[from, to)`. Defaults to the full\r\n * unsigned 32-bit range `[0, 2^32)`.\r\n */\r\n nextInt(from: number = 0, to: number = UINT32_RANGE): number {\r\n return Math.floor(this.gen.next() * (to - from)) + from;\r\n }\r\n\r\n /** `size` independent floats in `[from, to)`. */\r\n floatArray(size: number, from: number = 0, to: number = 1): number[] {\r\n const out = new Array<number>(size);\r\n for (let i = 0; i < size; i++) out[i] = this.nextFloat(from, to);\r\n return out;\r\n }\r\n\r\n /** `size` independent integers in `[from, to)`. */\r\n intArray(size: number, from: number = 0, to: number = UINT32_RANGE): number[] {\r\n const out = new Array<number>(size);\r\n for (let i = 0; i < size; i++) out[i] = this.nextInt(from, to);\r\n return out;\r\n }\r\n\r\n /**\r\n * A normally-distributed sample with the given `mean` and `stdev` (default\r\n * standard normal). Values cluster near the mean and tail off — useful for\r\n * natural-looking scatter where most draws stay central with occasional\r\n * outliers.\r\n *\r\n * Uses the polar Box–Muller transform, which yields two independent normals\r\n * per pair of uniforms; the spare is cached and returned on the next call.\r\n */\r\n gauss(mean: number = 0, stdev: number = 1): number {\r\n if (this.spareGauss !== null) {\r\n const z = this.spareGauss;\r\n this.spareGauss = null;\r\n return mean + stdev * z;\r\n }\r\n // Rejection-sample a point in the unit circle, then map to two normals.\r\n let u: number, v: number, s: number;\r\n do {\r\n u = this.gen.next() * 2 - 1;\r\n v = this.gen.next() * 2 - 1;\r\n s = u * u + v * v;\r\n } while (s >= 1 || s === 0);\r\n const mul = Math.sqrt(-2 * Math.log(s) / s);\r\n this.spareGauss = v * mul;\r\n return mean + stdev * (u * mul);\r\n }\r\n\r\n /**\r\n * Smooth 1-D value noise in `[0, 1]`.\r\n *\r\n * Samples two adjacent lattice points around `time * frequency`, then\r\n * interpolates with a smoothstep curve (`3t² - 2t³`) to avoid the linear\r\n * kinks of plain lerp. Unlike {@link nextFloat}/{@link gauss}, nearby\r\n * `time` inputs return nearby values — this is the correlated field used for\r\n * organic, continuously varying motion (camera shake, drift, waves).\r\n *\r\n * @param time Sample position (e.g. normalized timeline `[0, 1]`, or a\r\n * spatial index).\r\n * @param frequency Scales `time` before sampling; higher = faster\r\n * oscillation / more crests across the same span.\r\n */\r\n noise(time: number, frequency: number = 1): number {\r\n const t = time * frequency;\r\n const i = Math.floor(t);\r\n const f = t - i;\r\n // Smoothstep: maps f through 3f²-2f³ to ease in/out between lattice points.\r\n const curve = f * f * (3 - 2 * f);\r\n const r1 = this.latticeValue(i);\r\n const r2 = this.latticeValue(i + 1);\r\n return r1 + (r2 - r1) * curve;\r\n }\r\n\r\n /**\r\n * Rewind this source so the next draws reproduce a sequence from the start.\r\n *\r\n * With no argument, rewinds to the current {@link seed} — what authors call to\r\n * repeat a sequence within a scene. Pass a `seed` to adopt it as the new origin\r\n * first (equivalent to assigning {@link seed}), so the source both re-seeds and\r\n * rewinds in one call — e.g. in a node's constructor to give it a distinct\r\n * reproducible stream.\r\n */\r\n reset(seed: string | number = this._seed): void {\r\n this.adopt(seed);\r\n }\r\n\r\n /**\r\n * Deterministic value in `[0, 1)` for a given integer lattice point `x`,\r\n * mixed with this source's seed via `sin`. Pure in `x` (no generator state),\r\n * so {@link noise} is stable regardless of how many draws preceded it.\r\n */\r\n private latticeValue(x: number): number {\r\n const h = Math.sin(x + this.numericSeed) * 10000;\r\n return h - Math.floor(h);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/util/reference.ts"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,MAAM,UAAU,SAAS;IACrB,IAAI,OAAO,GAAa,IAAI,CAAC;IAI7B,SAAS,GAAG,CAAC,IAAe;QACxB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;aAAM,CAAC;YACJ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAClD,CAAC;YACD,OAAO,OAAO,CAAC;QACnB,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["/**\n * A callable reference that acts as both getter and setter.\n * - `ref()` → returns the current value (throws if not yet assigned)\n * - `ref(value)` → sets the current value\n */\nexport interface Reference<T> {\n (): T;\n (node: T | null): void;\n /**\n * Phantom — never assigned at runtime, and never called. It exists so that\n * `T` appears in a *contravariant* position, which is what makes\n * {@link RefTarget} safe. The call signatures alone can't decide it: the\n * zero-arg getter `(): T` is assignable to any `(x) => void`, so a slot\n * typed as just the setter would silently accept a `Reference` of an\n * unrelated node type.\n * @internal\n */\n readonly __accepts?: (node: T) => void;\n}\n\n/**\n * A slot that can *receive* a `T` — a `Reference<T>`, or one declared as any\n * **supertype** of `T`.\n *\n * This is the type a node's `ref` prop takes, and the widening is deliberate:\n * the framework only ever writes into a ref (`props.ref(this)` in the `Node2D`\n * constructor) and the author only ever reads, so handing a `Rect` to a\n * `Reference<ShapeNode>` is sound in both directions — the write stores a\n * subtype, the read yields the supertype the author asked for. That is what\n * lets one ref hold whichever shape a factory happened to build:\n *\n * ```tsx\n * const ref = createRef<ShapeNode>();\n * <Rect ref={ref} /> // ✔ Rect is a ShapeNode\n * <Ellipse ref={ref} /> // ✔ so is Ellipse\n * ```\n *\n * The opposite direction stays an error, because it is the unsound one: a\n * `Reference<Rect>` on a `<Text>` would be handed a `Text` at runtime while\n * still typing every read as a `Rect`.\n *\n * A plain setter function is accepted too, which makes React-style callback\n * refs (`ref={n => …}`) work without a separate type.\n */\nexport type RefTarget<T> = {\n (node: T | null): void;\n readonly __accepts?: (node: T) => void;\n};\n\n/**\n * Creates a typed reference holder — analogous to React's `createRef`,\n * but expressed as a single overloaded function rather than a `{ current }` object.\n */\nexport function createRef<T>(): Reference<T> {\n let current: T | null = null;\n\n function ref(): T;\n function ref(node: T | null): void;\n function ref(node?: T | null): T | void {\n if (node !== undefined) {\n current = node;\n } else {\n if (current === null) {\n throw new Error(\"Reference not assigned yet\");\n }\n return current;\n }\n }\n\n return ref;\n}\n"]}
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/util/reference.ts"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,MAAM,UAAU,SAAS;IACrB,IAAI,OAAO,GAAa,IAAI,CAAC;IAI7B,SAAS,GAAG,CAAC,IAAe;QACxB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;aAAM,CAAC;YACJ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAClD,CAAC;YACD,OAAO,OAAO,CAAC;QACnB,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["/**\r\n * A callable reference that acts as both getter and setter.\r\n * - `ref()` → returns the current value (throws if not yet assigned)\r\n * - `ref(value)` → sets the current value\r\n */\r\nexport interface Reference<T> {\r\n (): T;\r\n (node: T | null): void;\r\n /**\r\n * Phantom — never assigned at runtime, and never called. It exists so that\r\n * `T` appears in a *contravariant* position, which is what makes\r\n * {@link RefTarget} safe. The call signatures alone can't decide it: the\r\n * zero-arg getter `(): T` is assignable to any `(x) => void`, so a slot\r\n * typed as just the setter would silently accept a `Reference` of an\r\n * unrelated node type.\r\n * @internal\r\n */\r\n readonly __accepts?: (node: T) => void;\r\n}\r\n\r\n/**\r\n * A slot that can *receive* a `T` — a `Reference<T>`, or one declared as any\r\n * **supertype** of `T`.\r\n *\r\n * This is the type a node's `ref` prop takes, and the widening is deliberate:\r\n * the framework only ever writes into a ref (`props.ref(this)` in the `Node2D`\r\n * constructor) and the author only ever reads, so handing a `Rect` to a\r\n * `Reference<ShapeNode>` is sound in both directions — the write stores a\r\n * subtype, the read yields the supertype the author asked for. That is what\r\n * lets one ref hold whichever shape a factory happened to build:\r\n *\r\n * ```tsx\r\n * const ref = createRef<ShapeNode>();\r\n * <Rect ref={ref} /> // ✔ Rect is a ShapeNode\r\n * <Ellipse ref={ref} /> // ✔ so is Ellipse\r\n * ```\r\n *\r\n * The opposite direction stays an error, because it is the unsound one: a\r\n * `Reference<Rect>` on a `<Text>` would be handed a `Text` at runtime while\r\n * still typing every read as a `Rect`.\r\n *\r\n * A plain setter function is accepted too, which makes React-style callback\r\n * refs (`ref={n => …}`) work without a separate type.\r\n */\r\nexport type RefTarget<T> = {\r\n (node: T | null): void;\r\n readonly __accepts?: (node: T) => void;\r\n};\r\n\r\n/**\r\n * Creates a typed reference holder — analogous to React's `createRef`,\r\n * but expressed as a single overloaded function rather than a `{ current }` object.\r\n */\r\nexport function createRef<T>(): Reference<T> {\r\n let current: T | null = null;\r\n\r\n function ref(): T;\r\n function ref(node: T | null): void;\r\n function ref(node?: T | null): T | void {\r\n if (node !== undefined) {\r\n current = node;\r\n } else {\r\n if (current === null) {\r\n throw new Error(\"Reference not assigned yet\");\r\n }\r\n return current;\r\n }\r\n }\r\n\r\n return ref;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../src/util/scheduler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,MAAM,UAAU,GAAG;IACf,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;QAC9E,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE;QACnB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAID,8EAA8E;AAC9E,SAAS,WAAW;IAChB,MAAM,CAAC,GAAI,UAAiD,CAAC,SAAS,CAAC;IACvE,OAAO,OAAO,CAAC,EAAE,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxE,CAAC;AAED;;;;;GAKG;AACH,IAAI,OAAO,GAA0B,IAAI,CAAC;AAC1C,MAAM,KAAK,GAAmB,EAAE,CAAC;AAEjC,SAAS,mBAAmB;IACxB,IAAI,OAAO,cAAc,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IACtD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC;QAClD,uEAAuE;QACvE,6DAA6D;QAC5D,OAAO,CAAC,KAA2C,CAAC,KAAK,EAAE,EAAE,CAAC;QAC9D,OAAO,CAAC,KAA2C,CAAC,KAAK,EAAE,EAAE,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;QAC/B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,OAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,gBAAgB;IAC5B,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC;IAC7B,IAAI,MAAM;QAAE,OAAO,MAAM,EAAE,CAAC;IAC5B,OAAO,mBAAmB,EAAE,IAAI,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,wBAAwB;IACpC,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,OAAO,GAAG,IAAI,CAAC;IACf,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Event-loop yielding, for work that must stay interruptible.\n *\n * A long synchronous loop on the main thread cannot be cancelled: nothing else\n * can run to *ask* it to stop. `StateEvaluator`'s backward-seek replay is\n * exactly that shape, so it yields periodically through {@link yieldToScheduler}\n * — which is what lets a newer seek supersede one already in flight.\n *\n * Core is backend-agnostic (no DOM), so every mechanism here is feature-detected\n * and the module works unchanged in a browser, in Node, and under vitest.\n */\n\n/** Monotonic-ish clock in milliseconds. `performance` is absent in some hosts. */\nexport function now(): number {\n return typeof performance !== \"undefined\" && typeof performance.now === \"function\"\n ? performance.now()\n : Date.now();\n}\n\ntype SchedulerWithYield = { yield?: () => Promise<void> };\n\n/** `scheduler.yield()` when the host has it (Chrome 129+), else undefined. */\nfunction nativeYield(): (() => Promise<void>) | undefined {\n const s = (globalThis as { scheduler?: SchedulerWithYield }).scheduler;\n return typeof s?.yield === \"function\" ? s.yield.bind(s) : undefined;\n}\n\n/**\n * A single shared `MessageChannel`, because a yield-per-channel would allocate\n * (and leak until GC) thousands of ports over one scrub. Callbacks queue in FIFO\n * order and each posted message drains exactly one, so resolution order matches\n * call order.\n */\nlet channel: MessageChannel | null = null;\nconst queue: (() => void)[] = [];\n\nfunction messageChannelYield(): Promise<void> | null {\n if (typeof MessageChannel !== \"function\") return null;\n if (!channel) {\n channel = new MessageChannel();\n channel.port1.onmessage = () => queue.shift()?.();\n // Node2D keeps the event loop alive for an open port, which would hang\n // vitest on exit. Browsers have no unref and don't need one.\n (channel.port1 as unknown as { unref?: () => void }).unref?.();\n (channel.port2 as unknown as { unref?: () => void }).unref?.();\n }\n return new Promise<void>(resolve => {\n queue.push(resolve);\n channel!.port2.postMessage(null);\n });\n}\n\n/**\n * Yield to the event loop, letting pending input, timers and rendering run\n * before the caller resumes.\n *\n * Deliberately a **macrotask**, not a microtask: `await Promise.resolve()`\n * drains within the same task and would starve exactly the work we're yielding\n * for. `requestAnimationFrame` is also wrong here — it caps throughput to the\n * display rate and stops entirely in a background tab, which would stall\n * headless export and tests.\n *\n * Preference order:\n * 1. `scheduler.yield()` — resumes at continuation priority, so a sliced task\n * isn't starved behind unrelated work queued while it was parked.\n * 2. `MessageChannel` — a true macrotask with no clamping, in browsers and\n * Node2D ≥ 15.\n * 3. `setTimeout(0)` — last resort; clamps to ~4 ms once nested, capping the\n * slice rate, but always available.\n */\nexport function yieldToScheduler(): Promise<void> {\n const native = nativeYield();\n if (native) return native();\n return messageChannelYield() ?? new Promise<void>(resolve => setTimeout(resolve, 0));\n}\n\n/** Drop the shared channel. Tests only — the next yield lazily rebuilds it. */\nexport function __resetSchedulerForTests(): void {\n channel?.port1.close();\n channel?.port2.close();\n channel = null;\n queue.length = 0;\n}\n"]}
1
+ {"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../src/util/scheduler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,MAAM,UAAU,GAAG;IACf,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;QAC9E,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE;QACnB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAID,8EAA8E;AAC9E,SAAS,WAAW;IAChB,MAAM,CAAC,GAAI,UAAiD,CAAC,SAAS,CAAC;IACvE,OAAO,OAAO,CAAC,EAAE,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxE,CAAC;AAED;;;;;GAKG;AACH,IAAI,OAAO,GAA0B,IAAI,CAAC;AAC1C,MAAM,KAAK,GAAmB,EAAE,CAAC;AAEjC,SAAS,mBAAmB;IACxB,IAAI,OAAO,cAAc,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IACtD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC;QAClD,uEAAuE;QACvE,6DAA6D;QAC5D,OAAO,CAAC,KAA2C,CAAC,KAAK,EAAE,EAAE,CAAC;QAC9D,OAAO,CAAC,KAA2C,CAAC,KAAK,EAAE,EAAE,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;QAC/B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,OAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,gBAAgB;IAC5B,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC;IAC7B,IAAI,MAAM;QAAE,OAAO,MAAM,EAAE,CAAC;IAC5B,OAAO,mBAAmB,EAAE,IAAI,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,wBAAwB;IACpC,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,OAAO,GAAG,IAAI,CAAC;IACf,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACrB,CAAC","sourcesContent":["/**\r\n * Event-loop yielding, for work that must stay interruptible.\r\n *\r\n * A long synchronous loop on the main thread cannot be cancelled: nothing else\r\n * can run to *ask* it to stop. `StateEvaluator`'s backward-seek replay is\r\n * exactly that shape, so it yields periodically through {@link yieldToScheduler}\r\n * — which is what lets a newer seek supersede one already in flight.\r\n *\r\n * Core is backend-agnostic (no DOM), so every mechanism here is feature-detected\r\n * and the module works unchanged in a browser, in Node, and under vitest.\r\n */\r\n\r\n/** Monotonic-ish clock in milliseconds. `performance` is absent in some hosts. */\r\nexport function now(): number {\r\n return typeof performance !== \"undefined\" && typeof performance.now === \"function\"\r\n ? performance.now()\r\n : Date.now();\r\n}\r\n\r\ntype SchedulerWithYield = { yield?: () => Promise<void> };\r\n\r\n/** `scheduler.yield()` when the host has it (Chrome 129+), else undefined. */\r\nfunction nativeYield(): (() => Promise<void>) | undefined {\r\n const s = (globalThis as { scheduler?: SchedulerWithYield }).scheduler;\r\n return typeof s?.yield === \"function\" ? s.yield.bind(s) : undefined;\r\n}\r\n\r\n/**\r\n * A single shared `MessageChannel`, because a yield-per-channel would allocate\r\n * (and leak until GC) thousands of ports over one scrub. Callbacks queue in FIFO\r\n * order and each posted message drains exactly one, so resolution order matches\r\n * call order.\r\n */\r\nlet channel: MessageChannel | null = null;\r\nconst queue: (() => void)[] = [];\r\n\r\nfunction messageChannelYield(): Promise<void> | null {\r\n if (typeof MessageChannel !== \"function\") return null;\r\n if (!channel) {\r\n channel = new MessageChannel();\r\n channel.port1.onmessage = () => queue.shift()?.();\r\n // Node2D keeps the event loop alive for an open port, which would hang\r\n // vitest on exit. Browsers have no unref and don't need one.\r\n (channel.port1 as unknown as { unref?: () => void }).unref?.();\r\n (channel.port2 as unknown as { unref?: () => void }).unref?.();\r\n }\r\n return new Promise<void>(resolve => {\r\n queue.push(resolve);\r\n channel!.port2.postMessage(null);\r\n });\r\n}\r\n\r\n/**\r\n * Yield to the event loop, letting pending input, timers and rendering run\r\n * before the caller resumes.\r\n *\r\n * Deliberately a **macrotask**, not a microtask: `await Promise.resolve()`\r\n * drains within the same task and would starve exactly the work we're yielding\r\n * for. `requestAnimationFrame` is also wrong here — it caps throughput to the\r\n * display rate and stops entirely in a background tab, which would stall\r\n * headless export and tests.\r\n *\r\n * Preference order:\r\n * 1. `scheduler.yield()` — resumes at continuation priority, so a sliced task\r\n * isn't starved behind unrelated work queued while it was parked.\r\n * 2. `MessageChannel` — a true macrotask with no clamping, in browsers and\r\n * Node2D ≥ 15.\r\n * 3. `setTimeout(0)` — last resort; clamps to ~4 ms once nested, capping the\r\n * slice rate, but always available.\r\n */\r\nexport function yieldToScheduler(): Promise<void> {\r\n const native = nativeYield();\r\n if (native) return native();\r\n return messageChannelYield() ?? new Promise<void>(resolve => setTimeout(resolve, 0));\r\n}\r\n\r\n/** Drop the shared channel. Tests only — the next yield lazily rebuilds it. */\r\nexport function __resetSchedulerForTests(): void {\r\n channel?.port1.close();\r\n channel?.port2.close();\r\n channel = null;\r\n queue.length = 0;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/core",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.6",
4
4
  "type": "module",
5
5
  "description": "Engine-agnostic animation library for Motion Script: scenes, nodes, props, tweens, layout, and the JSX runtime.",
6
6
  "repository": {
@@ -25,6 +25,7 @@
25
25
  "types": "dist/index.d.ts",
26
26
  "sideEffects": false,
27
27
  "files": [
28
+ "NOTICE",
28
29
  "dist",
29
30
  "CHANGELOG.md",
30
31
  "!dist/**/*.tsbuildinfo"
@@ -34,6 +35,10 @@
34
35
  "types": "./dist/index.d.ts",
35
36
  "default": "./dist/index.js"
36
37
  },
38
+ "./experimental": {
39
+ "types": "./dist/experimental.d.ts",
40
+ "default": "./dist/experimental.js"
41
+ },
37
42
  "./component": {
38
43
  "types": "./dist/component.d.ts",
39
44
  "default": "./dist/component.js"
@@ -67,6 +72,7 @@
67
72
  "dev": "concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc-alias -p tsconfig.build.json -w\"",
68
73
  "clean": "rimraf --glob dist .turbo *.tsbuildinfo",
69
74
  "test": "vitest",
75
+ "bench": "vitest bench --run",
70
76
  "lint": "eslint .",
71
77
  "typecheck": "tsc -p tsconfig.json --noEmit"
72
78
  }
@@ -1,48 +0,0 @@
1
- import { type Vector2 } from "../../../../attributes/layout/vector2.js";
2
- import type { ModedEffect, EffectData } from "../effect-data.js";
3
- /**
4
- * Which part of the map drives the displacement.
5
- *
6
- * - `"rg"` — red moves pixels horizontally, green vertically. The convention
7
- * every normal/flow map is authored to, and the only one that can push in two
8
- * directions independently.
9
- * - `"luminance"` — one value drives both axes. What a grayscale *bump* map
10
- * means: the brighter the pixel, the further it is pushed along `amount`.
11
- * - `"alpha"` — the map's alpha, for displacing from a cut-out shape.
12
- */
13
- export type DisplaceChannel = "rg" | "luminance" | "alpha";
14
- /**
15
- * Displacement map — the content is resampled at a position pushed around by a
16
- * second image, rather than having its colours changed.
17
- *
18
- * This is the general warp. `wave` and `twirl` are the two procedural cases
19
- * worth spelling out; everything else — refraction, heat haze, water, cloth,
20
- * dissolve — is this effect plus the right map. Point it at a normal map for
21
- * glass, at a noise texture for haze, at a gradient for a directional smear.
22
- *
23
- * **In `mode: 'backdrop'` this is refraction.** The displacement runs on what is
24
- * painted *beneath* the node and is clipped to the node's silhouette, so the
25
- * scene bends as it passes through the shape while the shape's own edges stay
26
- * sharp — the frosted/liquid-glass panel, from one effect.
27
- *
28
- * `midpoint` is what the map calls "no displacement". Signed data packed into
29
- * unsigned bytes centres on 0.5 (the default, and what a normal map assumes); a
30
- * mask-style map that should only ever push one way wants 0.
31
- */
32
- export interface DisplaceEffect extends ModedEffect {
33
- type: "displace";
34
- /** Map image path, resolved like an image fill's `src`. */
35
- src: string;
36
- /** Displacement at full deflection, in px per axis. `{x: 0, y: n}` warps vertically only. */
37
- amount: Vector2;
38
- /** Which channels of the map are read. */
39
- channel: DisplaceChannel;
40
- /** The map value meaning "don't move" — 0.5 for signed data, 0 for a one-way mask. */
41
- midpoint: number;
42
- /** Map scale — 1 covers the node once, 2 tiles it at half size. */
43
- scale: number;
44
- /** Map rotation in degrees. */
45
- angle: number;
46
- }
47
- export declare const displaceEffect: EffectData<DisplaceEffect>;
48
- //# sourceMappingURL=displace.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"displace.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/displace.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,WAAW,GAAG,OAAO,CAAC;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,6FAA6F;IAC7F,MAAM,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,OAAO,EAAE,eAAe,CAAC;IACzB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,cAAc,CA2BrD,CAAC"}
@@ -1,30 +0,0 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- import { lerpVector2 } from "../../../../attributes/layout/vector2.js";
3
- export const displaceEffect = {
4
- lerp: (from, to, t) => ({
5
- type: "displace",
6
- // The image is discrete — snap rather than cross-fade, which would need
7
- // two maps bound at once (same reasoning as `texture`).
8
- src: t < 0.5 ? from.src : to.src,
9
- channel: t < 0.5 ? from.channel : to.channel,
10
- amount: lerpVector2(from.amount, to.amount, t),
11
- midpoint: lerpNumber(from.midpoint, to.midpoint, t),
12
- scale: lerpNumber(from.scale, to.scale, t),
13
- angle: lerpNumber(from.angle, to.angle, t),
14
- mode: t < 0.5 ? from.mode : to.mode,
15
- }),
16
- equals: (a, b) => a.src === b.src &&
17
- a.amount.x === b.amount.x &&
18
- a.amount.y === b.amount.y &&
19
- a.channel === b.channel &&
20
- a.midpoint === b.midpoint &&
21
- a.scale === b.scale &&
22
- a.angle === b.angle &&
23
- a.mode === b.mode,
24
- // Resamples the source at a displaced position.
25
- surface: "shader",
26
- // Without this the map is never requested, the backend's synchronous lookup
27
- // finds nothing, and the effect silently has nothing to displace by.
28
- declare: (effect, assets) => assets.image(effect.src),
29
- };
30
- //# sourceMappingURL=displace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"displace.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/displace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAgB,MAAM,6BAA6B,CAAC;AAiDxE,MAAM,CAAC,MAAM,cAAc,GAA+B;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,UAAU;QAChB,wEAAwE;QACxE,wDAAwD;QACxD,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG;QAChC,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;QACf,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,gDAAgD;IAChD,OAAO,EAAE,QAAQ;IACjB,4EAA4E;IAC5E,qEAAqE;IACrE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;CACxD,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport { lerpVector2, type Vector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Which part of the map drives the displacement.\n *\n * - `\"rg\"` — red moves pixels horizontally, green vertically. The convention\n * every normal/flow map is authored to, and the only one that can push in two\n * directions independently.\n * - `\"luminance\"` — one value drives both axes. What a grayscale *bump* map\n * means: the brighter the pixel, the further it is pushed along `amount`.\n * - `\"alpha\"` — the map's alpha, for displacing from a cut-out shape.\n */\nexport type DisplaceChannel = \"rg\" | \"luminance\" | \"alpha\";\n\n/**\n * Displacement map — the content is resampled at a position pushed around by a\n * second image, rather than having its colours changed.\n *\n * This is the general warp. `wave` and `twirl` are the two procedural cases\n * worth spelling out; everything else — refraction, heat haze, water, cloth,\n * dissolve — is this effect plus the right map. Point it at a normal map for\n * glass, at a noise texture for haze, at a gradient for a directional smear.\n *\n * **In `mode: 'backdrop'` this is refraction.** The displacement runs on what is\n * painted *beneath* the node and is clipped to the node's silhouette, so the\n * scene bends as it passes through the shape while the shape's own edges stay\n * sharp — the frosted/liquid-glass panel, from one effect.\n *\n * `midpoint` is what the map calls \"no displacement\". Signed data packed into\n * unsigned bytes centres on 0.5 (the default, and what a normal map assumes); a\n * mask-style map that should only ever push one way wants 0.\n */\nexport interface DisplaceEffect extends ModedEffect {\n type: \"displace\";\n /** Map image path, resolved like an image fill's `src`. */\n src: string;\n /** Displacement at full deflection, in px per axis. `{x: 0, y: n}` warps vertically only. */\n amount: Vector2;\n /** Which channels of the map are read. */\n channel: DisplaceChannel;\n /** The map value meaning \"don't move\" — 0.5 for signed data, 0 for a one-way mask. */\n midpoint: number;\n /** Map scale — 1 covers the node once, 2 tiles it at half size. */\n scale: number;\n /** Map rotation in degrees. */\n angle: number;\n}\n\nexport const displaceEffect: EffectData<DisplaceEffect> = {\n lerp: (from, to, t) => ({\n type: \"displace\",\n // The image is discrete — snap rather than cross-fade, which would need\n // two maps bound at once (same reasoning as `texture`).\n src: t < 0.5 ? from.src : to.src,\n channel: t < 0.5 ? from.channel : to.channel,\n amount: lerpVector2(from.amount, to.amount, t),\n midpoint: lerpNumber(from.midpoint, to.midpoint, t),\n scale: lerpNumber(from.scale, to.scale, t),\n angle: lerpNumber(from.angle, to.angle, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.src === b.src &&\n a.amount.x === b.amount.x &&\n a.amount.y === b.amount.y &&\n a.channel === b.channel &&\n a.midpoint === b.midpoint &&\n a.scale === b.scale &&\n a.angle === b.angle &&\n a.mode === b.mode,\n // Resamples the source at a displaced position.\n surface: \"shader\",\n // Without this the map is never requested, the backend's synchronous lookup\n // finds nothing, and the effect silently has nothing to displace by.\n declare: (effect, assets) => assets.image(effect.src),\n};\n"]}
@@ -1,28 +0,0 @@
1
- import type { Vector2 } from "../../../../attributes/layout/vector2.js";
2
- import type { ModedEffect, EffectData } from "../effect-data.js";
3
- /**
4
- * Crepuscular rays — bright areas smeared *outward from a point* and added back
5
- * over the source, so light appears to stream past whatever occludes it.
6
- *
7
- * Related to `radialBlur` in `'zoom'` style, but not the same effect and not
8
- * expressible as one: radial blur smears *everything*, which softens the image.
9
- * This smears only what is brighter than `threshold` and screens the result on
10
- * top, so the occluder stays sharp and only the light travels.
11
- */
12
- export interface GodRaysEffect extends ModedEffect {
13
- type: "godRays";
14
- /** Additive multiplier for the ray pass. 0 = off. */
15
- intensity: number;
16
- /** 0–1 luminance cutoff — only pixels brighter than this cast rays. */
17
- threshold: number;
18
- /** How far the rays reach, as a fraction of the distance to `center`. */
19
- length: number;
20
- /** Light source in 0–1 layer coords (default middle). */
21
- center: Vector2;
22
- /** Per-step falloff; below 1 the rays fade with distance. */
23
- decay: number;
24
- /** Taps marched per pixel; higher is smoother and slower. */
25
- samples: number;
26
- }
27
- export declare const godRaysEffect: EffectData<GodRaysEffect>;
28
- //# sourceMappingURL=god-rays.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"god-rays.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/god-rays.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAC9C,IAAI,EAAE,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAC;IAChB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAuBnD,CAAC"}
@@ -1,26 +0,0 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- import { lerpVector2 } from "../../../../attributes/layout/vector2.js";
3
- export const godRaysEffect = {
4
- lerp: (from, to, t) => ({
5
- type: "godRays",
6
- intensity: lerpNumber(from.intensity, to.intensity, t),
7
- threshold: lerpNumber(from.threshold, to.threshold, t),
8
- length: lerpNumber(from.length, to.length, t),
9
- center: lerpVector2(from.center, to.center, t),
10
- decay: lerpNumber(from.decay, to.decay, t),
11
- // A quality knob, not a look — snap rather than blend to fractional taps.
12
- samples: t < 0.5 ? from.samples : to.samples,
13
- mode: t < 0.5 ? from.mode : to.mode,
14
- }),
15
- equals: (a, b) => a.intensity === b.intensity &&
16
- a.threshold === b.threshold &&
17
- a.length === b.length &&
18
- a.center.x === b.center.x &&
19
- a.center.y === b.center.y &&
20
- a.decay === b.decay &&
21
- a.samples === b.samples &&
22
- a.mode === b.mode,
23
- // Marches samples toward a point, so it needs random access to its source.
24
- surface: "shader",
25
- };
26
- //# sourceMappingURL=god-rays.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"god-rays.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/god-rays.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AA4B1D,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QACtD,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,0EAA0E;QAC1E,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO;QAC5C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;QAC3B,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,2EAA2E;IAC3E,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport { lerpVector2 } from \"@/attributes/layout/vector2\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Crepuscular rays — bright areas smeared *outward from a point* and added back\n * over the source, so light appears to stream past whatever occludes it.\n *\n * Related to `radialBlur` in `'zoom'` style, but not the same effect and not\n * expressible as one: radial blur smears *everything*, which softens the image.\n * This smears only what is brighter than `threshold` and screens the result on\n * top, so the occluder stays sharp and only the light travels.\n */\nexport interface GodRaysEffect extends ModedEffect {\n type: \"godRays\";\n /** Additive multiplier for the ray pass. 0 = off. */\n intensity: number;\n /** 0–1 luminance cutoff — only pixels brighter than this cast rays. */\n threshold: number;\n /** How far the rays reach, as a fraction of the distance to `center`. */\n length: number;\n /** Light source in 0–1 layer coords (default middle). */\n center: Vector2;\n /** Per-step falloff; below 1 the rays fade with distance. */\n decay: number;\n /** Taps marched per pixel; higher is smoother and slower. */\n samples: number;\n}\n\nexport const godRaysEffect: EffectData<GodRaysEffect> = {\n lerp: (from, to, t) => ({\n type: \"godRays\",\n intensity: lerpNumber(from.intensity, to.intensity, t),\n threshold: lerpNumber(from.threshold, to.threshold, t),\n length: lerpNumber(from.length, to.length, t),\n center: lerpVector2(from.center, to.center, t),\n decay: lerpNumber(from.decay, to.decay, t),\n // A quality knob, not a look — snap rather than blend to fractional taps.\n samples: t < 0.5 ? from.samples : to.samples,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.intensity === b.intensity &&\n a.threshold === b.threshold &&\n a.length === b.length &&\n a.center.x === b.center.x &&\n a.center.y === b.center.y &&\n a.decay === b.decay &&\n a.samples === b.samples &&\n a.mode === b.mode,\n // Marches samples toward a point, so it needs random access to its source.\n surface: \"shader\",\n};\n"]}
@@ -1,28 +0,0 @@
1
- import type { BlendMode } from "../../fill/blend.js";
2
- import type { ModedEffect, EffectData } from "../effect-data.js";
3
- /**
4
- * Overlay an image onto the content, blended.
5
- *
6
- * The ingredient every material look is missing: paper grain for a print,
7
- * canvas weave for a painting, fabric for a textile. The image is yours — put it
8
- * in the project's `public/` folder and name it the way an image fill would.
9
- *
10
- * `multiply` (the default) is the right blend for most of them, because that is
11
- * what a texture physically does: it *removes* light where the surface is rough,
12
- * and leaves it where the surface is smooth.
13
- */
14
- export interface TextureEffect extends ModedEffect {
15
- type: "texture";
16
- /** Image path, resolved like an image fill's `src`. */
17
- src: string;
18
- /** 0–1 blend strength. 0 = off. */
19
- amount: number;
20
- /** How the texture composites onto the content. */
21
- blend: BlendMode;
22
- /** Texture scale — 1 covers the node once, 2 tiles it at half size. */
23
- scale: number;
24
- /** Rotation in degrees. */
25
- angle: number;
26
- }
27
- export declare const textureEffect: EffectData<TextureEffect>;
28
- //# sourceMappingURL=texture.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"texture.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/texture.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAC9C,IAAI,EAAE,SAAS,CAAC;IAChB,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,KAAK,EAAE,SAAS,CAAC;IACjB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,aAAa,CAuBnD,CAAC"}
@@ -1,25 +0,0 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const textureEffect = {
3
- lerp: (from, to, t) => ({
4
- type: "texture",
5
- // The image and the blend are discrete — snap rather than cross-fade,
6
- // which would need two textures bound at once.
7
- src: t < 0.5 ? from.src : to.src,
8
- blend: t < 0.5 ? from.blend : to.blend,
9
- amount: lerpNumber(from.amount, to.amount, t),
10
- scale: lerpNumber(from.scale, to.scale, t),
11
- angle: lerpNumber(from.angle, to.angle, t),
12
- mode: t < 0.5 ? from.mode : to.mode,
13
- }),
14
- equals: (a, b) => a.src === b.src &&
15
- a.amount === b.amount &&
16
- a.blend === b.blend &&
17
- a.scale === b.scale &&
18
- a.angle === b.angle &&
19
- a.mode === b.mode,
20
- surface: "shader",
21
- // Without this the image is never requested, the backend's synchronous
22
- // lookup finds nothing, and the effect silently has no texture to draw.
23
- declare: (effect, assets) => assets.image(effect.src),
24
- };
25
- //# sourceMappingURL=texture.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"texture.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/texture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6B1C,MAAM,CAAC,MAAM,aAAa,GAA8B;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,SAAS;QACf,sEAAsE;QACtE,+CAA+C;QAC/C,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG;QAChC,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;QACf,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,OAAO,EAAE,QAAQ;IACjB,uEAAuE;IACvE,wEAAwE;IACxE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;CACxD,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { BlendMode } from \"../../fill/blend\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Overlay an image onto the content, blended.\n *\n * The ingredient every material look is missing: paper grain for a print,\n * canvas weave for a painting, fabric for a textile. The image is yours — put it\n * in the project's `public/` folder and name it the way an image fill would.\n *\n * `multiply` (the default) is the right blend for most of them, because that is\n * what a texture physically does: it *removes* light where the surface is rough,\n * and leaves it where the surface is smooth.\n */\nexport interface TextureEffect extends ModedEffect {\n type: \"texture\";\n /** Image path, resolved like an image fill's `src`. */\n src: string;\n /** 0–1 blend strength. 0 = off. */\n amount: number;\n /** How the texture composites onto the content. */\n blend: BlendMode;\n /** Texture scale — 1 covers the node once, 2 tiles it at half size. */\n scale: number;\n /** Rotation in degrees. */\n angle: number;\n}\n\nexport const textureEffect: EffectData<TextureEffect> = {\n lerp: (from, to, t) => ({\n type: \"texture\",\n // The image and the blend are discrete — snap rather than cross-fade,\n // which would need two textures bound at once.\n src: t < 0.5 ? from.src : to.src,\n blend: t < 0.5 ? from.blend : to.blend,\n amount: lerpNumber(from.amount, to.amount, t),\n scale: lerpNumber(from.scale, to.scale, t),\n angle: lerpNumber(from.angle, to.angle, t),\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.src === b.src &&\n a.amount === b.amount &&\n a.blend === b.blend &&\n a.scale === b.scale &&\n a.angle === b.angle &&\n a.mode === b.mode,\n surface: \"shader\",\n // Without this the image is never requested, the backend's synchronous\n // lookup finds nothing, and the effect silently has no texture to draw.\n declare: (effect, assets) => assets.image(effect.src),\n};\n"]}
@@ -1,41 +0,0 @@
1
- import type { BlendMode } from "../../fill/blend.js";
2
- import type { ModedEffect, EffectData } from "../effect-data.js";
3
- /**
4
- * Motion trails — the node echoed along its own motion, each tap `delay` seconds
5
- * further back and faded by a `decay` factor.
6
- *
7
- * The node-level counterpart of the video `echo` filter, and it shares that
8
- * filter's vocabulary deliberately: same fields, same meaning, different scope.
9
- * Where `echo` reaches back into a decoded video's own frames, this echoes what
10
- * the *node* drew — so it trails text, shapes, a whole subtree, or a 3D view.
11
- *
12
- * **Velocity-derived, not frame-buffered**, exactly like {@link MotionBlurEffect}.
13
- * Each tap reconstructs where the node was by undoing `delay × n` of its sampled
14
- * motion, which keeps the effect a pure function of the playhead: motion is
15
- * sampled on every *advanced* frame rather than every rendered one, so a
16
- * backward scrub lands on the same trail a forward play would. A frame-history
17
- * implementation cannot do that — seeking replays the scene generator without
18
- * drawing the frames it passes through, so there is no history to rebuild from.
19
- *
20
- * The trade is that a tap extrapolates along the *current* velocity rather than
21
- * following the node's actual past path, so a trail spanning a sharp curve
22
- * straightens out. Motion blur makes the same approximation across one frame;
23
- * here it spans `echoes × delay`, so keep the trail short relative to how fast
24
- * the path turns.
25
- *
26
- * A node that is not moving has no trail and renders untouched, rather than
27
- * stacking `echoes` copies of itself into a glow.
28
- */
29
- export interface TrailsEffect extends ModedEffect {
30
- type: "trails";
31
- /** Number of echo taps drawn behind the node. 0 = off. */
32
- echoes: number;
33
- /** How far back each successive tap reaches, in seconds. */
34
- delay: number;
35
- /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n`. */
36
- decay: number;
37
- /** How the taps composite onto each other. */
38
- blend: BlendMode;
39
- }
40
- export declare const trailsEffect: EffectData<TrailsEffect>;
41
- //# sourceMappingURL=trails.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trails.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/trails.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,CAoBjD,CAAC"}
@@ -1,22 +0,0 @@
1
- import { lerpNumber } from "../../../../tween/lerp.js";
2
- export const trailsEffect = {
3
- lerp: (from, to, t) => ({
4
- type: "trails",
5
- // A tap count is discrete — the shader draws whole taps, so a fractional
6
- // one would round anyway. Round rather than snap so a tween from 0 to 8
7
- // grows the trail instead of popping it in at the midpoint.
8
- echoes: Math.round(lerpNumber(from.echoes, to.echoes, t)),
9
- delay: lerpNumber(from.delay, to.delay, t),
10
- decay: lerpNumber(from.decay, to.decay, t),
11
- blend: t < 0.5 ? from.blend : to.blend,
12
- mode: t < 0.5 ? from.mode : to.mode,
13
- }),
14
- equals: (a, b) => a.echoes === b.echoes &&
15
- a.delay === b.delay &&
16
- a.decay === b.decay &&
17
- a.blend === b.blend &&
18
- a.mode === b.mode,
19
- // Resamples the content at displaced positions, one per tap.
20
- surface: "shader",
21
- };
22
- //# sourceMappingURL=trails.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trails.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/effects/implementations/trails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA0C1C,MAAM,CAAC,MAAM,YAAY,GAA6B;IAClD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,yEAAyE;QACzE,wEAAwE;QACxE,4DAA4D;QAC5D,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACzD,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;QACtC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI;KACtC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IACrB,6DAA6D;IAC7D,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import { lerpNumber } from \"@/tween/lerp\";\nimport type { BlendMode } from \"../../fill/blend\";\nimport type { ModedEffect, EffectData } from \"../effect-data\";\n\n/**\n * Motion trails — the node echoed along its own motion, each tap `delay` seconds\n * further back and faded by a `decay` factor.\n *\n * The node-level counterpart of the video `echo` filter, and it shares that\n * filter's vocabulary deliberately: same fields, same meaning, different scope.\n * Where `echo` reaches back into a decoded video's own frames, this echoes what\n * the *node* drew — so it trails text, shapes, a whole subtree, or a 3D view.\n *\n * **Velocity-derived, not frame-buffered**, exactly like {@link MotionBlurEffect}.\n * Each tap reconstructs where the node was by undoing `delay × n` of its sampled\n * motion, which keeps the effect a pure function of the playhead: motion is\n * sampled on every *advanced* frame rather than every rendered one, so a\n * backward scrub lands on the same trail a forward play would. A frame-history\n * implementation cannot do that — seeking replays the scene generator without\n * drawing the frames it passes through, so there is no history to rebuild from.\n *\n * The trade is that a tap extrapolates along the *current* velocity rather than\n * following the node's actual past path, so a trail spanning a sharp curve\n * straightens out. Motion blur makes the same approximation across one frame;\n * here it spans `echoes × delay`, so keep the trail short relative to how fast\n * the path turns.\n *\n * A node that is not moving has no trail and renders untouched, rather than\n * stacking `echoes` copies of itself into a glow.\n */\nexport interface TrailsEffect extends ModedEffect {\n type: \"trails\";\n /** Number of echo taps drawn behind the node. 0 = off. */\n echoes: number;\n /** How far back each successive tap reaches, in seconds. */\n delay: number;\n /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n`. */\n decay: number;\n /** How the taps composite onto each other. */\n blend: BlendMode;\n}\n\nexport const trailsEffect: EffectData<TrailsEffect> = {\n lerp: (from, to, t) => ({\n type: \"trails\",\n // A tap count is discrete — the shader draws whole taps, so a fractional\n // one would round anyway. Round rather than snap so a tween from 0 to 8\n // grows the trail instead of popping it in at the midpoint.\n echoes: Math.round(lerpNumber(from.echoes, to.echoes, t)),\n delay: lerpNumber(from.delay, to.delay, t),\n decay: lerpNumber(from.decay, to.decay, t),\n blend: t < 0.5 ? from.blend : to.blend,\n mode: t < 0.5 ? from.mode : to.mode,\n }),\n equals: (a, b) =>\n a.echoes === b.echoes &&\n a.delay === b.delay &&\n a.decay === b.decay &&\n a.blend === b.blend &&\n a.mode === b.mode,\n // Resamples the content at displaced positions, one per tap.\n surface: \"shader\",\n};\n"]}
@@ -1,2 +0,0 @@
1
- function o(r,n){if(r===t){let e=n?.children??[];return Array.isArray(e)?e:[e]}if(typeof r=="function")return new r(n);throw new Error("JSX element must be a SceneNode class (e.g. <Circle />)")}var c=o,t=Symbol.for("motion.fragment");export{o as a,c as b,t as c};
2
- //# sourceMappingURL=chunk-2T3HXSC2.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/jsx/jsx-runtime.ts"],
4
- "sourcesContent": ["import type { Node } from \"@/nodes/node/node\";\nimport type { Reference } from \"../util/reference\";\n\nexport function jsx(type: any, props: any) {\n // Fragment support\n if (type === Fragment) {\n const children = props?.children ?? [];\n // Wrap single child in array if it's not already an array\n return Array.isArray(children) ? children : [children];\n }\n\n // Class-based node\n if (typeof type === \"function\") {\n return new type(props);\n }\n\n throw new Error(\n \"JSX element must be a SceneNode class (e.g. <Circle />)\"\n );\n}\n\nexport const jsxs = jsx;\nexport const Fragment = Symbol.for(\"motion.fragment\");\n\nexport namespace JSX {\n // The dimension-agnostic base, so both trees are valid JSX. Which children a\n // node will actually accept is a runtime check (`Node.acceptsChild`) rather\n // than a type-level one: `children` is one prop shared by every node, and\n // splitting JSX by dimension would mean two runtimes for one syntax.\n export type Element = Node;\n export interface ElementClass extends Node<any> { }\n export interface ElementChildrenAttribute { children: {} }\n export interface IntrinsicAttributes { ref?: Reference<any> }\n export interface IntrinsicElements { }\n}\n"],
5
- "mappings": "AAGM,SAAUA,EAAIC,EAAWC,EAAU,CAErC,GAAID,IAASE,EAAU,CACnB,IAAMC,EAAWF,GAAO,UAAY,CAAA,EAEpC,OAAO,MAAM,QAAQE,CAAQ,EAAIA,EAAW,CAACA,CAAQ,CACzD,CAGA,GAAI,OAAOH,GAAS,WAChB,OAAO,IAAIA,EAAKC,CAAK,EAGzB,MAAM,IAAI,MACN,yDAAyD,CAEjE,CAEO,IAAMG,EAAOL,EACPG,EAAW,OAAO,IAAI,iBAAiB",
6
- "names": ["jsx", "type", "props", "Fragment", "children", "jsxs"]
7
- }
@@ -1,3 +0,0 @@
1
- function st(t,n,e){return t+(n-t)*e}function Oe(t,n,e){let o=t!==0?1/t:0,r=n!==0?1/n:0,c=o+(r-o)*e;return c!==0?1/c:0}function m(t,n,e){return{x:st(t.x,n.x,e),y:st(t.y,n.y,e)}}var $e={resolve:t=>t,lerp:m};var Ot=new Map([["aliceblue",[.941,.973,1,1]],["antiquewhite",[.98,.922,.843,1]],["aqua",[0,1,1,1]],["aquamarine",[.498,1,.831,1]],["azure",[.941,1,1,1]],["beige",[.961,.961,.863,1]],["bisque",[1,.894,.769,1]],["black",[0,0,0,1]],["blanchedalmond",[1,.922,.804,1]],["blue",[0,0,1,1]],["blueviolet",[.541,.169,.886,1]],["brown",[.647,.165,.165,1]],["burlywood",[.871,.722,.529,1]],["cadetblue",[.373,.62,.627,1]],["chartreuse",[.498,1,0,1]],["chocolate",[.824,.412,.118,1]],["coral",[1,.498,.314,1]],["cornflowerblue",[.392,.584,.929,1]],["cornsilk",[1,.973,.863,1]],["crimson",[.863,.078,.235,1]],["cyan",[0,1,1,1]],["darkblue",[0,0,.545,1]],["darkcyan",[0,.545,.545,1]],["darkgoldenrod",[.722,.525,.043,1]],["darkgray",[.663,.663,.663,1]],["darkgreen",[0,.392,0,1]],["darkgrey",[.663,.663,.663,1]],["darkkhaki",[.741,.718,.42,1]],["darkmagenta",[.545,0,.545,1]],["darkolivegreen",[.333,.42,.184,1]],["darkorange",[1,.549,0,1]],["darkorchid",[.6,.196,.8,1]],["darkred",[.545,0,0,1]],["darksalmon",[.914,.588,.478,1]],["darkseagreen",[.561,.737,.561,1]],["darkslateblue",[.282,.239,.545,1]],["darkslategray",[.184,.31,.31,1]],["darkslategrey",[.184,.31,.31,1]],["darkturquoise",[0,.808,.82,1]],["darkviolet",[.58,0,.827,1]],["deeppink",[1,.078,.576,1]],["deepskyblue",[0,.749,1,1]],["dimgray",[.412,.412,.412,1]],["dimgrey",[.412,.412,.412,1]],["dodgerblue",[.118,.565,1,1]],["firebrick",[.698,.133,.133,1]],["floralwhite",[1,.98,.941,1]],["forestgreen",[.133,.545,.133,1]],["fuchsia",[1,0,1,1]],["gainsboro",[.863,.863,.863,1]],["ghostwhite",[.973,.973,1,1]],["gold",[1,.843,0,1]],["goldenrod",[.855,.647,.125,1]],["gray",[.502,.502,.502,1]],["green",[0,.502,0,1]],["greenyellow",[.678,1,.184,1]],["grey",[.502,.502,.502,1]],["honeydew",[.941,1,.941,1]],["hotpink",[1,.412,.706,1]],["indianred",[.804,.361,.361,1]],["indigo",[.294,0,.51,1]],["ivory",[1,1,.941,1]],["khaki",[.941,.902,.549,1]],["lavender",[.902,.902,.98,1]],["lavenderblush",[1,.941,.961,1]],["lawngreen",[.486,.988,0,1]],["lemonchiffon",[1,.98,.804,1]],["lightblue",[.678,.847,.902,1]],["lightcoral",[.941,.502,.502,1]],["lightcyan",[.878,1,1,1]],["lightgoldenrodyellow",[.98,.98,.824,1]],["lightgray",[.827,.827,.827,1]],["lightgreen",[.565,.933,.565,1]],["lightgrey",[.827,.827,.827,1]],["lightpink",[1,.714,.757,1]],["lightsalmon",[1,.627,.478,1]],["lightseagreen",[.125,.698,.667,1]],["lightskyblue",[.529,.808,.98,1]],["lightslategray",[.467,.533,.6,1]],["lightslategrey",[.467,.533,.6,1]],["lightsteelblue",[.69,.769,.871,1]],["lightyellow",[1,1,.878,1]],["lime",[0,1,0,1]],["limegreen",[.196,.804,.196,1]],["linen",[.98,.941,.902,1]],["magenta",[1,0,1,1]],["maroon",[.502,0,0,1]],["mediumaquamarine",[.4,.804,.667,1]],["mediumblue",[0,0,.804,1]],["mediumorchid",[.729,.333,.827,1]],["mediumpurple",[.576,.439,.859,1]],["mediumseagreen",[.235,.702,.443,1]],["mediumslateblue",[.482,.408,.933,1]],["mediumspringgreen",[0,.98,.604,1]],["mediumturquoise",[.282,.82,.8,1]],["mediumvioletred",[.78,.082,.522,1]],["midnightblue",[.098,.098,.439,1]],["mintcream",[.961,1,.98,1]],["mistyrose",[1,.894,.882,1]],["moccasin",[1,.894,.71,1]],["navajowhite",[1,.871,.678,1]],["navy",[0,0,.502,1]],["oldlace",[.992,.961,.902,1]],["olive",[.502,.502,0,1]],["olivedrab",[.42,.557,.137,1]],["orange",[1,.647,0,1]],["orangered",[1,.271,0,1]],["orchid",[.855,.439,.839,1]],["palegoldenrod",[.933,.91,.667,1]],["palegreen",[.596,.984,.596,1]],["paleturquoise",[.686,.933,.933,1]],["palevioletred",[.859,.439,.576,1]],["papayawhip",[1,.937,.835,1]],["peachpuff",[1,.855,.725,1]],["peru",[.804,.522,.247,1]],["pink",[1,.753,.796,1]],["plum",[.867,.627,.867,1]],["powderblue",[.69,.878,.902,1]],["purple",[.502,0,.502,1]],["rebeccapurple",[.4,.2,.6,1]],["red",[1,0,0,1]],["rosybrown",[.737,.561,.561,1]],["royalblue",[.255,.412,.882,1]],["saddlebrown",[.545,.271,.075,1]],["salmon",[.98,.502,.447,1]],["sandybrown",[.957,.643,.376,1]],["seagreen",[.18,.545,.341,1]],["seashell",[1,.961,.933,1]],["sienna",[.627,.322,.176,1]],["silver",[.753,.753,.753,1]],["skyblue",[.529,.808,.922,1]],["slateblue",[.416,.353,.804,1]],["slategray",[.439,.502,.565,1]],["slategrey",[.439,.502,.565,1]],["snow",[1,.98,.98,1]],["springgreen",[0,1,.498,1]],["steelblue",[.275,.51,.706,1]],["tan",[.824,.706,.549,1]],["teal",[0,.502,.502,1]],["thistle",[.847,.749,.847,1]],["tomato",[1,.388,.278,1]],["transparent",[0,0,0,0]],["turquoise",[.251,.878,.816,1]],["violet",[.933,.51,.933,1]],["wheat",[.961,.871,.702,1]],["white",[1,1,1,1]],["whitesmoke",[.961,.961,.961,1]],["yellow",[1,1,0,1]],["yellowgreen",[.604,.804,.196,1]]]);function it(t){return t=Math.max(0,Math.min(1,t)),t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function Lt(t,n,e,o){return[it(t),it(n),it(e),o]}function _n(t,n,e){return[3.2404542*t-1.5371385*n-.4985314*e,-.969266*t+1.8760108*n+.041556*e,.0556434*t-.2040259*n+1.0572252*e]}function O(t){let n=t.lastIndexOf("/"),e=1,o=t;if(n!==-1){let r=t.slice(n+1).trim();e=r.endsWith("%")?parseFloat(r)/100:parseFloat(r),o=t.slice(0,n)}return{tokens:o.trim().split(/[\s,]+/).filter(Boolean),alpha:e}}var _=globalThis;_.__msThemeMap||(_.__msThemeMap=new Map);var at=_.__msThemeMap;_.__msTypographyMap||(_.__msTypographyMap=new Map);var ut=_.__msTypographyMap;function Rt(t,n,e){if(t)for(let[o,r]of Object.entries(t)){let c=n?`${n}-${o}`:o;if(r!=null&&!Array.isArray(r)&&typeof r=="object")Rt(r,c,e);else{let s=r;e.set(c.toLowerCase(),Array.isArray(s)?s:lt(s))}}}function Ee(t={}){let n=t??{};if(at.clear(),ut.clear(),Rt(n.colors,"",at),n.typography)for(let[e,o]of Object.entries(n.typography))ut.set(e.toLowerCase(),o)}function Ye(t){return ut.get(t.toLowerCase())}function On(t){return at.get(t)??Ot.get(t)??null}function Ln(t){if(!t.startsWith("#"))return null;let n=t.slice(1);(n.length===3||n.length===4)&&(n=n.split("").map(o=>o+o).join(""));let e=parseInt(n,16);return n.length===6?[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255,1]:n.length===8?[(e>>>24)/255,(e>>16&255)/255,(e>>8&255)/255,(e&255)/255]:null}function Rn(t){let n=t.match(/^rgba?\s*\((.+)\)/);if(!n)return null;let{tokens:e,alpha:o}=O(n[1]),r=e[0].endsWith("%")?parseFloat(e[0])/100:parseFloat(e[0])/255,c=e[1].endsWith("%")?parseFloat(e[1])/100:parseFloat(e[1])/255,s=e[2].endsWith("%")?parseFloat(e[2])/100:parseFloat(e[2])/255,a=e.length>3?parseFloat(e[3]):o;return[r,c,s,a]}function $n(t){let n=t.match(/^hsla?\s*\((.+)\)/);if(!n)return null;let{tokens:e,alpha:o}=O(n[1]),r=parseFloat(e[0]),c=parseFloat(e[1])/100,s=parseFloat(e[2])/100,a=e.length>3?parseFloat(e[3]):o,i=p=>(p+r/30)%12,u=c*Math.min(s,1-s),l=p=>s-u*Math.max(-1,Math.min(i(p)-3,Math.min(9-i(p),1)));return[l(0),l(8),l(4),a]}function qn(t){let n=t.match(/^lab\s*\((.+)\)/);if(!n)return null;let{tokens:e,alpha:o}=O(n[1]),r=parseFloat(e[0]),c=parseFloat(e[1]),s=parseFloat(e[2]);return $t(r,c,s,o)}function vn(t){let n=t.match(/^lch\s*\((.+)\)/);if(!n)return null;let{tokens:e,alpha:o}=O(n[1]),r=parseFloat(e[0]),c=parseFloat(e[1]),a=parseFloat(e[2])*(Math.PI/180);return $t(r,c*Math.cos(a),c*Math.sin(a),o)}function Nn(t){let n=t.match(/^oklab\s*\((.+)\)/);if(!n)return null;let{tokens:e,alpha:o}=O(n[1]),r=e[0].endsWith("%")?parseFloat(e[0])/100:parseFloat(e[0]),c=e[1].endsWith("%")?parseFloat(e[1])/100*.4:parseFloat(e[1]),s=e[2].endsWith("%")?parseFloat(e[2])/100*.4:parseFloat(e[2]);return qt(r,c,s,o)}function En(t){let n=t.match(/^oklch\s*\((.+)\)/);if(!n)return null;let{tokens:e,alpha:o}=O(n[1]),r=e[0].endsWith("%")?parseFloat(e[0])/100:parseFloat(e[0]),c=e[1].endsWith("%")?parseFloat(e[1])/100*.4:parseFloat(e[1]),a=parseFloat(e[2])*(Math.PI/180);return qt(r,c*Math.cos(a),c*Math.sin(a),o)}function $t(t,n,e,o){let s=(t+16)/116,a=n/500+s,i=s-e/200,u=(a**3>.008856?a**3:(116*a-16)/903.3)*.95047,l=t>903.3*.008856?((t+16)/116)**3:t/903.3,p=(i**3>.008856?i**3:(116*i-16)/903.3)*1.08883,[h,x,f]=_n(u,l,p);return Lt(h,x,f,o)}function qt(t,n,e,o){let r=t+.3963377774*n+.2158037573*e,c=t-.1055613458*n-.0638541728*e,s=t-.0894841775*n-1.291485548*e,a=r**3,i=c**3,u=s**3;return Lt(4.0767416621*a-3.3077115913*i+.2309699292*u,-1.2684380046*a+2.6097574011*i-.3413193965*u,-.0041960863*a-.7034186147*i+1.6956065236*u,o)}function Yn(t){if(t.includes("("))return{color:t,opacity:1};let n=t.match(/^(.*[^/])\/\s*([\d.]+)%?$/);if(!n)return{color:t,opacity:1};let e=parseFloat(n[2]);return Number.isFinite(e)?{color:n[1].trim(),opacity:Math.max(0,Math.min(1,e/100))}:{color:t,opacity:1}}function lt(t){let{color:n,opacity:e}=Yn(t.trim().toLowerCase()),o=On(n)??Ln(n)??Rn(n)??$n(n)??qn(n)??vn(n)??Nn(n)??En(n)??(console.warn(`[Motion Engine] Unsupported color format: "${t}". Defaulting to black.`),[0,0,0,1]);return e!==1?[o[0],o[1],o[2],o[3]*e]:o}function T(t,n){let e=n.x-t.x,o=n.y-t.y;return Math.sqrt(e*e+o*o)}function I(t,n,e,o,r){let c=1-t;return c*c*c*n+3*c*c*t*e+3*c*t*t*o+t*t*t*r}function vt(t,n,e,o){let r=1-t;return r*r*n+2*r*t*e+t*t*o}function X(t,n,e,o,r){return{x:I(r,t.x,n.x,e.x,o.x),y:I(r,t.y,n.y,e.y,o.y)}}function ft(t,n,e,o){return{x:vt(o,t.x,n.x,e.x),y:vt(o,t.y,n.y,e.y)}}function ht(t,n){return{p0:t,c1:m(t,n,1/3),c2:m(t,n,2/3),p1:n}}function Q(t,n,e){return{p0:t,c1:{x:t.x+2/3*(n.x-t.x),y:t.y+2/3*(n.y-t.y)},c2:{x:e.x+2/3*(n.x-e.x),y:e.y+2/3*(n.y-e.y)},p1:e}}function Y(t,n,e,o,r){let c=m(t,n,r),s=m(n,e,r),a=m(e,o,r),i=m(c,s,r),u=m(s,a,r),l=m(i,u,r);return{left:{from:t,cp1:c,cp2:i,to:l},right:{from:l,cp1:u,cp2:a,to:o}}}function Yt(t,n,e,o,r,c){if(r===0)return Y(t,n,e,o,c).left;let{right:s}=Y(t,n,e,o,r),a=(c-r)/(1-r);return Y(s.from,s.cp1,s.cp2,s.to,a).left}function pt(t,n,e,o){let r=m(t,n,o),c=m(n,e,o),s=m(r,c,o);return{left:{from:t,cp:r,to:s},right:{from:s,cp:c,to:e}}}function Xt(t,n,e,o,r){if(o===0)return pt(t,n,e,r).left;let{right:c}=pt(t,n,e,o),s=(r-o)/(1-o);return pt(c.from,c.cp,c.to,s).left}function R(t,n,e,o){let r=-t+3*n-3*e+o,c=2*(t-2*n+e),s=n-t,a=[],i=p=>{p>0&&p<1&&a.push(p)};if(Math.abs(r)<1e-12)return Math.abs(c)>1e-12&&i(-s/c),a;let u=c*c-4*r*s;if(u<0)return a;let l=Math.sqrt(u);return i((-c+l)/(2*r)),i((-c-l)/(2*r)),a}function xt(t,n,e){let o=t-2*n+e;if(Math.abs(o)<1e-12)return[];let r=(t-n)/o;return r>0&&r<1?[r]:[]}function Nt(t,n,e,o){let r=t*e+n*o,c=Math.sqrt(t*t+n*n)*Math.sqrt(e*e+o*o),s=Math.acos(Math.max(-1,Math.min(1,r/c)));return t*o-n*e<0&&(s=-s),s}function zt(t,n,e,o,r,c,s){let a=r*Math.PI/180,i=Math.cos(a),u=Math.sin(a),l=(t.x-n.x)/2,p=(t.y-n.y)/2,h=i*l+u*p,x=-u*l+i*p,f=Math.abs(e),y=Math.abs(o),d=h*h/(f*f)+x*x/(y*y);if(d>1){let _t=Math.sqrt(d);f*=_t,y*=_t}let g=f*f,b=y*y,k=h*h,C=x*x,A=Math.max(0,(g*b-g*C-b*k)/(g*C+b*k)),N=c===s?-1:1,w=N*Math.sqrt(A)*(f*x/y),S=N*Math.sqrt(A)*-(y*h/f),ct=i*w-u*S+(t.x+n.x)/2,V=u*w+i*S+(t.y+n.y)/2,W=Nt(1,0,(h-w)/f,(x-S)/y),E=Nt((h-w)/f,(x-S)/y,(-h-w)/f,(-x-S)/y);return s===0&&E>0&&(E-=2*Math.PI),s===1&&E<0&&(E+=2*Math.PI),{cx:ct,cy:V,rx:f,ry:y,phi:a,theta1:W,dtheta:E}}function L(t,n){let e=Math.cos(t.phi),o=Math.sin(t.phi),r=Math.cos(n),c=Math.sin(n);return{x:e*t.rx*r-o*t.ry*c+t.cx,y:o*t.rx*r+e*t.ry*c+t.cy}}function Et(t,n){let e=Math.cos(t.phi),o=Math.sin(t.phi),r=Math.cos(n),c=Math.sin(n);return{x:-t.rx*e*c-t.ry*o*r,y:-t.rx*o*c+t.ry*e*r}}function Z(t,n,e){let o=e-n;if(Math.abs(o)<1e-12)return[];let r=Math.max(1,Math.ceil(Math.abs(o)/(Math.PI/2))),c=o/r,s=4/3*Math.tan(c/4),a=[];for(let i=0;i<r;i++){let u=n+c*i,l=u+c,p=L(t,u),h=L(t,l),x=Et(t,u),f=Et(t,l);a.push({p0:p,c1:{x:p.x+s*x.x,y:p.y+s*x.y},c2:{x:h.x-s*f.x,y:h.y-s*f.y},p1:h})}return a}function Bt(t){let n=Math.cos(t.phi),e=Math.sin(t.phi),o=Math.atan2(-t.ry*e,t.rx*n),r=Math.atan2(t.ry*n,t.rx*e);return{x:[o,o+Math.PI],y:[r,r+Math.PI]}}function Ut(t,n){let e=Math.PI*2;return((t.dtheta>=0?n-t.theta1:t.theta1-n)%e+e)%e<=Math.abs(t.dtheta)+1e-9}var Xn="MmLlHhVvCcSsQqTtAaZz";function zn(t){return t===" "||t===","||t===" "||t===`
2
- `||t==="\r"}function z(t){return t>="0"&&t<="9"}function Bn(t){let n=0,e=()=>{for(;n<t.length&&zn(t[n]);)n++};return{atEnd:()=>(e(),n>=t.length),takeLetter:()=>(e(),n<t.length&&Xn.includes(t[n])?t[n++]:null),hasNumber:()=>{if(e(),n>=t.length)return!1;let r=t[n];return z(r)||r==="."||r==="+"||r==="-"},takeNumber:()=>{e();let r=n;for((t[n]==="+"||t[n]==="-")&&n++;n<t.length&&z(t[n]);)n++;if(t[n]===".")for(n++;n<t.length&&z(t[n]);)n++;if(t[n]==="e"||t[n]==="E"){let s=n;if(n++,(t[n]==="+"||t[n]==="-")&&n++,n<t.length&&z(t[n]))for(;n<t.length&&z(t[n]);)n++;else n=s}if(n===r)return null;let c=Number(t.slice(r,n));return Number.isFinite(c)?c:(n=r,null)},takeFlag:()=>(e(),t[n]==="0"?(n++,0):t[n]==="1"?(n++,1):null)}}function U(t,n){return{kind:"line",from:t,to:n}}function jt(t,n,e){return{kind:"quad",from:t,c:n,to:e}}function Dt(t,n,e,o){return{kind:"cubic",from:t,c1:n,c2:e,to:o}}function Un(t,n,e,o,r,c,s){return e===0||o===0||t.x===n.x&&t.y===n.y?U(t,n):{kind:"arc",from:t,to:n,rx:e,ry:o,rotation:r,largeArc:c,sweep:s}}function $(t){return zt(t.from,t.to,t.rx,t.ry,t.rotation,t.largeArc,t.sweep)}function yt(t,n){switch(t.kind){case"line":return m(t.from,t.to,n);case"quad":return ft(t.from,t.c,t.to,n);case"cubic":return X(t.from,t.c1,t.c2,t.to,n);case"arc":{let e=$(t);return L(e,e.theta1+n*e.dtheta)}}}function G(t){let n=1/0,e=1/0,o=-1/0,r=-1/0;for(let c of t)c.x<n&&(n=c.x),c.x>o&&(o=c.x),c.y<e&&(e=c.y),c.y>r&&(r=c.y);return{minX:n,minY:e,maxX:o,maxY:r}}function jn(t){switch(t.kind){case"line":return G([t.from,t.to]);case"quad":{let n=e=>ft(t.from,t.c,t.to,e);return G([t.from,t.to,...xt(t.from.x,t.c.x,t.to.x).map(n),...xt(t.from.y,t.c.y,t.to.y).map(n)])}case"cubic":{let n=e=>X(t.from,t.c1,t.c2,t.to,e);return G([t.from,t.to,...R(t.from.x,t.c1.x,t.c2.x,t.to.x).map(n),...R(t.from.y,t.c1.y,t.c2.y,t.to.y).map(n)])}case"arc":{let n=$(t),e=[t.from,t.to],o=Bt(n);for(let r of[...o.x,...o.y])Ut(n,r)&&e.push(L(n,r));return G(e)}}}function Vt(t){switch(t.kind){case"line":return[ht(t.from,t.to)];case"quad":return[Q(t.from,t.c,t.to)];case"cubic":return[{p0:t.from,c1:t.c1,c2:t.c2,p1:t.to}];case"arc":{let n=$(t),e=Z(n,n.theta1,n.theta1+n.dtheta);return e.length>0?e:[ht(t.from,t.to)]}}}function Wt(t,n,e){switch(t.kind){case"line":{let o=m(t.from,t.to,e);return[{type:"L",x:o.x,y:o.y}]}case"quad":{let o=Xt(t.from,t.c,t.to,n,e);return[{type:"Q",x1:o.cp.x,y1:o.cp.y,x:o.to.x,y:o.to.y}]}case"cubic":{let o=Yt(t.from,t.c1,t.c2,t.to,n,e);return[{type:"C",x1:o.cp1.x,y1:o.cp1.y,x2:o.cp2.x,y2:o.cp2.y,x:o.to.x,y:o.to.y}]}case"arc":{let o=$(t),r=o.theta1+n*o.dtheta,c=o.theta1+e*o.dtheta,s=L(o,c);return[{type:"A",rx:o.rx,ry:o.ry,rotation:t.rotation,largeArc:Math.abs(c-r)>Math.PI?1:0,sweep:t.sweep,x:s.x,y:s.y}]}}}function Dn(t){if(!t.closed||t.segments.length===0)return null;let n=t.segments[t.segments.length-1].to;return Math.abs(n.x-t.start.x)<1e-9&&Math.abs(n.y-t.start.y)<1e-9?null:U(n,t.start)}function K(t){let n=Dn(t);return n?[...t.segments,n]:t.segments}function Vn(t){let n=1/0,e=1/0,o=-1/0,r=-1/0,c=!1,s=a=>{c=!0,a.minX<n&&(n=a.minX),a.minY<e&&(e=a.minY),a.maxX>o&&(o=a.maxX),a.maxY>r&&(r=a.maxY)};for(let a of t){if(a.segments.length===0){s({minX:a.start.x,minY:a.start.y,maxX:a.start.x,maxY:a.start.y});continue}for(let i of a.segments)s(jn(i))}return c?{minX:n,minY:e,maxX:o,maxY:r}:null}function Wn(t){let n=Bn(t),e=[],o=null;for(;!n.atEnd();){let r=n.takeLetter();if(r!==null)o=r;else{if(o===null)return e;if(o==="M")o="L";else if(o==="m")o="l";else if(o==="Z"||o==="z")return e}let c=o.toUpperCase(),s=o!==c;if(c==="Z"){e.push({type:"Z"});continue}let a=i=>{let u=[];for(let l=0;l<i;l++){let p=n.takeNumber();if(p===null)return null;u.push(p)}return u};switch(c){case"M":case"L":case"T":{let i=a(2);if(!i)return e;let u=c==="M"?"M":c==="L"?"L":"T";e.push({type:s?u.toLowerCase():u,x:i[0],y:i[1]});break}case"H":{let i=a(1);if(!i)return e;e.push({type:s?"h":"H",x:i[0]});break}case"V":{let i=a(1);if(!i)return e;e.push({type:s?"v":"V",y:i[0]});break}case"C":{let i=a(6);if(!i)return e;e.push({type:s?"c":"C",x1:i[0],y1:i[1],x2:i[2],y2:i[3],x:i[4],y:i[5]});break}case"S":case"Q":{let i=a(4);if(!i)return e;e.push(c==="S"?{type:s?"s":"S",x2:i[0],y2:i[1],x:i[2],y:i[3]}:{type:s?"q":"Q",x1:i[0],y1:i[1],x:i[2],y:i[3]});break}case"A":{let i=a(3);if(!i)return e;let u=n.takeFlag(),l=n.takeFlag();if(u===null||l===null)return e;let p=a(2);if(!p)return e;e.push({type:s?"a":"A",rx:i[0],ry:i[1],rotation:i[2],largeArc:u,sweep:l,x:p[0],y:p[1]});break}default:return e}if(!n.hasNumber()&&n.atEnd())break}return e}function q(t){return t==null?[]:typeof t=="string"?Wn(t):t}var B=new Map,Qn=32;function P(t){if(t==null)return[];let n=B.get(t);if(n)return n;let e=Zn(q(t));return B.size>=Qn&&B.delete(B.keys().next().value),B.set(t,e),e}function Zn(t){let n=[],e=null,o={x:0,y:0},r={x:0,y:0},c=null,s=null,a=u=>{let l={start:u,segments:[],closed:!1};return n.push(l),r=u,l},i=u=>{e||(e=a(o)),e.segments.push(u)};for(let u of t){let l=u.type!==u.type.toUpperCase(),p=(f,y)=>l?{x:o.x+f,y:o.y+y}:{x:f,y},h=null,x=null;switch(u.type){case"M":case"m":{let f=p(u.x,u.y);e=a(f),o=f;break}case"L":case"l":{let f=p(u.x,u.y);i(U(o,f)),o=f;break}case"H":case"h":{let f={x:l?o.x+u.x:u.x,y:o.y};i(U(o,f)),o=f;break}case"V":case"v":{let f={x:o.x,y:l?o.y+u.y:u.y};i(U(o,f)),o=f;break}case"C":case"c":{let f=p(u.x1,u.y1),y=p(u.x2,u.y2),d=p(u.x,u.y);i(Dt(o,f,y,d)),o=d,h=y;break}case"S":case"s":{let f=c?{x:2*o.x-c.x,y:2*o.y-c.y}:o,y=p(u.x2,u.y2),d=p(u.x,u.y);i(Dt(o,f,y,d)),o=d,h=y;break}case"Q":case"q":{let f=p(u.x1,u.y1),y=p(u.x,u.y);i(jt(o,f,y)),o=y,x=f;break}case"T":case"t":{let f=s?{x:2*o.x-s.x,y:2*o.y-s.y}:o,y=p(u.x,u.y);i(jt(o,f,y)),o=y,x=f;break}case"A":case"a":{let f=p(u.x,u.y);i(Un(o,f,u.rx,u.ry,u.rotation,u.largeArc,u.sweep)),o=f;break}case"Z":case"z":{e&&(e.closed=!0,e=null),o=r;break}}c=h,s=x}return n}function dt(t){return Vn(P(t))}function Qt(t){let n=dt(t);return n?{width:n.maxX-n.minX,height:n.maxY-n.minY}:{width:0,height:0}}var We="";function Gn(t,n){return Math.abs(t.x-n.x)<1e-6&&Math.abs(t.y-n.y)<1e-6}function Kn(t){t.closed=!0;let{anchors:n}=t;if(n.length<2)return;let e=n[0],o=n[n.length-1];Gn(e.point,o.point)&&(e.inHandle=o.inHandle,n.pop())}function Jn(t){let n=[{point:t.start,inHandle:null,outHandle:null}],e=r=>{n[n.length-1].outHandle=r.c1,n.push({point:r.p1,inHandle:r.c2,outHandle:null})};for(let r of t.segments)switch(r.kind){case"line":n.push({point:r.to,inHandle:null,outHandle:null});break;case"cubic":e({p0:r.from,c1:r.c1,c2:r.c2,p1:r.to});break;case"quad":e(Q(r.from,r.c,r.to));break;case"arc":{let c=$(r);for(let s of Z(c,c.theta1,c.theta1+c.dtheta))e(s);break}}let o={anchors:n,closed:!1};return t.closed&&Kn(o),o}function Zt(t){return P(t).map(Jn).filter(n=>n.anchors.length>0)}var te=5;function M(t){if(!Number.isFinite(t))return"0";let n=Number(t.toFixed(te));return String(n===0?0:n)}function mt(t,n){return t.outHandle===null&&n.inHandle===null?{line:!0,to:n.point}:{line:!1,c1:t.outHandle??t.point,c2:n.inHandle??n.point,to:n.point}}function Gt(t){let n=[];for(let{anchors:e,closed:o}of t)if(e.length!==0){n.push(`M ${M(e[0].point.x)} ${M(e[0].point.y)}`);for(let r=1;r<e.length;r++){let c=mt(e[r-1],e[r]);n.push(c.line?`L ${M(c.to.x)} ${M(c.to.y)}`:`C ${M(c.c1.x)} ${M(c.c1.y)} ${M(c.c2.x)} ${M(c.c2.y)} ${M(c.to.x)} ${M(c.to.y)}`)}if(o){if(e.length>1){let r=mt(e[e.length-1],e[0]);r.line||n.push(`C ${M(r.c1.x)} ${M(r.c1.y)} ${M(r.c2.x)} ${M(r.c2.y)} ${M(r.to.x)} ${M(r.to.y)}`)}n.push("Z")}}return n.join(" ")}var ne=t=>t;function Kt(t,n=ne){let e=[],o=(r,c)=>{let s=mt(r,c),a=n(s.to);if(s.line){e.push({type:"L",x:a.x,y:a.y});return}let i=n(s.c1),u=n(s.c2);e.push({type:"C",x1:i.x,y1:i.y,x2:u.x,y2:u.y,x:a.x,y:a.y})};for(let{anchors:r,closed:c}of t){if(r.length===0)continue;let s=n(r[0].point);e.push({type:"M",x:s.x,y:s.y});for(let a=1;a<r.length;a++)o(r[a-1],r[a]);if(c){if(r.length>1){let a=r[r.length-1],i=r[0];(a.outHandle!==null||i.inHandle!==null)&&o(a,i)}e.push({type:"Z"})}}return e}function bt(t){let n=1/0,e=1/0,o=-1/0,r=-1/0,c=!1,s=i=>{c=!0,i<n&&(n=i),i>o&&(o=i)},a=i=>{c=!0,i<e&&(e=i),i>r&&(r=i)};for(let{anchors:i,closed:u}of t){for(let p of i)s(p.point.x),a(p.point.y);let l=u?i.length:i.length-1;for(let p=0;p<l;p++){let h=i[p],x=i[(p+1)%i.length];if(h.outHandle===null&&x.inHandle===null)continue;let f=h.outHandle??h.point,y=x.inHandle??x.point;for(let d of R(h.point.x,f.x,y.x,x.point.x))s(I(d,h.point.x,f.x,y.x,x.point.x));for(let d of R(h.point.y,f.y,y.y,x.point.y))a(I(d,h.point.y,f.y,y.y,x.point.y))}}return c?{minX:n,minY:e,maxX:o,maxY:r}:null}function tt(t,n){return t.map(e=>({closed:e.closed,anchors:e.anchors.map(o=>({point:n(o.point),inHandle:o.inHandle?n(o.inHandle):null,outHandle:o.outHandle?n(o.outHandle):null}))}))}function Jt(t,n,e){let o=n.x-t.x,r=n.y-t.y,c=o*o+r*r;if(c<1e-12){let l=e.x-n.x,p=e.y-n.y;return h=>({x:h.x+l,y:h.y+p})}let s=e.x-t.x,a=e.y-t.y,i=(s*o+a*r)/c,u=(a*o-s*r)/c;return l=>{let p=l.x-t.x,h=l.y-t.y;return{x:t.x+i*p-u*h,y:t.y+u*p+i*h}}}function tn(t){return t.every(n=>n.anchors.length<2)}var gt=1,J=gt/2,Qe={minX:-J,minY:-J,maxX:J,maxY:J};function nn(t){let n=bt(t);return n?Mt(t,n):{path:t,scaleX:1,scaleY:1,centerX:0,centerY:0}}function Mt(t,n){let e=n.maxX-n.minX,o=n.maxY-n.minY,r=(n.minX+n.maxX)/2,c=(n.minY+n.maxY)/2,s=e>1e-9?e/gt:1,a=o>1e-9?o/gt:1;return{path:tt(t,i=>({x:(i.x-r)/s,y:(i.y-c)/a})),scaleX:s,scaleY:a,centerX:r,centerY:c}}function en(t,n){return tt(t,e=>({x:e.x+n.x,y:e.y+n.y}))}function kt(t,n,e){if(t.outHandle===null&&n.inHandle===null)return{x:t.point.x+(n.point.x-t.point.x)*e,y:t.point.y+(n.point.y-t.point.y)*e};let o=t.outHandle??t.point,r=n.inHandle??n.point;return{x:I(e,t.point.x,o.x,r.x,n.point.x),y:I(e,t.point.y,o.y,r.y,n.point.y)}}function on(t,n,e){if(t.outHandle===null&&n.inHandle===null)return{from:t,middle:{point:kt(t,n,e),inHandle:null,outHandle:null},to:n};let{left:o,right:r}=Y(t.point,t.outHandle??t.point,n.inHandle??n.point,n.point,e);return{from:{...t,outHandle:o.cp1},middle:{point:o.to,inHandle:o.cp2,outHandle:r.cp1},to:{...n,inHandle:r.cp2}}}var rn=50;function ee(t){if(t.kind==="line")return[t.from,t.to];let n=[t.from];for(let e=1;e<rn;e++)n.push(yt(t,e/rn));return n.push(t.to),n}function oe(t){let n=ee(t),e=[0],o=0;for(let r=1;r<n.length;r++)o+=T(n[r-1],n[r]),e.push(o);return{segment:t,points:n,cumulative:e,length:o}}function nt(t){let n=0;return{contours:t.map(o=>{let r=K(o).map(oe),c=r.reduce((s,a)=>s+a.length,0);return n+=c,{contour:o,metrics:r,length:c}}),length:n}}function cn(t,n){let{cumulative:e,length:o}=t;if(o<=0||n<=0)return 0;if(n>=o)return 1;let r=0,c=e.length-1;for(;r<c-1;){let u=r+c>>1;e[u]<=n?r=u:c=u}let s=e[c]-e[r],a=s>0?(n-e[r])/s:0,i=e.length-1;return(r+a)/i}function sn(t){return nt(P(t)).length}function an(t){let n=nt(P(t)),e=[],o=[],r=0;for(let a of n.contours){let i=a.metrics[0]?.segment.from??a.contour.start;e.push(i),o.push(r);for(let u of a.metrics)for(let l=1;l<u.points.length;l++)r+=T(u.points[l-1],u.points[l]),e.push(u.points[l]),o.push(r)}let c=0;return{length:r,frameAt:a=>{if(r<=0||e.length<2)return null;let i=Math.max(0,Math.min(r,a));for(o[c]>i&&(c=0);c<e.length-2&&(o[c+1]<i||o[c+1]===o[c]);)c++;let u=e[c],l=e[c+1],p=o[c],h=o[c+1]-p,x=h>0?(i-p)/h:0,f=l.x-u.x,y=l.y-u.y,d=Math.hypot(f,y),g=d>0?f/d:1,b=d>0?y/d:0;return{x:u.x+f*x,y:u.y+y*x,tx:g,ty:b}}}}function re(t){let e=[t.metrics[0]?.segment.from??t.contour.start];for(let o of t.metrics)for(let r=1;r<o.points.length;r++)e.push(o.points[r]);return e}function ce(t,n,e,o){if(t.length<2)return"";let r=n.reduce((y,d)=>y+d,0),c=r*1e-4,s=r*1e-9,a=(e%r+r)%r,i=0,u=0;for(;u+n[i]<=a&&!(n[i]===0&&a-u<=s||(u+=n[i],i=(i+1)%n.length,i===0)););let l=[],p=n[i]-(a-u),h=i%2===0,x=!0,f=null;for(let y=1;y<t.length;y++){let d=t[y-1],g=t[y],b=g.x-d.x,k=g.y-d.y,C=T(d,g);if(C===0)continue;f={point:g,x:b/C,y:k/C};let A=0;for(;A<C;){let N=C-A;if(p>=N){if(h){if(x){let w=A/C;l.push(`M ${d.x+w*b} ${d.y+w*k}`),x=!1}l.push(`L ${g.x} ${g.y}`)}p-=N,A=C,p<=s&&(i=(i+1)%n.length,h=!h,p=n[i],h&&(x=!0))}else{let w=(A+p)/C,S=d.x+w*b,ct=d.y+w*k;if(h){if(x){let W=A/C;l.push(`M ${d.x+W*b} ${d.y+W*k}`),x=!1}let V=p>0?0:c/C;l.push(`L ${S+V*b} ${ct+V*k}`)}A+=p,i=(i+1)%n.length,h=!h,p=n[i],h&&(x=!0)}}}if(!o&&h&&p<=s&&f){let{point:y,x:d,y:g}=f;l.push(`M ${y.x} ${y.y} L ${y.x-d*c} ${y.y-g*c}`)}return l.join(" ")}function Ct(t,n,e){let o=t.reduce((r,c)=>r+c,0);if(o<=0||e<=0)return null;if(!n.closed&&n.length>0&&t.length%2===0){let r=t[t.length-1],c=Math.max(1,Math.round((n.length+r)/o))*o-r;if(c>0)return n.length/c}return e/(Math.max(1,Math.round(e/o))*o)}function un(t,n,e=0){if(!n||n.length===0)return"";let o=nt(P(t)),r=[];for(let c of o.contours){let s=Ct(n,{length:c.length,closed:c.contour.closed},o.length);if(s===null)return"";let a=ce(re(c),n.map(i=>i*s),e*s,c.contour.closed);a&&r.push(a)}return r.join(" ")}function ln(t,n,e){if(n===0&&e===1)return t;let o=Math.max(0,Math.min(1,n)),r=Math.max(o,Math.min(1,e));if(o===0&&r===1)return t;if(o>=r)return[];let c=nt(P(t));if(c.length===0)return t;let s=o*c.length,a=r*c.length,i=[],u=0;for(let l of c.contours){let p=!0;for(let h of l.metrics){let{segment:x,length:f}=h,y=u+f;if(f===0||y<=s||u>=a){u=y;continue}let d=u<s?cn(h,s-u):0,g=y>a?cn(h,a-u):1;if(p){let b=yt(x,d);i.push({type:"M",x:b.x,y:b.y}),p=!1}i.push(...Wt(x,d,g)),u=y}}return i}function et(t){return P(t).map(n=>({cubics:K(n).flatMap(Vt),closed:n.closed}))}function pn(t){return t[0].p0}function se(t,n=8){let e=0,o=t.p0;for(let r=1;r<=n;r++){let c=X(t.p0,t.c1,t.c2,t.p1,r/n);e+=T(o,c),o=c}return e}function Pt(t){let n=0,e=0;for(let o of t)n+=o.p0.x,e+=o.p0.y;return{x:n/t.length,y:e/t.length}}function ie(t,n){let e=m(t.p0,t.c1,n),o=m(t.c1,t.c2,n),r=m(t.c2,t.p1,n),c=m(e,o,n),s=m(o,r,n),a=m(c,s,n);return[{p0:t.p0,c1:e,c2:c,p1:a},{p0:a,c1:s,c2:r,p1:t.p1}]}function fn(t,n){let e=t.slice();for(;e.length<n;){let o=0,r=-1;for(let a=0;a<e.length;a++){let i=se(e[a]);i>r&&(r=i,o=a)}let[c,s]=ie(e[o],.5);e.splice(o,1,c,s)}return e}function xn(t){let n=[];for(let e=t.length-1;e>=0;e--){let o=t[e];n.push({p0:o.p1,c1:o.c2,c2:o.c1,p1:o.p0})}return n}function ae(t,n){return n===0?t.slice():t.slice(n).concat(t.slice(0,n))}function wt(t,n){let e=0;for(let o=0;o<t.length;o++){let r=t[o].p0.x-n[o].p0.x,c=t[o].p0.y-n[o].p0.y;e+=r*r+c*c}return e}function ue(t,n){let e=t.length,o=n,r=1/0;for(let c of[n,xn(n)])for(let s=0;s<e;s++){let a=ae(c,s),i=wt(t,a);i<r&&(r=i,o=a)}return o}function le(t,n){let e=xn(n);return wt(t,n)<=wt(t,e)?n:e}function ot(t,n){let e=[];for(let o=0;o<n;o++)e.push({p0:{...t},c1:{...t},c2:{...t},p1:{...t}});return e}function pe(t,n){let e=[],o=new Array(n.length).fill(!1);for(let r of t){let c=Pt(r.cubics),s=-1,a=1/0;for(let i=0;i<n.length;i++){if(o[i])continue;let u=T(c,Pt(n[i].cubics));u<a&&(a=u,s=i)}s>=0?(o[s]=!0,e.push({from:r,to:n[s]})):e.push({from:r,to:{cubics:ot(c,r.cubics.length),closed:r.closed}})}for(let r=0;r<n.length;r++){if(o[r])continue;let c=n[r],s=Pt(c.cubics);e.push({from:{cubics:ot(s,c.cubics.length),closed:c.closed},to:c})}return e}function Tt(t,n){let e=et(t),o=et(n);if(e.length===0&&o.length===0)return{pairs:[]};if(e.length===0){let s=pn(o[0].cubics);e.push({cubics:ot(s,1),closed:o[0].closed})}if(o.length===0){let s=pn(e[0].cubics);o.push({cubics:ot(s,1),closed:e[0].closed})}return{pairs:pe(e,o).map(({from:s,to:a})=>{let i=Math.max(s.cubics.length,a.cubics.length),u=fn(s.cubics,i),l=fn(a.cubics,i),p=s.closed&&a.closed;return l=p?ue(u,l):le(u,l),{from:u,to:l,closed:p}})}}function hn(t,n,e){return{p0:m(t.p0,n.p0,e),c1:m(t.c1,n.c1,e),c2:m(t.c2,n.c2,e),p1:m(t.p1,n.p1,e)}}function Ht(t,n){let e=[];for(let o of t.pairs){let r=o.from.length;if(r===0)continue;let c=hn(o.from[0],o.to[0],n);e.push({type:"M",x:c.p0.x,y:c.p0.y}),e.push({type:"C",x1:c.c1.x,y1:c.c1.y,x2:c.c2.x,y2:c.c2.y,x:c.p1.x,y:c.p1.y});for(let s=1;s<r;s++){let a=hn(o.from[s],o.to[s],n);e.push({type:"C",x1:a.c1.x,y1:a.c1.y,x2:a.c2.x,y2:a.c2.y,x:a.p1.x,y:a.p1.y})}o.closed&&e.push({type:"Z"})}return e}var j=null;function fe(t,n){if(j&&j.from===t&&j.to===n)return j.plan;let e=Tt(q(t),q(n));return j={from:t,to:n,plan:e},e}function yn(t,n,e){return e<=0?t:e>=1?n:Ht(fe(t,n),e)}var dn={resolve:t=>t,lerp:yn,commands:q,contours:P,cubics:et,anchors:Zt,bounds:dt,size:Qt,length:sn,sampler:an,trim:ln,dash:un,dashScale:Ct,plan:Tt,sample:Ht,fromAnchors:Gt,anchorCommands:Kt,anchorBounds:bt,map:tt,translate:en,endFit:Jt,isEmpty:tn,normalize:nn,fitToBox:Mt,pointOn:kt,split:on};var he=(t,n,e)=>Math.max(n,Math.min(t,e));function F(t){return he(t,0,1)}function rt(t){return t.count===null?1/0:Math.max(0,Math.floor(t.count))+1}function po(t){return t!==void 0&&(t.count===null||t.count>=1)}function mn(t,n,e=n){return n<=0?n:t.count===null?Math.max(n,e):n*rt(t)}function gn(t,n,e){if(e<=0)return 1;let o=rt(t),r=Math.min(Math.max(n,0)/e,o),c=Math.min(Math.floor(r),o-1),s=F(r-c);switch(t.direction??"normal"){case"reverse":return 1-s;case"alternate":return c%2===0?s:1-s;default:return s}}function yo(t){return typeof t?.at=="function"&&typeof t?.duration=="number"}function xe(t,n,e,o){return At(t,e,c=>n(o?o(F(c)):F(c)))}function mo(t,n,e){return xe({set:()=>{}},r=>(n(r),{}),t,e)}function go(t,n,e){let o=t.duration;if(o<=0||rt(n)<=1)return t;let r=mn(n,o,e),c=s=>t.at(gn(n,F(s)*r,o));return{duration:r,at:c,_stepper(){let s=0;return{seek:a=>{s=a,c(a/r)},advance:a=>{s+=a;let i=s>=r;return c(i?1:s/r),i}}}}}function bo(t,...n){let e=n.reduce((o,r)=>o+r.duration,0);return At(t,e,o=>{let r=o*e,c={},s=0;for(let a of n){if(r<s)break;let i=a.duration>0?(r-s)/a.duration:1;Object.assign(c,a.at(F(i))),s+=a.duration}return c})}function Mo(t,...n){let e=n.reduce((o,r)=>Math.max(o,r.duration),0);return At(t,e,o=>{let r=o*e,c={};for(let s of n){let a=s.duration>0?r/s.duration:1;Object.assign(c,s.at(F(a)))}return c})}function At(t,n,e){let o=r=>n>0?r/n:1;return{duration:n,at(r){let c=e(r);return t.set(c),c},_stepper(){let r=0;return{seek:c=>{r=c,t.set(e(o(c)))},advance:c=>{r+=c;let s=r>=n;return t.set(e(s?1:o(r))),s}}}}}var ye={pentagon:{sides:5,turn:0},hexagon:{sides:6,turn:0},octagon:{sides:8,turn:Math.PI/8}},de=.382,me=5;function ge(t,n){let{width:e,height:o}=n;if(!(e>0)||!(o>0))return[];switch(t){case"rect":return[ke(e,o,n)];case"ellipse":return Pe(e,o,n);case"line":return[{anchors:[H({x:-e/2,y:0}),H({x:e/2,y:0})],closed:!1}];case"triangle":return[v([{x:0,y:-o/2},{x:e/2,y:o/2},{x:-e/2,y:o/2}],n)];case"rightTriangle":return[v([{x:-e/2,y:-o/2},{x:e/2,y:o/2},{x:-e/2,y:o/2}],n)];case"polygon":return[v(bn(Ft(n,5),0,e/2,o/2),n)];case"polygram":return[v(Mn(Ft(n,5),St(n.ratio??.5),e/2,o/2),n)];case"star":return[v(kn(Mn(Ft(n,me),St(n.ratio??de),1,1),e,o),n)];default:{let r=ye[t];return r?[v(kn(bn(r.sides,r.turn,1,1),e,o),n)]:[]}}}function wo(t,n){let{width:e,height:o}=n,r=ge(t,n);return!(e>0)||!(o>0)?r:dn.map(r,c=>({x:c.x/e,y:c.y/o}))}function To(t){return be.has(t)}var be=new Set(["rect","ellipse","polygon","polygram","triangle","rightTriangle","pentagon","hexagon","octagon","star","line"]);function H(t){return{point:t,inHandle:null,outHandle:null}}function Ft(t,n){return Math.max(3,Math.round(t.sides??n))}function St(t){return Math.max(0,Math.min(1,t))}function bn(t,n,e,o){let r=2*Math.PI/t,c=[];for(let s=0;s<t;s++){let a=-Math.PI/2+n+s*r;c.push({x:e*Math.cos(a),y:o*Math.sin(a)})}return c}function Mn(t,n,e,o){let r=Math.PI/t,c=[];for(let s=0;s<t*2;s++){let a=-Math.PI/2+s*r,i=s%2===0?1:n;c.push({x:e*i*Math.cos(a),y:o*i*Math.sin(a)})}return c}function kn(t,n,e){if(t.length===0)return t;let o=1/0,r=1/0,c=-1/0,s=-1/0;for(let x of t)x.x<o&&(o=x.x),x.x>c&&(c=x.x),x.y<r&&(r=x.y),x.y>s&&(s=x.y);let a=c-o,i=s-r,u=a>1e-9?n/a:1,l=i>1e-9?e/i:1,p=(o+c)/2,h=(r+s)/2;return t.map(x=>({x:(x.x-p)*u,y:(x.y-h)*l}))}function Pn(t){let n=t/2;return Math.abs(n)<1e-6?0:4/3*Math.tan(t/4)/Math.tan(n)}function v(t,n){let e=Me(n.cornerRadius);if(t.length<3||e<=0)return{anchors:t.map(H),closed:!0};let o=n.cornerStyle??"rounded",r=[];for(let c=0;c<t.length;c++){let s=t[c],a=t[(c-1+t.length)%t.length],i=t[(c+1)%t.length],u=Cn(s,a),l=Cn(s,i);if(!u||!l){r.push(H(s));continue}let p=Math.max(-1,Math.min(1,u.x*l.x+u.y*l.y)),h=Math.acos(p);if(h<1e-6||Math.PI-h<1e-6){r.push(H(s));continue}let x=Math.min(e/Math.tan(h/2),T(s,a)/2,T(s,i)/2),f={x:s.x+u.x*x,y:s.y+u.y*x},y={x:s.x+l.x*x,y:s.y+l.y*x};if(o==="angled"){r.push(H(f),H(y));continue}let d=Pn(Math.PI-h);r.push({point:f,inHandle:null,outHandle:{x:f.x+(s.x-f.x)*d,y:f.y+(s.y-f.y)*d}},{point:y,inHandle:{x:y.x+(s.x-y.x)*d,y:y.y+(s.y-y.y)*d},outHandle:null})}return{anchors:r,closed:!0}}function Cn(t,n){let e=n.x-t.x,o=n.y-t.y,r=Math.hypot(e,o);return r<1e-9?null:{x:e/r,y:o/r}}function Me(t){return t===void 0?0:typeof t=="number"?Math.max(0,t):Math.max(0,Math.min(t.topLeft,t.topRight,t.bottomLeft,t.bottomRight))}function ke(t,n,e){let o=Ce(e.cornerRadius,t,n),r=e.cornerStyle??"rounded",c=t/2,s=n/2,a=Pn(Math.PI/2),i=[],u=(f,y,d,g)=>{if(g<=0){i.push(H(f));return}let b={x:f.x-y.x*g,y:f.y-y.y*g},k={x:f.x+d.x*g,y:f.y+d.y*g};if(r==="angled"){i.push(H(b),H(k));return}i.push({point:b,inHandle:null,outHandle:{x:b.x+(f.x-b.x)*a,y:b.y+(f.y-b.y)*a}},{point:k,inHandle:{x:k.x+(f.x-k.x)*a,y:k.y+(f.y-k.y)*a},outHandle:null})},l={x:1,y:0},p={x:0,y:1},h={x:-1,y:0},x={x:0,y:-1};return u({x:-c,y:-s},x,l,o.topLeft),u({x:c,y:-s},l,p,o.topRight),u({x:c,y:s},p,h,o.bottomRight),u({x:-c,y:s},h,x,o.bottomLeft),{anchors:i,closed:!0}}function Ce(t,n,e){let o=t===void 0?{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0}:typeof t=="number"?{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t}:t,r=Math.min(n,e)/2;return{topLeft:Math.max(0,Math.min(o.topLeft,r)),topRight:Math.max(0,Math.min(o.topRight,r)),bottomLeft:Math.max(0,Math.min(o.bottomLeft,r)),bottomRight:Math.max(0,Math.min(o.bottomRight,r))}}function Pe(t,n,e){let o=t/2,r=n/2,c=St(e.ratio??0),s=Math.max(0,Math.min(360,e.sweep??360));if(s<=0)return[];let a=s>=360,i=((e.startAngle??0)-90)*(Math.PI/180),u=i+s*(Math.PI/180);if(a&&c<=0)return[{anchors:D(o,r,i,u,!0),closed:!0}];if(a)return[{anchors:D(o,r,i,u,!0),closed:!0},{anchors:D(o*c,r*c,u,i,!0),closed:!0}];let l=D(o,r,i,u,!1),p=c>0?D(o*c,r*c,u,i,!1):[H({x:0,y:0})];return[{anchors:[...l,...p],closed:!0}]}function D(t,n,e,o,r){let c=o-e,s=Math.max(1,Math.ceil(Math.abs(c)/(Math.PI/2))),a=c/s,i=4/3*Math.tan(a/4),u=[];for(let l=0;l<=s;l++){let p=e+a*l,h={x:t*Math.cos(p),y:n*Math.sin(p)},x={x:-t*Math.sin(p),y:n*Math.cos(p)},f={x:x.x*i,y:x.y*i};u.push({point:h,inHandle:l===0?null:{x:h.x-f.x,y:h.y-f.y},outHandle:l===s?null:{x:h.x+f.x,y:h.y+f.y}})}if(r&&u.length>1){let l=u.pop();u[0].inHandle=l.inHandle}return u}var It={plain:"#.#",number:"#,##0.##",currency:"$#,##0.00",percent:"#,##0.#%"},we={prefix:"",suffix:"",grouped:!1,minInt:1,minFrac:0,maxFrac:1,percent:!1};function Fn(t,n){let e=!1;for(let o of t){if(o==="'"){e=!e;continue}n(o,e)}}function wn(t,n){let e=!1;return Fn(t,(o,r)=>{o===n&&!r&&(e=!0)}),e}function Tn(t,n){let e="",o=!1;for(let r of t){if(r==="'"){o=!o,e+=r;continue}r===n&&!o||(e+=r)}return e}function Hn(t){let n="";return Fn(t,e=>{n+=e}),n}function Te(t){let n=!1,e=-1;for(let o=0;o<t.length;o++){let r=t[o];if(r==="'"){if(n=!n,e>=0)return[e,o];continue}let c=!n&&"#0,.".includes(r);if(c&&e<0)e=o;else if(!c&&e>=0)return[e,o]}return e<0?null:[e,t.length]}function He(t){let n=Te(t);if(!n)return we;let e=t.slice(n[0],n[1]),o=t.slice(0,n[0]),r=t.slice(n[1]),c=wn(o,"%")||wn(r,"%"),s=Hn(c?Tn(o,"%"):o),a=Hn(c?Tn(r,"%"):r),i=e.indexOf("."),u=i<0?e:e.slice(0,i),l=i<0?"":e.slice(i+1),p=(h,x)=>h.split(x).length-1;return{prefix:s,suffix:c?`${a}%`:a,grouped:u.includes(","),minInt:Math.max(1,p(u,"0")),minFrac:p(l,"0"),maxFrac:l.length,percent:c}}var An=new Map;function Ae(t){let n=An.get(t);if(n)return n;let e=He(t);return An.set(t,e),e}function Fe(t){return t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Ao(t,n){if(!Number.isFinite(t))return"";let e=Ae(n),r=(e.percent?t*100:t).toFixed(e.maxFrac),c=r.startsWith("-"),[s="0",a=""]=(c?r.slice(1):r).split("."),i=s.padStart(e.minInt,"0"),u=a;for(;u.length>e.minFrac&&u.endsWith("0");)u=u.slice(0,-1);let l=(e.grouped?Fe(i):i)+(u?`.${u}`:"");return`${c&&Number(r)!==0?"-":""}${e.prefix}${l}${e.suffix}`}function Sn(t,n){if(t==="custom"){let e=n?.trim()??"";return e===""?It.plain:e}return It[t??"plain"]??It.plain}var Io=["number","currency","percent","custom"],Se=10;function _o(t){if(t.format==="custom")return Sn("custom",t.customPattern);let n=Math.min(Se,Math.max(0,Math.round(t.fractionDigits))),e=t.grouped?"#,##0":"0",o=n>0?`.${"0".repeat(n)}`:"",r=`${e}${o}`;return t.format==="currency"?`${Ie(t.currencySymbol)}${r}`:t.format==="percent"?`${r}%`:r}function Ie(t){let n=t.replaceAll("'","");return n===""?"":`'${n}'`}function Ro(t){return typeof t=="string"?lt(t):t}function $o(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e,t[2]+(n[2]-t[2])*e,t[3]+(n[3]-t[3])*e]}function qo(t,n,e){return!Number.isFinite(t)||!Number.isFinite(n)?e<1?t:n:t+(n-t)*e}function vo(t,n,e){return Math.round(t+(n-t)*e)}function _e(t,n,e){return e<1?t:n}var No=_e;function Eo(t){return 90-t}function Yo({orbit:t,elevation:n,distance:e}){let o=t*(Math.PI/180),r=n*(Math.PI/180),c=Math.cos(r)*e;return{x:Math.cos(o)*c,y:Math.sin(r)*e,z:Math.sin(o)*c}}function Xo(t){let n={};return t.orbit!==void 0&&(n.orbit=t.orbit),t.elevation!==void 0&&(n.elevation=t.elevation),t.zoom!==void 0&&(n.zoom=t.zoom),n}var In="";function Bo(t){In=t}function Uo(){return In}function Do(t){if(t<=0)return 1;let n=Math.pow(10,Math.floor(Math.log10(t))),e=t/n;return(e<=1?1:e<=2?2:e<=5?5:10)*n}function Vo(t,n,e,o){let r=e?t*.3:0,c=Math.max(0,t-r),s=Math.max(0,n-1);if(o!==void 0)return{step:o,per:Math.max(0,c-o*s),caption:r};let a=c/(1+s/5);return{step:a/5,per:a,caption:r}}export{st as a,Oe as b,m as c,$e as d,Ee as e,Ye as f,lt as g,We as h,gt as i,J as j,Qe as k,dn as l,he as m,F as n,rt as o,po as p,mn as q,gn as r,yo as s,xe as t,mo as u,go as v,bo as w,Mo as x,de as y,me as z,ge as A,wo as B,To as C,It as D,Ao as E,Sn as F,Io as G,Se as H,_o as I,Ro as J,$o as K,qo as L,vo as M,_e as N,No as O,Eo as P,Yo as Q,Xo as R,Bo as S,Uo as T,Do as U,Vo as V};
3
- //# sourceMappingURL=chunk-KJXGRHOL.js.map