Skip to content

Commit

Permalink
Expose unstable_Viewer (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarlagerlof authored May 21, 2024
1 parent 77350bc commit 61a3d5a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .changeset/chatty-chicken-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@rsc-parser/embedded-example": minor
"@rsc-parser/chrome-extension": minor
"@rsc-parser/core": minor
"@rsc-parser/embedded": minor
"@rsc-parser/storybook": minor
"@rsc-parser/website": minor
---

Expose `unstable_Viewer`
2 changes: 1 addition & 1 deletion packages/core/src/components/ViewerPayload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function ViewerPayload({ defaultPayload }: { defaultPayload: string }) {
);
}

function Viewer({ payload }: { payload: string }) {
export function Viewer({ payload }: { payload: string }) {
const messages = [
{
type: "RSC_CHUNK",
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { RscChunkMessage } from "./types";
import { ViewerPayload } from "./components/ViewerPayload";
import {
ViewerPayload,
Viewer as unstable_Viewer,
} from "./components/ViewerPayload";
import { ViewerStreams } from "./components/ViewerStreams";
import { ViewerStreamsEmptyState } from "./components/ViewerStreamsEmptyState";
import { Logo } from "./components/Logo";
Expand All @@ -18,6 +21,7 @@ import { createFlightResponse as unstable_createFlightResponse } from "./createF
export {
type RscChunkMessage,
ViewerPayload,
unstable_Viewer,
ViewerStreams,
ViewerStreamsEmptyState,
Logo,
Expand Down

0 comments on commit 61a3d5a

Please sign in to comment.