import * as vue from 'vue';
import { Ref, ComputedRef, ShallowReactive, WatchSource, Component } from 'vue';
import { PointerpressType, KeypressType, KeyreleaseType, KeychordType, PointerhoverType, PointerpressMetadata, KeypressMetadata, KeyreleaseMetadata, KeychordMetadata, PointerhoverMetadata, PointerhoverOptions, CompleteOptions, PointerpressOptions, KeypressOptions, Navigateable, Pickable, Completeable, CompleteableOptions, PickOptions, StoreableOptions, ListenableSupportedType, ListenEffectParam, ListenEffect, ListenableOptions, ListenOptions, Listenable } from '@baleada/logic';
import { MatchData } from 'fast-fuzzy';
import { useCompleteable, useStoreable } from '@baleada/vue-composition';

type Coordinates = {
    row: number;
    column: number;
};

declare class Plane<Point extends any> extends Array<Point[]> {
    constructor(...initial: Point[][]);
    get({ row, column }: Coordinates): Point;
    set({ row, column }: Coordinates, value: Point): void;
    points(): Generator<{
        row: number;
        column: number;
        point: Point;
    }, void, unknown>;
}

type SupportedElement = HTMLElement | SVGElement;
type SupportedRendered = SupportedElement | string | number | boolean | Record<any, any>;
/**
 * An item collected by a function ref during Vue's render phase.
 */
type Rendered<R extends SupportedRendered> = (R | R[] | Plane<R> | Ref<R> | Ref<R[]> | Ref<Plane<R>>);

type RecognizeableTypeByName = {
    pointerpress: PointerpressType;
    keypress: KeypressType;
    keyrelease: KeyreleaseType;
    keychord: KeychordType;
    pointerhover: PointerhoverType;
};
type RecognizeableMetadataByName = {
    pointerpress: PointerpressMetadata;
    keypress: KeypressMetadata;
    keyrelease: KeyreleaseMetadata;
    keychord: KeychordMetadata;
    pointerhover: PointerhoverMetadata;
};

type Ability = 'enabled' | 'disabled';

type Orientation = 'horizontal' | 'vertical';

type Targetability = 'targetable' | 'untargetable';

type Validity = 'valid' | 'invalid';

type ClosingCompletion = {
    close: <O extends Opening>(opening: O) => Closing<O>;
    segmentedBySelection: ReturnType<typeof useCompleteable>;
};
type UseClosingCompletionOptions = {
    only?: Opening[];
};
declare function useClosingCompletion(textbox: Textbox, options?: UseClosingCompletionOptions): ClosingCompletion;
type Opening = '[' | '(' | '{' | '<' | '"' | '\'' | '`';
type Closing<O extends Opening> = ClosingByOpening[O];
type ClosingByOpening = {
    '[': ']';
    '(': ')';
    '{': '}';
    '<': '>';
    '"': '"';
    '\'': '\'';
    '`': '`';
};

type Conditional = {
    render: () => void;
    remove: () => void;
    toggle: () => boolean;
    status: ComputedRef<ConditionalStatus>;
    is: {
        rendered: () => boolean;
        removed: () => boolean;
        conditional: () => boolean;
        removing: () => boolean;
    };
};
type ConditionalStatus = 'rendering' | 'rendered' | 'removing' | 'removed';
type UseConditionalOptions = {
    initialRenders?: boolean;
    show?: ShowOptions<Ref<SupportedElement>>;
};
declare function useConditional(extendable: ExtendableElement, options?: UseConditionalOptions): Conditional;

type Hover = {
    status: ComputedRef<'hovered' | 'exited'>;
    is: {
        hovered: () => boolean;
        exited: () => boolean;
    };
    descriptor: ComputedRef<HoverDescriptor>;
    firstDescriptor: ComputedRef<HoverDescriptor>;
};
type HoverDescriptor = {
    metadata: PointerhoverMetadata;
    sequence: (MouseEvent | TouchEvent)[];
};
type UseHoverOptions = PointerhoverOptions;
declare function useHover(extendable: ExtendableElement, options?: UseHoverOptions): Hover;

type Focus = {
    status: ComputedRef<FocusStatus>;
    target: ComputedRef<FocusTarget>;
    visibility: ComputedRef<FocusVisibility>;
    is: {
        focused: () => boolean;
        blurred: () => boolean;
        element: () => boolean;
        descendant: () => boolean;
        visible: () => boolean;
        invisible: () => boolean;
    };
};
type FocusStatus = 'focused' | 'blurred';
type FocusVisibility = 'visible' | 'invisible' | 'n/a';
type FocusTarget = 'element' | 'descendant' | 'n/a';
declare function useFocus(extendable: ExtendableElement): Focus;

type Intersection = {
    rect: Ref<{
        visible: IntersectionObserverEntry['intersectionRect'];
        bounding: IntersectionObserverEntry['boundingClientRect'];
        viewport: IntersectionObserverEntry['rootBounds'];
    }>;
    ratio: Ref<IntersectionObserverEntry['intersectionRatio']>;
    status: Ref<'visible' | 'invisible'>;
    is: {
        visible: () => boolean;
        invisible: () => boolean;
    };
    time: Ref<IntersectionObserverEntry['time']>;
};
type UseIntersectionOptions = OnEffectConfig<SupportedElement, 'intersect'>['options']['listen'];
declare function useIntersection(extendable: ExtendableElement, options?: UseIntersectionOptions): Intersection;

type MarkdownCompletion = {
    segmentedBySpace: ReturnType<typeof useCompleteable>;
    segmentedByNewline: ReturnType<typeof useCompleteable>;
} & MarkdownEffects;
type MarkdownEffects = {
    bold: (options?: CompleteOptions) => void;
    italic: (options?: CompleteOptions) => void;
    superscript: (options?: CompleteOptions) => void;
    subscript: (options?: CompleteOptions) => void;
    strikethrough: (options?: CompleteOptions) => void;
    code: (options?: CompleteOptions) => void;
    link: (options?: {
        select?: CompleteOptions['select'] | 'href';
    }) => void;
    codeblock: (options?: CompleteOptions) => void;
    blockquote: (options?: CompleteOptions) => void;
    orderedList: (options?: CompleteOptions) => void;
    unorderedList: (options?: CompleteOptions & {
        bullet?: '-' | '*';
    }) => void;
    checklist: (options?: CompleteOptions) => void;
    heading: (options?: CompleteOptions & {
        level?: 1 | 2 | 3 | 4 | 5 | 6;
    }) => void;
    horizontalRule: (options?: CompleteOptions & {
        character?: '-' | '_' | '*';
    }) => void;
};
declare function useMarkdownCompletion(textbox: Textbox): MarkdownCompletion;

