import { AuthConfig, CacheConfig, ConfigChangeEvent, ConfigPath, DeepReadonly, FeatureFlagsConfig, LayoutsConfig, LibraryConfig, MonitoringConfig, NetworkConfig, UIConfig, VDOMConfig } from '../types'; import { getRuntimeConfigManager } from '../runtime/RuntimeConfigManager'; /** * Hook to access the complete library configuration. * * Re-renders when any configuration value changes. * * @returns The complete library configuration object * * @example * ```tsx * function MyComponent() { * const config = useLibConfig(); * return
Timeout: {config.network.defaultTimeout}ms
; * } * ``` */ export declare function useLibConfig(): DeepReadonly; /** * Hook to access network configuration. */ export declare function useNetworkConfig(): DeepReadonly; /** * Hook to access cache configuration. */ export declare function useCacheConfig(): DeepReadonly; /** * Hook to access feature flags configuration. */ export declare function useFlagsConfig(): DeepReadonly; /** * Hook to access authentication configuration. */ export declare function useAuthConfig(): DeepReadonly; /** * Hook to access layouts configuration. */ export declare function useLayoutsConfig(): DeepReadonly; /** * Hook to access VDOM configuration. */ export declare function useVDOMConfig(): DeepReadonly; /** * Hook to access UI configuration. */ export declare function useUIConfig(): DeepReadonly; /** * Hook to access monitoring configuration. */ export declare function useMonitoringConfig(): DeepReadonly; /** * Hook to access a specific configuration value by path. * * Only re-renders when the specific path changes. * * @param path - Dot-notation path to the config value * @param defaultValue - Default value if path doesn't exist * * @example * ```tsx * function MyComponent() { * const timeout = useLibConfigValue('network.defaultTimeout', 30000); * return
Timeout: {timeout}ms
; * } * ``` */ export declare function useLibConfigValue(path: ConfigPath, defaultValue?: T): T; /** * Hook to access and set a configuration value. * * Returns a tuple of [value, setValue]. * * @param path - Dot-notation path to the config value * @param defaultValue - Default value if path doesn't exist * * @example * ```tsx * function SettingsPanel() { * const [timeout, setTimeout] = useLibConfigState('network.defaultTimeout', 30000); * * return ( * setTimeout(Number(e.target.value))} * /> * ); * } * ``` */ export declare function useLibConfigState(path: ConfigPath, defaultValue?: T): [T, (value: T) => void]; /** * Hook to access runtime configuration manager. * * @example * ```tsx * function ConfigManager() { * const runtime = useRuntimeConfig(); * * const handleRollback = () => { * runtime.rollback(); * }; * * return ; * } * ``` */ export declare function useRuntimeConfig(): { manager: ReturnType; set: (path: ConfigPath, value: unknown) => void; rollback: () => boolean; createSnapshot: (reason?: string) => void; enablePersistence: (storageKey?: string) => void; disablePersistence: () => void; }; /** * Hook to track configuration changes. * * @param onChangeCallback - Callback to invoke when config changes * * @example * ```tsx * function ConfigWatcher() { * useConfigChangeTracking((event) => { * console.log(`${event.path} changed from ${event.previousValue} to ${event.newValue}`); * }); * * return null; * } * ``` */ export declare function useConfigChangeTracking(onChangeCallback: (event: ConfigChangeEvent) => void): void; /** * Hook to get the last configuration change. */ export declare function useLastConfigChange(): ConfigChangeEvent | null; /** * Hook to select and transform configuration values. * * @param selector - Function to select/transform config * * @example * ```tsx * function MyComponent() { * const timeouts = useLibConfigSelector((config) => ({ * default: config.network.defaultTimeout, * long: config.network.longTimeout, * short: config.network.shortTimeout, * })); * * return
Default timeout: {timeouts.default}ms
; * } * ``` */ export declare function useLibConfigSelector(selector: (config: DeepReadonly) => T): T; /** * Hook to check if a configuration path exists. */ export declare function useLibConfigExists(path: ConfigPath): boolean; /** * Hook to get all configuration paths. */ export declare function useLibConfigPaths(): string[]; /** * Hook to get the configuration environment. */ export declare function useLibConfigEnvironment(): string;