import * as chart_js from 'chart.js';
import { ChartConfiguration, Point, Chart, Color as Color$1, ChartType as ChartType$1 } from 'chart.js';
import * as ChartGeo from 'chartjs-chart-geo';
import * as GeoJSON$1 from 'geojson';
import * as _odoo_owl from '@odoo/owl';
import { ComponentConstructor, Component } from '@odoo/owl';
import * as chart_js_dist_types_utils from 'chart.js/dist/types/utils';
import * as chart_js_dist_types_geometric from 'chart.js/dist/types/geometric';
import * as chart_js_dist_types_basic from 'chart.js/dist/types/basic';

interface Figure {
    id: UID;
    x: Pixel;
    y: Pixel;
    width: Pixel;
    height: Pixel;
    tag: string;
}
interface FigureSize {
    width: Pixel;
    height: Pixel;
}
interface ExcelFigureSize {
    cx: number;
    cy: number;
}
type ResizeDirection = -1 | 0 | 1;

/**
 * Image source given to <img src="..."/>
 */
type ImageSrc = string;
interface Image$1 {
    path: string;
    size: FigureSize;
    mimetype?: string;
}

type XLSXExportFile = XLSXExportImageFile | XLSXExportXMLFile;
interface XLSXExportXMLFile {
    path: string;
    content: string;
    contentType?: string;
}
interface XLSXExportImageFile {
    path: string;
    imageSrc: string;
}
interface XLSXExport {
    name: string;
    files: XLSXExportFile[];
}
/**
 * Standardized XLSX hexadecimal color (with or without alpha channel).
 * Note that the alpha channel goes first! AARRGGBB
 * e.g. "1E5010" or "331E5010"
 */
type XlsxHexColor = string & Alias;

type VerticalAxisPosition = "left" | "right";
type LegendPosition = "top" | "bottom" | "left" | "right" | "none";

interface ComboBarChartDefinition {
    readonly dataSets: CustomizedDataSet[];
    readonly dataSetsHaveTitle: boolean;
    readonly labelRange?: string;
    readonly title: TitleDesign;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly aggregated?: boolean;
    readonly axesDesign?: AxesDesign;
    readonly showValues?: boolean;
}

interface BarChartDefinition extends ComboBarChartDefinition {
    readonly type: "bar";
    readonly stacked: boolean;
    readonly horizontal?: boolean;
}
type BarChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};

interface ComboChartDefinition extends ComboBarChartDefinition {
    readonly dataSets: ComboChartDataSet[];
    readonly type: "combo";
}
type ComboChartDataSet = CustomizedDataSet & {
    type?: "bar" | "line";
};
type ComboChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};

interface GaugeChartDefinition {
    readonly type: "gauge";
    readonly title: TitleDesign;
    readonly dataRange?: string;
    readonly sectionRule: SectionRule;
    readonly background?: Color;
}
interface SectionRule {
    readonly colors: ColorSet;
    readonly rangeMin: string;
    readonly rangeMax: string;
    readonly lowerInflectionPoint: SectionThreshold;
    readonly upperInflectionPoint: SectionThreshold;
}
interface ColorSet {
    readonly lowerColor: Color;
    readonly middleColor: Color;
    readonly upperColor: Color;
}
interface SectionThreshold {
    readonly type: "number" | "percentage";
    readonly value: string;
    readonly operator: "<" | "<=";
}
interface GaugeValue {
    value: number;
    label: string;
}
interface GaugeInflectionValue extends GaugeValue {
    operator: "<" | "<=";
}
interface GaugeChartRuntime {
    background: Color;
    title: TitleDesign;
    minValue: GaugeValue;
    maxValue: GaugeValue;
    gaugeValue?: GaugeValue;
    inflectionValues: GaugeInflectionValue[];
    colors: Color[];
}

interface GeoChartDefinition {
    readonly type: "geo";
    readonly dataSets: CustomizedDataSet[];
    readonly dataSetsHaveTitle: boolean;
    readonly labelRange?: string;
    readonly title: TitleDesign;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly axesDesign?: AxesDesign;
    readonly aggregated?: boolean;
    readonly colorScale?: GeoChartColorScale;
    readonly missingValueColor?: Color;
    readonly region?: string;
}
type GeoChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};
interface GeoChartCustomColorScale {
    minColor: Color;
    midColor?: Color;
    maxColor: Color;
}
type GeoChartColorScale = GeoChartCustomColorScale | "blues" | "cividis" | "greens" | "greys" | "oranges" | "purples" | "rainbow" | "reds" | "viridis";
type GeoChartProjection = "azimuthalEqualArea" | "azimuthalEquidistant" | "gnomonic" | "orthographic" | "stereographic" | "equalEarth" | "albers" | "albersUsa" | "conicConformal" | "conicEqualArea" | "conicEquidistant" | "equirectangular" | "mercator" | "transverseMercator" | "naturalEarth1";
interface GeoChartRegion {
    id: string;
    label: string;
    defaultProjection: GeoChartProjection;
}
interface GeoChartRuntimeGenerationArgs extends ChartRuntimeGenerationArgs {
    availableRegions: GeoChartRegion[];
    getGeoJsonFeatures: (region: string) => GeoJSON.Feature[] | undefined;
    geoFeatureNameToId: (region: string, featureName: string) => string | undefined;
}

interface LineChartDefinition {
    readonly type: "line";
    readonly dataSets: CustomizedDataSet[];
    readonly dataSetsHaveTitle: boolean;
    readonly labelRange?: string;
    readonly title: TitleDesign;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly labelsAsText: boolean;
    readonly stacked: boolean;
    readonly aggregated?: boolean;
    readonly cumulative: boolean;
    readonly axesDesign?: AxesDesign;
    readonly fillArea?: boolean;
    readonly showValues?: boolean;
}
type LineChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};

interface PieChartDefinition {
    readonly type: "pie";
    readonly dataSets: CustomizedDataSet[];
    readonly dataSetsHaveTitle: boolean;
    readonly labelRange?: string;
    readonly title: TitleDesign;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly aggregated?: boolean;
    readonly axesDesign?: AxesDesign;
    readonly isDoughnut?: boolean;
    readonly showValues?: boolean;
}
type PieChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};

interface PyramidChartDefinition extends Omit<BarChartDefinition, "type"> {
    readonly type: "pyramid";
}
type PyramidChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};

interface RadarChartDefinition {
    readonly dataSets: CustomizedDataSet[];
    readonly dataSetsHaveTitle: boolean;
    readonly labelRange?: string;
    readonly title: TitleDesign;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly aggregated?: boolean;
    readonly type: "radar";
    readonly stacked: boolean;
    readonly axesDesign?: AxesDesign;
    readonly fillArea?: boolean;
    readonly showValues?: boolean;
}
type RadarChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};

interface ScatterChartDefinition extends Omit<LineChartDefinition, "type" | "stacked" | "cumulative"> {
    readonly type: "scatter";
}
type ScatterChartRuntime = LineChartRuntime;

interface ScorecardChartDefinition {
    readonly type: "scorecard";
    readonly title: TitleDesign;
    readonly keyValue?: string;
    readonly baseline?: string;
    readonly baselineMode: BaselineMode;
    readonly baselineDescr?: string;
    readonly background?: Color;
    readonly baselineColorUp: Color;
    readonly baselineColorDown: Color;
    readonly humanize?: boolean;
}
type BaselineMode = "text" | "difference" | "percentage" | "progress";
type BaselineArrowDirection = "neutral" | "up" | "down";
interface ProgressBar {
    readonly value: number;
    readonly color: Color;
}
interface ScorecardChartRuntime {
    readonly title: TitleDesign;
    readonly keyValue: string;
    readonly baselineDisplay: string;
    readonly baselineColor?: string;
    readonly baselineArrow: BaselineArrowDirection;
    readonly baselineDescr?: string;
    readonly background: Color;
    readonly fontColor: Color;
    readonly keyValueStyle?: Style;
    readonly baselineStyle?: Style;
    readonly progressBar?: ProgressBar;
}

interface WaterfallChartDefinition {
    readonly type: "waterfall";
    readonly dataSets: CustomizedDataSet[];
    readonly dataSetsHaveTitle: boolean;
    readonly labelRange?: string;
    readonly title: TitleDesign;
    readonly background?: Color;
    readonly verticalAxisPosition: VerticalAxisPosition;
    readonly legendPosition: LegendPosition;
    readonly aggregated?: boolean;
    readonly showSubTotals: boolean;
    readonly showConnectorLines: boolean;
    readonly firstValueAsSubtotal?: boolean;
    readonly positiveValuesColor?: Color;
    readonly negativeValuesColor?: Color;
    readonly subTotalValuesColor?: Color;
    readonly axesDesign?: AxesDesign;
    readonly showValues?: boolean;
}
type WaterfallChartRuntime = {
    chartJsConfig: ChartConfiguration;
    background: Color;
};

declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter", "combo", "waterfall", "pyramid", "radar", "geo"];
type ChartType = (typeof CHART_TYPES)[number];
type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition | ScatterChartDefinition | ComboChartDefinition | WaterfallChartDefinition | PyramidChartDefinition | RadarChartDefinition | GeoChartDefinition;
type ChartWithDataSetDefinition = Extract<ChartDefinition, {
    dataSets: CustomizedDataSet[];
    labelRange?: string;
}>;
type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | ComboChartRuntime | ScatterChartRuntime | WaterfallChartRuntime | PyramidChartRuntime | RadarChartRuntime | GeoChartRuntime;
type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime | GaugeChartRuntime;
interface LabelValues {
    readonly values: string[];
    readonly formattedValues: string[];
}
interface DatasetValues {
    readonly label?: string;
    readonly data: any[];
    readonly hidden?: boolean;
}
interface DatasetDesign {
    readonly backgroundColor?: string;
    readonly yAxisId?: string;
    readonly label?: string;
}
interface AxisDesign {
    readonly title?: TitleDesign;
}
interface AxesDesign {
    readonly x?: AxisDesign;
    readonly y?: AxisDesign;
    readonly y1?: AxisDesign;
}
interface TitleDesign {
    readonly text?: string;
    readonly bold?: boolean;
    readonly italic?: boolean;
    readonly align?: Align;
    readonly color?: Color;
    readonly fontSize?: number;
}
type TrendType = "polynomial" | "exponential" | "logarithmic" | "trailingMovingAverage";
interface TrendConfiguration {
    type?: TrendType;
    order?: number;
    color?: Color;
    display?: boolean;
    window?: number;
}
type CustomizedDataSet = {
    readonly dataRange: string;
    readonly trend?: TrendConfiguration;
} & DatasetDesign;
type AxisType = "category" | "linear" | "time";
interface DataSet {
    readonly labelCell?: Range;
    readonly dataRange: Range;
    readonly rightYAxis?: boolean;
    readonly backgroundColor?: Color;
    readonly customLabel?: string;
}
interface ExcelChartDataset {
    readonly label?: {
        text?: string;
    } | {
        reference?: string;
    };
    readonly range: string;
    readonly backgroundColor?: Color;
    readonly rightYAxis?: boolean;
}
type ExcelChartType = "line" | "bar" | "pie" | "combo" | "scatter" | "radar";
interface ExcelChartDefinition {
    readonly title?: TitleDesign;
    readonly type: ExcelChartType;
    readonly dataSets: ExcelChartDataset[];
    readonly labelRange?: string;
    readonly backgroundColor: XlsxHexColor;
    readonly fontColor: XlsxHexColor;
    readonly legendPosition: LegendPosition;
    readonly stacked?: boolean;
    readonly cumulative?: boolean;
    readonly verticalAxis?: {
        useLeftAxis?: boolean;
        useRightAxis?: boolean;
    };
    readonly axesDesign?: AxesDesign;
}
interface ChartCreationContext {
    readonly range?: CustomizedDataSet[];
    readonly title?: TitleDesign;
    readonly background?: string;
    readonly auxiliaryRange?: string;
    readonly aggregated?: boolean;
    readonly stacked?: boolean;
    readonly cumulative?: boolean;
    readonly dataSetsHaveTitle?: boolean;
    readonly labelsAsText?: boolean;
    readonly showSubTotals?: boolean;
    readonly showConnectorLines?: boolean;
    readonly firstValueAsSubtotal?: boolean;
    readonly legendPosition?: LegendPosition;
    readonly axesDesign?: AxesDesign;
    readonly fillArea?: boolean;
    readonly showValues?: boolean;
}
type ChartAxisFormats = {
    [axisId: string]: Format | undefined;
} | undefined;
interface ChartRuntimeGenerationArgs {
    dataSetsValues: DatasetValues[];
    axisFormats: ChartAxisFormats;
    labels: string[];
    locale: Locale;
    trendDataSetsValues?: (Point[] | undefined)[];
    axisType?: AxisType;
}
/** Generic definition of chart to create a runtime: omit the chart type and the dataRange of the dataSets*/
type GenericDefinition<T extends ChartWithDataSetDefinition> = Partial<Omit<T, "dataSets" | "type">> & {
    dataSets?: Omit<T["dataSets"][number], "dataRange">[];
};

/**
 * This is a generic event bus based on the Owl event bus.
 * This bus however ensures type safety across events and subscription callbacks.
 */
declare class EventBus<Event extends {
    type: string;
}> {
    subscriptions: {
        [eventType: string]: Subscription[];
    };
    /**
     * Add a listener for the 'eventType' events.
     *
     * Note that the 'owner' of this event can be anything, but will more likely
     * be a component or a class. The idea is that the callback will be called with
     * the proper owner bound.
     *
     * Also, the owner should be kind of unique. This will be used to remove the
     * listener.
     */
    on<T extends Event["type"], E extends Extract<Event, {
        type: T;
    }>>(type: T, owner: any, callback: (r: Omit<E, "type">) => void): void;
    /**
     * Emit an event of type 'eventType'.  Any extra arguments will be passed to
     * the listeners callback.
     */
    trigger<T extends Event["type"], E extends Extract<Event, {
        type: T;
    }>>(type: T, payload?: Omit<E, "type">): void;
    /**
     * Remove a listener
     */
    off<T extends Event["type"]>(eventType: T, owner: any): void;
    /**
     * Remove all subscriptions.
     */
    clear(): void;
}
type Callback = (...args: any[]) => void;
interface Subscription {
    owner: any;
    callback: Callback;
}

declare class SelectiveHistory<T = unknown> {
    private HEAD_BRANCH;
    private HEAD_OPERATION;
    private tree;
    private readonly applyOperation;
    private readonly revertOperation;
    private readonly buildEmpty;
    private readonly buildTransformation;
    /**
     * The selective history is a data structure used to register changes/updates of a state.
     * Each change/update is called an "operation".
     * The data structure allows to easily cancel (and redo) any operation individually.
     * An operation can be represented by any data structure. It can be a "command", a "diff", etc.
     * However it must have the following properties:
     * - it can be applied to modify the state
     * - it can be reverted on the state such that it was never executed.
     * - it can be transformed given other operation (Operational Transformation)
     *
     * Since this data structure doesn't know anything about the state nor the structure of
     * operations, the actual work must be performed by external functions given as parameters.
     * @param initialOperationId
     * @param applyOperation a function which can apply an operation to the state
     * @param revertOperation  a function which can revert an operation from the state
     * @param buildEmpty  a function returning an "empty" operation.
     *                    i.e an operation that leaves the state unmodified once applied or reverted
     *                    (used for internal implementation)
     * @param buildTransformation Factory used to build transformations
     */
    constructor(args: {
        initialOperationId: UID;
        applyOperation: (data: T) => void;
        revertOperation: (data: T) => void;
        buildEmpty: (id: UID) => T;
        buildTransformation: TransformationFactory<T>;
    });
    /**
     * Return the operation identified by its id.
     */
    get(operationId: UID): T;
    /**
     * Append a new operation as the last one
     */
    append(operationId: UID, data: T): void;
    /**
     * Insert a new operation after a specific operation (may not be the last operation).
     * Following operations will be transformed according
     * to the new operation.
     */
    insert(operationId: UID, data: T, insertAfter: UID): void;
    /**
     * @param operationId operation to undo
     * @param undoId the id of the "undo operation"
     * @param insertAfter the id of the operation after which to insert the undo
     */
    undo(operationId: UID, undoId: UID, insertAfter: UID): void;
    /**
     * @param operationId operation to redo
     * @param redoId the if of the "redo operation"
     * @param insertAfter the id of the operation after which to insert the redo
     */
    redo(operationId: UID, redoId: UID, insertAfter: UID): void;
    rebase(operationId: UID): void;
    /**
     * Revert the state as it was *before* the given operation was executed.
     */
    private revertBefore;
    /**
     * Revert the state as it was *after* the given operation was executed.
     */
    private revertTo;
    /**
     * Revert an execution
     */
    private revert;
    /**
     * Replay the operations between the current HEAD_BRANCH and the end of the tree
     */
    private fastForward;
}

type ClientId = string;
interface Client {
    id: ClientId;
    name: string;
    position?: ClientPosition;
}
interface ClientPosition {
    sheetId: UID;
    col: HeaderIndex;
    row: HeaderIndex;
}
interface RemoteRevisionReceivedEvent {
    type: "remote-revision-received";
    commands: readonly CoreCommand[];
}
interface RevisionAcknowledgedEvent {
    type: "revision-acknowledged";
    revisionId: UID;
}
interface RevisionUndone {
    type: "revision-undone";
    revisionId: UID;
    commands: readonly CoreCommand[];
}
interface RevisionRedone {
    type: "revision-redone";
    revisionId: UID;
    commands: readonly CoreCommand[];
}
interface CollaborativeEventReceived {
    type: "collaborative-event-received";
}
interface UnexpectedRevisionIdEvent {
    type: "unexpected-revision-id";
}
interface NewLocalStateUpdateEvent {
    type: "new-local-state-update";
    id: UID;
}
interface SnapshotEvent {
    type: "snapshot";
}
type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | SnapshotEvent | CollaborativeEventReceived;
type CollaborativeEventTypes = CollaborativeEvent["type"];

interface RangePart {
    readonly colFixed: boolean;
    readonly rowFixed: boolean;
}
interface Range extends Cloneable<Range> {
    readonly zone: Readonly<Zone>;
    readonly parts: readonly RangePart[];
    readonly invalidXc?: string;
    /** true if the user provided the range with the sheet name */
    readonly prefixSheet: boolean;
    /** the name of any sheet that is invalid */
    readonly invalidSheetName?: string;
    /** the sheet on which the range is defined */
    readonly sheetId: UID;
    readonly rangeData: RangeData;
}
interface RangeData {
    _zone: Zone | UnboundedZone;
    _sheetId: UID;
}

/**
 * https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/025ea6e4-ad42-43ea-a016-16f4e4688ac8
 */
interface ConditionalFormat {
    id: UID;
    rule: ConditionalFormatRule;
    stopIfTrue?: boolean;
    ranges: string[];
}
interface ConditionalFormatInternal extends Omit<ConditionalFormat, "ranges" | "rule"> {
    ranges: Range[];
    rule: ConditionalFormatRuleInternal;
}
type ConditionalFormatRule = SingleColorRules | ColorScaleRule | IconSetRule | DataBarRule;
type ConditionalFormatRuleInternal = SingleColorRules | ColorScaleRule | IconSetRule | DataBarRuleInternal;
type SingleColorRules = CellIsRule;
interface SingleColorRule {
    style: Style;
}
interface TextRule extends SingleColorRule {
    text: string;
}
interface CellIsRule extends SingleColorRule {
    type: "CellIsRule";
    operator: ConditionalFormattingOperatorValues;
    values: string[];
}
interface ExpressionRule extends SingleColorRule {
    type: "ExpressionRule";
}
type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
type ColorScaleThreshold = {
    color: number;
    type: ThresholdType;
    value?: string;
};
type ColorScaleMidPointThreshold = {
    color: number;
    type: Exclude<ThresholdType, "value">;
    value: string;
};
type IconThreshold = {
    type: Exclude<ThresholdType, "value">;
    operator: "gt" | "ge";
    value: string;
};
interface ColorScaleRule {
    type: "ColorScaleRule";
    minimum: ColorScaleThreshold;
    maximum: ColorScaleThreshold;
    midpoint?: ColorScaleMidPointThreshold;
}
interface DataBarRule {
    type: "DataBarRule";
    color: number;
    rangeValues?: string;
}
interface DataBarRuleInternal extends Omit<DataBarRule, "rangeValues"> {
    rangeValues?: Range;
}
interface IconSet {
    upper: string;
    middle: string;
    lower: string;
}
interface IconSetRule {
    type: "IconSetRule";
    icons: IconSet;
    upperInflectionPoint: IconThreshold;
    lowerInflectionPoint: IconThreshold;
}
interface ContainsTextRule extends TextRule {
    type: "ContainsTextRule";
}
interface NotContainsTextRule extends TextRule {
    type: "NotContainsTextRule";
}
interface BeginsWithRule extends TextRule {
    type: "BeginsWithRule";
}
interface EndsWithRule extends TextRule {
    type: "EndsWithRule";
}
interface containsBlanksRule extends TextRule {
    type: "containsBlanksRule";
}
interface notContainsBlanksRule extends TextRule {
    type: "notContainsBlanksRule";
}
interface containsErrorsRule extends SingleColorRule {
    type: "containsErrorsRule";
}
interface notContainsErrorsRule extends SingleColorRule {
    type: "notContainsErrorsRule";
}
interface TimePeriodRule extends SingleColorRule {
    type: "TimePeriodRule";
    timePeriod: string;
}
interface AboveAverageRule extends SingleColorRule {
    type: "AboveAverageRule";
    aboveAverage: boolean;
    equalAverage: boolean;
}
interface Top10Rule extends SingleColorRule {
    type: "Top10Rule";
    percent: boolean;
    bottom: boolean;
    rank: number;
}
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";

declare const PREVIOUS_VALUE = "(previous)";
declare const NEXT_VALUE = "(next)";

type Aggregator = "array_agg" | "count" | "count_distinct" | "bool_and" | "bool_or" | "max" | "min" | "avg" | "sum";
type Granularity = "day" | "week" | "month" | "quarter" | "year" | "second_number" | "minute_number" | "hour_number" | "day_of_week" | "day_of_month" | "iso_week_number" | "month_number" | "quarter_number";
interface PivotCoreDimension {
    fieldName: string;
    order?: SortDirection;
    granularity?: Granularity | string;
}
interface PivotCoreMeasure {
    /**
     * Identifier of the measure, `technicalName:aggregator{:autoIncrementedNumber}`.
     * It's used to identify the measure in the pivot formula.
     */
    id: string;
    userDefinedName?: string;
    fieldName: string;
    aggregator: Aggregator | string;
    isHidden?: boolean;
    format?: Format;
    computedBy?: {
        sheetId: UID;
        formula: string;
    };
    display?: PivotMeasureDisplay;
}
interface CommonPivotCoreDefinition {
    columns: PivotCoreDimension[];
    rows: PivotCoreDimension[];
    measures: PivotCoreMeasure[];
    name: string;
    deferUpdates?: boolean;
    sortedColumn?: PivotSortedColumn;
}
interface PivotSortedColumn {
    order: SortDirection;
    domain: PivotDomain;
    measure: string;
}
interface SpreadsheetPivotCoreDefinition extends CommonPivotCoreDefinition {
    type: "SPREADSHEET";
    dataSet?: {
        sheetId: UID;
        zone: Zone;
    };
}
interface FakePivotDefinition extends CommonPivotCoreDefinition {
    type: "FAKE";
}
type PivotCoreDefinition = SpreadsheetPivotCoreDefinition | FakePivotDefinition;
type TechnicalName = string;
interface PivotField {
    name: TechnicalName;
    type: string;
    string: string;
    aggregator?: string;
    help?: string;
}
type PivotFields = Record<TechnicalName, PivotField | undefined>;
interface PivotMeasure extends PivotCoreMeasure {
    displayName: string;
    type: string;
    isValid: boolean;
}
interface PivotDimension$1 extends PivotCoreDimension {
    nameWithGranularity: string;
    displayName: string;
    type: string;
    isValid: boolean;
}
interface PivotTableColumn {
    fields: string[];
    values: CellValue[];
    width: number;
    offset: number;
}
interface PivotTableRow {
    fields: string[];
    values: CellValue[];
    indent: number;
}
interface PivotTableData {
    cols: PivotTableColumn[][];
    rows: PivotTableRow[];
    measures: string[];
    fieldsType?: Record<string, string | undefined>;
}
interface PivotHeaderCell {
    type: "HEADER";
    domain: PivotDomain;
}
interface PivotMeasureHeaderCell {
    type: "MEASURE_HEADER";
    domain: PivotDomain;
    measure: string;
}
interface PivotValueCell {
    type: "VALUE";
    domain: PivotDomain;
    measure: string;
}
interface PivotEmptyCell {
    type: "EMPTY";
}
type PivotTableCell = PivotHeaderCell | PivotMeasureHeaderCell | PivotValueCell | PivotEmptyCell;
interface PivotTimeAdapterNotNull<T> {
    normalizeFunctionValue: (value: Exclude<CellValue, null>) => T;
    toValueAndFormat: (normalizedValue: T, locale?: Locale) => FunctionResultObject;
    toFunctionValue: (normalizedValue: T) => string;
}
interface PivotTimeAdapter<T> {
    normalizeFunctionValue: (value: CellValue) => T | null;
    toValueAndFormat: (normalizedValue: T, locale?: Locale) => FunctionResultObject;
    toFunctionValue: (normalizedValue: T) => string;
}
interface PivotNode {
    field: string;
    type: string;
    value: CellValue;
}
type PivotDomain = PivotNode[];
/** Pivot domain splitted for the domain related to the pivot's rows and columns  */
interface PivotColRowDomain {
    colDomain: PivotDomain;
    rowDomain: PivotDomain;
}
interface PivotMeasureDisplay {
    type: PivotMeasureDisplayType;
    fieldNameWithGranularity?: string;
    value?: string | boolean | number | typeof PREVIOUS_VALUE | typeof NEXT_VALUE;
}
type PivotMeasureDisplayType = "no_calculations" | "%_of_grand_total" | "%_of_col_total" | "%_of_row_total" | "%_of_parent_row_total" | "%_of_parent_col_total" | "index" | "%_of_parent_total" | "running_total" | "%_running_total" | "rank_asc" | "rank_desc" | "%_of" | "difference_from" | "%_difference_from";
interface DimensionTreeNode {
    value: CellValue;
    field: string;
    type: string;
    children: DimensionTree;
    width: number;
}
type DimensionTree = DimensionTreeNode[];

interface Table {
    readonly id: TableId;
    readonly range: Range;
    readonly filters: Filter[];
    readonly config: TableConfig;
}
interface StaticTable extends Table {
    readonly type: "static" | "forceStatic";
}
interface DynamicTable extends Omit<Table, "filters"> {
    readonly type: "dynamic";
}
type CoreTable = StaticTable | DynamicTable;
type CoreTableType = Extract<CoreTable, {
    type: string;
}>["type"];
interface Filter {
    readonly id: UID;
    readonly rangeWithHeaders: Range;
    readonly col: number;
    /** The filtered zone doesn't includes the headers of the table */
    readonly filteredRange: Range | undefined;
}
interface TableConfig {
    hasFilters: boolean;
    totalRow: boolean;
    firstColumn: boolean;
    lastColumn: boolean;
    numberOfHeaders: number;
    bandedRows: boolean;
    bandedColumns: boolean;
    automaticAutofill?: boolean;
    styleId: string;
}
interface ComputedTableStyle {
    borders: Border$1[][];
    styles: Style[][];
}
interface TableElementStyle {
    border?: TableBorder;
    style?: Style;
    size?: number;
}
interface TableBorder extends Border$1 {
    horizontal?: BorderDescr;
    vertical?: BorderDescr;
}
interface TableStyle {
    category: string;
    displayName: string;
    templateName: TableStyleTemplateName;
    primaryColor: string;
    wholeTable?: TableElementStyle;
    firstColumnStripe?: TableElementStyle;
    secondColumnStripe?: TableElementStyle;
    firstRowStripe?: TableElementStyle;
    secondRowStripe?: TableElementStyle;
    firstColumn?: TableElementStyle;
    lastColumn?: TableElementStyle;
    headerRow?: TableElementStyle;
    totalRow?: TableElementStyle;
}
type TableStyleTemplateName = "none" | "lightColoredText" | "lightAllBorders" | "mediumAllBorders" | "lightWithHeader" | "mediumBandedBorders" | "mediumMinimalBorders" | "darkNoBorders" | "mediumWhiteBorders" | "dark";

interface Dependencies {
    references: string[];
    numbers: number[];
    strings: string[];
}
interface HeaderData {
    size?: number;
    isHidden?: boolean;
}
interface FigureData<T> {
    id: UID;
    x: Pixel;
    y: Pixel;
    width: Pixel;
    height: Pixel;
    tag: string;
    data: T;
}
interface SheetData {
    id: string;
    name: string;
    colNumber: number;
    rowNumber: number;
    cells: {
        [key: string]: string | undefined;
    };
    styles: {
        [zone: string]: number;
    };
    formats: {
        [zone: string]: number;
    };
    borders: {
        [zone: string]: number;
    };
    merges: string[];
    figures: FigureData<any>[];
    cols: {
        [key: number]: HeaderData;
    };
    rows: {
        [key: number]: HeaderData;
    };
    conditionalFormats: ConditionalFormat[];
    dataValidationRules: DataValidationRuleData[];
    tables: TableData[];
    areGridLinesVisible?: boolean;
    isVisible: boolean;
    panes?: PaneDivision;
    headerGroups?: Record<Dimension, HeaderGroup[]>;
    color?: Color;
}
interface WorkbookSettings {
    locale: Locale;
}
type PivotData = {
    formulaId: string;
} & PivotCoreDefinition;
interface WorkbookData {
    version: number;
    sheets: SheetData[];
    styles: {
        [key: number]: Style;
    };
    formats: {
        [key: number]: Format;
    };
    borders: {
        [key: number]: Border$1;
    };
    pivots: {
        [key: string]: PivotData;
    };
    pivotNextId: number;
    revisionId: UID;
    uniqueFigureIds: boolean;
    settings: WorkbookSettings;
    customTableStyles: {
        [key: string]: TableStyleData;
    };
}
interface ExcelWorkbookData extends WorkbookData {
    sheets: ExcelSheetData[];
}
interface ExcelSheetData extends Omit<SheetData, "figureTables" | "cols" | "rows"> {
    cellValues: {
        [xc: string]: CellValue | undefined;
    };
    formulaSpillRanges: {
        [xc: string]: string;
    };
    charts: FigureData<ExcelChartDefinition>[];
    images: FigureData<Image$1>[];
    tables: ExcelTableData[];
    cols: {
        [key: number]: ExcelHeaderData;
    };
    rows: {
        [key: number]: ExcelHeaderData;
    };
}
interface ExcelHeaderData extends HeaderData {
    outlineLevel?: number;
    collapsed?: boolean;
}
interface TableData {
    range: string;
    config?: TableConfig;
    type?: CoreTableType;
}
interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
    ranges: string[];
}
interface ExcelTableData {
    range: string;
    filters: ExcelFilterData[];
    config: TableConfig;
}
interface ExcelFilterData {
    colId: number;
    displayedValues: string[];
    displayBlanks?: boolean;
}
interface TableStyleData {
    templateName: TableStyleTemplateName;
    primaryColor: string;
    displayName: string;
}

interface AbstractMessage {
    version: number;
}
interface RemoteRevisionMessage extends AbstractMessage {
    type: "REMOTE_REVISION";
    clientId: ClientId;
    commands: readonly CoreCommand[];
    nextRevisionId: UID;
    serverRevisionId: UID;
    timestamp?: number;
}
interface RevisionUndoneMessage extends AbstractMessage {
    type: "REVISION_UNDONE";
    undoneRevisionId: UID;
    nextRevisionId: UID;
    serverRevisionId: UID;
}
interface RevisionRedoneMessage extends AbstractMessage {
    type: "REVISION_REDONE";
    redoneRevisionId: UID;
    nextRevisionId: UID;
    serverRevisionId: UID;
}
interface ClientJoinedMessage extends AbstractMessage {
    type: "CLIENT_JOINED";
    client: Required<Client>;
}
interface ClientLeftMessage extends AbstractMessage {
    type: "CLIENT_LEFT";
    clientId: ClientId;
}
interface ClientMovedMessage extends AbstractMessage {
    type: "CLIENT_MOVED";
    client: Required<Client>;
}
/**
 * Send a snapshot of the spreadsheet to the collaborative server
 */
interface SnapshotMessage extends AbstractMessage {
    type: "SNAPSHOT";
    data: WorkbookData;
    serverRevisionId: UID;
    nextRevisionId: UID;
}
/**
 * Notify all clients that the server has a new snapshot of the
 * spreadsheet and that the previous history may be lost.
 */
interface SnapshotCreatedMessage extends AbstractMessage {
    type: "SNAPSHOT_CREATED";
    serverRevisionId: UID;
    nextRevisionId: UID;
}
type CollaborationMessage = RevisionUndoneMessage | RevisionRedoneMessage | RemoteRevisionMessage | SnapshotMessage | SnapshotCreatedMessage | ClientMovedMessage | ClientJoinedMessage | ClientLeftMessage;
type StateUpdateMessage = Extract<CollaborationMessage, {
    nextRevisionId: UID;
}>;
type NewMessageCallback<T = any> = (message: T) => void;
/**
 * The transport service allows to communicate between multiple clients.
 * A client can send any message to others.
 * The service will handle all networking details internally.
 */
interface TransportService<T = any> {
    /**
     * Send a message to all clients
     */
    sendMessage: (message: T) => Promise<void>;
    /**
     * Register a callback function which will be called each time
     * a new message is received.
     * The new message is given to the callback.
     *
     * ```js
     * transportService.onNewMessage(id, (message) => {
     *   // ... handle the new message
     * })
     * ```
     * The `id` is used to unregister this callback when the session is closed.
     */
    onNewMessage: (id: UID, callback: NewMessageCallback<T>) => void;
    /**
     * Unregister a callback linked to the given id
     */
    leave: (id: UID) => void;
}

declare class Revision implements RevisionData {
    readonly rootCommand?: Command | undefined;
    readonly timestamp?: number | undefined;
    readonly id: UID;
    readonly clientId: ClientId;
    private _commands;
    private _changes;
    /**
     * A revision represents a whole client action (Create a sheet, merge a Zone, Undo, ...).
     * A revision contains the following information:
     *  - id: ID of the revision
     *  - commands: CoreCommands that are linked to the action, and should be
     *              dispatched in other clients
     *  - clientId: Client who initiated the action
     *  - changes: List of changes applied on the state.
     */
    constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: Command | undefined, changes?: readonly HistoryChange[], timestamp?: number | undefined);
    setChanges(changes: readonly HistoryChange[]): void;
    get commands(): readonly CoreCommand[];
    get changes(): readonly HistoryChange[];
}

declare class Session extends EventBus<CollaborativeEvent> {
    private revisions;
    private transportService;
    private serverRevisionId;
    /**
     * Positions of the others client.
     */
    private clients;
    private clientId;
    /**
     * Id of the server revision
     */
    private debouncedMove;
    private pendingMessages;
    private waitingAck;
    /**
     * Flag used to block all commands when an undo or redo is triggered, until
     * it is accepted on the server
     */
    private waitingUndoRedoAck;
    private isReplayingInitialRevisions;
    private processedRevisions;
    private lastRevisionMessage;
    private uuidGenerator;
    private lastLocalOperation;
    /**
     * Manages the collaboration between multiple users on the same spreadsheet.
     * It can forward local state changes to other users to ensure they all eventually
     * reach the same state.
     * It also manages the positions of each clients in the spreadsheet to provide
     * a visual indication of what other users are doing in the spreadsheet.
     *
     * @param revisions
     * @param transportService communication channel used to send and receive messages
     * between all connected clients
     * @param client the client connected locally
     * @param serverRevisionId
     */
    constructor(revisions: SelectiveHistory<Revision>, transportService: TransportService<CollaborationMessage>, serverRevisionId?: UID);
    canApplyOptimisticUpdate(): boolean;
    /**
     * Add a new revision to the collaborative session.
     * It will be transmitted to all other connected clients.
     */
    save(rootCommand: Command, commands: CoreCommand[], changes: HistoryChange[]): void;
    undo(revisionId: UID): void;
    redo(revisionId: UID): void;
    /**
     * Notify that the position of the client has changed
     */
    move(position: ClientPosition): void;
    join(client?: Client): void;
    loadInitialMessages(messages: StateUpdateMessage[]): void;
    /**
     * Notify the server that the user client left the collaborative session
     */
    leave(data?: Lazy<WorkbookData>): Promise<void>;
    /**
     * Send a snapshot of the spreadsheet to the collaboration server
     */
    snapshot(data: WorkbookData): Promise<void>;
    getClient(): Client;
    getConnectedClients(): Set<Client>;
    getRevisionId(): UID;
    isFullySynchronized(): boolean;
    /**
     * Get the last local revision
     * */
    getLastLocalNonEmptyRevision(): Revision | undefined;
    private _move;
    /**
     * Handles messages received from other clients in the collaborative
     * session.
     */
    private onMessageReceived;
    private onClientMoved;
    /**
     * Register the new client and send your
     * own position back.
     */
    private onClientJoined;
    private onClientLeft;
    private sendUpdateMessage;
    /**
     * Send the next pending message
     */
    private sendPendingMessage;
    private acknowledge;
    private isAlreadyProcessed;
    isWrongServerRevisionId(message: CollaborationMessage): boolean;
    private dropPendingHistoryMessages;
}

/**
 * RGBA to HEX representation (#RRGGBBAA).
 *
 * https://css-tricks.com/converting-color-spaces-in-javascript/
 */
declare function rgbaToHex(rgba: RGBA): Color;
/**
 * Color string to RGBA representation
 */
declare function colorToRGBA(color: Color): RGBA;
declare class ColorGenerator {
    private preferredColors;
    private currentColorIndex;
    protected palette: Color[];
    constructor(paletteSize: number, preferredColors?: (string | undefined)[]);
    next(): string;
}

/**
 * Convert a (col) number to the corresponding letter.
 *
 * Examples:
 *     0 => 'A'
 *     25 => 'Z'
 *     26 => 'AA'
 *     27 => 'AB'
 */
declare function numberToLetters(n: number): string;
declare function lettersToNumber(letters: string): number;
/**
 * Convert a "XC" coordinate to cartesian coordinates.
 *
 * Examples:
 *   A1 => [0,0]
 *   B3 => [1,2]
 *
 * Note: it also accepts lowercase coordinates, but not fixed references
 */
declare function toCartesian(xc: string): Position$1;
/**
 * Convert from cartesian coordinate to the "XC" coordinate system.
 *
 * Examples:
 *   - 0,0 => A1
 *   - 1,2 => B3
 *   - 0,0, {colFixed: false, rowFixed: true} => A$1
 *   - 1,2, {colFixed: true, rowFixed: false} => $B3
 */
declare function toXC(col: HeaderIndex, row: HeaderIndex, rangePart?: RangePart): string;

/**
 * A DateTime object that can be used to manipulate spreadsheet dates.
 * Conceptually, a spreadsheet date is simply a number with a date format,
 * and it is timezone-agnostic.
 * This DateTime object consistently uses UTC time to represent a naive date and time.
 */
declare class DateTime {
    private jsDate;
    constructor(year: number, month: number, day: number, hours?: number, minutes?: number, seconds?: number);
    static fromTimestamp(timestamp: number): DateTime;
    static now(): DateTime;
    toString(): string;
    toLocaleDateString(): string;
    getTime(): number;
    getFullYear(): number;
    getMonth(): number;
    getQuarter(): number;
    getDate(): number;
    getDay(): number;
    getHours(): number;
    getMinutes(): number;
    getSeconds(): number;
    getIsoWeek(): number;
    setFullYear(year: number): number;
    setMonth(month: number): number;
    setDate(date: number): number;
    setHours(hours: number): number;
    setMinutes(minutes: number): number;
    setSeconds(seconds: number): number;
}
declare function isDateTime(str: string, locale: Locale): boolean;

interface FormatWidth {
    availableWidth: number;
    measureText: (text: string) => number;
}
/**
 * Formats a cell value with its format.
 */
declare function formatValue(value: CellValue, { format, locale, formatWidth }: LocaleFormat & {
    formatWidth?: FormatWidth;
}): FormattedValue;
declare function createCurrencyFormat(currency: Partial<Currency>): Format;

interface SearchOptions {
    matchCase: boolean;
    exactMatch: boolean;
    searchFormulas: boolean;
    searchScope: "allSheets" | "activeSheet" | "specificRange";
    specificRange?: Range;
}

/**
 * Deep copy arrays, plain objects and primitive values.
 * Throws an error for other types such as class instances.
 * Sparse arrays remain sparse.
 */
declare function deepCopy<T>(obj: T): T;
declare function unquote(string: string, quoteChar?: "'" | '"'): string;
/** Replace the excel-excluded characters of a sheetName */
declare function sanitizeSheetName(sheetName: string, replacementChar?: string): string;
declare function isMarkdownLink(str: string): boolean;
/**
 * Build a markdown link from a label and an url
 */
declare function markdownLink(label: string, url: string): string;
declare function parseMarkdownLink(str: string): {
    url: string;
    label: string;
};
/**
 * This helper function can be used as a type guard when filtering arrays.
 * const foo: number[] = [1, 2, undefined, 4].filter(isDefined)
 */
declare function isDefined<T>(argument: T | undefined): argument is T;
/**
 * Lazy value computed by the provided function.
 */
declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
/**
 * Compares two objects.
 */
declare function deepEquals(o1: any, o2: any): boolean;
declare function getUniqueText(text: string, texts: string[], options?: {
    compute?: (text: string, increment: number) => string;
    start?: number;
    computeFirstOne?: boolean;
}): string;

/**
 * Return true if the argument is a "number string".
 *
 * Note that "" (empty string) does not count as a number string
 */
declare function isNumber(value: string | undefined, locale: Locale): boolean;

interface ConstructorArgs {
    readonly zone: Readonly<Zone | UnboundedZone>;
    readonly parts: readonly RangePart[];
    readonly invalidXc?: string;
    /** true if the user provided the range with the sheet name */
    readonly prefixSheet: boolean;
    /** the name of any sheet that is invalid */
    readonly invalidSheetName?: string;
    /** the sheet on which the range is defined */
    readonly sheetId: UID;
}
declare class RangeImpl implements Range {
    private getSheetSize;
    private readonly _zone;
    readonly parts: Range["parts"];
    readonly invalidXc?: string;
    readonly prefixSheet: boolean;
    readonly sheetId: UID;
    readonly invalidSheetName?: string;
    constructor(args: ConstructorArgs, getSheetSize: (sheetId: UID) => ZoneDimension);
    static fromRange(range: Range, getters: CoreGetters): RangeImpl;
    get unboundedZone(): UnboundedZone;
    get zone(): Readonly<Zone>;
    static getRangeParts(xc: string, zone: UnboundedZone): RangePart[];
    get isFullCol(): boolean;
    get isFullRow(): boolean;
    get rangeData(): RangeData;
    /**
     * Check that a zone is valid regarding the order of top-bottom and left-right.
     * Left should be smaller than right, top should be smaller than bottom.
     * If it's not the case, simply invert them, and invert the linked parts
     */
    orderZone(): RangeImpl;
    /**
     *
     * @param rangeParams optional, values to put in the cloned range instead of the current values of the range
     */
    clone(rangeParams?: Partial<ConstructorArgs>): RangeImpl;
}

declare function splitReference(ref: string): {
    sheetName?: string;
    xc: string;
};

declare function computeTextWidth(context: CanvasRenderingContext2D, text: string, style: Style, fontUnit?: "px" | "pt"): number;

declare class UuidGenerator {
    /**
     * Generates a custom UUID using a simple 36^12 method (8-character alphanumeric string with lowercase letters)
     * This has a higher chance of collision than a UUIDv4, but not only faster to generate than an UUIDV4,
     * it also has a smaller size, which is preferable to alleviate the overall data size.
     *
     * This method is preferable when generating uuids for the core data (sheetId, figureId, etc)
     * as they will appear several times in the revisions and local history.
     *
     */
    smallUuid(): string;
    /**
     * Generates an UUIDV4, has astronomically low chance of collision, but is larger in size than the smallUuid.
     * This method should be used when you need to avoid collisions at all costs, like the id of a revision.
     */
    uuidv4(): string;
}

/**
 * Convert from a cartesian reference to a (possibly unbounded) Zone
 *
 * Examples:
 *    "A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
 *    "B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
 *    "B:B" ==> Top 0, Bottom undefined, Left: 1, Right: 1
 *    "B2:B" ==> Top 1, Bottom undefined, Left: 1, Right: 1, hasHeader: 1
 *    "Sheet1!A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
 *    "Sheet1!B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
 *
 * @param xc the string reference to convert
 *
 */
declare function toUnboundedZone(xc: string): UnboundedZone;
/**
 * Convert from a cartesian reference to a Zone.
 * Will return throw an error if given a unbounded zone (eg : A:A).
 *
 * Examples:
 *    "A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
 *    "B1:B3" ==> Top 0, Bottom 2, Left: 1, Right: 1
 *    "Sheet1!A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
 *    "Sheet1!B1:B3" ==> Top 0, Bottom 2, Left: 1, Right: 1
 *
 * @param xc the string reference to convert
 *
 */
declare function toZone(xc: string): Zone;
/**
 * Expand a zone after inserting columns or rows.
 *
 * Don't resize the zone if a col/row was added right before/after the row but only move the zone.
 */
declare function expandZoneOnInsertion<Z extends UnboundedZone | Zone>(zone: Z, start: "left" | "top", base: number, position: "after" | "before", quantity: number): Z;
/**
 * Reduce a zone after deletion of elements
 */
declare function reduceZoneOnDeletion<Z extends UnboundedZone | Zone>(zone: Z, start: "left" | "top", elements: number[]): Z | undefined;
/**
 * Compute the union of multiple zones.
 */
declare function union(...zones: Zone[]): Zone;
/**
 * Return true if two zones overlap, false otherwise.
 */
declare function overlap(z1: Zone, z2: Zone): boolean;
declare function isInside(col: number, row: number, zone: Zone): boolean;
/**
 * This function will compare the modifications of selection to determine
 * a cell that is part of the new zone and not the previous one.
 */
declare function findCellInNewZone(oldZone: Zone, currentZone: Zone): Position$1;
declare function positionToZone(position: Position$1): Zone;
/**
 * Merge contiguous and overlapping zones that are in the array into bigger zones
 */
declare function mergeContiguousZones(zones: Zone[]): Zone[];

type SelectionEventOptions = {
    scrollIntoView?: boolean;
    unbounded?: boolean;
};
interface SelectionEvent {
    anchor: AnchorZone;
    previousAnchor: AnchorZone;
    mode: "newAnchor" | "overrideSelection" | "updateAnchor";
    options: SelectionEventOptions;
}

interface StreamCallbacks<Event> {
    handleEvent: (event: Event) => void;
    /** this callback will only be called when another consumer captures the stream,
     * not when the current consumer decides to release itself */
    release?: () => void;
}

type StatefulStream<Event, State> = {
    capture(owner: unknown, state: State, callbacks: StreamCallbacks<Event>): void;
    registerAsDefault: (owner: unknown, state: State, callbacks: StreamCallbacks<Event>) => void;
    resetDefaultAnchor: (owner: unknown, state: State) => void;
    resetAnchor: (owner: unknown, state: State) => void;
    observe: (owner: unknown, callbacks: StreamCallbacks<Event>) => void;
    detachObserver: (owner: unknown) => void;
    release: (owner: unknown) => void;
    getBackToDefault(): void;
};
/**
 * Allows to select cells in the grid and update the selection
 */
interface SelectionProcessor {
    selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
    selectCell(col: number, row: number): DispatchResult;
    moveAnchorCell(direction: Direction$1, step: SelectionStep): DispatchResult;
    setAnchorCorner(col: number, row: number): DispatchResult;
    addCellToSelection(col: number, row: number): DispatchResult;
    resizeAnchorZone(direction: Direction$1, step: SelectionStep): DispatchResult;
    selectColumn(index: number, mode: SelectionEvent["mode"]): DispatchResult;
    selectRow(index: number, mode: SelectionEvent["mode"]): DispatchResult;
    selectAll(): DispatchResult;
    loopSelection(): DispatchResult;
    selectTableAroundSelection(): DispatchResult;
    isListening(owner: unknown): boolean;
}
type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;

type FilePath = string;
/**
 * FileStore manage the transfer of file with the server.
 */
interface FileStore {
    /**
     * Upload a file to a server and returns its path.
     */
    upload(file: File): Promise<FilePath>;
    /**
     * Delete a file from the server
     */
    delete(filePath: FilePath): Promise<void>;
}
/**
 * ImageProvider can request the user to input an image file before sending it to a server.
 */
interface ImageProviderInterface {
    /**
     * RequestImage ask the user to input an image file. Then send it to a server trough an FileStore. Finally it return the path and the size of the image in the server.
     */
    requestImage(): Promise<Image$1>;
    getImageOriginalSize(path: string): Promise<FigureSize>;
}

/**
 * Model
 *
 * The Model class is the owner of the state of the Spreadsheet. However, it
 * has more a coordination role: it defers the actual state manipulation work to
 * plugins.
 *
 * At creation, the Model instantiates all necessary plugins. They each have
 * a private state (for example, the Selection plugin has the current selection).
 *
 * State changes are then performed through commands.  Commands are dispatched
 * to the model, which will then relay them to each plugins (and the history
 * handler). Then, the model will trigger an 'update' event to notify whoever
 * is concerned that the command was applied (if it was not cancelled).
 *
 * Also, the model has an unconventional responsibility: it actually renders the
 * visible viewport on a canvas. This is because each plugins actually manage a
 * specific concern about the content of the spreadsheet, and it is more natural
 * if they are able to read data from their internal state to represent it on the
 * screen.
 *
 * Note that the Model can be used in a standalone way to manipulate
 * programmatically a spreadsheet.
 */
type Mode = "normal" | "readonly" | "dashboard";
interface ModelConfig {
    readonly mode: Mode;
    /**
     * Any external custom dependencies your custom plugins or functions might need.
     * They are available in plugins config and functions
     * evaluation context.
     */
    readonly custom: Readonly<{
        [key: string]: any;
    }>;
    readonly defaultCurrency?: Partial<Currency>;
    /**
     * External dependencies required to enable some features
     * such as uploading images.
     */
    readonly external: Readonly<ModelExternalConfig>;
    readonly moveClient: (position: ClientPosition) => void;
    readonly transportService: TransportService;
    readonly client: Client;
    readonly snapshotRequested: boolean;
    readonly notifyUI: (payload: InformationNotification) => void;
    readonly raiseBlockingErrorUI: (text: string) => void;
    readonly customColors: Color[];
}
interface ModelExternalConfig {
    readonly fileStore?: FileStore;
    readonly loadCurrencies?: () => Promise<Currency[]>;
    readonly loadLocales?: () => Promise<Locale[]>;
    readonly geoJsonService?: {
        getAvailableRegions: () => GeoChartRegion[];
        getTopoJson: (region: string) => Promise<any>;
        /**  Convert the name of a geographical feature (eg. France) to the id of the corresponding feature in the TopoJSON */
        geoFeatureNameToId: (region: string, territory: string) => string | undefined;
    };
}
declare class Model extends EventBus<any> implements CommandDispatcher {
    private corePlugins;
    private statefulUIPlugins;
    private range;
    private session;
    /**
     * In a collaborative context, some commands can be replayed, we have to ensure
     * that these commands are not replayed on the UI plugins.
     */
    private isReplayingCommand;
    /**
     * A plugin can draw some contents on the canvas. But even better: it can do
     * so multiple times.  The order of the render calls will determine a list of
     * "layers" (i.e., earlier calls will be obviously drawn below later calls).
     * This list simply keeps the renderers+layer information so the drawing code
     * can just iterate on it
     */
    private renderers;
    /**
     * Internal status of the model. Important for command handling coordination
     */
    private status;
    /**
     * The config object contains some configuration flag and callbacks
     */
    readonly config: ModelConfig;
    private corePluginConfig;
    private coreViewPluginConfig;
    private uiPluginConfig;
    private state;
    readonly selection: SelectionStreamProcessor;
    /**
     * Getters are the main way the rest of the UI read data from the model. Also,
     * it is shared between all plugins, so they can also communicate with each
     * other.
     */
    getters: Getters;
    /**
     * Getters that are accessible from the core plugins. It's a subset of `getters`,
     * without the UI getters
     */
    private coreGetters;
    uuidGenerator: UuidGenerator;
    private readonly handlers;
    private readonly uiHandlers;
    private readonly coreHandlers;
    constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], uuidGenerator?: UuidGenerator, verboseImport?: boolean);
    joinSession(): void;
    leaveSession(): Promise<void>;
    private setupUiPlugin;
    private setupCoreViewPlugin;
    /**
     * Initialize and properly configure a plugin.
     *
     * This method is private for now, but if the need arise, there is no deep
     * reason why the model could not add dynamically a plugin while it is running.
     */
    private setupCorePlugin;
    private onRemoteRevisionReceived;
    private setupSession;
    private setupSessionEvents;
    private setupConfig;
    private setupExternalConfig;
    private setupCorePluginConfig;
    private setupCoreViewPluginConfig;
    private setupUiPluginConfig;
    /**
     * Check if the given command is allowed by all the plugins and the history.
     */
    private checkDispatchAllowed;
    private checkDispatchAllowedCoreCommand;
    private checkDispatchAllowedLocalCommand;
    private finalize;
    /**
     * Check if a command can be dispatched, and returns a DispatchResult object with the possible
     * reasons the dispatch failed.
     */
    canDispatch: CommandDispatcher["dispatch"];
    /**
     * The dispatch method is the only entry point to manipulate data in the model.
     * This is through this method that commands are dispatched most of the time
     * recursively until no plugin want to react anymore.
     *
     * CoreCommands dispatched from this function are saved in the history.
     *
     * Small technical detail: it is defined as an arrow function.  There are two
     * reasons for this:
     * 1. this means that the dispatch method can be "detached" from the model,
     *    which is done when it is put in the environment (see the Spreadsheet
     *    component)
     * 2. This allows us to define its type by using the interface CommandDispatcher
     */
    dispatch: CommandDispatcher["dispatch"];
    /**
     * Dispatch a command from a Core Plugin (or the History).
     * A command dispatched from this function is not added to the history.
     */
    private dispatchFromCorePlugin;
    /**
     * Dispatch the given command to the given handlers.
     * It will call `beforeHandle` and `handle`
     */
    private dispatchToHandlers;
    /**
     * When the Grid component is ready (= mounted), it has a reference to its
     * canvas and need to draw the grid on it.  This is then done by calling this
     * method, which will dispatch the call to all registered plugins.
     *
     * Note that nothing prevent multiple grid components from calling this method
     * each, or one grid component calling it multiple times with a different
     * context. This is probably the way we should do if we want to be able to
     * freeze a part of the grid (so, we would need to render different zones)
     */
    drawLayer(context: GridRenderingContext, layer: LayerName): void;
    /**
     * As the name of this method strongly implies, it is useful when we need to
     * export date out of the model.
     */
    exportData(): WorkbookData;
    updateMode(mode: Mode): void;
    /**
     * Exports the current model data into a list of serialized XML files
     * to be zipped together as an *.xlsx file.
     *
     * We need to trigger a cell revaluation  on every sheet and ensure that even
     * async functions are evaluated.
     * This prove to be necessary if the client did not trigger that evaluation in the first place
     * (e.g. open a document with several sheet and click on download before visiting each sheet)
     */
    exportXLSX(): XLSXExport;
    garbageCollectExternalResources(): void;
}

type HistoryPath = [any, ...(number | string)[]];
declare class StateObserver {
    private changes;
    private commands;
    /**
     * Record the changes which could happen in the given callback, save them in a
     * new revision with the given id and userId.
     */
    recordChanges(callback: () => void): {
        changes: HistoryChange[];
        commands: CoreCommand[];
    };
    addCommand(command: CoreCommand): void;
    addChange(...args: [...HistoryPath, any]): void;
}

interface Validator {
    /**
     * Combine multiple validation functions into a single function
     * returning the list of result of every validation.
     */
    batchValidations<T>(...validations: Validation<T>[]): Validation<T>;
    /**
     * Combine multiple validation functions. Every validation is executed one after
     * the other. As soon as one validation fails, it stops and the cancelled reason
     * is returned.
     */
    chainValidations<T>(...validations: Validation<T>[]): Validation<T>;
    checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
}

/**
 * BasePlugin
 *
 * Since the spreadsheet internal state is quite complex, it is split into
 * multiple parts, each managing a specific concern.
 *
 * This file introduce the BasePlugin, which is the common class that defines
 * how each of these model sub parts should interact with each other.
 * There are two kind of plugins: core plugins handling persistent data
 * and UI plugins handling transient data.
 */
declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Validator {
    static getters: readonly string[];
    protected history: WorkbookHistory<State>;
    constructor(stateObserver: StateObserver);
    /**
     * Export for excel should be available for all plugins, even for the UI.
     * In some case, we need to export evaluated value, which is available from
     * UI plugin only.
     */
    exportForExcel(data: ExcelWorkbookData): void;
    /**
     * Before a command is accepted, the model will ask each plugin if the command
     * is allowed.  If all of then return true, then we can proceed. Otherwise,
     * the command is cancelled.
     *
     * There should not be any side effects in this method.
     */
    allowDispatch(command: C): CommandResult | CommandResult[];
    /**
     * This method is useful when a plugin need to perform some action before a
     * command is handled in another plugin. This should only be used if it is not
     * possible to do the work in the handle method.
     */
    beforeHandle(command: C): void;
    /**
     * This is the standard place to handle any command. Most of the plugin
     * command handling work should take place here.
     */
    handle(command: C): void;
    /**
     * Sometimes, it is useful to perform some work after a command (and all its
     * subcommands) has been completely handled.  For example, when we paste
     * multiple cells, we only want to reevaluate the cell values once at the end.
     */
    finalize(): void;
    /**
     * Combine multiple validation functions into a single function
     * returning the list of result of every validation.
     */
    batchValidations<T>(...validations: Validation<T>[]): Validation<T>;
    /**
     * Combine multiple validation functions. Every validation is executed one after
     * the other. As soon as one validation fails, it stops and the cancelled reason
     * is returned.
     */
    chainValidations<T>(...validations: Validation<T>[]): Validation<T>;
    checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
}

type UIActions = Pick<ModelConfig, "notifyUI" | "raiseBlockingErrorUI">;
interface UIPluginConfig {
    readonly getters: Getters;
    readonly stateObserver: StateObserver;
    readonly dispatch: CommandDispatcher["dispatch"];
    readonly canDispatch: CommandDispatcher["dispatch"];
    readonly selection: SelectionStreamProcessor;
    readonly moveClient: (position: ClientPosition) => void;
    readonly uiActions: UIActions;
    readonly custom: ModelConfig["custom"];
    readonly session: Session;
    readonly defaultCurrency?: Partial<Currency>;
    readonly customColors: Color[];
    readonly external: ModelConfig["external"];
}
interface UIPluginConstructor {
    new (config: UIPluginConfig): UIPlugin;
    layers: Readonly<LayerName[]>;
    getters: readonly string[];
}
/**
 * UI plugins handle any transient data required to display a spreadsheet.
 * They can draw on the grid canvas.
 */
declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
    static layers: Readonly<LayerName[]>;
    protected getters: Getters;
    protected ui: UIActions;
    protected selection: SelectionStreamProcessor;
    protected dispatch: CommandDispatcher["dispatch"];
    protected canDispatch: CommandDispatcher["dispatch"];
    constructor({ getters, stateObserver, dispatch, canDispatch, uiActions, selection, }: UIPluginConfig);
    drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
}

type MinimalClipboardData = {
    sheetId?: UID;
    cells?: ClipboardCell[][];
    zones?: Zone[];
    figureId?: UID;
    [key: string]: unknown;
};
interface SpreadsheetClipboardData extends MinimalClipboardData {
    version?: number;
    clipboardId?: string;
}
/**
 * Clipboard Plugin
 *
 * This clipboard manages all cut/copy/paste interactions internal to the
 * application, and with the OS clipboard as well.
 */
declare class ClipboardPlugin extends UIPlugin {
    static layers: readonly ["Clipboard"];
    static getters: readonly ["getClipboardContent", "getClipboardId", "getClipboardTextContent", "isCutOperation"];
    private status;
    private originSheetId?;
    private copiedData?;
    private _isCutOperation;
    private clipboardId;
    allowDispatch(cmd: LocalCommand): CommandResult;
    handle(cmd: Command): void;
    private convertTextToClipboardData;
    private selectClipboardHandlers;
    private isCutAllowedOn;
    private isPasteAllowed;
    private isColRowDirtyingClipboard;
    private copy;
    private paste;
    /**
     * Add columns and/or rows to ensure that col + width and row + height are still
     * in the sheet
     */
    private addMissingDimensions;
    /**
     * Format the current clipboard to a string suitable for being pasted in other
     * programs.
     *
     * - add a tab character between each consecutive cells
     * - add a newline character between each line
     *
     * Note that it returns \t if the clipboard is empty. This is necessary for the
     * clipboard copy event to add it as data, otherwise an empty string is not
     * considered as a copy content.
     */
    getClipboardTextContent(): string;
    getClipboardId(): string;
    getClipboardContent(): OSClipboardContent;
    private getSheetData;
    private getPlainTextContent;
    private getHTMLContent;
    isCutOperation(): boolean;
    private getDeleteCellsTargets;
    private getInsertCellsTargets;
    private getClipboardData;
    drawLayer(renderingContext: GridRenderingContext): void;
}

declare class FilterEvaluationPlugin extends UIPlugin {
    static getters: readonly ["getFilterHiddenValues", "getFirstTableInSelection", "isRowFiltered", "isFilterActive"];
    private filterValues;
    hiddenRows: Record<UID, Set<number> | undefined>;
    isEvaluationDirty: boolean;
    allowDispatch(cmd: LocalCommand): CommandResult;
    handle(cmd: Command): void;
    finalize(): void;
    isRowFiltered(sheetId: UID, row: number): boolean;
    getFilterHiddenValues(position: CellPosition): string[];
    isFilterActive(position: CellPosition): boolean;
    getFirstTableInSelection(): Table | undefined;
    private updateFilter;
    private updateHiddenRows;
    private getCellValueAsString;
    exportForExcel(data: ExcelWorkbookData): void;
    /**
     * Get an unique column name for the column at colIndex. If the column name is already in the array of used column names,
     * concatenate a number to the name until we find a new unique name (eg. "ColName" => "ColName1" => "ColName2" ...)
     */
    private getUniqueColNameForExcel;
}

/**
 * SelectionPlugin
 */
declare class GridSelectionPlugin extends UIPlugin {
    static layers: readonly ["Selection"];
    static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId", "isGridSelectionActive"];
    private gridSelection;
    private selectedFigureId;
    private sheetsData;
    private moveClient;
    activeSheet: Sheet;
    constructor(config: UIPluginConfig);
    allowDispatch(cmd: LocalCommand): CommandResult;
    private handleEvent;
    handle(cmd: Command): void;
    finalize(): void;
    isGridSelectionActive(): boolean;
    getActiveSheet(): Readonly<Sheet>;
    getActiveSheetId(): UID;
    tryGetActiveSheetId(): UID | undefined;
    getActiveCell(): EvaluatedCell;
    getActiveCols(): Set<number>;
    getActiveRows(): Set<number>;
    getCurrentStyle(): Style;
    getSelectedZones(): Zone[];
    getSelectedZone(): Zone;
    getSelection(): Selection;
    getSelectedCells(): EvaluatedCell[];
    getSelectedFigureId(): UID | null;
    getActivePosition(): CellPosition;
    getSheetPosition(sheetId: UID): CellPosition;
    isSingleColSelected(): boolean;
    /**
     * Returns a sorted array of indexes of all columns (respectively rows depending
     * on the dimension parameter) intersected by the currently selected zones.
     *
     * example:
     * assume selectedZones: [{left:0, right: 2, top :2, bottom: 4}, {left:5, right: 6, top :3, bottom: 5}]
     *
     * if dimension === "COL" => [0,1,2,5,6]
     * if dimension === "ROW" => [2,3,4,5]
     */
    getElementsFromSelection(dimension: Dimension): number[];
    private activateSheet;
    /**
     * Ensure selections are not outside sheet boundaries.
     * They are clipped to fit inside the sheet if needed.
     */
    private setSelectionMixin;
    /**
     * Change the anchor of the selection active cell to an absolute col and row index.
     *
     * This is a non trivial task. We need to stop the editing process and update
     * properly the current selection.  Also, this method can optionally create a new
     * range in the selection.
     */
    private selectCell;
    private setActiveSheet;
    private activateNextSheet;
    private onColumnsRemoved;
    private onRowsRemoved;
    private onAddElements;
    private onMoveElements;
    private isMoveElementAllowed;
    private fallbackToVisibleSheet;
    /**
     * Clip the selection if it spans outside the sheet
     */
    private clipSelection;
    drawLayer(renderingContext: GridRenderingContext): void;
}

declare class InternalViewport {
    private getters;
    private sheetId;
    private boundaries;
    top: HeaderIndex;
    bottom: HeaderIndex;
    left: HeaderIndex;
    right: HeaderIndex;
    offsetX: Pixel;
    offsetY: Pixel;
    canScrollVertically: boolean;
    canScrollHorizontally: boolean;
    viewportWidth: Pixel;
    viewportHeight: Pixel;
    offsetCorrectionX: Pixel;
    offsetCorrectionY: Pixel;
    constructor(getters: Getters, sheetId: UID, boundaries: Zone, sizeInGrid: DOMDimension, options: {
        canScrollVertically: boolean;
        canScrollHorizontally: boolean;
    }, offsets: DOMCoordinates);
    /** Returns the maximum size (in Pixels) of the viewport relative to its allocated client size
     * When the viewport grid size is smaller than its client width (resp. height), it will return
     * the client width (resp. height).
     */
    getMaxSize(): DOMDimension;
    /**
     * Return the index of a column given an offset x, based on the pane left
     * visible cell.
     * It returns -1 if no column is found.
     */
    getColIndex(x: Pixel): HeaderIndex;
    /**
     * Return the index of a row given an offset y, based on the pane top
     * visible cell.
     * It returns -1 if no row is found.
     */
    getRowIndex(y: Pixel): HeaderIndex;
    /**
     * This function will make sure that the provided cell position (or current selected position) is part of
     * the pane that is actually displayed on the client. We therefore adjust the offset of the pane
     * until it contains the cell completely.
     */
    adjustPosition(position: Position$1): void;
    private adjustPositionX;
    private adjustPositionY;
    willNewOffsetScrollViewport(offsetX: Pixel, offsetY: Pixel): boolean;
    setViewportOffset(offsetX: Pixel, offsetY: Pixel): void;
    adjustViewportZone(): void;
    /**
     *
     * Computes the visible coordinates & dimensions of a given zone inside the viewport
     *
     */
    getVisibleRect(zone: Zone): Rect | undefined;
    /**
     *
     * @returns Computes the absolute coordinates & dimensions of a given zone inside the viewport
     *
     */
    getFullRect(zone: Zone): Rect | undefined;
    isVisible(col: HeaderIndex, row: HeaderIndex): boolean;
    private searchHeaderIndex;
    private setViewportOffsetX;
    private setViewportOffsetY;
    /** Corrects the viewport's horizontal offset based on the current structure
     *  To make sure that at least one column is visible inside the viewport.
     */
    private adjustViewportOffsetX;
    /** Corrects the viewport's vertical offset based on the current structure
     *  To make sure that at least one row is visible inside the viewport.
     */
    private adjustViewportOffsetY;
    /** Updates the pane zone and snapped offset based on its horizontal
     * offset (will find Left) and its width (will find Right) */
    private adjustViewportZoneX;
    /** Updates the pane zone and snapped offset based on its vertical
     * offset (will find Top) and its width (will find Bottom) */
    private adjustViewportZoneY;
    /** represents the part of the header on the topLeft that could be partially
     * hidden due to the scroll
     * */
    private get snapCorrection();
}

/**
 *   EdgeScrollCases Schema
 *
 *  The dots/double dots represent a freeze (= a split of viewports)
 *  In this example, we froze vertically between columns D and E
 *  and horizontally between rows 4 and 5.
 *
 *  One can see that we scrolled horizontally from column E to G and
 *  vertically from row 5 to 7.
 *
 *     A  B  C  D   G  H  I  J  K  L  M  N  O  P  Q  R  S  T
 *     _______________________________________________________
 *  1 |           :                                           |
 *  2 |           :                                           |
 *  3 |           :        B   ↑                 6            |
 *  4 |           :        |   |                 |            |
 *     ····················+···+·················+············|
 *  7 |           :        |   |                 |            |
 *  8 |           :        ↓   2                 |            |
 *  9 |           :                              |            |
 * 10 |       A --+--→                           |            |
 * 11 |           :                              |            |
 * 12 |           :                              |            |
 * 13 |        ←--+-- 1                          |            |
 * 14 |           :                              |        3 --+--→
 * 15 |           :                              |            |
 * 16 |           :                              |            |
 * 17 |       5 --+-------------------------------------------+--→
 * 18 |           :                              |            |
 * 19 |           :                  4           |            |
 * 20 |           :                  |           |            |
 *     ______________________________+___________| ____________
 *                                   |           |
 *                                   ↓           ↓
 */
/**
 * Viewport plugin.
 *
 * This plugin manages all things related to all viewport states.
 *
 */
declare class SheetViewPlugin extends UIPlugin {
    static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect"];
    private viewports;
    /**
     * The viewport dimensions are usually set by one of the components
     * (i.e. when grid component is mounted) to properly reflect its state in the DOM.
     * In the absence of a component (standalone model), is it mandatory to set reasonable default values
     * to ensure the correct operation of this plugin.
     */
    private sheetViewWidth;
    private sheetViewHeight;
    private gridOffsetX;
    private gridOffsetY;
    private sheetsWithDirtyViewports;
    private shouldAdjustViewports;
    allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
    private handleEvent;
    handle(cmd: Command): void;
    finalize(): void;
    private setViewports;
    /**
     * Return the index of a column given an offset x, based on the viewport left
     * visible cell.
     * It returns -1 if no column is found.
     */
    getColIndex(x: Pixel): HeaderIndex;
    /**
     * Return the index of a row given an offset y, based on the viewport top
     * visible cell.
     * It returns -1 if no row is found.
     */
    getRowIndex(y: Pixel): HeaderIndex;
    getSheetViewDimensionWithHeaders(): DOMDimension;
    getSheetViewDimension(): DOMDimension;
    /** type as pane, not viewport but basically pane extends viewport */
    getActiveMainViewport(): Viewport;
    /**
     * Return the DOM scroll info of the active sheet, ie. the offset between the viewport left/top side and
     * the grid left/top side, corresponding to the scroll of the scrollbars and not snapped to the grid.
     */
    getActiveSheetScrollInfo(): SheetDOMScrollInfo;
    getSheetViewVisibleCols(): HeaderIndex[];
    getSheetViewVisibleRows(): HeaderIndex[];
    /**
     * Get the positions of all the cells that are visible in the viewport, taking merges into account.
     */
    getVisibleCellPositions(): CellPosition[];
    /**
     * Return the main viewport maximum size relative to the client size.
     */
    getMainViewportRect(): Rect;
    private getMaximumSheetOffset;
    getColRowOffsetInViewport(dimension: Dimension, referenceHeaderIndex: HeaderIndex, targetHeaderIndex: HeaderIndex): Pixel;
    /**
     * Check if a given position is visible in the viewport.
     */
    isVisibleInViewport({ sheetId, col, row }: CellPosition): boolean;
    getEdgeScrollCol(x: number, previousX: number, startingX: number): EdgeScrollInfo;
    getEdgeScrollRow(y: number, previousY: number, startingY: number): EdgeScrollInfo;
    /**
     * Computes the coordinates and size to draw the zone on the canvas
     */
    getVisibleRect(zone: Zone): Rect;
    /**
     * Computes the coordinates and size to draw the zone without taking the grid offset into account
     */
    getVisibleRectWithoutHeaders(zone: Zone): Rect;
    /**
     * Computes the actual size and position (:Rect) of the zone on the canvas
     * regardless of the viewport dimensions.
     */
    getRect(zone: Zone): Rect;
    /**
     * Returns the position of the MainViewport relatively to the start of the grid (without headers)
     * It corresponds to the summed dimensions of the visible cols/rows (in x/y respectively)
     * situated before the pane divisions.
     */
    getMainViewportCoordinates(): DOMCoordinates;
    /**
     * Returns the size, start and end coordinates of a column relative to the left
     * column of the current viewport
     */
    getColDimensionsInViewport(sheetId: UID, col: HeaderIndex): HeaderDimensions;
    /**
     * Returns the size, start and end coordinates of a row relative to the top row
     * of the current viewport
     */
    getRowDimensionsInViewport(sheetId: UID, row: HeaderIndex): HeaderDimensions;
    getAllActiveViewportsZonesAndRect(): {
        zone: Zone;
        rect: Rect;
    }[];
    private ensureMainViewportExist;
    private getSubViewports;
    private checkPositiveDimension;
    private checkValuesAreDifferent;
    private checkScrollingDirection;
    private checkIfViewportsWillChange;
    private getMainViewport;
    private getMainInternalViewport;
    /** gets rid of deprecated sheetIds */
    private cleanViewports;
    private resizeSheetView;
    private recomputeViewports;
    private setSheetViewOffset;
    private getViewportOffset;
    private resetViewports;
    /**
     * Adjust the viewport such that the anchor position is visible
     */
    private refreshViewport;
    /**
     * Shift the viewport vertically and move the selection anchor
     * such that it remains at the same place relative to the
     * viewport top.
     */
    private shiftVertically;
    getVisibleFigures(): Figure[];
    isPixelPositionVisible(position: PixelPosition): boolean;
    getFrozenSheetViewRatio(sheetId: UID): {
        xRatio: number;
        yRatio: number;
    };
    mapViewportsToRect(sheetId: UID, rectCallBack: (viewport: InternalViewport) => Rect | undefined): Rect;
}

declare enum ClipboardMIMEType {
    PlainText = "text/plain",
    Html = "text/html"
}
type OSClipboardContent = {
    [type in ClipboardMIMEType]?: string;
};
type ParsedOSClipboardContent = {
    text?: string;
    data?: SpreadsheetClipboardData;
};
interface ClipboardOptions {
    isCutOperation: boolean;
    pasteOption?: ClipboardPasteOptions;
    selectTarget?: boolean;
}
type ClipboardPasteOptions = "onlyFormat" | "asValue";
type ClipboardOperation = "CUT" | "COPY";
type ClipboardCellData = {
    sheetId: UID;
    zones: Zone[];
    rowsIndexes: HeaderIndex[];
    columnsIndexes: HeaderIndex[];
    clippedZones: Zone[];
};
type ClipboardFigureData = {
    sheetId: UID;
    figureId: UID;
};
type ClipboardData = ClipboardCellData | ClipboardFigureData;
type ClipboardPasteTarget = {
    sheetId: UID;
    zones: Zone[];
    figureId?: UID;
};

/**
 * There are two kinds of commands: CoreCommands and LocalCommands
 *
 * - CoreCommands are commands that
 *   1. manipulate the imported/exported spreadsheet state
 *   2. are shared in collaborative environment
 *
 * - LocalCommands: every other command
 *   1. manipulate the local state
 *   2. can be converted into CoreCommands
 *   3. are not shared in collaborative environment
 *
 * For example, "RESIZE_COLUMNS_ROWS" is a CoreCommand. "AUTORESIZE_COLUMNS"
 * can be (locally) converted into a "RESIZE_COLUMNS_ROWS", and therefore, is not a
 * CoreCommand.
 *
 * CoreCommands should be "device agnostic". This means that they should
 * contain all the information necessary to perform their job. Local commands
 * can use inferred information from the local internal state, such as the
 * active sheet.
 */
interface SheetDependentCommand {
    sheetId: UID;
}
declare function isSheetDependent(cmd: CoreCommand): cmd is Extract<CoreCommand, SheetDependentCommand>;
interface HeadersDependentCommand {
    sheetId: UID;
    dimension: Dimension;
    elements: HeaderIndex[];
}
declare function isHeadersDependant(cmd: CoreCommand): cmd is Extract<CoreCommand, HeadersDependentCommand>;
interface TargetDependentCommand {
    sheetId: UID;
    target: Zone[];
}
declare function isTargetDependent(cmd: CoreCommand): cmd is Extract<CoreCommand, TargetDependentCommand>;
interface RangesDependentCommand {
    ranges: RangeData[];
}
declare function isRangeDependant(cmd: CoreCommand): cmd is Extract<CoreCommand, RangesDependentCommand>;
interface PositionDependentCommand {
    sheetId: UID;
    col: number;
    row: number;
}
declare function isPositionDependent(cmd: CoreCommand): cmd is Extract<CoreCommand, PositionDependentCommand>;
interface ZoneDependentCommand {
    sheetId: UID;
    zone: Zone;
}
declare function isZoneDependent(cmd: CoreCommand): cmd is Extract<CoreCommand, ZoneDependentCommand>;
declare const invalidateEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT">;
declare const invalidateChartEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT">;
declare const invalidateDependenciesCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT">;
declare const invalidateCFEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT">;
declare const invalidateBordersCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT">;
declare const readonlyAllowedCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT">;
declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT">;
declare function isCoreCommand(cmd: Command): cmd is CoreCommand;
declare function canExecuteInReadonly(cmd: Command): boolean;
interface UpdateCellCommand extends PositionDependentCommand {
    type: "UPDATE_CELL";
    content?: string;
    style?: Style | null;
    format?: Format;
}
/**
 * Move a cell to a given position or clear the position.
 */
interface UpdateCellPositionCommand extends PositionDependentCommand {
    type: "UPDATE_CELL_POSITION";
    cellId?: UID;
}
interface AddColumnsRowsCommand extends SheetDependentCommand {
    type: "ADD_COLUMNS_ROWS";
    dimension: Dimension;
    base: HeaderIndex;
    quantity: number;
    position: "before" | "after";
}
interface RemoveColumnsRowsCommand extends HeadersDependentCommand {
    type: "REMOVE_COLUMNS_ROWS";
    elements: HeaderIndex[];
}
interface MoveColumnsRowsCommand extends HeadersDependentCommand {
    type: "MOVE_COLUMNS_ROWS";
    base: HeaderIndex;
    elements: HeaderIndex[];
    position: "before" | "after";
}
interface ResizeColumnsRowsCommand extends HeadersDependentCommand {
    type: "RESIZE_COLUMNS_ROWS";
    elements: number[];
    size: number | null;
}
interface HideColumnsRowsCommand extends HeadersDependentCommand {
    type: "HIDE_COLUMNS_ROWS";
    elements: HeaderIndex[];
}
interface UnhideColumnsRowsCommand extends HeadersDependentCommand {
    type: "UNHIDE_COLUMNS_ROWS";
    elements: HeaderIndex[];
}
/**
 * Freeze a given number of columns on top of the sheet
 */
interface FreezeColumnsCommand extends SheetDependentCommand {
    type: "FREEZE_COLUMNS";
    /** number of columns frozen */
    quantity: number;
}
/**
 * Freeze a given number of rows on top of the sheet
 */
interface FreezeRowsCommand extends SheetDependentCommand {
    type: "FREEZE_ROWS";
    /** number of frozen rows */
    quantity: number;
}
interface UnfreezeColumnsRowsCommand {
    type: "UNFREEZE_COLUMNS_ROWS";
    sheetId: UID;
}
interface UnfreezeColumnsCommand {
    type: "UNFREEZE_COLUMNS";
    sheetId: UID;
}
interface UnfreezeRowsCommand {
    type: "UNFREEZE_ROWS";
    sheetId: UID;
}
interface SetGridLinesVisibilityCommand extends SheetDependentCommand {
    type: "SET_GRID_LINES_VISIBILITY";
    areGridLinesVisible: boolean;
}
interface AddMergeCommand extends TargetDependentCommand {
    type: "ADD_MERGE";
    force?: boolean;
}
interface RemoveMergeCommand extends TargetDependentCommand {
    type: "REMOVE_MERGE";
}
interface CreateSheetCommand extends SheetDependentCommand {
    type: "CREATE_SHEET";
    position: number;
    name?: string;
    cols?: number;
    rows?: number;
}
interface DeleteSheetCommand extends SheetDependentCommand {
    type: "DELETE_SHEET";
}
interface DuplicateSheetCommand extends SheetDependentCommand {
    type: "DUPLICATE_SHEET";
    sheetIdTo: UID;
}
interface MoveSheetCommand extends SheetDependentCommand {
    type: "MOVE_SHEET";
    delta: number;
}
interface RenameSheetCommand extends SheetDependentCommand {
    type: "RENAME_SHEET";
    name?: string;
}
interface ColorSheetCommand extends SheetDependentCommand {
    type: "COLOR_SHEET";
    color?: Color;
}
interface HideSheetCommand extends SheetDependentCommand {
    type: "HIDE_SHEET";
}
interface ShowSheetCommand extends SheetDependentCommand {
    type: "SHOW_SHEET";
}
/**
 * Command created in order to apply a translational movement for all references
 * to cells/ranges within a specific zone.
 * Command particularly useful during CUT / PATE.
 */
interface MoveRangeCommand extends PositionDependentCommand, TargetDependentCommand {
    type: "MOVE_RANGES";
    targetSheetId: string;
}
/**
 * todo: use id instead of a list. this is not safe to serialize and send to
 * another user
 */
interface AddConditionalFormatCommand extends SheetDependentCommand, RangesDependentCommand {
    type: "ADD_CONDITIONAL_FORMAT";
    cf: Omit<ConditionalFormat, "ranges">;
}
interface RemoveConditionalFormatCommand extends SheetDependentCommand {
    type: "REMOVE_CONDITIONAL_FORMAT";
    id: string;
}
interface MoveConditionalFormatCommand extends SheetDependentCommand {
    type: "CHANGE_CONDITIONAL_FORMAT_PRIORITY";
    cfId: UID;
    delta: number;
}
interface CreateFigureCommand extends SheetDependentCommand {
    type: "CREATE_FIGURE";
    figure: Figure;
}
interface UpdateFigureCommand extends Partial<Figure>, SheetDependentCommand {
    type: "UPDATE_FIGURE";
    id: UID;
}
interface DeleteFigureCommand extends SheetDependentCommand {
    type: "DELETE_FIGURE";
    id: UID;
}
interface CreateChartCommand extends SheetDependentCommand {
    type: "CREATE_CHART";
    id: UID;
    position?: DOMCoordinates;
    size?: FigureSize;
    definition: ChartDefinition;
}
interface UpdateChartCommand extends SheetDependentCommand {
    type: "UPDATE_CHART";
    id: UID;
    definition: ChartDefinition;
}
interface CreateImageOverCommand extends SheetDependentCommand {
    type: "CREATE_IMAGE";
    figureId: UID;
    position: DOMCoordinates;
    size: FigureSize;
    definition: Image$1;
}
interface CreateTableCommand extends RangesDependentCommand {
    type: "CREATE_TABLE";
    sheetId: UID;
    config: TableConfig;
    tableType: CoreTableType;
}
interface RemoveTableCommand extends TargetDependentCommand {
    type: "REMOVE_TABLE";
}
interface UpdateTableCommand {
    type: "UPDATE_TABLE";
    zone: Zone;
    sheetId: UID;
    newTableRange?: RangeData;
    tableType?: CoreTableType;
    config?: Partial<TableConfig>;
}
interface ResizeTableCommand {
    type: "RESIZE_TABLE";
    zone: Zone;
    sheetId: UID;
    newTableRange: RangeData;
    tableType?: CoreTableType;
}
interface AutofillTableCommand extends PositionDependentCommand {
    type: "AUTOFILL_TABLE_COLUMN";
    /** The row to start the autofill in. If undefined, it will autofill from the top of the table column */
    autofillRowStart?: number;
    /** The row to end the autofill in. If undefined, it will autofill to the bottom of the table column */
    autofillRowEnd?: number;
}
interface CreateTableStyleCommand {
    type: "CREATE_TABLE_STYLE";
    tableStyleId: string;
    tableStyleName: string;
    templateName: TableStyleTemplateName;
    primaryColor: Color;
}
interface RemoveTableStyleCommand {
    type: "REMOVE_TABLE_STYLE";
    tableStyleId: string;
}
interface UpdateFilterCommand extends PositionDependentCommand {
    type: "UPDATE_FILTER";
    hiddenValues: string[];
}
interface SetFormattingCommand extends TargetDependentCommand {
    type: "SET_FORMATTING";
    style?: Style;
    format?: Format;
}
interface SetZoneBordersCommand extends TargetDependentCommand {
    type: "SET_ZONE_BORDERS";
    border: BorderData;
}
interface SetBorderCommand extends PositionDependentCommand {
    type: "SET_BORDER";
    border: Border$1 | undefined;
}
interface ClearFormattingCommand extends TargetDependentCommand {
    type: "CLEAR_FORMATTING";
}
interface SetDecimalCommand extends TargetDependentCommand {
    type: "SET_DECIMAL";
    step: SetDecimalStep;
}
interface SetContextualFormatCommand extends TargetDependentCommand {
    type: "SET_FORMATTING_WITH_PIVOT";
    format: Format;
}
interface UpdateLocaleCommand {
    type: "UPDATE_LOCALE";
    locale: Locale;
}
interface AddPivotCommand {
    type: "ADD_PIVOT";
    pivotId: UID;
    pivot: PivotCoreDefinition;
}
interface UpdatePivotCommand {
    type: "UPDATE_PIVOT";
    pivotId: UID;
    pivot: PivotCoreDefinition;
}
interface InsertPivotCommand extends PositionDependentCommand {
    type: "INSERT_PIVOT";
    pivotId: UID;
    table: PivotTableData;
}
interface RenamePivotCommand {
    type: "RENAME_PIVOT";
    pivotId: UID;
    name: string;
}
interface RemovePivotCommand {
    type: "REMOVE_PIVOT";
    pivotId: UID;
}
interface DuplicatePivotCommand {
    type: "DUPLICATE_PIVOT";
    pivotId: UID;
    newPivotId: string;
    duplicatedPivotName?: string;
}
interface RemoveDuplicatesCommand {
    type: "REMOVE_DUPLICATES";
    columns: HeaderIndex[];
    hasHeader: boolean;
}
interface TrimWhitespaceCommand {
    type: "TRIM_WHITESPACE";
}
interface GroupHeadersCommand extends SheetDependentCommand {
    type: "GROUP_HEADERS";
    dimension: Dimension;
    start: HeaderIndex;
    end: HeaderIndex;
}
interface UnGroupHeadersCommand extends SheetDependentCommand {
    type: "UNGROUP_HEADERS";
    dimension: Dimension;
    start: HeaderIndex;
    end: HeaderIndex;
}
interface FoldHeaderGroupCommand extends SheetDependentCommand {
    type: "FOLD_HEADER_GROUP";
    dimension: Dimension;
    start: HeaderIndex;
    end: HeaderIndex;
}
interface UnfoldHeaderGroupCommand extends SheetDependentCommand {
    type: "UNFOLD_HEADER_GROUP";
    dimension: Dimension;
    start: HeaderIndex;
    end: HeaderIndex;
}
interface FoldAllHeaderGroupsCommand extends SheetDependentCommand {
    type: "FOLD_ALL_HEADER_GROUPS";
    dimension: Dimension;
}
interface UnfoldAllHeaderGroupsCommand extends SheetDependentCommand {
    type: "UNFOLD_ALL_HEADER_GROUPS";
    dimension: Dimension;
}
interface UnfoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
    type: "UNFOLD_HEADER_GROUPS_IN_ZONE";
    dimension: Dimension;
}
interface FoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
    type: "FOLD_HEADER_GROUPS_IN_ZONE";
    dimension: Dimension;
}
interface AddDataValidationCommand extends SheetDependentCommand, RangesDependentCommand {
    type: "ADD_DATA_VALIDATION_RULE";
    rule: Omit<DataValidationRule, "ranges">;
}
interface RemoveDataValidationCommand extends SheetDependentCommand {
    type: "REMOVE_DATA_VALIDATION_RULE";
    id: string;
}
interface CopyCommand {
    type: "COPY";
}
interface CutCommand {
    type: "CUT";
}
interface PasteCommand {
    type: "PASTE";
    target: Zone[];
    pasteOption?: ClipboardPasteOptions;
}
interface CopyPasteCellsAboveCommand {
    type: "COPY_PASTE_CELLS_ABOVE";
}
interface CopyPasteCellsOnLeftCommand {
    type: "COPY_PASTE_CELLS_ON_LEFT";
}
interface RepeatPasteCommand {
    type: "REPEAT_PASTE";
    target: Zone[];
    pasteOption?: ClipboardPasteOptions;
}
interface CleanClipBoardHighlightCommand {
    type: "CLEAN_CLIPBOARD_HIGHLIGHT";
}
interface AutoFillCellCommand {
    type: "AUTOFILL_CELL";
    originCol: number;
    originRow: number;
    col: HeaderIndex;
    row: HeaderIndex;
    content?: string;
    style?: Style | null;
    border?: Border$1;
    format?: Format;
}
interface PasteFromOSClipboardCommand {
    type: "PASTE_FROM_OS_CLIPBOARD";
    target: Zone[];
    clipboardContent: ParsedOSClipboardContent;
    pasteOption?: ClipboardPasteOptions;
}
interface AutoresizeColumnsCommand {
    type: "AUTORESIZE_COLUMNS";
    sheetId: UID;
    cols: HeaderIndex[];
}
interface AutoresizeRowsCommand {
    type: "AUTORESIZE_ROWS";
    sheetId: UID;
    rows: HeaderIndex[];
}
interface ActivateSheetCommand {
    type: "ACTIVATE_SHEET";
    sheetIdFrom: UID;
    sheetIdTo: UID;
}
interface EvaluateCellsCommand {
    type: "EVALUATE_CELLS";
}
interface EvaluateChartsCommand {
    type: "EVALUATE_CHARTS";
}
interface StartChangeHighlightCommand {
    type: "START_CHANGE_HIGHLIGHT";
    zone: Zone;
}
interface ShowFormulaCommand {
    type: "SET_FORMULA_VISIBILITY";
    show: boolean;
}
interface DeleteContentCommand {
    type: "DELETE_CONTENT";
    sheetId: UID;
    target: Zone[];
}
interface ClearCellCommand extends PositionDependentCommand {
    type: "CLEAR_CELL";
}
interface ClearCellsCommand extends TargetDependentCommand {
    type: "CLEAR_CELLS";
}
interface UndoCommand {
    type: "UNDO";
    commands: readonly CoreCommand[];
}
interface RedoCommand {
    type: "REDO";
    commands: readonly CoreCommand[];
}
interface RequestUndoCommand {
    type: "REQUEST_UNDO";
}
interface RequestRedoCommand {
    type: "REQUEST_REDO";
}
interface StartCommand {
    type: "START";
}
interface AutofillCommand {
    type: "AUTOFILL";
}
interface AutofillSelectCommand {
    type: "AUTOFILL_SELECT";
    col: HeaderIndex;
    row: HeaderIndex;
}
interface AutofillAutoCommand {
    type: "AUTOFILL_AUTO";
}
interface SelectFigureCommand {
    type: "SELECT_FIGURE";
    id: UID | null;
}
interface ReplaceSearchCommand {
    type: "REPLACE_SEARCH";
    searchString: string;
    replaceWith: string;
    searchOptions: SearchOptions;
    matches: CellPosition[];
}
interface SortCommand {
    type: "SORT_CELLS";
    sheetId: UID;
    col: number;
    row: number;
    zone: Zone;
    sortDirection: SortDirection;
    sortOptions?: SortOptions;
}
interface ResizeViewportCommand {
    type: "RESIZE_SHEETVIEW";
    width: Pixel;
    height: Pixel;
    gridOffsetX?: Pixel;
    gridOffsetY?: Pixel;
}
interface SetViewportOffsetCommand {
    type: "SET_VIEWPORT_OFFSET";
    offsetX: Pixel;
    offsetY: Pixel;
}
/**
 * Shift the viewport down by the viewport height
 */
interface MoveViewportDownCommand {
    type: "SHIFT_VIEWPORT_DOWN";
}
/**
 * Shift the viewport up by the viewport height
 */
interface MoveViewportUpCommand {
    type: "SHIFT_VIEWPORT_UP";
}
interface MoveViewportToCellCommand {
    type: "SCROLL_TO_CELL";
    col: HeaderIndex;
    row: HeaderIndex;
}
/**
 * Sum data according to the selected zone(s) in the appropriated
 * cells.
 */
interface SumSelectionCommand {
    type: "SUM_SELECTION";
}
interface DeleteCellCommand {
    type: "DELETE_CELL";
    shiftDimension: Dimension;
    zone: Zone;
}
interface InsertCellCommand {
    type: "INSERT_CELL";
    shiftDimension: Dimension;
    zone: Zone;
}
interface ActivateNextSheetCommand {
    type: "ACTIVATE_NEXT_SHEET";
}
interface ActivatePreviousSheetCommand {
    type: "ACTIVATE_PREVIOUS_SHEET";
}
interface SplitTextIntoColumnsCommand {
    type: "SPLIT_TEXT_INTO_COLUMNS";
    separator: string;
    addNewColumns: boolean;
    force?: boolean;
}
interface RefreshPivotCommand {
    type: "REFRESH_PIVOT";
    id: UID;
}
interface InsertNewPivotCommand {
    type: "INSERT_NEW_PIVOT";
    pivotId: UID;
    newSheetId: UID;
}
interface DuplicatePivotInNewSheetCommand {
    type: "DUPLICATE_PIVOT_IN_NEW_SHEET";
    pivotId: UID;
    newPivotId: UID;
    newSheetId: UID;
}
interface InsertPivotWithTableCommand extends PositionDependentCommand {
    type: "INSERT_PIVOT_WITH_TABLE";
    pivotId: UID;
    table: PivotTableData;
    pivotMode: "static" | "dynamic";
}
interface SplitPivotFormulaCommand extends PositionDependentCommand {
    type: "SPLIT_PIVOT_FORMULA";
    pivotId: UID;
}
interface PaintFormat extends TargetDependentCommand {
    type: "PAINT_FORMAT";
}
type CoreCommand = 
/** CELLS */
UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | ClearCellsCommand | DeleteContentCommand
/** GRID SHAPE */
 | AddColumnsRowsCommand | RemoveColumnsRowsCommand | ResizeColumnsRowsCommand | HideColumnsRowsCommand | UnhideColumnsRowsCommand | SetGridLinesVisibilityCommand | FreezeColumnsCommand | FreezeRowsCommand | UnfreezeColumnsRowsCommand | UnfreezeColumnsCommand | UnfreezeRowsCommand
/** MERGE */
 | AddMergeCommand | RemoveMergeCommand
/** SHEETS MANIPULATION */
 | CreateSheetCommand | DeleteSheetCommand | DuplicateSheetCommand | MoveSheetCommand | RenameSheetCommand | ColorSheetCommand | HideSheetCommand | ShowSheetCommand
/** RANGES MANIPULATION */
 | MoveRangeCommand
/** CONDITIONAL FORMAT */
 | AddConditionalFormatCommand | RemoveConditionalFormatCommand | MoveConditionalFormatCommand
/** FIGURES */
 | CreateFigureCommand | DeleteFigureCommand | UpdateFigureCommand
/** FORMATTING */
 | SetFormattingCommand | ClearFormattingCommand | SetZoneBordersCommand | SetBorderCommand
/** CHART */
 | CreateChartCommand | UpdateChartCommand
/** IMAGE */
 | CreateImageOverCommand
/** FILTERS */
 | CreateTableCommand | RemoveTableCommand | UpdateTableCommand | CreateTableStyleCommand | RemoveTableStyleCommand
/** HEADER GROUP */
 | GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
/** DATA VALIDATION */
 | AddDataValidationCommand | RemoveDataValidationCommand
/** MISC */
 | UpdateLocaleCommand
/** PIVOT */
 | AddPivotCommand | UpdatePivotCommand | InsertPivotCommand | RenamePivotCommand | RemovePivotCommand | DuplicatePivotCommand;
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | EvaluateChartsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | SetContextualFormatCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand | DuplicatePivotInNewSheetCommand | InsertPivotWithTableCommand | SplitPivotFormulaCommand | PaintFormat;
type Command = CoreCommand | LocalCommand;
/**
 * Holds the result of a command dispatch.
 * The command may have been successfully dispatched or cancelled
 * for one or more reasons.
 */
declare class DispatchResult {
    readonly reasons: CancelledReason[];
    constructor(results?: CommandResult | CommandResult[]);
    /**
     * Static helper which returns a successful DispatchResult
     */
    static get Success(): DispatchResult;
    get isSuccessful(): boolean;
    /**
     * Check if the dispatch has been cancelled because of
     * the given reason.
     */
    isCancelledBecause(reason: CancelledReason): boolean;
}
type CancelledReason = Exclude<CommandResult, CommandResult.Success>;
declare const enum CommandResult {
    Success = "Success",
    CancelledForUnknownReason = "CancelledForUnknownReason",
    WillRemoveExistingMerge = "WillRemoveExistingMerge",
    MergeIsDestructive = "MergeIsDestructive",
    CellIsMerged = "CellIsMerged",
    InvalidTarget = "InvalidTarget",
    EmptyUndoStack = "EmptyUndoStack",
    EmptyRedoStack = "EmptyRedoStack",
    NotEnoughElements = "NotEnoughElements",
    NotEnoughSheets = "NotEnoughSheets",
    MissingSheetName = "MissingSheetName",
    UnchangedSheetName = "UnchangedSheetName",
    DuplicatedSheetName = "DuplicatedSheetName",
    DuplicatedSheetId = "DuplicatedSheetId",
    ForbiddenCharactersInSheetName = "ForbiddenCharactersInSheetName",
    WrongSheetMove = "WrongSheetMove",
    WrongSheetPosition = "WrongSheetPosition",
    InvalidAnchorZone = "InvalidAnchorZone",
    SelectionOutOfBound = "SelectionOutOfBound",
    TargetOutOfSheet = "TargetOutOfSheet",
    WrongCutSelection = "WrongCutSelection",
    WrongPasteSelection = "WrongPasteSelection",
    WrongPasteOption = "WrongPasteOption",
    WrongFigurePasteOption = "WrongFigurePasteOption",
    EmptyClipboard = "EmptyClipboard",
    EmptyRange = "EmptyRange",
    InvalidRange = "InvalidRange",
    InvalidZones = "InvalidZones",
    InvalidSheetId = "InvalidSheetId",
    InvalidCellId = "InvalidCellId",
    InvalidFigureId = "InvalidFigureId",
    InputAlreadyFocused = "InputAlreadyFocused",
    MaximumRangesReached = "MaximumRangesReached",
    MinimumRangesReached = "MinimumRangesReached",
    InvalidChartDefinition = "InvalidChartDefinition",
    InvalidDataSet = "InvalidDataSet",
    InvalidLabelRange = "InvalidLabelRange",
    InvalidScorecardKeyValue = "InvalidScorecardKeyValue",
    InvalidScorecardBaseline = "InvalidScorecardBaseline",
    InvalidGaugeDataRange = "InvalidGaugeDataRange",
    EmptyGaugeRangeMin = "EmptyGaugeRangeMin",
    GaugeRangeMinNaN = "GaugeRangeMinNaN",
    EmptyGaugeRangeMax = "EmptyGaugeRangeMax",
    GaugeRangeMaxNaN = "GaugeRangeMaxNaN",
    GaugeLowerInflectionPointNaN = "GaugeLowerInflectionPointNaN",
    GaugeUpperInflectionPointNaN = "GaugeUpperInflectionPointNaN",
    InvalidAutofillSelection = "InvalidAutofillSelection",
    MinBiggerThanMax = "MinBiggerThanMax",
    LowerBiggerThanUpper = "LowerBiggerThanUpper",
    MidBiggerThanMax = "MidBiggerThanMax",
    MinBiggerThanMid = "MinBiggerThanMid",
    FirstArgMissing = "FirstArgMissing",
    SecondArgMissing = "SecondArgMissing",
    MinNaN = "MinNaN",
    MidNaN = "MidNaN",
    MaxNaN = "MaxNaN",
    ValueUpperInflectionNaN = "ValueUpperInflectionNaN",
    ValueLowerInflectionNaN = "ValueLowerInflectionNaN",
    MinInvalidFormula = "MinInvalidFormula",
    MidInvalidFormula = "MidInvalidFormula",
    MaxInvalidFormula = "MaxInvalidFormula",
    ValueUpperInvalidFormula = "ValueUpperInvalidFormula",
    ValueLowerInvalidFormula = "ValueLowerInvalidFormula",
    InvalidSortAnchor = "InvalidSortAnchor",
    InvalidSortZone = "InvalidSortZone",
    SortZoneWithArrayFormulas = "SortZoneWithArrayFormulas",
    WaitingSessionConfirmation = "WaitingSessionConfirmation",
    MergeOverlap = "MergeOverlap",
    TooManyHiddenElements = "TooManyHiddenElements",
    Readonly = "Readonly",
    InvalidViewportSize = "InvalidViewportSize",
    InvalidScrollingDirection = "InvalidScrollingDirection",
    ViewportScrollLimitsReached = "ViewportScrollLimitsReached",
    FigureDoesNotExist = "FigureDoesNotExist",
    InvalidConditionalFormatId = "InvalidConditionalFormatId",
    InvalidCellPopover = "InvalidCellPopover",
    EmptyTarget = "EmptyTarget",
    InvalidFreezeQuantity = "InvalidFreezeQuantity",
    FrozenPaneOverlap = "FrozenPaneOverlap",
    ValuesNotChanged = "ValuesNotChanged",
    InvalidFilterZone = "InvalidFilterZone",
    TableNotFound = "TableNotFound",
    TableOverlap = "TableOverlap",
    InvalidTableConfig = "InvalidTableConfig",
    InvalidTableStyle = "InvalidTableStyle",
    FilterNotFound = "FilterNotFound",
    MergeInTable = "MergeInTable",
    NonContinuousTargets = "NonContinuousTargets",
    DuplicatedFigureId = "DuplicatedFigureId",
    InvalidSelectionStep = "InvalidSelectionStep",
    DuplicatedChartId = "DuplicatedChartId",
    ChartDoesNotExist = "ChartDoesNotExist",
    InvalidHeaderIndex = "InvalidHeaderIndex",
    InvalidQuantity = "InvalidQuantity",
    MoreThanOneColumnSelected = "MoreThanOneColumnSelected",
    EmptySplitSeparator = "EmptySplitSeparator",
    SplitWillOverwriteContent = "SplitWillOverwriteContent",
    NoSplitSeparatorInSelection = "NoSplitSeparatorInSelection",
    NoActiveSheet = "NoActiveSheet",
    InvalidLocale = "InvalidLocale",
    MoreThanOneRangeSelected = "MoreThanOneRangeSelected",
    NoColumnsProvided = "NoColumnsProvided",
    ColumnsNotIncludedInZone = "ColumnsNotIncludedInZone",
    DuplicatesColumnsSelected = "DuplicatesColumnsSelected",
    InvalidHeaderGroupStartEnd = "InvalidHeaderGroupStartEnd",
    HeaderGroupAlreadyExists = "HeaderGroupAlreadyExists",
    UnknownHeaderGroup = "UnknownHeaderGroup",
    UnknownDataValidationRule = "UnknownDataValidationRule",
    UnknownDataValidationCriterionType = "UnknownDataValidationCriterionType",
    InvalidDataValidationCriterionValue = "InvalidDataValidationCriterionValue",
    InvalidNumberOfCriterionValues = "InvalidNumberOfCriterionValues",
    InvalidCopyPasteSelection = "InvalidCopyPasteSelection",
    NoChanges = "NoChanges",
    InvalidInputId = "InvalidInputId",
    SheetIsHidden = "SheetIsHidden",
    InvalidTableResize = "InvalidTableResize",
    PivotIdNotFound = "PivotIdNotFound",
    PivotInError = "PivotInError",
    EmptyName = "EmptyName",
    ValueCellIsInvalidFormula = "ValueCellIsInvalidFormula",
    InvalidDefinition = "InvalidDefinition",
    InvalidColor = "InvalidColor"
}
interface CommandHandler<T> {
    allowDispatch(command: T): CommandResult | CommandResult[];
    beforeHandle(command: T): void;
    handle(command: T): void;
    finalize(): void;
}
interface CommandDispatcher {
    dispatch<T extends CommandTypes, C extends Extract<Command, {
        type: T;
    }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
    dispatch<T extends CommandTypes, C extends Extract<Command, {
        type: T;
    }>>(type: T, r: Omit<C, "type">): DispatchResult;
}
interface CoreCommandDispatcher {
    dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
        type: T;
    }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
    dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
        type: T;
    }>>(type: T, r: Omit<C, "type">): DispatchResult;
}
type CommandTypes = Command["type"];
type CoreCommandTypes = CoreCommand["type"];
type CoreViewCommand = CoreCommand | EvaluateCellsCommand | EvaluateChartsCommand | UndoCommand | RedoCommand;
type CoreViewCommandTypes = CoreViewCommand["type"];

declare const functionCache: {
    [key: string]: FormulaToExecute;
};
declare function compile(formula: string): CompiledFormula;
declare function compileTokens(tokens: Token[]): CompiledFormula;

type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "SYMBOL" | "SPACE" | "DEBUGGER" | "ARG_SEPARATOR" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
interface Token {
    readonly type: TokenType;
    readonly value: string;
}
declare function tokenize(str: string, locale?: Locale): Token[];

interface ASTBase {
    debug?: boolean;
}
interface ASTNumber extends ASTBase {
    type: "NUMBER";
    value: number;
}
interface ASTReference extends ASTBase {
    type: "REFERENCE";
    value: string;
}
interface ASTString extends ASTBase {
    type: "STRING";
    value: string;
}
interface ASTBoolean extends ASTBase {
    type: "BOOLEAN";
    value: boolean;
}
interface ASTUnaryOperation extends ASTBase {
    type: "UNARY_OPERATION";
    value: any;
    operand: AST;
    postfix?: boolean;
}
interface ASTOperation extends ASTBase {
    type: "BIN_OPERATION";
    value: any;
    left: AST;
    right: AST;
}
interface ASTFuncall extends ASTBase {
    type: "FUNCALL";
    value: string;
    args: AST[];
}
interface ASTSymbol extends ASTBase {
    type: "SYMBOL";
    value: string;
}
interface ASTEmpty extends ASTBase {
    type: "EMPTY";
    value: "";
}
type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTSymbol | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTEmpty;
/**
 * Parse an expression (as a string) into an AST.
 */
declare function parse(str: string): AST;
declare function parseTokens(tokens: Token[]): AST;
/**
 * Allows to visit all nodes of an AST and apply a mapping function
 * to nodes of a specific type.
 * Useful if you want to convert some part of a formula.
 *
 * @example
 * convertAstNodes(ast, "FUNCALL", convertFormulaToExcel)
 *
 * function convertFormulaToExcel(ast: ASTFuncall) {
 *   // ...
 *   return modifiedAst
 * }
 */
declare function convertAstNodes<T extends AST["type"]>(ast: AST, type: T, fn: (ast: Extract<AST, {
    type: T;
}>) => AST): AST;
declare function iterateAstNodes(ast: AST): AST[];
/**
 * Converts an ast formula to the corresponding string
 */
declare function astToFormula(ast: AST): string;

declare function getFunctionsFromTokens(tokens: Token[], functionNames: string[]): {
    functionName: string;
    args: AST[];
}[];

/**
 * The following type is meant to be used in union with other aliases to prevent
 * Intellisense from resolving it.
 * See https://github.com/microsoft/TypeScript/issues/31940#issuecomment-841712377
 */
type Alias = {} & {};
type HeaderIndex = number & Alias;
type Pixel = number & Alias;
type UID = string & Alias;
type SetDecimalStep = 1 | -1;
type FilterId = UID & Alias;
type TableId = UID & Alias;
/**
 * CSS style color string
 * e.g. "#ABC", "#AAAFFF", "rgb(30, 80, 16)"
 */
type Color = string & Alias;
interface RGBA {
    a: number;
    r: number;
    g: number;
    b: number;
}
interface HSLA {
    a: number;
    h: number;
    s: number;
    l: number;
}
interface Link {
    readonly label: string;
    readonly url: string;
    readonly isExternal: boolean;
    /**
     * Specifies if the URL is editable by the end user.
     * Special links might not allow it.
     */
    readonly isUrlEditable: boolean;
}
interface Zone {
    left: HeaderIndex;
    right: HeaderIndex;
    top: HeaderIndex;
    bottom: HeaderIndex;
}
interface AnchorZone {
    zone: Zone;
    cell: Position$1;
}
interface Selection {
    anchor: AnchorZone;
    zones: Zone[];
}
interface UnboundedZone {
    top: HeaderIndex;
    bottom: HeaderIndex | undefined;
    left: HeaderIndex;
    right: HeaderIndex | undefined;
    /**
     * The hasHeader flag is used to determine if the zone has a header (eg. A2:A or C3:3).
     *
     * The main issue is that the zone A1:A and A:A have different behavior. The "correct" way to handle this would be to
     * allow the top/left to be undefined, but this make typing and using unbounded zones VERY annoying. So we use this
     * boolean instead.
     */
    hasHeader?: boolean;
}
interface ZoneDimension {
    numberOfRows: HeaderIndex;
    numberOfCols: HeaderIndex;
}
type Align = "left" | "right" | "center" | undefined;
type VerticalAlign = "top" | "middle" | "bottom" | undefined;
type Wrapping = "overflow" | "wrap" | "clip" | undefined;
interface Style {
    bold?: boolean;
    italic?: boolean;
    strikethrough?: boolean;
    underline?: boolean;
    align?: Align;
    wrapping?: Wrapping;
    verticalAlign?: VerticalAlign;
    fillColor?: Color;
    textColor?: Color;
    fontSize?: number;
}
interface DataBarFill {
    color: Color;
    percentage: number;
}
interface UpdateCellData {
    content?: string;
    formula?: string;
    style?: Style | null;
    format?: Format;
}
interface Sheet {
    id: UID;
    name: string;
    numberOfCols: number;
    rows: Row[];
    areGridLinesVisible: boolean;
    isVisible: boolean;
    panes: PaneDivision;
    color?: Color;
}
interface CellPosition {
    col: HeaderIndex;
    row: HeaderIndex;
    sheetId: UID;
}
declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
type BorderStyle = (typeof borderStyles)[number];
type BorderDescr = {
    style: BorderStyle;
    color: Color;
};
/**
 * A complete border(s) data is a set of position-color-style information
 */
type BorderData = {
    position: BorderPosition;
    color?: Color;
    style?: BorderStyle;
};
interface Border$1 {
    top?: BorderDescr;
    left?: BorderDescr;
    bottom?: BorderDescr;
    right?: BorderDescr;
}
type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => FunctionResultObject;
type EnsureRange = (range: Range) => Matrix<FunctionResultObject>;
type GetSymbolValue = (symbolName: string) => Arg;
type FormulaToExecute = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, getSymbolValue: GetSymbolValue, ctx: {}) => Matrix<FunctionResultObject> | FunctionResultObject;
interface CompiledFormula {
    execute: FormulaToExecute;
    tokens: Token[];
    dependencies: string[];
    isBadExpression: boolean;
    normalizedFormula: string;
}
interface RangeCompiledFormula extends Omit<CompiledFormula, "dependencies"> {
    dependencies: Range[];
}
type Matrix<T = unknown> = T[][];
type FunctionResultObject = {
    value: CellValue;
    format?: Format;
    errorOriginPosition?: CellPosition;
    message?: string;
};
type FunctionResultNumber = {
    value: number;
    format?: string;
};
type Arg = Maybe<FunctionResultObject> | Matrix<FunctionResultObject>;
declare function isMatrix(x: any): x is Matrix<any>;
interface ClipboardCell {
    evaluatedCell: EvaluatedCell;
    position: CellPosition;
    content: string;
    style?: Style | undefined;
    format?: Format | undefined;
    tokens?: Token[];
    border?: Border$1;
}
interface HeaderDimensions {
    start: Pixel;
    size: Pixel;
    end: Pixel;
}
interface Row {
    cells: Record<number, UID | undefined>;
}
interface Position$1 {
    col: HeaderIndex;
    row: HeaderIndex;
}
interface PixelPosition {
    x: Pixel;
    y: Pixel;
}
interface Merge extends Zone {
    id: number;
}
interface Highlight$1 {
    zone: Zone;
    sheetId: UID;
    color: Color;
    interactive?: boolean;
    thinLine?: boolean;
    noFill?: boolean;
    /** transparency of the fill color (0-1) */
    fillAlpha?: number;
    noBorder?: boolean;
    dashed?: boolean;
}
interface PaneDivision {
    /** Represents the number of frozen columns */
    xSplit: number;
    /** Represents the number of frozen rows */
    ySplit: number;
}
type BorderPosition = "all" | "hv" | "h" | "v" | "external" | "left" | "top" | "right" | "bottom" | "clear";
declare const enum DIRECTION {
    UP = "up",
    DOWN = "down",
    LEFT = "left",
    RIGHT = "right"
}
type ChangeType = "REMOVE" | "RESIZE" | "MOVE" | "CHANGE" | "NONE";
type ApplyRangeChangeResult = {
    changeType: Exclude<ChangeType, "NONE">;
    range: Range;
} | {
    changeType: "NONE";
};
type ApplyRangeChange = (range: Range) => ApplyRangeChangeResult;
type Dimension = "COL" | "ROW";
type ConsecutiveIndexes = HeaderIndex[];
interface RangeProvider {
    adaptRanges: (applyChange: ApplyRangeChange, sheetId?: UID) => void;
}
type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
type Increment = 1 | -1 | 0;
interface Ref<T> {
    el: T | null;
}
/**
 * Return the prop's type of a component
 */
type PropsOf<C> = C extends ComponentConstructor<infer Props> ? Props : never;
/**
 * Container for a lazy computed value
 */
interface Lazy<T> {
    /**
     * Return the computed value.
     * The value is computed only once and memoized.
     */
    (): T;
    /**
     * Map a lazy value to another lazy value.
     *
     * ```ts
     * // neither function is called here
     * const lazyValue = lazy(() => veryExpensive(...)).map((result) => alsoVeryExpensive(result));
     *
     * // both values are computed now
     * const value = lazyValue()
     * ```
     */
    map: <U>(callback: (value: T) => U) => Lazy<U>;
}
type Maybe<T> = T | undefined;
interface Cloneable<T> {
    clone: (args?: Partial<T>) => T;
}
type CSSProperties<P extends string = string> = Record<P, string | undefined>;
interface SortOptions {
    /** If true sort the headers of the range along with the rest */
    sortHeaders?: boolean;
    /** If true treat empty cells as "0" instead of undefined */
    emptyCellAsZero?: boolean;
}
interface MenuMouseEvent extends MouseEvent {
    closedMenuId?: UID;
}
type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;
type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
type ImmutableMap<K, V> = ReadonlyMap<Immutable<K>, Immutable<V>>;
type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
type ImmutableObject<T> = {
    readonly [K in keyof T]: Immutable<T[K]>;
};
interface HeaderGroup {
    start: HeaderIndex;
    end: HeaderIndex;
    isFolded?: boolean;
}
type Direction$1 = "up" | "down" | "left" | "right";
type SelectionStep = number | "end";
interface Offset {
    col: number;
    row: number;
}
type DebouncedFunction<T> = T & {
    stopDebounce: () => void;
    isDebouncePending: () => boolean;
};
interface GridClickModifiers {
    addZone: boolean;
    expandZone: boolean;
}
type ComposerFocusType = "inactive" | "cellFocus" | "contentFocus";
type EditionMode = "editing" | "selecting" | "inactive";
type SortDirection = "asc" | "desc";

type LocaleCode = string & Alias;
interface Locale {
    name: string;
    code: LocaleCode;
    thousandsSeparator?: string;
    decimalSeparator: string;
    weekStart: number;
    dateFormat: string;
    timeFormat: string;
    formulaArgSeparator: string;
}
declare const DEFAULT_LOCALES: Locale[];
declare const DEFAULT_LOCALE: Locale;

type Format = string & Alias;
type FormattedValue = string & Alias;
interface LocaleFormat {
    locale: Locale;
    format?: Format;
}

interface CellAttributes {
    readonly id: UID;
    /**
     * Raw cell content
     */
    readonly content: string;
    readonly style?: Style;
    readonly format?: Format;
}
interface LiteralCell extends CellAttributes {
    readonly isFormula: false;
    readonly parsedValue: CellValue;
}
interface FormulaCell extends CellAttributes {
    readonly isFormula: true;
    readonly compiledFormula: RangeCompiledFormula;
}
type Cell = LiteralCell | FormulaCell;
interface EvaluatedCellProperties extends FunctionResultObject {
    readonly format?: Format;
    /**
     * Cell value formatted based on the format
     */
    readonly formattedValue: FormattedValue;
    readonly defaultAlign: "right" | "center" | "left";
    /**
     * Can the cell appear in an automatic sum zone.
     */
    readonly isAutoSummable: boolean;
    readonly link?: Link;
}
type CellValue = string | number | boolean | null;
type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
interface NumberCell extends EvaluatedCellProperties {
    readonly type: CellValueType.number;
    readonly value: number;
}
interface TextCell extends EvaluatedCellProperties {
    readonly type: CellValueType.text;
    readonly value: string;
}
interface BooleanCell extends EvaluatedCellProperties {
    readonly type: CellValueType.boolean;
    readonly value: boolean;
}
interface EmptyCell extends EvaluatedCellProperties {
    readonly type: CellValueType.empty;
    readonly value: null;
}
interface ErrorCell extends EvaluatedCellProperties {
    readonly type: CellValueType.error;
    readonly value: string;
    readonly message?: string;
}
declare enum CellValueType {
    boolean = "boolean",
    number = "number",
    text = "text",
    empty = "empty",
    error = "error"
}

/**
 * An AutofillModifier describe the possible operations to apply to the
 * content of a cell when we autofill this cell.
 *
 * It could be:
 *  - Increment: increment the content by a given step
 *  - Copy: simply copy the content
 *  - Formula: update the formula, with the same behavior than paste
 */

interface IncrementModifier {
    type: "INCREMENT_MODIFIER";
    increment: number;
    current: number;
}
interface AlphanumericIncrementModifier {
    type: "ALPHANUMERIC_INCREMENT_MODIFIER";
    increment: number;
    current: number;
    prefix: string;
    numberPostfixLength: number;
}
interface DateIncrementModifier {
    type: "DATE_INCREMENT_MODIFIER";
    current: number;
    increment: {
        years: number;
        months: number;
        days: number;
    };
}
interface CopyModifier {
    type: "COPY_MODIFIER";
}
interface FormulaModifier {
    type: "FORMULA_MODIFIER";
    increment: number;
    current: number;
}
type AutofillModifier = IncrementModifier | AlphanumericIncrementModifier | CopyModifier | FormulaModifier | DateIncrementModifier;
interface Tooltip {
    props: any;
    component?: any;
}
interface AutofillCellData extends UpdateCellData {
    border?: Border$1;
}
interface AutofillData {
    cell?: Cell;
    col: number;
    row: number;
    sheetId: UID;
    border?: Border$1;
}
interface AutofillResult {
    cellData: AutofillCellData;
    tooltip?: Tooltip;
    origin: {
        col: number;
        row: number;
    };
}
interface GeneratorCell {
    data: AutofillData;
    rule: AutofillModifier;
}
interface AutofillModifierImplementation {
    apply: (rule: AutofillModifier, data: AutofillData, getters: Getters, direction: DIRECTION) => Omit<AutofillResult, "origin">;
}

interface RevisionData {
    readonly id: UID;
    readonly clientId: ClientId;
    readonly commands: readonly CoreCommand[];
}

interface Currency {
    name: string;
    code: string;
    symbol: string;
    decimalPlaces: number;
    position: "before" | "after";
}

interface DataValidationRule {
    id: UID;
    criterion: DataValidationCriterion;
    ranges: Range[];
    isBlocking?: boolean;
}
type TextContainsCriterion = {
    type: "textContains";
    values: string[];
};
type TextNotContainsCriterion = {
    type: "textNotContains";
    values: string[];
};
type TextIsCriterion = {
    type: "textIs";
    values: string[];
};
type TextIsEmailCriterion = {
    type: "textIsEmail";
    values: string[];
};
type TextIsLinkCriterion = {
    type: "textIsLink";
    values: string[];
};
type DateIsCriterion = {
    type: "dateIs";
    dateValue: DateCriterionValue;
    values: string[];
};
type DateIsBeforeCriterion = {
    type: "dateIsBefore";
    dateValue: DateCriterionValue;
    values: string[];
};
type DateIsOnOrBeforeCriterion = {
    type: "dateIsOnOrBefore";
    dateValue: DateCriterionValue;
    values: string[];
};
type DateIsAfterCriterion = {
    type: "dateIsAfter";
    dateValue: DateCriterionValue;
    values: string[];
};
type DateIsOnOrAfterCriterion = {
    type: "dateIsOnOrAfter";
    dateValue: DateCriterionValue;
    values: string[];
};
type DateIsBetweenCriterion = {
    type: "dateIsBetween";
    values: string[];
};
type DateIsNotBetweenCriterion = {
    type: "dateIsNotBetween";
    values: string[];
};
type DateIsValidCriterion = {
    type: "dateIsValid";
    values: string[];
};
type IsEqualCriterion = {
    type: "isEqual";
    values: string[];
};
type IsNotEqualCriterion = {
    type: "isNotEqual";
    values: string[];
};
type IsGreaterThanCriterion = {
    type: "isGreaterThan";
    values: string[];
};
type IsGreaterOrEqualToCriterion = {
    type: "isGreaterOrEqualTo";
    values: string[];
};
type IsLessThanCriterion = {
    type: "isLessThan";
    values: string[];
};
type IsLessOrEqualToCriterion = {
    type: "isLessOrEqualTo";
    values: string[];
};
type IsBetweenCriterion = {
    type: "isBetween";
    values: string[];
};
type IsNotBetweenCriterion = {
    type: "isNotBetween";
    values: string[];
};
type IsCheckboxCriterion = {
    type: "isBoolean";
    values: string[];
};
type IsValueInListCriterion = {
    type: "isValueInList";
    values: string[];
    displayStyle: "arrow" | "plainText";
};
type IsValueInRangeCriterion = {
    type: "isValueInRange";
    values: string[];
    displayStyle: "arrow" | "plainText";
};
type CustomFormulaCriterion = {
    type: "customFormula";
    values: string[];
};
type DataValidationCriterion = TextContainsCriterion | TextNotContainsCriterion | TextIsCriterion | TextIsEmailCriterion | TextIsLinkCriterion | IsBetweenCriterion | DateIsCriterion | DateIsBeforeCriterion | DateIsOnOrBeforeCriterion | DateIsAfterCriterion | DateIsOnOrAfterCriterion | DateIsBetweenCriterion | DateIsNotBetweenCriterion | DateIsValidCriterion | IsEqualCriterion | IsNotEqualCriterion | IsGreaterThanCriterion | IsGreaterOrEqualToCriterion | IsLessThanCriterion | IsLessOrEqualToCriterion | IsNotBetweenCriterion | IsCheckboxCriterion | IsValueInListCriterion | IsValueInRangeCriterion | CustomFormulaCriterion;
type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
type DataValidationCriterionType = DataValidationCriterion["type"];
type DataValidationDateCriterion = Extract<DataValidationCriterion, {
    dateValue: DateCriterionValue;
}>;

type ClipboardReadResult = {
    status: "ok";
    content: OSClipboardContent;
} | {
    status: "permissionDenied" | "notImplemented";
};
interface ClipboardInterface {
    write(clipboardContent: OSClipboardContent): Promise<void>;
    writeText(text: string): Promise<void>;
    read(): Promise<ClipboardReadResult>;
}

/**
 * An injectable store constructor
 */
interface StoreConstructor<T = any, A extends unknown[] = any[]> {
    new (get: Get, ...args: A): T;
}
/**
 * A store constructor for a store that implements the Disposable interface.
 * Useful for local stores that need to be disposed when the component unmounts.
 */
interface LocalStoreConstructor<T extends Disposable = any, A extends unknown[] = unknown[]> {
    new (get: Get, ...args: A): T;
}
interface Disposable {
    dispose(): void;
}
type StoreParams<T extends StoreConstructor> = SkipFirst<ConstructorParameters<T>>;
/**
 * A function used to inject dependencies in a store constructor
 */
type Get = <T extends StoreConstructor>(Store: T) => T extends StoreConstructor<infer I> ? Store<I> : never;
/**
 * Remove the first element of a tuple
 * @example
 * type A = SkipFirst<[number, string, boolean]> // [string, boolean]
 */
type SkipFirst<T extends any[]> = T extends [any, ...infer U] ? U : never;
type OmitFunctions<T> = {
    [K in keyof T as T[K] extends Function ? never : K]: T[K];
};
type Store<S> = S extends {
    mutators: readonly (keyof S)[];
} ? CQS<Pick<S, S["mutators"][number]> & OmitFunctions<S>> : CQS<OmitFunctions<S>>;
/**
 * Command Query Separation [1,2] implementation with types.
 *
 * Mapped type applying CQS principles to an object by forcing
 * - methods (commands) to never return anything, effectively making them write-only,
 * - all properties (queries) to be read-only [3]
 *
 * [1] https://martinfowler.com/bliki/CommandQuerySeparation.html
 * [2] https://en.wikipedia.org/wiki/Command%E2%80%93query_separation
 * [3] in an ideal world, they would be deeply read-only, but that's not possible natively in TypeScript
 */
type CQS<T> = {
    readonly [key in keyof T]: NeverReturns<T[key]>;
};
/**
 * Force any function to never return anything, effectively
 * making it write-only.
 */
type NeverReturns<T> = T extends (...args: any[]) => any ? (...args: Parameters<T>) => void : T;
declare class DisposableStore implements Disposable {
    protected get: Get;
    private disposeCallbacks;
    constructor(get: Get);
    protected onDispose(callback: () => void): void;
    dispose(): void;
}

interface StoreUpdateEvent {
    type: "store-updated";
}
/**
 * A type-safe dependency container
 */
declare class DependencyContainer extends EventBus<StoreUpdateEvent> {
    private dependencies;
    private factory;
    /**
     * Injects a store instance in the dependency container.
     * Useful for injecting an external store that is not created by the container.
     * Also useful for mocking a store.
     */
    inject<T extends StoreConstructor>(Store: T, instance: InstanceType<T>): void;
    /**
     * Get an instance of a store.
     */
    get<T>(Store: StoreConstructor<T>): T;
    instantiate<T>(Store: StoreConstructor<T>, ...args: StoreParams<StoreConstructor<T>>): T;
    resetStores(): void;
}

/**
 * This hook should be used at the root of your app to provide the store container.
 */
declare function useStoreProvider(): DependencyContainer;
/**
 * Get the instance of a store.
 */
declare function useStore<T extends StoreConstructor>(Store: T): Store<InstanceType<T>>;
declare function useLocalStore<T extends LocalStoreConstructor<any>>(Store: T, ...args: StoreParams<T> extends never ? [] : StoreParams<T>): Store<InstanceType<T>>;

interface NotificationStoreMethods {
    notifyUser: (notification: InformationNotification) => void;
    raiseError: (text: string, callback?: () => void) => void;
    askConfirmation: (content: string, confirm: () => void, cancel?: () => void) => void;
}
declare class NotificationStore {
    mutators: readonly ["notifyUser", "raiseError", "askConfirmation", "updateNotificationCallbacks"];
    notifyUser: NotificationStoreMethods["notifyUser"];
    askConfirmation: NotificationStoreMethods["askConfirmation"];
    raiseError: NotificationStoreMethods["raiseError"];
    updateNotificationCallbacks(methods: Partial<NotificationStoreMethods>): void;
}

interface EditTextOptions {
    error?: string;
    placeholder?: string;
}
type NotificationType = "danger" | "info" | "success" | "warning";
interface InformationNotification {
    text: string;
    type: NotificationType;
    sticky: boolean;
}
interface SpreadsheetChildEnv extends NotificationStoreMethods {
    model: Model;
    imageProvider?: ImageProviderInterface;
    isDashboard: () => boolean;
    openSidePanel: (panel: string, panelProps?: any) => void;
    toggleSidePanel: (panel: string, panelProps?: any) => void;
    clipboard: ClipboardInterface;
    startCellEdition: (content?: string) => void;
    loadCurrencies?: () => Promise<Currency[]>;
    loadLocales: () => Promise<Locale[]>;
    getStore: Get;
}

interface RangeStringOptions {
    useBoundedReference?: boolean;
    useFixedReference?: boolean;
}
declare class RangeAdapter implements CommandHandler<CoreCommand> {
    private getters;
    private providers;
    constructor(getters: CoreGetters);
    static getters: readonly ["adaptFormulaStringDependencies", "copyFormulaStringForSheet", "extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "recomputeRanges", "isRangeValid", "removeRangesSheetPrefix"];
    allowDispatch(cmd: Command): CommandResult;
    beforeHandle(command: Command): void;
    handle(cmd: Command): void;
    finalize(): void;
    /**
     * Return a modified adapting function that verifies that after adapting a range, the range is still valid.
     * Any range that gets adapted by the function adaptRange in parameter does so
     * without caring if the start and end of the range in both row and column
     * direction can be incorrect. This function ensure that an incorrect range gets removed.
     */
    private verifyRangeRemoved;
    private createAdaptedRange;
    private executeOnAllRanges;
    /**
     * Stores the functions bound to each plugin to be able to iterate over all ranges of the application,
     * without knowing any details of the internal data structure of the plugins and without storing ranges
     * in the range adapter.
     *
     * @param provider a function bound to a plugin that will loop over its internal data structure to find
     * all ranges
     */
    addRangeProvider(provider: RangeProvider["adaptRanges"]): void;
    createAdaptedRanges(ranges: Range[], offsetX: number, offsetY: number, sheetId: UID): Range[];
    /**
     * Remove the sheet name prefix if a range is part of the given sheet.
     */
    removeRangesSheetPrefix(sheetId: UID, ranges: Range[]): Range[];
    extendRange(range: Range, dimension: Dimension, quantity: number): Range;
    /**
     * Creates a range from a XC reference that can contain a sheet reference
     * @param defaultSheetId the sheet to default to if the sheetXC parameter does not contain a sheet reference (usually the active sheet Id)
     * @param sheetXC the string description of a range, in the form SheetName!XC:XC
     */
    getRangeFromSheetXC(defaultSheetId: UID, sheetXC: string): RangeImpl;
    /**
     * Gets the string that represents the range as it is at the moment of the call.
     * The string will be prefixed with the sheet name if the call specified a sheet id in `forSheetId`
     * different than the sheet on which the range has been created.
     *
     * @param range the range (received from getRangeFromXC or getRangeFromZone)
     * @param forSheetId the id of the sheet where the range string is supposed to be used.
     * @param options
     * @param options.useBoundedReference if true, the range will be returned with bounded row and column
     * @param options.useFixedReference if true, the range will be returned with fixed row and column
     */
    getRangeString(range: Range, forSheetId: UID, options?: RangeStringOptions): string;
    getRangeDataFromXc(sheetId: UID, xc: string): RangeData;
    getRangeDataFromZone(sheetId: UID, zone: Zone | UnboundedZone): RangeData;
    getRangeFromZone(sheetId: UID, zone: Zone | UnboundedZone): Range;
    /**
     * Allows you to recompute ranges from the same sheet
     */
    recomputeRanges(ranges: Range[], rangesToRemove: Range[]): Range[];
    getRangeFromRangeData(data: RangeData): Range;
    isRangeValid(rangeStr: string): boolean;
    getRangesUnion(ranges: Range[]): Range;
    adaptFormulaStringDependencies(sheetId: UID, formula: string, applyChange: ApplyRangeChange): string;
    /**
     * Copy a formula string to another sheet.
     *
     * @param mode
     * `keepSameReference` will make the formula reference the exact same ranges,
     * `moveReference` will change all the references to `sheetIdFrom` into references to `sheetIdTo`.
     */
    copyFormulaStringForSheet(sheetIdFrom: UID, sheetIdTo: UID, formula: string, mode: "keepSameReference" | "moveReference"): string;
    /**
     * Get a Xc string that represent a part of a range
     */
    private getRangePartString;
    private getInvalidRange;
}

interface CorePluginConfig {
    readonly getters: CoreGetters;
    readonly stateObserver: StateObserver;
    readonly range: RangeAdapter;
    readonly dispatch: CoreCommandDispatcher["dispatch"];
    readonly canDispatch: CoreCommandDispatcher["dispatch"];
    readonly custom: ModelConfig["custom"];
    readonly external: ModelConfig["external"];
}
interface CorePluginConstructor {
    new (config: CorePluginConfig): CorePlugin;
    getters: readonly string[];
}
/**
 * Core plugins handle spreadsheet data.
 * They are responsible to import, export and maintain the spreadsheet
 * persisted state.
 * They should not be concerned about UI parts or transient state.
 */
declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider {
    protected getters: CoreGetters;
    protected dispatch: CoreCommandDispatcher["dispatch"];
    protected canDispatch: CoreCommandDispatcher["dispatch"];
    constructor({ getters, stateObserver, range, dispatch, canDispatch }: CorePluginConfig);
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    /**
     * This method can be implemented in any plugin, to loop over the plugin's data structure and adapt the plugin's ranges.
     * To adapt them, the implementation of the function must have a perfect knowledge of the data structure, thus
     * implementing the loops over it makes sense in the plugin itself.
     * When calling the method applyChange, the range will be adapted if necessary, then a copy will be returned along with
     * the type of change that occurred.
     *
     * @param applyChange a function that, when called, will adapt the range according to the change on the grid
     * @param sheetId an optional sheetId to adapt either range of that sheet specifically, or ranges pointing to that sheet
     */
    adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
    /**
     * Implement this method to clean unused external resources, such as images
     * stored on a server which have been deleted.
     */
    garbageCollectExternalResources(): void;
}

interface BordersPluginState {
    readonly borders: Record<UID, ((Border$1 | undefined)[] | undefined)[] | undefined>;
}
/**
 * Formatting plugin.
 *
 * This plugin manages all things related to a cell look:
 * - borders
 */
declare class BordersPlugin extends CorePlugin<BordersPluginState> implements BordersPluginState {
    static getters: readonly ["getCellBorder", "getBordersColors"];
    readonly borders: BordersPluginState["borders"];
    allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.NoChanges;
    handle(cmd: CoreCommand): void;
    /**
     * Move borders according to the inserted columns.
     * Ensure borders continuity.
     */
    private handleAddColumns;
    /**
     * Move borders according to the inserted rows.
     * Ensure borders continuity.
     */
    private handleAddRows;
    getCellBorder({ sheetId, col, row }: CellPosition): Border$1 | null;
    getBordersColors(sheetId: UID): Color[];
    /**
     * Ensure border continuity between two columns.
     * If the two columns have the same borders (at each row respectively),
     * the same borders are applied to each cell in between.
     */
    private ensureColumnBorderContinuity;
    /**
     * Ensure border continuity between two rows.
     * If the two rows have the same borders (at each column respectively),
     * the same borders are applied to each cell in between.
     */
    private ensureRowBorderContinuity;
    /**
     * From two borders, return a new border with sides defined in both borders.
     * i.e. the intersection of two borders.
     */
    private getCommonSides;
    /**
     * Get all the columns which contains at least a border
     */
    private getColumnsWithBorders;
    /**
     * Get all the rows which contains at least a border
     */
    private getRowsWithBorders;
    /**
     * Get the range of all the rows in the sheet
     */
    private getRowsRange;
    /**
     * Move borders of a sheet horizontally.
     * @param sheetId
     * @param start starting column (included)
     * @param delta how much borders will be moved (negative if moved to the left)
     */
    private shiftBordersHorizontally;
    /**
     * Move borders of a sheet vertically.
     * @param sheetId
     * @param start starting row (included)
     * @param delta how much borders will be moved (negative if moved to the above)
     */
    private shiftBordersVertically;
    /**
     * Moves the borders (left if `vertical` or top if `horizontal` depending on
     * `borderDirection`) of all cells in an entire row `delta` rows to the right
     * (`delta` > 0) or to the left (`delta` < 0).
     * Note that as the left of a cell is the right of the cell-1, if the left is
     * moved the right is also moved. However, if `horizontal`, the bottom border
     * is not moved.
     * It does it by replacing the target border by the moved border. If the
     * argument `destructive` is given false, the target border is preserved if
     * the moved border is empty
     */
    private moveBordersOfRow;
    /**
     * Moves the borders (left if `vertical` or top if `horizontal` depending on
     * `borderDirection`) of all cells in an entire column `delta` columns below
     * (`delta` > 0) or above (`delta` < 0).
     * Note that as the top of a cell is the bottom of the cell-1, if the top is
     * moved the bottom is also moved. However, if `vertical`, the right border
     * is not moved.
     * It does it by replacing the target border by the moved border. If the
     * argument `destructive` is given false, the target border is preserved if
     * the moved border is empty
     */
    private moveBordersOfColumn;
    /**
     * Set the borders of a cell.
     * It overrides the current border if override === true.
     */
    private setBorder;
    /**
     * Remove the borders of a zone
     */
    private clearBorders;
    /**
     * Remove the borders inside of a zone
     */
    private clearInsideBorders;
    /**
     * Add a border to the existing one to a cell
     */
    private addBorder;
    /**
     * Set the borders of a zone by computing the borders to add from the given
     * command
     */
    private setBorders;
    /**
     * Compute the borders to add to the given zone merged.
     */
    private addBordersToMerge;
    private checkBordersUnchanged;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
}

interface CoreState$1 {
    cells: Record<UID, Record<UID, Cell | undefined> | undefined>;
    nextId: number;
}
/**
 * Core Plugin
 *
 * This is the most fundamental of all plugins. It defines how to interact with
 * cell and sheet content.
 */
declare class CellPlugin extends CorePlugin<CoreState$1> implements CoreState$1 {
    static getters: readonly ["zoneToXC", "getCells", "getTranslatedCellFormula", "getCellStyle", "getCellById", "getFormulaString", "getFormulaMovedInSheet"];
    readonly nextId = 1;
    readonly cells: {
        [sheetId: string]: {
            [id: string]: Cell;
        };
    };
    adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
    allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    private clearZones;
    /**
     * Set a format to all the cells in a zone
     */
    private setFormatter;
    /**
     * Clear the styles and format of zones
     */
    private clearFormatting;
    /**
     * Clear the styles, the format and the content of zones
     */
    private clearCells;
    /**
     * Copy the style of the reference column/row to the new columns/rows.
     */
    private handleAddColumnsRows;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    importCell(sheetId: UID, content?: string, style?: Style, format?: Format): Cell;
    exportForExcel(data: ExcelWorkbookData): void;
    private removeDefaultStyleValues;
    getCells(sheetId: UID): Record<UID, Cell>;
    /**
     * get a cell by ID. Used in evaluation when evaluating an async cell, we need to be able to find it back after
     * starting an async evaluation even if it has been moved or re-allocated
     */
    getCellById(cellId: UID): Cell | undefined;
    getFormulaString(sheetId: UID, tokens: Token[], dependencies: Range[], useBoundedReference?: boolean): string;
    getTranslatedCellFormula(sheetId: UID, offsetX: number, offsetY: number, tokens: Token[]): string;
    getFormulaMovedInSheet(originSheetId: UID, targetSheetId: UID, tokens: Token[]): string;
    getCellStyle(position: CellPosition): Style;
    /**
     * Converts a zone to a XC coordinate system
     *
     * The conversion also treats merges as one single cell
     *
     * Examples:
     * {top:0,left:0,right:0,bottom:0} ==> A1
     * {top:0,left:0,right:1,bottom:1} ==> A1:B2
     *
     * if A1:B2 is a merge:
     * {top:0,left:0,right:1,bottom:1} ==> A1
     * {top:1,left:0,right:1,bottom:2} ==> A1:B3
     *
     * if A1:B2 and A4:B5 are merges:
     * {top:1,left:0,right:1,bottom:3} ==> A1:A5
     */
    zoneToXC(sheetId: UID, zone: Zone, fixedParts?: RangePart[]): string;
    private setStyle;
    /**
     * Copy the style of one column to other columns.
     */
    private copyColumnStyle;
    /**
     * Copy the style of one row to other rows.
     */
    private copyRowStyle;
    /**
     * gets the currently used style/border of a cell based on it's coordinates
     */
    private getFormat;
    private getNextUid;
    private updateCell;
    private createCell;
    private createLiteralCell;
    private createFormulaCell;
    /**
     * Create a new formula cell with the content
     * being a computed property to rebuild the dependencies XC.
     */
    private createFormulaCellWithDependencies;
    private checkCellOutOfSheet;
    private checkUselessClearCell;
    private checkUselessUpdateCell;
}

/**
 * AbstractChart is the class from which every Chart should inherit.
 * The role of this class is to maintain the state of each chart.
 */
declare abstract class AbstractChart {
    readonly sheetId: UID;
    readonly title: TitleDesign;
    abstract readonly type: ChartType;
    protected readonly getters: CoreGetters;
    constructor(definition: ChartDefinition, sheetId: UID, getters: CoreGetters);
    /**
     * Validate the chart definition given as arguments. This function will be
     * called from allowDispatch function
     */
    static validateChartDefinition(validator: Validator, definition: ChartDefinition): CommandResult | CommandResult[];
    /**
     * Get a new chart definition transformed with the executed command. This
     * functions will be called during operational transform process
     */
    static transformDefinition(definition: ChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): ChartDefinition;
    /**
     * Get an empty definition based on the given context
     */
    static getDefinitionFromContextCreation(context: ChartCreationContext): ChartDefinition;
    /**
     * Get the definition of the chart
     */
    abstract getDefinition(): ChartDefinition;
    /**
     * Get the definition of the chart that will be used for excel export.
     * If the chart is not supported by Excel, this function returns undefined.
     */
    abstract getDefinitionForExcel(): ExcelChartDefinition | undefined;
    /**
     * This function should be used to update all the ranges of the chart after
     * a grid change (add/remove col/row, rename sheet, ...)
     */
    abstract updateRanges(applyChange: ApplyRangeChange): AbstractChart;
    /**
     * Duplicate the chart when a sheet is duplicated.
     * The ranges that are in the same sheet as the chart are adapted to the new sheetId.
     */
    abstract duplicateInDuplicatedSheet(newSheetId: UID): AbstractChart;
    /**
     * Get a copy a the chart in the given sheetId.
     * The ranges of the chart will stay the same as the copied chart.
     */
    abstract copyInSheetId(sheetId: UID): AbstractChart;
    /**
     * Extract the ChartCreationContext of the chart
     */
    abstract getContextCreation(): ChartCreationContext;
}

/**
 * Chart plugin
 *
 * This plugin manages charts
 * */
interface ChartState {
    readonly charts: Record<UID, AbstractChart | undefined>;
}
declare class ChartPlugin extends CorePlugin<ChartState> implements ChartState {
    static getters: readonly ["isChartDefined", "getChartDefinition", "getChartType", "getChartIds", "getChart", "getContextCreationChart"];
    readonly charts: Record<UID, AbstractChart | undefined>;
    private createChart;
    private validateChartDefinition;
    adaptRanges(applyChange: ApplyRangeChange): void;
    allowDispatch(cmd: Command): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    getContextCreationChart(figureId: UID): ChartCreationContext | undefined;
    getChart(figureId: UID): AbstractChart | undefined;
    getChartType(figureId: UID): ChartType;
    isChartDefined(figureId: UID): boolean;
    getChartIds(sheetId: UID): string[];
    getChartDefinition(figureId: UID): ChartDefinition;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    /**
     * Add a figure with tag chart with the given id at the given position
     */
    private addFigure;
    /**
     * Add a chart in the local state. If a chart already exists, this chart is
     * replaced
     */
    private addChart;
    private checkChartDuplicate;
    private checkChartExists;
}

interface ConditionalFormatState {
    readonly cfRules: {
        [sheet: string]: ConditionalFormatInternal[];
    };
}
declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState> implements ConditionalFormatState {
    static getters: readonly ["getConditionalFormats", "getRulesSelection", "getRulesByCell", "getAdaptedCfRanges"];
    readonly cfRules: {
        [sheet: string]: ConditionalFormatInternal[];
    };
    loopThroughRangesOfSheet(sheetId: UID, applyChange: ApplyRangeChange): void;
    adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
    allowDispatch(cmd: Command): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    import(data: WorkbookData): void;
    export(data: Partial<WorkbookData>): void;
    exportForExcel(data: ExcelWorkbookData): void;
    /**
     * Returns all the conditional format rules defined for the current sheet to display the user
     */
    getConditionalFormats(sheetId: UID): ConditionalFormat[];
    getRulesSelection(sheetId: UID, selection: Zone[]): UID[];
    getRulesByZone(sheetId: UID, zone: Zone): Set<UID>;
    getRulesByCell(sheetId: UID, cellCol: number, cellRow: number): Set<ConditionalFormat>;
    /**
     * Add or remove cells to a given conditional formatting rule and return the adapted CF's XCs.
     */
    getAdaptedCfRanges(sheetId: UID, cf: ConditionalFormat, toAdd: Zone[], toRemove: Zone[]): RangeData[] | undefined;
    private mapToConditionalFormat;
    private mapToConditionalFormatInternal;
    /**
     * Add or replace a conditional format rule
     */
    private addConditionalFormatting;
    private checkValidPriorityChange;
    private checkEmptyRange;
    private checkCFRule;
    private checkCFHasChanged;
    private checkOperatorArgsNumber;
    private checkNaN;
    private checkFormulaCompilation;
    private checkThresholds;
    private checkInflectionPoints;
    private checkLowerBiggerThanUpper;
    private checkMinBiggerThanMax;
    private checkMidBiggerThanMax;
    private checkMinBiggerThanMid;
    private checkCFValues;
    private removeConditionalFormatting;
    private changeCFPriority;
}

interface DataValidationState {
    readonly rules: {
        [sheet: string]: DataValidationRule[];
    };
}
declare class DataValidationPlugin extends CorePlugin<DataValidationState> implements DataValidationState {
    static getters: readonly ["cellHasListDataValidationIcon", "getDataValidationRule", "getDataValidationRules", "getValidationRuleForCell"];
    readonly rules: {
        [sheet: string]: DataValidationRule[];
    };
    adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
    private loopThroughRangesOfSheet;
    allowDispatch(cmd: Command): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    getDataValidationRules(sheetId: UID): DataValidationRule[];
    getDataValidationRule(sheetId: UID, id: UID): DataValidationRule | undefined;
    getValidationRuleForCell({ sheetId, col, row }: CellPosition): DataValidationRule | undefined;
    cellHasListDataValidationIcon(cellPosition: CellPosition): boolean;
    private addDataValidationRule;
    private removeRangesFromRules;
    private removeDataValidationRule;
    private setCenterStyleToBooleanCells;
    private checkEmptyRange;
    import(data: WorkbookData): void;
    export(data: Partial<WorkbookData>): void;
    exportForExcel(data: ExcelWorkbookData): void;
    private checkCriterionTypeIsValid;
    private checkCriterionHasValidNumberOfValues;
    private checkCriterionValuesAreValid;
    private checkValidRange;
}

interface FigureState {
    readonly figures: {
        [sheet: string]: Record<UID, Figure | undefined> | undefined;
    };
    readonly insertionOrders: UID[];
}
declare class FigurePlugin extends CorePlugin<FigureState> implements FigureState {
    static getters: readonly ["getFigures", "getFigure", "getFigureSheetId"];
    readonly figures: {
        [sheet: string]: Record<UID, Figure | undefined> | undefined;
    };
    readonly insertionOrders: UID[];
    allowDispatch(cmd: CoreCommand): CommandResult;
    beforeHandle(cmd: CoreCommand): void;
    handle(cmd: CoreCommand): void;
    private onRowColDelete;
    private onRowDeletion;
    private onColDeletion;
    private updateFigure;
    private addFigure;
    private deleteSheet;
    private removeFigure;
    private checkFigureExists;
    private checkFigureDuplicate;
    getFigures(sheetId: UID): Figure[];
    getFigure(sheetId: string, figureId: string): Figure | undefined;
    getFigureSheetId(figureId: string): UID | undefined;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
}

interface State$9 {
    groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
}
declare class HeaderGroupingPlugin extends CorePlugin<State$9> {
    static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
    private readonly groups;
    allowDispatch(cmd: CoreCommand): CommandResult;
    handle(cmd: CoreCommand): void;
    getHeaderGroups(sheetId: UID, dim: Dimension): HeaderGroup[];
    getHeaderGroup(sheetId: UID, dim: Dimension, start: number, end: number): HeaderGroup | undefined;
    getHeaderGroupsInZone(sheetId: UID, dim: Dimension, zone: Zone): HeaderGroup[];
    /**
     * Get all the groups of a sheet in a dimension, and return an array of layers of those groups.
     *
     * The layering rules are:
     * 1) A group containing another group should be on a layer above the group it contains
     * 2) The widest/highest groups should be on the left/top layer compared to the groups it contains
     * 3) The group should be on the left/top-most layer possible, barring intersections with other groups (see rules 1 and 2)
     */
    getGroupsLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
    /**
     * Get all the groups of a sheet in a dimension, and return an array of layers of those groups,
     * excluding the groups that are totally hidden.
     */
    getVisibleGroupLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
    isGroupFolded(sheetId: UID, dimension: Dimension, start: number, end: number): boolean;
    isRowFolded(sheetId: UID, row: HeaderIndex): boolean;
    isColFolded(sheetId: UID, col: HeaderIndex): boolean;
    private getGroupId;
    /**
     * To get layers of groups, and to add/remove headers from groups, we can see each header of a group as a brick. Each
     * brick falls down in the pile corresponding to its header, until it hits another brick, or the ground.
     *
     * With this abstraction, we can very simply group/ungroup headers from groups, and get the layers of groups.
     * - grouping headers is done by adding a brick to each header pile
     * - un-grouping headers is done by removing a brick from each header pile
     * - getting the layers of groups is done by simply letting the brick fall and checking the result
     *
     * Example:
     * We have 2 groups ([A=>E] and [C=>D]), and we want to group headers [C=>F]
     *
     * Headers :                 A B C D E F G          A B C D E F G            A B C D E F G
     * Headers to group: [C=>D]:     _ _         [C=>F]:    _ _ _ _
     *                               | |           ==>      | | | |       ==>                    ==> Result: 3 groups
     *                               | |                    ˅ ˅ | |                  _ _                - [C=>D]
     * Groups:                       ˅ ˅                    _ _ ˅ |                  _ _ _              - [C=>E]
     * Groups:                   _ _ _ _ _              _ _ _ _ _ ˅              _ _ _ _ _ _            - [A=>F]
  
     * @param groups
     * @param start start of the range where to add/remove headers
     * @param end end of the range where to add/remove headers
     * @param delta -1: remove headers, 1: add headers, 0: get layers (don't add/remove anything)
     */
    private bricksFallingAlgorithm;
    private groupHeaders;
    /**
     * Ungroup the given headers. The headers will be taken out of the group they are in. This might split a group into two
     * if the headers were in the middle of a group. If multiple groups contains a header, it will only be taken out of the
     * lowest group in the layering of the groups.
     */
    private unGroupHeaders;
    private moveGroupsOnHeaderInsertion;
    private moveGroupsOnHeaderDeletion;
    private doGroupOverlap;
    private removeDuplicateGroups;
    private findGroupWithStartEnd;
    /**
     * Fold the given group, and all the groups starting at the same index that are contained inside the given group.
     */
    private foldHeaderGroup;
    /**
     * Unfold the given group, and all the groups starting at the same index that contain the given group.
     */
    private unfoldHeaderGroup;
    private getGroupIndex;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
}

interface HeaderSizeState$1 {
    sizes: Record<UID, Record<Dimension, Array<Pixel | undefined>>>;
}
declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState$1> implements HeaderSizeState$1 {
    static getters: readonly ["getUserRowSize", "getColSize"];
    readonly sizes: Record<UID, Record<Dimension, Array<Pixel | undefined>>>;
    handle(cmd: Command): void;
    getColSize(sheetId: UID, index: HeaderIndex): Pixel;
    getUserRowSize(sheetId: UID, index: HeaderIndex): Pixel | undefined;
    import(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
    export(data: WorkbookData): void;
    /**
     * Export the header sizes
     *
     * @param exportDefaults : if true, export column/row sizes even if they have the default size
     */
    exportData(data: WorkbookData, exportDefaults?: boolean): void;
}

declare class HeaderVisibilityPlugin extends CorePlugin {
    static getters: readonly ["checkElementsIncludeAllVisibleHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isHeaderHiddenByUser", "isRowHiddenByUser", "isColHiddenByUser"];
    private readonly hiddenHeaders;
    allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
    handle(cmd: Command): void;
    checkElementsIncludeAllVisibleHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
    isHeaderHiddenByUser(sheetId: UID, dimension: Dimension, index: HeaderIndex): boolean;
    isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
    isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
    getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
    getHiddenRowsGroups(sheetId: UID): ConsecutiveIndexes[];
    private getAllVisibleHeaders;
    import(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
    export(data: WorkbookData): void;
    exportData(data: WorkbookData, exportDefaults?: boolean): void;
}

interface ImageState {
    readonly images: Record<UID, Record<UID, Image$1 | undefined> | undefined>;
}
declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
    static getters: readonly ["getImage", "getImagePath", "getImageSize"];
    readonly fileStore?: FileStore;
    readonly images: Record<UID, Record<UID, Image$1 | undefined> | undefined>;
    /**
     * paths of images synced with the file store server.
     */
    readonly syncedImages: Set<Image$1["path"]>;
    constructor(config: CorePluginConfig);
    allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.InvalidFigureId;
    handle(cmd: CoreCommand): void;
    /**
     * Delete unused images from the file store
     */
    garbageCollectExternalResources(): void;
    getImage(figureId: UID): Image$1;
    getImagePath(figureId: UID): string;
    getImageSize(figureId: UID): FigureSize;
    private addImage;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
    private getAllImages;
}

type SheetMergeCellMap = Record<number, Record<number, number | undefined> | undefined>;
interface MergeState {
    readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
    readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
}
declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
    static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString", "isMainCellPosition"];
    private nextId;
    readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
    readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
    allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
    getMerges(sheetId: UID): Merge[];
    getMerge({ sheetId, col, row }: CellPosition): Merge | undefined;
    getMergesInZone(sheetId: UID, zone: Zone): Merge[];
    /**
     * Same as `getRangeString` but add all necessary merge to the range to make it a valid selection
     */
    getSelectionRangeString(range: Range, forSheetId: UID): string;
    /**
     * Return true if the zone intersects an existing merge:
     * if they have at least a common cell
     */
    doesIntersectMerge(sheetId: UID, zone: Zone): boolean;
    /**
     * Returns true if two columns have at least one merge in common
     */
    doesColumnsHaveCommonMerges(sheetId: string, colA: HeaderIndex, colB: HeaderIndex): boolean;
    /**
     * Returns true if two rows have at least one merge in common
     */
    doesRowsHaveCommonMerges(sheetId: string, rowA: HeaderIndex, rowB: HeaderIndex): boolean;
    /**
     * Add all necessary merge to the current selection to make it valid
     */
    expandZone(sheetId: UID, zone: Zone): Zone;
    isInSameMerge(sheetId: UID, colA: HeaderIndex, rowA: HeaderIndex, colB: HeaderIndex, rowB: HeaderIndex): boolean;
    isInMerge({ sheetId, col, row }: CellPosition): boolean;
    getMainCellPosition(position: CellPosition): CellPosition;
    isMergeHidden(sheetId: UID, merge: Merge): boolean;
    /**
     * Check if the zone represents a single cell or a single merge.
     */
    isSingleCellOrMerge(sheetId: UID, zone: Zone): boolean;
    isMainCellPosition(position: CellPosition): boolean;
    /**
     * Return true if the current selection requires losing state if it is merged.
     * This happens when there is some textual content in other cells than the
     * top left.
     */
    private isMergeDestructive;
    private getMergeById;
    private checkDestructiveMerge;
    private checkOverlap;
    private checkFrozenPanes;
    /**
     * The content of a merged cell should always be empty.
     * Except for the top-left cell.
     */
    private checkMergedContentUpdate;
    private checkMergeExists;
    /**
     * Merge the current selection. Note that:
     * - it assumes that we have a valid selection (no intersection with other
     *   merges)
     * - it does nothing if the merge is trivial: A1:A1
     */
    private addMerge;
    private removeMerge;
    /**
     * Apply a range change on merges of a particular sheet.
     */
    private applyRangeChangeOnSheet;
    import(data: WorkbookData): void;
    private importMerges;
    export(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
}

interface Pivot$1 {
    definition: PivotCoreDefinition;
    formulaId: string;
}
interface CoreState {
    nextFormulaId: number;
    pivots: Record<UID, Pivot$1 | undefined>;
    formulaIds: Record<UID, string | undefined>;
    compiledMeasureFormulas: Record<UID, Record<string, RangeCompiledFormula | undefined>>;
}
declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState {
    static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getMeasureCompiledFormula", "getPivotName", "isExistingPivot"];
    readonly nextFormulaId: number;
    readonly pivots: {
        [pivotId: UID]: Pivot$1 | undefined;
    };
    readonly formulaIds: {
        [formulaId: UID]: UID | undefined;
    };
    readonly compiledMeasureFormulas: Record<UID, Record<string, RangeCompiledFormula>>;
    allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.NoChanges | CommandResult.PivotIdNotFound | CommandResult.EmptyName | CommandResult.InvalidDefinition;
    handle(cmd: CoreCommand): void;
    adaptRanges(applyChange: ApplyRangeChange): void;
    getPivotDisplayName(pivotId: UID): string;
    getPivotName(pivotId: UID): string;
    /**
     * Returns the pivot core definition of the pivot with the given id.
     * Be careful, this is the core definition, this should be used only in a
     * context where the pivot is not loaded yet.
     */
    getPivotCoreDefinition(pivotId: UID): PivotCoreDefinition;
    /**
     * Get the pivot ID (UID) from the formula ID (the one used in the formula)
     */
    getPivotId(formulaId: string): UID | undefined;
    getPivotFormulaId(pivotId: UID): string;
    getPivotIds(): UID[];
    isExistingPivot(pivotId: UID): boolean;
    getMeasureCompiledFormula(measure: PivotCoreMeasure): RangeCompiledFormula;
    private addPivot;
    private compileCalculatedMeasures;
    private insertPivot;
    private resizeSheet;
    private getPivotCore;
    private compileMeasureFormula;
    private replaceMeasureFormula;
    private checkDuplicatedMeasureIds;
    /**
     * Import the pivots
     */
    import(data: WorkbookData): void;
    /**
     * Export the pivots
     */
    export(data: WorkbookData): void;
}

declare class SettingsPlugin extends CorePlugin {
    static getters: readonly ["getLocale"];
    private locale;
    allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.InvalidLocale;
    handle(cmd: CoreCommand): void;
    getLocale(): Locale;
    private changeCellsDateFormatWithLocale;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
}

interface SheetState {
    readonly sheets: Record<UID, Sheet | undefined>;
    readonly orderedSheetIds: UID[];
    readonly sheetIdsMapName: Record<string, UID | undefined>;
    readonly cellPosition: Record<UID, CellPosition | undefined>;
}
declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
    static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
    readonly sheetIdsMapName: Record<string, UID | undefined>;
    readonly orderedSheetIds: UID[];
    readonly sheets: Record<UID, Sheet | undefined>;
    readonly cellPosition: Record<UID, CellPosition | undefined>;
    allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    import(data: WorkbookData): void;
    private exportSheets;
    export(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
    getGridLinesVisibility(sheetId: UID): boolean;
    tryGetSheet(sheetId: UID): Sheet | undefined;
    getSheet(sheetId: UID): Sheet;
    isSheetVisible(sheetId: UID): boolean;
    /**
     * Return the sheet name. Throw if the sheet is not found.
     */
    getSheetName(sheetId: UID): string;
    /**
     * Return the sheet name or undefined if the sheet doesn't exist.
     */
    tryGetSheetName(sheetId: UID): string | undefined;
    getSheetIdByName(name: string | undefined): UID | undefined;
    getSheetIds(): UID[];
    getVisibleSheetIds(): UID[];
    doesHeaderExist(sheetId: UID, dimension: Dimension, index: number): boolean;
    doesHeadersExist(sheetId: UID, dimension: Dimension, headerIndexes: HeaderIndex[]): boolean;
    getCell({ sheetId, col, row }: CellPosition): Cell | undefined;
    getColsZone(sheetId: UID, start: HeaderIndex, end: HeaderIndex): Zone;
    getRowCells(sheetId: UID, row: HeaderIndex): UID[];
    getRowsZone(sheetId: UID, start: HeaderIndex, end: HeaderIndex): Zone;
    getCellPosition(cellId: UID): CellPosition;
    getNumberCols(sheetId: UID): number;
    getNumberRows(sheetId: UID): number;
    getNumberHeaders(sheetId: UID, dimension: Dimension): HeaderIndex;
    getNextSheetName(baseName?: string): string;
    getSheetSize(sheetId: UID): ZoneDimension;
    getSheetZone(sheetId: UID): Zone;
    getUnboundedZone(sheetId: UID, zone: Zone | UnboundedZone): UnboundedZone;
    getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
    private setPaneDivisions;
    /**
     * Checks if all non-frozen header indices are present in the provided elements of selected rows/columns.
     * This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
     */
    checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
    getCommandZones(cmd: Command): Zone[];
    /**
     * Check if zones in the command are well formed and
     * not outside the sheet.
     */
    checkZonesExistInSheet(sheetId: UID, zones: Zone[]): CommandResult;
    private updateCellPosition;
    /**
     * Set the cell at a new position and clear its previous position.
     */
    private setNewPosition;
    /**
     * Remove the cell at the given position (if there's one)
     */
    private clearPosition;
    private setGridLinesVisibility;
    private createSheet;
    private moveSheet;
    private findIndexOfTargetSheet;
    private checkSheetName;
    private checkSheetPosition;
    private checkRowFreezeQuantity;
    private checkColFreezeQuantity;
    private checkRowFreezeOverlapMerge;
    private checkColFreezeOverlapMerge;
    private isRenameAllowed;
    private renameSheet;
    private hideSheet;
    private showSheet;
    private duplicateSheet;
    private getDuplicateSheetName;
    private deleteSheet;
    /**
     * Delete column. This requires a lot of handling:
     * - Update all the formulas in all sheets
     * - Move the cells
     * - Update the cols/rows (size, number, (cells), ...)
     * - Reevaluate the cells
     *
     * @param sheet ID of the sheet on which deletion should be applied
     * @param columns Columns to delete
     */
    private removeColumns;
    /**
     * Delete row. This requires a lot of handling:
     * - Update the merges
     * - Update all the formulas in all sheets
     * - Move the cells
     * - Update the cols/rows (size, number, (cells), ...)
     * - Reevaluate the cells
     *
     * @param sheet ID of the sheet on which deletion should be applied
     * @param rows Rows to delete
     */
    private removeRows;
    private addColumns;
    private addRows;
    private moveCellOnColumnsDeletion;
    /**
     * Move the cells after a column or rows insertion
     */
    private moveCellsOnAddition;
    /**
     * Move all the cells that are from the row under `deleteToRow` up to `deleteFromRow`
     *
     * b.e.
     * move vertically with delete from 3 and delete to 5 will first clear all the cells from lines 3 to 5,
     * then take all the row starting at index 6 and add them back at index 3
     *
     */
    private moveCellOnRowsDeletion;
    private updateRowsStructureOnDeletion;
    /**
     * Add empty rows at the end of the rows
     *
     * @param sheet Sheet
     * @param quantity Number of rows to add
     */
    private addEmptyRows;
    private getImportedSheetSize;
    /**
     * Check that any "sheetId" in the command matches an existing
     * sheet.
     */
    private checkSheetExists;
    /**
     * Check if zones in the command are well formed and
     * not outside the sheet.
     */
    private checkZonesAreInSheet;
}

interface TableStylesState {
    readonly styles: {
        [styleId: string]: TableStyle;
    };
}
declare class TableStylePlugin extends CorePlugin<TableStylesState> implements TableStylesState {
    static getters: readonly ["getNewCustomTableStyleName", "getTableStyle", "getTableStyles", "isTableStyleEditable"];
    readonly styles: {
        [styleId: string]: TableStyle;
    };
    allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    getTableStyle(styleId: string): TableStyle;
    getTableStyles(): Record<string, TableStyle>;
    getNewCustomTableStyleName(): string;
    isTableStyleEditable(styleId: string): boolean;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
}

interface TableState {
    tables: Record<UID, Record<TableId, CoreTable | undefined>>;
    nextTableId: number;
}
declare class TablePlugin extends CorePlugin<TableState> implements TableState {
    static getters: readonly ["getCoreTable", "getCoreTables", "getCoreTableMatchingTopLeft"];
    readonly tables: Record<UID, Record<TableId, CoreTable | undefined>>;
    readonly nextTableId: number;
    adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
    allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
    handle(cmd: CoreCommand): void;
    getCoreTables(sheetId: UID): CoreTable[];
    getCoreTable({ sheetId, col, row }: CellPosition): CoreTable | undefined;
    private getTablesOverlappingZones;
    /** Extend a table down one row */
    private extendTableDown;
    /** Extend a table right one col */
    private extendTableRight;
    /**
     * Check if an UpdateCell command should cause the given table to be extended by one row or col.
     *
     * The table should be extended if all of these conditions are true:
     * 1) The updated cell is right below/right of the table
     * 2) The command adds a content to the cell
     * 3) No cell right below/right next to the table had any content before the command
     * 4) Extending the table down/right would not overlap with another table
     * 5) Extending the table down/right would not overlap with a merge
     *
     */
    private canUpdateCellCmdExtendTable;
    getCoreTableMatchingTopLeft(sheetId: UID, zone: Zone): CoreTable | undefined;
    private checkUpdatedTableZoneIsValid;
    private checkTableConfigUpdateIsValid;
    private createStaticTable;
    private createDynamicTable;
    private updateTable;
    private updateStaticTable;
    private updateDynamicTable;
    /**
     * Update the old config of a table with the new partial config from an UpdateTable command.
     *
     * Make sure the new config make sense (e.g. if the table has no header, it should not have
     * filters and number of headers should be 0)
     */
    private updateTableConfig;
    private createFilterFromZone;
    private copyStaticTableForSheet;
    private copyDynamicTableForSheet;
    private applyRangeChangeOnTable;
    private consumeNextId;
    import(data: WorkbookData): void;
    export(data: WorkbookData): void;
    exportForExcel(data: ExcelWorkbookData): void;
}

interface CoreViewPluginConfig {
    readonly getters: Getters;
    readonly stateObserver: StateObserver;
    readonly selection: SelectionStreamProcessor;
    readonly moveClient: (position: ClientPosition) => void;
    readonly uiActions: UIActions;
    readonly custom: ModelConfig["custom"];
    readonly session: Session;
    readonly defaultCurrency?: Partial<Currency>;
    readonly customColors: Color[];
    readonly external: ModelConfig["external"];
}
interface CoreViewPluginConstructor {
    new (config: CoreViewPluginConfig): CoreViewPlugin;
    getters: readonly string[];
}
/**
 * Core view plugins handle any data derived from core date (i.e. evaluation).
 * They cannot impact the model data (i.e. cannot dispatch commands).
 */
declare class CoreViewPlugin<State = any> extends BasePlugin<State, Command> {
    protected getters: Getters;
    constructor({ getters, stateObserver }: CoreViewPluginConfig);
}

declare class EvaluationPlugin extends CoreViewPlugin {
    static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isEmpty"];
    private shouldRebuildDependenciesGraph;
    private evaluator;
    private positionsToUpdate;
    constructor(config: CoreViewPluginConfig);
    beforeHandle(cmd: Command): void;
    handle(cmd: CoreViewCommand): void;
    finalize(): void;
    evaluateFormula(sheetId: UID, formulaString: string): CellValue | Matrix<CellValue>;
    evaluateFormulaResult(sheetId: UID, formulaString: string): Matrix<FunctionResultObject> | FunctionResultObject;
    evaluateCompiledFormula(sheetId: UID, compiledFormula: RangeCompiledFormula, getSymbolValue: GetSymbolValue): FunctionResultObject | Matrix<FunctionResultObject>;
    /**
     * Return the value of each cell in the range as they are displayed in the grid.
     */
    getRangeFormattedValues(range: Range): FormattedValue[];
    /**
     * Return the value of each cell in the range.
     */
    getRangeValues(range: Range): CellValue[];
    /**
     * Return the format of each cell in the range.
     */
    getRangeFormats(range: Range): (Format | undefined)[];
    getEvaluatedCell(position: CellPosition): EvaluatedCell;
    getEvaluatedCells(sheetId: UID): EvaluatedCell[];
    getEvaluatedCellsPositions(sheetId: UID): CellPosition[];
    getEvaluatedCellsInZone(sheetId: UID, zone: Zone): EvaluatedCell[];
    /**
     * Return the spread zone the position is part of, if any
     */
    getSpreadZone(position: CellPosition, options?: {
        ignoreSpillError: boolean;
    }): Zone | undefined;
    getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
    /**
     * Check if a zone only contains empty cells
     */
    isEmpty(sheetId: UID, zone: Zone): boolean;
    /**
     * Maps the visible positions of a range  according to a provided callback
     * @param range - the range we filter out
     * @param evaluationCallback - the callback applied to the filtered positions
     * @returns the values filtered (ie we keep only the not hidden values)
     */
    private mapVisiblePositions;
    exportForExcel(data: ExcelWorkbookData): void;
    /**
     * Returns the corresponding formula cell of a given cell
     * It could be the formula present in the cell itself or the
     * formula of the array formula that spreads to the cell
     */
    getCorrespondingFormulaCell(position: CellPosition): FormulaCell | undefined;
}

interface CustomColorState {
    readonly customColors: Immutable<Record<Color, true>>;
    readonly shouldUpdateColors: boolean;
}
/**
 * CustomColors plugin
 * This plugins aims to compute and keep to custom colors used in the
 * current spreadsheet
 */
declare class CustomColorsPlugin extends CoreViewPlugin<CustomColorState> {
    private readonly customColors;
    private readonly shouldUpdateColors;
    static getters: readonly ["getCustomColors"];
    constructor(config: CoreViewPluginConfig);
    handle(cmd: Command): void;
    finalize(): void;
    getCustomColors(): Color[];
    private computeCustomColors;
    private getColorsFromCells;
    private getFormattingColors;
    private getChartColors;
    private getTableColors;
    private getTableStyleElementColors;
    private tryToAddColors;
}

interface EvaluationChartStyle {
    background: Color;
    fontColor: Color;
}
interface EvaluationChartState {
    charts: Record<UID, ChartRuntime | undefined>;
}
declare class EvaluationChartPlugin extends CoreViewPlugin<EvaluationChartState> {
    static getters: readonly ["getChartRuntime", "getStyleOfSingleCellChart"];
    charts: Record<UID, ChartRuntime | undefined>;
    private createRuntimeChart;
    handle(cmd: CoreViewCommand): void;
    getChartRuntime(figureId: UID): ChartRuntime;
    /**
     * Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
     */
    getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): EvaluationChartStyle;
    exportForExcel(data: ExcelWorkbookData): void;
}

declare class EvaluationConditionalFormatPlugin extends CoreViewPlugin {
    static getters: readonly ["getConditionalIcon", "getCellConditionalFormatStyle", "getConditionalDataBar"];
    private isStale;
    private computedStyles;
    private computedIcons;
    private computedDataBars;
    handle(cmd: CoreViewCommand): void;
    finalize(): void;
    getCellConditionalFormatStyle(position: CellPosition): Style | undefined;
    getConditionalIcon({ sheetId, col, row }: CellPosition): string | undefined;
    getConditionalDataBar({ sheetId, col, row }: CellPosition): DataBarFill | undefined;
    /**
     * Compute the styles according to the conditional formatting.
     * This computation must happen after the cell values are computed if they change
     *
     * This result of the computation will be in the state.cell[XC].conditionalStyle and will be the union of all the style
     * properties of the rules applied (in order).
     * So if a cell has multiple conditional formatting applied to it, and each affect a different value of the style,
     * the resulting style will have the combination of all those values.
     * If multiple conditional formatting use the same style value, they will be applied in order so that the last applied wins
     */
    private getComputedStyles;
    private getComputedIcons;
    private getComputedDataBars;
    private parsePoint;
    /** Compute the CF icons for the given range and CF rule, and apply in in the given computedIcons object */
    private applyIcon;
    private computeIcon;
    private applyDataBar;
    /** Compute the color scale for the given range and CF rule, and apply in in the given computedStyle object */
    private applyColorScale;
    /**
     * Execute the predicate to know if a conditional formatting rule should be applied to a cell
     */
    private rulePredicate;
}

interface InvalidValidationResult {
    readonly isValid: false;
    readonly rule: DataValidationRule;
    readonly error: string;
}
interface ValidValidationResult {
    readonly isValid: true;
}
type ValidationResult = ValidValidationResult | InvalidValidationResult;
type SheetValidationResult = {
    [col: HeaderIndex]: Array<Lazy<ValidationResult>>;
};
declare class EvaluationDataValidationPlugin extends CoreViewPlugin {
    static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
    validationResults: Record<UID, SheetValidationResult>;
    handle(cmd: CoreViewCommand): void;
    isDataValidationInvalid(cellPosition: CellPosition): boolean;
    getInvalidDataValidationMessage(cellPosition: CellPosition): string | undefined;
    /**
     * Check if the value is valid for the given criterion, and return an error message if not.
     *
     * The value must be canonicalized.
     */
    getDataValidationInvalidCriterionValueMessage(criterionType: DataValidationCriterionType, value: string): string | undefined;
    isCellValidCheckbox(cellPosition: CellPosition): boolean;
    /** Get the validation result if the cell on the given position had the given value */
    getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
    private isValidFormula;
    private getValidationResultForCell;
    private computeSheetValidationResults;
    private getRuleErrorForCellValue;
    /** Get the offset of the cell inside the ranges of the rule. Throws an error if the cell isn't inside the rule. */
    private getCellOffsetInRule;
    private getEvaluatedCriterionValues;
}

declare class DynamicTablesPlugin extends CoreViewPlugin {
    static getters: readonly ["canCreateDynamicTableOnZones", "doesZonesContainFilter", "getFilter", "getFilters", "getTable", "getTables", "getTablesOverlappingZones", "getFilterId", "getFilterHeaders", "isFilterHeader"];
    tables: Record<UID, Table[]>;
    handle(cmd: Command): void;
    finalize(): void;
    private computeTables;
    getFilters(sheetId: UID): Filter[];
    getTables(sheetId: UID): Table[];
    getFilter(position: CellPosition): Filter | undefined;
    getFilterId(position: CellPosition): FilterId | undefined;
    getTable({ sheetId, col, row }: CellPosition): Table | undefined;
    getTablesOverlappingZones(sheetId: UID, zones: Zone[]): Table[];
    doesZonesContainFilter(sheetId: UID, zones: Zone[]): boolean;
    getFilterHeaders(sheetId: UID): CellPosition[];
    isFilterHeader({ sheetId, col, row }: CellPosition): boolean;
    /**
     * Check if we can create a dynamic table on the given zones.
     * - The zones must be continuous
     * - The union of the zones must be either:
     *    - A single cell that contains an array formula
     *    - All the spread cells of a single array formula
     */
    canCreateDynamicTableOnZones(sheetId: UID, zones: Zone[]): boolean;
    private coreTableToTable;
    private getDynamicTableFilters;
    private getDynamicTableFilterId;
    exportForExcel(data: ExcelWorkbookData): void;
}

interface HeaderSizeState {
    tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
}
interface CellWithSize {
    cell: CellPosition;
    size: Pixel;
}
declare class HeaderSizeUIPlugin extends CoreViewPlugin<HeaderSizeState> implements HeaderSizeState {
    static getters: readonly ["getRowSize", "getHeaderSize"];
    readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
    private ctx;
    handle(cmd: Command): void;
    getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
    getHeaderSize(sheetId: UID, dimension: Dimension, index: HeaderIndex): Pixel;
    private updateRowSizeForCellChange;
    private initializeSheet;
    /**
     * Return the height the cell should have in the sheet, which is either DEFAULT_CELL_HEIGHT if the cell is in a multi-row
     * merge, or the height of the cell computed based on its style/content.
     */
    private getCellHeight;
    private isInMultiRowMerge;
    /**
     * Get the tallest cell of a row and its size.
     */
    private getRowTallestCell;
}

/**
 * Represent a pivot runtime definition. A pivot runtime definition is a pivot
 * definition that has been enriched to include the display name of its attributes
 * (measures, columns, rows).
 */
declare class PivotRuntimeDefinition {
    readonly measures: PivotMeasure[];
    readonly columns: PivotDimension$1[];
    readonly rows: PivotDimension$1[];
    readonly sortedColumn?: PivotSortedColumn;
    constructor(definition: CommonPivotCoreDefinition, fields: PivotFields);
    getDimension(nameWithGranularity: string): PivotDimension$1;
    getMeasure(id: string): PivotMeasure;
}

/**
 * Class used to ease the construction of a pivot table.
 * Let's consider the following example, with:
 * - columns groupBy: [sales_team, create_date]
 * - rows groupBy: [continent, city]
 * - measures: [revenues]
 * _____________________________________________________________________________________|   ----|
 * |                |   Sale Team 1             |  Sale Team 2            |             |       |
 * |                |___________________________|_________________________|_____________|       |
 * |                |   May 2020   | June 2020  |  May 2020  | June 2020  |   Total     |       |<---- `cols`
 * |                |______________|____________|____________|____________|_____________|       |   ----|
 * |                |   Revenues   |  Revenues  |  Revenues  |  Revenues  |   Revenues  |       |       |<--- `measureRow`
 * |________________|______________|____________|____________|____________|_____________|   ----|   ----|
 * |Europe          |     25       |     35     |     40     |     30     |     65      |   ----|
 * |    Brussels    |      0       |     15     |     30     |     30     |     30      |       |
 * |    Paris       |     25       |     20     |     10     |     0      |     35      |       |
 * |North America   |     60       |     75     |            |            |     60      |       |<---- `body`
 * |    Washington  |     60       |     75     |            |            |     60      |       |
 * |Total           |     85       |     110    |     40     |     30     |     125     |       |
 * |________________|______________|____________|____________|____________|_____________|   ----|
 *
 * |                |
 * |----------------|
 *         |
 *         |
 *       `rows`
 *
 * `rows` is an array of cells, each cells contains the indent level, the fields used for the group by and the values for theses fields.
 * For example:
 *   `Europe`: { indent: 1, fields: ["continent"], values: ["id_of_Europe"]}
 *   `Brussels`: { indent: 2, fields: ["continent", "city"], values: ["id_of_Europe", "id_of_Brussels"]}
 *   `Total`: { indent: 0, fields: [], values: []}
 *
 * `columns` is an double array, first by row and then by cell. So, in this example, it looks like:
 *   [[row1], [row2], [measureRow]]
 *   Each cell of a column's row contains the width (span) of the cells, the fields used for the group by and the values for theses fields.
 * For example:
 *   `Sale Team 1`: { width: 2, fields: ["sales_team"], values: ["id_of_SaleTeam1"]}
 *   `May 2020` (the one under Sale Team 2): { width: 1, fields: ["sales_team", "create_date"], values: ["id_of_SaleTeam2", "May 2020"]}
 *   `Revenues` (the one under Total): { width: 1, fields: ["measure"], values: ["revenues"]}
 *
 */
declare class SpreadsheetPivotTable {
    readonly columns: PivotTableColumn[][];
    rows: PivotTableRow[];
    readonly measures: string[];
    readonly fieldsType: Record<string, string | undefined>;
    readonly maxIndent: number;
    readonly pivotCells: {
        [key: string]: PivotTableCell[][];
    };
    private rowTree;
    private colTree;
    isSorted: boolean;
    constructor(columns: PivotTableColumn[][], rows: PivotTableRow[], measures: string[], fieldsType: Record<string, string | undefined>);
    /**
     * Get the number of columns leafs (i.e. the number of the last row of columns)
     */
    getNumberOfDataColumns(): number;
    getPivotCells(includeTotal?: boolean, includeColumnHeaders?: boolean): PivotTableCell[][];
    getRowTree(): DimensionTree;
    getColTree(): DimensionTree;
    private isTotalRow;
    private getPivotCell;
    private getColHeaderDomain;
    private getColDomain;
    private getColMeasure;
    private getRowDomain;
    buildRowsTree(): DimensionTree;
    buildColumnsTree(): DimensionTree;
    export(): {
        cols: PivotTableColumn[][];
        rows: PivotTableRow[];
        measures: string[];
        fieldsType: Record<string, string | undefined>;
    };
    sort(measure: string, sortedColumn: PivotSortedColumn, getValue: (measure: string, domain: PivotDomain) => FunctionResultObject): void;
    private rowTreeToRows;
}

interface InitPivotParams {
    reload?: boolean;
}
interface Pivot<T = PivotRuntimeDefinition> {
    type: PivotCoreDefinition["type"];
    definition: T;
    init(params?: InitPivotParams): void;
    isValid(): boolean;
    onDefinitionChange(nextDefinition: PivotCoreDefinition): void;
    getTableStructure(): SpreadsheetPivotTable;
    getFields(): PivotFields;
    getPivotHeaderValueAndFormat(domain: PivotDomain): FunctionResultObject;
    getPivotCellValueAndFormat(measure: string, domain: PivotDomain): FunctionResultObject;
    getPivotMeasureValue(measure: string, domain: PivotDomain): FunctionResultObject;
    getMeasure: (id: string) => PivotMeasure;
    parseArgsToPivotDomain(args: Maybe<FunctionResultObject>[]): PivotDomain;
    areDomainArgsFieldsValid(args: Maybe<FunctionResultObject>[]): boolean;
    assertIsValid({ throwOnError }: {
        throwOnError: boolean;
    }): FunctionResultObject | undefined;
    getPossibleFieldValues(dimension: PivotDimension$1): {
        value: string | boolean | number;
        label: string;
    }[];
    needsReevaluation: boolean;
}

declare class PivotUIPlugin extends CoreViewPlugin {
    static getters: readonly ["getPivot", "getFirstPivotFunction", "getPivotIdFromPosition", "getPivotCellFromPosition", "generateNewCalculatedMeasureName", "isPivotUnused", "isSpillPivotFormula"];
    private pivots;
    private unusedPivots?;
    private custom;
    constructor(config: CoreViewPluginConfig);
    beforeHandle(cmd: Command): void;
    handle(cmd: Command): void;
    /**
     * Get the id of the pivot at the given position. Returns undefined if there
     * is no pivot at this position
     */
    getPivotIdFromPosition(position: CellPosition): "" | UID | undefined;
    isSpillPivotFormula(position: CellPosition): boolean;
    getFirstPivotFunction(sheetId: UID, tokens: Token[]): {
        functionName: string;
        args: (CellValue | Matrix<CellValue> | undefined)[];
    } | undefined;
    /**
     * Returns the domain args of a pivot formula from a position.
     * For all those formulas:
     *
     * =PIVOT.VALUE(1,"expected_revenue","stage_id",2,"city","Brussels")
     * =PIVOT.HEADER(1,"stage_id",2,"city","Brussels")
     * =PIVOT.HEADER(1,"stage_id",2,"city","Brussels","measure","expected_revenue")
     *
     * the result is the same: ["stage_id", 2, "city", "Brussels"]
     *
     * If the cell is the result of PIVOT, the result is the domain of the cell
     * as if it was the individual pivot formula
     */
    getPivotCellFromPosition(position: CellPosition): PivotTableCell;
    generateNewCalculatedMeasureName(measures: PivotCoreMeasure[]): string;
    getPivot(pivotId: UID): Pivot<PivotRuntimeDefinition>;
    isPivotUnused(pivotId: UID): boolean;
    /**
     * Refresh the cache of a pivot
     */
    private refreshPivot;
    setupPivot(pivotId: UID, { recreate }?: {
        recreate: boolean;
    }): void;
    _getUnusedPivots(): UID[];
}

/**
 * Autofill Plugin
 *
 */
declare class AutofillPlugin extends UIPlugin {
    static layers: readonly ["Autofill"];
    static getters: readonly ["getAutofillTooltip"];
    private autofillZone;
    private steps;
    private lastCellSelected;
    private direction;
    private tooltip;
    allowDispatch(cmd: LocalCommand): CommandResult;
    handle(cmd: Command): void;
    getAutofillTooltip(): Tooltip | undefined;
    /**
     * Autofill the autofillZone from the current selection
     * @param apply Flag set to true to apply the autofill in the model. It's
     *              useful to set it to false when we need to fill the tooltip
     */
    private autofill;
    /**
     * Select a cell which becomes the last cell of the autofillZone
     */
    private select;
    /**
     * Computes the autofillZone to autofill when the user double click on the
     * autofiller
     */
    private autofillAuto;
    private getAutofillAutoLastRow;
    /**
     * Generate the next cell
     */
    private computeNewCell;
    /**
     * Get the rule associated to the current cell
     */
    private getRule;
    /**
     * Create the generator to be able to autofill the next cells.
     */
    private createGenerator;
    private saveZone;
    /**
     * Compute the direction of the autofill from the last selected zone and
     * a given cell (col, row)
     */
    private getDirection;
    private autoFillMerge;
    private autofillCF;
    private autofillDV;
    drawLayer(renderingContext: GridRenderingContext): void;
}

interface AutomaticSum {
    position: Position$1;
    zone: Zone;
}
declare class AutomaticSumPlugin extends UIPlugin {
    static getters: readonly ["getAutomaticSums"];
    handle(cmd: Command): void;
    getAutomaticSums(sheetId: UID, zone: Zone, anchor: Position$1): AutomaticSum[];
    private sumData;
    private sumAdjacentData;
    /**
     * Find a zone to automatically sum a column or row of numbers.
     *
     * We first decide which direction will be summed (column or row).
     * Here is the strategy:
     *  1. If the left cell is a number and the top cell is not: choose horizontal
     *  2. Try to find a valid vertical zone. If it's valid: choose vertical
     *  3. Try to find a valid horizontal zone. If it's valid: choose horizontal
     *  4. Otherwise, no zone is returned
     *
     * Now, how to find a valid zone?
     * The zone starts directly above or on the left of the starting point
     * (depending on the direction).
     * The zone ends where the first continuous sequence of numbers ends.
     * Empty or text cells can be part of the zone while no number has been found.
     * Other kind of cells (boolean, dates, etc.) are not valid in the zone and the
     * search stops immediately if one is found.
     *
     *  -------                                       -------
     * |   1   |                                     |   1   |
     *  -------                                       -------
     * |       |                                     |       |
     *  -------  <= end of the sequence, stop here    -------
     * |   2   |                                     |   2   |
     *  -------                                       -------
     * |   3   | <= start of the number sequence     |   3   |
     *  -------                                       -------
     * |       | <= ignored                          | FALSE | <= invalid, no zone is found
     *  -------                                       -------
     * |   A   | <= ignored                          |   A   | <= ignored
     *  -------                                       -------
     */
    private findAdjacentData;
    /**
     * Return the zone to sum if a valid one is found.
     * @see getAutomaticSumZone
     */
    private findSuitableZoneToSum;
    private findVerticalZone;
    private findHorizontalZone;
    /**
     * Reduces a column or row zone to a valid zone for the automatic sum.
     * @see getAutomaticSumZone
     * @param sheet
     * @param zone one dimensional zone (a single row or a single column). The zone is
     *             assumed to start at the beginning of the column (top=0) or the row (left=0)
     * @param end end index of the zone (`bottom` or `right` depending on the dimension)
     * @returns the starting position of the valid zone or Infinity if the zone is not valid.
     */
    private reduceZoneStart;
    private shouldFindData;
    private isNumber;
    private isZoneValid;
    private lastColIsEmpty;
    private lastRowIsEmpty;
    /**
     * Decides which dimensions (columns or rows) should be summed
     * based on its shape and what's inside the zone.
     */
    private dimensionsToSum;
    /**
     * Sum each column and/or row in the zone in the appropriate cells,
     * depending on the available space.
     */
    private sumDimensions;
    /**
     * Sum the total of the zone in the bottom right cell, assuming
     * the last row contains summed columns.
     */
    private sumTotal;
    private sumColumns;
    private sumRows;
    private dispatchCellUpdates;
    /**
     * Find the first row where all cells below the zone are empty.
     */
    private nextEmptyRow;
    /**
     * Find the first column where all cells right of the zone are empty.
     */
    private nextEmptyCol;
    /**
     * Transpose the given dimensions.
     * COL becomes ROW
     * ROW becomes COL
     */
    private transpose;
}

interface ClientToDisplay extends Required<Client> {
    color: Color;
}
declare class CollaborativePlugin extends UIPlugin {
    static getters: readonly ["getClientsToDisplay", "getClient", "getConnectedClients", "isFullySynchronized"];
    static layers: readonly ["Selection"];
    private availableColors;
    private colors;
    private session;
    constructor(config: UIPluginConfig);
    private isPositionValid;
    getClient(): Client;
    getConnectedClients(): Set<Client>;
    isFullySynchronized(): boolean;
    /**
     * Get the list of others connected clients which are present in the same sheet
     * and with a valid position
     */
    getClientsToDisplay(): ClientToDisplay[];
    drawLayer(renderingContext: GridRenderingContext): void;
}

declare class GeoFeaturePlugin extends UIPlugin {
    static getters: readonly ["getGeoJsonFeatures", "geoFeatureNameToId", "getGeoChartAvailableRegions"];
    private readonly geoJsonService;
    private geoJsonCache;
    constructor(config: UIPluginConfig);
    getGeoChartAvailableRegions(): GeoChartRegion[];
    getGeoJsonFeatures(region: string): GeoJSON$1.Feature[] | undefined;
    geoFeatureNameToId(region: string, featureName: string): string | undefined;
    private convertToGeoJson;
}

declare class HeaderVisibilityUIPlugin extends UIPlugin {
    static getters: readonly ["getNextVisibleCellPosition", "findVisibleHeader", "findLastVisibleColRowIndex", "findFirstVisibleColRowIndex", "isRowHidden", "isColHidden", "isHeaderHidden"];
    isRowHidden(sheetId: UID, index: number): boolean;
    isColHidden(sheetId: UID, index: number): boolean;
    isHeaderHidden(sheetId: UID, dimension: Dimension, index: number): boolean;
    getNextVisibleCellPosition({ sheetId, col, row }: CellPosition): CellPosition;
    /**
     * Find the first visible header in the range [`from` => `to`].
     *
     * Both `from` and `to` are inclusive.
     */
    findVisibleHeader(sheetId: UID, dimension: Dimension, from: number, to: number): number | undefined;
    findLastVisibleColRowIndex(sheetId: UID, dimension: Dimension, { last, first }: {
        first: HeaderIndex;
        last: HeaderIndex;
    }): HeaderIndex;
    findFirstVisibleColRowIndex(sheetId: UID, dimension: Dimension): number | undefined;
    exportForExcel(data: ExcelWorkbookData): void;
}

declare class SortPlugin extends UIPlugin {
    allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
    handle(cmd: Command): void;
    private checkMerge;
    private checkMergeSizes;
    private checkArrayFormulaInSortZone;
    /**
     * This function evaluates if the top row of a provided zone can be considered as a `header`
     * by checking the following criteria:
     * * If the left-most column top row value (topLeft) is empty, we ignore it while evaluating the criteria.
     * 1 - Apart from the left-most column, every element of the top row must be non-empty, i.e. a cell should be present in the sheet.
     * 2 - There should be at least one column in which the type (CellValueType) of the rop row cell differs from the type of the cell below.
     *  For the second criteria, we ignore columns on which the cell below is empty.
     *
     */
    private hasHeader;
    private sortZone;
    /**
     * Return the distances between main merge cells in the zone.
     * (1 if there are no merges).
     * Note: it is assumed all merges are the same in the zone.
     */
    private mainCellsSteps;
    /**
     * Return a 2D array of cells in the zone (main merge cells if there are merges)
     */
    private mainCells;
}

declare class UIOptionsPlugin extends UIPlugin {
    static getters: readonly ["shouldShowFormulas"];
    private showFormulas;
    handle(cmd: Command): void;
    shouldShowFormulas(): boolean;
}

declare class SheetUIPlugin extends UIPlugin {
    static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getCellIconSrc", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone"];
    private ctx;
    allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
    handle(cmd: Command): void;
    getCellWidth(position: CellPosition): number;
    getCellIconSrc(position: CellPosition): ImageSrc | undefined;
    getTextWidth(text: string, style: Style): Pixel;
    getCellText(position: CellPosition, args?: {
        showFormula?: boolean;
        availableWidth?: number;
    }): string;
    /**
     * Return the text of a cell, split in multiple lines if needed. The text will be split in multiple
     * line if it contains NEWLINE characters, or if it's longer than the given width.
     */
    getCellMultiLineText(position: CellPosition, args: {
        wrapText: boolean;
        maxWidth: number;
    }): string[];
    doesCellHaveGridIcon(position: CellPosition): boolean;
    /**
     * Expands the given zone until bordered by empty cells or reached the sheet boundaries.
     */
    getContiguousZone(sheetId: UID, zoneToExpand: Zone): Zone;
    /**
     * Checks if a cell is empty (i.e. does not have a content or a formula does not spread over it).
     * If the cell is part of a merge, the check applies to the main cell of the merge.
     */
    private isCellEmpty;
    private getColMaxWidth;
    /**
     * Check that any "sheetId" in the command matches an existing
     * sheet.
     */
    private checkSheetExists;
    /**
     * Check if zones in the command are well formed and
     * not outside the sheet.
     */
    private checkZonesAreInSheet;
    private autoResizeRows;
}

declare class CellComputedStylePlugin extends UIPlugin {
    static getters: readonly ["getCellComputedBorder", "getCellComputedStyle"];
    private styles;
    private borders;
    handle(cmd: Command): void;
    getCellComputedBorder(position: CellPosition): Border$1 | null;
    getCellComputedStyle(position: CellPosition): Style;
    private computeCellBorder;
    private computeCellStyle;
}

/**
 * Local History
 *
 * The local history is responsible of tracking the locally state updates
 * It maintains the local undo and redo stack to allow to undo/redo only local
 * changes
 */
declare class HistoryPlugin extends UIPlugin {
    static getters: readonly ["canUndo", "canRedo"];
    /**
     * Ids of the revisions which can be undone
     */
    private undoStack;
    /**
     * Ids of the revisions which can be redone
     */
    private redoStack;
    private session;
    constructor(config: UIPluginConfig);
    allowDispatch(cmd: Command): CommandResult;
    handle(cmd: Command): void;
    finalize(): void;
    private requestHistoryChange;
    canUndo(): boolean;
    canRedo(): boolean;
    private onNewLocalStateUpdate;
    /**
     * Fetch the last revision which is not empty and not a repeated command
     *
     * Ignore repeated commands (REQUEST_REDO command as root command)
     * Ignore standard undo/redo revisions (that are empty)
     */
    private getPossibleRevisionToRepeat;
}

declare class SplitToColumnsPlugin extends UIPlugin {
    static getters: readonly ["getAutomaticSeparator"];
    allowDispatch(cmd: Command): CommandResult | CommandResult[];
    handle(cmd: Command): void;
    getAutomaticSeparator(): string;
    private getAutoSeparatorForString;
    private splitIntoColumns;
    private getSplittedCols;
    private splitAndRemoveTrailingEmpty;
    private willSplittedColsOverwriteContent;
    private removeMergesInSplitZone;
    private addColsToAvoidCollisions;
    private getColsToAddToAvoidCollision;
    private addColumnsToNotOverflowSheet;
    private checkSingleColSelected;
    private checkNonEmptySelector;
    private checkNotOverwritingContent;
    private checkSeparatorInSelection;
}

declare class TableComputedStylePlugin extends UIPlugin {
    static getters: readonly ["getCellTableStyle", "getCellTableBorder"];
    private tableStyles;
    handle(cmd: Command): void;
    finalize(): void;
    getCellTableStyle(position: CellPosition): Style | undefined;
    getCellTableBorder(position: CellPosition): Border$1 | undefined;
    private computeTableStyle;
    /**
     * Get the actual table config that will be used to compute the table style. It is different from
     * the config of the table because of hidden rows and columns in the sheet. For example remove the
     * hidden rows from config.numberOfHeaders.
     */
    private getTableRuntimeConfig;
    /**
     * Get a mapping: relative col/row position in the table <=> col/row in the sheet
     */
    private getTableMapping;
}

declare class HeaderPositionsUIPlugin extends UIPlugin {
    static getters: readonly ["getColDimensions", "getRowDimensions", "getColRowOffset"];
    private headerPositions;
    private isDirty;
    handle(cmd: Command): void;
    finalize(): void;
    /**
     * Returns the size, start and end coordinates of a column on an unfolded sheet
     */
    getColDimensions(sheetId: UID, col: HeaderIndex): HeaderDimensions;
    /**
     * Returns the size, start and end coordinates of a row an unfolded sheet
     */
    getRowDimensions(sheetId: UID, row: HeaderIndex): HeaderDimensions;
    /**
     * Returns the offset of a header (determined by the dimension) at the given index
     * based on the referenceIndex given. If start === 0, this method will return
     * the start attribute of the header.
     *
     * i.e. The size from A to B is the distance between A.start and B.end
     */
    getColRowOffset(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex, sheetId?: UID): Pixel;
    private computeHeaderPositionsOfSheet;
    private computePositions;
}

/**
 * Union of all getter names of a plugin.
 *
 * e.g. With the following plugin
 * ```ts
 * class MyPlugin {
 *   static getters = [
 *     "getCell",
 *     "getCellValue",
 *   ] as const;
 *   getCell() { ... }
 *   getCellValue() { ... }
 * }
 * ```
 * `type Names = GetterNames<typeof MyPlugin>` is equivalent to
 * `type Names = "getCell" | "getCellValue"`
 *
 * Some technical comments:
 *
 * - Since the getter names are in a static array, the type of the plugin must
 *   be given, not the class itself.
 *
 * - we need to index the getters array with every index:
 *   `Plugin["getters"][0] | Plugin["getters"][1] | Plugin["getters"][2] | ...`
 *   which is equivalent to `Plugin["getters"][0 | 1 | 2 | ...]`.
 *   This can be generalized because the union of all indices `0 | 1 | 2 | 3 | ...`
 *   is actually the type `number`.
 */
type GetterNames<Plugin extends {
    getters: readonly string[];
}> = Plugin["getters"][number];
/**
 * Extract getter methods from a plugin, based on its `getters` static array.
 * @example
 * class MyPlugin {
 *   static getters = [
 *     "getCell",
 *     "getCellValue",
 *   ] as const;
 *   getCell() { ... }
 *   getCellValue() { ... }
 * }
 * type MyPluginGetters = PluginGetters<typeof MyPlugin>;
 * // MyPluginGetters is equivalent to:
 * // {
 * //   getCell: () => ...,
 * //   getCellValue: () => ...,
 * // }
 */
type PluginGetters<Plugin extends {
    new (...args: unknown[]): any;
    getters: readonly string[];
}> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof TablePlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin> & PluginGetters<typeof PivotCorePlugin>;
type Getters = {
    isReadonly: () => boolean;
    isDashboard: () => boolean;
} & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoFeaturePlugin>;

type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
interface ArgDefinition {
    acceptMatrix?: boolean;
    acceptMatrixOnly?: boolean;
    acceptErrors?: boolean;
    repeating?: boolean;
    optional?: boolean;
    description: string;
    name: string;
    type: ArgType[];
    default?: boolean;
    defaultValue?: any;
}
type ComputeFunction<R> = (this: EvalContext, ...args: Arg[]) => R;
interface AddFunctionDescription {
    compute: ComputeFunction<FunctionResultObject | Matrix<FunctionResultObject> | CellValue | Matrix<CellValue>>;
    description: string;
    category?: string;
    args: ArgDefinition[];
    isExported?: boolean;
    hidden?: boolean;
}
type FunctionDescription = AddFunctionDescription & {
    minArgRequired: number;
    maxArgPossible: number;
    nbrArgRepeating: number;
    getArgToFocus: (argPosition: number) => number;
};
type EvalContext = {
    __originSheetId: UID;
    __originCellPosition?: CellPosition;
    locale: Locale;
    getters: Getters;
    [key: string]: any;
    updateDependencies?: (position: CellPosition) => void;
    addDependencies?: (position: CellPosition, ranges: Range[]) => void;
    debug?: boolean;
    lookupCaches?: LookupCaches;
};
/**
 * used to cache lookup values for linear search
 **/
type LookupCaches = {
    forwardSearch: Map<unknown, Map<CellValue, number>>;
    reverseSearch: Map<unknown, Map<CellValue, number>>;
};

/**
 * An Operation can be executed to change a data structure from state A
 * to state B.
 * It should hold the necessary data used to perform this transition.
 * It should be possible to revert the changes made by this operation.
 *
 * In the context of o-spreadsheet, the data from an operation would
 * be a revision (the commands are used to execute it, the `changes` are used
 * to revert it).
 */
declare class Operation<T> {
    readonly id: UID;
    readonly data: T;
    constructor(id: UID, data: T);
    transformed(transformation: Transformation<T>): Operation<T>;
}

/**
 * A branch holds a sequence of operations.
 * It can be represented as "A - B - C - D" if A, B, C and D are executed one
 * after the other.
 *
 * @param buildTransformation Factory to build transformations
 * @param operations initial operations
 */
declare class Branch<T> {
    private readonly buildTransformation;
    private operations;
    constructor(buildTransformation: TransformationFactory<T>, operations?: Operation<T>[]);
    getOperations(): readonly Operation<T>[];
    getOperation(operationId: UID): Operation<T>;
    getLastOperationId(): UID | undefined;
    /**
     * Get the id of the operation appears first in the list of operations
     */
    getFirstOperationAmong(op1: UID, op2: UID): UID;
    contains(operationId: UID): boolean;
    /**
     * Add the given operation as the first operation
     */
    prepend(operation: Operation<T>): void;
    /**
     * add the given operation after the given predecessorOpId
     */
    insert(newOperation: Operation<T>, predecessorOpId: UID): void;
    /**
     * Add the given operation as the last operation
     */
    append(operation: Operation<T>): void;
    /**
     * Append operations in the given branch to this branch.
     */
    appendBranch(branch: Branch<T>): void;
    /**
     * Create and return a copy of this branch, starting after the given operationId
     */
    fork(operationId: UID): Branch<T>;
    /**
     * Transform all the operations in this branch with the given transformation
     */
    transform(transformation: Transformation<T>): void;
    /**
     * Cut the branch before the operation, meaning the operation
     * and all following operations are dropped.
     */
    cutBefore(operationId: UID): void;
    /**
     * Cut the branch after the operation, meaning all following operations are dropped.
     */
    cutAfter(operationId: UID): void;
    /**
     * Find an operation in this branch based on its id.
     * This returns the operation itself, operations which comes before it
     * and operation which comes after it.
     */
    private locateOperation;
}

interface CreateRevisionOptions {
    revisionId?: UID;
    clientId?: UID;
    pending?: boolean;
}
interface HistoryChange {
    key: string;
    target: any;
    before: any;
}
interface WorkbookHistory<Plugin> {
    update<T extends keyof Plugin>(key: T, val: Plugin[T]): void;
    update<T extends keyof Plugin, U extends keyof NonNullable<Plugin[T]>>(key1: T, key2: U, val: NonNullable<Plugin[T]>[U]): void;
    update<T extends keyof Plugin, U extends keyof NonNullable<Plugin[T]>, K extends keyof NonNullable<NonNullable<Plugin[T]>[U]>>(key1: T, key2: U, key3: K, val: NonNullable<NonNullable<Plugin[T]>[U]>[K]): void;
    update<T extends keyof Plugin, U extends keyof NonNullable<Plugin[T]>, K extends keyof NonNullable<NonNullable<Plugin[T]>[U]>, V extends keyof NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>>(key1: T, key2: U, key3: K, key4: V, val: NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]): void;
    update<T extends keyof Plugin, U extends keyof NonNullable<Plugin[T]>, K extends keyof NonNullable<NonNullable<Plugin[T]>[U]>, V extends keyof NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>, W extends keyof NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>>(key1: T, key2: U, key3: K, key4: V, key5: W, val: NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>[W]): void;
    update<T extends keyof Plugin, U extends keyof NonNullable<Plugin[T]>, K extends keyof NonNullable<NonNullable<Plugin[T]>[U]>, V extends keyof NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>, W extends keyof NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>, Y extends keyof NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>[W]>>(key1: T, key2: U, key3: K, key4: V, key5: W, key6: Y, val: NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>[W]>[Y]): void;
}
type Transformation<T = unknown> = (dataToTransform: T) => T;
interface TransformationFactory<T = unknown> {
    /**
     * Build a transformation function to transform any operation as if the execution of
     * a previous `operation` was omitted.
     */
    without: (operation: T) => Transformation<T>;
    /**
     * Build a transformation function to transform any operation as if a new `operation` was
     * executed before.
     */
    with: (operation: T) => Transformation<T>;
}
interface OperationSequenceNode<T> {
    operation: Operation<T>;
    branch: Branch<T>;
    isCancelled: boolean;
    next?: {
        operation: Operation<T>;
        branch: Branch<T>;
    };
}

/**
 * Coordinate in pixels
 */
interface DOMCoordinates {
    x: Pixel;
    y: Pixel;
}
interface DOMDimension {
    width: Pixel;
    height: Pixel;
}
type Rect = DOMCoordinates & DOMDimension;
interface BoxTextContent {
    textLines: string[];
    width: Pixel;
    align: Align;
}
interface Box extends Rect {
    content?: BoxTextContent;
    style: Style;
    dataBarFill?: DataBarFill;
    border?: Border$1;
    hasIcon?: boolean;
    clipRect?: Rect;
    isError?: boolean;
    image?: Image;
    isMerge?: boolean;
    verticalAlign?: VerticalAlign;
    isOverflow?: boolean;
}
interface Image {
    clipIcon: Rect | null;
    size: Pixel;
    type: "icon";
    image: HTMLImageElement;
}
/**
 * The viewport is the visible area of a sheet.
 * Column and row headers are not included in the viewport.
 */
type Viewport = Zone & Alias;
interface SheetDOMScrollInfo {
    /**
     * The scrollBar offset in the X coordinate
     */
    scrollX: Pixel;
    /**
     * The scrollBar offset in the Y coordinate
     */
    scrollY: Pixel;
}
interface GridRenderingContext {
    ctx: CanvasRenderingContext2D;
    dpr: number;
    thinLineWidth: number;
}
declare const LAYERS: {
    readonly Background: 0;
    readonly Highlights: 1;
    readonly Clipboard: 2;
    readonly Chart: 4;
    readonly Autofill: 5;
    readonly Selection: 6;
    readonly Headers: 100;
};
type LayerName = keyof typeof LAYERS;
declare const OrderedLayers: () => ("Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers")[];
/**
 *
 * @param layer New layer name
 * @param priority The lower priorities are rendered first
 */
declare function addRenderingLayer(layer: string, priority: number): void;
interface EdgeScrollInfo {
    canEdgeScroll: boolean;
    direction: ScrollDirection$1;
    delay: number;
}
type ScrollDirection$1 = 1 | 0 | -1 | "reset";

/**
 * State
 *
 * This file defines the basic types involved in maintaining the running state
 * of a o-spreadsheet.
 *
 * The most important exported values are:
 * - interface GridState: the internal type of the state managed by the model
 */

declare global {
    interface Window {
        Chart: typeof Chart;
        ChartGeo: typeof ChartGeo;
    }
}

type ScorecardChartElement = {
    text: string;
    style: {
        font: string;
        color: Color$1;
        strikethrough?: boolean;
        underline?: boolean;
    };
    position: PixelPosition;
};
type ScorecardChartConfig = {
    canvas: {
        width: number;
        height: number;
        backgroundColor: Color$1;
    };
    title?: ScorecardChartElement;
    baselineArrow?: {
        direction: BaselineArrowDirection;
        style: {
            size: Pixel;
            color: Color$1;
        };
        position: PixelPosition;
    };
    baseline?: ScorecardChartElement;
    baselineDescr?: ScorecardChartElement[];
    key?: ScorecardChartElement;
    progressBar?: {
        position: PixelPosition;
        dimension: DOMDimension;
        style: {
            color: Color$1;
            backgroundColor: Color$1;
        };
        value: number;
    };
};

interface ChartShowValuesPluginOptions {
    showValues: boolean;
    background?: Color;
    horizontal?: boolean;
    callback: (value: number | string, axisId?: string) => string;
}
declare module "chart.js" {
    interface PluginOptionsByType<TType extends ChartType$1> {
        chartShowValuesPlugin?: ChartShowValuesPluginOptions;
    }
}

/**
 * Registry
 *
 * The Registry class is basically just a mapping from a string key to an object.
 * It is really not much more than an object. It is however useful for the
 * following reasons:
 *
 * 1. it let us react and execute code when someone add something to the registry
 *   (for example, the FunctionRegistry subclass this for this purpose)
 * 2. it throws an error when the get operation fails
 * 3. it provides a chained API to add items to the registry.
 */
declare class Registry<T> {
    content: {
        [key: string]: T;
    };
    /**
     * Add an item to the registry
     *
     * Note that this also returns the registry, so another add method call can
     * be chained
     */
    add(key: string, value: T): Registry<T>;
    /**
     * Get an item from the registry
     */
    get(key: string): T;
    /**
     * Check if the key is already in the registry
     */
    contains(key: string): boolean;
    /**
     * Get a list of all elements in the registry
     */
    getAll(): T[];
    /**
     * Get a list of all keys in the registry
     */
    getKeys(): string[];
    /**
     * Remove an item from the registry
     */
    remove(key: string): void;
}

interface MigrationStep {
    versionFrom: string;
    migrate: (data: any) => any;
}

interface PivotRegistryItem$1 {
    editor: new (...args: any) => Component;
}

interface PivotParams {
    definition: PivotCoreDefinition;
    getters: Getters;
}
type PivotUIConstructor = new (custom: ModelConfig["custom"], params: PivotParams) => Pivot;
type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields: PivotFields, getters: Getters) => PivotRuntimeDefinition;
interface PivotRegistryItem {
    ui: PivotUIConstructor;
    definition: PivotDefinitionConstructor;
    externalData: boolean;
    onIterationEndEvaluation: (pivot: Pivot) => void;
    dateGranularities: string[];
    datetimeGranularities: string[];
    isMeasureCandidate: (field: PivotField) => boolean;
    isGroupable: (field: PivotField) => boolean;
}

declare class ClipboardHandler<T> {
    protected getters: Getters;
    protected dispatch: CommandDispatcher["dispatch"];
    constructor(getters: Getters, dispatch: CommandDispatcher["dispatch"]);
    copy(data: ClipboardData): T | undefined;
    paste(target: ClipboardPasteTarget, clippedContent: T, options: ClipboardOptions): void;
    isPasteAllowed(sheetId: UID, target: Zone[], content: T, option: ClipboardOptions): CommandResult;
    isCutAllowed(data: ClipboardData): CommandResult;
    getPasteTarget(sheetId: UID, target: Zone[], content: T, options: ClipboardOptions): ClipboardPasteTarget;
    convertTextToClipboardData(data: string): T | undefined;
}

declare class AbstractCellClipboardHandler<T, T1> extends ClipboardHandler<T> {
    copy(data: ClipboardCellData): T | undefined;
    pasteFromCopy(sheetId: UID, target: Zone[], content: T1[][], options?: ClipboardOptions): void;
    protected pasteZone(sheetId: UID, col: HeaderIndex, row: HeaderIndex, data: T1[][], clipboardOptions?: ClipboardOptions): void;
}

declare class AbstractFigureClipboardHandler<T> extends ClipboardHandler<T> {
    copy(data: ClipboardFigureData): T | undefined;
}

interface ActionSpec {
    /**
     * String or a function to compute the name
     */
    name: string | ((env: SpreadsheetChildEnv) => string);
    description?: string | ((env: SpreadsheetChildEnv) => string);
    /**
     * which represents its position inside the
     * menus (the lower sequence it has, the upper it is in the menu)
     */
    sequence?: number;
    /**
     * used for example to add child
     */
    id?: string;
    /**
     * Can be defined to compute the visibility of the item
     */
    isVisible?: (env: SpreadsheetChildEnv) => boolean;
    /**
     * Can be defined to compute if the user can click on the action
     */
    isEnabled?: (env: SpreadsheetChildEnv) => boolean;
    /**
     * Can be defined to compute if the action is active
     */
    isActive?: (env: SpreadsheetChildEnv) => boolean;
    /**
     * Can be defined to display an icon
     */
    icon?: string | ((env: SpreadsheetChildEnv) => string);
    iconColor?: Color;
    /**
     * Can be defined to display another icon on the right of the item.
     */
    secondaryIcon?: string | ((env: SpreadsheetChildEnv) => string);
    /**
     * is the action allowed when running spreadsheet in readonly mode
     */
    isReadonlyAllowed?: boolean;
    /**
     * Execute the action. The action can return a result.
     * The result will be carried by a `menu-clicked` event to the menu parent component.
     */
    execute?: (env: SpreadsheetChildEnv) => unknown;
    /**
     * subitems associated to this item
     * NB: an action without an execute function or children is not displayed !
     */
    children?: ActionChildren;
    /**
     * whether it should add a separator below the item in menus
     * NB: a separator defined on the last item is not displayed !
     */
    separator?: boolean;
    textColor?: Color;
    onStartHover?: (env: SpreadsheetChildEnv) => void;
    onStopHover?: (env: SpreadsheetChildEnv) => void;
}
interface Action {
    name: (env: SpreadsheetChildEnv) => string;
    description: (env: SpreadsheetChildEnv) => string;
    sequence: number;
    id: string;
    isVisible: (env: SpreadsheetChildEnv) => boolean;
    isEnabled: (env: SpreadsheetChildEnv) => boolean;
    isActive?: (env: SpreadsheetChildEnv) => boolean;
    icon: (env: SpreadsheetChildEnv) => string;
    iconColor?: Color;
    secondaryIcon: (env: SpreadsheetChildEnv) => string;
    isReadonlyAllowed: boolean;
    execute?: (env: SpreadsheetChildEnv) => unknown;
    children: (env: SpreadsheetChildEnv) => Action[];
    separator: boolean;
    textColor?: Color;
    onStartHover?: (env: SpreadsheetChildEnv) => void;
    onStopHover?: (env: SpreadsheetChildEnv) => void;
}
type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
type ActionChildren = (ActionSpec | ActionBuilder)[];
declare function createActions(menuItems: ActionSpec[]): Action[];
declare function createAction(item: ActionSpec): Action;

interface NumberFormatActionSpec extends ActionSpec {
    format?: Format | ((env: SpreadsheetChildEnv) => Format);
}
/**
 * Create a format action specification for a given format.
 * The format can be dynamically computed from the environment.
 */
declare function createFormatActionSpec({ name, format, descriptionValue, }: {
    name: string;
    descriptionValue: CellValue;
    format: Format | ((env: SpreadsheetChildEnv) => Format);
}): NumberFormatActionSpec;
declare const formatNumberAutomatic: NumberFormatActionSpec;
declare const formatNumberPlainText: NumberFormatActionSpec;
declare const formatNumberNumber: NumberFormatActionSpec;
declare const formatPercent: ActionSpec;
declare const formatNumberPercent: NumberFormatActionSpec;
declare const formatNumberCurrency: NumberFormatActionSpec;
declare const formatNumberCurrencyRounded: NumberFormatActionSpec;
declare const formatNumberAccounting: NumberFormatActionSpec;
declare const EXAMPLE_DATE: CellValue;
declare const formatCustomCurrency: ActionSpec;
declare const formatNumberDate: NumberFormatActionSpec;
declare const formatNumberTime: NumberFormatActionSpec;
declare const formatNumberDateTime: NumberFormatActionSpec;
declare const formatNumberDuration: NumberFormatActionSpec;
declare const formatNumberQuarter: NumberFormatActionSpec;
declare const formatNumberFullQuarter: NumberFormatActionSpec;
declare const moreFormats: ActionSpec;
declare const formatNumberFullDateTime: NumberFormatActionSpec;
declare const formatNumberFullWeekDayAndMonth: NumberFormatActionSpec;
declare const formatNumberDayAndFullMonth: NumberFormatActionSpec;
declare const formatNumberShortWeekDay: NumberFormatActionSpec;
declare const formatNumberDayAndShortMonth: NumberFormatActionSpec;
declare const formatNumberFullMonth: NumberFormatActionSpec;
declare const formatNumberShortMonth: NumberFormatActionSpec;
declare const incraseDecimalPlaces: ActionSpec;
declare const decraseDecimalPlaces: ActionSpec;
declare const formatBold: ActionSpec;
declare const formatItalic: ActionSpec;
declare const formatUnderline: ActionSpec;
declare const formatStrikethrough: ActionSpec;
declare const formatFontSize: ActionSpec;
declare const formatAlignment: ActionSpec;
declare const formatAlignmentHorizontal: ActionSpec;
declare const formatAlignmentLeft: ActionSpec;
declare const formatAlignmentCenter: ActionSpec;
declare const formatAlignmentRight: ActionSpec;
declare const formatAlignmentVertical: ActionSpec;
declare const formatAlignmentTop: ActionSpec;
declare const formatAlignmentMiddle: ActionSpec;
declare const formatAlignmentBottom: ActionSpec;
declare const formatWrappingIcon: ActionSpec;
declare const formatWrapping: ActionSpec;
declare const formatWrappingOverflow: ActionSpec;
declare const formatWrappingWrap: ActionSpec;
declare const formatWrappingClip: ActionSpec;
declare const textColor: ActionSpec;
declare const fillColor: ActionSpec;
declare const formatCF: ActionSpec;
declare const clearFormat: ActionSpec;

declare const ACTION_FORMAT_EXAMPLE_DATE: typeof EXAMPLE_DATE;
type ACTION_FORMAT_NumberFormatActionSpec = NumberFormatActionSpec;
declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
declare const ACTION_FORMAT_createFormatActionSpec: typeof createFormatActionSpec;
declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
declare const ACTION_FORMAT_fillColor: typeof fillColor;
declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
declare const ACTION_FORMAT_formatBold: typeof formatBold;
declare const ACTION_FORMAT_formatCF: typeof formatCF;
declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
declare const ACTION_FORMAT_formatNumberAccounting: typeof formatNumberAccounting;
declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
declare const ACTION_FORMAT_formatNumberDayAndFullMonth: typeof formatNumberDayAndFullMonth;
declare const ACTION_FORMAT_formatNumberDayAndShortMonth: typeof formatNumberDayAndShortMonth;
declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
declare const ACTION_FORMAT_formatNumberFullDateTime: typeof formatNumberFullDateTime;
declare const ACTION_FORMAT_formatNumberFullMonth: typeof formatNumberFullMonth;
declare const ACTION_FORMAT_formatNumberFullQuarter: typeof formatNumberFullQuarter;
declare const ACTION_FORMAT_formatNumberFullWeekDayAndMonth: typeof formatNumberFullWeekDayAndMonth;
declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
declare const ACTION_FORMAT_formatNumberPlainText: typeof formatNumberPlainText;
declare const ACTION_FORMAT_formatNumberQuarter: typeof formatNumberQuarter;
declare const ACTION_FORMAT_formatNumberShortMonth: typeof formatNumberShortMonth;
declare const ACTION_FORMAT_formatNumberShortWeekDay: typeof formatNumberShortWeekDay;
declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
declare const ACTION_FORMAT_formatWrapping: typeof formatWrapping;
declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
declare const ACTION_FORMAT_moreFormats: typeof moreFormats;
declare const ACTION_FORMAT_textColor: typeof textColor;
declare namespace ACTION_FORMAT {
  export {
    ACTION_FORMAT_EXAMPLE_DATE as EXAMPLE_DATE,
    ACTION_FORMAT_NumberFormatActionSpec as NumberFormatActionSpec,
    ACTION_FORMAT_clearFormat as clearFormat,
    ACTION_FORMAT_createFormatActionSpec as createFormatActionSpec,
    ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
    ACTION_FORMAT_fillColor as fillColor,
    ACTION_FORMAT_formatAlignment as formatAlignment,
    ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
    ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
    ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
    ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
    ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
    ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
    ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
    ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
    ACTION_FORMAT_formatBold as formatBold,
    ACTION_FORMAT_formatCF as formatCF,
    ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
    ACTION_FORMAT_formatFontSize as formatFontSize,
    ACTION_FORMAT_formatItalic as formatItalic,
    ACTION_FORMAT_formatNumberAccounting as formatNumberAccounting,
    ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
    ACTION_FORMAT_formatNumberCurrency as formatNumberCurrency,
    ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
    ACTION_FORMAT_formatNumberDate as formatNumberDate,
    ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
    ACTION_FORMAT_formatNumberDayAndFullMonth as formatNumberDayAndFullMonth,
    ACTION_FORMAT_formatNumberDayAndShortMonth as formatNumberDayAndShortMonth,
    ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
    ACTION_FORMAT_formatNumberFullDateTime as formatNumberFullDateTime,
    ACTION_FORMAT_formatNumberFullMonth as formatNumberFullMonth,
    ACTION_FORMAT_formatNumberFullQuarter as formatNumberFullQuarter,
    ACTION_FORMAT_formatNumberFullWeekDayAndMonth as formatNumberFullWeekDayAndMonth,
    ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
    ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
    ACTION_FORMAT_formatNumberPlainText as formatNumberPlainText,
    ACTION_FORMAT_formatNumberQuarter as formatNumberQuarter,
    ACTION_FORMAT_formatNumberShortMonth as formatNumberShortMonth,
    ACTION_FORMAT_formatNumberShortWeekDay as formatNumberShortWeekDay,
    ACTION_FORMAT_formatNumberTime as formatNumberTime,
    ACTION_FORMAT_formatPercent as formatPercent,
    ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
    ACTION_FORMAT_formatUnderline as formatUnderline,
    ACTION_FORMAT_formatWrapping as formatWrapping,
    ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
    ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
    ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
    ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
    ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
    ACTION_FORMAT_moreFormats as moreFormats,
    ACTION_FORMAT_textColor as textColor,
  };
}

type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
type PopoverPropsPosition = "TopRight" | "BottomLeft";
type MaxSizedComponentConstructor = ComponentConstructor & {
    maxSize?: {
        maxWidth?: number;
        maxHeight?: number;
    };
};
/**
 * If the cell at the given position have an associated component (linkDisplay, errorTooltip, ...),
 * returns the parameters to display the component
 */
type CellPopoverBuilder = (position: CellPosition, getters: Getters) => CellPopoverComponent<MaxSizedComponentConstructor>;
interface PopoverBuilders {
    onOpen?: CellPopoverBuilder;
    onHover?: CellPopoverBuilder;
}
interface ClosedCellPopover {
    isOpen: false;
}
interface OpenCellPopover {
    isOpen: true;
    type: CellPopoverType;
    col: number;
    row: number;
}
/**
 * Description of a cell component.
 * i.e. which component class, which props and where to
 * display it relative to the cell
 */
type OpenCellPopoverComponent<C extends ComponentConstructor> = {
    isOpen: true;
    Component: C;
    props: PropsOf<C>;
    cellCorner: PopoverPropsPosition;
};
type CellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = ClosedCellPopover | OpenCellPopoverComponent<C>;
type PositionedCellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = {
    isOpen: true;
    Component: C;
    props: PropsOf<C>;
    anchorRect: Rect;
    cellCorner: PopoverPropsPosition;
};

interface LinkSpec {
    readonly match: (url: string) => boolean;
    readonly createLink: (url: string, label: string) => Link;
    /**
     * String used to display the URL in components.
     * Particularly useful for special links (sheet, etc.)
     * - a simple web link displays the raw url
     * - a link to a sheet displays the sheet name
     */
    readonly urlRepresentation: (url: string, getters: Getters) => string;
    readonly open: (url: string, env: SpreadsheetChildEnv) => void;
    readonly sequence: number;
}
declare function urlRepresentation(link: Link, getters: Getters): string;
declare function openLink(link: Link, env: SpreadsheetChildEnv): void;

type TransformationFunction<U extends CoreCommandTypes, V extends CoreCommandTypes> = (toTransform: Extract<CoreCommand, {
    type: U;
}>, executed: Extract<CoreCommand, {
    type: V;
}>) => CoreCommand | undefined;
declare class OTRegistry extends Registry<Map<CoreCommandTypes, TransformationFunction<CoreCommandTypes, CoreCommandTypes>>> {
    /**
     * Add a transformation function to the registry. When the executed command
     * happened, all the commands in toTransforms should be transformed using the
     * transformation function given
     */
    addTransformation<U extends CoreCommandTypes, V extends CoreCommandTypes>(executed: U, toTransforms: V[], fn: TransformationFunction<CoreCommandTypes, CoreCommandTypes>): this;
    /**
     * Get the transformation function to transform the command toTransform, after
     * that the executed command happened.
     */
    getTransformation<U extends CoreCommandTypes, V extends CoreCommandTypes>(toTransform: U, executed: V): TransformationFunction<CoreCommandTypes, CoreCommandTypes> | undefined;
}

interface CellClickableItem {
    condition: (position: CellPosition, getters: Getters) => boolean;
    execute: (position: CellPosition, env: SpreadsheetChildEnv) => void;
    title?: string;
    sequence: number;
}

interface TopbarComponent {
    id: UID;
    component: any;
    isVisible?: (env: SpreadsheetChildEnv) => boolean;
    sequence: number;
}

/**
 * Instantiate a chart object based on a definition
 */
interface ChartBuilder {
    /**
     * Check if this factory should be used
     */
    match: (type: ChartType) => boolean;
    createChart: (definition: ChartDefinition, sheetId: UID, getters: CoreGetters) => AbstractChart;
    getChartRuntime: (chart: AbstractChart, getters: Getters) => ChartRuntime;
    validateChartDefinition(validator: Validator, definition: ChartDefinition): CommandResult | CommandResult[];
    transformDefinition(definition: ChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): ChartDefinition;
    getChartDefinitionFromContextCreation(context: ChartCreationContext): ChartDefinition;
    sequence: number;
}
type ChartUICategory = keyof typeof chartCategories;
declare const chartCategories: {
    line: string;
    column: string;
    bar: string;
    area: string;
    pie: string;
    misc: string;
};
interface ChartSubtypeProperties {
    /** Type shown in the chart side panel */
    chartSubtype: string;
    /** Translated name of the displayType */
    displayName: string;
    /** Type of the chart in the model */
    chartType: ChartType;
    /** Match the chart type with a chart display type. Optional if chartType === displayType  */
    matcher?: (definition: ChartDefinition) => boolean;
    /** Additional definition options to create a chart of type displayType */
    subtypeDefinition?: Partial<ChartDefinition>;
    category: ChartUICategory;
    preview: string;
}

interface Props$1d {
    label?: string;
    value: boolean;
    className?: string;
    name?: string;
    title?: string;
    disabled?: boolean;
    onChange: (value: boolean) => void;
}
declare class Checkbox extends Component<Props$1d, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        label: {
            type: StringConstructor;
            optional: boolean;
        };
        value: {
            type: BooleanConstructor;
            optional: boolean;
        };
        className: {
            type: StringConstructor;
            optional: boolean;
        };
        name: {
            type: StringConstructor;
            optional: boolean;
        };
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        disabled: {
            type: BooleanConstructor;
            optional: boolean;
        };
        onChange: FunctionConstructor;
    };
    static defaultProps: {
        value: boolean;
    };
    onChange(ev: InputEvent): void;
}

interface Props$1c {
    class?: string;
}
declare class Section extends Component<Props$1c, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        class: {
            type: StringConstructor;
            optional: boolean;
        };
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        slots: ObjectConstructor;
    };
}

declare class SpreadsheetStore extends DisposableStore {
    protected model: Model;
    protected getters: Getters;
    private renderer;
    constructor(get: Get);
    get renderingLayers(): Readonly<LayerName[]>;
    protected handle(cmd: Command): void;
    protected finalize(): void;
    drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
}

interface HighlightProvider {
    highlights: Highlight$1[];
}
declare class HighlightStore extends SpreadsheetStore {
    mutators: readonly ["register", "unRegister"];
    private providers;
    constructor(get: Get);
    get renderingLayers(): readonly ["Highlights"];
    get highlights(): Highlight$1[];
    register(highlightProvider: HighlightProvider): void;
    unRegister(highlightProvider: HighlightProvider): void;
    drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
}

interface RangeInputValue {
    id: number;
    xc: string;
    color: Color;
}
/**
 * Selection input Plugin
 *
 * The SelectionInput component input and output are both arrays of strings, but
 * it requires an intermediary internal state to work.
 * This plugin handles this internal state.
 */
declare class SelectionInputStore extends SpreadsheetStore {
    private initialRanges;
    private readonly inputHasSingleRange;
    colors: Color[];
    mutators: readonly ["resetWithRanges", "focusById", "unfocus", "addEmptyRange", "removeRange", "changeRange", "reset", "confirm", "updateColors"];
    private ranges;
    focusedRangeIndex: number | null;
    private inputSheetId;
    private focusStore;
    protected highlightStore: {
        readonly register: (highlightProvider: HighlightProvider) => void;
        readonly unRegister: (highlightProvider: HighlightProvider) => void;
        readonly mutators: readonly ["register", "unRegister"];
        readonly renderingLayers: readonly ["Highlights"];
        readonly highlights: Highlight$1[];
    };
    constructor(get: Get, initialRanges?: string[], inputHasSingleRange?: boolean, colors?: Color[]);
    handleEvent(event: SelectionEvent): void;
    handle(cmd: Command): void;
    changeRange(rangeId: number, value: string): void;
    addEmptyRange(): void;
    removeRange(rangeId: number): void;
    updateColors(colors: Color[]): void;
    confirm(): void;
    reset(): void;
    get selectionInputValues(): string[];
    /**
     * Return a list of all valid XCs.
     * e.g. ["A1", "Sheet2!B3", "E12"]
     */
    get selectionInputs(): (RangeInputValue & {
        isFocused: boolean;
        isValidRange: boolean;
    })[];
    get isResettable(): boolean;
    get isConfirmable(): boolean;
    get hasFocus(): boolean;
    private get hasMainFocus();
    get highlights(): Highlight$1[];
    focusById(rangeId: number): void;
    /**
     * Focus a given range or remove the focus.
     */
    private focus;
    private focusLast;
    unfocus(): void;
    private captureSelection;
    resetWithRanges(ranges: string[]): void;
    private setContent;
    /**
     * Insert new inputs after the given index.
     */
    private insertNewRange;
    /**
     * Set a new value in a given range input. If more than one value is provided,
     * new inputs will be added.
     */
    private setRange;
    private removeRangeByIndex;
    /**
     * Converts highlights input format to the command format.
     * The first xc in the input range will keep its color.
     * Invalid ranges and ranges from other sheets than the active sheets
     * are ignored.
     */
    private inputToHighlights;
    private cleanInputs;
    /**
     * Check if a cell or range reference should be highlighted.
     * It should be highlighted if it references the current active sheet.
     * Note that if no sheet name is given in the reference ("A1"), it refers to the
     * active sheet when the selection input was enabled which might be different from
     * the current active sheet.
     */
    private shouldBeHighlighted;
    /**
     * Return the index of a range given its id
     * or `null` if the range is not found.
     */
    getIndex(rangeId: number | null): number | null;
}

interface Props$1b {
    ranges: string[];
    hasSingleRange?: boolean;
    required?: boolean;
    isInvalid?: boolean;
    class?: string;
    onSelectionChanged?: (ranges: string[]) => void;
    onSelectionReordered?: (indexes: number[]) => void;
    onSelectionRemoved?: (index: number) => void;
    onSelectionConfirmed?: () => void;
    colors?: Color[];
}
interface SelectionRange extends Omit<RangeInputValue, "color"> {
    isFocused: boolean;
    isValidRange: boolean;
    color?: Color;
}
/**
 * This component can be used when the user needs to input some
 * ranges. He can either input the ranges with the regular DOM `<input/>`
 * displayed or by selecting zones on the grid.
 *
 * onSelectionChanged is called every time the input value
 * changes.
 */
declare class SelectionInput extends Component<Props$1b, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        ranges: ArrayConstructor;
        hasSingleRange: {
            type: BooleanConstructor;
            optional: boolean;
        };
        required: {
            type: BooleanConstructor;
            optional: boolean;
        };
        isInvalid: {
            type: BooleanConstructor;
            optional: boolean;
        };
        class: {
            type: StringConstructor;
            optional: boolean;
        };
        onSelectionChanged: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onSelectionConfirmed: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onSelectionReordered: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onSelectionRemoved: {
            type: FunctionConstructor;
            optional: boolean;
        };
        colors: {
            type: ArrayConstructor;
            optional: boolean;
            default: never[];
        };
    };
    private state;
    private dragAndDrop;
    private focusedInput;
    private selectionRef;
    private store;
    get ranges(): SelectionRange[];
    get canAddRange(): boolean;
    get isInvalid(): boolean;
    get isConfirmable(): boolean;
    get isResettable(): boolean;
    setup(): void;
    startDragAndDrop(rangeId: number, event: MouseEvent): void;
    getRangeElementsRects(): DOMRect[];
    getColor(range: SelectionRange): string;
    private triggerChange;
    onKeydown(ev: KeyboardEvent): void;
    private extractRanges;
    focus(rangeId: number): void;
    addEmptyInput(): void;
    removeInput(rangeId: number): void;
    onInputChanged(rangeId: number, ev: InputEvent): void;
    reset(): void;
    confirm(): void;
}

interface Props$1a {
    ranges: CustomizedDataSet[];
    hasSingleRange?: boolean;
    onSelectionChanged: (ranges: string[]) => void;
    onSelectionReordered?: (indexes: number[]) => void;
    onSelectionRemoved?: (index: number) => void;
    onSelectionConfirmed: () => void;
}
declare class ChartDataSeries extends Component<Props$1a, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        SelectionInput: typeof SelectionInput;
        Section: typeof Section;
    };
    static props: {
        ranges: ArrayConstructor;
        hasSingleRange: {
            type: BooleanConstructor;
            optional: boolean;
        };
        onSelectionChanged: FunctionConstructor;
        onSelectionReordered: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onSelectionRemoved: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onSelectionConfirmed: FunctionConstructor;
    };
    get ranges(): string[];
    get colors(): (Color | undefined)[];
    get title(): string;
}

interface Props$19 {
    messages: string[];
    msgType: "warning" | "error" | "info";
    singleBox?: boolean;
}
declare class ValidationMessages extends Component<Props$19, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        messages: ArrayConstructor;
        msgType: StringConstructor;
        singleBox: {
            type: BooleanConstructor;
            optional: boolean;
        };
    };
    get divClasses(): "o-validation-warning" | "o-validation-info" | "o-validation-error";
    get alertBoxes(): string[][];
}

interface Props$18 {
    messages: string[];
}
declare class ChartErrorSection extends Component<Props$18, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
        ValidationMessages: typeof ValidationMessages;
    };
    static props: {
        messages: {
            type: ArrayConstructor;
            element: StringConstructor;
        };
    };
}

interface Props$17 {
    title?: string;
    range: string;
    isInvalid: boolean;
    onSelectionChanged: (range: string) => void;
    onSelectionConfirmed: () => void;
    options?: Array<{
        name: string;
        label: string;
        value: boolean;
        onChange: (value: boolean) => void;
    }>;
}
declare class ChartLabelRange extends Component<Props$17, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        SelectionInput: typeof SelectionInput;
        Checkbox: typeof Checkbox;
        Section: typeof Section;
    };
    static props: {
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        range: StringConstructor;
        isInvalid: BooleanConstructor;
        onSelectionChanged: FunctionConstructor;
        onSelectionConfirmed: FunctionConstructor;
        options: {
            type: ArrayConstructor;
            optional: boolean;
        };
    };
    static defaultProps: Partial<Props$17>;
}

interface Props$16 {
    figureId: UID;
    definition: ChartWithDataSetDefinition;
    canUpdateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
}
interface ChartPanelState {
    datasetDispatchResult?: DispatchResult;
    labelsDispatchResult?: DispatchResult;
}
declare class GenericChartConfigPanel extends Component<Props$16, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        ChartDataSeries: typeof ChartDataSeries;
        ChartLabelRange: typeof ChartLabelRange;
        Section: typeof Section;
        Checkbox: typeof Checkbox;
        ChartErrorSection: typeof ChartErrorSection;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: FunctionConstructor;
    };
    protected state: ChartPanelState;
    protected dataSets: CustomizedDataSet[];
    private labelRange;
    protected chartTerms: {
        [key: string]: any;
        GeoChart: {
            ColorScales: Record<"blues" | "cividis" | "greens" | "greys" | "oranges" | "purples" | "rainbow" | "reds" | "viridis", string>;
        };
    };
    setup(): void;
    get errorMessages(): string[];
    get isDatasetInvalid(): boolean;
    get isLabelInvalid(): boolean;
    get dataSetsHaveTitleLabel(): string;
    getLabelRangeOptions(): {
        name: string;
        label: any;
        value: boolean;
        onChange: (aggregated: boolean) => void;
    }[];
    onUpdateDataSetsHaveTitle(dataSetsHaveTitle: boolean): void;
    /**
     * Change the local dataSeriesRanges. The model should be updated when the
     * button "confirm" is clicked
     */
    onDataSeriesRangesChanged(ranges: string[]): void;
    onDataSeriesReordered(indexes: number[]): void;
    onDataSeriesRemoved(index: number): void;
    onDataSeriesConfirmed(): void;
    getDataSeriesRanges(): CustomizedDataSet[];
    /**
     * Change the local labelRange. The model should be updated when the
     * button "confirm" is clicked
     */
    onLabelRangeChanged(ranges: string[]): void;
    onLabelRangeConfirmed(): void;
    getLabelRange(): string;
    onUpdateAggregated(aggregated: boolean): void;
    calculateHeaderPosition(): number | undefined;
}

declare class BarConfigPanel extends GenericChartConfigPanel {
    static template: string;
    get stackedLabel(): string;
    onUpdateStacked(stacked: boolean): void;
}

declare class SidePanelCollapsible extends Component {
    static template: string;
    static props: {
        slots: ObjectConstructor;
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        collapsedAtInit: {
            type: BooleanConstructor;
            optional: boolean;
        };
        class: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    currentId: string;
}

interface Choice$1 {
    value: string;
    label: string;
}
interface Props$15 {
    choices: Choice$1[];
    onChange: (value: string) => void;
    selectedValue: string;
}
declare class BadgeSelection extends Component<Props$15, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        choices: ArrayConstructor;
        onChange: FunctionConstructor;
        selectedValue: StringConstructor;
    };
}

declare enum ComponentsImportance {
    Grid = 0,
    Highlight = 5,
    HeaderGroupingButton = 6,
    Figure = 10,
    ScrollBar = 15,
    GridPopover = 19,
    GridComposer = 20,
    Dropdown = 21,
    IconPicker = 25,
    TopBarComposer = 30,
    Popover = 35,
    FigureAnchor = 1000,
    FigureSnapLine = 1001,
    FigureTooltip = 1002
}
declare function setDefaultSheetViewSize(size: number): void;

interface PopoverProps {
    /**
     * Rectangle around which the popover is displayed.
     * Coordinates are expressed as absolute DOM position.
     */
    anchorRect: Rect;
    /** The popover can be positioned below the anchor Rectangle, or to the right of the rectangle */
    positioning: PopoverPropsPosition;
    maxWidth?: Pixel;
    maxHeight?: Pixel;
    /** Offset to apply to the vertical position of the popover.*/
    verticalOffset: number;
    onMouseWheel?: () => void;
    onPopoverMoved?: () => void;
    onPopoverHidden?: () => void;
    /** Setting popover to allow dynamic zIndex */
    zIndex?: Number;
}
declare class Popover extends Component<PopoverProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        anchorRect: ObjectConstructor;
        containerRect: {
            type: ObjectConstructor;
            optional: boolean;
        };
        positioning: {
            type: StringConstructor;
            optional: boolean;
        };
        maxWidth: {
            type: NumberConstructor;
            optional: boolean;
        };
        maxHeight: {
            type: NumberConstructor;
            optional: boolean;
        };
        verticalOffset: {
            type: NumberConstructor;
            optional: boolean;
        };
        onMouseWheel: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onPopoverHidden: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onPopoverMoved: {
            type: FunctionConstructor;
            optional: boolean;
        };
        zIndex: {
            type: NumberConstructor;
            optional: boolean;
        };
        slots: ObjectConstructor;
    };
    static defaultProps: {
        positioning: string;
        verticalOffset: number;
        onMouseWheel: () => void;
        onPopoverMoved: () => void;
        onPopoverHidden: () => void;
        zIndex: ComponentsImportance;
    };
    private popoverRef;
    private currentPosition;
    private currentDisplayValue;
    private spreadsheetRect;
    private containerRect;
    setup(): void;
    get popoverStyle(): string;
}

interface ColorPickerProps {
    anchorRect: Rect;
    maxHeight?: Pixel;
    onColorPicked: (color: Color) => void;
    currentColor: Color;
    disableNoColor?: boolean;
}
declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        onColorPicked: FunctionConstructor;
        currentColor: {
            type: StringConstructor;
            optional: boolean;
        };
        maxHeight: {
            type: NumberConstructor;
            optional: boolean;
        };
        anchorRect: ObjectConstructor;
        disableNoColor: {
            type: BooleanConstructor;
            optional: boolean;
        };
    };
    static defaultProps: {
        currentColor: string;
    };
    static components: {
        Popover: typeof Popover;
    };
    COLORS: Color[];
    private state;
    get colorPickerStyle(): string;
    get popoverProps(): PopoverProps;
    get gradientHueStyle(): string;
    get sliderStyle(): string;
    get pointerStyle(): string;
    get colorPreviewStyle(): string;
    get checkmarkColor(): Color;
    get isHexColorInputValid(): boolean;
    private setCustomGradient;
    private setCustomHue;
    private updateColor;
    onColorClick(color: Color): void;
    resetColor(): void;
    toggleColorPicker(): void;
    dragGradientPointer(ev: MouseEvent): void;
    dragHuePointer(ev: MouseEvent): void;
    setHexColor(ev: InputEvent): void;
    addCustomColor(ev: Event): void;
    isSameColor(color1: Color, color2: Color): boolean;
}

interface Props$14 {
    currentColor: string | undefined;
    toggleColorPicker: () => void;
    showColorPicker: boolean;
    onColorPicked: (color: string) => void;
    icon: string;
    title?: string;
    disabled?: boolean;
    dropdownMaxHeight?: Pixel;
    class?: string;
}
declare class ColorPickerWidget extends Component<Props$14, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        currentColor: {
            type: StringConstructor;
            optional: boolean;
        };
        toggleColorPicker: FunctionConstructor;
        showColorPicker: BooleanConstructor;
        onColorPicked: FunctionConstructor;
        icon: StringConstructor;
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        disabled: {
            type: BooleanConstructor;
            optional: boolean;
        };
        dropdownMaxHeight: {
            type: NumberConstructor;
            optional: boolean;
        };
        class: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    static components: {
        ColorPicker: typeof ColorPicker;
    };
    colorPickerButtonRef: {
        el: HTMLElement | null;
    };
    get iconStyle(): string;
    get colorPickerAnchorRect(): Rect;
}

declare class CellPopoverStore extends SpreadsheetStore {
    mutators: readonly ["open", "close"];
    private persistentPopover?;
    protected hoveredCell: {
        readonly clear: () => void;
        readonly hover: (position: Position$1) => void;
        readonly mutators: readonly ["clear", "hover"];
        readonly col: number | undefined;
        readonly row: number | undefined;
        readonly renderingLayers: readonly ("Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers")[];
    };
    handle(cmd: Command): void;
    open({ col, row }: Position$1, type: CellPopoverType): void;
    close(): void;
    get persistentCellPopover(): OpenCellPopover | ClosedCellPopover;
    get isOpen(): boolean;
    get cellPopover(): ClosedCellPopover | PositionedCellPopoverComponent;
    private computePopoverAnchorRect;
}

interface State$8 {
    isOpen: boolean;
}
interface Props$13 {
    currentFontSize: number;
    class: string;
    onFontSizeChanged: (fontSize: number) => void;
    onToggle?: () => void;
}
declare class FontSizeEditor extends Component<Props$13, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        currentFontSize: NumberConstructor;
        onFontSizeChanged: FunctionConstructor;
        onToggle: {
            type: FunctionConstructor;
            optional: boolean;
        };
        class: StringConstructor;
    };
    static components: {
        Popover: typeof Popover;
    };
    fontSizes: number[];
    dropdown: State$8;
    private inputRef;
    private rootEditorRef;
    private fontSizeListRef;
    setup(): void;
    get popoverProps(): PopoverProps;
    onExternalClick(ev: MouseEvent): void;
    toggleFontList(): void;
    closeFontList(): void;
    private setSize;
    setSizeFromInput(ev: InputEvent): void;
    setSizeFromList(fontSizeStr: string): void;
    onInputFocused(ev: InputEvent): void;
    onInputKeydown(ev: KeyboardEvent): void;
}

interface Props$12 {
    title?: string;
    updateTitle: (title: string) => void;
    name?: string;
    toggleItalic?: () => void;
    toggleBold?: () => void;
    updateAlignment?: (string: any) => void;
    updateColor?: (Color: any) => void;
    style: TitleDesign;
    onFontSizeChanged: (fontSize: number) => void;
}
declare class ChartTitle extends Component<Props$12, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
        ColorPickerWidget: typeof ColorPickerWidget;
        FontSizeEditor: typeof FontSizeEditor;
    };
    static props: {
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        updateTitle: FunctionConstructor;
        name: {
            type: StringConstructor;
            optional: boolean;
        };
        toggleItalic: {
            type: FunctionConstructor;
            optional: boolean;
        };
        toggleBold: {
            type: FunctionConstructor;
            optional: boolean;
        };
        updateAlignment: {
            type: FunctionConstructor;
            optional: boolean;
        };
        updateColor: {
            type: FunctionConstructor;
            optional: boolean;
        };
        style: ObjectConstructor;
        onFontSizeChanged: FunctionConstructor;
    };
    static defaultProps: {
        title: string;
    };
    openedEl: HTMLElement | null;
    setup(): void;
    state: {
        activeTool: string;
    };
    updateTitle(ev: InputEvent): void;
    updateFontSize(fontSize: number): void;
    toggleDropdownTool(tool: string, ev: MouseEvent): void;
    /**
     * TODO: This is clearly not a goot way to handle external click, but
     * we currently have no other way to do it ... Should be done in
     * another task to handle the fact we want only one menu opened at a
     * time with something like a menuStore ?
     */
    onExternalClick(ev: MouseEvent): void;
    onColorPicked(color: Color): void;
    updateAlignment(aligment: "left" | "center" | "right"): void;
    closeMenus(): void;
}

interface AxisDefinition {
    id: string;
    name: string;
}
interface Props$11 {
    figureId: UID;
    definition: ChartWithDataSetDefinition | WaterfallChartDefinition;
    updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition | WaterfallChartDefinition>) => DispatchResult;
    axesList: AxisDefinition[];
}
declare class AxisDesignEditor extends Component<Props$11, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
        ChartTitle: typeof ChartTitle;
        BadgeSelection: typeof BadgeSelection;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        axesList: ArrayConstructor;
    };
    state: {
        currentAxis: string;
    };
    get axisTitleStyle(): TitleDesign;
    get badgeAxes(): {
        value: string;
        label: string;
    }[];
    updateAxisTitleColor(color: Color): void;
    updateAxisTitleFontSize(fontSize: number): void;
    toggleBoldAxisTitle(): void;
    toggleItalicAxisTitle(): void;
    updateAxisTitleAlignment(align: "left" | "center" | "right"): void;
    updateAxisEditor(ev: any): void;
    getAxisTitle(): any;
    updateAxisTitle(text: string): void;
}

interface Props$10 {
    currentColor?: string;
    onColorPicked: (color: string) => void;
    title?: string;
    disableNoColor?: boolean;
}
declare class RoundColorPicker extends Component<Props$10, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
        ColorPicker: typeof ColorPicker;
    };
    static props: {
        currentColor: {
            type: StringConstructor;
            optional: boolean;
        };
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        onColorPicked: FunctionConstructor;
        disableNoColor: {
            type: BooleanConstructor;
            optional: boolean;
        };
    };
    colorPickerButtonRef: {
        el: HTMLElement | null;
    };
    private state;
    setup(): void;
    closePicker(): void;
    togglePicker(): void;
    onColorPicked(color: string): void;
    get colorPickerAnchorRect(): Rect;
    get buttonStyle(): string;
}

interface Props$$ {
    figureId: UID;
    definition: ChartDefinition;
    updateChart: (figureId: UID, definition: Partial<ChartDefinition>) => DispatchResult;
    defaultChartTitleFontSize?: number;
}
declare class GeneralDesignEditor extends Component<Props$$, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        RoundColorPicker: typeof RoundColorPicker;
        ChartTitle: typeof ChartTitle;
        Section: typeof Section;
        SidePanelCollapsible: typeof SidePanelCollapsible;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        defaultChartTitleFontSize: {
            type: NumberConstructor;
            optional: boolean;
        };
        slots: {
            type: ObjectConstructor;
            optional: boolean;
        };
    };
    static defaultProps: {
        defaultChartTitleFontSize: number;
    };
    private state;
    setup(): void;
    get title(): TitleDesign;
    toggleDropdownTool(tool: string, ev: MouseEvent): void;
    updateBackgroundColor(color: Color): void;
    updateTitle(newTitle: string): void;
    get titleStyle(): TitleDesign;
    updateChartTitleColor(color: Color): void;
    updateChartTitleFontSize(fontSize: number): void;
    toggleBoldChartTitle(): void;
    toggleItalicChartTitle(): void;
    updateChartTitleAlignment(align: "left" | "center" | "right"): void;
}

interface Props$_ {
    figureId: UID;
    definition: ChartWithDataSetDefinition;
    updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
}
declare class ChartLegend extends Component<Props$_, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
    };
    updateLegendPosition(ev: any): void;
}

interface Choice {
    value: unknown;
    label: string;
}
interface Props$Z {
    choices: Choice[];
    onChange: (value: unknown) => void;
    selectedValue: string;
    name: string;
    direction: "horizontal" | "vertical";
}
declare class RadioSelection extends Component<Props$Z, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        choices: ArrayConstructor;
        onChange: FunctionConstructor;
        selectedValue: {
            optional: boolean;
        };
        name: StringConstructor;
        direction: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    static defaultProps: {
        direction: string;
    };
}

interface Props$Y {
    figureId: UID;
    definition: ChartWithDataSetDefinition;
    canUpdateChart: (figureID: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
}
declare class SeriesDesignEditor extends Component<Props$Y, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        SidePanelCollapsible: typeof SidePanelCollapsible;
        Section: typeof Section;
        RoundColorPicker: typeof RoundColorPicker;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: FunctionConstructor;
        slots: {
            type: ObjectConstructor;
            optional: boolean;
        };
    };
    protected state: {
        index: number;
    };
    getDataSeries(): (string | undefined)[];
    updateEditedSeries(ev: Event): void;
    updateDataSeriesColor(color: string): void;
    getDataSeriesColor(): "" | Color;
    updateDataSeriesLabel(ev: Event): void;
    getDataSeriesLabel(): string | undefined;
}

interface Props$X {
    figureId: UID;
    definition: ChartWithDataSetDefinition;
    canUpdateChart: (figureID: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
}
declare class SeriesWithAxisDesignEditor extends Component<Props$X, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        SeriesDesignEditor: typeof SeriesDesignEditor;
        Checkbox: typeof Checkbox;
        RadioSelection: typeof RadioSelection;
        Section: typeof Section;
        RoundColorPicker: typeof RoundColorPicker;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        canUpdateChart: FunctionConstructor;
        updateChart: FunctionConstructor;
        slots: {
            type: ObjectConstructor;
            optional: boolean;
        };
    };
    axisChoices: {
        value: string;
        label: string;
    }[];
    updateDataSeriesAxis(index: number, axis: "left" | "right"): void;
    getDataSerieAxis(index: number): "left" | "right";
    get canHaveTwoVerticalAxis(): boolean;
    toggleDataTrend(index: number, display: boolean): void;
    getTrendLineConfiguration(index: number): TrendConfiguration | undefined;
    getTrendType(config: TrendConfiguration): "linear" | "" | TrendType | undefined;
    onChangeTrendType(index: any, ev: InputEvent): void;
    getPolynomialDegrees(index: number): number[];
    onChangePolynomialDegree(index: number, ev: InputEvent): void;
    getMaxPolynomialDegree(index: any): number;
    get defaultWindowSize(): number;
    onChangeMovingAverageWindow(index: number, ev: InputEvent): void;
    getDataSeriesColor(index: number): "" | Color;
    getTrendLineColor(index: number): string;
    updateTrendLineColor(index: number, color: Color): void;
    updateTrendLineValue(index: number, config: any): void;
}

interface Props$W {
    figureId: UID;
    definition: ChartWithDataSetDefinition;
    canUpdateChart: (figureID: UID, definition: GenericDefinition<ChartWithDataSetDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: GenericDefinition<ChartWithDataSetDefinition>) => DispatchResult;
}
declare class ChartWithAxisDesignPanel<P extends Props$W = Props$W> extends Component<P, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        GeneralDesignEditor: typeof GeneralDesignEditor;
        SidePanelCollapsible: typeof SidePanelCollapsible;
        Section: typeof Section;
        AxisDesignEditor: typeof AxisDesignEditor;
        Checkbox: typeof Checkbox;
        SeriesWithAxisDesignEditor: typeof SeriesWithAxisDesignEditor;
        ChartLegend: typeof ChartLegend;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        canUpdateChart: FunctionConstructor;
        updateChart: FunctionConstructor;
    };
    get axesList(): AxisDefinition[];
}

interface Props$V {
    figureId: UID;
    definition: GaugeChartDefinition;
    canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
}
declare class GaugeChartConfigPanel extends Component<Props$V, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        ChartErrorSection: typeof ChartErrorSection;
        ChartDataSeries: typeof ChartDataSeries;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: FunctionConstructor;
    };
    private state;
    private dataRange;
    get configurationErrorMessages(): string[];
    get isDataRangeInvalid(): boolean;
    onDataRangeChanged(ranges: string[]): void;
    updateDataRange(): void;
    getDataRange(): CustomizedDataSet;
}

interface FunctionContext {
    /**
     * The parent function name of the token.
     */
    parent: string;
    /**
     * The position of the token within the argument list of its parent function.
     */
    argPosition: number;
    /**
     * An array of parsed arguments, possibly containing undefined values if the argument
     * is empty or is an invalid expression.
     */
    args: (AST | undefined)[];
    /**
     * Array of token arrays representing the tokens for each argument.
     * Needed as an intermediate step to parse the arguments AST (see `args` property).
     */
    argsTokens?: Token[][];
}
/**
 * Enriched Token is used by the composer to add information on the tokens that
 * are only needed during the edition of a formula.
 *
 * The information added are:
 * - start, end and length of each token
 * - parenthesesCode (a code indicating the position of the token in the parentheses tree)
 * - functionContext (only for tokens surrounded by a function)
 * - color (the base color of the token, without fading modification)
 * - isBlurred (indicates whether the text should be highlighted or not, useful to know if the token matches the same formula as the cursor token)
 * - isParenthesisLinkedToCursor (Useful for highlighting tokens related to the current token, such as matching parentheses)
 */
interface EnrichedToken extends Token {
    start: number;
    end: number;
    length: number;
    parenthesesCode?: string;
    functionContext?: FunctionContext;
    color?: Color;
    isBlurred?: boolean;
    isParenthesisLinkedToCursor?: boolean;
}

interface Props$U {
    proposals: AutoCompleteProposal[];
    selectedIndex: number | undefined;
    onValueSelected: (value: string) => void;
    onValueHovered: (index: string) => void;
}
declare class TextValueProvider extends Component<Props$U> {
    static template: string;
    static props: {
        proposals: ArrayConstructor;
        selectedIndex: {
            type: NumberConstructor;
            optional: boolean;
        };
        onValueSelected: FunctionConstructor;
        onValueHovered: FunctionConstructor;
    };
    private autoCompleteListRef;
    setup(): void;
}

declare class AutoCompleteStore extends SpreadsheetStore {
    mutators: readonly ["useProvider", "moveSelection", "hide", "selectIndex"];
    selectedIndex: number | undefined;
    provider: AutoCompleteProvider | undefined;
    get selectedProposal(): AutoCompleteProposal | undefined;
    useProvider(provider: AutoCompleteProvider): void;
    hide(): void;
    selectIndex(index: number): void;
    moveSelection(direction: "previous" | "next"): void;
}

declare class ContentEditableHelper {
    el: HTMLElement;
    constructor(el: HTMLElement);
    updateEl(el: HTMLElement): void;
    /**
     * select the text at position start to end, no matter the children
     */
    selectRange(start: number, end: number): void;
    /**
     * finds the dom element that contains the character at `offset`
     */
    private findChildAtCharacterIndex;
    /**
     * Sets (or Replaces all) the text inside the root element in the form of distinctive paragraphs and
     * span for each element provided in `contents`.
     *
     * The function will apply the diff between the current content and the new content to avoid the systematic
     * destruction of DOM elements which interferes with IME[1]
     *
     * Each line of text will be encapsulated in a paragraph element.
     * Each span will have its own fontcolor and specific class if provided in the HtmlContent object.
     *
     * [1] https://developer.mozilla.org/en-US/docs/Glossary/Input_method_editor
     */
    setText(contents: HtmlContent[][]): void;
    scrollSelectionIntoView(): void;
    /**
     * remove the current selection of the user
     * */
    removeSelection(): void;
    private removeAll;
    /**
     * finds the indexes of the current selection.
     * */
    getCurrentSelection(): {
        start: number;
        end: number;
    };
    getText(): string;
}

interface Props$T {
    functionName: string;
    functionDescription: FunctionDescription;
    argToFocus: number;
}
declare class FunctionDescriptionProvider extends Component<Props$T, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        functionName: StringConstructor;
        functionDescription: ObjectConstructor;
        argToFocus: NumberConstructor;
    };
    getContext(): Props$T;
    get formulaArgSeparator(): string;
}

declare const tokenColors: {
    readonly OPERATOR: "#3da4ab";
    readonly NUMBER: "#02c39a";
    readonly STRING: "#00a82d";
    readonly FUNCTION: Color;
    readonly DEBUGGER: "#3da4ab";
    readonly LEFT_PAREN: Color;
    readonly RIGHT_PAREN: Color;
    readonly ARG_SEPARATOR: Color;
    readonly ORPHAN_RIGHT_PAREN: "#ff0000";
};
interface ComposerSelection {
    start: number;
    end: number;
}
declare abstract class AbstractComposerStore extends SpreadsheetStore {
    mutators: readonly ["startEdition", "setCurrentContent", "stopEdition", "stopComposerRangeSelection", "cancelEdition", "cycleReferences", "toggleEditionMode", "changeComposerCursorSelection", "replaceComposerCursorSelection"];
    protected col: HeaderIndex;
    protected row: HeaderIndex;
    editionMode: EditionMode;
    sheetId: UID;
    protected _currentContent: string;
    currentTokens: EnrichedToken[];
    protected selectionStart: number;
    protected selectionEnd: number;
    protected initialContent: string | undefined;
    private colorIndexByRange;
    protected notificationStore: {
        readonly notifyUser: (notification: InformationNotification) => void;
        readonly raiseError: (text: string, callback?: (() => void) | undefined) => void;
        readonly askConfirmation: (content: string, confirm: () => void, cancel?: (() => void) | undefined) => void;
        readonly updateNotificationCallbacks: (methods: Partial<NotificationStoreMethods>) => void;
        readonly mutators: readonly ["notifyUser", "raiseError", "askConfirmation", "updateNotificationCallbacks"];
    };
    private highlightStore;
    constructor(get: Get);
    protected abstract confirmEdition(content: string): void;
    protected abstract getComposerContent(position: CellPosition): string;
    abstract stopEdition(direction?: Direction$1): void;
    private handleEvent;
    changeComposerCursorSelection(start: number, end: number): void;
    stopComposerRangeSelection(): void;
    startEdition(text?: string, selection?: ComposerSelection): void;
    cancelEdition(): void;
    setCurrentContent(content: string, selection?: ComposerSelection): void;
    replaceComposerCursorSelection(text: string): void;
    handle(cmd: Command): void;
    get currentContent(): string;
    get composerSelection(): ComposerSelection;
    get isSelectingRange(): boolean;
    get showSelectionIndicator(): boolean;
    /**
     * Return the (enriched) token just before the cursor.
     */
    get tokenAtCursor(): EnrichedToken | undefined;
    cycleReferences(): void;
    toggleEditionMode(): void;
    private captureSelection;
    private isSelectionValid;
    /**
     * Enable the selecting mode
     */
    private startComposerRangeSelection;
    /**
     * start the edition of a cell
     * @param str the key that is used to start the edition if it is a "content" key like a letter or number
     * @param selection
     * @private
     */
    private _startEdition;
    protected _stopEdition(): void;
    protected getCurrentCanonicalContent(): string;
    protected cancelEditionAndActivateSheet(): void;
    protected _cancelEdition(): void;
    /**
     * Reset the current content to the active cell content
     */
    protected resetContent(): void;
    protected setContent(text: string, selection?: ComposerSelection, raise?: boolean): void;
    protected getAutoCompleteProviders(): AutoCompleteProviderDefinition[];
    private insertSelectedRange;
    /**
     * Replace the current reference selected by the new one.
     * */
    private replaceSelectedRange;
    /**
     * Replace the reference of the old zone by the new one.
     */
    private updateComposerRange;
    protected getZoneReference(zone: Zone | UnboundedZone): string;
    private getRangeReference;
    /**
     * Replace the current selection by a new text.
     * The cursor is then set at the end of the text.
     */
    private replaceSelection;
    private replaceText;
    /**
     * Insert a text at the given position.
     * The cursor is then set at the end of the text.
     */
    private insertText;
    private updateTokenColor;
    protected getTokenColor(token: EnrichedToken): string;
    private rangeColor;
    /**
     * Compute for each token if it is part of the same
     * formula as the current selector token.
     * If no specific formula found for the current selected
     * token, it assumes all tokens are part of the formula
     * context.
     */
    private computeFormulaCursorContext;
    private getParenthesesCodeAfterCursor;
    private computeParenthesisRelatedToCursor;
    private updateRangeColor;
    /**
     * Highlight all ranges that can be found in the composer content.
     */
    get highlights(): Highlight$1[];
    /**
     * Return ranges currently referenced in the composer
     */
    private getReferencedRanges;
    get autocompleteProvider(): AutoCompleteProvider | undefined;
    /**
     * Function used to determine when composer selection can start.
     * Three conditions are necessary:
     * - the previous token is among ["ARG_SEPARATOR", "LEFT_PAREN", "OPERATOR"], and is not a postfix unary operator
     * - the next token is missing or is among ["ARG_SEPARATOR", "RIGHT_PAREN", "OPERATOR"]
     * - Previous and next tokens can be separated by spaces
     */
    private canStartComposerRangeSelection;
}

declare class CellComposerStore extends AbstractComposerStore {
    private canStopEdition;
    stopEdition(direction?: Direction$1): void;
    handle(cmd: Command): void;
    get placeholder(): string | undefined;
    get currentEditedCell(): CellPosition;
    private onColumnsRemoved;
    private onRowsRemoved;
    private onAddElements;
    protected confirmEdition(content: string): void;
    protected getComposerContent(position: CellPosition): string;
    private numberComposerContent;
    /** Add headers at the end of the sheet so the formula in the composer has enough space to spread */
    private addHeadersForSpreadingFormula;
    private checkDataValidation;
}

type HtmlContent = {
    value: string;
    color?: Color;
    class?: string;
};
interface CellComposerProps {
    focus: ComposerFocusType;
    inputStyle?: string;
    rect?: Rect;
    delimitation?: DOMDimension;
    onComposerContentFocused: () => void;
    onComposerCellFocused?: (content: String) => void;
    onInputContextMenu?: (event: MouseEvent) => void;
    isDefaultFocus?: boolean;
    composerStore: Store<CellComposerStore>;
    placeholder?: string;
}
interface ComposerState {
    positionStart: number;
    positionEnd: number;
}
interface FunctionDescriptionState {
    showDescription: boolean;
    functionName: string;
    functionDescription: FunctionDescription;
    argToFocus: number;
}
declare class Composer extends Component<CellComposerProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        focus: {
            validate: (value: string) => boolean;
        };
        inputStyle: {
            type: StringConstructor;
            optional: boolean;
        };
        rect: {
            type: ObjectConstructor;
            optional: boolean;
        };
        delimitation: {
            type: ObjectConstructor;
            optional: boolean;
        };
        onComposerCellFocused: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onComposerContentFocused: FunctionConstructor;
        isDefaultFocus: {
            type: BooleanConstructor;
            optional: boolean;
        };
        onInputContextMenu: {
            type: FunctionConstructor;
            optional: boolean;
        };
        composerStore: ObjectConstructor;
        placeholder: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    static components: {
        TextValueProvider: typeof TextValueProvider;
        FunctionDescriptionProvider: typeof FunctionDescriptionProvider;
    };
    static defaultProps: {
        inputStyle: string;
        isDefaultFocus: boolean;
    };
    private DOMFocusableElementStore;
    composerRef: {
        el: HTMLElement | null;
    };
    contentHelper: ContentEditableHelper;
    composerState: ComposerState;
    autoCompleteState: Store<AutoCompleteStore>;
    functionDescriptionState: FunctionDescriptionState;
    assistant: {
        forcedClosed: boolean;
    };
    private compositionActive;
    private spreadsheetRect;
    get assistantStyleProperties(): CSSProperties;
    get assistantStyle(): string;
    get assistantContainerStyle(): string;
    shouldProcessInputEvents: boolean;
    tokens: EnrichedToken[];
    keyMapping: {
        [key: string]: Function;
    };
    keyCodeMapping: {
        [keyCode: string]: Function;
    };
    setup(): void;
    private processArrowKeys;
    private handleArrowKeysForAutocomplete;
    private processTabKey;
    private processEnterKey;
    private processNewLineEvent;
    private processEscapeKey;
    private processF4Key;
    private toggleEditionMode;
    private processNumpadDecimal;
    onCompositionStart(): void;
    onCompositionEnd(): void;
    onKeydown(ev: KeyboardEvent): void;
    onPaste(ev: ClipboardEvent): void;
    onInput(ev: InputEvent): void;
    onKeyup(ev: KeyboardEvent): void;
    onBlur(ev: FocusEvent): void;
    updateAutoCompleteIndex(index: number): void;
    /**
     * This is required to ensure the content helper selection is
     * properly updated on "onclick" events. Depending on the browser,
     * the callback onClick from the composer will be executed before
     * the selection was updated in the dom, which means we capture an
     * wrong selection which is then forced upon the content helper on
     * processContent.
     */
    onMousedown(ev: MouseEvent): void;
    onClick(): void;
    onDblClick(): void;
    onContextMenu(ev: MouseEvent): void;
    closeAssistant(): void;
    openAssistant(): void;
    private processContent;
    /**
     * Get the HTML content corresponding to the current composer token, divided by lines.
     */
    private getContentLines;
    private getHtmlContentFromTokens;
    /**
     * Split an array of HTMLContents into lines. Each NEWLINE character encountered will create a new
     * line. Contents can be split into multiple parts if they contain multiple NEWLINE characters.
     */
    private splitHtmlContentIntoLines;
    private isContentEmpty;
    /**
     * Compute the state of the composer from the tokenAtCursor.
     * If the token is a function or symbol (that isn't a cell/range reference) we have to initialize
     * the autocomplete engine otherwise we initialize the formula assistant.
     */
    private processTokenAtCursor;
    private autoComplete;
}

interface AutoCompleteProposal {
    /**
     * Text to auto complete.
     */
    text: string;
    description?: string;
    /**
     * Version of the text but displayed using html to highlight part of it.
     */
    htmlContent?: HtmlContent[];
    /**
     * Key to use for fuzzy search.
     */
    fuzzySearchKey?: string;
    alwaysExpanded?: boolean;
}
interface AutoCompleteProvider {
    proposals: AutoCompleteProposal[];
    selectProposal(text: string): void;
    autoSelectFirstProposal: boolean;
}
interface ComposerStoreInterface {
    currentEditedCell?: CellPosition;
    changeComposerCursorSelection(start: number, end: number): void;
    replaceComposerCursorSelection(text: string): void;
    setCurrentContent(content: string): void;
    stopEdition(): void;
    currentContent: string;
    currentTokens: EnrichedToken[];
}
/**
 * We declare the providers in the registry as an object (rather than a class)
 * to allow a type-safe way to declare the provider.
 * We still want to be able to use `this` for the getters and dispatch for simplicity.
 * Binding happens at runtime in the composer store.
 */
interface AutoCompleteProviderDefinition {
    sequence?: number;
    autoSelectFirstProposal?: boolean;
    displayAllOnInitialContent?: boolean;
    maxDisplayedProposals?: number;
    getProposals(this: {
        composer: ComposerStoreInterface;
        getters: Getters;
    }, tokenAtCursor: EnrichedToken, content: string): AutoCompleteProposal[] | undefined;
    selectProposal(this: {
        composer: ComposerStoreInterface;
    }, tokenAtCursor: EnrichedToken, text: string): void;
}

/**
 * An AutofillRule is used to generate what to do when we need to autofill
 * a cell. (In a AutofillGenerator, see plugins/autofill.ts)
 *
 * When we generate the rules to autofill, we take the first matching rule
 * (ordered by sequence), and we generate the AutofillModifier with generateRule
 */
interface AutofillRule {
    condition: (cell: Cell, cells: (Cell | undefined)[]) => boolean;
    generateRule: (cell: Cell, cells: (Cell | undefined)[], direction: DIRECTION) => AutofillModifier;
    sequence: number;
}

/**
 * This registry is intended to map a type of figure (tag) to a class of
 * component, that will be used in the UI to represent the figure.
 *
 * The most important type of figure will be the Chart
 */
interface FigureContent {
    Component: any;
    menuBuilder: (figureId: UID, onFigureDeleted: () => void, env: SpreadsheetChildEnv) => Action[];
    SidePanelComponent?: string;
    keepRatio?: boolean;
    minFigSize?: number;
    borderWidth?: number;
}

/**
 * The class Registry is extended in order to add the function addChild
 *
 */
declare class MenuItemRegistry extends Registry<ActionSpec> {
    /**
     * @override
     */
    add(key: string, value: ActionSpec): MenuItemRegistry;
    /**
     * Add a subitem to an existing item
     * @param path Path of items to add this subitem
     * @param value Subitem to add
     */
    addChild(key: string, path: string[], value: ActionSpec | ActionBuilder, options?: {
        force: boolean;
    }): MenuItemRegistry;
    getMenuItems(): Action[];
}

interface Props$S {
    onConfirm: (content: string) => void;
    composerContent: string;
    defaultRangeSheetId: UID;
    defaultStatic?: boolean;
    contextualAutocomplete?: AutoCompleteProviderDefinition;
    placeholder?: string;
    title?: string;
    class?: string;
    invalid?: boolean;
    getContextualColoredSymbolToken?: (token: Token) => Color;
}
declare class StandaloneComposer extends Component<Props$S, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        composerContent: {
            type: StringConstructor;
            optional: boolean;
        };
        defaultRangeSheetId: {
            type: StringConstructor;
            optional: boolean;
        };
        defaultStatic: {
            type: BooleanConstructor;
            optional: boolean;
        };
        onConfirm: FunctionConstructor;
        contextualAutocomplete: {
            type: ObjectConstructor;
            optional: boolean;
        };
        placeholder: {
            type: StringConstructor;
            optional: boolean;
        };
        title: {
            type: StringConstructor;
            optional: boolean;
        };
        class: {
            type: StringConstructor;
            optional: boolean;
        };
        invalid: {
            type: BooleanConstructor;
            optional: boolean;
        };
        getContextualColoredSymbolToken: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    static components: {
        Composer: typeof Composer;
    };
    static defaultProps: {
        composerContent: string;
        defaultStatic: boolean;
    };
    private composerFocusStore;
    private standaloneComposerStore;
    private composerInterface;
    readonly spreadsheetRect: Rect;
    setup(): void;
    get focus(): ComposerFocusType;
    get composerStyle(): string;
    get containerClass(): string;
    onFocus(selection: ComposerSelection): void;
}

interface PanelState {
    sectionRuleCancelledReasons?: CommandResult[];
    sectionRule: SectionRule;
}
interface Props$R {
    figureId: UID;
    definition: GaugeChartDefinition;
    canUpdateChart: (figureID: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
}
declare class GaugeChartDesignPanel extends Component<Props$R, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        SidePanelCollapsible: typeof SidePanelCollapsible;
        Section: typeof Section;
        RoundColorPicker: typeof RoundColorPicker;
        GeneralDesignEditor: typeof GeneralDesignEditor;
        ChartErrorSection: typeof ChartErrorSection;
        StandaloneComposer: typeof StandaloneComposer;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    protected state: PanelState;
    setup(): void;
    get designErrorMessages(): string[];
    get isRangeMinInvalid(): boolean;
    get isRangeMaxInvalid(): boolean;
    get isLowerInflectionPointInvalid(): boolean;
    get isUpperInflectionPointInvalid(): boolean;
    updateSectionColor(target: string, color: Color): void;
    updateSectionRule(sectionRule: SectionRule): void;
    onConfirmGaugeRange(editedRange: "rangeMin" | "rangeMax", content: string): void;
    getGaugeInflectionComposerProps(sectionType: "lowerColor" | "middleColor"): StandaloneComposer["props"];
    private checkSectionRuleFormulasAreValid;
    private valueIsValidNumber;
    get sheetId(): UID;
}

declare class LineConfigPanel extends GenericChartConfigPanel {
    static template: string;
    get canTreatLabelsAsText(): boolean;
    get stackedLabel(): string;
    getLabelRangeOptions(): {
        name: string;
        label: any;
        value: boolean;
        onChange: (aggregated: boolean) => void;
    }[];
    onUpdateLabelsAsText(labelsAsText: boolean): void;
    onUpdateStacked(stacked: boolean): void;
    onUpdateCumulative(cumulative: boolean): void;
}

interface Props$Q {
    figureId: UID;
    definition: ScorecardChartDefinition;
    canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
}
declare class ScorecardChartConfigPanel extends Component<Props$Q, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        SelectionInput: typeof SelectionInput;
        ChartErrorSection: typeof ChartErrorSection;
        Section: typeof Section;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: FunctionConstructor;
    };
    private state;
    private keyValue;
    private baseline;
    get errorMessages(): string[];
    get isKeyValueInvalid(): boolean;
    get isBaselineInvalid(): boolean;
    onKeyValueRangeChanged(ranges: string[]): void;
    updateKeyValueRange(): void;
    getKeyValueRange(): string;
    onBaselineRangeChanged(ranges: string[]): void;
    updateBaselineRange(): void;
    getBaselineRange(): string;
    updateBaselineMode(ev: any): void;
}

type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
interface Props$P {
    figureId: UID;
    definition: ScorecardChartDefinition;
    canUpdateChart: (figureID: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
}
declare class ScorecardChartDesignPanel extends Component<Props$P, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        GeneralDesignEditor: typeof GeneralDesignEditor;
        RoundColorPicker: typeof RoundColorPicker;
        SidePanelCollapsible: typeof SidePanelCollapsible;
        Section: typeof Section;
        Checkbox: typeof Checkbox;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    get colorsSectionTitle(): string;
    get humanizeNumbersLabel(): string;
    get defaultScorecardTitleFontSize(): number;
    updateHumanizeNumbers(humanize: boolean): void;
    translate(term: any): string;
    updateBaselineDescr(ev: any): void;
    setColor(color: Color, colorPickerId: ColorPickerId): void;
}

interface ChartSidePanel {
    configuration: new (...args: any) => Component;
    design: new (...args: any) => Component;
}

interface SidePanelProps {
    onCloseSidePanel?: () => void;
    [key: string]: any;
}
interface OpenSidePanel {
    isOpen: true;
    props?: SidePanelProps;
    key?: string;
}
interface ClosedSidePanel {
    isOpen: false;
}
type SidePanelState = OpenSidePanel | ClosedSidePanel;
declare class SidePanelStore extends SpreadsheetStore {
    mutators: readonly ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
    initialPanelProps: SidePanelProps;
    componentTag: string;
    panelSize: number;
    get isOpen(): boolean;
    get panelProps(): SidePanelProps;
    get panelKey(): string | undefined;
    open(componentTag: string, panelProps?: SidePanelProps): void;
    toggle(componentTag: string, panelProps: SidePanelProps): void;
    close(): void;
    changePanelSize(size: number, spreadsheetElWidth: number): void;
    resetPanelSize(): void;
    private computeState;
}

interface SidePanelContent {
    title: string | ((env: SpreadsheetChildEnv, props: object) => string);
    Body: any;
    Footer?: any;
    /**
     * A callback used to validate the props or generate new props
     * based on the current state of the spreadsheet model, using the getters.
     */
    computeState?: (getters: Getters, initialProps: object) => SidePanelState;
}

declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;

interface ComposerInterface {
    id: string;
    editionMode: EditionMode;
    startEdition(content?: string, selection?: ComposerSelection): void;
    stopEdition(): void;
    setCurrentContent(content: string, selection?: ComposerSelection): void;
}
interface Args {
    focusMode?: ComposerFocusType;
    content?: string;
    selection?: ComposerSelection;
}
declare class ComposerFocusStore extends SpreadsheetStore {
    mutators: readonly ["focusComposer", "focusActiveComposer"];
    activeComposer: ComposerInterface;
    private _focusMode;
    get focusMode(): ComposerFocusType;
    focusComposer(listener: ComposerInterface, args: Args): void;
    focusActiveComposer(args: Args): void;
    /**
     * Start the edition or update the content if it's already started.
     */
    private setComposerContent;
}

interface Props$O {
    figure: Figure;
}
declare class ChartJsComponent extends Component<Props$O, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        figure: ObjectConstructor;
    };
    private canvas;
    private chart?;
    private currentRuntime;
    get background(): string;
    get canvasStyle(): string;
    get chartRuntime(): ChartJSRuntime;
    setup(): void;
    private createChart;
    private updateChartJs;
}

interface Props$N {
    figure: Figure;
}
declare class ScorecardChart$1 extends Component<Props$N, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        figure: ObjectConstructor;
    };
    private canvas;
    get runtime(): ScorecardChartRuntime;
    get title(): string;
    setup(): void;
    private createChart;
}

type MenuItemOrSeparator = Action | "separator";
interface Props$M {
    position: DOMCoordinates;
    menuItems: Action[];
    depth: number;
    maxHeight?: Pixel;
    onClose: () => void;
    onMenuClicked?: (ev: CustomEvent) => void;
    menuId?: UID;
    onMouseOver?: () => void;
    width?: number;
}
interface MenuState {
    isOpen: boolean;
    parentMenu?: Action;
    position: null | DOMCoordinates;
    scrollOffset?: Pixel;
    menuItems: Action[];
    isHoveringChild?: boolean;
}
declare class Menu extends Component<Props$M, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        position: ObjectConstructor;
        menuItems: ArrayConstructor;
        depth: {
            type: NumberConstructor;
            optional: boolean;
        };
        maxHeight: {
            type: NumberConstructor;
            optional: boolean;
        };
        onClose: FunctionConstructor;
        onMenuClicked: {
            type: FunctionConstructor;
            optional: boolean;
        };
        menuId: {
            type: StringConstructor;
            optional: boolean;
        };
        onMouseOver: {
            type: FunctionConstructor;
            optional: boolean;
        };
        width: {
            type: NumberConstructor;
            optional: boolean;
        };
    };
    static components: {
        Menu: typeof Menu;
        Popover: typeof Popover;
    };
    static defaultProps: {
        depth: number;
    };
    private subMenu;
    private menuRef;
    private hoveredMenu;
    private position;
    private openingTimeOut;
    setup(): void;
    get menuItemsAndSeparators(): MenuItemOrSeparator[];
    get subMenuPosition(): DOMCoordinates;
    get popoverProps(): PopoverProps;
    get childrenHaveIcon(): boolean;
    getIconName(menu: Action): string;
    getColor(menu: Action): string;
    getIconColor(menu: Action): string;
    activateMenu(menu: Action): Promise<void>;
    private close;
    private onExternalClick;
    getName(menu: Action): string;
    isRoot(menu: Action): boolean;
    isEnabled(menu: Action): boolean;
    isActive(menuItem: Action): boolean;
    onScroll(ev: any): void;
    /**
     * If the given menu is not disabled, open it's submenu at the
     * correct position according to available surrounding space.
     */
    private openSubMenu;
    isParentMenu(subMenu: MenuState, menuItem: Action): boolean;
    private closeSubMenu;
    onClickMenu(menu: Action, ev: MouseEvent): void;
    onMouseOver(menu: Action, ev: MouseEvent): void;
    onMouseOverMainMenu(): void;
    onMouseOverChildMenu(): void;
    onMouseEnter(menu: Action, ev: MouseEvent): void;
    onMouseLeave(menu: Action): void;
    get menuStyle(): string;
}

type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
interface Props$L {
    figure: Figure;
    style: string;
    onFigureDeleted: () => void;
    onMouseDown: (ev: MouseEvent) => void;
    onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
}
declare class FigureComponent extends Component<Props$L, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        figure: ObjectConstructor;
        style: {
            type: StringConstructor;
            optional: boolean;
        };
        onFigureDeleted: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onMouseDown: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onClickAnchor: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    static components: {
        Menu: typeof Menu;
    };
    static defaultProps: {
        onFigureDeleted: () => void;
        onMouseDown: () => void;
        onClickAnchor: () => void;
    };
    private menuState;
    private figureRef;
    private menuButtonRef;
    private menuButtonRect;
    private borderWidth;
    get isSelected(): boolean;
    get figureRegistry(): Registry<FigureContent>;
    private getBorderWidth;
    get borderStyle(): string;
    get wrapperStyle(): string;
    getResizerPosition(resizer: ResizeAnchor): string;
    setup(): void;
    clickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
    onMouseDown(ev: MouseEvent): void;
    onKeyDown(ev: KeyboardEvent): void;
    onContextMenu(ev: MouseEvent): void;
    showMenu(): void;
    private openContextMenu;
}

interface Props$K {
    figure: Figure;
    onFigureDeleted: () => void;
}
declare class ChartFigure extends Component<Props$K, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        figure: ObjectConstructor;
        onFigureDeleted: FunctionConstructor;
    };
    static components: {};
    onDoubleClick(): void;
    get chartType(): ChartType;
    get chartComponent(): new (...args: any) => Component;
}

interface Props$J {
    isVisible: boolean;
    position: Position;
}
interface Position {
    top: HeaderIndex;
    left: HeaderIndex;
}
interface State$7 {
    position: Position;
    handler: boolean;
}
declare class Autofill extends Component<Props$J, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        position: ObjectConstructor;
        isVisible: BooleanConstructor;
    };
    state: State$7;
    get style(): string;
    get handlerStyle(): string;
    get styleNextValue(): string;
    getTooltip(): Tooltip | undefined;
    onMouseDown(ev: MouseEvent): void;
    onDblClick(): void;
}

interface ClientTagProps {
    active: boolean;
    name: string;
    color: Color;
    col: HeaderIndex;
    row: HeaderIndex;
}
declare class ClientTag extends Component<ClientTagProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        active: BooleanConstructor;
        name: StringConstructor;
        color: StringConstructor;
        col: NumberConstructor;
        row: NumberConstructor;
    };
    get tagStyle(): string;
}

interface Props$I {
    gridDims: DOMDimension;
    onInputContextMenu: (event: MouseEvent) => void;
}
/**
 * This component is a composer which positions itself on the grid at the anchor cell.
 * It also applies the style of the cell to the composer input.
 */
declare class GridComposer extends Component<Props$I, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        gridDims: ObjectConstructor;
        onInputContextMenu: FunctionConstructor;
    };
    static components: {
        Composer: typeof Composer;
    };
    private rect;
    private isEditing;
    private isCellReferenceVisible;
    private composerStore;
    composerFocusStore: Store<ComposerFocusStore>;
    private composerInterface;
    get defaultRect(): {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    setup(): void;
    get shouldDisplayCellReference(): boolean;
    get cellReference(): string;
    get cellReferenceStyle(): string;
    get focus(): ComposerFocusType;
    get composerProps(): CellComposerProps;
    get containerStyle(): string;
    private updateComponentPosition;
    private updateCellReferenceVisibility;
    onFocus(): void;
}

interface GridCellIconProps {
    cellPosition: CellPosition;
    horizontalAlign?: Align;
    verticalAlign?: VerticalAlign;
}
declare class GridCellIcon extends Component<GridCellIconProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        cellPosition: ObjectConstructor;
        horizontalAlign: {
            type: StringConstructor;
            optional: boolean;
        };
        verticalAlign: {
            type: StringConstructor;
            optional: boolean;
        };
        slots: ObjectConstructor;
    };
    get iconStyle(): string;
    private getIconVerticalPosition;
    private getIconHorizontalPosition;
    isPositionVisible(position: CellPosition): boolean;
}

interface Props$H {
    cellPosition: CellPosition;
}
declare class DataValidationCheckbox extends Component<Props$H, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Checkbox: typeof Checkbox;
    };
    static props: {
        cellPosition: ObjectConstructor;
    };
    onCheckboxChange(value: boolean): void;
    get checkBoxValue(): boolean;
    get isDisabled(): boolean;
}

interface Props$G {
    cellPosition: CellPosition;
}
declare class DataValidationListIcon extends Component<Props$G, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        cellPosition: ObjectConstructor;
    };
    onClick(): void;
}

declare class DataValidationOverlay extends Component<{}, SpreadsheetChildEnv> {
    static template: string;
    static props: {};
    static components: {
        GridCellIcon: typeof GridCellIcon;
        DataValidationCheckbox: typeof DataValidationCheckbox;
        DataValidationListIcon: typeof DataValidationListIcon;
    };
    get checkBoxCellPositions(): CellPosition[];
    get listIconsCellPositions(): CellPosition[];
}

type HFigureAxisType = "top" | "bottom" | "vCenter";
type VFigureAxisType = "right" | "left" | "hCenter";
interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
    matchedFigIds: UID[];
    snapOffset: number;
    snappedAxisType: T;
    position: Pixel;
}

type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
interface Props$F {
    onFigureDeleted: () => void;
}
interface Container {
    type: ContainerType;
    figures: Figure[];
    style: string;
    inverseViewportStyle: string;
}
interface Snap<T extends HFigureAxisType | VFigureAxisType> {
    line: SnapLine<T>;
    lineStyle: string;
    containerStyle: string;
}
interface DndState {
    draggedFigure?: Figure;
    horizontalSnap?: Snap<HFigureAxisType>;
    verticalSnap?: Snap<VFigureAxisType>;
    cancelDnd: (() => void) | undefined;
}
/**
 * Each figure ⭐ is positioned inside a container `div` placed and sized
 * according to the split pane the figure is part of, or a separate container for the figure
 * currently drag & dropped. Any part of the figure outside of the container is hidden
 * thanks to its `overflow: hidden` property.
 *
 * Additionally, the figure is placed inside a "inverse viewport" `div` 🟥.
 * Its position represents the viewport position in the grid: its top/left
 * corner represents the top/left corner of the grid.
 *
 * It allows to position the figure inside this div regardless of the
 * (possibly freezed) viewports and the scrolling position.
 *
 * --: container limits
 * 🟥: inverse viewport
 * ⭐: figure top/left position
 *
 *                     container
 *                         ↓
 * |🟥--------------------------------------------
 * |  \                                          |
 * |   \                                         |
 * |    \                                        |
 * |     \          visible area                 |  no scroll
 * |      ⭐                                     |
 * |                                             |
 * |                                             |
 * -----------------------------------------------
 *
 * the scrolling of the pane is applied as an inverse offset
 * to the div which will in turn move the figure up and down
 * inside the container.
 * Hence, once the figure position is (resp. partly) out of
 * the container dimensions, it will be (resp. partly) hidden.
 *
 * The same reasoning applies to the horizontal axis.
 *
 *  🟥 ························
 *    \                       ↑
 *     \                      |
 *      \                     | inverse viewport = -1 * scroll of pane
 *       \                    |
 *        ⭐ <- not visible   |
 *                            ↓
 * -----------------------------------------------
 * |                                             |
 * |                                             |
 * |                                             |
 * |               visible area                  |
 * |                                             |
 * |                                             |
 * |                                             |
 * -----------------------------------------------
 *
 * In the case the d&d figure container, the container is the same as the "topLeft" container for
 * frozen pane (unaffected by scroll and always visible). The figure coordinates are transformed
 * for this container at the start of the d&d, and transformed back at the end to adapt to the scroll
 * that occurred during the drag & drop, and to position the figure on the correct pane.
 *
 */
declare class FiguresContainer extends Component<Props$F, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        onFigureDeleted: FunctionConstructor;
    };
    static components: {
        FigureComponent: typeof FigureComponent;
    };
    dnd: DndState;
    setup(): void;
    private getVisibleFigures;
    get containers(): Container[];
    private getContainerStyle;
    private rectToCss;
    private getContainerRect;
    private getInverseViewportPositionStyle;
    private getFigureContainer;
    startDraggingFigure(figure: Figure, ev: MouseEvent): void;
    /**
     * Initialize the resize of a figure with mouse movements
     *
     * @param dirX X direction of the resize. -1 : resize from the left border of the figure, 0 : no resize in X, 1 :
     * resize from the right border of the figure
     * @param dirY Y direction of the resize. -1 : resize from the top border of the figure, 0 : no resize in Y, 1 :
     * resize from the bottom border of the figure
     * @param ev Mouse Event
     */
    startResize(figure: Figure, dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
    private getOtherFigures;
    private getDndFigure;
    getFigureStyle(figure: Figure): string;
    private getSnap;
    private getSnapLineStyle;
}

interface Props$E {
    cellPosition: CellPosition;
}
declare class FilterIcon extends Component<Props$E, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        cellPosition: ObjectConstructor;
    };
    protected cellPopovers: Store<CellPopoverStore>;
    setup(): void;
    onClick(): void;
    get isFilterActive(): boolean;
    get iconClass(): string;
}

declare class FilterIconsOverlay extends Component<{}, SpreadsheetChildEnv> {
    static template: string;
    static props: {};
    static components: {
        GridCellIcon: typeof GridCellIcon;
        FilterIcon: typeof FilterIcon;
    };
    getFilterHeadersPositions(): CellPosition[];
}

interface Props$D {
    focusGrid: () => void;
}
declare class GridAddRowsFooter extends Component<Props$D, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        focusGrid: FunctionConstructor;
    };
    static components: {
        ValidationMessages: typeof ValidationMessages;
    };
    inputRef: {
        el: HTMLInputElement | null;
    };
    state: {
        inputValue: string;
        errorFlag: boolean;
    };
    setup(): void;
    get addRowsPosition(): string;
    get errorMessages(): string[];
    onKeydown(ev: KeyboardEvent): void;
    onInput(ev: InputEvent): void;
    onConfirm(): void;
    private onExternalClick;
}

interface Props$C {
    onCellHovered: (position: Partial<Position$1>) => void;
    onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
    onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: GridClickModifiers) => void;
    onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
    onGridResized: (dimension: Rect) => void;
    onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
    gridOverlayDimensions: string;
    onFigureDeleted: () => void;
}
declare class GridOverlay extends Component<Props$C, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        onCellHovered: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onCellDoubleClicked: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onCellClicked: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onCellRightClicked: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onGridResized: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onFigureDeleted: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onGridMoved: FunctionConstructor;
        gridOverlayDimensions: StringConstructor;
    };
    static components: {
        FiguresContainer: typeof FiguresContainer;
        DataValidationOverlay: typeof DataValidationOverlay;
        GridAddRowsFooter: typeof GridAddRowsFooter;
        FilterIconsOverlay: typeof FilterIconsOverlay;
    };
    static defaultProps: {
        onCellHovered: () => void;
        onCellDoubleClicked: () => void;
        onCellClicked: () => void;
        onCellRightClicked: () => void;
        onGridResized: () => void;
        onFigureDeleted: () => void;
    };
    private gridOverlay;
    private gridOverlayRect;
    private cellPopovers;
    private paintFormatStore;
    setup(): void;
    get gridOverlayEl(): HTMLElement;
    get style(): string;
    get isPaintingFormat(): boolean;
    onMouseDown(ev: MouseEvent): void;
    onDoubleClick(ev: MouseEvent): void;
    onContextMenu(ev: MouseEvent): void;
    private getCartesianCoordinates;
}

interface Props$B {
    gridRect: Rect;
    onClosePopover: () => void;
    onMouseWheel: (ev: WheelEvent) => void;
}
declare class GridPopover extends Component<Props$B, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        onClosePopover: FunctionConstructor;
        onMouseWheel: FunctionConstructor;
        gridRect: ObjectConstructor;
    };
    static components: {
        Popover: typeof Popover;
    };
    protected cellPopovers: Store<CellPopoverStore>;
    zIndex: ComponentsImportance;
    setup(): void;
    get cellPopover(): PositionedCellPopoverComponent | ClosedCellPopover;
}

interface Props$A {
    headersGroups: ConsecutiveIndexes[];
    offset: number;
    headerRange: {
        start: HeaderIndex;
        end: HeaderIndex;
    };
}
declare class UnhideRowHeaders extends Component<Props$A, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        headersGroups: ArrayConstructor;
        headerRange: ObjectConstructor;
        offset: {
            type: NumberConstructor;
            optional: boolean;
        };
    };
    static defaultProps: {
        offset: number;
    };
    get sheetId(): UID;
    getUnhidePreviousButtonStyle(hiddenIndex: HeaderIndex): string;
    getUnhideNextButtonStyle(hiddenIndex: HeaderIndex): string;
    unhide(hiddenElements: HeaderIndex[]): void;
    isVisible(header: HeaderIndex): boolean;
}
declare class UnhideColumnHeaders extends Component<Props$A, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        headersGroups: ArrayConstructor;
        headerRange: ObjectConstructor;
        offset: {
            type: NumberConstructor;
            optional: boolean;
        };
    };
    static defaultProps: {
        offset: number;
    };
    get sheetId(): UID;
    getUnhidePreviousButtonStyle(hiddenIndex: HeaderIndex): string;
    getUnhideNextButtonStyle(hiddenIndex: HeaderIndex): string;
    unhide(hiddenElements: HeaderIndex[]): void;
    isVisible(header: HeaderIndex): boolean;
}

interface ResizerState {
    resizerIsActive: boolean;
    isResizing: boolean;
    isMoving: boolean;
    isSelecting: boolean;
    waitingForMove: boolean;
    activeElement: Pixel;
    draggerLinePosition: Pixel;
    draggerShadowPosition: Pixel;
    draggerShadowThickness: number;
    delta: number;
    base: number;
    position: "before" | "after";
}
interface ResizerProps {
    onOpenContextMenu: (type: ContextMenuType, x: Pixel, y: Pixel) => void;
}
declare abstract class AbstractResizer extends Component<ResizerProps, SpreadsheetChildEnv> {
    static props: {
        onOpenContextMenu: FunctionConstructor;
    };
    private composerFocusStore;
    PADDING: number;
    MAX_SIZE_MARGIN: number;
    MIN_ELEMENT_SIZE: number;
    lastSelectedElementIndex: HeaderIndex | null;
    state: ResizerState;
    abstract _getEvOffset(ev: MouseEvent): Pixel;
    abstract _getViewportOffset(): Pixel;
    abstract _getClientPosition(ev: MouseEvent): Pixel;
    abstract _getElementIndex(position: Pixel): HeaderIndex;
    abstract _getSelectedZoneStart(): HeaderIndex;
    abstract _getSelectedZoneEnd(): HeaderIndex;
    abstract _getEdgeScroll(position: Pixel): EdgeScrollInfo;
    abstract _getDimensionsInViewport(index: HeaderIndex): HeaderDimensions;
    abstract _getElementSize(index: HeaderIndex): Pixel;
    abstract _getMaxSize(): Pixel;
    abstract _updateSize(): void;
    abstract _moveElements(): void;
    abstract _selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
    abstract _increaseSelection(index: HeaderIndex): void;
    abstract _fitElementSize(index: HeaderIndex): void;
    abstract _getType(): ContextMenuType;
    abstract _getActiveElements(): Set<HeaderIndex>;
    abstract _getPreviousVisibleElement(index: HeaderIndex): HeaderIndex;
    setup(): void;
    _computeHandleDisplay(ev: MouseEvent): void;
    _computeGrabDisplay(ev: MouseEvent): void;
    onMouseMove(ev: MouseEvent): void;
    onMouseLeave(): void;
    onDblClick(ev: MouseEvent): void;
    onMouseDown(ev: MouseEvent): void;
    select(ev: MouseEvent): void;
    private startMovement;
    private startSelection;
    onMouseUp(ev: MouseEvent): void;
    onContextMenu(ev: MouseEvent): void;
}
declare class ColResizer extends AbstractResizer {
    static props: {
        onOpenContextMenu: FunctionConstructor;
    };
    static template: string;
    static components: {
        UnhideColumnHeaders: typeof UnhideColumnHeaders;
    };
    private colResizerRef;
    setup(): void;
    get sheetId(): UID;
    _getEvOffset(ev: MouseEvent): Pixel;
    _getViewportOffset(): Pixel;
    _getClientPosition(ev: MouseEvent): Pixel;
    _getElementIndex(position: Pixel): HeaderIndex;
    _getSelectedZoneStart(): HeaderIndex;
    _getSelectedZoneEnd(): HeaderIndex;
    _getEdgeScroll(position: Pixel): EdgeScrollInfo;
    _getDimensionsInViewport(index: HeaderIndex): HeaderDimensions;
    _getElementSize(index: HeaderIndex): Pixel;
    _getMaxSize(): Pixel;
    _updateSize(): void;
    _moveElements(): void;
    _selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
    _increaseSelection(index: HeaderIndex): void;
    _fitElementSize(index: HeaderIndex): void;
    _getType(): ContextMenuType;
    _getActiveElements(): Set<HeaderIndex>;
    _getPreviousVisibleElement(index: HeaderIndex): HeaderIndex;
    unhide(hiddenElements: HeaderIndex[]): void;
    get mainUnhideHeadersProps(): {
        headersGroups: ConsecutiveIndexes[];
        offset: Pixel;
        headerRange: {
            start: HeaderIndex;
            end: HeaderIndex;
        };
    };
    get frozenUnhideHeadersProps(): {
        headersGroups: ConsecutiveIndexes[];
        headerRange: {
            start: number;
            end: number;
        };
    };
    get frozenContainerStyle(): string;
    get hasFrozenPane(): boolean;
}
declare class RowResizer extends AbstractResizer {
    static props: {
        onOpenContextMenu: FunctionConstructor;
    };
    static template: string;
    static components: {
        UnhideRowHeaders: typeof UnhideRowHeaders;
    };
    setup(): void;
    private rowResizerRef;
    get sheetId(): UID;
    _getEvOffset(ev: MouseEvent): Pixel;
    _getViewportOffset(): Pixel;
    _getClientPosition(ev: MouseEvent): Pixel;
    _getElementIndex(position: Pixel): HeaderIndex;
    _getSelectedZoneStart(): HeaderIndex;
    _getSelectedZoneEnd(): HeaderIndex;
    _getEdgeScroll(position: Pixel): EdgeScrollInfo;
    _getDimensionsInViewport(index: HeaderIndex): HeaderDimensions;
    _getElementSize(index: HeaderIndex): Pixel;
    _getMaxSize(): Pixel;
    _updateSize(): void;
    _moveElements(): void;
    _selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
    _increaseSelection(index: HeaderIndex): void;
    _fitElementSize(index: HeaderIndex): void;
    _getType(): ContextMenuType;
    _getActiveElements(): Set<HeaderIndex>;
    _getPreviousVisibleElement(index: HeaderIndex): HeaderIndex;
    get mainUnhideHeadersProps(): {
        headersGroups: ConsecutiveIndexes[];
        offset: Pixel;
        headerRange: {
            start: HeaderIndex;
            end: HeaderIndex;
        };
    };
    get frozenUnhideHeadersProps(): {
        headersGroups: ConsecutiveIndexes[];
        headerRange: {
            start: number;
            end: number;
        };
    };
    get frozenContainerStyle(): string;
    get hasFrozenPane(): boolean;
}
declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
    static props: {
        onOpenContextMenu: FunctionConstructor;
    };
    static template: string;
    static components: {
        ColResizer: typeof ColResizer;
        RowResizer: typeof RowResizer;
    };
    selectAll(): void;
}

type Orientation$1 = "n" | "s" | "w" | "e";
interface Props$z {
    zone: Zone;
    orientation: Orientation$1;
    isMoving: boolean;
    onMoveHighlight: (x: Pixel, y: Pixel) => void;
}
declare class Border extends Component<Props$z, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        zone: ObjectConstructor;
        orientation: StringConstructor;
        isMoving: BooleanConstructor;
        onMoveHighlight: FunctionConstructor;
    };
    get style(): string;
    onMouseDown(ev: MouseEvent): void;
}

type Orientation = "nw" | "ne" | "sw" | "se";
interface Props$y {
    zone: Zone;
    color: Color;
    orientation: Orientation;
    isResizing: boolean;
    onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
}
declare class Corner extends Component<Props$y, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        zone: ObjectConstructor;
        color: StringConstructor;
        orientation: StringConstructor;
        isResizing: BooleanConstructor;
        onResizeHighlight: FunctionConstructor;
    };
    private isTop;
    private isLeft;
    get style(): string;
    onMouseDown(ev: MouseEvent): void;
}

interface Props$x {
    zone: Zone;
    color: Color;
}
interface HighlightState {
    shiftingMode: "isMoving" | "isResizing" | "none";
}
declare class Highlight extends Component<Props$x, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        zone: ObjectConstructor;
        color: StringConstructor;
    };
    static components: {
        Corner: typeof Corner;
        Border: typeof Border;
    };
    highlightState: HighlightState;
    onResizeHighlight(isLeft: boolean, isTop: boolean): void;
    onMoveHighlight(clientX: Pixel, clientY: Pixel): void;
}

type ScrollDirection = "horizontal" | "vertical";

interface Props$w {
    width: Pixel;
    height: Pixel;
    direction: ScrollDirection;
    position: CSSProperties;
    offset: Pixel;
    onScroll: (offset: Pixel) => void;
}
declare class ScrollBar extends Component<Props$w> {
    static props: {
        width: {
            type: NumberConstructor;
            optional: boolean;
        };
        height: {
            type: NumberConstructor;
            optional: boolean;
        };
        direction: StringConstructor;
        position: ObjectConstructor;
        offset: NumberConstructor;
        onScroll: FunctionConstructor;
    };
    static template: string;
    static defaultProps: {
        width: number;
        height: number;
    };
    private scrollbarRef;
    private scrollbar;
    setup(): void;
    get sizeCss(): string;
    get positionCss(): string;
    onScroll(ev: any): void;
}

interface Props$v {
    leftOffset: number;
}
declare class HorizontalScrollBar extends Component<Props$v, SpreadsheetChildEnv> {
    static props: {
        leftOffset: {
            type: NumberConstructor;
            optional: boolean;
        };
    };
    static components: {
        ScrollBar: typeof ScrollBar;
    };
    static template: string;
    static defaultProps: {
        leftOffset: number;
    };
    get offset(): Pixel;
    get width(): Pixel;
    get isDisplayed(): boolean;
    get position(): {
        left: string;
        bottom: string;
        height: string;
        right: string;
    };
    onScroll(offset: any): void;
}

interface Props$u {
    topOffset: number;
}
declare class VerticalScrollBar extends Component<Props$u, SpreadsheetChildEnv> {
    static props: {
        topOffset: {
            type: NumberConstructor;
            optional: boolean;
        };
    };
    static components: {
        ScrollBar: typeof ScrollBar;
    };
    static template: string;
    static defaultProps: {
        topOffset: number;
    };
    get offset(): Pixel;
    get height(): Pixel;
    get isDisplayed(): boolean;
    get position(): {
        top: string;
        right: string;
        width: string;
        bottom: string;
    };
    onScroll(offset: any): void;
}

interface Props$t {
    table: Table;
}
interface State$6 {
    highlightZone: Zone | undefined;
}
declare class TableResizer extends Component<Props$t, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        table: ObjectConstructor;
    };
    state: State$6;
    setup(): void;
    get containerStyle(): string;
    onMouseDown(ev: MouseEvent): void;
    get highlights(): Highlight$1[];
}

declare class HoveredCellStore extends SpreadsheetStore {
    mutators: readonly ["clear", "hover"];
    col: number | undefined;
    row: number | undefined;
    handle(cmd: Command): void;
    hover(position: Position$1): void;
    clear(): void;
}

/**
 * The Grid component is the main part of the spreadsheet UI. It is responsible
 * for displaying the actual grid, rendering it, managing events, ...
 *
 * The grid is rendered on a canvas. 3 sub components are (sometimes) displayed
 * on top of the canvas:
 * - a composer (to edit the cell content)
 * - a horizontal resizer (to resize columns)
 * - a vertical resizer (same, for rows)
 */
type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER" | "GROUP_HEADERS" | "UNGROUP_HEADERS";
interface Props$s {
    exposeFocus: (focus: () => void) => void;
}
declare class Grid extends Component<Props$s, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        exposeFocus: FunctionConstructor;
    };
    static components: {
        GridComposer: typeof GridComposer;
        GridOverlay: typeof GridOverlay;
        GridPopover: typeof GridPopover;
        HeadersOverlay: typeof HeadersOverlay;
        Menu: typeof Menu;
        Autofill: typeof Autofill;
        ClientTag: typeof ClientTag;
        Highlight: typeof Highlight;
        Popover: typeof Popover;
        VerticalScrollBar: typeof VerticalScrollBar;
        HorizontalScrollBar: typeof HorizontalScrollBar;
        TableResizer: typeof TableResizer;
    };
    readonly HEADER_HEIGHT = 26;
    readonly HEADER_WIDTH = 48;
    private menuState;
    private gridRef;
    private highlightStore;
    private cellPopovers;
    private composerFocusStore;
    private DOMFocusableElementStore;
    private paintFormatStore;
    onMouseWheel: (ev: WheelEvent) => void;
    canvasPosition: DOMCoordinates;
    hoveredCell: Store<HoveredCellStore>;
    sidePanel: Store<SidePanelStore>;
    setup(): void;
    onCellHovered({ col, row }: {
        col: any;
        row: any;
    }): void;
    get highlights(): Highlight$1[];
    get gridOverlayDimensions(): string;
    onClosePopover(): void;
    private keyDownMapping;
    focusDefaultElement(): void;
    get gridEl(): HTMLElement;
    getAutofillPosition(): {
        left: number;
        top: number;
    };
    get isAutofillVisible(): boolean;
    onGridResized({ height, width }: DOMDimension): void;
    private moveCanvas;
    getClientPositionKey(client: Client): string;
    isCellHovered(col: HeaderIndex, row: HeaderIndex): boolean;
    private getGridRect;
    onCellClicked(col: HeaderIndex, row: HeaderIndex, modifiers: GridClickModifiers): void;
    onCellDoubleClicked(col: HeaderIndex, row: HeaderIndex): void;
    processArrows(ev: KeyboardEvent): void;
    onKeydown(ev: KeyboardEvent): void;
    onInputContextMenu(ev: MouseEvent): void;
    onCellRightClicked(col: HeaderIndex, row: HeaderIndex, { x, y }: DOMCoordinates): void;
    toggleContextMenu(type: ContextMenuType, x: Pixel, y: Pixel): void;
    copy(cut: boolean, ev: ClipboardEvent): Promise<void>;
    paste(ev: ClipboardEvent): Promise<void>;
    private clearFormatting;
    private setHorizontalAlign;
    closeMenu(): void;
    private processHeaderGroupingKey;
    private processHeaderGroupingEventOnHeaders;
    private processHeaderGroupingEventOnWholeSheet;
    private processHeaderGroupingEventOnGrid;
    onComposerCellFocused(content?: string, selection?: ComposerSelection): void;
    onComposerContentFocused(): void;
    get staticTables(): Table[];
}

type Direction = "horizontal" | "vertical";
interface DragAndDropItemsPartial {
    id: UID;
    size: Pixel;
    position: Pixel;
}
interface DndPartialArgs {
    draggedItemId: UID;
    initialMousePosition: Pixel;
    items: DragAndDropItemsPartial[];
    scrollableContainerEl: HTMLElement;
    onChange?: () => void;
    onCancel?: () => void;
    onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
}
interface State$5 {
    itemsStyle: Record<UID, string>;
    draggedItemId: UID | undefined;
    start: (direction: Direction, args: DndPartialArgs) => void;
    cancel: () => void;
}
declare function useDragAndDropListItems(): State$5;

declare function useHighlightsOnHover(ref: Ref<HTMLElement>, highlightProvider: HighlightProvider): void;
declare function useHighlights(highlightProvider: HighlightProvider): void;

declare class MainChartPanelStore extends SpreadsheetStore {
    mutators: readonly ["activatePanel", "changeChartType"];
    panel: "configuration" | "design";
    private creationContexts;
    activatePanel(panel: "configuration" | "design"): void;
    changeChartType(figureId: UID, newDisplayType: string): void;
    private getChartDefinitionFromContextCreation;
}

interface Props$r {
    figureId: UID;
    chartPanelStore: MainChartPanelStore;
}
interface ChartTypePickerState {
    popoverProps: PopoverProps | undefined;
    popoverStyle: string;
}
declare class ChartTypePicker extends Component<Props$r, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
        Popover: typeof Popover;
    };
    static props: {
        figureId: StringConstructor;
        chartPanelStore: ObjectConstructor;
    };
    categories: {
        line: string;
        column: string;
        bar: string;
        area: string;
        pie: string;
        misc: string;
    };
    chartTypeByCategories: Record<string, ChartSubtypeProperties[]>;
    popoverRef: {
        el: HTMLElement | null;
    };
    selectRef: {
        el: HTMLElement | null;
    };
    state: ChartTypePickerState;
    setup(): void;
    onExternalClick(ev: MouseEvent): void;
    onTypeChange(type: ChartType): void;
    private getChartDefinition;
    getSelectedChartSubtypeProperties(): ChartSubtypeProperties;
    onPointerDown(ev: PointerEvent): void;
    private closePopover;
}

interface Props$q {
    onCloseSidePanel: () => void;
    figureId: UID;
}
declare class ChartPanel extends Component<Props$q, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
        ChartTypePicker: typeof ChartTypePicker;
    };
    static props: {
        onCloseSidePanel: FunctionConstructor;
        figureId: StringConstructor;
    };
    store: Store<MainChartPanelStore>;
    get figureId(): UID;
    setup(): void;
    updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
    canUpdateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
    onTypeChange(type: ChartType): void;
    get chartPanel(): ChartSidePanel;
    private getChartDefinition;
}

interface Props$p {
    figureId: UID;
    definition: PieChartDefinition;
    canUpdateChart: (figureID: UID, definition: GenericDefinition<PieChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: GenericDefinition<PieChartDefinition>) => DispatchResult;
}
declare class PieChartDesignPanel extends Component<Props$p, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        GeneralDesignEditor: typeof GeneralDesignEditor;
        Section: typeof Section;
        Checkbox: typeof Checkbox;
        ChartLegend: typeof ChartLegend;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
}

interface Props$o {
    items: ActionSpec[];
}
declare class CogWheelMenu extends Component<Props$o, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Menu: typeof Menu;
    };
    static props: {
        items: ArrayConstructor;
    };
    private buttonRef;
    private menuState;
    private menuId;
    toggleMenu(ev: MenuMouseEvent): void;
}

declare class FindAndReplaceStore extends SpreadsheetStore implements HighlightProvider {
    mutators: readonly ["updateSearchOptions", "updateSearchContent", "searchFormulas", "selectPreviousMatch", "selectNextMatch", "replace"];
    private allSheetsMatches;
    private activeSheetMatches;
    private specificRangeMatches;
    private currentSearchRegex;
    private initialShowFormulaState;
    private preserveSelectedMatchIndex;
    private irreplaceableMatchCount;
    private isSearchDirty;
    private shouldFinalizeUpdateSelection;
    private notificationStore;
    selectedMatchIndex: number | null;
    toSearch: string;
    toReplace: string;
    searchOptions: SearchOptions;
    constructor(get: Get);
    get searchMatches(): CellPosition[];
    updateSearchContent(toSearch: string): void;
    updateSearchOptions(searchOptions: Partial<SearchOptions>): void;
    searchFormulas(showFormula: boolean): void;
    selectPreviousMatch(): void;
    selectNextMatch(): void;
    handle(cmd: Command): void;
    finalize(): void;
    get allSheetMatchesCount(): number;
    get activeSheetMatchesCount(): number;
    get specificRangeMatchesCount(): number;
    /**
     * Will update the current searchOptions and accordingly update the regex.
     * It will then search for matches using the regex and store them.
     */
    private _updateSearch;
    /**
     * refresh the matches according to the current search options
     */
    private refreshSearch;
    private getSheetsInSearchOrder;
    /**
     * Find matches using the current regex
     */
    private findMatches;
    private findMatchesInSheet;
    /**
     * Changes the selected search cell. Given a direction it will
     * Change the selection to the previous, current or nextCell,
     * if it exists otherwise it will set the selectedMatchIndex to null.
     * It will also reset the index to 0 if the search has changed.
     * It is also used to keep coherence between the selected searchMatch
     * and selectedMatchIndex.
     */
    private selectNextCell;
    /**
     * Replace the value of the currently selected match
     */
    replace(): void;
    /**
     * Apply the replace function to all the matches one time.
     */
    replaceAll(): void;
    /**
     * Show a warning message based on the number of matches replaced and irreplaceable.
     */
    private showReplaceWarningMessage;
    private replaceMatch;
    private getSearchableString;
    get highlights(): Highlight$1[];
}

interface Props$n {
    deferUpdate: boolean;
    isDirty: boolean;
    toggleDeferUpdate: (value: boolean) => void;
    discard: () => void;
    apply: () => void;
}
declare class PivotDeferUpdate extends Component<Props$n, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        deferUpdate: BooleanConstructor;
        isDirty: BooleanConstructor;
        toggleDeferUpdate: FunctionConstructor;
        discard: FunctionConstructor;
        apply: FunctionConstructor;
    };
    static components: {
        Section: typeof Section;
        Checkbox: typeof Checkbox;
    };
    get deferUpdatesLabel(): string;
    get deferUpdatesTooltip(): string;
}

interface Props$m {
    onFieldPicked: (field: string) => void;
    fields: PivotField[];
}
declare class AddDimensionButton extends Component<Props$m, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Popover: typeof Popover;
        TextValueProvider: typeof TextValueProvider;
    };
    static props: {
        onFieldPicked: FunctionConstructor;
        fields: ArrayConstructor;
        slots: {
            type: ObjectConstructor;
            optional: boolean;
        };
    };
    private buttonRef;
    private popover;
    private search;
    private autoComplete;
    setup(): void;
    getProvider(): AutoCompleteProvider;
    get proposals(): AutoCompleteProposal[];
    get popoverProps(): {
        anchorRect: {
            x: number;
            y: number;
            width: number;
            height: number;
        };
        positioning: string;
    };
    updateSearch(searchInput: string): void;
    pickField(field: PivotField): void;
    togglePopover(): void;
    onKeyDown(ev: KeyboardEvent): void;
}

interface Props$l {
    value: string;
    onChange: (value: string) => void;
    class?: string;
    id?: string;
    placeholder?: string;
}
declare class TextInput extends Component<Props$l, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        value: StringConstructor;
        onChange: FunctionConstructor;
        class: {
            type: StringConstructor;
            optional: boolean;
        };
        id: {
            type: StringConstructor;
            optional: boolean;
        };
        placeholder: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    private inputRef;
    setup(): void;
    onKeyDown(ev: KeyboardEvent): void;
    save(): void;
    onMouseDown(ev: MouseEvent): void;
    onMouseUp(ev: MouseEvent): void;
}

interface Props$k {
    dimension: PivotCoreDimension | PivotCoreMeasure;
    onRemoved: (dimension: PivotCoreDimension | PivotCoreMeasure) => void;
    onNameUpdated?: (dimension: PivotCoreDimension | PivotCoreMeasure, name?: string) => void;
    type: "row" | "col" | "measure";
}
declare class PivotDimension extends Component<Props$k, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        dimension: ObjectConstructor;
        onRemoved: {
            type: FunctionConstructor;
            optional: boolean;
        };
        onNameUpdated: {
            type: FunctionConstructor;
            optional: boolean;
        };
        slots: {
            type: ObjectConstructor;
            optional: boolean;
        };
    };
    static components: {
        CogWheelMenu: typeof CogWheelMenu;
        TextInput: typeof TextInput;
    };
    updateName(name: string): void;
}

interface Props$j {
    dimension: PivotDimension$1;
    onUpdated: (dimension: PivotDimension$1, ev: InputEvent) => void;
    availableGranularities: Set<string>;
    allGranularities: string[];
}
declare class PivotDimensionGranularity extends Component<Props$j, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        dimension: ObjectConstructor;
        onUpdated: FunctionConstructor;
        availableGranularities: SetConstructor;
        allGranularities: ArrayConstructor;
    };
    periods: {
        year: string;
        quarter: string;
        month: string;
        week: string;
        day: string;
        quarter_number: string;
        month_number: string;
        iso_week_number: string;
        day_of_month: string;
        day_of_week: string;
        hour_number: string;
        minute_number: string;
        second_number: string;
    };
}

interface Props$i {
    dimension: PivotDimension$1;
    onUpdated: (dimension: PivotDimension$1, ev: InputEvent) => void;
}
declare class PivotDimensionOrder extends Component<Props$i, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        dimension: ObjectConstructor;
        onUpdated: FunctionConstructor;
    };
}

/**
 * Given an object of form {"1": {...}, "2": {...}, ...} get the maximum ID used
 * in this object
 * If the object has no keys, return 0
 *
 */
declare function getMaxObjectId(o: object): number;
/**
 * Parse a dimension string into a pivot dimension definition.
 * e.g "create_date:month" => { name: "create_date", granularity: "month" }
 */
declare function parseDimension(dimension: string): PivotCoreDimension;
declare function isDateOrDatetimeField(field: PivotField): boolean;
/**
 * Check if the fields in the domain part of
 * a pivot function are valid according to the pivot definition.
 * e.g. =PIVOT.VALUE(1,"revenue","country_id",...,"create_date:month",...,"source_id",...)
 */
declare function areDomainArgsFieldsValid(dimensions: string[], definition: PivotRuntimeDefinition): boolean;
declare function createPivotFormula(formulaId: string, cell: PivotTableCell): string;
/**
 * Parses the value defining a pivot group in a PIVOT formula
 * e.g. given the following formula PIVOT.VALUE("1", "stage_id", "42", "status", "won"),
 * the two group values are "42" and "won".
 */
declare function toNormalizedPivotValue(dimension: Pick<PivotDimension$1, "type" | "displayName" | "granularity">, groupValue: any): CellValue;

interface Props$h {
    pivotId: string;
    definition: PivotRuntimeDefinition;
    measure: PivotMeasure;
    onMeasureUpdated: (measure: PivotMeasure) => void;
    onRemoved: () => void;
    generateMeasureId: (fieldName: string, aggregator?: string) => string;
}
declare class PivotMeasureEditor extends Component<Props$h> {
    static template: string;
    static components: {
        PivotDimension: typeof PivotDimension;
        StandaloneComposer: typeof StandaloneComposer;
    };
    static props: {
        definition: ObjectConstructor;
        measure: ObjectConstructor;
        onMeasureUpdated: FunctionConstructor;
        onRemoved: FunctionConstructor;
        generateMeasureId: FunctionConstructor;
        aggregators: ObjectConstructor;
        pivotId: StringConstructor;
    };
    getMeasureAutocomplete(): AutoCompleteProviderDefinition;
    updateMeasureFormula(formula: string): void;
    updateAggregator(aggregator: string): void;
    updateName(measure: PivotMeasure, userDefinedName?: string): void;
    toggleMeasureVisibility(): void;
    openShowValuesAs(): void;
    getColoredSymbolToken(token: Token): Color | undefined;
}

interface Props$g {
    definition: PivotRuntimeDefinition;
    pivotId: UID;
}
declare class PivotSortSection extends Component<Props$g, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Section: typeof Section;
    };
    static props: {
        definition: ObjectConstructor;
        pivotId: StringConstructor;
    };
    get hasValidSort(): boolean;
    get sortDescription(): string;
    get sortValuesAndFields(): {
        field?: string | undefined;
        value: string;
    }[];
}

interface Props$f {
    definition: PivotRuntimeDefinition;
    onDimensionsUpdated: (definition: Partial<PivotCoreDefinition>) => void;
    unusedGroupableFields: PivotField[];
    measureFields: PivotField[];
    unusedGranularities: Record<string, Set<string>>;
    dateGranularities: string[];
    datetimeGranularities: string[];
    getScrollableContainerEl?: () => HTMLElement;
    pivotId: UID;
}
declare class PivotLayoutConfigurator extends Component<Props$f, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        AddDimensionButton: typeof AddDimensionButton;
        PivotDimension: typeof PivotDimension;
        PivotDimensionOrder: typeof PivotDimensionOrder;
        PivotDimensionGranularity: typeof PivotDimensionGranularity;
        PivotMeasureEditor: typeof PivotMeasureEditor;
        PivotSortSection: typeof PivotSortSection;
    };
    static props: {
        definition: ObjectConstructor;
        onDimensionsUpdated: FunctionConstructor;
        unusedGroupableFields: ArrayConstructor;
        measureFields: ArrayConstructor;
        unusedGranularities: ObjectConstructor;
        dateGranularities: ArrayConstructor;
        datetimeGranularities: ArrayConstructor;
        getScrollableContainerEl: {
            type: FunctionConstructor;
            optional: boolean;
        };
        pivotId: StringConstructor;
    };
    private dimensionsRef;
    private dragAndDrop;
    AGGREGATORS: {};
    private composerFocus;
    isDateOrDatetimeField: typeof isDateOrDatetimeField;
    setup(): void;
    startDragAndDrop(dimension: PivotDimension$1, event: MouseEvent): void;
    getGranularitiesFor(field: PivotField): string[];
    startDragAndDropMeasures(measure: PivotMeasure, event: MouseEvent): void;
    getDimensionElementsRects(): {
        x: number;
        y: number;
        width: number;
        height: number;
    }[];
    removeDimension(dimension: PivotDimension$1): void;
    removeMeasureDimension(measure: PivotMeasure): void;
    addColumnDimension(fieldName: string): void;
    addRowDimension(fieldName: string): void;
    addMeasureDimension(fieldName: string): void;
    updateMeasure(measure: PivotMeasure, newMeasure: PivotMeasure): void;
    private getMeasureId;
    private getDefaultMeasureAggregator;
    addCalculatedMeasure(): void;
    updateOrder(updateDimension: PivotDimension$1, order?: SortDirection): void;
    updateGranularity(dimension: PivotDimension$1, granularity: Granularity): void;
    getMeasureDescription(measure: PivotMeasure): string;
}

declare class PivotSidePanelStore extends SpreadsheetStore {
    private pivotId;
    mutators: readonly ["reset", "deferUpdates", "applyUpdate", "discardPendingUpdate", "update"];
    private updatesAreDeferred;
    private draft;
    private notification;
    private alreadyNotified;
    constructor(get: Get, pivotId: UID);
    handle(cmd: Command): void;
    get fields(): PivotFields;
    get pivot(): Pivot<PivotRuntimeDefinition>;
    get definition(): PivotRuntimeDefinition;
    get isDirty(): boolean;
    get measureFields(): PivotField[];
    get unusedGroupableFields(): PivotField[];
    get datetimeGranularities(): string[];
    get dateGranularities(): string[];
    get unusedGranularities(): Record<string, Set<string>>;
    reset(pivotId: UID): void;
    deferUpdates(shouldDefer: boolean): void;
    applyUpdate(): void;
    discardPendingUpdate(): void;
    update(definitionUpdate: Partial<PivotCoreDefinition>): void;
    /**
     * @returns true if the updated pivot is visible in the viewport only as a
     * static pivot and not as a dynamic pivot
     */
    private isUpdatedPivotVisibleInViewportOnlyAsStaticPivot;
    private addDefaultDateTimeGranularity;
    private getUnusedGranularities;
    /**
     * Check if we want to keep the sorted column when updating the pivot definition. We should remove it if either
     * the measure is not in the new definition or the columns have changed.
     */
    private shouldKeepSortedColumn;
}

interface Props$e {
    pivotId: UID;
    flipAxis: () => void;
}
declare class PivotTitleSection extends Component<Props$e, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        CogWheelMenu: typeof CogWheelMenu;
        Section: typeof Section;
        TextInput: typeof TextInput;
    };
    static props: {
        pivotId: StringConstructor;
        flipAxis: FunctionConstructor;
    };
    get cogWheelMenuItems(): ActionSpec[];
    get name(): string;
    get displayName(): string;
    duplicatePivot(): void;
    delete(): void;
    onNameChanged(name: string): void;
}

declare function isEvaluationError(error: Maybe<CellValue>): error is string;
declare function toNumber(data: FunctionResultObject | CellValue | undefined, locale: Locale): number;
declare function toString(data: FunctionResultObject | CellValue | undefined): string;
declare function toBoolean(data: FunctionResultObject | CellValue | undefined): boolean;
declare function toJsDate(data: FunctionResultObject | CellValue | undefined, locale: Locale): DateTime;

declare function arg(definition: string, description?: string): ArgDefinition;

interface FunctionRegistry extends Registry<FunctionDescription> {
    add(functionName: string, addDescr: AddFunctionDescription): FunctionRegistry;
    get(functionName: string): FunctionDescription;
    mapping: {
        [functionName: string]: ComputeFunction<Matrix<FunctionResultObject> | FunctionResultObject>;
    };
}
declare class FunctionRegistry extends Registry<FunctionDescription> {
    mapping: {
        [key: string]: ComputeFunction<Matrix<FunctionResultObject> | FunctionResultObject>;
    };
}

/**
 * Create a proposal entry for the composer autocomplete
 * to insert a field name string in a formula.
 */
declare function makeFieldProposal(field: PivotField, granularity?: Granularity): {
    text: string;
    description: string;
    htmlContent: {
        value: string;
        color: "#00a82d";
    }[];
    fuzzySearchKey: string;
};
/**
 * Perform the autocomplete of the composer by inserting the value
 * at the cursor position, replacing the current token if necessary.
 * Must be bound to the autocomplete provider.
 */
declare function insertTokenAfterArgSeparator(this: {
    composer: CellComposerStore;
}, tokenAtCursor: EnrichedToken, value: string): void;
/**
 * Perform the autocomplete of the composer by inserting the value
 * at the cursor position, replacing the current token if necessary.
 * Must be bound to the autocomplete provider.
 * @param {EnrichedToken} tokenAtCursor
 * @param {string} value
 */
declare function insertTokenAfterLeftParenthesis(this: {
    composer: CellComposerStore;
}, tokenAtCursor: EnrichedToken, value: string): void;
/**
 * Get the first Pivot function description of the given formula.
 */
declare function getFirstPivotFunction(tokens: Token[]): {
    functionName: string;
    args: AST[];
};
/**
 * Parse a spreadsheet formula and detect the number of PIVOT functions that are
 * present in the given formula.
 */
declare function getNumberOfPivotFunctions(tokens: Token[]): number;

interface Props$d {
    figureId: UID;
    definition: ComboChartDefinition;
    canUpdateChart: (figureID: UID, definition: GenericDefinition<ComboChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: GenericDefinition<ComboChartDefinition>) => DispatchResult;
}
declare class ComboChartDesignPanel extends ChartWithAxisDesignPanel<Props$d> {
    static template: string;
    static components: {
        RadioSelection: typeof RadioSelection;
        GeneralDesignEditor: typeof GeneralDesignEditor;
        SidePanelCollapsible: typeof SidePanelCollapsible;
        Section: typeof Section;
        AxisDesignEditor: typeof AxisDesignEditor;
        Checkbox: typeof Checkbox;
        SeriesWithAxisDesignEditor: typeof SeriesWithAxisDesignEditor;
        ChartLegend: typeof ChartLegend;
    };
    seriesTypeChoices: {
        value: string;
        label: string;
    }[];
    updateDataSeriesType(index: number, type: "bar" | "line"): void;
    getDataSeriesType(index: number): "line" | "bar";
}

interface Props$c {
    figureId: UID;
    definition: RadarChartDefinition;
    canUpdateChart: (figureID: UID, definition: GenericDefinition<RadarChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: GenericDefinition<RadarChartDefinition>) => DispatchResult;
}
declare class RadarChartDesignPanel extends Component<Props$c, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        GeneralDesignEditor: typeof GeneralDesignEditor;
        SeriesDesignEditor: typeof SeriesDesignEditor;
        Section: typeof Section;
        Checkbox: typeof Checkbox;
        ChartLegend: typeof ChartLegend;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        canUpdateChart: FunctionConstructor;
        updateChart: FunctionConstructor;
    };
}

interface Props$b {
    figureId: UID;
    definition: WaterfallChartDefinition;
    canUpdateChart: (figureID: UID, definition: GenericDefinition<WaterfallChartDefinition>) => DispatchResult;
    updateChart: (figureId: UID, definition: GenericDefinition<WaterfallChartDefinition>) => DispatchResult;
}
declare class WaterfallChartDesignPanel extends Component<Props$b, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        GeneralDesignEditor: typeof GeneralDesignEditor;
        Checkbox: typeof Checkbox;
        SidePanelCollapsible: typeof SidePanelCollapsible;
        Section: typeof Section;
        RoundColorPicker: typeof RoundColorPicker;
        AxisDesignEditor: typeof AxisDesignEditor;
        RadioSelection: typeof RadioSelection;
        ChartLegend: typeof ChartLegend;
    };
    static props: {
        figureId: StringConstructor;
        definition: ObjectConstructor;
        updateChart: FunctionConstructor;
        canUpdateChart: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    axisChoices: {
        value: string;
        label: string;
    }[];
    onUpdateShowSubTotals(showSubTotals: boolean): void;
    onUpdateShowConnectorLines(showConnectorLines: boolean): void;
    onUpdateFirstValueAsSubtotal(firstValueAsSubtotal: boolean): void;
    updateColor(colorName: string, color: Color): void;
    get axesList(): AxisDefinition[];
    get positiveValuesColor(): Color | "#4EA7F2";
    get negativeValuesColor(): Color | "#EA6175";
    get subTotalValuesColor(): Color | "#AAAAAA";
    updateVerticalAxisPosition(value: "left" | "right"): void;
}

declare class PivotMeasureDisplayPanelStore extends SpreadsheetStore {
    private pivotId;
    private initialMeasure;
    mutators: readonly ["cancelMeasureDisplayEdition", "updateMeasureDisplayType", "updateMeasureDisplayField", "updateMeasureDisplayValue"];
    measureDisplay: PivotMeasureDisplay;
    constructor(get: Get, pivotId: UID, initialMeasure: PivotCoreMeasure);
    updateMeasureDisplayType(measureDisplayType: PivotMeasureDisplayType): void;
    updateMeasureDisplayField(fieldNameWithGranularity: string): void;
    updateMeasureDisplayValue(value: string): void;
    private updatePivotMeasureDisplay;
    private getMeasureDisplay;
    private getMeasureIndex;
    get doesDisplayNeedsField(): boolean;
    get fields(): {
        displayName: string;
        nameWithGranularity: string;
        type: string;
        isValid: boolean;
        fieldName: string;
        order?: SortDirection | undefined;
        granularity?: string | undefined;
    }[];
    get doesDisplayNeedsValue(): boolean;
    private isDisplayValueDependant;
    get values(): {
        value: string | number | boolean;
        label: string;
    }[];
    private getPossibleValues;
    cancelMeasureDisplayEdition(): void;
}

declare class BarChart extends AbstractChart {
    readonly dataSets: DataSet[];
    readonly labelRange?: Range | undefined;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly stacked: boolean;
    readonly aggregated?: boolean;
    readonly type = "bar";
    readonly dataSetsHaveTitle: boolean;
    readonly dataSetDesign?: DatasetDesign[];
    readonly axesDesign?: AxesDesign;
    readonly horizontal?: boolean;
    readonly showValues?: boolean;
    constructor(definition: BarChartDefinition, sheetId: UID, getters: CoreGetters);
    static transformDefinition(definition: BarChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): BarChartDefinition;
    static validateChartDefinition(validator: Validator, definition: BarChartDefinition): CommandResult | CommandResult[];
    static getDefinitionFromContextCreation(context: ChartCreationContext): BarChartDefinition;
    getContextCreation(): ChartCreationContext;
    duplicateInDuplicatedSheet(newSheetId: UID): BarChart;
    copyInSheetId(sheetId: UID): BarChart;
    getDefinition(): BarChartDefinition;
    private getDefinitionWithSpecificDataSets;
    getDefinitionForExcel(): ExcelChartDefinition | undefined;
    updateRanges(applyChange: ApplyRangeChange): BarChart;
}

declare class GaugeChart extends AbstractChart {
    readonly dataRange?: Range;
    readonly sectionRule: SectionRule;
    readonly background?: Color;
    readonly type = "gauge";
    constructor(definition: GaugeChartDefinition, sheetId: UID, getters: CoreGetters);
    static validateChartDefinition(validator: Validator, definition: GaugeChartDefinition): CommandResult | CommandResult[];
    static transformDefinition(definition: GaugeChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): GaugeChartDefinition;
    static getDefinitionFromContextCreation(context: ChartCreationContext): GaugeChartDefinition;
    duplicateInDuplicatedSheet(newSheetId: UID): GaugeChart;
    copyInSheetId(sheetId: UID): GaugeChart;
    getDefinition(): GaugeChartDefinition;
    private getDefinitionWithSpecificRanges;
    getDefinitionForExcel(): undefined;
    getContextCreation(): ChartCreationContext;
    updateRanges(applyChange: ApplyRangeChange): GaugeChart;
}

declare class LineChart extends AbstractChart {
    readonly dataSets: DataSet[];
    readonly labelRange?: Range | undefined;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly labelsAsText: boolean;
    readonly stacked: boolean;
    readonly aggregated?: boolean;
    readonly type = "line";
    readonly dataSetsHaveTitle: boolean;
    readonly cumulative: boolean;
    readonly dataSetDesign?: DatasetDesign[];
    readonly axesDesign?: AxesDesign;
    readonly fillArea?: boolean;
    readonly showValues?: boolean;
    constructor(definition: LineChartDefinition, sheetId: UID, getters: CoreGetters);
    static validateChartDefinition(validator: Validator, definition: LineChartDefinition): CommandResult | CommandResult[];
    static transformDefinition(definition: LineChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): LineChartDefinition;
    static getDefinitionFromContextCreation(context: ChartCreationContext): LineChartDefinition;
    getDefinition(): LineChartDefinition;
    private getDefinitionWithSpecificDataSets;
    getContextCreation(): ChartCreationContext;
    updateRanges(applyChange: ApplyRangeChange): LineChart;
    getDefinitionForExcel(): ExcelChartDefinition | undefined;
    duplicateInDuplicatedSheet(newSheetId: UID): LineChart;
    copyInSheetId(sheetId: UID): LineChart;
}

declare class PieChart extends AbstractChart {
    readonly dataSets: DataSet[];
    readonly labelRange?: Range | undefined;
    readonly background?: Color;
    readonly legendPosition: LegendPosition;
    readonly type = "pie";
    readonly aggregated?: boolean;
    readonly dataSetsHaveTitle: boolean;
    readonly isDoughnut?: boolean;
    readonly showValues?: boolean;
    constructor(definition: PieChartDefinition, sheetId: UID, getters: CoreGetters);
    static transformDefinition(definition: PieChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): PieChartDefinition;
    static validateChartDefinition(validator: Validator, definition: PieChartDefinition): CommandResult | CommandResult[];
    static getDefinitionFromContextCreation(context: ChartCreationContext): PieChartDefinition;
    getDefinition(): PieChartDefinition;
    getContextCreation(): ChartCreationContext;
    private getDefinitionWithSpecificDataSets;
    duplicateInDuplicatedSheet(newSheetId: UID): PieChart;
    copyInSheetId(sheetId: UID): PieChart;
    getDefinitionForExcel(): ExcelChartDefinition | undefined;
    updateRanges(applyChange: ApplyRangeChange): PieChart;
}

declare class ScorecardChart extends AbstractChart {
    readonly keyValue?: Range;
    readonly baseline?: Range;
    readonly baselineMode: BaselineMode;
    readonly baselineDescr?: string;
    readonly progressBar: boolean;
    readonly background?: Color;
    readonly baselineColorUp: Color;
    readonly baselineColorDown: Color;
    readonly fontColor?: Color;
    readonly humanize?: boolean;
    readonly type = "scorecard";
    constructor(definition: ScorecardChartDefinition, sheetId: UID, getters: CoreGetters);
    static validateChartDefinition(validator: Validator, definition: ScorecardChartDefinition): CommandResult | CommandResult[];
    static getDefinitionFromContextCreation(context: ChartCreationContext): ScorecardChartDefinition;
    static transformDefinition(definition: ScorecardChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): ScorecardChartDefinition;
    duplicateInDuplicatedSheet(newSheetId: UID): ScorecardChart;
    copyInSheetId(sheetId: UID): ScorecardChart;
    getDefinition(): ScorecardChartDefinition;
    getContextCreation(): ChartCreationContext;
    private getDefinitionWithSpecificRanges;
    getDefinitionForExcel(): undefined;
    updateRanges(applyChange: ApplyRangeChange): ScorecardChart;
}

declare class WaterfallChart extends AbstractChart {
    readonly dataSets: DataSet[];
    readonly labelRange?: Range | undefined;
    readonly background?: Color;
    readonly verticalAxisPosition: VerticalAxisPosition;
    readonly legendPosition: LegendPosition;
    readonly aggregated?: boolean;
    readonly type = "waterfall";
    readonly dataSetsHaveTitle: boolean;
    readonly showSubTotals: boolean;
    readonly firstValueAsSubtotal?: boolean;
    readonly showConnectorLines: boolean;
    readonly positiveValuesColor?: Color;
    readonly negativeValuesColor?: Color;
    readonly subTotalValuesColor?: Color;
    readonly dataSetDesign: CustomizedDataSet[];
    readonly axesDesign?: AxesDesign;
    readonly showValues?: boolean;
    constructor(definition: WaterfallChartDefinition, sheetId: UID, getters: CoreGetters);
    static transformDefinition(definition: WaterfallChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): WaterfallChartDefinition;
    static validateChartDefinition(validator: Validator, definition: WaterfallChartDefinition): CommandResult | CommandResult[];
    static getDefinitionFromContextCreation(context: ChartCreationContext): WaterfallChartDefinition;
    getContextCreation(): ChartCreationContext;
    duplicateInDuplicatedSheet(newSheetId: UID): WaterfallChart;
    copyInSheetId(sheetId: UID): WaterfallChart;
    getDefinition(): WaterfallChartDefinition;
    private getDefinitionWithSpecificDataSets;
    getDefinitionForExcel(): ExcelChartDefinition | undefined;
    updateRanges(applyChange: ApplyRangeChange): WaterfallChart;
}

declare function getPivotHighlights(getters: Getters, pivotId: UID): Highlight$1[];

declare function pivotTimeAdapter(granularity: Granularity): PivotTimeAdapter<CellValue>;

/**
 * This function tries to load anything that could look like a valid
 * workbookData object. It applies any migrations, if needed, and return a
 * current, complete workbookData object.
 *
 * It also ensures that there is at least one sheet.
 */
declare function load(data?: any, verboseImport?: boolean): WorkbookData;
declare function createEmptySheet(sheetId: UID, name: string): SheetData;
declare function createEmptyWorkbookData(sheetName?: string): WorkbookData;
declare function createEmptyExcelSheet(sheetId: UID, name: string): ExcelSheetData;

declare function genericRepeat<T extends Command>(getters: Getters, command: T): T;

interface Renderer {
    drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
    renderingLayers: Readonly<LayerName[]>;
}
declare class RendererStore {
    mutators: readonly ["register", "unRegister"];
    private renderers;
    register(renderer: Renderer): void;
    unRegister(renderer: Renderer): void;
    drawLayer(context: GridRenderingContext, layer: LayerName): void;
}

interface RippleProps {
    color: string;
    opacity: number;
    duration: number;
    /** If true, the ripple will play from the element center instead of the position of the click */
    ignoreClickPosition?: boolean;
    /** Width of the ripple. Defaults to the width of the element the ripple is on (without margins). */
    width?: number;
    /** Height of the ripple. Defaults to the height of the element the ripple is on (without margins). */
    height?: number;
    offsetY?: number;
    offsetX?: number;
    allowOverflow?: boolean;
    enabled: boolean;
    onAnimationEnd: () => void;
    class: string;
}
interface RippleEffectProps extends Omit<Required<RippleProps>, "ignoreClickPosition" | "enabled" | "class"> {
    x: string;
    y: string;
    style: string;
}
declare class RippleEffect extends Component<RippleEffectProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        x: StringConstructor;
        y: StringConstructor;
        color: StringConstructor;
        opacity: NumberConstructor;
        duration: NumberConstructor;
        width: NumberConstructor;
        height: NumberConstructor;
        offsetY: NumberConstructor;
        offsetX: NumberConstructor;
        allowOverflow: BooleanConstructor;
        onAnimationEnd: FunctionConstructor;
        style: StringConstructor;
    };
    private rippleRef;
    setup(): void;
    get rippleStyle(): string;
}
declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        color: {
            type: StringConstructor;
            optional: boolean;
        };
        opacity: {
            type: NumberConstructor;
            optional: boolean;
        };
        duration: {
            type: NumberConstructor;
            optional: boolean;
        };
        ignoreClickPosition: {
            type: BooleanConstructor;
            optional: boolean;
        };
        width: {
            type: NumberConstructor;
            optional: boolean;
        };
        height: {
            type: NumberConstructor;
            optional: boolean;
        };
        offsetY: {
            type: NumberConstructor;
            optional: boolean;
        };
        offsetX: {
            type: NumberConstructor;
            optional: boolean;
        };
        allowOverflow: {
            type: BooleanConstructor;
            optional: boolean;
        };
        enabled: {
            type: BooleanConstructor;
            optional: boolean;
        };
        onAnimationEnd: {
            type: FunctionConstructor;
            optional: boolean;
        };
        slots: ObjectConstructor;
        class: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    static components: {
        RippleEffect: typeof RippleEffect;
    };
    static defaultProps: {
        color: string;
        opacity: number;
        duration: number;
        enabled: boolean;
        onAnimationEnd: () => void;
        class: string;
    };
    private childContainer;
    private state;
    private currentId;
    onClick(ev: MouseEvent): void;
    private getRippleStyle;
    private getRippleChildRectInfo;
    private removeRipple;
    getRippleEffectProps(id: number): RippleEffectProps;
}

interface Props$a {
    sheetId: string;
    openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
    style?: string;
    onMouseDown: (ev: MouseEvent) => void;
}
declare class BottomBarSheet extends Component<Props$a, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        sheetId: StringConstructor;
        openContextMenu: FunctionConstructor;
        style: {
            type: StringConstructor;
            optional: boolean;
        };
        onMouseDown: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    static components: {
        Ripple: typeof Ripple;
        ColorPicker: typeof ColorPicker;
    };
    static defaultProps: {
        onMouseDown: () => void;
        style: string;
    };
    private state;
    private sheetDivRef;
    private sheetNameRef;
    private editionState;
    private DOMFocusableElementStore;
    setup(): void;
    private focusInputAndSelectContent;
    private scrollToSheet;
    onFocusOut(): void;
    onMouseDown(ev: any): void;
    private activateSheet;
    onDblClick(): void;
    onKeyDown(ev: KeyboardEvent): void;
    onMouseEventSheetName(ev: MouseEvent): void;
    private startEdition;
    private stopEdition;
    private cancelEdition;
    onIconClick(ev: MouseEvent): void;
    onContextMenu(ev: MouseEvent): void;
    private getInputContent;
    private setInputContent;
    onColorPicked(color: string): void;
    get colorPickerAnchorRect(): Rect;
    get contextMenuRegistry(): MenuItemRegistry;
    get isSheetActive(): boolean;
    get sheetName(): string;
    get sheetColorStyle(): string;
}

interface Props$9 {
    openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
    closeContextMenu: () => void;
}
declare class BottomBarStatistic extends Component<Props$9, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        openContextMenu: FunctionConstructor;
        closeContextMenu: FunctionConstructor;
    };
    static components: {
        Ripple: typeof Ripple;
    };
    selectedStatisticFn: string;
    private store;
    setup(): void;
    getSelectedStatistic(): string | undefined;
    listSelectionStatistics(ev: MouseEvent): void;
    private getComposedFnName;
}

interface BottomBarSheetItem {
    id: UID;
    name: string;
}
interface Props$8 {
    onClick: () => void;
}
interface BottomBarMenuState extends MenuState {
    menuId: UID | undefined;
}
declare class BottomBar extends Component<Props$8, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        onClick: FunctionConstructor;
    };
    static components: {
        Menu: typeof Menu;
        Ripple: typeof Ripple;
        BottomBarSheet: typeof BottomBarSheet;
        BottomBarStatistic: typeof BottomBarStatistic;
    };
    private bottomBarRef;
    private sheetListRef;
    private dragAndDrop;
    private targetScroll;
    private state;
    menuMaxHeight: number;
    menuState: BottomBarMenuState;
    sheetList: BottomBarSheetItem[];
    setup(): void;
    clickAddSheet(ev: MouseEvent): void;
    getVisibleSheets(): BottomBarSheetItem[];
    clickListSheets(ev: MouseEvent): void;
    openContextMenu(x: Pixel, y: Pixel, menuId: UID, registry: MenuItemRegistry): void;
    onSheetContextMenu(sheetId: UID, registry: MenuItemRegistry, ev: MenuMouseEvent): void;
    closeMenu(): void;
    closeContextMenuWithId(menuId: UID): void;
    onWheel(ev: WheelEvent): void;
    onScroll(): void;
    onArrowLeft(ev: MouseEvent): void;
    onArrowRight(ev: MouseEvent): void;
    private updateScrollState;
    private scrollSheetListTo;
    onSheetMouseDown(sheetId: UID, event: MouseEvent): void;
    private onDragEnd;
    getSheetStyle(sheetId: UID): string;
    private getSheetItemRects;
    get sheetListCurrentScroll(): number;
    get sheetListWidth(): number;
    get sheetListMaxScroll(): number;
}

interface ClickableCell {
    coordinates: Rect;
    position: CellPosition;
    title: string;
    action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
}
declare class ClickableCellsStore extends SpreadsheetStore {
    private _clickableCells;
    private _registryItems;
    handle(cmd: Command): void;
    private getClickableItem;
    private findClickableItem;
    get clickableCells(): ClickableCell[];
}

interface Props$7 {
}
declare class SpreadsheetDashboard extends Component<Props$7, SpreadsheetChildEnv> {
    static template: string;
    static props: {};
    static components: {
        GridOverlay: typeof GridOverlay;
        GridPopover: typeof GridPopover;
        Popover: typeof Popover;
        VerticalScrollBar: typeof VerticalScrollBar;
        HorizontalScrollBar: typeof HorizontalScrollBar;
    };
    protected cellPopovers: Store<CellPopoverStore>;
    onMouseWheel: (ev: WheelEvent) => void;
    canvasPosition: DOMCoordinates;
    hoveredCell: Store<HoveredCellStore>;
    clickableCellsStore: Store<ClickableCellsStore>;
    setup(): void;
    onCellHovered({ col, row }: {
        col: any;
        row: any;
    }): void;
    get gridContainer(): string;
    get gridOverlayDimensions(): string;
    getCellClickableStyle(coordinates: Rect): string;
    /**
     * Get all the boxes for the cell in the sheet view that are clickable.
     * This function is used to render an overlay over each clickable cell in
     * order to display a pointer cursor.
     *
     */
    getClickableCells(): ClickableCell[];
    selectClickableCell(clickableCell: ClickableCell): void;
    onClosePopover(): void;
    onGridResized({ height, width }: DOMDimension): void;
    private moveCanvas;
    private getGridRect;
}

interface Props$6 {
    group: HeaderGroup;
    layerOffset: number;
    openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
}
interface GroupBox {
    groupRect: Rect;
    headerRect: Rect;
    isEndHidden: boolean;
}
declare abstract class AbstractHeaderGroup extends Component<Props$6, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        group: ObjectConstructor;
        layerOffset: NumberConstructor;
        openContextMenu: FunctionConstructor;
    };
    abstract dimension: Dimension;
    toggleGroup(): void;
    get groupBoxStyle(): string;
    abstract get groupBorderStyle(): string;
    abstract get groupHeaderStyle(): string;
    get groupButtonStyle(): string;
    get groupButtonIcon(): string;
    get isGroupFolded(): boolean;
    /** The box that will be used to draw the header group. */
    abstract get groupBox(): GroupBox;
    onContextMenu(ev: MouseEvent): void;
}
declare class RowGroup extends AbstractHeaderGroup {
    dimension: Dimension;
    get groupBorderStyle(): string;
    get groupHeaderStyle(): string;
    get groupBox(): GroupBox;
}
declare class ColGroup extends AbstractHeaderGroup {
    dimension: Dimension;
    get groupBorderStyle(): string;
    get groupHeaderStyle(): string;
    get groupBox(): GroupBox;
}

interface Props$5 {
    dimension: Dimension;
    layers: HeaderGroup[][];
}
declare class HeaderGroupContainer extends Component<Props$5, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        dimension: StringConstructor;
        layers: ArrayConstructor;
    };
    static components: {
        RowGroup: typeof RowGroup;
        ColGroup: typeof ColGroup;
        Menu: typeof Menu;
    };
    menu: MenuState;
    getLayerOffset(layerIndex: number): number;
    onContextMenu(event: MouseEvent): void;
    openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
    closeMenu(): void;
    get groupComponent(): typeof RowGroup;
    get hasFrozenPane(): boolean;
    get scrollContainerStyle(): string;
    get frozenPaneContainerStyle(): string;
    get frozenPaneContainerSize(): Pixel;
}

declare class SidePanel extends Component<{}, SpreadsheetChildEnv> {
    static template: string;
    static props: {};
    sidePanelStore: Store<SidePanelStore>;
    spreadsheetRect: Rect;
    setup(): void;
    get panel(): SidePanelContent;
    close(): void;
    getTitle(): string;
    startHandleDrag(ev: MouseEvent): void;
}

declare const sortRange: ActionSpec;
declare const sortAscending: ActionSpec;
declare const dataCleanup: ActionSpec;
declare const removeDuplicates: ActionSpec;
declare const trimWhitespace: ActionSpec;
declare const sortDescending: ActionSpec;
declare const createRemoveFilter: ActionSpec;
declare const createRemoveFilterTool: ActionSpec;
declare const splitToColumns: ActionSpec;
declare const reinsertDynamicPivotMenu: ActionSpec;
declare const reinsertStaticPivotMenu: ActionSpec;

declare const ACTION_DATA_createRemoveFilter: typeof createRemoveFilter;
declare const ACTION_DATA_createRemoveFilterTool: typeof createRemoveFilterTool;
declare const ACTION_DATA_dataCleanup: typeof dataCleanup;
declare const ACTION_DATA_reinsertDynamicPivotMenu: typeof reinsertDynamicPivotMenu;
declare const ACTION_DATA_reinsertStaticPivotMenu: typeof reinsertStaticPivotMenu;
declare const ACTION_DATA_removeDuplicates: typeof removeDuplicates;
declare const ACTION_DATA_sortAscending: typeof sortAscending;
declare const ACTION_DATA_sortDescending: typeof sortDescending;
declare const ACTION_DATA_sortRange: typeof sortRange;
declare const ACTION_DATA_splitToColumns: typeof splitToColumns;
declare const ACTION_DATA_trimWhitespace: typeof trimWhitespace;
declare namespace ACTION_DATA {
  export {
    ACTION_DATA_createRemoveFilter as createRemoveFilter,
    ACTION_DATA_createRemoveFilterTool as createRemoveFilterTool,
    ACTION_DATA_dataCleanup as dataCleanup,
    ACTION_DATA_reinsertDynamicPivotMenu as reinsertDynamicPivotMenu,
    ACTION_DATA_reinsertStaticPivotMenu as reinsertStaticPivotMenu,
    ACTION_DATA_removeDuplicates as removeDuplicates,
    ACTION_DATA_sortAscending as sortAscending,
    ACTION_DATA_sortDescending as sortDescending,
    ACTION_DATA_sortRange as sortRange,
    ACTION_DATA_splitToColumns as splitToColumns,
    ACTION_DATA_trimWhitespace as trimWhitespace,
  };
}

declare const undo: ActionSpec;
declare const redo: ActionSpec;
declare const copy: ActionSpec;
declare const cut: ActionSpec;
declare const paste: ActionSpec;
declare const pasteSpecial: ActionSpec;
declare const pasteSpecialValue: ActionSpec;
declare const pasteSpecialFormat: ActionSpec;
declare const findAndReplace: ActionSpec;
declare const deleteValues: ActionSpec;
declare const deleteRows: ActionSpec;
declare const deleteRow: ActionSpec;
declare const clearRows: ActionSpec;
declare const deleteCols: ActionSpec;
declare const deleteCol: ActionSpec;
declare const clearCols: ActionSpec;
declare const deleteCells: ActionSpec;
declare const deleteCellShiftUp: ActionSpec;
declare const deleteCellShiftLeft: ActionSpec;
declare const mergeCells: ActionSpec;
declare const editTable: ActionSpec;
declare const deleteTable: ActionSpec;

declare const ACTION_EDIT_clearCols: typeof clearCols;
declare const ACTION_EDIT_clearRows: typeof clearRows;
declare const ACTION_EDIT_copy: typeof copy;
declare const ACTION_EDIT_cut: typeof cut;
declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
declare const ACTION_EDIT_deleteCells: typeof deleteCells;
declare const ACTION_EDIT_deleteCol: typeof deleteCol;
declare const ACTION_EDIT_deleteCols: typeof deleteCols;
declare const ACTION_EDIT_deleteRow: typeof deleteRow;
declare const ACTION_EDIT_deleteRows: typeof deleteRows;
declare const ACTION_EDIT_deleteTable: typeof deleteTable;
declare const ACTION_EDIT_deleteValues: typeof deleteValues;
declare const ACTION_EDIT_editTable: typeof editTable;
declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
declare const ACTION_EDIT_mergeCells: typeof mergeCells;
declare const ACTION_EDIT_paste: typeof paste;
declare const ACTION_EDIT_pasteSpecial: typeof pasteSpecial;
declare const ACTION_EDIT_pasteSpecialFormat: typeof pasteSpecialFormat;
declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
declare const ACTION_EDIT_redo: typeof redo;
declare const ACTION_EDIT_undo: typeof undo;
declare namespace ACTION_EDIT {
  export {
    ACTION_EDIT_clearCols as clearCols,
    ACTION_EDIT_clearRows as clearRows,
    ACTION_EDIT_copy as copy,
    ACTION_EDIT_cut as cut,
    ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
    ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
    ACTION_EDIT_deleteCells as deleteCells,
    ACTION_EDIT_deleteCol as deleteCol,
    ACTION_EDIT_deleteCols as deleteCols,
    ACTION_EDIT_deleteRow as deleteRow,
    ACTION_EDIT_deleteRows as deleteRows,
    ACTION_EDIT_deleteTable as deleteTable,
    ACTION_EDIT_deleteValues as deleteValues,
    ACTION_EDIT_editTable as editTable,
    ACTION_EDIT_findAndReplace as findAndReplace,
    ACTION_EDIT_mergeCells as mergeCells,
    ACTION_EDIT_paste as paste,
    ACTION_EDIT_pasteSpecial as pasteSpecial,
    ACTION_EDIT_pasteSpecialFormat as pasteSpecialFormat,
    ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
    ACTION_EDIT_redo as redo,
    ACTION_EDIT_undo as undo,
  };
}

declare class PositionMap<T> {
    private map;
    constructor(entries?: Iterable<readonly [CellPosition, T]>);
    set({ sheetId, col, row }: CellPosition, value: T): void;
    get({ sheetId, col, row }: CellPosition): T | undefined;
    getSheet(sheetId: UID): Record<number, Record<number, T>> | undefined;
    has({ sheetId, col, row }: CellPosition): boolean;
    delete({ sheetId, col, row }: CellPosition): void;
    keys(): CellPosition[];
    keysForSheet(sheetId: UID): CellPosition[];
    entries(): IterableIterator<[CellPosition, T]>;
}

declare class FormulaFingerprintStore extends SpreadsheetStore {
    mutators: readonly ["enable", "disable"];
    private isInvalidated;
    private fingerprintColors;
    isEnabled: boolean;
    colors: PositionMap<Color>;
    handle(cmd: Command): void;
    finalize(): void;
    enable(): void;
    disable(): void;
    private computeFingerprints;
    private colorSpreadZone;
    private assignColors;
    private computeFingerprint;
    private computeFormulaFingerprint;
    private getLiteralFingerprint;
}

interface Props$4 {
    action: ActionSpec;
    hasTriangleDownIcon?: boolean;
    selectedColor?: string;
    class?: string;
    onClick?: (ev: MouseEvent) => void;
}
declare class ActionButton extends Component<Props$4, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        action: ObjectConstructor;
        hasTriangleDownIcon: {
            type: BooleanConstructor;
            optional: boolean;
        };
        selectedColor: {
            type: StringConstructor;
            optional: boolean;
        };
        class: {
            type: StringConstructor;
            optional: boolean;
        };
        onClick: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    private actionButton;
    setup(): void;
    get isVisible(): boolean;
    get isEnabled(): boolean;
    get isActive(): boolean | undefined;
    get title(): string;
    get iconTitle(): string;
    onClick(ev: MouseEvent): void;
    get buttonStyle(): string;
}

type Tool = "borderColorTool" | "borderTypeTool";
interface State$4 {
    activeTool: Tool | undefined;
}
interface BorderEditorProps {
    class?: string;
    currentBorderColor: Color;
    currentBorderStyle: BorderStyle;
    currentBorderPosition: BorderPosition | undefined;
    onBorderColorPicked: (color: Color) => void;
    onBorderStylePicked: (style: BorderStyle) => void;
    onBorderPositionPicked: (position: BorderPosition) => void;
    maxHeight?: Pixel;
    anchorRect: Rect;
}
declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        class: {
            type: StringConstructor;
            optional: boolean;
        };
        currentBorderColor: {
            type: StringConstructor;
            optional: boolean;
        };
        currentBorderStyle: {
            type: StringConstructor;
            optional: boolean;
        };
        currentBorderPosition: {
            type: StringConstructor;
            optional: boolean;
        };
        onBorderColorPicked: FunctionConstructor;
        onBorderStylePicked: FunctionConstructor;
        onBorderPositionPicked: FunctionConstructor;
        maxHeight: {
            type: NumberConstructor;
            optional: boolean;
        };
        anchorRect: ObjectConstructor;
    };
    static components: {
        ColorPickerWidget: typeof ColorPickerWidget;
        Popover: typeof Popover;
    };
    BORDER_POSITIONS: [BorderPosition, string][][];
    lineStyleButtonRef: {
        el: HTMLElement | null;
    };
    borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
    state: State$4;
    toggleDropdownTool(tool: Tool): void;
    closeDropdown(): void;
    setBorderPosition(position: BorderPosition): void;
    setBorderColor(color: Color): void;
    setBorderStyle(style: BorderStyle): void;
    get lineStylePickerPopoverProps(): PopoverProps;
    get popoverProps(): PopoverProps;
    get lineStylePickerAnchorRect(): Rect;
}

interface Props$3 {
    toggleBorderEditor: (ev: MouseEvent) => void;
    showBorderEditor: boolean;
    disabled?: boolean;
    dropdownMaxHeight?: Pixel;
    class?: string;
}
interface State$3 {
    currentColor: Color;
    currentStyle: BorderStyle;
    currentPosition: BorderPosition | undefined;
}
declare class BorderEditorWidget extends Component<Props$3, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        toggleBorderEditor: FunctionConstructor;
        showBorderEditor: BooleanConstructor;
        disabled: {
            type: BooleanConstructor;
            optional: boolean;
        };
        dropdownMaxHeight: {
            type: NumberConstructor;
            optional: boolean;
        };
        class: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    static components: {
        BorderEditor: typeof BorderEditor;
    };
    borderEditorButtonRef: {
        el: HTMLElement | null;
    };
    state: State$3;
    setup(): void;
    get borderEditorAnchorRect(): Rect;
    onBorderPositionPicked(position: BorderPosition): void;
    onBorderColorPicked(color: Color): void;
    onBorderStylePicked(style: BorderStyle): void;
    private updateBorder;
}

declare class TopBarComposer extends Component<any, SpreadsheetChildEnv> {
    static template: string;
    static props: {};
    static components: {
        Composer: typeof Composer;
    };
    private composerFocusStore;
    private composerStore;
    private composerInterface;
    setup(): void;
    get focus(): ComposerFocusType;
    get composerStyle(): string;
    get containerStyle(): string;
    onFocus(selection: ComposerSelection): void;
}

interface Props$2 {
    tableConfig: TableConfig;
    tableStyle: TableStyle;
    class: string;
    styleId?: string;
    selected?: boolean;
    onClick?: () => void;
}
declare class TableStylePreview extends Component<Props$2, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Menu: typeof Menu;
    };
    static props: {
        tableConfig: ObjectConstructor;
        tableStyle: ObjectConstructor;
        class: StringConstructor;
        styleId: {
            type: StringConstructor;
            optional: boolean;
        };
        selected: {
            type: BooleanConstructor;
            optional: boolean;
        };
        onClick: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    private canvasRef;
    menu: MenuState;
    setup(): void;
    private drawTable;
    onContextMenu(event: MouseEvent): void;
    closeMenu(): void;
    get styleName(): string;
    get isStyleEditable(): boolean;
    editTableStyle(): void;
}

interface TableStylesPopoverProps {
    selectedStyleId?: string;
    tableConfig: Omit<TableConfig, "styleId">;
    closePopover: () => void;
    onStylePicked: (styleId: string) => void;
    popoverProps?: PopoverProps;
}
type CustomTablePopoverMouseEvent = MouseEvent & {
    hasClosedTableStylesPopover?: boolean;
};
interface State$2 {
    selectedCategory: string;
}
declare class TableStylesPopover extends Component<TableStylesPopoverProps, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        Popover: typeof Popover;
        TableStylePreview: typeof TableStylePreview;
    };
    static props: {
        tableConfig: ObjectConstructor;
        popoverProps: {
            type: ObjectConstructor;
            optional: boolean;
        };
        closePopover: FunctionConstructor;
        onStylePicked: FunctionConstructor;
        selectedStyleId: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    categories: {
        light: string;
        medium: string;
        dark: string;
        custom: string;
    };
    private tableStyleListRef;
    state: State$2;
    menu: MenuState;
    setup(): void;
    onExternalClick(ev: CustomTablePopoverMouseEvent): void;
    get displayedStyles(): string[];
    get initialSelectedCategory(): string;
    newTableStyle(): void;
}

interface State$1 {
    popoverProps: PopoverProps | undefined;
}
declare class TableDropdownButton extends Component<{}, SpreadsheetChildEnv> {
    static template: string;
    static components: {
        TableStylesPopover: typeof TableStylesPopover;
        ActionButton: typeof ActionButton;
    };
    static props: {};
    state: State$1;
    onStylePicked(styleId: string): void;
    onClick(ev: CustomTablePopoverMouseEvent): void;
    private closePopover;
    get action(): ActionSpec;
    get tableConfig(): TableConfig;
}

interface Props$1 {
    class?: string;
}
declare class PaintFormatButton extends Component<Props$1, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        class: {
            type: StringConstructor;
            optional: boolean;
        };
    };
    private paintFormatStore;
    setup(): void;
    get isActive(): boolean;
    onDblClick(): void;
    togglePaintFormat(): void;
}

interface State {
    menuState: MenuState;
    activeTool: string;
    fillColor: string;
    textColor: string;
}
interface Props {
    onClick: () => void;
    dropdownMaxHeight: Pixel;
}
declare class TopBar extends Component<Props, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        onClick: FunctionConstructor;
        dropdownMaxHeight: NumberConstructor;
    };
    static components: {
        ColorPickerWidget: typeof ColorPickerWidget;
        ColorPicker: typeof ColorPicker;
        Menu: typeof Menu;
        TopBarComposer: typeof TopBarComposer;
        FontSizeEditor: typeof FontSizeEditor;
        ActionButton: typeof ActionButton;
        PaintFormatButton: typeof PaintFormatButton;
        BorderEditorWidget: typeof BorderEditorWidget;
        TableDropdownButton: typeof TableDropdownButton;
    };
    state: State;
    isSelectingMenu: boolean;
    openedEl: HTMLElement | null;
    menus: Action[];
    EDIT: typeof ACTION_EDIT;
    FORMAT: typeof ACTION_FORMAT;
    DATA: typeof ACTION_DATA;
    formatNumberMenuItemSpec: ActionSpec;
    isntToolbarMenu: boolean;
    composerFocusStore: Store<ComposerFocusStore>;
    fingerprints: Store<FormulaFingerprintStore>;
    setup(): void;
    get topbarComponents(): TopbarComponent[];
    get currentFontSize(): number;
    onExternalClick(ev: MouseEvent): void;
    onClick(): void;
    onMenuMouseOver(menu: Action, ev: MouseEvent): void;
    toggleDropdownTool(tool: string, ev: MouseEvent): void;
    toggleContextMenu(menu: Action, ev: MouseEvent): void;
    toggleToolbarContextMenu(menuSpec: ActionSpec, ev: MouseEvent): void;
    private openMenu;
    closeMenus(): void;
    updateCellState(): void;
    getMenuName(menu: Action): string;
    setColor(target: string, color: Color): void;
    setFontSize(fontSize: number): void;
}

interface SpreadsheetProps extends Partial<NotificationStoreMethods> {
    model: Model;
}
declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEnv> {
    static template: string;
    static props: {
        model: ObjectConstructor;
        notifyUser: {
            type: FunctionConstructor;
            optional: boolean;
        };
        raiseError: {
            type: FunctionConstructor;
            optional: boolean;
        };
        askConfirmation: {
            type: FunctionConstructor;
            optional: boolean;
        };
    };
    static components: {
        TopBar: typeof TopBar;
        Grid: typeof Grid;
        BottomBar: typeof BottomBar;
        SidePanel: typeof SidePanel;
        SpreadsheetDashboard: typeof SpreadsheetDashboard;
        HeaderGroupContainer: typeof HeaderGroupContainer;
    };
    sidePanel: Store<SidePanelStore>;
    spreadsheetRef: {
        el: HTMLElement | null;
    };
    spreadsheetRect: Rect;
    private _focusGrid?;
    private isViewportTooSmall;
    private notificationStore;
    private composerFocusStore;
    get model(): Model;
    getStyle(): string;
    setup(): void;
    private bindModelEvents;
    private unbindModelEvents;
    private checkViewportSize;
    focusGrid(): void;
    get gridHeight(): Pixel;
    get gridContainerStyle(): string;
    get rowLayers(): HeaderGroup[][];
    get colLayers(): HeaderGroup[][];
}

type SprintfValues = (string | String | number)[] | [{
    [key: string]: string | number;
}];
type TranslationFunction = (string: string, ...values: SprintfValues) => string;
/***
 * Allow to inject a translation function from outside o-spreadsheet. This should be called before instantiating
 * a model.
 * @param tfn the function that will do the translation
 * @param loaded a function that returns true when the translation is loaded
 */
declare function setTranslationMethod(tfn: TranslationFunction, loaded?: () => boolean): void;

declare const CellErrorType: {
    readonly NotAvailable: "#N/A";
    readonly InvalidReference: "#REF";
    readonly BadExpression: "#BAD_EXPR";
    readonly CircularDependency: "#CYCLE";
    readonly UnknownFunction: "#NAME?";
    readonly DivisionByZero: "#DIV/0!";
    readonly SpilledBlocked: "#SPILL!";
    readonly GenericError: "#ERROR";
    readonly NullError: "#NULL!";
};
declare class EvaluationError extends Error {
    readonly value: string;
    constructor(message?: string, value?: string);
}

/**
 * We export here all entities that needs to be accessed publicly by Odoo.
 *
 * Note that the __info__ key is actually completed by the build process (see
 * the rollup.config.js file)
 */
declare const __info__: {};

declare const SPREADSHEET_DIMENSIONS: {
    MIN_ROW_HEIGHT: number;
    MIN_COL_WIDTH: number;
    HEADER_HEIGHT: number;
    HEADER_WIDTH: number;
    BOTTOMBAR_HEIGHT: number;
    DEFAULT_CELL_WIDTH: number;
    DEFAULT_CELL_HEIGHT: number;
    SCROLLBAR_WIDTH: number;
};
declare const registries: {
    autoCompleteProviders: Registry<AutoCompleteProviderDefinition>;
    autofillModifiersRegistry: Registry<AutofillModifierImplementation>;
    autofillRulesRegistry: Registry<AutofillRule>;
    cellMenuRegistry: MenuItemRegistry;
    colMenuRegistry: MenuItemRegistry;
    errorTypes: Set<string>;
    linkMenuRegistry: MenuItemRegistry;
    functionRegistry: FunctionRegistry;
    featurePluginRegistry: Registry<UIPluginConstructor>;
    iconsOnCellRegistry: Registry<(getters: Getters, position: CellPosition) => string | undefined>;
    statefulUIPluginRegistry: Registry<UIPluginConstructor>;
    coreViewsPluginRegistry: Registry<CoreViewPluginConstructor>;
    corePluginRegistry: Registry<CorePluginConstructor>;
    rowMenuRegistry: MenuItemRegistry;
    sidePanelRegistry: Registry<SidePanelContent>;
    figureRegistry: Registry<FigureContent>;
    chartSidePanelComponentRegistry: Registry<ChartSidePanel>;
    chartComponentRegistry: Registry<new (...args: any) => _odoo_owl.Component<any, any>>;
    chartRegistry: Registry<ChartBuilder>;
    chartSubtypeRegistry: Registry<ChartSubtypeProperties>;
    topbarMenuRegistry: MenuItemRegistry;
    topbarComponentRegistry: {
        mapping: {
            [key: string]: Function;
        };
        uuidGenerator: UuidGenerator;
        add(name: string, value: Omit<TopbarComponent, "id">): Registry<TopbarComponent>;
        getAllOrdered(): TopbarComponent[];
        content: {
            [key: string]: TopbarComponent;
        };
        get(key: string): TopbarComponent;
        contains(key: string): boolean;
        getAll(): TopbarComponent[];
        getKeys(): string[];
        remove(key: string): void;
    };
    clickableCellRegistry: Registry<CellClickableItem>;
    otRegistry: OTRegistry;
    inverseCommandRegistry: Registry<(cmd: CoreCommand) => CoreCommand[]>;
    urlRegistry: Registry<LinkSpec>;
    cellPopoverRegistry: Registry<PopoverBuilders>;
    numberFormatMenuRegistry: Registry<NumberFormatActionSpec>;
    repeatLocalCommandTransformRegistry: Registry<(getters: Getters, cmd: LocalCommand, childCommands: readonly CoreCommand[]) => LocalCommand | CoreCommand[] | undefined>;
    repeatCommandTransformRegistry: Registry<(getters: Getters, cmd: CoreCommand) => CoreCommand | undefined>;
    clipboardHandlersRegistries: {
        figureHandlers: Registry<{
            new (getters: Getters, dispatch: {
                <T extends "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT", C extends Extract<UpdateCellCommand, {
                    type: T;
                }> | Extract<UpdateCellPositionCommand, {
                    type: T;
                }> | Extract<ClearCellCommand, {
                    type: T;
                }> | Extract<ClearCellsCommand, {
                    type: T;
                }> | Extract<DeleteContentCommand, {
                    type: T;
                }> | Extract<AddColumnsRowsCommand, {
                    type: T;
                }> | Extract<RemoveColumnsRowsCommand, {
                    type: T;
                }> | Extract<ResizeColumnsRowsCommand, {
                    type: T;
                }> | Extract<HideColumnsRowsCommand, {
                    type: T;
                }> | Extract<UnhideColumnsRowsCommand, {
                    type: T;
                }> | Extract<SetGridLinesVisibilityCommand, {
                    type: T;
                }> | Extract<FreezeColumnsCommand, {
                    type: T;
                }> | Extract<FreezeRowsCommand, {
                    type: T;
                }> | Extract<UnfreezeColumnsRowsCommand, {
                    type: T;
                }> | Extract<UnfreezeColumnsCommand, {
                    type: T;
                }> | Extract<UnfreezeRowsCommand, {
                    type: T;
                }> | Extract<AddMergeCommand, {
                    type: T;
                }> | Extract<RemoveMergeCommand, {
                    type: T;
                }> | Extract<CreateSheetCommand, {
                    type: T;
                }> | Extract<DeleteSheetCommand, {
                    type: T;
                }> | Extract<DuplicateSheetCommand, {
                    type: T;
                }> | Extract<MoveSheetCommand, {
                    type: T;
                }> | Extract<RenameSheetCommand, {
                    type: T;
                }> | Extract<ColorSheetCommand, {
                    type: T;
                }> | Extract<HideSheetCommand, {
                    type: T;
                }> | Extract<ShowSheetCommand, {
                    type: T;
                }> | Extract<MoveRangeCommand, {
                    type: T;
                }> | Extract<AddConditionalFormatCommand, {
                    type: T;
                }> | Extract<RemoveConditionalFormatCommand, {
                    type: T;
                }> | Extract<MoveConditionalFormatCommand, {
                    type: T;
                }> | Extract<CreateFigureCommand, {
                    type: T;
                }> | Extract<DeleteFigureCommand, {
                    type: T;
                }> | Extract<UpdateFigureCommand, {
                    type: T;
                }> | Extract<SetFormattingCommand, {
                    type: T;
                }> | Extract<ClearFormattingCommand, {
                    type: T;
                }> | Extract<SetZoneBordersCommand, {
                    type: T;
                }> | Extract<SetBorderCommand, {
                    type: T;
                }> | Extract<CreateChartCommand, {
                    type: T;
                }> | Extract<UpdateChartCommand, {
                    type: T;
                }> | Extract<CreateImageOverCommand, {
                    type: T;
                }> | Extract<CreateTableCommand, {
                    type: T;
                }> | Extract<RemoveTableCommand, {
                    type: T;
                }> | Extract<UpdateTableCommand, {
                    type: T;
                }> | Extract<CreateTableStyleCommand, {
                    type: T;
                }> | Extract<RemoveTableStyleCommand, {
                    type: T;
                }> | Extract<GroupHeadersCommand, {
                    type: T;
                }> | Extract<UnGroupHeadersCommand, {
                    type: T;
                }> | Extract<UnfoldHeaderGroupCommand, {
                    type: T;
                }> | Extract<FoldHeaderGroupCommand, {
                    type: T;
                }> | Extract<FoldAllHeaderGroupsCommand, {
                    type: T;
                }> | Extract<UnfoldAllHeaderGroupsCommand, {
                    type: T;
                }> | Extract<UnfoldHeaderGroupsInZoneCommand, {
                    type: T;
                }> | Extract<FoldHeaderGroupsInZoneCommand, {
                    type: T;
                }> | Extract<AddDataValidationCommand, {
                    type: T;
                }> | Extract<RemoveDataValidationCommand, {
                    type: T;
                }> | Extract<UpdateLocaleCommand, {
                    type: T;
                }> | Extract<AddPivotCommand, {
                    type: T;
                }> | Extract<UpdatePivotCommand, {
                    type: T;
                }> | Extract<InsertPivotCommand, {
                    type: T;
                }> | Extract<RenamePivotCommand, {
                    type: T;
                }> | Extract<RemovePivotCommand, {
                    type: T;
                }> | Extract<DuplicatePivotCommand, {
                    type: T;
                }> | Extract<RequestUndoCommand, {
                    type: T;
                }> | Extract<RequestRedoCommand, {
                    type: T;
                }> | Extract<UndoCommand, {
                    type: T;
                }> | Extract<RedoCommand, {
                    type: T;
                }> | Extract<CopyCommand, {
                    type: T;
                }> | Extract<CutCommand, {
                    type: T;
                }> | Extract<PasteCommand, {
                    type: T;
                }> | Extract<CopyPasteCellsAboveCommand, {
                    type: T;
                }> | Extract<CopyPasteCellsOnLeftCommand, {
                    type: T;
                }> | Extract<RepeatPasteCommand, {
                    type: T;
                }> | Extract<CleanClipBoardHighlightCommand, {
                    type: T;
                }> | Extract<AutoFillCellCommand, {
                    type: T;
                }> | Extract<PasteFromOSClipboardCommand, {
                    type: T;
                }> | Extract<AutoresizeColumnsCommand, {
                    type: T;
                }> | Extract<AutoresizeRowsCommand, {
                    type: T;
                }> | Extract<MoveColumnsRowsCommand, {
                    type: T;
                }> | Extract<ActivateSheetCommand, {
                    type: T;
                }> | Extract<EvaluateCellsCommand, {
                    type: T;
                }> | Extract<EvaluateChartsCommand, {
                    type: T;
                }> | Extract<StartChangeHighlightCommand, {
                    type: T;
                }> | Extract<StartCommand, {
                    type: T;
                }> | Extract<AutofillCommand, {
                    type: T;
                }> | Extract<AutofillSelectCommand, {
                    type: T;
                }> | Extract<AutofillTableCommand, {
                    type: T;
                }> | Extract<ShowFormulaCommand, {
                    type: T;
                }> | Extract<AutofillAutoCommand, {
                    type: T;
                }> | Extract<SelectFigureCommand, {
                    type: T;
                }> | Extract<ReplaceSearchCommand, {
                    type: T;
                }> | Extract<SortCommand, {
                    type: T;
                }> | Extract<SetDecimalCommand, {
                    type: T;
                }> | Extract<SetContextualFormatCommand, {
                    type: T;
                }> | Extract<ResizeViewportCommand, {
                    type: T;
                }> | Extract<SumSelectionCommand, {
                    type: T;
                }> | Extract<DeleteCellCommand, {
                    type: T;
                }> | Extract<InsertCellCommand, {
                    type: T;
                }> | Extract<SetViewportOffsetCommand, {
                    type: T;
                }> | Extract<MoveViewportDownCommand, {
                    type: T;
                }> | Extract<MoveViewportUpCommand, {
                    type: T;
                }> | Extract<MoveViewportToCellCommand, {
                    type: T;
                }> | Extract<ActivateNextSheetCommand, {
                    type: T;
                }> | Extract<ActivatePreviousSheetCommand, {
                    type: T;
                }> | Extract<UpdateFilterCommand, {
                    type: T;
                }> | Extract<SplitTextIntoColumnsCommand, {
                    type: T;
                }> | Extract<RemoveDuplicatesCommand, {
                    type: T;
                }> | Extract<TrimWhitespaceCommand, {
                    type: T;
                }> | Extract<ResizeTableCommand, {
                    type: T;
                }> | Extract<RefreshPivotCommand, {
                    type: T;
                }> | Extract<InsertNewPivotCommand, {
                    type: T;
                }> | Extract<DuplicatePivotInNewSheetCommand, {
                    type: T;
                }> | Extract<InsertPivotWithTableCommand, {
                    type: T;
                }> | Extract<SplitPivotFormulaCommand, {
                    type: T;
                }> | Extract<PaintFormat, {
                    type: T;
                }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
                <T_1 extends "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT", C_1 extends Extract<UpdateCellCommand, {
                    type: T_1;
                }> | Extract<UpdateCellPositionCommand, {
                    type: T_1;
                }> | Extract<ClearCellCommand, {
                    type: T_1;
                }> | Extract<ClearCellsCommand, {
                    type: T_1;
                }> | Extract<DeleteContentCommand, {
                    type: T_1;
                }> | Extract<AddColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<RemoveColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<ResizeColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<HideColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<UnhideColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<SetGridLinesVisibilityCommand, {
                    type: T_1;
                }> | Extract<FreezeColumnsCommand, {
                    type: T_1;
                }> | Extract<FreezeRowsCommand, {
                    type: T_1;
                }> | Extract<UnfreezeColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<UnfreezeColumnsCommand, {
                    type: T_1;
                }> | Extract<UnfreezeRowsCommand, {
                    type: T_1;
                }> | Extract<AddMergeCommand, {
                    type: T_1;
                }> | Extract<RemoveMergeCommand, {
                    type: T_1;
                }> | Extract<CreateSheetCommand, {
                    type: T_1;
                }> | Extract<DeleteSheetCommand, {
                    type: T_1;
                }> | Extract<DuplicateSheetCommand, {
                    type: T_1;
                }> | Extract<MoveSheetCommand, {
                    type: T_1;
                }> | Extract<RenameSheetCommand, {
                    type: T_1;
                }> | Extract<ColorSheetCommand, {
                    type: T_1;
                }> | Extract<HideSheetCommand, {
                    type: T_1;
                }> | Extract<ShowSheetCommand, {
                    type: T_1;
                }> | Extract<MoveRangeCommand, {
                    type: T_1;
                }> | Extract<AddConditionalFormatCommand, {
                    type: T_1;
                }> | Extract<RemoveConditionalFormatCommand, {
                    type: T_1;
                }> | Extract<MoveConditionalFormatCommand, {
                    type: T_1;
                }> | Extract<CreateFigureCommand, {
                    type: T_1;
                }> | Extract<DeleteFigureCommand, {
                    type: T_1;
                }> | Extract<UpdateFigureCommand, {
                    type: T_1;
                }> | Extract<SetFormattingCommand, {
                    type: T_1;
                }> | Extract<ClearFormattingCommand, {
                    type: T_1;
                }> | Extract<SetZoneBordersCommand, {
                    type: T_1;
                }> | Extract<SetBorderCommand, {
                    type: T_1;
                }> | Extract<CreateChartCommand, {
                    type: T_1;
                }> | Extract<UpdateChartCommand, {
                    type: T_1;
                }> | Extract<CreateImageOverCommand, {
                    type: T_1;
                }> | Extract<CreateTableCommand, {
                    type: T_1;
                }> | Extract<RemoveTableCommand, {
                    type: T_1;
                }> | Extract<UpdateTableCommand, {
                    type: T_1;
                }> | Extract<CreateTableStyleCommand, {
                    type: T_1;
                }> | Extract<RemoveTableStyleCommand, {
                    type: T_1;
                }> | Extract<GroupHeadersCommand, {
                    type: T_1;
                }> | Extract<UnGroupHeadersCommand, {
                    type: T_1;
                }> | Extract<UnfoldHeaderGroupCommand, {
                    type: T_1;
                }> | Extract<FoldHeaderGroupCommand, {
                    type: T_1;
                }> | Extract<FoldAllHeaderGroupsCommand, {
                    type: T_1;
                }> | Extract<UnfoldAllHeaderGroupsCommand, {
                    type: T_1;
                }> | Extract<UnfoldHeaderGroupsInZoneCommand, {
                    type: T_1;
                }> | Extract<FoldHeaderGroupsInZoneCommand, {
                    type: T_1;
                }> | Extract<AddDataValidationCommand, {
                    type: T_1;
                }> | Extract<RemoveDataValidationCommand, {
                    type: T_1;
                }> | Extract<UpdateLocaleCommand, {
                    type: T_1;
                }> | Extract<AddPivotCommand, {
                    type: T_1;
                }> | Extract<UpdatePivotCommand, {
                    type: T_1;
                }> | Extract<InsertPivotCommand, {
                    type: T_1;
                }> | Extract<RenamePivotCommand, {
                    type: T_1;
                }> | Extract<RemovePivotCommand, {
                    type: T_1;
                }> | Extract<DuplicatePivotCommand, {
                    type: T_1;
                }> | Extract<RequestUndoCommand, {
                    type: T_1;
                }> | Extract<RequestRedoCommand, {
                    type: T_1;
                }> | Extract<UndoCommand, {
                    type: T_1;
                }> | Extract<RedoCommand, {
                    type: T_1;
                }> | Extract<CopyCommand, {
                    type: T_1;
                }> | Extract<CutCommand, {
                    type: T_1;
                }> | Extract<PasteCommand, {
                    type: T_1;
                }> | Extract<CopyPasteCellsAboveCommand, {
                    type: T_1;
                }> | Extract<CopyPasteCellsOnLeftCommand, {
                    type: T_1;
                }> | Extract<RepeatPasteCommand, {
                    type: T_1;
                }> | Extract<CleanClipBoardHighlightCommand, {
                    type: T_1;
                }> | Extract<AutoFillCellCommand, {
                    type: T_1;
                }> | Extract<PasteFromOSClipboardCommand, {
                    type: T_1;
                }> | Extract<AutoresizeColumnsCommand, {
                    type: T_1;
                }> | Extract<AutoresizeRowsCommand, {
                    type: T_1;
                }> | Extract<MoveColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<ActivateSheetCommand, {
                    type: T_1;
                }> | Extract<EvaluateCellsCommand, {
                    type: T_1;
                }> | Extract<EvaluateChartsCommand, {
                    type: T_1;
                }> | Extract<StartChangeHighlightCommand, {
                    type: T_1;
                }> | Extract<StartCommand, {
                    type: T_1;
                }> | Extract<AutofillCommand, {
                    type: T_1;
                }> | Extract<AutofillSelectCommand, {
                    type: T_1;
                }> | Extract<AutofillTableCommand, {
                    type: T_1;
                }> | Extract<ShowFormulaCommand, {
                    type: T_1;
                }> | Extract<AutofillAutoCommand, {
                    type: T_1;
                }> | Extract<SelectFigureCommand, {
                    type: T_1;
                }> | Extract<ReplaceSearchCommand, {
                    type: T_1;
                }> | Extract<SortCommand, {
                    type: T_1;
                }> | Extract<SetDecimalCommand, {
                    type: T_1;
                }> | Extract<SetContextualFormatCommand, {
                    type: T_1;
                }> | Extract<ResizeViewportCommand, {
                    type: T_1;
                }> | Extract<SumSelectionCommand, {
                    type: T_1;
                }> | Extract<DeleteCellCommand, {
                    type: T_1;
                }> | Extract<InsertCellCommand, {
                    type: T_1;
                }> | Extract<SetViewportOffsetCommand, {
                    type: T_1;
                }> | Extract<MoveViewportDownCommand, {
                    type: T_1;
                }> | Extract<MoveViewportUpCommand, {
                    type: T_1;
                }> | Extract<MoveViewportToCellCommand, {
                    type: T_1;
                }> | Extract<ActivateNextSheetCommand, {
                    type: T_1;
                }> | Extract<ActivatePreviousSheetCommand, {
                    type: T_1;
                }> | Extract<UpdateFilterCommand, {
                    type: T_1;
                }> | Extract<SplitTextIntoColumnsCommand, {
                    type: T_1;
                }> | Extract<RemoveDuplicatesCommand, {
                    type: T_1;
                }> | Extract<TrimWhitespaceCommand, {
                    type: T_1;
                }> | Extract<ResizeTableCommand, {
                    type: T_1;
                }> | Extract<RefreshPivotCommand, {
                    type: T_1;
                }> | Extract<InsertNewPivotCommand, {
                    type: T_1;
                }> | Extract<DuplicatePivotInNewSheetCommand, {
                    type: T_1;
                }> | Extract<InsertPivotWithTableCommand, {
                    type: T_1;
                }> | Extract<SplitPivotFormulaCommand, {
                    type: T_1;
                }> | Extract<PaintFormat, {
                    type: T_1;
                }>>(type: T_1, r: Omit<C_1, "type">): DispatchResult;
            }): AbstractFigureClipboardHandler<any>;
        }>;
        cellHandlers: Registry<{
            new (getters: Getters, dispatch: {
                <T extends "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT", C extends Extract<UpdateCellCommand, {
                    type: T;
                }> | Extract<UpdateCellPositionCommand, {
                    type: T;
                }> | Extract<ClearCellCommand, {
                    type: T;
                }> | Extract<ClearCellsCommand, {
                    type: T;
                }> | Extract<DeleteContentCommand, {
                    type: T;
                }> | Extract<AddColumnsRowsCommand, {
                    type: T;
                }> | Extract<RemoveColumnsRowsCommand, {
                    type: T;
                }> | Extract<ResizeColumnsRowsCommand, {
                    type: T;
                }> | Extract<HideColumnsRowsCommand, {
                    type: T;
                }> | Extract<UnhideColumnsRowsCommand, {
                    type: T;
                }> | Extract<SetGridLinesVisibilityCommand, {
                    type: T;
                }> | Extract<FreezeColumnsCommand, {
                    type: T;
                }> | Extract<FreezeRowsCommand, {
                    type: T;
                }> | Extract<UnfreezeColumnsRowsCommand, {
                    type: T;
                }> | Extract<UnfreezeColumnsCommand, {
                    type: T;
                }> | Extract<UnfreezeRowsCommand, {
                    type: T;
                }> | Extract<AddMergeCommand, {
                    type: T;
                }> | Extract<RemoveMergeCommand, {
                    type: T;
                }> | Extract<CreateSheetCommand, {
                    type: T;
                }> | Extract<DeleteSheetCommand, {
                    type: T;
                }> | Extract<DuplicateSheetCommand, {
                    type: T;
                }> | Extract<MoveSheetCommand, {
                    type: T;
                }> | Extract<RenameSheetCommand, {
                    type: T;
                }> | Extract<ColorSheetCommand, {
                    type: T;
                }> | Extract<HideSheetCommand, {
                    type: T;
                }> | Extract<ShowSheetCommand, {
                    type: T;
                }> | Extract<MoveRangeCommand, {
                    type: T;
                }> | Extract<AddConditionalFormatCommand, {
                    type: T;
                }> | Extract<RemoveConditionalFormatCommand, {
                    type: T;
                }> | Extract<MoveConditionalFormatCommand, {
                    type: T;
                }> | Extract<CreateFigureCommand, {
                    type: T;
                }> | Extract<DeleteFigureCommand, {
                    type: T;
                }> | Extract<UpdateFigureCommand, {
                    type: T;
                }> | Extract<SetFormattingCommand, {
                    type: T;
                }> | Extract<ClearFormattingCommand, {
                    type: T;
                }> | Extract<SetZoneBordersCommand, {
                    type: T;
                }> | Extract<SetBorderCommand, {
                    type: T;
                }> | Extract<CreateChartCommand, {
                    type: T;
                }> | Extract<UpdateChartCommand, {
                    type: T;
                }> | Extract<CreateImageOverCommand, {
                    type: T;
                }> | Extract<CreateTableCommand, {
                    type: T;
                }> | Extract<RemoveTableCommand, {
                    type: T;
                }> | Extract<UpdateTableCommand, {
                    type: T;
                }> | Extract<CreateTableStyleCommand, {
                    type: T;
                }> | Extract<RemoveTableStyleCommand, {
                    type: T;
                }> | Extract<GroupHeadersCommand, {
                    type: T;
                }> | Extract<UnGroupHeadersCommand, {
                    type: T;
                }> | Extract<UnfoldHeaderGroupCommand, {
                    type: T;
                }> | Extract<FoldHeaderGroupCommand, {
                    type: T;
                }> | Extract<FoldAllHeaderGroupsCommand, {
                    type: T;
                }> | Extract<UnfoldAllHeaderGroupsCommand, {
                    type: T;
                }> | Extract<UnfoldHeaderGroupsInZoneCommand, {
                    type: T;
                }> | Extract<FoldHeaderGroupsInZoneCommand, {
                    type: T;
                }> | Extract<AddDataValidationCommand, {
                    type: T;
                }> | Extract<RemoveDataValidationCommand, {
                    type: T;
                }> | Extract<UpdateLocaleCommand, {
                    type: T;
                }> | Extract<AddPivotCommand, {
                    type: T;
                }> | Extract<UpdatePivotCommand, {
                    type: T;
                }> | Extract<InsertPivotCommand, {
                    type: T;
                }> | Extract<RenamePivotCommand, {
                    type: T;
                }> | Extract<RemovePivotCommand, {
                    type: T;
                }> | Extract<DuplicatePivotCommand, {
                    type: T;
                }> | Extract<RequestUndoCommand, {
                    type: T;
                }> | Extract<RequestRedoCommand, {
                    type: T;
                }> | Extract<UndoCommand, {
                    type: T;
                }> | Extract<RedoCommand, {
                    type: T;
                }> | Extract<CopyCommand, {
                    type: T;
                }> | Extract<CutCommand, {
                    type: T;
                }> | Extract<PasteCommand, {
                    type: T;
                }> | Extract<CopyPasteCellsAboveCommand, {
                    type: T;
                }> | Extract<CopyPasteCellsOnLeftCommand, {
                    type: T;
                }> | Extract<RepeatPasteCommand, {
                    type: T;
                }> | Extract<CleanClipBoardHighlightCommand, {
                    type: T;
                }> | Extract<AutoFillCellCommand, {
                    type: T;
                }> | Extract<PasteFromOSClipboardCommand, {
                    type: T;
                }> | Extract<AutoresizeColumnsCommand, {
                    type: T;
                }> | Extract<AutoresizeRowsCommand, {
                    type: T;
                }> | Extract<MoveColumnsRowsCommand, {
                    type: T;
                }> | Extract<ActivateSheetCommand, {
                    type: T;
                }> | Extract<EvaluateCellsCommand, {
                    type: T;
                }> | Extract<EvaluateChartsCommand, {
                    type: T;
                }> | Extract<StartChangeHighlightCommand, {
                    type: T;
                }> | Extract<StartCommand, {
                    type: T;
                }> | Extract<AutofillCommand, {
                    type: T;
                }> | Extract<AutofillSelectCommand, {
                    type: T;
                }> | Extract<AutofillTableCommand, {
                    type: T;
                }> | Extract<ShowFormulaCommand, {
                    type: T;
                }> | Extract<AutofillAutoCommand, {
                    type: T;
                }> | Extract<SelectFigureCommand, {
                    type: T;
                }> | Extract<ReplaceSearchCommand, {
                    type: T;
                }> | Extract<SortCommand, {
                    type: T;
                }> | Extract<SetDecimalCommand, {
                    type: T;
                }> | Extract<SetContextualFormatCommand, {
                    type: T;
                }> | Extract<ResizeViewportCommand, {
                    type: T;
                }> | Extract<SumSelectionCommand, {
                    type: T;
                }> | Extract<DeleteCellCommand, {
                    type: T;
                }> | Extract<InsertCellCommand, {
                    type: T;
                }> | Extract<SetViewportOffsetCommand, {
                    type: T;
                }> | Extract<MoveViewportDownCommand, {
                    type: T;
                }> | Extract<MoveViewportUpCommand, {
                    type: T;
                }> | Extract<MoveViewportToCellCommand, {
                    type: T;
                }> | Extract<ActivateNextSheetCommand, {
                    type: T;
                }> | Extract<ActivatePreviousSheetCommand, {
                    type: T;
                }> | Extract<UpdateFilterCommand, {
                    type: T;
                }> | Extract<SplitTextIntoColumnsCommand, {
                    type: T;
                }> | Extract<RemoveDuplicatesCommand, {
                    type: T;
                }> | Extract<TrimWhitespaceCommand, {
                    type: T;
                }> | Extract<ResizeTableCommand, {
                    type: T;
                }> | Extract<RefreshPivotCommand, {
                    type: T;
                }> | Extract<InsertNewPivotCommand, {
                    type: T;
                }> | Extract<DuplicatePivotInNewSheetCommand, {
                    type: T;
                }> | Extract<InsertPivotWithTableCommand, {
                    type: T;
                }> | Extract<SplitPivotFormulaCommand, {
                    type: T;
                }> | Extract<PaintFormat, {
                    type: T;
                }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
                <T_1 extends "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "CLEAR_CELLS" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "COLOR_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "SORT_CELLS" | "SET_DECIMAL" | "PASTE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "EVALUATE_CHARTS" | "START_CHANGE_HIGHLIGHT" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_FORMATTING_WITH_PIVOT" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT" | "DUPLICATE_PIVOT_IN_NEW_SHEET" | "INSERT_PIVOT_WITH_TABLE" | "SPLIT_PIVOT_FORMULA" | "PAINT_FORMAT", C_1 extends Extract<UpdateCellCommand, {
                    type: T_1;
                }> | Extract<UpdateCellPositionCommand, {
                    type: T_1;
                }> | Extract<ClearCellCommand, {
                    type: T_1;
                }> | Extract<ClearCellsCommand, {
                    type: T_1;
                }> | Extract<DeleteContentCommand, {
                    type: T_1;
                }> | Extract<AddColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<RemoveColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<ResizeColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<HideColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<UnhideColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<SetGridLinesVisibilityCommand, {
                    type: T_1;
                }> | Extract<FreezeColumnsCommand, {
                    type: T_1;
                }> | Extract<FreezeRowsCommand, {
                    type: T_1;
                }> | Extract<UnfreezeColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<UnfreezeColumnsCommand, {
                    type: T_1;
                }> | Extract<UnfreezeRowsCommand, {
                    type: T_1;
                }> | Extract<AddMergeCommand, {
                    type: T_1;
                }> | Extract<RemoveMergeCommand, {
                    type: T_1;
                }> | Extract<CreateSheetCommand, {
                    type: T_1;
                }> | Extract<DeleteSheetCommand, {
                    type: T_1;
                }> | Extract<DuplicateSheetCommand, {
                    type: T_1;
                }> | Extract<MoveSheetCommand, {
                    type: T_1;
                }> | Extract<RenameSheetCommand, {
                    type: T_1;
                }> | Extract<ColorSheetCommand, {
                    type: T_1;
                }> | Extract<HideSheetCommand, {
                    type: T_1;
                }> | Extract<ShowSheetCommand, {
                    type: T_1;
                }> | Extract<MoveRangeCommand, {
                    type: T_1;
                }> | Extract<AddConditionalFormatCommand, {
                    type: T_1;
                }> | Extract<RemoveConditionalFormatCommand, {
                    type: T_1;
                }> | Extract<MoveConditionalFormatCommand, {
                    type: T_1;
                }> | Extract<CreateFigureCommand, {
                    type: T_1;
                }> | Extract<DeleteFigureCommand, {
                    type: T_1;
                }> | Extract<UpdateFigureCommand, {
                    type: T_1;
                }> | Extract<SetFormattingCommand, {
                    type: T_1;
                }> | Extract<ClearFormattingCommand, {
                    type: T_1;
                }> | Extract<SetZoneBordersCommand, {
                    type: T_1;
                }> | Extract<SetBorderCommand, {
                    type: T_1;
                }> | Extract<CreateChartCommand, {
                    type: T_1;
                }> | Extract<UpdateChartCommand, {
                    type: T_1;
                }> | Extract<CreateImageOverCommand, {
                    type: T_1;
                }> | Extract<CreateTableCommand, {
                    type: T_1;
                }> | Extract<RemoveTableCommand, {
                    type: T_1;
                }> | Extract<UpdateTableCommand, {
                    type: T_1;
                }> | Extract<CreateTableStyleCommand, {
                    type: T_1;
                }> | Extract<RemoveTableStyleCommand, {
                    type: T_1;
                }> | Extract<GroupHeadersCommand, {
                    type: T_1;
                }> | Extract<UnGroupHeadersCommand, {
                    type: T_1;
                }> | Extract<UnfoldHeaderGroupCommand, {
                    type: T_1;
                }> | Extract<FoldHeaderGroupCommand, {
                    type: T_1;
                }> | Extract<FoldAllHeaderGroupsCommand, {
                    type: T_1;
                }> | Extract<UnfoldAllHeaderGroupsCommand, {
                    type: T_1;
                }> | Extract<UnfoldHeaderGroupsInZoneCommand, {
                    type: T_1;
                }> | Extract<FoldHeaderGroupsInZoneCommand, {
                    type: T_1;
                }> | Extract<AddDataValidationCommand, {
                    type: T_1;
                }> | Extract<RemoveDataValidationCommand, {
                    type: T_1;
                }> | Extract<UpdateLocaleCommand, {
                    type: T_1;
                }> | Extract<AddPivotCommand, {
                    type: T_1;
                }> | Extract<UpdatePivotCommand, {
                    type: T_1;
                }> | Extract<InsertPivotCommand, {
                    type: T_1;
                }> | Extract<RenamePivotCommand, {
                    type: T_1;
                }> | Extract<RemovePivotCommand, {
                    type: T_1;
                }> | Extract<DuplicatePivotCommand, {
                    type: T_1;
                }> | Extract<RequestUndoCommand, {
                    type: T_1;
                }> | Extract<RequestRedoCommand, {
                    type: T_1;
                }> | Extract<UndoCommand, {
                    type: T_1;
                }> | Extract<RedoCommand, {
                    type: T_1;
                }> | Extract<CopyCommand, {
                    type: T_1;
                }> | Extract<CutCommand, {
                    type: T_1;
                }> | Extract<PasteCommand, {
                    type: T_1;
                }> | Extract<CopyPasteCellsAboveCommand, {
                    type: T_1;
                }> | Extract<CopyPasteCellsOnLeftCommand, {
                    type: T_1;
                }> | Extract<RepeatPasteCommand, {
                    type: T_1;
                }> | Extract<CleanClipBoardHighlightCommand, {
                    type: T_1;
                }> | Extract<AutoFillCellCommand, {
                    type: T_1;
                }> | Extract<PasteFromOSClipboardCommand, {
                    type: T_1;
                }> | Extract<AutoresizeColumnsCommand, {
                    type: T_1;
                }> | Extract<AutoresizeRowsCommand, {
                    type: T_1;
                }> | Extract<MoveColumnsRowsCommand, {
                    type: T_1;
                }> | Extract<ActivateSheetCommand, {
                    type: T_1;
                }> | Extract<EvaluateCellsCommand, {
                    type: T_1;
                }> | Extract<EvaluateChartsCommand, {
                    type: T_1;
                }> | Extract<StartChangeHighlightCommand, {
                    type: T_1;
                }> | Extract<StartCommand, {
                    type: T_1;
                }> | Extract<AutofillCommand, {
                    type: T_1;
                }> | Extract<AutofillSelectCommand, {
                    type: T_1;
                }> | Extract<AutofillTableCommand, {
                    type: T_1;
                }> | Extract<ShowFormulaCommand, {
                    type: T_1;
                }> | Extract<AutofillAutoCommand, {
                    type: T_1;
                }> | Extract<SelectFigureCommand, {
                    type: T_1;
                }> | Extract<ReplaceSearchCommand, {
                    type: T_1;
                }> | Extract<SortCommand, {
                    type: T_1;
                }> | Extract<SetDecimalCommand, {
                    type: T_1;
                }> | Extract<SetContextualFormatCommand, {
                    type: T_1;
                }> | Extract<ResizeViewportCommand, {
                    type: T_1;
                }> | Extract<SumSelectionCommand, {
                    type: T_1;
                }> | Extract<DeleteCellCommand, {
                    type: T_1;
                }> | Extract<InsertCellCommand, {
                    type: T_1;
                }> | Extract<SetViewportOffsetCommand, {
                    type: T_1;
                }> | Extract<MoveViewportDownCommand, {
                    type: T_1;
                }> | Extract<MoveViewportUpCommand, {
                    type: T_1;
                }> | Extract<MoveViewportToCellCommand, {
                    type: T_1;
                }> | Extract<ActivateNextSheetCommand, {
                    type: T_1;
                }> | Extract<ActivatePreviousSheetCommand, {
                    type: T_1;
                }> | Extract<UpdateFilterCommand, {
                    type: T_1;
                }> | Extract<SplitTextIntoColumnsCommand, {
                    type: T_1;
                }> | Extract<RemoveDuplicatesCommand, {
                    type: T_1;
                }> | Extract<TrimWhitespaceCommand, {
                    type: T_1;
                }> | Extract<ResizeTableCommand, {
                    type: T_1;
                }> | Extract<RefreshPivotCommand, {
                    type: T_1;
                }> | Extract<InsertNewPivotCommand, {
                    type: T_1;
                }> | Extract<DuplicatePivotInNewSheetCommand, {
                    type: T_1;
                }> | Extract<InsertPivotWithTableCommand, {
                    type: T_1;
                }> | Extract<SplitPivotFormulaCommand, {
                    type: T_1;
                }> | Extract<PaintFormat, {
                    type: T_1;
                }>>(type: T_1, r: Omit<C_1, "type">): DispatchResult;
            }): AbstractCellClipboardHandler<any, any>;
        }>;
    };
    pivotRegistry: Registry<PivotRegistryItem>;
    pivotTimeAdapterRegistry: Registry<PivotTimeAdapter<CellValue>>;
    pivotSidePanelRegistry: Registry<PivotRegistryItem$1>;
    pivotNormalizationValueRegistry: Registry<(value: string, granularity?: string | undefined) => CellValue>;
    supportedPivotPositionalFormulaRegistry: Registry<boolean>;
    pivotToFunctionValueRegistry: Registry<(value: CellValue, granularity?: string | undefined) => string>;
    migrationStepRegistry: Registry<MigrationStep>;
    chartJsExtensionRegistry: Registry<chart_js.Plugin<keyof chart_js.ChartTypeRegistry, chart_js_dist_types_basic.AnyObject>>;
};
declare const helpers: {
    arg: typeof arg;
    isEvaluationError: typeof isEvaluationError;
    toBoolean: typeof toBoolean;
    toJsDate: typeof toJsDate;
    toNumber: typeof toNumber;
    toString: typeof toString;
    toNormalizedPivotValue: typeof toNormalizedPivotValue;
    toXC: typeof toXC;
    toZone: typeof toZone;
    toUnboundedZone: typeof toUnboundedZone;
    toCartesian: typeof toCartesian;
    numberToLetters: typeof numberToLetters;
    lettersToNumber: typeof lettersToNumber;
    UuidGenerator: typeof UuidGenerator;
    formatValue: typeof formatValue;
    createCurrencyFormat: typeof createCurrencyFormat;
    ColorGenerator: typeof ColorGenerator;
    computeTextWidth: typeof computeTextWidth;
    createEmptyWorkbookData: typeof createEmptyWorkbookData;
    createEmptySheet: typeof createEmptySheet;
    createEmptyExcelSheet: typeof createEmptyExcelSheet;
    rgbaToHex: typeof rgbaToHex;
    colorToRGBA: typeof colorToRGBA;
    positionToZone: typeof positionToZone;
    isDefined: typeof isDefined;
    isMatrix: typeof isMatrix;
    lazy: typeof lazy;
    genericRepeat: typeof genericRepeat;
    createAction: typeof createAction;
    createActions: typeof createActions;
    transformRangeData: typeof transformRangeData;
    deepEquals: typeof deepEquals;
    overlap: typeof overlap;
    union: typeof union;
    isInside: typeof isInside;
    deepCopy: typeof deepCopy;
    expandZoneOnInsertion: typeof expandZoneOnInsertion;
    reduceZoneOnDeletion: typeof reduceZoneOnDeletion;
    unquote: typeof unquote;
    getMaxObjectId: typeof getMaxObjectId;
    getFunctionsFromTokens: typeof getFunctionsFromTokens;
    getFirstPivotFunction: typeof getFirstPivotFunction;
    getNumberOfPivotFunctions: typeof getNumberOfPivotFunctions;
    parseDimension: typeof parseDimension;
    isDateOrDatetimeField: typeof isDateOrDatetimeField;
    makeFieldProposal: typeof makeFieldProposal;
    insertTokenAfterArgSeparator: typeof insertTokenAfterArgSeparator;
    insertTokenAfterLeftParenthesis: typeof insertTokenAfterLeftParenthesis;
    mergeContiguousZones: typeof mergeContiguousZones;
    getPivotHighlights: typeof getPivotHighlights;
    pivotTimeAdapter: typeof pivotTimeAdapter;
    UNDO_REDO_PIVOT_COMMANDS: string[];
    createPivotFormula: typeof createPivotFormula;
    areDomainArgsFieldsValid: typeof areDomainArgsFieldsValid;
    splitReference: typeof splitReference;
    sanitizeSheetName: typeof sanitizeSheetName;
    getUniqueText: typeof getUniqueText;
    isNumber: typeof isNumber;
    isDateTime: typeof isDateTime;
};
declare const links: {
    isMarkdownLink: typeof isMarkdownLink;
    parseMarkdownLink: typeof parseMarkdownLink;
    markdownLink: typeof markdownLink;
    openLink: typeof openLink;
    urlRepresentation: typeof urlRepresentation;
};
declare const components: {
    Checkbox: typeof Checkbox;
    Section: typeof Section;
    RoundColorPicker: typeof RoundColorPicker;
    ChartDataSeries: typeof ChartDataSeries;
    ChartErrorSection: typeof ChartErrorSection;
    ChartLabelRange: typeof ChartLabelRange;
    ChartTitle: typeof ChartTitle;
    ChartPanel: typeof ChartPanel;
    ChartFigure: typeof ChartFigure;
    ChartJsComponent: typeof ChartJsComponent;
    Grid: typeof Grid;
    GridOverlay: typeof GridOverlay;
    ScorecardChart: typeof ScorecardChart$1;
    LineConfigPanel: typeof LineConfigPanel;
    BarConfigPanel: typeof BarConfigPanel;
    PieChartDesignPanel: typeof PieChartDesignPanel;
    GenericChartConfigPanel: typeof GenericChartConfigPanel;
    ChartWithAxisDesignPanel: typeof ChartWithAxisDesignPanel;
    GaugeChartConfigPanel: typeof GaugeChartConfigPanel;
    GaugeChartDesignPanel: typeof GaugeChartDesignPanel;
    ScorecardChartConfigPanel: typeof ScorecardChartConfigPanel;
    ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
    RadarChartDesignPanel: typeof RadarChartDesignPanel;
    WaterfallChartDesignPanel: typeof WaterfallChartDesignPanel;
    ComboChartDesignPanel: typeof ComboChartDesignPanel;
    ChartTypePicker: typeof ChartTypePicker;
    FigureComponent: typeof FigureComponent;
    Menu: typeof Menu;
    Popover: typeof Popover;
    SelectionInput: typeof SelectionInput;
    ValidationMessages: typeof ValidationMessages;
    AddDimensionButton: typeof AddDimensionButton;
    PivotDimensionGranularity: typeof PivotDimensionGranularity;
    PivotDimensionOrder: typeof PivotDimensionOrder;
    PivotDimension: typeof PivotDimension;
    PivotLayoutConfigurator: typeof PivotLayoutConfigurator;
    PivotDeferUpdate: typeof PivotDeferUpdate;
    PivotTitleSection: typeof PivotTitleSection;
    CogWheelMenu: typeof CogWheelMenu;
    TextInput: typeof TextInput;
    SidePanelCollapsible: typeof SidePanelCollapsible;
    RadioSelection: typeof RadioSelection;
};
declare const hooks: {
    useDragAndDropListItems: typeof useDragAndDropListItems;
    useHighlights: typeof useHighlights;
    useHighlightsOnHover: typeof useHighlightsOnHover;
};
declare const stores: {
    useStoreProvider: typeof useStoreProvider;
    DependencyContainer: typeof DependencyContainer;
    CellPopoverStore: typeof CellPopoverStore;
    ComposerFocusStore: typeof ComposerFocusStore;
    CellComposerStore: typeof CellComposerStore;
    FindAndReplaceStore: typeof FindAndReplaceStore;
    HighlightStore: typeof HighlightStore;
    HoveredCellStore: typeof HoveredCellStore;
    ModelStore: StoreConstructor<Model, any[]>;
    NotificationStore: typeof NotificationStore;
    RendererStore: typeof RendererStore;
    SelectionInputStore: typeof SelectionInputStore;
    SpreadsheetStore: typeof SpreadsheetStore;
    useStore: typeof useStore;
    useLocalStore: typeof useLocalStore;
    SidePanelStore: typeof SidePanelStore;
    PivotSidePanelStore: typeof PivotSidePanelStore;
    PivotMeasureDisplayPanelStore: typeof PivotMeasureDisplayPanelStore;
};

declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
    addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
};
declare const constants: {
    DEFAULT_LOCALE: Locale;
    HIGHLIGHT_COLOR: string;
    PIVOT_TABLE_CONFIG: {
        hasFilters: boolean;
        totalRow: boolean;
        firstColumn: boolean;
        lastColumn: boolean;
        numberOfHeaders: number;
        bandedRows: boolean;
        bandedColumns: boolean;
        styleId: string;
        automaticAutofill: boolean;
    };
    ChartTerms: {
        [key: string]: any;
        GeoChart: {
            ColorScales: Record<"blues" | "cividis" | "greens" | "greys" | "oranges" | "purples" | "rainbow" | "reds" | "viridis", string>;
        };
    };
};
declare const chartHelpers: {
    getBarChartData(definition: GenericDefinition<BarChartDefinition>, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): ChartRuntimeGenerationArgs;
    getPyramidChartData(definition: PyramidChartDefinition, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): ChartRuntimeGenerationArgs;
    getLineChartData(definition: GenericDefinition<LineChartDefinition>, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): ChartRuntimeGenerationArgs;
    getPieChartData(definition: GenericDefinition<PieChartDefinition>, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): ChartRuntimeGenerationArgs;
    getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): ChartRuntimeGenerationArgs;
    getGeoChartData(definition: GeoChartDefinition, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): GeoChartRuntimeGenerationArgs;
    getTrendDatasetForBarChart(config: TrendConfiguration, data: any[]): chart_js.Point[] | undefined;
    getTrendDatasetForLineChart(config: TrendConfiguration, data: any[], labels: string[], axisType: AxisType, locale: Locale): chart_js.Point[] | undefined;
    canChartParseLabels(definition: GenericDefinition<LineChartDefinition>, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): boolean;
    getData(getters: Getters, ds: DataSet): (CellValue | undefined)[];
    getChartLabelFormat(getters: Getters, range: Range | undefined, shouldRemoveFirstLabel: boolean): Format | undefined;
    getBarChartDatasets(definition: GenericDefinition<BarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js.ChartDataset<"line" | "bar">[];
    getWaterfallDatasetAndLabels(definition: GenericDefinition<WaterfallChartDefinition>, args: ChartRuntimeGenerationArgs): {
        datasets: chart_js.ChartDataset[];
        labels: string[];
    };
    getLineChartDatasets(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js.ChartDataset<"line">[];
    getScatterChartDatasets(definition: GenericDefinition<ScatterChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js.ChartDataset[];
    getPieChartDatasets(definition: GenericDefinition<PieChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js.ChartDataset<"pie">[];
    getComboChartDatasets(definition: GenericDefinition<ComboChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js.ChartDataset<"line" | "bar">[];
    getRadarChartDatasets(definition: GenericDefinition<RadarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js.ChartDataset<"radar">[];
    getGeoChartDatasets(definition: GenericDefinition<GeoChartDefinition>, args: GeoChartRuntimeGenerationArgs): chart_js.ChartDataset[];
    getChartColorsGenerator(definition: GenericDefinition<ChartWithDataSetDefinition>, dataSetsSize: number): ColorGenerator;
    getChartLayout(definition: GenericDefinition<ChartWithDataSetDefinition>): chart_js_dist_types_utils._DeepPartialObject<Partial<{
        autoPadding: boolean;
        padding: chart_js.Scriptable<chart_js_dist_types_geometric.Padding, chart_js.ScriptableContext<keyof chart_js.ChartTypeRegistry>>;
    }>> | undefined;
    getBarChartLegend(definition: GenericDefinition<BarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.LegendOptions<any>>;
    getLineChartLegend(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.LegendOptions<any>>;
    getPieChartLegend(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.LegendOptions<any>>;
    getScatterChartLegend(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.LegendOptions<any>>;
    getComboChartLegend(definition: GenericDefinition<ComboChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.LegendOptions<any>>;
    getWaterfallChartLegend(definition: WaterfallChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.LegendOptions<any>>;
    getRadarChartLegend(definition: GenericDefinition<RadarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.LegendOptions<any>>;
    INTERACTIVE_LEGEND_CONFIG: {
        onHover: (event: any) => void;
        onLeave: (event: any) => void;
        onClick: (event: any, legendItem: any, legend: any) => void;
    };
    getBarChartScales(definition: GenericDefinition<BarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<{
        [key: string]: chart_js.ScaleOptionsByType<"radialLinear" | keyof chart_js.CartesianScaleTypeRegistry>;
    }>;
    getLineChartScales(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<{
        [key: string]: chart_js.ScaleOptionsByType<"radialLinear" | keyof chart_js.CartesianScaleTypeRegistry>;
    }>;
    getScatterChartScales(definition: GenericDefinition<ScatterChartDefinition>, args: ChartRuntimeGenerationArgs): {
        x: {
            grid: {
                display: boolean;
            };
        } | {
            grid: {
                display: boolean;
            };
            type?: "time" | undefined;
            reverse?: boolean | undefined;
            offset?: boolean | undefined;
            backgroundColor?: string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined;
            border?: chart_js_dist_types_utils._DeepPartialObject<chart_js.BorderOptions> | undefined;
            clip?: boolean | undefined;
            display?: boolean | "auto" | undefined;
            position?: "center" | "left" | "top" | "bottom" | "right" | chart_js_dist_types_utils._DeepPartialObject<{
                [scale: string]: number;
            }> | undefined;
            title?: chart_js_dist_types_utils._DeepPartialObject<{
                display: boolean;
                align: chart_js.Align;
                text: string | string[];
                color: chart_js.Color;
                font: chart_js.ScriptableAndScriptableOptions<Partial<chart_js.FontSpec>, chart_js.ScriptableCartesianScaleContext>;
                padding: number | {
                    top: number;
                    bottom: number;
                    y: number;
                };
            }> | undefined;
            stack?: string | undefined;
            weight?: number | undefined;
            bounds?: "data" | "ticks" | undefined;
            stackWeight?: number | undefined;
            axis?: "r" | "x" | "y" | undefined;
            stacked?: boolean | "single" | undefined;
            ticks?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TickOptions & {
                sampleSize: number;
                align: chart_js.Align | "inner";
                autoSkip: boolean;
                autoSkipPadding: number;
                crossAlign: "center" | "near" | "far";
                includeBounds: boolean;
                labelOffset: number;
                minRotation: number;
                maxRotation: number;
                mirror: boolean;
                padding: number;
                maxTicksLimit: number;
            } & chart_js.TimeScaleTickOptions> | undefined;
            alignToPixels?: boolean | undefined;
            suggestedMin?: string | number | undefined;
            suggestedMax?: string | number | undefined;
            beforeUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            min?: string | number | undefined;
            max?: string | number | undefined;
            offsetAfterAutoskip?: boolean | undefined;
            adapters?: chart_js_dist_types_utils._DeepPartialObject<{
                date: unknown;
            }> | undefined;
            time?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TimeScaleTimeOptions> | undefined;
        } | {
            grid: {
                display: boolean;
            };
            type?: "linear" | undefined;
            bounds?: "data" | "ticks" | undefined;
            position?: "center" | "left" | "top" | "bottom" | "right" | chart_js_dist_types_utils._DeepPartialObject<{
                [scale: string]: number;
            }> | undefined;
            stack?: string | undefined;
            stackWeight?: number | undefined;
            axis?: "r" | "x" | "y" | undefined;
            min?: number | undefined;
            max?: number | undefined;
            offset?: boolean | undefined;
            border?: chart_js_dist_types_utils._DeepPartialObject<chart_js.BorderOptions> | undefined;
            title?: chart_js_dist_types_utils._DeepPartialObject<{
                display: boolean;
                align: chart_js.Align;
                text: string | string[];
                color: chart_js.Color;
                font: chart_js.ScriptableAndScriptableOptions<Partial<chart_js.FontSpec>, chart_js.ScriptableCartesianScaleContext>;
                padding: number | {
                    top: number;
                    bottom: number;
                    y: number;
                };
            }> | undefined;
            stacked?: boolean | "single" | undefined;
            ticks?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TickOptions & {
                sampleSize: number;
                align: chart_js.Align | "inner";
                autoSkip: boolean;
                autoSkipPadding: number;
                crossAlign: "center" | "near" | "far";
                includeBounds: boolean;
                labelOffset: number;
                minRotation: number;
                maxRotation: number;
                mirror: boolean;
                padding: number;
                maxTicksLimit: number;
            } & {
                format: Intl.NumberFormatOptions;
                precision: number;
                stepSize: number;
                count: number;
            }> | undefined;
            display?: boolean | "auto" | undefined;
            alignToPixels?: boolean | undefined;
            backgroundColor?: string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined;
            reverse?: boolean | undefined;
            clip?: boolean | undefined;
            weight?: number | undefined;
            suggestedMin?: number | undefined;
            suggestedMax?: number | undefined;
            beforeUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beginAtZero?: boolean | undefined;
            grace?: string | number | undefined;
        } | {
            grid: {
                display: boolean;
            };
            type?: "logarithmic" | undefined;
            bounds?: "data" | "ticks" | undefined;
            position?: "center" | "left" | "top" | "bottom" | "right" | chart_js_dist_types_utils._DeepPartialObject<{
                [scale: string]: number;
            }> | undefined;
            stack?: string | undefined;
            stackWeight?: number | undefined;
            axis?: "r" | "x" | "y" | undefined;
            min?: number | undefined;
            max?: number | undefined;
            offset?: boolean | undefined;
            border?: chart_js_dist_types_utils._DeepPartialObject<chart_js.BorderOptions> | undefined;
            title?: chart_js_dist_types_utils._DeepPartialObject<{
                display: boolean;
                align: chart_js.Align;
                text: string | string[];
                color: chart_js.Color;
                font: chart_js.ScriptableAndScriptableOptions<Partial<chart_js.FontSpec>, chart_js.ScriptableCartesianScaleContext>;
                padding: number | {
                    top: number;
                    bottom: number;
                    y: number;
                };
            }> | undefined;
            stacked?: boolean | "single" | undefined;
            ticks?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TickOptions & {
                sampleSize: number;
                align: chart_js.Align | "inner";
                autoSkip: boolean;
                autoSkipPadding: number;
                crossAlign: "center" | "near" | "far";
                includeBounds: boolean;
                labelOffset: number;
                minRotation: number;
                maxRotation: number;
                mirror: boolean;
                padding: number;
                maxTicksLimit: number;
            } & {
                format: Intl.NumberFormatOptions;
            }> | undefined;
            display?: boolean | "auto" | undefined;
            alignToPixels?: boolean | undefined;
            backgroundColor?: string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined;
            reverse?: boolean | undefined;
            clip?: boolean | undefined;
            weight?: number | undefined;
            suggestedMin?: number | undefined;
            suggestedMax?: number | undefined;
            beforeUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
        } | {
            grid: {
                display: boolean;
            };
            type?: "category" | undefined;
            reverse?: boolean | undefined;
            offset?: boolean | undefined;
            backgroundColor?: string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined;
            border?: chart_js_dist_types_utils._DeepPartialObject<chart_js.BorderOptions> | undefined;
            clip?: boolean | undefined;
            display?: boolean | "auto" | undefined;
            position?: "center" | "left" | "top" | "bottom" | "right" | chart_js_dist_types_utils._DeepPartialObject<{
                [scale: string]: number;
            }> | undefined;
            title?: chart_js_dist_types_utils._DeepPartialObject<{
                display: boolean;
                align: chart_js.Align;
                text: string | string[];
                color: chart_js.Color;
                font: chart_js.ScriptableAndScriptableOptions<Partial<chart_js.FontSpec>, chart_js.ScriptableCartesianScaleContext>;
                padding: number | {
                    top: number;
                    bottom: number;
                    y: number;
                };
            }> | undefined;
            stack?: string | undefined;
            weight?: number | undefined;
            bounds?: "data" | "ticks" | undefined;
            stackWeight?: number | undefined;
            axis?: "r" | "x" | "y" | undefined;
            stacked?: boolean | "single" | undefined;
            ticks?: chart_js_dist_types_utils._DeepPartialObject<chart_js.CartesianTickOptions> | undefined;
            alignToPixels?: boolean | undefined;
            suggestedMin?: unknown;
            suggestedMax?: unknown;
            beforeUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            min?: string | number | undefined;
            max?: string | number | undefined;
            labels?: chart_js_dist_types_utils._DeepPartialArray<string> | chart_js_dist_types_utils._DeepPartialArray<string[]> | undefined;
        } | {
            grid: {
                display: boolean;
            };
            type?: "timeseries" | undefined;
            reverse?: boolean | undefined;
            offset?: boolean | undefined;
            backgroundColor?: string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined;
            border?: chart_js_dist_types_utils._DeepPartialObject<chart_js.BorderOptions> | undefined;
            clip?: boolean | undefined;
            display?: boolean | "auto" | undefined;
            position?: "center" | "left" | "top" | "bottom" | "right" | chart_js_dist_types_utils._DeepPartialObject<{
                [scale: string]: number;
            }> | undefined;
            title?: chart_js_dist_types_utils._DeepPartialObject<{
                display: boolean;
                align: chart_js.Align;
                text: string | string[];
                color: chart_js.Color;
                font: chart_js.ScriptableAndScriptableOptions<Partial<chart_js.FontSpec>, chart_js.ScriptableCartesianScaleContext>;
                padding: number | {
                    top: number;
                    bottom: number;
                    y: number;
                };
            }> | undefined;
            stack?: string | undefined;
            weight?: number | undefined;
            bounds?: "data" | "ticks" | undefined;
            stackWeight?: number | undefined;
            axis?: "r" | "x" | "y" | undefined;
            stacked?: boolean | "single" | undefined;
            ticks?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TickOptions & {
                sampleSize: number;
                align: chart_js.Align | "inner";
                autoSkip: boolean;
                autoSkipPadding: number;
                crossAlign: "center" | "near" | "far";
                includeBounds: boolean;
                labelOffset: number;
                minRotation: number;
                maxRotation: number;
                mirror: boolean;
                padding: number;
                maxTicksLimit: number;
            } & chart_js.TimeScaleTickOptions> | undefined;
            alignToPixels?: boolean | undefined;
            suggestedMin?: string | number | undefined;
            suggestedMax?: string | number | undefined;
            beforeUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            min?: string | number | undefined;
            max?: string | number | undefined;
            offsetAfterAutoskip?: boolean | undefined;
            adapters?: chart_js_dist_types_utils._DeepPartialObject<{
                date: unknown;
            }> | undefined;
            time?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TimeScaleTimeOptions> | undefined;
        } | {
            grid: {
                display: boolean;
            };
            type?: "radialLinear" | undefined;
            display?: boolean | "auto" | undefined;
            alignToPixels?: boolean | undefined;
            backgroundColor?: string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined;
            reverse?: boolean | undefined;
            clip?: boolean | undefined;
            weight?: number | undefined;
            min?: number | undefined;
            max?: number | undefined;
            suggestedMin?: number | undefined;
            suggestedMax?: number | undefined;
            beforeUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterSetDimensions?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterDataLimits?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterBuildTicks?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterTickToLabelConversion?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterCalculateLabelRotation?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            beforeFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterFit?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            afterUpdate?: ((axis: chart_js.Scale<chart_js.CoreScaleOptions>) => void) | undefined;
            animate?: boolean | undefined;
            startAngle?: number | undefined;
            angleLines?: chart_js_dist_types_utils._DeepPartialObject<{
                display: boolean;
                color: chart_js.Scriptable<chart_js.Color, chart_js.ScriptableScaleContext>;
                lineWidth: chart_js.Scriptable<number, chart_js.ScriptableScaleContext>;
                borderDash: chart_js.Scriptable<number[], chart_js.ScriptableScaleContext>;
                borderDashOffset: chart_js.Scriptable<number, chart_js.ScriptableScaleContext>;
            }> | undefined;
            beginAtZero?: boolean | undefined;
            pointLabels?: chart_js_dist_types_utils._DeepPartialObject<{
                backdropColor: chart_js.Scriptable<chart_js.Color, chart_js.ScriptableScalePointLabelContext>;
                backdropPadding: chart_js.Scriptable<number | chart_js.ChartArea, chart_js.ScriptableScalePointLabelContext>;
                borderRadius: chart_js.Scriptable<number | chart_js.BorderRadius, chart_js.ScriptableScalePointLabelContext>;
                display: boolean | "auto";
                color: chart_js.Scriptable<chart_js.Color, chart_js.ScriptableScalePointLabelContext>;
                font: chart_js.ScriptableAndScriptableOptions<Partial<chart_js.FontSpec>, chart_js.ScriptableScalePointLabelContext>;
                callback: (label: string, index: number) => string | number | string[] | number[];
                padding: chart_js.Scriptable<number, chart_js.ScriptableScalePointLabelContext>;
                centerPointLabels: boolean;
            }> | undefined;
            ticks?: chart_js_dist_types_utils._DeepPartialObject<chart_js.RadialTickOptions> | undefined;
        };
    };
    getWaterfallChartScales(definition: WaterfallChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<{
        [key: string]: chart_js.ScaleOptionsByType<"radialLinear" | keyof chart_js.CartesianScaleTypeRegistry>;
    }>;
    getPyramidChartScales(definition: PyramidChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<{
        [key: string]: chart_js.ScaleOptionsByType<"radialLinear" | keyof chart_js.CartesianScaleTypeRegistry>;
    }>;
    getRadarChartScales(definition: GenericDefinition<RadarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<{
        [key: string]: chart_js.ScaleOptionsByType<"radialLinear" | keyof chart_js.CartesianScaleTypeRegistry>;
    }>;
    getGeoChartScales(definition: GeoChartDefinition, args: GeoChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<{
        [key: string]: chart_js.ScaleOptionsByType<"projection" | keyof chart_js.ColorScaleTypeRegistry>;
    }>;
    getChartShowValues(definition: ChartWithDataSetDefinition, args: ChartRuntimeGenerationArgs): ChartShowValuesPluginOptions;
    getChartTitle(definition: ChartWithDataSetDefinition): chart_js_dist_types_utils._DeepPartialObject<chart_js.TitleOptions>;
    getBarChartTooltip(definition: GenericDefinition<BarChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
    getLineChartTooltip(definition: GenericDefinition<LineChartDefinition>, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
    getPieChartTooltip(definition: PieChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
    getWaterfallChartTooltip(definition: WaterfallChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
    getPyramidChartTooltip(definition: PyramidChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
    getRadarChartTooltip(definition: RadarChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
    getGeoChartTooltip(definition: GeoChartDefinition, args: ChartRuntimeGenerationArgs): chart_js_dist_types_utils._DeepPartialObject<chart_js.TooltipOptions<any>>;
    AbstractChart: typeof AbstractChart;
    createBarChartRuntime(chart: BarChart, getters: Getters): BarChartRuntime;
    BarChart: typeof BarChart;
    updateChartRangesWithDataSets(getters: CoreGetters, applyChange: ApplyRangeChange, chartDataSets: DataSet[], chartLabelRange?: Range | undefined): {
        isStale: boolean;
        dataSets: DataSet[];
        labelRange: Range | undefined;
    };
    duplicateDataSetsInDuplicatedSheet(sheetIdFrom: UID, sheetIdTo: UID, dataSets: DataSet[]): DataSet[];
    duplicateLabelRangeInDuplicatedSheet(sheetIdFrom: UID, sheetIdTo: UID, range?: Range | undefined): Range | undefined;
    adaptChartRange(range: Range | undefined, applyChange: ApplyRangeChange): Range | undefined;
    createDataSets(getters: CoreGetters, customizedDataSets: CustomizedDataSet[], sheetId: UID, dataSetsHaveTitle: boolean): DataSet[];
    toExcelDataset(getters: CoreGetters, ds: DataSet): ExcelChartDataset;
    toExcelLabelRange(getters: CoreGetters, labelRange: Range | undefined, shouldRemoveFirstLabel?: boolean | undefined): string | undefined;
    transformChartDefinitionWithDataSetsWithZone<T extends ChartWithDataSetDefinition>(definition: T, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): T;
    chartFontColor(backgroundColor: Color | undefined): Color;
    chartMutedFontColor(backgroundColor: Color | undefined): Color;
    checkDataset(definition: ChartWithDataSetDefinition): CommandResult;
    checkLabelRange(definition: ChartWithDataSetDefinition): CommandResult;
    shouldRemoveFirstLabel(labelRange: Range | undefined, dataset: DataSet | undefined, dataSetsHaveTitle: boolean): boolean;
    getChartPositionAtCenterOfViewport(getters: Getters, chartSize: DOMDimension): DOMCoordinates;
    getDefinedAxis(definition: GenericDefinition<ChartWithDataSetDefinition>): {
        useLeftAxis: boolean;
        useRightAxis: boolean;
    };
    formatChartDatasetValue(axisFormats: ChartAxisFormats, locale: Locale): (value: any, axisId: string | undefined) => any;
    formatTickValue(localeFormat: LocaleFormat): (value: any) => any;
    getPieColors(colors: ColorGenerator, dataSetsValues: DatasetValues[]): Color[];
    truncateLabel(label: string | undefined): string;
    isTrendLineAxis(axisID: string): boolean;
    TREND_LINE_XAXIS_ID: "x1";
    MOVING_AVERAGE_TREND_LINE_XAXIS_ID: "xMovingAverage";
    CHART_AXIS_CHOICES: {
        value: string;
        label: string;
    }[];
    chartFactory(getters: CoreGetters): (id: UID, definition: ChartDefinition, sheetId: UID) => AbstractChart;
    chartRuntimeFactory(getters: Getters): (chart: AbstractChart) => ChartRuntime;
    validateChartDefinition(validator: Validator, definition: ChartDefinition): CommandResult | CommandResult[];
    transformDefinition(definition: ChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): ChartDefinition;
    getSmartChartDefinition(zone: Zone, getters: Getters): ChartDefinition;
    chartToImage(runtime: ChartRuntime, figure: Figure, type: string): string | undefined;
    CHART_COMMON_OPTIONS: chart_js_dist_types_utils._DeepPartialObject<chart_js.CoreChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.ElementChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.PluginChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.DatasetChartOptions<keyof chart_js.ChartTypeRegistry> & chart_js.ScaleChartOptions<keyof chart_js.ChartTypeRegistry>>;
    createGaugeChartRuntime(chart: GaugeChart, getters: Getters): GaugeChartRuntime;
    GaugeChart: typeof GaugeChart;
    createLineChartRuntime(chart: LineChart, getters: Getters): ChartJSRuntime;
    LineChart: typeof LineChart;
    createPieChartRuntime(chart: PieChart, getters: Getters): PieChartRuntime;
    PieChart: typeof PieChart;
    drawScoreChart(structure: ScorecardChartConfig, canvas: HTMLCanvasElement): void;
    createScorecardChartRuntime(chart: ScorecardChart, getters: Getters): ScorecardChartRuntime;
    ScorecardChart: typeof ScorecardChart;
    createWaterfallChartRuntime(chart: WaterfallChart, getters: Getters): WaterfallChartRuntime;
    WaterfallChart: typeof WaterfallChart;
};

export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutofillTableCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxesDesign, AxisDesign, AxisType, BeginsWithRule, BooleanCell, Border$1 as Border, BorderData, BorderDescr, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartRuntimeGenerationArgs, ChartType, ChartWithDataSetDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CoreViewPlugin, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, DimensionTree, DimensionTreeNode, Direction$1 as Direction, DispatchResult, DuplicatePivotCommand, DuplicatePivotInNewSheetCommand, DuplicateSheetCommand, DynamicTable, EdgeScrollInfo, EditTextOptions, EditionMode, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluateChartsCommand, EvaluatedCell, EvaluationError, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GenericDefinition, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, LookupCaches, Matrix, Maybe, MenuMouseEvent, Merge, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, OSClipboardContent, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, ParsedOSClipboardContent, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotSortedColumn, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitPivotFormulaCommand, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetPivotCoreDefinition, SpreadsheetPivotTable, StartChangeHighlightCommand, StartCommand, StaticTable, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableBorder, TableConfig, TableData, TableElementStyle, TableId, TableStyle, TableStyleData, TableStyleTemplateName, TargetDependentCommand, TechnicalName, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, TitleDesign, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, chartHelpers, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
