import * as React from 'react'; import { ClientConfig } from '@dotdo/client'; export { ClientConfig, ConnectionState, DOClient } from '@dotdo/client'; import { D as DotdoContextValue } from './index-CdjJK4NY.js'; export { B as BaseItem, C as CollectionConfig, L as LiveQueryConfig, S as SyncMessage, f as UseCollectionResult, U as UseRecordConfig, g as UseRecordResult, W as WorkflowContext, a as use$, b as useCollection, e as useConnectionState, u as useDO, c as useLiveQuery, d as useRecord } from './index-CdjJK4NY.js'; /** * DO - React provider for dotdo client * * Wraps your application to provide client instance and WebSocket * connection management for all hooks within the tree. * * @example * ```tsx * import { DO } from '@dotdo/react' * * function App() { * return ( * * * * ) * } * ``` * * @example * With custom client configuration: * ```tsx * import { DO } from '@dotdo/react' * * function App() { * return ( * * * * ) * } * ``` * * @module @dotdo/react */ /** * Props for the DO provider component. */ interface DOProps { /** Namespace URL for the Durable Object (http/https, will convert to ws/wss for sync) */ ns: string; /** Optional client configuration for timeout, auth, batching, etc. */ config?: ClientConfig; /** Child components */ children: React.ReactNode; } /** * Provider component for dotdo React bindings. * * Creates and manages the client instance and WebSocket connections * for real-time sync with Durable Objects. All hooks in the tree * will use this provider's client and connection state. * * @param props - Provider props * @returns React element wrapping children with context */ declare function DO({ ns, config, children }: DOProps): React.ReactElement; /** * Dotdo React Context * * Provides client instance and connection management to child components. * This is the internal context used by all hooks. * * @module @dotdo/react */ /** * React context for dotdo client. * * Use the DO provider to set this context, and useDotdoContext to read it. */ declare const DotdoContext: React.Context; /** * Hook to access the dotdo context. * * Provides access to the client, namespace, and connection management. * Usually you don't need this directly - use the specific hooks instead. * * @returns The context value with client and connection info * @throws Error if used outside of DO provider */ declare function useDotdoContext(): DotdoContextValue; export { DO, type DOProps, DotdoContext, DotdoContextValue, useDotdoContext };