@motionscript/math 0.1.0-alpha.4 → 0.1.0-alpha.5

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.
package/CHANGELOG.md CHANGED
@@ -1,92 +1,110 @@
1
- # @motionscript/math
2
-
3
- ## 0.1.0-alpha.4
4
-
5
- ### Minor Changes
6
-
7
- - 7f8b4d0: `@motionscript/math` is a new kit, and the `Latex` node now lives in it. Import it from there:
8
-
9
- ```diff
10
- - import { Latex, NODES } from "@motionscript/latex";
11
- + import { Latex, NODES } from "@motionscript/math";
12
- ```
13
-
14
- - The node, its `latex` key, its props, `morphTo` and the helpers (`buildLatexPath`, `LatexError`, `defaultLatexMorph`) are unchanged, so a document that names `latex` needs no edit. `ms add latex` now copies a node that imports `@motionscript/math`.
15
- - `@motionscript/math/kit` holds what a copied node imports rather than copies, and `@motionscript/math/tex` the typeset-math half alone.
16
- - `@motionscript/latex` and `@motionscript/plot` are no longer released. Their published versions stay on npm as they are.
17
-
18
- - 7f8b4d0: 3D graphs, and named commands for 3D scenes.
19
-
20
- - `@motionscript/math` gains `axes3d` (a 3D graph that is its own viewport, a `canvas3d` with its camera, lights and `orbitTo`, so it goes straight on a 2D stage: three axes through a box of graph coordinates, z up, with ticks, tips, numbers and titles), `surfacePlot3d` (a height over x and y, or three parts in u and v; coloured by height with `colorScale`, ruled with `meshLines`), `curvePlot3d` (a space curve, drawn on with `progressTo`), `plotPoint3d` (rides a surface it is put inside) and `vectorArrow3d`. Anything inside the axes sits at graph coordinates and keeps its own size.
21
- - Every 3D node has `moveTo`, `rotateTo` and `scaleTo`. A `canvas3d` has `orbitTo` for its default camera, and a `camera3d` has `orbitTo` and `lookTo`.
22
- - A 3D parent can place its children in coordinates of its own (`Node3D._spaceOf`, `ChildSpace3D`), as a 2D one already could, and so can a `canvas3d` for the 3D nodes directly inside it (`Canvas3D._spaceOf`).
23
- - The SDK exports `MaterialShorthand3D`, what a mesh node of your own returns from `materialShorthand()`.
24
-
25
- - 7f8b4d0: `@motionscript/math` gains coordinate systems, plots and the marks that go on a graph.
26
-
27
- - `numberLine`, `axes2d` and `numberPlane` are coordinate systems: a child's `x`/`y` are graph units whatever the child is, so a text or an image sits on a graph at its own size, `moveTo` moves it in graph units, and `rangeTo` pans and zooms everything inside.
28
- - `functionPlot` draws an equation and reads its kind from how it is written: `sin(x)`, `x = y^2`, `r = 1 + cos(theta)`, `(cos(t), sin(t))`. `morphTo` bends one curve into another, and curves break at asymptotes and domain edges. A name the equation does not know is a named value: 1 until `params` gives it one, bindable to a variable by a formula, listed by `equationParams`.
29
- - `pointsPlot`, `plotPoint`, `vectorArrow`, `curveArea`, `riemannSum`, `tangentLine` and `dropLines` are drawn in graph coordinates. The ones that ride a plot name it by id in `on`.
30
- - `@motionscript/math/kit` exports `CoordinateSystem`, `Mark`, the coordinate map, the equation language and the sampler for a custom system or mark.
31
- - The SDK exports the `Extents` type that `pathOps.bounds` already returned.
32
-
33
- - 7f8b4d0: A formula's parts can be named, and marks can be drawn on them.
34
-
35
- - Every piece of a `latex` formula's source is a part: `partColors` colours one by its source (`{ part: 'x^2', color: '#facc15' }`), `colorTo` animates that, and `partBounds(part)` says where it is. A morph now carries a term both formulas write as one, with its colour.
36
- - `written` writes a formula on glyph by glyph, each outlined and then filled; `writeTo` animates it.
37
- - `latexMatrix` typesets a matrix from its `entries` in the `brackets` it is given; each entry is a part, and `entriesTo` morphs to new ones.
38
- - `curlyBrace`, `emphasisMark` (box, circle, underline, cross) and `angleMark` annotate. The first two follow a node, or one part of a formula, by id and slide to another with `retargetTo`; a brace with no target spans two points.
39
- - A label written between dollar signs is typeset: on a brace, an angle, a plot point, and an axis.
40
- - `@motionscript/math/kit` exports `FollowMark`, `quadOf` and `findLatexParts` for a custom mark.
41
-
42
- - 7f8b4d0: MathJax loads only when a scene typesets a formula.
43
-
44
- - MathJax and its font are a module of their own, imported once by `loadMathJax()`. A formula node, and a graph, point, brace or angle whose label is written between dollar signs, declares the `math:mathjax` loader (`MATHJAX_LOADER`), which a host waits for before layout; a scene without one never downloads or parses MathJax.
45
- - Code that typesets outside a scene awaits `loadMathJax()` first. Before then `buildLatexPath` throws `LatexNotLoaded`, `latexPartNames` returns nothing, and `mathJaxLoaded()` says whether it has arrived.
46
-
47
- - 7f8b4d0: Network graphs and sample spaces.
48
-
49
- - `networkGraph`: vertices and edges arranged in a circle, by springs, as a tree or in a grid, directed or not. `arrangeTo` moves every vertex to where another arrangement puts it, and `colorTo` colours a vertex or an edge (`a-b`).
50
- - `sampleSpace`: a probability's whole cut into parts whose areas are their probabilities, named by braces, with `divideTo` to move the cuts.
51
-
52
- - 217ae88: A node type can withdraw what it inherits, and the math nodes take only the paints they draw.
53
-
54
- - `@withdraw(...keys)` drops inherited properties and commands from a node class. A withdrawn property is left out of `describe()` and holds its default whatever is written to it; a withdrawn command is left out of `commandKeys()` but still runs for a stored document, changing nothing. A subclass that declares the key again takes it back.
55
- - `Registry.takesCommand(type, key)` says whether a node type takes a command: its own, or a node-less one unless that runs a method the type lacks or withdrew. `addCommand` takes a `method` for that; the paint commands name theirs.
56
- - Math: a plot, a tangent, drop lines, an arrow, a brace, an emphasis mark and an angle mark have no `fill`; a curve area has no `stroke`; a formula, a traced path, a field, a curve area, a Riemann sum, a plot point and a sample space have no outline trim (`start`, `end`, `progressTo`, `flash`). An open `pointsPlot` draws no fill.
57
- - Math: `partColors` and `colorTo` on `latex`, `latexMatrix` and `networkGraph` are now `partFills` and `partFillTo`, each part taking any paint (`{ part, fill }`). A vector field's and stream lines' `colorScale` is now `strengthFills`, and a sample space's `colors` is now `columnFills`, both lists of paints.
58
- - Math: a vector field's and stream lines' shadow is cast when they are painted by strength too, not only in one paint.
59
-
60
- - 7f8b4d0: Planes that transform, fields, polar planes, implicit curves and trails.
61
-
62
- - `numberPlane` gains `matrix` and `transformTo` (a linear map of the whole plane), `warp` and `warpTo` (a bend by a function of its points), and a faint `ghost` of itself while it is transformed. The grid, the axes and everything on the plane go with it.
63
- - New nodes: `polarPlane` (rings and spokes; plots and marks go on it as on axes), `vectorField` (arrows of a field `(P, Q)`, coloured by strength with `colorScale`), `streamLines` (the lines the field carries a point along, sent flowing with `flowTo`) and `tracedPath` (the trail a point leaves as a value changes).
64
- - A `functionPlot` draws an implicit equation, such as `x^2 + y^2 = 4`, where it holds.
65
- - A `Camera` can `follow` a node of its world by id, with `lookAt` as an offset from it.
66
-
67
- - 7f8b4d0: A node can name points an editor may drag to set its `Vector2` props. It answers `_handles()` with each prop and where it sits in its own frame, and `_handleValue(prop, at)` with the value that puts it somewhere else. `nodeHandlesAt` and `handleValueAt` (exported from the SDK), and `nodeHandles`/`handleValue` on the player, answer in viewport space. A math `vectorArrow` offers its two ends in graph units, and a `curlyBrace` that spans two points offers those.
68
- - 7f8b4d0: A node type can say where it goes, so a host can offer it only where it works.
69
-
70
- - `@node({ within, beside, closed })`: `within` names the types a node goes inside (a name covers every type built on it), `beside` the types it needs at least one of as a sibling, and `closed` marks a parent that takes only children that name it. Nothing checks them at build.
71
- - `parentIssue`, `siblingIssue` and `placementIssues` answer them for a host, together with the 2D/3D seam and `acceptsChildren`; `nodeTypeIsA` walks `parentKey`.
72
- - In `@motionscript/math` a `functionPlot` holds the marks that are of it: a `tangentLine`, and a `plotPoint` or `dropLines` put inside it follow its curve with no `on`. `curveArea` and `riemannSum` sit beside the plots they read and name them in `on`. Plots, arrows and marks go inside a coordinate system.
73
-
74
- ### Patch Changes
75
-
76
- - `@motionscript/math/kit` loads when it is the first part of the kit imported. The `Latex` node reached the kit barrel back for its helpers, so a host entering through `./kit` (a browser build loaded by import map, say) ran its decorators before `OUTLINE_TRIM` existed and the import failed with `OUTLINE_TRIM is not iterable`.
77
- - 217ae88: A transformed `numberPlane` rules its grid at most four times as far as its own ranges reach, so a plane squeezed onto a line folds its grid into a narrowing band. Before, as the determinant neared zero, the grid's range grew as one over it, the box filled with lines (a solid wash, and slow frames), and then jumped back to the plain ranges once the plane was flat.
78
- - ad28707: Component kit fixes.
79
-
80
- - Charts: a bar chart maps its columns across the plot panel as laid out (and takes the line chart's top headroom), so a column ends on its marker's grid line. A pie chart's wedges, labels and legend follow `data` and the palette once they are set. A restated value-axis or y/x-axis `range` or `ticks` in `to()` rescales continuously from the axis as drawn, instead of cutting at the midpoint. Without a legend (or without series) the entrance keeps that beat's share, so the call-out and legend land where the slot lays them out. A constant line series gets a scale with width, a `NaN` or infinite cell reads as 0, and tick captions gain decimals when the step is finer than 0.1.
81
- - Code: the compiled highlighter is cached per style object, so two styles sharing a name no longer colour alike. A `CodeRanges` chain serialises as its ranges, so a stored `highlight` target selects what it did before it was saved.
82
- - LaTeX: seeking from inside a morph to a time before it restores the source formula instead of leaving the last morph frame.
83
- - Geo: custom border rings are wound for d3, so a GeoJSON counter-clockwise ring draws as the small region it encloses; a great-circle path between antipodal points runs over the north pole instead of wherever rounding lands.
84
- - Audio: bottom-aligned waveform bars stand on the floor of the box instead of hanging from the top.
85
- - `Code` and `Latex` take an optional props bag, so `new Registry({ nodes: NODES })` and `createBrowserEngine({ nodes: NODES })` type-check without a cast.
86
-
87
- - 1be0249: A formula MathJax cannot typeset now throws a `LatexError`, the same in a browser and in Node.
88
-
89
- MathJax does not throw on malformed TeX; it typesets an error box. In a browser `buildLatexPath` then returned no tokens for `\fra`, `\frac{a`, `{` or `\badcommand{x}`, so nothing was drawn and nothing was reported, while the DOM-free adaptor returned one wide token that drew as a filled bar. Both now detect MathJax's error node and throw `LatexError`, which carries the `latex` source and MathJax's `reason`. `\require` is an error too, since only the listed TeX packages are loaded. A `Latex` node whose formula cannot be typeset keeps throwing on every read instead of reading as blank after the first.
90
-
91
- - 55a1ed3: `to` and `morphTo` on a `Latex` node that is not in a tree run their duration and write nothing, as every other command does. They used to write `latex` on the loose node when driven directly; a document could not reach this, since the validator rejects a command that runs before its target is present.
92
- - 217ae88: A point, tangent or guide inside a `functionPlot` is drawn over the curve. A mark's stroke is its ink, so it is now painted before the mark's children; before, it was painted last, as a shape's outline is, and the curve ran across every dot and line riding it. A `Mark` subclass that strokes its ink its own way overrides the new `renderInk` hook rather than `renderStroke`, and one that paints no fill until its ink has an inside answers `paintsFill`.
1
+ # @motionscript/math
2
+
3
+ ## 0.1.0-alpha.5
4
+
5
+ ### Patch Changes
6
+
7
+ - da6f97a: Every package ships a `NOTICE`, and a browser build lists what it bundles.
8
+
9
+ - Each tarball carries the repository `NOTICE`: the copyright line and the MIT attributions for the noise functions in `skia-render`'s fractal-noise fill (David Hoskins' "Hash without Sine", Inigo Quilez's 2D simplex noise).
10
+ - `@motionscript/canvaskit` ships `THIRD_PARTY_NOTICES.txt` with the licences of the libraries compiled into the binary: FreeType, HarfBuzz, ICU 74, zlib, libpng, Brotli, WOFF2, Emscripten and musl.
11
+ - `dist/browser/manifest.json` gains `thirdParty`, the packages the browser build bundled (`name`, `version`, `license`), and their licence and NOTICE files are written to `dist/browser/THIRD_PARTY_LICENSES.txt`. `@motionscript/browser` bundles mediabunny (MPL-2.0, unmodified; source at https://github.com/Vanilagy/mediabunny), esbuild-wasm and three; `@motionscript/math` bundles MathJax.
12
+
13
+ - 1778355: The published packages carry what a user needs and say what they are.
14
+
15
+ - `@motionscript/code` no longer ships `dist/tests/diff.bench.*`, and `@motionscript/math` no longer ships `dist/tests/harness.*` or `mathjax.setup.*`: test helpers under a `tests` folder are left out of every package's build.
16
+ - `@motionscript/sdk`'s description no longer repeats core's, and `@motionscript/math`'s names the coordinate systems, plots, 3D graphs and network graphs it has as well as formulas.
17
+ - The READMEs of `@motionscript/canvaskit`, `@motionscript/charts`, `@motionscript/geo`, `@motionscript/grids`, `@motionscript/skia-render` and `@motionscript/geography` say what to install, and `@motionscript/sdk`'s example now opens the document in an engine and plays it. Links between packages point at the repository, so they work on npm.
18
+
19
+ - 62eb615: `surfacePlot3d` takes `floorShadow`: the opacity, 0 to 1, of a flat copy of the surface laid on the floor of its axes, coloured by the height above it. Zero, the default, draws none.
20
+
21
+ ## 0.1.0-alpha.4
22
+
23
+ ### Minor Changes
24
+
25
+ - 7f8b4d0: `@motionscript/math` is a new kit, and the `Latex` node now lives in it. Import it from there:
26
+
27
+ ```diff
28
+ - import { Latex, NODES } from "@motionscript/latex";
29
+ + import { Latex, NODES } from "@motionscript/math";
30
+ ```
31
+
32
+ - The node, its `latex` key, its props, `morphTo` and the helpers (`buildLatexPath`, `LatexError`, `defaultLatexMorph`) are unchanged, so a document that names `latex` needs no edit. `ms add latex` now copies a node that imports `@motionscript/math`.
33
+ - `@motionscript/math/kit` holds what a copied node imports rather than copies, and `@motionscript/math/tex` the typeset-math half alone.
34
+ - `@motionscript/latex` and `@motionscript/plot` are no longer released. Their published versions stay on npm as they are.
35
+
36
+ - 7f8b4d0: 3D graphs, and named commands for 3D scenes.
37
+
38
+ - `@motionscript/math` gains `axes3d` (a 3D graph that is its own viewport, a `canvas3d` with its camera, lights and `orbitTo`, so it goes straight on a 2D stage: three axes through a box of graph coordinates, z up, with ticks, tips, numbers and titles), `surfacePlot3d` (a height over x and y, or three parts in u and v; coloured by height with `colorScale`, ruled with `meshLines`), `curvePlot3d` (a space curve, drawn on with `progressTo`), `plotPoint3d` (rides a surface it is put inside) and `vectorArrow3d`. Anything inside the axes sits at graph coordinates and keeps its own size.
39
+ - Every 3D node has `moveTo`, `rotateTo` and `scaleTo`. A `canvas3d` has `orbitTo` for its default camera, and a `camera3d` has `orbitTo` and `lookTo`.
40
+ - A 3D parent can place its children in coordinates of its own (`Node3D._spaceOf`, `ChildSpace3D`), as a 2D one already could, and so can a `canvas3d` for the 3D nodes directly inside it (`Canvas3D._spaceOf`).
41
+ - The SDK exports `MaterialShorthand3D`, what a mesh node of your own returns from `materialShorthand()`.
42
+
43
+ - 7f8b4d0: `@motionscript/math` gains coordinate systems, plots and the marks that go on a graph.
44
+
45
+ - `numberLine`, `axes2d` and `numberPlane` are coordinate systems: a child's `x`/`y` are graph units whatever the child is, so a text or an image sits on a graph at its own size, `moveTo` moves it in graph units, and `rangeTo` pans and zooms everything inside.
46
+ - `functionPlot` draws an equation and reads its kind from how it is written: `sin(x)`, `x = y^2`, `r = 1 + cos(theta)`, `(cos(t), sin(t))`. `morphTo` bends one curve into another, and curves break at asymptotes and domain edges. A name the equation does not know is a named value: 1 until `params` gives it one, bindable to a variable by a formula, listed by `equationParams`.
47
+ - `pointsPlot`, `plotPoint`, `vectorArrow`, `curveArea`, `riemannSum`, `tangentLine` and `dropLines` are drawn in graph coordinates. The ones that ride a plot name it by id in `on`.
48
+ - `@motionscript/math/kit` exports `CoordinateSystem`, `Mark`, the coordinate map, the equation language and the sampler for a custom system or mark.
49
+ - The SDK exports the `Extents` type that `pathOps.bounds` already returned.
50
+
51
+ - 7f8b4d0: A formula's parts can be named, and marks can be drawn on them.
52
+
53
+ - Every piece of a `latex` formula's source is a part: `partColors` colours one by its source (`{ part: 'x^2', color: '#facc15' }`), `colorTo` animates that, and `partBounds(part)` says where it is. A morph now carries a term both formulas write as one, with its colour.
54
+ - `written` writes a formula on glyph by glyph, each outlined and then filled; `writeTo` animates it.
55
+ - `latexMatrix` typesets a matrix from its `entries` in the `brackets` it is given; each entry is a part, and `entriesTo` morphs to new ones.
56
+ - `curlyBrace`, `emphasisMark` (box, circle, underline, cross) and `angleMark` annotate. The first two follow a node, or one part of a formula, by id and slide to another with `retargetTo`; a brace with no target spans two points.
57
+ - A label written between dollar signs is typeset: on a brace, an angle, a plot point, and an axis.
58
+ - `@motionscript/math/kit` exports `FollowMark`, `quadOf` and `findLatexParts` for a custom mark.
59
+
60
+ - 7f8b4d0: MathJax loads only when a scene typesets a formula.
61
+
62
+ - MathJax and its font are a module of their own, imported once by `loadMathJax()`. A formula node, and a graph, point, brace or angle whose label is written between dollar signs, declares the `math:mathjax` loader (`MATHJAX_LOADER`), which a host waits for before layout; a scene without one never downloads or parses MathJax.
63
+ - Code that typesets outside a scene awaits `loadMathJax()` first. Before then `buildLatexPath` throws `LatexNotLoaded`, `latexPartNames` returns nothing, and `mathJaxLoaded()` says whether it has arrived.
64
+
65
+ - 7f8b4d0: Network graphs and sample spaces.
66
+
67
+ - `networkGraph`: vertices and edges arranged in a circle, by springs, as a tree or in a grid, directed or not. `arrangeTo` moves every vertex to where another arrangement puts it, and `colorTo` colours a vertex or an edge (`a-b`).
68
+ - `sampleSpace`: a probability's whole cut into parts whose areas are their probabilities, named by braces, with `divideTo` to move the cuts.
69
+
70
+ - 217ae88: A node type can withdraw what it inherits, and the math nodes take only the paints they draw.
71
+
72
+ - `@withdraw(...keys)` drops inherited properties and commands from a node class. A withdrawn property is left out of `describe()` and holds its default whatever is written to it; a withdrawn command is left out of `commandKeys()` but still runs for a stored document, changing nothing. A subclass that declares the key again takes it back.
73
+ - `Registry.takesCommand(type, key)` says whether a node type takes a command: its own, or a node-less one unless that runs a method the type lacks or withdrew. `addCommand` takes a `method` for that; the paint commands name theirs.
74
+ - Math: a plot, a tangent, drop lines, an arrow, a brace, an emphasis mark and an angle mark have no `fill`; a curve area has no `stroke`; a formula, a traced path, a field, a curve area, a Riemann sum, a plot point and a sample space have no outline trim (`start`, `end`, `progressTo`, `flash`). An open `pointsPlot` draws no fill.
75
+ - Math: `partColors` and `colorTo` on `latex`, `latexMatrix` and `networkGraph` are now `partFills` and `partFillTo`, each part taking any paint (`{ part, fill }`). A vector field's and stream lines' `colorScale` is now `strengthFills`, and a sample space's `colors` is now `columnFills`, both lists of paints.
76
+ - Math: a vector field's and stream lines' shadow is cast when they are painted by strength too, not only in one paint.
77
+
78
+ - 7f8b4d0: Planes that transform, fields, polar planes, implicit curves and trails.
79
+
80
+ - `numberPlane` gains `matrix` and `transformTo` (a linear map of the whole plane), `warp` and `warpTo` (a bend by a function of its points), and a faint `ghost` of itself while it is transformed. The grid, the axes and everything on the plane go with it.
81
+ - New nodes: `polarPlane` (rings and spokes; plots and marks go on it as on axes), `vectorField` (arrows of a field `(P, Q)`, coloured by strength with `colorScale`), `streamLines` (the lines the field carries a point along, sent flowing with `flowTo`) and `tracedPath` (the trail a point leaves as a value changes).
82
+ - A `functionPlot` draws an implicit equation, such as `x^2 + y^2 = 4`, where it holds.
83
+ - A `Camera` can `follow` a node of its world by id, with `lookAt` as an offset from it.
84
+
85
+ - 7f8b4d0: A node can name points an editor may drag to set its `Vector2` props. It answers `_handles()` with each prop and where it sits in its own frame, and `_handleValue(prop, at)` with the value that puts it somewhere else. `nodeHandlesAt` and `handleValueAt` (exported from the SDK), and `nodeHandles`/`handleValue` on the player, answer in viewport space. A math `vectorArrow` offers its two ends in graph units, and a `curlyBrace` that spans two points offers those.
86
+ - 7f8b4d0: A node type can say where it goes, so a host can offer it only where it works.
87
+
88
+ - `@node({ within, beside, closed })`: `within` names the types a node goes inside (a name covers every type built on it), `beside` the types it needs at least one of as a sibling, and `closed` marks a parent that takes only children that name it. Nothing checks them at build.
89
+ - `parentIssue`, `siblingIssue` and `placementIssues` answer them for a host, together with the 2D/3D seam and `acceptsChildren`; `nodeTypeIsA` walks `parentKey`.
90
+ - In `@motionscript/math` a `functionPlot` holds the marks that are of it: a `tangentLine`, and a `plotPoint` or `dropLines` put inside it follow its curve with no `on`. `curveArea` and `riemannSum` sit beside the plots they read and name them in `on`. Plots, arrows and marks go inside a coordinate system.
91
+
92
+ ### Patch Changes
93
+
94
+ - `@motionscript/math/kit` loads when it is the first part of the kit imported. The `Latex` node reached the kit barrel back for its helpers, so a host entering through `./kit` (a browser build loaded by import map, say) ran its decorators before `OUTLINE_TRIM` existed and the import failed with `OUTLINE_TRIM is not iterable`.
95
+ - 217ae88: A transformed `numberPlane` rules its grid at most four times as far as its own ranges reach, so a plane squeezed onto a line folds its grid into a narrowing band. Before, as the determinant neared zero, the grid's range grew as one over it, the box filled with lines (a solid wash, and slow frames), and then jumped back to the plain ranges once the plane was flat.
96
+ - ad28707: Component kit fixes.
97
+
98
+ - Charts: a bar chart maps its columns across the plot panel as laid out (and takes the line chart's top headroom), so a column ends on its marker's grid line. A pie chart's wedges, labels and legend follow `data` and the palette once they are set. A restated value-axis or y/x-axis `range` or `ticks` in `to()` rescales continuously from the axis as drawn, instead of cutting at the midpoint. Without a legend (or without series) the entrance keeps that beat's share, so the call-out and legend land where the slot lays them out. A constant line series gets a scale with width, a `NaN` or infinite cell reads as 0, and tick captions gain decimals when the step is finer than 0.1.
99
+ - Code: the compiled highlighter is cached per style object, so two styles sharing a name no longer colour alike. A `CodeRanges` chain serialises as its ranges, so a stored `highlight` target selects what it did before it was saved.
100
+ - LaTeX: seeking from inside a morph to a time before it restores the source formula instead of leaving the last morph frame.
101
+ - Geo: custom border rings are wound for d3, so a GeoJSON counter-clockwise ring draws as the small region it encloses; a great-circle path between antipodal points runs over the north pole instead of wherever rounding lands.
102
+ - Audio: bottom-aligned waveform bars stand on the floor of the box instead of hanging from the top.
103
+ - `Code` and `Latex` take an optional props bag, so `new Registry({ nodes: NODES })` and `createBrowserEngine({ nodes: NODES })` type-check without a cast.
104
+
105
+ - 1be0249: A formula MathJax cannot typeset now throws a `LatexError`, the same in a browser and in Node.
106
+
107
+ MathJax does not throw on malformed TeX; it typesets an error box. In a browser `buildLatexPath` then returned no tokens for `\fra`, `\frac{a`, `{` or `\badcommand{x}`, so nothing was drawn and nothing was reported, while the DOM-free adaptor returned one wide token that drew as a filled bar. Both now detect MathJax's error node and throw `LatexError`, which carries the `latex` source and MathJax's `reason`. `\require` is an error too, since only the listed TeX packages are loaded. A `Latex` node whose formula cannot be typeset keeps throwing on every read instead of reading as blank after the first.
108
+
109
+ - 55a1ed3: `to` and `morphTo` on a `Latex` node that is not in a tree run their duration and write nothing, as every other command does. They used to write `latex` on the loose node when driven directly; a document could not reach this, since the validator rejects a command that runs before its target is present.
110
+ - 217ae88: A point, tangent or guide inside a `functionPlot` is drawn over the curve. A mark's stroke is its ink, so it is now painted before the mark's children; before, it was painted last, as a shape's outline is, and the curve ran across every dot and line riding it. A `Mark` subclass that strokes its ink its own way overrides the new `renderInk` hook rather than `renderStroke`, and one that paints no fill until its ink has an inside answers `paintsFill`.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/math",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.5",
4
4
  "exports": {
5
5
  ".": "dist/browser/index.js",
6
6
  "./kit": "dist/browser/kit.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/math",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.5",
4
4
  "type": "module",
5
5
  "description": "Math for Motion Script: coordinate systems, function and vector-field plots, 3D graphs and surfaces, network graphs, and LaTeX formulas typeset to glyph paths that morph token by token.",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "license": "Apache-2.0",
55
55
  "peerDependencies": {
56
- "@motionscript/sdk": "^0.1.0-alpha.4"
56
+ "@motionscript/sdk": "^0.1.0-alpha.5"
57
57
  },
58
58
  "dependencies": {
59
59
  "@mathjax/mathjax-newcm-font": "^4.1.1",
@@ -68,8 +68,8 @@
68
68
  "typescript": "^6.0.3",
69
69
  "typescript-eslint": "^8.48.0",
70
70
  "vitest": "^4.1.5",
71
- "@motionscript/core": "0.1.0-alpha.4",
72
- "@motionscript/sdk": "0.1.0-alpha.4"
71
+ "@motionscript/sdk": "0.1.0-alpha.5",
72
+ "@motionscript/core": "0.1.0-alpha.5"
73
73
  },
74
74
  "scripts": {
75
75
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && node ../../../scripts/build-browser.mjs",