UNPKG

@blossom-carousel/svelte

Version:

A native-scroll-first carousel component for Svelte.

16 lines (15 loc) 699 B
export declare const COMMANDS: { readonly prev: "--blossom-prev"; readonly next: "--blossom-next"; readonly gotoPrefix: "--blossom-goto-"; }; /** * Attaches a single `command` listener to a scroller that handles the Blossom * navigation commands using native scroll APIs only (no Blossom instance). * * The native `command` event does not bubble, so the listener must live on the * target element itself. Registration is idempotent and ref-counted so multiple * controls pointing at the same scroller share one handler; the returned cleanup * detaches the handler once the last control releases it. */ export declare function registerCommands(scroller: HTMLElement): () => void;