type Popup = {
    status: Ref<PopupStatus>;
    open: () => PopupStatus;
    close: () => PopupStatus;
    toggle: () => PopupStatus;
    is: Conditional['is'] & {
        opened: () => boolean;
        closed: () => boolean;
    };
    conditionalStatus: Conditional['status'];
};
type PopupStatus = 'opened' | 'closed';
type UsePopupOptions = {
    initialStatus?: PopupStatus;
    trapsFocus?: boolean;
    conditional?: Omit<UseConditionalOptions, 'initialRenders'>;
    allowsScrollWhenOpened?: boolean;
};
declare function usePopup(extendable: ExtendableElement, options?: UsePopupOptions): Popup;

type Press = {
    status: ComputedRef<PressStatus>;
    is: {
        pressed: () => boolean;
        released: () => boolean;
    };
    descriptor: ComputedRef<PressDescriptor>;
    firstDescriptor: ComputedRef<PressDescriptor>;
};
type PressStatus = 'pressed' | 'released';
type PressDescriptor = ({
    kind: 'mouse' | 'touch' | 'pen' | 'pointer';
    metadata: PointerpressMetadata;
    sequence: PointerEvent[];
} | {
    kind: 'keyboard';
    metadata: KeypressMetadata;
    sequence: KeyboardEvent[];
});
type UsePressOptions = {
    pointer?: PointerpressOptions | false;
    keyboard?: KeypressOptions | false;
};
declare function usePress(extendable: ExtendableElement, options?: UsePressOptions): Press;

type Size<Breakpoints extends Record<string, number>> = {
    contentRect: Ref<Omit<DOMRectReadOnly, 'toJSON'>>;
    borderBox: Ref<{
        height: number;
        width: number;
    }>;
    contentBox: Ref<{
        height: number;
        width: number;
    }>;
    breaks: Ref<Record<keyof Breakpoints | 'zero', boolean>>;
    orientation: Ref<'none' | 'portrait' | 'landscape'>;
};
type UseSizeOptions<Breakpoints extends Record<string, number>> = {
    breakpoints?: Breakpoints;
} & OnEffectConfig<SupportedElement, 'resize'>['options']['listen'];
declare const tailwindBreakpoints: {
    readonly sm: 640;
    readonly md: 768;
    readonly lg: 1024;
    readonly xl: 1280;
    readonly '2xl': 1536;
};
declare function useSize<Breakpoints extends Record<string, number> = typeof tailwindBreakpoints>(extendable: ExtendableElement, options?: UseSizeOptions<Breakpoints>): Size<Breakpoints>;

type ButtonStorage = Storage;
type UseButtonStorageOptions = UseStorageOptions;
declare function useButtonStorage(button: Button<true>, options?: UseButtonStorageOptions): ButtonStorage;

type TablistStorage = Storage;
type UseTablistStorageOptions = UseStorageOptions;
declare function useTablistStorage(tablist: Tablist, options?: UseTablistStorageOptions): TablistStorage;

type TextboxStorage = Storage;
type UseTextboxStorageOptions = UseStorageOptions;
declare function useTextboxStorage(textbox: Textbox, options?: UseTextboxStorageOptions): TextboxStorage;

type Button<Toggles extends boolean = false> = ButtonBase & (Toggles extends true ? {
    status: ComputedRef<ToggleButtonStatus>;
    toggle: () => ToggleButtonStatus;
    on: () => ToggleButtonStatus;
    off: () => ToggleButtonStatus;
    is: (ButtonBase['is'] & {
        on: () => boolean;
        off: () => boolean;
    });
} : {});
type ButtonBase = Omit<Press, 'status' | 'descriptor' | 'firstDescriptor'> & {
    root: ElementApi<SupportedElement, true, LabelMeta & AbilityMeta>;
    pressDescriptor: Press['descriptor'];
    firstPressDescriptor: Press['firstDescriptor'];
    pressStatus: Press['status'];
    is: (Press['is'] & UsedAbility['is']);
};
type ToggleButtonStatus = 'on' | 'off';
type UseButtonOptions<Toggles extends boolean = false> = {
    toggles?: Toggles;
    initialStatus?: ToggleButtonStatus;
    press?: UsePressOptions;
};
declare function useButton<Toggles extends boolean = false>(options?: UseButtonOptions<Toggles>): Button<Toggles>;

type Checkbox = {
    root: ElementApi<HTMLInputElement, true, LabelMeta & AbilityMeta & ValidityMeta>;
    checked: Ref<boolean>;
    toggle: () => boolean;
    check: () => boolean;
    uncheck: () => boolean;
    determinate: Ref<boolean>;
    pressDescriptor: Press['descriptor'];
    firstPressDescriptor: Press['firstDescriptor'];
    pressStatus: Press['status'];
    is: (Press['is'] & UsedAbility['is'] & UsedValidity['is'] & {
        checked: () => boolean;
        unchecked: () => boolean;
        determinate: () => boolean;
        indeterminate: () => boolean;
    });
};
type UseCheckboxOptions = {
    initialChecked?: boolean;
    initialDeterminate?: boolean;
    press?: UsePressOptions;
};
declare function useCheckbox(options?: UseCheckboxOptions): Checkbox;

type Dialog = {
    root: ElementApi<SupportedElement, true, LabelMeta>;
};
type UseDialogOptions = {
    alerts?: boolean;
};
declare function useDialog(options?: UseDialogOptions): Dialog;

type Grid<Multiselectable extends boolean = false> = (GridBase & PlaneFeatures<Multiselectable>);
type GridBase = (RootAndKeyboardTarget<LabelMeta & AbilityMeta & ValidityMeta> & {
    rowgroups: ListApi<SupportedElement, true>;
    rows: ListApi<SupportedElement, true>;
    cells: PlaneApi<SupportedElement, true, (LabelMeta & AbilityMeta & {
        candidate?: string;
        span?: {
            row?: number;
            column?: number;
        };
        kind?: 'cell' | 'rowheader' | 'columnheader';
    })>;
    history: History<{
        focused: Coordinates;
        selected: Coordinates[];
    }>;
});
type UseGridOptions<Multiselectable extends boolean = false, Clears extends boolean = false> = (UseGridOptionsBase<Multiselectable, Clears> & Partial<Omit<UsePlaneFeaturesConfig<Multiselectable, Clears>, 'rootApi' | 'planeApi' | 'disabledElementsReceiveFocus' | 'multiselectable' | 'clears'>>);
type UseGridOptionsBase<Multiselectable extends boolean = false, Clears extends boolean = false> = {
    multiselectable?: Multiselectable;
    clears?: Clears;
    disabledOptionsReceiveFocus?: boolean;
    needsAriaOwns?: boolean;
};
declare function useGrid<Multiselectable extends boolean = true, Clears extends boolean = true>(options?: UseGridOptions<Multiselectable, Clears>): Grid<Multiselectable>;

