agentcut 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -2
  3. package/dist/bridge.d.ts +45 -0
  4. package/dist/bridge.js +691 -0
  5. package/dist/bridge.js.map +1 -0
  6. package/dist/config.d.ts +13 -0
  7. package/dist/config.js +50 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +35 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/log.d.ts +1 -0
  13. package/dist/log.js +14 -0
  14. package/dist/log.js.map +1 -0
  15. package/dist/studio/agents/claude.d.ts +7 -0
  16. package/dist/studio/agents/claude.js +155 -0
  17. package/dist/studio/agents/claude.js.map +1 -0
  18. package/dist/studio/agents/codex.d.ts +4 -0
  19. package/dist/studio/agents/codex.js +169 -0
  20. package/dist/studio/agents/codex.js.map +1 -0
  21. package/dist/studio/agents/index.d.ts +8 -0
  22. package/dist/studio/agents/index.js +50 -0
  23. package/dist/studio/agents/index.js.map +1 -0
  24. package/dist/studio/agents/types.d.ts +131 -0
  25. package/dist/studio/agents/types.js +11 -0
  26. package/dist/studio/agents/types.js.map +1 -0
  27. package/dist/studio/bundler.d.ts +29 -0
  28. package/dist/studio/bundler.js +136 -0
  29. package/dist/studio/bundler.js.map +1 -0
  30. package/dist/studio/chat.d.ts +147 -0
  31. package/dist/studio/chat.js +681 -0
  32. package/dist/studio/chat.js.map +1 -0
  33. package/dist/studio/cli.d.ts +2 -0
  34. package/dist/studio/cli.js +194 -0
  35. package/dist/studio/cli.js.map +1 -0
  36. package/dist/studio/components.d.ts +4 -0
  37. package/dist/studio/components.js +36 -0
  38. package/dist/studio/components.js.map +1 -0
  39. package/dist/studio/host.d.ts +105 -0
  40. package/dist/studio/host.js +634 -0
  41. package/dist/studio/host.js.map +1 -0
  42. package/dist/studio/http.d.ts +21 -0
  43. package/dist/studio/http.js +240 -0
  44. package/dist/studio/http.js.map +1 -0
  45. package/dist/studio/music.d.ts +35 -0
  46. package/dist/studio/music.js +130 -0
  47. package/dist/studio/music.js.map +1 -0
  48. package/dist/studio/proc.d.ts +11 -0
  49. package/dist/studio/proc.js +69 -0
  50. package/dist/studio/proc.js.map +1 -0
  51. package/dist/studio/projects.d.ts +84 -0
  52. package/dist/studio/projects.js +369 -0
  53. package/dist/studio/projects.js.map +1 -0
  54. package/dist/studio/render.d.ts +24 -0
  55. package/dist/studio/render.js +197 -0
  56. package/dist/studio/render.js.map +1 -0
  57. package/dist/studio/reveal.d.ts +7 -0
  58. package/dist/studio/reveal.js +49 -0
  59. package/dist/studio/reveal.js.map +1 -0
  60. package/dist/studio/schema.d.ts +4152 -0
  61. package/dist/studio/schema.js +358 -0
  62. package/dist/studio/schema.js.map +1 -0
  63. package/dist/studio/tools.d.ts +2 -0
  64. package/dist/studio/tools.js +165 -0
  65. package/dist/studio/tools.js.map +1 -0
  66. package/dist/studio/voice.d.ts +150 -0
  67. package/dist/studio/voice.js +434 -0
  68. package/dist/studio/voice.js.map +1 -0
  69. package/dist/studio/workspace.d.ts +31 -0
  70. package/dist/studio/workspace.js +187 -0
  71. package/dist/studio/workspace.js.map +1 -0
  72. package/package.json +50 -4
  73. package/template/AGENTS.md +13 -0
  74. package/template/components/CATALOG.md +1306 -0
  75. package/template/components/README.md +61 -0
  76. package/template/components/STYLES.md +246 -0
  77. package/template/components/arcade-title/ArcadeTitle.tsx +860 -0
  78. package/template/components/arcade-title/meta.json +28 -0
  79. package/template/components/aurora/Aurora.tsx +63 -0
  80. package/template/components/aurora/meta.json +28 -0
  81. package/template/components/bar-wipe-title/BarWipeTitle.tsx +94 -0
  82. package/template/components/bar-wipe-title/meta.json +29 -0
  83. package/template/components/before-after/BeforeAfter.tsx +89 -0
  84. package/template/components/before-after/meta.json +233 -0
  85. package/template/components/bento-grid/BentoGrid.tsx +202 -0
  86. package/template/components/bento-grid/meta.json +25 -0
  87. package/template/components/blur-in-title/BlurInTitle.tsx +121 -0
  88. package/template/components/blur-in-title/meta.json +32 -0
  89. package/template/components/catalog.json +8730 -0
  90. package/template/components/catalog.ts +103 -0
  91. package/template/components/chat-thread/ChatThread.tsx +128 -0
  92. package/template/components/chat-thread/meta.json +24 -0
  93. package/template/components/checklist/Checklist.tsx +129 -0
  94. package/template/components/checklist/meta.json +25 -0
  95. package/template/components/confetti/Confetti.tsx +109 -0
  96. package/template/components/confetti/meta.json +28 -0
  97. package/template/components/countdown/Countdown.tsx +166 -0
  98. package/template/components/countdown/meta.json +28 -0
  99. package/template/components/cut-and-paste/CutAndPaste.tsx +654 -0
  100. package/template/components/cut-and-paste/meta.json +29 -0
  101. package/template/components/decode-text/DecodeText.tsx +97 -0
  102. package/template/components/decode-text/meta.json +29 -0
  103. package/template/components/editorial-quote/EditorialQuote.tsx +122 -0
  104. package/template/components/editorial-quote/meta.json +28 -0
  105. package/template/components/glitch-title/GlitchTitle.tsx +171 -0
  106. package/template/components/glitch-title/meta.json +32 -0
  107. package/template/components/halftone-wave/HalftoneWave.tsx +106 -0
  108. package/template/components/halftone-wave/meta.json +28 -0
  109. package/template/components/highlighter/Highlighter.tsx +142 -0
  110. package/template/components/highlighter/meta.json +28 -0
  111. package/template/components/hook-card/HookCard.tsx +552 -0
  112. package/template/components/hook-card/meta.json +304 -0
  113. package/template/components/index.ts +149 -0
  114. package/template/components/iris-wipe/IrisWipe.tsx +76 -0
  115. package/template/components/iris-wipe/meta.json +24 -0
  116. package/template/components/kinetic-poster/KineticPoster.tsx +437 -0
  117. package/template/components/kinetic-poster/meta.json +31 -0
  118. package/template/components/kinetic-punch/KineticPunch.tsx +80 -0
  119. package/template/components/kinetic-punch/meta.json +30 -0
  120. package/template/components/lava-lamp/LavaLamp.tsx +92 -0
  121. package/template/components/lava-lamp/meta.json +28 -0
  122. package/template/components/letter-cascade/LetterCascade.tsx +102 -0
  123. package/template/components/letter-cascade/meta.json +29 -0
  124. package/template/components/lib.ts +179 -0
  125. package/template/components/light-leak/LightLeakTransition.tsx +43 -0
  126. package/template/components/light-leak/meta.json +74 -0
  127. package/template/components/line-diagram/LineDiagram.tsx +205 -0
  128. package/template/components/line-diagram/meta.json +217 -0
  129. package/template/components/list-card/ListCard.tsx +104 -0
  130. package/template/components/list-card/meta.json +232 -0
  131. package/template/components/logo-sting/LogoSting.tsx +129 -0
  132. package/template/components/logo-sting/meta.json +29 -0
  133. package/template/components/looks.tsx +1447 -0
  134. package/template/components/lower-third/LowerThird.tsx +100 -0
  135. package/template/components/lower-third/meta.json +24 -0
  136. package/template/components/marquee/Marquee.tsx +100 -0
  137. package/template/components/marquee/meta.json +30 -0
  138. package/template/components/notification/Notification.tsx +115 -0
  139. package/template/components/notification/meta.json +27 -0
  140. package/template/components/outline-fill/OutlineFill.tsx +106 -0
  141. package/template/components/outline-fill/meta.json +28 -0
  142. package/template/components/panel-sweep/PanelSweep.tsx +86 -0
  143. package/template/components/panel-sweep/meta.json +25 -0
  144. package/template/components/prompt-box/PromptBox.tsx +131 -0
  145. package/template/components/prompt-box/meta.json +24 -0
  146. package/template/components/props.ts +73 -0
  147. package/template/components/quote-card/QuoteCard.tsx +71 -0
  148. package/template/components/quote-card/meta.json +216 -0
  149. package/template/components/shape-shift/ShapeShift.tsx +420 -0
  150. package/template/components/shape-shift/meta.json +31 -0
  151. package/template/components/slide-zoom-message/SlideZoomMessage.tsx +179 -0
  152. package/template/components/slide-zoom-message/meta.json +199 -0
  153. package/template/components/social-post/SocialPost.tsx +185 -0
  154. package/template/components/social-post/meta.json +30 -0
  155. package/template/components/split-flap/SplitFlap.tsx +191 -0
  156. package/template/components/split-flap/meta.json +29 -0
  157. package/template/components/spotlight-grid/SpotlightGrid.tsx +84 -0
  158. package/template/components/spotlight-grid/meta.json +25 -0
  159. package/template/components/stat-counter/StatCounter.tsx +117 -0
  160. package/template/components/stat-counter/meta.json +27 -0
  161. package/template/components/sticker-badge/StickerBadge.tsx +46 -0
  162. package/template/components/sticker-badge/meta.json +220 -0
  163. package/template/components/sticker-slam/StickerSlam.tsx +941 -0
  164. package/template/components/sticker-slam/meta.json +34 -0
  165. package/template/components/style-layer.tsx +233 -0
  166. package/template/components/styles.json +762 -0
  167. package/template/components/styles.ts +113 -0
  168. package/template/components/target-lock/TargetLock.tsx +662 -0
  169. package/template/components/target-lock/meta.json +32 -0
  170. package/template/components/text-reveal/TextReveal.tsx +99 -0
  171. package/template/components/text-reveal/meta.json +28 -0
  172. package/template/components/tile-wipe/TileWipe.tsx +75 -0
  173. package/template/components/tile-wipe/meta.json +24 -0
  174. package/template/components/type-zoom/TypeZoom.tsx +103 -0
  175. package/template/components/type-zoom/meta.json +27 -0
  176. package/template/components/types.ts +66 -0
  177. package/template/components/typewriter/Typewriter.tsx +112 -0
  178. package/template/components/typewriter/meta.json +29 -0
  179. package/template/components/word-pop/WordPop.tsx +59 -0
  180. package/template/components/word-pop/meta.json +237 -0
  181. package/template/components/word-stack/WordStack.tsx +122 -0
  182. package/template/components/word-stack/meta.json +27 -0
  183. package/template/components/word-swap/WordSwap.tsx +127 -0
  184. package/template/components/word-swap/meta.json +30 -0
  185. package/template/presets/charcoal-sketch/PROMPT.md +48 -0
  186. package/template/presets/charcoal-sketch/assets/paper/grain-0.png +0 -0
  187. package/template/presets/charcoal-sketch/assets/paper/grain-1.png +0 -0
  188. package/template/presets/charcoal-sketch/assets/paper/grain-2.png +0 -0
  189. package/template/presets/charcoal-sketch/assets/paper/sketch-paper.jpg +0 -0
  190. package/template/presets/charcoal-sketch/assets/paper/smudge.png +0 -0
  191. package/template/presets/charcoal-sketch/poster.jpg +0 -0
  192. package/template/presets/charcoal-sketch/preset.json +17 -0
  193. package/template/presets/charcoal-sketch/preview.mp4 +0 -0
  194. package/template/presets/charcoal-sketch/scenes/Grain.tsx +23 -0
  195. package/template/presets/charcoal-sketch/scenes/Paper.tsx +17 -0
  196. package/template/presets/charcoal-sketch/scenes/examples/Agents.tsx +100 -0
  197. package/template/presets/charcoal-sketch/scenes/examples/Approvals.tsx +110 -0
  198. package/template/presets/charcoal-sketch/scenes/examples/Blog.tsx +105 -0
  199. package/template/presets/charcoal-sketch/scenes/examples/EndCard.tsx +41 -0
  200. package/template/presets/charcoal-sketch/scenes/examples/Hook.tsx +130 -0
  201. package/template/presets/charcoal-sketch/scenes/examples/Ideas.tsx +92 -0
  202. package/template/presets/charcoal-sketch/scenes/examples/Posting.tsx +128 -0
  203. package/template/presets/charcoal-sketch/scenes/lib/painfix.tsx +119 -0
  204. package/template/presets/charcoal-sketch/scenes/lib/sketch.tsx +291 -0
  205. package/template/presets/charcoal-sketch/scripts/build_layers.example.py +193 -0
  206. package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -0
  207. package/template/presets/charcoal-sketch/scripts/make_textures.py +93 -0
  208. package/template/presets/punk-cut-paper/PROMPT.md +37 -0
  209. package/template/presets/punk-cut-paper/assets/paper/desk-cream.jpg +0 -0
  210. package/template/presets/punk-cut-paper/assets/paper/grain-overlay.png +0 -0
  211. package/template/presets/punk-cut-paper/assets/paper/halftone-black.png +0 -0
  212. package/template/presets/punk-cut-paper/assets/paper/halftone-red.png +0 -0
  213. package/template/presets/punk-cut-paper/assets/paper/halftone-yellow.png +0 -0
  214. package/template/presets/punk-cut-paper/assets/paper/kraft.jpg +0 -0
  215. package/template/presets/punk-cut-paper/assets/paper/newsprint.jpg +0 -0
  216. package/template/presets/punk-cut-paper/assets/paper/paper-cream.jpg +0 -0
  217. package/template/presets/punk-cut-paper/assets/paper/paper-white.jpg +0 -0
  218. package/template/presets/punk-cut-paper/assets/paper/tape.png +0 -0
  219. package/template/presets/punk-cut-paper/build_layers.example.py +150 -0
  220. package/template/presets/punk-cut-paper/poster.jpg +0 -0
  221. package/template/presets/punk-cut-paper/preset.json +15 -0
  222. package/template/presets/punk-cut-paper/preview.mp4 +0 -0
  223. package/template/presets/punk-cut-paper/scenes/Backdrop.tsx +76 -0
  224. package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -0
  225. package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -0
  226. package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -0
  227. package/template/presets/punk-cut-paper/scenes/Xerox.tsx +31 -0
  228. package/template/presets/punk-cut-paper/scenes/lib/punk.tsx +208 -0
  229. package/template/runtime/composition.tsx +918 -0
  230. package/template/runtime/helpers.tsx +228 -0
  231. package/template/runtime/index.tsx +22 -0
  232. package/template/runtime/types.ts +248 -0
  233. package/template/skill/SKILL.md +149 -0
  234. package/template/skill/references/browser-export.md +61 -0
  235. package/template/skill/references/components.md +38 -0
  236. package/template/skill/references/craft.md +53 -0
  237. package/template/skill/references/cursor.md +91 -0
  238. package/template/skill/references/footage.md +73 -0
  239. package/template/skill/references/format.md +140 -0
  240. package/template/skill/references/presets.md +56 -0
  241. package/template/skill/references/sound.md +128 -0
  242. package/template/starter/.studio/chat.json +1 -0
  243. package/template/starter/assets/.keep +0 -0
  244. package/template/starter/layers.json +46 -0
  245. package/template/starter/notes.md +4 -0
  246. package/template/starter/project.json +13 -0
  247. package/template/starter/renders/.keep +0 -0
  248. package/template/starter/scenes/Title.tsx +38 -0
