/** * The **Import Pipeline** — the single, source-agnostic sequence every import * flows through once its data has been normalized into a {@link Workbook}. * Whether the bytes came from Excel, CSV, TSV or the clipboard, they converge * here so validation, mapping, type detection and formula discovery happen in * exactly one place (no importer may bypass it). * * The pipeline is **pure**: it turns a {@link Workbook} into an * {@link ImportResult} and reports progress through an injected emitter, but it * never touches the grid. Applying the result to the grid (choosing * replace/append/insert and calling the public seams) is the * {@link import('./import-engine').ImportEngine}'s job — keeping this stage * trivially unit-testable with no DOM. * * @packageDocumentation */ import { ImportStage, type ImportMode, type ImportResult, type ImportSourceType } from '../../../types/import.types'; import type { Workbook } from '../model/workbook'; /** Signature of the progress emitter the pipeline calls at each stage. */ export type ProgressEmitter = (stage: ImportStage, message: string, processed?: number, total?: number) => void; /** Inputs to a single pipeline run. */ export interface ImportPipelineInput { readonly workbook: Workbook; readonly source: ImportSourceType; readonly mode: ImportMode; readonly hasHeaderRow: boolean; readonly sheetName?: string; readonly sampleSize?: number; } /** The pure Workbook → ImportResult transformation. */ export declare class ImportPipeline { private readonly emit; /** * @param emit - Called once per stage so hosts can render progress. */ constructor(emit: ProgressEmitter); /** Emits a stage using its canonical message. */ private stage; /** * Runs validation → mapping → type detection → formula discovery and returns * the grid-ready {@link ImportResult}. Never throws for data problems — those * are captured in {@link ImportResult.validation}; callers decide whether to * apply based on {@link import('../../../types/import.types').ImportValidationResult.valid}. * * @param input - The normalized workbook and options. * @returns The import result (possibly invalid). */ run(input: ImportPipelineInput): ImportResult; /** Builds an empty, invalid result for a structural failure. */ private emptyResult; } //# sourceMappingURL=import-pipeline.d.ts.map