import { ReactPortal } from 'react'; import type { AppState, BinaryFiles, LibraryItems } from '@excalidraw/excalidraw/dist/types/excalidraw/types'; import '@excalidraw/excalidraw/index.css'; export type ExcalidrawElementFragment = { isDeleted?: boolean; }; type Props = { closeOnClickOutside?: boolean; /** * The initial set of elements to draw into the scene */ initialElements: ReadonlyArray; /** * The initial set of elements to draw into the scene */ initialAppState: AppState; /** * The initial set of files to draw into the scene */ initialFiles: BinaryFiles; /** * The initial set of library items to draw into the scene */ initialLibraryItems?: LibraryItems; /** * Controls the visibility of the modal */ isShown?: boolean; /** * Callback when closing and discarding the new changes */ onClose: () => void; /** * Completely remove Excalidraw component */ onDelete: () => void; /** * Callback when the save button is clicked */ onSave: (elements: ReadonlyArray, appState: Partial, files: BinaryFiles) => void; readonly?: boolean; }; /** * @explorer-desc * A component which renders a modal with Excalidraw (a painting app) * which can be used to export an editable image */ export default function ExcalidrawModal({ closeOnClickOutside, onSave, initialElements, initialAppState, initialFiles, initialLibraryItems, isShown, onDelete, onClose, readonly, }: Props): ReactPortal | null; export {};