saltfish
Version:
An interactive video-guided tour system for web applications
29 lines • 1.34 kB
TypeScript
import type { SaltfishStore, PlaylistManifest, Step } from '../types';
/**
* Creates the Saltfish playlist Player store with Zustand and Immer
* Using vanilla store to avoid React hooks
*/
export declare const saltfishStore: Omit<import("zustand/vanilla").StoreApi<SaltfishStore>, "setState"> & {
setState(nextStateOrUpdater: SaltfishStore | Partial<SaltfishStore> | ((state: import("immer").WritableDraft<SaltfishStore>) => void), shouldReplace?: boolean | undefined): void;
};
type StoreAdapter = {
getState: () => SaltfishStore;
setState: typeof saltfishStore.setState;
subscribe: typeof saltfishStore.subscribe;
destroy: typeof saltfishStore.destroy;
};
export declare const useSaltfishStore: StoreAdapter;
/**
* Gets the current step directly from the store state
* This is a regular function that can be used in non-React environments
*/
export declare const getCurrentStep: () => Step | null;
/**
* Determines if a step should be considered as the "final" step for completion purposes
* A step is considered final if:
* 1. It has external URL buttons (which end the playlist flow)
* 2. OR it's the actual last step in the sequence with no further progression
*/
export declare const isStepEffectivelyFinal: (step: Step, manifest: PlaylistManifest) => boolean;
export {};
//# sourceMappingURL=store.d.ts.map