@myoc/element 0.19.532 → 0.19.534
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/index.js +816 -16
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +15 -15
- package/dist/types/common/src/constants.d.ts +1 -0
- package/dist/types/element/src/gif.d.ts +29 -0
- package/dist/types/element/src/image.d.ts +6 -1
- package/dist/types/element/src/index.d.ts +2 -0
- package/dist/types/element/src/newElement.d.ts +1 -0
- package/dist/types/element/src/renderGif.d.ts +5 -0
- package/dist/types/element/src/types.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -3
- package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +8 -1
- package/dist/types/excalidraw/components/App.gif.d.ts +18 -0
- package/dist/types/excalidraw/components/GifPlaybackControls.d.ts +10 -0
- package/dist/types/excalidraw/components/icons.d.ts +4 -0
- package/dist/types/excalidraw/data/blob.d.ts +2 -2
- package/dist/types/excalidraw/data/json.d.ts +1 -1
- package/dist/types/excalidraw/data/restoreGif.d.ts +4 -0
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -0
- package/dist/types/excalidraw/scene/types.d.ts +2 -1
- package/dist/types/excalidraw/types.d.ts +12 -2
- package/dist/types/excalidraw/viewport.d.ts +1 -1
- package/package.json +5 -4
|
@@ -231,6 +231,7 @@ export declare const EXPORT_SCALES: number[];
|
|
|
231
231
|
export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
232
232
|
export declare const DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT = 1440;
|
|
233
233
|
export declare const MAX_ALLOWED_FILE_BYTES: number;
|
|
234
|
+
export declare const DEFAULT_GIF_AUTO_DECODE_MAX_FILE_SIZE_BYTES: number;
|
|
234
235
|
export declare const DEFAULT_IMAGE_OPTIONS: AppProps["imageOptions"];
|
|
235
236
|
export declare const SVG_NS = "http://www.w3.org/2000/svg";
|
|
236
237
|
export declare const SVG_DOCUMENT_PREAMBLE = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { DataURL } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { ExcalidrawGifCache, ExcalidrawGifPlayback, ExcalidrawImageElement, FileId, NonDeletedExcalidrawElement } from "./types";
|
|
3
|
+
export type GifDecodeStatus = "pending" | "success" | "error" | "deferred";
|
|
4
|
+
export declare const configureGifWorkerUrl: (workerUrl: string | undefined) => void;
|
|
5
|
+
type GifImageCache = Map<FileId, {
|
|
6
|
+
gifDecodeStatus?: GifDecodeStatus;
|
|
7
|
+
gif?: ExcalidrawGifCache;
|
|
8
|
+
}>;
|
|
9
|
+
type ImageCacheEntry = NonNullable<ReturnType<GifImageCache["get"]>>;
|
|
10
|
+
export declare const decodeGifFrames: (dataURL: DataURL) => Promise<{
|
|
11
|
+
frames: HTMLCanvasElement[];
|
|
12
|
+
delays: number[];
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const getDataURLByteLength: (dataURL: DataURL) => number;
|
|
17
|
+
export declare const decodeGifFramesQueued: (dataURL: DataURL) => Promise<{
|
|
18
|
+
frames: HTMLCanvasElement[];
|
|
19
|
+
delays: number[];
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const createGifPlaybackMetadata: (opts?: {
|
|
24
|
+
playing?: boolean;
|
|
25
|
+
}) => ExcalidrawGifPlayback;
|
|
26
|
+
export declare const getGifRenderFrame: (element: ExcalidrawImageElement, cacheEntry: ImageCacheEntry | null | undefined, runtimeFrameIndex?: number) => HTMLCanvasElement | undefined;
|
|
27
|
+
export declare const hasActiveGifDecode: (visibleElements: readonly NonDeletedExcalidrawElement[], imageCache: GifImageCache) => boolean;
|
|
28
|
+
export declare const hasPlayableGif: (visibleElements: readonly NonDeletedExcalidrawElement[], imageCache: GifImageCache) => boolean;
|
|
29
|
+
export {};
|
|
@@ -5,10 +5,13 @@ export declare const getThumbHashPlaceholder: (thumbHash: string) => HTMLCanvasE
|
|
|
5
5
|
export declare const loadHTMLImageElement: (dataURL: DataURL) => Promise<HTMLImageElement>;
|
|
6
6
|
/** NOTE: updates cache even if already populated with given image. Thus,
|
|
7
7
|
* you should filter out the images upstream if you want to optimize this. */
|
|
8
|
-
export declare const updateImageCache: ({ fileIds, files, imageCache, }: {
|
|
8
|
+
export declare const updateImageCache: ({ fileIds, files, imageCache, onImageCacheUpdate, gifAutoDecodeMaxFileSizeBytes, forceGifDecode, }: {
|
|
9
9
|
fileIds: FileId[];
|
|
10
10
|
files: BinaryFiles;
|
|
11
11
|
imageCache: AppClassProperties["imageCache"];
|
|
12
|
+
onImageCacheUpdate?: (fileId: FileId) => void;
|
|
13
|
+
gifAutoDecodeMaxFileSizeBytes?: number;
|
|
14
|
+
forceGifDecode?: boolean;
|
|
12
15
|
}) => Promise<{
|
|
13
16
|
imageCache: Map<FileId, {
|
|
14
17
|
image: HTMLImageElement | Promise<HTMLImageElement>;
|
|
@@ -16,6 +19,8 @@ export declare const updateImageCache: ({ fileIds, files, imageCache, }: {
|
|
|
16
19
|
isPlaceholder?: boolean;
|
|
17
20
|
placeholderImage?: HTMLImageElement;
|
|
18
21
|
transitionStart?: number;
|
|
22
|
+
gifDecodeStatus?: "pending" | "success" | "error" | "deferred";
|
|
23
|
+
gif?: import("./types").ExcalidrawGifCache;
|
|
19
24
|
}>;
|
|
20
25
|
/** includes errored files because they cache was updated nonetheless */
|
|
21
26
|
updatedFiles: Map<FileId, true>;
|
|
@@ -33,6 +33,7 @@ export * from "./flowchart";
|
|
|
33
33
|
export * from "./arrows/focus";
|
|
34
34
|
export * from "./fractionalIndex";
|
|
35
35
|
export * from "./frame";
|
|
36
|
+
export * from "./gif";
|
|
36
37
|
export * from "./groups";
|
|
37
38
|
export * from "./heading";
|
|
38
39
|
export * from "./image";
|
|
@@ -42,6 +43,7 @@ export * from "./newElement";
|
|
|
42
43
|
export * from "./normalise";
|
|
43
44
|
export * from "./positionElementsOnGrid";
|
|
44
45
|
export * from "./renderElement";
|
|
46
|
+
export * from "./renderGif";
|
|
45
47
|
export * from "./resizeElements";
|
|
46
48
|
export * from "./resizeTest";
|
|
47
49
|
export * from "./Scene";
|
|
@@ -75,4 +75,5 @@ export declare const newImageElement: (opts: {
|
|
|
75
75
|
thumbHash?: ExcalidrawImageElement["thumbHash"];
|
|
76
76
|
scale?: ExcalidrawImageElement["scale"];
|
|
77
77
|
crop?: ExcalidrawImageElement["crop"];
|
|
78
|
+
gifPlayback?: ExcalidrawImageElement["gifPlayback"];
|
|
78
79
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawImageElement>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StaticCanvasRenderConfig } from "@excalidraw/excalidraw/scene/types";
|
|
2
|
+
import type { ExcalidrawImageElement } from "./types";
|
|
3
|
+
type DrawImagePlaceholder = (element: ExcalidrawImageElement, context: CanvasRenderingContext2D, theme: StaticCanvasRenderConfig["theme"]) => void;
|
|
4
|
+
export declare const drawGifDecodePlaceholder: (element: ExcalidrawImageElement, context: CanvasRenderingContext2D, theme: StaticCanvasRenderConfig["theme"], drawImagePlaceholder: DrawImagePlaceholder) => void;
|
|
5
|
+
export {};
|
|
@@ -126,6 +126,17 @@ export type ImageCrop = {
|
|
|
126
126
|
naturalWidth: number;
|
|
127
127
|
naturalHeight: number;
|
|
128
128
|
};
|
|
129
|
+
export type ExcalidrawGifPlayback = {
|
|
130
|
+
frameIndex: number;
|
|
131
|
+
speed: number;
|
|
132
|
+
playing: boolean;
|
|
133
|
+
};
|
|
134
|
+
export type ExcalidrawGifCache = {
|
|
135
|
+
frames: HTMLCanvasElement[];
|
|
136
|
+
delays: number[];
|
|
137
|
+
width: number;
|
|
138
|
+
height: number;
|
|
139
|
+
};
|
|
129
140
|
export type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
|
|
130
141
|
type: "image";
|
|
131
142
|
fileId: FileId | null;
|
|
@@ -138,6 +149,7 @@ export type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
|
|
|
138
149
|
scale: [number, number];
|
|
139
150
|
/** whether an element is cropped */
|
|
140
151
|
crop: ImageCrop | null;
|
|
152
|
+
gifPlayback: ExcalidrawGifPlayback | null;
|
|
141
153
|
}>;
|
|
142
154
|
export type InitializedExcalidrawImageElement = MarkNonNullable<ExcalidrawImageElement, "fileId">;
|
|
143
155
|
export type ExcalidrawFrameElement = _ExcalidrawElementBase & {
|
|
@@ -121,7 +121,7 @@ export declare const actionBindText: {
|
|
|
121
121
|
isRotating: boolean;
|
|
122
122
|
zoom: import("../types").Zoom;
|
|
123
123
|
openMenu: "canvas" | null;
|
|
124
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
124
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
125
125
|
openSidebar: {
|
|
126
126
|
name: import("../types").SidebarName;
|
|
127
127
|
tab?: import("../types").SidebarTabName;
|
|
@@ -309,7 +309,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
309
309
|
isRotating: boolean;
|
|
310
310
|
zoom: import("../types").Zoom;
|
|
311
311
|
openMenu: "canvas" | null;
|
|
312
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
312
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
313
313
|
openSidebar: {
|
|
314
314
|
name: import("../types").SidebarName;
|
|
315
315
|
tab?: import("../types").SidebarTabName;
|
|
@@ -106,7 +106,7 @@ export declare const actionZoomIn: {
|
|
|
106
106
|
isResizing: boolean;
|
|
107
107
|
isRotating: boolean;
|
|
108
108
|
openMenu: "canvas" | null;
|
|
109
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
109
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
110
110
|
openSidebar: {
|
|
111
111
|
name: import("../types").SidebarName;
|
|
112
112
|
tab?: import("../types").SidebarTabName;
|
|
@@ -298,7 +298,7 @@ export declare const actionZoomOut: {
|
|
|
298
298
|
isResizing: boolean;
|
|
299
299
|
isRotating: boolean;
|
|
300
300
|
openMenu: "canvas" | null;
|
|
301
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
301
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
302
302
|
openSidebar: {
|
|
303
303
|
name: import("../types").SidebarName;
|
|
304
304
|
tab?: import("../types").SidebarTabName;
|
|
@@ -490,7 +490,7 @@ export declare const actionResetZoom: {
|
|
|
490
490
|
isResizing: boolean;
|
|
491
491
|
isRotating: boolean;
|
|
492
492
|
openMenu: "canvas" | null;
|
|
493
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
493
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
494
494
|
openSidebar: {
|
|
495
495
|
name: import("../types").SidebarName;
|
|
496
496
|
tab?: import("../types").SidebarTabName;
|
|
@@ -682,7 +682,7 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
682
682
|
isResizing: boolean;
|
|
683
683
|
isRotating: boolean;
|
|
684
684
|
openMenu: "canvas" | null;
|
|
685
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
685
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
686
686
|
openSidebar: {
|
|
687
687
|
name: import("../types").SidebarName;
|
|
688
688
|
tab?: import("../types").SidebarTabName;
|
|
@@ -873,7 +873,7 @@ export declare const actionZoomToFitSelection: {
|
|
|
873
873
|
isResizing: boolean;
|
|
874
874
|
isRotating: boolean;
|
|
875
875
|
openMenu: "canvas" | null;
|
|
876
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
876
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
877
877
|
openSidebar: {
|
|
878
878
|
name: import("../types").SidebarName;
|
|
879
879
|
tab?: import("../types").SidebarTabName;
|
|
@@ -1064,7 +1064,7 @@ export declare const actionZoomToFit: {
|
|
|
1064
1064
|
isResizing: boolean;
|
|
1065
1065
|
isRotating: boolean;
|
|
1066
1066
|
openMenu: "canvas" | null;
|
|
1067
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
1067
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
1068
1068
|
openSidebar: {
|
|
1069
1069
|
name: import("../types").SidebarName;
|
|
1070
1070
|
tab?: import("../types").SidebarTabName;
|
|
@@ -102,7 +102,7 @@ export declare const actionPaste: {
|
|
|
102
102
|
isRotating: boolean;
|
|
103
103
|
zoom: import("../types").Zoom;
|
|
104
104
|
openMenu: "canvas" | null;
|
|
105
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
105
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
106
106
|
openSidebar: {
|
|
107
107
|
name: import("../types").SidebarName;
|
|
108
108
|
tab?: import("../types").SidebarTabName;
|
|
@@ -328,7 +328,7 @@ export declare const actionCopyAsPng: {
|
|
|
328
328
|
isRotating: boolean;
|
|
329
329
|
zoom: import("../types").Zoom;
|
|
330
330
|
openMenu: "canvas" | null;
|
|
331
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
331
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
332
332
|
openSidebar: {
|
|
333
333
|
name: import("../types").SidebarName;
|
|
334
334
|
tab?: import("../types").SidebarTabName;
|
|
@@ -103,7 +103,7 @@ export declare const actionToggleCropEditor: {
|
|
|
103
103
|
isRotating: boolean;
|
|
104
104
|
zoom: import("../types").Zoom;
|
|
105
105
|
openMenu: "canvas" | null;
|
|
106
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
106
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
107
107
|
openSidebar: {
|
|
108
108
|
name: import("../types").SidebarName;
|
|
109
109
|
tab?: import("../types").SidebarTabName;
|
|
@@ -104,7 +104,7 @@ export declare const actionDeleteSelected: {
|
|
|
104
104
|
isRotating: boolean;
|
|
105
105
|
zoom: import("../types").Zoom;
|
|
106
106
|
openMenu: "canvas" | null;
|
|
107
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
107
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
108
108
|
openSidebar: {
|
|
109
109
|
name: import("../types").SidebarName;
|
|
110
110
|
tab?: import("../types").SidebarTabName;
|
|
@@ -314,7 +314,7 @@ export declare const actionDeleteSelected: {
|
|
|
314
314
|
isRotating: boolean;
|
|
315
315
|
zoom: import("../types").Zoom;
|
|
316
316
|
openMenu: "canvas" | null;
|
|
317
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
317
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
318
318
|
openSidebar: {
|
|
319
319
|
name: import("../types").SidebarName;
|
|
320
320
|
tab?: import("../types").SidebarTabName;
|
|
@@ -491,7 +491,7 @@ export declare const actionDeleteSelected: {
|
|
|
491
491
|
isRotating: boolean;
|
|
492
492
|
zoom: import("../types").Zoom;
|
|
493
493
|
openMenu: "canvas" | null;
|
|
494
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
494
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
495
495
|
openSidebar: {
|
|
496
496
|
name: import("../types").SidebarName;
|
|
497
497
|
tab?: import("../types").SidebarTabName;
|
|
@@ -93,7 +93,7 @@ export declare const actionDeselect: {
|
|
|
93
93
|
isRotating: boolean;
|
|
94
94
|
zoom: import("../types").Zoom;
|
|
95
95
|
openMenu: "canvas" | null;
|
|
96
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
96
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
97
97
|
openSidebar: {
|
|
98
98
|
name: import("../types").SidebarName;
|
|
99
99
|
tab?: import("../types").SidebarTabName;
|
|
@@ -114,7 +114,7 @@ export declare const actionToggleElementLock: {
|
|
|
114
114
|
isRotating: boolean;
|
|
115
115
|
zoom: import("../types").Zoom;
|
|
116
116
|
openMenu: "canvas" | null;
|
|
117
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
117
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
118
118
|
openSidebar: {
|
|
119
119
|
name: import("../types").SidebarName;
|
|
120
120
|
tab?: import("../types").SidebarTabName;
|
|
@@ -301,7 +301,7 @@ export declare const actionUnlockAllElements: {
|
|
|
301
301
|
isRotating: boolean;
|
|
302
302
|
zoom: import("../types").Zoom;
|
|
303
303
|
openMenu: "canvas" | null;
|
|
304
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
304
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
305
305
|
openSidebar: {
|
|
306
306
|
name: import("../types").SidebarName;
|
|
307
307
|
tab?: import("../types").SidebarTabName;
|
|
@@ -217,7 +217,7 @@ export declare const actionLoadScene: {
|
|
|
217
217
|
scrolledOutside: boolean;
|
|
218
218
|
isResizing: boolean;
|
|
219
219
|
openMenu: "canvas" | null;
|
|
220
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
220
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
221
221
|
openSidebar: {
|
|
222
222
|
name: import("../types").SidebarName;
|
|
223
223
|
tab?: import("../types").SidebarTabName;
|
|
@@ -348,7 +348,7 @@ export declare const actionLoadScene: {
|
|
|
348
348
|
isRotating: boolean;
|
|
349
349
|
zoom: import("../types").Zoom;
|
|
350
350
|
openMenu: "canvas" | null;
|
|
351
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
351
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
352
352
|
openSidebar: {
|
|
353
353
|
name: import("../types").SidebarName;
|
|
354
354
|
tab?: import("../types").SidebarTabName;
|
|
@@ -102,7 +102,7 @@ export declare const actionSelectAllElementsInFrame: {
|
|
|
102
102
|
isRotating: boolean;
|
|
103
103
|
zoom: import("../types").Zoom;
|
|
104
104
|
openMenu: "canvas" | null;
|
|
105
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
105
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
106
106
|
openSidebar: {
|
|
107
107
|
name: import("../types").SidebarName;
|
|
108
108
|
tab?: import("../types").SidebarTabName;
|
|
@@ -294,7 +294,7 @@ export declare const actionRemoveAllElementsFromFrame: {
|
|
|
294
294
|
isRotating: boolean;
|
|
295
295
|
zoom: import("../types").Zoom;
|
|
296
296
|
openMenu: "canvas" | null;
|
|
297
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
297
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
298
298
|
openSidebar: {
|
|
299
299
|
name: import("../types").SidebarName;
|
|
300
300
|
tab?: import("../types").SidebarTabName;
|
|
@@ -484,7 +484,7 @@ export declare const actionupdateFrameRendering: {
|
|
|
484
484
|
isRotating: boolean;
|
|
485
485
|
zoom: import("../types").Zoom;
|
|
486
486
|
openMenu: "canvas" | null;
|
|
487
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
487
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
488
488
|
openSidebar: {
|
|
489
489
|
name: import("../types").SidebarName;
|
|
490
490
|
tab?: import("../types").SidebarTabName;
|
|
@@ -863,6 +863,7 @@ export declare const actionWrapSelectionInFrame: {
|
|
|
863
863
|
status: "pending" | "saved" | "error";
|
|
864
864
|
scale: [number, number];
|
|
865
865
|
crop: import("@excalidraw/element/types").ImageCrop | null;
|
|
866
|
+
gifPlayback: import("@excalidraw/element/types").ExcalidrawGifPlayback | null;
|
|
866
867
|
}> & {
|
|
867
868
|
index: import("@excalidraw/element/types").FractionalIndex;
|
|
868
869
|
}) | (Readonly<{
|
|
@@ -108,7 +108,7 @@ export declare const actionGroup: {
|
|
|
108
108
|
isRotating: boolean;
|
|
109
109
|
zoom: import("../types").Zoom;
|
|
110
110
|
openMenu: "canvas" | null;
|
|
111
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
111
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
112
112
|
openSidebar: {
|
|
113
113
|
name: import("../types").SidebarName;
|
|
114
114
|
tab?: import("../types").SidebarTabName;
|
|
@@ -299,7 +299,7 @@ export declare const actionUngroup: {
|
|
|
299
299
|
isRotating: boolean;
|
|
300
300
|
zoom: import("../types").Zoom;
|
|
301
301
|
openMenu: "canvas" | null;
|
|
302
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
302
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
303
303
|
openSidebar: {
|
|
304
304
|
name: import("../types").SidebarName;
|
|
305
305
|
tab?: import("../types").SidebarTabName;
|
|
@@ -135,7 +135,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
135
135
|
isRotating: boolean;
|
|
136
136
|
zoom: import("../types").Zoom;
|
|
137
137
|
openMenu: "canvas" | null;
|
|
138
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
138
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
139
139
|
openSidebar: {
|
|
140
140
|
name: import("../types").SidebarName;
|
|
141
141
|
tab?: import("../types").SidebarTabName;
|
|
@@ -515,6 +515,7 @@ export declare const actionTogglePolygon: {
|
|
|
515
515
|
status: "pending" | "saved" | "error";
|
|
516
516
|
scale: [number, number];
|
|
517
517
|
crop: import("@excalidraw/element/types").ImageCrop | null;
|
|
518
|
+
gifPlayback: import("@excalidraw/element/types").ExcalidrawGifPlayback | null;
|
|
518
519
|
}> & {
|
|
519
520
|
index: import("@excalidraw/element/types").FractionalIndex;
|
|
520
521
|
}) | (Readonly<{
|
|
@@ -98,7 +98,7 @@ export declare const actionLink: {
|
|
|
98
98
|
isResizing: boolean;
|
|
99
99
|
isRotating: boolean;
|
|
100
100
|
zoom: import("../types").Zoom;
|
|
101
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
101
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
102
102
|
openSidebar: {
|
|
103
103
|
name: import("../types").SidebarName;
|
|
104
104
|
tab?: import("../types").SidebarTabName;
|
|
@@ -139,7 +139,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
139
139
|
isRotating: boolean;
|
|
140
140
|
zoom: import("../types").Zoom;
|
|
141
141
|
openMenu: "canvas" | null;
|
|
142
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
142
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
143
143
|
openSidebar: {
|
|
144
144
|
name: import("../types").SidebarName;
|
|
145
145
|
tab?: import("../types").SidebarTabName;
|
|
@@ -326,7 +326,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
326
326
|
isRotating: boolean;
|
|
327
327
|
zoom: import("../types").Zoom;
|
|
328
328
|
openMenu: "canvas" | null;
|
|
329
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
329
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
330
330
|
openSidebar: {
|
|
331
331
|
name: import("../types").SidebarName;
|
|
332
332
|
tab?: import("../types").SidebarTabName;
|
|
@@ -106,7 +106,7 @@ export declare const actionSelectAll: {
|
|
|
106
106
|
isRotating: boolean;
|
|
107
107
|
zoom: import("../types").Zoom;
|
|
108
108
|
openMenu: "canvas" | null;
|
|
109
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
109
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
110
110
|
openSidebar: {
|
|
111
111
|
name: import("../types").SidebarName;
|
|
112
112
|
tab?: import("../types").SidebarTabName;
|
|
@@ -104,7 +104,7 @@ export declare const actionCopyStyles: {
|
|
|
104
104
|
isRotating: boolean;
|
|
105
105
|
zoom: import("../types").Zoom;
|
|
106
106
|
openMenu: "canvas" | null;
|
|
107
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
107
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
108
108
|
openSidebar: {
|
|
109
109
|
name: import("../types").SidebarName;
|
|
110
110
|
tab?: import("../types").SidebarTabName;
|
|
@@ -100,7 +100,7 @@ export declare const actionToggleArrowBinding: {
|
|
|
100
100
|
isRotating: boolean;
|
|
101
101
|
zoom: import("../types").Zoom;
|
|
102
102
|
openMenu: "canvas" | null;
|
|
103
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
103
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
104
104
|
openSidebar: {
|
|
105
105
|
name: import("../types").SidebarName;
|
|
106
106
|
tab?: import("../types").SidebarTabName;
|
|
@@ -104,7 +104,7 @@ export declare const actionToggleGridMode: {
|
|
|
104
104
|
isRotating: boolean;
|
|
105
105
|
zoom: import("../types").Zoom;
|
|
106
106
|
openMenu: "canvas" | null;
|
|
107
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
107
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
108
108
|
openSidebar: {
|
|
109
109
|
name: import("../types").SidebarName;
|
|
110
110
|
tab?: import("../types").SidebarTabName;
|
|
@@ -100,7 +100,7 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
100
100
|
isRotating: boolean;
|
|
101
101
|
zoom: import("../types").Zoom;
|
|
102
102
|
openMenu: "canvas" | null;
|
|
103
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
103
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
104
104
|
openSidebar: {
|
|
105
105
|
name: import("../types").SidebarName;
|
|
106
106
|
tab?: import("../types").SidebarTabName;
|
|
@@ -103,7 +103,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
103
103
|
isRotating: boolean;
|
|
104
104
|
zoom: import("../types").Zoom;
|
|
105
105
|
openMenu: "canvas" | null;
|
|
106
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
106
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
107
107
|
openSidebar: {
|
|
108
108
|
name: import("../types").SidebarName;
|
|
109
109
|
tab?: import("../types").SidebarTabName;
|
|
@@ -108,7 +108,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
108
108
|
isRotating: boolean;
|
|
109
109
|
zoom: import("../types").Zoom;
|
|
110
110
|
openMenu: "canvas" | null;
|
|
111
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
111
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
112
112
|
defaultSidebarDockedPreference: boolean;
|
|
113
113
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
114
114
|
selectedElementIds: Readonly<{
|
|
@@ -105,7 +105,7 @@ export declare const actionToggleStats: {
|
|
|
105
105
|
isRotating: boolean;
|
|
106
106
|
zoom: import("../types").Zoom;
|
|
107
107
|
openMenu: "canvas" | null;
|
|
108
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
108
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
109
109
|
openSidebar: {
|
|
110
110
|
name: import("../types").SidebarName;
|
|
111
111
|
tab?: import("../types").SidebarTabName;
|
|
@@ -102,7 +102,7 @@ export declare const actionToggleViewMode: {
|
|
|
102
102
|
isRotating: boolean;
|
|
103
103
|
zoom: import("../types").Zoom;
|
|
104
104
|
openMenu: "canvas" | null;
|
|
105
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
105
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | "gifFrameGallery" | "gifSpeedPicker" | null;
|
|
106
106
|
openSidebar: {
|
|
107
107
|
name: import("../types").SidebarName;
|
|
108
108
|
tab?: import("../types").SidebarTabName;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { AppEventBus, type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
|
|
3
3
|
import { LinearElementEditor, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
|
|
4
4
|
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
5
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeleted, FileId, NonDeletedExcalidrawElement, ExcalidrawTextContainer, ExcalidrawFrameLikeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
5
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeleted, ExcalidrawImageElement, FileId, NonDeletedExcalidrawElement, ExcalidrawTextContainer, ExcalidrawFrameLikeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
6
6
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
7
7
|
import { ActionManager } from "../actions/manager";
|
|
8
8
|
import { History } from "../history";
|
|
@@ -124,6 +124,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
124
124
|
bucketFill: AppBucketFill;
|
|
125
125
|
flowchart: AppFlowchart;
|
|
126
126
|
cursor: AppCursor;
|
|
127
|
+
private gifPlayback;
|
|
127
128
|
private zDragZoom;
|
|
128
129
|
arrowText: AppArrowText;
|
|
129
130
|
viewport: AppViewport;
|
|
@@ -400,6 +401,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
400
401
|
dismissLinearEditor: () => void;
|
|
401
402
|
syncActionResult: (actionResult: ActionResult) => void;
|
|
402
403
|
scheduleCapture: () => void;
|
|
404
|
+
scheduleUpdate: () => void;
|
|
403
405
|
private onBlur;
|
|
404
406
|
private onUnload;
|
|
405
407
|
private disableEvent;
|
|
@@ -890,7 +892,12 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
890
892
|
private getImageNaturalDimensions;
|
|
891
893
|
/** updates image cache, refreshing updated elements and/or setting status
|
|
892
894
|
to error for images that fail during <img> element creation */
|
|
895
|
+
private handleImageCacheUpdate;
|
|
893
896
|
private updateImageCache;
|
|
897
|
+
ensureGifPlaybackLoop: () => void;
|
|
898
|
+
loadDeferredGif: (fileId: FileId) => Promise<void>;
|
|
899
|
+
getGifPlaybackFrameIndex: (element: ExcalidrawImageElement) => number | undefined;
|
|
900
|
+
setGifPlaybackFrameIndex: (element: ExcalidrawImageElement, frameIndex: number) => void;
|
|
894
901
|
/** adds new images to imageCache and re-renders if needed */
|
|
895
902
|
private addNewImagesToImageCache;
|
|
896
903
|
/** generally you should use `addNewImagesToImageCache()` directly if you need
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ExcalidrawImageElement, FileId, InitializedExcalidrawImageElement, NonDeleted } from "@excalidraw/element/types";
|
|
2
|
+
import type App from "./App";
|
|
3
|
+
export declare class AppGifPlayback {
|
|
4
|
+
private app;
|
|
5
|
+
private playbackRaf;
|
|
6
|
+
private runtimeState;
|
|
7
|
+
constructor(app: App);
|
|
8
|
+
stop: () => void;
|
|
9
|
+
getFrameIndex: (element: ExcalidrawImageElement) => number | undefined;
|
|
10
|
+
setFrameIndex: (element: ExcalidrawImageElement, frameIndex: number) => void;
|
|
11
|
+
ensureLoop: () => void;
|
|
12
|
+
createPlaceholderDecodeState: (placeholderImageElement: ExcalidrawImageElement, imageFile: File) => FileId | null;
|
|
13
|
+
ensureElementPlaybackMetadata: (element: NonDeleted<InitializedExcalidrawImageElement>, opts?: {
|
|
14
|
+
playing?: boolean;
|
|
15
|
+
}) => NonDeleted<InitializedExcalidrawImageElement>;
|
|
16
|
+
removePlaceholderDecodeState: (placeholderGifFileId: FileId | null) => void;
|
|
17
|
+
private tick;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./GifPlaybackControls.scss";
|
|
3
|
+
import type { AppClassProperties, AppState, BinaryFiles } from "../types";
|
|
4
|
+
type GifPlaybackControlsProps = {
|
|
5
|
+
app: AppClassProperties;
|
|
6
|
+
files: BinaryFiles;
|
|
7
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
8
|
+
};
|
|
9
|
+
export declare const GifPlaybackControls: ({ app, files, setAppState, }: GifPlaybackControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -9,6 +9,7 @@ type Opts = {
|
|
|
9
9
|
export declare const createIcon: (d: string | React.ReactNode, opts?: number | Opts) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare const PlusPromoIcon: import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const PlusIcon: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const CirclePauseIcon: import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare const DotsIcon: import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export declare const DotsHorizontalIcon: import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export declare const PinIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -194,6 +195,9 @@ export declare const cutIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
194
195
|
export declare const helpIcon: import("react/jsx-runtime").JSX.Element;
|
|
195
196
|
export declare const playerPlayIcon: import("react/jsx-runtime").JSX.Element;
|
|
196
197
|
export declare const playerStopFilledIcon: import("react/jsx-runtime").JSX.Element;
|
|
198
|
+
export declare const prevFrame: import("react/jsx-runtime").JSX.Element;
|
|
199
|
+
export declare const nextFrame: import("react/jsx-runtime").JSX.Element;
|
|
200
|
+
export declare const frames: import("react/jsx-runtime").JSX.Element;
|
|
197
201
|
export declare const tablerCheckIcon: import("react/jsx-runtime").JSX.Element;
|
|
198
202
|
export declare const alertTriangleIcon: import("react/jsx-runtime").JSX.Element;
|
|
199
203
|
export declare const eyeDropperIconSvgPaths: readonly ["M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z", "M11 7l6 6"];
|