veryfront 0.1.725 → 0.1.726
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/esm/deno.js +1 -1
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts +2 -1
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts +2 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.js +1 -3
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts +2 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.js +1 -3
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as React from "../../../../react/react.js";
|
|
2
2
|
import type { ClientComponentMeta } from "../types.js";
|
|
3
|
-
export type
|
|
3
|
+
export type RSCComponentProps = Record<string, unknown>;
|
|
4
|
+
export type RSCComponent = React.ComponentType<RSCComponentProps> & {
|
|
4
5
|
__rsc_client?: boolean;
|
|
5
6
|
__rsc_id?: string;
|
|
6
7
|
__rsc_path?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-detector.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/rsc/server-renderer/component-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"component-detector.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/rsc/server-renderer/component-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG;IAClE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,YAAY,EACvB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAC/C,OAAO,CAWT;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,CAE9D;AAED,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,YAAY,EACvB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAChD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,IAAI,CAQN"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type * as React from "../../../../react/react.js";
|
|
2
2
|
import type { RSCPayload, RSCRendererOptions } from "../types.js";
|
|
3
|
+
import type { RSCComponentProps } from "./component-detector.js";
|
|
3
4
|
export declare class RSCRenderer {
|
|
4
5
|
private clientManifest;
|
|
5
6
|
private mode;
|
|
6
7
|
private clientRefs;
|
|
7
8
|
constructor(options: RSCRendererOptions);
|
|
8
|
-
renderToPayload(Component: React.ComponentType<
|
|
9
|
+
renderToPayload<Props extends RSCComponentProps = RSCComponentProps>(Component: React.ComponentType<Props> | React.ReactElement, props?: Props): Promise<RSCPayload>;
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=rsc-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rsc-renderer.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/rsc/server-renderer/rsc-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAGzD,OAAO,KAAK,EAAuB,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"rsc-renderer.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/rsc/server-renderer/rsc-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAGzD,OAAO,KAAK,EAAuB,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAMjE,qBAAa,WAAW;IACtB,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,IAAI,CAA+B;IAC3C,OAAO,CAAC,UAAU,CAA6B;gBAEnC,OAAO,EAAE,kBAAkB;IAKvC,eAAe,CAAC,KAAK,SAAS,iBAAiB,GAAG,iBAAiB,EACjE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,YAAY,EAC1D,KAAK,GAAE,KAAmB,GACzB,OAAO,CAAC,UAAU,CAAC;CAuBvB"}
|
|
@@ -11,9 +11,7 @@ export class RSCRenderer {
|
|
|
11
11
|
this.clientManifest = options.clientManifest;
|
|
12
12
|
this.mode = options.mode ?? "development";
|
|
13
13
|
}
|
|
14
|
-
renderToPayload(
|
|
15
|
-
// deno-lint-ignore no-explicit-any -- RSC components accept arbitrary props at runtime
|
|
16
|
-
Component, props = {}) {
|
|
14
|
+
renderToPayload(Component, props = {}) {
|
|
17
15
|
return withSpan("rsc.renderToPayload", async () => {
|
|
18
16
|
this.clientRefs.clear();
|
|
19
17
|
try {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "../../../../react/react.js";
|
|
2
2
|
import type { ClientComponentMeta, RSCNode } from "../types.js";
|
|
3
|
+
import { type RSCComponentProps } from "./component-detector.js";
|
|
3
4
|
/** Recursively renders a component tree to RSC nodes */
|
|
4
|
-
export declare function renderTree(Component: React.ComponentType<
|
|
5
|
+
export declare function renderTree<Props extends RSCComponentProps = RSCComponentProps>(Component: React.ComponentType<Props> | React.ReactElement | string | number | null | undefined, props: Props, clientManifest: Map<string, ClientComponentMeta>, clientRefs: Map<string, string>): Promise<RSCNode>;
|
|
5
6
|
/** Processes a React element into RSC node representation */
|
|
6
7
|
export declare function processElement(element: React.ReactElement, clientManifest: Map<string, ClientComponentMeta>, clientRefs: Map<string, string>): Promise<RSCNode>;
|
|
7
8
|
export declare function renderChildren(children: React.ReactNode, clientManifest: Map<string, ClientComponentMeta>, clientRefs: Map<string, string>): Promise<RSCNode[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-processor.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/rsc/server-renderer/tree-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAGpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tree-processor.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/rsc/server-renderer/tree-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAGpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAMjC,wDAAwD;AACxD,wBAAsB,UAAU,CAAC,KAAK,SAAS,iBAAiB,GAAG,iBAAiB,EAClF,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/F,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAChD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,OAAO,CAAC,CAuClB;AAED,6DAA6D;AAC7D,wBAAsB,cAAc,CAClC,OAAO,EAAE,KAAK,CAAC,YAAY,EAC3B,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAChD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,OAAO,CAAC,CA4ClB;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAChD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,OAAO,EAAE,CAAC,CAYpB"}
|
|
@@ -6,9 +6,7 @@ import { escapeHtml, renderAttributes, treeToHTML } from "./html-generator.js";
|
|
|
6
6
|
import { serializeProps } from "./prop-serializer.js";
|
|
7
7
|
const logger = serverLogger.component("rsc");
|
|
8
8
|
/** Recursively renders a component tree to RSC nodes */
|
|
9
|
-
export async function renderTree(
|
|
10
|
-
// deno-lint-ignore no-explicit-any -- RSC components accept arbitrary props at runtime
|
|
11
|
-
Component, props, clientManifest, clientRefs) {
|
|
9
|
+
export async function renderTree(Component, props, clientManifest, clientRefs) {
|
|
12
10
|
if (Component == null || typeof Component === "string" || typeof Component === "number") {
|
|
13
11
|
return { type: "html", html: Component == null ? "" : escapeHtml(String(Component)) };
|
|
14
12
|
}
|