import type { Registry } from './registry.js'; export type DesignConnectionPropertyKind = 'text' | 'boolean' | 'variant' | 'instance' | 'slot'; export interface DesignComponentReference { /** External design system name. Use "figma" for a Figma library. */ provider: string; documentId?: string; nodeId: string; url?: string; name?: string; } export interface DesignConnectionPropertyDef { designName: string; kind: DesignConnectionPropertyKind; /** Complete vocabulary for a variant property. */ values?: readonly string[]; defaultValue?: string | boolean; /** Existing code prop. Use "children" for a text or slot child. */ codeProperty?: string; /** Exhaustive design-value to code-value mapping. Identity is the default. */ valueMap?: Readonly>; /** Makes an intentionally unmapped design property visible to validation. */ omitReason?: string; } export interface DesignComponentConnectionDef { id: string; componentName: string; design: DesignComponentReference; code?: { sourcePath?: string; importPath?: string; }; properties?: readonly DesignConnectionPropertyDef[]; } export interface DesignConnectionDiagnostic { severity: 'warning' | 'error'; code: string; message: string; connectionId: string; property?: string; } export interface DesignComponentConnectionCase { id: string; label: string; designValues: Readonly>; codeProps: Readonly>; } export interface DesignComponentConnectionCases { connectionId: string; cases: readonly DesignComponentConnectionCase[]; total: number; truncated: { total: number; limit: number; } | null; diagnostics: readonly DesignConnectionDiagnostic[]; } /** One editor's component connections, validated against its registry. */ export declare function createComponentConnections(deps: Pick): { setDesignComponentConnections: (next: readonly DesignComponentConnectionDef[]) => void; getDesignComponentConnections: () => readonly DesignComponentConnectionDef[]; getDesignComponentConnection: (connectionId: string) => DesignComponentConnectionDef | undefined; getDesignComponentConnectionForComponent: (componentName: string) => DesignComponentConnectionDef | undefined; validateDesignComponentConnections: () => readonly DesignConnectionDiagnostic[]; enumerateDesignComponentConnectionCases: (connectionId: string, options?: { limit?: number; }) => DesignComponentConnectionCases; }; export type ComponentConnections = ReturnType;