@motionscript/math 0.2.0 → 0.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +3 -2
- package/dist/annotate/curly-brace.d.ts +3 -3
- package/dist/annotate/emphasis-mark.d.ts +3 -3
- package/dist/browser/chunks/chunk-347RSDIW.js +2 -0
- package/dist/browser/chunks/chunk-347RSDIW.js.map +7 -0
- package/dist/browser/chunks/chunk-BIUAHFF7.js +2 -0
- package/dist/browser/chunks/chunk-BIUAHFF7.js.map +7 -0
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/kit.js +1 -1
- package/dist/browser/manifest.json +2 -1
- package/dist/browser/v1.js +2 -0
- package/dist/browser/v1.js.map +7 -0
- package/dist/engine.d.ts +1 -1
- package/dist/engine.js +1 -1
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +28 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -28
- package/dist/index.js.map +1 -1
- package/dist/marks/curve-area.d.ts +3 -3
- package/dist/marks/drop-lines.d.ts +3 -3
- package/dist/marks/riemann-sum.d.ts +3 -3
- package/dist/marks/tangent-line.d.ts +3 -3
- package/dist/marks/vector-arrow.d.ts +3 -3
- package/dist/plots/function-plot.d.ts +4 -4
- package/dist/plots/points-plot.d.ts +3 -3
- package/dist/plots/stream-lines.d.ts +6 -6
- package/dist/plots/traced-path.d.ts +6 -6
- package/dist/plots/vector-field.d.ts +6 -6
- package/dist/systems/number-line.d.ts +3 -3
- package/dist/systems/number-plane.d.ts +6 -6
- package/dist/tex/matrix.d.ts +3 -3
- package/dist/tex/node.d.ts +3 -3
- package/dist/three/curve-plot3d.d.ts +3 -3
- package/dist/three/surface-plot3d.d.ts +8 -8
- package/dist/unstable.d.ts +29 -0
- package/dist/unstable.d.ts.map +1 -0
- package/dist/unstable.js +31 -0
- package/dist/unstable.js.map +1 -0
- package/dist/v1.d.ts +2 -0
- package/dist/v1.d.ts.map +1 -0
- package/dist/v1.js +3 -0
- package/dist/v1.js.map +1 -0
- package/package.json +10 -6
- package/registry.json +1 -1
- package/src/engine.ts +1 -1
- package/src/index.ts +29 -28
- package/src/unstable.ts +30 -0
- package/src/v1.ts +2 -0
- package/dist/browser/chunks/chunk-FZ2YBTPL.js +0 -2
- package/dist/browser/chunks/chunk-FZ2YBTPL.js.map +0 -7
|
@@ -11,9 +11,9 @@ export declare const TracedPath: import("@motionscript/sdk").Component<"tracedPa
|
|
|
11
11
|
stroke: import("@motionscript/sdk").Attribute<_Stroke, _StrokeResolved[]>;
|
|
12
12
|
shadow: import("@motionscript/sdk").Attribute<_Shadow, _ShadowResolved[]>;
|
|
13
13
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
14
|
-
expression: import("@motionscript/sdk").Type<string | import("../
|
|
14
|
+
expression: import("@motionscript/sdk").Type<string | import("../engine.js").PlotSource, import("../engine.js").PlotSource, false>;
|
|
15
15
|
domain: import("@motionscript/sdk").Type<Interval | null, Interval | null, false>;
|
|
16
|
-
graph: import("@motionscript/sdk").Type<import("../
|
|
16
|
+
graph: import("@motionscript/sdk").Type<import("../engine.js").GraphPlane | null, import("../engine.js").GraphPlane | null, true>;
|
|
17
17
|
}>, {
|
|
18
18
|
readonly traceTo: readonly ["value"];
|
|
19
19
|
readonly strokeTo: readonly ["stroke"];
|
|
@@ -31,9 +31,9 @@ export declare const TracedPath: import("@motionscript/sdk").Component<"tracedPa
|
|
|
31
31
|
stroke: import("@motionscript/sdk").Attribute<_Stroke, _StrokeResolved[]>;
|
|
32
32
|
shadow: import("@motionscript/sdk").Attribute<_Shadow, _ShadowResolved[]>;
|
|
33
33
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
34
|
-
expression: import("@motionscript/sdk").Type<string | import("../
|
|
34
|
+
expression: import("@motionscript/sdk").Type<string | import("../engine.js").PlotSource, import("../engine.js").PlotSource, false>;
|
|
35
35
|
domain: import("@motionscript/sdk").Type<Interval | null, Interval | null, false>;
|
|
36
|
-
graph: import("@motionscript/sdk").Type<import("../
|
|
36
|
+
graph: import("@motionscript/sdk").Type<import("../engine.js").GraphPlane | null, import("../engine.js").GraphPlane | null, true>;
|
|
37
37
|
}>, null, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
|
|
38
38
|
/** The value the trail starts at. */
|
|
39
39
|
from: import("@motionscript/sdk").Type<number, number, false>;
|
|
@@ -44,9 +44,9 @@ export declare const TracedPath: import("@motionscript/sdk").Component<"tracedPa
|
|
|
44
44
|
stroke: import("@motionscript/sdk").Attribute<_Stroke, _StrokeResolved[]>;
|
|
45
45
|
shadow: import("@motionscript/sdk").Attribute<_Shadow, _ShadowResolved[]>;
|
|
46
46
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
47
|
-
expression: import("@motionscript/sdk").Type<string | import("../
|
|
47
|
+
expression: import("@motionscript/sdk").Type<string | import("../engine.js").PlotSource, import("../engine.js").PlotSource, false>;
|
|
48
48
|
domain: import("@motionscript/sdk").Type<Interval | null, Interval | null, false>;
|
|
49
|
-
graph: import("@motionscript/sdk").Type<import("../
|
|
49
|
+
graph: import("@motionscript/sdk").Type<import("../engine.js").GraphPlane | null, import("../engine.js").GraphPlane | null, true>;
|
|
50
50
|
}>, {
|
|
51
51
|
readonly traceTo: readonly ["value"];
|
|
52
52
|
readonly strokeTo: readonly ["stroke"];
|
|
@@ -5,11 +5,11 @@ export declare const VectorField: import("@motionscript/sdk").Component<"vectorF
|
|
|
5
5
|
spacing: import("@motionscript/sdk").Type<number, number, false>;
|
|
6
6
|
/** How long an arrow is drawn for a vector of length one, in graph units. */
|
|
7
7
|
arrowScale: import("@motionscript/sdk").Type<number, number, false>;
|
|
8
|
-
expression: import("@motionscript/sdk").Type<string | import("../
|
|
8
|
+
expression: import("@motionscript/sdk").Type<string | import("../engine.js").PlotSource, import("../engine.js").PlotSource, false>;
|
|
9
9
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
10
10
|
strengthFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
|
|
11
11
|
maxMagnitude: import("@motionscript/sdk").Type<number, number, false>;
|
|
12
|
-
graph: import("@motionscript/sdk").Type<import("../
|
|
12
|
+
graph: import("@motionscript/sdk").Type<import("../engine.js").GraphPlane | null, import("../engine.js").GraphPlane | null, true>;
|
|
13
13
|
stroke: import("@motionscript/sdk").Attribute<_Stroke, _StrokeResolved[]>;
|
|
14
14
|
shadow: import("@motionscript/sdk").Attribute<_Shadow, _ShadowResolved[]>;
|
|
15
15
|
}>, {
|
|
@@ -22,11 +22,11 @@ export declare const VectorField: import("@motionscript/sdk").Component<"vectorF
|
|
|
22
22
|
spacing: import("@motionscript/sdk").Type<number, number, false>;
|
|
23
23
|
/** How long an arrow is drawn for a vector of length one, in graph units. */
|
|
24
24
|
arrowScale: import("@motionscript/sdk").Type<number, number, false>;
|
|
25
|
-
expression: import("@motionscript/sdk").Type<string | import("../
|
|
25
|
+
expression: import("@motionscript/sdk").Type<string | import("../engine.js").PlotSource, import("../engine.js").PlotSource, false>;
|
|
26
26
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
27
27
|
strengthFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
|
|
28
28
|
maxMagnitude: import("@motionscript/sdk").Type<number, number, false>;
|
|
29
|
-
graph: import("@motionscript/sdk").Type<import("../
|
|
29
|
+
graph: import("@motionscript/sdk").Type<import("../engine.js").GraphPlane | null, import("../engine.js").GraphPlane | null, true>;
|
|
30
30
|
stroke: import("@motionscript/sdk").Attribute<_Stroke, _StrokeResolved[]>;
|
|
31
31
|
shadow: import("@motionscript/sdk").Attribute<_Shadow, _ShadowResolved[]>;
|
|
32
32
|
}>, null, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
|
|
@@ -34,11 +34,11 @@ export declare const VectorField: import("@motionscript/sdk").Component<"vectorF
|
|
|
34
34
|
spacing: import("@motionscript/sdk").Type<number, number, false>;
|
|
35
35
|
/** How long an arrow is drawn for a vector of length one, in graph units. */
|
|
36
36
|
arrowScale: import("@motionscript/sdk").Type<number, number, false>;
|
|
37
|
-
expression: import("@motionscript/sdk").Type<string | import("../
|
|
37
|
+
expression: import("@motionscript/sdk").Type<string | import("../engine.js").PlotSource, import("../engine.js").PlotSource, false>;
|
|
38
38
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
39
39
|
strengthFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
|
|
40
40
|
maxMagnitude: import("@motionscript/sdk").Type<number, number, false>;
|
|
41
|
-
graph: import("@motionscript/sdk").Type<import("../
|
|
41
|
+
graph: import("@motionscript/sdk").Type<import("../engine.js").GraphPlane | null, import("../engine.js").GraphPlane | null, true>;
|
|
42
42
|
stroke: import("@motionscript/sdk").Attribute<_Stroke, _StrokeResolved[]>;
|
|
43
43
|
shadow: import("@motionscript/sdk").Attribute<_Shadow, _ShadowResolved[]>;
|
|
44
44
|
}>, {
|
|
@@ -4,7 +4,7 @@ import { type NodeOf, type Color as _Color, type NormalizedColor, type StrokeRes
|
|
|
4
4
|
* `y` is pixels above it, so a dot or a label sits on a number.
|
|
5
5
|
*/
|
|
6
6
|
export declare const NumberLine: import("@motionscript/sdk").Component<"numberLine", import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
|
|
7
|
-
range: import("@motionscript/sdk").Type<import("../
|
|
7
|
+
range: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
8
8
|
/** The spacing of the ticks; zero picks a tidy one for the line's length. */
|
|
9
9
|
step: import("@motionscript/sdk").Type<number, number, false>;
|
|
10
10
|
scaling: import("@motionscript/sdk").Type<"linear" | "log", "linear" | "log", false>;
|
|
@@ -33,7 +33,7 @@ export declare const NumberLine: import("@motionscript/sdk").Component<"numberLi
|
|
|
33
33
|
readonly portion: import("@motionscript/sdk").Type<number, number, false>;
|
|
34
34
|
};
|
|
35
35
|
}, null, _Node2D<_Node2DProps>, import("@motionscript/sdk").CallProps<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
|
|
36
|
-
range: import("@motionscript/sdk").Type<import("../
|
|
36
|
+
range: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
37
37
|
/** The spacing of the ticks; zero picks a tidy one for the line's length. */
|
|
38
38
|
step: import("@motionscript/sdk").Type<number, number, false>;
|
|
39
39
|
scaling: import("@motionscript/sdk").Type<"linear" | "log", "linear" | "log", false>;
|
|
@@ -53,7 +53,7 @@ export declare const NumberLine: import("@motionscript/sdk").Component<"numberLi
|
|
|
53
53
|
start: import("@motionscript/sdk").Type<number, number, false>;
|
|
54
54
|
end: import("@motionscript/sdk").Type<number, number, false>;
|
|
55
55
|
}>, null, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
|
|
56
|
-
range: import("@motionscript/sdk").Type<import("../
|
|
56
|
+
range: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
57
57
|
/** The spacing of the ticks; zero picks a tidy one for the line's length. */
|
|
58
58
|
step: import("@motionscript/sdk").Type<number, number, false>;
|
|
59
59
|
scaling: import("@motionscript/sdk").Type<"linear" | "log", "linear" | "log", false>;
|
|
@@ -29,8 +29,8 @@ export declare const NumberPlane: import("@motionscript/sdk").Component<"numberP
|
|
|
29
29
|
warp: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
30
30
|
/** Leave the plane as it was, faintly, behind one that has been transformed or warped. */
|
|
31
31
|
ghost: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
32
|
-
xRange: import("@motionscript/sdk").Type<import("../
|
|
33
|
-
yRange: import("@motionscript/sdk").Type<import("../
|
|
32
|
+
xRange: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
33
|
+
yRange: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
34
34
|
xStep: import("@motionscript/sdk").Type<number, number, false>;
|
|
35
35
|
yStep: import("@motionscript/sdk").Type<number, number, false>;
|
|
36
36
|
xScaling: import("@motionscript/sdk").Type<"linear" | "log", "linear" | "log", false>;
|
|
@@ -77,8 +77,8 @@ export declare const NumberPlane: import("@motionscript/sdk").Component<"numberP
|
|
|
77
77
|
warp: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
78
78
|
/** Leave the plane as it was, faintly, behind one that has been transformed or warped. */
|
|
79
79
|
ghost: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
80
|
-
xRange: import("@motionscript/sdk").Type<import("../
|
|
81
|
-
yRange: import("@motionscript/sdk").Type<import("../
|
|
80
|
+
xRange: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
81
|
+
yRange: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
82
82
|
xStep: import("@motionscript/sdk").Type<number, number, false>;
|
|
83
83
|
yStep: import("@motionscript/sdk").Type<number, number, false>;
|
|
84
84
|
xScaling: import("@motionscript/sdk").Type<"linear" | "log", "linear" | "log", false>;
|
|
@@ -114,8 +114,8 @@ export declare const NumberPlane: import("@motionscript/sdk").Component<"numberP
|
|
|
114
114
|
warp: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
115
115
|
/** Leave the plane as it was, faintly, behind one that has been transformed or warped. */
|
|
116
116
|
ghost: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
117
|
-
xRange: import("@motionscript/sdk").Type<import("../
|
|
118
|
-
yRange: import("@motionscript/sdk").Type<import("../
|
|
117
|
+
xRange: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
118
|
+
yRange: import("@motionscript/sdk").Type<import("../engine.js").Interval, import("../engine.js").Interval, false>;
|
|
119
119
|
xStep: import("@motionscript/sdk").Type<number, number, false>;
|
|
120
120
|
yStep: import("@motionscript/sdk").Type<number, number, false>;
|
|
121
121
|
xScaling: import("@motionscript/sdk").Type<"linear" | "log", "linear" | "log", false>;
|
package/dist/tex/matrix.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const LatexMatrix: import("@motionscript/sdk").Component<"latexMa
|
|
|
10
10
|
entries: import("@motionscript/sdk").Type<string[][], Morphing<string[][]>, false>;
|
|
11
11
|
brackets: import("@motionscript/sdk").Type<MatrixBrackets, Morphing<MatrixBrackets>, false>;
|
|
12
12
|
fontSize: number;
|
|
13
|
-
partFills: import("@motionscript/sdk").Type<import("../
|
|
13
|
+
partFills: import("@motionscript/sdk").Type<import("../engine.js").PartFill[], import("../engine.js").PartFillResolved[], false>;
|
|
14
14
|
written: import("@motionscript/sdk").Type<number, number, false>;
|
|
15
15
|
morphProgress: import("@motionscript/sdk").Type<number, number, false>;
|
|
16
16
|
flow: import("@motionscript/sdk").Type<_FlowMode, _FlowResolved, false>;
|
|
@@ -42,7 +42,7 @@ export declare const LatexMatrix: import("@motionscript/sdk").Component<"latexMa
|
|
|
42
42
|
entries: import("@motionscript/sdk").Type<string[][], Morphing<string[][]>, false>;
|
|
43
43
|
brackets: import("@motionscript/sdk").Type<MatrixBrackets, Morphing<MatrixBrackets>, false>;
|
|
44
44
|
fontSize: number;
|
|
45
|
-
partFills: import("@motionscript/sdk").Type<import("../
|
|
45
|
+
partFills: import("@motionscript/sdk").Type<import("../engine.js").PartFill[], import("../engine.js").PartFillResolved[], false>;
|
|
46
46
|
written: import("@motionscript/sdk").Type<number, number, false>;
|
|
47
47
|
morphProgress: import("@motionscript/sdk").Type<number, number, false>;
|
|
48
48
|
flow: import("@motionscript/sdk").Type<_FlowMode, _FlowResolved, false>;
|
|
@@ -61,7 +61,7 @@ export declare const LatexMatrix: import("@motionscript/sdk").Component<"latexMa
|
|
|
61
61
|
entries: import("@motionscript/sdk").Type<string[][], Morphing<string[][]>, false>;
|
|
62
62
|
brackets: import("@motionscript/sdk").Type<MatrixBrackets, Morphing<MatrixBrackets>, false>;
|
|
63
63
|
fontSize: number;
|
|
64
|
-
partFills: import("@motionscript/sdk").Type<import("../
|
|
64
|
+
partFills: import("@motionscript/sdk").Type<import("../engine.js").PartFill[], import("../engine.js").PartFillResolved[], false>;
|
|
65
65
|
written: import("@motionscript/sdk").Type<number, number, false>;
|
|
66
66
|
morphProgress: import("@motionscript/sdk").Type<number, number, false>;
|
|
67
67
|
flow: import("@motionscript/sdk").Type<_FlowMode, _FlowResolved, false>;
|
package/dist/tex/node.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const Latex: import("@motionscript/sdk").Component<"latex", impor
|
|
|
22
22
|
/** The formula. Mid-tween it holds both ends, and the glyphs morph from the one into the other. */
|
|
23
23
|
latex: import("@motionscript/sdk").Type<string, Morphing<string>, false>;
|
|
24
24
|
fontSize: number;
|
|
25
|
-
partFills: import("@motionscript/sdk").Type<PartFill[], import("../
|
|
25
|
+
partFills: import("@motionscript/sdk").Type<PartFill[], import("../engine.js").PartFillResolved[], false>;
|
|
26
26
|
written: import("@motionscript/sdk").Type<number, number, false>;
|
|
27
27
|
morphProgress: import("@motionscript/sdk").Type<number, number, false>;
|
|
28
28
|
flow: import("@motionscript/sdk").Type<_FlowMode, _FlowResolved, false>;
|
|
@@ -51,7 +51,7 @@ export declare const Latex: import("@motionscript/sdk").Component<"latex", impor
|
|
|
51
51
|
/** The formula. Mid-tween it holds both ends, and the glyphs morph from the one into the other. */
|
|
52
52
|
latex: import("@motionscript/sdk").Type<string, Morphing<string>, false>;
|
|
53
53
|
fontSize: number;
|
|
54
|
-
partFills: import("@motionscript/sdk").Type<PartFill[], import("../
|
|
54
|
+
partFills: import("@motionscript/sdk").Type<PartFill[], import("../engine.js").PartFillResolved[], false>;
|
|
55
55
|
written: import("@motionscript/sdk").Type<number, number, false>;
|
|
56
56
|
morphProgress: import("@motionscript/sdk").Type<number, number, false>;
|
|
57
57
|
flow: import("@motionscript/sdk").Type<_FlowMode, _FlowResolved, false>;
|
|
@@ -68,7 +68,7 @@ export declare const Latex: import("@motionscript/sdk").Component<"latex", impor
|
|
|
68
68
|
/** The formula. Mid-tween it holds both ends, and the glyphs morph from the one into the other. */
|
|
69
69
|
latex: import("@motionscript/sdk").Type<string, Morphing<string>, false>;
|
|
70
70
|
fontSize: number;
|
|
71
|
-
partFills: import("@motionscript/sdk").Type<PartFill[], import("../
|
|
71
|
+
partFills: import("@motionscript/sdk").Type<PartFill[], import("../engine.js").PartFillResolved[], false>;
|
|
72
72
|
written: import("@motionscript/sdk").Type<number, number, false>;
|
|
73
73
|
morphProgress: import("@motionscript/sdk").Type<number, number, false>;
|
|
74
74
|
flow: import("@motionscript/sdk").Type<_FlowMode, _FlowResolved, false>;
|
|
@@ -4,7 +4,7 @@ import { type PlotSource } from "../kit/source.js";
|
|
|
4
4
|
export declare const CurvePlot3d: import("@motionscript/sdk").Component<"curvePlot3d", import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
5
5
|
expression: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
6
6
|
/** The span of `t` that is drawn; 0 to 1 when left out. */
|
|
7
|
-
domain: import("@motionscript/sdk").Type<import("../
|
|
7
|
+
domain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
8
8
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
9
9
|
/** How many points the curve is drawn through. */
|
|
10
10
|
samples: import("@motionscript/sdk").Type<number, number, false>;
|
|
@@ -42,7 +42,7 @@ export declare const CurvePlot3d: import("@motionscript/sdk").Component<"curvePl
|
|
|
42
42
|
}, null, _Node3D<_Node3DProps>, import("@motionscript/sdk").CallProps3D<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
43
43
|
expression: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
44
44
|
/** The span of `t` that is drawn; 0 to 1 when left out. */
|
|
45
|
-
domain: import("@motionscript/sdk").Type<import("../
|
|
45
|
+
domain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
46
46
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
47
47
|
/** How many points the curve is drawn through. */
|
|
48
48
|
samples: import("@motionscript/sdk").Type<number, number, false>;
|
|
@@ -75,7 +75,7 @@ export declare const CurvePlot3d: import("@motionscript/sdk").Component<"curvePl
|
|
|
75
75
|
}>, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
76
76
|
expression: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
77
77
|
/** The span of `t` that is drawn; 0 to 1 when left out. */
|
|
78
|
-
domain: import("@motionscript/sdk").Type<import("../
|
|
78
|
+
domain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
79
79
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
80
80
|
/** How many points the curve is drawn through. */
|
|
81
81
|
samples: import("@motionscript/sdk").Type<number, number, false>;
|
|
@@ -7,8 +7,8 @@ declare const state: {
|
|
|
7
7
|
* the width of the axes when left out, u and v for a parametric surface,
|
|
8
8
|
* which run from 0 to 1.
|
|
9
9
|
*/
|
|
10
|
-
uDomain: import("@motionscript/sdk").Type<import("../
|
|
11
|
-
vDomain: import("@motionscript/sdk").Type<import("../
|
|
10
|
+
uDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
11
|
+
vDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
12
12
|
/** The equation's named values: any name in it that is not a variable, a function or a constant. */
|
|
13
13
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
14
14
|
/** How finely the surface is sampled, each way. */
|
|
@@ -58,8 +58,8 @@ export declare const SurfacePlot3d: import("@motionscript/sdk").Component<"surfa
|
|
|
58
58
|
* the width of the axes when left out, u and v for a parametric surface,
|
|
59
59
|
* which run from 0 to 1.
|
|
60
60
|
*/
|
|
61
|
-
uDomain: import("@motionscript/sdk").Type<import("../
|
|
62
|
-
vDomain: import("@motionscript/sdk").Type<import("../
|
|
61
|
+
uDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
62
|
+
vDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
63
63
|
/** The equation's named values: any name in it that is not a variable, a function or a constant. */
|
|
64
64
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
65
65
|
/** How finely the surface is sampled, each way. */
|
|
@@ -103,8 +103,8 @@ export declare const SurfacePlot3d: import("@motionscript/sdk").Component<"surfa
|
|
|
103
103
|
* the width of the axes when left out, u and v for a parametric surface,
|
|
104
104
|
* which run from 0 to 1.
|
|
105
105
|
*/
|
|
106
|
-
uDomain: import("@motionscript/sdk").Type<import("../
|
|
107
|
-
vDomain: import("@motionscript/sdk").Type<import("../
|
|
106
|
+
uDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
107
|
+
vDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
108
108
|
/** The equation's named values: any name in it that is not a variable, a function or a constant. */
|
|
109
109
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
110
110
|
/** How finely the surface is sampled, each way. */
|
|
@@ -144,8 +144,8 @@ export declare const SurfacePlot3d: import("@motionscript/sdk").Component<"surfa
|
|
|
144
144
|
* the width of the axes when left out, u and v for a parametric surface,
|
|
145
145
|
* which run from 0 to 1.
|
|
146
146
|
*/
|
|
147
|
-
uDomain: import("@motionscript/sdk").Type<import("../
|
|
148
|
-
vDomain: import("@motionscript/sdk").Type<import("../
|
|
147
|
+
uDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
148
|
+
vDomain: import("@motionscript/sdk").Type<import("../engine.js").Interval | null, import("../engine.js").Interval | null, false>;
|
|
149
149
|
/** The equation's named values: any name in it that is not a variable, a function or a constant. */
|
|
150
150
|
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
151
151
|
/** How finely the surface is sampled, each way. */
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
//# sourceMappingURL=unstable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unstable.d.ts","sourceRoot":"","sources":["../src/unstable.ts"],"names":[],"mappings":"AAEA,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"}
|
package/dist/unstable.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// `@motionscript/math/kit`: everything the package holds, for a copied node and code built on its internals.
|
|
2
|
+
// Any release may change it; the root barrel is what stays.
|
|
3
|
+
export * from './tex/node.js';
|
|
4
|
+
export * from './tex/matrix.js';
|
|
5
|
+
export * from './systems/number-line.js';
|
|
6
|
+
export * from './systems/axes2d.js';
|
|
7
|
+
export * from './systems/number-plane.js';
|
|
8
|
+
export * from './plots/function-plot.js';
|
|
9
|
+
export * from './plots/points-plot.js';
|
|
10
|
+
export * from './marks/plot-point.js';
|
|
11
|
+
export * from './marks/vector-arrow.js';
|
|
12
|
+
export * from './marks/curve-area.js';
|
|
13
|
+
export * from './marks/riemann-sum.js';
|
|
14
|
+
export * from './marks/tangent-line.js';
|
|
15
|
+
export * from './marks/drop-lines.js';
|
|
16
|
+
export * from './annotate/curly-brace.js';
|
|
17
|
+
export * from './annotate/angle-mark.js';
|
|
18
|
+
export * from './annotate/emphasis-mark.js';
|
|
19
|
+
export * from './three/axes3d.js';
|
|
20
|
+
export * from './three/surface-plot3d.js';
|
|
21
|
+
export * from './three/curve-plot3d.js';
|
|
22
|
+
export * from './three/plot-point3d.js';
|
|
23
|
+
export * from './three/vector-arrow3d.js';
|
|
24
|
+
export * from './systems/polar-plane.js';
|
|
25
|
+
export * from './plots/vector-field.js';
|
|
26
|
+
export * from './plots/stream-lines.js';
|
|
27
|
+
export * from './plots/traced-path.js';
|
|
28
|
+
export * from './structures/network-graph.js';
|
|
29
|
+
export * from './structures/sample-space.js';
|
|
30
|
+
export * from './engine.js';
|
|
31
|
+
//# sourceMappingURL=unstable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unstable.js","sourceRoot":"","sources":["../src/unstable.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,4DAA4D;AAC5D,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","sourcesContent":["// `@motionscript/math/kit`: everything the package holds, for a copied node and code built on its internals.\n// Any release may change it; the root barrel is what stays.\nexport * 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';\n"]}
|
package/dist/v1.d.ts
ADDED
package/dist/v1.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../src/v1.ts"],"names":[],"mappings":"AACA,cAAc,GAAG,CAAC"}
|
package/dist/v1.js
ADDED
package/dist/v1.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../src/v1.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,cAAc,GAAG,CAAC","sourcesContent":["// `@motionscript/math/v1`: the root as of v1. A later major keeps this path working.\nexport * from '.';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motionscript/math",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-alpha.0",
|
|
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": {
|
|
@@ -32,9 +32,13 @@
|
|
|
32
32
|
"types": "./dist/index.d.ts",
|
|
33
33
|
"default": "./dist/index.js"
|
|
34
34
|
},
|
|
35
|
+
"./v1": {
|
|
36
|
+
"types": "./dist/v1.d.ts",
|
|
37
|
+
"default": "./dist/v1.js"
|
|
38
|
+
},
|
|
35
39
|
"./kit": {
|
|
36
|
-
"types": "./dist/
|
|
37
|
-
"default": "./dist/
|
|
40
|
+
"types": "./dist/unstable.d.ts",
|
|
41
|
+
"default": "./dist/unstable.js"
|
|
38
42
|
},
|
|
39
43
|
"./tex": {
|
|
40
44
|
"types": "./dist/tex/index.d.ts",
|
|
@@ -54,7 +58,7 @@
|
|
|
54
58
|
"license": "Apache-2.0",
|
|
55
59
|
"author": "Motionscript",
|
|
56
60
|
"peerDependencies": {
|
|
57
|
-
"@motionscript/sdk": "^0.
|
|
61
|
+
"@motionscript/sdk": "^0.4.0-alpha.0"
|
|
58
62
|
},
|
|
59
63
|
"dependencies": {
|
|
60
64
|
"@mathjax/mathjax-newcm-font": "^4.1.1",
|
|
@@ -69,8 +73,8 @@
|
|
|
69
73
|
"typescript": "^6.0.3",
|
|
70
74
|
"typescript-eslint": "^8.48.0",
|
|
71
75
|
"vitest": "^4.1.5",
|
|
72
|
-
"@motionscript/core": "0.
|
|
73
|
-
"@motionscript/sdk": "0.
|
|
76
|
+
"@motionscript/core": "0.4.0-alpha.0",
|
|
77
|
+
"@motionscript/sdk": "0.4.0-alpha.0"
|
|
74
78
|
},
|
|
75
79
|
"scripts": {
|
|
76
80
|
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && node ../../../scripts/build-browser.mjs",
|
package/registry.json
CHANGED
package/src/engine.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The math **kit**: what the nodes share, and what a copied one does not copy.
|
|
3
3
|
*
|
|
4
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
|
|
5
|
+
* these to `@motionscript/math/kit`, so MathJax, the morph and every shared module
|
|
6
6
|
* stay a real dependency with one identity.
|
|
7
7
|
*/
|
|
8
8
|
export {
|
package/src/index.ts
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
1
|
+
// The public surface, named one by one; everything else is `./kit` (`unstable.ts`).
|
|
2
|
+
export { Latex } from './tex/node';
|
|
3
|
+
export { LatexMatrix } from './tex/matrix';
|
|
4
|
+
export { loadMathJax } from './tex/geometry';
|
|
5
|
+
export { NumberLine } from './systems/number-line';
|
|
6
|
+
export { Axes2d } from './systems/axes2d';
|
|
7
|
+
export { NumberPlane } from './systems/number-plane';
|
|
8
|
+
export { PolarPlane } from './systems/polar-plane';
|
|
9
|
+
export { FunctionPlot } from './plots/function-plot';
|
|
10
|
+
export { PointsPlot } from './plots/points-plot';
|
|
11
|
+
export { VectorField } from './plots/vector-field';
|
|
12
|
+
export { StreamLines } from './plots/stream-lines';
|
|
13
|
+
export { TracedPath } from './plots/traced-path';
|
|
14
|
+
export { PlotPoint } from './marks/plot-point';
|
|
15
|
+
export { VectorArrow } from './marks/vector-arrow';
|
|
16
|
+
export { CurveArea } from './marks/curve-area';
|
|
17
|
+
export { RiemannSum } from './marks/riemann-sum';
|
|
18
|
+
export { TangentLine } from './marks/tangent-line';
|
|
19
|
+
export { DropLines } from './marks/drop-lines';
|
|
20
|
+
export { CurlyBrace } from './annotate/curly-brace';
|
|
21
|
+
export { AngleMark } from './annotate/angle-mark';
|
|
22
|
+
export { EmphasisMark } from './annotate/emphasis-mark';
|
|
23
|
+
export { Axes3d } from './three/axes3d';
|
|
24
|
+
export { SurfacePlot3d } from './three/surface-plot3d';
|
|
25
|
+
export { CurvePlot3d } from './three/curve-plot3d';
|
|
26
|
+
export { PlotPoint3d } from './three/plot-point3d';
|
|
27
|
+
export { VectorArrow3d } from './three/vector-arrow3d';
|
|
28
|
+
export { NetworkGraph } from './structures/network-graph';
|
|
29
|
+
export { SampleSpace } from './structures/sample-space';
|
|
29
30
|
export { NODES } from "./nodes";
|
package/src/unstable.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// `@motionscript/math/kit`: everything the package holds, for a copied node and code built on its internals.
|
|
2
|
+
// Any release may change it; the root barrel is what stays.
|
|
3
|
+
export * from './tex/node';
|
|
4
|
+
export * from './tex/matrix';
|
|
5
|
+
export * from './systems/number-line';
|
|
6
|
+
export * from './systems/axes2d';
|
|
7
|
+
export * from './systems/number-plane';
|
|
8
|
+
export * from './plots/function-plot';
|
|
9
|
+
export * from './plots/points-plot';
|
|
10
|
+
export * from './marks/plot-point';
|
|
11
|
+
export * from './marks/vector-arrow';
|
|
12
|
+
export * from './marks/curve-area';
|
|
13
|
+
export * from './marks/riemann-sum';
|
|
14
|
+
export * from './marks/tangent-line';
|
|
15
|
+
export * from './marks/drop-lines';
|
|
16
|
+
export * from './annotate/curly-brace';
|
|
17
|
+
export * from './annotate/angle-mark';
|
|
18
|
+
export * from './annotate/emphasis-mark';
|
|
19
|
+
export * from './three/axes3d';
|
|
20
|
+
export * from './three/surface-plot3d';
|
|
21
|
+
export * from './three/curve-plot3d';
|
|
22
|
+
export * from './three/plot-point3d';
|
|
23
|
+
export * from './three/vector-arrow3d';
|
|
24
|
+
export * from './systems/polar-plane';
|
|
25
|
+
export * from './plots/vector-field';
|
|
26
|
+
export * from './plots/stream-lines';
|
|
27
|
+
export * from './plots/traced-path';
|
|
28
|
+
export * from './structures/network-graph';
|
|
29
|
+
export * from './structures/sample-space';
|
|
30
|
+
export * from './engine';
|
package/src/v1.ts
ADDED