mirror of
https://github.com/hanzoai/frames.git
synced 2026-09-24 00:08:03 +00:00
Every SKILL.md already declared the new name — name: frames, frames-cli, frames-core, and so on — but the directories were never moved, so the tree carried frames-* in content and hyperframes-* on disk. Everything that resolves a skill by path missed: the core-skill list, the plugin marketplace pin, and the docs the CLI reads at runtime. Eight tests failed on main because the files they open do not exist. The directories now match what the files say they are, and the guide the claude-design contract reads takes the name that contract already used.
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import React, { useEffect } from "react";
|
|
import {
|
|
useCurrentFrame,
|
|
useVideoConfig,
|
|
AbsoluteFill,
|
|
interpolate,
|
|
spring,
|
|
Sequence,
|
|
staticFile,
|
|
Audio,
|
|
Img,
|
|
} from "remotion";
|
|
|
|
// Mount-only useEffect with empty deps + a later expression containing a
|
|
// non-empty array — regression coverage for the over-match Miguel reported:
|
|
// the earlier regex spanned past `[]` and matched `[frame]` from `pick(...)`,
|
|
// falsely flagging this clean fixture as having a blocker.
|
|
function pick<T>(_key: string, items: T[]): T {
|
|
return items[0];
|
|
}
|
|
|
|
const TitleCard: React.FC = () => {
|
|
const frame = useCurrentFrame();
|
|
const { fps } = useVideoConfig();
|
|
useEffect(() => {
|
|
console.log("mounted");
|
|
}, []);
|
|
const _picked = pick("x", [frame]);
|
|
const opacity = interpolate(frame, [0, 15], [0, 1], { extrapolateRight: "clamp" });
|
|
const scale = spring({ frame, fps, config: { damping: 12 } });
|
|
return (
|
|
<AbsoluteFill style={{ justifyContent: "center", alignItems: "center" }}>
|
|
<div style={{ fontSize: 72, opacity, transform: `scale(${scale})` }}>Hello</div>
|
|
<Img src={staticFile("logo.png")} />
|
|
</AbsoluteFill>
|
|
);
|
|
};
|
|
|
|
export const MyComposition: React.FC = () => (
|
|
<AbsoluteFill>
|
|
<Sequence from={0} durationInFrames={90}>
|
|
<TitleCard />
|
|
</Sequence>
|
|
<Audio src={staticFile("music.mp3")} volume={0.5} />
|
|
</AbsoluteFill>
|
|
);
|