@motionscript/math 0.0.0-stage → 0.1.0-alpha.10

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 (335) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +49 -0
  4. package/README.md +389 -2
  5. package/dist/annotate/angle-mark.d.ts +96 -0
  6. package/dist/annotate/angle-mark.d.ts.map +1 -0
  7. package/dist/annotate/angle-mark.js +97 -0
  8. package/dist/annotate/angle-mark.js.map +1 -0
  9. package/dist/annotate/curly-brace.d.ts +115 -0
  10. package/dist/annotate/curly-brace.d.ts.map +1 -0
  11. package/dist/annotate/curly-brace.js +99 -0
  12. package/dist/annotate/curly-brace.js.map +1 -0
  13. package/dist/annotate/emphasis-mark.d.ts +80 -0
  14. package/dist/annotate/emphasis-mark.d.ts.map +1 -0
  15. package/dist/annotate/emphasis-mark.js +80 -0
  16. package/dist/annotate/emphasis-mark.js.map +1 -0
  17. package/dist/browser/THIRD_PARTY_LICENSES.txt +420 -0
  18. package/dist/browser/chunks/chunk-IRZCG6PM.js +2 -0
  19. package/dist/browser/chunks/chunk-IRZCG6PM.js.map +7 -0
  20. package/dist/browser/chunks/chunk-WMVW6ZIV.js +2 -0
  21. package/dist/browser/chunks/chunk-WMVW6ZIV.js.map +7 -0
  22. package/dist/browser/chunks/mathjax-WV55AC2P.js +61 -0
  23. package/dist/browser/chunks/mathjax-WV55AC2P.js.map +7 -0
  24. package/dist/browser/index.js +2 -0
  25. package/dist/browser/index.js.map +7 -0
  26. package/dist/browser/kit.js +2 -0
  27. package/dist/browser/kit.js.map +7 -0
  28. package/dist/browser/manifest.json +30 -0
  29. package/dist/browser/tex.js +2 -0
  30. package/dist/browser/tex.js.map +7 -0
  31. package/dist/engine.d.ts +71 -0
  32. package/dist/engine.d.ts.map +1 -0
  33. package/dist/engine.js +45 -0
  34. package/dist/engine.js.map +1 -0
  35. package/dist/index.d.ts +30 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +30 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/kit/brace.d.ts +8 -0
  40. package/dist/kit/brace.d.ts.map +1 -0
  41. package/dist/kit/brace.js +36 -0
  42. package/dist/kit/brace.js.map +1 -0
  43. package/dist/kit/cache.d.ts +30 -0
  44. package/dist/kit/cache.d.ts.map +1 -0
  45. package/dist/kit/cache.js +53 -0
  46. package/dist/kit/cache.js.map +1 -0
  47. package/dist/kit/component.d.ts +51 -0
  48. package/dist/kit/component.d.ts.map +1 -0
  49. package/dist/kit/component.js +30 -0
  50. package/dist/kit/component.js.map +1 -0
  51. package/dist/kit/contour.d.ts +8 -0
  52. package/dist/kit/contour.d.ts.map +1 -0
  53. package/dist/kit/contour.js +93 -0
  54. package/dist/kit/contour.js.map +1 -0
  55. package/dist/kit/coords.d.ts +69 -0
  56. package/dist/kit/coords.d.ts.map +1 -0
  57. package/dist/kit/coords.js +224 -0
  58. package/dist/kit/coords.js.map +1 -0
  59. package/dist/kit/curve.d.ts +28 -0
  60. package/dist/kit/curve.d.ts.map +1 -0
  61. package/dist/kit/curve.js +29 -0
  62. package/dist/kit/curve.js.map +1 -0
  63. package/dist/kit/equation.d.ts +61 -0
  64. package/dist/kit/equation.d.ts.map +1 -0
  65. package/dist/kit/equation.js +168 -0
  66. package/dist/kit/equation.js.map +1 -0
  67. package/dist/kit/equation3d.d.ts +50 -0
  68. package/dist/kit/equation3d.d.ts.map +1 -0
  69. package/dist/kit/equation3d.js +103 -0
  70. package/dist/kit/equation3d.js.map +1 -0
  71. package/dist/kit/expression.d.ts +35 -0
  72. package/dist/kit/expression.d.ts.map +1 -0
  73. package/dist/kit/expression.js +124 -0
  74. package/dist/kit/expression.js.map +1 -0
  75. package/dist/kit/field-mark.d.ts +79 -0
  76. package/dist/kit/field-mark.d.ts.map +1 -0
  77. package/dist/kit/field-mark.js +109 -0
  78. package/dist/kit/field-mark.js.map +1 -0
  79. package/dist/kit/field.d.ts +14 -0
  80. package/dist/kit/field.d.ts.map +1 -0
  81. package/dist/kit/field.js +46 -0
  82. package/dist/kit/field.js.map +1 -0
  83. package/dist/kit/follow.d.ts +109 -0
  84. package/dist/kit/follow.d.ts.map +1 -0
  85. package/dist/kit/follow.js +163 -0
  86. package/dist/kit/follow.js.map +1 -0
  87. package/dist/kit/furniture.d.ts +32 -0
  88. package/dist/kit/furniture.d.ts.map +1 -0
  89. package/dist/kit/furniture.js +92 -0
  90. package/dist/kit/furniture.js.map +1 -0
  91. package/dist/kit/geometry.d.ts +13 -0
  92. package/dist/kit/geometry.d.ts.map +1 -0
  93. package/dist/kit/geometry.js +54 -0
  94. package/dist/kit/geometry.js.map +1 -0
  95. package/dist/kit/graph.d.ts +46 -0
  96. package/dist/kit/graph.d.ts.map +1 -0
  97. package/dist/kit/graph.js +90 -0
  98. package/dist/kit/graph.js.map +1 -0
  99. package/dist/kit/mark.d.ts +72 -0
  100. package/dist/kit/mark.d.ts.map +1 -0
  101. package/dist/kit/mark.js +87 -0
  102. package/dist/kit/mark.js.map +1 -0
  103. package/dist/kit/part-fills.d.ts +23 -0
  104. package/dist/kit/part-fills.d.ts.map +1 -0
  105. package/dist/kit/part-fills.js +46 -0
  106. package/dist/kit/part-fills.js.map +1 -0
  107. package/dist/kit/place.d.ts +20 -0
  108. package/dist/kit/place.d.ts.map +1 -0
  109. package/dist/kit/place.js +66 -0
  110. package/dist/kit/place.js.map +1 -0
  111. package/dist/kit/sampler.d.ts +17 -0
  112. package/dist/kit/sampler.d.ts.map +1 -0
  113. package/dist/kit/sampler.js +250 -0
  114. package/dist/kit/sampler.js.map +1 -0
  115. package/dist/kit/scale.d.ts +12 -0
  116. package/dist/kit/scale.d.ts.map +1 -0
  117. package/dist/kit/scale.js +37 -0
  118. package/dist/kit/scale.js.map +1 -0
  119. package/dist/kit/source.d.ts +22 -0
  120. package/dist/kit/source.d.ts.map +1 -0
  121. package/dist/kit/source.js +45 -0
  122. package/dist/kit/source.js.map +1 -0
  123. package/dist/kit/system.d.ts +31 -0
  124. package/dist/kit/system.d.ts.map +1 -0
  125. package/dist/kit/system.js +71 -0
  126. package/dist/kit/system.js.map +1 -0
  127. package/dist/kit/ticks.d.ts +19 -0
  128. package/dist/kit/ticks.d.ts.map +1 -0
  129. package/dist/kit/ticks.js +78 -0
  130. package/dist/kit/ticks.js.map +1 -0
  131. package/dist/kit/withdrawn.d.ts +9 -0
  132. package/dist/kit/withdrawn.d.ts.map +1 -0
  133. package/dist/kit/withdrawn.js +9 -0
  134. package/dist/kit/withdrawn.js.map +1 -0
  135. package/dist/marks/curve-area.d.ts +51 -0
  136. package/dist/marks/curve-area.d.ts.map +1 -0
  137. package/dist/marks/curve-area.js +59 -0
  138. package/dist/marks/curve-area.js.map +1 -0
  139. package/dist/marks/drop-lines.d.ts +57 -0
  140. package/dist/marks/drop-lines.d.ts.map +1 -0
  141. package/dist/marks/drop-lines.js +43 -0
  142. package/dist/marks/drop-lines.js.map +1 -0
  143. package/dist/marks/plot-point.d.ts +71 -0
  144. package/dist/marks/plot-point.d.ts.map +1 -0
  145. package/dist/marks/plot-point.js +71 -0
  146. package/dist/marks/plot-point.js.map +1 -0
  147. package/dist/marks/riemann-sum.d.ts +58 -0
  148. package/dist/marks/riemann-sum.d.ts.map +1 -0
  149. package/dist/marks/riemann-sum.js +63 -0
  150. package/dist/marks/riemann-sum.js.map +1 -0
  151. package/dist/marks/tangent-line.d.ts +71 -0
  152. package/dist/marks/tangent-line.d.ts.map +1 -0
  153. package/dist/marks/tangent-line.js +89 -0
  154. package/dist/marks/tangent-line.js.map +1 -0
  155. package/dist/marks/vector-arrow.d.ts +60 -0
  156. package/dist/marks/vector-arrow.d.ts.map +1 -0
  157. package/dist/marks/vector-arrow.js +67 -0
  158. package/dist/marks/vector-arrow.js.map +1 -0
  159. package/dist/nodes.d.ts +43 -0
  160. package/dist/nodes.d.ts.map +1 -0
  161. package/dist/nodes.js +57 -0
  162. package/dist/nodes.js.map +1 -0
  163. package/dist/plots/function-plot.d.ts +159 -0
  164. package/dist/plots/function-plot.d.ts.map +1 -0
  165. package/dist/plots/function-plot.js +184 -0
  166. package/dist/plots/function-plot.js.map +1 -0
  167. package/dist/plots/points-plot.d.ts +64 -0
  168. package/dist/plots/points-plot.d.ts.map +1 -0
  169. package/dist/plots/points-plot.js +72 -0
  170. package/dist/plots/points-plot.js.map +1 -0
  171. package/dist/plots/stream-lines.d.ts +76 -0
  172. package/dist/plots/stream-lines.d.ts.map +1 -0
  173. package/dist/plots/stream-lines.js +122 -0
  174. package/dist/plots/stream-lines.js.map +1 -0
  175. package/dist/plots/traced-path.d.ts +70 -0
  176. package/dist/plots/traced-path.d.ts.map +1 -0
  177. package/dist/plots/traced-path.js +41 -0
  178. package/dist/plots/traced-path.js.map +1 -0
  179. package/dist/plots/vector-field.d.ts +60 -0
  180. package/dist/plots/vector-field.d.ts.map +1 -0
  181. package/dist/plots/vector-field.js +77 -0
  182. package/dist/plots/vector-field.js.map +1 -0
  183. package/dist/structures/graph-layout.d.ts +11 -0
  184. package/dist/structures/graph-layout.d.ts.map +1 -0
  185. package/dist/structures/graph-layout.js +135 -0
  186. package/dist/structures/graph-layout.js.map +1 -0
  187. package/dist/structures/network-graph.d.ts +174 -0
  188. package/dist/structures/network-graph.d.ts.map +1 -0
  189. package/dist/structures/network-graph.js +240 -0
  190. package/dist/structures/network-graph.js.map +1 -0
  191. package/dist/structures/sample-space.d.ts +114 -0
  192. package/dist/structures/sample-space.d.ts.map +1 -0
  193. package/dist/structures/sample-space.js +161 -0
  194. package/dist/structures/sample-space.js.map +1 -0
  195. package/dist/systems/axes2d.d.ts +197 -0
  196. package/dist/systems/axes2d.d.ts.map +1 -0
  197. package/dist/systems/axes2d.js +157 -0
  198. package/dist/systems/axes2d.js.map +1 -0
  199. package/dist/systems/number-line.d.ts +101 -0
  200. package/dist/systems/number-line.d.ts.map +1 -0
  201. package/dist/systems/number-line.js +91 -0
  202. package/dist/systems/number-line.js.map +1 -0
  203. package/dist/systems/number-plane.d.ts +168 -0
  204. package/dist/systems/number-plane.d.ts.map +1 -0
  205. package/dist/systems/number-plane.js +186 -0
  206. package/dist/systems/number-plane.js.map +1 -0
  207. package/dist/systems/polar-plane.d.ts +98 -0
  208. package/dist/systems/polar-plane.d.ts.map +1 -0
  209. package/dist/systems/polar-plane.js +139 -0
  210. package/dist/systems/polar-plane.js.map +1 -0
  211. package/dist/tex/geometry.d.ts +85 -0
  212. package/dist/tex/geometry.d.ts.map +1 -0
  213. package/dist/tex/geometry.js +632 -0
  214. package/dist/tex/geometry.js.map +1 -0
  215. package/dist/tex/index.d.ts +11 -0
  216. package/dist/tex/index.d.ts.map +1 -0
  217. package/dist/tex/index.js +10 -0
  218. package/dist/tex/index.js.map +1 -0
  219. package/dist/tex/mathjax.d.ts +33 -0
  220. package/dist/tex/mathjax.d.ts.map +1 -0
  221. package/dist/tex/mathjax.js +74 -0
  222. package/dist/tex/mathjax.js.map +1 -0
  223. package/dist/tex/matrix.d.ts +101 -0
  224. package/dist/tex/matrix.d.ts.map +1 -0
  225. package/dist/tex/matrix.js +56 -0
  226. package/dist/tex/matrix.js.map +1 -0
  227. package/dist/tex/node.d.ts +98 -0
  228. package/dist/tex/node.d.ts.map +1 -0
  229. package/dist/tex/node.js +25 -0
  230. package/dist/tex/node.js.map +1 -0
  231. package/dist/tex/tween.d.ts +50 -0
  232. package/dist/tex/tween.d.ts.map +1 -0
  233. package/dist/tex/tween.js +253 -0
  234. package/dist/tex/tween.js.map +1 -0
  235. package/dist/tex/typeset.d.ts +133 -0
  236. package/dist/tex/typeset.d.ts.map +1 -0
  237. package/dist/tex/typeset.js +403 -0
  238. package/dist/tex/typeset.js.map +1 -0
  239. package/dist/three/axes3d.d.ts +247 -0
  240. package/dist/three/axes3d.d.ts.map +1 -0
  241. package/dist/three/axes3d.js +187 -0
  242. package/dist/three/axes3d.js.map +1 -0
  243. package/dist/three/curve-plot3d.d.ts +126 -0
  244. package/dist/three/curve-plot3d.d.ts.map +1 -0
  245. package/dist/three/curve-plot3d.js +109 -0
  246. package/dist/three/curve-plot3d.js.map +1 -0
  247. package/dist/three/entries.d.ts +17 -0
  248. package/dist/three/entries.d.ts.map +1 -0
  249. package/dist/three/entries.js +15 -0
  250. package/dist/three/entries.js.map +1 -0
  251. package/dist/three/label3d.d.ts +11 -0
  252. package/dist/three/label3d.d.ts.map +1 -0
  253. package/dist/three/label3d.js +42 -0
  254. package/dist/three/label3d.js.map +1 -0
  255. package/dist/three/plot-point3d.d.ts +99 -0
  256. package/dist/three/plot-point3d.d.ts.map +1 -0
  257. package/dist/three/plot-point3d.js +34 -0
  258. package/dist/three/plot-point3d.js.map +1 -0
  259. package/dist/three/space.d.ts +43 -0
  260. package/dist/three/space.d.ts.map +1 -0
  261. package/dist/three/space.js +58 -0
  262. package/dist/three/space.js.map +1 -0
  263. package/dist/three/surface-plot3d.d.ts +207 -0
  264. package/dist/three/surface-plot3d.d.ts.map +1 -0
  265. package/dist/three/surface-plot3d.js +261 -0
  266. package/dist/three/surface-plot3d.js.map +1 -0
  267. package/dist/three/vector-arrow3d.d.ts +96 -0
  268. package/dist/three/vector-arrow3d.d.ts.map +1 -0
  269. package/dist/three/vector-arrow3d.js +53 -0
  270. package/dist/three/vector-arrow3d.js.map +1 -0
  271. package/package.json +80 -3
  272. package/registry.json +251 -0
  273. package/src/annotate/angle-mark.ts +137 -0
  274. package/src/annotate/curly-brace.ts +148 -0
  275. package/src/annotate/emphasis-mark.ts +118 -0
  276. package/src/engine.ts +86 -0
  277. package/src/index.ts +29 -0
  278. package/src/kit/brace.ts +37 -0
  279. package/src/kit/cache.ts +61 -0
  280. package/src/kit/component.ts +57 -0
  281. package/src/kit/contour.ts +94 -0
  282. package/src/kit/coords.ts +278 -0
  283. package/src/kit/curve.ts +47 -0
  284. package/src/kit/equation.ts +181 -0
  285. package/src/kit/equation3d.ts +137 -0
  286. package/src/kit/expression.ts +159 -0
  287. package/src/kit/field-mark.ts +171 -0
  288. package/src/kit/field.ts +50 -0
  289. package/src/kit/follow.ts +229 -0
  290. package/src/kit/furniture.ts +113 -0
  291. package/src/kit/geometry.ts +49 -0
  292. package/src/kit/graph.ts +116 -0
  293. package/src/kit/mark.ts +152 -0
  294. package/src/kit/part-fills.ts +61 -0
  295. package/src/kit/place.ts +77 -0
  296. package/src/kit/sampler.ts +281 -0
  297. package/src/kit/scale.ts +39 -0
  298. package/src/kit/source.ts +57 -0
  299. package/src/kit/system.ts +105 -0
  300. package/src/kit/ticks.ts +85 -0
  301. package/src/kit/withdrawn.ts +8 -0
  302. package/src/marks/curve-area.ts +89 -0
  303. package/src/marks/drop-lines.ts +71 -0
  304. package/src/marks/plot-point.ts +102 -0
  305. package/src/marks/riemann-sum.ts +99 -0
  306. package/src/marks/tangent-line.ts +119 -0
  307. package/src/marks/vector-arrow.ts +98 -0
  308. package/src/nodes.ts +99 -0
  309. package/src/plots/function-plot.ts +220 -0
  310. package/src/plots/points-plot.ts +103 -0
  311. package/src/plots/stream-lines.ts +160 -0
  312. package/src/plots/traced-path.ts +70 -0
  313. package/src/plots/vector-field.ts +107 -0
  314. package/src/structures/graph-layout.ts +145 -0
  315. package/src/structures/network-graph.ts +291 -0
  316. package/src/structures/sample-space.ts +210 -0
  317. package/src/systems/axes2d.ts +226 -0
  318. package/src/systems/number-line.ts +130 -0
  319. package/src/systems/number-plane.ts +232 -0
  320. package/src/systems/polar-plane.ts +177 -0
  321. package/src/tex/geometry.ts +703 -0
  322. package/src/tex/index.ts +15 -0
  323. package/src/tex/mathjax.ts +82 -0
  324. package/src/tex/matrix.ts +97 -0
  325. package/src/tex/node.ts +74 -0
  326. package/src/tex/tween.ts +308 -0
  327. package/src/tex/typeset.ts +461 -0
  328. package/src/three/axes3d.ts +267 -0
  329. package/src/three/curve-plot3d.ts +146 -0
  330. package/src/three/entries.ts +42 -0
  331. package/src/three/label3d.ts +52 -0
  332. package/src/three/plot-point3d.ts +63 -0
  333. package/src/three/space.ts +92 -0
  334. package/src/three/surface-plot3d.ts +318 -0
  335. package/src/three/vector-arrow3d.ts +88 -0
