mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
p2 (Pi Mobile on Chord v2) moves from pi-private into pi as one commit. Root scripts that loop all workspaces use --if-present; npm test, ./test.sh and the release script cover packages/* only (p2: cd apps/p2 && npm test); sync-versions also updates apps' workspace pins.
17 lines
746 B
TypeScript
17 lines
746 B
TypeScript
// Browser-only component fixture, bundled by `Browser.loadFixture` into a disposable localhost page: one conversation
|
|
// view, rendered.
|
|
import type { ConversationView } from "@earendil-works/pi-durable";
|
|
import { createElement } from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
import { buildTranscript } from "../../src/web/transcript.ts";
|
|
import { TranscriptFixture } from "./transcript.ts";
|
|
import { wholeView } from "./whole-view.ts";
|
|
|
|
const element = document.createElement("div");
|
|
document.body.replaceChildren(element);
|
|
const root = createRoot(element);
|
|
Object.assign(window, {
|
|
showCodemode(view: ConversationView) {
|
|
root.render(createElement(TranscriptFixture, { transcript: buildTranscript(wholeView(view)) }));
|
|
},
|
|
});
|