import { Viewer, DocumentGate } from '@embedpdf/react/runtime'; import type { OpenInput } from '@embedpdf/react/runtime'; import { Stage, stagePlugin } from '@embedpdf/react/stage'; import { RenderLayer, renderPlugin } from '@embedpdf/react/render'; import { cloudEngine } from '@cloudpdf/engine'; // The engine is created synchronously and costs nothing until first use, so // a module-scope `const engine = …` is safe, even under SSR. Only opening a // document does real work: the UI renders at t≈0. const engine = cloudEngine(); const plugins = [stagePlugin(), renderPlugin()]; const welcome: OpenInput = { kind: 'grant', grant: 'shr_gvpJcG1ULUMon19C0D1wODSY' }; export default function App() { return (
{/* Document UI is defined over a document: gate it on having one. */} Loading…

}> {() => }
); }