import { type StrokeWidthKey } from "@excalidraw/common"; import { LinearElementEditor } from "@excalidraw/element/linearElementEditor"; import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, StrokeVariability, NonDeleted, NonDeletedExcalidrawElement, TextAlign } from "@excalidraw/element/types"; import type { AppClassProperties, AppState, Primitive } from "../types"; export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: NonDeletedExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[]; export declare const getFormValue: (elements: readonly ExcalidrawElement[], app: AppClassProperties, /** * input value (usually the element attribute value, * but depends on what the action's PanelComponent input expects) */ getValue: (element: ExcalidrawElement) => T, elementPredicate: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T; export declare const actionChangeStrokeColor: import("./types").Action> & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeBackgroundColor: import("./types").Action> & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeBucketFillBackgroundColor: import("./types").Action> & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeFillStyle: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeStrokeWidth: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeSloppiness: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeFreedrawMode: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeStrokeStyle: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeOpacity: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeFontSize: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionDecreaseFontSize: { name: "decreaseFontSize"; label: string; icon: import("react/jsx-runtime").JSX.Element; trackEvent: false; perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly, value: unknown, app: AppClassProperties) => { elements: ExcalidrawElement[]; appState: { currentItemFontSize: number; contextMenu: { items: import("../components/ContextMenu").ContextMenuItems; top: number; left: number; } | null; showWelcomeScreen: boolean; isLoading: boolean; myocSimplifiedMode: boolean; dontResizeLimitMBs: number; hideMainMenus: boolean; wheelZoomsOnDefault?: boolean; viewpointFlip: import("@excalidraw/common").ViewpointFlip; alignConfiguration: { stacking: boolean; }; arrangeConfiguration: { algorithm: import("@excalidraw/element/types").ArrangeAlgorithms; gap: number; }; normaliseConfiguration: { mode: import("../types").NormaliseMode; metric: import("../types").NormaliseMetric; }; errorMessage: React.ReactNode; activeEmbeddable: { element: NonDeletedExcalidrawElement; state: "hover" | "active"; } | null; newElement: NonDeleted | null; resizingElement: NonDeletedExcalidrawElement | null; multiElement: NonDeleted | null; selectionElement: NonDeletedExcalidrawElement | null; isBindingEnabled: boolean; boxSelectionMode: import("../types").BoxSelectionMode; bindingPreference: "enabled" | "disabled"; isMidpointSnappingEnabled: boolean; suggestedBinding: { element: NonDeleted; midPoint?: import("@excalidraw/math").GlobalPoint; } | null; hoveredArrowTextAnchor: { elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"]; anchor: "start" | "end" | "label"; } | null; frameToHighlight: NonDeleted | null; frameRendering: { enabled: boolean; name: boolean; outline: boolean; clip: boolean; }; editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null; elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null; editingTextElement: ExcalidrawTextElement | null; activeTool: { lastActiveTool: import("../types").ActiveTool | null; locked: boolean; fromSelection: boolean; } & import("../types").ActiveTool; preferredSelectionTool: { type: "selection" | "lasso"; initialized: boolean; }; penMode: boolean; penDetected: boolean; exportBackground: boolean; exportEmbedScene: boolean; exportWithDarkMode: boolean; exportScale: number; currentItemStrokeColor: string; currentItemBackgroundColor: string; currentItemFillStyle: ExcalidrawElement["fillStyle"]; currentItemStrokeWidthKey: StrokeWidthKey; currentItemStrokeStyle: ExcalidrawElement["strokeStyle"]; currentItemRoughness: number; currentItemStrokeVariability: StrokeVariability; currentItemOpacity: number; currentItemFontFamily: FontFamilyValues; currentItemTextAlign: TextAlign; currentItemStartArrowhead: Arrowhead | null; currentItemEndArrowhead: Arrowhead | null; currentHoveredFontFamily: FontFamilyValues | null; currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness; currentItemArrowType: "sharp" | "round" | "elbow"; viewBackgroundColor: string; scrollX: number; scrollY: number; scrollConstraints: import("../types").ScrollConstraints | null; cursorButton: "up" | "down"; scrolledOutside: boolean; name: string | null; isResizing: boolean; isRotating: boolean; zoom: import("../types").Zoom; openMenu: "canvas" | null; openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null; openSidebar: { name: import("../types").SidebarName; tab?: import("../types").SidebarTabName; } | null; openDialog: null | { name: "imageExport" | "help" | "jsonExport"; } | { name: "settings"; } | { name: "elementLinkSelector"; sourceElementId: ExcalidrawElement["id"]; } | { name: "charts"; data: import("../charts").Spreadsheet; rawText: string; }; defaultSidebarDockedPreference: boolean; lastPointerDownWith: import("@excalidraw/element/types").PointerType; selectedElementIds: Readonly<{ [id: string]: true; }>; hoveredElementIds: Readonly<{ [id: string]: true; }>; previousSelectedElementIds: { [id: string]: true; }; selectedElementsAreBeingDragged: boolean; shouldCacheIgnoreZoom: boolean; toast: { message: React.ReactNode; closable?: boolean; duration?: number; } | null; zenModeEnabled: boolean; theme: import("@excalidraw/element/types").Theme; gridSize: number; gridStep: number; gridModeEnabled: boolean; viewModeEnabled: boolean; viewModeOnly: boolean; selectedGroupIds: { [groupId: string]: boolean; }; editingGroupId: import("@excalidraw/element/types").GroupId | null; width: number; height: number; offsetTop: number; offsetLeft: number; fileHandle: FileSystemFileHandle | null; collaborators: Map; stats: { open: boolean; panels: number; }; showHyperlinkPopup: false | "info" | "editor"; selectedLinearElement: LinearElementEditor | null; snapLines: readonly import("../snapping").SnapLine[]; originSnapOffset: { x: number; y: number; } | null; objectsSnapModeEnabled: boolean; isCropping: boolean; croppingElementId: ExcalidrawElement["id"] | null; searchMatches: Readonly<{ focusedId: ExcalidrawElement["id"] | null; matches: readonly import("../types").SearchMatch[]; }> | null; activeLockedId: string | null; lockedMultiSelections: { [groupId: string]: true; }; bindMode: import("@excalidraw/element/types").BindMode; colorTopPicks: { elementStroke: readonly string[] | null; elementBackground: readonly string[] | null; bucketFill: readonly string[] | null; }; }; captureUpdate: "IMMEDIATELY"; }; keyTest: (event: import("react").KeyboardEvent | KeyboardEvent) => boolean; } & { keyTest?: ((event: import("react").KeyboardEvent | KeyboardEvent) => boolean) | undefined; }; export declare const actionIncreaseFontSize: { name: "increaseFontSize"; label: string; icon: import("react/jsx-runtime").JSX.Element; trackEvent: false; perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly, value: unknown, app: AppClassProperties) => { elements: ExcalidrawElement[]; appState: { currentItemFontSize: number; contextMenu: { items: import("../components/ContextMenu").ContextMenuItems; top: number; left: number; } | null; showWelcomeScreen: boolean; isLoading: boolean; myocSimplifiedMode: boolean; dontResizeLimitMBs: number; hideMainMenus: boolean; wheelZoomsOnDefault?: boolean; viewpointFlip: import("@excalidraw/common").ViewpointFlip; alignConfiguration: { stacking: boolean; }; arrangeConfiguration: { algorithm: import("@excalidraw/element/types").ArrangeAlgorithms; gap: number; }; normaliseConfiguration: { mode: import("../types").NormaliseMode; metric: import("../types").NormaliseMetric; }; errorMessage: React.ReactNode; activeEmbeddable: { element: NonDeletedExcalidrawElement; state: "hover" | "active"; } | null; newElement: NonDeleted | null; resizingElement: NonDeletedExcalidrawElement | null; multiElement: NonDeleted | null; selectionElement: NonDeletedExcalidrawElement | null; isBindingEnabled: boolean; boxSelectionMode: import("../types").BoxSelectionMode; bindingPreference: "enabled" | "disabled"; isMidpointSnappingEnabled: boolean; suggestedBinding: { element: NonDeleted; midPoint?: import("@excalidraw/math").GlobalPoint; } | null; hoveredArrowTextAnchor: { elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"]; anchor: "start" | "end" | "label"; } | null; frameToHighlight: NonDeleted | null; frameRendering: { enabled: boolean; name: boolean; outline: boolean; clip: boolean; }; editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null; elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null; editingTextElement: ExcalidrawTextElement | null; activeTool: { lastActiveTool: import("../types").ActiveTool | null; locked: boolean; fromSelection: boolean; } & import("../types").ActiveTool; preferredSelectionTool: { type: "selection" | "lasso"; initialized: boolean; }; penMode: boolean; penDetected: boolean; exportBackground: boolean; exportEmbedScene: boolean; exportWithDarkMode: boolean; exportScale: number; currentItemStrokeColor: string; currentItemBackgroundColor: string; currentItemFillStyle: ExcalidrawElement["fillStyle"]; currentItemStrokeWidthKey: StrokeWidthKey; currentItemStrokeStyle: ExcalidrawElement["strokeStyle"]; currentItemRoughness: number; currentItemStrokeVariability: StrokeVariability; currentItemOpacity: number; currentItemFontFamily: FontFamilyValues; currentItemTextAlign: TextAlign; currentItemStartArrowhead: Arrowhead | null; currentItemEndArrowhead: Arrowhead | null; currentHoveredFontFamily: FontFamilyValues | null; currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness; currentItemArrowType: "sharp" | "round" | "elbow"; viewBackgroundColor: string; scrollX: number; scrollY: number; scrollConstraints: import("../types").ScrollConstraints | null; cursorButton: "up" | "down"; scrolledOutside: boolean; name: string | null; isResizing: boolean; isRotating: boolean; zoom: import("../types").Zoom; openMenu: "canvas" | null; openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null; openSidebar: { name: import("../types").SidebarName; tab?: import("../types").SidebarTabName; } | null; openDialog: null | { name: "imageExport" | "help" | "jsonExport"; } | { name: "settings"; } | { name: "elementLinkSelector"; sourceElementId: ExcalidrawElement["id"]; } | { name: "charts"; data: import("../charts").Spreadsheet; rawText: string; }; defaultSidebarDockedPreference: boolean; lastPointerDownWith: import("@excalidraw/element/types").PointerType; selectedElementIds: Readonly<{ [id: string]: true; }>; hoveredElementIds: Readonly<{ [id: string]: true; }>; previousSelectedElementIds: { [id: string]: true; }; selectedElementsAreBeingDragged: boolean; shouldCacheIgnoreZoom: boolean; toast: { message: React.ReactNode; closable?: boolean; duration?: number; } | null; zenModeEnabled: boolean; theme: import("@excalidraw/element/types").Theme; gridSize: number; gridStep: number; gridModeEnabled: boolean; viewModeEnabled: boolean; viewModeOnly: boolean; selectedGroupIds: { [groupId: string]: boolean; }; editingGroupId: import("@excalidraw/element/types").GroupId | null; width: number; height: number; offsetTop: number; offsetLeft: number; fileHandle: FileSystemFileHandle | null; collaborators: Map; stats: { open: boolean; panels: number; }; showHyperlinkPopup: false | "info" | "editor"; selectedLinearElement: LinearElementEditor | null; snapLines: readonly import("../snapping").SnapLine[]; originSnapOffset: { x: number; y: number; } | null; objectsSnapModeEnabled: boolean; isCropping: boolean; croppingElementId: ExcalidrawElement["id"] | null; searchMatches: Readonly<{ focusedId: ExcalidrawElement["id"] | null; matches: readonly import("../types").SearchMatch[]; }> | null; activeLockedId: string | null; lockedMultiSelections: { [groupId: string]: true; }; bindMode: import("@excalidraw/element/types").BindMode; colorTopPicks: { elementStroke: readonly string[] | null; elementBackground: readonly string[] | null; bucketFill: readonly string[] | null; }; }; captureUpdate: "IMMEDIATELY"; }; keyTest: (event: import("react").KeyboardEvent | KeyboardEvent) => boolean; } & { keyTest?: ((event: import("react").KeyboardEvent | KeyboardEvent) => boolean) | undefined; }; export declare const actionChangeFontFamily: import("./types").Action<{ currentItemFontFamily: any; currentHoveredFontFamily: any; }> & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeTextAlign: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeVerticalAlign: import("./types").Action & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeRoundness: import("./types").Action<"round" | "sharp"> & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeArrowhead: import("./types").Action<{ position: "start" | "end"; type: Arrowhead; }> & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; }; export declare const actionChangeArrowProperties: { name: "changeArrowProperties"; label: string; trackEvent: false; perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly, value: unknown, app: AppClassProperties) => false; PanelComponent: ({ elements, appState, updateData, app, renderAction }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element; } & { keyTest?: undefined; }; export declare const actionChangeArrowType: import("./types").Action<"round" | "sharp" | "elbow"> & { keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined; };