/** * ComponentDef -- adaptive component primitive for constraint-based rendering. * * A component binds a boundary, styles, and named slots into a single * content-addressed unit. Content-addressed via FNV-1a. * * @module */ import type { ContentAddress } from './brands.js'; import type { Boundary } from './boundary.js'; import type { Style } from './style.js'; /** Per-slot configuration on a component — whether the slot must be provided, plus optional description. */ export interface SlotConfig { /** Default: false. */ readonly required?: boolean; readonly description?: string; } interface ComponentDef { readonly _tag: 'ComponentDef'; readonly _version: 1; readonly id: ContentAddress; readonly name: string; readonly boundary?: B; readonly styles: Style.Shape; readonly slots: { readonly [K in SlotNames[number]]: SlotConfig; }; readonly defaultSlot?: SlotNames[number]; } interface ComponentFactory { make(config: { readonly name: string; readonly boundary?: B; readonly styles: Style.Shape; /** Default: an implied single 'children' slot with defaultSlot 'children'. */ readonly slots?: { readonly [K in SN[number]]: SlotConfig; }; readonly defaultSlot?: SN[number]; }): ComponentDef; } /** * Component — the content-addressed unit that binds a {@link Boundary}, a * {@link Style}, and named slots into a single declaration compilers can * target. The optional boundary gates style variants; the slots describe * the consumer-facing API. */ export declare const Component: ComponentFactory; export declare namespace Component { /** Structural shape of a component definition, parameterized by its boundary and slot names. */ type Shape = ComponentDef; } export {}; //# sourceMappingURL=component.d.ts.map