/** * dsh-widgets — the offline CARD GALLERY. * * Renders every registered widget, at every size it declares, through the REAL * `CardBody` — the same component the rail mounts — in a bare browser page with * the shell's real theme tokens. This is the review surface a builder agent uses * to LOOK at its card without touching a live rail, and the demo a human opens to * compare states side by side. * * It is NOT part of the plugin bundle: nothing under `src/client/index.ts` * imports it. `scripts/preview/gallery.mjs` builds it as a standalone page. * * Data policy is the preview's own (see `example-out.ts`): filler → the widget's * `example.stats` → simulate, so every card renders its full shape offline. A * widget whose `example` carries `simSteps` gets one cell per step — that is how * a stateful card's states are eyeballed without waiting for the real condition. */ import * as React from 'react'; import type { WidgetSize } from '../../lib/contract/types'; import { CardBody } from '../CardBody'; /** * `CardBody` is re-exported for the HEAD-LADDER FIXTURE page the gallery build * writes next to `index.html` (scripts/preview/gallery.mjs): that page mounts the * real renderer with hand-written `WidgetRenderOut`s, so the head contract can be * measured in the states no widget's preview data reaches (a ring head with no * caption). The gallery page itself never uses this export. */ export { CardBody }; /** The gallery's option bag, injected by the page as `window.__GALLERY__`. */ export interface GalleryOptions { /** Widget ids to draw; absent = every registered widget. */ only?: string[]; /** Sizes to draw; absent = every size each widget declares. */ sizes?: WidgetSize[]; } /** The whole gallery: a scrollable stack of label rows, one per cell. */ export declare function CardGallery({ options }: { options: GalleryOptions; }): React.ReactElement;