@tanstack/react-query-next-experimental 5.101.3 → 5.102.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 (71) hide show
  1. package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.cts +67 -0
  2. package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.cts.map +1 -0
  3. package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.ts +67 -0
  4. package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.ts.map +1 -0
  5. package/build/legacy/HydrationStreamProvider.cjs +73 -114
  6. package/build/legacy/HydrationStreamProvider.cjs.map +1 -1
  7. package/build/legacy/HydrationStreamProvider.d.cts +2 -2
  8. package/build/legacy/HydrationStreamProvider.d.ts +2 -2
  9. package/build/legacy/HydrationStreamProvider.js +67 -77
  10. package/build/legacy/HydrationStreamProvider.js.map +1 -1
  11. package/build/legacy/ReactQueryStreamedHydration.cjs +55 -84
  12. package/build/legacy/ReactQueryStreamedHydration.cjs.map +1 -1
  13. package/build/legacy/ReactQueryStreamedHydration.d.cts +22 -1
  14. package/build/legacy/ReactQueryStreamedHydration.d.cts.map +1 -0
  15. package/build/legacy/ReactQueryStreamedHydration.d.ts +22 -1
  16. package/build/legacy/ReactQueryStreamedHydration.d.ts.map +1 -0
  17. package/build/legacy/ReactQueryStreamedHydration.js +50 -54
  18. package/build/legacy/ReactQueryStreamedHydration.js.map +1 -1
  19. package/build/legacy/htmlescape.cjs +14 -39
  20. package/build/legacy/htmlescape.cjs.map +1 -1
  21. package/build/legacy/htmlescape.d.cts +6 -2
  22. package/build/legacy/htmlescape.d.cts.map +1 -0
  23. package/build/legacy/htmlescape.d.ts +6 -2
  24. package/build/legacy/htmlescape.d.ts.map +1 -0
  25. package/build/legacy/htmlescape.js +12 -13
  26. package/build/legacy/htmlescape.js.map +1 -1
  27. package/build/legacy/index.cjs +3 -31
  28. package/build/legacy/index.d.cts +2 -1
  29. package/build/legacy/index.d.ts +2 -1
  30. package/build/legacy/index.js +1 -5
  31. package/build/legacy/rolldown-runtime-VH7oDXx4.cjs +28 -0
  32. package/build/modern/HydrationStreamProvider-D_lqnUNo.d.cts +67 -0
  33. package/build/modern/HydrationStreamProvider-D_lqnUNo.d.cts.map +1 -0
  34. package/build/modern/HydrationStreamProvider-D_lqnUNo.d.ts +67 -0
  35. package/build/modern/HydrationStreamProvider-D_lqnUNo.d.ts.map +1 -0
  36. package/build/modern/HydrationStreamProvider.cjs +71 -112
  37. package/build/modern/HydrationStreamProvider.cjs.map +1 -1
  38. package/build/modern/HydrationStreamProvider.d.cts +2 -2
  39. package/build/modern/HydrationStreamProvider.d.ts +2 -2
  40. package/build/modern/HydrationStreamProvider.js +65 -75
  41. package/build/modern/HydrationStreamProvider.js.map +1 -1
  42. package/build/modern/ReactQueryStreamedHydration.cjs +51 -82
  43. package/build/modern/ReactQueryStreamedHydration.cjs.map +1 -1
  44. package/build/modern/ReactQueryStreamedHydration.d.cts +22 -1
  45. package/build/modern/ReactQueryStreamedHydration.d.cts.map +1 -0
  46. package/build/modern/ReactQueryStreamedHydration.d.ts +22 -1
  47. package/build/modern/ReactQueryStreamedHydration.d.ts.map +1 -0
  48. package/build/modern/ReactQueryStreamedHydration.js +46 -52
  49. package/build/modern/ReactQueryStreamedHydration.js.map +1 -1
  50. package/build/modern/htmlescape.cjs +14 -39
  51. package/build/modern/htmlescape.cjs.map +1 -1
  52. package/build/modern/htmlescape.d.cts +6 -2
  53. package/build/modern/htmlescape.d.cts.map +1 -0
  54. package/build/modern/htmlescape.d.ts +6 -2
  55. package/build/modern/htmlescape.d.ts.map +1 -0
  56. package/build/modern/htmlescape.js +12 -13
  57. package/build/modern/htmlescape.js.map +1 -1
  58. package/build/modern/index.cjs +3 -31
  59. package/build/modern/index.d.cts +2 -1
  60. package/build/modern/index.d.ts +2 -1
  61. package/build/modern/index.js +1 -5
  62. package/build/modern/rolldown-runtime-VH7oDXx4.cjs +28 -0
  63. package/package.json +5 -7
  64. package/build/legacy/_tsup-dts-rollup.d.cts +0 -96
  65. package/build/legacy/_tsup-dts-rollup.d.ts +0 -96
  66. package/build/legacy/index.cjs.map +0 -1
  67. package/build/legacy/index.js.map +0 -1
  68. package/build/modern/_tsup-dts-rollup.d.cts +0 -96
  69. package/build/modern/_tsup-dts-rollup.d.ts +0 -96
  70. package/build/modern/index.cjs.map +0 -1
  71. package/build/modern/index.js.map +0 -1
