import { default as React, ReactNode } from 'react'; import { SecurityConfiguration, SecurityContextValue, SecurityEvent, SecurityViolation } from './types'; /** * Security context for React components */ /** * Security Provider props */ export interface SecurityProviderProps { /** Child components */ children: ReactNode; /** Override default configuration */ config?: Partial; /** Encryption key for secure storage (auto-generated if not provided) */ encryptionKey?: string; /** Callback when security is initialized */ onInitialized?: () => void; /** Callback for security events */ onSecurityEvent?: (event: SecurityEvent) => void; /** Callback for security violations */ onViolation?: (violation: SecurityViolation) => void; /** Skip initialization (for testing) */ skipInitialization?: boolean; } /** * Security Provider component * * Provides global security context to the application including: * - CSP nonce management * - CSRF token management * - Secure storage access * - Violation tracking and reporting * * @example * ```tsx * // Basic usage * function App() { * return ( * * * * ); * } * * // With configuration * function App() { * return ( * analytics.track('security_violation', v)} * > * * * ); * } * ``` */ export declare function SecurityProvider({ children, config: configOverride, encryptionKey: providedEncryptionKey, onInitialized, onSecurityEvent, onViolation, skipInitialization, }: SecurityProviderProps): React.ReactElement; /** * Higher-order component that provides security context * * @example * ```tsx * const SecureApp = withSecurityProvider(App); * * // Or with config * const SecureApp = withSecurityProvider(App, { * config: { reportToServer: true }, * }); * ``` */ export declare function withSecurityProvider

(Component: React.ComponentType

, providerProps?: Omit): React.FC

; /** * Render props component for security context * * @example * ```tsx * function App() { * return ( * * {(security) => ( *

*

CSRF Token: {security.csrfToken}

*

CSP Nonce: {security.cspNonce}

*
* )} * * ); * } * ``` */ export declare function SecurityConsumer({ children, }: { children: (security: SecurityContextValue) => ReactNode; }): React.ReactElement | null;