UNPKG

rune-scroller

Version:

Lightweight, high-performance scroll animations for Svelte 5. ~2KB bundle, zero dependencies.

24 lines (23 loc) 1.13 kB
import type { AnimationType } from './animations'; /** * Set CSS custom properties on an element * @param element - Target DOM element * @param duration - Animation duration in milliseconds * @param delay - Animation delay in milliseconds */ export declare function setCSSVariables(element: HTMLElement, duration?: number, delay?: number): void; /** * Setup animation element with required classes and attributes * @param element - Target DOM element * @param animation - Animation type to apply */ export declare function setupAnimationElement(element: HTMLElement, animation: AnimationType): void; /** * Create sentinel element for observer-based triggering * Positioned absolutely relative to element (no layout impact) * @param element - Reference element (used to position sentinel) * @param debug - If true, shows the sentinel as a visible line for debugging * @param offset - Offset in pixels from element bottom (default: 0, negative = above element) * @returns The created sentinel element */ export declare function createSentinel(element: HTMLElement, debug?: boolean, offset?: number): HTMLElement;