agentcut 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +11 -2
- package/dist/bridge.d.ts +45 -0
- package/dist/bridge.js +691 -0
- package/dist/bridge.js.map +1 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.js +50 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/log.d.ts +1 -0
- package/dist/log.js +14 -0
- package/dist/log.js.map +1 -0
- package/dist/studio/agents/claude.d.ts +7 -0
- package/dist/studio/agents/claude.js +155 -0
- package/dist/studio/agents/claude.js.map +1 -0
- package/dist/studio/agents/codex.d.ts +4 -0
- package/dist/studio/agents/codex.js +169 -0
- package/dist/studio/agents/codex.js.map +1 -0
- package/dist/studio/agents/index.d.ts +8 -0
- package/dist/studio/agents/index.js +50 -0
- package/dist/studio/agents/index.js.map +1 -0
- package/dist/studio/agents/types.d.ts +131 -0
- package/dist/studio/agents/types.js +11 -0
- package/dist/studio/agents/types.js.map +1 -0
- package/dist/studio/bundler.d.ts +29 -0
- package/dist/studio/bundler.js +136 -0
- package/dist/studio/bundler.js.map +1 -0
- package/dist/studio/chat.d.ts +147 -0
- package/dist/studio/chat.js +681 -0
- package/dist/studio/chat.js.map +1 -0
- package/dist/studio/cli.d.ts +2 -0
- package/dist/studio/cli.js +194 -0
- package/dist/studio/cli.js.map +1 -0
- package/dist/studio/components.d.ts +4 -0
- package/dist/studio/components.js +36 -0
- package/dist/studio/components.js.map +1 -0
- package/dist/studio/host.d.ts +105 -0
- package/dist/studio/host.js +634 -0
- package/dist/studio/host.js.map +1 -0
- package/dist/studio/http.d.ts +21 -0
- package/dist/studio/http.js +240 -0
- package/dist/studio/http.js.map +1 -0
- package/dist/studio/music.d.ts +35 -0
- package/dist/studio/music.js +130 -0
- package/dist/studio/music.js.map +1 -0
- package/dist/studio/proc.d.ts +11 -0
- package/dist/studio/proc.js +69 -0
- package/dist/studio/proc.js.map +1 -0
- package/dist/studio/projects.d.ts +84 -0
- package/dist/studio/projects.js +369 -0
- package/dist/studio/projects.js.map +1 -0
- package/dist/studio/render.d.ts +24 -0
- package/dist/studio/render.js +197 -0
- package/dist/studio/render.js.map +1 -0
- package/dist/studio/reveal.d.ts +7 -0
- package/dist/studio/reveal.js +49 -0
- package/dist/studio/reveal.js.map +1 -0
- package/dist/studio/schema.d.ts +4152 -0
- package/dist/studio/schema.js +358 -0
- package/dist/studio/schema.js.map +1 -0
- package/dist/studio/tools.d.ts +2 -0
- package/dist/studio/tools.js +165 -0
- package/dist/studio/tools.js.map +1 -0
- package/dist/studio/voice.d.ts +150 -0
- package/dist/studio/voice.js +434 -0
- package/dist/studio/voice.js.map +1 -0
- package/dist/studio/workspace.d.ts +31 -0
- package/dist/studio/workspace.js +187 -0
- package/dist/studio/workspace.js.map +1 -0
- package/package.json +50 -4
- package/template/AGENTS.md +13 -0
- package/template/components/CATALOG.md +1306 -0
- package/template/components/README.md +61 -0
- package/template/components/STYLES.md +246 -0
- package/template/components/arcade-title/ArcadeTitle.tsx +860 -0
- package/template/components/arcade-title/meta.json +28 -0
- package/template/components/aurora/Aurora.tsx +63 -0
- package/template/components/aurora/meta.json +28 -0
- package/template/components/bar-wipe-title/BarWipeTitle.tsx +94 -0
- package/template/components/bar-wipe-title/meta.json +29 -0
- package/template/components/before-after/BeforeAfter.tsx +89 -0
- package/template/components/before-after/meta.json +233 -0
- package/template/components/bento-grid/BentoGrid.tsx +202 -0
- package/template/components/bento-grid/meta.json +25 -0
- package/template/components/blur-in-title/BlurInTitle.tsx +121 -0
- package/template/components/blur-in-title/meta.json +32 -0
- package/template/components/catalog.json +8730 -0
- package/template/components/catalog.ts +103 -0
- package/template/components/chat-thread/ChatThread.tsx +128 -0
- package/template/components/chat-thread/meta.json +24 -0
- package/template/components/checklist/Checklist.tsx +129 -0
- package/template/components/checklist/meta.json +25 -0
- package/template/components/confetti/Confetti.tsx +109 -0
- package/template/components/confetti/meta.json +28 -0
- package/template/components/countdown/Countdown.tsx +166 -0
- package/template/components/countdown/meta.json +28 -0
- package/template/components/cut-and-paste/CutAndPaste.tsx +654 -0
- package/template/components/cut-and-paste/meta.json +29 -0
- package/template/components/decode-text/DecodeText.tsx +97 -0
- package/template/components/decode-text/meta.json +29 -0
- package/template/components/editorial-quote/EditorialQuote.tsx +122 -0
- package/template/components/editorial-quote/meta.json +28 -0
- package/template/components/glitch-title/GlitchTitle.tsx +171 -0
- package/template/components/glitch-title/meta.json +32 -0
- package/template/components/halftone-wave/HalftoneWave.tsx +106 -0
- package/template/components/halftone-wave/meta.json +28 -0
- package/template/components/highlighter/Highlighter.tsx +142 -0
- package/template/components/highlighter/meta.json +28 -0
- package/template/components/hook-card/HookCard.tsx +552 -0
- package/template/components/hook-card/meta.json +304 -0
- package/template/components/index.ts +149 -0
- package/template/components/iris-wipe/IrisWipe.tsx +76 -0
- package/template/components/iris-wipe/meta.json +24 -0
- package/template/components/kinetic-poster/KineticPoster.tsx +437 -0
- package/template/components/kinetic-poster/meta.json +31 -0
- package/template/components/kinetic-punch/KineticPunch.tsx +80 -0
- package/template/components/kinetic-punch/meta.json +30 -0
- package/template/components/lava-lamp/LavaLamp.tsx +92 -0
- package/template/components/lava-lamp/meta.json +28 -0
- package/template/components/letter-cascade/LetterCascade.tsx +102 -0
- package/template/components/letter-cascade/meta.json +29 -0
- package/template/components/lib.ts +179 -0
- package/template/components/light-leak/LightLeakTransition.tsx +43 -0
- package/template/components/light-leak/meta.json +74 -0
- package/template/components/line-diagram/LineDiagram.tsx +205 -0
- package/template/components/line-diagram/meta.json +217 -0
- package/template/components/list-card/ListCard.tsx +104 -0
- package/template/components/list-card/meta.json +232 -0
- package/template/components/logo-sting/LogoSting.tsx +129 -0
- package/template/components/logo-sting/meta.json +29 -0
- package/template/components/looks.tsx +1447 -0
- package/template/components/lower-third/LowerThird.tsx +100 -0
- package/template/components/lower-third/meta.json +24 -0
- package/template/components/marquee/Marquee.tsx +100 -0
- package/template/components/marquee/meta.json +30 -0
- package/template/components/notification/Notification.tsx +115 -0
- package/template/components/notification/meta.json +27 -0
- package/template/components/outline-fill/OutlineFill.tsx +106 -0
- package/template/components/outline-fill/meta.json +28 -0
- package/template/components/panel-sweep/PanelSweep.tsx +86 -0
- package/template/components/panel-sweep/meta.json +25 -0
- package/template/components/prompt-box/PromptBox.tsx +131 -0
- package/template/components/prompt-box/meta.json +24 -0
- package/template/components/props.ts +73 -0
- package/template/components/quote-card/QuoteCard.tsx +71 -0
- package/template/components/quote-card/meta.json +216 -0
- package/template/components/shape-shift/ShapeShift.tsx +420 -0
- package/template/components/shape-shift/meta.json +31 -0
- package/template/components/slide-zoom-message/SlideZoomMessage.tsx +179 -0
- package/template/components/slide-zoom-message/meta.json +199 -0
- package/template/components/social-post/SocialPost.tsx +185 -0
- package/template/components/social-post/meta.json +30 -0
- package/template/components/split-flap/SplitFlap.tsx +191 -0
- package/template/components/split-flap/meta.json +29 -0
- package/template/components/spotlight-grid/SpotlightGrid.tsx +84 -0
- package/template/components/spotlight-grid/meta.json +25 -0
- package/template/components/stat-counter/StatCounter.tsx +117 -0
- package/template/components/stat-counter/meta.json +27 -0
- package/template/components/sticker-badge/StickerBadge.tsx +46 -0
- package/template/components/sticker-badge/meta.json +220 -0
- package/template/components/sticker-slam/StickerSlam.tsx +941 -0
- package/template/components/sticker-slam/meta.json +34 -0
- package/template/components/style-layer.tsx +233 -0
- package/template/components/styles.json +762 -0
- package/template/components/styles.ts +113 -0
- package/template/components/target-lock/TargetLock.tsx +662 -0
- package/template/components/target-lock/meta.json +32 -0
- package/template/components/text-reveal/TextReveal.tsx +99 -0
- package/template/components/text-reveal/meta.json +28 -0
- package/template/components/tile-wipe/TileWipe.tsx +75 -0
- package/template/components/tile-wipe/meta.json +24 -0
- package/template/components/type-zoom/TypeZoom.tsx +103 -0
- package/template/components/type-zoom/meta.json +27 -0
- package/template/components/types.ts +66 -0
- package/template/components/typewriter/Typewriter.tsx +112 -0
- package/template/components/typewriter/meta.json +29 -0
- package/template/components/word-pop/WordPop.tsx +59 -0
- package/template/components/word-pop/meta.json +237 -0
- package/template/components/word-stack/WordStack.tsx +122 -0
- package/template/components/word-stack/meta.json +27 -0
- package/template/components/word-swap/WordSwap.tsx +127 -0
- package/template/components/word-swap/meta.json +30 -0
- package/template/presets/charcoal-sketch/PROMPT.md +48 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-0.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-1.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-2.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/sketch-paper.jpg +0 -0
- package/template/presets/charcoal-sketch/assets/paper/smudge.png +0 -0
- package/template/presets/charcoal-sketch/poster.jpg +0 -0
- package/template/presets/charcoal-sketch/preset.json +17 -0
- package/template/presets/charcoal-sketch/preview.mp4 +0 -0
- package/template/presets/charcoal-sketch/scenes/Grain.tsx +23 -0
- package/template/presets/charcoal-sketch/scenes/Paper.tsx +17 -0
- package/template/presets/charcoal-sketch/scenes/examples/Agents.tsx +100 -0
- package/template/presets/charcoal-sketch/scenes/examples/Approvals.tsx +110 -0
- package/template/presets/charcoal-sketch/scenes/examples/Blog.tsx +105 -0
- package/template/presets/charcoal-sketch/scenes/examples/EndCard.tsx +41 -0
- package/template/presets/charcoal-sketch/scenes/examples/Hook.tsx +130 -0
- package/template/presets/charcoal-sketch/scenes/examples/Ideas.tsx +92 -0
- package/template/presets/charcoal-sketch/scenes/examples/Posting.tsx +128 -0
- package/template/presets/charcoal-sketch/scenes/lib/painfix.tsx +119 -0
- package/template/presets/charcoal-sketch/scenes/lib/sketch.tsx +291 -0
- package/template/presets/charcoal-sketch/scripts/build_layers.example.py +193 -0
- package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -0
- package/template/presets/charcoal-sketch/scripts/make_textures.py +93 -0
- package/template/presets/punk-cut-paper/PROMPT.md +37 -0
- package/template/presets/punk-cut-paper/assets/paper/desk-cream.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/grain-overlay.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-black.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-red.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-yellow.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/kraft.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/newsprint.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/paper-cream.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/paper-white.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/tape.png +0 -0
- package/template/presets/punk-cut-paper/build_layers.example.py +150 -0
- package/template/presets/punk-cut-paper/poster.jpg +0 -0
- package/template/presets/punk-cut-paper/preset.json +15 -0
- package/template/presets/punk-cut-paper/preview.mp4 +0 -0
- package/template/presets/punk-cut-paper/scenes/Backdrop.tsx +76 -0
- package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -0
- package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -0
- package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -0
- package/template/presets/punk-cut-paper/scenes/Xerox.tsx +31 -0
- package/template/presets/punk-cut-paper/scenes/lib/punk.tsx +208 -0
- package/template/runtime/composition.tsx +920 -0
- package/template/runtime/helpers.tsx +228 -0
- package/template/runtime/index.tsx +22 -0
- package/template/runtime/types.ts +248 -0
- package/template/skill/SKILL.md +149 -0
- package/template/skill/references/browser-export.md +61 -0
- package/template/skill/references/components.md +38 -0
- package/template/skill/references/craft.md +53 -0
- package/template/skill/references/cursor.md +91 -0
- package/template/skill/references/footage.md +73 -0
- package/template/skill/references/format.md +140 -0
- package/template/skill/references/presets.md +56 -0
- package/template/skill/references/sound.md +128 -0
- package/template/starter/.studio/chat.json +1 -0
- package/template/starter/assets/.keep +0 -0
- package/template/starter/layers.json +46 -0
- package/template/starter/notes.md +4 -0
- package/template/starter/project.json +13 -0
- package/template/starter/renders/.keep +0 -0
- package/template/starter/scenes/Title.tsx +38 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
2
|
+
import { FONTS, alpha, blurStyle, easeOutExpo, exitOut, fill, glowStyle, mix, pop, ramp, unit } from "../lib";
|
|
3
|
+
import type { MotionBaseProps } from "../types";
|
|
4
|
+
|
|
5
|
+
type Props = MotionBaseProps & {
|
|
6
|
+
title: string;
|
|
7
|
+
cards: string[];
|
|
8
|
+
accent: string;
|
|
9
|
+
theme: string;
|
|
10
|
+
background: string;
|
|
11
|
+
chart: boolean;
|
|
12
|
+
font: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** [col, row, colSpan, rowSpan] for each card. */
|
|
16
|
+
type Cell = [number, number, number, number];
|
|
17
|
+
|
|
18
|
+
/** Grid columns, row weights and each card's cell, for 4–6 cards. */
|
|
19
|
+
function layout(n: number, vertical: boolean): { cols: number; rows: number[]; cells: Cell[] } {
|
|
20
|
+
if (vertical) {
|
|
21
|
+
// Hero across the top, the rest two per row (an odd one out spans the row).
|
|
22
|
+
const rest = n - 1;
|
|
23
|
+
const cells: Cell[] = [[0, 0, 2, 1]];
|
|
24
|
+
const rows = [1.5];
|
|
25
|
+
for (let i = 0; i < rest; i++) {
|
|
26
|
+
if (i % 2 === 0) rows.push(1);
|
|
27
|
+
const alone = i === rest - 1 && i % 2 === 0;
|
|
28
|
+
cells.push([i % 2, 1 + Math.floor(i / 2), alone ? 2 : 1, 1]);
|
|
29
|
+
}
|
|
30
|
+
return { cols: 2, rows, cells };
|
|
31
|
+
}
|
|
32
|
+
if (n <= 4) return { cols: 4, rows: [1, 1], cells: [[0, 0, 2, 2], [2, 0, 2, 1], [2, 1, 1, 1], [3, 1, 1, 1]] };
|
|
33
|
+
if (n === 5)
|
|
34
|
+
return { cols: 4, rows: [1, 1], cells: [[0, 0, 2, 2], [2, 0, 1, 1], [3, 0, 1, 1], [2, 1, 1, 1], [3, 1, 1, 1]] };
|
|
35
|
+
return {
|
|
36
|
+
cols: 4,
|
|
37
|
+
rows: [1, 1, 0.8],
|
|
38
|
+
cells: [[0, 0, 2, 2], [2, 0, 2, 1], [2, 1, 1, 1], [3, 1, 1, 1], [0, 2, 2, 1], [2, 2, 2, 1]],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const BARS = [0.32, 0.5, 0.41, 0.66, 0.58, 0.8, 0.72, 1];
|
|
43
|
+
|
|
44
|
+
/** A launch-style bento grid: a big hero card and smaller feature cards that spring into place one by one. */
|
|
45
|
+
export function BentoGrid(props: Props) {
|
|
46
|
+
const frame = useCurrentFrame();
|
|
47
|
+
const { width, height, fps, durationInFrames: d } = props;
|
|
48
|
+
const u = unit(width, height);
|
|
49
|
+
const vertical = height > width;
|
|
50
|
+
const dark = props.theme !== "light";
|
|
51
|
+
const out = exitOut(frame, d, 14);
|
|
52
|
+
const cards = props.cards.filter((c) => c.trim()).slice(0, 6);
|
|
53
|
+
while (cards.length < 4) cards.push("Feature — Add a line in Cards");
|
|
54
|
+
const { cols, rows, cells } = layout(cards.length, vertical);
|
|
55
|
+
|
|
56
|
+
const fg = dark ? "#f4f4f5" : "#0f1115";
|
|
57
|
+
const muted = dark ? "rgba(244,244,245,0.6)" : "rgba(15,17,21,0.58)";
|
|
58
|
+
const border = dark ? "rgba(255,255,255,0.08)" : "rgba(15,17,21,0.08)";
|
|
59
|
+
const bg = fill(props.background) ?? (dark ? "#0a0a0d" : "#f2f2f5");
|
|
60
|
+
const font = FONTS[props.font] ?? FONTS.display;
|
|
61
|
+
|
|
62
|
+
const padX = (vertical ? 56 : 110) * u;
|
|
63
|
+
const titleSize = (vertical ? 70 : 64) * u;
|
|
64
|
+
const hasTitle = props.title.trim().length > 0;
|
|
65
|
+
const top = (vertical ? 200 : 90) * u + (hasTitle ? titleSize * 1.7 : 0);
|
|
66
|
+
const bottom = (vertical ? 200 : 90) * u;
|
|
67
|
+
const gap = 22 * u;
|
|
68
|
+
const colW = (width - padX * 2 - gap * (cols - 1)) / cols;
|
|
69
|
+
const rowUnit = (height - top - bottom - gap * (rows.length - 1)) / rows.reduce((a, b) => a + b, 0);
|
|
70
|
+
const rowTop = (r: number) => rows.slice(0, r).reduce((a, b) => a + b * rowUnit + gap, 0);
|
|
71
|
+
const rowSpanH = (r: number, span: number) =>
|
|
72
|
+
rows.slice(r, r + span).reduce((a, b) => a + b * rowUnit, 0) + gap * (span - 1);
|
|
73
|
+
const titleIn = ramp(frame, 0, 24, easeOutExpo);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<AbsoluteFill style={{ background: bg, opacity: out, fontFamily: FONTS.sans }}>
|
|
77
|
+
<div style={glowStyle(width * 0.3, height * 0.35, width * 0.9, height * 0.9, props.accent, dark ? 0.22 : 0.12)} />
|
|
78
|
+
{hasTitle ? (
|
|
79
|
+
<div
|
|
80
|
+
style={{
|
|
81
|
+
position: "absolute",
|
|
82
|
+
left: padX,
|
|
83
|
+
right: padX,
|
|
84
|
+
top: top - titleSize * 1.7,
|
|
85
|
+
fontFamily: font,
|
|
86
|
+
fontWeight: 700,
|
|
87
|
+
fontSize: titleSize,
|
|
88
|
+
letterSpacing: "-0.035em",
|
|
89
|
+
lineHeight: 1.05,
|
|
90
|
+
color: fg,
|
|
91
|
+
textAlign: vertical ? "left" : "center",
|
|
92
|
+
opacity: titleIn,
|
|
93
|
+
transform: `translateY(${(1 - titleIn) * 30 * u}px)`,
|
|
94
|
+
...blurStyle((1 - titleIn) * 10 * u),
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
{props.title}
|
|
98
|
+
</div>
|
|
99
|
+
) : null}
|
|
100
|
+
{cards.map((card, i) => {
|
|
101
|
+
const [c, r, cs, rs] = cells[i];
|
|
102
|
+
const [head, ...rest] = card.split(/\s+[—–-]\s+/);
|
|
103
|
+
const detail = rest.join(" — ");
|
|
104
|
+
const hero = i === 0;
|
|
105
|
+
const p = pop(frame, fps, 8 + i * 5, 150);
|
|
106
|
+
const w = colW * cs + gap * (cs - 1);
|
|
107
|
+
const h = rowSpanH(r, rs);
|
|
108
|
+
const k = Math.min(w, h * 1.6);
|
|
109
|
+
const headSize = Math.max(22 * u, Math.min((hero ? 66 : 38) * u, k * (hero ? 0.09 : 0.11)));
|
|
110
|
+
const chartTop = hero && props.chart;
|
|
111
|
+
return (
|
|
112
|
+
<div
|
|
113
|
+
key={i}
|
|
114
|
+
style={{
|
|
115
|
+
position: "absolute",
|
|
116
|
+
left: padX + c * (colW + gap),
|
|
117
|
+
top: top + rowTop(r),
|
|
118
|
+
width: w,
|
|
119
|
+
height: h,
|
|
120
|
+
boxSizing: "border-box",
|
|
121
|
+
borderRadius: 34 * u,
|
|
122
|
+
background: dark ? (hero ? "#1b1c23" : "#15161b") : "#ffffff",
|
|
123
|
+
border: `${Math.max(1, 1.5 * u)}px solid ${hero ? alpha(props.accent, 0.35) : border}`,
|
|
124
|
+
boxShadow: `0 ${18 * u}px ${50 * u}px rgba(0,0,0,${dark ? 0.35 : 0.08})`,
|
|
125
|
+
overflow: "hidden",
|
|
126
|
+
opacity: Math.min(1, p * 1.4),
|
|
127
|
+
transform: `translateY(${(1 - p) * 70 * u}px) scale(${mix(0.9, 1, p)})`,
|
|
128
|
+
display: "flex",
|
|
129
|
+
flexDirection: "column",
|
|
130
|
+
justifyContent: chartTop ? "flex-start" : "flex-end",
|
|
131
|
+
padding: 34 * u,
|
|
132
|
+
color: fg,
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
{hero ? <div style={glowStyle(w * 0.85, h * 0.05, w * 1.1, h * 1.1, props.accent, dark ? 0.35 : 0.18)} /> : null}
|
|
136
|
+
{!hero ? (
|
|
137
|
+
<div
|
|
138
|
+
style={{
|
|
139
|
+
position: "absolute",
|
|
140
|
+
top: 30 * u,
|
|
141
|
+
left: 34 * u,
|
|
142
|
+
width: 46 * u,
|
|
143
|
+
height: 46 * u,
|
|
144
|
+
boxSizing: "border-box",
|
|
145
|
+
borderRadius: 14 * u,
|
|
146
|
+
background: alpha(props.accent, dark ? 0.18 : 0.12),
|
|
147
|
+
border: `${1.5 * u}px solid ${alpha(props.accent, 0.4)}`,
|
|
148
|
+
display: "flex",
|
|
149
|
+
alignItems: "center",
|
|
150
|
+
justifyContent: "center",
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
<div style={{ width: 16 * u, height: 16 * u, borderRadius: i % 2 ? "50%" : 4 * u, background: props.accent }} />
|
|
154
|
+
</div>
|
|
155
|
+
) : null}
|
|
156
|
+
<div style={{ position: "relative" }}>
|
|
157
|
+
<div style={{ fontFamily: font, fontWeight: 700, fontSize: headSize, letterSpacing: "-0.03em", lineHeight: 1.05 }}>
|
|
158
|
+
{head}
|
|
159
|
+
</div>
|
|
160
|
+
{detail ? (
|
|
161
|
+
<div
|
|
162
|
+
style={{
|
|
163
|
+
marginTop: 10 * u,
|
|
164
|
+
fontSize: Math.max(18 * u, headSize * (hero ? 0.42 : 0.62)),
|
|
165
|
+
lineHeight: 1.3,
|
|
166
|
+
color: muted,
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
{detail}
|
|
170
|
+
</div>
|
|
171
|
+
) : null}
|
|
172
|
+
</div>
|
|
173
|
+
{chartTop ? (
|
|
174
|
+
<svg
|
|
175
|
+
width={w - 68 * u}
|
|
176
|
+
height={h * 0.45}
|
|
177
|
+
viewBox={`0 0 ${BARS.length * 10} 100`}
|
|
178
|
+
preserveAspectRatio="none"
|
|
179
|
+
style={{ position: "absolute", left: 34 * u, bottom: 34 * u }}
|
|
180
|
+
>
|
|
181
|
+
{BARS.map((b, j) => {
|
|
182
|
+
const bh = b * 100 * ramp(frame, 22 + j * 3, 26, easeOutExpo);
|
|
183
|
+
return (
|
|
184
|
+
<rect
|
|
185
|
+
key={j}
|
|
186
|
+
x={j * 10 + 1.6}
|
|
187
|
+
y={100 - bh}
|
|
188
|
+
width={6.8}
|
|
189
|
+
height={bh}
|
|
190
|
+
rx={1.6}
|
|
191
|
+
fill={j === BARS.length - 1 ? props.accent : alpha(props.accent, 0.22 + 0.06 * j)}
|
|
192
|
+
/>
|
|
193
|
+
);
|
|
194
|
+
})}
|
|
195
|
+
</svg>
|
|
196
|
+
) : null}
|
|
197
|
+
</div>
|
|
198
|
+
);
|
|
199
|
+
})}
|
|
200
|
+
</AbsoluteFill>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "bento-grid",
|
|
3
|
+
"name": "Bento Grid",
|
|
4
|
+
"category": "AI & Product",
|
|
5
|
+
"description": "A launch-style bento grid: a big hero card with an animated bar chart and smaller feature cards that spring into place one by one.",
|
|
6
|
+
"useWhen": "Summing up a product's features in one shot: a launch video's \"everything you get\" moment, a changelog recap, a plan overview, the closing beat before the call to action.",
|
|
7
|
+
"durationInFrames": 120,
|
|
8
|
+
"layer": "full",
|
|
9
|
+
"tags": ["bento", "grid", "features", "cards", "launch", "product", "overview", "showcase"],
|
|
10
|
+
"props": {
|
|
11
|
+
"title": { "type": "text", "label": "Heading", "default": "Everything you need to ship", "help": "Leave empty for none." },
|
|
12
|
+
"cards": { "type": "lines", "label": "Cards", "default": ["10× faster — Edit a launch video in minutes", "Auto zoom — Follows your cursor", "Captions — 40+ languages", "Music — Royalty-free", "Export — 4K, 60 fps"], "max": 6, "help": "4 to 6 lines, \"Title — detail\". The first is the big card." },
|
|
13
|
+
"accent": { "type": "color", "style": "accent", "label": "Accent", "default": "#8b5cf6" },
|
|
14
|
+
"theme": { "type": "select", "style": "theme", "label": "Theme", "default": "dark", "options": [{ "value": "dark", "label": "Dark" }, { "value": "light", "label": "Light" }] },
|
|
15
|
+
"background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" uses the theme's background." },
|
|
16
|
+
"chart": { "type": "boolean", "label": "Chart in big card", "default": true },
|
|
17
|
+
"font": { "type": "select", "style": "font", "label": "Heading font", "default": "display", "options": [{ "value": "display", "label": "Bricolage" }, { "value": "sans", "label": "Inter" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "serif", "label": "Instrument Serif" }, { "value": "syne", "label": "Syne" }, { "value": "archivo", "label": "Archivo Black" }, { "value": "caveat", "label": "Caveat" }, { "value": "pixel", "label": "VT323" }, { "value": "tech", "label": "Orbitron" }, { "value": "heavy", "label": "Montserrat" }, { "value": "retro", "label": "Bungee" }] }
|
|
18
|
+
},
|
|
19
|
+
"examples": [
|
|
20
|
+
{ "name": "Launch", "props": {} },
|
|
21
|
+
{ "name": "Light, four cards", "props": { "title": "", "cards": ["$2.4M — Saved in production", "Teams — Invite your whole crew", "Brand kits — Fonts and colors", "API — Render from code"], "theme": "light", "accent": "#0ea5e9", "font": "sans" } },
|
|
22
|
+
{ "name": "Six cards", "props": { "title": "New in version 4", "cards": ["Studio — Claude edits with you", "Raw takes — Cursor and clicks", "Themes — Dark and light", "Components — 30+ animations", "Fonts — Nine families", "Export — In your browser"], "accent": "#f97316", "font": "grotesk" } }
|
|
23
|
+
],
|
|
24
|
+
"stillAt": 0.7
|
|
25
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
2
|
+
import { FONTS, blurStyle, easeOutExpo, exitOut, fill, mix, ramp, splitHighlights, unit } from "../lib";
|
|
3
|
+
import type { MotionBaseProps } from "../types";
|
|
4
|
+
|
|
5
|
+
type Props = MotionBaseProps & {
|
|
6
|
+
kicker: string;
|
|
7
|
+
lines: string[];
|
|
8
|
+
by: string;
|
|
9
|
+
color: string;
|
|
10
|
+
accent: string;
|
|
11
|
+
background: string;
|
|
12
|
+
size: number;
|
|
13
|
+
weight: string;
|
|
14
|
+
font: string;
|
|
15
|
+
italicAccent: boolean;
|
|
16
|
+
align: string;
|
|
17
|
+
stagger: number;
|
|
18
|
+
blur: number;
|
|
19
|
+
tracking: boolean;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The focus-pull title: letters (or words) come out of a heavy blur, settle from a slight scale and
|
|
24
|
+
* the line tightens its tracking as it lands. On the way out everything melts back into blur.
|
|
25
|
+
*/
|
|
26
|
+
export function BlurInTitle(props: Props) {
|
|
27
|
+
const frame = useCurrentFrame();
|
|
28
|
+
const { width, height, durationInFrames: d } = props;
|
|
29
|
+
const u = unit(width, height);
|
|
30
|
+
const vertical = height > width;
|
|
31
|
+
const fontSize = (props.size / 100) * Math.min(width, height) * (vertical ? 1.05 : 1);
|
|
32
|
+
const maxBlur = fontSize * 0.04 * props.blur;
|
|
33
|
+
const out = exitOut(frame, d, 16);
|
|
34
|
+
const justify = props.align === "left" ? "flex-start" : props.align === "right" ? "flex-end" : "center";
|
|
35
|
+
const settle = ramp(frame, 0, Math.min(48, d * 0.5), easeOutExpo);
|
|
36
|
+
const spacing = props.tracking ? mix(0.14, -0.03, settle) : -0.03;
|
|
37
|
+
const startAt = props.kicker ? 8 : 0;
|
|
38
|
+
let index = 0;
|
|
39
|
+
|
|
40
|
+
const piece = (text: string, highlighted: boolean, key: number) => {
|
|
41
|
+
const t = ramp(frame, startAt + index++ * props.stagger, 26, easeOutExpo);
|
|
42
|
+
const gone = 1 - out;
|
|
43
|
+
return (
|
|
44
|
+
<span
|
|
45
|
+
key={key}
|
|
46
|
+
style={{
|
|
47
|
+
display: "inline-block",
|
|
48
|
+
whiteSpace: "pre",
|
|
49
|
+
color: highlighted ? props.accent : props.color,
|
|
50
|
+
fontStyle: highlighted && props.italicAccent ? "italic" : undefined,
|
|
51
|
+
opacity: Math.min(1, t * 1.3) * out,
|
|
52
|
+
transform: `translateY(${mix(fontSize * 0.18, 0, t) - gone * fontSize * 0.1}px) scale(${mix(1.18, 1, t)})`,
|
|
53
|
+
...blurStyle(maxBlur * (1 - t) + maxBlur * 0.8 * gone),
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
{text}
|
|
57
|
+
</span>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<AbsoluteFill
|
|
63
|
+
style={{
|
|
64
|
+
background: fill(props.background),
|
|
65
|
+
alignItems: justify,
|
|
66
|
+
justifyContent: "center",
|
|
67
|
+
padding: `0 ${Math.round((vertical ? 70 : 120) * u)}px`,
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<div style={{ display: "flex", flexDirection: "column", alignItems: justify, gap: fontSize * 0.04 }}>
|
|
71
|
+
{props.kicker ? (
|
|
72
|
+
<div
|
|
73
|
+
style={{
|
|
74
|
+
fontFamily: FONTS.mono,
|
|
75
|
+
fontSize: Math.max(14, fontSize * 0.2),
|
|
76
|
+
letterSpacing: `${mix(0.5, 0.2, settle)}em`,
|
|
77
|
+
textTransform: "uppercase",
|
|
78
|
+
color: props.accent,
|
|
79
|
+
marginBottom: fontSize * 0.2,
|
|
80
|
+
opacity: ramp(frame, 0, 18) * out,
|
|
81
|
+
...blurStyle(fontSize * 0.06 * (1 - ramp(frame, 0, 18))),
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
{props.kicker}
|
|
85
|
+
</div>
|
|
86
|
+
) : null}
|
|
87
|
+
{props.lines.map((line, lineIndex) => {
|
|
88
|
+
const words = splitHighlights(line);
|
|
89
|
+
return (
|
|
90
|
+
<div
|
|
91
|
+
key={lineIndex}
|
|
92
|
+
style={{
|
|
93
|
+
display: "flex",
|
|
94
|
+
flexWrap: "wrap",
|
|
95
|
+
justifyContent: justify,
|
|
96
|
+
columnGap: fontSize * 0.24,
|
|
97
|
+
fontFamily: FONTS[props.font] ?? FONTS.sans,
|
|
98
|
+
fontWeight: Number(props.weight) || 700,
|
|
99
|
+
fontSize,
|
|
100
|
+
lineHeight: 1.06,
|
|
101
|
+
letterSpacing: `${spacing}em`,
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
{props.by === "line"
|
|
105
|
+
? piece(line.replace(/\*/g, ""), false, 0)
|
|
106
|
+
: words.map((word, wordIndex) =>
|
|
107
|
+
props.by === "letter" ? (
|
|
108
|
+
<span key={wordIndex} style={{ display: "inline-block", whiteSpace: "nowrap" }}>
|
|
109
|
+
{Array.from(word.text).map((char, charIndex) => piece(char, word.highlighted, charIndex))}
|
|
110
|
+
</span>
|
|
111
|
+
) : (
|
|
112
|
+
piece(word.text, word.highlighted, wordIndex)
|
|
113
|
+
),
|
|
114
|
+
)}
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
})}
|
|
118
|
+
</div>
|
|
119
|
+
</AbsoluteFill>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "blur-in-title",
|
|
3
|
+
"name": "Blur Focus Title",
|
|
4
|
+
"category": "Text & Titles",
|
|
5
|
+
"description": "A headline that pulls into focus letter by letter: out of a heavy blur, down from a slight scale, tracking tightening as it lands.",
|
|
6
|
+
"useWhen": "Premium, Apple-style openers and reveals: a product name, a one-line promise, a chapter title over footage. Pick it when the video should feel calm and expensive rather than punchy. *Starred* words take the accent (and italic, if on).",
|
|
7
|
+
"durationInFrames": 100,
|
|
8
|
+
"layer": "overlay",
|
|
9
|
+
"tags": ["title", "blur", "focus", "apple", "premium", "letters", "intro", "reveal"],
|
|
10
|
+
"props": {
|
|
11
|
+
"kicker": { "type": "text", "label": "Kicker", "default": "", "help": "Small spaced-out line above the title (leave empty for none)." },
|
|
12
|
+
"lines": { "type": "lines", "label": "Title", "default": ["Think in *motion*"], "max": 4, "help": "One line per row. *Starred* words use the accent." },
|
|
13
|
+
"by": { "type": "select", "label": "Animate by", "default": "letter", "options": [{ "value": "letter", "label": "Letter" }, { "value": "word", "label": "Word" }, { "value": "line", "label": "Line" }] },
|
|
14
|
+
"color": { "type": "color", "style": "text", "label": "Text", "default": "#ffffff" },
|
|
15
|
+
"accent": { "type": "color", "style": "accent", "label": "Accent", "default": "#c4b5fd" },
|
|
16
|
+
"background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" to sit over other layers." },
|
|
17
|
+
"size": { "type": "number", "label": "Size", "default": 12, "min": 4, "max": 24, "step": 0.5, "unit": "% of frame" },
|
|
18
|
+
"weight": { "type": "select", "style": "weight", "label": "Weight", "default": "600", "options": [{ "value": "400", "label": "Regular" }, { "value": "500", "label": "Medium" }, { "value": "600", "label": "Semibold" }, { "value": "700", "label": "Bold" }, { "value": "800", "label": "Extra bold" }] },
|
|
19
|
+
"font": { "type": "select", "style": "font", "label": "Font", "default": "sans", "options": [{ "value": "sans", "label": "Inter" }, { "value": "display", "label": "Bricolage" }, { "value": "serif", "label": "Instrument Serif" }, { "value": "fraunces", "label": "Fraunces" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "syne", "label": "Syne" }, { "value": "wide", "label": "Unbounded" }, { "value": "condensed", "label": "Anton" }, { "value": "mono", "label": "Mono" }, { "value": "archivo", "label": "Archivo Black" }, { "value": "caveat", "label": "Caveat" }, { "value": "pixel", "label": "VT323" }, { "value": "tech", "label": "Orbitron" }, { "value": "heavy", "label": "Montserrat" }, { "value": "retro", "label": "Bungee" }] },
|
|
20
|
+
"italicAccent": { "type": "boolean", "label": "Italic accent words", "default": true },
|
|
21
|
+
"align": { "type": "select", "label": "Align", "default": "center", "options": [{ "value": "left", "label": "Left" }, { "value": "center", "label": "Center" }, { "value": "right", "label": "Right" }] },
|
|
22
|
+
"stagger": { "type": "number", "label": "Delay between pieces", "default": 2, "min": 0.5, "max": 10, "step": 0.5, "unit": "frames" },
|
|
23
|
+
"blur": { "type": "number", "label": "Blur", "default": 1, "min": 0.2, "max": 3, "step": 0.1, "unit": "×" },
|
|
24
|
+
"tracking": { "type": "boolean", "label": "Tighten tracking", "default": true, "help": "Letter spacing closes up as the title lands." }
|
|
25
|
+
},
|
|
26
|
+
"examples": [
|
|
27
|
+
{ "name": "Focus pull", "props": {} },
|
|
28
|
+
{ "name": "Serif keynote", "props": { "kicker": "Introducing", "lines": ["The *quiet* editor"], "font": "serif", "weight": "400", "size": 14, "accent": "#fde68a" } },
|
|
29
|
+
{ "name": "Word by word, bold", "props": { "lines": ["Record. Edit.", "*Ship* it."], "by": "word", "font": "display", "weight": "800", "stagger": 5, "accent": "#34d399", "background": "#0b0d10" } }
|
|
30
|
+
],
|
|
31
|
+
"stillAt": 0.6
|
|
32
|
+
}
|