import { type CatalogFamily } from "./compact-catalog-registry.ts";
import type { Steps } from "./compact-catalog-steps.ts";
import { type CompactContentStore } from "./compact-content-store.ts";
import type { CatalogComponent } from "./compact-recovery-catalog.ts";
import type { BoundedId } from "./compact-recovery-ids.ts";
/**
 * Writes one catalog component as bounded store leaves: text arrives in fragments of any size and leaves at most
 * one open leaf (<= COMPACT_LEAF_CODE_UNITS) in memory, whatever the component's total size. `finish` hands the
 * leaves to one owner the caller releases once the catalog has placed the component; `abort` releases what a
 * failed component already wrote.
 */
declare class CatalogComponentWriter {
    private readonly store;
    private readonly leaves;
    private open;
    constructor(store: CompactContentStore);
    push(text: string): void;
    finish(kind: BoundedId, id: BoundedId): CatalogComponent;
    abort(): void;
    private seal;
}
/**
 * One component as the catalog consumes it: `fill` writes its text, the component is yielded once, and its owner is
 * released when the consumer resumes the generator, which the catalog does only after it has placed the component
 * and holds its own reference. A failure while filling releases whatever was written and reports no component.
 */
export declare function writtenComponent(store: CompactContentStore, kind: BoundedId, id: BoundedId, fill: (writer: CatalogComponentWriter) => Promise<void> | void): AsyncGenerator<CatalogComponent>;
/** A member whose value streams from steps: canonical JSON in bounded leaves with one value page resident. */
export declare const stepsComponent: (store: CompactContentStore, kind: BoundedId, id: BoundedId, steps: Steps) => AsyncGenerator<CatalogComponent>;
/** A family with no members: exactly one component `<family>/<family>` with no leaves (S09's explicit empty). */
export declare const emptyComponent: (family: CatalogFamily) => CatalogComponent;
export {};
//# sourceMappingURL=compact-catalog-writer.d.ts.map