@makeswift/hono-react 0.1.5-canary.3 → 0.1.5-canary.5
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.
|
@@ -29,12 +29,7 @@ async function renderHtml(children, { cacheKey, enableCssReset, ...renderOptions
|
|
|
29
29
|
const getStyles = () => (0, import_unstable_framework_support.styleTagHtml)({ cacheKey: cache.key, ...cache.flush() });
|
|
30
30
|
const html = await (0, import_server.renderToReadableStream)(
|
|
31
31
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_unstable_framework_support.RootStyleRegistry, { cache, enableCssReset, children }),
|
|
32
|
-
{
|
|
33
|
-
...renderOptions,
|
|
34
|
-
onError(error) {
|
|
35
|
-
throw Error(`Server-side rendering error: ${error}`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
32
|
+
{ ...renderOptions }
|
|
38
33
|
);
|
|
39
34
|
return { html, getStyles };
|
|
40
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/render.tsx"],"sourcesContent":["import {\n renderToReadableStream,\n type ReactDOMServerReadableStream,\n type RenderToPipeableStreamOptions,\n} from 'react-dom/server'\n\nimport { type ReactNode } from 'react'\n\nimport {\n createRootStyleCache,\n RootStyleRegistry,\n styleTagHtml,\n type RootStyleProps,\n} from '@makeswift/runtime/unstable-framework-support'\n\ntype RenderOptions = RootStyleProps &\n Pick<\n RenderToPipeableStreamOptions,\n | 'identifierPrefix'\n | 'namespaceURI'\n | 'nonce'\n | 'bootstrapScriptContent'\n | 'bootstrapScripts'\n | 'bootstrapModules'\n | 'progressiveChunkSize'\n >\n\nexport async function renderHtml(\n children: ReactNode,\n { cacheKey, enableCssReset, ...renderOptions }: RenderOptions = {},\n): Promise<{ getStyles: () => string; html: ReactDOMServerReadableStream }> {\n const cache = createRootStyleCache({ key: cacheKey })\n const getStyles = () => styleTagHtml({ cacheKey: cache.key, ...cache.flush() })\n\n const html = await renderToReadableStream(\n <RootStyleRegistry cache={cache} enableCssReset={enableCssReset}>\n {children}\n </RootStyleRegistry>,\n {
|
|
1
|
+
{"version":3,"sources":["../../../src/server/render.tsx"],"sourcesContent":["import {\n renderToReadableStream,\n type ReactDOMServerReadableStream,\n type RenderToPipeableStreamOptions,\n} from 'react-dom/server'\n\nimport { type ReactNode } from 'react'\n\nimport {\n createRootStyleCache,\n RootStyleRegistry,\n styleTagHtml,\n type RootStyleProps,\n} from '@makeswift/runtime/unstable-framework-support'\n\ntype RenderOptions = RootStyleProps &\n Pick<\n RenderToPipeableStreamOptions,\n | 'identifierPrefix'\n | 'namespaceURI'\n | 'nonce'\n | 'bootstrapScriptContent'\n | 'bootstrapScripts'\n | 'bootstrapModules'\n | 'progressiveChunkSize'\n | 'onError'\n >\n\nexport async function renderHtml(\n children: ReactNode,\n { cacheKey, enableCssReset, ...renderOptions }: RenderOptions = {},\n): Promise<{ getStyles: () => string; html: ReactDOMServerReadableStream }> {\n const cache = createRootStyleCache({ key: cacheKey })\n const getStyles = () => styleTagHtml({ cacheKey: cache.key, ...cache.flush() })\n\n const html = await renderToReadableStream(\n <RootStyleRegistry cache={cache} enableCssReset={enableCssReset}>\n {children}\n </RootStyleRegistry>,\n { ...renderOptions },\n )\n\n return { html, getStyles }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoCI;AApCJ,oBAIO;AAIP,wCAKO;AAeP,eAAsB,WACpB,UACA,EAAE,UAAU,gBAAgB,GAAG,cAAc,IAAmB,CAAC,GACS;AAC1E,QAAM,YAAQ,wDAAqB,EAAE,KAAK,SAAS,CAAC;AACpD,QAAM,YAAY,UAAM,gDAAa,EAAE,UAAU,MAAM,KAAK,GAAG,MAAM,MAAM,EAAE,CAAC;AAE9E,QAAM,OAAO,UAAM;AAAA,IACjB,4CAAC,uDAAkB,OAAc,gBAC9B,UACH;AAAA,IACA,EAAE,GAAG,cAAc;AAAA,EACrB;AAEA,SAAO,EAAE,MAAM,UAAU;AAC3B;","names":[]}
|
|
@@ -12,12 +12,7 @@ async function renderHtml(children, { cacheKey, enableCssReset, ...renderOptions
|
|
|
12
12
|
const getStyles = () => styleTagHtml({ cacheKey: cache.key, ...cache.flush() });
|
|
13
13
|
const html = await renderToReadableStream(
|
|
14
14
|
/* @__PURE__ */ jsx(RootStyleRegistry, { cache, enableCssReset, children }),
|
|
15
|
-
{
|
|
16
|
-
...renderOptions,
|
|
17
|
-
onError(error) {
|
|
18
|
-
throw Error(`Server-side rendering error: ${error}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
15
|
+
{ ...renderOptions }
|
|
21
16
|
);
|
|
22
17
|
return { html, getStyles };
|
|
23
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/render.tsx"],"sourcesContent":["import {\n renderToReadableStream,\n type ReactDOMServerReadableStream,\n type RenderToPipeableStreamOptions,\n} from 'react-dom/server'\n\nimport { type ReactNode } from 'react'\n\nimport {\n createRootStyleCache,\n RootStyleRegistry,\n styleTagHtml,\n type RootStyleProps,\n} from '@makeswift/runtime/unstable-framework-support'\n\ntype RenderOptions = RootStyleProps &\n Pick<\n RenderToPipeableStreamOptions,\n | 'identifierPrefix'\n | 'namespaceURI'\n | 'nonce'\n | 'bootstrapScriptContent'\n | 'bootstrapScripts'\n | 'bootstrapModules'\n | 'progressiveChunkSize'\n >\n\nexport async function renderHtml(\n children: ReactNode,\n { cacheKey, enableCssReset, ...renderOptions }: RenderOptions = {},\n): Promise<{ getStyles: () => string; html: ReactDOMServerReadableStream }> {\n const cache = createRootStyleCache({ key: cacheKey })\n const getStyles = () => styleTagHtml({ cacheKey: cache.key, ...cache.flush() })\n\n const html = await renderToReadableStream(\n <RootStyleRegistry cache={cache} enableCssReset={enableCssReset}>\n {children}\n </RootStyleRegistry>,\n {
|
|
1
|
+
{"version":3,"sources":["../../../src/server/render.tsx"],"sourcesContent":["import {\n renderToReadableStream,\n type ReactDOMServerReadableStream,\n type RenderToPipeableStreamOptions,\n} from 'react-dom/server'\n\nimport { type ReactNode } from 'react'\n\nimport {\n createRootStyleCache,\n RootStyleRegistry,\n styleTagHtml,\n type RootStyleProps,\n} from '@makeswift/runtime/unstable-framework-support'\n\ntype RenderOptions = RootStyleProps &\n Pick<\n RenderToPipeableStreamOptions,\n | 'identifierPrefix'\n | 'namespaceURI'\n | 'nonce'\n | 'bootstrapScriptContent'\n | 'bootstrapScripts'\n | 'bootstrapModules'\n | 'progressiveChunkSize'\n | 'onError'\n >\n\nexport async function renderHtml(\n children: ReactNode,\n { cacheKey, enableCssReset, ...renderOptions }: RenderOptions = {},\n): Promise<{ getStyles: () => string; html: ReactDOMServerReadableStream }> {\n const cache = createRootStyleCache({ key: cacheKey })\n const getStyles = () => styleTagHtml({ cacheKey: cache.key, ...cache.flush() })\n\n const html = await renderToReadableStream(\n <RootStyleRegistry cache={cache} enableCssReset={enableCssReset}>\n {children}\n </RootStyleRegistry>,\n { ...renderOptions },\n )\n\n return { html, getStyles }\n}\n"],"mappings":"AAoCI;AApCJ;AAAA,EACE;AAAA,OAGK;AAIP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAeP,eAAsB,WACpB,UACA,EAAE,UAAU,gBAAgB,GAAG,cAAc,IAAmB,CAAC,GACS;AAC1E,QAAM,QAAQ,qBAAqB,EAAE,KAAK,SAAS,CAAC;AACpD,QAAM,YAAY,MAAM,aAAa,EAAE,UAAU,MAAM,KAAK,GAAG,MAAM,MAAM,EAAE,CAAC;AAE9E,QAAM,OAAO,MAAM;AAAA,IACjB,oBAAC,qBAAkB,OAAc,gBAC9B,UACH;AAAA,IACA,EAAE,GAAG,cAAc;AAAA,EACrB;AAEA,SAAO,EAAE,MAAM,UAAU;AAC3B;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactDOMServerReadableStream, type RenderToPipeableStreamOptions } from 'react-dom/server';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { type RootStyleProps } from '@makeswift/runtime/unstable-framework-support';
|
|
4
|
-
type RenderOptions = RootStyleProps & Pick<RenderToPipeableStreamOptions, 'identifierPrefix' | 'namespaceURI' | 'nonce' | 'bootstrapScriptContent' | 'bootstrapScripts' | 'bootstrapModules' | 'progressiveChunkSize'>;
|
|
4
|
+
type RenderOptions = RootStyleProps & Pick<RenderToPipeableStreamOptions, 'identifierPrefix' | 'namespaceURI' | 'nonce' | 'bootstrapScriptContent' | 'bootstrapScripts' | 'bootstrapModules' | 'progressiveChunkSize' | 'onError'>;
|
|
5
5
|
export declare function renderHtml(children: ReactNode, { cacheKey, enableCssReset, ...renderOptions }?: RenderOptions): Promise<{
|
|
6
6
|
getStyles: () => string;
|
|
7
7
|
html: ReactDOMServerReadableStream;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/server/render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EACnC,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,+CAA+C,CAAA;AAEtD,KAAK,aAAa,GAAG,cAAc,GACjC,IAAI,CACF,6BAA6B,EAC3B,kBAAkB,GAClB,cAAc,GACd,OAAO,GACP,wBAAwB,GACxB,kBAAkB,GAClB,kBAAkB,GAClB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/server/render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EACnC,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,+CAA+C,CAAA;AAEtD,KAAK,aAAa,GAAG,cAAc,GACjC,IAAI,CACF,6BAA6B,EAC3B,kBAAkB,GAClB,cAAc,GACd,OAAO,GACP,wBAAwB,GACxB,kBAAkB,GAClB,kBAAkB,GAClB,sBAAsB,GACtB,SAAS,CACZ,CAAA;AAEH,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,SAAS,EACnB,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,GAAE,aAAkB,GACjE,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,MAAM,CAAC;IAAC,IAAI,EAAE,4BAA4B,CAAA;CAAE,CAAC,CAY1E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makeswift/hono-react",
|
|
3
|
-
"version": "0.1.5-canary.
|
|
3
|
+
"version": "0.1.5-canary.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "makeswift/makeswift",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"cookie": "^1.0.2",
|
|
31
|
-
"@makeswift/runtime": "0.28.3-canary.
|
|
31
|
+
"@makeswift/runtime": "0.28.3-canary.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@types/react": "^19.0.0",
|