@vitejs/plugin-rsc 0.5.28 → 0.5.30
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 +11 -0
- package/dist/browser.d.ts +1 -1
- package/dist/{client-BrwlzXgg.d.ts → client-Bhch3O41.d.ts} +1 -1
- package/dist/client-reference-CCekXxax.js +16 -0
- package/dist/client-reference-DT0MYgPn.d.ts +8 -0
- package/dist/core/rsc.d.ts +2 -2
- package/dist/core/ssr.d.ts +1 -1
- package/dist/{index-CqNlZcWp.d.ts → index-C5IY2S-e.d.ts} +5 -1
- package/dist/index.js +1 -1
- package/dist/{picocolors-DFVOi1sR.js → picocolors-D_Y2lyXp.js} +1 -1
- package/dist/{plugin-BOTpkess.js → plugin-ByvxS0by.js} +11 -4
- package/dist/plugin.js +1 -1
- package/dist/react/browser.d.ts +1 -1
- package/dist/react/rsc/client.d.ts +1 -1
- package/dist/react/rsc/server.d.ts +2 -2
- package/dist/react/rsc/static.d.ts +6 -0
- package/dist/react/rsc/static.js +8 -0
- package/dist/react/rsc.d.ts +3 -3
- package/dist/react/ssr.d.ts +1 -1
- package/dist/rsc/client.d.ts +1 -1
- package/dist/rsc/server.d.ts +4 -8
- package/dist/rsc/server.js +2 -12
- package/dist/rsc/static.d.ts +11 -0
- package/dist/rsc/static.js +9 -0
- package/dist/rsc-C3UdJLOW.d.ts +20 -0
- package/dist/rsc.d.ts +3 -3
- package/dist/{server-DTkvSyJT.d.ts → server-ZBjqNTqU.d.ts} +3 -10
- package/dist/ssr.d.ts +1 -1
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js +2 -2
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.development.js +29 -29
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.production.js +26 -29
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.development.js +31 -31
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.production.js +30 -33
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js +31 -31
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.production.js +30 -33
- package/dist/vendor/react-server-dom/package.json +5 -5
- package/package.json +4 -4
- package/dist/rsc-CGkkhLG3.d.ts +0 -21
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ npm create vite@latest -- --template rsc
|
|
|
27
27
|
|
|
28
28
|
- [`./examples/basic`](./examples/basic) - Advanced RSC features and testing
|
|
29
29
|
- This is mainly used for e2e testing and includes various advanced RSC usages (e.g. `"use cache"` example).
|
|
30
|
+
- [`./examples/performance-track`](./examples/performance-track) - Minimal React Server Components performance track probe.
|
|
30
31
|
- [`./examples/ssg`](./examples/ssg) - Static site generation with MDX and client components for interactivity.
|
|
31
32
|
- [`./examples/react-router`](./examples/react-router) - React Router RSC integration
|
|
32
33
|
- Demonstrates how to integrate [experimental React Router RSC API](https://remix.run/blog/rsc-preview). React Router now provides [official RSC support](https://reactrouter.com/how-to/react-server-components), so it's recommended to follow React Router's official documentation for the latest integration.
|
|
@@ -454,6 +455,16 @@ This module provides Vite-integrated RSC runtime APIs based on
|
|
|
454
455
|
- `registerClientReference/registerServerReference`
|
|
455
456
|
- `createTemporaryReferenceSet`
|
|
456
457
|
|
|
458
|
+
### `@vitejs/plugin-rsc/rsc/static`
|
|
459
|
+
|
|
460
|
+
This module provides a Vite-integrated RSC runtime API based on
|
|
461
|
+
`react-server-dom/static.edge` for use in the RSC environment:
|
|
462
|
+
|
|
463
|
+
- `prerender`: static RSC serialization (React VDOM -> RSC stream)
|
|
464
|
+
|
|
465
|
+
`prerender` supports the same Vite-specific `onClientReference` extension as
|
|
466
|
+
`renderToReadableStream`.
|
|
467
|
+
|
|
457
468
|
### `@vitejs/plugin-rsc/rsc/client`
|
|
458
469
|
|
|
459
470
|
This module provides Vite-integrated RSC runtime APIs based on
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as CallServerCallback } from "./index-
|
|
1
|
+
import { n as CallServerCallback } from "./index-C5IY2S-e.js";
|
|
2
2
|
import { t as setRequireModule } from "./browser-DI_Wyg5Y.js";
|
|
3
3
|
import { callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setServerCallback } from "./react/browser.js";
|
|
4
4
|
export { type CallServerCallback, callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setRequireModule, setServerCallback };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CreateFromReadableStreamEdgeOptions, c as EncodeReplyFunction, r as ClientTemporaryReferenceSet } from "./index-
|
|
1
|
+
import { a as CreateFromReadableStreamEdgeOptions, c as EncodeReplyFunction, r as ClientTemporaryReferenceSet } from "./index-C5IY2S-e.js";
|
|
2
2
|
//#region src/react/rsc/client.d.ts
|
|
3
3
|
declare function createFromReadableStream<T>(stream: ReadableStream<Uint8Array>, options?: CreateFromReadableStreamEdgeOptions, extraOptions?: {
|
|
4
4
|
/**
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import assetsManifest from "virtual:vite-rsc/assets-manifest";
|
|
2
|
+
//#region src/rsc/client-reference.ts
|
|
3
|
+
function createOnClientReference(onClientReference) {
|
|
4
|
+
return (metadata) => {
|
|
5
|
+
const deps = assetsManifest.clientReferenceDeps[metadata.id] ?? {
|
|
6
|
+
js: [],
|
|
7
|
+
css: []
|
|
8
|
+
};
|
|
9
|
+
onClientReference({
|
|
10
|
+
...metadata,
|
|
11
|
+
deps
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { createOnClientReference as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as ClientReferenceMetadata } from "./rsc-C3UdJLOW.js";
|
|
2
|
+
import { i as ResolvedAssetDeps } from "./plugin-CaLiN8ED.js";
|
|
3
|
+
//#region src/rsc/client-reference.d.ts
|
|
4
|
+
type OnClientReference = (metadata: ClientReferenceMetadata & {
|
|
5
|
+
deps: ResolvedAssetDeps;
|
|
6
|
+
}) => void;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { OnClientReference as t };
|
package/dist/core/rsc.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule };
|
|
1
|
+
import { a as createServerManifest, i as createServerDecodeClientManifest, n as CreateClientManifestOptions, o as loadServerAction, r as createClientManifest, s as setRequireModule, t as ClientReferenceMetadata } from "../rsc-C3UdJLOW.js";
|
|
2
|
+
export { ClientReferenceMetadata, CreateClientManifestOptions, createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule };
|
package/dist/core/ssr.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ interface RenderToReadableStreamOptions {
|
|
|
31
31
|
startTime?: number;
|
|
32
32
|
temporaryReferences?: ServerTemporaryReferenceSet;
|
|
33
33
|
onError?: (error: unknown) => void;
|
|
34
|
+
onPostpone?: (reason: string) => void;
|
|
35
|
+
}
|
|
36
|
+
interface PrerenderResult {
|
|
37
|
+
prelude: ReadableStream<Uint8Array>;
|
|
34
38
|
}
|
|
35
39
|
interface CreateFromReadableStreamBrowserOptions {
|
|
36
40
|
callServer?: CallServerCallback;
|
|
@@ -78,4 +82,4 @@ type DebugChannel = {
|
|
|
78
82
|
type ServerTemporaryReferenceSet = unknown;
|
|
79
83
|
type ClientTemporaryReferenceSet = unknown;
|
|
80
84
|
//#endregion
|
|
81
|
-
export { CreateFromReadableStreamEdgeOptions as a, EncodeReplyFunction as c,
|
|
85
|
+
export { CreateFromReadableStreamEdgeOptions as a, EncodeReplyFunction as c, RenderToReadableStreamOptions as d, ServerConsumerManifest as f, CreateFromReadableStreamBrowserOptions as i, ModuleMap as l, CallServerCallback as n, DecodeReplyFunction as o, ServerTemporaryReferenceSet as p, ClientTemporaryReferenceSet as r, EncodeFormActionCallback as s, BundlerConfig as t, PrerenderResult as u };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as vitePluginRsc, t as getPluginApi } from "./plugin-
|
|
1
|
+
import { r as vitePluginRsc, t as getPluginApi } from "./plugin-ByvxS0by.js";
|
|
2
2
|
export { vitePluginRsc as default, getPluginApi };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __commonJSMin } from "./plugin-
|
|
1
|
+
import { a as __commonJSMin } from "./plugin-ByvxS0by.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
3
3
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
4
|
let p = process || {};
|
|
@@ -636,7 +636,7 @@ function vitePluginRscMinimal(rscPluginOptions = {}, manager = new RscPluginMana
|
|
|
636
636
|
function vitePluginRsc(rscPluginOptions = {}) {
|
|
637
637
|
const manager = new RscPluginManager();
|
|
638
638
|
const buildApp = async (builder) => {
|
|
639
|
-
const colors = await import("./picocolors-
|
|
639
|
+
const colors = await import("./picocolors-D_Y2lyXp.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
|
|
640
640
|
const logStep = (msg) => {
|
|
641
641
|
builder.config.logger.info(colors.blue(msg));
|
|
642
642
|
};
|
|
@@ -757,6 +757,7 @@ function vitePluginRsc(rscPluginOptions = {}) {
|
|
|
757
757
|
"react/jsx-runtime",
|
|
758
758
|
"react/jsx-dev-runtime",
|
|
759
759
|
`${reactServerDomPackageName}/server.edge`,
|
|
760
|
+
`${reactServerDomPackageName}/static.edge`,
|
|
760
761
|
`${reactServerDomPackageName}/client.edge`
|
|
761
762
|
],
|
|
762
763
|
exclude: [PKG_NAME, ...optimizeDepsExclude]
|
|
@@ -894,8 +895,13 @@ function vitePluginRsc(rscPluginOptions = {}) {
|
|
|
894
895
|
}
|
|
895
896
|
if (this.environment.name === "client") {
|
|
896
897
|
if (ctx.server.environments.rsc.moduleGraph.getModuleById(ctx.file)) {
|
|
897
|
-
|
|
898
|
-
|
|
898
|
+
let hasNonCssImporter = false;
|
|
899
|
+
for (const clientMod of ctx.modules) for (const importer of clientMod.importers) {
|
|
900
|
+
if (!importer.id) continue;
|
|
901
|
+
if (isCSSRequest(importer.id)) await this.environment.reloadModule(importer);
|
|
902
|
+
else hasNonCssImporter = true;
|
|
903
|
+
}
|
|
904
|
+
if (!hasNonCssImporter) return [];
|
|
899
905
|
}
|
|
900
906
|
}
|
|
901
907
|
}
|
|
@@ -1434,7 +1440,8 @@ function vitePluginUseClient(useClientPluginOptions, manager) {
|
|
|
1434
1440
|
if (this.environment.name === serverEnvironmentName && bareImportRE.test(source) && !(source === "client-only" || source === "server-only")) {
|
|
1435
1441
|
const resolved = await this.resolve(source, importer, options);
|
|
1436
1442
|
if (resolved && resolved.id.includes("/node_modules/")) {
|
|
1437
|
-
const
|
|
1443
|
+
const rootImporter = path.join(this.environment.config.root, "index.html");
|
|
1444
|
+
const resolvedAtRoot = await this.resolve(source, rootImporter, options);
|
|
1438
1445
|
if (!resolvedAtRoot || resolvedAtRoot.id !== resolved.id) return;
|
|
1439
1446
|
packageSources.set(resolved.id, source);
|
|
1440
1447
|
return resolved;
|
package/dist/plugin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as vitePluginRscMinimal, n as transformRscCssExport, r as vitePluginRsc, t as getPluginApi } from "./plugin-
|
|
1
|
+
import { i as vitePluginRscMinimal, n as transformRscCssExport, r as vitePluginRsc, t as getPluginApi } from "./plugin-ByvxS0by.js";
|
|
2
2
|
export { vitePluginRsc as default, getPluginApi, transformRscCssExport, vitePluginRscMinimal };
|
package/dist/react/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as EncodeReplyFunction, i as CreateFromReadableStreamBrowserOptions, n as CallServerCallback, r as ClientTemporaryReferenceSet } from "../index-
|
|
1
|
+
import { c as EncodeReplyFunction, i as CreateFromReadableStreamBrowserOptions, n as CallServerCallback, r as ClientTemporaryReferenceSet } from "../index-C5IY2S-e.js";
|
|
2
2
|
import { t as setRequireModule } from "../browser-DI_Wyg5Y.js";
|
|
3
3
|
//#region src/react/browser.d.ts
|
|
4
4
|
declare function createFromReadableStream<T>(stream: ReadableStream<Uint8Array>, options?: CreateFromReadableStreamBrowserOptions): Promise<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "../../client-
|
|
1
|
+
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "../../client-Bhch3O41.js";
|
|
2
2
|
export { createClientTemporaryReferenceSet, createFromReadableStream, encodeReply };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as registerClientReference, i as decodeReply, n as decodeAction, o as registerServerReference, r as decodeFormState, s as renderToReadableStream, t as createTemporaryReferenceSet } from "../../server-
|
|
1
|
+
import { o as loadServerAction, s as setRequireModule } from "../../rsc-C3UdJLOW.js";
|
|
2
|
+
import { a as registerClientReference, i as decodeReply, n as decodeAction, o as registerServerReference, r as decodeFormState, s as renderToReadableStream, t as createTemporaryReferenceSet } from "../../server-ZBjqNTqU.js";
|
|
3
3
|
export { createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { d as RenderToReadableStreamOptions, u as PrerenderResult } from "../../index-C5IY2S-e.js";
|
|
2
|
+
import { n as CreateClientManifestOptions } from "../../rsc-C3UdJLOW.js";
|
|
3
|
+
//#region src/react/rsc/static.d.ts
|
|
4
|
+
declare function prerender<T>(data: T, options?: RenderToReadableStreamOptions, extraOptions?: CreateClientManifestOptions): Promise<PrerenderResult>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { prerender };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createClientManifest } from "../../core/rsc.js";
|
|
2
|
+
import * as ReactStatic from "@vitejs/plugin-rsc/vendor/react-server-dom/static.edge";
|
|
3
|
+
//#region src/react/rsc/static.ts
|
|
4
|
+
function prerender(data, options, extraOptions) {
|
|
5
|
+
return ReactStatic.prerender(data, createClientManifest({ onClientReference: extraOptions?.onClientReference }), options);
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { prerender };
|
package/dist/react/rsc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as registerClientReference, i as decodeReply, n as decodeAction, o as registerServerReference, r as decodeFormState, s as renderToReadableStream, t as createTemporaryReferenceSet } from "../server-
|
|
3
|
-
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "../client-
|
|
1
|
+
import { o as loadServerAction, s as setRequireModule } from "../rsc-C3UdJLOW.js";
|
|
2
|
+
import { a as registerClientReference, i as decodeReply, n as decodeAction, o as registerServerReference, r as decodeFormState, s as renderToReadableStream, t as createTemporaryReferenceSet } from "../server-ZBjqNTqU.js";
|
|
3
|
+
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "../client-Bhch3O41.js";
|
|
4
4
|
export { createClientTemporaryReferenceSet, createFromReadableStream, createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, encodeReply, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
package/dist/react/ssr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CreateFromReadableStreamEdgeOptions, c as EncodeReplyFunction, r as ClientTemporaryReferenceSet, s as EncodeFormActionCallback } from "../index-
|
|
1
|
+
import { a as CreateFromReadableStreamEdgeOptions, c as EncodeReplyFunction, r as ClientTemporaryReferenceSet, s as EncodeFormActionCallback } from "../index-C5IY2S-e.js";
|
|
2
2
|
import { setRequireModule } from "../core/ssr.js";
|
|
3
3
|
//#region src/react/ssr.d.ts
|
|
4
4
|
declare function createFromReadableStream<T>(stream: ReadableStream<Uint8Array>, options?: CreateFromReadableStreamEdgeOptions): Promise<T>;
|
package/dist/rsc/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "../client-
|
|
1
|
+
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "../client-Bhch3O41.js";
|
|
2
2
|
export { createClientTemporaryReferenceSet, createFromReadableStream, encodeReply };
|
package/dist/rsc/server.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
1
|
+
import { a as createServerManifest, o as loadServerAction, r as createClientManifest, s as setRequireModule } from "../rsc-C3UdJLOW.js";
|
|
2
|
+
import { a as registerClientReference, i as decodeReply, n as decodeAction, o as registerServerReference, r as decodeFormState, t as createTemporaryReferenceSet } from "../server-ZBjqNTqU.js";
|
|
3
|
+
import { t as OnClientReference } from "../client-reference-DT0MYgPn.js";
|
|
4
4
|
//#region src/rsc/server.d.ts
|
|
5
5
|
declare function renderToReadableStream<T>(data: T, options?: object, extraOptions?: {
|
|
6
6
|
/**
|
|
7
7
|
* @experimental
|
|
8
8
|
*/
|
|
9
|
-
onClientReference?:
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
|
-
deps: ResolvedAssetDeps;
|
|
13
|
-
}) => void;
|
|
9
|
+
onClientReference?: OnClientReference;
|
|
14
10
|
}): ReadableStream<Uint8Array>;
|
|
15
11
|
//#endregion
|
|
16
12
|
export { createClientManifest, createServerManifest, createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
package/dist/rsc/server.js
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { createClientManifest, createServerManifest, loadServerAction, setRequireModule } from "../core/rsc.js";
|
|
2
2
|
import { createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, registerClientReference, registerServerReference, renderToReadableStream as renderToReadableStream$1 } from "../react/rsc/server.js";
|
|
3
|
+
import { t as createOnClientReference } from "../client-reference-CCekXxax.js";
|
|
3
4
|
import "../shared-D42sHPD1.js";
|
|
4
|
-
import assetsManifest from "virtual:vite-rsc/assets-manifest";
|
|
5
5
|
//#region src/rsc/server.tsx
|
|
6
6
|
function renderToReadableStream(data, options, extraOptions) {
|
|
7
|
-
return renderToReadableStream$1(data, options, { onClientReference(
|
|
8
|
-
const deps = assetsManifest.clientReferenceDeps[metadata.id] ?? {
|
|
9
|
-
js: [],
|
|
10
|
-
css: []
|
|
11
|
-
};
|
|
12
|
-
extraOptions?.onClientReference?.({
|
|
13
|
-
id: metadata.id,
|
|
14
|
-
name: metadata.name,
|
|
15
|
-
deps
|
|
16
|
-
});
|
|
17
|
-
} });
|
|
7
|
+
return renderToReadableStream$1(data, options, { onClientReference: extraOptions?.onClientReference ? createOnClientReference(extraOptions.onClientReference) : void 0 });
|
|
18
8
|
}
|
|
19
9
|
//#endregion
|
|
20
10
|
export { createClientManifest, createServerManifest, createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { d as RenderToReadableStreamOptions, u as PrerenderResult } from "../index-C5IY2S-e.js";
|
|
2
|
+
import { t as OnClientReference } from "../client-reference-DT0MYgPn.js";
|
|
3
|
+
//#region src/rsc/static.d.ts
|
|
4
|
+
declare function prerender<T>(data: T, options?: RenderToReadableStreamOptions, extraOptions?: {
|
|
5
|
+
/**
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
onClientReference?: OnClientReference;
|
|
9
|
+
}): Promise<PrerenderResult>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { prerender };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { t as createOnClientReference } from "../client-reference-CCekXxax.js";
|
|
2
|
+
import "../shared-D42sHPD1.js";
|
|
3
|
+
import { prerender as prerender$1 } from "../react/rsc/static.js";
|
|
4
|
+
//#region src/rsc/static.tsx
|
|
5
|
+
function prerender(data, options, extraOptions) {
|
|
6
|
+
return prerender$1(data, options, { onClientReference: extraOptions?.onClientReference ? createOnClientReference(extraOptions.onClientReference) : void 0 });
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { prerender };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { l as ModuleMap, t as BundlerConfig } from "./index-C5IY2S-e.js";
|
|
2
|
+
//#region src/core/rsc.d.ts
|
|
3
|
+
declare function setRequireModule(options: {
|
|
4
|
+
load: (id: string) => unknown;
|
|
5
|
+
}): void;
|
|
6
|
+
declare function loadServerAction(id: string): Promise<Function>;
|
|
7
|
+
declare function createServerManifest(options?: {
|
|
8
|
+
preserveServerReferences?: boolean;
|
|
9
|
+
}): BundlerConfig;
|
|
10
|
+
declare function createServerDecodeClientManifest(): ModuleMap;
|
|
11
|
+
declare function createClientManifest(options?: CreateClientManifestOptions): BundlerConfig;
|
|
12
|
+
interface ClientReferenceMetadata {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
interface CreateClientManifestOptions {
|
|
17
|
+
onClientReference?: (metadata: ClientReferenceMetadata) => void;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { createServerManifest as a, createServerDecodeClientManifest as i, CreateClientManifestOptions as n, loadServerAction as o, createClientManifest as r, setRequireModule as s, ClientReferenceMetadata as t };
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as registerClientReference, i as decodeReply, n as decodeAction, o as registerServerReference, r as decodeFormState, t as createTemporaryReferenceSet } from "./server-
|
|
3
|
-
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "./client-
|
|
1
|
+
import { a as createServerManifest, o as loadServerAction, r as createClientManifest, s as setRequireModule } from "./rsc-C3UdJLOW.js";
|
|
2
|
+
import { a as registerClientReference, i as decodeReply, n as decodeAction, o as registerServerReference, r as decodeFormState, t as createTemporaryReferenceSet } from "./server-ZBjqNTqU.js";
|
|
3
|
+
import { n as createFromReadableStream, r as encodeReply, t as createClientTemporaryReferenceSet } from "./client-Bhch3O41.js";
|
|
4
4
|
import { decryptActionBoundArgs, encryptActionBoundArgs } from "./utils/encryption-runtime.js";
|
|
5
5
|
import { renderToReadableStream } from "./rsc/server.js";
|
|
6
6
|
export { createClientManifest, createClientTemporaryReferenceSet, createFromReadableStream, createServerManifest, createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, decryptActionBoundArgs, encodeReply, encryptActionBoundArgs, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as RenderToReadableStreamOptions, o as DecodeReplyFunction, p as ServerTemporaryReferenceSet } from "./index-C5IY2S-e.js";
|
|
2
|
+
import { n as CreateClientManifestOptions } from "./rsc-C3UdJLOW.js";
|
|
2
3
|
import { ReactFormState } from "react-dom/client";
|
|
3
4
|
//#region src/react/rsc/server.d.ts
|
|
4
|
-
declare function renderToReadableStream<T>(data: T, options?: RenderToReadableStreamOptions, extraOptions?:
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
onClientReference?: (metadata: {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
}) => void;
|
|
12
|
-
}): ReadableStream<Uint8Array>;
|
|
5
|
+
declare function renderToReadableStream<T>(data: T, options?: RenderToReadableStreamOptions, extraOptions?: CreateClientManifestOptions): ReadableStream<Uint8Array>;
|
|
13
6
|
declare function registerClientReference<T>(proxy: T, id: string, name: string): T;
|
|
14
7
|
declare const registerServerReference: <T>(ref: T, id: string, name: string) => T;
|
|
15
8
|
declare const decodeReply: DecodeReplyFunction;
|
package/dist/ssr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as EncodeFormActionCallback } from "./index-
|
|
1
|
+
import { s as EncodeFormActionCallback } from "./index-C5IY2S-e.js";
|
|
2
2
|
import { createServerConsumerManifest, setRequireModule } from "./core/ssr.js";
|
|
3
3
|
import { i as ResolvedAssetDeps } from "./plugin-CaLiN8ED.js";
|
|
4
4
|
import { callServer, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL } from "./react/ssr.js";
|
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js
CHANGED
|
@@ -4901,10 +4901,10 @@
|
|
|
4901
4901
|
return hook.checkDCE ? !0 : !1;
|
|
4902
4902
|
})({
|
|
4903
4903
|
bundleType: 1,
|
|
4904
|
-
version: "19.2.
|
|
4904
|
+
version: "19.2.8",
|
|
4905
4905
|
rendererPackageName: "react-server-dom-webpack",
|
|
4906
4906
|
currentDispatcherRef: ReactSharedInternals,
|
|
4907
|
-
reconcilerVersion: "19.2.
|
|
4907
|
+
reconcilerVersion: "19.2.8",
|
|
4908
4908
|
getCurrentComponentInfo: function () {
|
|
4909
4909
|
return currentOwnerInDEV;
|
|
4910
4910
|
}
|
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.development.js
CHANGED
|
@@ -1395,7 +1395,7 @@
|
|
|
1395
1395
|
erroredTask(request, streamTask, reason),
|
|
1396
1396
|
enqueueFlush(request),
|
|
1397
1397
|
"function" === typeof iterator.throw &&
|
|
1398
|
-
iterator.throw(reason).then(
|
|
1398
|
+
iterator.throw(reason).then(noop, noop));
|
|
1399
1399
|
}
|
|
1400
1400
|
function abortIterable() {
|
|
1401
1401
|
if (0 === streamTask.status) {
|
|
@@ -1409,7 +1409,7 @@
|
|
|
1409
1409
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1410
1410
|
enqueueFlush(request));
|
|
1411
1411
|
"function" === typeof iterator.throw &&
|
|
1412
|
-
iterator.throw(reason).then(
|
|
1412
|
+
iterator.throw(reason).then(noop, noop);
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
var isIterator = iterable === iterator,
|
|
@@ -5597,44 +5597,44 @@
|
|
|
5597
5597
|
};
|
|
5598
5598
|
exports.decodeAction = function (body, serverManifest) {
|
|
5599
5599
|
var formData = new FormData(),
|
|
5600
|
-
|
|
5601
|
-
seenActions = new Set();
|
|
5600
|
+
maybeActionKey = null;
|
|
5602
5601
|
body.forEach(function (value, key) {
|
|
5603
5602
|
key.startsWith("$ACTION_")
|
|
5604
5603
|
? key.startsWith("$ACTION_REF_")
|
|
5605
|
-
?
|
|
5606
|
-
|
|
5607
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
5608
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
5609
|
-
(action = loadServerReference(serverManifest, value)))
|
|
5610
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
5611
|
-
!seenActions.has(key) &&
|
|
5612
|
-
(seenActions.add(key),
|
|
5613
|
-
(value = key.slice(11)),
|
|
5614
|
-
(action = loadServerReference(serverManifest, {
|
|
5615
|
-
id: value,
|
|
5616
|
-
bound: null
|
|
5617
|
-
})))
|
|
5604
|
+
? (maybeActionKey = key)
|
|
5605
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
5618
5606
|
: formData.append(key, value);
|
|
5619
5607
|
});
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5608
|
+
if (null === maybeActionKey) return null;
|
|
5609
|
+
var actionKey = maybeActionKey,
|
|
5610
|
+
action = null;
|
|
5611
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
5612
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
5613
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
5614
|
+
(action = loadServerReference(serverManifest, body));
|
|
5615
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
5616
|
+
(body = actionKey.slice(11)),
|
|
5617
|
+
(action = loadServerReference(serverManifest, {
|
|
5618
|
+
id: body,
|
|
5619
|
+
bound: null
|
|
5620
|
+
}));
|
|
5621
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
5622
|
+
return action.then(function (fn) {
|
|
5623
|
+
return fn.bind(null, formData);
|
|
5624
|
+
});
|
|
5625
5625
|
};
|
|
5626
5626
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
5627
5627
|
var keyPath = body.get("$ACTION_KEY");
|
|
5628
5628
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
5629
|
-
var
|
|
5629
|
+
var actionKey = null;
|
|
5630
5630
|
body.forEach(function (value, key) {
|
|
5631
|
-
key.startsWith("$ACTION_REF_") &&
|
|
5632
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
5633
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
5631
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
5634
5632
|
});
|
|
5635
|
-
if (null ===
|
|
5636
|
-
var
|
|
5637
|
-
|
|
5633
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
5634
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
5635
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
5636
|
+
var referenceId = body.id;
|
|
5637
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
5638
5638
|
return null === bound
|
|
5639
5639
|
? null
|
|
5640
5640
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.production.js
CHANGED
|
@@ -1052,7 +1052,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1052
1052
|
erroredTask(request, streamTask, reason),
|
|
1053
1053
|
enqueueFlush(request),
|
|
1054
1054
|
"function" === typeof iterator.throw &&
|
|
1055
|
-
iterator.throw(reason).then(
|
|
1055
|
+
iterator.throw(reason).then(noop, noop));
|
|
1056
1056
|
}
|
|
1057
1057
|
function abortIterable() {
|
|
1058
1058
|
if (0 === streamTask.status) {
|
|
@@ -1066,7 +1066,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1066
1066
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1067
1067
|
enqueueFlush(request));
|
|
1068
1068
|
"function" === typeof iterator.throw &&
|
|
1069
|
-
iterator.throw(reason).then(
|
|
1069
|
+
iterator.throw(reason).then(noop, noop);
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
1072
|
iterable = iterable === iterator;
|
|
@@ -3396,44 +3396,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3396
3396
|
};
|
|
3397
3397
|
exports.decodeAction = function (body, serverManifest) {
|
|
3398
3398
|
var formData = new FormData(),
|
|
3399
|
-
|
|
3400
|
-
seenActions = new Set();
|
|
3399
|
+
maybeActionKey = null;
|
|
3401
3400
|
body.forEach(function (value, key) {
|
|
3402
3401
|
key.startsWith("$ACTION_")
|
|
3403
3402
|
? key.startsWith("$ACTION_REF_")
|
|
3404
|
-
?
|
|
3405
|
-
|
|
3406
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3407
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3408
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3409
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3410
|
-
!seenActions.has(key) &&
|
|
3411
|
-
(seenActions.add(key),
|
|
3412
|
-
(value = key.slice(11)),
|
|
3413
|
-
(action = loadServerReference(serverManifest, {
|
|
3414
|
-
id: value,
|
|
3415
|
-
bound: null
|
|
3416
|
-
})))
|
|
3403
|
+
? (maybeActionKey = key)
|
|
3404
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3417
3405
|
: formData.append(key, value);
|
|
3418
3406
|
});
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3407
|
+
if (null === maybeActionKey) return null;
|
|
3408
|
+
var actionKey = maybeActionKey,
|
|
3409
|
+
action = null;
|
|
3410
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3411
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3412
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3413
|
+
(action = loadServerReference(serverManifest, body));
|
|
3414
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3415
|
+
(body = actionKey.slice(11)),
|
|
3416
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3417
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3418
|
+
return action.then(function (fn) {
|
|
3419
|
+
return fn.bind(null, formData);
|
|
3420
|
+
});
|
|
3424
3421
|
};
|
|
3425
3422
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3426
3423
|
var keyPath = body.get("$ACTION_KEY");
|
|
3427
3424
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3428
|
-
var
|
|
3425
|
+
var actionKey = null;
|
|
3429
3426
|
body.forEach(function (value, key) {
|
|
3430
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3431
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3432
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3427
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3433
3428
|
});
|
|
3434
|
-
if (null ===
|
|
3435
|
-
var
|
|
3436
|
-
|
|
3429
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3430
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3431
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3432
|
+
var referenceId = body.id;
|
|
3433
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3437
3434
|
return null === bound
|
|
3438
3435
|
? null
|
|
3439
3436
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.development.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
14
|
function voidHandler() {}
|
|
15
|
+
function noop() {}
|
|
15
16
|
function getIteratorFn(maybeIterable) {
|
|
16
17
|
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
17
18
|
return null;
|
|
@@ -514,7 +515,6 @@
|
|
|
514
515
|
temporaryReferences.set(reference, id);
|
|
515
516
|
return reference;
|
|
516
517
|
}
|
|
517
|
-
function noop() {}
|
|
518
518
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
519
519
|
index = thenableState[index];
|
|
520
520
|
void 0 === index
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
erroredTask(request, streamTask, reason),
|
|
1408
1408
|
enqueueFlush(request),
|
|
1409
1409
|
"function" === typeof iterator.throw &&
|
|
1410
|
-
iterator.throw(reason).then(
|
|
1410
|
+
iterator.throw(reason).then(noop, noop));
|
|
1411
1411
|
}
|
|
1412
1412
|
function abortIterable() {
|
|
1413
1413
|
if (0 === streamTask.status) {
|
|
@@ -1421,7 +1421,7 @@
|
|
|
1421
1421
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1422
1422
|
enqueueFlush(request));
|
|
1423
1423
|
"function" === typeof iterator.throw &&
|
|
1424
|
-
iterator.throw(reason).then(
|
|
1424
|
+
iterator.throw(reason).then(noop, noop);
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
1427
|
var isIterator = iterable === iterator,
|
|
@@ -5668,44 +5668,44 @@
|
|
|
5668
5668
|
};
|
|
5669
5669
|
exports.decodeAction = function (body, serverManifest) {
|
|
5670
5670
|
var formData = new FormData(),
|
|
5671
|
-
|
|
5672
|
-
seenActions = new Set();
|
|
5671
|
+
maybeActionKey = null;
|
|
5673
5672
|
body.forEach(function (value, key) {
|
|
5674
5673
|
key.startsWith("$ACTION_")
|
|
5675
5674
|
? key.startsWith("$ACTION_REF_")
|
|
5676
|
-
?
|
|
5677
|
-
|
|
5678
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
5679
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
5680
|
-
(action = loadServerReference(serverManifest, value)))
|
|
5681
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
5682
|
-
!seenActions.has(key) &&
|
|
5683
|
-
(seenActions.add(key),
|
|
5684
|
-
(value = key.slice(11)),
|
|
5685
|
-
(action = loadServerReference(serverManifest, {
|
|
5686
|
-
id: value,
|
|
5687
|
-
bound: null
|
|
5688
|
-
})))
|
|
5675
|
+
? (maybeActionKey = key)
|
|
5676
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
5689
5677
|
: formData.append(key, value);
|
|
5690
5678
|
});
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5679
|
+
if (null === maybeActionKey) return null;
|
|
5680
|
+
var actionKey = maybeActionKey,
|
|
5681
|
+
action = null;
|
|
5682
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
5683
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
5684
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
5685
|
+
(action = loadServerReference(serverManifest, body));
|
|
5686
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
5687
|
+
(body = actionKey.slice(11)),
|
|
5688
|
+
(action = loadServerReference(serverManifest, {
|
|
5689
|
+
id: body,
|
|
5690
|
+
bound: null
|
|
5691
|
+
}));
|
|
5692
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
5693
|
+
return action.then(function (fn) {
|
|
5694
|
+
return fn.bind(null, formData);
|
|
5695
|
+
});
|
|
5696
5696
|
};
|
|
5697
5697
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
5698
5698
|
var keyPath = body.get("$ACTION_KEY");
|
|
5699
5699
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
5700
|
-
var
|
|
5700
|
+
var actionKey = null;
|
|
5701
5701
|
body.forEach(function (value, key) {
|
|
5702
|
-
key.startsWith("$ACTION_REF_") &&
|
|
5703
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
5704
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
5702
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
5705
5703
|
});
|
|
5706
|
-
if (null ===
|
|
5707
|
-
var
|
|
5708
|
-
|
|
5704
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
5705
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
5706
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
5707
|
+
var referenceId = body.id;
|
|
5708
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
5709
5709
|
return null === bound
|
|
5710
5710
|
? null
|
|
5711
5711
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -5756,7 +5756,7 @@
|
|
|
5756
5756
|
function error(reason) {
|
|
5757
5757
|
reportGlobalError(response$jscomp$0, reason);
|
|
5758
5758
|
"function" === typeof iterator.throw &&
|
|
5759
|
-
iterator.throw(reason).then(
|
|
5759
|
+
iterator.throw(reason).then(noop, noop);
|
|
5760
5760
|
}
|
|
5761
5761
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
5762
5762
|
response$jscomp$0 = createResponse(
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
"use strict";
|
|
12
12
|
var ReactDOM = require("react-dom"),
|
|
13
|
-
React = require("react")
|
|
14
|
-
|
|
13
|
+
React = require("react");
|
|
14
|
+
function noop() {}
|
|
15
|
+
var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
|
15
16
|
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
16
17
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
17
18
|
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
@@ -549,7 +550,6 @@ function createTemporaryReference(temporaryReferences, id) {
|
|
|
549
550
|
temporaryReferences.set(reference, id);
|
|
550
551
|
return reference;
|
|
551
552
|
}
|
|
552
|
-
function noop() {}
|
|
553
553
|
var SuspenseException = Error(
|
|
554
554
|
"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
|
|
555
555
|
);
|
|
@@ -1051,7 +1051,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1051
1051
|
erroredTask(request, streamTask, reason),
|
|
1052
1052
|
enqueueFlush(request),
|
|
1053
1053
|
"function" === typeof iterator.throw &&
|
|
1054
|
-
iterator.throw(reason).then(
|
|
1054
|
+
iterator.throw(reason).then(noop, noop));
|
|
1055
1055
|
}
|
|
1056
1056
|
function abortIterable() {
|
|
1057
1057
|
if (0 === streamTask.status) {
|
|
@@ -1065,7 +1065,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1065
1065
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1066
1066
|
enqueueFlush(request));
|
|
1067
1067
|
"function" === typeof iterator.throw &&
|
|
1068
|
-
iterator.throw(reason).then(
|
|
1068
|
+
iterator.throw(reason).then(noop, noop);
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
iterable = iterable === iterator;
|
|
@@ -3400,44 +3400,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3400
3400
|
};
|
|
3401
3401
|
exports.decodeAction = function (body, serverManifest) {
|
|
3402
3402
|
var formData = new FormData(),
|
|
3403
|
-
|
|
3404
|
-
seenActions = new Set();
|
|
3403
|
+
maybeActionKey = null;
|
|
3405
3404
|
body.forEach(function (value, key) {
|
|
3406
3405
|
key.startsWith("$ACTION_")
|
|
3407
3406
|
? key.startsWith("$ACTION_REF_")
|
|
3408
|
-
?
|
|
3409
|
-
|
|
3410
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3411
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3412
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3413
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3414
|
-
!seenActions.has(key) &&
|
|
3415
|
-
(seenActions.add(key),
|
|
3416
|
-
(value = key.slice(11)),
|
|
3417
|
-
(action = loadServerReference(serverManifest, {
|
|
3418
|
-
id: value,
|
|
3419
|
-
bound: null
|
|
3420
|
-
})))
|
|
3407
|
+
? (maybeActionKey = key)
|
|
3408
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3421
3409
|
: formData.append(key, value);
|
|
3422
3410
|
});
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3411
|
+
if (null === maybeActionKey) return null;
|
|
3412
|
+
var actionKey = maybeActionKey,
|
|
3413
|
+
action = null;
|
|
3414
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3415
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3416
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3417
|
+
(action = loadServerReference(serverManifest, body));
|
|
3418
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3419
|
+
(body = actionKey.slice(11)),
|
|
3420
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3421
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3422
|
+
return action.then(function (fn) {
|
|
3423
|
+
return fn.bind(null, formData);
|
|
3424
|
+
});
|
|
3428
3425
|
};
|
|
3429
3426
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3430
3427
|
var keyPath = body.get("$ACTION_KEY");
|
|
3431
3428
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3432
|
-
var
|
|
3429
|
+
var actionKey = null;
|
|
3433
3430
|
body.forEach(function (value, key) {
|
|
3434
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3435
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3436
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3431
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3437
3432
|
});
|
|
3438
|
-
if (null ===
|
|
3439
|
-
var
|
|
3440
|
-
|
|
3433
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3434
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3435
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3436
|
+
var referenceId = body.id;
|
|
3437
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3441
3438
|
return null === bound
|
|
3442
3439
|
? null
|
|
3443
3440
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -3487,7 +3484,7 @@ exports.decodeReplyFromAsyncIterable = function (
|
|
|
3487
3484
|
function error(reason) {
|
|
3488
3485
|
reportGlobalError(response, reason);
|
|
3489
3486
|
"function" === typeof iterator.throw &&
|
|
3490
|
-
iterator.throw(reason).then(
|
|
3487
|
+
iterator.throw(reason).then(noop, noop);
|
|
3491
3488
|
}
|
|
3492
3489
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
3493
3490
|
response = createResponse(
|
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
14
|
function voidHandler() {}
|
|
15
|
+
function noop() {}
|
|
15
16
|
function getIteratorFn(maybeIterable) {
|
|
16
17
|
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
17
18
|
return null;
|
|
@@ -573,7 +574,6 @@
|
|
|
573
574
|
temporaryReferences.set(reference, id);
|
|
574
575
|
return reference;
|
|
575
576
|
}
|
|
576
|
-
function noop() {}
|
|
577
577
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
578
578
|
index = thenableState[index];
|
|
579
579
|
void 0 === index
|
|
@@ -1501,7 +1501,7 @@
|
|
|
1501
1501
|
erroredTask(request, streamTask, reason),
|
|
1502
1502
|
enqueueFlush(request),
|
|
1503
1503
|
"function" === typeof iterator.throw &&
|
|
1504
|
-
iterator.throw(reason).then(
|
|
1504
|
+
iterator.throw(reason).then(noop, noop));
|
|
1505
1505
|
}
|
|
1506
1506
|
function abortIterable() {
|
|
1507
1507
|
if (0 === streamTask.status) {
|
|
@@ -1515,7 +1515,7 @@
|
|
|
1515
1515
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1516
1516
|
enqueueFlush(request));
|
|
1517
1517
|
"function" === typeof iterator.throw &&
|
|
1518
|
-
iterator.throw(reason).then(
|
|
1518
|
+
iterator.throw(reason).then(noop, noop);
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
var isIterator = iterable === iterator,
|
|
@@ -6294,44 +6294,44 @@
|
|
|
6294
6294
|
};
|
|
6295
6295
|
exports.decodeAction = function (body, serverManifest) {
|
|
6296
6296
|
var formData = new FormData(),
|
|
6297
|
-
|
|
6298
|
-
seenActions = new Set();
|
|
6297
|
+
maybeActionKey = null;
|
|
6299
6298
|
body.forEach(function (value, key) {
|
|
6300
6299
|
key.startsWith("$ACTION_")
|
|
6301
6300
|
? key.startsWith("$ACTION_REF_")
|
|
6302
|
-
?
|
|
6303
|
-
|
|
6304
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
6305
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
6306
|
-
(action = loadServerReference(serverManifest, value)))
|
|
6307
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
6308
|
-
!seenActions.has(key) &&
|
|
6309
|
-
(seenActions.add(key),
|
|
6310
|
-
(value = key.slice(11)),
|
|
6311
|
-
(action = loadServerReference(serverManifest, {
|
|
6312
|
-
id: value,
|
|
6313
|
-
bound: null
|
|
6314
|
-
})))
|
|
6301
|
+
? (maybeActionKey = key)
|
|
6302
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
6315
6303
|
: formData.append(key, value);
|
|
6316
6304
|
});
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6305
|
+
if (null === maybeActionKey) return null;
|
|
6306
|
+
var actionKey = maybeActionKey,
|
|
6307
|
+
action = null;
|
|
6308
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
6309
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
6310
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
6311
|
+
(action = loadServerReference(serverManifest, body));
|
|
6312
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
6313
|
+
(body = actionKey.slice(11)),
|
|
6314
|
+
(action = loadServerReference(serverManifest, {
|
|
6315
|
+
id: body,
|
|
6316
|
+
bound: null
|
|
6317
|
+
}));
|
|
6318
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
6319
|
+
return action.then(function (fn) {
|
|
6320
|
+
return fn.bind(null, formData);
|
|
6321
|
+
});
|
|
6322
6322
|
};
|
|
6323
6323
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
6324
6324
|
var keyPath = body.get("$ACTION_KEY");
|
|
6325
6325
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
6326
|
-
var
|
|
6326
|
+
var actionKey = null;
|
|
6327
6327
|
body.forEach(function (value, key) {
|
|
6328
|
-
key.startsWith("$ACTION_REF_") &&
|
|
6329
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
6330
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
6328
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
6331
6329
|
});
|
|
6332
|
-
if (null ===
|
|
6333
|
-
var
|
|
6334
|
-
|
|
6330
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
6331
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
6332
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
6333
|
+
var referenceId = body.id;
|
|
6334
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
6335
6335
|
return null === bound
|
|
6336
6336
|
? null
|
|
6337
6337
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -6374,7 +6374,7 @@
|
|
|
6374
6374
|
function error(reason) {
|
|
6375
6375
|
reportGlobalError(response, reason);
|
|
6376
6376
|
"function" === typeof iterator.throw &&
|
|
6377
|
-
iterator.throw(reason).then(
|
|
6377
|
+
iterator.throw(reason).then(noop, noop);
|
|
6378
6378
|
}
|
|
6379
6379
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
6380
6380
|
response = createResponse(
|
|
@@ -14,8 +14,9 @@ var stream = require("stream"),
|
|
|
14
14
|
require("crypto");
|
|
15
15
|
var async_hooks = require("async_hooks"),
|
|
16
16
|
ReactDOM = require("react-dom"),
|
|
17
|
-
React = require("react")
|
|
18
|
-
|
|
17
|
+
React = require("react");
|
|
18
|
+
function noop() {}
|
|
19
|
+
var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
|
19
20
|
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
20
21
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
21
22
|
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
@@ -575,7 +576,6 @@ function createTemporaryReference(temporaryReferences, id) {
|
|
|
575
576
|
temporaryReferences.set(reference, id);
|
|
576
577
|
return reference;
|
|
577
578
|
}
|
|
578
|
-
function noop() {}
|
|
579
579
|
var SuspenseException = Error(
|
|
580
580
|
"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
|
|
581
581
|
);
|
|
@@ -1074,7 +1074,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1074
1074
|
erroredTask(request, streamTask, reason),
|
|
1075
1075
|
enqueueFlush(request),
|
|
1076
1076
|
"function" === typeof iterator.throw &&
|
|
1077
|
-
iterator.throw(reason).then(
|
|
1077
|
+
iterator.throw(reason).then(noop, noop));
|
|
1078
1078
|
}
|
|
1079
1079
|
function abortIterable() {
|
|
1080
1080
|
if (0 === streamTask.status) {
|
|
@@ -1088,7 +1088,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1088
1088
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1089
1089
|
enqueueFlush(request));
|
|
1090
1090
|
"function" === typeof iterator.throw &&
|
|
1091
|
-
iterator.throw(reason).then(
|
|
1091
|
+
iterator.throw(reason).then(noop, noop);
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
iterable = iterable === iterator;
|
|
@@ -3480,44 +3480,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3480
3480
|
};
|
|
3481
3481
|
exports.decodeAction = function (body, serverManifest) {
|
|
3482
3482
|
var formData = new FormData(),
|
|
3483
|
-
|
|
3484
|
-
seenActions = new Set();
|
|
3483
|
+
maybeActionKey = null;
|
|
3485
3484
|
body.forEach(function (value, key) {
|
|
3486
3485
|
key.startsWith("$ACTION_")
|
|
3487
3486
|
? key.startsWith("$ACTION_REF_")
|
|
3488
|
-
?
|
|
3489
|
-
|
|
3490
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3491
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3492
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3493
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3494
|
-
!seenActions.has(key) &&
|
|
3495
|
-
(seenActions.add(key),
|
|
3496
|
-
(value = key.slice(11)),
|
|
3497
|
-
(action = loadServerReference(serverManifest, {
|
|
3498
|
-
id: value,
|
|
3499
|
-
bound: null
|
|
3500
|
-
})))
|
|
3487
|
+
? (maybeActionKey = key)
|
|
3488
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3501
3489
|
: formData.append(key, value);
|
|
3502
3490
|
});
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3491
|
+
if (null === maybeActionKey) return null;
|
|
3492
|
+
var actionKey = maybeActionKey,
|
|
3493
|
+
action = null;
|
|
3494
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3495
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3496
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3497
|
+
(action = loadServerReference(serverManifest, body));
|
|
3498
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3499
|
+
(body = actionKey.slice(11)),
|
|
3500
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3501
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3502
|
+
return action.then(function (fn) {
|
|
3503
|
+
return fn.bind(null, formData);
|
|
3504
|
+
});
|
|
3508
3505
|
};
|
|
3509
3506
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3510
3507
|
var keyPath = body.get("$ACTION_KEY");
|
|
3511
3508
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3512
|
-
var
|
|
3509
|
+
var actionKey = null;
|
|
3513
3510
|
body.forEach(function (value, key) {
|
|
3514
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3515
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3516
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3511
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3517
3512
|
});
|
|
3518
|
-
if (null ===
|
|
3519
|
-
var
|
|
3520
|
-
|
|
3513
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3514
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3515
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3516
|
+
var referenceId = body.id;
|
|
3517
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3521
3518
|
return null === bound
|
|
3522
3519
|
? null
|
|
3523
3520
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -3560,7 +3557,7 @@ exports.decodeReplyFromAsyncIterable = function (
|
|
|
3560
3557
|
function error(reason) {
|
|
3561
3558
|
reportGlobalError(response, reason);
|
|
3562
3559
|
"function" === typeof iterator.throw &&
|
|
3563
|
-
iterator.throw(reason).then(
|
|
3560
|
+
iterator.throw(reason).then(noop, noop);
|
|
3564
3561
|
}
|
|
3565
3562
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
3566
3563
|
response = createResponse(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-server-dom-webpack",
|
|
3
3
|
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
|
4
|
-
"version": "19.2.
|
|
4
|
+
"version": "19.2.8",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react"
|
|
7
7
|
],
|
|
8
8
|
"homepage": "https://react.dev/",
|
|
9
|
-
"bugs": "https://github.com/
|
|
9
|
+
"bugs": "https://github.com/react/react/issues",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"files": [
|
|
12
12
|
"LICENSE",
|
|
@@ -77,15 +77,15 @@
|
|
|
77
77
|
"main": "index.js",
|
|
78
78
|
"repository": {
|
|
79
79
|
"type": "git",
|
|
80
|
-
"url": "https://github.com/
|
|
80
|
+
"url": "https://github.com/react/react.git",
|
|
81
81
|
"directory": "packages/react-server-dom-webpack"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=0.10.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"react": "^19.2.
|
|
88
|
-
"react-dom": "^19.2.
|
|
87
|
+
"react": "^19.2.8",
|
|
88
|
+
"react-dom": "^19.2.8",
|
|
89
89
|
"webpack": "^5.59.0"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-rsc",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.30",
|
|
4
4
|
"description": "React Server Components (RSC) support for Vite.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@vitejs/test-dep-cjs-and-esm": "./test-dep/cjs-and-esm",
|
|
61
61
|
"@vitejs/test-dep-cjs-falsy-primitive": "./test-dep/cjs-falsy-primitive",
|
|
62
62
|
"picocolors": "^1.1.1",
|
|
63
|
-
"react": "^19.2.
|
|
64
|
-
"react-dom": "^19.2.
|
|
65
|
-
"react-server-dom-webpack": "^19.2.
|
|
63
|
+
"react": "^19.2.8",
|
|
64
|
+
"react-dom": "^19.2.8",
|
|
65
|
+
"react-server-dom-webpack": "^19.2.8",
|
|
66
66
|
"tinyexec": "^1.2.4",
|
|
67
67
|
"tsdown": "^0.22.7"
|
|
68
68
|
},
|
package/dist/rsc-CGkkhLG3.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { l as ModuleMap, t as BundlerConfig } from "./index-CqNlZcWp.js";
|
|
2
|
-
//#region src/core/rsc.d.ts
|
|
3
|
-
declare function setRequireModule(options: {
|
|
4
|
-
load: (id: string) => unknown;
|
|
5
|
-
}): void;
|
|
6
|
-
declare function loadServerAction(id: string): Promise<Function>;
|
|
7
|
-
declare function createServerManifest(options?: {
|
|
8
|
-
preserveServerReferences?: boolean;
|
|
9
|
-
}): BundlerConfig;
|
|
10
|
-
declare function createServerDecodeClientManifest(): ModuleMap;
|
|
11
|
-
declare function createClientManifest(options?: {
|
|
12
|
-
/**
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
onClientReference?: (metadata: {
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
}) => void;
|
|
19
|
-
}): BundlerConfig;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { setRequireModule as a, loadServerAction as i, createServerDecodeClientManifest as n, createServerManifest as r, createClientManifest as t };
|