import type { Readable } from 'svelte/store'; import type { PagiflowInstance, PagiflowOptions } from './types'; export interface PagiflowState { instance: PagiflowInstance | null; currentIndex: number; } export interface PagiflowController extends Readable { /** Svelte action — attach with `use:slider.action` on the track element */ action(node: HTMLElement): { destroy(): void; }; /** Go to next slide */ next(): void; /** Go to previous slide */ prev(): void; /** Go to a specific slide */ goTo(index: number, opts?: { silent?: boolean; instant?: boolean; }): void; /** Start autoplay */ play(): void; /** Pause autoplay */ pause(): void; /** Toggle play / pause */ togglePlayPause(): void; /** Update options (optionally rebuild) */ setOptions(opts: Partial, rebuild?: boolean): void; /** Destroy and reinitialise */ reInit(opts?: Partial): void; } /** * Creates a reactive Pagiflow controller. * * @example * ```svelte * * *
*
Slide 1
*
Slide 2
*
* * * * ``` */ export declare function createPagiflow(options?: PagiflowOptions): PagiflowController;