import { useState } from 'react'; 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 { interactionPlugin } from '@embedpdf/react/interaction'; import { AnnotationLayer, annotationPlugin } from '@embedpdf/react/annotation'; import { cloudEngine } from '@cloudpdf/engine'; import './annotations.css'; const engine = cloudEngine(); const plugins = [stagePlugin(), renderPlugin(), interactionPlugin(), annotationPlugin()]; const report: OpenInput = { kind: 'grant', grant: 'shr__TWhIGdJtaKlcnVgJdg--bcm' }; type Painter = 'picture' | 'layer'; export default function App() { const [painter, setPainter] = useState('picture'); return ( Loading…

}>

{painter === 'picture' ? 'Part of the picture: it can’t be picked up.' : 'Left out of the picture: click it, then drag it.'}

{() => painter === 'picture' ? ( ) : ( <> ) }
); }