import type { CompactContentStore, LeafId } from "./compact-content-store.ts";
import type { SeededFields } from "./compact-seeded-draft.ts";
import type { CompactTextRoots } from "./compact-text-roots.ts";
import type { CompactValues, ValueRef, ValueStep } from "./compact-values.ts";
/** A walk step, or a chunk of stored JSON text spliced in verbatim as one value (`more` until its last chunk). */
export type CatalogStep = ValueStep | {
    readonly kind: "raw";
    readonly text: string;
    readonly more: boolean;
};
/** A member's value as the steps that encode it: a stored value's walk, a text range, stored JSON, or a literal. */
export type Steps = AsyncIterable<CatalogStep> | Iterable<CatalogStep>;
export type Field = readonly [string, Steps];
/** What every family adapter reads with: the cut's store, its value reader and the cut's validity check. */
export interface CatalogReader {
    readonly store: CompactContentStore;
    readonly values: CompactValues;
    readonly valid: () => void;
}
/**
 * The walk steps of a JSON-normal value already in memory (a call header, a descriptor row), produced iteratively
 * with one frame per open container, so a deep value never recurses.
 */
export declare function literalSteps(value: unknown): Generator<ValueStep>;
/** One JSON object from named fields, each field's value streamed from its own steps. */
export declare function objectSteps(fields: Iterable<Field> | AsyncIterable<Field>): AsyncGenerator<CatalogStep>;
export declare function arraySteps(items: Iterable<Steps> | AsyncIterable<Steps>): AsyncGenerator<CatalogStep>;
/** Stored JSON text (one value split across leaves) as the value itself, one leaf resident at a time. */
export declare function storedSteps(store: CompactContentStore, leaves: readonly LeafId[]): AsyncGenerator<CatalogStep>;
export declare const literalFields: (value: object) => Field[];
/** Stored text ranges as one JSON string, chunk by chunk, then a literal suffix; an empty range is `""`. */
export declare function textSteps(texts: CompactTextRoots, roots: readonly LeafId[], valid: () => void, suffix?: string): AsyncGenerator<ValueStep>;
/** Seeded fields (a record of stored values) as one object, each value walked with one page resident. */
export declare const fieldSteps: (values: CompactValues, fields: SeededFields, valid: () => void) => AsyncGenerator<CatalogStep>;
export declare const walkedSteps: (values: CompactValues, ref: ValueRef | null, valid: () => void) => Steps;
//# sourceMappingURL=compact-catalog-steps.d.ts.map