import { AccessorHandle, PColumnDataUniversal } from "../../render/internal.js"; import { TreeNodeAccessor } from "../../render/accessor.js"; import "../../render/index.js"; import { DataColumnRecipe } from "../data_column.js"; import { AccessorEntriesProvider, PColumn, PObjectId, ResultPoolEntriesProvider, UpstreamBlockCtx } from "@milaboratories/pl-model-common"; /** * Data source for sandbox column-list builders. Has nothing to say about * id-resolution — `ColumnRegistry` (in `@milaboratories/pl-model-common`) * consumes the separate `ColumnEntriesProvider` interface for that. * * Same name as the factory function below — they merge into one TS * declaration: `ColumnsProvider` is callable AND the interface type. */ export interface ColumnsProvider { /** Returns all currently known PColumn columns as lazy views. */ getColumns(): DataColumnRecipe[]; /** Whether the provider has finished enumerating all its columns. */ isFinal(): boolean; } /** * Unified memoised factory dispatching to the right provider flavour by the * source shape: * - `TreeNodeAccessor` → {@link AccessorColumnsProvider} * (indexed by `root.handle`, walks the accessor tree once per root). * - `UpstreamBlockCtx[]` (or omitted — pulled from the * ambient ctx) → {@link ResultPoolColumnsProvider} * (indexed by a content-hash of the block list). * * Both branches return cached instances within their LRU window, so repeated * calls with the same source skip re-walking / re-hashing. */ export declare function ColumnsProvider(source?: TreeNodeAccessor | ReadonlyArray>): AccessorColumnsProviderImpl | ResultPoolColumnsProviderImpl; export declare function AccessorColumnsProvider(root: TreeNodeAccessor): AccessorColumnsProvider; export declare function ResultPoolColumnsProvider(rawPool?: ReadonlyArray>): ResultPoolColumnsProvider; /** * Simple provider wrapping an array of PColumns. Sandbox-only — * implements {@link ColumnsProvider} (lazy-view enumeration). It is *not* an * id-index source — `ColumnRegistry` does not consume it. */ export declare class ArrayColumnsProvider implements ColumnsProvider { private readonly _isFinal; private readonly columns; constructor(columns: ReadonlyArray | DataColumnRecipe>, _isFinal: boolean); getColumns(): DataColumnRecipe[]; isFinal(): boolean; } /** * Sandbox-specific provider over a {@link TreeNodeAccessor} root. Uses the * accessor's own `resolvePath` as the canonical root path for id construction, * and adds `getColumns()` returning {@link DataColumnRecipe}s on top of the generic * entries index. */ export declare class AccessorColumnsProviderImpl extends AccessorEntriesProvider implements ColumnsProvider { private cachedColumns?; constructor(root: TreeNodeAccessor); getColumns(): DataColumnRecipe[]; } /** Public type alias — value of the same name is the memoised factory above. */ export type AccessorColumnsProvider = AccessorColumnsProviderImpl; /** * Sandbox-specific result-pool provider. Accepts the raw handle-shaped blocks * returned by {@link GlobalCfgRenderCtxMethods.getUpstreamBlockCtx} and * wraps them into {@link TreeNodeAccessor}s, then adds `getColumns()`. */ export declare class ResultPoolColumnsProviderImpl extends ResultPoolEntriesProvider implements ColumnsProvider { private cachedColumns?; constructor(rawPool?: ReadonlyArray>); getColumns(): DataColumnRecipe[]; } /** Public type alias — value of the same name is the memoised factory above. */ export type ResultPoolColumnsProvider = ResultPoolColumnsProviderImpl; //# sourceMappingURL=providers.d.ts.map