@@ -0,0 +1,84 @@
1
+ import { useId } from "react";
2
+ import { AbsoluteFill, useCurrentFrame } from "remotion";
3
+ import { alpha, easeOutExpo, exitOut, glowStyle, ramp, unit } from "../lib";
4
+ import type { MotionBaseProps } from "../types";
5
+
6
+ type Props = MotionBaseProps & {
7
+ accent: string;
8
+ gridColor: string;
9
+ background: string;
10
+ cell: number;
11
+ pattern: string;
12
+ spotlight: boolean;
13
+ speed: number;
14
+ };
15
+
16
+ /**
17
+ * A dark technical grid (lines or dots) that fades out toward the edges, with a colored spotlight
18
+ * roaming over it: the grid lights up in the accent wherever the light passes.
19
+ */
20
+ export function SpotlightGrid(props: Props) {
21
+ const frame = useCurrentFrame();
22
+ const { width, height, fps, durationInFrames: d } = props;
23
+ const u = unit(width, height);
24
+ const id = `grid${useId().replace(/[^a-zA-Z0-9]/g, "")}`;
25
+ const cell = props.cell * u;
26
+ const t = (frame / fps) * props.speed;
27
+ const enter = ramp(frame, 0, 30, easeOutExpo);
28
+ const out = exitOut(frame, d, 12);
29
+ // The light wanders on a slow figure-eight around the middle.
30
+ const sx = 50 + Math.sin(t * 0.5) * 28;
31
+ const sy = 50 + Math.sin(t * 1) * 18;
32
+ const px = (sx / 100) * width;
33
+ const py = (sy / 100) * height;
34
+ const radius = Math.max(width, height) * 0.22;
35
+ const stroke = Math.max(1, 1.2 * u);
36
+
37
+ const grid = (color: string, key: string) => (
38
+ <svg key={key} width={width} height={height} style={{ position: "absolute", inset: 0 }}>
39
+ <defs>
40
+ <pattern id={`${id}-${key}`} width={cell} height={cell} patternUnits="userSpaceOnUse" x={width / 2} y={height / 2}>
41
+ {props.pattern === "dots" ? (
42
+ <circle cx={cell / 2} cy={cell / 2} r={Math.max(1.2, 2 * u)} fill={color} />
43
+ ) : (
44
+ <path d={`M ${cell} 0 L 0 0 0 ${cell}`} fill="none" stroke={color} strokeWidth={stroke} />
45
+ )}
46
+ </pattern>
47
+ </defs>
48
+ <rect width={width} height={height} fill={`url(#${id}-${key})`} />
49
+ </svg>
50
+ );
51
+
52
+ return (
53
+ <AbsoluteFill style={{ background: props.background, overflow: "hidden", opacity: out }}>
54
+ <AbsoluteFill style={{ opacity: enter, transform: `scale(${1.08 - 0.08 * enter})` }}>
55
+ {grid(props.gridColor, "base")}
56
+ {props.spotlight ? (
57
+ <>
58
+ <div style={glowStyle(px, py, radius * 3.4, radius * 3.4, props.accent, 0.22)} />
59
+ {/* The lit grid: an accent copy shown only inside the light's circle. */}
60
+ <AbsoluteFill style={{ clipPath: `circle(${radius}px at ${sx}% ${sy}%)`, opacity: 0.9 }}>
61
+ {grid(props.accent, "lit")}
62
+ </AbsoluteFill>
63
+ {/* Soften the lit circle's rim into the dim grid. */}
64
+ <div
65
+ style={{
66
+ position: "absolute",
67
+ left: px - radius,
68
+ top: py - radius,
69
+ width: radius * 2,
70
+ height: radius * 2,
71
+ background: `radial-gradient(${alpha(props.background, 0)} 25%, ${props.background} 70.7%)`,
72
+ clipPath: "circle(50%)",
73
+ }}
74
+ />
75
+ </>
76
+ ) : null}
77
+ </AbsoluteFill>
78
+ {/* Fade the grid out toward the frame's edges. */}
79
+ <AbsoluteFill
80
+ style={{ background: `radial-gradient(${alpha(props.background, 0)} 40%, ${props.background} 85%)` }}
81
+ />
82
+ </AbsoluteFill>
83
+ );
84
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "id": "spotlight-grid",
3
+ "name": "Spotlight Grid",
4
+ "category": "Backgrounds",
5
+ "description": "A dark technical grid of lines or dots, fading toward the edges, with a colored spotlight that roams over it and lights it up.",
6
+ "useWhen": "A developer, AI or infrastructure backdrop behind titles, code, a prompt box or a product screenshot. Calmer than a gradient; the grid suggests precision.",
7
+ "durationInFrames": 300,
8
+ "layer": "full",
9
+ "tags": ["grid", "dots", "spotlight", "tech", "developer", "background", "loop", "dark"],
10
+ "props": {
11
+ "accent": { "type": "color", "label": "Light", "default": "#22d3ee" },
12
+ "gridColor": { "type": "color", "label": "Grid", "default": "#273244" },
13
+ "background": { "type": "color", "label": "Background", "default": "#05070a" },
14
+ "cell": { "type": "number", "label": "Cell size", "default": 64, "min": 20, "max": 200, "step": 2, "unit": "px" },
15
+ "pattern": { "type": "select", "label": "Pattern", "default": "lines", "options": [{ "value": "lines", "label": "Lines" }, { "value": "dots", "label": "Dots" }] },
16
+ "spotlight": { "type": "boolean", "label": "Spotlight", "default": true },
17
+ "speed": { "type": "number", "label": "Speed", "default": 1, "min": 0.1, "max": 4, "step": 0.1, "unit": "×" }
18
+ },
19
+ "examples": [
20
+ { "name": "Cyan grid", "props": {} },
21
+ { "name": "Dots, violet", "props": { "pattern": "dots", "accent": "#a78bfa", "gridColor": "#27272a", "cell": 40 } },
22
+ { "name": "Blueprint", "props": { "accent": "#ffffff", "gridColor": "#1e3a8a", "background": "#0b1d4d", "cell": 90, "speed": 0.5 } }
23
+ ],
24
+ "stillAt": 0.3
25
+ }
@@ -0,0 +1,117 @@
1
+ import { AbsoluteFill, Easing, useCurrentFrame } from "remotion";
2
+ import { FONTS, exitOut, mix, pop, ramp, unit } from "../lib";
3
+ import type { MotionBaseProps } from "../types";
4
+
5
+ type Props = MotionBaseProps & {
6
+ value: number;
7
+ prefix: string;
8
+ suffix: string;
9
+ decimals: number;
10
+ label: string;
11
+ accent: string;
12
+ textColor: string;
13
+ background: string;
14
+ ring: boolean;
15
+ countFrames: number;
16
+ };
17
+
18
+ function format(value: number, decimals: number) {
19
+ return value.toLocaleString("en-US", { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
20
+ }
21
+
22
+ /** A big number that counts up to its value, with a label and an optional progress ring. */
23
+ export function StatCounter(props: Props) {
24
+ const frame = useCurrentFrame();
25
+ const { width, height, fps, durationInFrames } = props;
26
+ const u = unit(width, height);
27
+ const appear = pop(frame, fps, 0);
28
+ const count = ramp(frame, 4, props.countFrames, Easing.bezier(0.16, 1, 0.3, 1));
29
+ const labelIn = ramp(frame, 10, 16);
30
+ const out = exitOut(frame, durationInFrames);
31
+ const shown = props.value * count;
32
+ const size = 220 * u;
33
+ const ringSize = size * 2.2;
34
+ const stroke = 16 * u;
35
+ const radius = (ringSize - stroke) / 2;
36
+ const circumference = 2 * Math.PI * radius;
37
+ // A % value fills the ring to it; any other value fills it completely as it counts.
38
+ const fill = props.suffix.trim() === "%" ? Math.min(1, Math.max(0, shown / 100)) : count;
39
+ const done = count >= 0.999;
40
+
41
+ return (
42
+ <AbsoluteFill
43
+ style={{
44
+ background: props.background === "transparent" ? undefined : props.background,
45
+ alignItems: "center",
46
+ justifyContent: "center",
47
+ opacity: out,
48
+ }}
49
+ >
50
+ <div
51
+ style={{
52
+ position: "relative",
53
+ width: props.ring ? ringSize : undefined,
54
+ height: props.ring ? ringSize : undefined,
55
+ display: "flex",
56
+ flexDirection: "column",
57
+ alignItems: "center",
58
+ justifyContent: "center",
59
+ transform: `scale(${mix(0.86, 1, appear)})`,
60
+ opacity: Math.min(1, appear * 1.4),
61
+ }}
62
+ >
63
+ {props.ring ? (
64
+ <svg width={ringSize} height={ringSize} style={{ position: "absolute", inset: 0 }}>
65
+ <circle cx={ringSize / 2} cy={ringSize / 2} r={radius} fill="none" stroke={props.textColor} strokeOpacity={0.12} strokeWidth={stroke} />
66
+ <circle
67
+ cx={ringSize / 2}
68
+ cy={ringSize / 2}
69
+ r={radius}
70
+ fill="none"
71
+ stroke={props.accent}
72
+ strokeWidth={stroke}
73
+ strokeLinecap="round"
74
+ strokeDasharray={circumference}
75
+ strokeDashoffset={circumference * (1 - fill)}
76
+ transform={`rotate(-90 ${ringSize / 2} ${ringSize / 2})`}
77
+ />
78
+ </svg>
79
+ ) : null}
80
+ <div
81
+ style={{
82
+ fontFamily: FONTS.sans,
83
+ fontWeight: 800,
84
+ fontSize: props.ring ? size * 0.62 : size,
85
+ letterSpacing: "-0.045em",
86
+ lineHeight: 1,
87
+ color: props.textColor,
88
+ fontVariantNumeric: "tabular-nums",
89
+ // A small settle when the count lands.
90
+ transform: `scale(${done ? 1 : mix(0.98, 1, count)})`,
91
+ }}
92
+ >
93
+ <span style={{ color: props.accent }}>{props.prefix}</span>
94
+ {format(shown, props.decimals)}
95
+ <span style={{ color: props.accent }}>{props.suffix}</span>
96
+ </div>
97
+ {props.label ? (
98
+ <div
99
+ style={{
100
+ marginTop: 18 * u,
101
+ maxWidth: props.ring ? ringSize * 0.7 : 900 * u,
102
+ textAlign: "center",
103
+ fontFamily: FONTS.sans,
104
+ fontWeight: 600,
105
+ fontSize: 40 * u,
106
+ color: props.textColor,
107
+ opacity: 0.75 * labelIn,
108
+ transform: `translateY(${mix(14, 0, labelIn) * u}px)`,
109
+ }}
110
+ >
111
+ {props.label}
112
+ </div>
113
+ ) : null}
114
+ </div>
115
+ </AbsoluteFill>
116
+ );
117
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "id": "stat-counter",
3
+ "name": "Stat Counter",
4
+ "category": "Charts & Stats",
5
+ "description": "A big number that counts up to its value with a label, optionally inside a progress ring.",
6
+ "useWhen": "Social proof and results: users, time saved, a percentage, revenue, a speed-up. One number per clip; put two side by side with two clips and boxes.",
7
+ "durationInFrames": 90,
8
+ "layer": "overlay",
9
+ "tags": ["number", "metric", "kpi", "counter", "percentage", "social proof"],
10
+ "props": {
11
+ "value": { "type": "number", "label": "Value", "default": 12000, "min": 0, "max": 100000000, "step": 1 },
12
+ "prefix": { "type": "text", "label": "Prefix", "default": "", "help": "e.g. $ or +" },
13
+ "suffix": { "type": "text", "label": "Suffix", "default": "+", "help": "e.g. %, x, k. With % the ring fills to the value." },
14
+ "decimals": { "type": "number", "label": "Decimals", "default": 0, "min": 0, "max": 2, "step": 1 },
15
+ "label": { "type": "text", "label": "Label", "default": "videos made this month" },
16
+ "accent": { "type": "color", "style": "accent", "label": "Accent", "default": "#34d399" },
17
+ "textColor": { "type": "color", "style": "text", "label": "Text", "default": "#ffffff" },
18
+ "background": { "type": "color", "label": "Background", "default": "transparent" },
19
+ "ring": { "type": "boolean", "label": "Progress ring", "default": false },
20
+ "countFrames": { "type": "number", "label": "Count time", "default": 45, "min": 10, "max": 120, "step": 1, "unit": "frames" }
21
+ },
22
+ "examples": [
23
+ { "name": "Users", "props": {} },
24
+ { "name": "Percent ring", "props": { "value": 87, "suffix": "%", "label": "less time editing", "ring": true, "accent": "#60a5fa" } },
25
+ { "name": "Revenue", "props": { "value": 2.4, "decimals": 1, "prefix": "$", "suffix": "M", "label": "saved in production costs", "background": "#0b0d10", "accent": "#f59e0b" } }
26
+ ]
27
+ }
@@ -0,0 +1,46 @@
1
+ import { AbsoluteFill, useCurrentFrame } from "remotion";
2
+ import { exitOut, unit } from "../lib";
3
+ import { Sticker, Tag, lookKit, type LookProps } from "../looks";
4
+ import type { MotionBaseProps } from "../types";
5
+
6
+ type Props = MotionBaseProps &
7
+ LookProps & {
8
+ text: string;
9
+ label: string;
10
+ position: string;
11
+ size: number;
12
+ };
13
+
14
+ /**
15
+ * A badge slapped in a corner over the speaker (a number, a price, one word), with an optional
16
+ * small tag: starburst (ink), paper rosette, hand-drawn circle, terminal bracket or a disc.
17
+ */
18
+ export function StickerBadge(props: Props) {
19
+ const frame = useCurrentFrame();
20
+ const { width, height, fps, durationInFrames: d } = props;
21
+ const u = unit(width, height);
22
+ const kit = lookKit(props, u);
23
+ const size = (props.size / 100) * Math.min(width, height);
24
+ const out = exitOut(frame, d, 8);
25
+ const [vertical, horizontal] = props.position === "center" ? ["center", "center"] : props.position.split("-");
26
+ const margin = Math.min(width, height) * 0.07;
27
+ return (
28
+ <AbsoluteFill
29
+ style={{
30
+ opacity: out,
31
+ padding: margin,
32
+ alignItems: horizontal === "left" ? "flex-start" : horizontal === "right" ? "flex-end" : "center",
33
+ justifyContent: vertical === "top" ? "flex-start" : vertical === "bottom" ? "flex-end" : "center",
34
+ }}
35
+ >
36
+ <div style={{ position: "relative", display: "flex", flexDirection: "column", alignItems: horizontal === "right" ? "flex-end" : "flex-start" }}>
37
+ {props.label ? (
38
+ <div style={{ position: "relative", marginBottom: -size * 0.12, marginRight: horizontal === "right" ? size * 0.55 : 0 }}>
39
+ <Tag kit={kit} text={props.label} fontSize={size * 0.17} frame={frame} fps={fps} start={0} />
40
+ </div>
41
+ ) : null}
42
+ <Sticker kit={kit} text={props.text} size={size} frame={frame} fps={fps} start={props.label ? 6 : 0} />
43
+ </div>
44
+ </AbsoluteFill>
45
+ );
46
+ }
@@ -0,0 +1,220 @@
1
+ {
2
+ "id": "sticker-badge",
3
+ "name": "Sticker Badge",
4
+ "category": "Talking Head",
5
+ "durationInFrames": 75,
6
+ "layer": "overlay",
7
+ "stillAt": 0.5,
8
+ "description": "A badge slapped in a corner over the speaker (a number, a price, one word) with an optional small tag.",
9
+ "useWhen": "A count (\"5 mods\"), a price, a stat or a one-word reaction next to the speaker's head. Pair the tag with what it refers to (\"Claude Code\").",
10
+ "tags": [
11
+ "sticker",
12
+ "badge",
13
+ "number",
14
+ "talking head",
15
+ "price"
16
+ ],
17
+ "props": {
18
+ "text": {
19
+ "type": "text",
20
+ "label": "Badge",
21
+ "default": "5",
22
+ "maxLength": 8
23
+ },
24
+ "label": {
25
+ "type": "text",
26
+ "label": "Tag",
27
+ "default": "Claude Code",
28
+ "help": "Small tilted label (empty for none)."
29
+ },
30
+ "position": {
31
+ "type": "select",
32
+ "label": "Position",
33
+ "default": "top-right",
34
+ "options": [
35
+ {
36
+ "value": "top-left",
37
+ "label": "Top left"
38
+ },
39
+ {
40
+ "value": "top-right",
41
+ "label": "Top right"
42
+ },
43
+ {
44
+ "value": "bottom-left",
45
+ "label": "Bottom left"
46
+ },
47
+ {
48
+ "value": "bottom-right",
49
+ "label": "Bottom right"
50
+ },
51
+ {
52
+ "value": "center",
53
+ "label": "Center"
54
+ }
55
+ ]
56
+ },
57
+ "size": {
58
+ "type": "number",
59
+ "label": "Size",
60
+ "default": 20,
61
+ "min": 8,
62
+ "max": 45,
63
+ "step": 0.5,
64
+ "unit": "% of frame"
65
+ },
66
+ "look": {
67
+ "type": "select",
68
+ "style": "look",
69
+ "label": "Look",
70
+ "default": "ink",
71
+ "options": [
72
+ {
73
+ "value": "ink",
74
+ "label": "Ink (bold borders)"
75
+ },
76
+ {
77
+ "value": "paper",
78
+ "label": "Cut paper"
79
+ },
80
+ {
81
+ "value": "notebook",
82
+ "label": "Notebook"
83
+ },
84
+ {
85
+ "value": "crt",
86
+ "label": "Terminal"
87
+ },
88
+ {
89
+ "value": "neon",
90
+ "label": "Neon (cyberpunk)"
91
+ },
92
+ {
93
+ "value": "line",
94
+ "label": "Line (black & white)"
95
+ },
96
+ {
97
+ "value": "vhs",
98
+ "label": "VHS (90s tape)"
99
+ },
100
+ {
101
+ "value": "clean",
102
+ "label": "Clean"
103
+ }
104
+ ],
105
+ "help": "The graphic language. Follows the project style."
106
+ },
107
+ "font": {
108
+ "type": "select",
109
+ "style": "font",
110
+ "label": "Headline font",
111
+ "default": "archivo",
112
+ "options": [
113
+ {
114
+ "value": "archivo",
115
+ "label": "Archivo Black"
116
+ },
117
+ {
118
+ "value": "condensed",
119
+ "label": "Anton"
120
+ },
121
+ {
122
+ "value": "grotesk",
123
+ "label": "Space Grotesk"
124
+ },
125
+ {
126
+ "value": "caveat",
127
+ "label": "Caveat"
128
+ },
129
+ {
130
+ "value": "pixel",
131
+ "label": "VT323"
132
+ },
133
+ {
134
+ "value": "tech",
135
+ "label": "Orbitron"
136
+ },
137
+ {
138
+ "value": "heavy",
139
+ "label": "Montserrat"
140
+ },
141
+ {
142
+ "value": "retro",
143
+ "label": "Bungee"
144
+ },
145
+ {
146
+ "value": "sans",
147
+ "label": "Inter"
148
+ },
149
+ {
150
+ "value": "display",
151
+ "label": "Bricolage"
152
+ },
153
+ {
154
+ "value": "serif",
155
+ "label": "Instrument Serif"
156
+ },
157
+ {
158
+ "value": "fraunces",
159
+ "label": "Fraunces"
160
+ },
161
+ {
162
+ "value": "wide",
163
+ "label": "Unbounded"
164
+ }
165
+ ]
166
+ },
167
+ "accent": {
168
+ "type": "color",
169
+ "style": "accent",
170
+ "label": "Accent",
171
+ "default": "#ff3d8b"
172
+ },
173
+ "panel": {
174
+ "type": "color",
175
+ "style": "panel",
176
+ "label": "Card",
177
+ "default": "#ffffff"
178
+ },
179
+ "panelText": {
180
+ "type": "color",
181
+ "style": "panelText",
182
+ "label": "Card text",
183
+ "default": "#111111"
184
+ },
185
+ "line": {
186
+ "type": "color",
187
+ "style": "line",
188
+ "label": "Ink",
189
+ "default": "#111111",
190
+ "help": "Borders, hard shadows, pen strokes."
191
+ },
192
+ "backdrop": {
193
+ "type": "color",
194
+ "style": "backdrop",
195
+ "label": "Backdrop",
196
+ "default": "#ffe14d",
197
+ "help": "Full-frame and split backgrounds."
198
+ },
199
+ "onVideo": {
200
+ "type": "color",
201
+ "style": "text",
202
+ "label": "Text on video",
203
+ "default": "#ffffff"
204
+ }
205
+ },
206
+ "examples": [
207
+ {
208
+ "name": "Count",
209
+ "props": {}
210
+ },
211
+ {
212
+ "name": "Price",
213
+ "props": {
214
+ "text": "$240",
215
+ "label": "",
216
+ "position": "top-left"
217
+ }
218
+ }
219
+ ]
220
+ }