react-fate 1.3.2 → 1.4.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.
Files changed (36) hide show
  1. package/docs/api/functions/FateClient.md +1 -1
  2. package/docs/api/functions/clientRoot.md +1 -1
  3. package/docs/api/functions/createClient.md +1 -1
  4. package/docs/api/functions/createGraphQLTransport.md +1 -1
  5. package/docs/api/functions/createHTTPTransport.md +1 -1
  6. package/docs/api/functions/createTRPCTransport.md +1 -1
  7. package/docs/api/functions/defer.md +1 -1
  8. package/docs/api/functions/graphqlMutation.md +1 -1
  9. package/docs/api/functions/mutation.md +1 -1
  10. package/docs/api/functions/useFateClient.md +2 -2
  11. package/docs/api/functions/useListView.md +1 -1
  12. package/docs/api/functions/useLiveListView.md +1 -1
  13. package/docs/api/functions/useLiveView.md +2 -2
  14. package/docs/api/functions/useRequest.md +2 -2
  15. package/docs/api/functions/useView.md +3 -3
  16. package/docs/api/functions/view.md +1 -1
  17. package/docs/api/type-aliases/ConnectionRef.md +1 -1
  18. package/docs/api/type-aliases/Deferred.md +1 -1
  19. package/docs/api/type-aliases/FateDehydratedState.md +1 -1
  20. package/docs/api/type-aliases/GraphQLMutationDefinition.md +1 -1
  21. package/docs/api/type-aliases/GraphQLMutationInput.md +1 -1
  22. package/docs/api/type-aliases/GraphQLMutationMap.md +1 -1
  23. package/docs/api/type-aliases/GraphQLMutationOutput.md +1 -1
  24. package/docs/api/type-aliases/GraphQLTransportOptions.md +11 -11
  25. package/docs/api/type-aliases/HydrateOptions.md +1 -1
  26. package/docs/api/type-aliases/HydrationLimits.md +1 -1
  27. package/docs/api/type-aliases/InferFateAPI.md +1 -1
  28. package/docs/api/type-aliases/Pagination.md +5 -5
  29. package/docs/api/type-aliases/ViewRef.md +1 -1
  30. package/docs/api/variables/toEntityId.md +1 -1
  31. package/lib/cli.d.mts +1 -1
  32. package/lib/client.d.mts +0 -1
  33. package/lib/index.d.mts +1 -5
  34. package/lib/index.mjs +4 -2
  35. package/lib/vite.d.mts +0 -1
  36. package/package.json +7 -7
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **FateClient**(`__namedParameters`): `Element`
4
4
 
