Merge remote-tracking branch 'origin/release' into danieljgeiger-mathjax
This commit is contained in:
+36
-6
@@ -16,6 +16,7 @@ import {
|
||||
Theme,
|
||||
StrokeRoundness,
|
||||
ExcalidrawFrameElement,
|
||||
ExcalidrawEmbeddableElement,
|
||||
} from "./element/types";
|
||||
import { Action } from "./actions/types";
|
||||
import { SHAPES } from "./shapes";
|
||||
@@ -93,7 +94,12 @@ export type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
|
||||
|
||||
export type LastActiveTool =
|
||||
| {
|
||||
type: typeof SHAPES[number]["value"] | "eraser" | "hand" | "frame";
|
||||
type:
|
||||
| typeof SHAPES[number]["value"]
|
||||
| "eraser"
|
||||
| "hand"
|
||||
| "frame"
|
||||
| "embeddable";
|
||||
customType: null;
|
||||
}
|
||||
| {
|
||||
@@ -114,6 +120,10 @@ export type AppState = {
|
||||
showWelcomeScreen: boolean;
|
||||
isLoading: boolean;
|
||||
errorMessage: React.ReactNode;
|
||||
activeEmbeddable: {
|
||||
element: NonDeletedExcalidrawElement;
|
||||
state: "hover" | "active";
|
||||
} | null;
|
||||
draggingElement: NonDeletedExcalidrawElement | null;
|
||||
resizingElement: NonDeletedExcalidrawElement | null;
|
||||
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
||||
@@ -122,7 +132,12 @@ export type AppState = {
|
||||
startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
|
||||
suggestedBindings: SuggestedBinding[];
|
||||
frameToHighlight: NonDeleted<ExcalidrawFrameElement> | null;
|
||||
shouldRenderFrames: boolean;
|
||||
frameRendering: {
|
||||
enabled: boolean;
|
||||
name: boolean;
|
||||
outline: boolean;
|
||||
clip: boolean;
|
||||
};
|
||||
editingFrame: string | null;
|
||||
elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
|
||||
// element being edited, but not necessarily added to elements array yet
|
||||
@@ -142,7 +157,12 @@ export type AppState = {
|
||||
locked: boolean;
|
||||
} & (
|
||||
| {
|
||||
type: typeof SHAPES[number]["value"] | "eraser" | "hand" | "frame";
|
||||
type:
|
||||
| typeof SHAPES[number]["value"]
|
||||
| "eraser"
|
||||
| "hand"
|
||||
| "frame"
|
||||
| "embeddable";
|
||||
customType: null;
|
||||
}
|
||||
| {
|
||||
@@ -192,8 +212,8 @@ export type AppState = {
|
||||
defaultSidebarDockedPreference: boolean;
|
||||
|
||||
lastPointerDownWith: PointerType;
|
||||
selectedElementIds: { [id: string]: boolean };
|
||||
previousSelectedElementIds: { [id: string]: boolean };
|
||||
selectedElementIds: Readonly<{ [id: string]: true }>;
|
||||
previousSelectedElementIds: { [id: string]: true };
|
||||
selectedElementsAreBeingDragged: boolean;
|
||||
shouldCacheIgnoreZoom: boolean;
|
||||
toast: { message: string; closable?: boolean; duration?: number } | null;
|
||||
@@ -367,6 +387,16 @@ export interface ExcalidrawProps {
|
||||
) => void;
|
||||
onScrollChange?: (scrollX: number, scrollY: number) => void;
|
||||
children?: React.ReactNode;
|
||||
validateEmbeddable?:
|
||||
| boolean
|
||||
| string[]
|
||||
| RegExp
|
||||
| RegExp[]
|
||||
| ((link: string) => boolean | undefined);
|
||||
renderEmbeddable?: (
|
||||
element: NonDeleted<ExcalidrawEmbeddableElement>,
|
||||
appState: AppState,
|
||||
) => JSX.Element | null;
|
||||
}
|
||||
|
||||
export type SceneData = {
|
||||
@@ -559,7 +589,7 @@ export type ExcalidrawImperativeAPI = {
|
||||
* the frames are still interactive in edit mode. As such, this API should be
|
||||
* used in conjunction with view mode (props.viewModeEnabled).
|
||||
*/
|
||||
toggleFrameRendering: InstanceType<typeof App>["toggleFrameRendering"];
|
||||
updateFrameRendering: InstanceType<typeof App>["updateFrameRendering"];
|
||||
};
|
||||
|
||||
export type Device = Readonly<{
|
||||
|
||||
Reference in New Issue
Block a user