@ragbits/api-client-react 0.0.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -128,6 +128,56 @@ function ChatComponent() {
128
128
  }
129
129
  ```
130
130
 
131
+ #### Custom Route Call Example
132
+
133
+ ```tsx
134
+ import { useRagbitsCall } from '@ragbits/api-client-react'
135
+
136
+ type MyEndpoints = {
137
+ '/api/my-endpoint': {
138
+ method: 'GET'
139
+ request: never
140
+ response: string
141
+ }
142
+ }
143
+
144
+ function MyComponent() {
145
+ // In case of usage of custom Endpoints, we have to specify the URL as generic parameter
146
+ const custom = useRagbitsCall<MyEndpoints, '/api/my-endpoint'>(
147
+ '/api/my-endpoint'
148
+ )
149
+
150
+ const handleLoadCustom = async () => {
151
+ try {
152
+ await custom.call()
153
+ console.log('Custom loaded:', custom.data)
154
+ } catch (error) {
155
+ console.error('Failed to load custom:', error)
156
+ }
157
+ }
158
+
159
+ return (
160
+ <div>
161
+ <button onClick={handleLoadCustom} disabled={custom.isLoading}>
162
+ {custom.isLoading
163
+ ? 'Loading...'
164
+ : custom.data
165
+ ? 'Reload custom'
166
+ : 'Load custom'}
167
+ </button>
168
+
169
+ {custom.data && (
170
+ <div>
171
+ <h3>Custom loaded successfully</h3>
172
+ </div>
173
+ )}
174
+
175
+ {custom.error && <p>Error: {custom.error.message}</p>}
176
+ </div>
177
+ )
178
+ }
179
+ ```
180
+
131
181
  ## API Reference
132
182
 
133
183
  ### `RagbitsProvider`
@@ -143,13 +193,14 @@ interface RagbitsProviderProps {
143
193
  }
144
194
  ```
145
195
 
146
- ### `useRagbitsCall<T>(endpoint, defaultOptions?)`
196
+ ### `useRagbitsCall<Endpoints, URL>(endpoint, defaultOptions?)`
147
197
 
148
- React hook for making type-safe API calls with automatic state management.
198
+ React hook for making type-safe API calls with automatic state management. `endpoint` must be one of the key of `Endpoints` type
199
+ that define schema of the available endpoints. All default Ragbits routes are supported out of the box.
149
200
 
150
201
  **Parameters:**
151
202
 
152
- - `endpoint`: Predefined API endpoint path (e.g., '/api/config', '/api/feedback')
203
+ - `endpoint`: API endpoint path (e.g., '/api/config', '/api/feedback')
153
204
  - `defaultOptions` (optional): Default request options
154
205
 
155
206
  **Returns:**
@@ -165,13 +216,14 @@ interface RagbitsCallResult<T, E = Error> {
165
216
  }
166
217
  ```
167
218
 
168
- ### `useRagbitsStream<T>(endpoint)`
219
+ ### `useRagbitsStream<Endpoints, URL>(endpoint)`
169
220
 
170
- React hook for handling streaming responses with automatic state management.
221
+ React hook for handling streaming responses with automatic state management. `endpoint` must be one of the key of `Endpoints` type
222
+ that define schema of the available endpoints. All default Ragbits routes are supported out of the box.
171
223
 
172
224
  **Parameters:**
173
225
 
174
- - `endpoint`: Predefined streaming endpoint path (e.g., '/api/chat')
226
+ - `endpoint`: Streaming endpoint path (e.g., '/api/chat')
175
227
 
176
228
  **Returns:**
177
229
 
@@ -196,43 +248,6 @@ interface RagbitsContextValue {
196
248
  }
197
249
  ```
198
250
 
