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 from the latest pointer event, before smoothing is applied. */ pointer: MousePosition; /** The current goal position that the core loop is driving toward. */ target: MousePosition; /** The smoothed/interpolated position used for rendering. */ smooth: MousePosition; /** The current movement vector derived from the smoothed state. */ velocity: MousePosition; /** The current movement angle in degrees, derived 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 runtime has temporarily restored the native cursor due to native-input heuristics. */ 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; /** * Sets the native cursor visibility. * * @param mode */ setNativeCursor(mode: "hide" | "show" | "auto"): void; private init; enable(): void; disable(): void; /** * Registers a new plugin. * * @param plugin - The plugin object to install. */ use(plugin: SupermousePlugin): this; private reset; private startLoop; /** * Starts the animation loop. This is automatically called if `autoStart` is true. * Plugins can call this method to resume the loop if it has been stopped. */ start(): void; /** * 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. * - `'auto'`: Checks both HTML tags and CSS cursor styles (Accurate but slower). * - `'tag'`: Checks only semantic tags like ,