import { ToolbarStates } from '../types/toolbar'; import type { CreatingElement, CustomShapeDrawMode, ShapeFormatPainter, TextFormatPainter } from '../types/edit'; import type { DialogForExportTypes } from '../types/export'; import { type TextAttrs } from '../utils/prosemirror/utils'; import type { PPTElement } from '../types/slides'; export interface MainState { activeElementIdList: string[]; handleElementId: string; activeGroupElementId: string; hiddenElementIdList: string[]; canvasPercentage: number; canvasScale: number; canvasDragged: boolean; thumbnailsFocus: boolean; editorAreaFocus: boolean; disableHotkeys: boolean; gridLineSize: number; showRuler: boolean; showBubbleMenu: boolean; creatingElement: CreatingElement | null; creatingCustomShape: CustomShapeDrawMode | null; editingElementId: string; toolbarState: ToolbarStates; clipingImageElementId: string; isScaling: boolean; isGesturing: boolean; richTextAttrs: TextAttrs; selectedTableCells: string[]; selectedSlidesIndex: number[]; dialogForExport: DialogForExportTypes; databaseId: string; textFormatPainter: TextFormatPainter | null; shapeFormatPainter: ShapeFormatPainter | null; showSelectPanel: boolean; showSearchPanel: boolean; showNotesPanel: boolean; showMarkupPanel: boolean; rightPanelCollapsed: boolean; rightPanelPinned: 'open' | 'closed' | null; openPanelOnTextSelection: boolean; /** * Host-driven view-only mode: the user can browse slides but not select, * edit, insert, reorder or delete anything. Host/agent commands still apply. */ readOnly: boolean; /** Live "AI is writing" reveal driven by `controller.revealSlide`; null when idle. */ aiReveal: AiRevealState | null; } export interface AiRevealState { slideId: string; /** Element currently being written; null while non-text elements pop in. */ elementId: string | null; /** Host-localized badge text. Empty string hides the badge. */ label: string; /** Bumped on every reveal frame so the badge re-measures the caret. */ tick: number; } export interface MainActions { setActiveElementIdList: (activeElementIdList: string[]) => void; setHandleElementId: (handleElementId: string) => void; setActiveGroupElementId: (activeGroupElementId: string) => void; setHiddenElementIdList: (hiddenElementIdList: string[]) => void; setCanvasPercentage: (percentage: number) => void; setCanvasScale: (scale: number) => void; setCanvasDragged: (isDragged: boolean) => void; setThumbnailsFocus: (isFocus: boolean) => void; setEditorareaFocus: (isFocus: boolean) => void; setDisableHotkeysState: (disable: boolean) => void; setGridLineSize: (size: number) => void; setRulerState: (show: boolean) => void; setBubbleMenuState: (show: boolean) => void; setCreatingElement: (element: CreatingElement | null) => void; setCreatingCustomShapeState: (state: CustomShapeDrawMode | null) => void; setEditingElementId: (editingElementId: string) => void; setToolbarState: (toolbarState: ToolbarStates) => void; setClipingImageElementId: (elId: string) => void; setRichtextAttrs: (attrs: TextAttrs) => void; setSelectedTableCells: (cells: string[]) => void; setScalingState: (isScaling: boolean) => void; setGesturingState: (isGesturing: boolean) => void; updateSelectedSlidesIndex: (selectedSlidesIndex: number[]) => void; setDialogForExport: (type: DialogForExportTypes) => void; setTextFormatPainter: (textFormatPainter: TextFormatPainter | null) => void; setShapeFormatPainter: (shapeFormatPainter: ShapeFormatPainter | null) => void; setSelectPanelState: (show: boolean) => void; setSearchPanelState: (show: boolean) => void; setNotesPanelState: (show: boolean) => void; setMarkupPanelState: (show: boolean) => void; setRightPanelCollapsed: (collapsed: boolean, pin?: boolean) => void; toggleRightPanel: () => void; setOpenPanelOnTextSelection: (on: boolean) => void; revealRightPanelForTextRange: () => void; applyRightPanelAuto: (width: number, narrowPx: number) => void; setReadOnly: (readOnly: boolean) => void; setAiReveal: (reveal: Omit | null) => void; } export type MainStore = MainState & MainActions; export declare const databaseId: string; export declare const selectActiveElementList: (state: MainState) => PPTElement[]; export declare const selectHandleElement: (state: MainState) => PPTElement; export declare const useMainStore: import("zustand").UseBoundStore>;