houdini-react 0.0.0-20231008055552

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 (236) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/build/plugin/codegen/entries.d.ts +5 -0
  4. package/build/plugin/codegen/index.d.ts +13 -0
  5. package/build/plugin/codegen/manifest.d.ts +5 -0
  6. package/build/plugin/codegen/render.d.ts +5 -0
  7. package/build/plugin/codegen/router.d.ts +7 -0
  8. package/build/plugin/codegen/typeRoot.d.ts +6 -0
  9. package/build/plugin/config.d.ts +4 -0
  10. package/build/plugin/dedent.d.ts +1 -0
  11. package/build/plugin/extract.d.ts +6 -0
  12. package/build/plugin/index.d.ts +7 -0
  13. package/build/plugin/transform.d.ts +6 -0
  14. package/build/plugin/vite.d.ts +54 -0
  15. package/build/plugin-cjs/index.js +79966 -0
  16. package/build/plugin-cjs/package.json +1 -0
  17. package/build/plugin-esm/index.js +79956 -0
  18. package/build/plugin-esm/package.json +1 -0
  19. package/build/runtime/client.d.ts +3 -0
  20. package/build/runtime/clientPlugin.d.ts +3 -0
  21. package/build/runtime/hooks/index.d.ts +8 -0
  22. package/build/runtime/hooks/useDeepCompareEffect.d.ts +35 -0
  23. package/build/runtime/hooks/useDocumentHandle.d.ts +34 -0
  24. package/build/runtime/hooks/useDocumentStore.d.ts +12 -0
  25. package/build/runtime/hooks/useDocumentSubscription.d.ts +15 -0
  26. package/build/runtime/hooks/useFragment.d.ts +16 -0
  27. package/build/runtime/hooks/useFragmentHandle.d.ts +8 -0
  28. package/build/runtime/hooks/useIsMounted.d.ts +3 -0
  29. package/build/runtime/hooks/useMutation.d.ts +10 -0
  30. package/build/runtime/hooks/useQuery.d.ts +5 -0
  31. package/build/runtime/hooks/useQueryHandle.d.ts +10 -0
  32. package/build/runtime/hooks/useSubscription.d.ts +4 -0
  33. package/build/runtime/hooks/useSubscriptionHandle.d.ts +25 -0
  34. package/build/runtime/index.d.ts +11 -0
  35. package/build/runtime/manifest.d.ts +3 -0
  36. package/build/runtime/routing/Router.d.ts +67 -0
  37. package/build/runtime/routing/cache.d.ts +7 -0
  38. package/build/runtime/routing/index.d.ts +2 -0
  39. package/build/runtime/server/index.d.ts +17 -0
  40. package/build/runtime/server/renderToStream/createBuffer.d.ts +17 -0
  41. package/build/runtime/server/renderToStream/createPipeWrapper.d.ts +12 -0
  42. package/build/runtime/server/renderToStream/createReadableWrapper.d.ts +6 -0
  43. package/build/runtime/server/renderToStream/loadNodeStreamModule.d.ts +10 -0
  44. package/build/runtime/server/renderToStream/resolveSeoStrategy.d.ts +9 -0
  45. package/build/runtime/server/renderToStream.d.ts +28 -0
  46. package/build/runtime/server/shared/initData.d.ts +8 -0
  47. package/build/runtime/server/shared/key.d.ts +4 -0
  48. package/build/runtime/server/shared/utils.d.ts +3 -0
  49. package/build/runtime/server/useStream.d.ts +9 -0
  50. package/build/runtime/server/utils/assert.d.ts +15 -0
  51. package/build/runtime/server/utils/createErrorWithCleanStackTrace.d.ts +2 -0
  52. package/build/runtime/server/utils/debug.d.ts +14 -0
  53. package/build/runtime/server/utils/getGlobalVariable.d.ts +4 -0
  54. package/build/runtime/server/utils/isBrowser.d.ts +2 -0
  55. package/build/runtime/server/utils/isCallable.d.ts +2 -0
  56. package/build/runtime/server/utils/isClientSide.d.ts +2 -0
  57. package/build/runtime/server/utils/isPromise.d.ts +1 -0
  58. package/build/runtime/server/utils/isServerSide.d.ts +2 -0
  59. package/build/runtime/server/utils/objectAssign.d.ts +2 -0
  60. package/build/runtime/server/utils/projectInfo.d.ts +10 -0
  61. package/build/runtime/server/utils.d.ts +4 -0
  62. package/build/runtime-cjs/client.d.ts +3 -0
  63. package/build/runtime-cjs/client.js +27 -0
  64. package/build/runtime-cjs/clientPlugin.d.ts +3 -0
  65. package/build/runtime-cjs/clientPlugin.js +39 -0
  66. package/build/runtime-cjs/hooks/index.d.ts +8 -0
  67. package/build/runtime-cjs/hooks/index.js +45 -0
  68. package/build/runtime-cjs/hooks/useDeepCompareEffect.d.ts +35 -0
  69. package/build/runtime-cjs/hooks/useDeepCompareEffect.js +72 -0
  70. package/build/runtime-cjs/hooks/useDocumentHandle.d.ts +34 -0
  71. package/build/runtime-cjs/hooks/useDocumentHandle.js +131 -0
  72. package/build/runtime-cjs/hooks/useDocumentStore.d.ts +12 -0
  73. package/build/runtime-cjs/hooks/useDocumentStore.js +68 -0
  74. package/build/runtime-cjs/hooks/useDocumentSubscription.d.ts +15 -0
  75. package/build/runtime-cjs/hooks/useDocumentSubscription.js +72 -0
  76. package/build/runtime-cjs/hooks/useFragment.d.ts +16 -0
  77. package/build/runtime-cjs/hooks/useFragment.js +97 -0
  78. package/build/runtime-cjs/hooks/useFragmentHandle.d.ts +8 -0
  79. package/build/runtime-cjs/hooks/useFragmentHandle.js +47 -0
  80. package/build/runtime-cjs/hooks/useIsMounted.d.ts +3 -0
  81. package/build/runtime-cjs/hooks/useIsMounted.js +38 -0
  82. package/build/runtime-cjs/hooks/useMutation.d.ts +10 -0
  83. package/build/runtime-cjs/hooks/useMutation.js +50 -0
  84. package/build/runtime-cjs/hooks/useQuery.d.ts +5 -0
  85. package/build/runtime-cjs/hooks/useQuery.js +32 -0
  86. package/build/runtime-cjs/hooks/useQueryHandle.d.ts +10 -0
  87. package/build/runtime-cjs/hooks/useQueryHandle.js +125 -0
  88. package/build/runtime-cjs/hooks/useSubscription.d.ts +4 -0
  89. package/build/runtime-cjs/hooks/useSubscription.js +32 -0
  90. package/build/runtime-cjs/hooks/useSubscriptionHandle.d.ts +25 -0
  91. package/build/runtime-cjs/hooks/useSubscriptionHandle.js +42 -0
  92. package/build/runtime-cjs/index.d.ts +11 -0
  93. package/build/runtime-cjs/index.js +77 -0
  94. package/build/runtime-cjs/manifest.d.ts +3 -0
  95. package/build/runtime-cjs/manifest.js +27 -0
  96. package/build/runtime-cjs/package.json +1 -0
  97. package/build/runtime-cjs/routing/Router.d.ts +67 -0
  98. package/build/runtime-cjs/routing/Router.js +429 -0
  99. package/build/runtime-cjs/routing/cache.d.ts +7 -0
  100. package/build/runtime-cjs/routing/cache.js +58 -0
  101. package/build/runtime-cjs/routing/index.d.ts +2 -0
  102. package/build/runtime-cjs/routing/index.js +30 -0
  103. package/build/runtime-cjs/server/index.d.ts +17 -0
  104. package/build/runtime-cjs/server/index.js +28 -0
  105. package/build/runtime-cjs/server/renderToStream/createBuffer.d.ts +17 -0
  106. package/build/runtime-cjs/server/renderToStream/createBuffer.js +101 -0
  107. package/build/runtime-cjs/server/renderToStream/createPipeWrapper.d.ts +12 -0
  108. package/build/runtime-cjs/server/renderToStream/createPipeWrapper.js +90 -0
  109. package/build/runtime-cjs/server/renderToStream/createReadableWrapper.d.ts +6 -0
  110. package/build/runtime-cjs/server/renderToStream/createReadableWrapper.js +85 -0
  111. package/build/runtime-cjs/server/renderToStream/loadNodeStreamModule.d.ts +10 -0
  112. package/build/runtime-cjs/server/renderToStream/loadNodeStreamModule.js +51 -0
  113. package/build/runtime-cjs/server/renderToStream/resolveSeoStrategy.d.ts +9 -0
  114. package/build/runtime-cjs/server/renderToStream/resolveSeoStrategy.js +44 -0
  115. package/build/runtime-cjs/server/renderToStream.d.ts +28 -0
  116. package/build/runtime-cjs/server/renderToStream.js +183 -0
  117. package/build/runtime-cjs/server/shared/initData.d.ts +8 -0
  118. package/build/runtime-cjs/server/shared/initData.js +28 -0
  119. package/build/runtime-cjs/server/shared/key.d.ts +4 -0
  120. package/build/runtime-cjs/server/shared/key.js +45 -0
  121. package/build/runtime-cjs/server/shared/utils.d.ts +3 -0
  122. package/build/runtime-cjs/server/shared/utils.js +20 -0
  123. package/build/runtime-cjs/server/useStream.d.ts +9 -0
  124. package/build/runtime-cjs/server/useStream.js +44 -0
  125. package/build/runtime-cjs/server/utils/assert.d.ts +15 -0
  126. package/build/runtime-cjs/server/utils/assert.js +119 -0
  127. package/build/runtime-cjs/server/utils/createErrorWithCleanStackTrace.d.ts +2 -0
  128. package/build/runtime-cjs/server/utils/createErrorWithCleanStackTrace.js +62 -0
  129. package/build/runtime-cjs/server/utils/debug.d.ts +14 -0
  130. package/build/runtime-cjs/server/utils/debug.js +112 -0
  131. package/build/runtime-cjs/server/utils/getGlobalVariable.d.ts +4 -0
  132. package/build/runtime-cjs/server/utils/getGlobalVariable.js +32 -0
  133. package/build/runtime-cjs/server/utils/isBrowser.d.ts +2 -0
  134. package/build/runtime-cjs/server/utils/isBrowser.js +30 -0
  135. package/build/runtime-cjs/server/utils/isCallable.d.ts +2 -0
  136. package/build/runtime-cjs/server/utils/isCallable.js +30 -0
  137. package/build/runtime-cjs/server/utils/isClientSide.d.ts +2 -0
  138. package/build/runtime-cjs/server/utils/isClientSide.js +30 -0
  139. package/build/runtime-cjs/server/utils/isPromise.d.ts +1 -0
  140. package/build/runtime-cjs/server/utils/isPromise.js +31 -0
  141. package/build/runtime-cjs/server/utils/isServerSide.d.ts +2 -0
  142. package/build/runtime-cjs/server/utils/isServerSide.js +31 -0
  143. package/build/runtime-cjs/server/utils/objectAssign.d.ts +2 -0
  144. package/build/runtime-cjs/server/utils/objectAssign.js +30 -0
  145. package/build/runtime-cjs/server/utils/projectInfo.d.ts +10 -0
  146. package/build/runtime-cjs/server/utils/projectInfo.js +37 -0
  147. package/build/runtime-cjs/server/utils.d.ts +4 -0
  148. package/build/runtime-cjs/server/utils.js +21 -0
  149. package/build/runtime-esm/client.d.ts +3 -0
  150. package/build/runtime-esm/client.js +5 -0
  151. package/build/runtime-esm/clientPlugin.d.ts +3 -0
  152. package/build/runtime-esm/clientPlugin.js +17 -0
  153. package/build/runtime-esm/hooks/index.d.ts +8 -0
  154. package/build/runtime-esm/hooks/index.js +16 -0
  155. package/build/runtime-esm/hooks/useDeepCompareEffect.d.ts +35 -0
  156. package/build/runtime-esm/hooks/useDeepCompareEffect.js +41 -0
  157. package/build/runtime-esm/hooks/useDocumentHandle.d.ts +34 -0
  158. package/build/runtime-esm/hooks/useDocumentHandle.js +101 -0
  159. package/build/runtime-esm/hooks/useDocumentStore.d.ts +12 -0
  160. package/build/runtime-esm/hooks/useDocumentStore.js +38 -0
  161. package/build/runtime-esm/hooks/useDocumentSubscription.d.ts +15 -0
  162. package/build/runtime-esm/hooks/useDocumentSubscription.js +42 -0
  163. package/build/runtime-esm/hooks/useFragment.d.ts +16 -0
  164. package/build/runtime-esm/hooks/useFragment.js +66 -0
  165. package/build/runtime-esm/hooks/useFragmentHandle.d.ts +8 -0
  166. package/build/runtime-esm/hooks/useFragmentHandle.js +23 -0
  167. package/build/runtime-esm/hooks/useIsMounted.d.ts +3 -0
  168. package/build/runtime-esm/hooks/useIsMounted.js +14 -0
  169. package/build/runtime-esm/hooks/useMutation.d.ts +10 -0
  170. package/build/runtime-esm/hooks/useMutation.js +26 -0
  171. package/build/runtime-esm/hooks/useQuery.d.ts +5 -0
  172. package/build/runtime-esm/hooks/useQuery.js +8 -0
  173. package/build/runtime-esm/hooks/useQueryHandle.d.ts +10 -0
  174. package/build/runtime-esm/hooks/useQueryHandle.js +95 -0
  175. package/build/runtime-esm/hooks/useSubscription.d.ts +4 -0
  176. package/build/runtime-esm/hooks/useSubscription.js +8 -0
  177. package/build/runtime-esm/hooks/useSubscriptionHandle.d.ts +25 -0
  178. package/build/runtime-esm/hooks/useSubscriptionHandle.js +18 -0
  179. package/build/runtime-esm/index.d.ts +11 -0
  180. package/build/runtime-esm/index.js +45 -0
  181. package/build/runtime-esm/manifest.d.ts +3 -0
  182. package/build/runtime-esm/manifest.js +5 -0
  183. package/build/runtime-esm/package.json +1 -0
  184. package/build/runtime-esm/routing/Router.d.ts +67 -0
  185. package/build/runtime-esm/routing/Router.js +390 -0
  186. package/build/runtime-esm/routing/cache.d.ts +7 -0
  187. package/build/runtime-esm/routing/cache.js +33 -0
  188. package/build/runtime-esm/routing/index.d.ts +2 -0
  189. package/build/runtime-esm/routing/index.js +5 -0
  190. package/build/runtime-esm/server/index.d.ts +17 -0
  191. package/build/runtime-esm/server/index.js +4 -0
  192. package/build/runtime-esm/server/renderToStream/createBuffer.d.ts +17 -0
  193. package/build/runtime-esm/server/renderToStream/createBuffer.js +77 -0
  194. package/build/runtime-esm/server/renderToStream/createPipeWrapper.d.ts +12 -0
  195. package/build/runtime-esm/server/renderToStream/createPipeWrapper.js +66 -0
  196. package/build/runtime-esm/server/renderToStream/createReadableWrapper.d.ts +6 -0
  197. package/build/runtime-esm/server/renderToStream/createReadableWrapper.js +61 -0
  198. package/build/runtime-esm/server/renderToStream/loadNodeStreamModule.d.ts +10 -0
  199. package/build/runtime-esm/server/renderToStream/loadNodeStreamModule.js +20 -0
  200. package/build/runtime-esm/server/renderToStream/resolveSeoStrategy.d.ts +9 -0
  201. package/build/runtime-esm/server/renderToStream/resolveSeoStrategy.js +20 -0
  202. package/build/runtime-esm/server/renderToStream.d.ts +28 -0
  203. package/build/runtime-esm/server/renderToStream.js +152 -0
  204. package/build/runtime-esm/server/shared/initData.d.ts +8 -0
  205. package/build/runtime-esm/server/shared/initData.js +4 -0
  206. package/build/runtime-esm/server/shared/key.d.ts +4 -0
  207. package/build/runtime-esm/server/shared/key.js +20 -0
  208. package/build/runtime-esm/server/shared/utils.d.ts +3 -0
  209. package/build/runtime-esm/server/shared/utils.js +3 -0
  210. package/build/runtime-esm/server/useStream.d.ts +9 -0
  211. package/build/runtime-esm/server/useStream.js +13 -0
  212. package/build/runtime-esm/server/utils/assert.d.ts +15 -0
  213. package/build/runtime-esm/server/utils/assert.js +91 -0
  214. package/build/runtime-esm/server/utils/createErrorWithCleanStackTrace.d.ts +2 -0
  215. package/build/runtime-esm/server/utils/createErrorWithCleanStackTrace.js +38 -0
  216. package/build/runtime-esm/server/utils/debug.d.ts +14 -0
  217. package/build/runtime-esm/server/utils/debug.js +87 -0
  218. package/build/runtime-esm/server/utils/getGlobalVariable.d.ts +4 -0
  219. package/build/runtime-esm/server/utils/getGlobalVariable.js +8 -0
  220. package/build/runtime-esm/server/utils/isBrowser.d.ts +2 -0
  221. package/build/runtime-esm/server/utils/isBrowser.js +6 -0
  222. package/build/runtime-esm/server/utils/isCallable.d.ts +2 -0
  223. package/build/runtime-esm/server/utils/isCallable.js +6 -0
  224. package/build/runtime-esm/server/utils/isClientSide.d.ts +2 -0
  225. package/build/runtime-esm/server/utils/isClientSide.js +6 -0
  226. package/build/runtime-esm/server/utils/isPromise.d.ts +1 -0
  227. package/build/runtime-esm/server/utils/isPromise.js +7 -0
  228. package/build/runtime-esm/server/utils/isServerSide.d.ts +2 -0
  229. package/build/runtime-esm/server/utils/isServerSide.js +7 -0
  230. package/build/runtime-esm/server/utils/objectAssign.d.ts +2 -0
  231. package/build/runtime-esm/server/utils/objectAssign.js +6 -0
  232. package/build/runtime-esm/server/utils/projectInfo.d.ts +10 -0
  233. package/build/runtime-esm/server/utils/projectInfo.js +13 -0
  234. package/build/runtime-esm/server/utils.d.ts +4 -0
  235. package/build/runtime-esm/server/utils.js +4 -0
  236. package/package.json +67 -0
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,3 @@
1
+ import type { HoudiniClient } from '$houdini/runtime/client';
2
+ declare const _default: () => HoudiniClient;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { ClientPlugin } from 'houdini';
2
+ declare const plugin: () => ClientPlugin;
3
+ export default plugin;
@@ -0,0 +1,8 @@
1
+ export { useQuery } from './useQuery';
2
+ export { useQueryHandle } from './useQueryHandle';
3
+ export { useFragment } from './useFragment';
4
+ export { useFragmentHandle } from './useFragmentHandle';
5
+ export { useMutation } from './useMutation';
6
+ export { useSubscription } from './useSubscription';
7
+ export { type DocumentHandle } from './useDocumentHandle';
8
+ export { type UseQueryConfig } from './useQueryHandle';
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ type UseEffectParams = Parameters<typeof React.useEffect>;
3
+ type EffectCallback = UseEffectParams[0];
4
+ type DependencyList = UseEffectParams[1];
5
+ type UseEffectReturn = ReturnType<typeof React.useEffect>;
6
+ /**
7
+ * @param value the value to be memoized (usually a dependency list)
8
+ * @returns a memoized version of the value as long as it remains deeply equal
9
+ */
10
+ export declare function useDeepCompareMemoize<T>(value: T): T;
11
+ declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): UseEffectReturn;
12
+ export declare function useDeepCompareEffectNoCheck(callback: EffectCallback, dependencies: DependencyList): UseEffectReturn;
13
+ export default useDeepCompareEffect;
14
+ /**
15
+ The MIT License (MIT)
16
+ Copyright (c) 2020 Kent C. Dodds
17
+
18
+ Permission is hereby granted, free of charge, to any person obtaining a copy
19
+ of this software and associated documentation files (the "Software"), to deal
20
+ in the Software without restriction, including without limitation the rights
21
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22
+ copies of the Software, and to permit persons to whom the Software is
23
+ furnished to do so, subject to the following conditions:
24
+
25
+ The above copyright notice and this permission notice shall be included in all
26
+ copies or substantial portions of the Software.
27
+
28
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34
+ SOFTWARE.
35
+ */
@@ -0,0 +1,34 @@
1
+ import type { DocumentStore } from '$houdini/runtime/client';
2
+ import type { GraphQLObject, GraphQLVariables, CursorHandlers, OffsetHandlers, PageInfo, FetchFn, QueryResult, DocumentArtifact, QueryArtifact } from '$houdini/runtime/lib/types';
3
+ export declare function useDocumentHandle<_Artifact extends QueryArtifact, _Data extends GraphQLObject, _Input extends GraphQLVariables>({ artifact, observer, storeValue, }: {
4
+ artifact: DocumentArtifact;
5
+ observer: DocumentStore<_Data, _Input>;
6
+ storeValue: QueryResult<_Data, _Input>;
7
+ }): DocumentHandle<_Artifact, _Data, _Input> & {
8
+ fetch: FetchFn<_Data, _Input>;
9
+ };
10
+ export type DocumentHandle<_Artifact extends QueryArtifact, _Data extends GraphQLObject = GraphQLObject, _Input extends GraphQLVariables = GraphQLVariables> = {
11
+ data: _Data;
12
+ partial: boolean;
13
+ } & RefetchHandlers<_Artifact, _Data, _Input>;
14
+ type RefetchHandlers<_Artifact extends QueryArtifact, _Data extends GraphQLObject, _Input> = _Artifact extends {
15
+ refetch: {
16
+ paginated: true;
17
+ method: 'cursor';
18
+ };
19
+ } ? {
20
+ loadNext: CursorHandlers<_Data, _Input>['loadNextPage'];
21
+ loadNextPending: boolean;
22
+ loadPrevious: CursorHandlers<_Data, _Input>['loadPreviousPage'];
23
+ loadPreviousPending: boolean;
24
+ pageInfo: PageInfo;
25
+ } : _Artifact extends {
26
+ refetch: {
27
+ paginated: true;
28
+ method: 'offset';
29
+ };
30
+ } ? {
31
+ loadNext: OffsetHandlers<_Data, _Input>['loadNextPage'];
32
+ loadNextPending: boolean;
33
+ } : {};
34
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { DocumentArtifact, GraphQLVariables, QueryResult } from '$houdini/lib/types';
2
+ import type { DocumentStore, ObserveParams } from '$houdini/runtime/client';
3
+ import type { GraphQLObject } from 'houdini';
4
+ export type UseDocumentStoreParams<_Artifact extends DocumentArtifact, _Data extends GraphQLObject, _Input extends GraphQLVariables> = {
5
+ artifact: _Artifact;
6
+ observer?: DocumentStore<_Data, _Input>;
7
+ } & Partial<ObserveParams<_Data, DocumentArtifact, _Input>>;
8
+ export declare function useDocumentStore<_Data extends GraphQLObject = GraphQLObject, _Input extends GraphQLVariables = GraphQLVariables, _Artifact extends DocumentArtifact = DocumentArtifact>({ artifact, observer: obs, ...observeParams }: UseDocumentStoreParams<_Artifact, _Data, _Input>): [
9
+ QueryResult<_Data, _Input>,
10
+ DocumentStore<_Data, _Input>,
11
+ (store: DocumentStore<_Data, _Input>) => void
12
+ ];
@@ -0,0 +1,15 @@
1
+ import type { DocumentArtifact, GraphQLVariables, QueryResult } from '$houdini/lib/types';
2
+ import type { DocumentStore, SendParams } from '$houdini/runtime/client';
3
+ import type { GraphQLObject } from 'houdini';
4
+ import { type UseDocumentStoreParams } from './useDocumentStore';
5
+ export declare function useDocumentSubscription<_Artifact extends DocumentArtifact = DocumentArtifact, _Data extends GraphQLObject = GraphQLObject, _Input extends GraphQLVariables = GraphQLVariables>({ artifact, variables, send, disabled, ...observeParams }: UseDocumentStoreParams<_Artifact, _Data, _Input> & {
6
+ variables: _Input;
7
+ disabled?: boolean;
8
+ send?: Partial<SendParams>;
9
+ }): [
10
+ QueryResult<_Data, _Input> & {
11
+ parent?: string | null;
12
+ },
13
+ DocumentStore<_Data, _Input>,
14
+ (store: DocumentStore<_Data, _Input>) => void
15
+ ];
@@ -0,0 +1,16 @@
1
+ import { fragmentKey } from '$houdini/runtime/lib/types';
2
+ import type { GraphQLObject, GraphQLVariables, FragmentArtifact } from '$houdini/runtime/lib/types';
3
+ export declare function useFragment<_Data extends GraphQLObject, _ReferenceType extends {}, _Input extends GraphQLVariables = GraphQLVariables>(reference: _Data | {
4
+ [fragmentKey]: _ReferenceType;
5
+ } | null, document: {
6
+ artifact: FragmentArtifact;
7
+ }): _Data | null;
8
+ export declare function fragmentReference<_Data extends GraphQLObject, _Input, _ReferenceType extends {}>(reference: _Data | {
9
+ [fragmentKey]: _ReferenceType;
10
+ } | null, document: {
11
+ artifact: FragmentArtifact;
12
+ }): {
13
+ variables: _Input;
14
+ parent: string;
15
+ loading: boolean;
16
+ };
@@ -0,0 +1,8 @@
1
+ import type { GraphQLObject, FragmentArtifact, QueryArtifact, fragmentKey, GraphQLVariables } from '$houdini/runtime/lib/types';
2
+ import { type DocumentHandle } from './useDocumentHandle';
3
+ export declare function useFragmentHandle<_Artifact extends FragmentArtifact, _Data extends GraphQLObject, _ReferenceType extends {}, _PaginationArtifact extends QueryArtifact, _Input extends GraphQLVariables = GraphQLVariables>(reference: _Data | {
4
+ [fragmentKey]: _ReferenceType;
5
+ } | null, document: {
6
+ artifact: FragmentArtifact;
7
+ refetchArtifact?: QueryArtifact;
8
+ }): DocumentHandle<_PaginationArtifact, _Data, _Input>;
@@ -0,0 +1,3 @@
1
+ export declare function useIsMountedRef(): {
2
+ current: boolean;
3
+ };
@@ -0,0 +1,10 @@
1
+ import type { MutationArtifact, GraphQLObject, QueryResult, GraphQLVariables } from '$houdini/runtime/lib/types';
2
+ export type MutationHandler<_Result, _Input, _Optimistic extends GraphQLObject> = (args: {
3
+ variables: _Input;
4
+ metadata?: App.Metadata;
5
+ fetch?: typeof globalThis.fetch;
6
+ optimisticResponse?: _Optimistic;
7
+ }) => Promise<QueryResult<_Result, _Input>>;
8
+ export declare function useMutation<_Result extends GraphQLObject, _Input extends GraphQLVariables, _Optimistic extends GraphQLObject>({ artifact, }: {
9
+ artifact: MutationArtifact;
10
+ }): [boolean, MutationHandler<_Result, _Input, _Optimistic>];
@@ -0,0 +1,5 @@
1
+ import type { GraphQLVariables, GraphQLObject, QueryArtifact } from '$houdini/runtime/lib/types';
2
+ import type { UseQueryConfig } from './useQueryHandle';
3
+ export declare function useQuery<_Artifact extends QueryArtifact, _Data extends GraphQLObject = GraphQLObject, _Input extends GraphQLVariables = GraphQLVariables>(document: {
4
+ artifact: QueryArtifact;
5
+ }, variables?: any, config?: UseQueryConfig): _Data;
@@ -0,0 +1,10 @@
1
+ import type { GraphQLObject, CachePolicies, QueryArtifact, GraphQLVariables } from '$houdini/runtime/lib/types';
2
+ import type { DocumentHandle } from './useDocumentHandle';
3
+ export declare function useQueryHandle<_Artifact extends QueryArtifact, _Data extends GraphQLObject = GraphQLObject, _Input extends GraphQLVariables = GraphQLVariables>({ artifact }: {
4
+ artifact: QueryArtifact;
5
+ }, variables?: any, config?: UseQueryConfig): DocumentHandle<_Artifact, _Data, _Input>;
6
+ export type UseQueryConfig = {
7
+ policy?: CachePolicies;
8
+ metadata?: App.Metadata;
9
+ fetchKey?: any;
10
+ };
@@ -0,0 +1,4 @@
1
+ import type { SubscriptionArtifact, GraphQLObject, GraphQLVariables } from '$houdini/runtime/lib/types';
2
+ export declare function useSubscription<_Result extends GraphQLObject, _Input extends GraphQLVariables>(document: {
3
+ artifact: SubscriptionArtifact;
4
+ }, variables: _Input): import("houdini").GraphQLObject | null;
@@ -0,0 +1,25 @@
1
+ import type { SubscriptionArtifact, GraphQLObject, GraphQLVariables } from '$houdini/runtime/lib/types';
2
+ export type SubscriptionHandle<_Result extends GraphQLObject, _Input extends GraphQLVariables> = {
3
+ data: _Result | null;
4
+ errors: {
5
+ message: string;
6
+ }[] | null;
7
+ variables: _Input;
8
+ listen: (args: {
9
+ variables?: _Input;
10
+ }) => void;
11
+ unlisten: () => void;
12
+ fetching: boolean;
13
+ };
14
+ export declare function useSubscriptionHandle<_Result extends GraphQLObject, _Input extends GraphQLVariables>({ artifact }: {
15
+ artifact: SubscriptionArtifact;
16
+ }, variables: _Input): {
17
+ data: import("houdini").GraphQLObject | null;
18
+ errors: {
19
+ message: string;
20
+ }[] | null;
21
+ fetching: boolean;
22
+ variables: _Input;
23
+ unlisten: () => Promise<void>;
24
+ listen: ({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, }?: import("$houdini/lib").SendParams) => Promise<import("$houdini/runtime/lib/types").QueryResult<import("houdini").GraphQLObject, _Input>>;
25
+ };
@@ -0,0 +1,11 @@
1
+ import type { Cache } from '$houdini/runtime/cache/cache';
2
+ import { RouterCache } from './routing';
3
+ export * from './hooks';
4
+ export { router_cache } from './routing';
5
+ export declare function Router({ cache, initialURL, artifact_cache, component_cache, data_cache, pending_cache, last_variables, session, assetPrefix, injectToStream, }: {
6
+ initialURL: string;
7
+ cache: Cache;
8
+ session?: App.Session;
9
+ assetPrefix: string;
10
+ injectToStream?: (chunk: string) => void;
11
+ } & RouterCache): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { RouterManifest } from '$houdini/runtime/lib/types';
2
+ declare const manifest: RouterManifest;
3
+ export default manifest;
@@ -0,0 +1,67 @@
1
+ import type { Cache } from '$houdini/runtime/cache/cache';
2
+ import { DocumentStore, HoudiniClient } from '$houdini/runtime/client';
3
+ import { LRUCache } from '$houdini/runtime/lib/lru';
4
+ import { GraphQLObject, GraphQLVariables } from '$houdini/runtime/lib/types';
5
+ import { QueryArtifact } from '$houdini/runtime/lib/types';
6
+ import type { RouterManifest } from '$houdini/runtime/router/types';
7
+ import React from 'react';
8
+ import { SuspenseCache } from './cache';
9
+ type ComponentType = any;
10
+ /**
11
+ * Router is the top level entry point for the filesystem-based router.
12
+ * It is responsible for loading various page sources (including API fetches) and
13
+ * then rendering when appropriate.
14
+ */
15
+ export declare function Router({ manifest, initialURL, assetPrefix, injectToStream, }: {
16
+ manifest: RouterManifest<ComponentType>;
17
+ initialURL?: string;
18
+ assetPrefix: string;
19
+ injectToStream?: undefined | ((chunk: string) => void);
20
+ }): JSX.Element;
21
+ export declare function RouterContextProvider({ children, client, cache, artifact_cache, component_cache, data_cache, pending_cache, last_variables, session: ssrSession, }: {
22
+ children: React.ReactElement;
23
+ client: HoudiniClient;
24
+ cache: Cache;
25
+ artifact_cache: SuspenseCache<QueryArtifact>;
26
+ component_cache: SuspenseCache<(props: any) => React.ReactElement>;
27
+ data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
28
+ pending_cache: PendingCache;
29
+ last_variables: LRUCache<GraphQLVariables>;
30
+ session?: App.Session;
31
+ }): JSX.Element;
32
+ type RouterContext = {
33
+ client: HoudiniClient;
34
+ cache: Cache;
35
+ artifact_cache: SuspenseCache<QueryArtifact>;
36
+ component_cache: SuspenseCache<(props: any) => React.ReactElement>;
37
+ data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
38
+ pending_cache: PendingCache;
39
+ last_variables: LRUCache<GraphQLVariables>;
40
+ session: App.Session;
41
+ };
42
+ export type PendingCache = SuspenseCache<Promise<void> & {
43
+ resolve: () => void;
44
+ reject: () => void;
45
+ }>;
46
+ export declare const useRouterContext: () => RouterContext;
47
+ export declare function useClient(): HoudiniClient;
48
+ export declare function useCache(): Cache;
49
+ export declare function updateLocalSession(session: App.Session): void;
50
+ export declare function useSession(): App.Session;
51
+ export declare function useCurrentVariables(): GraphQLVariables;
52
+ export declare function useQueryResult<_Data extends GraphQLObject, _Input extends GraphQLVariables>(name: string): [_Data | null, DocumentStore<_Data, _Input>];
53
+ export type RouterCache = {
54
+ artifact_cache: SuspenseCache<QueryArtifact>;
55
+ component_cache: SuspenseCache<(props: any) => React.ReactElement>;
56
+ data_cache: SuspenseCache<DocumentStore<GraphQLObject, GraphQLVariables>>;
57
+ last_variables: LRUCache<GraphQLVariables>;
58
+ pending_cache: PendingCache;
59
+ };
60
+ export declare function router_cache({ pending_queries, artifacts, components, initialData, initialArtifacts, }?: {
61
+ pending_queries?: string[];
62
+ artifacts?: Record<string, QueryArtifact>;
63
+ components?: Record<string, (props: any) => React.ReactElement>;
64
+ initialData?: Record<string, DocumentStore<GraphQLObject, GraphQLVariables>>;
65
+ initialArtifacts?: Record<string, QueryArtifact>;
66
+ }): RouterCache;
67
+ export {};
@@ -0,0 +1,7 @@
1
+ import { LRUCache } from '$houdini/runtime/lib/lru';
2
+ export declare function suspense_cache<T>(initialData?: Record<string, T>): SuspenseCache<T>;
3
+ export declare class SuspenseCache<_Data> extends LRUCache<_Data> {
4
+ #private;
5
+ get(key: string): _Data;
6
+ set(key: string, value: _Data): void;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Router';
2
+ export { type SuspenseCache, suspense_cache } from './cache';
@@ -0,0 +1,17 @@
1
+ /**
2
+ This directory is largely copied from https://github.com/brillout/react-streaming and adapted to fit the needs of this project. It is subject to the MIT license, found [here](https://github.com/brillout/react-streaming/blob/main/LICENSE.md). Duplicated below for reference:
3
+
4
+ MIT License
5
+
6
+ Copyright (c) 2022-present Romuald Brillout
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13
+ */
14
+ import { renderToStream } from './renderToStream';
15
+ import type { InjectToStream } from './renderToStream/createBuffer';
16
+ export { renderToStream };
17
+ export type { InjectToStream };
@@ -0,0 +1,17 @@
1
+ export { createBuffer };
2
+ export type { InjectToStream };
3
+ export type { StreamOperations };
4
+ type InjectToStream = (chunk: unknown, options?: {
5
+ flush?: boolean;
6
+ }) => void;
7
+ type StreamOperations = {
8
+ operations: null | {
9
+ writeChunk: (chunk: unknown) => void;
10
+ flush: null | (() => void);
11
+ };
12
+ };
13
+ declare function createBuffer(streamOperations: StreamOperations): {
14
+ injectToStream: InjectToStream;
15
+ onBeforeWrite: (chunk: unknown) => void;
16
+ onBeforeEnd: () => void;
17
+ };
@@ -0,0 +1,12 @@
1
+ /// <reference types="node" />
2
+ import type { Writable as StreamNodeWritable } from 'stream';
3
+ export { createPipeWrapper };
4
+ export type { Pipe };
5
+ type Pipe = (writable: StreamNodeWritable) => void;
6
+ declare function createPipeWrapper(pipeFromReact: Pipe, { onReactBug }: {
7
+ onReactBug: (err: unknown) => void;
8
+ }): Promise<{
9
+ pipeForUser: Pipe;
10
+ streamEnd: Promise<void>;
11
+ injectToStream: import("./createBuffer").InjectToStream;
12
+ }>;
@@ -0,0 +1,6 @@
1
+ export { createReadableWrapper };
2
+ declare function createReadableWrapper(readableFromReact: ReadableStream): {
3
+ readableForUser: ReadableStream<any>;
4
+ streamEnd: Promise<void>;
5
+ injectToStream: import("./createBuffer").InjectToStream;
6
+ };
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ import type { Readable as StreamNodeReadable, Writable as StreamNodeWritable } from 'stream';
3
+ export { loadNodeStreamModule };
4
+ export { nodeStreamModuleIsAvailable };
5
+ type StreamModule = {
6
+ Readable: typeof StreamNodeReadable;
7
+ Writable: typeof StreamNodeWritable;
8
+ };
9
+ declare function loadNodeStreamModule(): Promise<StreamModule>;
10
+ declare function nodeStreamModuleIsAvailable(): Promise<boolean>;
@@ -0,0 +1,9 @@
1
+ export { resolveSeoStrategy };
2
+ export type { SeoStrategy };
3
+ type SeoStrategy = 'conservative' | 'google-speed';
4
+ declare function resolveSeoStrategy(options?: {
5
+ seoStrategy?: SeoStrategy;
6
+ userAgent?: string;
7
+ }): {
8
+ disableStream: boolean;
9
+ };
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { renderToPipeableStream as RenderToPipeableStream, renderToReadableStream as RenderToReadableStream } from 'react-dom/server';
3
+ import { Pipe } from './renderToStream/createPipeWrapper';
4
+ import { SeoStrategy } from './renderToStream/resolveSeoStrategy';
5
+ export { renderToStream };
6
+ export { disable };
7
+ type Options = {
8
+ webStream?: boolean;
9
+ disable?: boolean;
10
+ seoStrategy?: SeoStrategy;
11
+ userAgent?: string;
12
+ onBoundaryError?: (err: unknown) => void;
13
+ renderToReadableStream?: typeof RenderToReadableStream;
14
+ renderToPipeableStream?: typeof RenderToPipeableStream;
15
+ };
16
+ type Result = ({
17
+ pipe: Pipe;
18
+ readable: null;
19
+ } | {
20
+ pipe: null;
21
+ readable: ReadableStream;
22
+ }) & {
23
+ streamEnd: Promise<boolean>;
24
+ disabled: boolean;
25
+ injectToStream: (chunk: unknown) => void;
26
+ };
27
+ declare function disable(): void;
28
+ declare function renderToStream(element: React.ReactNode, options?: Options): Promise<Result>;
@@ -0,0 +1,8 @@
1
+ export type { InitData };
2
+ export { initDataHtmlClass };
3
+ type InitData = {
4
+ value: unknown;
5
+ key: string;
6
+ elementId: string;
7
+ };
8
+ declare const initDataHtmlClass = "react-streaming_initData";
@@ -0,0 +1,4 @@
1
+ export { stringifyKey };
2
+ export { assertKey };
3
+ declare function stringifyKey(key: unknown): string;
4
+ declare function assertKey(keyValue: unknown): void;
@@ -0,0 +1,3 @@
1
+ export * from '../utils/assert';
2
+ export * from '../utils/getGlobalVariable';
3
+ export * from '../utils/isPromise';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export { useStream };
3
+ export { StreamProvider };
4
+ export type { StreamUtils };
5
+ type StreamUtils = {
6
+ injectToStream: (htmlChunk: string) => void;
7
+ };
8
+ declare const StreamProvider: React.Provider<StreamUtils | null>;
9
+ declare function useStream(): StreamUtils | null;
@@ -0,0 +1,15 @@
1
+ export { assert };
2
+ export { assertUsage };
3
+ export { assertWarning };
4
+ export { assertInfo };
5
+ export { getProjectError };
6
+ declare function assert(condition: unknown, debugInfo?: unknown): asserts condition;
7
+ declare function assertUsage(condition: unknown, errorMessage: string): asserts condition;
8
+ declare function getProjectError(errorMessage: string): Error;
9
+ declare function assertWarning(condition: unknown, errorMessage: string, { onlyOnce, showStackTrace }: {
10
+ onlyOnce: boolean | string;
11
+ showStackTrace?: true;
12
+ }): void;
13
+ declare function assertInfo(condition: unknown, errorMessage: string, { onlyOnce }: {
14
+ onlyOnce: boolean;
15
+ }): void;
@@ -0,0 +1,2 @@
1
+ export { createErrorWithCleanStackTrace };
2
+ declare function createErrorWithCleanStackTrace(errorMessage: string, numberOfStackTraceLinesToRemove: number): Error;
@@ -0,0 +1,14 @@
1
+ export { createDebugger };
2
+ export { isDebugEnabled };
3
+ export type { Debug };
4
+ type Debug = ReturnType<typeof createDebugger>;
5
+ type Options = {
6
+ serialization?: {
7
+ emptyArray?: string;
8
+ };
9
+ };
10
+ declare function createDebugger(namespace: string, optionsGlobal?: Options): ((msg: string, info?: unknown) => void) & {
11
+ options: (options: Options) => (msg: string, info?: unknown) => void;
12
+ isEnabled: boolean;
13
+ };
14
+ declare function isDebugEnabled(namespace: string): boolean;
@@ -0,0 +1,4 @@
1
+ export declare function getGlobalVariable<T>(key: string, defaultValue: T): T;
2
+ declare global {
3
+ var __react_streaming: Record<string, any>;
4
+ }
@@ -0,0 +1,2 @@
1
+ export { isBrowser };
2
+ declare function isBrowser(): boolean;
@@ -0,0 +1,2 @@
1
+ export { isCallable };
2
+ declare function isCallable<T extends (...args: unknown[]) => unknown>(thing: T | unknown): thing is T;
@@ -0,0 +1,2 @@
1
+ export { isClientSide };
2
+ declare function isClientSide(): boolean;
@@ -0,0 +1 @@
1
+ export declare function isPromise(val: unknown): val is Promise<unknown>;
@@ -0,0 +1,2 @@
1
+ export { isServerSide };
2
+ declare function isServerSide(): boolean;
@@ -0,0 +1,2 @@
1
+ export { objectAssign };
2
+ declare function objectAssign<Obj extends object, ObjAddendum>(obj: Obj, objAddendum: ObjAddendum): asserts obj is Obj & ObjAddendum;
@@ -0,0 +1,10 @@
1
+ export declare const projectInfo: {
2
+ projectName: "react-streaming";
3
+ projectVersion: string;
4
+ npmPackageName: "react-streaming";
5
+ githubRepository: "https://github.com/brillout/react-streaming";
6
+ discordInviteToolChannel: "https://discord.com/invite/H23tjRxFvx";
7
+ };
8
+ declare global {
9
+ var __vite_plugin_ssr__instances: undefined | string[];
10
+ }
@@ -0,0 +1,4 @@
1
+ export * from './utils/assert';
2
+ export * from './utils/debug';
3
+ export * from './utils/isPromise';
4
+ export * from './utils/isBrowser';
@@ -0,0 +1,3 @@
1
+ import type { HoudiniClient } from '$houdini/runtime/client';
2
+ declare const _default: () => HoudiniClient;
3
+ export default _default;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var client_exports = {};
20
+ __export(client_exports, {
21
+ default: () => client_default
22
+ });
23
+ module.exports = __toCommonJS(client_exports);
24
+ var client_default = () => {
25
+ };
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {});
@@ -0,0 +1,3 @@
1
+ import type { ClientPlugin } from 'houdini';
2
+ declare const plugin: () => ClientPlugin;
3
+ export default plugin;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var clientPlugin_exports = {};
20
+ __export(clientPlugin_exports, {
21
+ default: () => clientPlugin_default
22
+ });
23
+ module.exports = __toCommonJS(clientPlugin_exports);
24
+ const plugin = () => () => {
25
+ return {
26
+ beforeNetwork(ctx, { next }) {
27
+ next({
28
+ ...ctx,
29
+ cacheParams: {
30
+ ...ctx.fetchParams,
31
+ serverSideFallback: false
32
+ }
33
+ });
34
+ }
35
+ };
36
+ };
37
+ var clientPlugin_default = plugin;
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {});