@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,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTimeline } from '../context';
|
|
3
|
+
export function Svg({ children, viewBox, style, ...props }) {
|
|
4
|
+
const { width, height } = useTimeline();
|
|
5
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox || `0 0 ${width} ${height}`, width: width, height: height, style: {
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
top: 0,
|
|
8
|
+
left: 0,
|
|
9
|
+
overflow: 'visible',
|
|
10
|
+
...style,
|
|
11
|
+
}, ...props, children: children }));
|
|
12
|
+
}
|
|
13
|
+
Svg.displayName = 'Svg';
|
|
14
|
+
export default Svg;
|
|
15
|
+
//# sourceMappingURL=Svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Svg.js","sourceRoot":"","sources":["../../src/shapes/Svg.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASzC,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAY;IAClE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAExC,OAAO,CACL,cACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,OAAO,IAAI,OAAO,KAAK,IAAI,MAAM,EAAE,EAC5C,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,SAAS;YACnB,GAAG,KAAK;SACT,KACG,KAAK,YAER,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAED,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC;AACxB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { Svg } from './Svg';
|
|
2
|
+
export { Circle } from './Circle';
|
|
3
|
+
export { Rect } from './Rect';
|
|
4
|
+
export { Ellipse } from './Ellipse';
|
|
5
|
+
export { Line } from './Line';
|
|
6
|
+
export { Path } from './Path';
|
|
7
|
+
export { Polygon } from './Polygon';
|
|
8
|
+
export { usePathLength } from './usePathLength';
|
|
9
|
+
export type { SvgProps } from './Svg';
|
|
10
|
+
export type { CircleProps } from './Circle';
|
|
11
|
+
export type { RectProps } from './Rect';
|
|
12
|
+
export type { EllipseProps } from './Ellipse';
|
|
13
|
+
export type { LineProps } from './Line';
|
|
14
|
+
export type { PathProps } from './Path';
|
|
15
|
+
export type { PolygonProps } from './Polygon';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shapes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Svg } from './Svg';
|
|
2
|
+
export { Circle } from './Circle';
|
|
3
|
+
export { Rect } from './Rect';
|
|
4
|
+
export { Ellipse } from './Ellipse';
|
|
5
|
+
export { Line } from './Line';
|
|
6
|
+
export { Path } from './Path';
|
|
7
|
+
export { Polygon } from './Polygon';
|
|
8
|
+
export { usePathLength } from './usePathLength';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shapes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* usePathLength Hook
|
|
3
|
+
*
|
|
4
|
+
* Returns the total length of an SVG path element.
|
|
5
|
+
* Useful for draw-on animations with strokeDasharray/strokeDashoffset.
|
|
6
|
+
*
|
|
7
|
+
* @param ref - Ref to an SVG geometry element (path, circle, rect, etc.)
|
|
8
|
+
* @returns Total path length (0 if ref is not yet mounted)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const pathRef = useRef<SVGPathElement>(null);
|
|
12
|
+
* const length = usePathLength(pathRef);
|
|
13
|
+
*
|
|
14
|
+
* <Path
|
|
15
|
+
* ref={pathRef}
|
|
16
|
+
* d="M10 80 Q 95 10 180 80"
|
|
17
|
+
* strokeDasharray={length}
|
|
18
|
+
* strokeDashoffset={interpolate(frame, [0, 60], [length, 0])}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
export declare function usePathLength(ref: React.RefObject<SVGGeometryElement | null>): number;
|
|
23
|
+
export default usePathLength;
|
|
24
|
+
//# sourceMappingURL=usePathLength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePathLength.d.ts","sourceRoot":"","sources":["../../src/shapes/usePathLength.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,wBAAgB,aAAa,CAC3B,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAC9C,MAAM,CAUR;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* usePathLength Hook
|
|
3
|
+
*
|
|
4
|
+
* Returns the total length of an SVG path element.
|
|
5
|
+
* Useful for draw-on animations with strokeDasharray/strokeDashoffset.
|
|
6
|
+
*
|
|
7
|
+
* @param ref - Ref to an SVG geometry element (path, circle, rect, etc.)
|
|
8
|
+
* @returns Total path length (0 if ref is not yet mounted)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const pathRef = useRef<SVGPathElement>(null);
|
|
12
|
+
* const length = usePathLength(pathRef);
|
|
13
|
+
*
|
|
14
|
+
* <Path
|
|
15
|
+
* ref={pathRef}
|
|
16
|
+
* d="M10 80 Q 95 10 180 80"
|
|
17
|
+
* strokeDasharray={length}
|
|
18
|
+
* strokeDashoffset={interpolate(frame, [0, 60], [length, 0])}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
import { useState, useEffect } from 'react';
|
|
22
|
+
export function usePathLength(ref) {
|
|
23
|
+
const [length, setLength] = useState(0);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (ref.current && typeof ref.current.getTotalLength === 'function') {
|
|
26
|
+
setLength(ref.current.getTotalLength());
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return length;
|
|
30
|
+
}
|
|
31
|
+
export default usePathLength;
|
|
32
|
+
//# sourceMappingURL=usePathLength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePathLength.js","sourceRoot":"","sources":["../../src/shapes/usePathLength.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,UAAU,aAAa,CAC3B,GAA+C;IAE/C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,GAAG,CAAC,OAAO,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,KAAK,UAAU,EAAE,CAAC;YACpE,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the URL for a static file in the public directory.
|
|
3
|
+
*
|
|
4
|
+
* In Vite, files in the `public/` folder are served at the root URL.
|
|
5
|
+
* This function ensures consistent path resolution across dev and production.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} path - Relative path from the public folder (e.g., 'images/logo.png')
|
|
8
|
+
* @returns {string} The full URL to the asset
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* <Img src={staticFile('images/hero.png')} />
|
|
12
|
+
* <Video src={staticFile('videos/intro.mp4')} />
|
|
13
|
+
* <Audio src={staticFile('audio/background.mp3')} />
|
|
14
|
+
*
|
|
15
|
+
* Directory structure:
|
|
16
|
+
* public/
|
|
17
|
+
* images/
|
|
18
|
+
* hero.png → staticFile('images/hero.png')
|
|
19
|
+
* videos/
|
|
20
|
+
* intro.mp4 → staticFile('videos/intro.mp4')
|
|
21
|
+
* fonts/
|
|
22
|
+
* custom.woff2 → staticFile('fonts/custom.woff2')
|
|
23
|
+
*/
|
|
24
|
+
export declare function staticFile(path: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Check if a URL is a static file path (from public folder).
|
|
27
|
+
*
|
|
28
|
+
* @param {string} url - URL to check
|
|
29
|
+
* @returns {boolean}
|
|
30
|
+
*/
|
|
31
|
+
export declare function isStaticFile(url: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get the file extension from a path.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} path - File path
|
|
36
|
+
* @returns {string} Lowercase extension without dot, or empty string
|
|
37
|
+
*/
|
|
38
|
+
export declare function getFileExtension(path: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Determine the MIME type from a file path.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} path - File path
|
|
43
|
+
* @returns {string|null} MIME type or null if unknown
|
|
44
|
+
*/
|
|
45
|
+
export declare function getMimeType(path: string): string | null;
|
|
46
|
+
export default staticFile;
|
|
47
|
+
//# sourceMappingURL=staticFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staticFile.d.ts","sourceRoot":"","sources":["../src/staticFile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgB/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAKjD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0CvD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the URL for a static file in the public directory.
|
|
3
|
+
*
|
|
4
|
+
* In Vite, files in the `public/` folder are served at the root URL.
|
|
5
|
+
* This function ensures consistent path resolution across dev and production.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} path - Relative path from the public folder (e.g., 'images/logo.png')
|
|
8
|
+
* @returns {string} The full URL to the asset
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* <Img src={staticFile('images/hero.png')} />
|
|
12
|
+
* <Video src={staticFile('videos/intro.mp4')} />
|
|
13
|
+
* <Audio src={staticFile('audio/background.mp3')} />
|
|
14
|
+
*
|
|
15
|
+
* Directory structure:
|
|
16
|
+
* public/
|
|
17
|
+
* images/
|
|
18
|
+
* hero.png → staticFile('images/hero.png')
|
|
19
|
+
* videos/
|
|
20
|
+
* intro.mp4 → staticFile('videos/intro.mp4')
|
|
21
|
+
* fonts/
|
|
22
|
+
* custom.woff2 → staticFile('fonts/custom.woff2')
|
|
23
|
+
*/
|
|
24
|
+
export function staticFile(path) {
|
|
25
|
+
if (!path) {
|
|
26
|
+
throw new Error('staticFile() requires a path argument');
|
|
27
|
+
}
|
|
28
|
+
// Remove leading slash if present (normalize input)
|
|
29
|
+
const normalizedPath = path.startsWith('/') ? path.slice(1) : path;
|
|
30
|
+
// In Vite, public files are served from the root
|
|
31
|
+
// The base URL can be configured in vite.config.js
|
|
32
|
+
const base = import.meta.env?.BASE_URL || '/';
|
|
33
|
+
// Construct the full URL
|
|
34
|
+
const url = `${base}${normalizedPath}`;
|
|
35
|
+
return url;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a URL is a static file path (from public folder).
|
|
39
|
+
*
|
|
40
|
+
* @param {string} url - URL to check
|
|
41
|
+
* @returns {boolean}
|
|
42
|
+
*/
|
|
43
|
+
export function isStaticFile(url) {
|
|
44
|
+
if (!url || typeof url !== 'string')
|
|
45
|
+
return false;
|
|
46
|
+
// Check if it's a relative path (not http/https/data/blob)
|
|
47
|
+
return !url.match(/^(https?|data|blob):/i);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get the file extension from a path.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} path - File path
|
|
53
|
+
* @returns {string} Lowercase extension without dot, or empty string
|
|
54
|
+
*/
|
|
55
|
+
export function getFileExtension(path) {
|
|
56
|
+
if (!path || typeof path !== 'string')
|
|
57
|
+
return '';
|
|
58
|
+
const match = path.match(/\.([^.]+)$/);
|
|
59
|
+
return match ? match[1].toLowerCase() : '';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Determine the MIME type from a file path.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} path - File path
|
|
65
|
+
* @returns {string|null} MIME type or null if unknown
|
|
66
|
+
*/
|
|
67
|
+
export function getMimeType(path) {
|
|
68
|
+
const ext = getFileExtension(path);
|
|
69
|
+
const mimeTypes = {
|
|
70
|
+
// Images
|
|
71
|
+
png: 'image/png',
|
|
72
|
+
jpg: 'image/jpeg',
|
|
73
|
+
jpeg: 'image/jpeg',
|
|
74
|
+
gif: 'image/gif',
|
|
75
|
+
webp: 'image/webp',
|
|
76
|
+
svg: 'image/svg+xml',
|
|
77
|
+
ico: 'image/x-icon',
|
|
78
|
+
avif: 'image/avif',
|
|
79
|
+
// Video
|
|
80
|
+
mp4: 'video/mp4',
|
|
81
|
+
webm: 'video/webm',
|
|
82
|
+
mov: 'video/quicktime',
|
|
83
|
+
avi: 'video/x-msvideo',
|
|
84
|
+
mkv: 'video/x-matroska',
|
|
85
|
+
// Audio
|
|
86
|
+
mp3: 'audio/mpeg',
|
|
87
|
+
wav: 'audio/wav',
|
|
88
|
+
ogg: 'audio/ogg',
|
|
89
|
+
aac: 'audio/aac',
|
|
90
|
+
flac: 'audio/flac',
|
|
91
|
+
m4a: 'audio/mp4',
|
|
92
|
+
// Fonts
|
|
93
|
+
woff: 'font/woff',
|
|
94
|
+
woff2: 'font/woff2',
|
|
95
|
+
ttf: 'font/ttf',
|
|
96
|
+
otf: 'font/otf',
|
|
97
|
+
eot: 'application/vnd.ms-fontobject',
|
|
98
|
+
// Documents
|
|
99
|
+
pdf: 'application/pdf',
|
|
100
|
+
json: 'application/json',
|
|
101
|
+
};
|
|
102
|
+
return mimeTypes[ext] || null;
|
|
103
|
+
}
|
|
104
|
+
export default staticFile;
|
|
105
|
+
//# sourceMappingURL=staticFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staticFile.js","sourceRoot":"","sources":["../src/staticFile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;G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AAW;QAChB,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,eAAe;QACpB,GAAG,EAAE,cAAc;QACnB,IAAI,EAAE,YAAY;QAElB,QAAQ;QACR,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,iBAAiB;QACtB,GAAG,EAAE,iBAAiB;QACtB,GAAG,EAAE,kBAAkB;QAEvB,QAAQ;QACR,GAAG,EAAE,YAAY;QACjB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,WAAW;QAEhB,QAAQ;QACR,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,YAAY;QACnB,GAAG,EAAE,UAAU;QACf,GAAG,EAAE,UAAU;QACf,GAAG,EAAE,+BAA+B;QAEpC,YAAY;QACZ,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,kBAAkB;KACzB,CAAC;IAEF,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;AAChC,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Template, TemplatesListResponse, TemplatesFilterParams, CategoryCount } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Templates API service
|
|
4
|
+
* Designed to easily switch between mock data and real backend
|
|
5
|
+
*/
|
|
6
|
+
export declare const templatesApi: {
|
|
7
|
+
/**
|
|
8
|
+
* Fetch templates with optional filters
|
|
9
|
+
*/
|
|
10
|
+
getTemplates(params?: TemplatesFilterParams): Promise<TemplatesListResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Fetch single template by ID
|
|
13
|
+
*/
|
|
14
|
+
getTemplate(id: string): Promise<Template>;
|
|
15
|
+
/**
|
|
16
|
+
* Fetch template categories with counts
|
|
17
|
+
*/
|
|
18
|
+
getCategories(): Promise<CategoryCount[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Load template component bundle from CDN
|
|
21
|
+
* Note: This is a placeholder - actual implementation depends on how bundles are hosted
|
|
22
|
+
*/
|
|
23
|
+
loadTemplateBundle(_bundleUrl: string): Promise<React.ComponentType<Record<string, unknown>>>;
|
|
24
|
+
};
|
|
25
|
+
export default templatesApi;
|
|
26
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/templates/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACd,MAAM,SAAS,CAAC;AAajB;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB;;OAEG;0BACyB,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAoBlF;;OAEG;oBACmB,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAgBhD;;OAEG;qBACoB,OAAO,CAAC,aAAa,EAAE,CAAC;IAY/C;;;OAGG;mCAEW,MAAM,GACjB,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAMzD,CAAC;AAwEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { MOCK_TEMPLATES } from './mockData';
|
|
2
|
+
/**
|
|
3
|
+
* API base URL - can be overridden via environment variable
|
|
4
|
+
*/
|
|
5
|
+
const API_BASE_URL = '/api/templates';
|
|
6
|
+
/**
|
|
7
|
+
* Check if we should use mock data (for development without backend)
|
|
8
|
+
*/
|
|
9
|
+
const USE_MOCK = true; // Set to false when backend is available
|
|
10
|
+
/**
|
|
11
|
+
* Templates API service
|
|
12
|
+
* Designed to easily switch between mock data and real backend
|
|
13
|
+
*/
|
|
14
|
+
export const templatesApi = {
|
|
15
|
+
/**
|
|
16
|
+
* Fetch templates with optional filters
|
|
17
|
+
*/
|
|
18
|
+
async getTemplates(params) {
|
|
19
|
+
if (USE_MOCK) {
|
|
20
|
+
return getMockTemplates(params);
|
|
21
|
+
}
|
|
22
|
+
const searchParams = new URLSearchParams();
|
|
23
|
+
if (params?.category)
|
|
24
|
+
searchParams.set('category', params.category);
|
|
25
|
+
if (params?.search)
|
|
26
|
+
searchParams.set('search', params.search);
|
|
27
|
+
if (params?.featured !== undefined)
|
|
28
|
+
searchParams.set('featured', String(params.featured));
|
|
29
|
+
if (params?.sortBy)
|
|
30
|
+
searchParams.set('sortBy', params.sortBy);
|
|
31
|
+
if (params?.page)
|
|
32
|
+
searchParams.set('page', String(params.page));
|
|
33
|
+
if (params?.pageSize)
|
|
34
|
+
searchParams.set('pageSize', String(params.pageSize));
|
|
35
|
+
const response = await fetch(`${API_BASE_URL}?${searchParams.toString()}`);
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
throw new Error('Failed to fetch templates');
|
|
38
|
+
}
|
|
39
|
+
return response.json();
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Fetch single template by ID
|
|
43
|
+
*/
|
|
44
|
+
async getTemplate(id) {
|
|
45
|
+
if (USE_MOCK) {
|
|
46
|
+
const template = MOCK_TEMPLATES.find((t) => t.id === id);
|
|
47
|
+
if (!template) {
|
|
48
|
+
throw new Error('Template not found');
|
|
49
|
+
}
|
|
50
|
+
return template;
|
|
51
|
+
}
|
|
52
|
+
const response = await fetch(`${API_BASE_URL}/${id}`);
|
|
53
|
+
if (!response.ok) {
|
|
54
|
+
throw new Error('Template not found');
|
|
55
|
+
}
|
|
56
|
+
return response.json();
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Fetch template categories with counts
|
|
60
|
+
*/
|
|
61
|
+
async getCategories() {
|
|
62
|
+
if (USE_MOCK) {
|
|
63
|
+
return getMockCategories();
|
|
64
|
+
}
|
|
65
|
+
const response = await fetch(`${API_BASE_URL}/categories`);
|
|
66
|
+
if (!response.ok) {
|
|
67
|
+
throw new Error('Failed to fetch categories');
|
|
68
|
+
}
|
|
69
|
+
return response.json();
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* Load template component bundle from CDN
|
|
73
|
+
* Note: This is a placeholder - actual implementation depends on how bundles are hosted
|
|
74
|
+
*/
|
|
75
|
+
async loadTemplateBundle(_bundleUrl) {
|
|
76
|
+
// In production, this would dynamically import the remote bundle
|
|
77
|
+
// For now, return a placeholder component
|
|
78
|
+
console.warn('Template bundle loading not yet implemented');
|
|
79
|
+
return () => null;
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Mock implementation of getTemplates with filtering
|
|
84
|
+
*/
|
|
85
|
+
function getMockTemplates(params) {
|
|
86
|
+
let filtered = [...MOCK_TEMPLATES];
|
|
87
|
+
// Filter by category
|
|
88
|
+
if (params?.category) {
|
|
89
|
+
filtered = filtered.filter((t) => t.category === params.category);
|
|
90
|
+
}
|
|
91
|
+
// Filter by search
|
|
92
|
+
if (params?.search) {
|
|
93
|
+
const search = params.search.toLowerCase();
|
|
94
|
+
filtered = filtered.filter((t) => t.name.toLowerCase().includes(search) ||
|
|
95
|
+
t.description.toLowerCase().includes(search) ||
|
|
96
|
+
t.tags.some((tag) => tag.toLowerCase().includes(search)));
|
|
97
|
+
}
|
|
98
|
+
// Filter by featured
|
|
99
|
+
if (params?.featured) {
|
|
100
|
+
filtered = filtered.filter((t) => t.featured);
|
|
101
|
+
}
|
|
102
|
+
// Sort
|
|
103
|
+
switch (params?.sortBy) {
|
|
104
|
+
case 'popular':
|
|
105
|
+
filtered.sort((a, b) => (b.downloads || 0) - (a.downloads || 0));
|
|
106
|
+
break;
|
|
107
|
+
case 'rating':
|
|
108
|
+
filtered.sort((a, b) => (b.rating || 0) - (a.rating || 0));
|
|
109
|
+
break;
|
|
110
|
+
case 'newest':
|
|
111
|
+
default:
|
|
112
|
+
filtered.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
// Pagination
|
|
116
|
+
const page = params?.page || 1;
|
|
117
|
+
const pageSize = params?.pageSize || 12;
|
|
118
|
+
const start = (page - 1) * pageSize;
|
|
119
|
+
const templates = filtered.slice(start, start + pageSize);
|
|
120
|
+
return {
|
|
121
|
+
templates,
|
|
122
|
+
total: filtered.length,
|
|
123
|
+
page,
|
|
124
|
+
pageSize,
|
|
125
|
+
hasMore: start + pageSize < filtered.length,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Mock implementation of getCategories
|
|
130
|
+
*/
|
|
131
|
+
function getMockCategories() {
|
|
132
|
+
const counts = {};
|
|
133
|
+
MOCK_TEMPLATES.forEach((t) => {
|
|
134
|
+
counts[t.category] = (counts[t.category] || 0) + 1;
|
|
135
|
+
});
|
|
136
|
+
return Object.entries(counts).map(([category, count]) => ({
|
|
137
|
+
category: category,
|
|
138
|
+
count,
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
export default templatesApi;
|
|
142
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/templates/api.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;GAEG;AACH,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAEtC;;GAEG;AACH,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,yCAAyC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,MAA8B;QAC/C,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;QA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,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../src/templates/mockData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,EAwQpC,CAAC"}
|