@@ -0,0 +1,2 @@
1
+ import{$ as Ka,$a as Kb,A as ja,Aa as jb,Ab as jc,B as ka,Ba as kb,Bb as kc,C as la,Ca as lb,Cb as lc,D as ma,Da as mb,Db as mc,E as na,Ea as nb,Eb as nc,F as oa,Fa as ob,G as pa,Ga as pb,H as qa,Ha as qb,I as ra,Ia as rb,J as sa,Ja as sb,K as ta,Ka as tb,L as ua,La as ub,M as va,Ma as vb,N as wa,Na as wb,O as xa,Oa as xb,P as ya,Pa as yb,Q as za,Qa as zb,R as Aa,Ra as Ab,S as Ba,Sa as Bb,T as Ca,Ta as Cb,U as Da,Ua as Db,V as Ea,Va as Eb,W as Fa,Wa as Fb,X as Ga,Xa as Gb,Y as Ha,Ya as Hb,Z as Ia,Za as Ib,_ as Ja,_a as Jb,a as L,aa as La,ab as Lb,b as M,ba as Ma,bb as Mb,c as N,ca as Na,cb as Nb,d as O,da as Oa,db as Ob,e as P,ea as Pa,eb as Pb,f as Q,fa as Qa,fb as Qb,g as R,ga as Ra,gb as Rb,h as S,ha as Sa,hb as Sb,i as T,ia as Ta,ib as Tb,j as U,ja as Ua,jb as Ub,k as V,ka as Va,kb as Vb,l as W,la as Wa,lb as Wb,m as X,ma as Xa,mb as Xb,n as Y,na as Ya,nb as Yb,o as Z,oa as Za,ob as Zb,p as _,pa as _a,pb as _b,q as $,qa as $a,qb as $b,r as aa,ra as ab,rb as ac,s as ba,sa as bb,sb as bc,t as ca,ta as cb,tb as cc,u as da,ua as db,ub as dc,v as ea,va as eb,vb as ec,w as fa,wa as fb,wb as fc,x as ga,xa as gb,xb as gc,y as ha,ya as hb,yb as hc,z as ia,za as ib,zb as ic}from"./chunks/chunk-IRZCG6PM.js";import{A,B,C,D,E,F,G,H,I,J,K,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunks/chunk-WMVW6ZIV.js";export{gb as AXES,hb as AXES_COMMANDS,W as AXIS_COLOR,mb as Axes2d,ta as CURVE_KEYS,Yb as EQUATION_KINDS,ia as EQUATION_VARIABLES,Rb as EQUATION_VARIABLES_3D,gc as FIELD_COMMANDS,fc as FIELD_STATE,nb as FIELD_VARIABLES,lc as FILL_PAINT,zb as FOLLOW_COMMANDS,yb as FOLLOW_STATE,wb as FunctionPlot,Mb as GRAPH_3D,jc as GRAPH_LAYOUTS,P as IDENTITY_MATRIX,K as Latex,g as LatexError,f as LatexNotLoaded,b as MATHJAX_LOADER,ea as MATH_DIALECT,u as Morph,nc as OUTLINE_TRIM,Eb as OWN_FRAME,l as PAINT,m as PAINT_COMMANDS,O as PIXEL_MAP,za as PLANE_ENTRY,xa as PLOT,X as PLOT_COLOR,ub as PLOT_COMMANDS,Aa as PLOT_REF,tb as PLOT_STATE,vb as PLOT_STROKE,mc as STROKE_PAINT,wa as SYSTEM,ya as SYSTEM_ENTRY,y as TYPESET,z as TYPESET_COMMANDS,pa as UNSET_PARAM,Fb as add,Qb as aim,ba as along,Wa as anchored,lb as axesFurniture,jb as axesMap,kb as axesOf,M as axisScale,Gb as between,e as blankLatex,Ha as boundsOfRuns,Jb as braceOutline,h as buildLatexPath,N as cartesianMap,Va as castsShadow,Ja as clamp,$b as colorAt,ga as compileExpression,ha as compileExpressionCached,Ab as container,a as createBoundedCache,Ea as curveFor,ua as curveValue,Z as declareFormulas,k as defaultLatexMorph,ec as domainEntry,ic as drawField,E as drawFormula,Kb as drawLabel3D,$ as drawLabels,Ta as drawMark,db as drawSystem,aa as drawn,ka as equationError,la as equationParams,fa as expressionVocabulary,qb as fieldError,ob as fieldParams,cc as fillAt,j as findLatexParts,Cb as followedQuad,fb as formatTick,G as formula,A as formulaFrame,I as formulaOf,Nb as graphEntry,Ob as graphOf,Ra as graphPoint,Lb as graphSpace,Ib as grown,Hb as heading,Ia as inflate,Pa as inkCentre,Oa as inkSize,va as isCurve,H as isFormula,S as isIdentityMatrix,J as latexPartBounds,i as latexPartNames,kc as layOut,C as layoutFormula,oa as lerpDomain,bc as lerpFillScale,ca as lerpInterval,R as lerpMatrix,w as lerpMorph,qa as lerpParams,r as lerpPartFills,_b as lerpScale,na as lerpSource,V as lineThrough,n as listed,ib as loadAxes,D as loadFormula,_ as loadFormulas,c as loadMathJax,Ma as markRuns,Sa as markShape,d as mathJaxLoaded,B as measureFormula,dc as meshEntries,x as morphOf,o as omit,Ya as openPlane,Db as outlineBounds,Qa as ownPoint,p as painted,ja as parseEquation,pb as parseField,Vb as parseSpaceCurve,Ub as parseSurface,F as partBoundsIn,t as partPaint,Xa as placeOnMap,Za as plotArea,Da as plotPlane,ac as readFillScale,da as readInterval,Q as readMatrix,q as readPartFills,Zb as readScale,ma as readSource,Na as reading,Fa as refId,L as resolveInterval,Bb as resting,sa as revisionOf,Ga as runsToPath,sb as sampleCurve,ra as scopeFor,Ca as settle,v as settled,Xb as spaceCurveError,Tb as spaceCurveParams,Pb as spaceOf,Ka as stated,Ua as strokeShape,Wb as surfaceError,Sb as surfaceParams,bb as systemLayout,_a as systemMap,cb as systemOpenPlane,Ba as systemPlane,ab as systemProvides,$a as systemSize,eb as ticksFor,rb as traceContour,hc as traceField,xb as tracePlot,La as traced,T as transformedMap,U as warpedMap,s as withPartFill,Y as withoutTips};
2
+ //# sourceMappingURL=kit.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@motionscript/math",
3
+ "version": "0.1.0-alpha.9",
4
+ "exports": {
5
+ ".": "dist/browser/index.js",
6
+ "./kit": "dist/browser/kit.js",
7
+ "./tex": "dist/browser/tex.js"
8
+ },
9
+ "peers": [
10
+ "@motionscript/sdk"
11
+ ],
12
+ "assets": {},
13
+ "thirdParty": [
14
+ {
15
+ "name": "@mathjax/mathjax-newcm-font",
16
+ "version": "4.1.2",
17
+ "license": "Apache-2.0"
18
+ },
19
+ {
20
+ "name": "@mathjax/src",
21
+ "version": "4.1.2",
22
+ "license": "Apache-2.0"
23
+ },
24
+ {
25
+ "name": "mhchemparser",
26
+ "version": "4.2.1",
27
+ "license": "Apache-2.0"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,2 @@
1
+ import{K as t,L as l,M as a,b as o,c as r,d as e,e as x,f as L,g as m,h as d,i as f,j as p,k as i}from"./chunks/chunk-WMVW6ZIV.js";var M=[t,a];export{t as Latex,m as LatexError,a as LatexMatrix,L as LatexNotLoaded,o as MATHJAX_LOADER,M as TEX_NODES,x as blankLatex,d as buildLatexPath,i as defaultLatexMorph,p as findLatexParts,f as latexPartNames,r as loadMathJax,e as mathJaxLoaded,l as matrixSource};
2
+ //# sourceMappingURL=tex.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/tex/index.ts"],
4
+ "sourcesContent": ["import { LatexMatrix } from './matrix';\nimport { Latex } from './node';\n\nexport * from './node';\nexport * from './matrix';\nexport {\n blankLatex, buildLatexPath, findLatexParts, latexPartNames, LatexError, LatexNotLoaded, loadMathJax, mathJaxLoaded, MATHJAX_LOADER,\n} from './geometry';\nexport type { LatexPart, LatexToken, LatexPathResult } from './geometry';\nexport { defaultLatexMorph } from './tween';\nexport type { AnimatedToken, LatexMorphStrategy } from './tween';\n\n/** The typeset-math node types, for a host that registers only these. */\n// Typed by name, so the declaration names each component rather than spelling out its type through core.\nexport const TEX_NODES: (typeof Latex | typeof LatexMatrix)[] = [Latex, LatexMatrix];\n"],
5
+ "mappings": "mIAcO,IAAMA,EAAmD,CAACC,EAAOC,CAAW",
6
+ "names": ["TEX_NODES", "Latex", "LatexMatrix"]
7
+ }
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The math **kit**: what the nodes share, and what a copied one does not copy.
3
+ *
4
+ * A copy takes a node's own files into a project and rewrites its reach for
5
+ * these to `@motionscript/math`, so MathJax, the morph and every shared module
6
+ * stay a real dependency with one identity.
7
+ */
8
+ export { blankLatex, buildLatexPath, findLatexParts, latexPartNames, LatexError, LatexNotLoaded, loadMathJax, mathJaxLoaded, MATHJAX_LOADER, } from './tex/geometry.js';
9
+ export type { LatexPart, LatexToken, LatexPathResult } from './tex/geometry.js';
10
+ export { defaultLatexMorph } from './tex/tween.js';
11
+ export type { AnimatedToken, LatexMorphStrategy } from './tex/tween.js';
12
+ export { Latex } from './tex/node.js';
13
+ export type { LatexProps, LatexStrategies } from './tex/node.js';
14
+ export { drawFormula, formula, formulaFrame, formulaOf, isFormula, latexPartBounds, layoutFormula, lerpMorph, loadFormula, measureFormula, Morph, morphOf, partBoundsIn, settled, TYPESET, TYPESET_COMMANDS, } from './tex/typeset.js';
15
+ export type { FormulaFrame, Morphing, TypesetValues } from './tex/typeset.js';
16
+ export { lerpPartFills, partPaint, readPartFills, withPartFill } from './kit/part-fills.js';
17
+ export type { PartFill, PartFillResolved } from './kit/part-fills.js';
18
+ export { FILL_PAINT, OUTLINE_TRIM, STROKE_PAINT } from './kit/withdrawn.js';
19
+ export { createBoundedCache } from './kit/cache.js';
20
+ export { listed, omit, PAINT, PAINT_COMMANDS, painted } from './kit/component.js';
21
+ export type { BoundedCache } from './kit/cache.js';
22
+ export { drawSystem, plotArea, systemLayout, systemMap, systemOpenPlane, systemProvides, systemSize } from './kit/system.js';
23
+ export type { MapFor, SystemState } from './kit/system.js';
24
+ export { Axes2d, AXES, AXES_COMMANDS, axesFurniture, axesMap, axesOf, loadAxes } from './systems/axes2d.js';
25
+ export type { Axes2dProps, AxesValues, AxisLayout } from './systems/axes2d.js';
26
+ export type { Anchor } from './kit/place.js';
27
+ export { anchored, openPlane, placeOnMap } from './kit/place.js';
28
+ export { castsShadow, drawMark, graphPoint, inkCentre, inkSize, markRuns, markShape, ownPoint, reading, strokeShape, traced, } from './kit/mark.js';
29
+ export type { MarkOptions, MarkPaint, MarkReading, MarkState, Tracer } from './kit/mark.js';
30
+ export { curveFor, PLANE_ENTRY, PLOT, PLOT_REF, plotPlane, refId, settle, SYSTEM, SYSTEM_ENTRY, systemPlane } from './kit/graph.js';
31
+ export type { GraphPlane } from './kit/graph.js';
32
+ export { axisScale, cartesianMap, resolveInterval, PIXEL_MAP } from './kit/coords.js';
33
+ export type { AxisScale, AxisScaling, CartesianOptions, CoordinateMap, Interval } from './kit/coords.js';
34
+ export { compileExpression, compileExpressionCached, expressionVocabulary, MATH_DIALECT } from './kit/expression.js';
35
+ export type { CompiledExpression, ExpressionScope, ExpressionVocabulary } from './kit/expression.js';
36
+ export { equationError, equationParams, parseEquation, EQUATION_VARIABLES } from './kit/equation.js';
37
+ export type { Equation } from './kit/equation.js';
38
+ export { lerpDomain, lerpParams, lerpSource, readSource, revisionOf, scopeFor, UNSET_PARAM } from './kit/source.js';
39
+ export type { PlotSource } from './kit/source.js';
40
+ export { sampleCurve } from './kit/sampler.js';
41
+ export type { CurveProjection, SampleOptions } from './kit/sampler.js';
42
+ export { formatTick, ticksFor } from './kit/ticks.js';
43
+ export type { Ticks } from './kit/ticks.js';
44
+ export { boundsOfRuns, clamp, inflate, runsToPath, stated } from './kit/geometry.js';
45
+ export { CURVE_KEYS, curveValue, isCurve } from './kit/curve.js';
46
+ export type { CurveValues } from './kit/curve.js';
47
+ export { along, AXIS_COLOR, declareFormulas, drawLabels, drawn, lerpInterval, loadFormulas, PLOT_COLOR, readInterval, withoutTips } from './kit/furniture.js';
48
+ export type { Label, LabelStyle } from './kit/furniture.js';
49
+ export { add, between, container, FOLLOW_COMMANDS, FOLLOW_STATE, followedQuad, grown, heading, outlineBounds, OWN_FRAME, resting, } from './kit/follow.js';
50
+ export type { FollowProps, FollowValues, Parted, Quad, Retarget, Target } from './kit/follow.js';
51
+ export { parseSpaceCurve, parseSurface, spaceCurveError, spaceCurveParams, surfaceError, surfaceParams, EQUATION_KINDS, EQUATION_VARIABLES_3D, } from './kit/equation3d.js';
52
+ export type { EquationLanguage, SpaceCurveEquation, SurfaceEquation } from './kit/equation3d.js';
53
+ export { aim, graphEntry, graphOf, graphSpace, spaceOf, GRAPH_3D } from './three/space.js';
54
+ export type { Graph3D, GraphSpace } from './three/space.js';
55
+ export { domainEntry, meshEntries } from './three/entries.js';
56
+ export { drawLabel3D } from './three/label3d.js';
57
+ export type { LabelStyle3D } from './three/label3d.js';
58
+ export { FunctionPlot, PLOT_COMMANDS, PLOT_STATE, PLOT_STROKE, tracePlot } from './plots/function-plot.js';
59
+ export type { FunctionPlotProps, PlotValues } from './plots/function-plot.js';
60
+ export { drawField, FIELD_COMMANDS, FIELD_STATE, traceField } from './kit/field-mark.js';
61
+ export type { FieldDrawing, FieldProps, FieldSampler, FieldStroke, FieldValues } from './kit/field-mark.js';
62
+ export { fieldError, fieldParams, parseField, FIELD_VARIABLES } from './kit/field.js';
63
+ export type { FieldEquation } from './kit/field.js';
64
+ export { traceContour } from './kit/contour.js';
65
+ export { colorAt, fillAt, lerpFillScale, lerpScale, readFillScale, readScale } from './kit/scale.js';
66
+ export { IDENTITY_MATRIX, isIdentityMatrix, lerpMatrix, lineThrough, readMatrix, transformedMap, warpedMap, } from './kit/coords.js';
67
+ export type { Matrix2, Warp } from './kit/coords.js';
68
+ export { braceOutline } from './kit/brace.js';
69
+ export { GRAPH_LAYOUTS, layOut } from './structures/graph-layout.js';
70
+ export type { GraphEdge, GraphLayout } from './structures/graph-layout.js';
71
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACH,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,GACrI,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA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C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/engine.js ADDED
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The math **kit**: what the nodes share, and what a copied one does not copy.
3
+ *
4
+ * A copy takes a node's own files into a project and rewrites its reach for
5
+ * these to `@motionscript/math`, so MathJax, the morph and every shared module
6
+ * stay a real dependency with one identity.
7
+ */
8
+ export { blankLatex, buildLatexPath, findLatexParts, latexPartNames, LatexError, LatexNotLoaded, loadMathJax, mathJaxLoaded, MATHJAX_LOADER, } from './tex/geometry.js';
9
+ export { defaultLatexMorph } from './tex/tween.js';
10
+ export { Latex } from './tex/node.js';
11
+ export { drawFormula, formula, formulaFrame, formulaOf, isFormula, latexPartBounds, layoutFormula, lerpMorph, loadFormula, measureFormula, Morph, morphOf, partBoundsIn, settled, TYPESET, TYPESET_COMMANDS, } from './tex/typeset.js';
12
+ export { lerpPartFills, partPaint, readPartFills, withPartFill } from './kit/part-fills.js';
13
+ export { FILL_PAINT, OUTLINE_TRIM, STROKE_PAINT } from './kit/withdrawn.js';
14
+ export { createBoundedCache } from './kit/cache.js';
15
+ export { listed, omit, PAINT, PAINT_COMMANDS, painted } from './kit/component.js';
16
+ export { drawSystem, plotArea, systemLayout, systemMap, systemOpenPlane, systemProvides, systemSize } from './kit/system.js';
17
+ // A number plane is axes with a grid, so a copied one builds on these rather than a copy of them.
18
+ export { Axes2d, AXES, AXES_COMMANDS, axesFurniture, axesMap, axesOf, loadAxes } from './systems/axes2d.js';
19
+ export { anchored, openPlane, placeOnMap } from './kit/place.js';
20
+ export { castsShadow, drawMark, graphPoint, inkCentre, inkSize, markRuns, markShape, ownPoint, reading, strokeShape, traced, } from './kit/mark.js';
21
+ export { curveFor, PLANE_ENTRY, PLOT, PLOT_REF, plotPlane, refId, settle, SYSTEM, SYSTEM_ENTRY, systemPlane } from './kit/graph.js';
22
+ export { axisScale, cartesianMap, resolveInterval, PIXEL_MAP } from './kit/coords.js';
23
+ export { compileExpression, compileExpressionCached, expressionVocabulary, MATH_DIALECT } from './kit/expression.js';
24
+ export { equationError, equationParams, parseEquation, EQUATION_VARIABLES } from './kit/equation.js';
25
+ export { lerpDomain, lerpParams, lerpSource, readSource, revisionOf, scopeFor, UNSET_PARAM } from './kit/source.js';
26
+ export { sampleCurve } from './kit/sampler.js';
27
+ export { formatTick, ticksFor } from './kit/ticks.js';
28
+ export { boundsOfRuns, clamp, inflate, runsToPath, stated } from './kit/geometry.js';
29
+ export { CURVE_KEYS, curveValue, isCurve } from './kit/curve.js';
30
+ export { along, AXIS_COLOR, declareFormulas, drawLabels, drawn, lerpInterval, loadFormulas, PLOT_COLOR, readInterval, withoutTips } from './kit/furniture.js';
31
+ export { add, between, container, FOLLOW_COMMANDS, FOLLOW_STATE, followedQuad, grown, heading, outlineBounds, OWN_FRAME, resting, } from './kit/follow.js';
32
+ export { parseSpaceCurve, parseSurface, spaceCurveError, spaceCurveParams, surfaceError, surfaceParams, EQUATION_KINDS, EQUATION_VARIABLES_3D, } from './kit/equation3d.js';
33
+ export { aim, graphEntry, graphOf, graphSpace, spaceOf, GRAPH_3D } from './three/space.js';
34
+ export { domainEntry, meshEntries } from './three/entries.js';
35
+ export { drawLabel3D } from './three/label3d.js';
36
+ // A traced path is a plot whose span follows a value, so a copied one builds on these rather than a copy of them.
37
+ export { FunctionPlot, PLOT_COMMANDS, PLOT_STATE, PLOT_STROKE, tracePlot } from './plots/function-plot.js';
38
+ export { drawField, FIELD_COMMANDS, FIELD_STATE, traceField } from './kit/field-mark.js';
39
+ export { fieldError, fieldParams, parseField, FIELD_VARIABLES } from './kit/field.js';
40
+ export { traceContour } from './kit/contour.js';
41
+ export { colorAt, fillAt, lerpFillScale, lerpScale, readFillScale, readScale } from './kit/scale.js';
42
+ export { IDENTITY_MATRIX, isIdentityMatrix, lerpMatrix, lineThrough, readMatrix, transformedMap, warpedMap, } from './kit/coords.js';
43
+ export { braceOutline } from './kit/brace.js';
44
+ export { GRAPH_LAYOUTS, layOut } from './structures/graph-layout.js';
45
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACH,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,GACrI,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EACH,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAChJ,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GACnD,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/E,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1H,kGAAkG;AAClG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAA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,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["/**\n * The math **kit**: what the nodes share, and what a copied one does not copy.\n *\n * A copy takes a node's own files into a project and rewrites its reach for\n * these to `@motionscript/math`, so MathJax, the morph and every shared module\n * stay a real dependency with one identity.\n */\nexport {\n blankLatex, buildLatexPath, findLatexParts, latexPartNames, LatexError, LatexNotLoaded, loadMathJax, mathJaxLoaded, MATHJAX_LOADER,\n} from './tex/geometry';\nexport type { LatexPart, LatexToken, LatexPathResult } from './tex/geometry';\nexport { defaultLatexMorph } from './tex/tween';\nexport type { AnimatedToken, LatexMorphStrategy } from './tex/tween';\nexport { Latex } from './tex/node';\nexport type { LatexProps, LatexStrategies } from './tex/node';\nexport {\n drawFormula, formula, formulaFrame, formulaOf, isFormula, latexPartBounds, layoutFormula, lerpMorph, loadFormula, measureFormula, Morph, morphOf,\n partBoundsIn, settled, TYPESET, TYPESET_COMMANDS,\n} from './tex/typeset';\nexport type { FormulaFrame, Morphing, TypesetValues } from './tex/typeset';\nexport { lerpPartFills, partPaint, readPartFills, withPartFill } from './kit/part-fills';\nexport type { PartFill, PartFillResolved } from './kit/part-fills';\nexport { FILL_PAINT, OUTLINE_TRIM, STROKE_PAINT } from './kit/withdrawn';\nexport { createBoundedCache } from './kit/cache';\nexport { listed, omit, PAINT, PAINT_COMMANDS, painted } from './kit/component';\nexport type { BoundedCache } from './kit/cache';\n\nexport { drawSystem, plotArea, systemLayout, systemMap, systemOpenPlane, systemProvides, systemSize } from './kit/system';\nexport type { MapFor, SystemState } from './kit/system';\n// A number plane is axes with a grid, so a copied one builds on these rather than a copy of them.\nexport { Axes2d, AXES, AXES_COMMANDS, axesFurniture, axesMap, axesOf, loadAxes } from './systems/axes2d';\nexport type { Axes2dProps, AxesValues, AxisLayout } from './systems/axes2d';\nexport type { Anchor } from './kit/place';\nexport { anchored, openPlane, placeOnMap } from './kit/place';\nexport {\n castsShadow, drawMark, graphPoint, inkCentre, inkSize, markRuns, markShape, ownPoint, reading, strokeShape, traced,\n} from './kit/mark';\nexport type { MarkOptions, MarkPaint, MarkReading, MarkState, Tracer } from './kit/mark';\nexport { curveFor, PLANE_ENTRY, PLOT, PLOT_REF, plotPlane, refId, settle, SYSTEM, SYSTEM_ENTRY, systemPlane } from './kit/graph';\nexport type { GraphPlane } from './kit/graph';\nexport { axisScale, cartesianMap, resolveInterval, PIXEL_MAP } from './kit/coords';\nexport type { AxisScale, AxisScaling, CartesianOptions, CoordinateMap, Interval } from './kit/coords';\nexport { compileExpression, compileExpressionCached, expressionVocabulary, MATH_DIALECT } from './kit/expression';\nexport type { CompiledExpression, ExpressionScope, ExpressionVocabulary } from './kit/expression';\nexport { equationError, equationParams, parseEquation, EQUATION_VARIABLES } from './kit/equation';\nexport type { Equation } from './kit/equation';\nexport { lerpDomain, lerpParams, lerpSource, readSource, revisionOf, scopeFor, UNSET_PARAM } from './kit/source';\nexport type { PlotSource } from './kit/source';\nexport { sampleCurve } from './kit/sampler';\nexport type { CurveProjection, SampleOptions } from './kit/sampler';\nexport { formatTick, ticksFor } from './kit/ticks';\nexport type { Ticks } from './kit/ticks';\nexport { boundsOfRuns, clamp, inflate, runsToPath, stated } from './kit/geometry';\nexport { CURVE_KEYS, curveValue, isCurve } from './kit/curve';\nexport type { CurveValues } from './kit/curve';\nexport { along, AXIS_COLOR, declareFormulas, drawLabels, drawn, lerpInterval, loadFormulas, PLOT_COLOR, readInterval, withoutTips } from './kit/furniture';\nexport type { Label, LabelStyle } from './kit/furniture';\nexport {\n add, between, container, FOLLOW_COMMANDS, FOLLOW_STATE, followedQuad, grown, heading, outlineBounds, OWN_FRAME, resting,\n} from './kit/follow';\nexport type { FollowProps, FollowValues, Parted, Quad, Retarget, Target } from './kit/follow';\nexport {\n parseSpaceCurve, parseSurface, spaceCurveError, spaceCurveParams, surfaceError, surfaceParams, EQUATION_KINDS, EQUATION_VARIABLES_3D,\n} from './kit/equation3d';\nexport type { EquationLanguage, SpaceCurveEquation, SurfaceEquation } from './kit/equation3d';\nexport { aim, graphEntry, graphOf, graphSpace, spaceOf, GRAPH_3D } from './three/space';\nexport type { Graph3D, GraphSpace } from './three/space';\nexport { domainEntry, meshEntries } from './three/entries';\nexport { drawLabel3D } from './three/label3d';\nexport type { LabelStyle3D } from './three/label3d';\n// A traced path is a plot whose span follows a value, so a copied one builds on these rather than a copy of them.\nexport { FunctionPlot, PLOT_COMMANDS, PLOT_STATE, PLOT_STROKE, tracePlot } from './plots/function-plot';\nexport type { FunctionPlotProps, PlotValues } from './plots/function-plot';\nexport { drawField, FIELD_COMMANDS, FIELD_STATE, traceField } from './kit/field-mark';\nexport type { FieldDrawing, FieldProps, FieldSampler, FieldStroke, FieldValues } from './kit/field-mark';\nexport { fieldError, fieldParams, parseField, FIELD_VARIABLES } from './kit/field';\nexport type { FieldEquation } from './kit/field';\nexport { traceContour } from './kit/contour';\nexport { colorAt, fillAt, lerpFillScale, lerpScale, readFillScale, readScale } from './kit/scale';\nexport {\n IDENTITY_MATRIX, isIdentityMatrix, lerpMatrix, lineThrough, readMatrix, transformedMap, warpedMap,\n} from './kit/coords';\nexport type { Matrix2, Warp } from './kit/coords';\nexport { braceOutline } from './kit/brace';\nexport { GRAPH_LAYOUTS, layOut } from './structures/graph-layout';\nexport type { GraphEdge, GraphLayout } from './structures/graph-layout';\n"]}
@@ -0,0 +1,30 @@
1
+ export * from './tex/node.js';
2
+ export * from './tex/matrix.js';
3
+ export * from './systems/number-line.js';
4
+ export * from './systems/axes2d.js';
5
+ export * from './systems/number-plane.js';
6
+ export * from './plots/function-plot.js';
7
+ export * from './plots/points-plot.js';
8
+ export * from './marks/plot-point.js';
9
+ export * from './marks/vector-arrow.js';
10
+ export * from './marks/curve-area.js';
11
+ export * from './marks/riemann-sum.js';
12
+ export * from './marks/tangent-line.js';
13
+ export * from './marks/drop-lines.js';
14
+ export * from './annotate/curly-brace.js';
15
+ export * from './annotate/angle-mark.js';
16
+ export * from './annotate/emphasis-mark.js';
17
+ export * from './three/axes3d.js';
18
+ export * from './three/surface-plot3d.js';
19
+ export * from './three/curve-plot3d.js';
20
+ export * from './three/plot-point3d.js';
21
+ export * from './three/vector-arrow3d.js';
22
+ export * from './systems/polar-plane.js';
23
+ export * from './plots/vector-field.js';
24
+ export * from './plots/stream-lines.js';
25
+ export * from './plots/traced-path.js';
26
+ export * from './structures/network-graph.js';
27
+ export * from './structures/sample-space.js';
28
+ export * from './engine.js';
29
+ export { NODES } from "./nodes.js";
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ export * from './tex/node.js';
2
+ export * from './tex/matrix.js';
3
+ export * from './systems/number-line.js';
4
+ export * from './systems/axes2d.js';
5
+ export * from './systems/number-plane.js';
6
+ export * from './plots/function-plot.js';
7
+ export * from './plots/points-plot.js';
8
+ export * from './marks/plot-point.js';
9
+ export * from './marks/vector-arrow.js';
10
+ export * from './marks/curve-area.js';
11
+ export * from './marks/riemann-sum.js';
12
+ export * from './marks/tangent-line.js';
13
+ export * from './marks/drop-lines.js';
14
+ export * from './annotate/curly-brace.js';
15
+ export * from './annotate/angle-mark.js';
16
+ export * from './annotate/emphasis-mark.js';
17
+ export * from './three/axes3d.js';
18
+ export * from './three/surface-plot3d.js';
19
+ export * from './three/curve-plot3d.js';
20
+ export * from './three/plot-point3d.js';
21
+ export * from './three/vector-arrow3d.js';
22
+ export * from './systems/polar-plane.js';
23
+ export * from './plots/vector-field.js';
24
+ export * from './plots/stream-lines.js';
25
+ export * from './plots/traced-path.js';
26
+ export * from './structures/network-graph.js';
27
+ export * from './structures/sample-space.js';
28
+ export * from './engine.js';
29
+ export { NODES } from "./nodes.js";
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export * from './tex/node';\nexport * from './tex/matrix';\nexport * from './systems/number-line';\nexport * from './systems/axes2d';\nexport * from './systems/number-plane';\nexport * from './plots/function-plot';\nexport * from './plots/points-plot';\nexport * from './marks/plot-point';\nexport * from './marks/vector-arrow';\nexport * from './marks/curve-area';\nexport * from './marks/riemann-sum';\nexport * from './marks/tangent-line';\nexport * from './marks/drop-lines';\nexport * from './annotate/curly-brace';\nexport * from './annotate/angle-mark';\nexport * from './annotate/emphasis-mark';\nexport * from './three/axes3d';\nexport * from './three/surface-plot3d';\nexport * from './three/curve-plot3d';\nexport * from './three/plot-point3d';\nexport * from './three/vector-arrow3d';\nexport * from './systems/polar-plane';\nexport * from './plots/vector-field';\nexport * from './plots/stream-lines';\nexport * from './plots/traced-path';\nexport * from './structures/network-graph';\nexport * from './structures/sample-space';\nexport * from './engine';\nexport { NODES } from \"./nodes\";\n"]}
@@ -0,0 +1,8 @@
1
+ import type { PathCommand, Vector2 } from "@motionscript/sdk";
2
+ /**
3
+ * A curly brace from `from` to `to`, bulging toward `out` (a unit vector) and
4
+ * `reach` deep at its tip: what a brace node draws, and a sample space beside
5
+ * its parts. Path commands, y-up.
6
+ */
7
+ export declare function braceOutline(from: Vector2, to: Vector2, out: Vector2, reach: number): PathCommand[];
8
+ //# sourceMappingURL=brace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brace.d.ts","sourceRoot":"","sources":["../../src/kit/brace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAM9D;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,EAAE,CAyBnG"}
@@ -0,0 +1,36 @@
1
+ import { add, between, heading } from "./follow.js";
2
+ /** How far a quarter circle's control points sit along its tangents, as a share of its radius. */
3
+ const QUARTER = 0.5523;
4
+ /**
5
+ * A curly brace from `from` to `to`, bulging toward `out` (a unit vector) and
6
+ * `reach` deep at its tip: what a brace node draws, and a sample space beside
7
+ * its parts. Path commands, y-up.
8
+ */
9
+ export function braceOutline(from, to, out, reach) {
10
+ const { unit, length } = heading(from, to);
11
+ if (length === 0)
12
+ return [];
13
+ const r = Math.min(reach / 2, length / 4);
14
+ const mid = between(from, to);
15
+ const lift = (p, k) => add(p, out, k * r);
16
+ const along = (p, k) => add(p, unit, k * r);
17
+ const h = QUARTER;
18
+ const curve = (c1, c2, end) => ({
19
+ type: "C", x1: c1.x, y1: c1.y, x2: c2.x, y2: c2.y, x: end.x, y: end.y,
20
+ });
21
+ const a = lift(along(from, 1), 1);
22
+ const b = lift(along(mid, -1), 1);
23
+ const tip = lift(mid, 2);
24
+ const c = lift(along(mid, 1), 1);
25
+ const d = lift(along(to, -1), 1);
26
+ return [
27
+ { type: "M", x: from.x, y: from.y },
28
+ curve(lift(from, h), lift(along(from, 1 - h), 1), a),
29
+ { type: "L", x: b.x, y: b.y },
30
+ curve(lift(along(mid, -1 + h), 1), lift(mid, 2 - h), tip),
31
+ curve(lift(mid, 2 - h), lift(along(mid, 1 - h), 1), c),
32
+ { type: "L", x: d.x, y: d.y },
33
+ curve(lift(along(to, -1 + h), 1), lift(to, h), to),
34
+ ];
35
+ }
36
+ //# sourceMappingURL=brace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brace.js","sourceR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,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;KACrD,CAAC;AACN,CAAC","sourcesContent":["import type { PathCommand, Vector2 } from \"@motionscript/sdk\";\nimport { add, between, heading } from \"./follow\";\n\n/** How far a quarter circle's control points sit along its tangents, as a share of its radius. */\nconst QUARTER = 0.5523;\n\n/**\n * A curly brace from `from` to `to`, bulging toward `out` (a unit vector) and\n * `reach` deep at its tip: what a brace node draws, and a sample space beside\n * its parts. Path commands, y-up.\n */\nexport function braceOutline(from: Vector2, to: Vector2, out: Vector2, reach: number): PathCommand[] {\n const { unit, length } = heading(from, to);\n if (length === 0) return [];\n const r = Math.min(reach / 2, length / 4);\n const mid = between(from, to);\n const lift = (p: Vector2, k: number) => add(p, out, k * r);\n const along = (p: Vector2, k: number) => add(p, unit, k * r);\n const h = QUARTER;\n const curve = (c1: Vector2, c2: Vector2, end: Vector2): PathCommand => ({\n type: \"C\", x1: c1.x, y1: c1.y, x2: c2.x, y2: c2.y, x: end.x, y: end.y,\n });\n const a = lift(along(from, 1), 1);\n const b = lift(along(mid, -1), 1);\n const tip = lift(mid, 2);\n const c = lift(along(mid, 1), 1);\n const d = lift(along(to, -1), 1);\n return [\n { type: \"M\", x: from.x, y: from.y },\n curve(lift(from, h), lift(along(from, 1 - h), 1), a),\n { type: \"L\", x: b.x, y: b.y },\n curve(lift(along(mid, -1 + h), 1), lift(mid, 2 - h), tip),\n curve(lift(mid, 2 - h), lift(along(mid, 1 - h), 1), c),\n { type: \"L\", x: d.x, y: d.y },\n curve(lift(along(to, -1 + h), 1), lift(to, h), to),\n ];\n}\n"]}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A bounded, least-recently-used memo.
3
+ *
4
+ * Sits under `geometry.ts`, and imports nothing, so it is testable in bare Node:
5
+ * everything else in this package reaches MathJax's browser adaptor at module
6
+ * scope, which means a test that touches it needs a DOM. The one piece of logic
7
+ * here worth being sure about — what gets thrown away when the memo is full —
8
+ * is exactly the piece that does not need one.
9
+ *
10
+ * Least-recently-used rather than oldest-first, and that matters for the shape
11
+ * of work this sees. A `Latex` node re-resolves its formula whenever `fontSize`
12
+ * changes, so animating the size of one formula inserts a fresh key every frame
13
+ * and would, under a first-in-first-out rule, walk the whole memo out of it in a
14
+ * couple of seconds — including the entries for every *other* formula in the
15
+ * scene, none of which had done anything wrong. Touching an entry on read keeps
16
+ * the formulas that are actually being asked for ahead of the ones streaming
17
+ * past.
18
+ */
19
+ export interface BoundedCache<T> {
20
+ get(key: string): T | undefined;
21
+ set(key: string, value: T): void;
22
+ /** Entries held. For tests and for anyone measuring. */
23
+ readonly size: number;
24
+ }
25
+ /**
26
+ * @param limit Most entries to hold. One more arriving evicts the least
27
+ * recently read or written.
28
+ */
29
+ export declare function createBoundedCache<T>(limit: number): BoundedCache<T>;
30
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/kit/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAChC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IACjC,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CA8BpE"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * A bounded, least-recently-used memo.
3
+ *
4
+ * Sits under `geometry.ts`, and imports nothing, so it is testable in bare Node:
5
+ * everything else in this package reaches MathJax's browser adaptor at module
6
+ * scope, which means a test that touches it needs a DOM. The one piece of logic
7
+ * here worth being sure about — what gets thrown away when the memo is full —
8
+ * is exactly the piece that does not need one.
9
+ *
10
+ * Least-recently-used rather than oldest-first, and that matters for the shape
11
+ * of work this sees. A `Latex` node re-resolves its formula whenever `fontSize`
12
+ * changes, so animating the size of one formula inserts a fresh key every frame
13
+ * and would, under a first-in-first-out rule, walk the whole memo out of it in a
14
+ * couple of seconds — including the entries for every *other* formula in the
15
+ * scene, none of which had done anything wrong. Touching an entry on read keeps
16
+ * the formulas that are actually being asked for ahead of the ones streaming
17
+ * past.
18
+ */
19
+ /**
20
+ * @param limit Most entries to hold. One more arriving evicts the least
21
+ * recently read or written.
22
+ */
23
+ export function createBoundedCache(limit) {
24
+ // Insertion order is the eviction order, which is what makes a plain `Map`
25
+ // an LRU as long as every read re-inserts.
26
+ const entries = new Map();
27
+ return {
28
+ get(key) {
29
+ if (!entries.has(key))
30
+ return undefined;
31
+ const value = entries.get(key);
32
+ // Delete-then-set moves the key to the end, so the next eviction
33
+ // takes the genuinely coldest entry rather than the oldest one.
34
+ entries.delete(key);
35
+ entries.set(key, value);
36
+ return value;
37
+ },
38
+ set(key, value) {
39
+ entries.delete(key);
40
+ entries.set(key, value);
41
+ while (entries.size > limit) {
42
+ const coldest = entries.keys().next().value;
43
+ if (coldest === undefined)
44
+ break;
45
+ entries.delete(coldest);
46
+ }
47
+ },
48
+ get size() {
49
+ return entries.size;
50
+ },
51
+ };
52
+ }
53
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/kit/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAI,KAAa;IAC/C,2EAA2E;IAC3E,2CAA2C;IAC3C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAa,CAAC;IAErC,OAAO;QACH,GAAG,CAAC,GAAG;YACH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,OAAO,SAAS,CAAC;YACxC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAM,CAAC;YACpC,iEAAiE;YACjE,gEAAgE;YAChE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACxB,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,CAAC,GAAG,EAAE,KAAK;YACV,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACxB,OAAO,OAAO,CAAC,IAAI,GAAG,KAAK,EAAE,CAAC;gBAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;gBAC5C,IAAI,OAAO,KAAK,SAAS;oBAAE,MAAM;gBACjC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;QAED,IAAI,IAAI;YACJ,OAAO,OAAO,CAAC,IAAI,CAAC;QACxB,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["/**\n * A bounded, least-recently-used memo.\n *\n * Sits under `geometry.ts`, and imports nothing, so it is testable in bare Node:\n * everything else in this package reaches MathJax's browser adaptor at module\n * scope, which means a test that touches it needs a DOM. The one piece of logic\n * here worth being sure about — what gets thrown away when the memo is full —\n * is exactly the piece that does not need one.\n *\n * Least-recently-used rather than oldest-first, and that matters for the shape\n * of work this sees. A `Latex` node re-resolves its formula whenever `fontSize`\n * changes, so animating the size of one formula inserts a fresh key every frame\n * and would, under a first-in-first-out rule, walk the whole memo out of it in a\n * couple of seconds — including the entries for every *other* formula in the\n * scene, none of which had done anything wrong. Touching an entry on read keeps\n * the formulas that are actually being asked for ahead of the ones streaming\n * past.\n */\n\nexport interface BoundedCache<T> {\n get(key: string): T | undefined;\n set(key: string, value: T): void;\n /** Entries held. For tests and for anyone measuring. */\n readonly size: number;\n}\n\n/**\n * @param limit Most entries to hold. One more arriving evicts the least\n * recently read or written.\n */\nexport function createBoundedCache<T>(limit: number): BoundedCache<T> {\n // Insertion order is the eviction order, which is what makes a plain `Map`\n // an LRU as long as every read re-inserts.\n const entries = new Map<string, T>();\n\n return {\n get(key) {\n if (!entries.has(key)) return undefined;\n const value = entries.get(key) as T;\n // Delete-then-set moves the key to the end, so the next eviction\n // takes the genuinely coldest entry rather than the oldest one.\n entries.delete(key);\n entries.set(key, value);\n return value;\n },\n\n set(key, value) {\n entries.delete(key);\n entries.set(key, value);\n while (entries.size > limit) {\n const coldest = entries.keys().next().value;\n if (coldest === undefined) break;\n entries.delete(coldest);\n }\n },\n\n get size() {\n return entries.size;\n },\n };\n}\n"]}
@@ -0,0 +1,51 @@
1
+ import { type RenderContext, type Type, type Fill as _Fill, type FillResolved as _FillResolved, type Shadow as _Shadow, type ShadowResolved as _ShadowResolved, type Stroke as _Stroke, type StrokeResolved as _StrokeResolved } from "@motionscript/sdk";
2
+ /** A math node's paints: fill, stroke, shadow and the outline trim, with no overlay. */
3
+ export declare const PAINT: {
4
+ fill: import("@motionscript/sdk").Attribute<_Fill, _FillResolved[]>;
5
+ stroke: import("@motionscript/sdk").Attribute<_Stroke, _StrokeResolved[]>;
6
+ shadow: import("@motionscript/sdk").Attribute<_Shadow, _ShadowResolved[]>;
7
+ start: Type<number, number, false>;
8
+ end: Type<number, number, false>;
9
+ };
10
+ export declare const PAINT_COMMANDS: {
11
+ fillTo: {
12
+ readonly args: readonly ["fill"];
13
+ readonly run?: undefined;
14
+ };
15
+ strokeTo: {
16
+ readonly args: readonly ["stroke"];
17
+ readonly run?: undefined;
18
+ };
19
+ shadowTo: {
20
+ readonly args: readonly ["shadow"];
21
+ readonly run?: undefined;
22
+ };
23
+ progressTo: {
24
+ readonly args: readonly ["start", "end"];
25
+ readonly run?: undefined;
26
+ };
27
+ flash: {
28
+ readonly args: {
29
+ readonly portion: Type<number, number, false>;
30
+ };
31
+ run(timeline: any, state: any, children: any): import("@motionscript/sdk").Piece;
32
+ };
33
+ };
34
+ /**
35
+ * One of `values`, held as text with its choices listed (no `kind: "enum"`).
36
+ */
37
+ export declare function listed<const V extends readonly string[]>(values: V, initial: V[number], options?: ListedOptions): Type<V[number]>;
38
+ /** With no default: an arg left out is one the command was not given. */
39
+ export declare function listed<const V extends readonly string[]>(values: V, initial: undefined, options?: ListedOptions): Type<V[number] | undefined>;
40
+ interface ListedOptions {
41
+ readonly animatable?: boolean;
42
+ }
43
+ /** `record` without `keys`: the paints a node has no use for. */
44
+ export declare function omit<T extends object, const K extends keyof T>(record: T, ...keys: K[]): Omit<T, K>;
45
+ /**
46
+ * A node's paint order: its own paint under its children, then what it lays
47
+ * over them, each cut at the near plane of a space it crosses.
48
+ */
49
+ export declare function painted(ctx: RenderContext, own: () => void, over?: () => void): void;
50
+ export {};
51
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/kit/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,aAAa,EAClB,KAAK,IAAI,EAET,KAAK,IAAI,IAAI,KAAK,EAClB,KAAK,YAAY,IAAI,aAAa,EAClC,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,cAAc,IAAI,eAAe,EACtC,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,cAAc,IAAI,eAAe,EACzC,MAAM,mBAAmB,CAAC;AAU3B,wFAAwF;AACxF,eAAO,MAAM,KAAK;;;;;;CAAQ,CAAC;AAC3B,eAAO,MAAM,cAAc;;;oBAQmE,CAAC;;;;oBAC3B,CAAC;;;;oBAGzD,CAAC;;;;oBAMH,CAAA;;;;;;;;CAlBiC,CAAC;AAE5C;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACnI,yEAAyE;AACzE,wBAAgB,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC;AAK/I,UAAU,aAAa;IACnB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,iEAAiE;AACjE,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAInG;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,IAAI,EAAE,IAAI,GAAE,MAAM,IAAgB,GAAG,IAAI,CAI/F"}
@@ -0,0 +1,30 @@
1
+ import { Paint, Types, } from "@motionscript/sdk";
2
+ /**
3
+ * What a component in this kit shares beyond the factory: the paints a math
4
+ * node draws with, listed choices, and the order a node paints in.
5
+ */
6
+ const { overlay: _overlay, ...paint } = Paint.state;
7
+ const { overlayTo: _overlayTo, ...paintCommands } = Paint.commands;
8
+ /** A math node's paints: fill, stroke, shadow and the outline trim, with no overlay. */
9
+ export const PAINT = paint;
10
+ export const PAINT_COMMANDS = paintCommands;
11
+ export function listed(values, initial, options = {}) {
12
+ return Types.custom(initial, { ...options, options: values });
13
+ }
14
+ /** `record` without `keys`: the paints a node has no use for. */
15
+ export function omit(record, ...keys) {
16
+ const out = { ...record };
17
+ for (const key of keys)
18
+ delete out[key];
19
+ return out;
20
+ }
21
+ /**
22
+ * A node's paint order: its own paint under its children, then what it lays
23
+ * over them, each cut at the near plane of a space it crosses.
24
+ */
25
+ export function painted(ctx, own, over = () => { }) {
26
+ ctx.inFront(own);
27
+ ctx.children();
28
+ ctx.inFront(over);
29
+ }
30
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/kit/component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACL,KAAK,GAWR,MAAM,mBAAmB,CAAC;AAE3B;;;GAGG;AAEH,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;AACpD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC;AAEnE,wFAAwF;AACxF,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC;AAC3B,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC;AAQ5C,MAAM,UAAU,MAAM,CAAC,MAAyB,EAAE,OAA2B,EAAE,UAAyB,EAAE;IACtG,OAAO,KAAK,CAAC,MAAM,CAAiG,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;AAClK,CAAC;AAMD,iEAAiE;AACjE,MAAM,UAAU,IAAI,CAA4C,MAAS,EAAE,GAAG,IAAS;IACnF,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,GAAkB,EAAE,GAAe,EAAE,OAAmB,GAAG,EAAE,GAAG,CAAC;IACrF,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjB,GAAG,CAAC,QAAQ,EAAE,CAAC;IACf,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC","sourcesContent":["import {\n Paint,\n Types,\n type EntryOptions,\n type RenderContext,\n type Type,\n // Named so the emitted declaration reaches these through the sdk, not core.\n type Fill as _Fill,\n type FillResolved as _FillResolved,\n type Shadow as _Shadow,\n type ShadowResolved as _ShadowResolved,\n type Stroke as _Stroke,\n type StrokeResolved as _StrokeResolved,\n} from \"@motionscript/sdk\";\n\n/**\n * What a component in this kit shares beyond the factory: the paints a math\n * node draws with, listed choices, and the order a node paints in.\n */\n\nconst { overlay: _overlay, ...paint } = Paint.state;\nconst { overlayTo: _overlayTo, ...paintCommands } = Paint.commands;\n\n/** A math node's paints: fill, stroke, shadow and the outline trim, with no overlay. */\nexport const PAINT = paint;\nexport const PAINT_COMMANDS = paintCommands;\n\n/**\n * One of `values`, held as text with its choices listed (no `kind: \"enum\"`).\n */\nexport function listed<const V extends readonly string[]>(values: V, initial: V[number], options?: ListedOptions): Type<V[number]>;\n/** With no default: an arg left out is one the command was not given. */\nexport function listed<const V extends readonly string[]>(values: V, initial: undefined, options?: ListedOptions): Type<V[number] | undefined>;\nexport function listed(values: readonly string[], initial: string | undefined, options: ListedOptions = {}): Type<string | undefined> {\n return Types.custom<string | undefined, string | undefined, EntryOptions & { readonly options: readonly string[] }>(initial, { ...options, options: values });\n}\n\ninterface ListedOptions {\n readonly animatable?: boolean;\n}\n\n/** `record` without `keys`: the paints a node has no use for. */\nexport function omit<T extends object, const K extends keyof T>(record: T, ...keys: K[]): Omit<T, K> {\n const out = { ...record };\n for (const key of keys) delete out[key];\n return out;\n}\n\n/**\n * A node's paint order: its own paint under its children, then what it lays\n * over them, each cut at the near plane of a space it crosses.\n */\nexport function painted(ctx: RenderContext, own: () => void, over: () => void = () => { }): void {\n ctx.inFront(own);\n ctx.children();\n ctx.inFront(over);\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import type { Vector2 } from "@motionscript/sdk";
2
+ /**
3
+ * The lines along which a function of two variables is zero, over a box of
4
+ * graph values: marching squares, its crossings placed by linear interpolation
5
+ * and joined end to end into runs. Points are graph coordinates.
6
+ */
7
+ export declare function traceContour(f: (x: number, y: number) => number, [x0, x1]: readonly [number, number], [y0, y1]: readonly [number, number], columns: number, rows: number): Vector2[][];
8
+ //# sourceMappingURL=contour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../src/kit/contour.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,YAAY,CACxB,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,EACnC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,OAAO,EAAE,EAAE,CAgFb"}