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,205 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
3
|
+
import { FONTS, easeInOut, exitOut, fill, ramp, unit } from "../lib";
|
|
4
|
+
import type { MotionBaseProps } from "../types";
|
|
5
|
+
|
|
6
|
+
type Props = MotionBaseProps & {
|
|
7
|
+
kind: string;
|
|
8
|
+
title: string;
|
|
9
|
+
labels: string[];
|
|
10
|
+
color: string;
|
|
11
|
+
accent: string;
|
|
12
|
+
background: string;
|
|
13
|
+
font: string;
|
|
14
|
+
size: number;
|
|
15
|
+
speed: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** viewBox units: the diagram is drawn in a 1000×1000 square. */
|
|
19
|
+
const V = 1000;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Minimal explainer line art that draws itself on, black-and-white with one accent: two ideas
|
|
23
|
+
* overlapping, one reaching many, growth, a loop, small vs big, steps up. A title sits under it.
|
|
24
|
+
*/
|
|
25
|
+
export function LineDiagram(props: Props) {
|
|
26
|
+
const frame = useCurrentFrame();
|
|
27
|
+
const { width, height, durationInFrames: d } = props;
|
|
28
|
+
const u = unit(width, height);
|
|
29
|
+
const side = (props.size / 100) * Math.min(width, height) * (height > width ? 1.1 : 1);
|
|
30
|
+
const out = exitOut(frame, d, 10);
|
|
31
|
+
// Every stroke draws over `speed` frames, one after another.
|
|
32
|
+
const step = Math.max(4, props.speed);
|
|
33
|
+
const draw = (i: number) => ramp(frame, 4 + i * step * 0.6, step, easeInOut);
|
|
34
|
+
const stroke = 7;
|
|
35
|
+
const line = { fill: "none", stroke: props.color, strokeWidth: stroke, strokeLinecap: "round" as const, strokeLinejoin: "round" as const, pathLength: 1, strokeDasharray: 1 };
|
|
36
|
+
const label = (text: string | undefined, x: number, y: number, at: number, anchor: "start" | "middle" | "end" = "middle", accent = false) =>
|
|
37
|
+
text ? (
|
|
38
|
+
<text
|
|
39
|
+
x={x}
|
|
40
|
+
y={y}
|
|
41
|
+
textAnchor={anchor}
|
|
42
|
+
fontFamily={FONTS[props.font] ?? FONTS.sans}
|
|
43
|
+
fontWeight={800}
|
|
44
|
+
fontSize={46}
|
|
45
|
+
letterSpacing={2}
|
|
46
|
+
fill={accent ? props.accent : props.color}
|
|
47
|
+
// A dark outline keeps labels readable where they cross the lines.
|
|
48
|
+
stroke="#000000"
|
|
49
|
+
strokeWidth={14}
|
|
50
|
+
paintOrder="stroke"
|
|
51
|
+
opacity={ramp(frame, at, 8)}
|
|
52
|
+
style={{ textTransform: "uppercase" }}
|
|
53
|
+
>
|
|
54
|
+
{text.toUpperCase()}
|
|
55
|
+
</text>
|
|
56
|
+
) : null;
|
|
57
|
+
const L = props.labels;
|
|
58
|
+
|
|
59
|
+
let art: ReactNode = null;
|
|
60
|
+
switch (props.kind) {
|
|
61
|
+
case "venn": {
|
|
62
|
+
const overlap = ramp(frame, 4 + step * 1.6, 10);
|
|
63
|
+
art = (
|
|
64
|
+
<>
|
|
65
|
+
<defs>
|
|
66
|
+
<clipPath id="ld-venn">
|
|
67
|
+
<circle cx={380} cy={470} r={270} />
|
|
68
|
+
</clipPath>
|
|
69
|
+
</defs>
|
|
70
|
+
<circle cx={620} cy={470} r={270} clipPath="url(#ld-venn)" fill={props.accent} opacity={overlap * 0.9} />
|
|
71
|
+
<circle cx={380} cy={470} r={270} {...line} strokeDashoffset={1 - draw(0)} transform="rotate(-90 380 470)" />
|
|
72
|
+
<circle cx={620} cy={470} r={270} {...line} strokeDashoffset={1 - draw(1)} transform="rotate(90 620 470)" />
|
|
73
|
+
{label(L[0], 250, 485, 4 + step)}
|
|
74
|
+
{label(L[1], 750, 485, 4 + step * 1.5)}
|
|
75
|
+
{label(L[2], 500, 485, 4 + step * 2.2, "middle")}
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
case "network": {
|
|
81
|
+
const n = 8;
|
|
82
|
+
const nodes = Array.from({ length: n }, (_, i) => {
|
|
83
|
+
const a = (i / n) * Math.PI * 2 - Math.PI / 2;
|
|
84
|
+
return { x: 500 + Math.cos(a) * 340, y: 470 + Math.sin(a) * 340 };
|
|
85
|
+
});
|
|
86
|
+
art = (
|
|
87
|
+
<>
|
|
88
|
+
{nodes.map((p, i) => (
|
|
89
|
+
<path key={`l${i}`} d={`M 500 470 L ${p.x.toFixed(0)} ${p.y.toFixed(0)}`} {...line} strokeDashoffset={1 - ramp(frame, 10 + i * 2, 10)} />
|
|
90
|
+
))}
|
|
91
|
+
{nodes.map((p, i) => {
|
|
92
|
+
const t = ramp(frame, 18 + i * 2, 6);
|
|
93
|
+
return <circle key={`n${i}`} cx={p.x} cy={p.y} r={34 * t} fill="#000000" stroke={props.color} strokeWidth={stroke} />;
|
|
94
|
+
})}
|
|
95
|
+
<circle cx={500} cy={470} r={62 * ramp(frame, 2, 8)} fill={props.accent} />
|
|
96
|
+
{label(L[0], 500, 600, 14)}
|
|
97
|
+
{label(L[1], 500, 930, 34)}
|
|
98
|
+
</>
|
|
99
|
+
);
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case "growth": {
|
|
103
|
+
const curve = "M 170 820 C 420 800, 560 700, 650 520 S 800 200, 850 150";
|
|
104
|
+
const t = draw(1);
|
|
105
|
+
art = (
|
|
106
|
+
<>
|
|
107
|
+
<path d="M 170 140 L 170 820 L 860 820" {...line} strokeDashoffset={1 - draw(0)} />
|
|
108
|
+
<path d={curve} {...line} stroke={props.accent} strokeWidth={stroke * 1.4} strokeDashoffset={1 - t} />
|
|
109
|
+
<circle cx={850} cy={150} r={22 * ramp(frame, 4 + step * 1.6 + step, 6)} fill={props.accent} />
|
|
110
|
+
{label(L[0], 860, 890, 4 + step, "end")}
|
|
111
|
+
{label(L[1], 200, 120, 4 + step, "start")}
|
|
112
|
+
</>
|
|
113
|
+
);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case "cycle": {
|
|
117
|
+
const count = Math.max(3, Math.min(4, L.length || 3));
|
|
118
|
+
const r = 300;
|
|
119
|
+
const arcs = Array.from({ length: count }, (_, i) => {
|
|
120
|
+
const a0 = (i / count) * Math.PI * 2 - Math.PI / 2 + 0.22;
|
|
121
|
+
const a1 = ((i + 1) / count) * Math.PI * 2 - Math.PI / 2 - 0.22;
|
|
122
|
+
const p0 = { x: 500 + Math.cos(a0) * r, y: 480 + Math.sin(a0) * r };
|
|
123
|
+
const p1 = { x: 500 + Math.cos(a1) * r, y: 480 + Math.sin(a1) * r };
|
|
124
|
+
const head = a1 + Math.PI / 2;
|
|
125
|
+
const hx = (dx: number, dy: number) => `${(p1.x + dx * Math.cos(head) - dy * Math.sin(head)).toFixed(0)} ${(p1.y + dx * Math.sin(head) + dy * Math.cos(head)).toFixed(0)}`;
|
|
126
|
+
return {
|
|
127
|
+
d: `M ${p0.x.toFixed(0)} ${p0.y.toFixed(0)} A ${r} ${r} 0 0 1 ${p1.x.toFixed(0)} ${p1.y.toFixed(0)}`,
|
|
128
|
+
arrow: `M ${hx(-34, -26)} L ${p1.x.toFixed(0)} ${p1.y.toFixed(0)} L ${hx(-34, 26)}`,
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
art = (
|
|
132
|
+
<>
|
|
133
|
+
{arcs.map((arc, i) => (
|
|
134
|
+
<g key={i}>
|
|
135
|
+
<path d={arc.d} {...line} strokeDashoffset={1 - draw(i)} />
|
|
136
|
+
<path d={arc.arrow} {...line} strokeDashoffset={1 - ramp(frame, 4 + i * step * 0.6 + step, 4)} />
|
|
137
|
+
</g>
|
|
138
|
+
))}
|
|
139
|
+
{arcs.map((_, i) => {
|
|
140
|
+
const a = (i / count) * Math.PI * 2 - Math.PI / 2;
|
|
141
|
+
return <g key={`t${i}`}>{label(L[i], 500 + Math.cos(a) * 300, 480 + Math.sin(a) * 300 + 16, 4 + i * step * 0.6 + step, "middle", i === 0)}</g>;
|
|
142
|
+
})}
|
|
143
|
+
</>
|
|
144
|
+
);
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
case "versus": {
|
|
148
|
+
art = (
|
|
149
|
+
<>
|
|
150
|
+
<rect x={150} y={600} width={170} height={170} {...line} strokeDashoffset={1 - draw(0)} />
|
|
151
|
+
<rect x={430} y={350} width={420} height={420} {...line} stroke={props.accent} strokeDashoffset={1 - draw(1)} />
|
|
152
|
+
<path d="M 120 770 L 880 770" {...line} strokeDashoffset={1 - draw(0)} />
|
|
153
|
+
{label(L[0], 235, 850, 4 + step)}
|
|
154
|
+
{label(L[1], 640, 850, 4 + step * 1.6, "middle", true)}
|
|
155
|
+
</>
|
|
156
|
+
);
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
default: {
|
|
160
|
+
// stairs: steps up with a dot climbing them.
|
|
161
|
+
const climb = ramp(frame, 4 + step, step * 2.4, easeInOut);
|
|
162
|
+
const steps = 4;
|
|
163
|
+
const sx = (k: number) => 170 + k * 170;
|
|
164
|
+
const sy = (k: number) => 820 - k * 170;
|
|
165
|
+
const path = Array.from({ length: steps }, (_, k) => `L ${sx(k)} ${sy(k + 1)} L ${sx(k + 1)} ${sy(k + 1)}`).join(" ");
|
|
166
|
+
const k = Math.min(steps - 1, Math.floor(climb * steps));
|
|
167
|
+
art = (
|
|
168
|
+
<>
|
|
169
|
+
<path d={`M ${sx(0)} ${sy(0)} ${path}`} {...line} strokeDashoffset={1 - draw(0)} />
|
|
170
|
+
<circle cx={sx(k) + 85} cy={sy(k + 1) - 40} r={30 * ramp(frame, 4 + step, 6)} fill={props.accent} />
|
|
171
|
+
{label(L[0], sx(0), sy(0) + 70, 4 + step, "start")}
|
|
172
|
+
{label(L[1], sx(steps), sy(steps) - 60, 4 + step * 2.4, "end", true)}
|
|
173
|
+
</>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return (
|
|
179
|
+
<AbsoluteFill style={{ background: fill(props.background), alignItems: "center", justifyContent: "center", opacity: out }}>
|
|
180
|
+
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: 36 * u }}>
|
|
181
|
+
<svg width={side} height={side} viewBox={`0 0 ${V} ${V}`} style={{ overflow: "visible" }}>
|
|
182
|
+
{art}
|
|
183
|
+
</svg>
|
|
184
|
+
{props.title ? (
|
|
185
|
+
<div
|
|
186
|
+
style={{
|
|
187
|
+
fontFamily: FONTS[props.font] ?? FONTS.sans,
|
|
188
|
+
fontWeight: 900,
|
|
189
|
+
fontSize: side * 0.085,
|
|
190
|
+
letterSpacing: "0.02em",
|
|
191
|
+
textTransform: "uppercase",
|
|
192
|
+
color: props.color,
|
|
193
|
+
textAlign: "center",
|
|
194
|
+
maxWidth: width * 0.86,
|
|
195
|
+
opacity: ramp(frame, 4 + step * 2, 10),
|
|
196
|
+
transform: `translateY(${(1 - ramp(frame, 4 + step * 2, 10, easeInOut)) * 20 * u}px)`,
|
|
197
|
+
}}
|
|
198
|
+
>
|
|
199
|
+
{props.title}
|
|
200
|
+
</div>
|
|
201
|
+
) : null}
|
|
202
|
+
</div>
|
|
203
|
+
</AbsoluteFill>
|
|
204
|
+
);
|
|
205
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "line-diagram",
|
|
3
|
+
"name": "Line Diagram",
|
|
4
|
+
"category": "Charts & Stats",
|
|
5
|
+
"description": "Minimal explainer line art that draws itself on: two ideas overlapping, one reaching many, growth, a loop, small vs big, steps up.",
|
|
6
|
+
"useWhen": "Explaining an idea in one picture while the speaker says it (the Visualize Value way): a venn for two things that meet, network for one-to-many, growth for results over time, cycle for a loop, versus for small vs big, stairs for progress. Black background full frame, or transparent over footage. Keep labels to one or two words.",
|
|
7
|
+
"durationInFrames": 90,
|
|
8
|
+
"layer": "overlay",
|
|
9
|
+
"stillAt": 0.7,
|
|
10
|
+
"tags": [
|
|
11
|
+
"diagram",
|
|
12
|
+
"explainer",
|
|
13
|
+
"line art",
|
|
14
|
+
"visualize value",
|
|
15
|
+
"minimal",
|
|
16
|
+
"venn",
|
|
17
|
+
"growth"
|
|
18
|
+
],
|
|
19
|
+
"props": {
|
|
20
|
+
"kind": {
|
|
21
|
+
"type": "select",
|
|
22
|
+
"label": "Diagram",
|
|
23
|
+
"default": "venn",
|
|
24
|
+
"options": [
|
|
25
|
+
{
|
|
26
|
+
"value": "venn",
|
|
27
|
+
"label": "Venn (two meet)"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"value": "network",
|
|
31
|
+
"label": "One to many"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"value": "growth",
|
|
35
|
+
"label": "Growth curve"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"value": "cycle",
|
|
39
|
+
"label": "Cycle"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"value": "versus",
|
|
43
|
+
"label": "Small vs big"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"value": "stairs",
|
|
47
|
+
"label": "Stairs"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"title": {
|
|
52
|
+
"type": "text",
|
|
53
|
+
"label": "Title",
|
|
54
|
+
"default": "Where the magic happens",
|
|
55
|
+
"help": "Under the diagram (empty for none)."
|
|
56
|
+
},
|
|
57
|
+
"labels": {
|
|
58
|
+
"type": "lines",
|
|
59
|
+
"label": "Labels",
|
|
60
|
+
"default": [
|
|
61
|
+
"Skill",
|
|
62
|
+
"Taste",
|
|
63
|
+
"You"
|
|
64
|
+
],
|
|
65
|
+
"max": 4,
|
|
66
|
+
"help": "Venn: left, right, overlap · network: center, outer · growth: x, y · cycle: one per step · versus: small, big · stairs: start, top."
|
|
67
|
+
},
|
|
68
|
+
"color": {
|
|
69
|
+
"type": "color",
|
|
70
|
+
"style": "line",
|
|
71
|
+
"label": "Lines",
|
|
72
|
+
"default": "#ffffff"
|
|
73
|
+
},
|
|
74
|
+
"accent": {
|
|
75
|
+
"type": "color",
|
|
76
|
+
"style": "accent",
|
|
77
|
+
"label": "Accent",
|
|
78
|
+
"default": "#ffe600"
|
|
79
|
+
},
|
|
80
|
+
"background": {
|
|
81
|
+
"type": "color",
|
|
82
|
+
"label": "Background",
|
|
83
|
+
"default": "#000000",
|
|
84
|
+
"help": "\"transparent\" to draw over footage."
|
|
85
|
+
},
|
|
86
|
+
"font": {
|
|
87
|
+
"type": "select",
|
|
88
|
+
"style": "font",
|
|
89
|
+
"label": "Font",
|
|
90
|
+
"default": "heavy",
|
|
91
|
+
"options": [
|
|
92
|
+
{
|
|
93
|
+
"value": "heavy",
|
|
94
|
+
"label": "Montserrat"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"value": "sans",
|
|
98
|
+
"label": "Inter"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"value": "grotesk",
|
|
102
|
+
"label": "Space Grotesk"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"value": "archivo",
|
|
106
|
+
"label": "Archivo Black"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"value": "condensed",
|
|
110
|
+
"label": "Anton"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"value": "mono",
|
|
114
|
+
"label": "Mono"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"value": "caveat",
|
|
118
|
+
"label": "Caveat"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value": "pixel",
|
|
122
|
+
"label": "VT323"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"value": "tech",
|
|
126
|
+
"label": "Orbitron"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"value": "serif",
|
|
130
|
+
"label": "Instrument Serif"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"value": "fraunces",
|
|
134
|
+
"label": "Fraunces"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"value": "display",
|
|
138
|
+
"label": "Bricolage"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"value": "wide",
|
|
142
|
+
"label": "Unbounded"
|
|
143
|
+
},
|
|
144
|
+
{ "value": "retro", "label": "Bungee" }
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"size": {
|
|
148
|
+
"type": "number",
|
|
149
|
+
"label": "Size",
|
|
150
|
+
"default": 62,
|
|
151
|
+
"min": 20,
|
|
152
|
+
"max": 90,
|
|
153
|
+
"step": 1,
|
|
154
|
+
"unit": "% of frame"
|
|
155
|
+
},
|
|
156
|
+
"speed": {
|
|
157
|
+
"type": "number",
|
|
158
|
+
"label": "Draw speed",
|
|
159
|
+
"default": 16,
|
|
160
|
+
"min": 4,
|
|
161
|
+
"max": 40,
|
|
162
|
+
"step": 1,
|
|
163
|
+
"unit": "frames per stroke"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"examples": [
|
|
167
|
+
{
|
|
168
|
+
"name": "Venn",
|
|
169
|
+
"props": {}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "One to many",
|
|
173
|
+
"props": {
|
|
174
|
+
"kind": "network",
|
|
175
|
+
"title": "One repo, everyone",
|
|
176
|
+
"labels": [
|
|
177
|
+
"1 repo",
|
|
178
|
+
"everyone"
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "Growth",
|
|
184
|
+
"props": {
|
|
185
|
+
"kind": "growth",
|
|
186
|
+
"title": "Compounding",
|
|
187
|
+
"labels": [
|
|
188
|
+
"time",
|
|
189
|
+
"results"
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "Cycle",
|
|
195
|
+
"props": {
|
|
196
|
+
"kind": "cycle",
|
|
197
|
+
"title": "The loop",
|
|
198
|
+
"labels": [
|
|
199
|
+
"Build",
|
|
200
|
+
"Share",
|
|
201
|
+
"Learn"
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "Small vs big",
|
|
207
|
+
"props": {
|
|
208
|
+
"kind": "versus",
|
|
209
|
+
"title": "Think bigger",
|
|
210
|
+
"labels": [
|
|
211
|
+
"now",
|
|
212
|
+
"next"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import { useCurrentFrame } from "remotion";
|
|
3
|
+
import { unit } from "../lib";
|
|
4
|
+
import { CardStage, CardTitle, Label, Words, enter, lookKit, type LookKit, type LookProps } from "../looks";
|
|
5
|
+
import type { MotionBaseProps } from "../types";
|
|
6
|
+
|
|
7
|
+
type Props = MotionBaseProps &
|
|
8
|
+
LookProps & {
|
|
9
|
+
kicker: string;
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
rows: string[];
|
|
13
|
+
footer: string;
|
|
14
|
+
layout: string;
|
|
15
|
+
size: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** One label | value row, drawn the look's way. */
|
|
19
|
+
function Row({ kit, label, value, fontSize, frame, fps, start, index }: { kit: LookKit; label: string; value: string; fontSize: number; frame: number; fps: number; start: number; index: number }) {
|
|
20
|
+
const u = kit.u;
|
|
21
|
+
const e = enter(kit, frame, fps, start, kit.look === "paper" ? (index % 2 ? 1.2 : -1.2) : 0, index + 20);
|
|
22
|
+
const box: CSSProperties = {
|
|
23
|
+
display: "flex",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
justifyContent: "space-between",
|
|
26
|
+
gap: fontSize,
|
|
27
|
+
padding: `${fontSize * 0.45}px ${fontSize * 0.6}px`,
|
|
28
|
+
fontFamily: kit.body,
|
|
29
|
+
fontSize,
|
|
30
|
+
opacity: e.opacity,
|
|
31
|
+
transform: e.transform,
|
|
32
|
+
};
|
|
33
|
+
const skin: CSSProperties =
|
|
34
|
+
kit.look === "ink"
|
|
35
|
+
? { background: kit.panel, border: `${Math.max(2, 3 * u)}px solid ${kit.line}`, boxShadow: `${5 * u}px ${5 * u}px 0 ${kit.line}`, borderRadius: 6 * u }
|
|
36
|
+
: kit.look === "paper"
|
|
37
|
+
? { background: "#f3ead6", boxShadow: `${4 * u}px ${6 * u}px 0 rgba(20,12,4,0.3)` }
|
|
38
|
+
: kit.look === "notebook"
|
|
39
|
+
? { borderBottom: `${Math.max(2, 2.5 * u)}px solid ${kit.line}`, padding: `${fontSize * 0.3}px ${fontSize * 0.1}px`, fontSize: fontSize * 1.3 }
|
|
40
|
+
: kit.look === "crt"
|
|
41
|
+
? { borderBottom: `${Math.max(1, 2 * u)}px dashed ${kit.line}`, padding: `${fontSize * 0.3}px 0`, fontSize: fontSize * 1.3 }
|
|
42
|
+
: kit.look === "line"
|
|
43
|
+
? { borderBottom: `${Math.max(2, 2.5 * u)}px solid ${kit.line}`, padding: `${fontSize * 0.4}px 0`, textTransform: "uppercase", letterSpacing: "0.06em" }
|
|
44
|
+
: kit.look === "neon"
|
|
45
|
+
? { background: "rgba(34,232,255,0.06)", border: `${Math.max(1, 1.5 * u)}px solid ${kit.line}`, borderLeft: `${Math.max(3, 6 * u)}px solid ${kit.accent}`, textTransform: "uppercase" }
|
|
46
|
+
: { borderBottom: `${Math.max(1, 1.5 * u)}px solid rgba(255,255,255,0.1)`, padding: `${fontSize * 0.5}px 0` };
|
|
47
|
+
return (
|
|
48
|
+
<div style={{ ...box, ...skin }}>
|
|
49
|
+
<span style={{ opacity: 0.75, textTransform: kit.look === "ink" || kit.look === "paper" || kit.look === "neon" ? "uppercase" : "none", letterSpacing: kit.look === "ink" ? "0.08em" : 0, fontSize: "0.8em" }}>
|
|
50
|
+
{label}
|
|
51
|
+
</span>
|
|
52
|
+
<span style={{ fontWeight: 700, fontFamily: kit.look === "ink" ? kit.head : kit.body }}>
|
|
53
|
+
<Words kit={kit} line={value} fontSize={fontSize} frame={frame} start={start + 4} />
|
|
54
|
+
</span>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A titled card of label / value rows (a feature, a ledger, specs): an ink card of boxed rows, a
|
|
61
|
+
* torn paper card, a notebook page, a terminal window or a soft card. Full frame or over footage.
|
|
62
|
+
*/
|
|
63
|
+
export function ListCard(props: Props) {
|
|
64
|
+
const frame = useCurrentFrame();
|
|
65
|
+
const { width, height, fps, durationInFrames: d } = props;
|
|
66
|
+
const u = unit(width, height);
|
|
67
|
+
const kit = lookKit(props, u);
|
|
68
|
+
const base = Math.min(width, height);
|
|
69
|
+
const titleSize = (props.size / 100) * base;
|
|
70
|
+
const rowSize = titleSize * 0.4;
|
|
71
|
+
const rowsStart = 14;
|
|
72
|
+
return (
|
|
73
|
+
<CardStage
|
|
74
|
+
kit={kit}
|
|
75
|
+
width={width}
|
|
76
|
+
height={height}
|
|
77
|
+
layout={props.layout}
|
|
78
|
+
frame={frame}
|
|
79
|
+
fps={fps}
|
|
80
|
+
durationInFrames={d}
|
|
81
|
+
footer={props.footer}
|
|
82
|
+
footerStart={rowsStart + props.rows.length * 6 + 6}
|
|
83
|
+
title={`~/${props.title.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`}
|
|
84
|
+
>
|
|
85
|
+
<div style={{ padding: `${titleSize * 0.5}px ${titleSize * 0.5}px ${titleSize * 0.55}px`, display: "flex", flexDirection: "column", gap: titleSize * 0.14 }}>
|
|
86
|
+
{props.kicker ? (
|
|
87
|
+
<Label kit={kit} fontSize={titleSize * 0.17}>
|
|
88
|
+
{props.kicker}
|
|
89
|
+
</Label>
|
|
90
|
+
) : null}
|
|
91
|
+
<CardTitle kit={kit} text={props.title} fontSize={titleSize} frame={frame} fps={fps} start={4} />
|
|
92
|
+
{props.subtitle ? (
|
|
93
|
+
<div style={{ fontFamily: kit.body, fontSize: titleSize * (kit.look === "notebook" || kit.look === "crt" ? 0.32 : 0.24), opacity: 0.75, color: kit.panelText }}>{props.subtitle}</div>
|
|
94
|
+
) : null}
|
|
95
|
+
<div style={{ display: "flex", flexDirection: "column", gap: kit.look === "ink" || kit.look === "paper" ? rowSize * 0.55 : 0, marginTop: titleSize * 0.2 }}>
|
|
96
|
+
{props.rows.map((row, i) => {
|
|
97
|
+
const [label, ...rest] = row.split("|");
|
|
98
|
+
return <Row key={i} kit={kit} label={label.trim()} value={rest.join("|").trim()} fontSize={rowSize} frame={frame} fps={fps} start={rowsStart + i * 6} index={i} />;
|
|
99
|
+
})}
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</CardStage>
|
|
103
|
+
);
|
|
104
|
+
}
|