mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: canvas search (#8438)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
parent
5a11c70714
commit
6959a363f0
35 changed files with 1424 additions and 47 deletions
|
@ -198,6 +198,8 @@ export type InteractiveCanvasAppState = Readonly<
|
|||
snapLines: AppState["snapLines"];
|
||||
zenModeEnabled: AppState["zenModeEnabled"];
|
||||
editingTextElement: AppState["editingTextElement"];
|
||||
// Search matches
|
||||
searchMatches: AppState["searchMatches"];
|
||||
}
|
||||
>;
|
||||
|
||||
|
@ -384,8 +386,20 @@ export interface AppState {
|
|||
userToFollow: UserToFollow | null;
|
||||
/** the socket ids of the users following the current user */
|
||||
followedBy: Set<SocketId>;
|
||||
searchMatches: readonly SearchMatch[];
|
||||
}
|
||||
|
||||
type SearchMatch = {
|
||||
id: string;
|
||||
focus: boolean;
|
||||
matchedLines: {
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type UIAppState = Omit<
|
||||
AppState,
|
||||
| "suggestedBindings"
|
||||
|
@ -642,6 +656,9 @@ export type AppClassProperties = {
|
|||
getEffectiveGridSize: App["getEffectiveGridSize"];
|
||||
setPlugins: App["setPlugins"];
|
||||
plugins: App["plugins"];
|
||||
getEditorUIOffsets: App["getEditorUIOffsets"];
|
||||
visibleElements: App["visibleElements"];
|
||||
excalidrawContainerValue: App["excalidrawContainerValue"];
|
||||
};
|
||||
|
||||
export type PointerDownState = Readonly<{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue