/** * @jucie.io/state - State management module */ export interface StateValue { get(path: string[]): any; set(path: string[], value: any): void; update(path: string[], fn: (value: any) => any): void; delete(path: string[]): void; keys(path?: string[]): string[]; has(path: string[]): boolean; subscribe(path: string[], callback: (value: any) => void): () => void; unsubscribe(path: string[], callback: (value: any) => void): void; } export interface StateExport { exportState(path?: string[]): any; importState(data: any, path?: string[]): void; clearState(path?: string[]): void; } export declare class State { static create(config?: any): State; static createStateExport(config?: any): StateExport; get(path: string[]): any; set(path: string[], value: any): void; update(path: string[], fn: (value: any) => any): void; delete(path: string[]): void; keys(path?: string[]): string[]; has(path: string[]): boolean; subscribe(path: string[], callback: (value: any) => void): () => void; unsubscribe(path: string[], callback: (value: any) => void): void; } // Global state utilities export declare function provideState(state: State): void; export declare function hasState(): boolean; export declare function createState(config?: any): State; export declare function createStateExport(config?: any): StateExport; export declare function useState(path: string[]): any; export declare function forceState(path: string[], value: any): void; export declare function clearState(path: string[]): void;