import { Viewer, DocumentGate } from '@embedpdf/react/runtime'; import type { OpenInput } from '@embedpdf/react/runtime'; import { Stage, stagePlugin, useStage, useStageState } from '@embedpdf/react/stage'; import { RenderLayer, renderPlugin } from '@embedpdf/react/render'; import { cloudEngine } from '@cloudpdf/engine'; import './deep-zoom.css'; const engine = cloudEngine(); // Open at 250%: past what a whole-page picture shows sharply, so tiles carry it. const plugins = [stagePlugin({ zoom: { level: 2.5 } }), renderPlugin()]; const welcome: OpenInput = { kind: 'grant', grant: 'shr_gvpJcG1ULUMon19C0D1wODSY' }; function ZoomBar() { const stage = useStage(); const zoomLevel = useStageState((state) => state.zoomLevel); return (
{Math.round(zoomLevel * 100)}%
); } export default function App() { return ( Loading…

}> {() => }
); }