@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.
Files changed (84) hide show
  1. package/dist/__tests__/easing.test.d.ts +2 -0
  2. package/dist/__tests__/easing.test.d.ts.map +1 -0
  3. package/dist/__tests__/interpolate.test.d.ts +2 -0
  4. package/dist/__tests__/interpolate.test.d.ts.map +1 -0
  5. package/dist/__tests__/timeline.test.d.ts +2 -0
  6. package/dist/__tests__/timeline.test.d.ts.map +1 -0
  7. package/dist/animations/DrawWrite.d.ts +29 -0
  8. package/dist/animations/DrawWrite.d.ts.map +1 -0
  9. package/dist/animations/Fade.d.ts +29 -0
  10. package/dist/animations/Fade.d.ts.map +1 -0
  11. package/dist/animations/Groups.d.ts +24 -0
  12. package/dist/animations/Groups.d.ts.map +1 -0
  13. package/dist/animations/Timeline.d.ts +67 -0
  14. package/dist/animations/Timeline.d.ts.map +1 -0
  15. package/dist/animations/Transform.d.ts +59 -0
  16. package/dist/animations/Transform.d.ts.map +1 -0
  17. package/dist/animations/index.d.ts +6 -0
  18. package/dist/animations/index.d.ts.map +1 -0
  19. package/dist/components/Player.d.ts +20 -0
  20. package/dist/components/Player.d.ts.map +1 -0
  21. package/dist/components/Presentation.d.ts +78 -0
  22. package/dist/components/Presentation.d.ts.map +1 -0
  23. package/dist/components/Scene.d.ts +32 -0
  24. package/dist/components/Scene.d.ts.map +1 -0
  25. package/dist/components/Sequence.d.ts +17 -0
  26. package/dist/components/Sequence.d.ts.map +1 -0
  27. package/dist/components/index.d.ts +4 -0
  28. package/dist/components/index.d.ts.map +1 -0
  29. package/dist/context.d.ts +15 -0
  30. package/dist/context.d.ts.map +1 -0
  31. package/dist/easing/functions.d.ts +28 -0
  32. package/dist/easing/functions.d.ts.map +1 -0
  33. package/dist/easing/index.d.ts +3 -0
  34. package/dist/easing/index.d.ts.map +1 -0
  35. package/dist/easing/types.d.ts +3 -0
  36. package/dist/easing/types.d.ts.map +1 -0
  37. package/dist/export/index.d.ts +4 -0
  38. package/dist/export/index.d.ts.map +1 -0
  39. package/dist/export/useExport.d.ts +26 -0
  40. package/dist/export/useExport.d.ts.map +1 -0
  41. package/dist/export/videoExport.d.ts +39 -0
  42. package/dist/export/videoExport.d.ts.map +1 -0
  43. package/dist/hooks/index.d.ts +3 -0
  44. package/dist/hooks/index.d.ts.map +1 -0
  45. package/dist/hooks/interpolate.d.ts +18 -0
  46. package/dist/hooks/interpolate.d.ts.map +1 -0
  47. package/dist/hooks/useCurrentFrame.d.ts +6 -0
  48. package/dist/hooks/useCurrentFrame.d.ts.map +1 -0
  49. package/dist/index.d.ts +30 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +13484 -0
  52. package/dist/primitives/Arrow.d.ts +15 -0
  53. package/dist/primitives/Arrow.d.ts.map +1 -0
  54. package/dist/primitives/Axes.d.ts +35 -0
  55. package/dist/primitives/Axes.d.ts.map +1 -0
  56. package/dist/primitives/BarChart.d.ts +36 -0
  57. package/dist/primitives/BarChart.d.ts.map +1 -0
  58. package/dist/primitives/Circle.d.ts +12 -0
  59. package/dist/primitives/Circle.d.ts.map +1 -0
  60. package/dist/primitives/FunctionPlot.d.ts +31 -0
  61. package/dist/primitives/FunctionPlot.d.ts.map +1 -0
  62. package/dist/primitives/Graph.d.ts +37 -0
  63. package/dist/primitives/Graph.d.ts.map +1 -0
  64. package/dist/primitives/LaTeX.d.ts +20 -0
  65. package/dist/primitives/LaTeX.d.ts.map +1 -0
  66. package/dist/primitives/Line.d.ts +14 -0
  67. package/dist/primitives/Line.d.ts.map +1 -0
  68. package/dist/primitives/Matrix.d.ts +21 -0
  69. package/dist/primitives/Matrix.d.ts.map +1 -0
  70. package/dist/primitives/Polygon.d.ts +20 -0
  71. package/dist/primitives/Polygon.d.ts.map +1 -0
  72. package/dist/primitives/Rect.d.ts +17 -0
  73. package/dist/primitives/Rect.d.ts.map +1 -0
  74. package/dist/primitives/Text.d.ts +15 -0
  75. package/dist/primitives/Text.d.ts.map +1 -0
  76. package/dist/primitives/Vector.d.ts +30 -0
  77. package/dist/primitives/Vector.d.ts.map +1 -0
  78. package/dist/primitives/VectorField.d.ts +32 -0
  79. package/dist/primitives/VectorField.d.ts.map +1 -0
  80. package/dist/primitives/animation.d.ts +20 -0
  81. package/dist/primitives/animation.d.ts.map +1 -0
  82. package/dist/primitives/index.d.ts +16 -0
  83. package/dist/primitives/index.d.ts.map +1 -0
  84. package/package.json +67 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=easing.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"easing.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/easing.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interpolate.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolate.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/interpolate.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=timeline.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/timeline.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { EasingFunction } from '../easing/types';
