/** * Common Types and Utilities * Shared type definitions used across the AuraGlass design system */ /** * 2D Vector representation for position, velocity, and force calculations */ export interface Vector2D { x: number; y: number; } /** * Unsubscribe function type for event listeners and subscriptions * @returns void or Promise for cleanup operations */ export type UnsubscribeFunction = () => void | Promise; /** * Generic callback function type */ export type CallbackFunction = () => T; /** * Event handler type with generic event parameter */ export type EventHandler = (event: T) => void; /** * Async callback function type */ export type AsyncCallback = () => Promise; /** * Subscription object with unsubscribe method */ export interface Subscription { unsubscribe: UnsubscribeFunction; } /** * Creates a subscription object from an unsubscribe function */ export declare const createSubscription: (unsubscribe: UnsubscribeFunction) => Subscription; /** * Utility to create a 2D vector */ export declare const createVector2D: (x?: number, y?: number) => Vector2D; /** * Add two vectors */ export declare const addVectors: (v1: Vector2D, v2: Vector2D) => Vector2D; /** * Subtract two vectors */ export declare const subtractVectors: (v1: Vector2D, v2: Vector2D) => Vector2D; /** * Multiply vector by scalar */ export declare const multiplyVector: (v: Vector2D, scalar: number) => Vector2D; /** * Calculate magnitude of a vector */ export declare const vectorMagnitude: (v: Vector2D) => number; /** * Normalize a vector */ export declare const normalizeVector: (v: Vector2D) => Vector2D; /** * Calculate distance between two vectors */ export declare const vectorDistance: (v1: Vector2D, v2: Vector2D) => number; //# sourceMappingURL=common.d.ts.map