import { z } from "zod"; import type { BlockMdxConfig, BlockVisualFrame } from "../types.js"; /** * Pure (React-free) part of the shared `wireframe` block: its data shape, zod * schema, the stable node-id helper, and the nested-MDX round-trip config. Lives * in core so BOTH apps' server/shared registries and the client spec * (`wireframe.tsx`) consume one definition; importing it into a server module * never pulls React into the Nitro/SSR bundle. * * The wireframe block originated in the plan template. The vocabulary * (`PlanWireframe*` names, the `el` set, the `--wf-*` token contract) and the * MDX encoding (`……` with kit * component names `FrameScreen`/`Row`/`Col`/…) are preserved EXACTLY so stored * plans round-trip byte-compatibly and existing node ids never change. * * The wireframe is NESTED MDX, not a flat-attribute or prose block: its body is * a `…kit-tree…` subtree. So the config uses * `serializeChildren`/`parseChildren` (the registry's nested-MDX path) rather * than `toAttrs`/`childrenField`. */ export type WireframeSurface = "desktop" | "mobile" | "popover" | "panel" | "browser"; export type WireframeRenderMode = "wireframe" | "design"; export type WireframeTone = "default" | "accent" | "warn" | "ok" | "muted"; export type WireframeElName = "screen" | "browserBar" | "statusBar" | "toolbar" | "row" | "col" | "sidebar" | "navItem" | "main" | "title" | "text" | "lines" | "section" | "taskRow" | "chips" | "chip" | "pill" | "check" | "field" | "btn" | "fab" | "card" | "column" | "avatar" | "iconSquare" | "kv" | "searchBar" | "box" | "divider"; export type WireframeNode = { id?: string; el: WireframeElName; children?: WireframeNode[]; text?: string; value?: string; label?: string; placeholder?: string; title?: string; tone?: WireframeTone; color?: WireframeTone; weight?: "normal" | "medium" | "bold"; active?: boolean; done?: boolean; emphasis?: boolean; full?: boolean; solid?: boolean; dashed?: boolean; dot?: boolean; script?: boolean; area?: boolean; shape?: "square" | "circle"; count?: number; prio?: number; n?: number; widths?: number[]; icon?: string; note?: string; due?: string; dueTone?: WireframeTone; items?: Array<{ label: string; active?: boolean; count?: number; dot?: boolean; }>; rows?: Array<{ k: string; v: string; }>; }; export interface WireframeData { surface: WireframeSurface; renderMode?: WireframeRenderMode; caption?: string; frame?: BlockVisualFrame; skeleton?: boolean; html?: string; css?: string; screen?: WireframeNode[]; } export declare const WIREFRAME_SURFACES: WireframeSurface[]; export declare const WIREFRAME_EL_NAMES: WireframeElName[]; export declare const wireframeSchema: z.ZodType; export declare function createStableWireframeNodeId(el: WireframeElName, path: string): string; export declare const wireframeMdx: BlockMdxConfig;