partial-react 0.0.4 → 0.0.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.
- package/package.json +3 -3
- package/src/runtime.ts +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "partial-react",
|
|
3
3
|
"description": "A state-preserving renderer for prefix-growing streaming React/TSX.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"partial-tsx": "0.0.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"react": "^19.0.0",
|
|
28
|
-
"react-dom": "^19.0.0"
|
|
27
|
+
"react": "^18.3.0 || ^19.0.0",
|
|
28
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false
|
|
31
31
|
}
|
package/src/runtime.ts
CHANGED
|
@@ -422,7 +422,8 @@ export class GenUIRenderer {
|
|
|
422
422
|
createElement(
|
|
423
423
|
RuntimeErrorBoundary,
|
|
424
424
|
{ key: preserve ? getPreserveBoundaryKey(this.preserveBoundaryEpoch) : `boundary:${this.renderRound}`, resetKey: this.errorEpoch, onError: onRenderError },
|
|
425
|
-
|
|
425
|
+
// The cast wraps the whole ternary: @types/react 18 rejects the slot's `Promise<ReactNode>` return, and we ship raw .ts to 18.3 peers.
|
|
426
|
+
createElement(GenUIRenderContext.Provider, { value: renderContext }, createElement((preserve ? this.slot.Component : renderedComponent) as ComponentType<Record<string, unknown>>, { key: "generated-component" })),
|
|
426
427
|
createElement(RenderNotify, {
|
|
427
428
|
key: `render-notify:${this.renderRound}`,
|
|
428
429
|
onCommit: () => {
|