Files
hanzo.ai/components/models/Mark.tsx
zeekay 6c65e3e941 @hanzo/app 0.2.0: the app SDK, renamed from @hanzo/rooms
Every import, the catalog pin and the docs name @hanzo/app and
github.com/hanzoai/app. lib/rooms.ts is lib/app.ts and
components/rooms.tsx is components/app.tsx.
2026-10-22 19:07:20 -07:00

27 lines
1.1 KiB
TypeScript

'use client'
import { lazy, Suspense, type ComponentProps } from 'react'
import { View } from '@/components/ui'
/**
* ProviderMark, the one mark table, fetched when a mark is first drawn. Its
* bodies are about 32 KB after brotli, and a client component that imported the
* table put all of it in its page's first load (the landing, /dev, /gen,
* /templates, the rooms' Home and Inbox) for a handful of marks below the fold.
* A server page renders ProviderMark itself and ships none of it.
*/
const Table = lazy(() => import('@hanzo/app/ProviderMark').then((m) => ({ default: m.ProviderMark })))
/** ProviderMark's own props: the lab, the model, the edge in px (32 by default), and the page's ink. */
export type MarkProps = ComponentProps<typeof Table>
/** A lab's mark, its footprint standing empty while the table loads, so nothing beside it moves. */
export function Mark(props: MarkProps) {
const size = props.size ?? 32
return (
<Suspense fallback={<View aria-hidden width={size} height={size} shrink={0} />}>
<Table {...props} />
</Suspense>
)
}