@tanstack/react-query-next-experimental 5.101.4 → 5.102.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.cts +67 -0
- package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.cts.map +1 -0
- package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.ts +67 -0
- package/build/legacy/HydrationStreamProvider-D_lqnUNo.d.ts.map +1 -0
- package/build/legacy/HydrationStreamProvider.cjs +73 -114
- package/build/legacy/HydrationStreamProvider.cjs.map +1 -1
- package/build/legacy/HydrationStreamProvider.d.cts +2 -2
- package/build/legacy/HydrationStreamProvider.d.ts +2 -2
- package/build/legacy/HydrationStreamProvider.js +67 -77
- package/build/legacy/HydrationStreamProvider.js.map +1 -1
- package/build/legacy/ReactQueryStreamedHydration.cjs +55 -84
- package/build/legacy/ReactQueryStreamedHydration.cjs.map +1 -1
- package/build/legacy/ReactQueryStreamedHydration.d.cts +22 -1
- package/build/legacy/ReactQueryStreamedHydration.d.cts.map +1 -0
- package/build/legacy/ReactQueryStreamedHydration.d.ts +22 -1
- package/build/legacy/ReactQueryStreamedHydration.d.ts.map +1 -0
- package/build/legacy/ReactQueryStreamedHydration.js +50 -54
- package/build/legacy/ReactQueryStreamedHydration.js.map +1 -1
- package/build/legacy/htmlescape.cjs +14 -39
- package/build/legacy/htmlescape.cjs.map +1 -1
- package/build/legacy/htmlescape.d.cts +6 -2
- package/build/legacy/htmlescape.d.cts.map +1 -0
- package/build/legacy/htmlescape.d.ts +6 -2
- package/build/legacy/htmlescape.d.ts.map +1 -0
- package/build/legacy/htmlescape.js +12 -13
- package/build/legacy/htmlescape.js.map +1 -1
- package/build/legacy/index.cjs +3 -31
- package/build/legacy/index.d.cts +2 -1
- package/build/legacy/index.d.ts +2 -1
- package/build/legacy/index.js +1 -5
- package/build/legacy/rolldown-runtime-VH7oDXx4.cjs +28 -0
- package/build/modern/HydrationStreamProvider-D_lqnUNo.d.cts +67 -0
- package/build/modern/HydrationStreamProvider-D_lqnUNo.d.cts.map +1 -0
- package/build/modern/HydrationStreamProvider-D_lqnUNo.d.ts +67 -0
- package/build/modern/HydrationStreamProvider-D_lqnUNo.d.ts.map +1 -0
- package/build/modern/HydrationStreamProvider.cjs +71 -112
- package/build/modern/HydrationStreamProvider.cjs.map +1 -1
- package/build/modern/HydrationStreamProvider.d.cts +2 -2
- package/build/modern/HydrationStreamProvider.d.ts +2 -2
- package/build/modern/HydrationStreamProvider.js +65 -75
- package/build/modern/HydrationStreamProvider.js.map +1 -1
- package/build/modern/ReactQueryStreamedHydration.cjs +51 -82
- package/build/modern/ReactQueryStreamedHydration.cjs.map +1 -1
- package/build/modern/ReactQueryStreamedHydration.d.cts +22 -1
- package/build/modern/ReactQueryStreamedHydration.d.cts.map +1 -0
- package/build/modern/ReactQueryStreamedHydration.d.ts +22 -1
- package/build/modern/ReactQueryStreamedHydration.d.ts.map +1 -0
- package/build/modern/ReactQueryStreamedHydration.js +46 -52
- package/build/modern/ReactQueryStreamedHydration.js.map +1 -1
- package/build/modern/htmlescape.cjs +14 -39
- package/build/modern/htmlescape.cjs.map +1 -1
- package/build/modern/htmlescape.d.cts +6 -2
- package/build/modern/htmlescape.d.cts.map +1 -0
- package/build/modern/htmlescape.d.ts +6 -2
- package/build/modern/htmlescape.d.ts.map +1 -0
- package/build/modern/htmlescape.js +12 -13
- package/build/modern/htmlescape.js.map +1 -1
- package/build/modern/index.cjs +3 -31
- package/build/modern/index.d.cts +2 -1
- package/build/modern/index.d.ts +2 -1
- package/build/modern/index.js +1 -5
- package/build/modern/rolldown-runtime-VH7oDXx4.cjs +28 -0
- package/package.json +5 -7
- package/build/legacy/_tsup-dts-rollup.d.cts +0 -96
- package/build/legacy/_tsup-dts-rollup.d.ts +0 -96
- package/build/legacy/index.cjs.map +0 -1
- package/build/legacy/index.js.map +0 -1
- package/build/modern/_tsup-dts-rollup.d.cts +0 -96
- package/build/modern/_tsup-dts-rollup.d.ts +0 -96
- package/build/modern/index.cjs.map +0 -1
- package/build/modern/index.js.map +0 -1
|
@@ -1,88 +1,59 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
"use client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/ReactQueryStreamedHydration.tsx
|
|
32
|
-
var ReactQueryStreamedHydration_exports = {};
|
|
33
|
-
__export(ReactQueryStreamedHydration_exports, {
|
|
34
|
-
ReactQueryStreamedHydration: () => ReactQueryStreamedHydration
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(ReactQueryStreamedHydration_exports);
|
|
37
|
-
var import_react_query = require("@tanstack/react-query");
|
|
38
|
-
var React = __toESM(require("react"), 1);
|
|
39
|
-
var import_HydrationStreamProvider = require("./HydrationStreamProvider.cjs");
|
|
40
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
-
var stream = (0, import_HydrationStreamProvider.createHydrationStreamProvider)();
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
4
|
+
const require_HydrationStreamProvider = require("./HydrationStreamProvider.cjs");
|
|
5
|
+
let _tanstack_react_query = require("@tanstack/react-query");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react, 1);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
//#region src/ReactQueryStreamedHydration.tsx
|
|
10
|
+
const stream = require_HydrationStreamProvider.createHydrationStreamProvider();
|
|
11
|
+
/**
|
|
12
|
+
* This component is responsible for:
|
|
13
|
+
* - hydrating the query client on the server
|
|
14
|
+
* - dehydrating the query client on the server
|
|
15
|
+
*/
|
|
42
16
|
function ReactQueryStreamedHydration(props) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
);
|
|
17
|
+
const queryClient = (0, _tanstack_react_query.useQueryClient)(props.queryClient);
|
|
18
|
+
/**
|
|
19
|
+
* We need to track which queries were added/updated during the render
|
|
20
|
+
*/
|
|
21
|
+
const [trackedKeys] = react.useState(() => /* @__PURE__ */ new Set());
|
|
22
|
+
if (_tanstack_react_query.environmentManager.isServer()) queryClient.getQueryCache().subscribe((event) => {
|
|
23
|
+
switch (event.type) {
|
|
24
|
+
case "added":
|
|
25
|
+
case "updated": trackedKeys.add(event.query.queryHash);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(stream.Provider, {
|
|
29
|
+
onFlush: () => {
|
|
30
|
+
var _props$options, _props$options2;
|
|
31
|
+
/**
|
|
32
|
+
* Dehydrated state of the client where we only include the queries that were added/updated since the last flush
|
|
33
|
+
*/
|
|
34
|
+
const shouldDehydrate = ((_props$options = props.options) === null || _props$options === void 0 || (_props$options = _props$options.dehydrate) === null || _props$options === void 0 ? void 0 : _props$options.shouldDehydrateQuery) ?? _tanstack_react_query.defaultShouldDehydrateQuery;
|
|
35
|
+
const dehydratedState = (0, _tanstack_react_query.dehydrate)(queryClient, {
|
|
36
|
+
...(_props$options2 = props.options) === null || _props$options2 === void 0 ? void 0 : _props$options2.dehydrate,
|
|
37
|
+
shouldDehydrateQuery(query) {
|
|
38
|
+
return trackedKeys.has(query.queryHash) && shouldDehydrate(query);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
trackedKeys.clear();
|
|
42
|
+
if (!dehydratedState.queries.length) return [];
|
|
43
|
+
return [dehydratedState];
|
|
44
|
+
},
|
|
45
|
+
onEntries: (entries) => {
|
|
46
|
+
for (const hydratedState of entries) {
|
|
47
|
+
var _props$options3;
|
|
48
|
+
(0, _tanstack_react_query.hydrate)(queryClient, hydratedState, (_props$options3 = props.options) === null || _props$options3 === void 0 ? void 0 : _props$options3.hydrate);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
transformer: props.transformer,
|
|
52
|
+
nonce: props.nonce,
|
|
53
|
+
children: props.children
|
|
54
|
+
});
|
|
83
55
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
});
|
|
56
|
+
//#endregion
|
|
57
|
+
exports.ReactQueryStreamedHydration = ReactQueryStreamedHydration;
|
|
58
|
+
|
|
88
59
|
//# sourceMappingURL=ReactQueryStreamedHydration.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ReactQueryStreamedHydration.tsx"],"sourcesContent":["'use client'\n\nimport {\n defaultShouldDehydrateQuery,\n dehydrate,\n environmentManager,\n hydrate,\n useQueryClient,\n} from '@tanstack/react-query'\nimport * as React from 'react'\nimport { createHydrationStreamProvider } from './HydrationStreamProvider'\nimport type { HydrationStreamProviderProps } from './HydrationStreamProvider'\nimport type {\n DehydrateOptions,\n DehydratedState,\n HydrateOptions,\n QueryClient,\n} from '@tanstack/react-query'\n\nconst stream = createHydrationStreamProvider<DehydratedState>()\n\n/**\n * This component is responsible for:\n * - hydrating the query client on the server\n * - dehydrating the query client on the server\n */\nexport function ReactQueryStreamedHydration(props: {\n children: React.ReactNode\n queryClient?: QueryClient\n nonce?: string\n options?: {\n hydrate?: HydrateOptions\n dehydrate?: DehydrateOptions\n }\n transformer?: HydrationStreamProviderProps<DehydratedState>['transformer']\n}) {\n const queryClient = useQueryClient(props.queryClient)\n\n /**\n * We need to track which queries were added/updated during the render\n */\n const [trackedKeys] = React.useState(() => new Set<string>())\n\n // <server only>\n if (environmentManager.isServer()) {\n // Do we need to care about unsubscribing? I don't think so to be honest\n queryClient.getQueryCache().subscribe((event) => {\n switch (event.type) {\n case 'added':\n case 'updated':\n // console.log('tracking', event.query.queryHash, 'b/c of a', event.type)\n trackedKeys.add(event.query.queryHash)\n }\n })\n }\n // </server only>\n\n return (\n <stream.Provider\n // Happens on server:\n onFlush={() => {\n /**\n * Dehydrated state of the client where we only include the queries that were added/updated since the last flush\n */\n const shouldDehydrate =\n props.options?.dehydrate?.shouldDehydrateQuery ??\n defaultShouldDehydrateQuery\n\n const dehydratedState = dehydrate(queryClient, {\n ...props.options?.dehydrate,\n shouldDehydrateQuery(query) {\n return trackedKeys.has(query.queryHash) && shouldDehydrate(query)\n },\n })\n trackedKeys.clear()\n\n if (!dehydratedState.queries.length) {\n return []\n }\n\n return [dehydratedState]\n }}\n // Happens in browser:\n onEntries={(entries) => {\n for (const hydratedState of entries) {\n hydrate(queryClient, hydratedState, props.options?.hydrate)\n }\n }}\n // Handle BigInts etc using superjson\n transformer={props.transformer}\n nonce={props.nonce}\n >\n {props.children}\n </stream.Provider>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReactQueryStreamedHydration.cjs","names":["createHydrationStreamProvider","useQueryClient","React","environmentManager","defaultShouldDehydrateQuery","dehydrate"],"sources":["../../src/ReactQueryStreamedHydration.tsx"],"sourcesContent":["'use client'\n\nimport {\n defaultShouldDehydrateQuery,\n dehydrate,\n environmentManager,\n hydrate,\n useQueryClient,\n} from '@tanstack/react-query'\nimport * as React from 'react'\nimport { createHydrationStreamProvider } from './HydrationStreamProvider'\nimport type { HydrationStreamProviderProps } from './HydrationStreamProvider'\nimport type {\n DehydrateOptions,\n DehydratedState,\n HydrateOptions,\n QueryClient,\n} from '@tanstack/react-query'\n\nconst stream = createHydrationStreamProvider<DehydratedState>()\n\n/**\n * This component is responsible for:\n * - hydrating the query client on the server\n * - dehydrating the query client on the server\n */\nexport function ReactQueryStreamedHydration(props: {\n children: React.ReactNode\n queryClient?: QueryClient\n nonce?: string\n options?: {\n hydrate?: HydrateOptions\n dehydrate?: DehydrateOptions\n }\n transformer?: HydrationStreamProviderProps<DehydratedState>['transformer']\n}) {\n const queryClient = useQueryClient(props.queryClient)\n\n /**\n * We need to track which queries were added/updated during the render\n */\n const [trackedKeys] = React.useState(() => new Set<string>())\n\n // <server only>\n if (environmentManager.isServer()) {\n // Do we need to care about unsubscribing? I don't think so to be honest\n queryClient.getQueryCache().subscribe((event) => {\n switch (event.type) {\n case 'added':\n case 'updated':\n // console.log('tracking', event.query.queryHash, 'b/c of a', event.type)\n trackedKeys.add(event.query.queryHash)\n }\n })\n }\n // </server only>\n\n return (\n <stream.Provider\n // Happens on server:\n onFlush={() => {\n /**\n * Dehydrated state of the client where we only include the queries that were added/updated since the last flush\n */\n const shouldDehydrate =\n props.options?.dehydrate?.shouldDehydrateQuery ??\n defaultShouldDehydrateQuery\n\n const dehydratedState = dehydrate(queryClient, {\n ...props.options?.dehydrate,\n shouldDehydrateQuery(query) {\n return trackedKeys.has(query.queryHash) && shouldDehydrate(query)\n },\n })\n trackedKeys.clear()\n\n if (!dehydratedState.queries.length) {\n return []\n }\n\n return [dehydratedState]\n }}\n // Happens in browser:\n onEntries={(entries) => {\n for (const hydratedState of entries) {\n hydrate(queryClient, hydratedState, props.options?.hydrate)\n }\n }}\n // Handle BigInts etc using superjson\n transformer={props.transformer}\n nonce={props.nonce}\n >\n {props.children}\n </stream.Provider>\n )\n}\n"],"mappings":";;;;;;;;;AAmBA,MAAM,SAASA,gCAAAA,8BAA+C;;;;;;AAO9D,SAAgB,4BAA4B,OASzC;CACD,MAAM,eAAA,GAAcC,sBAAAA,eAAAA,CAAe,MAAM,WAAW;;;;CAKpD,MAAM,CAAC,eAAeC,MAAM,+BAAe,IAAI,IAAY,CAAC;CAG5D,IAAIC,sBAAAA,mBAAmB,SAAS,GAE9B,YAAY,cAAc,CAAC,CAAC,WAAW,UAAU;EAC/C,QAAQ,MAAM,MAAd;GACE,KAAK;GACL,KAAK,WAEH,YAAY,IAAI,MAAM,MAAM,SAAS;EACzC;CACF,CAAC;CAIH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAO,UAAR;EAEE,eAAe;;;;;GAIb,MAAM,oBAAA,iBACJ,MAAM,aAAA,QAAA,mBAAA,KAAA,MAAA,iBAAA,eAAS,eAAA,QAAA,mBAAA,KAAA,IAAA,KAAA,IAAA,eAAW,yBAC1BC,sBAAAA;GAEF,MAAM,mBAAA,GAAkBC,sBAAAA,UAAAA,CAAU,aAAa;IAC7C,IAAA,kBAAG,MAAM,aAAA,QAAA,oBAAA,KAAA,IAAA,KAAA,IAAA,gBAAS;IAClB,qBAAqB,OAAO;KAC1B,OAAO,YAAY,IAAI,MAAM,SAAS,KAAK,gBAAgB,KAAK;IAClE;GACF,CAAC;GACD,YAAY,MAAM;GAElB,IAAI,CAAC,gBAAgB,QAAQ,QAC3B,OAAO,CAAC;GAGV,OAAO,CAAC,eAAe;EACzB;EAEA,YAAY,YAAY;GACtB,KAAK,MAAM,iBAAiB,SAAS;;IACnC,CAAA,GAAA,sBAAA,QAAA,CAAQ,aAAa,gBAAA,kBAAe,MAAM,aAAA,QAAA,oBAAA,KAAA,IAAA,KAAA,IAAA,gBAAS,OAAO;GAC5D;EACF;EAEA,aAAa,MAAM;EACnB,OAAO,MAAM;EAEZ,UAAA,MAAM;CACQ,CAAA;AAErB"}
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as HydrationStreamProviderProps } from "./HydrationStreamProvider-D_lqnUNo.cjs";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { DehydrateOptions, DehydratedState, HydrateOptions, QueryClient } from "@tanstack/react-query";
|
|
4
|
+
//#region src/ReactQueryStreamedHydration.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This component is responsible for:
|
|
7
|
+
* - hydrating the query client on the server
|
|
8
|
+
* - dehydrating the query client on the server
|
|
9
|
+
*/
|
|
10
|
+
declare function ReactQueryStreamedHydration(props: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
queryClient?: QueryClient;
|
|
13
|
+
nonce?: string;
|
|
14
|
+
options?: {
|
|
15
|
+
hydrate?: HydrateOptions;
|
|
16
|
+
dehydrate?: DehydrateOptions;
|
|
17
|
+
};
|
|
18
|
+
transformer?: HydrationStreamProviderProps<DehydratedState>['transformer'];
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ReactQueryStreamedHydration };
|
|
22
|
+
//# sourceMappingURL=ReactQueryStreamedHydration.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactQueryStreamedHydration.d.cts","names":[],"sources":["../../src/ReactQueryStreamedHydration.tsx"],"mappings":";;;;;;;;;iBA0BgB,4BAA4B;EAC1C,UAAU,MAAM;EAChB,cAAc;EACd;EACA;IACE,UAAU;IACV,YAAY;;EAEd,cAAc,6BAA6B;gCAC5C,IAAA"}
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as HydrationStreamProviderProps } from "./HydrationStreamProvider-D_lqnUNo.js";
|
|
2
|
+
import { DehydrateOptions, DehydratedState, HydrateOptions, QueryClient } from "@tanstack/react-query";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
//#region src/ReactQueryStreamedHydration.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This component is responsible for:
|
|
7
|
+
* - hydrating the query client on the server
|
|
8
|
+
* - dehydrating the query client on the server
|
|
9
|
+
*/
|
|
10
|
+
declare function ReactQueryStreamedHydration(props: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
queryClient?: QueryClient;
|
|
13
|
+
nonce?: string;
|
|
14
|
+
options?: {
|
|
15
|
+
hydrate?: HydrateOptions;
|
|
16
|
+
dehydrate?: DehydrateOptions;
|
|
17
|
+
};
|
|
18
|
+
transformer?: HydrationStreamProviderProps<DehydratedState>['transformer'];
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ReactQueryStreamedHydration };
|
|
22
|
+
//# sourceMappingURL=ReactQueryStreamedHydration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactQueryStreamedHydration.d.ts","names":[],"sources":["../../src/ReactQueryStreamedHydration.tsx"],"mappings":";;;;;;;;;iBA0BgB,4BAA4B;EAC1C,UAAU,MAAM;EAChB,cAAc;EACd;EACA;IACE,UAAU;IACV,YAAY;;EAEd,cAAc,6BAA6B;gCAC5C,IAAA"}
|
|
@@ -1,60 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
// src/ReactQueryStreamedHydration.tsx
|
|
4
|
-
import {
|
|
5
|
-
defaultShouldDehydrateQuery,
|
|
6
|
-
dehydrate,
|
|
7
|
-
environmentManager,
|
|
8
|
-
hydrate,
|
|
9
|
-
useQueryClient
|
|
10
|
-
} from "@tanstack/react-query";
|
|
11
|
-
import * as React from "react";
|
|
12
2
|
import { createHydrationStreamProvider } from "./HydrationStreamProvider.js";
|
|
3
|
+
import { defaultShouldDehydrateQuery, dehydrate, environmentManager, hydrate, useQueryClient } from "@tanstack/react-query";
|
|
4
|
+
import * as React from "react";
|
|
13
5
|
import { jsx } from "react/jsx-runtime";
|
|
14
|
-
|
|
6
|
+
//#region src/ReactQueryStreamedHydration.tsx
|
|
7
|
+
const stream = createHydrationStreamProvider();
|
|
8
|
+
/**
|
|
9
|
+
* This component is responsible for:
|
|
10
|
+
* - hydrating the query client on the server
|
|
11
|
+
* - dehydrating the query client on the server
|
|
12
|
+
*/
|
|
15
13
|
function ReactQueryStreamedHydration(props) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
);
|
|
14
|
+
const queryClient = useQueryClient(props.queryClient);
|
|
15
|
+
/**
|
|
16
|
+
* We need to track which queries were added/updated during the render
|
|
17
|
+
*/
|
|
18
|
+
const [trackedKeys] = React.useState(() => /* @__PURE__ */ new Set());
|
|
19
|
+
if (environmentManager.isServer()) queryClient.getQueryCache().subscribe((event) => {
|
|
20
|
+
switch (event.type) {
|
|
21
|
+
case "added":
|
|
22
|
+
case "updated": trackedKeys.add(event.query.queryHash);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx(stream.Provider, {
|
|
26
|
+
onFlush: () => {
|
|
27
|
+
var _props$options, _props$options2;
|
|
28
|
+
/**
|
|
29
|
+
* Dehydrated state of the client where we only include the queries that were added/updated since the last flush
|
|
30
|
+
*/
|
|
31
|
+
const shouldDehydrate = ((_props$options = props.options) === null || _props$options === void 0 || (_props$options = _props$options.dehydrate) === null || _props$options === void 0 ? void 0 : _props$options.shouldDehydrateQuery) ?? defaultShouldDehydrateQuery;
|
|
32
|
+
const dehydratedState = dehydrate(queryClient, {
|
|
33
|
+
...(_props$options2 = props.options) === null || _props$options2 === void 0 ? void 0 : _props$options2.dehydrate,
|
|
34
|
+
shouldDehydrateQuery(query) {
|
|
35
|
+
return trackedKeys.has(query.queryHash) && shouldDehydrate(query);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
trackedKeys.clear();
|
|
39
|
+
if (!dehydratedState.queries.length) return [];
|
|
40
|
+
return [dehydratedState];
|
|
41
|
+
},
|
|
42
|
+
onEntries: (entries) => {
|
|
43
|
+
for (const hydratedState of entries) {
|
|
44
|
+
var _props$options3;
|
|
45
|
+
hydrate(queryClient, hydratedState, (_props$options3 = props.options) === null || _props$options3 === void 0 ? void 0 : _props$options3.hydrate);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
transformer: props.transformer,
|
|
49
|
+
nonce: props.nonce,
|
|
50
|
+
children: props.children
|
|
51
|
+
});
|
|
56
52
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ReactQueryStreamedHydration };
|
|
55
|
+
|
|
60
56
|
//# sourceMappingURL=ReactQueryStreamedHydration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ReactQueryStreamedHydration.tsx"],"sourcesContent":["'use client'\n\nimport {\n defaultShouldDehydrateQuery,\n dehydrate,\n environmentManager,\n hydrate,\n useQueryClient,\n} from '@tanstack/react-query'\nimport * as React from 'react'\nimport { createHydrationStreamProvider } from './HydrationStreamProvider'\nimport type { HydrationStreamProviderProps } from './HydrationStreamProvider'\nimport type {\n DehydrateOptions,\n DehydratedState,\n HydrateOptions,\n QueryClient,\n} from '@tanstack/react-query'\n\nconst stream = createHydrationStreamProvider<DehydratedState>()\n\n/**\n * This component is responsible for:\n * - hydrating the query client on the server\n * - dehydrating the query client on the server\n */\nexport function ReactQueryStreamedHydration(props: {\n children: React.ReactNode\n queryClient?: QueryClient\n nonce?: string\n options?: {\n hydrate?: HydrateOptions\n dehydrate?: DehydrateOptions\n }\n transformer?: HydrationStreamProviderProps<DehydratedState>['transformer']\n}) {\n const queryClient = useQueryClient(props.queryClient)\n\n /**\n * We need to track which queries were added/updated during the render\n */\n const [trackedKeys] = React.useState(() => new Set<string>())\n\n // <server only>\n if (environmentManager.isServer()) {\n // Do we need to care about unsubscribing? I don't think so to be honest\n queryClient.getQueryCache().subscribe((event) => {\n switch (event.type) {\n case 'added':\n case 'updated':\n // console.log('tracking', event.query.queryHash, 'b/c of a', event.type)\n trackedKeys.add(event.query.queryHash)\n }\n })\n }\n // </server only>\n\n return (\n <stream.Provider\n // Happens on server:\n onFlush={() => {\n /**\n * Dehydrated state of the client where we only include the queries that were added/updated since the last flush\n */\n const shouldDehydrate =\n props.options?.dehydrate?.shouldDehydrateQuery ??\n defaultShouldDehydrateQuery\n\n const dehydratedState = dehydrate(queryClient, {\n ...props.options?.dehydrate,\n shouldDehydrateQuery(query) {\n return trackedKeys.has(query.queryHash) && shouldDehydrate(query)\n },\n })\n trackedKeys.clear()\n\n if (!dehydratedState.queries.length) {\n return []\n }\n\n return [dehydratedState]\n }}\n // Happens in browser:\n onEntries={(entries) => {\n for (const hydratedState of entries) {\n hydrate(queryClient, hydratedState, props.options?.hydrate)\n }\n }}\n // Handle BigInts etc using superjson\n transformer={props.transformer}\n nonce={props.nonce}\n >\n {props.children}\n </stream.Provider>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReactQueryStreamedHydration.js","names":[],"sources":["../../src/ReactQueryStreamedHydration.tsx"],"sourcesContent":["'use client'\n\nimport {\n defaultShouldDehydrateQuery,\n dehydrate,\n environmentManager,\n hydrate,\n useQueryClient,\n} from '@tanstack/react-query'\nimport * as React from 'react'\nimport { createHydrationStreamProvider } from './HydrationStreamProvider'\nimport type { HydrationStreamProviderProps } from './HydrationStreamProvider'\nimport type {\n DehydrateOptions,\n DehydratedState,\n HydrateOptions,\n QueryClient,\n} from '@tanstack/react-query'\n\nconst stream = createHydrationStreamProvider<DehydratedState>()\n\n/**\n * This component is responsible for:\n * - hydrating the query client on the server\n * - dehydrating the query client on the server\n */\nexport function ReactQueryStreamedHydration(props: {\n children: React.ReactNode\n queryClient?: QueryClient\n nonce?: string\n options?: {\n hydrate?: HydrateOptions\n dehydrate?: DehydrateOptions\n }\n transformer?: HydrationStreamProviderProps<DehydratedState>['transformer']\n}) {\n const queryClient = useQueryClient(props.queryClient)\n\n /**\n * We need to track which queries were added/updated during the render\n */\n const [trackedKeys] = React.useState(() => new Set<string>())\n\n // <server only>\n if (environmentManager.isServer()) {\n // Do we need to care about unsubscribing? I don't think so to be honest\n queryClient.getQueryCache().subscribe((event) => {\n switch (event.type) {\n case 'added':\n case 'updated':\n // console.log('tracking', event.query.queryHash, 'b/c of a', event.type)\n trackedKeys.add(event.query.queryHash)\n }\n })\n }\n // </server only>\n\n return (\n <stream.Provider\n // Happens on server:\n onFlush={() => {\n /**\n * Dehydrated state of the client where we only include the queries that were added/updated since the last flush\n */\n const shouldDehydrate =\n props.options?.dehydrate?.shouldDehydrateQuery ??\n defaultShouldDehydrateQuery\n\n const dehydratedState = dehydrate(queryClient, {\n ...props.options?.dehydrate,\n shouldDehydrateQuery(query) {\n return trackedKeys.has(query.queryHash) && shouldDehydrate(query)\n },\n })\n trackedKeys.clear()\n\n if (!dehydratedState.queries.length) {\n return []\n }\n\n return [dehydratedState]\n }}\n // Happens in browser:\n onEntries={(entries) => {\n for (const hydratedState of entries) {\n hydrate(queryClient, hydratedState, props.options?.hydrate)\n }\n }}\n // Handle BigInts etc using superjson\n transformer={props.transformer}\n nonce={props.nonce}\n >\n {props.children}\n </stream.Provider>\n )\n}\n"],"mappings":";;;;;;AAmBA,MAAM,SAAS,8BAA+C;;;;;;AAO9D,SAAgB,4BAA4B,OASzC;CACD,MAAM,cAAc,eAAe,MAAM,WAAW;;;;CAKpD,MAAM,CAAC,eAAe,MAAM,+BAAe,IAAI,IAAY,CAAC;CAG5D,IAAI,mBAAmB,SAAS,GAE9B,YAAY,cAAc,CAAC,CAAC,WAAW,UAAU;EAC/C,QAAQ,MAAM,MAAd;GACE,KAAK;GACL,KAAK,WAEH,YAAY,IAAI,MAAM,MAAM,SAAS;EACzC;CACF,CAAC;CAIH,OACE,oBAAC,OAAO,UAAR;EAEE,eAAe;;;;;GAIb,MAAM,oBAAA,iBACJ,MAAM,aAAA,QAAA,mBAAA,KAAA,MAAA,iBAAA,eAAS,eAAA,QAAA,mBAAA,KAAA,IAAA,KAAA,IAAA,eAAW,yBAC1B;GAEF,MAAM,kBAAkB,UAAU,aAAa;IAC7C,IAAA,kBAAG,MAAM,aAAA,QAAA,oBAAA,KAAA,IAAA,KAAA,IAAA,gBAAS;IAClB,qBAAqB,OAAO;KAC1B,OAAO,YAAY,IAAI,MAAM,SAAS,KAAK,gBAAgB,KAAK;IAClE;GACF,CAAC;GACD,YAAY,MAAM;GAElB,IAAI,CAAC,gBAAgB,QAAQ,QAC3B,OAAO,CAAC;GAGV,OAAO,CAAC,eAAe;EACzB;EAEA,YAAY,YAAY;GACtB,KAAK,MAAM,iBAAiB,SAAS;;IACnC,QAAQ,aAAa,gBAAA,kBAAe,MAAM,aAAA,QAAA,oBAAA,KAAA,IAAA,KAAA,IAAA,gBAAS,OAAO;GAC5D;EACF;EAEA,aAAa,MAAM;EACnB,OAAO,MAAM;EAEZ,UAAA,MAAM;CACQ,CAAA;AAErB"}
|
|
@@ -1,43 +1,18 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/htmlescape.ts
|
|
3
|
+
const ESCAPE_LOOKUP = {
|
|
4
|
+
"&": "\\u0026",
|
|
5
|
+
">": "\\u003e",
|
|
6
|
+
"<": "\\u003c",
|
|
7
|
+
"\u2028": "\\u2028",
|
|
8
|
+
"\u2029": "\\u2029"
|
|
9
9
|
};
|
|
10
|
-
|
|
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
|
-
|
|
20
|
-
// src/htmlescape.ts
|
|
21
|
-
var htmlescape_exports = {};
|
|
22
|
-
__export(htmlescape_exports, {
|
|
23
|
-
ESCAPE_REGEX: () => ESCAPE_REGEX,
|
|
24
|
-
htmlEscapeJsonString: () => htmlEscapeJsonString
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(htmlescape_exports);
|
|
27
|
-
var ESCAPE_LOOKUP = {
|
|
28
|
-
"&": "\\u0026",
|
|
29
|
-
">": "\\u003e",
|
|
30
|
-
"<": "\\u003c",
|
|
31
|
-
"\u2028": "\\u2028",
|
|
32
|
-
"\u2029": "\\u2029"
|
|
33
|
-
};
|
|
34
|
-
var ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
10
|
+
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
35
11
|
function htmlEscapeJsonString(str) {
|
|
36
|
-
|
|
12
|
+
return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
37
13
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.ESCAPE_REGEX = ESCAPE_REGEX;
|
|
16
|
+
exports.htmlEscapeJsonString = htmlEscapeJsonString;
|
|
17
|
+
|
|
43
18
|
//# sourceMappingURL=htmlescape.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/htmlescape.ts"],"sourcesContent":["// --------------------------------------------------------------------------------\n//\n// copied from\n// https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/src/server/htmlescape.ts\n// License: https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/license.md\n//\n// --------------------------------------------------------------------------------\n\n// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: Record<string, string> = {\n '&': '\\\\u0026',\n '>': '\\\\u003e',\n '<': '\\\\u003c',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]!)\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"htmlescape.cjs","names":[],"sources":["../../src/htmlescape.ts"],"sourcesContent":["// --------------------------------------------------------------------------------\n//\n// copied from\n// https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/src/server/htmlescape.ts\n// License: https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/license.md\n//\n// --------------------------------------------------------------------------------\n\n// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: Record<string, string> = {\n '&': '\\\\u0026',\n '>': '\\\\u003e',\n '<': '\\\\u003c',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]!)\n}\n"],"mappings":";;AAWA,MAAM,gBAAwC;CAC5C,KAAK;CACL,KAAK;CACL,KAAK;CACL,UAAU;CACV,UAAU;AACZ;AAEA,MAAa,eAAe;AAE5B,SAAgB,qBAAqB,KAAqB;CACxD,OAAO,IAAI,QAAQ,eAAe,UAAU,cAAc,MAAO;AACnE"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/htmlescape.d.ts
|
|
2
|
+
declare const ESCAPE_REGEX: RegExp;
|
|
3
|
+
declare function htmlEscapeJsonString(str: string): string;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ESCAPE_REGEX, htmlEscapeJsonString };
|
|
6
|
+
//# sourceMappingURL=htmlescape.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlescape.d.cts","names":[],"sources":["../../src/htmlescape.ts"],"mappings":";cAmBa,cAAY;iBAET,qBAAqB"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/htmlescape.d.ts
|
|
2
|
+
declare const ESCAPE_REGEX: RegExp;
|
|
3
|
+
declare function htmlEscapeJsonString(str: string): string;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ESCAPE_REGEX, htmlEscapeJsonString };
|
|
6
|
+
//# sourceMappingURL=htmlescape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlescape.d.ts","names":[],"sources":["../../src/htmlescape.ts"],"mappings":";cAmBa,cAAY;iBAET,qBAAqB"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/htmlescape.ts
|
|
2
|
+
const ESCAPE_LOOKUP = {
|
|
3
|
+
"&": "\\u0026",
|
|
4
|
+
">": "\\u003e",
|
|
5
|
+
"<": "\\u003c",
|
|
6
|
+
"\u2028": "\\u2028",
|
|
7
|
+
"\u2029": "\\u2029"
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
10
10
|
function htmlEscapeJsonString(str) {
|
|
11
|
-
|
|
11
|
+
return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ESCAPE_REGEX, htmlEscapeJsonString };
|
|
15
|
+
|
|
17
16
|
//# sourceMappingURL=htmlescape.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/htmlescape.ts"],"sourcesContent":["// --------------------------------------------------------------------------------\n//\n// copied from\n// https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/src/server/htmlescape.ts\n// License: https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/license.md\n//\n// --------------------------------------------------------------------------------\n\n// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: Record<string, string> = {\n '&': '\\\\u0026',\n '>': '\\\\u003e',\n '<': '\\\\u003c',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]!)\n}\n"],"mappings":";AAWA,
|
|
1
|
+
{"version":3,"file":"htmlescape.js","names":[],"sources":["../../src/htmlescape.ts"],"sourcesContent":["// --------------------------------------------------------------------------------\n//\n// copied from\n// https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/src/server/htmlescape.ts\n// License: https://github.com/vercel/next.js/blob/6bc07792a4462a4bf921a72ab30dc4ab2c4e1bda/packages/next/license.md\n//\n// --------------------------------------------------------------------------------\n\n// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: Record<string, string> = {\n '&': '\\\\u0026',\n '>': '\\\\u003e',\n '<': '\\\\u003c',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]!)\n}\n"],"mappings":";AAWA,MAAM,gBAAwC;CAC5C,KAAK;CACL,KAAK;CACL,KAAK;CACL,UAAU;CACV,UAAU;AACZ;AAEA,MAAa,eAAe;AAE5B,SAAgB,qBAAqB,KAAqB;CACxD,OAAO,IAAI,QAAQ,eAAe,UAAU,cAAc,MAAO;AACnE"}
|
package/build/legacy/index.cjs
CHANGED
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
ReactQueryStreamedHydration: () => import_ReactQueryStreamedHydration.ReactQueryStreamedHydration
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(index_exports);
|
|
26
|
-
var import_ReactQueryStreamedHydration = require("./ReactQueryStreamedHydration.cjs");
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
ReactQueryStreamedHydration
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_ReactQueryStreamedHydration = require("./ReactQueryStreamedHydration.cjs");
|
|
3
|
+
exports.ReactQueryStreamedHydration = require_ReactQueryStreamedHydration.ReactQueryStreamedHydration;
|
package/build/legacy/index.d.cts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactQueryStreamedHydration } from "./ReactQueryStreamedHydration.cjs";
|
|
2
|
+
export { ReactQueryStreamedHydration };
|
package/build/legacy/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactQueryStreamedHydration } from "./ReactQueryStreamedHydration.js";
|
|
2
|
+
export { ReactQueryStreamedHydration };
|
package/build/legacy/index.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
Object.defineProperty(exports, "__toESM", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return __toESM;
|
|
27
|
+
}
|
|
28
|
+
});
|