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.
Files changed (94) hide show
  1. package/README.md +177 -177
  2. package/dist/studio/agents/claude.js +3 -2
  3. package/dist/studio/agents/claude.js.map +1 -1
  4. package/dist/studio/chat.js +1 -1
  5. package/dist/studio/chat.js.map +1 -1
  6. package/dist/studio/cli.js +24 -24
  7. package/dist/studio/download.d.ts +24 -0
  8. package/dist/studio/download.js +234 -0
  9. package/dist/studio/download.js.map +1 -0
  10. package/dist/studio/host.js +8 -0
  11. package/dist/studio/host.js.map +1 -1
  12. package/dist/studio/housekeeping.d.ts +2 -2
  13. package/dist/studio/housekeeping.js +18 -17
  14. package/dist/studio/housekeeping.js.map +1 -1
  15. package/dist/studio/release-cursor.js +21 -21
  16. package/dist/studio/release-video.js +10 -10
  17. package/dist/studio/tools.js +7 -0
  18. package/dist/studio/tools.js.map +1 -1
  19. package/package.json +56 -56
  20. package/template/AGENTS.md +14 -14
  21. package/template/components/README.md +70 -70
  22. package/template/components/before-after/BeforeAfter.tsx +89 -89
  23. package/template/components/catalog.ts +107 -107
  24. package/template/components/cinematic/Device3D.tsx +324 -324
  25. package/template/components/cinematic/devices3d/display-model.ts +184 -184
  26. package/template/components/cinematic/devices3d/iphone-model.ts +643 -643
  27. package/template/components/cinematic/devices3d/macbook-model.ts +608 -608
  28. package/template/components/cinematic/devices3d/models.ts +657 -657
  29. package/template/components/cinematic/devices3d/runtime.ts +267 -267
  30. package/template/components/cinematic/math.ts +100 -100
  31. package/template/components/color/grade-effect.ts +650 -650
  32. package/template/components/color/grade.ts +512 -512
  33. package/template/components/color/looks.ts +154 -154
  34. package/template/components/countdown/Countdown.tsx +166 -166
  35. package/template/components/dot-trace-title/DotTraceTitle.tsx +181 -181
  36. package/template/components/dot-trace-title/meta.json +51 -51
  37. package/template/components/generate/GenerateReveal.tsx +381 -381
  38. package/template/components/hook-card/HookCard.tsx +554 -554
  39. package/template/components/index.ts +199 -199
  40. package/template/components/lib.ts +191 -191
  41. package/template/components/line-diagram/LineDiagram.tsx +205 -205
  42. package/template/components/line-diagram/meta.json +215 -215
  43. package/template/components/list-card/ListCard.tsx +104 -104
  44. package/template/components/live-clip.ts +75 -75
  45. package/template/components/looks.tsx +1447 -1447
  46. package/template/components/loops/LoopCanvas.tsx +132 -132
  47. package/template/components/loops/engine.ts +184 -184
  48. package/template/components/loops/library.ts +667 -667
  49. package/template/components/loops/library2.ts +777 -777
  50. package/template/components/motion-loop/MotionLoop.tsx +37 -37
  51. package/template/components/motion-loop/meta.json +311 -311
  52. package/template/components/props.ts +73 -73
  53. package/template/components/quote-card/QuoteCard.tsx +71 -71
  54. package/template/components/style-layer.tsx +233 -233
  55. package/template/components/styles.ts +113 -113
  56. package/template/components/types.ts +66 -66
  57. package/template/components/word-pop/WordPop.tsx +59 -59
  58. package/template/components/word-stack/WordStack.tsx +122 -122
  59. package/template/presets/charcoal-sketch/PROMPT.md +48 -48
  60. package/template/presets/charcoal-sketch/scripts/duck_music.py +34 -34
  61. package/template/presets/punk-cut-paper/scenes/Motif.tsx +376 -376
  62. package/template/presets/punk-cut-paper/scenes/Photo.tsx +73 -73
  63. package/template/presets/punk-cut-paper/scenes/Ransom.tsx +119 -119
  64. package/template/runtime/composition.tsx +1189 -1189
  65. package/template/runtime/helpers.tsx +230 -230
  66. package/template/runtime/index.tsx +22 -22
  67. package/template/runtime/types.ts +315 -315
  68. package/template/skill/SKILL.md +186 -187
  69. package/template/skill/references/broll.md +44 -44
  70. package/template/skill/references/browser-export.md +61 -61
  71. package/template/skill/references/cinematic.md +206 -206
  72. package/template/skill/references/color.md +79 -79
  73. package/template/skill/references/craft.md +97 -97
  74. package/template/skill/references/editing-styles.md +57 -57
  75. package/template/skill/references/feature-launch.md +34 -34
  76. package/template/skill/references/footage.md +72 -72
  77. package/template/skill/references/format.md +142 -142
  78. package/template/skill/references/how-to.md +146 -146
  79. package/template/skill/references/launch-direction.md +89 -89
  80. package/template/skill/references/loops.md +151 -151
  81. package/template/skill/references/mcp-external.md +19 -19
  82. package/template/skill/references/performance.md +93 -93
  83. package/template/skill/references/person-cutout.md +19 -19
  84. package/template/skill/references/presets.md +60 -60
  85. package/template/skill/references/product-launch.md +134 -134
  86. package/template/skill/references/release-capture.md +53 -53
  87. package/template/skill/references/sound.md +167 -166
  88. package/template/skill/references/style-spy.md +160 -160
  89. package/template/skill/references/website-howto.md +45 -45
  90. package/template/starter/.studio/chat.json +1 -1
  91. package/template/starter/layers.json +46 -46
  92. package/template/starter/notes.md +4 -4
  93. package/template/starter/project.json +13 -13
  94. package/template/starter/scenes/Title.tsx +38 -38
