@ssgoi/svelte
Version:
Svelte bindings for SSGOI - Native app-like page transitions for Svelte and SvelteKit applications
18 lines (17 loc) • 605 B
TypeScript
import { type Transition, type TransitionKey, type TransitionScope } from "@ssgoi/core";
type TransitionParams = Transition<undefined> & {
key: TransitionKey;
scope?: TransitionScope;
};
/**
* Svelte action for element transitions
*
* Uses Svelte's destroy callback for OUT transition detection.
* This ensures the correct transition config is used even when
* params are updated (e.g., during SvelteKit page navigation).
*/
export declare const transition: (node: HTMLElement, params: TransitionParams) => {
update(newParams: TransitionParams): void;
destroy(): void;
};
export {};