import type { SelectModeBoundingRect, DisplayMode, SelectModeSelectionType, SelectModeOptimisticUpdatePayload, SelectModeFormatCommand, SelectableData, SelectModeHoverRect, SelectModeClickPosition, SelectModeSelectionRect, SelectModeTiptapActiveMarks } from "./selectMode"; export type InlineEditFeedback = { status: "pending" | "unavailable" | "failed"; rect: SelectModeBoundingRect; }; export type IframeRuntimeBuildMetadata = { packageName: string; version: string; branch: string | null; commit: string | null; builtAt: string | null; capabilities?: string[]; }; export type SectionCanvasSection = { index: number; startLine: number; endLine: number; label: string; isLocked: boolean; }; export type SectionCanvasState = { pageFilePath: string; sections: SectionCanvasSection[]; previewScale: number; isDisabled: boolean; insertingAt?: number | null; occludedInsets?: { left: number; right: number; } | null; }; export type SectionCanvasRequest = { type: "insert"; at: number; } | { type: "move"; moveId: string; index: number; to: number; } | { type: "remove"; index: number; } | { type: "undo"; } | { type: "redo"; } | { type: "cancelInsert"; }; export type SectionCanvasLayoutEntry = { index: number; startLine: number; endLine: number; rect: SelectModeBoundingRect; }; export type SelectModeParentMessage = { method: "expandToSection"; data: { targetSelector: string; }; } | { method: "setSectionPreview"; data: { targetSelector: string | null; }; } | { method: "setDisplayMode"; data: { displayMode: DisplayMode; }; } | { method: "setSelectionType"; data: { selectionType: SelectModeSelectionType; selectors?: string[]; }; } | { method: "applyOptimisticUpdate"; data: { editId: string; payload: SelectModeOptimisticUpdatePayload; targetSelector: string; targetMode: "primary" | "group"; }; } | { method: "markCommitted"; data: { editId: string; sessionId: string; }; } | { method: "resolveSessionOverrides"; data: { sessionId: string; outcome: "persisted" | "failed"; }; } | { method: "revertOverride"; data: { editId: string; }; } | { method: "enterEditMode"; } | { method: "exitEditMode"; } | { method: "formatCommand"; data: { command: SelectModeFormatCommand; }; }; export type SelectModeIframeMessage = { method: "iframeReady"; data: IframeRuntimeBuildMetadata; } | { method: "elementSelected"; data: { data: SelectableData; }; } | { method: "hoverElement"; data: { rect: SelectModeHoverRect | null; }; } | { method: "selectedElementRectUpdate"; data: { rect: SelectModeBoundingRect; clickPosition: SelectModeClickPosition; }; } | { method: "selectedAreaRectUpdate"; data: { rect: SelectModeBoundingRect; }; } | { method: "dragRectUpdated"; data: { dragRect: SelectModeBoundingRect | null; selectionRects: SelectModeSelectionRect[]; }; } | { method: "areaSelected"; data: { rect: SelectModeBoundingRect; items: SelectableData[]; }; } | { method: "textCommitted"; data: { editId: string; html: string; json: { [x: string]: unknown; }; originalInnerHTML: string; }; } | { method: "inlineEditFeedbackChanged"; data: { feedback: InlineEditFeedback | null; }; } | { method: "editorStateUpdate"; data: { activeMarks: SelectModeTiptapActiveMarks; isInlineEditing: boolean; isInlineEditPending: boolean; }; } | { method: "fastRefreshComplete"; };