type Head = {
    title: ElementApi<SupportedElement>;
    metas: ListApi<HTMLMetaElement>;
};
type UseHeadOptions = {
    title?: string | Ref<string>;
    metas?: Record<string, string | Ref<string>>[];
};
declare function useHead({ title, metas }: UseHeadOptions): Head;

type Link = {
    root: ElementApi<HTMLInputElement, true, LabelMeta>;
};
type UseLinkOptions = Record<never, never>;
declare function useLink(options?: UseLinkOptions): Link;

type Listbox<Multiselectable extends boolean = false, O extends Orientation = 'vertical'> = (ListboxBase & Omit<ListFeatures<Multiselectable, O>, 'planeApi' | 'focusedItem' | 'selectedItems'> & {
    focusedOption: ListFeatures<Multiselectable, O>['focusedItem'];
    selectedOptions: ListFeatures<Multiselectable, O>['selectedItems'];
});
type ListboxBase = (RootAndKeyboardTarget<LabelMeta & AbilityMeta & ValidityMeta> & {
    options: ListApi<SupportedElement, true, (LabelMeta & AbilityMeta & {
        candidate?: string;
    })>;
    history: History<{
        focused: Navigateable<SupportedElement>['location'];
        selected: Pickable<SupportedElement>['picks'];
    }>;
});
type UseListboxOptions<Multiselectable extends boolean = false, Clears extends boolean = true, O extends Orientation = 'vertical'> = (Partial<Omit<UseListFeaturesConfig<Multiselectable, Clears, O>, 'rootApi' | 'listApi' | 'disabledElementsReceiveFocus' | 'multiselectable' | 'clears'>> & {
    multiselectable?: Multiselectable;
    clears?: Clears;
    disabledOptionsReceiveFocus?: boolean;
});
declare function useListbox<Multiselectable extends boolean = false, Clears extends boolean = true, O extends Orientation = 'vertical'>(options?: UseListboxOptions<Multiselectable, Clears, O>): Listbox<Multiselectable, O>;

type Menubar<Multiselectable extends boolean = true, O extends Orientation = 'vertical'> = (MenubarBase & Omit<ListFeatures<Multiselectable, O>, 'planeApi'>);
type MenubarBase = (RootAndKeyboardTarget<LabelMeta & AbilityMeta> & {
    items: ListApi<SupportedElement, true, (LabelMeta & AbilityMeta & {
        candidate?: string;
        kind?: 'item' | 'checkbox' | 'radio';
        checked?: boolean;
        group?: string;
    })>;
    history: History<{
        focused: Navigateable<SupportedElement>['location'];
        selected: Pickable<SupportedElement>['picks'];
    }>;
});
type UseMenubarOptions<Multiselectable extends boolean = true, Clears extends boolean = true, O extends Orientation = 'vertical'> = (Partial<Omit<UseListboxOptions<Multiselectable, Clears, O>, 'disabledOptionsReceiveFocus'>> & {
    disabledItemsReceiveFocus?: boolean;
    visuallyPersists?: boolean;
});
declare function useMenubar<Multiselectable extends boolean = true, Clears extends boolean = true, O extends Orientation = 'vertical'>(options?: UseMenubarOptions<Multiselectable, Clears, O>): Menubar<Multiselectable, O>;

type Separator<Kind extends SeparatorKind = 'static'> = (Kind extends 'static' ? {
    root: ElementApi<SupportedElement, true>;
} : ({
    root: ElementApi<SupportedElement, true, LabelMeta & {
        controls: string;
    }>;
    position: ComputedRef<number>;
    exact: (position: number) => number;
    toggle: () => number;
} & (Kind extends 'variable' ? {
    increase: () => number;
    decrease: () => number;
    toggle: () => number;
} : Record<never, never>)));
type SeparatorKind = 'static' | 'variable' | 'fixed';
type UseSeparatorOptions<Kind extends SeparatorKind = 'static'> = {
    orientation?: 'horizontal' | 'vertical';
    kind?: Kind;
} & (Kind extends 'static' ? Record<never, never> : ({
    initialPosition?: number;
    min?: number;
    max?: number;
} & (Kind extends 'fixed' ? Record<never, never> : {
    step?: number;
})));
declare function useSeparator<Kind extends SeparatorKind = 'static'>(options?: UseSeparatorOptions<Kind>): Separator<Kind>;

type Tablist<O extends Orientation = 'horizontal'> = (TablistBase & Omit<ListFeatures<false, O>, 'planeApi' | 'focusedItem' | 'selectedItems'> & {
    focusedTab: ListFeatures<false, O>['focusedItem'];
    selectedTab: ListFeatures<false, O>['selectedItems'];
});
type TablistBase = (RootAndKeyboardTarget<LabelMeta & AbilityMeta> & {
    tabs: ListApi<SupportedElement, true, LabelMeta & AbilityMeta>;
    panels: ListApi<SupportedElement, true>;
});
type UseTablistOptions<O extends Orientation = 'horizontal'> = (Partial<Omit<UseListboxOptions<false, false, O>, 'disabledOptionsReceiveFocus' | 'multiselectable' | 'clears'>> & {
    disabledTabsReceiveFocus?: boolean;
    transition?: {
        panel?: (TransitionOption<Tablist<O>['panels']['list']> | TransitionOptionCreator<Tablist<O>['panels']['list']>);
    };
});
declare function useTablist<O extends Orientation = 'horizontal'>(options?: UseTablistOptions<O>): Tablist<O>;

type Textbox = {
    root: ElementApi<HTMLInputElement | HTMLTextAreaElement, true, (LabelMeta & AbilityMeta & ValidityMeta)>;
    text: ReturnType<typeof useCompleteable>;
    type: (string: string) => void;
    select: (selection: Completeable['selection']) => void;
    is: (UsedAbility['is'] & UsedValidity['is']);
    history: History<HistoryEntry>['entries'];
} & Omit<History<HistoryEntry>, 'entries'>;
type HistoryEntry = {
    string: string;
    selection: Completeable['selection'];
};
type UseTextboxOptions = {
    initialValue?: string;
    text?: CompleteableOptions;
};
declare function useTextbox(options?: UseTextboxOptions): Textbox;

