@renr/parcel-rsc-router 1.0.0-beta.12 → 1.0.0-beta.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @renr/parcel-rsc-router
2
2
 
3
- A client-side router designed for React Server Components (RSC) applications built with Parcel's `react-static` packager.
3
+ A client-side router designed for static React Server Components (RSC) applications built with Parcel 3.
4
4
 
5
5
  ⚠️ This package is an alpha / work in progress.
6
6
 
@@ -8,7 +8,7 @@ A client-side router designed for React Server Components (RSC) applications bui
8
8
 
9
9
  - **Client-side navigation:** Navigate between pages using the `<Link>` component.
10
10
  - **Route prefetching:** Automatically prefetches RSC payloads on hover or focus for instant navigation.
11
- - **Type safety:** Type-safe route definitions via `@renr/parcel-reporter-rsc-router` (the Link's `to` prop is typed).
11
+ - **Type safety:** Type-safe route definitions via `@renr/parcel-plugin-rsc-router` (the Link's `to` prop is typed).
12
12
  - **Programmatic navigation:** Control navigation programmatically using the `useRouter` hook.
13
13
  - **Location access:** Access the current URL and its properties with the `useLocation` hook.
14
14
  - **Route data access:** Retrieve data associated with the current route using the `useCurrentRoute` hook.
@@ -18,7 +18,7 @@ A client-side router designed for React Server Components (RSC) applications bui
18
18
 
19
19
  ## Installation
20
20
 
21
- For the initial Parcel static RSC site setup see https://parceljs.org/recipes/rsc/#static-rendering, or check out the example app [here](https://github.com/renrizzolo/parcel-rsc-react/tree/main/apps/my-static-site).
21
+ For the initial Parcel static RSC site setup see https://v3.parceljs.org/recipes/rsc/, or check out the example app [here](https://github.com/renrizzolo/parcel-rsc-react/tree/main/apps/my-static-site).
22
22
 
23
23
  Install the package using your preferred package manager:
24
24
 
@@ -30,14 +30,14 @@ npm install @renr/parcel-rsc-router
30
30
  yarn add @renr/parcel-rsc-router
31
31
  ```
32
32
 
33
- Install the required peer dependency:
33
+ Install the required Parcel config and plugin:
34
34
 
35
35
  ```bash
36
- pnpm add @renr/parcel-reporter-rsc-router
36
+ pnpm add -D @renr/parcel-config-rsc-router
37
37
  # or
38
- npm install @renr/parcel-reporter-rsc-router
38
+ npm install -D @renr/parcel-config-rsc-router
39
39
  # or
40
- yarn add @renr/parcel-reporter-rsc-router
40
+ yarn add -D @renr/parcel-config-rsc-router
41
41
  ```
42
42
 
43
43
  ## Usage
@@ -1,7 +1,7 @@
1
1
  "use client-entry";
2
2
  import { hydrate } from "@parcel/rsc/client";
3
3
  //#region src/client-entry.ts
4
- const updateRoot = hydrate();
4
+ const updateRoot = typeof document !== "undefined" ? hydrate() : () => {};
5
5
  //#endregion
6
6
  export { updateRoot };
7
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"client-entry.mjs","names":[],"sources":["../../src/client-entry.ts"],"sourcesContent":["\"use client-entry\";\n\nimport { hydrate } from \"@parcel/rsc/client\";\nimport type { ReactNode } from \"react\";\n\nexport const updateRoot: (value: ReactNode, cb?: () => void) => void =\n hydrate();\n"],"mappings":";;;AAKA,MAAa,aACX,QAAQ"}
1
+ {"version":3,"file":"client-entry.mjs","names":[],"sources":["../../src/client-entry.ts"],"sourcesContent":["\"use client-entry\";\n\nimport { hydrate } from \"@parcel/rsc/client\";\nimport type { ReactNode } from \"react\";\n\nexport const updateRoot: (value: ReactNode, cb?: () => void) => void =\n typeof document !== \"undefined\" ? hydrate() : () => {};\n"],"mappings":";;;AAKA,MAAa,aACX,OAAO,aAAa,cAAc,QAAQ,UAAU,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { RouterProvider, useCurrentRoute, useLocation, useRouter } from "./Router.mjs";
2
3
  import { Link } from "./Link.mjs";
3
4
  export { Link, RouterProvider, useCurrentRoute, useLocation, useRouter };
@@ -0,0 +1,18 @@
1
+ import { PageProps, RouteData, TocNode } from "./types.mjs";
2
+ import { ComponentType } from "react";
3
+ //#region src/prerender.d.ts
4
+ export interface PrerenderPageModule {
5
+ default: ComponentType<PageProps>;
6
+ tableOfContents?: TocNode[];
7
+ [key: string]: unknown;
8
+ }
9
+ export interface PrerenderOptions {
10
+ routes: RouteData[];
11
+ pages: Record<string, PrerenderPageModule>;
12
+ bootstrapComponent?: ComponentType;
13
+ outDir?: string;
14
+ staticDir?: string;
15
+ }
16
+ export declare function prerenderStaticSite({ routes, pages, bootstrapComponent, outDir, staticDir }: PrerenderOptions): Promise<void>;
17
+ //#endregion
18
+ //# sourceMappingURL=prerender.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prerender.d.mts","names":[],"sources":["../../src/prerender.tsx"],"mappings":";;;iBAMiB;EACf,SAAS,cAAc;EACvB,kBAAkB;GACjB;;iBAGc;EACf,QAAQ;EACR,OAAO,eAAe;EACtB,qBAAqB;EACrB;EACA;;wBA6EoB,sBACpB,QACA,OACA,oBACA,QAGA,aACC,mBAAmB"}
@@ -0,0 +1,112 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import fs from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { renderHTML, renderRSC } from "@parcel/rsc/server";
5
+ //#region src/prerender.tsx
6
+ function hasBootstrapScript(value) {
7
+ return typeof value === "function" && typeof value.bootstrapScript === "string" && Boolean(value.bootstrapScript);
8
+ }
9
+ function findBootstrapInElement(node, depth = 0) {
10
+ if (depth > 5 || !node || typeof node !== "object") return;
11
+ if (Array.isArray(node)) {
12
+ for (const child of node) {
13
+ const found = findBootstrapInElement(child, depth + 1);
14
+ if (found) return found;
15
+ }
16
+ return;
17
+ }
18
+ const maybeElement = node;
19
+ if (hasBootstrapScript(maybeElement.type)) return maybeElement.type;
20
+ if (maybeElement.props && "children" in maybeElement.props) return findBootstrapInElement(maybeElement.props.children, depth + 1);
21
+ }
22
+ function resolveBootstrapComponent(PageComponent, props) {
23
+ var _PageComponent$constr;
24
+ if (hasBootstrapScript(PageComponent)) return PageComponent;
25
+ if (((_PageComponent$constr = PageComponent.constructor) === null || _PageComponent$constr === void 0 ? void 0 : _PageComponent$constr.name) === "AsyncFunction") return;
26
+ try {
27
+ const rendered = PageComponent(props);
28
+ if (rendered && typeof rendered === "object" && "then" in rendered && typeof rendered.then === "function") {
29
+ rendered.catch(() => {});
30
+ return;
31
+ }
32
+ return findBootstrapInElement(rendered);
33
+ } catch (_unused) {
34
+ return;
35
+ }
36
+ }
37
+ async function prerenderStaticSite({ routes, pages, bootstrapComponent, outDir = process.env.PARCEL_RSC_OUT_DIR ? path.resolve(process.env.PARCEL_RSC_OUT_DIR) : path.resolve(process.cwd(), "dist"), staticDir = path.resolve(process.cwd(), "static") }) {
38
+ var _Object$values$find;
39
+ await fs.mkdir(outDir, { recursive: true });
40
+ try {
41
+ await fs.cp(staticDir, outDir, { recursive: true });
42
+ } catch (_unused2) {}
43
+ const allPages = routes.map((route) => {
44
+ const mod = pages[route.html];
45
+ const { default: _default, tableOfContents, ...exports } = mod !== null && mod !== void 0 ? mod : {};
46
+ return {
47
+ url: route.html,
48
+ name: route.slug,
49
+ exports,
50
+ tableOfContents
51
+ };
52
+ });
53
+ const probedBootstrapByRoute = /* @__PURE__ */ new Map();
54
+ let fallbackBootstrap = bootstrapComponent !== null && bootstrapComponent !== void 0 ? bootstrapComponent : (_Object$values$find = Object.values(pages).find((mod) => hasBootstrapScript(mod === null || mod === void 0 ? void 0 : mod.default))) === null || _Object$values$find === void 0 ? void 0 : _Object$values$find.default;
55
+ if (!fallbackBootstrap) for (const route of routes) {
56
+ const mod = pages[route.html];
57
+ if (!(mod === null || mod === void 0 ? void 0 : mod.default)) continue;
58
+ const { default: PageComponent, tableOfContents, ...exports } = mod;
59
+ const resolved = resolveBootstrapComponent(PageComponent, {
60
+ pages: allPages,
61
+ currentPage: {
62
+ url: route.html,
63
+ name: route.slug,
64
+ exports,
65
+ tableOfContents
66
+ }
67
+ });
68
+ probedBootstrapByRoute.set(route.html, resolved);
69
+ if (resolved) {
70
+ fallbackBootstrap = resolved;
71
+ break;
72
+ }
73
+ }
74
+ for (const route of routes) {
75
+ const mod = pages[route.html];
76
+ if (!(mod === null || mod === void 0 ? void 0 : mod.default)) continue;
77
+ const { default: PageComponent, tableOfContents, ...exports } = mod;
78
+ const pageProps = {
79
+ pages: allPages,
80
+ currentPage: {
81
+ url: route.html,
82
+ name: route.slug,
83
+ exports,
84
+ tableOfContents
85
+ }
86
+ };
87
+ const element = /* @__PURE__ */ jsx(PageComponent, { ...pageProps });
88
+ let componentWithBootstrap;
89
+ if (hasBootstrapScript(PageComponent)) componentWithBootstrap = PageComponent;
90
+ else if (bootstrapComponent) componentWithBootstrap = bootstrapComponent;
91
+ else if (probedBootstrapByRoute.has(route.html)) {
92
+ var _probedBootstrapByRou;
93
+ componentWithBootstrap = (_probedBootstrapByRou = probedBootstrapByRoute.get(route.html)) !== null && _probedBootstrapByRou !== void 0 ? _probedBootstrapByRou : fallbackBootstrap;
94
+ } else {
95
+ var _resolveBootstrapComp;
96
+ componentWithBootstrap = (_resolveBootstrapComp = resolveBootstrapComponent(PageComponent, pageProps)) !== null && _resolveBootstrapComp !== void 0 ? _resolveBootstrapComp : fallbackBootstrap;
97
+ }
98
+ const htmlStream = await renderHTML(element, { component: componentWithBootstrap });
99
+ const html = await new Response(htmlStream).text();
100
+ const rscStream = renderRSC(element);
101
+ const rsc = await new Response(rscStream).text();
102
+ const htmlFilePath = path.join(outDir, route.html.slice(1));
103
+ const rscFilePath = path.join(outDir, route.rsc.slice(1));
104
+ await fs.mkdir(path.dirname(htmlFilePath), { recursive: true });
105
+ await fs.writeFile(htmlFilePath, html, "utf-8");
106
+ await fs.writeFile(rscFilePath, rsc, "utf-8");
107
+ }
108
+ }
109
+ //#endregion
110
+ export { prerenderStaticSite };
111
+
112
+ //# sourceMappingURL=prerender.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prerender.mjs","names":[],"sources":["../../src/prerender.tsx"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport type { ComponentType } from \"react\";\nimport { renderHTML, renderRSC } from \"@parcel/rsc/server\";\nimport type { Page, PageProps, RouteData, TocNode } from \"./types.js\";\n\nexport interface PrerenderPageModule {\n default: ComponentType<PageProps>;\n tableOfContents?: TocNode[];\n [key: string]: unknown;\n}\n\nexport interface PrerenderOptions {\n routes: RouteData[];\n pages: Record<string, PrerenderPageModule>;\n bootstrapComponent?: ComponentType;\n outDir?: string;\n staticDir?: string;\n}\n\nfunction hasBootstrapScript(\n value: unknown\n): value is ComponentType & { bootstrapScript: string } {\n return (\n typeof value === \"function\" &&\n typeof (value as { bootstrapScript?: unknown }).bootstrapScript ===\n \"string\" &&\n Boolean((value as { bootstrapScript?: string }).bootstrapScript)\n );\n}\n\nfunction findBootstrapInElement(\n node: unknown,\n depth = 0\n): ComponentType | undefined {\n if (depth > 5 || !node || typeof node !== \"object\") {\n return undefined;\n }\n\n if (Array.isArray(node)) {\n for (const child of node) {\n const found = findBootstrapInElement(child, depth + 1);\n if (found) {\n return found;\n }\n }\n return undefined;\n }\n\n const maybeElement = node as {\n type?: unknown;\n props?: { children?: unknown };\n };\n if (hasBootstrapScript(maybeElement.type)) {\n return maybeElement.type;\n }\n\n if (maybeElement.props && \"children\" in maybeElement.props) {\n return findBootstrapInElement(maybeElement.props.children, depth + 1);\n }\n\n return undefined;\n}\n\nfunction resolveBootstrapComponent(\n PageComponent: ComponentType<PageProps>,\n props: PageProps\n): ComponentType | undefined {\n if (hasBootstrapScript(PageComponent)) {\n return PageComponent as unknown as ComponentType;\n }\n\n // Avoid invoking async server components outside React's render lifecycle.\n if (PageComponent.constructor?.name === \"AsyncFunction\") {\n return undefined;\n }\n\n try {\n const rendered = (PageComponent as (p: PageProps) => unknown)(props);\n if (\n rendered &&\n typeof rendered === \"object\" &&\n \"then\" in rendered &&\n typeof (rendered as { then?: unknown }).then === \"function\"\n ) {\n (rendered as Promise<unknown>).catch(() => {});\n return undefined;\n }\n return findBootstrapInElement(rendered);\n } catch {\n return undefined;\n }\n}\n\nexport async function prerenderStaticSite({\n routes,\n pages,\n bootstrapComponent,\n outDir = process.env.PARCEL_RSC_OUT_DIR\n ? path.resolve(process.env.PARCEL_RSC_OUT_DIR)\n : path.resolve(process.cwd(), \"dist\"),\n staticDir = path.resolve(process.cwd(), \"static\"),\n}: PrerenderOptions): Promise<void> {\n await fs.mkdir(outDir, { recursive: true });\n\n try {\n await fs.cp(staticDir, outDir, { recursive: true });\n } catch {\n // ignore if staticDir doesn't exist\n }\n\n const allPages: Page[] = routes.map((route) => {\n const mod = pages[route.html];\n const { default: _default, tableOfContents, ...exports } = mod ?? {};\n return {\n url: route.html,\n name: route.slug,\n exports,\n tableOfContents,\n };\n });\n\n const probedBootstrapByRoute = new Map<string, ComponentType | undefined>();\n\n let fallbackBootstrap: ComponentType | undefined =\n bootstrapComponent ??\n (Object.values(pages).find((mod) => hasBootstrapScript(mod?.default))\n ?.default as ComponentType | undefined);\n\n // If no page module carries bootstrapScript directly (e.g. an MDX-only site where\n // `'use server-entry'` lives on the layout component wrapped by each `.mdx` file),\n // probe page wrappers until one yields a layout's bootstrapScript and cache the result\n // so that route is not invoked twice.\n if (!fallbackBootstrap) {\n for (const route of routes) {\n const mod = pages[route.html];\n if (!mod?.default) continue;\n const { default: PageComponent, tableOfContents, ...exports } = mod;\n const resolved = resolveBootstrapComponent(PageComponent, {\n pages: allPages,\n currentPage: {\n url: route.html,\n name: route.slug,\n exports,\n tableOfContents,\n },\n });\n probedBootstrapByRoute.set(route.html, resolved);\n if (resolved) {\n fallbackBootstrap = resolved;\n break;\n }\n }\n }\n\n for (const route of routes) {\n const mod = pages[route.html];\n if (!mod?.default) continue;\n\n const { default: PageComponent, tableOfContents, ...exports } = mod;\n const currentPage: PageProps[\"currentPage\"] = {\n url: route.html,\n name: route.slug,\n exports,\n tableOfContents,\n };\n\n const pageProps: PageProps = {\n pages: allPages,\n currentPage,\n };\n\n const element = <PageComponent {...pageProps} />;\n\n let componentWithBootstrap: ComponentType | undefined;\n if (hasBootstrapScript(PageComponent)) {\n componentWithBootstrap = PageComponent as unknown as ComponentType;\n } else if (bootstrapComponent) {\n componentWithBootstrap = bootstrapComponent;\n } else if (probedBootstrapByRoute.has(route.html)) {\n componentWithBootstrap =\n probedBootstrapByRoute.get(route.html) ?? fallbackBootstrap;\n } else {\n componentWithBootstrap =\n resolveBootstrapComponent(PageComponent, pageProps) ??\n fallbackBootstrap;\n }\n\n const htmlStream = await renderHTML(element, {\n component: componentWithBootstrap,\n });\n const html = await new Response(htmlStream).text();\n\n const rscStream = renderRSC(element);\n const rsc = await new Response(rscStream).text();\n\n const htmlFilePath = path.join(outDir, route.html.slice(1));\n const rscFilePath = path.join(outDir, route.rsc.slice(1));\n\n await fs.mkdir(path.dirname(htmlFilePath), { recursive: true });\n await fs.writeFile(htmlFilePath, html, \"utf-8\");\n await fs.writeFile(rscFilePath, rsc, \"utf-8\");\n }\n}\n"],"mappings":";;;;;AAoBA,SAAS,mBACP,OACsD;CACtD,OACE,OAAO,UAAU,cACjB,OAAQ,MAAwC,oBAC9C,YACF,QAAS,MAAuC,eAAe;AAEnE;AAEA,SAAS,uBACP,MACA,QAAQ,GACmB;CAC3B,IAAI,QAAQ,KAAK,CAAC,QAAQ,OAAO,SAAS,UACxC;CAGF,IAAI,MAAM,QAAQ,IAAI,GAAG;EACvB,KAAK,MAAM,SAAS,MAAM;GACxB,MAAM,QAAQ,uBAAuB,OAAO,QAAQ,CAAC;GACrD,IAAI,OACF,OAAO;EAEX;EACA;CACF;CAEA,MAAM,eAAe;CAIrB,IAAI,mBAAmB,aAAa,IAAI,GACtC,OAAO,aAAa;CAGtB,IAAI,aAAa,SAAS,cAAc,aAAa,OACnD,OAAO,uBAAuB,aAAa,MAAM,UAAU,QAAQ,CAAC;AAIxE;AAEA,SAAS,0BACP,eACA,OAC2B;;CAC3B,IAAI,mBAAmB,aAAa,GAClC,OAAO;CAIT,MAAA,wBAAI,cAAc,iBAAA,QAAA,0BAAA,KAAA,IAAA,KAAA,IAAA,sBAAa,UAAS,iBACtC;CAGF,IAAI;EACF,MAAM,WAAY,cAA4C,KAAK;EACnE,IACE,YACA,O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G,EAAE,WAAW,KAAK,CAAC;EAC9D,MAAM,GAAG,UAAU,cAAc,MAAM,OAAO;EAC9C,MAAM,GAAG,UAAU,aAAa,KAAK,OAAO;CAC9C;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renr/parcel-rsc-router",
3
- "version": "1.0.0-beta.12",
3
+ "version": "1.0.0-beta.13",
4
4
  "author": "Ren Rizzolo",
5
5
  "license": "MIT",
6
6
  "description": "Parcel rsc router",
@@ -24,17 +24,23 @@
24
24
  "types": "./dist/esm/index.d.mts",
25
25
  "import": "./dist/esm/index.mjs",
26
26
  "default": "./dist/esm/index.mjs"
27
+ },
28
+ "./prerender": {
29
+ "types": "./dist/esm/prerender.d.mts",
30
+ "import": "./dist/esm/prerender.mjs",
31
+ "default": "./dist/esm/prerender.mjs"
27
32
  }
28
33
  },
29
34
  "peerDependencies": {
30
35
  "react": "^19",
31
- "@parcel/rsc": "^2",
36
+ "@parcel/rsc": "^3.0.0-alpha.3",
32
37
  "react-server-dom-parcel": "^19"
33
38
  },
34
39
  "devDependencies": {
40
+ "@types/node": "^25.6.2",
35
41
  "react": "^19.3.0",
36
42
  "@types/react": "^19.3.0",
37
- "@parcel/rsc": "^2.16.4"
43
+ "@parcel/rsc": "^3.0.0-alpha.3"
38
44
  },
39
45
  "sideEffects": false,
40
46
  "publishConfig": {