@rsc-kit/core 0.20.8 → 0.20.11
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/dist/earlyHints.d.ts +14 -2
- package/dist/earlyHints.js +15 -8
- package/dist/earlyHints.js.map +1 -1
- package/dist/host.d.ts +10 -1
- package/dist/host.js +16 -5
- package/dist/host.js.map +1 -1
- package/dist/js/segmentStore.d.ts +6 -0
- package/dist/js/segmentStore.js +17 -8
- package/dist/js/segmentStore.js.map +1 -1
- package/dist/prerender.d.ts +8 -0
- package/dist/prerender.js +9 -1
- package/dist/prerender.js.map +1 -1
- package/dist/vite.js +9 -2
- package/dist/vite.js.map +1 -1
- package/package.json +1 -1
package/dist/vite.js
CHANGED
|
@@ -3847,10 +3847,17 @@ export async function handleRscResume(
|
|
|
3847
3847
|
// in one streamed empty and the client, knowing the url, disagreed on
|
|
3848
3848
|
// every document load.
|
|
3849
3849
|
pathname: string | null | undefined = undefined,
|
|
3850
|
+
// The real params, for the holes. The props argument is the shape the
|
|
3851
|
+
// shell was frozen with - a placeholder per param for a pattern shell -
|
|
3852
|
+
// because the tree above the holes has to be the one React postponed.
|
|
3853
|
+
// The values go here, where a component that awaits them is inside a
|
|
3854
|
+
// hole by construction: at build the params never settled, so anything
|
|
3855
|
+
// reading them was postponed.
|
|
3856
|
+
params?: Record<string, string>,
|
|
3850
3857
|
): Promise<{ htmlStream: ReadableStream }> {
|
|
3851
3858
|
await instrumented()
|
|
3852
3859
|
applyHost()
|
|
3853
|
-
await runMiddleware(component, props)
|
|
3860
|
+
await runMiddleware(component, params ?? props)
|
|
3854
3861
|
|
|
3855
3862
|
// The tree must be shaped exactly as it was when the shell was frozen, or
|
|
3856
3863
|
// React cannot line the resumed segments up with the slots left for them:
|
|
@@ -3873,7 +3880,7 @@ export async function handleRscResume(
|
|
|
3873
3880
|
0,
|
|
3874
3881
|
pageKey,
|
|
3875
3882
|
true,
|
|
3876
|
-
undefined,
|
|
3883
|
+
params ? Promise.resolve(params) : undefined,
|
|
3877
3884
|
// A pattern shell was rendered for no url, and the holes that resume
|
|
3878
3885
|
// it render the same way: a breadcrumb in one would otherwise be
|
|
3879
3886
|
// rendered here for the url and hydrated against a payload that, like
|