import type { DiagramDTO, MemoModelDTO } from '../types/index.js'; export interface ViewWriteResult { success: boolean; /** Why the view could not be declared. Never a reason to write it elsewhere. */ reason?: string; filePath?: string; identifier?: string; /** True when the declaration seeded a new file. */ created?: boolean; } /** * Write one view declaration into the project's own home for views of its kind. * * Returns `{ success: false, reason }` when the project declares no view at all, * which is the only case with no convention to infer. There is deliberately no * sidecar fallback: a view that cannot be declared is not created. */ /** * The view's `selectionQuery`, when it was created from one. * * A view declared from a matrix is defined by what it SELECTS — the kinds on * its axes and the relations drawn between them — not by the ids that happened * to match when it was saved. Writing the query means the view answers the * same question a year later against a model that has grown; writing the ids * would freeze the answer and quietly stop being true. */ export declare function selectionQueryLines(diagram: DiagramDTO): string[]; export declare function writeViewDeclaration(projectRoot: string, model: MemoModelDTO, diagram: DiagramDTO): Promise; /** * Change WHAT a declared view shows, by editing its `expose` members. * * `diagram:update` carries the element ids a view should contain. A declared * view holds no list of ids — it holds `expose` paths, and * `resolveViewElementIds` derives the ids from them. So the update is applied * where the view actually says what it shows. * * Exposing the PACKAGE rather than each element is the convention every * authored view follows, and it is what makes a screen layout pick up a region * added later without another edit. */ export declare function updateViewExpose(projectRoot: string, model: MemoModelDTO, diagram: DiagramDTO, elementIds: string[] | undefined): Promise; //# sourceMappingURL=view-writer.d.ts.map