agentcut 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -2
- package/dist/bridge.d.ts +45 -0
- package/dist/bridge.js +691 -0
- package/dist/bridge.js.map +1 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.js +50 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/log.d.ts +1 -0
- package/dist/log.js +14 -0
- package/dist/log.js.map +1 -0
- package/dist/studio/agents/claude.d.ts +7 -0
- package/dist/studio/agents/claude.js +155 -0
- package/dist/studio/agents/claude.js.map +1 -0
- package/dist/studio/agents/codex.d.ts +4 -0
- package/dist/studio/agents/codex.js +169 -0
- package/dist/studio/agents/codex.js.map +1 -0
- package/dist/studio/agents/index.d.ts +8 -0
- package/dist/studio/agents/index.js +50 -0
- package/dist/studio/agents/index.js.map +1 -0
- package/dist/studio/agents/types.d.ts +131 -0
- package/dist/studio/agents/types.js +11 -0
- package/dist/studio/agents/types.js.map +1 -0
- package/dist/studio/bundler.d.ts +29 -0
- package/dist/studio/bundler.js +136 -0
- package/dist/studio/bundler.js.map +1 -0
- package/dist/studio/chat.d.ts +147 -0
- package/dist/studio/chat.js +681 -0
- package/dist/studio/chat.js.map +1 -0
- package/dist/studio/cli.d.ts +2 -0
- package/dist/studio/cli.js +194 -0
- package/dist/studio/cli.js.map +1 -0
- package/dist/studio/components.d.ts +4 -0
- package/dist/studio/components.js +36 -0
- package/dist/studio/components.js.map +1 -0
- package/dist/studio/host.d.ts +105 -0
- package/dist/studio/host.js +634 -0
- package/dist/studio/host.js.map +1 -0
- package/dist/studio/http.d.ts +21 -0
- package/dist/studio/http.js +240 -0
- package/dist/studio/http.js.map +1 -0
- package/dist/studio/music.d.ts +35 -0
- package/dist/studio/music.js +130 -0
- package/dist/studio/music.js.map +1 -0
- package/dist/studio/proc.d.ts +11 -0
- package/dist/studio/proc.js +69 -0
- package/dist/studio/proc.js.map +1 -0
- package/dist/studio/projects.d.ts +84 -0
- package/dist/studio/projects.js +369 -0
- package/dist/studio/projects.js.map +1 -0
- package/dist/studio/render.d.ts +24 -0
- package/dist/studio/render.js +197 -0
- package/dist/studio/render.js.map +1 -0
- package/dist/studio/reveal.d.ts +7 -0
- package/dist/studio/reveal.js +49 -0
- package/dist/studio/reveal.js.map +1 -0
- package/dist/studio/schema.d.ts +4152 -0
- package/dist/studio/schema.js +358 -0
- package/dist/studio/schema.js.map +1 -0
- package/dist/studio/tools.d.ts +2 -0
- package/dist/studio/tools.js +165 -0
- package/dist/studio/tools.js.map +1 -0
- package/dist/studio/voice.d.ts +150 -0
- package/dist/studio/voice.js +434 -0
- package/dist/studio/voice.js.map +1 -0
- package/dist/studio/workspace.d.ts +31 -0
- package/dist/studio/workspace.js +187 -0
- package/dist/studio/workspace.js.map +1 -0
- package/package.json +50 -4
- package/template/AGENTS.md +13 -0
- package/template/components/CATALOG.md +1306 -0
- package/template/components/README.md +61 -0
- package/template/components/STYLES.md +246 -0
- package/template/components/arcade-title/ArcadeTitle.tsx +860 -0
- package/template/components/arcade-title/meta.json +28 -0
- package/template/components/aurora/Aurora.tsx +63 -0
- package/template/components/aurora/meta.json +28 -0
- package/template/components/bar-wipe-title/BarWipeTitle.tsx +94 -0
- package/template/components/bar-wipe-title/meta.json +29 -0
- package/template/components/before-after/BeforeAfter.tsx +89 -0
- package/template/components/before-after/meta.json +233 -0
- package/template/components/bento-grid/BentoGrid.tsx +202 -0
- package/template/components/bento-grid/meta.json +25 -0
- package/template/components/blur-in-title/BlurInTitle.tsx +121 -0
- package/template/components/blur-in-title/meta.json +32 -0
- package/template/components/catalog.json +8730 -0
- package/template/components/catalog.ts +103 -0
- package/template/components/chat-thread/ChatThread.tsx +128 -0
- package/template/components/chat-thread/meta.json +24 -0
- package/template/components/checklist/Checklist.tsx +129 -0
- package/template/components/checklist/meta.json +25 -0
- package/template/components/confetti/Confetti.tsx +109 -0
- package/template/components/confetti/meta.json +28 -0
- package/template/components/countdown/Countdown.tsx +166 -0
- package/template/components/countdown/meta.json +28 -0
- package/template/components/cut-and-paste/CutAndPaste.tsx +654 -0
- package/template/components/cut-and-paste/meta.json +29 -0
- package/template/components/decode-text/DecodeText.tsx +97 -0
- package/template/components/decode-text/meta.json +29 -0
- package/template/components/editorial-quote/EditorialQuote.tsx +122 -0
- package/template/components/editorial-quote/meta.json +28 -0
- package/template/components/glitch-title/GlitchTitle.tsx +171 -0
- package/template/components/glitch-title/meta.json +32 -0
- package/template/components/halftone-wave/HalftoneWave.tsx +106 -0
- package/template/components/halftone-wave/meta.json +28 -0
- package/template/components/highlighter/Highlighter.tsx +142 -0
- package/template/components/highlighter/meta.json +28 -0
- package/template/components/hook-card/HookCard.tsx +552 -0
- package/template/components/hook-card/meta.json +304 -0
- package/template/components/index.ts +149 -0
- package/template/components/iris-wipe/IrisWipe.tsx +76 -0
- package/template/components/iris-wipe/meta.json +24 -0
- package/template/components/kinetic-poster/KineticPoster.tsx +437 -0
- package/template/components/kinetic-poster/meta.json +31 -0
- package/template/components/kinetic-punch/KineticPunch.tsx +80 -0
- package/template/components/kinetic-punch/meta.json +30 -0
- package/template/components/lava-lamp/LavaLamp.tsx +92 -0
- package/template/components/lava-lamp/meta.json +28 -0
- package/template/components/letter-cascade/LetterCascade.tsx +102 -0
- package/template/components/letter-cascade/meta.json +29 -0
- package/template/components/lib.ts +179 -0
- package/template/components/light-leak/LightLeakTransition.tsx +43 -0
- package/template/components/light-leak/meta.json +74 -0
- package/template/components/line-diagram/LineDiagram.tsx +205 -0
- package/template/components/line-diagram/meta.json +217 -0
- package/template/components/list-card/ListCard.tsx +104 -0
- package/template/components/list-card/meta.json +232 -0
- package/template/components/logo-sting/LogoSting.tsx +129 -0
- package/template/components/logo-sting/meta.json +29 -0
- package/template/components/looks.tsx +1447 -0
- package/template/components/lower-third/LowerThird.tsx +100 -0
- package/template/components/lower-third/meta.json +24 -0
- package/template/components/marquee/Marquee.tsx +100 -0
- package/template/components/marquee/meta.json +30 -0
- package/template/components/notification/Notification.tsx +115 -0
- package/template/components/notification/meta.json +27 -0
- package/template/components/outline-fill/OutlineFill.tsx +106 -0
- package/template/components/outline-fill/meta.json +28 -0
- package/template/components/panel-sweep/PanelSweep.tsx +86 -0
- package/template/components/panel-sweep/meta.json +25 -0
- package/template/components/prompt-box/PromptBox.tsx +131 -0
- package/template/components/prompt-box/meta.json +24 -0
- package/template/components/props.ts +73 -0
- package/template/components/quote-card/QuoteCard.tsx +71 -0
- package/template/components/quote-card/meta.json +216 -0
- package/template/components/shape-shift/ShapeShift.tsx +420 -0
- package/template/components/shape-shift/meta.json +31 -0
- package/template/components/slide-zoom-message/SlideZoomMessage.tsx +179 -0
- package/template/components/slide-zoom-message/meta.json +199 -0
- package/template/components/social-post/SocialPost.tsx +185 -0
- package/template/components/social-post/meta.json +30 -0
- package/template/components/split-flap/SplitFlap.tsx +191 -0
- package/template/components/split-flap/meta.json +29 -0
- package/template/components/spotlight-grid/SpotlightGrid.tsx +84 -0
- package/template/components/spotlight-grid/meta.json +25 -0
- package/template/components/stat-counter/StatCounter.tsx +117 -0
- package/template/components/stat-counter/meta.json +27 -0
- package/template/components/sticker-badge/StickerBadge.tsx +46 -0
- package/template/components/sticker-badge/meta.json +220 -0
- package/template/components/sticker-slam/StickerSlam.tsx +941 -0
- package/template/components/sticker-slam/meta.json +34 -0
- package/template/components/style-layer.tsx +233 -0
- package/template/components/styles.json +762 -0
- package/template/components/styles.ts +113 -0
- package/template/components/target-lock/TargetLock.tsx +662 -0
- package/template/components/target-lock/meta.json +32 -0
- package/template/components/text-reveal/TextReveal.tsx +99 -0
- package/template/components/text-reveal/meta.json +28 -0
- package/template/components/tile-wipe/TileWipe.tsx +75 -0
- package/template/components/tile-wipe/meta.json +24 -0
- package/template/components/type-zoom/TypeZoom.tsx +103 -0
- package/template/components/type-zoom/meta.json +27 -0
- package/template/components/types.ts +66 -0
- package/template/components/typewriter/Typewriter.tsx +112 -0
- package/template/components/typewriter/meta.json +29 -0
- package/template/components/word-pop/WordPop.tsx +59 -0
- package/template/components/word-pop/meta.json +237 -0
- package/template/components/word-stack/WordStack.tsx +122 -0
- package/template/components/word-stack/meta.json +27 -0
- package/template/components/word-swap/WordSwap.tsx +127 -0
- package/template/components/word-swap/meta.json +30 -0
- package/template/presets/charcoal-sketch/PROMPT.md +48 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-0.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-1.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/grain-2.png +0 -0
- package/template/presets/charcoal-sketch/assets/paper/sketch-paper.jpg +0 -0
- package/template/presets/charcoal-sketch/assets/paper/smudge.png +0 -0
- package/template/presets/charcoal-sketch/poster.jpg +0 -0
- package/template/presets/charcoal-sketch/preset.json +17 -0
- package/template/presets/charcoal-sketch/preview.mp4 +0 -0
- package/template/presets/charcoal-sketch/scenes/Grain.tsx +23 -0
- package/template/presets/charcoal-sketch/scenes/Paper.tsx +17 -0
- package/template/presets/charcoal-sketch/scenes/examples/Agents.tsx +100 -0
- package/template/presets/charcoal-sketch/scenes/examples/Approvals.tsx +110 -0
- package/template/presets/charcoal-sketch/scenes/examples/Blog.tsx +105 -0
- package/template/presets/charcoal-sketch/scenes/examples/EndCard.tsx +41 -0
- package/template/presets/charcoal-sketch/scenes/examples/Hook.tsx +130 -0
- package/template/presets/charcoal-sketch/scenes/examples/Ideas.tsx +92 -0
- package/template/presets/charcoal-sketch/scenes/examples/Posting.tsx +128 -0
- package/template/presets/charcoal-sketch/scenes/lib/painfix.tsx +119 -0
- package/template/presets/charcoal-sketch/scenes/lib/sketch.tsx +291 -0
- package/template/presets/charcoal-sketch/scripts/build_layers.example.py +193 -0
- package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -0
- package/template/presets/charcoal-sketch/scripts/make_textures.py +93 -0
- package/template/presets/punk-cut-paper/PROMPT.md +37 -0
- package/template/presets/punk-cut-paper/assets/paper/desk-cream.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/grain-overlay.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-black.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-red.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/halftone-yellow.png +0 -0
- package/template/presets/punk-cut-paper/assets/paper/kraft.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/newsprint.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/paper-cream.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/paper-white.jpg +0 -0
- package/template/presets/punk-cut-paper/assets/paper/tape.png +0 -0
- package/template/presets/punk-cut-paper/build_layers.example.py +150 -0
- package/template/presets/punk-cut-paper/poster.jpg +0 -0
- package/template/presets/punk-cut-paper/preset.json +15 -0
- package/template/presets/punk-cut-paper/preview.mp4 +0 -0
- package/template/presets/punk-cut-paper/scenes/Backdrop.tsx +76 -0
- package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -0
- package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -0
- package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -0
- package/template/presets/punk-cut-paper/scenes/Xerox.tsx +31 -0
- package/template/presets/punk-cut-paper/scenes/lib/punk.tsx +208 -0
- package/template/runtime/composition.tsx +920 -0
- package/template/runtime/helpers.tsx +228 -0
- package/template/runtime/index.tsx +22 -0
- package/template/runtime/types.ts +248 -0
- package/template/skill/SKILL.md +149 -0
- package/template/skill/references/browser-export.md +61 -0
- package/template/skill/references/components.md +38 -0
- package/template/skill/references/craft.md +53 -0
- package/template/skill/references/cursor.md +91 -0
- package/template/skill/references/footage.md +73 -0
- package/template/skill/references/format.md +140 -0
- package/template/skill/references/presets.md +56 -0
- package/template/skill/references/sound.md +128 -0
- package/template/starter/.studio/chat.json +1 -0
- package/template/starter/assets/.keep +0 -0
- package/template/starter/layers.json +46 -0
- package/template/starter/notes.md +4 -0
- package/template/starter/project.json +13 -0
- package/template/starter/renders/.keep +0 -0
- package/template/starter/scenes/Title.tsx +38 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// Project styles: one look for a whole video. A project picks one in project.json (`"style": "loud"`)
|
|
2
|
+
// and every prop tagged with a token in its meta.json (`"style": "accent"`) follows it unless the
|
|
3
|
+
// clip sets that prop itself. Captions and text clips follow it too. The styles themselves live in
|
|
4
|
+
// styles.json (the helper reads it too). Metadata only (no React).
|
|
5
|
+
import stylesData from "./styles.json";
|
|
6
|
+
import type { PropSpec, PropValues } from "./types";
|
|
7
|
+
|
|
8
|
+
/** What a style decides. Props opt in with `"style": "<token>"` in their meta.json. */
|
|
9
|
+
export type StyleToken =
|
|
10
|
+
/** Graphic language of the talking-head components (looks.tsx): ink, paper, notebook, crt, clean. */
|
|
11
|
+
| "look"
|
|
12
|
+
/** Headline font: FONTS keys in order of preference ("condensed,wide"); the first the prop offers wins. */
|
|
13
|
+
| "font"
|
|
14
|
+
/** Headline weight; the prop's nearest option is used. */
|
|
15
|
+
| "weight"
|
|
16
|
+
/** Text over footage. */
|
|
17
|
+
| "text"
|
|
18
|
+
| "accent"
|
|
19
|
+
/** Text sitting on the accent color (marker highlights). */
|
|
20
|
+
| "onAccent"
|
|
21
|
+
/** Card / panel fill behind small text. */
|
|
22
|
+
| "panel"
|
|
23
|
+
/** Text on that panel. */
|
|
24
|
+
| "panelText"
|
|
25
|
+
/** Borders, hard shadows and pen strokes. */
|
|
26
|
+
| "line"
|
|
27
|
+
/** "dark" or "light" UI cards. */
|
|
28
|
+
| "theme"
|
|
29
|
+
/** Fill of full-frame components. */
|
|
30
|
+
| "backdrop";
|
|
31
|
+
|
|
32
|
+
export interface MotionStyle {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
/** One line: what it looks like. */
|
|
36
|
+
description: string;
|
|
37
|
+
/** Graphic language of the talking-head components, captions and overlay (looks.tsx). */
|
|
38
|
+
look: "ink" | "paper" | "notebook" | "crt" | "neon" | "line" | "vhs" | "clean";
|
|
39
|
+
tokens: Record<StyleToken, string>;
|
|
40
|
+
/**
|
|
41
|
+
* Camera on footage clips (style-layer.tsx): "punch" jump-cut zooms with a shake, "snap"
|
|
42
|
+
* stop-motion steps, "drift" a slow push-in, "glitch" jumps, "still" none. `every` in frames.
|
|
43
|
+
*/
|
|
44
|
+
camera: {
|
|
45
|
+
mode: "punch" | "snap" | "drift" | "glitch" | "tape" | "still";
|
|
46
|
+
zoom: number;
|
|
47
|
+
every: number;
|
|
48
|
+
shake: number;
|
|
49
|
+
/** A color grade for the footage, as a CSS filter ("saturate(1.2) sepia(0.2)"). */
|
|
50
|
+
grade?: string;
|
|
51
|
+
};
|
|
52
|
+
/** Texture over the whole video. */
|
|
53
|
+
overlay: { kind: "grain" | "scanlines" | "neon" | "vhs" | "vignette" | "none"; amount: number };
|
|
54
|
+
/**
|
|
55
|
+
* Caption tracks: drawn in the look (position, words per line). The font and colors are the
|
|
56
|
+
* fallback for pages that can't draw the look.
|
|
57
|
+
*/
|
|
58
|
+
captions: {
|
|
59
|
+
fontFamily: string;
|
|
60
|
+
fontWeight: number;
|
|
61
|
+
color: string;
|
|
62
|
+
highlight: string;
|
|
63
|
+
preset: "pop" | "karaoke" | "plain";
|
|
64
|
+
position: "top" | "center" | "lower" | "bottom";
|
|
65
|
+
wordsPerLine: number;
|
|
66
|
+
};
|
|
67
|
+
/** Defaults for text clips. */
|
|
68
|
+
text: { fontFamily: string; fontWeight: number; color: string };
|
|
69
|
+
/** How to edit in this style: pacing, camera, positions (for Claude and the style picker). */
|
|
70
|
+
guide: string[];
|
|
71
|
+
/** The component to reach for, by job in the edit, with the props that make it this style. */
|
|
72
|
+
shots: { job: string; component: string; props?: PropValues }[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const MOTION_STYLES: Record<string, MotionStyle> = Object.fromEntries(
|
|
76
|
+
(stylesData as unknown as MotionStyle[]).map((style) => [style.id, style]),
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
export const STYLE_TOKENS: StyleToken[] = [
|
|
80
|
+
"look",
|
|
81
|
+
"font",
|
|
82
|
+
"weight",
|
|
83
|
+
"text",
|
|
84
|
+
"accent",
|
|
85
|
+
"onAccent",
|
|
86
|
+
"panel",
|
|
87
|
+
"panelText",
|
|
88
|
+
"line",
|
|
89
|
+
"theme",
|
|
90
|
+
"backdrop",
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
export function getMotionStyle(id: string | null | undefined): MotionStyle | null {
|
|
94
|
+
return (id && MOTION_STYLES[id]) || null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** The style's value for one prop, if the prop follows that token and the value fits the prop. */
|
|
98
|
+
export function styleValueFor(spec: PropSpec, style: MotionStyle | null): PropValues[string] | undefined {
|
|
99
|
+
if (!style || !spec.style) return undefined;
|
|
100
|
+
const value = style.tokens[spec.style];
|
|
101
|
+
if (spec.type === "select") {
|
|
102
|
+
const options = spec.options.map((o) => o.value);
|
|
103
|
+
if (spec.style === "weight") {
|
|
104
|
+
const target = Number(value);
|
|
105
|
+
const numeric = options.filter((o) => Number.isFinite(Number(o)));
|
|
106
|
+
if (!numeric.length || !Number.isFinite(target)) return undefined;
|
|
107
|
+
return numeric.reduce((best, o) => (Math.abs(Number(o) - target) < Math.abs(Number(best) - target) ? o : best));
|
|
108
|
+
}
|
|
109
|
+
return value.split(",").map((v) => v.trim()).find((v) => options.includes(v));
|
|
110
|
+
}
|
|
111
|
+
if (spec.type === "color" || spec.type === "text") return value;
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|