import { ContentItem, PopupModal } from '../../schema/index.ts'; import { DropEdge } from '../../dragSort'; import { CardPreview } from '../../cardResize'; import { CanvasClick } from '../editorPanel'; import { EmbedSnippet } from './PublishPopover'; export declare function PreviewPane({ popup, onPublish, embedSnippet, onUrlsChange, onItemActivate, selectedId, onItemEdit, onItemReorder, canvasRef, dropHint, onItemResize, onSpacerResize, onCardResize, onItemRemove, pinnedItemIds, onModeChange, onOpenPicker, onOpenCard, onCanvasClick, onUndo, onRedo, canUndo, canRedo, activeStep, onStepChange, onAddStep, onRemoveStep, onStepLabelEdit, }: { popup: PopupModal; onPublish?: (popup: PopupModal) => void; /** The host's embed markup for the post-publish popover. See EmbedSnippet. */ embedSnippet?: EmbedSnippet; /** Edits the form's `urls` from inside that popover. */ onUrlsChange?: (urls: string[] | undefined) => void; /** Clicking a rendered field asks the builder to select it (null = clear). */ onItemActivate?: (id: string | null) => void; /** The item the editor has selected — outlined in the canvas. */ selectedId?: string | null; /** A text edit made straight in the canvas. */ onItemEdit?: (id: string, patch: Partial) => void; /** A canvas drag dropped one item on `edge` of another — beside it, or on its own line. See DropEdge. */ onItemReorder?: (draggedId: string, targetId: string, edge: DropEdge) => void; /** Lends the canvas body out, so an element dragged in from the sidebar picker can be aimed at the fields rendered on it. */ canvasRef?: (el: HTMLElement | null) => void; /** Where such an element would land right now, for the canvas to draw. */ dropHint?: { overId: string | null; edge: DropEdge | null; } | null; /** A canvas resize settled the submit button on `width` percent of the body. */ onItemResize?: (id: string, width: number) => void; /** A canvas drag settled a spacer's gap at `height` px. */ onSpacerResize?: (id: string, height: number) => void; /** A canvas drag settled the card's width, height, padding or rounding. */ onCardResize?: (patch: CardPreview) => void; /** Deletes an item from its own toolbar in the canvas. */ onItemRemove?: (id: string) => void; /** The items the host pinned to every form: no delete tool on those. */ pinnedItemIds?: readonly string[]; /** Reports the canvas mode so the host can give the form the whole width. */ onModeChange?: (mode: 'edit' | 'preview') => void; /** Opens the field picker in the settings column. Without it, no Add button shows. */ onOpenPicker?: () => void; /** * Opens the card's design panel. A pointer gets there by clicking the card, * which leaves a keyboard nothing to press, so this drives the canvas's own * route to it. Without it that route isn't drawn. */ onOpenCard?: () => void; /** * Every click on the canvas, described as a gesture so the editor can decide * whether it dismisses an open panel. See closesOnCanvasClick, which holds * that decision; this pane only reports what happened. */ onCanvasClick?: (click: CanvasClick) => void; /** Step the form back and forward through the edit history. */ onUndo?: () => void; onRedo?: () => void; canUndo?: boolean; canRedo?: boolean; /** * Step form: which screen the canvas is showing, and the ways to move * between them. The host owns the step because an add has to land on it and * selecting a field has to jump to it, both of which happen outside this * pane. Without `onStepChange` no rail is drawn. */ activeStep?: number; onStepChange?: (index: number) => void; onAddStep?: () => void; onRemoveStep?: (index: number) => void; /** Commits a Next/Back label typed straight into the button on the canvas. */ onStepLabelEdit?: (patch: { nextLabel?: string; backLabel?: string; }) => void; }): import("react").JSX.Element;