import type { SourceFilePlan } from './dist-lib/types/host/sourceFilePlan.js'; import type { ComponentLibraryCatalog, ComponentLibraryDefinition, ComponentLibraryOperation, ComponentLibraryReview } from './dist-lib/types/workspace/components/contracts.js'; import type { WorkspaceSourcePlanService, WorkspaceSourcePlanServiceOptions } from './workspace-source-plan.js'; export interface ComponentLibraryProject { sourceRevision: string; files: { file: string; source: string; sha256: string }[]; definitions: (Omit & { exportName?: string; localName?: string })[]; compilerOptions?: { paths?: Record }; allowedFiles?: string[]; creation?: { directory: string; barrel: string; templates: { id: string; label: string; kind: 'atom' | 'component'; componentFile: string; files: { path: string; content: string }[] }[]; }; } /** Resolves all definitions in one symbol graph, including import aliases and barrel exports. */ export declare function readComponentLibrary(input: ComponentLibraryProject): Omit; /** Pure compiler; all changed and read files retain exact source proofs. Null content denotes deletion. */ export declare function compileComponentLibraryPlan(input: ComponentLibraryProject & { operation: ComponentLibraryOperation }): SourceFilePlan; export interface ComponentLibraryServiceOptions extends Pick { loadProject(sourceRevision: string, signal: AbortSignal): Promise; assertRevision?(sourceRevision: string, signal: AbortSignal): void | Promise; /** Product registration metadata only. Keep every original proof and include each extra changed file's proof. */ extendPlan?(input: { project: ComponentLibraryProject; operation: ComponentLibraryOperation; plan: SourceFilePlan }, signal: AbortSignal): SourceFilePlan | Promise; } export interface ComponentLibraryService extends Pick { list(input: { sourceRevision: string }, signal?: AbortSignal): Promise; review(input: { sourceRevision: string; operation: ComponentLibraryOperation }, signal?: AbortSignal): Promise; dispose(): Promise; } export declare function createComponentLibraryService(options: ComponentLibraryServiceOptions): ComponentLibraryService; export declare function rewriteComponentLibraryMetadata(input: { file: string; source: string; from: string; to: string | null; replacement?: string; rules: ({ kind: 'object-keys'; variable: string } | { kind: 'array-records'; field: string } | { kind: 'jsx-records'; tag: string; attribute: string } | { kind: 'property-access'; object: string } | { kind: 'string-values' })[]; }): string;