5
- Defined in: [packages/react-fate/src/context.tsx:17](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/context.tsx#L17)
5
+ Defined in: [packages/react-fate/src/context.tsx:17](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/context.tsx#L17)
6
6
 
7
7
  Provider component that supplies a configured `FateClient` to React hooks.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **clientRoot**\<`Result`, `Type`\>(`type`): `RootDefinition`\<`Type`, `Result`\>
4
4
 
5
- Defined in: packages/fate/lib/index.d.mts:75
5
+ Defined in: packages/fate/lib/index.d.mts:66
6
6
 
7
7
  Defines a root query for an entity type, capturing the response shape.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **createClient**\<`T`, `HydrationScope`\>(`options`): `FateClient`\<`T`\[`0`\], `T`\[`1`\], `HydrationScope`\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:943
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:921
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **createGraphQLTransport**\<`Mutations`\>(`__namedParameters`): `Transport`\<`Mutations`\>
4
4
 
5
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:62
5
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:61
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **createHTTPTransport**\<`API`, `Mutations`\>(`__namedParameters`): `Transport`\<`Mutations`\>
4
4
 
5
- Defined in: packages/fate/lib/index.d.mts:53
5
+ Defined in: packages/fate/lib/index.d.mts:52
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **createTRPCTransport**\<`AppRouter`, `Mutations`\>(`__namedParameters`): `Transport`\<`MutationMapFromResolvers`\<`Mutations`\>\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1432
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1420
6
6
 
7
7
  Builds a `Transport` backed by a tRPC client using the configured resolvers
8
8
  for by-id queries, lists, and mutations.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **defer**\<`S`\>(`selection`): `DeferredSelection`\<`S`\>
4
4
 
5
- Defined in: packages/fate/lib/index.d.mts:7
5
+ Defined in: packages/fate/lib/index.d.mts:6
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **graphqlMutation**\<`T`, `Input`, `Output`\>(`entity`, `options`): [`GraphQLMutationDefinition`](../type-aliases/GraphQLMutationDefinition.md)\<`T`, `Input`, `Output`\>
4
4
 
5
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:58
5
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:57
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **mutation**\<`T`, `I`, `R`\>(`entity`): `MutationDefinition`\<`T`, `I`, `R`\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:950
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:928
6
6
 
7
7
  Defines a mutation for a given entity type, preserving the input and output
8
8
  types for transports.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **useFateClient**\<`T`\>(): `FateClient`\<`T`\[`0`\], `T`\[`1`\]\>
4
4
 
5
- Defined in: [packages/react-fate/src/context.tsx:30](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/context.tsx#L30)
5
+ Defined in: [packages/react-fate/src/context.tsx:30](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/context.tsx#L30)
6
6
 
7
7
  Returns the nearest `FateClient` from context.
8
8
 
@@ -10,7 +10,7 @@ Returns the nearest `FateClient` from context.
10
10
 
11
11
  ### T
12
12
 
13
- `T` *extends* \[\{ `categories`: `RootDefinition`\<`"Category"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `category`: `RootDefinition`\<`"Category"`, `unknown`\>; `comment`: `RootDefinition`\<`"Comment"`, `unknown`\>; `commentSearch`: `RootDefinition`\<`"Comment"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `event`: `RootDefinition`\<`"Event"`, `unknown`\>; `events`: `RootDefinition`\<`"Event"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `post`: `RootDefinition`\<`"Post"`, `unknown`\>; `posts`: `RootDefinition`\<`"Post"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `viewer`: `RootDefinition`\<`"User"`, `User` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `content`: `string`; `postId`: `string`; `select`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `id`: `string`; `select?`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `post.add`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `content`: `string`; `select`: `string`[]; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `select`: `string`[]; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `id`: `string`; `select`: `string`[]; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `args?`: `unknown`; `name`: `string`; `select`: `string`[]; \}, `Record`\<`string`, `unknown`\>\>; \}\] = \[\{ `categories`: `RootDefinition`\<`"Category"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `category`: `RootDefinition`\<`"Category"`, `unknown`\>; `comment`: `RootDefinition`\<`"Comment"`, `unknown`\>; `commentSearch`: `RootDefinition`\<`"Comment"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `event`: `RootDefinition`\<`"Event"`, `unknown`\>; `events`: `RootDefinition`\<`"Event"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `post`: `RootDefinition`\<`"Post"`, `unknown`\>; `posts`: `RootDefinition`\<`"Post"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `viewer`: `RootDefinition`\<`"User"`, `User` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `content`: `string`; `postId`: `string`; `select`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `id`: `string`; `select?`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `post.add`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `content`: `string`; `select`: `string`[]; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `select`: `string`[]; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `id`: `string`; `select`: `string`[]; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `args?`: `unknown`; `name`: `string`; `select`: `string`[]; \}, `Record`\<`string`, `unknown`\>\>; \}\]
13
+ `T` *extends* \[\{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `content`: `string`; `postId`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `id`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `post.add`: `MutationDefinition`\<`Post`, \{ `content`: `string`; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `id`: `string`; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `name`: `string`; \}, `AnyRecord`\>; \}\] = \[\{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `content`: `string`; `postId`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `id`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `post.add`: `MutationDefinition`\<`Post`, \{ `content`: `string`; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `id`: `string`; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `name`: `string`; \}, `AnyRecord`\>; \}\]
14
14
 
15
15
  ## Returns
16
16
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **useListView**\<`C`\>(`selection`, `connection`): \[`ConnectionItems`\<`ResolvedConnection`\<`C`\>\>, `LoadMoreFn` \| `null`, `LoadMoreFn` \| `null`\]
4
4
 
5
- Defined in: [packages/react-fate/src/useListView.tsx:19](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useListView.tsx#L19)
5
+ Defined in: [packages/react-fate/src/useListView.tsx:19](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useListView.tsx#L19)
6
6
 
7
7
  Subscribes to a connection field, returning the current items and pagination
8
8
  helpers to load the next or previous page.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **useLiveListView**\<`C`\>(`selection`, `connection`): \[`ConnectionItems`\<`ResolvedConnection`\<`C`\>\>, `LoadMoreFn` \| `null`, `LoadMoreFn` \| `null`\]
4
4
 
5
- Defined in: [packages/react-fate/src/useLiveListView.tsx:19](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useLiveListView.tsx#L19)
5
+ Defined in: [packages/react-fate/src/useLiveListView.tsx:19](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useLiveListView.tsx#L19)
6
6
 
7
7
  Subscribes to a connection field, returning live-updating items and pagination
8
8
  helpers to load the next or previous page.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **useLiveView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
6
6
 
7
- Defined in: [packages/react-fate/src/useLiveView.tsx:27](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useLiveView.tsx#L27)
7
+ Defined in: [packages/react-fate/src/useLiveView.tsx:27](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useLiveView.tsx#L27)
8
8
 
9
9
  Resolves a reference against a view and subscribes to live server updates for
10
10
  that selection.
@@ -43,7 +43,7 @@ const post = useLiveView(PostView, postRef);
43
43
 
44
44
  > **useLiveView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
45
45
 
46
- Defined in: [packages/react-fate/src/useLiveView.tsx:31](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useLiveView.tsx#L31)
46
+ Defined in: [packages/react-fate/src/useLiveView.tsx:31](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useLiveView.tsx#L31)
47
47
 
48
48
  Resolves a reference against a view and subscribes to live server updates for
49
49
  that selection.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **useRequest**\<`R`, `O`\>(`request`, `options?`): `RequestResult`\<`O`, `R`\>
4
4
 
5
- Defined in: [packages/react-fate/src/useRequest.tsx:25](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useRequest.tsx#L25)
5
+ Defined in: [packages/react-fate/src/useRequest.tsx:25](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useRequest.tsx#L25)
6
6
 
7
7
  Declares the data a screen needs and kicks off fetching, suspending while the
8
8
  request resolves.
@@ -15,7 +15,7 @@ request resolves.
15
15
 
16
16
  ### O
17
17
 
18
- `O` *extends* `FateRoots` = \{ `categories`: `RootDefinition`\<`"Category"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `category`: `RootDefinition`\<`"Category"`, `unknown`\>; `comment`: `RootDefinition`\<`"Comment"`, `unknown`\>; `commentSearch`: `RootDefinition`\<`"Comment"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `event`: `RootDefinition`\<`"Event"`, `unknown`\>; `events`: `RootDefinition`\<`"Event"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `post`: `RootDefinition`\<`"Post"`, `unknown`\>; `posts`: `RootDefinition`\<`"Post"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `viewer`: `RootDefinition`\<`"User"`, `User` \| `null`\>; \}
18
+ `O` *extends* `FateRoots` = \{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}
19
19
 
20
20
  ## Parameters
21
21
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **useView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
6
6
 
7
- Defined in: [packages/react-fate/src/useView.tsx:40](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useView.tsx#L40)
7
+ Defined in: [packages/react-fate/src/useView.tsx:40](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useView.tsx#L40)
8
8
 
9
9
  Resolves a reference against a view and subscribes to updates for that selection.
10
10
 
@@ -42,7 +42,7 @@ const post = useView(PostView, postRef);
42
42
 
43
43
  > **useView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
44
44
 
45
- Defined in: [packages/react-fate/src/useView.tsx:44](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useView.tsx#L44)
45
+ Defined in: [packages/react-fate/src/useView.tsx:44](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useView.tsx#L44)
46
46
 
47
47
  Resolves a reference against a view and subscribes to updates for that selection.
48
48
 
@@ -80,7 +80,7 @@ const post = useView(PostView, postRef);
80
80
 
81
81
  > **useView**\<`V`\>(`view`, `ref`): `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\> \| `null`
82
82
 
83
- Defined in: [packages/react-fate/src/useView.tsx:48](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/react-fate/src/useView.tsx#L48)
83
+ Defined in: [packages/react-fate/src/useView.tsx:48](https://github.com/nkzw-tech/fate/blob/aec05ea2ab0386693600d573021cd2a93f1d8b59/packages/react-fate/src/useView.tsx#L48)
84
84
 
85
85
  Resolves a reference against a view and subscribes to updates for that selection.
86
86
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **view**\<`T`\>(): \<`S`\>(`select`) => `View`\<`T`, `S`\>
4
4
 
5
- Defined in: packages/fate/lib/index.d.mts:94
5
+ Defined in: packages/fate/lib/index.d.mts:85
6
6
 
7
7
  Creates a reusable view for an object using the declared selection.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **ConnectionRef**\<`TName`\> = `Readonly`\<\{ `items`: `ReadonlyArray`\<\{ `cursor?`: `string`; `node`: [`ViewRef`](ViewRef.md)\<`TName`\>; \}\>; `pagination?`: [`Pagination`](Pagination.md); \}\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1107
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1095
6
6
 
7
7
  Ref for a connection, including pagination metadata.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Deferred**\<`T`\> = `Readonly`\<\{ `[DeferredTag]`: `DeferredMetadata`; \}\> & `object`
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1127
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1115
6
6
 
7
7
  A deferred value returned from a masked view. Existing view hooks resolve it when read.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **FateDehydratedState**\<`Scope`\> = `Readonly`\<\{ `[hydrationScopeBrand]?`: `Scope`; `data`: `FateSerializedValue`; `scope`: `Scope`; `version`: `1`; \}\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:685
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:653
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **GraphQLMutationDefinition**\<`T`, `Input`, `Output`\> = `Readonly`\<\{ `__fateGraphQLMutation?`: \{ `input`: `Input`; `output`: `Output`; \}; `entity`: `T`\[`"__typename"`\]; `field`: `string`; `inputArg?`: `false` \| `string`; \}\>
4
4
 
5
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:20
5
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:19
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **GraphQLMutationInput**\<`Definition`\> = `Definition` *extends* [`GraphQLMutationDefinition`](GraphQLMutationDefinition.md)\<`any`, infer Input, `any`\> ? `Input` : `never`
4
4
 
5
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:29
5
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:28
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **GraphQLMutationMap**\<`Mutations`\> = `Mutations` *extends* `Record`\<`string`, [`GraphQLMutationDefinition`](GraphQLMutationDefinition.md)\> ? `{ [K in keyof Mutations]: { input: GraphQLMutationInput<Mutations[K]>; output: GraphQLMutationOutput<Mutations[K]> } }` : `EmptyTransportMutations`
4
4
 
5
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:31
5
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:30
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **GraphQLMutationOutput**\<`Definition`\> = `Definition` *extends* [`GraphQLMutationDefinition`](GraphQLMutationDefinition.md)\<`any`, `any`, infer Output\> ? `Output` : `never`
4
4
 
5
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:30
5
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:29
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **GraphQLTransportOptions**\<`Mutations`\> = `object`
4
4
 
5
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:46
5
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:45
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -16,7 +16,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:46
16
16
 
17
17
  > `optional` **decodeNodeId?**: (`type`, `id`) => `string` \| `number`
18
18
 
19
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:47
19
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:46
20
20
 
21
21
  #### Parameters
22
22
 
@@ -38,7 +38,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:47
38
38
 
39
39
  > `optional` **encodeNodeId?**: (`type`, `id`) => `string` \| `number`
40
40
 
41
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:48
41
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:47
42
42
 
43
43
  #### Parameters
44
44
 
@@ -60,7 +60,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:48
60
60
 
61
61
  > `optional` **eventSource?**: `EventSourceConstructor`
62
62
 
63
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:49
63
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:48
64
64
 
65
65
  ***
66
66
 
@@ -68,7 +68,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:49
68
68
 
69
69
  > `optional` **fetch?**: `FetchLike`
70
70
 
71
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:50
71
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:49
72
72
 
73
73
  ***
74
74
 
@@ -76,7 +76,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:50
76
76
 
77
77
  > `optional` **headers?**: `HeadersFactory`
78
78
 
79
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:51
79
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:50
80
80
 
81
81
  ***
82
82
 
@@ -84,7 +84,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:51
84
84
 
85
85
  > `optional` **live?**: `boolean` \| `GraphQLLiveOptions`
86
86
 
87
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:52
87
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:51
88
88
 
89
89
  ***
90
90
 
@@ -92,7 +92,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:52
92
92
 
93
93
  > `optional` **mutations?**: `Record`\<`Extract`\<keyof `Mutations`, `string`\>, `GraphQLMutationRuntimeConfig`\>
94
94
 
95
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:53
95
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:52
96
96
 
97
97
  ***
98
98
 
@@ -100,7 +100,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:53
100
100
 
101
101
  > `optional` **roots?**: `Record`\<`string`, `GraphQLRootConfig`\>
102
102
 
103
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:54
103
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:53
104
104
 
105
105
  ***
106
106
 
@@ -108,7 +108,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:54
108
108
 
109
109
  > **types**: `ReadonlyArray`\<`Omit`\<`TypeConfig`, `"getId"`\> & `Partial`\<`Pick`\<`TypeConfig`, `"getId"`\>\>\>
110
110
 
111
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:55
111
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:54
112
112
 
113
113
  ***
114
114
 
@@ -116,4 +116,4 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:55
116
116
 
117
117
  > **url**: `string` \| `URL`
118
118
 
119
- Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:56
119
+ Defined in: packages/fate/lib/graphqlTransport-Bbqw7tra.d.mts:55
@@ -2,6 +2,6 @@
2
2
 
3
3
  > **HydrateOptions** = `Readonly`\<\{ `merge?`: `"preserve-existing"` \| `"replace"`; \}\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:692
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:660
6
6
 
7
7
  Controls how `FateClient.hydrate()` reconciles a snapshot with browser cache state.
@@ -2,6 +2,6 @@
2
2
 
3
3
  > **HydrationLimits** = `Readonly`\<\{ `maxCollectionLength`: `number`; `maxNodes`: `number`; `maxStringLength`: `number`; \}\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:702
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:670
6
6
 
7
7
  Resource limits applied while encoding and decoding hydration snapshots.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **InferFateAPI**\<`Server`\> = `Server` *extends* `object` ? `API` : `never`
4
4
 
5
- Defined in: packages/fate/lib/record-BkvZwvFk.d.mts:207
5
+ Defined in: packages/fate/lib/record-QjUyXD7K.d.mts:206
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Pagination** = `object`
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1100
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1088
6
6
 
7
7
  Pagination state returned alongside connection lists.
8
8
 
@@ -12,7 +12,7 @@ Pagination state returned alongside connection lists.
12
12
 
13
13
  > **hasNext**: `boolean`
14
14
 
15
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1101
15
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1089
16
16
 
17
17
  ***
18
18
 
@@ -20,7 +20,7 @@ Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1101
20
20
 
21
21
  > **hasPrevious**: `boolean`
22
22
 
23
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1102
23
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1090
24
24
 
25
25
  ***
26
26
 
@@ -28,7 +28,7 @@ Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1102
28
28
 
29
29
  > `optional` **nextCursor?**: `string`
30
30
 
31
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1103
31
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1091
32
32
 
33
33
  ***
34
34
 
@@ -36,4 +36,4 @@ Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1103
36
36
 
37
37
  > `optional` **previousCursor?**: `string`
38
38
 
39
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1104
39
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1092
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **ViewRef**\<`TName`\> = `Readonly`\<\{ `__typename`: `TName`; `[ViewsTag]`: `Set`\<`string`\>; `id`: `string` \| `number`; \}\>
4
4
 
5
- Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1082
5
+ Defined in: packages/fate/lib/transport-C9ehhZnC.d.mts:1064
6
6
 
7
7
  Reference to a normalized entity instance that can be resolved against one or more view tags.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > `const` **toEntityId**: (`type`, `rawId`) => `EntityId`
4
4
 
5
- Defined in: packages/fate/lib/index.d.mts:81
5
+ Defined in: packages/fate/lib/index.d.mts:72
6
6
 
7
7
  Builds the canonical cache ID for an entity.
8
8
 
package/lib/cli.d.mts CHANGED
@@ -1 +1 @@
1
- export { };
1
+ import "@nkzw/fate/cli";
package/lib/client.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { createFateClient } from "@nkzw/fate/client";
2
-
3
2
  //#region src/client.d.ts
4
3
  interface ClientMutations {}
5
4
  interface ClientRoots {}
package/lib/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { ConnectionRef, Deferred, Deferred as Deferred$1, FateClient as FateClient$1, FateDehydratedState, FateMutations, FateRoots, GraphQLMutationDefinition, GraphQLMutationInput, GraphQLMutationMap, GraphQLMutationOutput, GraphQLTransportOptions, HydrateOptions, HydrationLimits, InferFateAPI, Pagination, Pagination as Pagination$1, Request, RequestOptions, RequestResult, View, ViewData, ViewEntity, ViewEntityName, ViewRef, ViewRef as ViewRef$1, ViewSelection, clientRoot, createClient, createGraphQLTransport, createHTTPTransport, createTRPCTransport, defer, graphqlMutation, mutation, toEntityId, view } from "@nkzw/fate";
2
2
  import { ReactNode } from "react";
3
-
4
3
  //#region src/useRequest.d.ts
5
4
  type GeneratedFateClient$1 = ReturnType<typeof import('react-fate/client').createFateClient>;
6
5
  type Roots = [GeneratedFateClient$1] extends [never] ? FateRoots : GeneratedFateClient$1 extends FateClient$1<infer R, any> ? R : FateRoots;
@@ -19,10 +18,7 @@ type Mutations = [GeneratedFateClient] extends [never] ? FateMutations : Generat
19
18
  /**
20
19
  * Provider component that supplies a configured `FateClient` to React hooks.
21
20
  */
22
- declare function FateClient({
23
- children,
24
- client
25
- }: {
21
+ declare function FateClient({ children, client }: {
26
22
  children: ReactNode;
27
23
  client: FateClient$1<any, any>;
28
24
  }): import("react").JSX.Element;
package/lib/index.mjs CHANGED
@@ -78,6 +78,7 @@ function useView(view, ref) {
78
78
  }
79
79
  mergedSnapshotRef.current = null;
80
80
  snapshotRef.current = null;
81
+ if (!coverage.length) return snapshot;
81
82
  return Promise.resolve(snapshot).then((value) => {
82
83
  const resolved = mergeCoverage(value);
83
84
  snapshotRef.current = resolved;
@@ -137,7 +138,7 @@ function useView(view, ref) {
137
138
  isDeferredRef,
138
139
  readViewSnapshot
139
140
  ]);
140
- const snapshot = use(useDeferredValue(useSyncExternalStore(useCallback((onStoreChange) => {
141
+ const subscribe = useCallback((onStoreChange) => {
141
142
  if (ref === null) {
142
143
  snapshotRef.current = null;
143
144
  return () => {};
@@ -167,7 +168,8 @@ function useView(view, ref) {
167
168
  for (const unsubscribe of subscriptions.values()) unsubscribe();
168
169
  subscriptions.clear();
169
170
  };
170
- }, [client.store, ref]), getSnapshot, getSnapshot)));
171
+ }, [client.store, ref]);
172
+ const snapshot = use(useDeferredValue(useSyncExternalStore(subscribe, getSnapshot, getSnapshot)));
171
173
  return snapshot ? snapshot.data : null;
172
174
  }
173
175
  //#endregion
package/lib/vite.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { FateViteTransport, fate as fate$1 } from "@nkzw/fate/vite";
2
-
3
2
  //#region src/vite.d.ts
4
3
  type FateVitePluginOptions = {
5
4
  generatedFile?: false | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-fate",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "fate is a modern data client for React.",
5
5
  "homepage": "https://github.com/nkzw-tech/fate",
6
6
  "license": "MIT",
@@ -40,19 +40,19 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@nkzw/fate": "^1.3.2"
43
+ "@nkzw/fate": "^1.4.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/react": "^19.2.17",
47
- "@types/react-dom": "^19.2.3",
48
- "react": "^19.2.7",
49
- "react-dom": "^19.2.7"
46
+ "@types/react": "^19.2.18",
47
+ "@types/react-dom": "^19.2.7",
48
+ "react": "^19.2.8",
49
+ "react-dom": "^19.2.8"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": "^19.2.0",
53
53
  "react-dom": "^19.2.0"
54
54
  },
55
55
  "scripts": {
56
- "build": "vp pack -d lib --target=node24 src/index.tsx src/client.ts src/cli.ts src/vite.ts"
56
+ "build": "vp pack --tsconfig tsconfig.json -d lib --target=node24 src/index.tsx src/client.ts src/cli.ts src/vite.ts"
57
57
  }
58
58
  }