export type { VisibilityDetectionHook } from "../hooks/use-visibility-detection"; export type StorageSetterFunction = ( value: TValue | undefined ) => TValue; export type StorageValueWatcher = (value: TValue | undefined) => void; export interface Storage { get: (key: string) => Promise; set: (key: string, setter: StorageSetterFunction) => Promise; delete: (key: string) => Promise; /** * Listener is called immediatelly after subscription so you get current value */ watch: (key: string, listener: StorageValueWatcher) => () => void; } export interface FrameContextManager { frameContext: TFrameContext; setFrameContext: (frameContext: TFrameContext) => Promise; resetFrameContext: () => Promise; }