mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:21:13 +00:00
* Type scripts under strict Playwright's API the checks use is declared in host.ts (the package is the app repo's); caught errors read through why(). tabs-tree.test waits for the typed tabsTree. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type the shared components under strict Window globals (__lenis, __hzHold, google) and the two react-dom calls are declared in components/*.d.ts, since @types/react-dom is not a dependency and the lockfile is frozen. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type components/v2 under strict Props, state, refs and DOM events in the 93 v2 files. A2Motion's easing tuples are as const. Two real bugs: x-archimedes/MaskLines imported a NoJs that does not exist, and x-hypatia/PinChapters returned the element from a ref callback, which React 19 reads as a cleanup. AppSheet no longer sets aria-label to a JSX label. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type components/home under strict The race, cost and frontier figures, the plan cards, the repository card and the product stories take Run, Models and Plan types from lib. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type the hero devices and the app routes under strict HeroScene and its parts describe hero-scenes.json; the [slug] pages take params as a Promise, and metadata and viewport carry Next's types. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Give the integrations previews their Preview type Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Use the bench Card type for the closing cards Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
69 lines
1.9 KiB
TypeScript
69 lines
1.9 KiB
TypeScript
// The shapes behind the hero's three devices: the day in hero-scenes.json and the terminal's examples.
|
|
|
|
/** The places a scene happens in. The Beta scene is a chat on the desktop and its own page on the phone. */
|
|
export type Place = 'chat' | 'dev' | 'studio' | 'tabs' | 'beta';
|
|
|
|
/** A step of a scene: plain text, or a template and the file that fills its `{file}`. */
|
|
export type Step = string | [template: string, file: string];
|
|
|
|
/** An image a Studio scene made. */
|
|
export interface Art {
|
|
kind: string;
|
|
src: string;
|
|
shape?: string;
|
|
}
|
|
|
|
/** One terminal of a Tabs scene. */
|
|
export interface Pane {
|
|
name: string;
|
|
run: string;
|
|
ask: string;
|
|
lines: string[];
|
|
}
|
|
|
|
/** What the phone says for a scene, where it says something other than the desktop does. */
|
|
export interface PhoneCopy {
|
|
ask: string;
|
|
cells: string[];
|
|
}
|
|
|
|
/** One line the shell prints: the wait after the one before it (ms), its kind (run, ask, out, ...), its text. */
|
|
export type ShellLine = [after: number, kind: string, text: string];
|
|
|
|
export interface Shell {
|
|
tab: string;
|
|
lines: ShellLine[];
|
|
}
|
|
|
|
/** One scene of the day. The fields a scene has depend on its place; the rest are absent. */
|
|
export interface HeroScene {
|
|
place: Place;
|
|
title?: string;
|
|
ask?: string;
|
|
answer?: string;
|
|
card?: boolean;
|
|
run?: string;
|
|
steps?: Step[];
|
|
ship?: boolean;
|
|
ships?: string;
|
|
prompt?: string;
|
|
made?: Art[];
|
|
pick?: number;
|
|
status?: string;
|
|
panes?: Pane[];
|
|
phone?: PhoneCopy;
|
|
shell?: Shell;
|
|
}
|
|
|
|
/** A line of a terminal example: its kind (out, ok, sub, ask, console) and its text. */
|
|
export type TermLine = [kind: string, text: string];
|
|
|
|
/** A command the terminal types and the lines it prints. */
|
|
export interface TermExample {
|
|
cmd: string;
|
|
lines: TermLine[];
|
|
}
|
|
|
|
/** Jump to a scene (-1 is the opening), lighting the rail's mark `navId`. */
|
|
export type SelectScene = (sc: number, navId?: string | null) => void;
|