@bleedingdev/modern-js-plugin-tanstack 3.2.0-ultramodern.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.
- package/LICENSE +21 -0
- package/dist/cjs/cli/index.js +268 -0
- package/dist/cjs/cli/tanstackTypes.js +388 -0
- package/dist/cjs/cli.js +65 -0
- package/dist/cjs/runtime/DefaultNotFound.js +47 -0
- package/dist/cjs/runtime/basepathRewrite.js +62 -0
- package/dist/cjs/runtime/dataMutation.js +345 -0
- package/dist/cjs/runtime/hooks.js +57 -0
- package/dist/cjs/runtime/index.js +114 -0
- package/dist/cjs/runtime/lifecycle.js +125 -0
- package/dist/cjs/runtime/plugin.js +250 -0
- package/dist/cjs/runtime/plugin.node.js +304 -0
- package/dist/cjs/runtime/prefetchLink.js +55 -0
- package/dist/cjs/runtime/routeTree.js +492 -0
- package/dist/cjs/runtime/rsc/ClientSlot.js +53 -0
- package/dist/cjs/runtime/rsc/CompositeComponent.js +75 -0
- package/dist/cjs/runtime/rsc/ReplayableStream.js +141 -0
- package/dist/cjs/runtime/rsc/RscNodeRenderer.js +65 -0
- package/dist/cjs/runtime/rsc/SlotContext.js +54 -0
- package/dist/cjs/runtime/rsc/client.js +93 -0
- package/dist/cjs/runtime/rsc/createRscProxy.js +141 -0
- package/dist/cjs/runtime/rsc/index.js +42 -0
- package/dist/cjs/runtime/rsc/payloadRouter.js +211 -0
- package/dist/cjs/runtime/rsc/server.js +246 -0
- package/dist/cjs/runtime/rsc/slotUsageSanitizer.js +65 -0
- package/dist/cjs/runtime/rsc/symbols.js +72 -0
- package/dist/cjs/runtime/types.js +18 -0
- package/dist/cjs/runtime/utils.js +142 -0
- package/dist/cjs/runtime.js +58 -0
- package/dist/esm/cli/index.mjs +201 -0
- package/dist/esm/cli/tanstackTypes.mjs +341 -0
- package/dist/esm/cli.mjs +2 -0
- package/dist/esm/rslib-runtime.mjs +18 -0
- package/dist/esm/runtime/DefaultNotFound.mjs +13 -0
- package/dist/esm/runtime/basepathRewrite.mjs +28 -0
- package/dist/esm/runtime/dataMutation.mjs +305 -0
- package/dist/esm/runtime/hooks.mjs +8 -0
- package/dist/esm/runtime/index.mjs +6 -0
- package/dist/esm/runtime/lifecycle.mjs +82 -0
- package/dist/esm/runtime/plugin.mjs +214 -0
- package/dist/esm/runtime/plugin.node.mjs +268 -0
- package/dist/esm/runtime/prefetchLink.mjs +18 -0
- package/dist/esm/runtime/routeTree.mjs +452 -0
- package/dist/esm/runtime/rsc/ClientSlot.mjs +19 -0
- package/dist/esm/runtime/rsc/CompositeComponent.mjs +41 -0
- package/dist/esm/runtime/rsc/ReplayableStream.mjs +104 -0
- package/dist/esm/runtime/rsc/RscNodeRenderer.mjs +31 -0
- package/dist/esm/runtime/rsc/SlotContext.mjs +17 -0
- package/dist/esm/runtime/rsc/client.mjs +53 -0
- package/dist/esm/runtime/rsc/createRscProxy.mjs +107 -0
- package/dist/esm/runtime/rsc/index.mjs +1 -0
- package/dist/esm/runtime/rsc/payloadRouter.mjs +162 -0
- package/dist/esm/runtime/rsc/server.mjs +200 -0
- package/dist/esm/runtime/rsc/slotUsageSanitizer.mjs +31 -0
- package/dist/esm/runtime/rsc/symbols.mjs +17 -0
- package/dist/esm/runtime/types.mjs +0 -0
- package/dist/esm/runtime/utils.mjs +89 -0
- package/dist/esm/runtime.mjs +1 -0
- package/dist/esm-node/cli/index.mjs +205 -0
- package/dist/esm-node/cli/tanstackTypes.mjs +342 -0
- package/dist/esm-node/cli.mjs +3 -0
- package/dist/esm-node/rslib-runtime.mjs +19 -0
- package/dist/esm-node/runtime/DefaultNotFound.mjs +14 -0
- package/dist/esm-node/runtime/basepathRewrite.mjs +29 -0
- package/dist/esm-node/runtime/dataMutation.mjs +306 -0
- package/dist/esm-node/runtime/hooks.mjs +9 -0
- package/dist/esm-node/runtime/index.mjs +7 -0
- package/dist/esm-node/runtime/lifecycle.mjs +83 -0
- package/dist/esm-node/runtime/plugin.mjs +215 -0
- package/dist/esm-node/runtime/plugin.node.mjs +269 -0
- package/dist/esm-node/runtime/prefetchLink.mjs +19 -0
- package/dist/esm-node/runtime/routeTree.mjs +453 -0
- package/dist/esm-node/runtime/rsc/ClientSlot.mjs +20 -0
- package/dist/esm-node/runtime/rsc/CompositeComponent.mjs +42 -0
- package/dist/esm-node/runtime/rsc/ReplayableStream.mjs +105 -0
- package/dist/esm-node/runtime/rsc/RscNodeRenderer.mjs +32 -0
- package/dist/esm-node/runtime/rsc/SlotContext.mjs +18 -0
- package/dist/esm-node/runtime/rsc/client.mjs +54 -0
- package/dist/esm-node/runtime/rsc/createRscProxy.mjs +108 -0
- package/dist/esm-node/runtime/rsc/index.mjs +2 -0
- package/dist/esm-node/runtime/rsc/payloadRouter.mjs +163 -0
- package/dist/esm-node/runtime/rsc/server.mjs +201 -0
- package/dist/esm-node/runtime/rsc/slotUsageSanitizer.mjs +32 -0
- package/dist/esm-node/runtime/rsc/symbols.mjs +18 -0
- package/dist/esm-node/runtime/types.mjs +1 -0
- package/dist/esm-node/runtime/utils.mjs +90 -0
- package/dist/esm-node/runtime.mjs +2 -0
- package/dist/types/cli/index.d.ts +20 -0
- package/dist/types/cli/tanstackTypes.d.ts +11 -0
- package/dist/types/cli.d.ts +2 -0
- package/dist/types/runtime/DefaultNotFound.d.ts +2 -0
- package/dist/types/runtime/basepathRewrite.d.ts +8 -0
- package/dist/types/runtime/dataMutation.d.ts +29 -0
- package/dist/types/runtime/hooks.d.ts +18 -0
- package/dist/types/runtime/index.d.ts +9 -0
- package/dist/types/runtime/lifecycle.d.ts +22 -0
- package/dist/types/runtime/plugin.d.ts +17 -0
- package/dist/types/runtime/plugin.node.d.ts +17 -0
- package/dist/types/runtime/prefetchLink.d.ts +11 -0
- package/dist/types/runtime/routeTree.d.ts +11 -0
- package/dist/types/runtime/rsc/ClientSlot.d.ts +5 -0
- package/dist/types/runtime/rsc/CompositeComponent.d.ts +3 -0
- package/dist/types/runtime/rsc/ReplayableStream.d.ts +24 -0
- package/dist/types/runtime/rsc/RscNodeRenderer.d.ts +5 -0
- package/dist/types/runtime/rsc/SlotContext.d.ts +11 -0
- package/dist/types/runtime/rsc/client.d.ts +11 -0
- package/dist/types/runtime/rsc/createRscProxy.d.ts +7 -0
- package/dist/types/runtime/rsc/index.d.ts +2 -0
- package/dist/types/runtime/rsc/payloadRouter.d.ts +24 -0
- package/dist/types/runtime/rsc/server.d.ts +14 -0
- package/dist/types/runtime/rsc/slotUsageSanitizer.d.ts +2 -0
- package/dist/types/runtime/rsc/symbols.d.ts +46 -0
- package/dist/types/runtime/types.d.ts +68 -0
- package/dist/types/runtime/utils.d.ts +36 -0
- package/dist/types/runtime.d.ts +1 -0
- package/dist/types-direct/cli/index.d.ts +20 -0
- package/dist/types-direct/cli/tanstackTypes.d.ts +11 -0
- package/dist/types-direct/cli.d.ts +2 -0
- package/dist/types-direct/runtime/DefaultNotFound.d.ts +2 -0
- package/dist/types-direct/runtime/basepathRewrite.d.ts +8 -0
- package/dist/types-direct/runtime/dataMutation.d.ts +29 -0
- package/dist/types-direct/runtime/hooks.d.ts +18 -0
- package/dist/types-direct/runtime/index.d.ts +9 -0
- package/dist/types-direct/runtime/lifecycle.d.ts +22 -0
- package/dist/types-direct/runtime/plugin.d.ts +17 -0
- package/dist/types-direct/runtime/plugin.node.d.ts +17 -0
- package/dist/types-direct/runtime/prefetchLink.d.ts +11 -0
- package/dist/types-direct/runtime/routeTree.d.ts +11 -0
- package/dist/types-direct/runtime/rsc/ClientSlot.d.ts +5 -0
- package/dist/types-direct/runtime/rsc/CompositeComponent.d.ts +3 -0
- package/dist/types-direct/runtime/rsc/ReplayableStream.d.ts +24 -0
- package/dist/types-direct/runtime/rsc/RscNodeRenderer.d.ts +5 -0
- package/dist/types-direct/runtime/rsc/SlotContext.d.ts +11 -0
- package/dist/types-direct/runtime/rsc/client.d.ts +11 -0
- package/dist/types-direct/runtime/rsc/createRscProxy.d.ts +7 -0
- package/dist/types-direct/runtime/rsc/index.d.ts +2 -0
- package/dist/types-direct/runtime/rsc/payloadRouter.d.ts +24 -0
- package/dist/types-direct/runtime/rsc/server.d.ts +14 -0
- package/dist/types-direct/runtime/rsc/slotUsageSanitizer.d.ts +2 -0
- package/dist/types-direct/runtime/rsc/symbols.d.ts +46 -0
- package/dist/types-direct/runtime/types.d.ts +68 -0
- package/dist/types-direct/runtime/utils.d.ts +36 -0
- package/dist/types-direct/runtime.d.ts +1 -0
- package/package.json +126 -0
- package/rslib.config.mts +4 -0
- package/rstest.config.mts +43 -0
- package/src/cli/index.ts +388 -0
- package/src/cli/tanstackTypes.ts +503 -0
- package/src/cli.ts +2 -0
- package/src/runtime/DefaultNotFound.tsx +15 -0
- package/src/runtime/basepathRewrite.ts +59 -0
- package/src/runtime/dataMutation.tsx +517 -0
- package/src/runtime/hooks.ts +34 -0
- package/src/runtime/index.tsx +30 -0
- package/src/runtime/lifecycle.ts +150 -0
- package/src/runtime/plugin.node.tsx +534 -0
- package/src/runtime/plugin.tsx +395 -0
- package/src/runtime/prefetchLink.tsx +87 -0
- package/src/runtime/routeTree.ts +942 -0
- package/src/runtime/rsc/ClientSlot.tsx +25 -0
- package/src/runtime/rsc/CompositeComponent.tsx +65 -0
- package/src/runtime/rsc/ReplayableStream.ts +155 -0
- package/src/runtime/rsc/RscNodeRenderer.tsx +45 -0
- package/src/runtime/rsc/SlotContext.tsx +31 -0
- package/src/runtime/rsc/client.tsx +90 -0
- package/src/runtime/rsc/createRscProxy.tsx +189 -0
- package/src/runtime/rsc/index.ts +10 -0
- package/src/runtime/rsc/payloadRouter.ts +318 -0
- package/src/runtime/rsc/server.tsx +303 -0
- package/src/runtime/rsc/slotUsageSanitizer.ts +76 -0
- package/src/runtime/rsc/symbols.ts +106 -0
- package/src/runtime/ssr-shim.d.ts +12 -0
- package/src/runtime/types.ts +83 -0
- package/src/runtime/utils.tsx +161 -0
- package/src/runtime.ts +1 -0
- package/tests/router/cli.test.ts +386 -0
- package/tests/router/dataMutation.test.tsx +396 -0
- package/tests/router/prefetchLink.test.tsx +43 -0
- package/tests/router/routeTree.test.ts +502 -0
- package/tests/router/rsc.test.tsx +256 -0
- package/tests/router/tanstackTypes.test.ts +62 -0
- package/tsconfig.json +12 -0
- package/tsconfig.tsgo.json +6 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
__setTanstackRscPayloadDecoderForTests: ()=>__setTanstackRscPayloadDecoderForTests,
|
|
28
|
+
createTanstackRscServerPayload: ()=>createTanstackRscServerPayload,
|
|
29
|
+
handleTanstackRscRedirect: ()=>handleTanstackRscRedirect,
|
|
30
|
+
isTanstackRscPayloadNavigationEnabled: ()=>isTanstackRscPayloadNavigationEnabled,
|
|
31
|
+
loadTanstackRscPayload: ()=>loadTanstackRscPayload,
|
|
32
|
+
loadTanstackRscRouteData: ()=>loadTanstackRscRouteData
|
|
33
|
+
});
|
|
34
|
+
const react_router_namespaceObject = require("@tanstack/react-router");
|
|
35
|
+
const payloadFetchCache = new Map();
|
|
36
|
+
let payloadDecoder;
|
|
37
|
+
function getRouteId(match) {
|
|
38
|
+
const routeId = match.routeId ?? match.route?.id ?? match.id;
|
|
39
|
+
return 'string' == typeof routeId ? routeId : void 0;
|
|
40
|
+
}
|
|
41
|
+
function getRouteStaticData(match) {
|
|
42
|
+
return match.route?.options?.staticData || {};
|
|
43
|
+
}
|
|
44
|
+
function getRouteParentId(match) {
|
|
45
|
+
const parentId = match.route?.parentRoute?.id;
|
|
46
|
+
return 'string' == typeof parentId ? parentId : void 0;
|
|
47
|
+
}
|
|
48
|
+
function toRoutePath(match) {
|
|
49
|
+
const path = match.route?.options?.path;
|
|
50
|
+
return 'string' == typeof path ? path : void 0;
|
|
51
|
+
}
|
|
52
|
+
function toPayloadRoute(match) {
|
|
53
|
+
const routeId = getRouteId(match);
|
|
54
|
+
if (!routeId) return;
|
|
55
|
+
const staticData = getRouteStaticData(match);
|
|
56
|
+
const params = match.params && 'object' == typeof match.params ? match.params : {};
|
|
57
|
+
const pathname = 'string' == typeof match.pathname ? match.pathname : '';
|
|
58
|
+
return {
|
|
59
|
+
handle: staticData.modernRouteHandle,
|
|
60
|
+
hasAction: Boolean(staticData.modernRouteHasAction || staticData.modernRouteAction),
|
|
61
|
+
hasErrorBoundary: false,
|
|
62
|
+
hasLoader: Boolean(staticData.modernRouteHasLoader),
|
|
63
|
+
hasClientLoader: Boolean(staticData.modernRouteHasClientLoader),
|
|
64
|
+
id: routeId,
|
|
65
|
+
index: Boolean(match.route?.options?.index) || void 0,
|
|
66
|
+
params,
|
|
67
|
+
parentId: getRouteParentId(match),
|
|
68
|
+
path: toRoutePath(match),
|
|
69
|
+
pathname,
|
|
70
|
+
pathnameBase: 'string' == typeof match.pathnameBase ? match.pathnameBase : pathname
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function createTanstackRscServerPayload(router, options = {}) {
|
|
74
|
+
const matches = Array.isArray(router.state?.matches) ? router.state.matches : [];
|
|
75
|
+
const routes = [];
|
|
76
|
+
const loaderData = {};
|
|
77
|
+
const errors = {};
|
|
78
|
+
for (const match of matches){
|
|
79
|
+
const payloadRoute = toPayloadRoute(match);
|
|
80
|
+
if (payloadRoute) {
|
|
81
|
+
routes.push(payloadRoute);
|
|
82
|
+
if ('loaderData' in match && void 0 !== match.loaderData && !(options.omitClientLoaderData && payloadRoute.hasClientLoader)) loaderData[payloadRoute.id] = match.loaderData;
|
|
83
|
+
if (void 0 !== match.error) errors[payloadRoute.id] = match.error;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
type: 'render',
|
|
88
|
+
actionData: null,
|
|
89
|
+
errors: Object.keys(errors).length > 0 ? errors : null,
|
|
90
|
+
loaderData,
|
|
91
|
+
location: router.state?.location,
|
|
92
|
+
routes
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function handleTanstackRscRedirect(headers, basename, status) {
|
|
96
|
+
const newHeaders = new Headers(headers);
|
|
97
|
+
let redirectUrl = headers.get('Location') || '/';
|
|
98
|
+
if ('/' !== basename) redirectUrl = redirectUrl.replace(basename, '') || '/';
|
|
99
|
+
newHeaders.set('X-Modernjs-Redirect', redirectUrl);
|
|
100
|
+
newHeaders.set('X-Modernjs-BaseUrl', basename);
|
|
101
|
+
newHeaders.delete('Location');
|
|
102
|
+
return new Response(null, {
|
|
103
|
+
headers: newHeaders,
|
|
104
|
+
status
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function isTanstackRscPayloadNavigationEnabled() {
|
|
108
|
+
return "u" > typeof window;
|
|
109
|
+
}
|
|
110
|
+
async function decodePayload(stream) {
|
|
111
|
+
if (payloadDecoder) return payloadDecoder(stream);
|
|
112
|
+
const runtime = await import("@modern-js/runtime/rsc/client");
|
|
113
|
+
return runtime.createFromReadableStream(stream);
|
|
114
|
+
}
|
|
115
|
+
function isServerPayload(value) {
|
|
116
|
+
return Boolean(value) && 'object' == typeof value && 'render' === value.type && Array.isArray(value.routes);
|
|
117
|
+
}
|
|
118
|
+
function createPayloadFetchKey(request) {
|
|
119
|
+
return request.url;
|
|
120
|
+
}
|
|
121
|
+
function isAbsoluteUrl(value) {
|
|
122
|
+
try {
|
|
123
|
+
new URL(value);
|
|
124
|
+
return true;
|
|
125
|
+
} catch {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async function fetchTanstackRscPayload(request) {
|
|
130
|
+
const headers = new Headers(request.headers);
|
|
131
|
+
headers.set('x-rsc-tree', 'true');
|
|
132
|
+
const response = await fetch(request.url, {
|
|
133
|
+
credentials: 'same-origin',
|
|
134
|
+
headers,
|
|
135
|
+
method: 'GET',
|
|
136
|
+
signal: request.signal
|
|
137
|
+
});
|
|
138
|
+
const redirectLocation = response.headers.get('X-Modernjs-Redirect');
|
|
139
|
+
if (redirectLocation) {
|
|
140
|
+
if (isAbsoluteUrl(redirectLocation)) throw (0, react_router_namespaceObject.redirect)({
|
|
141
|
+
href: redirectLocation
|
|
142
|
+
});
|
|
143
|
+
throw (0, react_router_namespaceObject.redirect)({
|
|
144
|
+
to: redirectLocation || '/'
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
if (404 === response.status && !response.body) throw (0, react_router_namespaceObject.notFound)();
|
|
148
|
+
if (!response.body) throw new Error('TanStack RSC payload response body is null.');
|
|
149
|
+
const payload = await decodePayload(response.body);
|
|
150
|
+
if (!isServerPayload(payload)) throw new Error('Unexpected TanStack RSC payload type.');
|
|
151
|
+
return payload;
|
|
152
|
+
}
|
|
153
|
+
function loadTanstackRscPayload(request) {
|
|
154
|
+
const key = createPayloadFetchKey(request);
|
|
155
|
+
let payloadPromise = payloadFetchCache.get(key);
|
|
156
|
+
if (!payloadPromise) {
|
|
157
|
+
payloadPromise = fetchTanstackRscPayload(request).finally(()=>{
|
|
158
|
+
payloadFetchCache.delete(key);
|
|
159
|
+
});
|
|
160
|
+
payloadFetchCache.set(key, payloadPromise);
|
|
161
|
+
}
|
|
162
|
+
return payloadPromise;
|
|
163
|
+
}
|
|
164
|
+
function isSerializedNotFound(value) {
|
|
165
|
+
return Boolean(value) && 'object' == typeof value && true === value.isNotFound;
|
|
166
|
+
}
|
|
167
|
+
function toRouteErrors(payload) {
|
|
168
|
+
return payload.errors && 'object' == typeof payload.errors ? payload.errors : {};
|
|
169
|
+
}
|
|
170
|
+
function toRouteLoaderData(payload) {
|
|
171
|
+
return payload.loaderData && 'object' == typeof payload.loaderData ? payload.loaderData : {};
|
|
172
|
+
}
|
|
173
|
+
async function loadTanstackRscRouteData({ hasClientLoader, loadClientData, request, routeId }) {
|
|
174
|
+
if (hasClientLoader) return loadClientData();
|
|
175
|
+
if (!routeId) return loadClientData();
|
|
176
|
+
const payload = await loadTanstackRscPayload(request);
|
|
177
|
+
const errors = toRouteErrors(payload);
|
|
178
|
+
const routeError = errors[routeId];
|
|
179
|
+
if (void 0 !== routeError) {
|
|
180
|
+
if (isSerializedNotFound(routeError)) throw (0, react_router_namespaceObject.notFound)({
|
|
181
|
+
...routeError,
|
|
182
|
+
routeId
|
|
183
|
+
});
|
|
184
|
+
throw routeError;
|
|
185
|
+
}
|
|
186
|
+
const loaderData = toRouteLoaderData(payload);
|
|
187
|
+
if (routeId in loaderData) return loaderData[routeId];
|
|
188
|
+
const payloadRoute = payload.routes.find((route)=>route.id === routeId);
|
|
189
|
+
if (payloadRoute && payloadRoute.hasClientLoader) return loadClientData();
|
|
190
|
+
}
|
|
191
|
+
function __setTanstackRscPayloadDecoderForTests(decoder) {
|
|
192
|
+
payloadDecoder = decoder;
|
|
193
|
+
payloadFetchCache.clear();
|
|
194
|
+
}
|
|
195
|
+
exports.__setTanstackRscPayloadDecoderForTests = __webpack_exports__.__setTanstackRscPayloadDecoderForTests;
|
|
196
|
+
exports.createTanstackRscServerPayload = __webpack_exports__.createTanstackRscServerPayload;
|
|
197
|
+
exports.handleTanstackRscRedirect = __webpack_exports__.handleTanstackRscRedirect;
|
|
198
|
+
exports.isTanstackRscPayloadNavigationEnabled = __webpack_exports__.isTanstackRscPayloadNavigationEnabled;
|
|
199
|
+
exports.loadTanstackRscPayload = __webpack_exports__.loadTanstackRscPayload;
|
|
200
|
+
exports.loadTanstackRscRouteData = __webpack_exports__.loadTanstackRscRouteData;
|
|
201
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
202
|
+
"__setTanstackRscPayloadDecoderForTests",
|
|
203
|
+
"createTanstackRscServerPayload",
|
|
204
|
+
"handleTanstackRscRedirect",
|
|
205
|
+
"isTanstackRscPayloadNavigationEnabled",
|
|
206
|
+
"loadTanstackRscPayload",
|
|
207
|
+
"loadTanstackRscRouteData"
|
|
208
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
209
|
+
Object.defineProperty(exports, '__esModule', {
|
|
210
|
+
value: true
|
|
211
|
+
});
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
CompositeComponent: ()=>external_CompositeComponent_js_namespaceObject.CompositeComponent,
|
|
28
|
+
createCompositeComponent: ()=>createCompositeComponent,
|
|
29
|
+
getTanstackRscSerializationAdapters: ()=>getTanstackRscSerializationAdapters,
|
|
30
|
+
renderServerComponent: ()=>renderServerComponent,
|
|
31
|
+
rscSerializationAdapter: ()=>rscSerializationAdapter
|
|
32
|
+
});
|
|
33
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
+
const server_namespaceObject = require("@modern-js/runtime/rsc/server");
|
|
35
|
+
const react_router_namespaceObject = require("@tanstack/react-router");
|
|
36
|
+
const router_core_namespaceObject = require("@tanstack/router-core");
|
|
37
|
+
const external_react_namespaceObject = require("react");
|
|
38
|
+
const external_ClientSlot_js_namespaceObject = require("./ClientSlot.js");
|
|
39
|
+
const external_createRscProxy_js_namespaceObject = require("./createRscProxy.js");
|
|
40
|
+
const external_ReplayableStream_js_namespaceObject = require("./ReplayableStream.js");
|
|
41
|
+
const external_slotUsageSanitizer_js_namespaceObject = require("./slotUsageSanitizer.js");
|
|
42
|
+
const external_symbols_js_namespaceObject = require("./symbols.js");
|
|
43
|
+
const external_CompositeComponent_js_namespaceObject = require("./CompositeComponent.js");
|
|
44
|
+
function createTreeGetter(stream) {
|
|
45
|
+
let ready = false;
|
|
46
|
+
let tree;
|
|
47
|
+
const treePromise = Promise.resolve((0, server_namespaceObject.createFromReadableStream)(stream.createReplayStream())).then((value)=>{
|
|
48
|
+
tree = value;
|
|
49
|
+
ready = true;
|
|
50
|
+
return value;
|
|
51
|
+
});
|
|
52
|
+
return ()=>{
|
|
53
|
+
if (ready) return tree;
|
|
54
|
+
return (0, external_react_namespaceObject.use)(treePromise);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function createSlotProxy(options) {
|
|
58
|
+
const cache = new Map();
|
|
59
|
+
return new Proxy({}, {
|
|
60
|
+
get (_target, prop) {
|
|
61
|
+
if ('then' === prop || 'string' != typeof prop) return;
|
|
62
|
+
if ('children' === prop) {
|
|
63
|
+
options?.onSlotCall?.('children', []);
|
|
64
|
+
return /*#__PURE__*/ (0, external_react_namespaceObject.createElement)(external_ClientSlot_js_namespaceObject.ClientSlot, {
|
|
65
|
+
args: [],
|
|
66
|
+
slot: 'children'
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (!cache.has(prop)) cache.set(prop, (...args)=>{
|
|
70
|
+
options?.onSlotCall?.(prop, args);
|
|
71
|
+
return /*#__PURE__*/ (0, external_react_namespaceObject.createElement)(external_ClientSlot_js_namespaceObject.ClientSlot, {
|
|
72
|
+
args,
|
|
73
|
+
slot: prop
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
return cache.get(prop);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function toReplayableFlightStream(node, handlers) {
|
|
81
|
+
const flightStream = (0, server_namespaceObject.renderRsc)({
|
|
82
|
+
element: node
|
|
83
|
+
});
|
|
84
|
+
return new external_ReplayableStream_js_namespaceObject.ReplayableStream(handlers ? wrapReadableStream(flightStream, handlers) : flightStream);
|
|
85
|
+
}
|
|
86
|
+
async function renderServerComponent(node) {
|
|
87
|
+
const stream = toReplayableFlightStream(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
|
|
88
|
+
children: node
|
|
89
|
+
}));
|
|
90
|
+
const streamWrapper = {
|
|
91
|
+
createReplayStream: ()=>stream.createReplayStream()
|
|
92
|
+
};
|
|
93
|
+
return (0, external_createRscProxy_js_namespaceObject.createRscProxy)(createTreeGetter(streamWrapper), {
|
|
94
|
+
renderable: true,
|
|
95
|
+
stream: streamWrapper
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async function createCompositeComponent(component) {
|
|
99
|
+
const slotUsagesEmitter = 'development' === process.env.NODE_ENV ? createReadableStreamEmitter() : void 0;
|
|
100
|
+
const slotProxy = createSlotProxy({
|
|
101
|
+
onSlotCall: slotUsagesEmitter ? (slot, args)=>{
|
|
102
|
+
const sanitizedArgs = (0, external_slotUsageSanitizer_js_namespaceObject.sanitizeSlotArgs)(args);
|
|
103
|
+
slotUsagesEmitter.emit({
|
|
104
|
+
slot,
|
|
105
|
+
...sanitizedArgs.length ? {
|
|
106
|
+
args: sanitizedArgs
|
|
107
|
+
} : {}
|
|
108
|
+
});
|
|
109
|
+
} : void 0
|
|
110
|
+
});
|
|
111
|
+
async function ServerComponentWrapper() {
|
|
112
|
+
return component(slotProxy);
|
|
113
|
+
}
|
|
114
|
+
const flightStream = toReplayableFlightStream(/*#__PURE__*/ (0, external_react_namespaceObject.createElement)(ServerComponentWrapper), slotUsagesEmitter ? {
|
|
115
|
+
onCancel: slotUsagesEmitter.close,
|
|
116
|
+
onDone: slotUsagesEmitter.close,
|
|
117
|
+
onError: slotUsagesEmitter.close
|
|
118
|
+
} : void 0);
|
|
119
|
+
const streamWrapper = {
|
|
120
|
+
createReplayStream: ()=>flightStream.createReplayStream()
|
|
121
|
+
};
|
|
122
|
+
return (0, external_createRscProxy_js_namespaceObject.createRscProxy)(createTreeGetter(streamWrapper), {
|
|
123
|
+
renderable: false,
|
|
124
|
+
slotUsagesStream: slotUsagesEmitter?.stream,
|
|
125
|
+
stream: streamWrapper
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
const adapter = (0, react_router_namespaceObject.createSerializationAdapter)({
|
|
129
|
+
key: '$MODERN_TANSTACK_RSC',
|
|
130
|
+
test: external_symbols_js_namespaceObject.isServerComponent,
|
|
131
|
+
toSerializable: (component)=>{
|
|
132
|
+
const streamWrapper = component[external_symbols_js_namespaceObject.SERVER_COMPONENT_STREAM];
|
|
133
|
+
if (!streamWrapper) throw new Error('Cannot serialize TanStack RSC without a Flight stream.');
|
|
134
|
+
const kind = (0, external_symbols_js_namespaceObject.isRenderableServerComponent)(component) ? 'renderable' : 'composite';
|
|
135
|
+
const slotUsagesStream = 'development' === process.env.NODE_ENV && 'composite' === kind ? component[external_symbols_js_namespaceObject.RSC_SLOT_USAGES_STREAM] : void 0;
|
|
136
|
+
return {
|
|
137
|
+
kind,
|
|
138
|
+
stream: new router_core_namespaceObject.RawStream(streamWrapper.createReplayStream(), {
|
|
139
|
+
hint: 'text'
|
|
140
|
+
}),
|
|
141
|
+
...slotUsagesStream ? {
|
|
142
|
+
slotUsagesStream
|
|
143
|
+
} : {}
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
fromSerializable: ()=>{
|
|
147
|
+
throw new Error('TanStack RSC data should not be deserialized on server.');
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
function getTanstackRscSerializationAdapters() {
|
|
151
|
+
return [
|
|
152
|
+
adapter
|
|
153
|
+
];
|
|
154
|
+
}
|
|
155
|
+
const rscSerializationAdapter = getTanstackRscSerializationAdapters;
|
|
156
|
+
function createReadableStreamEmitter() {
|
|
157
|
+
let closed = false;
|
|
158
|
+
const queue = [];
|
|
159
|
+
let controller = null;
|
|
160
|
+
const stream = new ReadableStream({
|
|
161
|
+
start (ctrl) {
|
|
162
|
+
controller = ctrl;
|
|
163
|
+
for (const value of queue)ctrl.enqueue(value);
|
|
164
|
+
queue.length = 0;
|
|
165
|
+
if (closed) ctrl.close();
|
|
166
|
+
},
|
|
167
|
+
cancel () {
|
|
168
|
+
closed = true;
|
|
169
|
+
controller = null;
|
|
170
|
+
queue.length = 0;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
const emit = (value)=>{
|
|
174
|
+
if (closed) return;
|
|
175
|
+
if (!controller) return void queue.push(value);
|
|
176
|
+
try {
|
|
177
|
+
controller.enqueue(value);
|
|
178
|
+
} catch {}
|
|
179
|
+
};
|
|
180
|
+
const close = ()=>{
|
|
181
|
+
if (closed) return;
|
|
182
|
+
closed = true;
|
|
183
|
+
try {
|
|
184
|
+
controller?.close();
|
|
185
|
+
} catch {}
|
|
186
|
+
controller = null;
|
|
187
|
+
};
|
|
188
|
+
return {
|
|
189
|
+
close,
|
|
190
|
+
emit,
|
|
191
|
+
stream
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function wrapReadableStream(source, handlers) {
|
|
195
|
+
const reader = source.getReader();
|
|
196
|
+
let finished = false;
|
|
197
|
+
const finish = (kind)=>{
|
|
198
|
+
if (finished) return;
|
|
199
|
+
finished = true;
|
|
200
|
+
if ('cancel' === kind) handlers.onCancel?.();
|
|
201
|
+
else if ('error' === kind) handlers.onError?.();
|
|
202
|
+
else handlers.onDone?.();
|
|
203
|
+
try {
|
|
204
|
+
reader.releaseLock();
|
|
205
|
+
} catch {}
|
|
206
|
+
};
|
|
207
|
+
return new ReadableStream({
|
|
208
|
+
async pull (controller) {
|
|
209
|
+
try {
|
|
210
|
+
const { done, value } = await reader.read();
|
|
211
|
+
if (done) {
|
|
212
|
+
controller.close();
|
|
213
|
+
finish('done');
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
controller.enqueue(value);
|
|
217
|
+
} catch (err) {
|
|
218
|
+
try {
|
|
219
|
+
controller.error(err);
|
|
220
|
+
} catch {}
|
|
221
|
+
finish('error');
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
async cancel (reason) {
|
|
225
|
+
try {
|
|
226
|
+
await reader.cancel(reason);
|
|
227
|
+
} catch {}
|
|
228
|
+
finish('cancel');
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
exports.CompositeComponent = __webpack_exports__.CompositeComponent;
|
|
233
|
+
exports.createCompositeComponent = __webpack_exports__.createCompositeComponent;
|
|
234
|
+
exports.getTanstackRscSerializationAdapters = __webpack_exports__.getTanstackRscSerializationAdapters;
|
|
235
|
+
exports.renderServerComponent = __webpack_exports__.renderServerComponent;
|
|
236
|
+
exports.rscSerializationAdapter = __webpack_exports__.rscSerializationAdapter;
|
|
237
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
238
|
+
"CompositeComponent",
|
|
239
|
+
"createCompositeComponent",
|
|
240
|
+
"getTanstackRscSerializationAdapters",
|
|
241
|
+
"renderServerComponent",
|
|
242
|
+
"rscSerializationAdapter"
|
|
243
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
244
|
+
Object.defineProperty(exports, '__esModule', {
|
|
245
|
+
value: true
|
|
246
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
sanitizeSlotArgs: ()=>sanitizeSlotArgs
|
|
28
|
+
});
|
|
29
|
+
const external_react_namespaceObject = require("react");
|
|
30
|
+
const REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
31
|
+
const REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
32
|
+
const REACT_TRANSITIONAL_ELEMENT_TYPE = Symbol.for('react.transitional.element');
|
|
33
|
+
function isReactElementLike(value) {
|
|
34
|
+
if (!value || 'object' != typeof value && 'function' != typeof value) return false;
|
|
35
|
+
if ((0, external_react_namespaceObject.isValidElement)(value)) return true;
|
|
36
|
+
const type = value.$$typeof;
|
|
37
|
+
return type === REACT_ELEMENT_TYPE || type === REACT_TRANSITIONAL_ELEMENT_TYPE || type === REACT_PORTAL_TYPE;
|
|
38
|
+
}
|
|
39
|
+
function sanitizeSlotArg(value, seen) {
|
|
40
|
+
if (isReactElementLike(value)) return 'React element';
|
|
41
|
+
if (null == value) return value;
|
|
42
|
+
if ('string' == typeof value || 'number' == typeof value || 'boolean' == typeof value || 'bigint' == typeof value) return value;
|
|
43
|
+
if ('object' != typeof value && 'function' != typeof value) return String(value);
|
|
44
|
+
if (seen.has(value)) return '[Circular]';
|
|
45
|
+
seen.add(value);
|
|
46
|
+
if (Array.isArray(value)) return value.map((item)=>sanitizeSlotArg(item, seen));
|
|
47
|
+
const proto = Object.getPrototypeOf(value);
|
|
48
|
+
if (proto === Object.prototype || null === proto) {
|
|
49
|
+
const out = {};
|
|
50
|
+
for (const [key, item] of Object.entries(value))out[key] = sanitizeSlotArg(item, seen);
|
|
51
|
+
return out;
|
|
52
|
+
}
|
|
53
|
+
return String(value);
|
|
54
|
+
}
|
|
55
|
+
function sanitizeSlotArgs(args) {
|
|
56
|
+
const seen = new WeakSet();
|
|
57
|
+
return args.map((arg)=>sanitizeSlotArg(arg, seen));
|
|
58
|
+
}
|
|
59
|
+
exports.sanitizeSlotArgs = __webpack_exports__.sanitizeSlotArgs;
|
|
60
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
61
|
+
"sanitizeSlotArgs"
|
|
62
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
63
|
+
Object.defineProperty(exports, '__esModule', {
|
|
64
|
+
value: true
|
|
65
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
RENDERABLE_RSC: ()=>RENDERABLE_RSC,
|
|
28
|
+
RSC_PROXY_GET_TREE: ()=>RSC_PROXY_GET_TREE,
|
|
29
|
+
RSC_PROXY_PATH: ()=>RSC_PROXY_PATH,
|
|
30
|
+
RSC_SLOT_USAGES: ()=>RSC_SLOT_USAGES,
|
|
31
|
+
RSC_SLOT_USAGES_STREAM: ()=>RSC_SLOT_USAGES_STREAM,
|
|
32
|
+
SERVER_COMPONENT_STREAM: ()=>SERVER_COMPONENT_STREAM,
|
|
33
|
+
isRenderableServerComponent: ()=>isRenderableServerComponent,
|
|
34
|
+
isServerComponent: ()=>isServerComponent
|
|
35
|
+
});
|
|
36
|
+
const SERVER_COMPONENT_STREAM = Symbol.for('modern.tanstack.rsc.stream');
|
|
37
|
+
const RENDERABLE_RSC = Symbol.for('modern.tanstack.rsc.renderable');
|
|
38
|
+
const RSC_PROXY_GET_TREE = Symbol.for('modern.tanstack.rsc.proxy.getTree');
|
|
39
|
+
const RSC_PROXY_PATH = Symbol.for('modern.tanstack.rsc.proxy.path');
|
|
40
|
+
const RSC_SLOT_USAGES_STREAM = Symbol.for('modern.tanstack.rsc.slotUsages.stream');
|
|
41
|
+
const RSC_SLOT_USAGES = Symbol.for('modern.tanstack.rsc.slotUsages');
|
|
42
|
+
function isServerComponent(value) {
|
|
43
|
+
if (null == value) return false;
|
|
44
|
+
if ('object' != typeof value && 'function' != typeof value) return false;
|
|
45
|
+
return SERVER_COMPONENT_STREAM in value && void 0 !== value[SERVER_COMPONENT_STREAM];
|
|
46
|
+
}
|
|
47
|
+
function isRenderableServerComponent(value) {
|
|
48
|
+
if (null == value) return false;
|
|
49
|
+
if ('object' != typeof value && 'function' != typeof value) return false;
|
|
50
|
+
return RENDERABLE_RSC in value && true === value[RENDERABLE_RSC];
|
|
51
|
+
}
|
|
52
|
+
exports.RENDERABLE_RSC = __webpack_exports__.RENDERABLE_RSC;
|
|
53
|
+
exports.RSC_PROXY_GET_TREE = __webpack_exports__.RSC_PROXY_GET_TREE;
|
|
54
|
+
exports.RSC_PROXY_PATH = __webpack_exports__.RSC_PROXY_PATH;
|
|
55
|
+
exports.RSC_SLOT_USAGES = __webpack_exports__.RSC_SLOT_USAGES;
|
|
56
|
+
exports.RSC_SLOT_USAGES_STREAM = __webpack_exports__.RSC_SLOT_USAGES_STREAM;
|
|
57
|
+
exports.SERVER_COMPONENT_STREAM = __webpack_exports__.SERVER_COMPONENT_STREAM;
|
|
58
|
+
exports.isRenderableServerComponent = __webpack_exports__.isRenderableServerComponent;
|
|
59
|
+
exports.isServerComponent = __webpack_exports__.isServerComponent;
|
|
60
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
61
|
+
"RENDERABLE_RSC",
|
|
62
|
+
"RSC_PROXY_GET_TREE",
|
|
63
|
+
"RSC_PROXY_PATH",
|
|
64
|
+
"RSC_SLOT_USAGES",
|
|
65
|
+
"RSC_SLOT_USAGES_STREAM",
|
|
66
|
+
"SERVER_COMPONENT_STREAM",
|
|
67
|
+
"isRenderableServerComponent",
|
|
68
|
+
"isServerComponent"
|
|
69
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
70
|
+
Object.defineProperty(exports, '__esModule', {
|
|
71
|
+
value: true
|
|
72
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
17
|
+
value: true
|
|
18
|
+
});
|