export declare const DEFAULT_HOVER_SELECTORS: string[]; /* Excluded from this release type: Input */ /** * The Interface for interaction state. * Plugins should use Module Augmentation to add their specific properties to this interface. * * @example * declare module '@supermousejs/core' { * interface InteractionState { * magnetic: boolean | number; * text: string; * } * } */ export declare interface InteractionState { /** * Allow arbitrary keys for rapid prototyping. * For type safety, use module augmentation to define expected keys. */ [key: string]: any; } export declare interface MousePosition { x: number; y: number; } export declare interface MouseState { /** The raw position of the input pointer (mouse/touch). */ pointer: MousePosition; /** The target position the cursor logic wants to reach. */ target: MousePosition; /** The smoothed/interpolated position used for rendering. */ smooth: MousePosition; /** The current velocity vector of the smooth position. */ velocity: MousePosition; /** The angle of movement in degrees. Calculated from velocity. */ angle: number; /** Whether the pointer is currently pressed down. */ isDown: boolean; /** Whether the pointer is currently hovering over a registered interactive element. */ isHover: boolean; /** Whether the native cursor is currently forced visible by internal logic (e.g. input elements). */ isNative: boolean; /** * If set, this overrides all auto-detection logic. * 'auto' = Force Native Cursor (Show) * 'none' = Force Custom Cursor (Hide Native) * null = Let the Core decide based on isNative/isHover */ forcedCursor: "auto" | "none" | null; /** The DOM element currently being hovered, if any. */ hoverTarget: HTMLElement | null; /** Whether the user has `prefers-reduced-motion` enabled. */ reducedMotion: boolean; /** Whether the system has received valid input coordinates at least once. */ hasReceivedInput: boolean; /** Defines a specific geometric shape the cursor should conform to. */ shape: ShapeState | null; /** Centralized store for hover metadata from data attributes. */ interaction: InteractionState; } export declare type NativeIgnoreStrategy = "auto" | "tag" | "css"; export declare interface ShapeState { width: number; height: number; borderRadius: number; } /* Excluded from this release type: Stage */ /** * Supermouse Runtime Loop * * This class orchestrates the application state, manages the animation loop, * and coordinates data flow between the internal systems, and the plugins. * * @default */ export declare class Supermouse { static readonly version: string; readonly version: string; state: MouseState; /** * Configuration options. */ options: SupermouseOptions; private plugins; private stage; private input; private rafId; private lastTime; private isRunning; private hoverSelectors; /** * Creates a new Supermouse instance. * * @param options - Global configuration options. * @throws Will throw if running in a non-browser environment (window/document undefined). */ constructor(options?: SupermouseOptions); /** * Retrieves a registered plugin instance by its unique name. */ getPlugin(name: string): SupermousePlugin | undefined; /** * Returns whether the cursor system is currently enabled (processing input). */ get isEnabled(): boolean; /** * Enables a specific plugin by name. * Triggers the `onEnable` lifecycle hook of the plugin. */ enablePlugin(name: string): void; /** * Disables a specific plugin by name. * Triggers the `onDisable` lifecycle hook. */ disablePlugin(name: string): void; /** * Toggles the enabled state of a plugin. */ togglePlugin(name: string): void; registerHoverTarget(selector: string): void; /** * The fixed container element where plugins should append their DOM nodes. */ get container(): HTMLDivElement; /** * Manually override the native cursor visibility. * * @param type 'auto' (Show Native), 'none' (Hide Native), or null (Resume Auto-detection) */ setCursor(type: "auto" | "none" | null): void; private init; enable(): void; disable(): void; /** * Registers a new plugin. * * @param plugin - The plugin object to install. */ use(plugin: SupermousePlugin): this; private resetCoords; private resetPosition; private startLoop; /** * Manually steps the animation loop. * * @param time Current timestamp in milliseconds. */ step(time: number): void; private runPluginSafe; /** * Runs on every animation frame. */ private tick; /** * Destroys the instance. */ destroy(): void; } /** * Configuration options passed to the Supermouse constructor. */ export declare interface SupermouseOptions { /** * The interpolation factor (0 to 1). Lower is smoother/slower. * @default 0.15 */ smoothness?: number; /** * List of CSS selectors that trigger the "Hover" state. * Overrides the default set if provided. */ hoverSelectors?: string[]; /** * Whether to enable custom cursor effects on touch devices. * @default false */ enableTouch?: boolean; /** * Whether to automatically disable the custom cursor on devices with coarse pointers. * @default true */ autoDisableOnMobile?: boolean; /** * Strategy for detecting when to fallback to the native cursor. * - `true` / `'auto'`: Checks both HTML tags and CSS cursor styles (Accurate but slower). * - `'tag'`: Checks only semantic tags like ,