type AnyInterface = (Button | Checkbox | Dialog | Grid | Link | Listbox | Menubar | Separator | Tablist | Textbox);
type ExtendableElement = Ref<SupportedElement | undefined> | AnyInterface;

type TransitionOptionCreator<B extends BindElement> = B extends Plane<SupportedElement> | Ref<Plane<SupportedElement>> ? (plane: B) => TransitionOption<B> : B extends SupportedElement[] | Ref<SupportedElement[]> ? (list: B) => TransitionOption<B> : (element: B) => TransitionOption<B>;

type ElementApi<E extends SupportedElement, Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>> = Identifies extends true ? ElementApiBase<E, Meta> & {
    id: Id<Ref<E>>;
} : ElementApiBase<E, Meta>;
type ElementApiBase<E extends SupportedElement, Meta extends Record<any, any> = Record<never, never>> = {
    ref: (meta?: Meta) => (element: E, refs?: Record<string, any>) => void;
    element: Ref<null | E>;
    meta: Ref<Meta>;
    status: Ref<{
        meta: 'changed' | 'none';
    }>;
};
type UseElementApiOptions<Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>> = {
    identifies?: Identifies;
    defaultMeta?: Meta;
};
declare function useElementApi<E extends SupportedElement, Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>>(options?: UseElementApiOptions<Identifies, Meta>): ElementApi<E, Identifies, Meta>;

type ListApi<E extends SupportedElement, Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>> = Identifies extends true ? ListApiBase<E, Meta> & {
    ids: Id<Ref<E[]>>;
} : ListApiBase<E, Meta>;
type ListApiBase<E extends SupportedElement, Meta extends Record<any, any> = Record<never, never>> = {
    ref: (index: number, meta?: Meta) => (element: E, refs?: Record<string, any>) => void;
    list: Ref<E[]>;
    status: Ref<{
        order: 'changed' | 'none';
        length: 'shortened' | 'lengthened' | 'none';
        meta: 'changed' | 'none';
    }>;
    meta: Ref<Meta[]>;
};
type UseListApiOptions<Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>> = (UseElementApiOptions<Identifies, Meta> & {
    toStatus?: ([currentList, currentMeta]: [SupportedElement[], Meta[]], [previousList, previousMeta]: [SupportedElement[], Meta[]]) => ListApi<any>['status']['value'];
});
declare function useListApi<E extends SupportedElement, Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>>(options?: UseListApiOptions<Identifies, Meta>): ListApi<E, Identifies, Meta>;

type PlaneApi<E extends SupportedElement, Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>> = Identifies extends true ? PlaneApiBase<E, Meta> & {
    ids: Id<Ref<Plane<E>>>;
} : PlaneApiBase<E, Meta>;
type PlaneApiBase<E extends SupportedElement, Meta extends Record<any, any> = Record<never, never>> = {
    ref: (coordinates: Coordinates, meta?: Meta) => (element: E, refs?: Record<string, any>) => void;
    plane: Ref<Plane<E>>;
    status: Ref<{
        order: 'changed' | 'none';
        rowWidth: 'shortened' | 'lengthened' | 'none' | 'n/a';
        columnHeight: 'shortened' | 'lengthened' | 'none' | 'n/a';
        meta: 'changed' | 'none';
    }>;
    meta: Ref<Plane<Meta>>;
};
type UsePlaneApiOptions<Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>> = (UseElementApiOptions<Identifies, Meta> & {
    toStatus?: ([currentPlane, currentMeta]: [Plane<any>, Plane<any>], [previousPlane, previousMeta]: [Plane<any>, Plane<any>]) => PlaneApi<any>['status']['value'];
});
declare function usePlaneApi<E extends SupportedElement, Identifies extends boolean = false, Meta extends Record<any, any> = Record<never, never>>(options?: UsePlaneApiOptions<Identifies, Meta>): PlaneApi<E, Identifies, Meta>;

type AbilityMeta = {
    ability?: Ability;
};

type ValidityMeta = {
    validity?: Validity;
};

type LabelMeta = {
    label?: string;
    labelledBy?: string | string[];
    description?: string;
    describedBy?: string | string[];
    errorMessage?: string;
    details?: string;
};

type BindElement = Rendered<SupportedElement>;
type BindValue<B extends BindElement, ValueType extends string | number | boolean> = (ValueType | Ref<ValueType> | BindValueGetter<B, ValueType>);
type BindValueGetter<B extends BindElement, ValueType extends string | number | boolean> = (B extends Plane<SupportedElement> | Ref<Plane<SupportedElement>> ? (coordinates: Coordinates) => ValueType : B extends SupportedElement[] | Ref<SupportedElement[]> ? (index: number) => ValueType : () => ValueType);

type Query = {
    query: Ref<string>;
    type: (character: string, options?: {
        eventuallyClears?: boolean;
    }) => void;
    paste: (string: string, options?: {
        eventuallyClears?: boolean;
    }) => void;
};
type UseQueryOptions = {
    clearDelay?: number;
};

type ToPlaneEligibility = (coordinates: Coordinates) => Eligibility;
type Eligibility = 'eligible' | 'ineligible';

