import { ReactNode, ComponentType, ErrorInfo, RefObject } from 'react'; /** * Branded type for unique module identifiers. * Prevents accidental mixing of module IDs with regular strings. */ export type ModuleId = string & { readonly __brand: 'ModuleId'; }; /** * Branded type for virtual node identifiers. */ export type VNodeId = string & { readonly __brand: 'VNodeId'; }; /** * Branded type for security nonces. */ export type SecurityNonce = string & { readonly __brand: 'SecurityNonce'; }; /** * Type-safe event name with module namespace. */ export type ModuleEventName = `module:${T}`; /** * Deep readonly utility type. */ export type DeepReadonly = T extends (infer R)[] ? ReadonlyArray> : T extends object ? { readonly [K in keyof T]: DeepReadonly; } : T; /** * Optional properties utility. */ export type Optional = Omit & Partial>; /** * Virtual node types enumeration. * Represents different categories of virtual DOM nodes. */ export declare const VNodeType: { readonly ELEMENT: "element"; readonly TEXT: "text"; readonly COMMENT: "comment"; readonly FRAGMENT: "fragment"; readonly COMPONENT: "component"; readonly PORTAL: "portal"; readonly SUSPENSE: "suspense"; readonly MODULE_BOUNDARY: "module_boundary"; }; /** * Virtual node properties interface. * Represents attributes and event handlers on virtual elements. */ export interface VNodeProps { /** CSS class names */ readonly className?: string; /** Inline styles */ readonly style?: Readonly>; /** Data attributes */ readonly data?: Readonly>; /** ARIA attributes */ readonly aria?: Readonly>; /** Event handlers (keys are event names without 'on' prefix) */ readonly events?: Readonly>; /** Custom attributes */ readonly attributes?: Readonly>; /** Key for reconciliation */ readonly key?: string | number; /** Ref callback or ref object */ readonly ref?: ((el: Element | null) => void) | { current: Element | null; }; } /** * Core virtual node interface. * Represents a node in the virtual DOM tree. */ export interface VirtualNode { /** Unique identifier for this virtual node */ readonly id: VNodeId; /** Type of virtual node */ readonly type: VNodeType; /** Tag name for element nodes, component name for component nodes */ readonly tag: string | ComponentType; /** Node properties */ readonly props: VNodeProps; /** Child virtual nodes */ readonly children: ReadonlyArray; /** Parent node reference (null for root) */ parent: VirtualNode | null; /** Associated real DOM element (null before mounting) */ element: Element | Text | null; /** Module boundary this node belongs to */ readonly moduleId: ModuleId | null; /** Hydration state for SSR */ hydrationState: HydrationState; /** Pool generation for garbage collection */ poolGeneration: number; /** Whether this node is currently pooled */ isPooled: boolean; /** Timestamp of last update */ lastUpdated: number; } /** * Virtual node creation options. */ export interface VNodeCreateOptions { /** Parent module ID */ moduleId?: ModuleId; /** Initial hydration state */ hydrationState?: HydrationState; /** Key for reconciliation */ key?: string | number; } /** * Module lifecycle states. * Represents the current state of a module in its lifecycle. */ export declare const ModuleLifecycleState: { /** Module is registered but not yet initialized */ readonly REGISTERED: "registered"; /** Module is currently being initialized */ readonly INITIALIZING: "initializing"; /** Module has been initialized but not mounted */ readonly INITIALIZED: "initialized"; /** Module is currently mounting */ readonly MOUNTING: "mounting"; /** Module is fully mounted and active */ readonly MOUNTED: "mounted"; /** Module is in suspended state (lazy) */ readonly SUSPENDED: "suspended"; /** Module is currently unmounting */ readonly UNMOUNTING: "unmounting"; /** Module has been unmounted */ readonly UNMOUNTED: "unmounted"; /** Module encountered an error */ readonly ERROR: "error"; /** Module has been disposed */ readonly DISPOSED: "disposed"; }; /** * Module lifecycle event types. */ export declare const ModuleLifecycleEvent: { readonly BEFORE_INIT: "beforeInit"; readonly AFTER_INIT: "afterInit"; readonly BEFORE_MOUNT: "beforeMount"; readonly AFTER_MOUNT: "afterMount"; readonly BEFORE_UPDATE: "beforeUpdate"; readonly AFTER_UPDATE: "afterUpdate"; readonly BEFORE_UNMOUNT: "beforeUnmount"; readonly AFTER_UNMOUNT: "afterUnmount"; readonly ERROR: "error"; readonly DISPOSE: "dispose"; }; /** * Lifecycle hook callback type. */ export type LifecycleHook = () => T | Promise; /** * Module lifecycle hooks configuration. */ export interface ModuleLifecycleHooks { /** Called before module initialization */ readonly onBeforeInit?: LifecycleHook; /** Called after module initialization */ readonly onAfterInit?: LifecycleHook; /** Called before module mounts */ readonly onBeforeMount?: LifecycleHook; /** Called after module mounts */ readonly onAfterMount?: LifecycleHook; /** Called before module updates */ readonly onBeforeUpdate?: LifecycleHook; /** Called after module updates */ readonly onAfterUpdate?: LifecycleHook; /** Called before module unmounts */ readonly onBeforeUnmount?: LifecycleHook; /** Called after module unmounts */ readonly onAfterUnmount?: LifecycleHook; /** Called when module encounters an error */ readonly onError?: (error: Error, errorInfo?: ErrorInfo) => void; /** Called when module is being disposed */ readonly onDispose?: LifecycleHook; } /** * Hydration states for SSR support. */ export declare const HydrationState: { /** Not yet hydrated (server-rendered HTML) */ readonly DEHYDRATED: "dehydrated"; /** Hydration is pending/scheduled */ readonly PENDING: "pending"; /** Currently hydrating */ readonly HYDRATING: "hydrating"; /** Fully hydrated and interactive */ readonly HYDRATED: "hydrated"; /** Hydration skipped (client-only) */ readonly SKIPPED: "skipped"; /** Hydration failed */ readonly FAILED: "failed"; }; /** * Hydration priority levels. * Lower numbers indicate higher priority. */ export declare const HydrationPriority: { /** Critical - hydrate immediately (above fold, interactive) */ readonly CRITICAL: 1; /** High - hydrate soon (visible, may be interacted with) */ readonly HIGH: 2; /** Normal - standard hydration priority */ readonly NORMAL: 3; /** Low - hydrate when idle (below fold) */ readonly LOW: 4; /** Deferred - hydrate only when needed */ readonly DEFERRED: 5; }; /** * Hydration trigger types. */ export declare const HydrationTrigger: { /** Hydrate immediately on load */ readonly IMMEDIATE: "immediate"; /** Hydrate when element becomes visible */ readonly VISIBLE: "visible"; /** Hydrate during idle time */ readonly IDLE: "idle"; /** Hydrate on user interaction */ readonly INTERACTION: "interaction"; /** Hydrate only when explicitly triggered */ readonly MANUAL: "manual"; }; /** * Hydration configuration for a module. */ export interface HydrationConfig { /** Hydration priority level */ readonly priority: HydrationPriority; /** What triggers hydration */ readonly trigger: HydrationTrigger; /** Timeout before fallback (ms) */ readonly timeout?: number; /** Root margin for visibility trigger */ readonly rootMargin?: string; /** Visibility threshold (0-1) */ readonly threshold?: number; /** Whether to hydrate children independently */ readonly independentChildren?: boolean; /** Callback when hydration starts */ readonly onHydrationStart?: () => void; /** Callback when hydration completes */ readonly onHydrationComplete?: () => void; /** Callback when hydration fails */ readonly onHydrationError?: (error: Error) => void; } /** * Hydration data passed from server. */ export interface HydrationData { /** Unique identifier */ readonly id: string; /** Module ID this data belongs to */ readonly moduleId: ModuleId; /** Serialized state */ readonly state: unknown; /** Timestamp when data was created */ readonly timestamp: number; /** Checksum for integrity verification */ readonly checksum: string; /** Whether data has been sanitized */ readonly sanitized: boolean; } /** * Module dependency type. */ export interface ModuleDependency { /** ID of the dependency module */ readonly moduleId: ModuleId; /** Whether this dependency is required */ readonly required: boolean; /** Minimum version if versioned */ readonly minVersion?: string; /** Whether to load lazily */ readonly lazy?: boolean; } /** * Slot definition for module composition. */ export interface ModuleSlotDefinition { /** Unique slot name */ readonly name: string; /** Default content if slot is empty */ readonly defaultContent?: ReactNode; /** Whether slot is required */ readonly required?: boolean; /** Accepted child module types */ readonly accepts?: ReadonlyArray; /** Maximum number of children */ readonly maxChildren?: number; } /** * Module boundary configuration. */ export interface ModuleBoundaryConfig { /** Unique module identifier */ readonly id: ModuleId; /** Human-readable module name */ readonly name: string; /** Module version */ readonly version?: string; /** Module dependencies */ readonly dependencies?: ReadonlyArray; /** Available slots for composition */ readonly slots?: ReadonlyArray; /** Lifecycle hooks */ readonly lifecycle?: ModuleLifecycleHooks; /** Hydration configuration */ readonly hydration?: Partial; /** Security configuration */ readonly security?: Partial; /** Whether module should be isolated */ readonly isolated?: boolean; /** Performance budget (ms) */ readonly performanceBudget?: number; /** Whether to enable strict mode */ readonly strict?: boolean; } /** * Module boundary state. */ export interface ModuleBoundaryState { /** Current lifecycle state */ readonly lifecycleState: ModuleLifecycleState; /** Current hydration state */ readonly hydrationState: HydrationState; /** Whether module is currently visible */ readonly isVisible: boolean; /** Whether module is currently active */ readonly isActive: boolean; /** Error if module is in error state */ readonly error: Error | null; /** Error info from React error boundary */ readonly errorInfo: ErrorInfo | null; /** Slot contents */ readonly slots: Map; /** Module-scoped state */ readonly moduleState: Map; /** Performance metrics */ readonly metrics: ModulePerformanceMetrics; } /** * Virtual module interface. * Represents a complete module unit. */ export interface VirtualModule { /** Module configuration */ readonly config: ModuleBoundaryConfig; /** Module state */ readonly state: ModuleBoundaryState; /** Root virtual nodes */ readonly vdom: ReadonlyArray; /** Container element */ container: Element | null; /** Portal roots */ readonly portals: Map; /** Child modules */ readonly children: Map; /** Parent module */ parent: VirtualModule | null; } /** * Content Security Policy directive types. */ export interface CSPDirectives { readonly 'default-src'?: ReadonlyArray; readonly 'script-src'?: ReadonlyArray; readonly 'style-src'?: ReadonlyArray; readonly 'img-src'?: ReadonlyArray; readonly 'font-src'?: ReadonlyArray; readonly 'connect-src'?: ReadonlyArray; readonly 'frame-src'?: ReadonlyArray; readonly 'object-src'?: ReadonlyArray; readonly 'base-uri'?: ReadonlyArray; readonly 'form-action'?: ReadonlyArray; } /** * Module security configuration. */ export interface ModuleSecurityConfig { /** CSP directives for this module */ readonly csp?: CSPDirectives; /** Security nonce for inline scripts/styles */ readonly nonce?: SecurityNonce; /** Whether to sandbox the module */ readonly sandbox?: boolean; /** Sandbox flags if sandboxed */ readonly sandboxFlags?: ReadonlyArray; /** Trusted types policy name */ readonly trustedTypesPolicy?: string; /** Whether to sanitize hydration data */ readonly sanitizeHydration?: boolean; /** Allowed cross-module event patterns */ readonly allowedEvents?: ReadonlyArray; /** Blocked cross-module event patterns */ readonly blockedEvents?: ReadonlyArray; /** Maximum message size for cross-module communication */ readonly maxMessageSize?: number; /** Whether to validate message origins */ readonly validateOrigins?: boolean; } /** * Security context for a module. */ export interface SecurityContext { /** Security configuration */ readonly config: ModuleSecurityConfig; /** Current nonce */ readonly nonce: SecurityNonce | null; /** Whether context is secure */ readonly isSecure: boolean; /** Violations detected */ readonly violations: ReadonlyArray; /** Validate content against policy */ readonly validateContent: (content: string) => boolean; /** Sanitize content */ readonly sanitize: (content: string) => string; /** Check if event is allowed */ readonly isEventAllowed: (eventName: string) => boolean; } /** * Security violation record. */ export interface SecurityViolation { /** Type of violation */ readonly type: 'csp' | 'xss' | 'injection' | 'origin' | 'size'; /** Description of violation */ readonly message: string; /** Module where violation occurred */ readonly moduleId: ModuleId; /** Timestamp of violation */ readonly timestamp: number; /** Source of violation */ readonly source?: string; /** Blocked content */ readonly blockedContent?: string; } /** * Event priority levels. */ export declare const EventPriority: { /** Highest priority - process immediately */ readonly CRITICAL: 0; /** High priority */ readonly HIGH: 1; /** Normal priority */ readonly NORMAL: 2; /** Low priority - process when idle */ readonly LOW: 3; }; /** * Base event message interface. */ export interface ModuleEventMessage { /** Unique event ID */ readonly id: string; /** Event name */ readonly name: string; /** Source module ID */ readonly source: ModuleId; /** Target module ID (null for broadcast) */ readonly target: ModuleId | null; /** Event payload */ readonly payload: T; /** Event priority */ readonly priority: EventPriority; /** Timestamp */ readonly timestamp: number; /** Whether event requires acknowledgment */ readonly requiresAck?: boolean; /** Correlation ID for request-response patterns */ readonly correlationId?: string; } /** * Event subscription options. */ export interface EventSubscriptionOptions { /** Filter by source module */ readonly sourceFilter?: ModuleId | RegExp; /** Priority filter (only receive events of this priority or higher) */ readonly priorityFilter?: EventPriority; /** Whether to receive own events */ readonly receiveSelf?: boolean; /** Maximum events to receive before auto-unsubscribe */ readonly maxEvents?: number; /** Timeout before auto-unsubscribe */ readonly timeout?: number; /** Transform payload before delivery */ readonly transform?: (payload: T) => T; } /** * Event handler type. */ export type EventHandler = (message: ModuleEventMessage) => void | Promise; /** * Subscription handle for cleanup. */ export interface EventSubscription { /** Unique subscription ID */ readonly id: string; /** Event name subscribed to */ readonly eventName: string; /** Unsubscribe from event */ readonly unsubscribe: () => void; /** Whether subscription is still active */ readonly isActive: boolean; } /** * Pool configuration. */ export interface VDOMPoolConfig { /** Initial pool size */ readonly initialSize: number; /** Maximum pool size */ readonly maxSize: number; /** Minimum free nodes to maintain */ readonly minFreeNodes: number; /** Growth factor when pool needs expansion */ readonly growthFactor: number; /** Shrink threshold (percentage of unused nodes) */ readonly shrinkThreshold: number; /** GC interval in milliseconds */ readonly gcIntervalMs: number; /** Node TTL before eligible for GC */ readonly nodeTtlMs: number; /** Enable memory pressure detection */ readonly enableMemoryPressure: boolean; /** Memory threshold to trigger aggressive GC (0-1) */ readonly memoryPressureThreshold: number; } /** * Pool statistics. */ export interface VDOMPoolStats { /** Total nodes in pool */ readonly totalNodes: number; /** Currently in-use nodes */ readonly inUseNodes: number; /** Available nodes */ readonly freeNodes: number; /** Nodes acquired since start */ readonly acquireCount: number; /** Nodes released since start */ readonly releaseCount: number; /** Pool expansions performed */ readonly expansionCount: number; /** GC runs performed */ readonly gcCount: number; /** Nodes collected by GC */ readonly gcCollectedCount: number; /** Current pool generation */ readonly generation: number; /** Estimated memory usage (bytes) */ readonly estimatedMemoryBytes: number; /** Last GC timestamp */ readonly lastGcTimestamp: number; /** Pool utilization (0-1) */ readonly utilization: number; } /** * Module registration entry. */ export interface ModuleRegistryEntry { /** Module configuration */ readonly config: ModuleBoundaryConfig; /** Dynamic import function for lazy loading */ readonly loader?: () => Promise>; /** Loaded component (null if not yet loaded) */ component: ComponentType | null; /** Loading state */ loadingState: 'idle' | 'loading' | 'loaded' | 'error'; /** Loading error if any */ loadingError: Error | null; /** Registration timestamp */ readonly registeredAt: number; /** Last accessed timestamp */ lastAccessedAt: number; /** Access count */ accessCount: number; /** Whether module supports HMR */ readonly hmrEnabled?: boolean; } /** * Module registry query options. */ export interface ModuleQueryOptions { /** Filter by lifecycle state */ readonly lifecycleState?: ModuleLifecycleState; /** Filter by hydration state */ readonly hydrationState?: HydrationState; /** Include only modules matching pattern */ readonly namePattern?: RegExp; /** Include dependencies */ readonly includeDependencies?: boolean; /** Maximum depth for dependency resolution */ readonly maxDepth?: number; } /** * Module loading priority. */ export declare const LoadingPriority: { /** Critical - load immediately */ readonly CRITICAL: 0; /** High - load soon */ readonly HIGH: 1; /** Normal - standard loading */ readonly NORMAL: 2; /** Low - load when idle */ readonly LOW: 3; /** Prefetch - load in background */ readonly PREFETCH: 4; }; /** * Module loading options. */ export interface ModuleLoadOptions { /** Loading priority */ readonly priority?: LoadingPriority; /** Timeout in milliseconds */ readonly timeout?: number; /** Retry count on failure */ readonly retries?: number; /** Retry delay in milliseconds */ readonly retryDelay?: number; /** Whether to preload dependencies */ readonly preloadDependencies?: boolean; /** Callback on loading progress */ readonly onProgress?: (progress: number) => void; /** Callback on loading complete */ readonly onComplete?: () => void; /** Callback on loading error */ readonly onError?: (error: Error) => void; } /** * Module loading state. */ export interface ModuleLoadingState { /** Module ID */ readonly moduleId: ModuleId; /** Current loading state */ readonly state: 'idle' | 'queued' | 'loading' | 'loaded' | 'error'; /** Loading progress (0-1) */ readonly progress: number; /** Error if state is 'error' */ readonly error: Error | null; /** Started loading timestamp */ readonly startedAt: number | null; /** Completed loading timestamp */ readonly completedAt: number | null; /** Dependencies loaded */ readonly dependenciesLoaded: number; /** Total dependencies */ readonly dependenciesTotal: number; } /** * Module performance metrics. */ export interface ModulePerformanceMetrics { /** Time to initialize (ms) */ readonly initTime: number; /** Time to mount (ms) */ readonly mountTime: number; /** Time to hydrate (ms) */ readonly hydrationTime: number; /** Render count */ readonly renderCount: number; /** Total render time (ms) */ readonly totalRenderTime: number; /** Average render time (ms) */ readonly avgRenderTime: number; /** Peak render time (ms) */ readonly peakRenderTime: number; /** Update count */ readonly updateCount: number; /** Memory usage estimate (bytes) */ readonly memoryEstimate: number; /** Virtual nodes count */ readonly vNodeCount: number; /** DOM nodes count */ readonly domNodeCount: number; /** Last measured timestamp */ readonly lastMeasuredAt: number; } /** * Performance budget configuration. */ export interface PerformanceBudget { /** Maximum init time (ms) */ readonly maxInitTime?: number; /** Maximum mount time (ms) */ readonly maxMountTime?: number; /** Maximum render time (ms) */ readonly maxRenderTime?: number; /** Maximum hydration time (ms) */ readonly maxHydrationTime?: number; /** Maximum virtual nodes */ readonly maxVNodes?: number; /** Maximum memory (bytes) */ readonly maxMemory?: number; /** Callback when budget exceeded */ readonly onBudgetExceeded?: (metric: keyof PerformanceBudget, value: number, budget: number) => void; } /** * Module context value. */ export interface ModuleContextValue { /** Module ID */ readonly moduleId: ModuleId; /** Module configuration */ readonly config: ModuleBoundaryConfig; /** Module state */ readonly state: ModuleBoundaryState; /** Security context */ readonly security: SecurityContext; /** Parent module context (null if root) */ readonly parent: ModuleContextValue | null; /** Dispatch module action */ readonly dispatch: (action: ModuleAction) => void; /** Get slot content */ readonly getSlot: (name: string) => ReactNode | null; /** Set slot content */ readonly setSlot: (name: string, content: ReactNode) => void; /** Trigger hydration */ readonly hydrate: () => Promise; /** Subscribe to lifecycle events */ readonly subscribe: (event: ModuleLifecycleEvent, handler: () => void) => () => void; } /** * Module actions for state updates. */ export type ModuleAction = { type: 'SET_STATE'; key: string; value: unknown; } | { type: 'MERGE_STATE'; state: Record; } | { type: 'RESET_STATE'; } | { type: 'SET_SLOT'; name: string; content: ReactNode; } | { type: 'CLEAR_SLOT'; name: string; } | { type: 'TRIGGER_HYDRATION'; } | { type: 'SET_VISIBILITY'; isVisible: boolean; } | { type: 'SET_ERROR'; error: Error; errorInfo?: ErrorInfo; } | { type: 'CLEAR_ERROR'; } | { type: 'TRANSITION_STATE'; to: ModuleLifecycleState; }; /** * Module provider configuration. */ export interface ModuleProviderConfig { /** Enable development mode features */ readonly devMode?: boolean; /** Enable strict mode checks */ readonly strictMode?: boolean; /** Global security configuration */ readonly security?: Partial; /** Global hydration configuration */ readonly hydration?: Partial; /** Global performance budget */ readonly performanceBudget?: PerformanceBudget; /** VDOM pool configuration */ readonly poolConfig?: Partial; /** Enable telemetry */ readonly enableTelemetry?: boolean; /** Telemetry reporter */ readonly telemetryReporter?: (metrics: ModulePerformanceMetrics) => void; } /** * useModule hook return type. */ export interface UseModuleReturn { /** Module ID */ readonly moduleId: ModuleId; /** Module configuration */ readonly config: ModuleBoundaryConfig; /** Module lifecycle state */ readonly lifecycleState: ModuleLifecycleState; /** Whether module is mounted */ readonly isMounted: boolean; /** Whether module is visible */ readonly isVisible: boolean; /** Whether module has error */ readonly hasError: boolean; /** Module error if any */ readonly error: Error | null; /** Performance metrics */ readonly metrics: ModulePerformanceMetrics; /** Emit event */ readonly emit: (name: string, payload: T) => void; /** Subscribe to event */ readonly on: (name: string, handler: EventHandler, options?: EventSubscriptionOptions) => EventSubscription; } /** * useModuleState hook return type. */ export interface UseModuleStateReturn { /** Current state value */ readonly state: T; /** Set state value */ readonly setState: (value: T | ((prev: T) => T)) => void; /** Merge partial state */ readonly mergeState: (partial: Partial) => void; /** Reset to initial state */ readonly resetState: () => void; /** Whether state is loading */ readonly isLoading: boolean; /** State error if any */ readonly error: Error | null; } /** * useModuleBoundary hook return type. */ export interface UseModuleBoundaryReturn { /** Boundary element ref */ readonly boundaryRef: RefObject; /** Slot definitions */ readonly slots: ReadonlyArray; /** Get slot content */ readonly getSlot: (name: string) => ReactNode | null; /** Fill slot with content */ readonly fillSlot: (name: string, content: ReactNode) => void; /** Clear slot content */ readonly clearSlot: (name: string) => void; /** Boundary dimensions */ readonly dimensions: DOMRect | null; /** Is boundary visible */ readonly isVisible: boolean; /** Parent boundary info */ readonly parentBoundary: UseModuleBoundaryReturn | null; } /** * useModuleHydration hook return type. */ export interface UseModuleHydrationReturn { /** Current hydration state */ readonly hydrationState: HydrationState; /** Whether hydration is complete */ readonly isHydrated: boolean; /** Whether hydration is pending */ readonly isPending: boolean; /** Whether hydration is in progress */ readonly isHydrating: boolean; /** Whether hydration failed */ readonly hasFailed: boolean; /** Hydration error if failed */ readonly error: Error | null; /** Hydration progress (0-1) */ readonly progress: number; /** Trigger manual hydration */ readonly hydrate: () => Promise; /** Skip hydration */ readonly skip: () => void; /** Hydration data from server */ readonly data: HydrationData | null; } /** * useSecureModule hook return type. */ export interface UseSecureModuleReturn { /** Security context */ readonly securityContext: SecurityContext; /** Current nonce */ readonly nonce: SecurityNonce | null; /** Whether context is secure */ readonly isSecure: boolean; /** Validate content */ readonly validateContent: (content: string) => boolean; /** Sanitize content */ readonly sanitize: (content: string) => string; /** Check if event is allowed */ readonly isEventAllowed: (eventName: string) => boolean; /** Security violations */ readonly violations: ReadonlyArray; /** Report security violation */ readonly reportViolation: (violation: Omit) => void; } /** * Creates a branded ModuleId from a string. */ export declare function createModuleId(id: string): ModuleId; /** * Creates a branded VNodeId from a string. */ export declare function createVNodeId(id: string): VNodeId; /** * Creates a branded SecurityNonce from a string. */ export declare function createSecurityNonce(nonce: string): SecurityNonce; /** * Type guard for ModuleId. */ export declare function isModuleId(value: unknown): value is ModuleId; /** * Type guard for VNodeId. */ export declare function isVNodeId(value: unknown): value is VNodeId; /** * Default hydration configuration. */ export declare const DEFAULT_HYDRATION_CONFIG: HydrationConfig; /** * Default pool configuration. */ export declare const DEFAULT_POOL_CONFIG: VDOMPoolConfig; /** * Default security configuration. */ export declare const DEFAULT_SECURITY_CONFIG: ModuleSecurityConfig; export type VNodeType = (typeof VNodeType)[keyof typeof VNodeType]; export type ModuleLifecycleState = (typeof ModuleLifecycleState)[keyof typeof ModuleLifecycleState]; export type ModuleLifecycleEvent = (typeof ModuleLifecycleEvent)[keyof typeof ModuleLifecycleEvent]; export type HydrationState = (typeof HydrationState)[keyof typeof HydrationState]; export type HydrationPriority = (typeof HydrationPriority)[keyof typeof HydrationPriority]; export type HydrationTrigger = (typeof HydrationTrigger)[keyof typeof HydrationTrigger]; export type EventPriority = (typeof EventPriority)[keyof typeof EventPriority]; export type LoadingPriority = (typeof LoadingPriority)[keyof typeof LoadingPriority];