Merge branch 'master' into arnost/sockets-reconnecting

# Conflicts:
#	package.json
#	src/locales/en.json
#	yarn.lock
This commit is contained in:
dwelle
2023-07-28 10:02:12 +02:00
171 changed files with 9484 additions and 13849 deletions
+27 -2
View File
@@ -16,6 +16,7 @@ import {
Theme,
StrokeRoundness,
ExcalidrawFrameElement,
ExcalidrawEmbeddableElement,
} from "./element/types";
import { SHAPES } from "./shapes";
import { Point as RoughPoint } from "roughjs/bin/geometry";
@@ -87,7 +88,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;
}
| {
@@ -108,6 +114,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;
@@ -137,7 +147,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;
}
| {
@@ -362,6 +377,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 = {