///
import type { ActionReturn } from 'svelte/action';
import type { LongPressEvent as ILongPressEvent, LongPressHandlers } from './events.js';
import type { PointerType } from '../../types/index.js';
import { type PressEvent } from '../press/index.js';
import { type Writable } from 'svelte/store';
export type LongPressConfig = LongPressHandlers & {
/**
* Whether the long press events should be disabled
*/
isDisabled?: boolean;
/**
* The amount of time (in milliseconds) to wait before
* triggering a long press event.
*/
threshold?: number;
/**
* A description for assistive techology users indicating that a
* long press action is available, e.g. "Long press to open menu".
*/
accessibilityDescription?: string;
};
declare class LongPressEvent implements ILongPressEvent {
#private;
type: ILongPressEvent['type'];
pointerType: PointerType;
target: Element;
shiftKey: boolean;
ctrlKey: boolean;
metaKey: boolean;
altKey: boolean;
constructor(type: ILongPressEvent['type'], pointerType: PointerType, pressEvent: Omit & {
type: ILongPressEvent['type'];
});
get shouldStopPropagation(): boolean;
}
type LongPressActionReturn = ActionReturn) => void;
'on:longpressstart'?: (e: CustomEvent) => void;
'on:longpressend'?: (e: CustomEvent) => void;
}>;
export type LongPressResult = {
/**
* A Svelte action which handles applying the event listeners
* and dispatching events to the element
*/
longPressAction: (node: HTMLElement | SVGElement) => LongPressActionReturn;
/**
* A writable store to manage the accessible description for the long
* press action. It's initially populated with the value passed to the
* `accessibilityDescription` config option, but can be updated at any
* time by calling `description.set()`, and the new description will
* reflect in the DOM.
*/
accessibilityDescription: Writable;
};
/**
* Handles long press interactions across mouse and touch devices.
* Supports a customizable time threshold,accessibility description,
* and normalizes behavior across browsers and devices.
*/
export declare function createLongPress(config?: LongPressConfig): LongPressResult;
export {};