@rsc-kit/core 0.1.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/README.md +95 -0
- package/SECURITY.md +60 -0
- package/dist/action.d.ts +90 -0
- package/dist/action.d.ts.map +1 -0
- package/dist/action.js +137 -0
- package/dist/action.js.map +1 -0
- package/dist/build-rsc-vite.d.ts +39 -0
- package/dist/build-rsc-vite.d.ts.map +1 -0
- package/dist/build-rsc-vite.js +172 -0
- package/dist/build-rsc-vite.js.map +1 -0
- package/dist/cache.d.ts +25 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +108 -0
- package/dist/cache.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +85 -0
- package/dist/cli.js.map +1 -0
- package/dist/compile.d.ts +55 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +141 -0
- package/dist/compile.js.map +1 -0
- package/dist/devServer.d.ts +18 -0
- package/dist/devServer.d.ts.map +1 -0
- package/dist/devServer.js +70 -0
- package/dist/devServer.js.map +1 -0
- package/dist/devUrls.d.ts +11 -0
- package/dist/devUrls.d.ts.map +1 -0
- package/dist/devUrls.js +68 -0
- package/dist/devUrls.js.map +1 -0
- package/dist/embed.d.ts +21 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +119 -0
- package/dist/embed.js.map +1 -0
- package/dist/errors.d.ts +24 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +38 -0
- package/dist/errors.js.map +1 -0
- package/dist/export.d.ts +41 -0
- package/dist/export.d.ts.map +1 -0
- package/dist/export.js +100 -0
- package/dist/export.js.map +1 -0
- package/dist/files.d.ts +39 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +146 -0
- package/dist/files.js.map +1 -0
- package/dist/headers.d.ts +81 -0
- package/dist/headers.d.ts.map +1 -0
- package/dist/headers.js +96 -0
- package/dist/headers.js.map +1 -0
- package/dist/host.d.ts +86 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +590 -0
- package/dist/host.js.map +1 -0
- package/dist/js/ActivityRouter.d.ts +47 -0
- package/dist/js/ActivityRouter.d.ts.map +1 -0
- package/dist/js/ActivityRouter.js +87 -0
- package/dist/js/ActivityRouter.js.map +1 -0
- package/dist/js/DocumentTitle.d.ts +22 -0
- package/dist/js/DocumentTitle.d.ts.map +1 -0
- package/dist/js/DocumentTitle.js +28 -0
- package/dist/js/DocumentTitle.js.map +1 -0
- package/dist/js/Form.d.ts +54 -0
- package/dist/js/Form.d.ts.map +1 -0
- package/dist/js/Form.js +225 -0
- package/dist/js/Form.js.map +1 -0
- package/dist/js/Link.d.ts +29 -0
- package/dist/js/Link.d.ts.map +1 -0
- package/dist/js/Link.js +112 -0
- package/dist/js/Link.js.map +1 -0
- package/dist/js/PathnameProvider.d.ts +8 -0
- package/dist/js/PathnameProvider.d.ts.map +1 -0
- package/dist/js/PathnameProvider.js +24 -0
- package/dist/js/PathnameProvider.js.map +1 -0
- package/dist/js/RedirectBoundary.d.ts +18 -0
- package/dist/js/RedirectBoundary.d.ts.map +1 -0
- package/dist/js/RedirectBoundary.js +34 -0
- package/dist/js/RedirectBoundary.js.map +1 -0
- package/dist/js/SegmentBoundary.d.ts +8 -0
- package/dist/js/SegmentBoundary.d.ts.map +1 -0
- package/dist/js/SegmentBoundary.js +38 -0
- package/dist/js/SegmentBoundary.js.map +1 -0
- package/dist/js/SlotBoundary.d.ts +15 -0
- package/dist/js/SlotBoundary.d.ts.map +1 -0
- package/dist/js/SlotBoundary.js +17 -0
- package/dist/js/SlotBoundary.js.map +1 -0
- package/dist/js/createViteRscApp.d.ts +8 -0
- package/dist/js/createViteRscApp.d.ts.map +1 -0
- package/dist/js/createViteRscApp.js +185 -0
- package/dist/js/createViteRscApp.js.map +1 -0
- package/dist/js/errors.d.ts +51 -0
- package/dist/js/errors.d.ts.map +1 -0
- package/dist/js/errors.js +93 -0
- package/dist/js/errors.js.map +1 -0
- package/dist/js/navigate.d.ts +118 -0
- package/dist/js/navigate.d.ts.map +1 -0
- package/dist/js/navigate.js +780 -0
- package/dist/js/navigate.js.map +1 -0
- package/dist/js/onlineStore.d.ts +23 -0
- package/dist/js/onlineStore.d.ts.map +1 -0
- package/dist/js/onlineStore.js +42 -0
- package/dist/js/onlineStore.js.map +1 -0
- package/dist/js/pagePayload.d.ts +15 -0
- package/dist/js/pagePayload.d.ts.map +1 -0
- package/dist/js/pagePayload.js +39 -0
- package/dist/js/pagePayload.js.map +1 -0
- package/dist/js/router.d.ts +29 -0
- package/dist/js/router.d.ts.map +1 -0
- package/dist/js/router.js +40 -0
- package/dist/js/router.js.map +1 -0
- package/dist/js/section.d.ts +16 -0
- package/dist/js/section.d.ts.map +1 -0
- package/dist/js/section.js +55 -0
- package/dist/js/section.js.map +1 -0
- package/dist/js/segmentStore.d.ts +69 -0
- package/dist/js/segmentStore.d.ts.map +1 -0
- package/dist/js/segmentStore.js +127 -0
- package/dist/js/segmentStore.js.map +1 -0
- package/dist/js/slotStore.d.ts +35 -0
- package/dist/js/slotStore.d.ts.map +1 -0
- package/dist/js/slotStore.js +46 -0
- package/dist/js/slotStore.js.map +1 -0
- package/dist/js/standardSchema.d.ts +47 -0
- package/dist/js/standardSchema.d.ts.map +1 -0
- package/dist/js/standardSchema.js +41 -0
- package/dist/js/standardSchema.js.map +1 -0
- package/dist/js/useForm.d.ts +43 -0
- package/dist/js/useForm.d.ts.map +1 -0
- package/dist/js/useForm.js +164 -0
- package/dist/js/useForm.js.map +1 -0
- package/dist/js/useLinkStatus.d.ts +2 -0
- package/dist/js/useLinkStatus.d.ts.map +1 -0
- package/dist/js/useLinkStatus.js +3 -0
- package/dist/js/useLinkStatus.js.map +1 -0
- package/dist/js/useOnline.d.ts +8 -0
- package/dist/js/useOnline.d.ts.map +1 -0
- package/dist/js/useOnline.js +20 -0
- package/dist/js/useOnline.js.map +1 -0
- package/dist/js/usePathname.d.ts +9 -0
- package/dist/js/usePathname.d.ts.map +1 -0
- package/dist/js/usePathname.js +32 -0
- package/dist/js/usePathname.js.map +1 -0
- package/dist/js/useSearchParams.d.ts +2 -0
- package/dist/js/useSearchParams.d.ts.map +1 -0
- package/dist/js/useSearchParams.js +60 -0
- package/dist/js/useSearchParams.js.map +1 -0
- package/dist/manifest.d.ts +66 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +13 -0
- package/dist/manifest.js.map +1 -0
- package/dist/prerender.d.ts +138 -0
- package/dist/prerender.d.ts.map +1 -0
- package/dist/prerender.js +387 -0
- package/dist/prerender.js.map +1 -0
- package/dist/redirect.d.ts +34 -0
- package/dist/redirect.d.ts.map +1 -0
- package/dist/redirect.js +108 -0
- package/dist/redirect.js.map +1 -0
- package/dist/redirectDigest.d.ts +20 -0
- package/dist/redirectDigest.d.ts.map +1 -0
- package/dist/redirectDigest.js +66 -0
- package/dist/redirectDigest.js.map +1 -0
- package/dist/request.d.ts +93 -0
- package/dist/request.d.ts.map +1 -0
- package/dist/request.js +308 -0
- package/dist/request.js.map +1 -0
- package/dist/revalidate.d.ts +43 -0
- package/dist/revalidate.d.ts.map +1 -0
- package/dist/revalidate.js +99 -0
- package/dist/revalidate.js.map +1 -0
- package/dist/routes.d.ts +37 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +28 -0
- package/dist/routes.js.map +1 -0
- package/dist/routing.d.ts +52 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +146 -0
- package/dist/routing.js.map +1 -0
- package/dist/runtime.d.ts +36 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +86 -0
- package/dist/runtime.js.map +1 -0
- package/dist/safeUrl.d.ts +10 -0
- package/dist/safeUrl.d.ts.map +1 -0
- package/dist/safeUrl.js +40 -0
- package/dist/safeUrl.js.map +1 -0
- package/dist/streaming.d.ts +62 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/streaming.js +108 -0
- package/dist/streaming.js.map +1 -0
- package/dist/types.d.ts +82 -0
- package/dist/vite.d.ts +109 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +1909 -0
- package/dist/vite.js.map +1 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +863 -0
- package/dist/worker.js.map +1 -0
- package/package.json +223 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigate.js","sourceRoot":"","sources":["../../src/js/navigate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAClD,6EAA6E;AAC7E,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,YAAY,IAAI,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAwCtF,IAAI,OAAO,GAAG,EAAE,CAAC;AACjB,IAAI,UAAU,GAA0E,IAAI,CAAC;AAC7F,IAAI,SAAS,GAAsC,IAAI,CAAC;AACxD,IAAI,kBAAkB,GAAwB,IAAI,CAAC;AACnD,IAAI,YAAY,GAAwB,IAAI,CAAC;AAC7C,IAAI,gBAAgB,GAA2B,IAAI,CAAC;AACpD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;AAC5C,+EAA+E;AAC/E,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAA2B,CAAC;AAC/D,IAAI,iBAAiB,GAAqB,EAAE,CAAC;AAE7C,8EAA8E;AAC9E,iDAAiD;AACjD,IAAI,WAAW,GAAa,EAAE,CAAC;AAE/B;;;;;;;GAOG;AACH,IAAI,kBAAkB,GAAkB,IAAI,CAAC;AAE7C;;;;;;;;GAQG;AACH,IAAI,eAAe,GAAkB,IAAI,CAAC;AAE1C,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAEp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C,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;QAC9B,CAAC;QAED,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE;QACV,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;SACD,OAAO,CAAC,GAAG,EAAE;QACZ,yEAAyE;QACzE,wDAAwD;QACxD,IAAI,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,UAAU,EAAE,CAAC;YACrD,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,IAAI,aAAa,CAAC,GAAG,CAAC;QAAE,OAAO;IAE/B,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAErD,IAAI,CAAC,UAAU;QAAE,OAAO;IAExB,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACrC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACvB,UAAU,CAAC,KAAK,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the app can currently reach the server.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately free of React so the navigation engine can report into it —
|
|
5
|
+
* navigate.ts imports nothing that would pull a renderer into the module that
|
|
6
|
+
* every navigation goes through. The hook lives in useOnline.ts.
|
|
7
|
+
*
|
|
8
|
+
* Not `navigator.onLine` on its own, which reports whether a network interface
|
|
9
|
+
* is up rather than whether anything answers on it: a captive portal, a hotel
|
|
10
|
+
* splash page and a server that is simply down all read as online. The router
|
|
11
|
+
* knows better, because it sees how requests actually end.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The outcome of a real request.
|
|
15
|
+
*
|
|
16
|
+
* A boolean rather than an object, so React compares snapshots by value —
|
|
17
|
+
* returning a fresh object per read reads as "changed every render" and loops
|
|
18
|
+
* until React throws.
|
|
19
|
+
*/
|
|
20
|
+
export declare function reportReachable(next: boolean): void;
|
|
21
|
+
export declare function subscribeReachable(callback: () => void): () => void;
|
|
22
|
+
export declare function isReachable(): boolean;
|
|
23
|
+
//# sourceMappingURL=onlineStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onlineStore.d.ts","sourceRoot":"","sources":["../../src/js/onlineStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAKnD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAInE;AAED,wBAAgB,WAAW,IAAI,OAAO,CAErC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the app can currently reach the server.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately free of React so the navigation engine can report into it —
|
|
5
|
+
* navigate.ts imports nothing that would pull a renderer into the module that
|
|
6
|
+
* every navigation goes through. The hook lives in useOnline.ts.
|
|
7
|
+
*
|
|
8
|
+
* Not `navigator.onLine` on its own, which reports whether a network interface
|
|
9
|
+
* is up rather than whether anything answers on it: a captive portal, a hotel
|
|
10
|
+
* splash page and a server that is simply down all read as online. The router
|
|
11
|
+
* knows better, because it sees how requests actually end.
|
|
12
|
+
*/
|
|
13
|
+
let reachable = true;
|
|
14
|
+
const listeners = new Set();
|
|
15
|
+
/**
|
|
16
|
+
* The outcome of a real request.
|
|
17
|
+
*
|
|
18
|
+
* A boolean rather than an object, so React compares snapshots by value —
|
|
19
|
+
* returning a fresh object per read reads as "changed every render" and loops
|
|
20
|
+
* until React throws.
|
|
21
|
+
*/
|
|
22
|
+
export function reportReachable(next) {
|
|
23
|
+
if (reachable === next)
|
|
24
|
+
return;
|
|
25
|
+
reachable = next;
|
|
26
|
+
listeners.forEach((fn) => fn());
|
|
27
|
+
}
|
|
28
|
+
export function subscribeReachable(callback) {
|
|
29
|
+
listeners.add(callback);
|
|
30
|
+
return () => listeners.delete(callback);
|
|
31
|
+
}
|
|
32
|
+
export function isReachable() {
|
|
33
|
+
return reachable;
|
|
34
|
+
}
|
|
35
|
+
if (typeof window !== "undefined") {
|
|
36
|
+
// Losing the interface is the one thing the browser knows for certain.
|
|
37
|
+
window.addEventListener("offline", () => reportReachable(false));
|
|
38
|
+
// Regaining it only means a request is worth trying again — whether anything
|
|
39
|
+
// answers is settled by the next request that runs, not by this event.
|
|
40
|
+
window.addEventListener("online", () => reportReachable(true));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=onlineStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onlineStore.js","sourceRoot":"","sources":["../../src/js/onlineStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,IAAI,SAAS,GAAG,IAAI,CAAC;AACrB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO;IAE/B,SAAS,GAAG,IAAI,CAAC;IACjB,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAAoB;IACrD,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAExB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,uEAAuE;IACvE,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,6EAA6E;IAC7E,uEAAuE;IACvE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetch the payload the page hydrates from, and account for it failing.
|
|
3
|
+
*
|
|
4
|
+
* This is the one request with nothing watching it. A PPR route's shell is
|
|
5
|
+
* real HTML with a 200, so a page whose payload never arrives looks like it
|
|
6
|
+
* loaded and then sits on its Suspense fallbacks indefinitely — no error, no
|
|
7
|
+
* fallback, nothing an app can react to.
|
|
8
|
+
*
|
|
9
|
+
* Kept apart from createViteRscApp because that module imports the Flight
|
|
10
|
+
* browser runtime, which reaches a Vite virtual module that exists only inside
|
|
11
|
+
* a build. Nothing there can be imported by a test, which is how this handling
|
|
12
|
+
* came to have none.
|
|
13
|
+
*/
|
|
14
|
+
export declare function fetchPagePayload(url: string, fetchImpl?: typeof fetch): Promise<Response>;
|
|
15
|
+
//# sourceMappingURL=pagePayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagePayload.d.ts","sourceRoot":"","sources":["../../src/js/pagePayload.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,SAAS,GAAE,OAAO,KAAa,GAC9B,OAAO,CAAC,QAAQ,CAAC,CA0BnB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { reportClientFailure, throwForFailedPayload } from "./errors";
|
|
2
|
+
import { reportReachable } from "./onlineStore";
|
|
3
|
+
/**
|
|
4
|
+
* Fetch the payload the page hydrates from, and account for it failing.
|
|
5
|
+
*
|
|
6
|
+
* This is the one request with nothing watching it. A PPR route's shell is
|
|
7
|
+
* real HTML with a 200, so a page whose payload never arrives looks like it
|
|
8
|
+
* loaded and then sits on its Suspense fallbacks indefinitely — no error, no
|
|
9
|
+
* fallback, nothing an app can react to.
|
|
10
|
+
*
|
|
11
|
+
* Kept apart from createViteRscApp because that module imports the Flight
|
|
12
|
+
* browser runtime, which reaches a Vite virtual module that exists only inside
|
|
13
|
+
* a build. Nothing there can be imported by a test, which is how this handling
|
|
14
|
+
* came to have none.
|
|
15
|
+
*/
|
|
16
|
+
export async function fetchPagePayload(url, fetchImpl = fetch) {
|
|
17
|
+
let response;
|
|
18
|
+
try {
|
|
19
|
+
response = await fetchImpl(url, { headers: { "X-RSC": "1" } });
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
// Nothing answered, so the app is offline as far as the router is
|
|
23
|
+
// concerned — which is what useOffline reads.
|
|
24
|
+
reportReachable(false);
|
|
25
|
+
reportClientFailure("could not fetch the page payload", err);
|
|
26
|
+
throw err;
|
|
27
|
+
}
|
|
28
|
+
// Something answered, whatever it said.
|
|
29
|
+
reportReachable(true);
|
|
30
|
+
try {
|
|
31
|
+
throwForFailedPayload(response);
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
reportClientFailure("the server could not render this page", err);
|
|
35
|
+
throw err;
|
|
36
|
+
}
|
|
37
|
+
return response;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=pagePayload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagePayload.js","sourceRoot":"","sources":["../../src/js/pagePayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,GAAW,EACX,SAAS,GAAiB,KAAK;IAE/B,IAAI,QAAkB,CAAC;IAEvB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,kEAAkE;QAClE,8CAA8C;QAC9C,eAAe,CAAC,KAAK,CAAC,CAAC;QACvB,mBAAmB,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;QAE7D,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,wCAAwC;IACxC,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,IAAI,CAAC;QACH,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,mBAAmB,CAAC,uCAAuC,EAAE,GAAG,CAAC,CAAC;QAElE,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic navigation API for use from client components.
|
|
3
|
+
*
|
|
4
|
+
* Reads from window globals set by createViteRscApp, since client components
|
|
5
|
+
* are built in a separate build graph and cannot directly import navigate.ts.
|
|
6
|
+
*/
|
|
7
|
+
import type { Href } from "../routes.js";
|
|
8
|
+
export declare function visit(url: Href, opts?: {
|
|
9
|
+
replace?: boolean;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
export declare function prefetch(url: Href, cacheForMs?: number): void;
|
|
12
|
+
/**
|
|
13
|
+
* Ask the server for part of the current page again.
|
|
14
|
+
*
|
|
15
|
+
* refresh() the page, leaving the layouts mounted
|
|
16
|
+
* refresh('all') the whole document
|
|
17
|
+
* refresh('orders') one parallel slot
|
|
18
|
+
*
|
|
19
|
+
* The page form leaves the layouts alone, so anything living in one — a count
|
|
20
|
+
* in a sidebar, say — will not move until you ask for 'all'.
|
|
21
|
+
*/
|
|
22
|
+
export declare function refresh(target?: string): Promise<void>;
|
|
23
|
+
declare const router: {
|
|
24
|
+
visit: typeof visit;
|
|
25
|
+
prefetch: typeof prefetch;
|
|
26
|
+
refresh: typeof refresh;
|
|
27
|
+
};
|
|
28
|
+
export default router;
|
|
29
|
+
//# sourceMappingURL=router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/js/router.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,KAAK,CACnB,GAAG,EAAE,IAAI,EACT,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAC3B,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAQ7D;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtD;AAED,QAAA,MAAM,MAAM;;;;CAA+B,CAAC;eAC7B,MAAM"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic navigation API for use from client components.
|
|
3
|
+
*
|
|
4
|
+
* Reads from window globals set by createViteRscApp, since client components
|
|
5
|
+
* are built in a separate build graph and cannot directly import navigate.ts.
|
|
6
|
+
*/
|
|
7
|
+
export function visit(url, opts) {
|
|
8
|
+
const nav = window.__rsc_navigate;
|
|
9
|
+
if (!nav) {
|
|
10
|
+
throw new Error("RSC navigation not initialized. Ensure createViteRscApp has been called.");
|
|
11
|
+
}
|
|
12
|
+
return nav(url, opts);
|
|
13
|
+
}
|
|
14
|
+
export function prefetch(url, cacheForMs) {
|
|
15
|
+
const fn = window.__rsc_prefetch;
|
|
16
|
+
if (!fn) {
|
|
17
|
+
throw new Error("RSC navigation not initialized. Ensure createViteRscApp has been called.");
|
|
18
|
+
}
|
|
19
|
+
fn(url, cacheForMs);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Ask the server for part of the current page again.
|
|
23
|
+
*
|
|
24
|
+
* refresh() the page, leaving the layouts mounted
|
|
25
|
+
* refresh('all') the whole document
|
|
26
|
+
* refresh('orders') one parallel slot
|
|
27
|
+
*
|
|
28
|
+
* The page form leaves the layouts alone, so anything living in one — a count
|
|
29
|
+
* in a sidebar, say — will not move until you ask for 'all'.
|
|
30
|
+
*/
|
|
31
|
+
export function refresh(target) {
|
|
32
|
+
const fn = window.__rsc_refresh;
|
|
33
|
+
if (!fn) {
|
|
34
|
+
throw new Error("RSC navigation not initialized. Ensure createViteRscApp has been called.");
|
|
35
|
+
}
|
|
36
|
+
return fn(target);
|
|
37
|
+
}
|
|
38
|
+
const router = { visit, prefetch, refresh };
|
|
39
|
+
export default router;
|
|
40
|
+
//# sourceMappingURL=router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/js/router.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,UAAU,KAAK,CACnB,GAAS,EACT,IAA4B;IAE5B,MAAM,GAAG,GAAI,MAAc,CAAC,cAAc,CAAC;IAE3C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAS,EAAE,UAAmB;IACrD,MAAM,EAAE,GAAI,MAAc,CAAC,cAAc,CAAC;IAE1C,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;IAC9F,CAAC;IAED,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACtB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,MAAe;IACrC,MAAM,EAAE,GAAI,MAAc,CAAC,aAAa,CAAC;IAEzC,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,MAAM,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC5C,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
export declare function section<P extends Record<string, unknown>>(name: string, Component: ComponentType<P>): ComponentType<P>;
|
|
3
|
+
/**
|
|
4
|
+
* The component inside a section module, without its boundary.
|
|
5
|
+
*
|
|
6
|
+
* Revalidation renders this rather than the wrapper: the client swaps what is
|
|
7
|
+
* inside the boundary, so returning the wrapper would nest a new boundary
|
|
8
|
+
* inside the old one on every refresh.
|
|
9
|
+
*
|
|
10
|
+
* Takes the module's own export rather than a name. A name-keyed registry is
|
|
11
|
+
* written to by every section in the app at bundle load — the generated entry
|
|
12
|
+
* imports them all eagerly — so a lookup by name reached any page's region from
|
|
13
|
+
* any url, bounded only by whatever guard happened to sit on the url asked for.
|
|
14
|
+
*/
|
|
15
|
+
export declare function sectionComponent(exported: unknown): ComponentType<Record<string, unknown>> | undefined;
|
|
16
|
+
//# sourceMappingURL=section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/js/section.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AA2BtD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvD,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC1B,aAAa,CAAC,CAAC,CAAC,CAkBlB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,OAAO,GAChB,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAMpD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { SlotBoundary } from "./SlotBoundary";
|
|
3
|
+
/**
|
|
4
|
+
* Mark a region of a page as separately refreshable.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately not a client module. The boundary it wraps things in is one,
|
|
7
|
+
* but the things it wraps are server components — an async component that
|
|
8
|
+
* fetches its own data. Marking this file "use client" would turn every one of
|
|
9
|
+
* them into a client reference, which async components cannot be.
|
|
10
|
+
*
|
|
11
|
+
* export default section('orders', async function Orders() { ... })
|
|
12
|
+
*
|
|
13
|
+
* The page renders it like any component. What it buys is a name the server
|
|
14
|
+
* can address: `Rsc::revalidate('orders')` re-renders this and nothing else,
|
|
15
|
+
* and the answer replaces it in place.
|
|
16
|
+
*
|
|
17
|
+
* The name has to be unique within the page. It does not have to be unique in
|
|
18
|
+
* the app: the component is carried on the wrapper it returns, so the server
|
|
19
|
+
* resolves a section through the module the route declares rather than by
|
|
20
|
+
* looking the name up in a registry every section in the app also writes to.
|
|
21
|
+
* Two pages may both call theirs 'stats'.
|
|
22
|
+
*/
|
|
23
|
+
/** Where the unwrapped component hangs off the wrapper section() returns. */
|
|
24
|
+
const INNER = Symbol.for('@rsc-kit/core.section-component');
|
|
25
|
+
export function section(name, Component) {
|
|
26
|
+
// The boundary wraps the component here rather than at the call site, so a
|
|
27
|
+
// page renders a section exactly like anything else.
|
|
28
|
+
function Section(props) {
|
|
29
|
+
// createElement cannot line its overloads up with a component generic
|
|
30
|
+
// over its own props. The call is the ordinary one.
|
|
31
|
+
return createElement(SlotBoundary, { name }, createElement(Component, props));
|
|
32
|
+
}
|
|
33
|
+
Section.displayName = `Section(${name})`;
|
|
34
|
+
// Reached through the route's own module, never through a shared map.
|
|
35
|
+
Section[INNER] = Component;
|
|
36
|
+
return Section;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The component inside a section module, without its boundary.
|
|
40
|
+
*
|
|
41
|
+
* Revalidation renders this rather than the wrapper: the client swaps what is
|
|
42
|
+
* inside the boundary, so returning the wrapper would nest a new boundary
|
|
43
|
+
* inside the old one on every refresh.
|
|
44
|
+
*
|
|
45
|
+
* Takes the module's own export rather than a name. A name-keyed registry is
|
|
46
|
+
* written to by every section in the app at bundle load — the generated entry
|
|
47
|
+
* imports them all eagerly — so a lookup by name reached any page's region from
|
|
48
|
+
* any url, bounded only by whatever guard happened to sit on the url asked for.
|
|
49
|
+
*/
|
|
50
|
+
export function sectionComponent(exported) {
|
|
51
|
+
if (typeof exported !== 'function')
|
|
52
|
+
return undefined;
|
|
53
|
+
return exported[INNER];
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/js/section.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,6EAA6E;AAC7E,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;AAE5D,MAAM,UAAU,OAAO,CACrB,IAAY,EACZ,SAA2B;IAE3B,2EAA2E;IAC3E,qDAAqD;IACrD,SAAS,OAAO,CAAC,KAAQ;QACvB,sEAAsE;QACtE,oDAAoD;QACpD,OAAO,aAAa,CAClB,YAA+C,EAC/C,EAAE,IAAI,EAAE,EACR,aAAa,CAAC,SAAiC,EAAE,KAAc,CAAC,CACjE,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,WAAW,GAAG,WAAW,IAAI,GAAG,CAAC;IACzC,sEAAsE;IACrE,OAA8C,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAEnE,OAAO,OAA2B,CAAC;AACrC,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAiB;IAEjB,IAAI,OAAO,QAAQ,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IAErD,OAAQ,QAA+C,CAAC,KAAK,CAEhD,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What each segment boundary is showing, and what it is keeping alive behind it.
|
|
3
|
+
*
|
|
4
|
+
* A navigation replaces one segment. Keeping the previous one mounted — hidden,
|
|
5
|
+
* not unmounted — is what lets going back restore it with its client state:
|
|
6
|
+
* the half-typed form, the open disclosure, the scrolled list. Unmounting
|
|
7
|
+
* throws all of that away, which is what replacing the root used to do.
|
|
8
|
+
*
|
|
9
|
+
* Entries are keyed by page (the URL, or its intercept variant), so a boundary
|
|
10
|
+
* can hold several and reveal one. Empty is meaningful: a boundary with nothing
|
|
11
|
+
* stored renders the children the server gave it.
|
|
12
|
+
*/
|
|
13
|
+
type Tree = unknown;
|
|
14
|
+
type Listener = () => void;
|
|
15
|
+
interface Entry {
|
|
16
|
+
key: string;
|
|
17
|
+
tree: Tree;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Immutable: useSyncExternalStore compares snapshots by identity, so a new
|
|
21
|
+
* object per read reads as "changed every render" and loops forever. Every
|
|
22
|
+
* mutation replaces this wholesale; nothing edits one in place.
|
|
23
|
+
*/
|
|
24
|
+
interface DepthState {
|
|
25
|
+
readonly entries: readonly Entry[];
|
|
26
|
+
readonly activeKey: string;
|
|
27
|
+
/** Most recently shown last; eviction takes from the front. */
|
|
28
|
+
readonly order: readonly string[];
|
|
29
|
+
}
|
|
30
|
+
/** Pages kept alive per boundary. Four covers ordinary back-and-forth. */
|
|
31
|
+
export declare const RETENTION = 4;
|
|
32
|
+
export declare function subscribeToSegment(depth: number, listener: Listener): () => void;
|
|
33
|
+
/** Everything a boundary at this depth needs to render, or null for "use children". */
|
|
34
|
+
export declare function getSegmentState(depth: number): DepthState | null;
|
|
35
|
+
/**
|
|
36
|
+
* Show `tree` at `depth` for `key`, retaining what was there.
|
|
37
|
+
*
|
|
38
|
+
* Deeper segments belonged to the page being replaced; leaving them would
|
|
39
|
+
* render the previous page inside the new one.
|
|
40
|
+
*/
|
|
41
|
+
export declare function setSegment(depth: number, key: string, tree: Tree): void;
|
|
42
|
+
/**
|
|
43
|
+
* Record the children the server rendered, so the page you arrived on can be
|
|
44
|
+
* returned to later. Never changes what is showing.
|
|
45
|
+
*/
|
|
46
|
+
export declare function seedSegment(depth: number, key: string, tree: Tree): void;
|
|
47
|
+
/**
|
|
48
|
+
* Reveal a page the boundaries are still holding, without asking the server.
|
|
49
|
+
*
|
|
50
|
+
* Restoring is anchored on the deepest boundary that can show the page. Deeper
|
|
51
|
+
* ones than that belonged to the page being left — a section with its own
|
|
52
|
+
* layout adds a boundary the page you are going back to never had — so they
|
|
53
|
+
* are dropped, exactly as setSegment drops them. Requiring every boundary to
|
|
54
|
+
* hold the key instead made any such page refuse to restore.
|
|
55
|
+
*
|
|
56
|
+
* Shallower boundaries need no key of their own: their trees contain the
|
|
57
|
+
* deeper boundary, so they delegate to whatever it is showing. One that does
|
|
58
|
+
* hold the key is switched to it, since that is a real change at its level.
|
|
59
|
+
*/
|
|
60
|
+
export declare function restoreSegments(key: string): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Drop everything, so boundaries fall back to their server-given children.
|
|
63
|
+
*
|
|
64
|
+
* A deployment invalidates them all: a segment from the previous build has no
|
|
65
|
+
* claim on being correct for this one.
|
|
66
|
+
*/
|
|
67
|
+
export declare function clearSegments(): void;
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=segmentStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmentStore.d.ts","sourceRoot":"","sources":["../../src/js/segmentStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,KAAK,IAAI,GAAG,OAAO,CAAA;AACnB,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAA;AAE1B,UAAU,KAAK;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,IAAI,CAAA;CACX;AAED;;;;GAIG;AACH,UAAU,UAAU;IAClB,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC;AAED,0EAA0E;AAC1E,eAAO,MAAM,SAAS,IAAI,CAAA;AAS1B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAchF;AAED,uFAAuF;AACvF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAEhE;AAqBD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAQvE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAoBxE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAsBpD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What each segment boundary is showing, and what it is keeping alive behind it.
|
|
3
|
+
*
|
|
4
|
+
* A navigation replaces one segment. Keeping the previous one mounted — hidden,
|
|
5
|
+
* not unmounted — is what lets going back restore it with its client state:
|
|
6
|
+
* the half-typed form, the open disclosure, the scrolled list. Unmounting
|
|
7
|
+
* throws all of that away, which is what replacing the root used to do.
|
|
8
|
+
*
|
|
9
|
+
* Entries are keyed by page (the URL, or its intercept variant), so a boundary
|
|
10
|
+
* can hold several and reveal one. Empty is meaningful: a boundary with nothing
|
|
11
|
+
* stored renders the children the server gave it.
|
|
12
|
+
*/
|
|
13
|
+
/** Pages kept alive per boundary. Four covers ordinary back-and-forth. */
|
|
14
|
+
export const RETENTION = 4;
|
|
15
|
+
const depths = new Map();
|
|
16
|
+
const listeners = new Map();
|
|
17
|
+
function notify(depth) {
|
|
18
|
+
for (const listener of listeners.get(depth) ?? [])
|
|
19
|
+
listener();
|
|
20
|
+
}
|
|
21
|
+
export function subscribeToSegment(depth, listener) {
|
|
22
|
+
let set = listeners.get(depth);
|
|
23
|
+
if (!set) {
|
|
24
|
+
set = new Set();
|
|
25
|
+
listeners.set(depth, set);
|
|
26
|
+
}
|
|
27
|
+
set.add(listener);
|
|
28
|
+
return () => {
|
|
29
|
+
set.delete(listener);
|
|
30
|
+
if (set.size === 0)
|
|
31
|
+
listeners.delete(depth);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Everything a boundary at this depth needs to render, or null for "use children". */
|
|
35
|
+
export function getSegmentState(depth) {
|
|
36
|
+
return depths.get(depth) ?? null;
|
|
37
|
+
}
|
|
38
|
+
/** Apply the retention window to a candidate state. */
|
|
39
|
+
function retain(entries, order, activeKey) {
|
|
40
|
+
const kept = order.slice(-RETENTION);
|
|
41
|
+
return {
|
|
42
|
+
entries: entries.filter((entry) => kept.includes(entry.key)),
|
|
43
|
+
order: kept,
|
|
44
|
+
activeKey,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function put(depth, key, tree) {
|
|
48
|
+
const state = depths.get(depth);
|
|
49
|
+
const entries = [...(state?.entries ?? []).filter((entry) => entry.key !== key), { key, tree }];
|
|
50
|
+
const order = [...(state?.order ?? []).filter((k) => k !== key), key];
|
|
51
|
+
depths.set(depth, retain(entries, order, key));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Show `tree` at `depth` for `key`, retaining what was there.
|
|
55
|
+
*
|
|
56
|
+
* Deeper segments belonged to the page being replaced; leaving them would
|
|
57
|
+
* render the previous page inside the new one.
|
|
58
|
+
*/
|
|
59
|
+
export function setSegment(depth, key, tree) {
|
|
60
|
+
put(depth, key, tree);
|
|
61
|
+
const stale = [...depths.keys()].filter((d) => d > depth);
|
|
62
|
+
for (const d of stale)
|
|
63
|
+
depths.delete(d);
|
|
64
|
+
notify(depth);
|
|
65
|
+
for (const d of stale)
|
|
66
|
+
notify(d);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Record the children the server rendered, so the page you arrived on can be
|
|
70
|
+
* returned to later. Never changes what is showing.
|
|
71
|
+
*/
|
|
72
|
+
export function seedSegment(depth, key, tree) {
|
|
73
|
+
const state = depths.get(depth);
|
|
74
|
+
if (state?.entries.some((entry) => entry.key === key))
|
|
75
|
+
return;
|
|
76
|
+
if (!state) {
|
|
77
|
+
put(depth, key, tree);
|
|
78
|
+
notify(depth);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
// Older than whatever is showing, so it goes to the front of the eviction
|
|
82
|
+
// order — and crucially does not become the active page.
|
|
83
|
+
depths.set(depth, retain([...state.entries, { key, tree }], [key, ...state.order.filter((k) => k !== key)], state.activeKey));
|
|
84
|
+
notify(depth);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Reveal a page the boundaries are still holding, without asking the server.
|
|
88
|
+
*
|
|
89
|
+
* Restoring is anchored on the deepest boundary that can show the page. Deeper
|
|
90
|
+
* ones than that belonged to the page being left — a section with its own
|
|
91
|
+
* layout adds a boundary the page you are going back to never had — so they
|
|
92
|
+
* are dropped, exactly as setSegment drops them. Requiring every boundary to
|
|
93
|
+
* hold the key instead made any such page refuse to restore.
|
|
94
|
+
*
|
|
95
|
+
* Shallower boundaries need no key of their own: their trees contain the
|
|
96
|
+
* deeper boundary, so they delegate to whatever it is showing. One that does
|
|
97
|
+
* hold the key is switched to it, since that is a real change at its level.
|
|
98
|
+
*/
|
|
99
|
+
export function restoreSegments(key) {
|
|
100
|
+
const holding = [...depths.keys()].filter((d) => depths.get(d).entries.some((entry) => entry.key === key));
|
|
101
|
+
if (holding.length === 0)
|
|
102
|
+
return false;
|
|
103
|
+
const anchor = Math.max(...holding);
|
|
104
|
+
for (const d of [...depths.keys()].filter((d) => d > anchor)) {
|
|
105
|
+
depths.delete(d);
|
|
106
|
+
notify(d);
|
|
107
|
+
}
|
|
108
|
+
for (const d of holding) {
|
|
109
|
+
const state = depths.get(d);
|
|
110
|
+
depths.set(d, retain(state.entries, [...state.order.filter((k) => k !== key), key], key));
|
|
111
|
+
notify(d);
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Drop everything, so boundaries fall back to their server-given children.
|
|
117
|
+
*
|
|
118
|
+
* A deployment invalidates them all: a segment from the previous build has no
|
|
119
|
+
* claim on being correct for this one.
|
|
120
|
+
*/
|
|
121
|
+
export function clearSegments() {
|
|
122
|
+
const all = [...depths.keys()];
|
|
123
|
+
depths.clear();
|
|
124
|
+
for (const depth of all)
|
|
125
|
+
notify(depth);
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=segmentStore.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KAAK,CAAA;IAEtC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAA;IAEnC,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAChB,MAAM,CAAC,CAAC,CAAC,CAAA;IACX,CAAC;IAED,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAE,CAAA;QAE5B,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QACzF,MAAM,CAAC,CAAC,CAAC,CAAA;IACX,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;IAC9B,MAAM,CAAC,KAAK,EAAE,CAAA;IACd,KAAK,MAAM,KAAK,IAAI,GAAG;QAAE,MAAM,CAAC,KAAK,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What each parallel slot is showing, when the server has re-rendered one.
|
|
3
|
+
*
|
|
4
|
+
* A slot is the only region of a page smaller than the page that the server
|
|
5
|
+
* can name, so it is the unit an action can invalidate on its own — two tables
|
|
6
|
+
* refresh apart from each other only if they are two slots.
|
|
7
|
+
*
|
|
8
|
+
* Empty is meaningful, and is the ordinary case: a slot with nothing stored
|
|
9
|
+
* renders what the server sent with the page. Nothing is retained here the way
|
|
10
|
+
* segments retain pages; a slot has one current value and replacing it is the
|
|
11
|
+
* whole point.
|
|
12
|
+
*/
|
|
13
|
+
type Tree = unknown;
|
|
14
|
+
type Listener = () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Immutable, like the segment store and for the same reason:
|
|
17
|
+
* useSyncExternalStore compares snapshots by identity, so returning a fresh
|
|
18
|
+
* object per read reads as "changed every render" and loops until React gives
|
|
19
|
+
* up. Every write replaces the entry; nothing is edited in place.
|
|
20
|
+
*/
|
|
21
|
+
interface SlotState {
|
|
22
|
+
readonly tree: Tree;
|
|
23
|
+
}
|
|
24
|
+
export declare function setSlot(name: string, tree: Tree): void;
|
|
25
|
+
export declare function subscribeToSlot(name: string, listener: Listener): () => void;
|
|
26
|
+
export declare function getSlotState(name: string): SlotState;
|
|
27
|
+
/**
|
|
28
|
+
* Forget every slot.
|
|
29
|
+
*
|
|
30
|
+
* A navigation replaces the page, and a slot rendered for the page you left
|
|
31
|
+
* has no claim on the one you arrived at.
|
|
32
|
+
*/
|
|
33
|
+
export declare function clearSlots(): void;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=slotStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slotStore.d.ts","sourceRoot":"","sources":["../../src/js/slotStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,KAAK,IAAI,GAAG,OAAO,CAAA;AACnB,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAA;AAE1B;;;;;GAKG;AACH,UAAU,SAAS;IACjB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CACpB;AAYD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAGtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAS5E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAKjC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What each parallel slot is showing, when the server has re-rendered one.
|
|
3
|
+
*
|
|
4
|
+
* A slot is the only region of a page smaller than the page that the server
|
|
5
|
+
* can name, so it is the unit an action can invalidate on its own — two tables
|
|
6
|
+
* refresh apart from each other only if they are two slots.
|
|
7
|
+
*
|
|
8
|
+
* Empty is meaningful, and is the ordinary case: a slot with nothing stored
|
|
9
|
+
* renders what the server sent with the page. Nothing is retained here the way
|
|
10
|
+
* segments retain pages; a slot has one current value and replacing it is the
|
|
11
|
+
* whole point.
|
|
12
|
+
*/
|
|
13
|
+
const slots = new Map();
|
|
14
|
+
const listeners = new Map();
|
|
15
|
+
/** Shared by every slot that has never been written to, so identity is stable. */
|
|
16
|
+
const EMPTY = { tree: undefined };
|
|
17
|
+
function notify(name) {
|
|
18
|
+
listeners.get(name)?.forEach((listener) => listener());
|
|
19
|
+
}
|
|
20
|
+
export function setSlot(name, tree) {
|
|
21
|
+
slots.set(name, { tree });
|
|
22
|
+
notify(name);
|
|
23
|
+
}
|
|
24
|
+
export function subscribeToSlot(name, listener) {
|
|
25
|
+
const existing = listeners.get(name) ?? new Set();
|
|
26
|
+
existing.add(listener);
|
|
27
|
+
listeners.set(name, existing);
|
|
28
|
+
return () => {
|
|
29
|
+
existing.delete(listener);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function getSlotState(name) {
|
|
33
|
+
return slots.get(name) ?? EMPTY;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Forget every slot.
|
|
37
|
+
*
|
|
38
|
+
* A navigation replaces the page, and a slot rendered for the page you left
|
|
39
|
+
* has no claim on the one you arrived at.
|
|
40
|
+
*/
|
|
41
|
+
export function clearSlots() {
|
|
42
|
+
const names = [...slots.keys()];
|
|
43
|
+
slots.clear();
|
|
44
|
+
names.forEach(notify);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=slotStore.js.map
|