type EligibleInPlaneNavigateApi = {
    exact: (coordinates: Coordinates, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    next: (coordinates: Coordinates, options?: EligibleInPlaneNavigateNextPreviousOptions) => Ability | 'none';
    nextInRow: (coordinates: Coordinates, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    nextInColumn: (coordinates: Coordinates, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    previous: (coordinates: Coordinates, options?: EligibleInPlaneNavigateNextPreviousOptions) => Ability | 'none';
    previousInRow: (coordinates: Coordinates, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    previousInColumn: (coordinates: Coordinates, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    first: (options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    last: (options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    firstInRow: (row: number, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    lastInRow: (row: number, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    firstInColumn: (column: number, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    lastInColumn: (column: number, options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
    random: (options?: BaseEligibleInPlaneNavigateApiOptions) => Ability | 'none';
};
type BaseEligibleInPlaneNavigateApiOptions = {
    toEligibility?: ToPlaneEligibility;
};
type EligibleInPlaneNavigateNextPreviousOptions = BaseEligibleInPlaneNavigateApiOptions & {
    direction?: 'vertical' | 'horizontal';
};

type EligibleInPlanePickApi = {
    exact: (coordinatesOrCoordinateList: Coordinates | Coordinates[], options?: BaseEligibleInPlanePickApiOptions) => 'enabled' | 'none';
    next: (coordinates: Coordinates, options?: EligibleInPlanePickNextPreviousOptions) => 'enabled' | 'none';
    nextInRow: (coordinates: Coordinates, options?: BaseEligibleInPlanePickApiOptions) => 'enabled' | 'none';
    nextInColumn: (coordinates: Coordinates, options?: BaseEligibleInPlanePickApiOptions) => 'enabled' | 'none';
    previous: (coordinates: Coordinates, options?: EligibleInPlanePickNextPreviousOptions) => 'enabled' | 'none';
    previousInRow: (coordinates: Coordinates, options?: BaseEligibleInPlanePickApiOptions) => 'enabled' | 'none';
    previousInColumn: (coordinates: Coordinates, options?: BaseEligibleInPlanePickApiOptions) => 'enabled' | 'none';
    all: (options?: BaseEligibleInPlanePickApiOptions) => 'enabled' | 'none';
};
type BaseEligibleInPlanePickApiOptions = (Omit<PickOptions, 'allowsDuplicates'> & {
    toEligibility?: ToPlaneEligibility;
});
type EligibleInPlanePickNextPreviousOptions = (BaseEligibleInPlanePickApiOptions & {
    direction?: 'vertical' | 'horizontal';
});

type PlaneInteractions = {
    pressed: Ref<Coordinates>;
    released: Ref<Coordinates>;
    pressDescriptor: Press['descriptor'];
    firstPressDescriptor: Press['firstDescriptor'];
    pressStatus: Press['status'];
    hovered: Ref<Coordinates>;
    hoverDescriptor: Hover['descriptor'];
    firstHoverDescriptor: Hover['firstDescriptor'];
    is: {
        pressed: (coordinates: Coordinates) => boolean;
        released: (coordinates: Coordinates) => boolean;
        hovered: (coordinates: Coordinates) => boolean;
        exited: (coordinates: Coordinates) => boolean;
    };
};

type UsedValidity = {
    is: {
        valid: () => boolean;
        invalid: () => boolean;
    };
};

type PlaneFeatures<Multiselectable extends boolean = false> = Multiselectable extends true ? (PlaneFeaturesBase & {
    select: EligibleInPlanePickApi;
    deselect: {
        exact: (coordinateOrCoordinates: Coordinates | Coordinates[], options?: DeselectExactOptions) => void;
        all: () => void;
    };
}) : (PlaneFeaturesBase & {
    select: (Omit<EligibleInPlanePickApi, 'exact'> & {
        exact: (coordinates: Coordinates, options?: {
            toEligibility?: ToPlaneEligibility;
        }) => void;
    });
    deselect: {
        exact: (coordinate: Coordinates) => void;
        all: () => void;
    };
});
type PlaneFeaturesBase = (Query & Omit<PlaneInteractions, 'is'> & {
    focusedRow: ShallowReactive<Navigateable<SupportedElement[]>>;
    focusedColumn: ShallowReactive<Navigateable<SupportedElement>>;
    focused: Ref<Coordinates>;
    focusedElement: Ref<SupportedElement>;
    focus: EligibleInPlaneNavigateApi;
    results: Ref<Plane<MatchData<string>>>;
    search: () => void;
    selectedRows: ShallowReactive<Pickable<SupportedElement[]>>;
    selectedColumns: ShallowReactive<Pickable<SupportedElement>>;
    selected: Ref<Coordinates[]>;
    superselected: Ref<Coordinates[]>;
    superselect: {
        from: (index: number) => number;
    };
    keyboardStatus: Ref<'focusing' | 'selecting'>;
    focusing: () => 'focusing';
    selecting: () => 'selecting';
    is: (PlaneInteractions['is'] & UsedValidity['is'] & {
        focused: (coordinates: Coordinates) => boolean;
        selected: (coordinates: Coordinates) => boolean;
        superselected: (coordinates: Coordinates) => boolean;
        enabled: (coordinates?: Coordinates) => boolean;
        disabled: (coordinates?: Coordinates) => boolean;
        focusing: () => boolean;
        selecting: () => boolean;
    });
    total: {
        selected: (coordinates: Coordinates) => number;
    };
});
type UsePlaneFeaturesConfig<Multiselectable extends boolean = false, Clears extends boolean = true, RootMeta extends DefaultRootMeta = DefaultRootMeta, KeyboardTargetMeta extends DefaultKeyboardTargetMeta = DefaultRootMeta & DefaultKeyboardTargetMeta, PointMeta extends DefaultPointMeta = DefaultPointMeta> = (UsePlaneFeaturesConfigBase<Multiselectable, Clears, RootMeta, KeyboardTargetMeta, PointMeta> & (Multiselectable extends true ? {
    initialSelected: Clears extends true ? Coordinates | Coordinates[] | 'all' | 'none' : Coordinates | Coordinates[] | 'all';
} : {
    initialSelected: Clears extends true ? Coordinates | 'none' : Coordinates;
}));
type UsePlaneFeaturesConfigBase<Multiselectable extends boolean = false, Clears extends boolean = true, RootMeta extends DefaultRootMeta = DefaultRootMeta, KeyboardTargetMeta extends DefaultKeyboardTargetMeta = DefaultRootMeta & DefaultKeyboardTargetMeta, PointMeta extends DefaultPointMeta = DefaultPointMeta> = {
    rootApi: ElementApi<SupportedElement, true, RootMeta>;
    keyboardTargetApi: ElementApi<SupportedElement, true, KeyboardTargetMeta>;
    planeApi: PlaneApi<SupportedElement, any, PointMeta>;
    clears: Clears;
    initialFocused: Coordinates | 'selected';
    initialSuperselectedFrom: number;
    initialKeyboardStatus: PlaneKeyboardStatus;
    disabledElementsReceiveFocus: boolean;
    loops: Parameters<Navigateable<SupportedElement>['next']>[0]['loops'];
    multiselectable: Multiselectable;
    query: (UseQueryOptions & {
        matchThreshold?: number;
    });
    receivesFocus: boolean;
};
type PlaneKeyboardStatus = 'focusing' | 'selecting';
type DefaultRootMeta = LabelMeta & AbilityMeta & ValidityMeta;
type DefaultKeyboardTargetMeta = LabelMeta & AbilityMeta & ValidityMeta & {
    targetability?: Targetability;
};
type DefaultPointMeta = LabelMeta & AbilityMeta & {
    candidate?: string;
};
type DeselectExactOptions = {
    limit?: number | true;
    order?: 'chronological' | 'reverse chronological';
};

type ListFeatures<Multiselectable extends boolean = false, O extends Orientation = 'vertical', ItemMeta extends DefaultPointMeta = DefaultPointMeta> = Multiselectable extends true ? (ListFeaturesBase<O, ItemMeta> & {
    select: EligibleInListPickApi;
    deselect: {
        exact: (indexOrIndices: number | number[], options?: DeselectExactOptions) => void;
        all: () => void;
    };
}) : (ListFeaturesBase<O, ItemMeta> & {
    select: (Omit<EligibleInListPickApi, 'exact'> & {
        exact: (index: number, options?: {
            toEligibility?: ToListEligibility;
        }) => void;
    });
    deselect: {
        exact: (index: number) => void;
        all: () => void;
    };
});
type EligibleInListPickApi = {
    exact: (indexOrIndices: number | number[], options?: BaseEligibleInListPickApiOptions) => ReturnType<EligibleInPlanePickApi['exact']>;
    next: (index: number, options?: BaseEligibleInListPickApiOptions) => ReturnType<EligibleInPlanePickApi['next']>;
    previous: (index: number, options?: BaseEligibleInListPickApiOptions) => ReturnType<EligibleInPlanePickApi['previous']>;
    all: (options?: BaseEligibleInListPickApiOptions) => ReturnType<EligibleInPlanePickApi['all']>;
};
type BaseEligibleInListPickApiOptions = PickOptions & {
    toEligibility?: ToListEligibility;
};
type ToListEligibility = (index: number) => 'eligible' | 'ineligible';
type ListFeaturesBase<O extends Orientation = 'vertical', ItemMeta extends DefaultPointMeta = DefaultPointMeta> = (Query & Omit<PlaneFeaturesBase, 'focusedRow' | 'focusedColumn' | 'focused' | 'focus' | 'results' | 'selectedRows' | 'selectedColumns' | 'selected' | 'superselected' | 'pressed' | 'released' | 'is' | 'total' | 'getStatuses'> & {
    planeApi: PlaneApi<SupportedElement, false, ItemMeta>;
    focusedItem: ShallowReactive<Navigateable<O extends 'vertical' ? SupportedElement[] : SupportedElement>>;
    focused: Ref<number>;
    focus: EligibleInListNavigateApi;
    results: Ref<MatchData<string>[]>;
    selectedItems: ShallowReactive<Pickable<O extends 'vertical' ? SupportedElement[] : SupportedElement>>;
    selected: Ref<number[]>;
    superselected: Ref<number[]>;
    pressed: Ref<number>;
    released: Ref<number>;
    hovered: Ref<number>;
    is: {
        pressed: (index: number) => boolean;
        released: (index: number) => boolean;
        hovered: (index: number) => boolean;
        exited: (index: number) => boolean;
        focused: (index: number) => boolean;
        selected: (index: number) => boolean;
        superselected: (index: number) => boolean;
        enabled: (index?: number) => boolean;
        disabled: (index?: number) => boolean;
        valid: () => boolean;
        invalid: () => boolean;
        focusing: () => boolean;
        selecting: () => boolean;
    };
    total: {
        selected: (index: number) => number;
    };
});
type EligibleInListNavigateApi = {
    exact: (index: number, options?: BaseEligibleInListNavigateApiOptions) => ReturnType<EligibleInPlaneNavigateApi['exact']>;
    next: (index: number, options?: BaseEligibleInListNavigateApiOptions) => ReturnType<EligibleInPlaneNavigateApi['next']>;
    previous: (index: number, options?: BaseEligibleInListNavigateApiOptions) => ReturnType<EligibleInPlaneNavigateApi['previous']>;
    first: (options?: BaseEligibleInListNavigateApiOptions) => ReturnType<EligibleInPlaneNavigateApi['first']>;
    last: (options?: BaseEligibleInListNavigateApiOptions) => ReturnType<EligibleInPlaneNavigateApi['last']>;
    random: (options?: BaseEligibleInListNavigateApiOptions) => ReturnType<EligibleInPlaneNavigateApi['random']>;
};
type BaseEligibleInListNavigateApiOptions = {
    toEligibility?: ToListEligibility;
};
type UseListFeaturesConfig<Multiselectable extends boolean = false, Clears extends boolean = true, O extends Orientation = 'vertical', RootMeta extends DefaultRootMeta = DefaultRootMeta, KeyboardTargetMeta extends DefaultKeyboardTargetMeta = DefaultKeyboardTargetMeta, ItemMeta extends DefaultPointMeta = DefaultPointMeta> = (UseListFeaturesConfigBase<Multiselectable, Clears, O, RootMeta, KeyboardTargetMeta, ItemMeta> & (Multiselectable extends true ? {
    initialSelected: Clears extends true ? number | number[] | 'all' | 'none' : number | number[] | 'all';
} : {
    initialSelected: Clears extends true ? number | 'none' : number;
}));
type UseListFeaturesConfigBase<Multiselectable extends boolean = false, Clears extends boolean = true, O extends Orientation = 'vertical', RootMeta extends DefaultRootMeta = DefaultRootMeta, KeyboardTargetMeta extends DefaultKeyboardTargetMeta = DefaultKeyboardTargetMeta, ItemMeta extends DefaultPointMeta = DefaultPointMeta> = (Omit<UsePlaneFeaturesConfigBase<Multiselectable, Clears, RootMeta, KeyboardTargetMeta, ItemMeta>, 'planeApi' | 'initialFocused'> & {
    listApi: ListApi<SupportedElement, true, ItemMeta>;
    defaultMeta?: ItemMeta;
    initialFocused: number | 'selected';
    orientation: O;
    needsAriaOwns: boolean;
});

declare function createCoordinatesEqual(coordinates: Coordinates): (candidate: Coordinates) => boolean;

declare function createCoordinates(planeApi: PlaneApi<SupportedElement>): (element: SupportedElement) => Coordinates;

declare function useBody(): ElementApiBase<SupportedElement, Record<never, never>>;

type History<Entry> = {
    entries: ShallowReactive<Navigateable<Entry>>;
    rewrite: (rewritten: Entry[]) => void;
    record: (entry: Entry) => void;
    undo: (options?: {
        distance?: number;
    }) => void;
    redo: (options?: {
        distance?: number;
    }) => void;
};

type Storage = {
    storeable: ReturnType<typeof useStoreable>;
};
type UseStorageOptions = {
    key?: string;
} & StoreableOptions;

type RootAndKeyboardTarget<RootMeta extends Record<any, any> = Record<never, never>, KeyboardTargetMeta extends {
    targetability?: Targetability;
} = {
    targetability?: Targetability;
}> = {
    root: ElementApi<SupportedElement, true, RootMeta>;
    keyboardTarget: ElementApi<SupportedElement, true, KeyboardTargetMeta>;
};

type UsedAbility = {
    is: {
        enabled: () => boolean;
        disabled: () => boolean;
    };
};

declare function manageScrollAllowance(element?: Ref<SupportedElement>): void;

declare function delegateHover(element?: Ref<SupportedElement>): void;

declare function delegatePress(element?: SupportedElement | Ref<SupportedElement>): void;

type BindSupportedKey = string;
type Value<Key extends BindSupportedKey> = string | number | boolean;
type BindReactiveValueGetter<B extends BindElement, Value extends string | number | boolean> = {
    get: BindValueGetter<B, Value>;
    watchSource: WatchSource | WatchSource[];
};
declare function bind<B extends BindElement, Key extends BindSupportedKey>(elementOrListOrPlane: B, values: {
    [key in Key]: BindValue<B, Value<key>> | BindReactiveValueGetter<B, Value<key>>;
}): void;

type IdentifyOptions = {
    watchSource?: WatchSource | WatchSource[];
};
type Id<B extends BindElement> = B extends (SupportedElement | Ref<SupportedElement>) ? ComputedRef<string> : B extends (SupportedElement[] | Ref<SupportedElement[]>) ? ComputedRef<string[]> : Ref<Plane<string>>;
declare function identify<B extends BindElement>(elementOrListOrPlane: B, options?: IdentifyOptions): Id<B>;

type ShowOptions<B extends BindElement> = {
    transition?: TransitionOption<B>;
};
type TransitionOption<B extends BindElement> = {
    appear?: TransitionCss | TransitionJs<B> | true;
    enter?: TransitionCss | TransitionJs<B>;
    leave?: TransitionCss | TransitionJs<B>;
};
type TransitionCss = {
    start?: () => void;
    from: string;
    active: string;
    to: string;
    end?: () => void;
    cancel?: () => void;
};
type TransitionJs<B extends BindElement> = {
    before?: B extends SupportedElement | Ref<SupportedElement> ? () => any : B extends SupportedElement[] | Ref<SupportedElement[]> ? (index: number) => any : (coordinates: Coordinates) => any;
    active?: B extends SupportedElement | Ref<SupportedElement> ? (done: () => void) => any : B extends SupportedElement[] | Ref<SupportedElement[]> ? (index: number, done: () => void) => any : (coordinates: Coordinates, done: () => void) => any;
    after?: B extends SupportedElement | Ref<SupportedElement> ? () => any : B extends SupportedElement[] | Ref<SupportedElement[]> ? (index: number) => any : (coordinates: Coordinates) => any;
    cancel?: B extends SupportedElement | Ref<SupportedElement> ? () => any : B extends SupportedElement[] | Ref<SupportedElement[]> ? (index: number) => any : (coordinates: Coordinates) => any;
};
declare function show<B extends BindElement>(elementOrListOrPlane: B, condition: BindValue<B, boolean> | BindReactiveValueGetter<B, boolean>, options?: ShowOptions<B>): void;
declare function defineTransition<B extends BindElement, TransitionType extends 'css' | 'js'>(transition: TransitionType extends 'css' ? TransitionCss : TransitionJs<B>): TransitionType extends "css" ? TransitionCss : TransitionJs<B>;

type ModelOptions<Value extends string | number | boolean, EventType extends ListenableSupportedType> = {
    key?: string;
    event?: EventType;
    toValue?: (event: ListenEffectParam<EventType>) => Value;
};
declare const checkboxOptions: ModelOptions<boolean, 'input'>;
declare function model<Value extends string | number | boolean = string, EventType extends ListenableSupportedType = 'input'>(element: BindElement, modelValue: Ref<Value>, options?: ModelOptions<Value, EventType>): void;

type ListenablesByType<Type extends ListenableSupportedType = ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>> = Record<Type, ShallowReactive<Listenable<Type, RecognizeableMetadata>>>;
type OnElement = Rendered<SupportedElement>;
type OnEffect<O extends OnElement, Type extends ListenableSupportedType = ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>> = ListenEffect<Type> | OnEffectConfig<O, Type, RecognizeableMetadata>;
type OnEffectConfig<O extends OnElement, Type extends ListenableSupportedType = ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>> = {
    createEffect: OnEffectCreator<O, Type, RecognizeableMetadata>;
    options?: {
        listenable?: ListenableOptions<Type, RecognizeableMetadata>;
        listen?: Type extends 'intersect' ? {
            observer?: Omit<ListenOptions<'intersect'>['observer'], 'root'> & {
                root?: ListenOptions<'intersect'>['observer']['root'] | Ref<ListenOptions<'intersect'>['observer']['root']>;
            };
        } : ListenOptions<Type>;
    };
};
type OnEffectCreator<O extends OnElement, Type extends ListenableSupportedType = ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>> = O extends Plane<SupportedElement> | Ref<Plane<SupportedElement>> ? (coordinates: Coordinates, api: {
    off: () => ShallowReactive<Listenable<Type, RecognizeableMetadata>>;
    listenable: ShallowReactive<Listenable<Type, RecognizeableMetadata>>;
}) => ListenEffect<Type> : O extends SupportedElement[] | Ref<SupportedElement[]> ? (index: number, api: {
    off: () => void;
    listenable: ShallowReactive<Listenable<Type, RecognizeableMetadata>>;
}) => ListenEffect<Type> : (api: {
    off: () => void;
    listenable: ShallowReactive<Listenable<Type, RecognizeableMetadata>>;
}) => ListenEffect<Type>;
declare function on<O extends OnElement, Type extends ListenableSupportedType = ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>>(elementOrListOrPlane: O, effects: {
    [type in Type]: OnEffect<O, type, RecognizeableMetadata>;
}): ListenablesByType<Type, RecognizeableMetadata>;
declare function defineRecognizeableEffect<O extends OnElement, Name extends keyof RecognizeableTypeByName>(elementOrListOrPlane: O, name: Name, effect: OnEffect<O, RecognizeableTypeByName[Name], RecognizeableMetadataByName[Name]>): {
    [type in RecognizeableTypeByName[Name]]: OnEffect<O, type, RecognizeableMetadataByName[Name]>;
};

type PopupControllerOptions = {
    has?: 'true' | 'false' | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid';
};
declare function popupController(element: SupportedElement | Ref<SupportedElement>, options?: PopupControllerOptions): void;

type VirtualFocusTargetOptions = {
    scrollIntoView?: ScrollIntoViewOptions;
};
declare function virtualFocusTarget(withFocusedElement: {
    focusedElement: Ref<SupportedElement>;
}, options?: VirtualFocusTargetOptions): void;

type Combobox = {
    textbox: Textbox;
    button: Button<true>;
    listbox: (Listbox<false, 'vertical'> & Omit<Popup, 'status' | 'toggle'> & {
        is: Listbox<false>['is'] & Popup['is'];
        popupStatus: Popup['status'];
        togglePopupStatus: Popup['toggle'];
    });
    complete: (...params: Parameters<Completeable['complete']>) => void;
};
type UseComboboxOptions = {
    textbox?: UseTextboxOptions;
    button?: UseButtonOptions<true>;
    listbox?: Omit<UseListboxOptions<false, true, 'vertical'>, 'clears' | 'disabledOptionsReceiveFocus' | 'initialSelected' | 'multiselectable' | 'orientation' | 'selectsOnFocus' | 'receivesFocus'>;
    popup?: UsePopupOptions;
    virtualFocusTarget?: VirtualFocusTargetOptions;
};
declare function useCombobox(options?: UseComboboxOptions): Combobox;

type Menu<Multiselectable extends boolean = true, O extends Orientation = 'vertical'> = {
    button: Button<false>;
    bar: (Menubar<Multiselectable, O> & Omit<Popup, 'status' | 'toggle'> & {
        is: Menubar['is'] & Popup['is'];
        popupStatus: Popup['status'];
        togglePopupStatus: Popup['toggle'];
    });
};
type UseMenuOptions<Multiselectable extends boolean = true, Clears extends boolean = true, O extends Orientation = 'vertical'> = {
    button?: Pick<UseButtonOptions<false>, 'press'>;
    bar?: Omit<UseMenubarOptions<Multiselectable, Clears, O>, 'visuallyPersists'>;
    popup?: Omit<UsePopupOptions, 'trapsFocus'>;
    focusesButtonAfterLeave?: boolean;
};
declare function useMenu<Multiselectable extends boolean = true, Clears extends boolean = true, O extends Orientation = 'vertical'>(options?: UseMenuOptions<Multiselectable, Clears, O>): Menu<Multiselectable, O>;

type Modal = {
    button: Button<false>;
    dialog: (Dialog & Omit<Popup, 'status'> & {
        popupStatus: Popup['status'];
    });
};
type UseModalOptions = {
    button?: Pick<UseButtonOptions, 'press'>;
    dialog?: UseDialogOptions;
    popup?: Omit<UsePopupOptions, 'has'>;
};
declare function useModal(options?: UseModalOptions): Modal;

type Select<Multiselectable extends boolean = false, O extends Orientation = 'vertical'> = {
    button: Button<false>;
    listbox: (Listbox<Multiselectable, O> & Omit<Popup, 'status' | 'toggle'> & {
        is: Listbox['is'] & Popup['is'];
        popupStatus: Popup['status'];
        togglePopupStatus: Popup['toggle'];
    });
};
type UseSelectOptions<Multiselectable extends boolean = false, Clears extends boolean = false, O extends Orientation = 'vertical'> = {
    button?: UseButtonOptions<false>;
    listbox?: UseListboxOptions<Multiselectable, Clears, O>;
    popup?: Omit<UsePopupOptions, 'trapsFocus'>;
    focusesButtonAfterLeave?: boolean;
};
declare function useSelect<Multiselectable extends boolean = false, Clears extends boolean = false, O extends Orientation = 'vertical'>(options?: UseSelectOptions<Multiselectable, Clears, O>): Select<Multiselectable, O>;

declare function useDocumentElement(): ElementApiBase<SupportedElement, Record<never, never>>;

declare function delegate(element?: Ref<SupportedElement>): {
    hover: void;
    press: void;
};

declare function useSupportsCss(css: Parameters<typeof CSS['supports']>[0]): vue.Ref<boolean, boolean>;

type CreateComponentRefOptions = {
    refName?: string;
};
declare function createComponentRef(fn: (el: SupportedElement) => void, options?: CreateComponentRefOptions): (component: Component) => void;

declare function createMultiRef(...fns: ((el: SupportedElement, refs?: Record<string, any>) => void)[]): (el: SupportedElement, refs?: Record<string, any>) => void;

declare function createMaybeComponentRef(fn: (el: SupportedElement) => void, options?: CreateComponentRefOptions): (component: Component | SupportedElement) => void;

export { type Ability, type BindElement, type BindReactiveValueGetter, type BindValue, type BindValueGetter, type Button, type ButtonStorage, type Checkbox, type ClosingCompletion, type Combobox, type Conditional, type Dialog, type ElementApi, type Focus, type FocusStatus, type FocusTarget, type FocusVisibility, type Grid, type Head, type Hover, type HoverDescriptor, type Id, type IdentifyOptions, type Intersection, type Link, type ListApi, type Listbox, type MarkdownCompletion, type Menu, type Menubar, type Modal, type ModelOptions, type OnEffect, type OnEffectConfig, type OnEffectCreator, type OnElement, type Orientation, Plane, type PlaneApi, type Popup, type Press, type PressDescriptor, type PressStatus, type Select, type Separator, type ShowOptions, type Size, type SupportedElement, type Tablist, type TablistStorage, type Targetability, type Textbox, type TextboxStorage, type TransitionCss, type TransitionJs, type TransitionOption, type UseButtonOptions, type UseButtonStorageOptions, type UseCheckboxOptions, type UseClosingCompletionOptions, type UseComboboxOptions, type UseConditionalOptions, type UseDialogOptions, type UseElementApiOptions, type UseGridOptions, type UseHeadOptions, type UseHoverOptions, type UseIntersectionOptions, type UseLinkOptions, type UseListApiOptions, type UseListboxOptions, type UseMenuOptions, type UseMenubarOptions, type UseModalOptions, type UsePlaneApiOptions, type UsePopupOptions, type UsePressOptions, type UseSelectOptions, type UseSeparatorOptions, type UseSizeOptions, type UseTablistOptions, type UseTablistStorageOptions, type UseTextboxOptions, type UseTextboxStorageOptions, type Validity, type VirtualFocusTargetOptions, bind, checkboxOptions as checkboxModelOptions, createComponentRef, createCoordinates, createCoordinatesEqual, createMaybeComponentRef, createMultiRef, defineRecognizeableEffect, defineTransition, delegate, delegateHover, delegatePress, identify, manageScrollAllowance, model, on, popupController, show, useBody, useButton, useButtonStorage, useCheckbox, useClosingCompletion, useCombobox, useConditional, useDialog, useDocumentElement, useElementApi, useFocus, useGrid, useHead, useHover, useIntersection, useLink, useListApi, useListbox, useMarkdownCompletion, useMenu, useMenubar, useModal, usePlaneApi, usePopup, usePress, useSelect, useSeparator, useSize, useSupportsCss, useTablist, useTablistStorage, useTextbox, useTextboxStorage, virtualFocusTarget };
