/** * Rynex Context & State Management Utilities * Provides context API similar to React's Context and global store management */ /** * Create a context * Returns a unique key for the context */ export declare function createContext(defaultValue?: T): { key: symbol; Provider: (props: { value: T; children: HTMLElement; }) => HTMLElement; defaultValue?: T; }; /** * Use context value * Retrieves the nearest context value from the context stack */ export declare function useContext(context: { key: symbol; defaultValue?: T; }): T; /** * Provider component - wraps children with context value * This is a generic provider that can be used with any context */ export declare function provider(contextKey: symbol, value: T, children: HTMLElement): HTMLElement; /** * Create a global store * Returns a reactive store with actions */ export declare function createStore>(name: string, initialState: T, actions?: (state: T) => A): { state: T; actions: A; subscribe: (listener: () => void) => () => void; getState: () => T; }; /** * Use store hook * Retrieves a store by name and optionally subscribes to updates */ export declare function useStore>(name: string): { state: T; actions: A; subscribe: (listener: () => void) => () => void; getState: () => T; } | null; /** * Get all registered stores */ export declare function getStores(): string[]; /** * Remove a store from registry */ export declare function removeStore(name: string): boolean; /** * Clear all stores */ export declare function clearStores(): void; //# sourceMappingURL=context.d.ts.map