loopwind 0.9.1 → 0.9.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/FONTS.md +13 -13
- package/HELPERS_DEMO.md +2 -2
- package/PROJECT_STRUCTURE.md +38 -38
- package/PUBLISHING.md +13 -13
- package/README.md +71 -71
- package/REGISTRY_SETUP.md +18 -18
- package/SHADCN_INTEGRATION.md +7 -7
- package/TAILWIND.md +4 -4
- package/TEMPLATE_SOURCES.md +30 -30
- package/dist/lib/renderer.js +15 -15
- package/dist/lib/renderer.js.map +1 -1
- package/dist/lib/tailwind-detector.js +1 -1
- package/dist/lib/tailwind-detector.js.map +1 -1
- package/dist/lib/tailwind.d.ts +1 -1
- package/dist/lib/tailwind.d.ts.map +1 -1
- package/dist/lib/tailwind.js +19 -19
- package/dist/lib/tailwind.js.map +1 -1
- package/dist/lib/template-validator.js +1 -1
- package/dist/lib/template-validator.js.map +1 -1
- package/examples/nextjs-api/README.md +6 -6
- package/examples/nextjs-api/pages/api/intro-video.ts +1 -1
- package/examples/nextjs-api/pages/api/og-image.ts +2 -2
- package/package.json +2 -3
- package/test-templates/TESTS.md +1 -1
- package/test-templates/test-sdk.mjs +2 -2
- package/website/README.md +2 -2
- package/website/astro.config.mjs +1 -1
- package/website/package-lock.json +186 -2480
- package/website/package.json +1 -1
- package/website/public/robots.txt +1 -1
- package/_dsgn/templates/banner-hero/banner-hero.tsx +0 -57
- package/_dsgn/templates/banner-hero/meta.json +0 -14
- package/_dsgn/templates/composite-card/meta.json +0 -16
- package/_dsgn/templates/composite-card/template.tsx +0 -44
- package/_dsgn/templates/image/meta.json +0 -13
- package/_dsgn/templates/image/template.tsx +0 -28
- package/_dsgn/templates/kitchen-sink/meta.json +0 -13
- package/_dsgn/templates/kitchen-sink/template.tsx +0 -72
- package/_dsgn/templates/qr-card/meta.json +0 -14
- package/_dsgn/templates/qr-card/template.tsx +0 -39
- package/_dsgn/templates/test-parent/child/meta.json +0 -11
- package/_dsgn/templates/test-parent/child/template.tsx +0 -27
- package/_dsgn/templates/test-parent/meta.json +0 -12
- package/_dsgn/templates/test-parent/template.tsx +0 -30
- package/_dsgn/templates/test-sibling/meta.json +0 -11
- package/_dsgn/templates/test-sibling/template.tsx +0 -20
- package/_dsgn/templates/video/.tmp/template-1763421345296.mjs +0 -43
- package/_dsgn/templates/video/.tmp/template-1763421362228.mjs +0 -43
- package/_dsgn/templates/video/.tmp/template-1763421377706.mjs +0 -43
- package/_dsgn/templates/video/meta.json +0 -17
- package/_dsgn/templates/video/template.tsx +0 -48
- package/test-templates/_dsgn/templates/absolute-spin/meta.json +0 -7
- package/test-templates/_dsgn/templates/absolute-spin/template.tsx +0 -16
- package/test-templates/_dsgn/templates/animated-intro/.tmp/template-1763468771640.mjs +0 -7
- package/test-templates/_dsgn/templates/animated-intro/meta.json +0 -10
- package/test-templates/_dsgn/templates/animated-intro/template.tsx +0 -23
- package/test-templates/_dsgn/templates/centered-spin/.tmp/template-1763468525386.mjs +0 -7
- package/test-templates/_dsgn/templates/centered-spin/meta.json +0 -7
- package/test-templates/_dsgn/templates/centered-spin/template.tsx +0 -11
- package/test-templates/_dsgn/templates/composite/.tmp/template-1763468815645.mjs +0 -7
- package/test-templates/_dsgn/templates/composite/meta.json +0 -9
- package/test-templates/_dsgn/templates/composite/template.tsx +0 -23
- package/test-templates/_dsgn/templates/easing-test/.tmp/template-1763468824501.mjs +0 -7
- package/test-templates/_dsgn/templates/easing-test/meta.json +0 -7
- package/test-templates/_dsgn/templates/easing-test/template.tsx +0 -47
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466364336.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466584319.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466667797.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466746504.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466930225.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467004552.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467060334.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467124493.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467174690.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467359134.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467451928.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467758275.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467985201.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468020563.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468090428.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468211036.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468394057.mjs +0 -10
- package/test-templates/_dsgn/templates/minimal-spin/meta.json +0 -7
- package/test-templates/_dsgn/templates/minimal-spin/template.tsx +0 -13
- package/test-templates/_dsgn/templates/no-origin-spin/meta.json +0 -7
- package/test-templates/_dsgn/templates/no-origin-spin/template.tsx +0 -10
- package/test-templates/_dsgn/templates/opacity-test/meta.json +0 -7
- package/test-templates/_dsgn/templates/opacity-test/template.tsx +0 -9
- package/test-templates/_dsgn/templates/qr-code/.tmp/template-1763468758954.mjs +0 -17
- package/test-templates/_dsgn/templates/qr-code/.tmp/template-1763468815672.mjs +0 -17
- package/test-templates/_dsgn/templates/qr-code/meta.json +0 -9
- package/test-templates/_dsgn/templates/qr-code/template.tsx +0 -20
- package/test-templates/_dsgn/templates/rotation-abs-test/meta.json +0 -7
- package/test-templates/_dsgn/templates/rotation-abs-test/template.tsx +0 -15
- package/test-templates/_dsgn/templates/rotation-corner/meta.json +0 -7
- package/test-templates/_dsgn/templates/rotation-corner/template.tsx +0 -12
- package/test-templates/_dsgn/templates/rotation-test/meta.json +0 -7
- package/test-templates/_dsgn/templates/rotation-test/template.tsx +0 -12
- package/test-templates/_dsgn/templates/shake-test/meta.json +0 -7
- package/test-templates/_dsgn/templates/shake-test/template.tsx +0 -12
- package/test-templates/_dsgn/templates/static-image/.tmp/template-1763468746271.mjs +0 -7
- package/test-templates/_dsgn/templates/static-image/meta.json +0 -9
- package/test-templates/_dsgn/templates/static-image/template.tsx +0 -19
- package/test-templates/_dsgn/templates/translate-test/meta.json +0 -7
- package/test-templates/_dsgn/templates/translate-test/template.tsx +0 -9
- package/test-templates/_dsgn/templates/video-loops/.tmp/template-1763468793192.mjs +0 -15
- package/test-templates/_dsgn/templates/video-loops/meta.json +0 -9
- package/test-templates/_dsgn/templates/video-loops/template.tsx +0 -39
- package/test-templates/_dsgn/templates/wrapped-spin/meta.json +0 -7
- package/test-templates/_dsgn/templates/wrapped-spin/template.tsx +0 -17
package/website/package.json
CHANGED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const meta = {
|
|
3
|
-
name: "banner-hero",
|
|
4
|
-
description: "A hero banner with shadcn design system",
|
|
5
|
-
type: "image",
|
|
6
|
-
size: {
|
|
7
|
-
width: 1600,
|
|
8
|
-
height: 900
|
|
9
|
-
},
|
|
10
|
-
props: {
|
|
11
|
-
title: "string",
|
|
12
|
-
subtitle: "string?",
|
|
13
|
-
image: "string?"
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
interface BannerHeroProps {
|
|
18
|
-
title: string;
|
|
19
|
-
subtitle?: string;
|
|
20
|
-
image?: string;
|
|
21
|
-
config?: any;
|
|
22
|
-
tw?: (classes: string) => any;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default function BannerHero({
|
|
26
|
-
title,
|
|
27
|
-
subtitle,
|
|
28
|
-
image,
|
|
29
|
-
config,
|
|
30
|
-
tw = (classes: string) => ({})
|
|
31
|
-
}: BannerHeroProps) {
|
|
32
|
-
return (
|
|
33
|
-
<div style={tw('w-full h-full flex flex-col justify-center p-20 bg-background')}>
|
|
34
|
-
<div style={tw('bg-card rounded-xl p-16 border flex flex-col')}>
|
|
35
|
-
<h1 style={tw('text-8xl font-bold mb-5 text-foreground')}>
|
|
36
|
-
{title}
|
|
37
|
-
</h1>
|
|
38
|
-
|
|
39
|
-
{subtitle && (
|
|
40
|
-
<p style={tw('text-4xl text-muted-foreground')}>
|
|
41
|
-
{subtitle}
|
|
42
|
-
</p>
|
|
43
|
-
)}
|
|
44
|
-
|
|
45
|
-
{image && (
|
|
46
|
-
<img
|
|
47
|
-
src={image}
|
|
48
|
-
style={{
|
|
49
|
-
...tw('rounded-lg mt-10'),
|
|
50
|
-
width: '192px',
|
|
51
|
-
}}
|
|
52
|
-
/>
|
|
53
|
-
)}
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "composite-card",
|
|
3
|
-
"description": "Card that embeds other templates",
|
|
4
|
-
"type": "image",
|
|
5
|
-
"size": {
|
|
6
|
-
"width": 1200,
|
|
7
|
-
"height": 800
|
|
8
|
-
},
|
|
9
|
-
"props": {
|
|
10
|
-
"title": "string",
|
|
11
|
-
"subtitle": "string?",
|
|
12
|
-
"qrUrl": "string?",
|
|
13
|
-
"bannerTitle": "string?",
|
|
14
|
-
"bannerSubtitle": "string?"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Template metadata is defined in meta.json
|
|
3
|
-
|
|
4
|
-
export default function Template({ title, subtitle, qrUrl, bannerTitle, bannerSubtitle, template, qr, tw }) {
|
|
5
|
-
return (
|
|
6
|
-
<div style={tw('w-full h-full flex flex-col bg-gradient-to-br from-slate-900 to-slate-800 p-12')}>
|
|
7
|
-
{/* Main Content */}
|
|
8
|
-
<div style={tw('bg-white rounded-3xl p-10 flex flex-col shadow-2xl')}>
|
|
9
|
-
{/* Title */}
|
|
10
|
-
<h1 style={tw('text-5xl font-bold text-gray-900 mb-3')}>
|
|
11
|
-
{title}
|
|
12
|
-
</h1>
|
|
13
|
-
|
|
14
|
-
{subtitle && (
|
|
15
|
-
<p style={tw('text-2xl text-gray-600 mb-8')}>
|
|
16
|
-
{subtitle}
|
|
17
|
-
</p>
|
|
18
|
-
)}
|
|
19
|
-
|
|
20
|
-
{/* Embedded Template - pass props directly, uses template's own meta.json for size */}
|
|
21
|
-
<div style={tw('mb-8 rounded-xl overflow-hidden flex')}>
|
|
22
|
-
{template('image', { title: bannerTitle, subtitle: bannerSubtitle })}
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
{/* QR Code if URL provided */}
|
|
26
|
-
{qrUrl && (
|
|
27
|
-
<div style={tw('flex items-center gap-6')}>
|
|
28
|
-
<div style={tw('bg-gray-100 p-4 rounded-xl flex')}>
|
|
29
|
-
<img
|
|
30
|
-
src={qr(qrUrl)}
|
|
31
|
-
width={120}
|
|
32
|
-
height={120}
|
|
33
|
-
alt="QR Code"
|
|
34
|
-
/>
|
|
35
|
-
</div>
|
|
36
|
-
<p style={tw('text-lg text-gray-700 font-mono flex-1')}>
|
|
37
|
-
{qrUrl}
|
|
38
|
-
</p>
|
|
39
|
-
</div>
|
|
40
|
-
)}
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const meta = {
|
|
3
|
-
name: "image",
|
|
4
|
-
description: "Simple image starter template",
|
|
5
|
-
type: "image",
|
|
6
|
-
size: { width: 1200, height: 630 },
|
|
7
|
-
props: {
|
|
8
|
-
title: "string",
|
|
9
|
-
description: "string?"
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default function Template({ title, description, tw }) {
|
|
14
|
-
return (
|
|
15
|
-
<div style={tw('w-full h-full flex flex-col justify-center items-center bg-gradient-to-br from-gray-900 to-gray-950 p-16')}>
|
|
16
|
-
<div style={tw('bg-white border rounded-xl p-12 flex flex-col max-w-4xl')}>
|
|
17
|
-
<h1 style={tw('text-7xl font-bold text-gray-900 mb-4')}>
|
|
18
|
-
{title}
|
|
19
|
-
</h1>
|
|
20
|
-
{description && (
|
|
21
|
-
<p style={tw('text-3xl text-gray-600')}>
|
|
22
|
-
{description}
|
|
23
|
-
</p>
|
|
24
|
-
)}
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const meta = {
|
|
3
|
-
name: "kitchen-sink",
|
|
4
|
-
description: "Comprehensive example showcasing all supported Tailwind features",
|
|
5
|
-
type: "image",
|
|
6
|
-
size: { width: 1200, height: 630 },
|
|
7
|
-
props: {
|
|
8
|
-
title: "string",
|
|
9
|
-
subtitle: "string?"
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default function Template({ title, subtitle, tw }) {
|
|
14
|
-
return (
|
|
15
|
-
<div style={tw('w-full h-full flex flex-col bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500 p-8')}>
|
|
16
|
-
{/* Header Card with Shadow */}
|
|
17
|
-
<div style={tw('bg-white rounded-2xl shadow-2xl p-8 mb-4 max-w-5xl flex flex-col')}>
|
|
18
|
-
<h1 style={tw('text-6xl font-extrabold text-indigo-600 mb-3 uppercase tracking-wide')}>
|
|
19
|
-
{title}
|
|
20
|
-
</h1>
|
|
21
|
-
{subtitle && (
|
|
22
|
-
<p style={tw('text-2xl text-gray-600 italic leading-relaxed')}>
|
|
23
|
-
{subtitle}
|
|
24
|
-
</p>
|
|
25
|
-
)}
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
{/* Feature Cards Grid */}
|
|
29
|
-
<div style={tw('flex flex-wrap gap-4 max-w-6xl flex-1')}>
|
|
30
|
-
{/* Card 1: Gradients & Shadows */}
|
|
31
|
-
<div style={tw('bg-gradient-to-br from-cyan-400 to-blue-500 rounded-xl shadow-lg p-6 flex-1 min-w-0 flex flex-col')}>
|
|
32
|
-
<h2 style={tw('text-2xl font-bold text-white mb-2 tracking-wider')}>
|
|
33
|
-
Gradients
|
|
34
|
-
</h2>
|
|
35
|
-
<p style={tw('text-sm text-white text-opacity-90 leading-normal')}>
|
|
36
|
-
Full gradient support
|
|
37
|
-
</p>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
{/* Card 2: Borders & Transforms */}
|
|
41
|
-
<div style={tw('bg-white rounded-lg border-4 border-emerald-500 p-6 flex-1 min-w-0 flex flex-col shadow-md rotate-1')}>
|
|
42
|
-
<h2 style={tw('text-2xl font-semibold text-emerald-700 mb-2')}>
|
|
43
|
-
Transforms
|
|
44
|
-
</h2>
|
|
45
|
-
<p style={tw('text-sm text-gray-600 leading-tight')}>
|
|
46
|
-
Rotation supported!
|
|
47
|
-
</p>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
{/* Card 3: Typography */}
|
|
51
|
-
<div style={tw('bg-gray-900 rounded-xl shadow-xl p-6 flex-1 min-w-0 flex flex-col')}>
|
|
52
|
-
<h2 style={tw('text-2xl font-black text-yellow-400 mb-2 uppercase letter-spacing-wide')}>
|
|
53
|
-
TYPOGRAPHY
|
|
54
|
-
</h2>
|
|
55
|
-
<p style={tw('text-xs text-gray-300 tracking-tight leading-loose')}>
|
|
56
|
-
All text styles work
|
|
57
|
-
</p>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
{/* Bottom Info Bar */}
|
|
62
|
-
<div style={tw('mt-4 bg-white bg-opacity-20 rounded-lg px-6 py-3 max-w-5xl flex flex-row justify-between items-center')}>
|
|
63
|
-
<p style={tw('text-sm font-medium text-white')}>
|
|
64
|
-
Kitchen Sink Template
|
|
65
|
-
</p>
|
|
66
|
-
<p style={tw('text-xs text-white text-opacity-75 tracking-wide')}>
|
|
67
|
-
All features demonstrated
|
|
68
|
-
</p>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Template metadata is defined in meta.json
|
|
3
|
-
|
|
4
|
-
export default function Template({ title, url, subtitle, qr, tw }) {
|
|
5
|
-
return (
|
|
6
|
-
<div style={tw('w-full h-full flex flex-col items-center justify-center bg-gradient-to-br from-indigo-600 to-purple-600 p-16')}>
|
|
7
|
-
<div style={tw('bg-white rounded-3xl p-12 flex flex-col items-center shadow-2xl max-w-2xl')}>
|
|
8
|
-
{/* Title */}
|
|
9
|
-
<h1 style={tw('text-5xl font-bold text-gray-900 mb-4 text-center')}>
|
|
10
|
-
{title}
|
|
11
|
-
</h1>
|
|
12
|
-
|
|
13
|
-
{/* Subtitle */}
|
|
14
|
-
{subtitle && (
|
|
15
|
-
<p style={tw('text-xl text-gray-600 mb-8 text-center')}>
|
|
16
|
-
{subtitle}
|
|
17
|
-
</p>
|
|
18
|
-
)}
|
|
19
|
-
|
|
20
|
-
{/* QR Code - automatically generated from the url prop */}
|
|
21
|
-
<div style={tw('bg-white p-6 rounded-2xl border-4 border-gray-200 mb-8 flex')}>
|
|
22
|
-
<img
|
|
23
|
-
src={qr(url)}
|
|
24
|
-
width={300}
|
|
25
|
-
height={300}
|
|
26
|
-
alt="QR Code"
|
|
27
|
-
/>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
{/* URL Display */}
|
|
31
|
-
<div style={tw('bg-gray-100 rounded-xl px-6 py-4 flex')}>
|
|
32
|
-
<p style={tw('text-lg text-gray-700 font-mono')}>
|
|
33
|
-
{url}
|
|
34
|
-
</p>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
interface ChildProps {
|
|
3
|
-
text: string;
|
|
4
|
-
tw: (classes: string) => any;
|
|
5
|
-
template: (name: string, props: any) => any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default function Child({ text, tw, template }: ChildProps) {
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
style={{
|
|
12
|
-
...tw('bg-blue-500 text-white p-4 rounded-lg'),
|
|
13
|
-
display: 'flex',
|
|
14
|
-
flexDirection: 'column',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
justifyContent: 'center',
|
|
17
|
-
gap: '10px',
|
|
18
|
-
}}
|
|
19
|
-
>
|
|
20
|
-
<div style={tw('text-2xl font-bold')}>Child Template</div>
|
|
21
|
-
<div style={tw('text-lg')}>{text}</div>
|
|
22
|
-
|
|
23
|
-
{/* Use parent-relative path to load sibling template */}
|
|
24
|
-
{template('../test-sibling', { message: 'Loaded via ../ path!' })}
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
interface ParentProps {
|
|
3
|
-
title: string;
|
|
4
|
-
childText: string;
|
|
5
|
-
tw: (classes: string) => any;
|
|
6
|
-
template: (name: string, props: any) => any;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export default function Parent({ title, childText, tw, template }: ParentProps) {
|
|
10
|
-
return (
|
|
11
|
-
<div
|
|
12
|
-
style={{
|
|
13
|
-
...tw('bg-gradient-to-br from-purple-500 to-pink-500 p-8'),
|
|
14
|
-
display: 'flex',
|
|
15
|
-
flexDirection: 'column',
|
|
16
|
-
alignItems: 'center',
|
|
17
|
-
justifyContent: 'center',
|
|
18
|
-
width: '100%',
|
|
19
|
-
height: '100%',
|
|
20
|
-
gap: '20px',
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
<div style={tw('text-4xl font-bold text-white')}>{title}</div>
|
|
24
|
-
<div style={tw('text-lg text-white opacity-80')}>Testing relative template paths</div>
|
|
25
|
-
|
|
26
|
-
{/* Use relative path to load child template */}
|
|
27
|
-
{template('./child', { text: childText })}
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
interface SiblingProps {
|
|
3
|
-
message: string;
|
|
4
|
-
tw: (classes: string) => any;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default function Sibling({ message, tw }: SiblingProps) {
|
|
8
|
-
return (
|
|
9
|
-
<div
|
|
10
|
-
style={{
|
|
11
|
-
...tw('bg-green-500 text-white p-3 rounded'),
|
|
12
|
-
display: 'flex',
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
justifyContent: 'center',
|
|
15
|
-
}}
|
|
16
|
-
>
|
|
17
|
-
<div style={tw('text-sm font-semibold')}>Sibling: {message}</div>
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from "file:///Users/tommyvedvik/Dev/dsgn/node_modules/react/index.js";
|
|
2
|
-
const meta = {
|
|
3
|
-
name: "video",
|
|
4
|
-
description: "Animated video starter template",
|
|
5
|
-
type: "video",
|
|
6
|
-
size: { width: 1200, height: 630 },
|
|
7
|
-
props: {
|
|
8
|
-
title: "string",
|
|
9
|
-
description: "string?"
|
|
10
|
-
},
|
|
11
|
-
video: {
|
|
12
|
-
fps: 30,
|
|
13
|
-
duration: 3
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
function Template({ title, description, frame, progress, tw }) {
|
|
17
|
-
const opacity = Math.min(1, progress * 2);
|
|
18
|
-
const translateY = 20 - progress * 20;
|
|
19
|
-
return /* @__PURE__ */ React.createElement("div", { style: tw("w-full h-full flex flex-col justify-center items-center bg-background p-16") }, /* @__PURE__ */ React.createElement("div", { style: tw("bg-card border rounded-xl p-12 flex flex-col max-w-4xl") }, /* @__PURE__ */ React.createElement(
|
|
20
|
-
"h1",
|
|
21
|
-
{
|
|
22
|
-
style: {
|
|
23
|
-
...tw("text-7xl font-bold text-foreground mb-4"),
|
|
24
|
-
opacity,
|
|
25
|
-
transform: `translateY(${translateY}px)`
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
title
|
|
29
|
-
), description && /* @__PURE__ */ React.createElement(
|
|
30
|
-
"p",
|
|
31
|
-
{
|
|
32
|
-
style: {
|
|
33
|
-
...tw("text-3xl text-muted-foreground"),
|
|
34
|
-
opacity: Math.min(1, (progress - 0.3) * 2)
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
description
|
|
38
|
-
)));
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
Template as default,
|
|
42
|
-
meta
|
|
43
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from "file:///Users/tommyvedvik/Dev/dsgn/node_modules/react/index.js";
|
|
2
|
-
const meta = {
|
|
3
|
-
name: "video",
|
|
4
|
-
description: "Animated video starter template",
|
|
5
|
-
type: "video",
|
|
6
|
-
size: { width: 1200, height: 630 },
|
|
7
|
-
props: {
|
|
8
|
-
title: "string",
|
|
9
|
-
description: "string?"
|
|
10
|
-
},
|
|
11
|
-
video: {
|
|
12
|
-
fps: 30,
|
|
13
|
-
duration: 3
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
function Template({ title, description, frame, progress, tw }) {
|
|
17
|
-
const opacity = Math.min(1, progress * 2);
|
|
18
|
-
const translateY = 20 - progress * 20;
|
|
19
|
-
return /* @__PURE__ */ React.createElement("div", { style: tw("w-full h-full flex flex-col justify-center items-center bg-background p-16") }, /* @__PURE__ */ React.createElement("div", { style: tw("bg-card border rounded-xl p-12 flex flex-col max-w-4xl") }, /* @__PURE__ */ React.createElement(
|
|
20
|
-
"h1",
|
|
21
|
-
{
|
|
22
|
-
style: {
|
|
23
|
-
...tw("text-7xl font-bold text-foreground mb-4"),
|
|
24
|
-
opacity,
|
|
25
|
-
transform: `translateY(${translateY}px)`
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
title
|
|
29
|
-
), description && /* @__PURE__ */ React.createElement(
|
|
30
|
-
"p",
|
|
31
|
-
{
|
|
32
|
-
style: {
|
|
33
|
-
...tw("text-3xl text-muted-foreground"),
|
|
34
|
-
opacity: Math.min(1, (progress - 0.3) * 2)
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
description
|
|
38
|
-
)));
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
Template as default,
|
|
42
|
-
meta
|
|
43
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from "file:///Users/tommyvedvik/Dev/dsgn/node_modules/react/index.js";
|
|
2
|
-
const meta = {
|
|
3
|
-
name: "video",
|
|
4
|
-
description: "Animated video starter template",
|
|
5
|
-
type: "video",
|
|
6
|
-
size: { width: 1200, height: 630 },
|
|
7
|
-
props: {
|
|
8
|
-
title: "string",
|
|
9
|
-
description: "string?"
|
|
10
|
-
},
|
|
11
|
-
video: {
|
|
12
|
-
fps: 30,
|
|
13
|
-
duration: 3
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
function Template({ title, description, frame, progress, tw }) {
|
|
17
|
-
const opacity = Math.min(1, progress * 2);
|
|
18
|
-
const translateY = 20 - progress * 20;
|
|
19
|
-
return /* @__PURE__ */ React.createElement("div", { style: tw("w-full h-full flex flex-col justify-center items-center bg-background p-16") }, /* @__PURE__ */ React.createElement("div", { style: tw("bg-card border rounded-xl p-12 flex flex-col max-w-4xl") }, /* @__PURE__ */ React.createElement(
|
|
20
|
-
"h1",
|
|
21
|
-
{
|
|
22
|
-
style: {
|
|
23
|
-
...tw("text-7xl font-bold text-foreground mb-4"),
|
|
24
|
-
opacity,
|
|
25
|
-
transform: `translateY(${translateY}px)`
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
title
|
|
29
|
-
), description && /* @__PURE__ */ React.createElement(
|
|
30
|
-
"p",
|
|
31
|
-
{
|
|
32
|
-
style: {
|
|
33
|
-
...tw("text-3xl text-muted-foreground"),
|
|
34
|
-
opacity: Math.min(1, (progress - 0.3) * 2)
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
description
|
|
38
|
-
)));
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
Template as default,
|
|
42
|
-
meta
|
|
43
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "video",
|
|
3
|
-
"description": "Animated video starter template",
|
|
4
|
-
"type": "video",
|
|
5
|
-
"size": {
|
|
6
|
-
"width": 1200,
|
|
7
|
-
"height": 630
|
|
8
|
-
},
|
|
9
|
-
"props": {
|
|
10
|
-
"title": "string",
|
|
11
|
-
"description": "string?"
|
|
12
|
-
},
|
|
13
|
-
"video": {
|
|
14
|
-
"fps": 30,
|
|
15
|
-
"duration": 3
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export const meta = {
|
|
2
|
-
name: "video",
|
|
3
|
-
description: "Animated video starter template",
|
|
4
|
-
type: "video",
|
|
5
|
-
size: { width: 1200, height: 630 },
|
|
6
|
-
props: {
|
|
7
|
-
title: "string",
|
|
8
|
-
description: "string?"
|
|
9
|
-
},
|
|
10
|
-
video: {
|
|
11
|
-
fps: 30,
|
|
12
|
-
duration: 3
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default function Template({ title, description, frame, progress, tw }) {
|
|
17
|
-
// Fade in animation
|
|
18
|
-
const opacity = Math.min(1, progress * 2);
|
|
19
|
-
|
|
20
|
-
// Slide up animation
|
|
21
|
-
const translateY = 20 - (progress * 20);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div style={tw('w-full h-full flex flex-col justify-center items-center bg-background p-16')}>
|
|
25
|
-
<div style={tw('bg-card border rounded-xl p-12 flex flex-col max-w-4xl')}>
|
|
26
|
-
<h1
|
|
27
|
-
style={{
|
|
28
|
-
...tw('text-7xl font-bold text-foreground mb-4'),
|
|
29
|
-
opacity,
|
|
30
|
-
transform: `translateY(${translateY}px)`
|
|
31
|
-
}}
|
|
32
|
-
>
|
|
33
|
-
{title}
|
|
34
|
-
</h1>
|
|
35
|
-
{description && (
|
|
36
|
-
<p
|
|
37
|
-
style={{
|
|
38
|
-
...tw('text-3xl text-muted-foreground'),
|
|
39
|
-
opacity: Math.min(1, (progress - 0.3) * 2)
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
{description}
|
|
43
|
-
</p>
|
|
44
|
-
)}
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
}
|