@faasjs/react 8.0.0-beta.7 → 8.0.0-beta.9

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/dist/index.mjs CHANGED
@@ -1,7 +1,667 @@
1
- import { FaasBrowserClient } from "@faasjs/browser";
2
1
  import { Component, cloneElement, createContext, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
3
2
  import { jsx, jsxs } from "react/jsx-runtime";
4
3
 
4
+ //#region src/generateId.ts
5
+ /**
6
+ * Generate random id with prefix
7
+ *
8
+ * @param prefix prefix of id
9
+ * @param length length of id without prefix, range is 8 ~ 18, default is 18
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * generateId('prefix-') // prefix-1z3b4c5d6e
14
+ * ```
15
+ */
16
+ function generateId(prefix = "", length = 18) {
17
+ if (length < 8 || length > 18) throw new Error("Length must be 8 ~ 18");
18
+ return `${prefix}${Date.now().toString(36).padStart(8, "0")}${Math.random().toString(36).substring(2, length - 6).padEnd(length - 8, "0")}`;
19
+ }
20
+
21
+ //#endregion
22
+ //#region src/browser.ts
23
+ /**
24
+ * Wrapper class for HTTP responses from FaasJS functions.
25
+ *
26
+ * Provides a consistent interface for handling server responses with status code, headers,
27
+ * body, and parsed data. Automatically handles JSON serialization and status code defaults.
28
+ *
29
+ * @template T - The type of the data property for type-safe response handling
30
+ *
31
+ * @property {number} status - The HTTP status code of the response.
32
+ * Defaults to 200 if data or body is provided, 204 if neither is present.
33
+ * @property {ResponseHeaders} headers - The response headers as a key-value object.
34
+ * Empty object if no headers were provided.
35
+ * @property {any} body - The raw response body as a string or object.
36
+ * If data is provided without body, body is automatically set to JSON.stringify(data).
37
+ * @property {T} [data] - The parsed JSON data from the response.
38
+ * Optional property that contains the response payload when JSON is provided.
39
+ *
40
+ * @param {ResponseProps<T>} [props] - Response properties including status, headers, body, and data.
41
+ * All properties are optional with sensible defaults.
42
+ *
43
+ * @remarks
44
+ * - status defaults to 200 if data or body is present, 204 otherwise
45
+ * - body is automatically populated from data if not explicitly provided
46
+ * - headers defaults to an empty object if not provided
47
+ * - Use generic type parameter T for type-safe data access
48
+ * - Commonly used as the return type from client.action() method
49
+ * - Can be used in mock handlers to return structured responses
50
+ * - The data property is optional and may be undefined for responses without data
51
+ *
52
+ * @example Create successful response with data
53
+ * ```ts
54
+ * const response = new Response({
55
+ * status: 200,
56
+ * data: {
57
+ * id: 123,
58
+ * name: 'John Doe'
59
+ * }
60
+ * })
61
+ * console.log(response.status) // 200
62
+ * console.log(response.data.name) // 'John Doe'
63
+ * ```
64
+ *
65
+ * @example Create response with type safety
66
+ * ```ts
67
+ * interface User {
68
+ * id: number
69
+ * name: string
70
+ * email: string
71
+ * }
72
+ *
73
+ * const response = new Response<User>({
74
+ * data: {
75
+ * id: 123,
76
+ * name: 'John',
77
+ * email: 'john@example.com'
78
+ * }
79
+ * })
80
+ * // TypeScript knows response.data.name is a string
81
+ * ```
82
+ *
83
+ * @example Create response with headers
84
+ * ```ts
85
+ * const response = new Response({
86
+ * status: 201,
87
+ * data: { created: true },
88
+ * headers: {
89
+ * 'Content-Type': 'application/json',
90
+ * 'X-Request-Id': 'req-123',
91
+ * 'X-Cache-Key': 'user-123'
92
+ * }
93
+ * })
94
+ * ```
95
+ *
96
+ * @example Create response with custom body
97
+ * ```ts
98
+ * const response = new Response({
99
+ * status: 200,
100
+ * body: JSON.stringify({ custom: 'format' }),
101
+ * headers: { 'Content-Type': 'application/json' }
102
+ * })
103
+ * ```
104
+ *
105
+ * @example Create empty response (204 No Content)
106
+ * ```ts
107
+ * const response = new Response()
108
+ * // status: 204, headers: {}, body: undefined, data: undefined
109
+ * ```
110
+ *
111
+ * @example Create error response
112
+ * ```ts
113
+ * const response = new Response({
114
+ * status: 404,
115
+ * data: {
116
+ * error: {
117
+ * message: 'User not found',
118
+ * code: 'USER_NOT_FOUND'
119
+ * }
120
+ * }
121
+ * })
122
+ * ```
123
+ *
124
+ * @example Use in mock handler
125
+ * ```ts
126
+ * setMock(async (action, params) => {
127
+ * if (action === 'user') {
128
+ * return new Response({
129
+ * status: 200,
130
+ * data: { id: params.id, name: 'Mock User' }
131
+ * })
132
+ * }
133
+ * return new Response({ status: 404, data: { error: 'Not found' } })
134
+ * })
135
+ * ```
136
+ *
137
+ * @see ResponseProps for response property type
138
+ * @see ResponseError for error response handling
139
+ * @see FaasBrowserClient.action for method returning Response
140
+ */
141
+ var Response = class {
142
+ status;
143
+ headers;
144
+ body;
145
+ data;
146
+ constructor(props = {}) {
147
+ this.status = props.status || (props.data || props.body ? 200 : 204);
148
+ this.headers = props.headers || {};
149
+ this.body = props.body;
150
+ if (props.data !== void 0) this.data = props.data;
151
+ if (props.data && !props.body) this.body = JSON.stringify(props.data);
152
+ }
153
+ };
154
+ /**
155
+ * Custom error class for handling HTTP response errors from FaasJS requests.
156
+ *
157
+ * Extends the built-in Error class to provide additional information about failed requests,
158
+ * including HTTP status code, response headers, response body, and the original error.
159
+ *
160
+ * @class ResponseError
161
+ * @extends {Error}
162
+ *
163
+ * @property {number} status - The HTTP status code of the failed response. Defaults to 500 if not provided.
164
+ * @property {ResponseHeaders} headers - The response headers from the failed request.
165
+ * @property {any} body - The response body containing error details or the original error if available.
166
+ * @property {Error} [originalError] - The original Error object if this ResponseError was created from another Error.
167
+ *
168
+ * @param {string | Error | ResponseErrorProps} data - The error message, an Error object, or a ResponseErrorProps object.
169
+ * @param {Omit<ResponseErrorProps, 'message' | 'originalError'>} [options] - Additional options for the error (status, headers, body).
170
+ *
171
+ * @example Basic error with message
172
+ * ```ts
173
+ * throw new ResponseError('User not found')
174
+ * // or inside action method:
175
+ * catch (error) {
176
+ * throw new ResponseError(error.message)
177
+ * }
178
+ * ```
179
+ *
180
+ * @example Error from existing Error
181
+ * ```ts
182
+ * try {
183
+ * await someOperation()
184
+ * } catch (error) {
185
+ * throw new ResponseError(error, {
186
+ * status: 500,
187
+ * headers: { 'X-Error-Type': 'internal' }
188
+ * })
189
+ * }
190
+ * ```
191
+ *
192
+ * @example Error with complete response details
193
+ * ```ts
194
+ * throw new ResponseError({
195
+ * message: 'Validation failed',
196
+ * status: 400,
197
+ * headers: { 'X-Error-Code': 'VALIDATION_ERROR' },
198
+ * body: {
199
+ * error: {
200
+ * message: 'Validation failed',
201
+ * fields: ['email', 'password']
202
+ * }
203
+ * }
204
+ * })
205
+ * ```
206
+ *
207
+ * @example Handling ResponseError in client
208
+ * ```ts
209
+ * try {
210
+ * const response = await client.action('user', { id: 123 })
211
+ * console.log(response.data)
212
+ * } catch (error) {
213
+ * if (error instanceof ResponseError) {
214
+ * console.error(`Request failed: ${error.message}`)
215
+ * console.error(`Status: ${error.status}`)
216
+ * if (error.body) {
217
+ * console.error('Error details:', error.body)
218
+ * }
219
+ * if (error.headers['X-Request-Id']) {
220
+ * console.error('Request ID:', error.headers['X-Request-Id'])
221
+ * }
222
+ * }
223
+ * }
224
+ * ```
225
+ *
226
+ * @example Throwing ResponseError from mock
227
+ * ```ts
228
+ * setMock(async (action, params) => {
229
+ * if (action === 'login') {
230
+ * if (!params.email || !params.password) {
231
+ * throw new ResponseError({
232
+ * message: 'Email and password are required',
233
+ * status: 400,
234
+ * body: { error: 'missing_fields' }
235
+ * })
236
+ * }
237
+ * return { data: { token: 'abc123' } }
238
+ * }
239
+ * })
240
+ * ```
241
+ *
242
+ * @remarks
243
+ * - ResponseError is automatically thrown by the action method when the server returns an error (status >= 400)
244
+ * - The error message from server responses is extracted from body.error.message if available
245
+ * - When created from an Error object, the original error is preserved in the originalError property
246
+ * - The status property defaults to 500 if not explicitly provided
247
+ * - Use instanceof ResponseError to distinguish FaasJS errors from other JavaScript errors
248
+ * - The body property can contain structured error information from the server response
249
+ *
250
+ * @see FaasBrowserClient.action for how ResponseError is thrown in requests
251
+ * @see ResponseProps for the structure of response data
252
+ * @see setMock for mocking errors in tests
253
+ */
254
+ var ResponseError = class extends Error {
255
+ status;
256
+ headers;
257
+ body;
258
+ originalError;
259
+ constructor(data, options) {
260
+ let props;
261
+ if (typeof data === "string") props = {
262
+ message: data,
263
+ ...options
264
+ };
265
+ else if (data instanceof Error || data?.constructor?.name?.includes("Error")) props = {
266
+ message: data.message,
267
+ originalError: data,
268
+ ...options
269
+ };
270
+ else props = data;
271
+ super(props.message);
272
+ this.status = props.status || 500;
273
+ this.headers = props.headers || {};
274
+ this.body = props.body || props.originalError || { error: { message: props.message } };
275
+ }
276
+ };
277
+ let mock = null;
278
+ /**
279
+ * Set global mock handler for testing. Mock affects all FaasBrowserClient instances.
280
+ *
281
+ * @param handler - Mock handler, can be:
282
+ * - MockHandler function: receives (action, params, options) and returns response data
283
+ * - ResponseProps object: static response data
284
+ * - Response instance: pre-configured Response object
285
+ * - null or undefined: clear mock
286
+ *
287
+ * @example Use MockHandler function
288
+ * ```ts
289
+ * setMock(async (action, params, options) => {
290
+ * if (action === 'user') {
291
+ * return { data: { name: 'John' } }
292
+ * }
293
+ * return { status: 404, data: { error: 'Not found' } }
294
+ * })
295
+ *
296
+ * const response = await client.action('user')
297
+ * ```
298
+ *
299
+ * @example Use ResponseProps object
300
+ * ```ts
301
+ * setMock({
302
+ * status: 200,
303
+ * data: { result: 'success' },
304
+ * headers: { 'X-Custom': 'value' }
305
+ * })
306
+ * ```
307
+ *
308
+ * @example Use Response instance
309
+ * ```ts
310
+ * setMock(new Response({
311
+ * status: 200,
312
+ * data: { result: 'success' }
313
+ * }))
314
+ * ```
315
+ *
316
+ * @example Clear mock
317
+ * ```ts
318
+ * setMock(null)
319
+ * // or
320
+ * setMock(undefined)
321
+ * ```
322
+ *
323
+ * @example Handle errors
324
+ * ```ts
325
+ * setMock(async () => {
326
+ * throw new Error('Internal error')
327
+ * })
328
+ * // This will reject with ResponseError
329
+ * ```
330
+ */
331
+ function setMock(handler) {
332
+ mock = handler;
333
+ }
334
+ /**
335
+ * Browser client for FaasJS - provides HTTP client functionality for making API requests from web applications.
336
+ *
337
+ * @template PathOrData - Type parameter extending FaasActionUnionType for type-safe requests
338
+ *
339
+ * Features:
340
+ * - Type-safe API requests with TypeScript support
341
+ * - Built-in mock support for testing
342
+ * - Custom request function support
343
+ * - Request/response hooks (beforeRequest)
344
+ * - Automatic error handling with ResponseError
345
+ * - Streaming support for large responses
346
+ * - Multiple instance support with unique IDs
347
+ *
348
+ * @remarks
349
+ * - All requests are POST requests by default
350
+ * - Automatically adds X-FaasJS-Request-Id header for request tracking
351
+ * - baseUrl must end with '/' (will throw Error if not)
352
+ * - Supports global mock via setMock() for testing all instances
353
+ *
354
+ * @example Basic usage
355
+ * ```ts
356
+ * import { FaasBrowserClient } from '@faasjs/react'
357
+ *
358
+ * const client = new FaasBrowserClient('http://localhost:8080/')
359
+ * const response = await client.action('func', { key: 'value' })
360
+ * console.log(response.data)
361
+ * ```
362
+ *
363
+ * @example With custom headers and options
364
+ * ```ts
365
+ * const client = new FaasBrowserClient('https://api.example.com/', {
366
+ * headers: { 'X-API-Key': 'secret' },
367
+ * beforeRequest: async ({ action, params, headers }) => {
368
+ * console.log(`Calling ${action} with params:`, params)
369
+ * }
370
+ * })
371
+ * ```
372
+ *
373
+ * @example Multiple instances
374
+ * ```ts
375
+ * const apiClient = new FaasBrowserClient('https://api.example.com/')
376
+ * const localClient = new FaasBrowserClient('http://localhost:3000/')
377
+ *
378
+ * const apiData = await apiClient.action('users')
379
+ * const localData = await localClient.action('data')
380
+ * ```
381
+ *
382
+ * @example Error handling
383
+ * ```ts
384
+ * const client = new FaasBrowserClient('https://api.example.com/')
385
+ *
386
+ * try {
387
+ * const response = await client.action('user', { id: 123 })
388
+ * console.log(response.data)
389
+ * } catch (error) {
390
+ * if (error instanceof ResponseError) {
391
+ * console.error(`Request failed: ${error.message}`, error.status)
392
+ * } else {
393
+ * console.error('Unexpected error:', error)
394
+ * }
395
+ * }
396
+ * ```
397
+ *
398
+ * @throws {Error} When baseUrl does not end with '/'
399
+ *
400
+ * @see setMock for testing support
401
+ * @see ResponseError for error handling
402
+ */
403
+ var FaasBrowserClient = class {
404
+ id;
405
+ baseUrl;
406
+ defaultOptions;
407
+ /**
408
+ * Creates a new FaasBrowserClient instance.
409
+ *
410
+ * @param baseUrl - Base URL for all API requests. Must end with '/'. Defaults to '/' for relative requests.
411
+ * @throws {Error} If baseUrl does not end with '/'
412
+ * @param options - Configuration options for the client.
413
+ * Supports default headers, beforeRequest hook, custom request function,
414
+ * baseUrl override, and streaming mode.
415
+ *
416
+ * @example Basic initialization
417
+ * ```ts
418
+ * const client = new FaasBrowserClient('/')
419
+ * ```
420
+ *
421
+ * @example With API endpoint
422
+ * ```ts
423
+ * const client = new FaasBrowserClient('https://api.example.com/')
424
+ * ```
425
+ *
426
+ * @example With custom headers
427
+ * ```ts
428
+ * const client = new FaasBrowserClient('https://api.example.com/', {
429
+ * headers: {
430
+ * 'Authorization': 'Bearer token123',
431
+ * 'X-Custom-Header': 'value'
432
+ * }
433
+ * })
434
+ * ```
435
+ *
436
+ * @example With beforeRequest hook
437
+ * ```ts
438
+ * const client = new FaasBrowserClient('https://api.example.com/', {
439
+ * beforeRequest: async ({ action, params, headers }) => {
440
+ * console.log(`Requesting ${action}`, params)
441
+ * // Modify headers before request
442
+ * headers['X-Timestamp'] = Date.now().toString()
443
+ * }
444
+ * })
445
+ * ```
446
+ *
447
+ * @example With custom request function
448
+ * ```ts
449
+ * import axios from 'axios'
450
+ *
451
+ * const client = new FaasBrowserClient('/', {
452
+ * request: async (url, options) => {
453
+ * const response = await axios.post(url, options.body, {
454
+ * headers: options.headers
455
+ * })
456
+ * return new Response({
457
+ * status: response.status,
458
+ * headers: response.headers,
459
+ * data: response.data
460
+ * })
461
+ * }
462
+ * })
463
+ * ```
464
+ *
465
+ * @throws {Error} When baseUrl does not end with '/'
466
+ */
467
+ constructor(baseUrl = "/", options = Object.create(null)) {
468
+ if (baseUrl && !baseUrl.endsWith("/")) throw Error("[FaasJS] baseUrl should end with /");
469
+ this.id = `FBC-${generateId()}`;
470
+ this.baseUrl = baseUrl;
471
+ this.defaultOptions = options;
472
+ console.debug(`[FaasJS] Initialize with baseUrl: ${this.baseUrl}`);
473
+ }
474
+ /**
475
+ * Makes a request to a FaasJS function.
476
+ *
477
+ * @template PathOrData - The function path or data type for type safety
478
+ * @param action - The function path to call. Converted to lowercase when constructing the URL.
479
+ * Must be a non-empty string.
480
+ * @param params - The parameters to send to the function. Will be serialized as JSON.
481
+ * Optional if the function accepts no parameters.
482
+ * @param options - Optional request options that override client defaults.
483
+ * Supports headers, beforeRequest hook, custom request function, baseUrl override, and streaming mode.
484
+ *
485
+ * @returns A Promise that resolves to a Response object containing status, headers, body, and data.
486
+ * The data property is typed based on the PathOrData generic parameter.
487
+ *
488
+ * @throws {Error} When action is not provided or is empty
489
+ * @throws {ResponseError} When the server returns an error response (status >= 400 or body.error exists)
490
+ * @throws {NetworkError} When network request fails
491
+ *
492
+ * @remarks
493
+ * - All requests are POST requests by default
494
+ * - Action path is automatically converted to lowercase
495
+ * - A unique request ID is generated for each request and sent in X-FaasJS-Request-Id header
496
+ * - Headers are merged from client defaults and request options (request options take precedence)
497
+ * - If a global mock is set via setMock(), it will be used instead of making real requests
498
+ * - If a custom request function is provided in options, it will be used instead of fetch
499
+ * - When stream option is true, returns the native fetch Response instead of a wrapped Response
500
+ * - Response body is automatically parsed as JSON when possible
501
+ * - Server errors (body.error) are automatically converted to ResponseError
502
+ *
503
+ * @example Basic request
504
+ * ```ts
505
+ * const response = await client.action('user', { id: 123 })
506
+ * console.log(response.data)
507
+ * ```
508
+ *
509
+ * @example With no parameters
510
+ * ```ts
511
+ * const response = await client.action('status')
512
+ * console.log(response.data.status)
513
+ * ```
514
+ *
515
+ * @example With custom options
516
+ * ```ts
517
+ * const response = await client.action('data', {
518
+ * limit: 10,
519
+ * offset: 0
520
+ * }, {
521
+ * headers: { 'X-Custom-Header': 'value' }
522
+ * })
523
+ * ```
524
+ *
525
+ * @example Streaming large response
526
+ * ```ts
527
+ * const response = await client.action('stream', {
528
+ * format: 'json'
529
+ * }, {
530
+ * stream: true
531
+ * })
532
+ * // response is native fetch Response with streaming support
533
+ * const reader = response.body.getReader()
534
+ * ```
535
+ *
536
+ * @example With type safety
537
+ * ```ts
538
+ * interface UserData {
539
+ * id: number
540
+ * name: string
541
+ * email: string
542
+ * }
543
+ *
544
+ * const response = await client.action<{
545
+ * action: 'user'
546
+ * params: { id: number }
547
+ * data: UserData
548
+ * }>('user', { id: 123 })
549
+ * console.log(response.data.name) // TypeScript knows it's a string
550
+ * ```
551
+ *
552
+ * @example Handling errors
553
+ * ```ts
554
+ * try {
555
+ * const response = await client.action('user', { id: 123 })
556
+ * console.log(response.data)
557
+ * } catch (error) {
558
+ * if (error instanceof ResponseError) {
559
+ * console.error(`Server error: ${error.message}`, error.status)
560
+ * if (error.data) console.error('Error details:', error.data)
561
+ * } else {
562
+ * console.error('Network error:', error)
563
+ * }
564
+ * }
565
+ * ```
566
+ *
567
+ * @example Chaining requests
568
+ * ```ts
569
+ * const userId = await client.action('createUser', {
570
+ * name: 'John',
571
+ * email: 'john@example.com'
572
+ * })
573
+ *
574
+ * const profile = await client.action('getProfile', {
575
+ * userId: userId.data.id
576
+ * })
577
+ * ```
578
+ */
579
+ async action(action, params, options) {
580
+ if (!action) throw Error("[FaasJS] action required");
581
+ const id = `F-${generateId()}`;
582
+ const url = `${(options?.baseUrl || this.baseUrl) + action.toLowerCase()}?_=${id}`;
583
+ if (!params) params = Object.create(null);
584
+ if (!options) options = Object.create(null);
585
+ const parsedOptions = {
586
+ method: "POST",
587
+ headers: { "Content-Type": "application/json; charset=UTF-8" },
588
+ mode: "cors",
589
+ credentials: "include",
590
+ body: JSON.stringify(params),
591
+ ...this.defaultOptions,
592
+ ...options
593
+ };
594
+ if (!parsedOptions.headers["X-FaasJS-Request-Id"] && !parsedOptions.headers["x-faasjs-request-id"]) parsedOptions.headers["X-FaasJS-Request-Id"] = id;
595
+ if (parsedOptions.beforeRequest) await parsedOptions.beforeRequest({
596
+ action,
597
+ params,
598
+ options: parsedOptions,
599
+ headers: parsedOptions.headers
600
+ });
601
+ if (mock) {
602
+ console.debug(`[FaasJS] Mock request: ${action} %j`, params);
603
+ if (typeof mock === "function") {
604
+ const response = await mock(action, params, parsedOptions);
605
+ if (response instanceof Error) return Promise.reject(new ResponseError(response));
606
+ if (response instanceof Response) return response;
607
+ return new Response(response || {});
608
+ }
609
+ if (mock instanceof Response) return mock;
610
+ return new Response(mock || {});
611
+ }
612
+ if (parsedOptions.request) return parsedOptions.request(url, parsedOptions);
613
+ if (parsedOptions.stream) return fetch(url, parsedOptions);
614
+ return fetch(url, parsedOptions).then(async (response) => {
615
+ const headers = {};
616
+ for (const values of response.headers) headers[values[0]] = values[1];
617
+ return response.text().then((res) => {
618
+ if (response.status >= 200 && response.status < 300) {
619
+ if (!res) return new Response({
620
+ status: response.status,
621
+ headers
622
+ });
623
+ const body = JSON.parse(res);
624
+ if (body.error?.message) return Promise.reject(new ResponseError({
625
+ message: body.error.message,
626
+ status: response.status,
627
+ headers,
628
+ body
629
+ }));
630
+ return new Response({
631
+ status: response.status,
632
+ headers,
633
+ body,
634
+ data: body.data
635
+ });
636
+ }
637
+ try {
638
+ const body = JSON.parse(res);
639
+ if (body.error?.message) return Promise.reject(new ResponseError({
640
+ message: body.error.message,
641
+ status: response.status,
642
+ headers,
643
+ body
644
+ }));
645
+ return Promise.reject(new ResponseError({
646
+ message: res,
647
+ status: response.status,
648
+ headers,
649
+ body
650
+ }));
651
+ } catch (_) {
652
+ return Promise.reject(new ResponseError({
653
+ message: res,
654
+ status: response.status,
655
+ headers,
656
+ body: res
657
+ }));
658
+ }
659
+ });
660
+ });
661
+ }
662
+ };
663
+
664
+ //#endregion
5
665
  //#region src/equal.ts
6
666
  const AsyncFunction = (async () => {}).constructor;
7
667
  /**
@@ -1003,4 +1663,4 @@ function usePrevious(value) {
1003
1663
  }
1004
1664
 
1005
1665
  //#endregion
1006
- export { ErrorBoundary, FaasDataWrapper, FaasReactClient, FormContainer as Form, FormContextProvider, FormDefaultElements, FormDefaultLang, FormDefaultRules, FormInput, FormItem, OptionalWrapper, createSplittingContext, equal, faas, getClient, useConstant, useEqualCallback, useEqualEffect, useEqualMemo, useEqualMemoize, useFaas, useFaasStream, useFormContext, usePrevious, useSplittingState, useStateRef, validValues, withFaasData };
1666
+ export { ErrorBoundary, FaasBrowserClient, FaasDataWrapper, FaasReactClient, FormContainer as Form, FormContextProvider, FormDefaultElements, FormDefaultLang, FormDefaultRules, FormInput, FormItem, OptionalWrapper, Response, ResponseError, createSplittingContext, equal, faas, generateId, getClient, setMock, useConstant, useEqualCallback, useEqualEffect, useEqualMemo, useEqualMemoize, useFaas, useFaasStream, useFormContext, usePrevious, useSplittingState, useStateRef, validValues, withFaasData };