agentcut 0.2.26 → 0.2.27
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/README.md +177 -177
- package/dist/studio/agents/claude.js +3 -2
- package/dist/studio/agents/claude.js.map +1 -1
- package/dist/studio/chat.js +1 -1
- package/dist/studio/chat.js.map +1 -1
- package/dist/studio/cli.js +24 -24
- package/dist/studio/download.d.ts +24 -0
- package/dist/studio/download.js +234 -0
- package/dist/studio/download.js.map +1 -0
- package/dist/studio/host.js +8 -0
- package/dist/studio/host.js.map +1 -1
- package/dist/studio/housekeeping.d.ts +2 -2
- package/dist/studio/housekeeping.js +18 -17
- package/dist/studio/housekeeping.js.map +1 -1
- package/dist/studio/release-cursor.js +21 -21
- package/dist/studio/release-video.js +10 -10
- package/dist/studio/tools.js +7 -0
- package/dist/studio/tools.js.map +1 -1
- package/package.json +56 -56
- package/template/AGENTS.md +14 -14
- package/template/components/README.md +70 -70
- package/template/components/before-after/BeforeAfter.tsx +89 -89
- package/template/components/catalog.ts +107 -107
- package/template/components/cinematic/Device3D.tsx +324 -324
- package/template/components/cinematic/devices3d/display-model.ts +184 -184
- package/template/components/cinematic/devices3d/iphone-model.ts +643 -643
- package/template/components/cinematic/devices3d/macbook-model.ts +608 -608
- package/template/components/cinematic/devices3d/models.ts +657 -657
- package/template/components/cinematic/devices3d/runtime.ts +267 -267
- package/template/components/cinematic/math.ts +100 -100
- package/template/components/color/grade-effect.ts +650 -650
- package/template/components/color/grade.ts +512 -512
- package/template/components/color/looks.ts +154 -154
- package/template/components/countdown/Countdown.tsx +166 -166
- package/template/components/dot-trace-title/DotTraceTitle.tsx +181 -181
- package/template/components/dot-trace-title/meta.json +51 -51
- package/template/components/generate/GenerateReveal.tsx +381 -381
- package/template/components/hook-card/HookCard.tsx +554 -554
- package/template/components/index.ts +199 -199
- package/template/components/lib.ts +191 -191
- package/template/components/line-diagram/LineDiagram.tsx +205 -205
- package/template/components/line-diagram/meta.json +215 -215
- package/template/components/list-card/ListCard.tsx +104 -104
- package/template/components/live-clip.ts +75 -75
- package/template/components/looks.tsx +1447 -1447
- package/template/components/loops/LoopCanvas.tsx +132 -132
- package/template/components/loops/engine.ts +184 -184
- package/template/components/loops/library.ts +667 -667
- package/template/components/loops/library2.ts +777 -777
- package/template/components/motion-loop/MotionLoop.tsx +37 -37
- package/template/components/motion-loop/meta.json +311 -311
- package/template/components/props.ts +73 -73
- package/template/components/quote-card/QuoteCard.tsx +71 -71
- package/template/components/style-layer.tsx +233 -233
- package/template/components/styles.ts +113 -113
- package/template/components/types.ts +66 -66
- package/template/components/word-pop/WordPop.tsx +59 -59
- package/template/components/word-stack/WordStack.tsx +122 -122
- package/template/presets/charcoal-sketch/PROMPT.md +48 -48
- package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -34
- package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -376
- package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -73
- package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -119
- package/template/runtime/composition.tsx +1189 -1189
- package/template/runtime/helpers.tsx +230 -230
- package/template/runtime/index.tsx +22 -22
- package/template/runtime/types.ts +315 -315
- package/template/skill/SKILL.md +186 -187
- package/template/skill/references/broll.md +44 -44
- package/template/skill/references/browser-export.md +61 -61
- package/template/skill/references/cinematic.md +206 -206
- package/template/skill/references/color.md +79 -79
- package/template/skill/references/craft.md +97 -97
- package/template/skill/references/editing-styles.md +57 -57
- package/template/skill/references/feature-launch.md +34 -34
- package/template/skill/references/footage.md +72 -72
- package/template/skill/references/format.md +142 -142
- package/template/skill/references/how-to.md +146 -146
- package/template/skill/references/launch-direction.md +89 -89
- package/template/skill/references/loops.md +151 -151
- package/template/skill/references/mcp-external.md +19 -19
- package/template/skill/references/performance.md +93 -93
- package/template/skill/references/person-cutout.md +19 -19
- package/template/skill/references/presets.md +60 -60
- package/template/skill/references/product-launch.md +134 -134
- package/template/skill/references/release-capture.md +53 -53
- package/template/skill/references/sound.md +167 -166
- package/template/skill/references/style-spy.md +160 -160
- package/template/skill/references/website-howto.md +45 -45
- package/template/starter/.studio/chat.json +1 -1
- package/template/starter/layers.json +46 -46
- package/template/starter/notes.md +4 -4
- package/template/starter/project.json +13 -13
- package/template/starter/scenes/Title.tsx +38 -38
|
@@ -1,217 +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"
|
|
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
143
|
},
|
|
144
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
|
-
}
|
|
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
|
+
}
|
|
@@ -1,104 +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
|
-
}
|
|
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
|
+
}
|