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.
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 +920 -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,199 @@
1
+ {
2
+ "id": "slide-zoom-message",
3
+ "name": "Slide & Zoom Message",
4
+ "category": "Text & Titles",
5
+ "description": "A message slides in from the side with motion blur, the camera pushes in on its first words, travels along the line, then pulls back to show it all.",
6
+ "useWhen": "Introducing a message or claim with energy: the hook of a promo, a feature name, a bold statement before a reveal. Works best with one or two short lines; give it 3–5 seconds.",
7
+ "durationInFrames": 120,
8
+ "layer": "overlay",
9
+ "tags": [
10
+ "intro",
11
+ "kinetic type",
12
+ "camera",
13
+ "zoom",
14
+ "pan",
15
+ "motion blur",
16
+ "hook"
17
+ ],
18
+ "props": {
19
+ "lines": {
20
+ "type": "lines",
21
+ "label": "Message",
22
+ "default": [
23
+ "Your demos, *finally* sharp."
24
+ ],
25
+ "max": 2,
26
+ "help": "One or two short lines. *Starred* words use the accent color."
27
+ },
28
+ "enterFrom": {
29
+ "type": "select",
30
+ "label": "Slides in from",
31
+ "default": "left",
32
+ "options": [
33
+ {
34
+ "value": "left",
35
+ "label": "Left"
36
+ },
37
+ {
38
+ "value": "right",
39
+ "label": "Right"
40
+ }
41
+ ]
42
+ },
43
+ "pan": {
44
+ "type": "select",
45
+ "label": "Camera travels",
46
+ "default": "left",
47
+ "options": [
48
+ {
49
+ "value": "left",
50
+ "label": "Left → right along the line"
51
+ },
52
+ {
53
+ "value": "right",
54
+ "label": "Right → left"
55
+ }
56
+ ],
57
+ "help": "Where the push-in starts; the camera then travels to the other side."
58
+ },
59
+ "zoom": {
60
+ "type": "number",
61
+ "label": "Zoom",
62
+ "default": 2.2,
63
+ "min": 1.2,
64
+ "max": 4,
65
+ "step": 0.1,
66
+ "unit": "x"
67
+ },
68
+ "color": {
69
+ "style": "text",
70
+ "type": "color",
71
+ "label": "Text",
72
+ "default": "#ffffff"
73
+ },
74
+ "accent": {
75
+ "style": "accent",
76
+ "type": "color",
77
+ "label": "Accent",
78
+ "default": "#34d399"
79
+ },
80
+ "background": {
81
+ "type": "color",
82
+ "label": "Background",
83
+ "default": "transparent"
84
+ },
85
+ "size": {
86
+ "type": "number",
87
+ "label": "Size",
88
+ "default": 9,
89
+ "min": 4,
90
+ "max": 18,
91
+ "step": 0.5,
92
+ "unit": "% of frame"
93
+ },
94
+ "weight": {
95
+ "style": "weight",
96
+ "type": "select",
97
+ "label": "Weight",
98
+ "default": "800",
99
+ "options": [
100
+ {
101
+ "value": "600",
102
+ "label": "Semibold"
103
+ },
104
+ {
105
+ "value": "800",
106
+ "label": "Extra bold"
107
+ },
108
+ {
109
+ "value": "900",
110
+ "label": "Black"
111
+ }
112
+ ]
113
+ },
114
+ "font": {
115
+ "style": "font",
116
+ "type": "select",
117
+ "label": "Font",
118
+ "default": "sans",
119
+ "options": [
120
+ {
121
+ "value": "sans",
122
+ "label": "Inter"
123
+ },
124
+ {
125
+ "value": "display",
126
+ "label": "Bricolage"
127
+ },
128
+ {
129
+ "value": "serif",
130
+ "label": "Instrument Serif"
131
+ },
132
+ {
133
+ "value": "fraunces",
134
+ "label": "Fraunces"
135
+ },
136
+ {
137
+ "value": "grotesk",
138
+ "label": "Space Grotesk"
139
+ },
140
+ {
141
+ "value": "syne",
142
+ "label": "Syne"
143
+ },
144
+ {
145
+ "value": "wide",
146
+ "label": "Unbounded"
147
+ },
148
+ {
149
+ "value": "condensed",
150
+ "label": "Anton"
151
+ },
152
+ {
153
+ "value": "mono",
154
+ "label": "Mono"
155
+ },
156
+ { "value": "archivo", "label": "Archivo Black" },
157
+ { "value": "caveat", "label": "Caveat" },
158
+ { "value": "pixel", "label": "VT323" },
159
+ { "value": "tech", "label": "Orbitron" },
160
+ { "value": "heavy", "label": "Montserrat" },
161
+ { "value": "retro", "label": "Bungee" }
162
+ ]
163
+ },
164
+ "motionBlur": {
165
+ "type": "boolean",
166
+ "label": "Motion blur",
167
+ "default": true
168
+ }
169
+ },
170
+ "examples": [
171
+ {
172
+ "name": "Hook",
173
+ "props": {}
174
+ },
175
+ {
176
+ "name": "From the right",
177
+ "props": {
178
+ "lines": [
179
+ "Record. Edit. *Ship.*"
180
+ ],
181
+ "enterFrom": "right",
182
+ "pan": "right",
183
+ "accent": "#f43f5e"
184
+ }
185
+ },
186
+ {
187
+ "name": "On a color",
188
+ "props": {
189
+ "lines": [
190
+ "Meet *Agentcut*"
191
+ ],
192
+ "background": "#111827",
193
+ "accent": "#60a5fa",
194
+ "zoom": 2.8
195
+ }
196
+ }
197
+ ],
198
+ "stillAt": 0.86
199
+ }
@@ -0,0 +1,185 @@
1
+ import { AbsoluteFill, spring, useCurrentFrame } from "remotion";
2
+ import { FONTS, blurStyle, easeOutExpo, exitOut, fill, mix, onColor, ramp, unit } from "../lib";
3
+ import type { MotionBaseProps } from "../types";
4
+
5
+ type Props = MotionBaseProps & {
6
+ name: string;
7
+ handle: string;
8
+ text: string;
9
+ time: string;
10
+ replies: number;
11
+ reposts: number;
12
+ likes: number;
13
+ views: number;
14
+ verified: boolean;
15
+ accent: string;
16
+ theme: string;
17
+ background: string;
18
+ };
19
+
20
+ /** 1234 → "1.2K", 3400000 → "3.4M". */
21
+ function compact(n: number) {
22
+ const v = Math.round(n);
23
+ if (v >= 1e6) return `${(v / 1e6).toFixed(v >= 1e7 ? 0 : 1).replace(/\.0$/, "")}M`;
24
+ if (v >= 1e4) return `${(v / 1e3).toFixed(0)}K`;
25
+ if (v >= 1e3) return `${(v / 1e3).toFixed(1).replace(/\.0$/, "")}K`;
26
+ return String(v);
27
+ }
28
+
29
+ const initials = (name: string) =>
30
+ name
31
+ .split(/\s+/)
32
+ .filter(Boolean)
33
+ .slice(0, 2)
34
+ .map((w) => w[0]?.toUpperCase() ?? "")
35
+ .join("") || "?";
36
+
37
+ const ICONS = {
38
+ reply: "M3 11a8 8 0 0 1 8-8h2a8 8 0 0 1 0 16h-1l-5 3v-4.5A8 8 0 0 1 3 11z",
39
+ repost: "M7 4 3 8l4 4M3 8h12a4 4 0 0 1 4 4v1M17 20l4-4-4-4M21 16H9a4 4 0 0 1-4-4v-1",
40
+ heart: "M12 20s-7.5-4.6-9.2-9.1C1.6 7.6 3.8 4.5 7 4.5c2 0 3.6 1.1 5 3 1.4-1.9 3-3 5-3 3.2 0 5.4 3.1 4.2 6.4C19.5 15.4 12 20 12 20z",
41
+ views: "M4 20V12M10 20V6M16 20v-9M22 20V3",
42
+ };
43
+
44
+ /** An X/Threads-style post that slides up, then its counters tick up and the heart pops red. */
45
+ export function SocialPost(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 === "dark";
51
+ const cardWidth = Math.min(width * (vertical ? 0.9 : 0.5), 1100 * u);
52
+ const s = cardWidth / 900;
53
+ const rise = spring({ frame, fps, config: { damping: 16, stiffness: 120, mass: 0.9 } });
54
+ const out = exitOut(frame, d, 14);
55
+ const count = ramp(frame, 22, Math.max(20, d * 0.45), easeOutExpo);
56
+ const likeAt = 26;
57
+ const heart = spring({ frame: frame - likeAt, fps, config: { damping: 9, stiffness: 200, mass: 0.6 } });
58
+ const liked = frame >= likeAt;
59
+ const burst = ramp(frame, likeAt, 16);
60
+
61
+ const fg = dark ? "#e7e9ea" : "#0f1419";
62
+ const muted = dark ? "#71767b" : "#536471";
63
+ const cardBg = dark ? "#000000" : "#ffffff";
64
+ const red = "#f91880";
65
+ const iconSize = 34 * s;
66
+
67
+ const stat = (key: keyof typeof ICONS, value: number, active = false) => (
68
+ <div key={key} style={{ display: "flex", alignItems: "center", gap: 12 * s, color: active ? red : muted }}>
69
+ <div style={{ position: "relative", width: iconSize, height: iconSize }}>
70
+ {active && burst > 0 && burst < 1
71
+ ? Array.from({ length: 8 }, (_, i) => {
72
+ const a = (i / 8) * Math.PI * 2;
73
+ const r = mix(10, 34, burst) * s;
74
+ return (
75
+ <div
76
+ key={i}
77
+ style={{
78
+ position: "absolute",
79
+ left: iconSize / 2 + Math.cos(a) * r - 4 * s,
80
+ top: iconSize / 2 + Math.sin(a) * r - 4 * s,
81
+ width: 8 * s,
82
+ height: 8 * s,
83
+ borderRadius: "50%",
84
+ background: i % 2 ? red : props.accent,
85
+ opacity: 1 - burst,
86
+ }}
87
+ />
88
+ );
89
+ })
90
+ : null}
91
+ <svg
92
+ width={iconSize}
93
+ height={iconSize}
94
+ viewBox="0 0 24 24"
95
+ style={{ position: "absolute", inset: 0, transform: active ? `scale(${liked ? mix(0.4, 1, heart) : 1})` : undefined }}
96
+ >
97
+ <path
98
+ d={ICONS[key]}
99
+ fill={active && liked ? red : "none"}
100
+ stroke="currentColor"
101
+ strokeWidth={active && liked ? 0 : 1.8}
102
+ strokeLinecap="round"
103
+ strokeLinejoin="round"
104
+ />
105
+ </svg>
106
+ </div>
107
+ <span style={{ fontSize: 28 * s, fontVariantNumeric: "tabular-nums" }}>{compact(value * count)}</span>
108
+ </div>
109
+ );
110
+
111
+ return (
112
+ <AbsoluteFill style={{ background: fill(props.background), alignItems: "center", justifyContent: "center", opacity: out }}>
113
+ <div
114
+ style={{
115
+ width: cardWidth,
116
+ boxSizing: "border-box",
117
+ padding: `${40 * s}px ${44 * s}px ${34 * s}px`,
118
+ borderRadius: 36 * s,
119
+ background: cardBg,
120
+ border: `${Math.max(1, 2 * s)}px solid ${dark ? "#2f3336" : "#eff3f4"}`,
121
+ boxShadow: `0 ${30 * s}px ${90 * s}px rgba(0,0,0,${dark ? 0.55 : 0.18})`,
122
+ fontFamily: FONTS.sans,
123
+ color: fg,
124
+ opacity: Math.min(1, rise * 1.5),
125
+ transform: `translateY(${mix(160 * s, 0, rise)}px) scale(${mix(0.94, 1, rise)})`,
126
+ ...blurStyle((1 - Math.min(1, rise)) * 10 * s),
127
+ }}
128
+ >
129
+ <div style={{ display: "flex", alignItems: "center", gap: 22 * s }}>
130
+ <div
131
+ style={{
132
+ flexShrink: 0,
133
+ width: 92 * s,
134
+ height: 92 * s,
135
+ borderRadius: "50%",
136
+ background: props.accent,
137
+ color: onColor(props.accent),
138
+ display: "flex",
139
+ alignItems: "center",
140
+ justifyContent: "center",
141
+ fontSize: 36 * s,
142
+ fontWeight: 700,
143
+ }}
144
+ >
145
+ {initials(props.name)}
146
+ </div>
147
+ <div style={{ minWidth: 0 }}>
148
+ <div style={{ display: "flex", alignItems: "center", gap: 8 * s, fontSize: 32 * s, fontWeight: 700 }}>
149
+ <span style={{ whiteSpace: "nowrap" }}>{props.name}</span>
150
+ {props.verified ? (
151
+ <svg width={32 * s} height={32 * s} viewBox="0 0 24 24">
152
+ <path
153
+ d="M12 1.5l2.6 1.9 3.2-.1 1 3 2.6 1.9-1 3.1 1 3.1-2.6 1.9-1 3-3.2-.1L12 22.5l-2.6-1.9-3.2.1-1-3-2.6-1.9 1-3.1-1-3.1 2.6-1.9 1-3 3.2.1z"
154
+ fill="#1d9bf0"
155
+ />
156
+ <path d="M7.8 12.2l2.8 2.8 5.6-5.8" fill="none" stroke="#fff" strokeWidth={2.2} strokeLinecap="round" strokeLinejoin="round" />
157
+ </svg>
158
+ ) : null}
159
+ </div>
160
+ <div style={{ fontSize: 28 * s, color: muted, whiteSpace: "nowrap" }}>
161
+ @{props.handle.replace(/^@/, "")} · {props.time}
162
+ </div>
163
+ </div>
164
+ </div>
165
+ <div style={{ marginTop: 26 * s, fontSize: 38 * s, lineHeight: 1.38, whiteSpace: "pre-wrap", letterSpacing: "-0.005em" }}>
166
+ {props.text}
167
+ </div>
168
+ <div
169
+ style={{
170
+ marginTop: 30 * s,
171
+ paddingTop: 24 * s,
172
+ borderTop: `${Math.max(1, 2 * s)}px solid ${dark ? "#2f3336" : "#eff3f4"}`,
173
+ display: "flex",
174
+ justifyContent: "space-between",
175
+ }}
176
+ >
177
+ {stat("reply", props.replies)}
178
+ {stat("repost", props.reposts)}
179
+ {stat("heart", props.likes, true)}
180
+ {stat("views", props.views)}
181
+ </div>
182
+ </div>
183
+ </AbsoluteFill>
184
+ );
185
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "id": "social-post",
3
+ "name": "Social Post",
4
+ "category": "Overlays",
5
+ "description": "An X/Threads-style post card that slides up, then its reply, repost, like and view counters tick up and the heart pops red.",
6
+ "useWhen": "Social proof and buzz: a customer's post praising the product, a launch announcement, a viral reaction, \"people are talking about it\". Stack a few staggered clips for a wall of love.",
7
+ "durationInFrames": 120,
8
+ "layer": "overlay",
9
+ "tags": ["social", "tweet", "post", "x", "twitter", "threads", "testimonial", "likes", "social proof"],
10
+ "props": {
11
+ "name": { "type": "text", "label": "Name", "default": "Maya Chen", "maxLength": 32 },
12
+ "handle": { "type": "text", "label": "Handle", "default": "mayabuilds", "maxLength": 24 },
13
+ "text": { "type": "text", "label": "Post", "default": "Just made our launch video in 20 minutes with agentcut. The agent edit alone is worth it 🤯", "multiline": true, "maxLength": 280 },
14
+ "time": { "type": "text", "label": "Time", "default": "2h" },
15
+ "replies": { "type": "number", "label": "Replies", "default": 214, "min": 0, "max": 100000000, "step": 1 },
16
+ "reposts": { "type": "number", "label": "Reposts", "default": 1280, "min": 0, "max": 100000000, "step": 1 },
17
+ "likes": { "type": "number", "label": "Likes", "default": 12400, "min": 0, "max": 100000000, "step": 1 },
18
+ "views": { "type": "number", "label": "Views", "default": 1800000, "min": 0, "max": 1000000000, "step": 1 },
19
+ "verified": { "type": "boolean", "label": "Verified badge", "default": true },
20
+ "accent": { "type": "color", "label": "Avatar color", "default": "#8b5cf6" },
21
+ "theme": { "type": "select", "label": "Theme", "default": "dark", "options": [{ "value": "dark", "label": "Dark" }, { "value": "light", "label": "Light" }] },
22
+ "background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" to sit over other layers." }
23
+ },
24
+ "examples": [
25
+ { "name": "Viral post", "props": { "background": "#0b0b0f" } },
26
+ { "name": "Light", "props": { "name": "Sam Ortiz", "handle": "samortiz", "text": "ok this is the cleanest product demo I've seen all year", "likes": 3200, "reposts": 410, "replies": 88, "views": 240000, "theme": "light", "accent": "#0ea5e9", "background": "#e8edf2" } },
27
+ { "name": "Announcement", "props": { "name": "agentcut", "handle": "agentcut", "text": "Agentcut is live.\nClaude edits your video with you, frame by frame.", "time": "now", "accent": "#f97316" } }
28
+ ],
29
+ "stillAt": 0.75
30
+ }
@@ -0,0 +1,191 @@
1
+ import type { CSSProperties } from "react";
2
+ import { AbsoluteFill, random, useCurrentFrame } from "remotion";
3
+ import { FONTS, exitOut, fill, mix, ramp, splitHighlights, unit } from "../lib";
4
+ import type { MotionBaseProps } from "../types";
5
+
6
+ type Props = MotionBaseProps & {
7
+ lines: string[];
8
+ tileColor: string;
9
+ color: string;
10
+ accent: string;
11
+ background: string;
12
+ size: number;
13
+ font: string;
14
+ stagger: number;
15
+ flips: number;
16
+ uppercase: boolean;
17
+ seed: number;
18
+ };
19
+
20
+ const POOL = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
21
+ /** Frames per flap flip. */
22
+ const FLIP = 3;
23
+
24
+ /**
25
+ * A split-flap board (the airport departures sign): every character sits in its own tile and flips
26
+ * through random glyphs, top flap folding down then the bottom flap dropping in, before it lands.
27
+ * Tiles land left to right, line by line.
28
+ */
29
+ export function SplitFlap(props: Props) {
30
+ const frame = useCurrentFrame();
31
+ const { width, height, durationInFrames: d } = props;
32
+ const u = unit(width, height);
33
+ const vertical = height > width;
34
+ const out = exitOut(frame, d, 10);
35
+
36
+ const rows = props.lines.map((line) =>
37
+ splitHighlights(props.uppercase ? line.toUpperCase() : line).flatMap((word, w) => [
38
+ ...(w > 0 ? [{ char: " ", highlighted: false }] : []),
39
+ ...Array.from(word.text).map((char) => ({ char, highlighted: word.highlighted })),
40
+ ]),
41
+ );
42
+ const cols = Math.max(1, ...rows.map((row) => row.length));
43
+
44
+ // Tile size: the size prop, shrunk so the longest line fits the frame.
45
+ const gap = Math.max(2, 6 * u);
46
+ const room = width - (vertical ? 70 : 140) * u;
47
+ const wanted = (props.size / 100) * Math.min(width, height) * (vertical ? 1.1 : 1);
48
+ const tileW = Math.min(wanted * 0.74, (room - gap * (cols - 1)) / cols);
49
+ const tileH = tileW * 1.42;
50
+ const fontSize = tileW * 1.18;
51
+ const radius = tileW * 0.1;
52
+
53
+ // Landing schedule fits the clip: the last tile lands by ~65% of it.
54
+ const longestFlips = props.flips + 6;
55
+ const budget = Math.max(8, d * 0.65 - 6 - longestFlips * FLIP);
56
+ const stagger = Math.min(props.stagger, budget / Math.max(1, cols - 1 + (rows.length - 1) * 2));
57
+
58
+ const glyphStyle: CSSProperties = {
59
+ position: "absolute",
60
+ left: 0,
61
+ width: tileW,
62
+ height: tileH,
63
+ display: "flex",
64
+ alignItems: "center",
65
+ justifyContent: "center",
66
+ fontFamily: FONTS[props.font] ?? FONTS.mono,
67
+ fontWeight: props.font === "condensed" ? 400 : 600,
68
+ fontSize,
69
+ lineHeight: 1,
70
+ };
71
+
72
+ // shade: darkens (< 0) or lightens (> 0) the flap with a plain overlay (the browser export can't draw brightness()).
73
+ const half = (char: string, color: string, which: "top" | "bottom", extra?: CSSProperties, shade = 0) => (
74
+ <div
75
+ style={{
76
+ position: "absolute",
77
+ left: 0,
78
+ top: which === "top" ? 0 : tileH / 2,
79
+ width: tileW,
80
+ height: tileH / 2,
81
+ overflow: "hidden",
82
+ background: props.tileColor,
83
+ borderRadius: which === "top" ? `${radius}px ${radius}px 0 0` : `0 0 ${radius}px ${radius}px`,
84
+ ...extra,
85
+ }}
86
+ >
87
+ <div style={{ ...glyphStyle, top: which === "top" ? 0 : -tileH / 2, color }}>{char === " " ? "" : char}</div>
88
+ {shade !== 0 ? (
89
+ <div
90
+ style={{
91
+ position: "absolute",
92
+ inset: 0,
93
+ background: shade < 0 ? `rgba(0, 0, 0, ${-shade})` : `rgba(255, 255, 255, ${shade})`,
94
+ }}
95
+ />
96
+ ) : null}
97
+ </div>
98
+ );
99
+
100
+ return (
101
+ <AbsoluteFill
102
+ style={{ background: fill(props.background), alignItems: "center", justifyContent: "center", opacity: out }}
103
+ >
104
+ <div style={{ display: "flex", flexDirection: "column", gap: gap * 1.6 }}>
105
+ {rows.map((row, r) => {
106
+ const padded = [...row, ...Array.from({ length: cols - row.length }, () => ({ char: " ", highlighted: false }))];
107
+ return (
108
+ <div key={r} style={{ display: "flex", gap }}>
109
+ {padded.map((cell, c) => {
110
+ const key = `${props.seed}-${r}-${c}`;
111
+ const start = 4 + (c + r * 2) * stagger;
112
+ const appear = ramp(frame, start - 4, 6);
113
+ const flipsHere = cell.char === " " ? 0 : props.flips + Math.floor(random(`n${key}`) * 6);
114
+ // glyph k (0…flipsHere): random glyphs, the last one is the real character.
115
+ const glyph = (k: number) =>
116
+ k <= 0 && flipsHere > 0
117
+ ? " "
118
+ : k >= flipsHere
119
+ ? cell.char
120
+ : POOL[Math.floor(random(`g${key}-${k}`) * POOL.length)];
121
+ const t = (frame - start) / FLIP;
122
+ const k = Math.max(0, Math.min(flipsHere, Math.floor(t)));
123
+ const flipping = t >= 0 && t < flipsHere;
124
+ const p = flipping ? t - Math.floor(t) : 0;
125
+ const prev = glyph(k);
126
+ const next = flipping ? glyph(k + 1) : prev;
127
+ const landed = t >= flipsHere;
128
+ const color = landed && cell.highlighted ? props.accent : props.color;
129
+ // A brief accent flash on the tile as its real character lands.
130
+ const flash = cell.char !== " " && landed ? 1 - ramp(frame, start + flipsHere * FLIP, 8) : 0;
131
+ return (
132
+ <div
133
+ key={c}
134
+ style={{
135
+ position: "relative",
136
+ width: tileW,
137
+ height: tileH,
138
+ opacity: appear,
139
+ transform: `translateY(${mix(tileH * 0.15, 0, appear)}px)`,
140
+ boxShadow: `0 ${4 * u}px ${12 * u}px rgba(0, 0, 0, 0.35)`,
141
+ borderRadius: radius,
142
+ }}
143
+ >
144
+ {/* Behind: the next glyph's top, the previous glyph's bottom. */}
145
+ {half(next, color, "top")}
146
+ {half(prev, color, "bottom")}
147
+ {/* The moving flap: previous top folding down, then next bottom dropping in. */}
148
+ {flipping && p < 0.5
149
+ ? half(prev, color, "top", {
150
+ transform: `scaleY(${1 - p * 2})`,
151
+ transformOrigin: "50% 100%",
152
+ }, -0.4 * p * 2)
153
+ : null}
154
+ {flipping && p >= 0.5
155
+ ? half(next, color, "bottom", {
156
+ transform: `scaleY(${(p - 0.5) * 2})`,
157
+ transformOrigin: "50% 0%",
158
+ }, 0.18 * (1 - (p - 0.5) * 2))
159
+ : null}
160
+ {flash > 0 ? (
161
+ <div
162
+ style={{
163
+ position: "absolute",
164
+ inset: 0,
165
+ borderRadius: radius,
166
+ border: `${Math.max(1, 2 * u)}px solid ${props.accent}`,
167
+ opacity: flash * 0.8,
168
+ }}
169
+ />
170
+ ) : null}
171
+ {/* The seam between the flaps. */}
172
+ <div
173
+ style={{
174
+ position: "absolute",
175
+ left: 0,
176
+ right: 0,
177
+ top: tileH / 2 - Math.max(1, 1.5 * u) / 2,
178
+ height: Math.max(1, 1.5 * u),
179
+ background: "rgba(0, 0, 0, 0.55)",
180
+ }}
181
+ />
182
+ </div>
183
+ );
184
+ })}
185
+ </div>
186
+ );
187
+ })}
188
+ </div>
189
+ </AbsoluteFill>
190
+ );
191
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "id": "split-flap",
3
+ "name": "Split-Flap Board",
4
+ "category": "Text & Titles",
5
+ "description": "An airport departures board: each character sits in its own tile and flips through random glyphs before landing, left to right.",
6
+ "useWhen": "Announcements with a sense of arrival: a launch date, a destination or city, \"Now boarding\", a version number, a scoreboard or a countdown to an event. Keep lines short (under ~14 characters) so tiles stay big, especially in mobile.",
7
+ "durationInFrames": 120,
8
+ "layer": "overlay",
9
+ "tags": ["split flap", "solari", "departures", "airport", "board", "flip", "retro", "announcement", "travel"],
10
+ "props": {
11
+ "lines": { "type": "lines", "label": "Text", "default": ["NOW BOARDING", "*V2.0* GATE 12"], "max": 3, "help": "One line per row. *Starred* words land in the accent." },
12
+ "tileColor": { "type": "color", "label": "Tiles", "default": "#1a1a1d" },
13
+ "color": { "type": "color", "label": "Text", "default": "#f5f5f4" },
14
+ "accent": { "type": "color", "label": "Accent", "default": "#fbbf24", "help": "Starred words and the landing flash." },
15
+ "background": { "type": "color", "label": "Background", "default": "transparent", "help": "\"transparent\" to sit over other layers." },
16
+ "size": { "type": "number", "label": "Size", "default": 10, "min": 4, "max": 20, "step": 0.5, "unit": "% of frame", "help": "Largest tile size; long lines shrink to fit." },
17
+ "font": { "type": "select", "label": "Font", "default": "mono", "options": [{ "value": "mono", "label": "Mono" }, { "value": "condensed", "label": "Anton" }, { "value": "grotesk", "label": "Space Grotesk" }, { "value": "sans", "label": "Inter" }] },
18
+ "stagger": { "type": "number", "label": "Stagger", "default": 2, "min": 0, "max": 8, "step": 0.5, "unit": "frames/tile", "help": "Shrinks to fit the clip." },
19
+ "flips": { "type": "number", "label": "Flips", "default": 6, "min": 1, "max": 16, "step": 1, "help": "Random glyphs each tile passes before landing (plus a few extra per tile)." },
20
+ "uppercase": { "type": "boolean", "label": "Uppercase", "default": true },
21
+ "seed": { "type": "number", "label": "Pattern", "default": 1, "min": 0, "max": 99, "step": 1 }
22
+ },
23
+ "examples": [
24
+ { "name": "Departures", "props": {} },
25
+ { "name": "Launch date", "props": { "lines": ["LAUNCH", "*OCT 28*"], "background": "#0c0c0e", "font": "condensed", "size": 14, "accent": "#34d399" } },
26
+ { "name": "Light board", "props": { "lines": ["PARIS 09:40", "TOKYO *ON TIME*"], "tileColor": "#fafaf9", "color": "#18181b", "accent": "#ea580c", "background": "#e7e5e4", "size": 8 } }
27
+ ],
28
+ "stillAt": 0.8
29
+ }