import type { AppState, BoxSelectionMode, InteractiveCanvasAppState } from "@excalidraw/excalidraw/types"; import { LinearElementEditor } from "./linearElementEditor"; import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement } from "./types"; /** * Frames and their containing elements are not to be selected at the same time. * Given an array of selected elements, if there are frames and their containing elements * we only keep the frames. * @param selectedElements */ export declare const excludeElementsInFramesFromSelection: (selectedElements: readonly T[]) => T[]; export declare const getElementsWithinSelection: (elements: readonly NonDeletedExcalidrawElement[], selection: NonDeletedExcalidrawElement, elementsMap: ElementsMap, excludeElementsInFrames?: boolean, boxSelectionMode?: BoxSelectionMode) => NonDeletedExcalidrawElement[]; export declare const getVisibleAndNonSelectedElements: (elements: readonly NonDeletedExcalidrawElement[], selectedElements: readonly NonDeletedExcalidrawElement[], appState: AppState, elementsMap: ElementsMap) => NonDeletedExcalidrawElement[]; export declare const isSomeElementSelected: { (elements: readonly NonDeletedExcalidrawElement[], appState: Pick): boolean; clearCache(): void; }; export declare const getSelectedElements: (elements: ElementsMapOrArray, appState: Pick, opts?: { includeBoundTextElement?: boolean; includeElementsInFrames?: boolean; }) => ExcalidrawElement[]; export declare const getTargetElements: (elements: ElementsMapOrArray, appState: Pick) => ExcalidrawElement[]; /** * returns prevState's selectedElementids if no change from previous, so as to * retain reference identity for memoization */ export declare const makeNextSelectedElementIds: (nextSelectedElementIds: AppState["selectedElementIds"], prevState: Pick) => Readonly<{ [id: string]: true; }>; export declare const getSelectionStateForElements: (targetElements: readonly ExcalidrawElement[], allElements: readonly NonDeletedExcalidrawElement[], appState: AppState) => { selectedElementIds: AppState["selectedElementIds"]; selectedGroupIds: AppState["selectedGroupIds"]; editingGroupId: AppState["editingGroupId"]; selectedLinearElement: LinearElementEditor | null; }; /** * Returns editing or single-selected text element, if any. */ export declare const getActiveTextElement: (selectedElements: readonly NonDeleted[], appState: Pick) => import("./types").ExcalidrawTextElement | null;