3
+ export interface DrawProps {
4
+ children: React.ReactElement;
5
+ /** Duration of the draw animation in frames. Default: 60 */
6
+ duration?: number;
7
+ /** Easing function. Default: easeInOutQuad */
8
+ easing?: EasingFunction;
9
+ /** Total stroke length (if not provided, estimated from element) */
10
+ pathLength?: number;
11
+ }
12
+ /**
13
+ * Progressively draws a stroked SVG element by animating strokeDashoffset.
14
+ * Works by cloning the child element and injecting dash properties.
15
+ */
16
+ export declare function Draw({ children, duration, easing, pathLength, }: DrawProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
17
+ export interface WriteProps {
18
+ children: React.ReactNode;
19
+ /** Duration of the write animation in frames. Default: 45 */
20
+ duration?: number;
21
+ /** Easing function. Default: easeInOutQuad */
22
+ easing?: EasingFunction;
23
+ }
24
+ /**
25
+ * "Write" animation: combines a progressive stroke draw with a fade-in fill.
26
+ * Best for text and complex shapes.
27
+ */
28
+ export declare function Write({ children, duration, easing, }: WriteProps): import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=DrawWrite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawWrite.d.ts","sourceRoot":"","sources":["../../src/animations/DrawWrite.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,QAAa,EACb,MAAsB,EACtB,UAAiB,GAClB,EAAE,SAAS,sEASX;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,QAAa,EACb,MAAsB,GACvB,EAAE,UAAU,2CAcZ"}
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { EasingFunction } from '../easing/types';
3
+ export interface FadeInProps {
4
+ children: React.ReactNode;
5
+ /** Duration of the fade in frames. Default: 30 */
6
+ duration?: number;
7
+ /** Easing function. Default: easeOutCubic */
8
+ easing?: EasingFunction;
9
+ }
10
+ /**
11
+ * Wraps children in an opacity fade from 0 → 1.
12
+ * Use inside a Sequence to control timing.
13
+ */
14
+ export declare function FadeIn({ children, duration, easing, }: FadeInProps): import("react/jsx-runtime").JSX.Element;
15
+ export interface FadeOutProps {
16
+ children: React.ReactNode;
17
+ /** Duration of the fade in frames. Default: 30 */
18
+ duration?: number;
19
+ /** Total frames available (fade happens at the end). If omitted, fades from start. */
20
+ totalFrames?: number;
21
+ /** Easing function. Default: easeOutCubic */
22
+ easing?: EasingFunction;
23
+ }
24
+ /**
25
+ * Wraps children in an opacity fade from 1 → 0.
26
+ * If totalFrames is set, the fade begins at (totalFrames - duration).
27
+ */
28
+ export declare function FadeOut({ children, duration, totalFrames, easing, }: FadeOutProps): import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=Fade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fade.d.ts","sourceRoot":"","sources":["../../src/animations/Fade.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,QAAa,EACb,MAAqB,GACtB,EAAE,WAAW,2CAKb;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,QAAa,EACb,WAAW,EACX,MAAqB,GACtB,EAAE,YAAY,2CAOd"}
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { EasingFunction } from '../easing/types';
3
+ export interface ParallelProps {
4
+ children: React.ReactNode;
5
+ }
6
+ /**
7
+ * Runs child animations in parallel (all start at the same frame).
8
+ * This is a semantic wrapper — children already render in parallel by default.
9
+ * Useful for readability and grouping.
10
+ */
11
+ export declare function Parallel({ children }: ParallelProps): import("react/jsx-runtime").JSX.Element;
12
+ export interface StaggerProps {
13
+ children: React.ReactNode[];
14
+ /** Delay in frames between each child starting. Default: 10 */
15
+ staggerDelay?: number;
16
+ /** Easing for the stagger offset. Default: easeInOutQuad */
17
+ easing?: EasingFunction;
18
+ }
19
+ /**
20
+ * Staggers the appearance of children by delaying each one.
21
+ * Each child gets an increasing opacity delay based on its index.
22
+ */
23
+ export declare function Stagger({ children, staggerDelay, easing, }: StaggerProps): import("react/jsx-runtime").JSX.Element;
24
+ //# sourceMappingURL=Groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Groups.d.ts","sourceRoot":"","sources":["../../src/animations/Groups.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAEnD;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,YAAiB,EACjB,MAAsB,GACvB,EAAE,YAAY,2CAuBd"}
@@ -0,0 +1,67 @@
1
+ import { EasingFunction } from '../easing/types';
2
+ /**
3
+ * A timeline action produced by the imperative DSL.
4
+ * Each action maps to a Sequence + animation wrapper in the declarative tree.
5
+ */
6
+ export interface TimelineAction {
7
+ id: string;
8
+ type: 'fadeIn' | 'fadeOut' | 'draw' | 'write' | 'transform' | 'wait' | 'custom';
9
+ startFrame: number;
10
+ durationFrames: number;
11
+ easing: EasingFunction;
12
+ props?: Record<string, unknown>;
13
+ }
14
+ export interface PlayOptions {
15
+ /** Duration in seconds. Default: 1 */
16
+ runTime?: number;
17
+ /** Easing function */
18
+ easing?: EasingFunction;
19
+ /** Additional props to pass to the animation */
20
+ props?: Record<string, unknown>;
21
+ }
22
+ /**
23
+ * Imperative timeline builder.
24
+ * Builds a list of TimelineActions that can be rendered by <TimelineRenderer>.
25
+ *
26
+ * Usage:
27
+ * const timeline = new Timeline(60); // 60 fps
28
+ * timeline.play('fadeIn', 'circle1', { runTime: 1 });
29
+ * timeline.play('draw', 'curve1', { runTime: 2 });
30
+ * timeline.wait(0.5);
31
+ * timeline.play('write', 'label1');
32
+ *
33
+ * // Get the compiled actions + total duration
34
+ * const { actions, totalFrames } = timeline.compile();
35
+ */
36
+ export declare class Timeline {
37
+ private fps;
38
+ private cursor;
39
+ private actions;
40
+ private idCounter;
41
+ constructor(fps?: number);
42
+ /**
43
+ * Play an animation sequentially (advances the cursor).
44
+ */
45
+ play(type: TimelineAction['type'], targetId: string, options?: PlayOptions): this;
46
+ /**
47
+ * Play an animation at the current cursor WITHOUT advancing it.
48
+ * Use for parallel animations.
49
+ */
50
+ add(type: TimelineAction['type'], targetId: string, options?: PlayOptions): this;
51
+ /**
52
+ * Pause the timeline for a duration.
53
+ */
54
+ wait(seconds?: number): this;
55
+ /**
56
+ * Get the compiled timeline.
57
+ */
58
+ compile(): {
59
+ actions: TimelineAction[];
60
+ totalFrames: number;
61
+ };
62
+ /** Get current cursor position in frames */
63
+ get currentFrame(): number;
64
+ /** Get current cursor position in seconds */
65
+ get currentTime(): number;
66
+ }
67
+ //# sourceMappingURL=Timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/animations/Timeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChF,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,SAAS,CAAK;gBAEV,GAAG,GAAE,MAAW;IAI5B;;OAEG;IACH,IAAI,CACF,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,WAAgB,GACxB,IAAI;IAiBP;;;OAGG;IACH,GAAG,CACD,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,WAAgB,GACxB,IAAI;IAiBP;;OAEG;IACH,IAAI,CAAC,OAAO,GAAE,MAAY,GAAG,IAAI;IAejC;;OAEG;IACH,OAAO,IAAI;QAAE,OAAO,EAAE,cAAc,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;IAW7D,4CAA4C;IAC5C,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,6CAA6C;IAC7C,IAAI,WAAW,IAAI,MAAM,CAExB;CACF"}
@@ -0,0 +1,59 @@
1
+ import { default as React } from 'react';
2
+ import { EasingFunction } from '../easing/types';
3
+ export interface TransformProps {
4
+ children: React.ReactNode;
5
+ /** Duration of the transform in frames. Default: 60 */
6
+ duration?: number;
7
+ /** Easing function. Default: easeInOutCubic */
8
+ easing?: EasingFunction;
9
+ /** Translate [fromX, fromY] → [toX, toY] in SVG pixels */
10
+ translate?: {
11
+ from: [number, number];
12
+ to: [number, number];
13
+ };
14
+ /** Scale from → to */
15
+ scale?: {
16
+ from: number;
17
+ to: number;
18
+ };
19
+ /** Rotate from → to (in degrees) */
20
+ rotate?: {
21
+ from: number;
22
+ to: number;
23
+ };
24
+ /** Opacity from → to */
25
+ opacity?: {
26
+ from: number;
27
+ to: number;
28
+ };
29
+ }
30
+ /**
31
+ * Animates a transform between two states over duration frames.
32
+ * Supports translate, scale, rotate, and opacity simultaneously.
33
+ */
34
+ export declare function Transform({ children, duration, easing, translate, scale, rotate, opacity, }: TransformProps): import("react/jsx-runtime").JSX.Element;
35
+ export interface MorphProps {
36
+ children: React.ReactNode;
37
+ /** Duration of the morph in frames. Default: 60 */
38
+ duration?: number;
39
+ /** Easing function. Default: easeInOutCubic */
40
+ easing?: EasingFunction;
41
+ /** Start color (fill) */
42
+ fromColor?: string;
43
+ /** End color (fill) */
44
+ toColor?: string;
45
+ /** Start opacity */
46
+ fromOpacity?: number;
47
+ /** End opacity */
48
+ toOpacity?: number;
49
+ /** Start scale */
50
+ fromScale?: number;
51
+ /** End scale */
52
+ toScale?: number;
53
+ }
54
+ /**
55
+ * Morphs visual properties (color, opacity, scale) over duration frames.
56
+ * For cross-fading between two different elements, use two overlapping Sequences.
57
+ */
58
+ export declare function Morph({ children, duration, easing, fromColor, toColor, fromOpacity, toOpacity, fromScale, toScale, }: MorphProps): import("react/jsx-runtime").JSX.Element;
59
+ //# sourceMappingURL=Transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Transform.d.ts","sourceRoot":"","sources":["../../src/animations/Transform.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,0DAA0D;IAC1D,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;IAC7D,sBAAsB;IACtB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,oCAAoC;IACpC,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,wBAAwB;IACxB,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;CACxC;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,QAAa,EACb,MAAuB,EACvB,SAAS,EACT,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE,cAAc,2CA0BhB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,QAAa,EACb,MAAuB,EACvB,SAAS,EACT,OAAO,EACP,WAAe,EACf,SAAa,EACb,SAAa,EACb,OAAW,GACZ,EAAE,UAAU,2CAuBZ"}
@@ -0,0 +1,6 @@
1
+ export { FadeIn, type FadeInProps, FadeOut, type FadeOutProps } from './Fade';
2
+ export { Draw, type DrawProps, Write, type WriteProps } from './DrawWrite';
3
+ export { Transform, type TransformProps, Morph, type MorphProps } from './Transform';
4
+ export { Parallel, Stagger, type StaggerProps } from './Groups';
5
+ export { Timeline, type TimelineAction, type PlayOptions } from './Timeline';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { SceneProps } from './Scene';
2
+ export interface PlayerProps extends Omit<SceneProps, 'frame' | 'autoPlay'> {
3
+ /** Show controls bar. Default: true */
4
+ controls?: boolean;
5
+ /** Loop playback. Default: true */
6
+ loop?: boolean;
7
+ /** Auto-play on mount. Default: false */
8
+ autoPlay?: boolean;
9
+ /** Background color of controls bar. Default: auto (light/dark aware) */
10
+ controlsBackground?: string;
11
+ /** Text/icon color of controls bar. Default: auto (light/dark aware) */
12
+ controlsColor?: string;
13
+ /** Accent color for scrub bar progress and handle. Default: '#4a9eff' */
14
+ controlsAccent?: string;
15
+ }
16
+ /**
17
+ * Interactive player component with scrub bar, play/pause, and keyboard controls.
18
+ */
19
+ export declare function Player({ controls, loop, autoPlay, durationInFrames, fps, width, height, controlsBackground, controlsColor, controlsAccent, children, ...sceneProps }: PlayerProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=Player.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Player.d.ts","sourceRoot":"","sources":["../../src/components/Player.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAGjD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,CAAC;IACzE,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAe,EACf,IAAW,EACX,QAAgB,EAChB,gBAAgB,EAChB,GAAQ,EACR,KAAY,EACZ,MAAa,EACb,kBAAmD,EACnD,aAA2C,EAC3C,cAA+C,EAC/C,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,WAAW,2CAgKb"}
@@ -0,0 +1,78 @@
1
+ import { default as React } from 'react';
2
+ interface PresentationContextValue {
3
+ slideIndex: number;
4
+ totalSlides: number;
5
+ /** Navigate to specific slide */
6
+ goTo: (index: number) => void;
7
+ next: () => void;
8
+ prev: () => void;
9
+ /** Whether currently in fullscreen */
10
+ isFullscreen: boolean;
11
+ toggleFullscreen: () => void;
12
+ }
13
+ export declare function usePresentationContext(): PresentationContextValue;
14
+ /** Returns true when rendered inside a <Presentation>. Safe to call anywhere. */
15
+ export declare function useInsidePresentation(): boolean;
16
+ export interface SlideProps {
17
+ /** Optional slide title (shown in presenter HUD) */
18
+ title?: string;
19
+ /** Presenter notes (shown in presenter view, not on screen) */
20
+ notes?: string;
21
+ /** Background color override for this slide */
22
+ background?: string;
23
+ /** Children — any Elucim content (Player, Scene, raw SVG, HTML) */
24
+ children: React.ReactNode;
25
+ }
26
+ /**
27
+ * A single slide in a Presentation.
28
+ * Children can be anything: a <Player> with animations, static content, HTML, etc.
29
+ */
30
+ export declare function Slide({ children, background }: SlideProps): import("react/jsx-runtime").JSX.Element;
31
+ export type TransitionType = 'none' | 'fade' | 'slide-left' | 'slide-up' | 'zoom';
32
+ export interface PresentationProps {
33
+ /** Slide width. Default: 1920 */
34
+ width?: number;
35
+ /** Slide height. Default: 1080 */
36
+ height?: number;
37
+ /** Background color for the presentation. Default: '#0d0d1a' */
38
+ background?: string;
39
+ /** Transition between slides. Default: 'fade' */
40
+ transition?: TransitionType;
41
+ /** Transition duration in ms. Default: 400 */
42
+ transitionDuration?: number;
43
+ /** Show slide counter HUD. Default: true */
44
+ showHUD?: boolean;
45
+ /** Show presenter notes panel below slides. Default: false */
46
+ showNotes?: boolean;
47
+ /** Start on this slide index. Default: 0 */
48
+ startSlide?: number;
49
+ /** Called when slide changes */
50
+ onSlideChange?: (index: number) => void;
51
+ /** Children — must be <Slide> components */
52
+ children: React.ReactNode;
53
+ }
54
+ /**
55
+ * Full-screen presentation mode for Elucim.
56
+ *
57
+ * Usage:
58
+ * <Presentation transition="fade">
59
+ * <Slide title="Intro">
60
+ * <Player ...> ... </Player>
61
+ * </Slide>
62
+ * <Slide title="Theorem">
63
+ * <Player ...> ... </Player>
64
+ * </Slide>
65
+ * </Presentation>
66
+ *
67
+ * Keyboard:
68
+ * → / Space / PageDown = next slide
69
+ * ← / PageUp = previous slide
70
+ * Home = first slide
71
+ * End = last slide
72
+ * F / F11 = toggle fullscreen
73
+ * Escape = exit fullscreen
74
+ * G = go to slide (shows prompt)
75
+ */
76
+ export declare function Presentation({ width, height, background, transition, transitionDuration, showHUD, showNotes, startSlide, onSlideChange, children, }: PresentationProps): import("react/jsx-runtime").JSX.Element;
77
+ export {};
78
+ //# sourceMappingURL=Presentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Presentation.d.ts","sourceRoot":"","sources":["../../src/components/Presentation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAIf,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,sCAAsC;IACtC,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAID,wBAAgB,sBAAsB,6BAIrC;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C;AAID,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU,2CAkBzD;AAID,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAgClF,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,4CAA4C;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAY,EACZ,MAAa,EACb,UAAsB,EACtB,UAAmB,EACnB,kBAAwB,EACxB,OAAc,EACd,SAAiB,EACjB,UAAc,EACd,aAAa,EACb,QAAQ,GACT,EAAE,iBAAiB,2CA6anB"}
@@ -0,0 +1,32 @@
1
+ import { default as React } from 'react';
2
+ export interface SceneProps {
3
+ /** Width in pixels. Default: 1920 */
4
+ width?: number;
5
+ /** Height in pixels. Default: 1080 */
6
+ height?: number;
7
+ /** Frames per second. Default: 60 */
8
+ fps?: number;
9
+ /** Total duration in frames */
10
+ durationInFrames: number;
11
+ /** Background color. Default: auto (light/dark aware) */
12
+ background?: string;
13
+ /** Children to render */
14
+ children: React.ReactNode;
15
+ /** If true, auto-plays on mount. Default: false */
16
+ autoPlay?: boolean;
17
+ /**
18
+ * Controlled frame (if provided, Scene is in controlled mode).
19
+ * Used by Player to drive the Scene externally.
20
+ */
21
+ frame?: number;
22
+ /** CSS class name */
23
+ className?: string;
24
+ /** CSS style */
25
+ style?: React.CSSProperties;
26
+ }
27
+ /**
28
+ * Root composition component.
29
+ * Provides frame clock and dimensions to all children via context.
30
+ */
31
+ export declare function Scene({ width, height, fps, durationInFrames, background, children, autoPlay, frame: controlledFrame, className, style, }: SceneProps): import("react/jsx-runtime").JSX.Element;
32
+ //# sourceMappingURL=Scene.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../src/components/Scene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAIxE,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAY,EACZ,MAAa,EACb,GAAQ,EACR,gBAAgB,EAChB,UAA2C,EAC3C,QAAQ,EACR,QAAgB,EAChB,KAAK,EAAE,eAAe,EACtB,SAAS,EACT,KAAK,GACN,EAAE,UAAU,2CAgFZ"}
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface SequenceProps {
3
+ /** Frame at which this Sequence starts (relative to parent Scene) */
4
+ from: number;
5
+ /** Duration in frames. If omitted, extends to end of Scene */
6
+ durationInFrames?: number;
7
+ /** Children receive a remapped frame starting from 0 */
8
+ children: React.ReactNode;
9
+ /** Optional name for debugging */
10
+ name?: string;
11
+ }
12
+ /**
13
+ * Time-offset wrapper. Children see local frame = 0 at the Sequence's `from`.
14
+ * Children are unmounted when outside the Sequence's time range.
15
+ */
16
+ export declare function Sequence({ from, durationInFrames, children, name, }: SequenceProps): import("react/jsx-runtime").JSX.Element | null;
17
+ //# sourceMappingURL=Sequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sequence.d.ts","sourceRoot":"","sources":["../../src/components/Sequence.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,gBAAgB,EAChB,QAAQ,EACR,IAAI,GACL,EAAE,aAAa,kDA2Bf"}
@@ -0,0 +1,4 @@
1
+ export { Scene, type SceneProps } from './Scene';
2
+ export { Sequence, type SequenceProps } from './Sequence';
3
+ export { Player, type PlayerProps } from './Player';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface ElucimContextValue {
2
+ /** Current frame number (0 → durationInFrames - 1) */
3
+ frame: number;
4
+ /** Frames per second */
5
+ fps: number;
6
+ /** Total duration in frames */
7
+ durationInFrames: number;
8
+ /** Scene width in pixels */
9
+ width: number;
10
+ /** Scene height in pixels */
11
+ height: number;
12
+ }
13
+ export declare const ElucimContext: import('react').Context<ElucimContextValue | null>;
14
+ export declare function useElucimContext(): ElucimContextValue;
15
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E,wBAAgB,gBAAgB,IAAI,kBAAkB,CAQrD"}
@@ -0,0 +1,28 @@
1
+ import { EasingFunction } from './types';
2
+ export declare const linear: EasingFunction;
3
+ export declare const easeInQuad: EasingFunction;
4
+ export declare const easeOutQuad: EasingFunction;
5
+ export declare const easeInOutQuad: EasingFunction;
6
+ export declare const easeInCubic: EasingFunction;
7
+ export declare const easeOutCubic: EasingFunction;
8
+ export declare const easeInOutCubic: EasingFunction;
9
+ export declare const easeInQuart: EasingFunction;
10
+ export declare const easeOutQuart: EasingFunction;
11
+ export declare const easeInOutQuart: EasingFunction;
12
+ export declare const easeInSine: EasingFunction;
13
+ export declare const easeOutSine: EasingFunction;
14
+ export declare const easeInOutSine: EasingFunction;
15
+ export declare const easeInExpo: EasingFunction;
16
+ export declare const easeOutExpo: EasingFunction;
17
+ export declare const easeInOutExpo: EasingFunction;
18
+ export declare const easeInBack: EasingFunction;
19
+ export declare const easeOutBack: EasingFunction;
20
+ export declare const easeOutElastic: EasingFunction;
21
+ export declare const easeOutBounce: EasingFunction;
22
+ export declare function spring(config?: {
23
+ stiffness?: number;
24
+ damping?: number;
25
+ mass?: number;
26
+ }): EasingFunction;
27
+ export declare function cubicBezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
28
+ //# sourceMappingURL=functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/easing/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,eAAO,MAAM,MAAM,EAAE,cAAyB,CAAC;AAG/C,eAAO,MAAM,UAAU,EAAE,cAA6B,CAAC;AACvD,eAAO,MAAM,WAAW,EAAE,cAAmC,CAAC;AAC9D,eAAO,MAAM,aAAa,EAAE,cACgB,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,cAAiC,CAAC;AAC5D,eAAO,MAAM,YAAY,EAAE,cAAyC,CAAC;AACrE,eAAO,MAAM,cAAc,EAAE,cACsC,CAAC;AAGpE,eAAO,MAAM,WAAW,EAAE,cAAqC,CAAC;AAChE,eAAO,MAAM,YAAY,EAAE,cAA6C,CAAC;AACzE,eAAO,MAAM,cAAc,EAAE,cAC4B,CAAC;AAG1D,eAAO,MAAM,UAAU,EAAE,cACQ,CAAC;AAClC,eAAO,MAAM,WAAW,EAAE,cACG,CAAC;AAC9B,eAAO,MAAM,aAAa,EAAE,cACM,CAAC;AAGnC,eAAO,MAAM,UAAU,EAAE,cACe,CAAC;AACzC,eAAO,MAAM,WAAW,EAAE,cACc,CAAC;AACzC,eAAO,MAAM,aAAa,EAAE,cAIW,CAAC;AAGxC,eAAO,MAAM,UAAU,EAAE,cAIxB,CAAC;AACF,eAAO,MAAM,WAAW,EAAE,cAIzB,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,cAG5B,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,cAO3B,CAAC;AAGF,wBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,cAAc,CAoBjB;AAGD,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,cAAc,CAiBhB"}
@@ -0,0 +1,3 @@
1
+ export type { EasingFunction } from './types';
2
+ export { linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInSine, easeOutSine, easeInOutSine, easeInExpo, easeOutExpo, easeInOutExpo, easeInBack, easeOutBack, easeOutElastic, easeOutBounce, spring, cubicBezier, } from './functions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/easing/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EACL,MAAM,EACN,UAAU,EAAE,WAAW,EAAE,aAAa,EACtC,WAAW,EAAE,YAAY,EAAE,cAAc,EACzC,WAAW,EAAE,YAAY,EAAE,cAAc,EACzC,UAAU,EAAE,WAAW,EAAE,aAAa,EACtC,UAAU,EAAE,WAAW,EAAE,aAAa,EACtC,UAAU,EAAE,WAAW,EACvB,cAAc,EACd,aAAa,EACb,MAAM,EACN,WAAW,GACZ,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** An easing function maps progress (0→1) to an eased value (typically 0→1) */
2
+ export type EasingFunction = (t: number) => number;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/easing/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { exportAnimation, exportWithMediaRecorder, svgToCanvas, downloadBlob } from './videoExport';
2
+ export type { ExportOptions } from './videoExport';
3
+ export { useExport } from './useExport';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/export/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACpG,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { ExportOptions } from './videoExport';
2
+ export interface UseExportResult {
3
+ /** Whether an export is currently in progress */
4
+ isExporting: boolean;
5
+ /** Export progress (0..1) */
6
+ progress: number;
7
+ /** Current frame being exported */
8
+ currentFrame: number;
9
+ /** Start exporting */
10
+ startExport: (svgRef: SVGSVGElement, setFrame: (f: number) => void, options: ExportOptions) => Promise<void>;
11
+ /** Cancel the current export */
12
+ cancel: () => void;
13
+ }
14
+ /**
15
+ * React hook for video export with progress tracking.
16
+ *
17
+ * Usage:
18
+ * const { isExporting, progress, startExport } = useExport();
19
+ *
20
+ * const handleExport = () => {
21
+ * const svgEl = svgRef.current;
22
+ * startExport(svgEl, setFrame, { totalFrames: 180, fps: 60, width: 1920, height: 1080 });
23
+ * };
24
+ */
25
+ export declare function useExport(): UseExportResult;
26
+ //# sourceMappingURL=useExport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExport.d.ts","sourceRoot":"","sources":["../../src/export/useExport.ts"],"names":[],"mappings":"AACA,OAAO,EAAyC,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAE1F,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,WAAW,EAAE,OAAO,CAAC;IACrB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,EAAE,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7G,gCAAgC;IAChC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,IAAI,eAAe,CAwD3C"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Video Export — captures animation frames and produces downloadable video.
3
+ *
4
+ * Renders SVG frames to Canvas → MediaRecorder → WebM/MP4.
5
+ */
6
+ export interface ExportOptions {
7
+ /** Frames per second. Default: 60 */
8
+ fps?: number;
9
+ /** Total number of frames to capture */
10
+ totalFrames: number;
11
+ /** Output width in pixels. Default: 1920 */
12
+ width?: number;
13
+ /** Output height in pixels. Default: 1080 */
14
+ height?: number;
15
+ /** Output format. Default: 'webm' */
16
+ format?: 'webm' | 'mp4';
17
+ /** Video bitrate in bits/second. Default: 5_000_000 (5 Mbps) */
18
+ bitrate?: number;
19
+ /** Progress callback: (frameIndex, totalFrames) => void */
20
+ onProgress?: (frame: number, total: number) => void;
21
+ }
22
+ /**
23
+ * Renders an SVG element to a canvas at a specific size.
24
+ */
25
+ export declare function svgToCanvas(svgElement: SVGSVGElement, width: number, height: number): Promise<HTMLCanvasElement>;
26
+ /**
27
+ * Export animation using MediaRecorder API.
28
+ * Takes a render function that updates the scene for each frame.
29
+ */
30
+ export declare function exportWithMediaRecorder(svgElement: SVGSVGElement, renderFrame: (frame: number) => void | Promise<void>, options: ExportOptions): Promise<Blob>;
31
+ /**
32
+ * Triggers a browser download of a Blob.
33
+ */
34
+ export declare function downloadBlob(blob: Blob, filename: string): void;
35
+ /**
36
+ * High-level: captures all frames and downloads as video.
37
+ */
38
+ export declare function exportAnimation(svgElement: SVGSVGElement, renderFrame: (frame: number) => void | Promise<void>, options: ExportOptions): Promise<void>;
39
+ //# sourceMappingURL=videoExport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoExport.d.ts","sourceRoot":"","sources":["../../src/export/videoExport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAwB5B;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,aAAa,EACzB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACpD,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CAqEf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAS/D;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,aAAa,EACzB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACpD,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CAIf"}
@@ -0,0 +1,3 @@
1
+ export { useCurrentFrame } from './useCurrentFrame';
2
+ export { interpolate, type InterpolateOptions } from './interpolate';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC"}