@motius-invi/invi-remotion-templates 0.0.3
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/Root.d.ts +1 -0
- package/dist/Root.js +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/registry.d.ts +37 -0
- package/dist/registry.js +26 -0
- package/dist/shared/constants/template.d.ts +10 -0
- package/dist/shared/constants/template.js +1 -0
- package/dist/shared/utils/clamp.d.ts +1 -0
- package/dist/shared/utils/clamp.js +3 -0
- package/dist/shared/utils/fadeIn.d.ts +7 -0
- package/dist/shared/utils/fadeIn.js +7 -0
- package/dist/shared/utils/index.d.ts +2 -0
- package/dist/shared/utils/index.js +2 -0
- package/dist/templates/moving-poster-001/defaultProps.d.ts +2 -0
- package/dist/templates/moving-poster-001/defaultProps.js +7 -0
- package/dist/templates/moving-poster-001/index.d.ts +2 -0
- package/dist/templates/moving-poster-001/index.js +31 -0
- package/dist/templates/moving-poster-001/schema.d.ts +8 -0
- package/dist/templates/moving-poster-001/schema.js +8 -0
- package/dist/templates/moving-poster-001/types.d.ts +3 -0
- package/dist/templates/moving-poster-001/types.js +1 -0
- package/dist/templates/test-template/defaultProps.d.ts +2 -0
- package/dist/templates/test-template/defaultProps.js +3 -0
- package/dist/templates/test-template/index.d.ts +2 -0
- package/dist/templates/test-template/index.js +8 -0
- package/dist/templates/test-template/schema.d.ts +4 -0
- package/dist/templates/test-template/schema.js +4 -0
- package/dist/templates/test-template/types.d.ts +3 -0
- package/dist/templates/test-template/types.js +1 -0
- package/package.json +38 -0
- package/src/shared/styles/global.css +17 -0
package/dist/Root.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RemotionRoot: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/Root.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Composition } from "remotion";
|
|
3
|
+
import { TEMPLATE_REGISTRY } from "./registry";
|
|
4
|
+
export const RemotionRoot = () => {
|
|
5
|
+
return (_jsx(_Fragment, { children: TEMPLATE_REGISTRY.map((template) => (_jsx(Composition, { id: template.id, component: template.component, durationInFrames: template.durationInFrames, fps: template.fps, width: template.width, height: template.height, defaultProps: template.defaultProps }, template.id))) }));
|
|
6
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
export declare const testTemplateDefinition: {
|
|
3
|
+
id: string;
|
|
4
|
+
component: ({ message }: import("./templates/test-template/types").TestTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
durationInFrames: number;
|
|
9
|
+
fps: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const movingPoster001Definition: {
|
|
14
|
+
id: string;
|
|
15
|
+
component: ({ groomName, brideName, weddingDate, venue, tagline, }: import("./templates/moving-poster-001/types").MovingPoster001Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
defaultProps: {
|
|
17
|
+
groomName: string;
|
|
18
|
+
brideName: string;
|
|
19
|
+
weddingDate: string;
|
|
20
|
+
venue: string;
|
|
21
|
+
tagline: string;
|
|
22
|
+
};
|
|
23
|
+
durationInFrames: number;
|
|
24
|
+
fps: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
export type AnyTemplateDefinition = {
|
|
29
|
+
id: string;
|
|
30
|
+
component: FC<Record<string, unknown>>;
|
|
31
|
+
defaultProps: Record<string, unknown>;
|
|
32
|
+
durationInFrames: number;
|
|
33
|
+
fps: number;
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
};
|
|
37
|
+
export declare const TEMPLATE_REGISTRY: AnyTemplateDefinition[];
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TestTemplate } from "@/templates/test-template";
|
|
2
|
+
import { defaultProps as testTemplateDefaultProps } from "@/templates/test-template/defaultProps";
|
|
3
|
+
import { MovingPoster001 } from "@/templates/moving-poster-001";
|
|
4
|
+
import { defaultProps as movingPoster001DefaultProps } from "@/templates/moving-poster-001/defaultProps";
|
|
5
|
+
export const testTemplateDefinition = {
|
|
6
|
+
id: "test-template",
|
|
7
|
+
component: TestTemplate,
|
|
8
|
+
defaultProps: testTemplateDefaultProps,
|
|
9
|
+
durationInFrames: 90,
|
|
10
|
+
fps: 30,
|
|
11
|
+
width: 1280,
|
|
12
|
+
height: 720,
|
|
13
|
+
};
|
|
14
|
+
export const movingPoster001Definition = {
|
|
15
|
+
id: "moving-poster-001",
|
|
16
|
+
component: MovingPoster001,
|
|
17
|
+
defaultProps: movingPoster001DefaultProps,
|
|
18
|
+
durationInFrames: 150,
|
|
19
|
+
fps: 30,
|
|
20
|
+
width: 1080,
|
|
21
|
+
height: 1920,
|
|
22
|
+
};
|
|
23
|
+
export const TEMPLATE_REGISTRY = [
|
|
24
|
+
testTemplateDefinition,
|
|
25
|
+
movingPoster001Definition,
|
|
26
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AbsoluteFill, interpolate, useCurrentFrame, useVideoConfig, } from "remotion";
|
|
3
|
+
import { fadeIn } from "@/shared/utils/fadeIn";
|
|
4
|
+
export const MovingPoster001 = ({ groomName, brideName, weddingDate, venue, tagline, }) => {
|
|
5
|
+
const frame = useCurrentFrame();
|
|
6
|
+
const { durationInFrames } = useVideoConfig();
|
|
7
|
+
const backgroundScale = interpolate(frame, [0, durationInFrames], [1, 1.08], {
|
|
8
|
+
extrapolateLeft: "clamp",
|
|
9
|
+
extrapolateRight: "clamp",
|
|
10
|
+
});
|
|
11
|
+
const taglineOpacity = fadeIn({ frame, start: 12, duration: 30 });
|
|
12
|
+
const namesOpacity = fadeIn({ frame, start: 24, duration: 36 });
|
|
13
|
+
const namesTranslateY = interpolate(frame, [24, 54], [40, 0], {
|
|
14
|
+
extrapolateLeft: "clamp",
|
|
15
|
+
extrapolateRight: "clamp",
|
|
16
|
+
});
|
|
17
|
+
const detailsOpacity = fadeIn({ frame, start: 48, duration: 36 });
|
|
18
|
+
const dividerWidth = interpolate(frame, [42, 72], [0, 120], {
|
|
19
|
+
extrapolateLeft: "clamp",
|
|
20
|
+
extrapolateRight: "clamp",
|
|
21
|
+
});
|
|
22
|
+
return (_jsxs(AbsoluteFill, { className: "overflow-hidden bg-[#f5f0ea] text-foreground", children: [_jsxs(AbsoluteFill, { style: {
|
|
23
|
+
transform: `scale(${backgroundScale})`,
|
|
24
|
+
}, children: [_jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-[#ebe3d8] via-[#f7f2ec] to-[#d8cfc4]" }), _jsx("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_top,rgba(255,255,255,0.55),transparent_55%)]" }), _jsx("div", { className: "absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/20 to-transparent" })] }), _jsxs(AbsoluteFill, { className: "flex flex-col items-center justify-center px-16 text-center", children: [_jsx("p", { className: "mb-10 text-sm uppercase tracking-[0.45em] text-accent", style: {
|
|
25
|
+
fontFamily: "var(--font-sans)",
|
|
26
|
+
opacity: taglineOpacity,
|
|
27
|
+
}, children: tagline }), _jsxs("div", { style: {
|
|
28
|
+
opacity: namesOpacity,
|
|
29
|
+
transform: `translateY(${namesTranslateY}px)`,
|
|
30
|
+
}, children: [_jsx("p", { className: "text-[72px] leading-none text-foreground", style: { fontFamily: "var(--font-serif)" }, children: groomName }), _jsx("p", { className: "my-6 text-3xl tracking-[0.35em] text-muted", style: { fontFamily: "var(--font-serif)" }, children: "&" }), _jsx("p", { className: "text-[72px] leading-none text-foreground", style: { fontFamily: "var(--font-serif)" }, children: brideName })] }), _jsx("div", { className: "my-12 h-px bg-accent", style: { width: dividerWidth, opacity: detailsOpacity } }), _jsxs("div", { style: { opacity: detailsOpacity }, children: [_jsx("p", { className: "text-2xl tracking-[0.12em] text-foreground", style: { fontFamily: "var(--font-sans)" }, children: weddingDate }), _jsx("p", { className: "mt-5 max-w-[760px] text-xl leading-relaxed text-muted", style: { fontFamily: "var(--font-sans)" }, children: venue })] })] })] }));
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
3
|
+
import { fadeIn } from "@/shared/utils/fadeIn";
|
|
4
|
+
export const TestTemplate = ({ message }) => {
|
|
5
|
+
const frame = useCurrentFrame();
|
|
6
|
+
const opacity = fadeIn({ frame, start: 10, duration: 24 });
|
|
7
|
+
return (_jsx(AbsoluteFill, { className: "flex items-center justify-center bg-background text-foreground", children: _jsx("p", { className: "text-5xl font-bold tracking-tight", style: { opacity }, children: message }) }));
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@motius-invi/invi-remotion-templates",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"src/shared/styles"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"studio": "remotion studio src/remotion-entry.ts",
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"typecheck": "tsc --noEmit"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": ">=18 <20",
|
|
21
|
+
"react-dom": ">=18 <20",
|
|
22
|
+
"remotion": "^4.0.0",
|
|
23
|
+
"zod": "^4.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@remotion/cli": "^4.0.469",
|
|
27
|
+
"@remotion/tailwind-v4": "^4.0.469",
|
|
28
|
+
"@tailwindcss/postcss": "^4",
|
|
29
|
+
"@types/react": "^19",
|
|
30
|
+
"@types/react-dom": "^19",
|
|
31
|
+
"react": "^19.2.4",
|
|
32
|
+
"react-dom": "^19.2.4",
|
|
33
|
+
"remotion": "^4.0.469",
|
|
34
|
+
"tailwindcss": "^4",
|
|
35
|
+
"typescript": "^5",
|
|
36
|
+
"zod": "4.3.6"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--background: #faf9f7;
|
|
5
|
+
--foreground: #1a1a1a;
|
|
6
|
+
--muted: #6b6b6b;
|
|
7
|
+
--accent: #c9a96e;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@theme inline {
|
|
11
|
+
--color-background: var(--background);
|
|
12
|
+
--color-foreground: var(--foreground);
|
|
13
|
+
--color-muted: var(--muted);
|
|
14
|
+
--color-accent: var(--accent);
|
|
15
|
+
--font-serif: "Georgia", "Times New Roman", serif;
|
|
16
|
+
--font-sans: "Helvetica Neue", Arial, sans-serif;
|
|
17
|
+
}
|