SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Everything the Series dialog needs to offer, preview and describe a fill, without reaching into the model itself.

    The dialog is presentation: which types apply, what a setting would produce, and where the fill would land are all questions about the sheet, and they are answered here so the dialog does not have to iterate cells to ask them.

    interface FillSeries {
        direction: Direction;
        offered: (direction: Direction) => readonly string[];
        preview: (options: FillSeriesOptions) => ICellRange | null;
        range: ICellRange;
        resolve: (direction: Direction) => FillSeriesRanges | null;
    }
    Index
    direction: Direction

    The direction the selection's own shape implies, and the dialog's initial value.

    A single column runs down and a single row runs across; a block is ambiguous and Excel's own default (down) is taken, which is why the dialog still offers the choice.

    offered: (direction: Direction) => readonly string[]

    The preset ids that can be offered for direction, in registry order.

    A preset applies when it applies to ANY line of the selection — a selection holding a column of dates beside a column of numbers offers the date fills, and the numeric column falls back to a copy rather than the entry being greyed for both.

    preview: (options: FillSeriesOptions) => ICellRange | null

    A projection of what options would fill, or null where there is nothing to fill.

    Nothing is committed and no undo entry is created; the cells are computed on demand, so reading the handful the dialog shows costs that handful. See ICellRange.AutoFillOptions.preview.

    range: ICellRange

    The selection the fill runs over — the dialog shows its address.

    resolve: (direction: Direction) => FillSeriesRanges | null

    The addresses a fill in direction would read and write, or null where there is nothing to fill — which is also how a surface knows a direction is not on offer at all.