@@ -1,73 +1,73 @@
1
- // Prop defaults and checks for library components (metadata only: no React, no Remotion).
2
- import { COMPONENT_METAS } from "./catalog";
3
- import { getMotionStyle, styleValueFor } from "./styles";
4
- import type { PropSpec, PropValues } from "./types";
5
-
6
- function coerce(spec: PropSpec, value: unknown): PropValues[string] {
7
- switch (spec.type) {
8
- case "number": {
9
- const n = typeof value === "number" ? value : Number(value);
10
- return Number.isFinite(n) ? Math.min(spec.max, Math.max(spec.min, n)) : spec.default;
11
- }
12
- case "boolean":
13
- return typeof value === "boolean" ? value : spec.default;
14
- case "lines":
15
- if (Array.isArray(value)) return value.map(String).slice(0, spec.max ?? 12);
16
- return typeof value === "string" ? value.split("\n") : spec.default;
17
- case "select":
18
- return spec.options.some((o) => o.value === value) ? String(value) : spec.default;
19
- default:
20
- return typeof value === "string" ? value : value === undefined || value === null ? spec.default : String(value);
21
- }
22
- }
23
-
24
- /**
25
- * The clip's props with defaults filled in and wrong types replaced (the preview never crashes on a
26
- * typo). Props the clip leaves out follow the project's style (`styleId`) where they're tagged to.
27
- */
28
- export function resolveComponentProps(
29
- id: string,
30
- props: Record<string, unknown> | undefined,
31
- styleId?: string | null,
32
- ): PropValues {
33
- const meta = COMPONENT_METAS[id];
34
- if (!meta) return {};
35
- const style = getMotionStyle(styleId);
36
- const out: PropValues = {};
37
- for (const [key, spec] of Object.entries(meta.props)) {
38
- const own = props?.[key];
39
- out[key] = coerce(spec, own === undefined ? styleValueFor(spec, style) : own);
40
- }
41
- return out;
42
- }
43
-
44
- /** Props of a component that follow the project style (the keys "Use style" clears from a clip). */
45
- export function styledPropKeys(id: string): string[] {
46
- const meta = COMPONENT_METAS[id];
47
- if (!meta) return [];
48
- return Object.entries(meta.props)
49
- .filter(([, spec]) => spec.style)
50
- .map(([key]) => key);
51
- }
52
-
53
- /** Problems with a clip's props, for the problems list: unknown keys and values out of range. */
54
- export function checkComponentProps(id: string, props: Record<string, unknown> | undefined): string[] {
55
- const meta = COMPONENT_METAS[id];
56
- if (!meta) return [`Unknown component "${id}". Available: ${Object.keys(COMPONENT_METAS).join(", ")}.`];
57
- const issues: string[] = [];
58
- for (const [key, value] of Object.entries(props ?? {})) {
59
- const spec = meta.props[key];
60
- if (!spec) {
61
- issues.push(`"${key}" isn't a prop of ${id} (props: ${Object.keys(meta.props).join(", ")}).`);
62
- continue;
63
- }
64
- if (spec.type === "number" && (typeof value !== "number" || value < spec.min || value > spec.max))
65
- issues.push(`${key} should be a number from ${spec.min} to ${spec.max}.`);
66
- if (spec.type === "select" && !spec.options.some((o) => o.value === value))
67
- issues.push(`${key} should be one of ${spec.options.map((o) => o.value).join(", ")}.`);
68
- if (spec.type === "boolean" && typeof value !== "boolean") issues.push(`${key} should be true or false.`);
69
- if (spec.type === "lines" && !Array.isArray(value)) issues.push(`${key} should be a list of lines.`);
70
- }
71
- return issues;
72
- }
73
-
1
+ // Prop defaults and checks for library components (metadata only: no React, no Remotion).
2
+ import { COMPONENT_METAS } from "./catalog";
3
+ import { getMotionStyle, styleValueFor } from "./styles";
4
+ import type { PropSpec, PropValues } from "./types";
5
+
6
+ function coerce(spec: PropSpec, value: unknown): PropValues[string] {
7
+ switch (spec.type) {
8
+ case "number": {
9
+ const n = typeof value === "number" ? value : Number(value);
10
+ return Number.isFinite(n) ? Math.min(spec.max, Math.max(spec.min, n)) : spec.default;
11
+ }
12
+ case "boolean":
13
+ return typeof value === "boolean" ? value : spec.default;
14
+ case "lines":
15
+ if (Array.isArray(value)) return value.map(String).slice(0, spec.max ?? 12);
16
+ return typeof value === "string" ? value.split("\n") : spec.default;
17
+ case "select":
18
+ return spec.options.some((o) => o.value === value) ? String(value) : spec.default;
19
+ default:
20
+ return typeof value === "string" ? value : value === undefined || value === null ? spec.default : String(value);
21
+ }
22
+ }
23
+
24
+ /**
25
+ * The clip's props with defaults filled in and wrong types replaced (the preview never crashes on a
26
+ * typo). Props the clip leaves out follow the project's style (`styleId`) where they're tagged to.
27
+ */
28
+ export function resolveComponentProps(
29
+ id: string,
30
+ props: Record<string, unknown> | undefined,
31
+ styleId?: string | null,
32
+ ): PropValues {
33
+ const meta = COMPONENT_METAS[id];
34
+ if (!meta) return {};
35
+ const style = getMotionStyle(styleId);
36
+ const out: PropValues = {};
37
+ for (const [key, spec] of Object.entries(meta.props)) {
38
+ const own = props?.[key];
39
+ out[key] = coerce(spec, own === undefined ? styleValueFor(spec, style) : own);
40
+ }
41
+ return out;
42
+ }
43
+
44
+ /** Props of a component that follow the project style (the keys "Use style" clears from a clip). */
45
+ export function styledPropKeys(id: string): string[] {
46
+ const meta = COMPONENT_METAS[id];
47
+ if (!meta) return [];
48
+ return Object.entries(meta.props)
49
+ .filter(([, spec]) => spec.style)
50
+ .map(([key]) => key);
51
+ }
52
+
53
+ /** Problems with a clip's props, for the problems list: unknown keys and values out of range. */
54
+ export function checkComponentProps(id: string, props: Record<string, unknown> | undefined): string[] {
55
+ const meta = COMPONENT_METAS[id];
56
+ if (!meta) return [`Unknown component "${id}". Available: ${Object.keys(COMPONENT_METAS).join(", ")}.`];
57
+ const issues: string[] = [];
58
+ for (const [key, value] of Object.entries(props ?? {})) {
59
+ const spec = meta.props[key];
60
+ if (!spec) {
61
+ issues.push(`"${key}" isn't a prop of ${id} (props: ${Object.keys(meta.props).join(", ")}).`);
62
+ continue;
63
+ }
64
+ if (spec.type === "number" && (typeof value !== "number" || value < spec.min || value > spec.max))
65
+ issues.push(`${key} should be a number from ${spec.min} to ${spec.max}.`);
66
+ if (spec.type === "select" && !spec.options.some((o) => o.value === value))
67
+ issues.push(`${key} should be one of ${spec.options.map((o) => o.value).join(", ")}.`);
68
+ if (spec.type === "boolean" && typeof value !== "boolean") issues.push(`${key} should be true or false.`);
69
+ if (spec.type === "lines" && !Array.isArray(value)) issues.push(`${key} should be a list of lines.`);
70
+ }
71
+ return issues;
72
+ }
73
+
@@ -1,71 +1,71 @@
1
- import { useCurrentFrame } from "remotion";
2
- import { unit } from "../lib";
3
- import { CardStage, Label, enter, headWeight, lookKit, typed, type LookProps } from "../looks";
4
- import type { MotionBaseProps } from "../types";
5
-
6
- type Props = MotionBaseProps &
7
- LookProps & {
8
- quote: string;
9
- name: string;
10
- role: string;
11
- footer: string;
12
- layout: string;
13
- size: number;
14
- };
15
-
16
- /**
17
- * Someone else's words as proof: a quote with the name and role under it, on the look's card.
18
- * Full frame or over footage.
19
- */
20
- export function QuoteCard(props: Props) {
21
- const frame = useCurrentFrame();
22
- const { width, height, fps, durationInFrames: d } = props;
23
- const u = unit(width, height);
24
- const kit = lookKit(props, u);
25
- const fontSize = (props.size / 100) * Math.min(width, height);
26
- const q = enter(kit, frame, fps, 6, 0, 2);
27
- const by = enter(kit, frame, fps, 18, 0, 5);
28
- const marks = kit.look === "crt" ? ['"', '"'] : ["“", "”"];
29
- return (
30
- <CardStage
31
- kit={kit}
32
- width={width}
33
- height={height}
34
- layout={props.layout}
35
- frame={frame}
36
- fps={fps}
37
- durationInFrames={d}
38
- footer={props.footer}
39
- footerStart={26}
40
- title="~/quote.txt"
41
- >
42
- <div style={{ padding: `${fontSize * 0.9}px ${fontSize * 0.9}px ${fontSize * 0.8}px`, display: "flex", flexDirection: "column", gap: fontSize * 0.6 }}>
43
- <div
44
- style={{
45
- opacity: q.opacity,
46
- transform: q.transform,
47
- fontFamily: kit.look === "paper" ? kit.head : kit.head,
48
- fontWeight: headWeight(kit),
49
- fontSize,
50
- lineHeight: kit.look === "notebook" ? 1.05 : 1.08,
51
- letterSpacing: kit.look === "crt" || kit.look === "notebook" ? 0 : "-0.015em",
52
- textTransform: kit.look === "crt" ? "uppercase" : "none",
53
- color: kit.panelText,
54
- }}
55
- >
56
- <span style={{ color: kit.look === "clean" || kit.look === "crt" || kit.look === "neon" || kit.look === "line" ? kit.accent : kit.panelText }}>{marks[0]}</span>
57
- {typed(kit, props.quote, frame, 6, 2)}
58
- <span style={{ color: kit.look === "clean" || kit.look === "crt" || kit.look === "neon" || kit.look === "line" ? kit.accent : kit.panelText }}>{marks[1]}</span>
59
- </div>
60
- <div style={{ opacity: by.opacity, transform: by.transform, display: "flex", flexDirection: "column", gap: fontSize * 0.15 }}>
61
- <div style={{ fontFamily: kit.body, fontSize: fontSize * (kit.look === "notebook" || kit.look === "crt" ? 0.62 : 0.46), color: kit.panelText }}>{props.name}</div>
62
- {props.role ? (
63
- <Label kit={kit} fontSize={fontSize * 0.3}>
64
- {props.role}
65
- </Label>
66
- ) : null}
67
- </div>
68
- </div>
69
- </CardStage>
70
- );
71
- }
1
+ import { useCurrentFrame } from "remotion";
2
+ import { unit } from "../lib";
3
+ import { CardStage, Label, enter, headWeight, lookKit, typed, type LookProps } from "../looks";
4
+ import type { MotionBaseProps } from "../types";
5
+
6
+ type Props = MotionBaseProps &
7
+ LookProps & {
8
+ quote: string;
9
+ name: string;
10
+ role: string;
11
+ footer: string;
12
+ layout: string;
13
+ size: number;
14
+ };
15
+
16
+ /**
17
+ * Someone else's words as proof: a quote with the name and role under it, on the look's card.
18
+ * Full frame or over footage.
19
+ */
20
+ export function QuoteCard(props: Props) {
21
+ const frame = useCurrentFrame();
22
+ const { width, height, fps, durationInFrames: d } = props;
23
+ const u = unit(width, height);
24
+ const kit = lookKit(props, u);
25
+ const fontSize = (props.size / 100) * Math.min(width, height);
26
+ const q = enter(kit, frame, fps, 6, 0, 2);
27
+ const by = enter(kit, frame, fps, 18, 0, 5);
28
+ const marks = kit.look === "crt" ? ['"', '"'] : ["“", "”"];
29
+ return (
30
+ <CardStage
31
+ kit={kit}
32
+ width={width}
33
+ height={height}
34
+ layout={props.layout}
35
+ frame={frame}
36
+ fps={fps}
37
+ durationInFrames={d}
38
+ footer={props.footer}
39
+ footerStart={26}
40
+ title="~/quote.txt"
41
+ >
42
+ <div style={{ padding: `${fontSize * 0.9}px ${fontSize * 0.9}px ${fontSize * 0.8}px`, display: "flex", flexDirection: "column", gap: fontSize * 0.6 }}>
43
+ <div
44
+ style={{
45
+ opacity: q.opacity,
46
+ transform: q.transform,
47
+ fontFamily: kit.look === "paper" ? kit.head : kit.head,
48
+ fontWeight: headWeight(kit),
49
+ fontSize,
50
+ lineHeight: kit.look === "notebook" ? 1.05 : 1.08,
51
+ letterSpacing: kit.look === "crt" || kit.look === "notebook" ? 0 : "-0.015em",
52
+ textTransform: kit.look === "crt" ? "uppercase" : "none",
53
+ color: kit.panelText,
54
+ }}
55
+ >
56
+ <span style={{ color: kit.look === "clean" || kit.look === "crt" || kit.look === "neon" || kit.look === "line" ? kit.accent : kit.panelText }}>{marks[0]}</span>
57
+ {typed(kit, props.quote, frame, 6, 2)}
58
+ <span style={{ color: kit.look === "clean" || kit.look === "crt" || kit.look === "neon" || kit.look === "line" ? kit.accent : kit.panelText }}>{marks[1]}</span>
59
+ </div>
60
+ <div style={{ opacity: by.opacity, transform: by.transform, display: "flex", flexDirection: "column", gap: fontSize * 0.15 }}>
61
+ <div style={{ fontFamily: kit.body, fontSize: fontSize * (kit.look === "notebook" || kit.look === "crt" ? 0.62 : 0.46), color: kit.panelText }}>{props.name}</div>
62
+ {props.role ? (
63
+ <Label kit={kit} fontSize={fontSize * 0.3}>
64
+ {props.role}
65
+ </Label>
66
+ ) : null}
67
+ </div>
68
+ </div>
69
+ </CardStage>
70
+ );
71
+ }