@elucim/core 0.1.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/dist/__tests__/easing.test.d.ts +2 -0
- package/dist/__tests__/easing.test.d.ts.map +1 -0
- package/dist/__tests__/interpolate.test.d.ts +2 -0
- package/dist/__tests__/interpolate.test.d.ts.map +1 -0
- package/dist/__tests__/timeline.test.d.ts +2 -0
- package/dist/__tests__/timeline.test.d.ts.map +1 -0
- package/dist/animations/DrawWrite.d.ts +29 -0
- package/dist/animations/DrawWrite.d.ts.map +1 -0
- package/dist/animations/Fade.d.ts +29 -0
- package/dist/animations/Fade.d.ts.map +1 -0
- package/dist/animations/Groups.d.ts +24 -0
- package/dist/animations/Groups.d.ts.map +1 -0
- package/dist/animations/Timeline.d.ts +67 -0
- package/dist/animations/Timeline.d.ts.map +1 -0
- package/dist/animations/Transform.d.ts +59 -0
- package/dist/animations/Transform.d.ts.map +1 -0
- package/dist/animations/index.d.ts +6 -0
- package/dist/animations/index.d.ts.map +1 -0
- package/dist/components/Player.d.ts +20 -0
- package/dist/components/Player.d.ts.map +1 -0
- package/dist/components/Presentation.d.ts +78 -0
- package/dist/components/Presentation.d.ts.map +1 -0
- package/dist/components/Scene.d.ts +32 -0
- package/dist/components/Scene.d.ts.map +1 -0
- package/dist/components/Sequence.d.ts +17 -0
- package/dist/components/Sequence.d.ts.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/context.d.ts +15 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/easing/functions.d.ts +28 -0
- package/dist/easing/functions.d.ts.map +1 -0
- package/dist/easing/index.d.ts +3 -0
- package/dist/easing/index.d.ts.map +1 -0
- package/dist/easing/types.d.ts +3 -0
- package/dist/easing/types.d.ts.map +1 -0
- package/dist/export/index.d.ts +4 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/useExport.d.ts +26 -0
- package/dist/export/useExport.d.ts.map +1 -0
- package/dist/export/videoExport.d.ts +39 -0
- package/dist/export/videoExport.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/interpolate.d.ts +18 -0
- package/dist/hooks/interpolate.d.ts.map +1 -0
- package/dist/hooks/useCurrentFrame.d.ts +6 -0
- package/dist/hooks/useCurrentFrame.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13484 -0
- package/dist/primitives/Arrow.d.ts +15 -0
- package/dist/primitives/Arrow.d.ts.map +1 -0
- package/dist/primitives/Axes.d.ts +35 -0
- package/dist/primitives/Axes.d.ts.map +1 -0
- package/dist/primitives/BarChart.d.ts +36 -0
- package/dist/primitives/BarChart.d.ts.map +1 -0
- package/dist/primitives/Circle.d.ts +12 -0
- package/dist/primitives/Circle.d.ts.map +1 -0
- package/dist/primitives/FunctionPlot.d.ts +31 -0
- package/dist/primitives/FunctionPlot.d.ts.map +1 -0
- package/dist/primitives/Graph.d.ts +37 -0
- package/dist/primitives/Graph.d.ts.map +1 -0
- package/dist/primitives/LaTeX.d.ts +20 -0
- package/dist/primitives/LaTeX.d.ts.map +1 -0
- package/dist/primitives/Line.d.ts +14 -0
- package/dist/primitives/Line.d.ts.map +1 -0
- package/dist/primitives/Matrix.d.ts +21 -0
- package/dist/primitives/Matrix.d.ts.map +1 -0
- package/dist/primitives/Polygon.d.ts +20 -0
- package/dist/primitives/Polygon.d.ts.map +1 -0
- package/dist/primitives/Rect.d.ts +17 -0
- package/dist/primitives/Rect.d.ts.map +1 -0
- package/dist/primitives/Text.d.ts +15 -0
- package/dist/primitives/Text.d.ts.map +1 -0
- package/dist/primitives/Vector.d.ts +30 -0
- package/dist/primitives/Vector.d.ts.map +1 -0
- package/dist/primitives/VectorField.d.ts +32 -0
- package/dist/primitives/VectorField.d.ts.map +1 -0
- package/dist/primitives/animation.d.ts +20 -0
- package/dist/primitives/animation.d.ts.map +1 -0
- package/dist/primitives/index.d.ts +16 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface ArrowProps extends AnimationProps {
|
|
3
|
+
x1: number;
|
|
4
|
+
y1: number;
|
|
5
|
+
x2: number;
|
|
6
|
+
y2: number;
|
|
7
|
+
stroke?: string;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
headSize?: number;
|
|
10
|
+
opacity?: number;
|
|
11
|
+
/** SVG stroke-dasharray for dashed arrows, e.g. "6 3" */
|
|
12
|
+
strokeDasharray?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Arrow({ x1, y1, x2, y2, stroke, strokeWidth, headSize, opacity: baseOpacity, strokeDasharray: userDasharray, fadeIn, fadeOut, draw, easing, }: ArrowProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Arrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Arrow.d.ts","sourceRoot":"","sources":["../../src/primitives/Arrow.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,KAAK,CAAC,EACpB,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,MAAe,EACf,WAAe,EACf,QAAa,EACb,OAAO,EAAE,WAAe,EACxB,eAAe,EAAE,aAAa,EAC9B,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,GACP,EAAE,UAAU,2CAiCZ"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface AxesProps extends AnimationProps {
|
|
3
|
+
/** X-axis domain [min, max]. Default: [-5, 5] */
|
|
4
|
+
domain?: [number, number];
|
|
5
|
+
/** Y-axis range [min, max]. Default: [-5, 5] */
|
|
6
|
+
range?: [number, number];
|
|
7
|
+
/** Position of origin in SVG coordinates [x, y] */
|
|
8
|
+
origin?: [number, number];
|
|
9
|
+
/** Pixels per unit. Default: 40 */
|
|
10
|
+
scale?: number;
|
|
11
|
+
/** Show grid lines. Default: false */
|
|
12
|
+
showGrid?: boolean;
|
|
13
|
+
/** Show tick marks. Default: true */
|
|
14
|
+
showTicks?: boolean;
|
|
15
|
+
/** Show tick labels. Default: true */
|
|
16
|
+
showLabels?: boolean;
|
|
17
|
+
/** Tick spacing. Default: 1 */
|
|
18
|
+
tickStep?: number;
|
|
19
|
+
/** Axis color. Default: '#888' */
|
|
20
|
+
axisColor?: string;
|
|
21
|
+
/** Grid color. Default: '#333' */
|
|
22
|
+
gridColor?: string;
|
|
23
|
+
/** Label color. Default: '#aaa' */
|
|
24
|
+
labelColor?: string;
|
|
25
|
+
/** Label font size. Default: 12 */
|
|
26
|
+
labelFontSize?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Coordinate axes with ticks, labels, and optional grid.
|
|
30
|
+
* Maps math coordinates to SVG space.
|
|
31
|
+
*/
|
|
32
|
+
export declare function Axes({ domain, range, origin, scale, showGrid, showTicks, showLabels, tickStep, axisColor, gridColor, labelColor, labelFontSize, fadeIn, fadeOut, draw, easing, }: AxesProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
/** Convert math coordinates to SVG coordinates for use with Axes */
|
|
34
|
+
export declare function mathToSvg(mathX: number, mathY: number, origin?: [number, number], scale?: number): [number, number];
|
|
35
|
+
//# sourceMappingURL=Axes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Axes.d.ts","sourceRoot":"","sources":["../../src/primitives/Axes.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,iDAAiD;IACjD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,gDAAgD;IAChD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,mDAAmD;IACnD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,EACnB,MAAgB,EAChB,KAAe,EACf,MAAmB,EACnB,KAAU,EACV,QAAgB,EAChB,SAAgB,EAChB,UAAiB,EACjB,QAAY,EACZ,SAAkB,EAClB,SAAkB,EAClB,UAAmB,EACnB,aAAkB,EAClB,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,GACP,EAAE,SAAS,2CAwIX;AAED,oEAAoE;AACpE,wBAAgB,SAAS,CACvB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,CAAC,MAAM,EAAE,MAAM,CAAc,EACrC,KAAK,GAAE,MAAW,GACjB,CAAC,MAAM,EAAE,MAAM,CAAC,CAElB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface BarDef {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface BarChartProps extends AnimationProps {
|
|
8
|
+
bars: BarDef[];
|
|
9
|
+
/** Top-left x of the chart area */
|
|
10
|
+
x: number;
|
|
11
|
+
/** Top-left y of the chart area */
|
|
12
|
+
y: number;
|
|
13
|
+
/** Total width of the chart area */
|
|
14
|
+
width: number;
|
|
15
|
+
/** Total height of the chart area */
|
|
16
|
+
height: number;
|
|
17
|
+
/** Default bar color. Default: '#4fc3f7' */
|
|
18
|
+
barColor?: string;
|
|
19
|
+
/** Label text color. Default: '#e0e7ff' */
|
|
20
|
+
labelColor?: string;
|
|
21
|
+
/** Label font size. Default: 12 */
|
|
22
|
+
labelFontSize?: number;
|
|
23
|
+
/** Show value text above bars. Default: true */
|
|
24
|
+
showValues?: boolean;
|
|
25
|
+
/** Max value for scaling. Defaults to max of bar values */
|
|
26
|
+
maxValue?: number;
|
|
27
|
+
/** Gap between bars as fraction of bar width. Default: 0.3 */
|
|
28
|
+
gap?: number;
|
|
29
|
+
/** Value format: 'number' shows raw, 'percent' shows %. Default: 'percent' */
|
|
30
|
+
valueFormat?: 'number' | 'percent';
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Vertical bar chart with labels and optional value display.
|
|
34
|
+
*/
|
|
35
|
+
export declare function BarChart({ bars, x, y, width, height, barColor, labelColor, labelFontSize, showValues, maxValue, gap, valueFormat, fadeIn, fadeOut, easing, }: BarChartProps): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
+
//# sourceMappingURL=BarChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../src/primitives/BarChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,mCAAmC;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,mCAAmC;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,WAAW,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACpC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,CAAC,EACD,CAAC,EACD,KAAK,EACL,MAAM,EACN,QAAoB,EACpB,UAAsB,EACtB,aAAkB,EAClB,UAAiB,EACjB,QAAQ,EACR,GAAS,EACT,WAAuB,EACvB,MAAM,EACN,OAAO,EACP,MAAM,GACP,EAAE,aAAa,kDAoEf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface CircleProps extends AnimationProps {
|
|
3
|
+
cx: number;
|
|
4
|
+
cy: number;
|
|
5
|
+
r: number;
|
|
6
|
+
fill?: string;
|
|
7
|
+
stroke?: string;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
opacity?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function Circle({ cx, cy, r, fill, stroke, strokeWidth, opacity: baseOpacity, fadeIn, fadeOut, draw, easing, }: CircleProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=Circle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../src/primitives/Circle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,MAAM,CAAC,EACrB,EAAE,EACF,EAAE,EACF,CAAC,EACD,IAAa,EACb,MAAe,EACf,WAAe,EACf,OAAO,EAAE,WAAe,EACxB,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,GACP,EAAE,WAAW,2CAkBb"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EasingFunction } from '../easing/types';
|
|
2
|
+
export interface FunctionPlotProps {
|
|
3
|
+
/** The function to plot: (x) => y */
|
|
4
|
+
fn: (x: number) => number;
|
|
5
|
+
/** X domain [min, max]. Default: [-5, 5] */
|
|
6
|
+
domain?: [number, number];
|
|
7
|
+
/** Y clamp range to avoid huge values. Default: [-10, 10] */
|
|
8
|
+
yClamp?: [number, number];
|
|
9
|
+
/** Position of the coordinate origin in SVG pixels [x, y] */
|
|
10
|
+
origin?: [number, number];
|
|
11
|
+
/** Pixels per unit. Default: 40 */
|
|
12
|
+
scale?: number;
|
|
13
|
+
/** Stroke color. Default: '#4a9eff' */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** Stroke width. Default: 2 */
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
/** Number of sample points. Default: 200 */
|
|
18
|
+
samples?: number;
|
|
19
|
+
/** Draw animation: progressively reveal the curve over N frames */
|
|
20
|
+
draw?: number;
|
|
21
|
+
/** Easing for the draw animation */
|
|
22
|
+
easing?: EasingFunction;
|
|
23
|
+
/** Base opacity. Default: 1 */
|
|
24
|
+
opacity?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Plots a continuous mathematical function on Axes coordinates.
|
|
28
|
+
* Supports progressive draw animation.
|
|
29
|
+
*/
|
|
30
|
+
export declare function FunctionPlot({ fn, domain, yClamp, origin, scale, color, strokeWidth, samples, draw, easing, opacity, }: FunctionPlotProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=FunctionPlot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunctionPlot.d.ts","sourceRoot":"","sources":["../../src/primitives/FunctionPlot.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,MAAgB,EAChB,MAAkB,EAClB,MAAmB,EACnB,KAAU,EACV,KAAiB,EACjB,WAAe,EACf,OAAa,EACb,IAAI,EACJ,MAAM,EACN,OAAW,GACZ,EAAE,iBAAiB,2CAmFnB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface GraphNode {
|
|
3
|
+
id: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
radius?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface GraphEdge {
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
directed?: boolean;
|
|
15
|
+
label?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GraphProps extends AnimationProps {
|
|
18
|
+
nodes: GraphNode[];
|
|
19
|
+
edges: GraphEdge[];
|
|
20
|
+
/** Default node color. Default: '#6c5ce7' */
|
|
21
|
+
nodeColor?: string;
|
|
22
|
+
/** Default node radius. Default: 20 */
|
|
23
|
+
nodeRadius?: number;
|
|
24
|
+
/** Default edge color. Default: '#888' */
|
|
25
|
+
edgeColor?: string;
|
|
26
|
+
/** Edge stroke width. Default: 2 */
|
|
27
|
+
edgeWidth?: number;
|
|
28
|
+
/** Label color. Default: '#fff' */
|
|
29
|
+
labelColor?: string;
|
|
30
|
+
/** Label font size. Default: 14 */
|
|
31
|
+
labelFontSize?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Graph theory visualization with nodes and edges.
|
|
35
|
+
*/
|
|
36
|
+
export declare function Graph({ nodes, edges, nodeColor, nodeRadius, edgeColor, edgeWidth, labelColor, labelFontSize, fadeIn, fadeOut, easing, }: GraphProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
//# sourceMappingURL=Graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../src/primitives/Graph.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,KAAK,EACL,SAAqB,EACrB,UAAe,EACf,SAAkB,EAClB,SAAa,EACb,UAAmB,EACnB,aAAkB,EAClB,MAAM,EACN,OAAO,EACP,MAAM,GACP,EAAE,UAAU,2CAwFZ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface LaTeXProps extends AnimationProps {
|
|
3
|
+
/** LaTeX expression string (e.g., "\\frac{a}{b}") */
|
|
4
|
+
expression: string;
|
|
5
|
+
/** SVG x position */
|
|
6
|
+
x: number;
|
|
7
|
+
/** SVG y position */
|
|
8
|
+
y: number;
|
|
9
|
+
/** Text color. Default: '#fff' */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Font size in pixels. Default: 24 */
|
|
12
|
+
fontSize?: number;
|
|
13
|
+
/** Horizontal alignment. Default: 'center' */
|
|
14
|
+
align?: 'left' | 'center' | 'right';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Renders a LaTeX expression using KaTeX, embedded in SVG via foreignObject.
|
|
18
|
+
*/
|
|
19
|
+
export declare function LaTeX({ expression, x, y, color, fontSize, align, fadeIn, fadeOut, easing, }: LaTeXProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=LaTeX.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LaTeX.d.ts","sourceRoot":"","sources":["../../src/primitives/LaTeX.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,qBAAqB;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,EACpB,UAAU,EACV,CAAC,EACD,CAAC,EACD,KAAc,EACd,QAAa,EACb,KAAgB,EAChB,MAAM,EACN,OAAO,EACP,MAAM,GACP,EAAE,UAAU,2CAkDZ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface LineProps extends AnimationProps {
|
|
3
|
+
x1: number;
|
|
4
|
+
y1: number;
|
|
5
|
+
x2: number;
|
|
6
|
+
y2: number;
|
|
7
|
+
stroke?: string;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
opacity?: number;
|
|
10
|
+
/** SVG stroke-dasharray for dashed lines, e.g. "6 3" */
|
|
11
|
+
strokeDasharray?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Line({ x1, y1, x2, y2, stroke, strokeWidth, opacity: baseOpacity, strokeDasharray: userDasharray, fadeIn, fadeOut, draw, easing, }: LineProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=Line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../src/primitives/Line.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,IAAI,CAAC,EACnB,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,MAAe,EACf,WAAe,EACf,OAAO,EAAE,WAAe,EACxB,eAAe,EAAE,aAAa,EAC9B,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,GACP,EAAE,SAAS,2CAqBX"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface MatrixProps extends AnimationProps {
|
|
3
|
+
/** 2D array of numbers or strings */
|
|
4
|
+
values: (number | string)[][];
|
|
5
|
+
/** Top-left position in SVG coordinates */
|
|
6
|
+
x?: number;
|
|
7
|
+
y?: number;
|
|
8
|
+
/** Cell size in pixels. Default: 48 */
|
|
9
|
+
cellSize?: number;
|
|
10
|
+
/** Text color. Default: '#fff' */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** Bracket color. Default: '#888' */
|
|
13
|
+
bracketColor?: string;
|
|
14
|
+
/** Font size. Default: 20 */
|
|
15
|
+
fontSize?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Renders a matrix with square brackets and entries.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Matrix({ values, x, y, cellSize, color, bracketColor, fontSize, fadeIn, fadeOut, easing, }: MatrixProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=Matrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Matrix.d.ts","sourceRoot":"","sources":["../../src/primitives/Matrix.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,qCAAqC;IACrC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,CAAC;IAC9B,2CAA2C;IAC3C,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,CAAK,EACL,CAAK,EACL,QAAa,EACb,KAAc,EACd,YAAqB,EACrB,QAAa,EACb,MAAM,EACN,OAAO,EACP,MAAM,GACP,EAAE,WAAW,2CAoDb"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface PolygonProps extends AnimationProps {
|
|
3
|
+
/** Array of [x, y] points */
|
|
4
|
+
points: [number, number][];
|
|
5
|
+
/** Fill color. Default: 'none' */
|
|
6
|
+
fill?: string;
|
|
7
|
+
/** Stroke color. Default: '#fff' */
|
|
8
|
+
stroke?: string;
|
|
9
|
+
/** Stroke width. Default: 2 */
|
|
10
|
+
strokeWidth?: number;
|
|
11
|
+
/** Base opacity. Default: 1 */
|
|
12
|
+
opacity?: number;
|
|
13
|
+
/** Close the polygon path. Default: true */
|
|
14
|
+
closed?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* SVG polygon or polyline with animation support.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Polygon({ points, fill, stroke, strokeWidth, opacity: baseOpacity, closed, fadeIn, fadeOut, draw, easing, }: PolygonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=Polygon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.d.ts","sourceRoot":"","sources":["../../src/primitives/Polygon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,6BAA6B;IAC7B,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3B,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,EACtB,MAAM,EACN,IAAa,EACb,MAAe,EACf,WAAe,EACf,OAAO,EAAE,WAAe,EACxB,MAAa,EACb,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,GACP,EAAE,YAAY,2CAgCd"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface RectProps extends AnimationProps {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
fill?: string;
|
|
8
|
+
stroke?: string;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
rx?: number;
|
|
11
|
+
ry?: number;
|
|
12
|
+
opacity?: number;
|
|
13
|
+
/** SVG stroke-dasharray for dashed rectangles, e.g. "6 3" */
|
|
14
|
+
strokeDasharray?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function Rect({ x, y, width, height, fill, stroke, strokeWidth, rx, ry, opacity: baseOpacity, strokeDasharray: userDasharray, fadeIn, fadeOut, draw, easing, }: RectProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=Rect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rect.d.ts","sourceRoot":"","sources":["../../src/primitives/Rect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,IAAI,CAAC,EACnB,CAAC,EACD,CAAC,EACD,KAAK,EACL,MAAM,EACN,IAAa,EACb,MAAe,EACf,WAAe,EACf,EAAM,EACN,EAAM,EACN,OAAO,EAAE,WAAe,EACxB,eAAe,EAAE,aAAa,EAC9B,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,GACP,EAAE,SAAS,2CAuBX"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface TextProps extends AnimationProps {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
children: string;
|
|
6
|
+
fill?: string;
|
|
7
|
+
fontSize?: number;
|
|
8
|
+
fontFamily?: string;
|
|
9
|
+
fontWeight?: string | number;
|
|
10
|
+
textAnchor?: 'start' | 'middle' | 'end';
|
|
11
|
+
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'central';
|
|
12
|
+
opacity?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function Text({ x, y, children, fill, fontSize, fontFamily, fontWeight, textAnchor, dominantBaseline, opacity: baseOpacity, fadeIn, fadeOut, easing, }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/primitives/Text.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,IAAI,CAAC,EACnB,CAAC,EACD,CAAC,EACD,QAAQ,EACR,IAAa,EACb,QAAa,EACb,UAAyB,EACzB,UAAqB,EACrB,UAAoB,EACpB,gBAAyB,EACzB,OAAO,EAAE,WAAe,EACxB,MAAM,EACN,OAAO,EACP,MAAM,GACP,EAAE,SAAS,2CAmBX"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface VectorProps extends AnimationProps {
|
|
3
|
+
/** Start point in math coordinates [x, y] */
|
|
4
|
+
from?: [number, number];
|
|
5
|
+
/** End point in math coordinates [x, y] */
|
|
6
|
+
to: [number, number];
|
|
7
|
+
/** Origin of coordinate system in SVG pixels */
|
|
8
|
+
origin?: [number, number];
|
|
9
|
+
/** Pixels per unit. Default: 40 */
|
|
10
|
+
scale?: number;
|
|
11
|
+
/** Arrow color. Default: '#ffe66d' */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Stroke width. Default: 2.5 */
|
|
14
|
+
strokeWidth?: number;
|
|
15
|
+
/** Arrowhead size. Default: 10 */
|
|
16
|
+
headSize?: number;
|
|
17
|
+
/** Optional label text */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Label offset from arrow tip [dx, dy] in px. Default: [8, -8] */
|
|
20
|
+
labelOffset?: [number, number];
|
|
21
|
+
/** Label color. Default: same as color */
|
|
22
|
+
labelColor?: string;
|
|
23
|
+
/** Label font size. Default: 16 */
|
|
24
|
+
labelFontSize?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A mathematical vector arrow, rendered in Axes coordinate space.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Vector({ from, to, origin, scale, color, strokeWidth, headSize, label, labelOffset, labelColor, labelFontSize, fadeIn, fadeOut, draw, easing, }: VectorProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=Vector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["../../src/primitives/Vector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,6CAA6C;IAC7C,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,2CAA2C;IAC3C,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrB,gDAAgD;IAChD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,IAAa,EACb,EAAE,EACF,MAAmB,EACnB,KAAU,EACV,KAAiB,EACjB,WAAiB,EACjB,QAAa,EACb,KAAK,EACL,WAAqB,EACrB,UAAU,EACV,aAAkB,EAClB,MAAM,EACN,OAAO,EACP,IAAI,EACJ,MAAM,GACP,EAAE,WAAW,2CAiDb"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AnimationProps } from './animation';
|
|
2
|
+
export interface VectorFieldProps extends AnimationProps {
|
|
3
|
+
/** Function mapping (x, y) → [dx, dy] direction vector */
|
|
4
|
+
fn: (x: number, y: number) => [number, number];
|
|
5
|
+
/** X domain [min, max]. Default: [-4, 4] */
|
|
6
|
+
domain?: [number, number];
|
|
7
|
+
/** Y range [min, max]. Default: [-4, 4] */
|
|
8
|
+
range?: [number, number];
|
|
9
|
+
/** Grid spacing in math units. Default: 1 */
|
|
10
|
+
step?: number;
|
|
11
|
+
/** Origin in SVG coordinates. Default: [400, 300] */
|
|
12
|
+
origin?: [number, number];
|
|
13
|
+
/** Pixels per unit. Default: 40 */
|
|
14
|
+
scale?: number;
|
|
15
|
+
/** Arrow length scale factor. Default: 0.8 */
|
|
16
|
+
arrowScale?: number;
|
|
17
|
+
/** Arrow color. Default: '#4a9eff' */
|
|
18
|
+
color?: string;
|
|
19
|
+
/** Stroke width. Default: 1.5 */
|
|
20
|
+
strokeWidth?: number;
|
|
21
|
+
/** Arrowhead size. Default: 4 */
|
|
22
|
+
headSize?: number;
|
|
23
|
+
/** Whether to normalize arrow lengths. Default: false */
|
|
24
|
+
normalize?: boolean;
|
|
25
|
+
/** Max arrow length in math units (for clamping). Default: 1.5 */
|
|
26
|
+
maxLength?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders a grid of arrows representing a 2D vector field.
|
|
30
|
+
*/
|
|
31
|
+
export declare function VectorField({ fn, domain, range, step, origin, scale, arrowScale, color, strokeWidth, headSize, normalize, maxLength, fadeIn, fadeOut, easing, }: VectorFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=VectorField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorField.d.ts","sourceRoot":"","sources":["../../src/primitives/VectorField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,0DAA0D;IAC1D,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,4CAA4C;IAC5C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,MAAgB,EAChB,KAAe,EACf,IAAQ,EACR,MAAmB,EACnB,KAAU,EACV,UAAgB,EAChB,KAAiB,EACjB,WAAiB,EACjB,QAAY,EACZ,SAAiB,EACjB,SAAe,EACf,MAAM,EACN,OAAO,EACP,MAAM,GACP,EAAE,gBAAgB,2CAiFlB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EasingFunction } from '../easing/types';
|
|
2
|
+
export interface AnimationProps {
|
|
3
|
+
/** Fade in over N frames from start */
|
|
4
|
+
fadeIn?: number;
|
|
5
|
+
/** Fade out over N frames before end */
|
|
6
|
+
fadeOut?: number;
|
|
7
|
+
/** Draw stroke progressively over N frames */
|
|
8
|
+
draw?: number;
|
|
9
|
+
/** Easing function for animations */
|
|
10
|
+
easing?: EasingFunction;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Hook that computes animated opacity and strokeDashoffset from AnimationProps.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useAnimation(props: AnimationProps, totalLength?: number): {
|
|
16
|
+
opacity: number;
|
|
17
|
+
strokeDasharray?: string;
|
|
18
|
+
strokeDashoffset?: number;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=animation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/primitives/animation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,cAAc,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,CAkC1E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { Circle, type CircleProps } from './Circle';
|
|
2
|
+
export { Line, type LineProps } from './Line';
|
|
3
|
+
export { Arrow, type ArrowProps } from './Arrow';
|
|
4
|
+
export { Rect, type RectProps } from './Rect';
|
|
5
|
+
export { Text, type TextProps } from './Text';
|
|
6
|
+
export { Polygon, type PolygonProps } from './Polygon';
|
|
7
|
+
export { Axes, type AxesProps, mathToSvg } from './Axes';
|
|
8
|
+
export { FunctionPlot, type FunctionPlotProps } from './FunctionPlot';
|
|
9
|
+
export { Vector, type VectorProps } from './Vector';
|
|
10
|
+
export { VectorField, type VectorFieldProps } from './VectorField';
|
|
11
|
+
export { Matrix, type MatrixProps } from './Matrix';
|
|
12
|
+
export { Graph, type GraphProps, type GraphNode, type GraphEdge } from './Graph';
|
|
13
|
+
export { LaTeX, type LaTeXProps } from './LaTeX';
|
|
14
|
+
export { BarChart, type BarChartProps, type BarDef } from './BarChart';
|
|
15
|
+
export { useAnimation, type AnimationProps } from './animation';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elucim/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React library for animated math and concept visualizations — 3Blue1Brown-style for the web",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/sethjuarez/elucim.git",
|
|
10
|
+
"directory": "packages/core"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/sethjuarez/elucim#readme",
|
|
13
|
+
"bugs": "https://github.com/sethjuarez/elucim/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"animation",
|
|
17
|
+
"math",
|
|
18
|
+
"visualization",
|
|
19
|
+
"svg",
|
|
20
|
+
"manim",
|
|
21
|
+
"3blue1brown",
|
|
22
|
+
"presentation",
|
|
23
|
+
"latex"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"import": "./dist/index.js",
|
|
34
|
+
"types": "./dist/index.d.ts"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"dev": "vite build --watch",
|
|
42
|
+
"build": "tsc && vite build",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"test:watch": "vitest",
|
|
45
|
+
"lint": "tsc --noEmit"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
49
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/katex": "^0.16.8",
|
|
53
|
+
"@types/react": "^18.3.0",
|
|
54
|
+
"@types/react-dom": "^18.3.0",
|
|
55
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
56
|
+
"jsdom": "^28.1.0",
|
|
57
|
+
"react": "^18.3.0",
|
|
58
|
+
"react-dom": "^18.3.0",
|
|
59
|
+
"typescript": "^5.5.0",
|
|
60
|
+
"vite": "^5.4.0",
|
|
61
|
+
"vite-plugin-dts": "^4.5.4",
|
|
62
|
+
"vitest": "^2.0.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"katex": "^0.16.33"
|
|
66
|
+
}
|
|
67
|
+
}
|