import build from "https://esm.sh/build";
const ret = await build({
dependencies: {
"react-dom": "18.3.1",
"react": "18.3.1",
"tldraw": "2.3.0",
},
source: `
export * as ReactDOM from "react-dom";
export * as React from "react";
export * as tldraw from "tldraw"
`,
});
const {
ReactDOM,
React,
tldraw,
} = await import(ret.url + "?bundle-deps");
export function App() {
return (
<>
<div style={{ position: "absolute", inset: 0 }}>
<tldraw.Tldraw persistenceKey="valtown_reacttldrawclient" cameraOptions={{ wheelBehavior: "zoom" }} />
</div>
</>
);
}
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App />);