199
- ## Types
200
-
201
- All types from `@ragbits/api-client` are re-exported:
202
-
203
- ```typescript
204
- import type {
205
- // Core types
206
- RagbitsClient,
207
- ClientConfig,
208
-
209
- // Request/Response types
210
- ChatRequest,
211
- FeedbackRequest,
212
- ConfigResponse,
213
- FeedbackResponse,
214
-
215
- // Message types
216
- Message,
217
- MessageRole,
218
- TypedChatResponse,
219
- ChatResponseType,
220
-
221
- // Feedback types
222
- FeedbackType,
223
-
224
- // Stream types
225
- StreamCallbacks,
226
-
227
- // Endpoint types
228
- ApiEndpointPath,
229
- StreamingEndpointPath,
230
- ApiEndpointResponse,
231
- StreamingEndpointStream,
232
- TypedApiRequestOptions,
233
- } from '@ragbits/api-client-react'
234
- ```
235
-
236
251
  ## Browser Support
237
252
 
238
253
  This package supports all modern browsers with React 16.8+ (for hooks):
@@ -0,0 +1,58 @@
1
+ import { http, HttpResponse } from 'msw'
2
+ import type { FeedbackResponse, ChatResponse } from '@ragbits/api-client'
3
+ import { ChatResponseType } from '@ragbits/api-client'
4
+ import { defaultConfigResponse } from '../utils'
5
+
6
+ export const handlers = [
7
+ // Mock /api/config endpoint (GET)
8
+ http.get('http://127.0.0.1:8000/api/config', () => {
9
+ return HttpResponse.json(defaultConfigResponse)
10
+ }),
11
+
12
+ // Mock /api/feedback endpoint (POST)
13
+ http.post('http://127.0.0.1:8000/api/feedback', async ({ request }) => {
14
+ const _body = await request.json()
15
+ const response: FeedbackResponse = {
16
+ status: 'success',
17
+ }
18
+ return HttpResponse.json(response)
19
+ }),
20
+
21
+ // Mock /api/chat endpoint for streaming
22
+ http.post('http://127.0.0.1:8000/api/chat', () => {
23
+ const encoder = new TextEncoder()
24
+
25
+ const stream = new ReadableStream({
26
+ start(controller) {
27
+ // Send multiple chunks to simulate streaming with proper TypedChatResponse format
28
+ const chunks: string[] = [
29
+ `data: ${JSON.stringify({ type: ChatResponseType.Text, content: 'Hello' } as ChatResponse)}\n\n`,
30
+ `data: ${JSON.stringify({ type: ChatResponseType.Text, content: ' there!' } as ChatResponse)}\n\n`,
31
+ `data: ${JSON.stringify({ type: ChatResponseType.MessageId, content: 'msg-123' } as ChatResponse)}\n\n`,
32
+ `data: ${JSON.stringify({ type: ChatResponseType.ConversationId, content: 'conv-456' } as ChatResponse)}\n\n`,
33
+ ]
34
+
35
+ let index = 0
36
+ const sendChunk = () => {
37
+ if (index < chunks.length) {
38
+ controller.enqueue(encoder.encode(chunks[index]))
39
+ index++
40
+ setTimeout(sendChunk, 10)
41
+ } else {
42
+ controller.close()
43
+ }
44
+ }
45
+
46
+ sendChunk()
47
+ },
48
+ })
49
+
50
+ return new HttpResponse(stream, {
51
+ headers: {
52
+ 'Content-Type': 'text/event-stream',
53
+ 'Cache-Control': 'no-cache',
54
+ Connection: 'keep-alive',
55
+ },
56
+ })
57
+ }),
58
+ ]
@@ -0,0 +1,23 @@
1
+ import '@testing-library/jest-dom'
2
+ import { beforeAll, afterEach, afterAll } from 'vitest'
3
+ import { setupServer } from 'msw/node'
4
+ import { handlers } from './mocks/handlers'
5
+
6
+ // Setup MSW server
7
+ export const server = setupServer(...handlers)
8
+
9
+ beforeAll(() => {
10
+ // Start the interception on the client side before all tests run.
11
+ server.listen({ onUnhandledRequest: 'error' })
12
+ })
13
+
14
+ afterEach(() => {
15
+ // Reset any request handlers that we may add during the tests,
16
+ // so they don't affect other tests.
17
+ server.resetHandlers()
18
+ })
19
+
20
+ afterAll(() => {
21
+ // Clean up after the tests are finished.
22
+ server.close()
23
+ })
@@ -0,0 +1,120 @@
1
+ import React from 'react'
2
+ import {
3
+ render,
4
+ renderHook,
5
+ RenderOptions,
6
+ RenderHookOptions,
7
+ RenderResult,
8
+ } from '@testing-library/react'
9
+ import { RagbitsContextProvider } from '../src'
10
+ import type { ConfigResponse } from '@ragbits/api-client'
11
+
12
+ interface CustomRenderOptions extends Omit<RenderOptions, 'wrapper'> {
13
+ baseUrl?: string
14
+ }
15
+
16
+ interface CustomRenderHookOptions<TProps>
17
+ extends Omit<RenderHookOptions<TProps>, 'wrapper'> {
18
+ baseUrl?: string
19
+ }
20
+
21
+ function createWrapper(baseUrl?: string) {
22
+ return function Wrapper({ children }: { children: React.ReactNode }) {
23
+ return (
24
+ <RagbitsContextProvider baseUrl={baseUrl}>
25
+ {children}
26
+ </RagbitsContextProvider>
27
+ )
28
+ }
29
+ }
30
+
31
+ export function renderWithProvider(
32
+ ui: React.ReactElement,
33
+ options: CustomRenderOptions = {}
34
+ ): RenderResult {
35
+ const { baseUrl, ...renderOptions } = options
36
+
37
+ return render(ui, {
38
+ wrapper: createWrapper(baseUrl),
39
+ ...renderOptions,
40
+ })
41
+ }
42
+
43
+ export function renderHookWithProvider<TResult, TProps>(
44
+ hook: (props: TProps) => TResult,
45
+ options: CustomRenderHookOptions<TProps> = {}
46
+ ) {
47
+ const { baseUrl, ...renderOptions } = options
48
+
49
+ return renderHook(hook, {
50
+ wrapper: createWrapper(baseUrl),
51
+ ...renderOptions,
52
+ })
53
+ }
54
+
55
+ // Default config response used in most tests - matches Python classes
56
+ export const defaultConfigResponse: ConfigResponse = {
57
+ feedback: {
58
+ like: {
59
+ enabled: true,
60
+ form: {
61
+ title: 'Like Form',
62
+ type: 'object',
63
+ required: ['like_reason'],
64
+ properties: {
65
+ like_reason: {
66
+ title: 'Like Reason',
67
+ description: 'Why do you like this?',
68
+ type: 'string',
69
+ minLength: 1,
70
+ },
71
+ },
72
+ },
73
+ },
74
+ dislike: {
75
+ enabled: true,
76
+ form: {
77
+ title: 'Dislike Form',
78
+ type: 'object',
79
+ required: ['issue_type', 'feedback'],
80
+ properties: {
81
+ issue_type: {
82
+ title: 'Issue Type',
83
+ description: 'What was the issue?',
84
+ type: 'string',
85
+ enum: [
86
+ 'Incorrect information',
87
+ 'Not helpful',
88
+ 'Unclear',
89
+ 'Other',
90
+ ],
91
+ },
92
+ feedback: {
93
+ title: 'Feedback',
94
+ description: 'Please provide more details',
95
+ type: 'string',
96
+ minLength: 1,
97
+ },
98
+ },
99
+ },
100
+ },
101
+ },
102
+ customization: null,
103
+ user_settings: {
104
+ form: {
105
+ title: 'Chat Form',
106
+ type: 'object',
107
+ required: ['language'],
108
+ properties: {
109
+ language: {
110
+ title: 'Language',
111
+ description: 'Please select the language',
112
+ type: 'string',
113
+ enum: ['English', 'Polish'],
114
+ },
115
+ },
116
+ },
117
+ },
118
+ debug_mode: false,
119
+ conversation_history: false,
120
+ }
@@ -0,0 +1,7 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ClientConfig, RagbitsContextValue } from './index';
3
+ export interface RagbitsContextProviderProps extends ClientConfig {
4
+ children: ReactNode;
5
+ }
6
+ export declare function RagbitsContextProvider({ children, ...config }: RagbitsContextProviderProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function useRagbitsContext(): RagbitsContextValue;
package/dist/hooks.d.ts CHANGED
@@ -1,17 +1,19 @@
1
- import type { ApiEndpointPath, ApiEndpointResponse, TypedApiRequestOptions, StreamingEndpointPath } from '@ragbits/api-client';
1
+ import type { RequestOptions, EndpointDefinition, BaseApiEndpoints, BaseStreamingEndpoints } from '@ragbits/api-client';
2
2
  import type { RagbitsCallResult, RagbitsStreamResult } from './types';
3
3
  /**
4
4
  * Hook for making API calls to Ragbits endpoints
5
- * - Only predefined routes are allowed
6
- * - Response type can be overridden with explicit type parameter
5
+ * - Supports any endpoints by providing `Endpoints` generic argument
7
6
  * @param endpoint - The predefined API endpoint
8
7
  * @param defaultOptions - Default options for the API call
9
8
  */
10
- export declare function useRagbitsCall<TEndpoint extends ApiEndpointPath, TResponse = ApiEndpointResponse<TEndpoint>>(endpoint: TEndpoint, defaultOptions?: TypedApiRequestOptions<TEndpoint>): RagbitsCallResult<TResponse, Error, TEndpoint>;
9
+ export declare function useRagbitsCall<Endpoints extends {
10
+ [K in keyof Endpoints]: EndpointDefinition;
11
+ } = BaseApiEndpoints, URL extends keyof Endpoints = keyof Endpoints>(endpoint: URL, defaultOptions?: RequestOptions<URL, Endpoints>): RagbitsCallResult<URL, Endpoints, Error>;
11
12
  /**
12
13
  * Hook for handling streaming responses from Ragbits endpoints
13
- * - Only predefined streaming routes are allowed
14
- * - Response type can be overridden with explicit type parameter
14
+ * - Supports any streaming endpoints by providing `Endpoints` generic argument
15
15
  * @param endpoint - The predefined streaming endpoint
16
16
  */
17
- export declare function useRagbitsStream<TEndpoint extends StreamingEndpointPath>(endpoint: TEndpoint): RagbitsStreamResult<Error, TEndpoint>;
17
+ export declare function useRagbitsStream<Endpoints extends {
18
+ [K in keyof Endpoints]: EndpointDefinition;
19
+ } = BaseStreamingEndpoints, URL extends keyof Endpoints = keyof Endpoints>(endpoint: URL, customHeaders?: Record<string, string>): RagbitsStreamResult<URL, Endpoints, Error>;
package/dist/index.cjs CHANGED
@@ -21,7 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/index.ts
22
22
  var index_exports = {};
23
23
  __export(index_exports, {
24
- RagbitsProvider: () => RagbitsProvider,
24
+ RagbitsContextProvider: () => RagbitsContextProvider,
25
25
  useRagbitsCall: () => useRagbitsCall,
26
26
  useRagbitsContext: () => useRagbitsContext,
27
27
  useRagbitsStream: () => useRagbitsStream
@@ -32,12 +32,15 @@ __reExport(index_exports, require("@ragbits/api-client"), module.exports);
32
32
  // src/hooks.ts
33
33
  var import_react2 = require("react");
34
34
 
35
- // src/RagbitsProvider.tsx
35
+ // src/RagbitsContextProvider.tsx
36
36
  var import_react = require("react");
37
37
  var import_api_client = require("@ragbits/api-client");
38
38
  var import_jsx_runtime = require("react/jsx-runtime");
39
39
  var RagbitsContext = (0, import_react.createContext)(null);
40
- function RagbitsProvider({ children, ...config }) {
40
+ function RagbitsContextProvider({
41
+ children,
42
+ ...config
43
+ }) {
41
44
  const client = (0, import_react.useMemo)(() => new import_api_client.RagbitsClient(config), [config]);
42
45
  const contextValue = (0, import_react.useMemo)(
43
46
  () => ({
@@ -60,7 +63,9 @@ function useRagbitsContext() {
60
63
  // src/hooks.ts
61
64
  function useRagbitsCall(endpoint, defaultOptions) {
62
65
  const { client } = useRagbitsContext();
63
- const [data, setData] = (0, import_react2.useState)(null);
66
+ const [data, setData] = (0, import_react2.useState)(
67
+ null
68
+ );
64
69
  const [error, setError] = (0, import_react2.useState)(null);
65
70
  const [isLoading, setIsLoading] = (0, import_react2.useState)(false);
66
71
  const abortControllerRef = (0, import_react2.useRef)(null);
@@ -134,7 +139,7 @@ function useRagbitsCall(endpoint, defaultOptions) {
134
139
  abort
135
140
  };
136
141
  }
137
- function useRagbitsStream(endpoint) {
142
+ function useRagbitsStream(endpoint, customHeaders) {
138
143
  const { client } = useRagbitsContext();
139
144
  const [isStreaming, setIsStreaming] = (0, import_react2.useState)(false);
140
145
  const [error, setError] = (0, import_react2.useState)(null);
@@ -177,14 +182,15 @@ function useRagbitsStream(endpoint) {
177
182
  }
178
183
  }
179
184
  },
180
- abortController.signal
185
+ abortController.signal,
186
+ customHeaders
181
187
  );
182
188
  return () => {
183
189
  cancel();
184
190
  cancelFn();
185
191
  };
186
192
  },
187
- [client, cancel, endpoint, isStreaming]
193
+ [isStreaming, client, endpoint, customHeaders, cancel]
188
194
  );
189
195
  return {
190
196
  isStreaming,
@@ -195,7 +201,7 @@ function useRagbitsStream(endpoint) {
195
201
  }
196
202
  // Annotate the CommonJS export names for ESM import in node:
197
203
  0 && (module.exports = {
198
- RagbitsProvider,
204
+ RagbitsContextProvider,
199
205
  useRagbitsCall,
200
206
  useRagbitsContext,
201
207
  useRagbitsStream,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from '@ragbits/api-client';
2
2
  export * from './types';
3
3
  export * from './hooks';
4
- export * from './RagbitsProvider';
4
+ export * from './RagbitsContextProvider';
package/dist/index.js CHANGED
@@ -4,12 +4,15 @@ export * from "@ragbits/api-client";
4
4
  // src/hooks.ts
5
5
  import { useState, useCallback, useRef } from "react";
6
6
 
7
- // src/RagbitsProvider.tsx
7
+ // src/RagbitsContextProvider.tsx
8
8
  import { createContext, useContext, useMemo } from "react";
9
9
  import { RagbitsClient } from "@ragbits/api-client";
10
10
  import { jsx } from "react/jsx-runtime";
11
11
  var RagbitsContext = createContext(null);
12
- function RagbitsProvider({ children, ...config }) {
12
+ function RagbitsContextProvider({
13
+ children,
14
+ ...config
15
+ }) {
13
16
  const client = useMemo(() => new RagbitsClient(config), [config]);
14
17
  const contextValue = useMemo(
15
18
  () => ({
@@ -32,7 +35,9 @@ function useRagbitsContext() {
32
35
  // src/hooks.ts
33
36
  function useRagbitsCall(endpoint, defaultOptions) {
34
37
  const { client } = useRagbitsContext();
35
- const [data, setData] = useState(null);
38
+ const [data, setData] = useState(
39
+ null
40
+ );
36
41
  const [error, setError] = useState(null);
37
42
  const [isLoading, setIsLoading] = useState(false);
38
43
  const abortControllerRef = useRef(null);
@@ -106,7 +111,7 @@ function useRagbitsCall(endpoint, defaultOptions) {
106
111
  abort
107
112
  };
108
113
  }
109
- function useRagbitsStream(endpoint) {
114
+ function useRagbitsStream(endpoint, customHeaders) {
110
115
  const { client } = useRagbitsContext();
111
116
  const [isStreaming, setIsStreaming] = useState(false);
112
117
  const [error, setError] = useState(null);
@@ -149,14 +154,15 @@ function useRagbitsStream(endpoint) {
149
154
  }
150
155
  }
151
156
  },
152
- abortController.signal
157
+ abortController.signal,
158
+ customHeaders
153
159
  );
154
160
  return () => {
155
161
  cancel();
156
162
  cancelFn();
157
163
  };
158
164
  },
159
- [client, cancel, endpoint, isStreaming]
165
+ [isStreaming, client, endpoint, customHeaders, cancel]
160
166
  );
161
167
  return {
162
168
  isStreaming,
@@ -166,7 +172,7 @@ function useRagbitsStream(endpoint) {
166
172
  };
167
173
  }
168
174
  export {
169
- RagbitsProvider,
175
+ RagbitsContextProvider,
170
176
  useRagbitsCall,
171
177
  useRagbitsContext,
172
178
  useRagbitsStream
package/dist/types.d.ts CHANGED
@@ -1,16 +1,20 @@
1
- import type { StreamCallbacks, RagbitsClient, StreamingEndpointPath, StreamingEndpointRequest, TypedApiRequestOptions, ApiEndpointPath, StreamingEndpointStream } from '@ragbits/api-client';
2
- export interface RagbitsCallResult<T, E = Error, TEndpoint extends ApiEndpointPath = ApiEndpointPath> {
3
- data: T | null;
4
- error: E | null;
1
+ import type { StreamCallbacks, RagbitsClient, RequestOptions, EndpointDefinition, BaseApiEndpoints, EndpointRequest, EndpointResponse, BaseStreamingEndpoints } from '@ragbits/api-client';
2
+ export interface RagbitsCallResult<URL extends keyof Endpoints, Endpoints extends {
3
+ [K in keyof Endpoints]: EndpointDefinition;
4
+ } = BaseApiEndpoints, Err = Error> {
5
+ data: EndpointResponse<URL, Endpoints> | null;
6
+ error: Err | null;
5
7
  isLoading: boolean;
6
- call: (options?: TypedApiRequestOptions<TEndpoint>) => Promise<T>;
8
+ call: (options?: RequestOptions<URL, Endpoints>) => Promise<EndpointResponse<URL, Endpoints>>;
7
9
  reset: () => void;
8
10
  abort: () => void;
9
11
  }
10
- export interface RagbitsStreamResult<E = Error, TEndpoint extends StreamingEndpointPath = StreamingEndpointPath> {
12
+ export interface RagbitsStreamResult<URL extends keyof Endpoints, Endpoints extends {
13
+ [K in keyof Endpoints]: EndpointDefinition;
14
+ } = BaseStreamingEndpoints, Err = Error> {
11
15
  isStreaming: boolean;
12
- error: E | null;
13
- stream: (data: StreamingEndpointRequest<TEndpoint>, callbacks: StreamCallbacks<StreamingEndpointStream<TEndpoint>, string>) => () => void;
16
+ error: Err | null;
17
+ stream: (data: EndpointRequest<URL, Endpoints>, callbacks: StreamCallbacks<EndpointResponse<URL, Endpoints>, string>) => () => void;
14
18
  cancel: () => void;
15
19
  }
16
20
  export interface RagbitsContextValue {
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@ragbits/api-client-react",
3
- "version": "0.0.3",
3
+ "version": "1.3.0",
4
4
  "description": "React hooks for the Ragbits API client",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/deepsense-ai/ragbits"
8
+ },
5
9
  "main": "dist/index.cjs",
6
10
  "module": "dist/index.js",
7
11
  "types": "dist/index.d.ts",
@@ -14,7 +18,7 @@
14
18
  }
15
19
  },
16
20
  "scripts": {
17
- "build": "npm run clean && tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly --declaration --declarationDir dist --project tsconfig.json",
21
+ "build": "npm run clean && tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly --declaration --project tsconfig.json",
18
22
  "dev": "tsc -b . --watch",
19
23
  "test": "vitest",
20
24
  "test:run": "vitest run",
@@ -22,7 +26,7 @@
22
26
  "lint": "eslint .",
23
27
  "format": "prettier --write .",
24
28
  "format:check": "prettier --check .",
25
- "clean": "rm -rf ./dist"
29
+ "clean": "rm -rf ./dist && rm -f ./tsconfig.tsbuildinfo"
26
30
  },
27
31
  "peerDependencies": {
28
32
  "react": ">=16.8.0",
@@ -1,7 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import type { ClientConfig, RagbitsContextValue } from './index';
3
- export interface RagbitsProviderProps extends ClientConfig {
4
- children: ReactNode;
5
- }
6
- export declare function RagbitsProvider({ children, ...config }: RagbitsProviderProps): import("react/jsx-runtime").JSX.Element;
7
- export declare function useRagbitsContext(): RagbitsContextValue;