/** * Spring physics configuration for Motion One animations. * * Motion One uses a simplified spring API based on visual perception: * - `visualDuration`: Expected animation duration in seconds * - `bounce`: Amount of bounciness (0 = no bounce, 1 = very bouncy) * * @packageDocumentation */ /** * Spring configuration for Motion One. * * **Note:** visualDuration is in SECONDS, not milliseconds! * * **Tuning Guidelines:** * - **Snappy UI** (buttons, alerts): duration 0.3s, bounce 0.2 * - **Smooth transitions** (modals): duration 0.35s, bounce 0.25 * - **Soft elements** (sheets, drawers): duration 0.4s, bounce 0.3 * - **No overshoot**: bounce 0.0 * - **Playful bounce**: bounce 0.4-0.6 * * @example * ```typescript * //Snappy button animation * const config: SpringConfig = { * visualDuration: 0.3, * bounce: 0.2 * }; * * // Smooth modal without bounce * const modalConfig: SpringConfig = { * visualDuration: 0.35, * bounce: 0 * }; * ``` */ export interface SpringConfig { /** * Visual duration in seconds (not milliseconds!). * Range: 0.1 - 2.0 (typical) */ visualDuration?: number; /** * Bounce factor (0 = no bounce, 1 = very bouncy). * Range: 0 - 1.0 */ bounce?: number; } /** * Preset spring configurations for common UI components. */ export declare const springPresets: { /** Modal: Snappy and responsive */ readonly modal: Required; /** Sheet: Softer for larger elements */ readonly sheet: Required; /** Drawer: Smooth and polished */ readonly drawer: Required; /** Alert: Very snappy */ readonly alert: Required; /** Toast: Bouncy entrance with smooth exit */ readonly toast: Required; /** Dropdown: Fast and snappy */ readonly dropdown: Required; /** Popover: Similar to dropdown but slightly softer */ readonly popover: Required; /** Tooltip: Very fast, minimal bounce */ readonly tooltip: Required; /** Button: Quick press effect with playful bounce */ readonly button: Required; /** List item: Smooth add/remove animations */ readonly listItem: Required; /** Collapse: Slightly longer for height animations */ readonly collapse: Required; }; export declare const SPRING_PRESETS: { /** Modal: Snappy and responsive */ readonly modal: Required; /** Sheet: Softer for larger elements */ readonly sheet: Required; /** Drawer: Smooth and polished */ readonly drawer: Required; /** Alert: Very snappy */ readonly alert: Required; /** Toast: Bouncy entrance with smooth exit */ readonly toast: Required; /** Dropdown: Fast and snappy */ readonly dropdown: Required; /** Popover: Similar to dropdown but slightly softer */ readonly popover: Required; /** Tooltip: Very fast, minimal bounce */ readonly tooltip: Required; /** Button: Quick press effect with playful bounce */ readonly button: Required; /** List item: Smooth add/remove animations */ readonly listItem: Required; /** Collapse: Slightly longer for height animations */ readonly collapse: Required; }; /** * Merge spring configurations. * Always returns a complete config with all required properties. */ export declare function mergeSpringConfig(base: Required, overrides?: Partial): Required; //# sourceMappingURL=spring-config.d.ts.map