import * as React from 'react'; interface View { x: number; y: number; scale: number; } /** * The view that shows the whole diagram, centred. * * A schema of any size is bigger than the panel, so opening at 1:1 in the * top-left corner shows a corner of one box and reads as broken. Never zooms * *in* past 1:1 - a two-box schema blown up to fill the screen looks like a * mistake too. */ export declare const fitView: (content: { width: number; height: number; }, viewport: { width: number; height: number; }, padding?: number) => View; /** * Pan and zoom over a diagram the server drew. * * The whole of the interactivity, in one file and with no graph library. That * is the point: every plugin this replaces pulled in a React canvas library to * get dragging, and then broke when React, styled-components or Strapi moved * under it. Panning is a translate, zooming is a scale about the pointer, and * clicking a box is one delegated listener reading the `data-uid` the renderer * already puts on every box. */ export declare const Canvas: ({ svg, onOpen, view, onViewChange, fitTo, refit, }: { svg: string; onOpen: (uid: string) => void; view: View; onViewChange: (view: View) => void; /** Diagram extent. When it changes, the view is fitted to it. */ fitTo: { width: number; height: number; }; /** Bump to refit on demand - what the "Reset view" button changes. */ refit: number; }) => React.JSX.Element; export declare const INITIAL_VIEW: View; export type { View };