@@ -1,96 +0,0 @@
1
- import type { DehydratedState } from '@tanstack/react-query';
2
- import type { DehydrateOptions } from '@tanstack/react-query';
3
- import type { HydrateOptions } from '@tanstack/react-query';
4
- import { JSX } from 'react/jsx-runtime';
5
- import type { QueryClient } from '@tanstack/react-query';
6
- import * as React_2 from 'react';
7
-
8
- export declare function createHydrationStreamProvider<TShape>(): {
9
- Provider: (props: {
10
- children: React_2.ReactNode;
11
- /**
12
- * Optional transformer to serialize/deserialize the data
13
- * Example devalue, superjson et al
14
- */
15
- transformer?: DataTransformer;
16
- /**
17
- * **Client method**
18
- * Called in the browser when new entries are received
19
- */
20
- onEntries: (entries: Array<TShape>) => void;
21
- /**
22
- * **Server method**
23
- * onFlush is called on the server when the cache is flushed
24
- */
25
- onFlush?: () => Array<TShape>;
26
- /**
27
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
28
- */
29
- nonce?: string;
30
- }) => JSX.Element;
31
- context: React_2.Context<HydrationStreamContext<TShape>>;
32
- };
33
-
34
- declare interface DataTransformer {
35
- serialize: (object: any) => any;
36
- deserialize: (object: any) => any;
37
- }
38
-
39
- export declare const ESCAPE_REGEX: RegExp;
40
-
41
- export declare function htmlEscapeJsonString(str: string): string;
42
-
43
- declare interface HydrationStreamContext<TShape> {
44
- id: string;
45
- stream: {
46
- /**
47
- * **Server method**
48
- * Push a new entry to the stream
49
- * Will be ignored on the client
50
- */
51
- push: (...shape: Array<TShape>) => void;
52
- };
53
- }
54
-
55
- export declare interface HydrationStreamProviderProps<TShape> {
56
- children: React_2.ReactNode;
57
- /**
58
- * Optional transformer to serialize/deserialize the data
59
- * Example devalue, superjson et al
60
- */
61
- transformer?: DataTransformer;
62
- /**
63
- * **Client method**
64
- * Called in the browser when new entries are received
65
- */
66
- onEntries: (entries: Array<TShape>) => void;
67
- /**
68
- * **Server method**
69
- * onFlush is called on the server when the cache is flushed
70
- */
71
- onFlush?: () => Array<TShape>;
72
- /**
73
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
74
- */
75
- nonce?: string;
76
- }
77
-
78
- /**
79
- * This component is responsible for:
80
- * - hydrating the query client on the server
81
- * - dehydrating the query client on the server
82
- */
83
- declare function ReactQueryStreamedHydration(props: {
84
- children: React_2.ReactNode;
85
- queryClient?: QueryClient;
86
- nonce?: string;
87
- options?: {
88
- hydrate?: HydrateOptions;
89
- dehydrate?: DehydrateOptions;
90
- };
91
- transformer?: HydrationStreamProviderProps<DehydratedState>['transformer'];
92
- }): JSX.Element;
93
- export { ReactQueryStreamedHydration }
94
- export { ReactQueryStreamedHydration as ReactQueryStreamedHydration_alias_1 }
95
-
96
- export { }
@@ -1,96 +0,0 @@
1
- import type { DehydratedState } from '@tanstack/react-query';
2
- import type { DehydrateOptions } from '@tanstack/react-query';
3
- import type { HydrateOptions } from '@tanstack/react-query';
4
- import { JSX } from 'react/jsx-runtime';
5
- import type { QueryClient } from '@tanstack/react-query';
6
- import * as React_2 from 'react';
7
-
8
- export declare function createHydrationStreamProvider<TShape>(): {
9
- Provider: (props: {
10
- children: React_2.ReactNode;
11
- /**
12
- * Optional transformer to serialize/deserialize the data
13
- * Example devalue, superjson et al
14
- */
15
- transformer?: DataTransformer;
16
- /**
17
- * **Client method**
18
- * Called in the browser when new entries are received
19
- */
20
- onEntries: (entries: Array<TShape>) => void;
21
- /**
22
- * **Server method**
23
- * onFlush is called on the server when the cache is flushed
24
- */
25
- onFlush?: () => Array<TShape>;
26
- /**
27
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
28
- */
29
- nonce?: string;
30
- }) => JSX.Element;
31
- context: React_2.Context<HydrationStreamContext<TShape>>;
32
- };
33
-
34
- declare interface DataTransformer {
35
- serialize: (object: any) => any;
36
- deserialize: (object: any) => any;
37
- }
38
-
39
- export declare const ESCAPE_REGEX: RegExp;
40
-
41
- export declare function htmlEscapeJsonString(str: string): string;
42
-
43
- declare interface HydrationStreamContext<TShape> {
44
- id: string;
45
- stream: {
46
- /**
47
- * **Server method**
48
- * Push a new entry to the stream
49
- * Will be ignored on the client
50
- */
51
- push: (...shape: Array<TShape>) => void;
52
- };
53
- }
54
-
55
- export declare interface HydrationStreamProviderProps<TShape> {
56
- children: React_2.ReactNode;
57
- /**
58
- * Optional transformer to serialize/deserialize the data
59
- * Example devalue, superjson et al
60
- */
61
- transformer?: DataTransformer;
62
- /**
63
- * **Client method**
64
- * Called in the browser when new entries are received
65
- */
66
- onEntries: (entries: Array<TShape>) => void;
67
- /**
68
- * **Server method**
69
- * onFlush is called on the server when the cache is flushed
70
- */
71
- onFlush?: () => Array<TShape>;
72
- /**
73
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
74
- */
75
- nonce?: string;
76
- }
77
-
78
- /**
79
- * This component is responsible for:
80
- * - hydrating the query client on the server
81
- * - dehydrating the query client on the server
82
- */
83
- declare function ReactQueryStreamedHydration(props: {
84
- children: React_2.ReactNode;
85
- queryClient?: QueryClient;
86
- nonce?: string;
87
- options?: {
88
- hydrate?: HydrateOptions;
89
- dehydrate?: DehydrateOptions;
90
- };
91
- transformer?: HydrationStreamProviderProps<DehydratedState>['transformer'];
92
- }): JSX.Element;
93
- export { ReactQueryStreamedHydration }
94
- export { ReactQueryStreamedHydration as ReactQueryStreamedHydration_alias_1 }
95
-
96
- export { }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { ReactQueryStreamedHydration } from './ReactQueryStreamedHydration'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAA4C;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { ReactQueryStreamedHydration } from './ReactQueryStreamedHydration'\n"],"mappings":";AAAA,SAAS,mCAAmC;","names":[]}
@@ -1,96 +0,0 @@
1
- import type { DehydratedState } from '@tanstack/react-query';
2
- import type { DehydrateOptions } from '@tanstack/react-query';
3
- import type { HydrateOptions } from '@tanstack/react-query';
4
- import { JSX } from 'react/jsx-runtime';
5
- import type { QueryClient } from '@tanstack/react-query';
6
- import * as React_2 from 'react';
7
-
8
- export declare function createHydrationStreamProvider<TShape>(): {
9
- Provider: (props: {
10
- children: React_2.ReactNode;
11
- /**
12
- * Optional transformer to serialize/deserialize the data
13
- * Example devalue, superjson et al
14
- */
15
- transformer?: DataTransformer;
16
- /**
17
- * **Client method**
18
- * Called in the browser when new entries are received
19
- */
20
- onEntries: (entries: Array<TShape>) => void;
21
- /**
22
- * **Server method**
23
- * onFlush is called on the server when the cache is flushed
24
- */
25
- onFlush?: () => Array<TShape>;
26
- /**
27
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
28
- */
29
- nonce?: string;
30
- }) => JSX.Element;
31
- context: React_2.Context<HydrationStreamContext<TShape>>;
32
- };
33
-
34
- declare interface DataTransformer {
35
- serialize: (object: any) => any;
36
- deserialize: (object: any) => any;
37
- }
38
-
39
- export declare const ESCAPE_REGEX: RegExp;
40
-
41
- export declare function htmlEscapeJsonString(str: string): string;
42
-
43
- declare interface HydrationStreamContext<TShape> {
44
- id: string;
45
- stream: {
46
- /**
47
- * **Server method**
48
- * Push a new entry to the stream
49
- * Will be ignored on the client
50
- */
51
- push: (...shape: Array<TShape>) => void;
52
- };
53
- }
54
-
55
- export declare interface HydrationStreamProviderProps<TShape> {
56
- children: React_2.ReactNode;
57
- /**
58
- * Optional transformer to serialize/deserialize the data
59
- * Example devalue, superjson et al
60
- */
61
- transformer?: DataTransformer;
62
- /**
63
- * **Client method**
64
- * Called in the browser when new entries are received
65
- */
66
- onEntries: (entries: Array<TShape>) => void;
67
- /**
68
- * **Server method**
69
- * onFlush is called on the server when the cache is flushed
70
- */
71
- onFlush?: () => Array<TShape>;
72
- /**
73
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
74
- */
75
- nonce?: string;
76
- }
77
-
78
- /**
79
- * This component is responsible for:
80
- * - hydrating the query client on the server
81
- * - dehydrating the query client on the server
82
- */
83
- declare function ReactQueryStreamedHydration(props: {
84
- children: React_2.ReactNode;
85
- queryClient?: QueryClient;
86
- nonce?: string;
87
- options?: {
88
- hydrate?: HydrateOptions;
89
- dehydrate?: DehydrateOptions;
90
- };
91
- transformer?: HydrationStreamProviderProps<DehydratedState>['transformer'];
92
- }): JSX.Element;
93
- export { ReactQueryStreamedHydration }
94
- export { ReactQueryStreamedHydration as ReactQueryStreamedHydration_alias_1 }
95
-
96
- export { }
@@ -1,96 +0,0 @@
1
- import type { DehydratedState } from '@tanstack/react-query';
2
- import type { DehydrateOptions } from '@tanstack/react-query';
3
- import type { HydrateOptions } from '@tanstack/react-query';
4
- import { JSX } from 'react/jsx-runtime';
5
- import type { QueryClient } from '@tanstack/react-query';
6
- import * as React_2 from 'react';
7
-
8
- export declare function createHydrationStreamProvider<TShape>(): {
9
- Provider: (props: {
10
- children: React_2.ReactNode;
11
- /**
12
- * Optional transformer to serialize/deserialize the data
13
- * Example devalue, superjson et al
14
- */
15
- transformer?: DataTransformer;
16
- /**
17
- * **Client method**
18
- * Called in the browser when new entries are received
19
- */
20
- onEntries: (entries: Array<TShape>) => void;
21
- /**
22
- * **Server method**
23
- * onFlush is called on the server when the cache is flushed
24
- */
25
- onFlush?: () => Array<TShape>;
26
- /**
27
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
28
- */
29
- nonce?: string;
30
- }) => JSX.Element;
31
- context: React_2.Context<HydrationStreamContext<TShape>>;
32
- };
33
-
34
- declare interface DataTransformer {
35
- serialize: (object: any) => any;
36
- deserialize: (object: any) => any;
37
- }
38
-
39
- export declare const ESCAPE_REGEX: RegExp;
40
-
41
- export declare function htmlEscapeJsonString(str: string): string;
42
-
43
- declare interface HydrationStreamContext<TShape> {
44
- id: string;
45
- stream: {
46
- /**
47
- * **Server method**
48
- * Push a new entry to the stream
49
- * Will be ignored on the client
50
- */
51
- push: (...shape: Array<TShape>) => void;
52
- };
53
- }
54
-
55
- export declare interface HydrationStreamProviderProps<TShape> {
56
- children: React_2.ReactNode;
57
- /**
58
- * Optional transformer to serialize/deserialize the data
59
- * Example devalue, superjson et al
60
- */
61
- transformer?: DataTransformer;
62
- /**
63
- * **Client method**
64
- * Called in the browser when new entries are received
65
- */
66
- onEntries: (entries: Array<TShape>) => void;
67
- /**
68
- * **Server method**
69
- * onFlush is called on the server when the cache is flushed
70
- */
71
- onFlush?: () => Array<TShape>;
72
- /**
73
- * A nonce that'll allow the inline script to be executed when Content Security Policy is enforced
74
- */
75
- nonce?: string;
76
- }
77
-
78
- /**
79
- * This component is responsible for:
80
- * - hydrating the query client on the server
81
- * - dehydrating the query client on the server
82
- */
83
- declare function ReactQueryStreamedHydration(props: {
84
- children: React_2.ReactNode;
85
- queryClient?: QueryClient;
86
- nonce?: string;
87
- options?: {
88
- hydrate?: HydrateOptions;
89
- dehydrate?: DehydrateOptions;
90
- };
91
- transformer?: HydrationStreamProviderProps<DehydratedState>['transformer'];
92
- }): JSX.Element;
93
- export { ReactQueryStreamedHydration }
94
- export { ReactQueryStreamedHydration as ReactQueryStreamedHydration_alias_1 }
95
-
96
- export { }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { ReactQueryStreamedHydration } from './ReactQueryStreamedHydration'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAA4C;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { ReactQueryStreamedHydration } from './ReactQueryStreamedHydration'\n"],"mappings":";AAAA,SAAS,mCAAmC;","names":[]}