Files
zeekayandGitHub ea43c5a975 Type lib, scripts, v2, home and app under strict (#8)
* 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
2026-11-14 01:34:34 -08:00

54 lines
2.3 KiB
TypeScript

'use client';
/* ShipPrompt (owner: Cloud 2 chat). The cloud family's "Paste and ship", at v2 scale: one big prompt card you copy
into any agent, with this product's related links as a quiet row underneath.
Usage: <ShipPrompt name="Gateway" prompt="Read https://hanzo.ai/skill.md and use …" api="/v1/gateway"
related={[[title, href, line?], …]} relatedTitle="Related capabilities" flip />
Words are Hanzo's own (they are the live pages' words). The prompt is the kit's CodeBlock (copy equals display).
Styles: ShipPrompt.css (prefix sp-). */
import type { ReactNode } from 'react';
import { A, CodeBlock } from '../kit';
import './ShipPrompt.css';
const arrow = <svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M3 8h9M8.5 4.5 12 8l-3.5 3.5" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" /></svg>;
interface ShipPromptProps {
name: string;
prompt: string;
api?: string;
related?: string[][]; // [title, href, line?]
relatedTitle?: string;
flip?: boolean;
children?: ReactNode;
className?: string;
}
export default function ShipPrompt({ name, prompt, api, related, relatedTitle = 'Related capabilities', flip, children, className = '' }: ShipPromptProps) {
return (
<section className={`sp v2-sec ${flip ? 'sp-flip' : ''} ${className}`}>
<div className="v2-wrap v2-grid sp-grid">
<div className="sp-copy">
<h2 className="v2-headline sp-h">Paste and ship</h2>
<p className="v2-body sp-d">Paste this into any agent. It reads the skill manifest and calls {name} from there.</p>
{children}
</div>
<div className="sp-card">
{api && <p className="sp-api"><i><span>api</span></i><span>{api}</span></p>}
<CodeBlock code={prompt} label="Agent prompt" className="sp-code" />
</div>
{related && (
<nav className="sp-rel" aria-label={relatedTitle}>
<p className="v2-kick">{relatedTitle}</p>
<ul>
{related.map(([t, to, d]) => (
<li key={t}>
<A to={to} className="sp-rel-a"><b>{t}</b>{d && <span>{d}</span>}{!t.endsWith('→') && arrow}</A>
</li>
))}
</ul>
</nav>
)}
</div>
</section>
);
}