import { CanvasPane, DOT_GRID } from '@agent/components/Canvas'; import { usePortal } from '@agent/hooks/usePortal'; import { createPortal } from '@wordpress/element'; import { motion } from 'framer-motion'; const CHAT_WIDTH = 384; const MODAL_SIZE = { width: 1024, height: 720, maxWidth: 'calc(100vw - 8rem)', maxHeight: 'calc(100vh - 8rem)', }; // The canvas owns the scrim and the close control, so this only clears the scrim. export const CanvasModalLayout = ({ children }) => { const mountNode = usePortal('extendify-agent-canvas-modal-mount'); if (!mountNode) return null; return createPortal(