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

53 lines
2.5 KiB
TypeScript

'use client';
/* Home, the platform (v2, Chapters). Nine products, one at a time: the scene pins, the product's name and its two
actions hold on the left while its real screen wipes up over the last one on the right. The index beside it jumps
to any product; the name opens into the product's page. On phones the products simply follow one another. */
import { useLayoutEffect, useRef } from 'react';
import { A } from './kit';
import PRODUCTS from '../content/products';
import Lines from './v2/Lines';
import Chapters from './v2/Chapters';
const P = PRODUCTS;
const site = (h: string) => h.replace('https://hanzo.ai', '') || '/';
/* Hanzo's product screen, drawn at the width it was made for and zoomed (layout, not a bitmap) to fill the frame. */
function Screen({ html }: { html: string }) {
const ref = useRef<HTMLDivElement>(null);
useLayoutEffect(() => {
const el = ref.current!;
const ro = new ResizeObserver(([e]) => { el.style.setProperty('--z', Math.max(0.7, Math.min(1.5, e.contentRect.width / 600)).toFixed(3)); });
ro.observe(el);
return () => ro.disconnect();
}, []);
return <div className="hv-screen" ref={ref}><div className="hv-screen-in" dangerouslySetInnerHTML={{ __html: html }} /></div>;
}
export default function Platform() {
const items = P.map((p) => ({
key: p.name.toLowerCase(),
title: p.name,
to: site(p.acts[0].href),
text: (
<>
<A className="hv-addr" to={p.addr.startsWith('hanzo.ai/') ? p.addr.slice(8) : 'https://' + p.addr} aria-label={`Open Hanzo ${p.name} at ${p.addr}`}>{p.addr}</A>
<div className="hv-acts">
{p.acts.map((a, k) => (
<a key={a.label} href={a.href} className="hv-btn" data-cta={`home.platform.${p.name.toLowerCase()}.${k ? 'open' : 'more'}`}>{a.label}{k === p.acts.length - 1 ? ' ↗' : ''}</a>
))}
</div>
</>
),
visual: <Screen html={p.vis} />,
}));
return (
<section className="hv-platform" id="products" aria-labelledby="products-h">
<div className="v2-wrap hv-plat-head">
<Lines as="h2" id="products-h" className="hv-h2" lines={['Hanzo is the AI-native company platform.']} />
<p className="hv-lead">A vertically integrated agentic operating system for business — intelligence, applications, computer-use agents, developer tools, MCP, and cloud infrastructure designed together in one workspace.</p>
</div>
<Chapters label="Hanzo products" items={items} step={0.45} />
</section>
);
}