@codellyson/framely 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/AbsoluteFill.d.ts +18 -0
- package/dist/AbsoluteFill.d.ts.map +1 -0
- package/dist/AbsoluteFill.js +25 -0
- package/dist/AbsoluteFill.js.map +1 -0
- package/dist/Audio.d.ts +80 -0
- package/dist/Audio.d.ts.map +1 -0
- package/dist/Audio.js +221 -0
- package/dist/Audio.js.map +1 -0
- package/dist/Composition.d.ts +208 -0
- package/dist/Composition.d.ts.map +1 -0
- package/dist/Composition.js +210 -0
- package/dist/Composition.js.map +1 -0
- package/dist/Easing.d.ts +88 -0
- package/dist/Easing.d.ts.map +1 -0
- package/dist/Easing.js +266 -0
- package/dist/Easing.js.map +1 -0
- package/dist/ErrorBoundary.d.ts +35 -0
- package/dist/ErrorBoundary.d.ts.map +1 -0
- package/dist/ErrorBoundary.js +74 -0
- package/dist/ErrorBoundary.js.map +1 -0
- package/dist/Folder.d.ts +46 -0
- package/dist/Folder.d.ts.map +1 -0
- package/dist/Folder.js +44 -0
- package/dist/Folder.js.map +1 -0
- package/dist/Freeze.d.ts +35 -0
- package/dist/Freeze.d.ts.map +1 -0
- package/dist/Freeze.js +40 -0
- package/dist/Freeze.js.map +1 -0
- package/dist/IFrame.d.ts +28 -0
- package/dist/IFrame.d.ts.map +1 -0
- package/dist/IFrame.js +57 -0
- package/dist/IFrame.js.map +1 -0
- package/dist/Img.d.ts +36 -0
- package/dist/Img.d.ts.map +1 -0
- package/dist/Img.js +91 -0
- package/dist/Img.js.map +1 -0
- package/dist/Loop.d.ts +66 -0
- package/dist/Loop.d.ts.map +1 -0
- package/dist/Loop.js +79 -0
- package/dist/Loop.js.map +1 -0
- package/dist/Player.d.ts +118 -0
- package/dist/Player.d.ts.map +1 -0
- package/dist/Player.js +311 -0
- package/dist/Player.js.map +1 -0
- package/dist/Sequence.d.ts +25 -0
- package/dist/Sequence.d.ts.map +1 -0
- package/dist/Sequence.js +37 -0
- package/dist/Sequence.js.map +1 -0
- package/dist/Series.d.ts +52 -0
- package/dist/Series.d.ts.map +1 -0
- package/dist/Series.js +86 -0
- package/dist/Series.js.map +1 -0
- package/dist/Text.d.ts +129 -0
- package/dist/Text.d.ts.map +1 -0
- package/dist/Text.js +211 -0
- package/dist/Text.js.map +1 -0
- package/dist/Video.d.ts +75 -0
- package/dist/Video.d.ts.map +1 -0
- package/dist/Video.js +136 -0
- package/dist/Video.js.map +1 -0
- package/dist/config.d.ts +128 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +243 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +84 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +131 -0
- package/dist/context.js.map +1 -0
- package/dist/delayRender.d.ts +130 -0
- package/dist/delayRender.d.ts.map +1 -0
- package/dist/delayRender.js +197 -0
- package/dist/delayRender.js.map +1 -0
- package/dist/getInputProps.d.ts +118 -0
- package/dist/getInputProps.d.ts.map +1 -0
- package/dist/getInputProps.js +181 -0
- package/dist/getInputProps.js.map +1 -0
- package/dist/hooks/useDelayRender.d.ts +52 -0
- package/dist/hooks/useDelayRender.d.ts.map +1 -0
- package/dist/hooks/useDelayRender.js +92 -0
- package/dist/hooks/useDelayRender.js.map +1 -0
- package/dist/hooks.d.ts +19 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +17 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +65 -0
- package/dist/index.js.map +1 -0
- package/dist/interpolate.d.ts +80 -0
- package/dist/interpolate.d.ts.map +1 -0
- package/dist/interpolate.js +108 -0
- package/dist/interpolate.js.map +1 -0
- package/dist/interpolateColors.d.ts +50 -0
- package/dist/interpolateColors.d.ts.map +1 -0
- package/dist/interpolateColors.js +300 -0
- package/dist/interpolateColors.js.map +1 -0
- package/dist/makeTransform.d.ts +98 -0
- package/dist/makeTransform.d.ts.map +1 -0
- package/dist/makeTransform.js +287 -0
- package/dist/makeTransform.js.map +1 -0
- package/dist/measureSpring.d.ts +75 -0
- package/dist/measureSpring.d.ts.map +1 -0
- package/dist/measureSpring.js +108 -0
- package/dist/measureSpring.js.map +1 -0
- package/dist/noise.d.ts +110 -0
- package/dist/noise.d.ts.map +1 -0
- package/dist/noise.js +228 -0
- package/dist/noise.js.map +1 -0
- package/dist/preload.d.ts +145 -0
- package/dist/preload.d.ts.map +1 -0
- package/dist/preload.js +225 -0
- package/dist/preload.js.map +1 -0
- package/dist/registerRoot.d.ts +140 -0
- package/dist/registerRoot.d.ts.map +1 -0
- package/dist/registerRoot.js +238 -0
- package/dist/registerRoot.js.map +1 -0
- package/dist/shapes/Circle.d.ts +15 -0
- package/dist/shapes/Circle.d.ts.map +1 -0
- package/dist/shapes/Circle.js +11 -0
- package/dist/shapes/Circle.js.map +1 -0
- package/dist/shapes/Ellipse.d.ts +16 -0
- package/dist/shapes/Ellipse.d.ts.map +1 -0
- package/dist/shapes/Ellipse.js +11 -0
- package/dist/shapes/Ellipse.js.map +1 -0
- package/dist/shapes/Line.d.ts +15 -0
- package/dist/shapes/Line.d.ts.map +1 -0
- package/dist/shapes/Line.js +11 -0
- package/dist/shapes/Line.js.map +1 -0
- package/dist/shapes/Path.d.ts +20 -0
- package/dist/shapes/Path.d.ts.map +1 -0
- package/dist/shapes/Path.js +14 -0
- package/dist/shapes/Path.js.map +1 -0
- package/dist/shapes/Polygon.d.ts +15 -0
- package/dist/shapes/Polygon.d.ts.map +1 -0
- package/dist/shapes/Polygon.js +16 -0
- package/dist/shapes/Polygon.js.map +1 -0
- package/dist/shapes/Rect.d.ts +18 -0
- package/dist/shapes/Rect.d.ts.map +1 -0
- package/dist/shapes/Rect.js +11 -0
- package/dist/shapes/Rect.js.map +1 -0
- package/dist/shapes/Svg.d.ts +16 -0
- package/dist/shapes/Svg.d.ts.map +1 -0
- package/dist/shapes/Svg.js +15 -0
- package/dist/shapes/Svg.js.map +1 -0
- package/dist/shapes/index.d.ts +16 -0
- package/dist/shapes/index.d.ts.map +1 -0
- package/dist/shapes/index.js +9 -0
- package/dist/shapes/index.js.map +1 -0
- package/dist/shapes/usePathLength.d.ts +24 -0
- package/dist/shapes/usePathLength.d.ts.map +1 -0
- package/dist/shapes/usePathLength.js +32 -0
- package/dist/shapes/usePathLength.js.map +1 -0
- package/dist/staticFile.d.ts +47 -0
- package/dist/staticFile.d.ts.map +1 -0
- package/dist/staticFile.js +105 -0
- package/dist/staticFile.js.map +1 -0
- package/dist/templates/api.d.ts +26 -0
- package/dist/templates/api.d.ts.map +1 -0
- package/dist/templates/api.js +142 -0
- package/dist/templates/api.js.map +1 -0
- package/dist/templates/index.d.ts +7 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +7 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/mockData.d.ts +7 -0
- package/dist/templates/mockData.d.ts.map +1 -0
- package/dist/templates/mockData.js +262 -0
- package/dist/templates/mockData.js.map +1 -0
- package/dist/templates/types.d.ts +104 -0
- package/dist/templates/types.d.ts.map +1 -0
- package/dist/templates/types.js +16 -0
- package/dist/templates/types.js.map +1 -0
- package/dist/transitions/TransitionSeries.d.ts +127 -0
- package/dist/transitions/TransitionSeries.d.ts.map +1 -0
- package/dist/transitions/TransitionSeries.js +190 -0
- package/dist/transitions/TransitionSeries.js.map +1 -0
- package/dist/transitions/index.d.ts +52 -0
- package/dist/transitions/index.d.ts.map +1 -0
- package/dist/transitions/index.js +31 -0
- package/dist/transitions/index.js.map +1 -0
- package/dist/transitions/presets/fade.d.ts +45 -0
- package/dist/transitions/presets/fade.d.ts.map +1 -0
- package/dist/transitions/presets/fade.js +56 -0
- package/dist/transitions/presets/fade.js.map +1 -0
- package/dist/transitions/presets/flip.d.ts +99 -0
- package/dist/transitions/presets/flip.d.ts.map +1 -0
- package/dist/transitions/presets/flip.js +153 -0
- package/dist/transitions/presets/flip.js.map +1 -0
- package/dist/transitions/presets/slide.d.ts +61 -0
- package/dist/transitions/presets/slide.d.ts.map +1 -0
- package/dist/transitions/presets/slide.js +116 -0
- package/dist/transitions/presets/slide.js.map +1 -0
- package/dist/transitions/presets/wipe.d.ts +69 -0
- package/dist/transitions/presets/wipe.d.ts.map +1 -0
- package/dist/transitions/presets/wipe.js +136 -0
- package/dist/transitions/presets/wipe.js.map +1 -0
- package/dist/transitions/presets/zoom.d.ts +76 -0
- package/dist/transitions/presets/zoom.d.ts.map +1 -0
- package/dist/transitions/presets/zoom.js +110 -0
- package/dist/transitions/presets/zoom.js.map +1 -0
- package/dist/useAudioData.d.ts +112 -0
- package/dist/useAudioData.d.ts.map +1 -0
- package/dist/useAudioData.js +183 -0
- package/dist/useAudioData.js.map +1 -0
- package/dist/useSpring.d.ts +79 -0
- package/dist/useSpring.d.ts.map +1 -0
- package/dist/useSpring.js +140 -0
- package/dist/useSpring.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for a single composition.
|
|
4
|
+
*/
|
|
5
|
+
export interface CompositionConfig {
|
|
6
|
+
id: string;
|
|
7
|
+
component: React.ComponentType<any> | null;
|
|
8
|
+
lazyComponent: (() => Promise<{
|
|
9
|
+
default: React.ComponentType<any>;
|
|
10
|
+
}>) | null;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
fps: number;
|
|
14
|
+
durationInFrames: number;
|
|
15
|
+
defaultProps: Record<string, unknown>;
|
|
16
|
+
calculateMetadata?: Function;
|
|
17
|
+
schema?: unknown;
|
|
18
|
+
defaultCodec?: string;
|
|
19
|
+
folderPath: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Global registry holding the root component, compositions, and callbacks.
|
|
23
|
+
*/
|
|
24
|
+
export interface Registry {
|
|
25
|
+
rootComponent: React.ComponentType<any> | null;
|
|
26
|
+
compositions: Map<string, CompositionConfig>;
|
|
27
|
+
folders: Map<string, string>;
|
|
28
|
+
isRegistered: boolean;
|
|
29
|
+
onRegisterCallbacks: ((registry: Registry) => void)[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Tree structure representing compositions organized by folder.
|
|
33
|
+
*/
|
|
34
|
+
export interface CompositionTree {
|
|
35
|
+
compositions: string[];
|
|
36
|
+
folders: Record<string, CompositionTree>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Window augmentation for globally exposed Framely data.
|
|
40
|
+
*/
|
|
41
|
+
declare global {
|
|
42
|
+
interface Window {
|
|
43
|
+
__FRAMELY_ROOT?: React.ComponentType<any>;
|
|
44
|
+
__FRAMELY_COMPOSITIONS?: Map<string, CompositionConfig>;
|
|
45
|
+
__FRAMELY_REGISTRY?: Registry;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Register the root component that contains all compositions.
|
|
50
|
+
*
|
|
51
|
+
* This should be called once in your entry file. The root component
|
|
52
|
+
* should return one or more <Composition> components.
|
|
53
|
+
*
|
|
54
|
+
* @param RootComponent - Component containing <Composition> declarations
|
|
55
|
+
*
|
|
56
|
+
* Usage:
|
|
57
|
+
* // src/Root.tsx
|
|
58
|
+
* export const Root: React.FC = () => (
|
|
59
|
+
* <>
|
|
60
|
+
* <Composition id="intro" component={IntroVideo} ... />
|
|
61
|
+
* <Composition id="outro" component={OutroVideo} ... />
|
|
62
|
+
* </>
|
|
63
|
+
* );
|
|
64
|
+
*
|
|
65
|
+
* // src/index.tsx
|
|
66
|
+
* import { registerRoot } from './lib';
|
|
67
|
+
* import { Root } from './Root';
|
|
68
|
+
* registerRoot(Root);
|
|
69
|
+
*/
|
|
70
|
+
export declare function registerRoot(RootComponent: React.ComponentType<any>): void;
|
|
71
|
+
/**
|
|
72
|
+
* Register root component asynchronously.
|
|
73
|
+
*
|
|
74
|
+
* Useful for dynamic imports or when you need to load WASM/data first.
|
|
75
|
+
*
|
|
76
|
+
* @param loader - Async function returning the root component
|
|
77
|
+
*
|
|
78
|
+
* Usage:
|
|
79
|
+
* registerRootAsync(async () => {
|
|
80
|
+
* await initWasm();
|
|
81
|
+
* const { Root } = await import('./Root');
|
|
82
|
+
* return Root;
|
|
83
|
+
* });
|
|
84
|
+
*/
|
|
85
|
+
export declare function registerRootAsync(loader: () => Promise<React.ComponentType<any>>): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Get the registered root component.
|
|
88
|
+
*
|
|
89
|
+
* @returns The registered root component or null if not registered
|
|
90
|
+
*/
|
|
91
|
+
export declare function getRoot(): React.ComponentType<any> | null;
|
|
92
|
+
/**
|
|
93
|
+
* Get all registered compositions.
|
|
94
|
+
*
|
|
95
|
+
* @returns Map of composition ID to composition config
|
|
96
|
+
*/
|
|
97
|
+
export declare function getCompositions(): Map<string, CompositionConfig>;
|
|
98
|
+
/**
|
|
99
|
+
* Get a specific composition by ID.
|
|
100
|
+
*
|
|
101
|
+
* @param id - Composition ID
|
|
102
|
+
* @returns Composition config or undefined
|
|
103
|
+
*/
|
|
104
|
+
export declare function getComposition(id: string): CompositionConfig | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Get composition IDs grouped by folder.
|
|
107
|
+
*
|
|
108
|
+
* @returns Tree structure of folders and compositions
|
|
109
|
+
*/
|
|
110
|
+
export declare function getCompositionTree(): CompositionTree;
|
|
111
|
+
/**
|
|
112
|
+
* Check if registerRoot has been called.
|
|
113
|
+
*
|
|
114
|
+
* @returns Whether the root has been registered
|
|
115
|
+
*/
|
|
116
|
+
export declare function isRootRegistered(): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Register a callback to be called when registerRoot is invoked.
|
|
119
|
+
*
|
|
120
|
+
* @param callback - Called with the registry object
|
|
121
|
+
* @returns Unsubscribe function
|
|
122
|
+
*/
|
|
123
|
+
export declare function onRootRegistered(callback: (registry: Registry) => void): () => void;
|
|
124
|
+
/**
|
|
125
|
+
* Clear the registry (mainly for testing).
|
|
126
|
+
*/
|
|
127
|
+
export declare function clearRegistry(): void;
|
|
128
|
+
declare const _default: {
|
|
129
|
+
registerRoot: typeof registerRoot;
|
|
130
|
+
registerRootAsync: typeof registerRootAsync;
|
|
131
|
+
getRoot: typeof getRoot;
|
|
132
|
+
getCompositions: typeof getCompositions;
|
|
133
|
+
getComposition: typeof getComposition;
|
|
134
|
+
getCompositionTree: typeof getCompositionTree;
|
|
135
|
+
isRootRegistered: typeof isRootRegistered;
|
|
136
|
+
onRootRegistered: typeof onRootRegistered;
|
|
137
|
+
clearRegistry: typeof clearRegistry;
|
|
138
|
+
};
|
|
139
|
+
export default _default;
|
|
140
|
+
//# sourceMappingURL=registerRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerRoot.d.ts","sourceRoot":"","sources":["../src/registerRoot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,aAAa,EAAE,CAAC,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;KAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,QAA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EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAExE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAmBpD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GACrC,MAAM,IAAI,CAcZ;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAYpC;;;;;;;;;;;;AAED,wBAUE"}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { Children, isValidElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Global registry for the root component and compositions.
|
|
4
|
+
*/
|
|
5
|
+
const registry = {
|
|
6
|
+
rootComponent: null,
|
|
7
|
+
compositions: new Map(),
|
|
8
|
+
folders: new Map(),
|
|
9
|
+
isRegistered: false,
|
|
10
|
+
onRegisterCallbacks: [],
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Register the root component that contains all compositions.
|
|
14
|
+
*
|
|
15
|
+
* This should be called once in your entry file. The root component
|
|
16
|
+
* should return one or more <Composition> components.
|
|
17
|
+
*
|
|
18
|
+
* @param RootComponent - Component containing <Composition> declarations
|
|
19
|
+
*
|
|
20
|
+
* Usage:
|
|
21
|
+
* // src/Root.tsx
|
|
22
|
+
* export const Root: React.FC = () => (
|
|
23
|
+
* <>
|
|
24
|
+
* <Composition id="intro" component={IntroVideo} ... />
|
|
25
|
+
* <Composition id="outro" component={OutroVideo} ... />
|
|
26
|
+
* </>
|
|
27
|
+
* );
|
|
28
|
+
*
|
|
29
|
+
* // src/index.tsx
|
|
30
|
+
* import { registerRoot } from './lib';
|
|
31
|
+
* import { Root } from './Root';
|
|
32
|
+
* registerRoot(Root);
|
|
33
|
+
*/
|
|
34
|
+
export function registerRoot(RootComponent) {
|
|
35
|
+
if (registry.isRegistered) {
|
|
36
|
+
console.warn('registerRoot() called multiple times. Only the first call takes effect.');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
registry.rootComponent = RootComponent;
|
|
40
|
+
registry.isRegistered = true;
|
|
41
|
+
// Extract compositions from the root component
|
|
42
|
+
extractCompositions(RootComponent);
|
|
43
|
+
// Expose globally for the renderer
|
|
44
|
+
if (typeof window !== 'undefined') {
|
|
45
|
+
window.__FRAMELY_ROOT = RootComponent;
|
|
46
|
+
window.__FRAMELY_COMPOSITIONS = registry.compositions;
|
|
47
|
+
window.__FRAMELY_REGISTRY = registry;
|
|
48
|
+
}
|
|
49
|
+
// Notify any listeners
|
|
50
|
+
registry.onRegisterCallbacks.forEach((cb) => cb(registry));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Register root component asynchronously.
|
|
54
|
+
*
|
|
55
|
+
* Useful for dynamic imports or when you need to load WASM/data first.
|
|
56
|
+
*
|
|
57
|
+
* @param loader - Async function returning the root component
|
|
58
|
+
*
|
|
59
|
+
* Usage:
|
|
60
|
+
* registerRootAsync(async () => {
|
|
61
|
+
* await initWasm();
|
|
62
|
+
* const { Root } = await import('./Root');
|
|
63
|
+
* return Root;
|
|
64
|
+
* });
|
|
65
|
+
*/
|
|
66
|
+
export async function registerRootAsync(loader) {
|
|
67
|
+
const RootComponent = await loader();
|
|
68
|
+
registerRoot(RootComponent);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Extract composition definitions from a root component.
|
|
72
|
+
*
|
|
73
|
+
* This traverses the component tree and collects all <Composition> elements.
|
|
74
|
+
*/
|
|
75
|
+
function extractCompositions(RootComponent) {
|
|
76
|
+
try {
|
|
77
|
+
// Create an element and traverse its children
|
|
78
|
+
const element = typeof RootComponent === 'function'
|
|
79
|
+
? RootComponent({})
|
|
80
|
+
: RootComponent;
|
|
81
|
+
if (!element)
|
|
82
|
+
return;
|
|
83
|
+
traverseElement(element, []);
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
console.warn('Could not extract compositions:', err);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Recursively traverse React elements to find Composition components.
|
|
91
|
+
*/
|
|
92
|
+
function traverseElement(element, folderPath) {
|
|
93
|
+
if (!isValidElement(element))
|
|
94
|
+
return;
|
|
95
|
+
const { type, props } = element;
|
|
96
|
+
const typeName = type?.displayName ||
|
|
97
|
+
type?.name ||
|
|
98
|
+
'';
|
|
99
|
+
// Check if this is a Composition
|
|
100
|
+
if (typeName === 'Composition' || props?.id) {
|
|
101
|
+
if (props.id && (props.component || props.lazyComponent)) {
|
|
102
|
+
const composition = {
|
|
103
|
+
id: props.id,
|
|
104
|
+
component: props.component ?? null,
|
|
105
|
+
lazyComponent: props.lazyComponent ?? null,
|
|
106
|
+
width: props.width ?? 1920,
|
|
107
|
+
height: props.height ?? 1080,
|
|
108
|
+
fps: props.fps ?? 30,
|
|
109
|
+
durationInFrames: props.durationInFrames ?? 300,
|
|
110
|
+
defaultProps: props.defaultProps ?? {},
|
|
111
|
+
calculateMetadata: props.calculateMetadata,
|
|
112
|
+
schema: props.schema,
|
|
113
|
+
defaultCodec: props.defaultCodec,
|
|
114
|
+
folderPath: [...folderPath],
|
|
115
|
+
};
|
|
116
|
+
registry.compositions.set(props.id, composition);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Check if this is a Folder
|
|
120
|
+
if (typeName === 'Folder' && props.name) {
|
|
121
|
+
const newPath = [...folderPath, props.name];
|
|
122
|
+
registry.folders.set(newPath.join('/'), props.name);
|
|
123
|
+
// Traverse children with updated folder path
|
|
124
|
+
Children.forEach(props.children, (child) => {
|
|
125
|
+
traverseElement(child, newPath);
|
|
126
|
+
});
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
// Traverse children
|
|
130
|
+
if (props?.children) {
|
|
131
|
+
Children.forEach(props.children, (child) => {
|
|
132
|
+
traverseElement(child, folderPath);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get the registered root component.
|
|
138
|
+
*
|
|
139
|
+
* @returns The registered root component or null if not registered
|
|
140
|
+
*/
|
|
141
|
+
export function getRoot() {
|
|
142
|
+
return registry.rootComponent;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get all registered compositions.
|
|
146
|
+
*
|
|
147
|
+
* @returns Map of composition ID to composition config
|
|
148
|
+
*/
|
|
149
|
+
export function getCompositions() {
|
|
150
|
+
return registry.compositions;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get a specific composition by ID.
|
|
154
|
+
*
|
|
155
|
+
* @param id - Composition ID
|
|
156
|
+
* @returns Composition config or undefined
|
|
157
|
+
*/
|
|
158
|
+
export function getComposition(id) {
|
|
159
|
+
return registry.compositions.get(id);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get composition IDs grouped by folder.
|
|
163
|
+
*
|
|
164
|
+
* @returns Tree structure of folders and compositions
|
|
165
|
+
*/
|
|
166
|
+
export function getCompositionTree() {
|
|
167
|
+
const tree = { compositions: [], folders: {} };
|
|
168
|
+
for (const [id, comp] of registry.compositions) {
|
|
169
|
+
if (comp.folderPath.length === 0) {
|
|
170
|
+
tree.compositions.push(id);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
let current = tree;
|
|
174
|
+
for (const folder of comp.folderPath) {
|
|
175
|
+
if (!current.folders[folder]) {
|
|
176
|
+
current.folders[folder] = { compositions: [], folders: {} };
|
|
177
|
+
}
|
|
178
|
+
current = current.folders[folder];
|
|
179
|
+
}
|
|
180
|
+
current.compositions.push(id);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return tree;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Check if registerRoot has been called.
|
|
187
|
+
*
|
|
188
|
+
* @returns Whether the root has been registered
|
|
189
|
+
*/
|
|
190
|
+
export function isRootRegistered() {
|
|
191
|
+
return registry.isRegistered;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Register a callback to be called when registerRoot is invoked.
|
|
195
|
+
*
|
|
196
|
+
* @param callback - Called with the registry object
|
|
197
|
+
* @returns Unsubscribe function
|
|
198
|
+
*/
|
|
199
|
+
export function onRootRegistered(callback) {
|
|
200
|
+
// If already registered, call immediately
|
|
201
|
+
if (registry.isRegistered) {
|
|
202
|
+
callback(registry);
|
|
203
|
+
}
|
|
204
|
+
registry.onRegisterCallbacks.push(callback);
|
|
205
|
+
return () => {
|
|
206
|
+
const index = registry.onRegisterCallbacks.indexOf(callback);
|
|
207
|
+
if (index > -1) {
|
|
208
|
+
registry.onRegisterCallbacks.splice(index, 1);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Clear the registry (mainly for testing).
|
|
214
|
+
*/
|
|
215
|
+
export function clearRegistry() {
|
|
216
|
+
registry.rootComponent = null;
|
|
217
|
+
registry.compositions.clear();
|
|
218
|
+
registry.folders.clear();
|
|
219
|
+
registry.isRegistered = false;
|
|
220
|
+
registry.onRegisterCallbacks = [];
|
|
221
|
+
if (typeof window !== 'undefined') {
|
|
222
|
+
delete window.__FRAMELY_ROOT;
|
|
223
|
+
delete window.__FRAMELY_COMPOSITIONS;
|
|
224
|
+
delete window.__FRAMELY_REGISTRY;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
export default {
|
|
228
|
+
registerRoot,
|
|
229
|
+
registerRootAsync,
|
|
230
|
+
getRoot,
|
|
231
|
+
getCompositions,
|
|
232
|
+
getComposition,
|
|
233
|
+
getCompositionTree,
|
|
234
|
+
isRootRegistered,
|
|
235
|
+
onRootRegistered,
|
|
236
|
+
clearRegistry,
|
|
237
|
+
};
|
|
238
|
+
//# sourceMappingURL=registerRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerRoot.js","sourceRoot":"","sources":["../src/registerRoot.ts"],"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Q,CAAC,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrE,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;YACf,QAAQ,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACzB,QAAQ,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,QAAQ,CAAC,mBAAmB,GAAG,EAAE,CAAC;IAElC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,cAAc,CAAC;QAC7B,OAAO,MAAM,CAAC,sBAAsB,CAAC;QACrC,OAAO,MAAM,CAAC,kBAAkB,CAAC;IACnC,CAAC;AACH,CAAC;AAED,eAAe;IACb,YAAY;IACZ,iBAAiB;IACjB,OAAO;IACP,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;CACd,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG Circle with animation-friendly props.
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface CircleProps extends React.SVGAttributes<SVGCircleElement> {
|
|
6
|
+
cx?: number | string;
|
|
7
|
+
cy?: number | string;
|
|
8
|
+
r?: number | string;
|
|
9
|
+
fill?: string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
strokeWidth?: number | string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Circle: React.ForwardRefExoticComponent<CircleProps & React.RefAttributes<SVGCircleElement>>;
|
|
14
|
+
export default Circle;
|
|
15
|
+
//# sourceMappingURL=Circle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../src/shapes/Circle.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC;IACxE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,MAAM,sFAkBjB,CAAC;AAGH,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* SVG Circle with animation-friendly props.
|
|
4
|
+
*/
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
export const Circle = forwardRef(function Circle({ cx, cy, r, fill = 'none', stroke, strokeWidth = 1, opacity, style, ...props }, ref) {
|
|
7
|
+
return (_jsx("circle", { ref: ref, cx: cx, cy: cy, r: r, fill: fill, stroke: stroke, strokeWidth: strokeWidth, opacity: opacity, style: style, ...props }));
|
|
8
|
+
});
|
|
9
|
+
Circle.displayName = 'Circle';
|
|
10
|
+
export default Circle;
|
|
11
|
+
//# sourceMappingURL=Circle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Circle.js","sourceRoot":"","sources":["../../src/shapes/Circle.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAW1C,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAgC,SAAS,MAAM,CAC7E,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAC/E,GAAG;IAEH,OAAO,CACL,iBACE,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,CAAC,EAAE,CAAC,EACJ,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAC9B,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG Ellipse with animation-friendly props.
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface EllipseProps extends React.SVGAttributes<SVGEllipseElement> {
|
|
6
|
+
cx?: number | string;
|
|
7
|
+
cy?: number | string;
|
|
8
|
+
rx?: number | string;
|
|
9
|
+
ry?: number | string;
|
|
10
|
+
fill?: string;
|
|
11
|
+
stroke?: string;
|
|
12
|
+
strokeWidth?: number | string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Ellipse: React.ForwardRefExoticComponent<EllipseProps & React.RefAttributes<SVGEllipseElement>>;
|
|
15
|
+
export default Ellipse;
|
|
16
|
+
//# sourceMappingURL=Ellipse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ellipse.d.ts","sourceRoot":"","sources":["../../src/shapes/Ellipse.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC;IAC1E,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,OAAO,wFAmBlB,CAAC;AAGH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* SVG Ellipse with animation-friendly props.
|
|
4
|
+
*/
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
export const Ellipse = forwardRef(function Ellipse({ cx, cy, rx, ry, fill = 'none', stroke, strokeWidth = 1, opacity, style, ...props }, ref) {
|
|
7
|
+
return (_jsx("ellipse", { ref: ref, cx: cx, cy: cy, rx: rx, ry: ry, fill: fill, stroke: stroke, strokeWidth: strokeWidth, opacity: opacity, style: style, ...props }));
|
|
8
|
+
});
|
|
9
|
+
Ellipse.displayName = 'Ellipse';
|
|
10
|
+
export default Ellipse;
|
|
11
|
+
//# sourceMappingURL=Ellipse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ellipse.js","sourceRoot":"","sources":["../../src/shapes/Ellipse.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAY1C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAkC,SAAS,OAAO,CACjF,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EACpF,GAAG;IAEH,OAAO,CACL,kBACE,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAChC,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG Line with animation-friendly props.
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface LineProps extends React.SVGAttributes<SVGLineElement> {
|
|
6
|
+
x1?: number | string;
|
|
7
|
+
y1?: number | string;
|
|
8
|
+
x2?: number | string;
|
|
9
|
+
y2?: number | string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
strokeWidth?: number | string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Line: React.ForwardRefExoticComponent<LineProps & React.RefAttributes<SVGLineElement>>;
|
|
14
|
+
export default Line;
|
|
15
|
+
//# sourceMappingURL=Line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../src/shapes/Line.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;IACpE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,IAAI,kFAkBf,CAAC;AAGH,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* SVG Line with animation-friendly props.
|
|
4
|
+
*/
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
export const Line = forwardRef(function Line({ x1, y1, x2, y2, stroke = 'white', strokeWidth = 1, opacity, style, ...props }, ref) {
|
|
7
|
+
return (_jsx("line", { ref: ref, x1: x1, y1: y1, x2: x2, y2: y2, stroke: stroke, strokeWidth: strokeWidth, opacity: opacity, style: style, ...props }));
|
|
8
|
+
});
|
|
9
|
+
Line.displayName = 'Line';
|
|
10
|
+
export default Line;
|
|
11
|
+
//# sourceMappingURL=Line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Line.js","sourceRoot":"","sources":["../../src/shapes/Line.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAW1C,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAA4B,SAAS,IAAI,CACrE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAC/E,GAAG;IAEH,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAC1B,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG Path with draw-on animation support.
|
|
3
|
+
*
|
|
4
|
+
* Use strokeDasharray + strokeDashoffset with interpolate() for draw-on effects.
|
|
5
|
+
* Use usePathLength() to get the total path length for dash calculations.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export interface PathProps extends React.SVGAttributes<SVGPathElement> {
|
|
9
|
+
d?: string;
|
|
10
|
+
fill?: string;
|
|
11
|
+
stroke?: string;
|
|
12
|
+
strokeWidth?: number | string;
|
|
13
|
+
strokeDasharray?: string | number;
|
|
14
|
+
strokeDashoffset?: string | number;
|
|
15
|
+
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
|
|
16
|
+
strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit';
|
|
17
|
+
}
|
|
18
|
+
export declare const Path: React.ForwardRefExoticComponent<PathProps & React.RefAttributes<SVGPathElement>>;
|
|
19
|
+
export default Path;
|
|
20
|
+
//# sourceMappingURL=Path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../../src/shapes/Path.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;IACpE,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxD,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;CAC1D;AAED,eAAO,MAAM,IAAI,kFAgCf,CAAC;AAGH,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* SVG Path with draw-on animation support.
|
|
4
|
+
*
|
|
5
|
+
* Use strokeDasharray + strokeDashoffset with interpolate() for draw-on effects.
|
|
6
|
+
* Use usePathLength() to get the total path length for dash calculations.
|
|
7
|
+
*/
|
|
8
|
+
import { forwardRef } from 'react';
|
|
9
|
+
export const Path = forwardRef(function Path({ d, fill = 'none', stroke = 'white', strokeWidth = 2, strokeDasharray, strokeDashoffset, strokeLinecap = 'round', strokeLinejoin = 'round', opacity, style, ...props }, ref) {
|
|
10
|
+
return (_jsx("path", { ref: ref, d: d, fill: fill, stroke: stroke, strokeWidth: strokeWidth, strokeDasharray: strokeDasharray, strokeDashoffset: strokeDashoffset, strokeLinecap: strokeLinecap, strokeLinejoin: strokeLinejoin, opacity: opacity, style: style, ...props }));
|
|
11
|
+
});
|
|
12
|
+
Path.displayName = 'Path';
|
|
13
|
+
export default Path;
|
|
14
|
+
//# sourceMappingURL=Path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Path.js","sourceRoot":"","sources":["../../src/shapes/Path.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAa1C,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAA4B,SAAS,IAAI,CACrE,EACE,CAAC,EACD,IAAI,GAAG,MAAM,EACb,MAAM,GAAG,OAAO,EAChB,WAAW,GAAG,CAAC,EACf,eAAe,EACf,gBAAgB,EAChB,aAAa,GAAG,OAAO,EACvB,cAAc,GAAG,OAAO,EACxB,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EACD,GAAG;IAEH,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,CAAC,EAAE,CAAC,EACJ,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAC1B,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG Polygon with animation-friendly props.
|
|
3
|
+
*
|
|
4
|
+
* @param points - SVG points string or array of [x, y] pairs
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export interface PolygonProps extends Omit<React.SVGAttributes<SVGPolygonElement>, 'points'> {
|
|
8
|
+
points?: string | Array<[number, number]>;
|
|
9
|
+
fill?: string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
strokeWidth?: number | string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Polygon: React.ForwardRefExoticComponent<PolygonProps & React.RefAttributes<SVGPolygonElement>>;
|
|
14
|
+
export default Polygon;
|
|
15
|
+
//# sourceMappingURL=Polygon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.d.ts","sourceRoot":"","sources":["../../src/shapes/Polygon.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC1F,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,OAAO,wFAoBlB,CAAC;AAGH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* SVG Polygon with animation-friendly props.
|
|
4
|
+
*
|
|
5
|
+
* @param points - SVG points string or array of [x, y] pairs
|
|
6
|
+
*/
|
|
7
|
+
import { forwardRef } from 'react';
|
|
8
|
+
export const Polygon = forwardRef(function Polygon({ points, fill = 'none', stroke = 'white', strokeWidth = 1, opacity, style, ...props }, ref) {
|
|
9
|
+
const pointsStr = Array.isArray(points)
|
|
10
|
+
? points.map(([x, y]) => `${x},${y}`).join(' ')
|
|
11
|
+
: points;
|
|
12
|
+
return (_jsx("polygon", { ref: ref, points: pointsStr, fill: fill, stroke: stroke, strokeWidth: strokeWidth, opacity: opacity, style: style, ...props }));
|
|
13
|
+
});
|
|
14
|
+
Polygon.displayName = 'Polygon';
|
|
15
|
+
export default Polygon;
|
|
16
|
+
//# sourceMappingURL=Polygon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.js","sourceRoot":"","sources":["../../src/shapes/Polygon.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAS1C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAkC,SAAS,OAAO,CACjF,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,GAAG,OAAO,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EACtF,GAAG;IAEH,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACrC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC/C,CAAC,CAAC,MAAM,CAAC;IAEX,OAAO,CACL,kBACE,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAChC,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG Rectangle with animation-friendly props.
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface RectProps extends React.SVGAttributes<SVGRectElement> {
|
|
6
|
+
x?: number | string;
|
|
7
|
+
y?: number | string;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
height?: number | string;
|
|
10
|
+
rx?: number | string;
|
|
11
|
+
ry?: number | string;
|
|
12
|
+
fill?: string;
|
|
13
|
+
stroke?: string;
|
|
14
|
+
strokeWidth?: number | string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Rect: React.ForwardRefExoticComponent<RectProps & React.RefAttributes<SVGRectElement>>;
|
|
17
|
+
export default Rect;
|
|
18
|
+
//# sourceMappingURL=Rect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rect.d.ts","sourceRoot":"","sources":["../../src/shapes/Rect.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;IACpE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,IAAI,kFAqBf,CAAC;AAGH,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* SVG Rectangle with animation-friendly props.
|
|
4
|
+
*/
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
export const Rect = forwardRef(function Rect({ x = 0, y = 0, width, height, rx, ry, fill = 'none', stroke, strokeWidth = 1, opacity, style, ...props }, ref) {
|
|
7
|
+
return (_jsx("rect", { ref: ref, x: x, y: y, width: width, height: height, rx: rx, ry: ry, fill: fill, stroke: stroke, strokeWidth: strokeWidth, opacity: opacity, style: style, ...props }));
|
|
8
|
+
});
|
|
9
|
+
Rect.displayName = 'Rect';
|
|
10
|
+
export default Rect;
|
|
11
|
+
//# sourceMappingURL=Rect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rect.js","sourceRoot":"","sources":["../../src/shapes/Rect.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAc1C,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAA4B,SAAS,IAAI,CACrE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EACzG,GAAG;IAEH,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAC1B,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG container that sizes to the composition viewport.
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface SvgProps extends React.SVGAttributes<SVGSVGElement> {
|
|
6
|
+
width?: number | string;
|
|
7
|
+
height?: number | string;
|
|
8
|
+
viewBox?: string;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function Svg({ children, viewBox, style, ...props }: SvgProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace Svg {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export default Svg;
|
|
16
|
+
//# sourceMappingURL=Svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../src/shapes/Svg.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,2CAqBnE;yBArBe,GAAG;;;AAwBnB,eAAe,GAAG,CAAC"}
|