@zsviczian/excalidraw 0.17.1-obsidian-26 → 0.17.1-obsidian-28
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/excalidraw.development.js +182 -28
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +9 -0
- package/dist/styles.development.css +139 -41
- package/dist/styles.production.css +3 -3
- package/package.json +1 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +12 -3
- package/types/excalidraw/actions/actionBoundText.d.ts +8 -2
- package/types/excalidraw/actions/actionCanvas.d.ts +56 -14
- package/types/excalidraw/actions/actionClipboard.d.ts +28 -7
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +12 -3
- package/types/excalidraw/actions/actionElementLock.d.ts +8 -2
- package/types/excalidraw/actions/actionExport.d.ts +36 -9
- package/types/excalidraw/actions/actionFinalize.d.ts +8 -2
- package/types/excalidraw/actions/actionFrame.d.ts +16 -4
- package/types/excalidraw/actions/actionGroup.d.ts +8 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +4 -1
- package/types/excalidraw/actions/actionLink.d.ts +4 -1
- package/types/excalidraw/actions/actionMenu.d.ts +12 -3
- package/types/excalidraw/actions/actionNavigate.d.ts +8 -2
- package/types/excalidraw/actions/actionProperties.d.ts +52 -13
- package/types/excalidraw/actions/actionSelectAll.d.ts +4 -1
- package/types/excalidraw/actions/actionStyles.d.ts +4 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -1
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -1
- package/types/excalidraw/actions/actionToggleStats.d.ts +5 -1
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -1
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -1
- package/types/excalidraw/actions/types.d.ts +1 -1
- package/types/excalidraw/appState.d.ts +4 -1
- package/types/excalidraw/components/App.d.ts +3 -1
- package/types/excalidraw/components/Stats/Angle.d.ts +7 -0
- package/types/excalidraw/components/Stats/Collapsible.d.ts +8 -0
- package/types/excalidraw/components/Stats/Dimension.d.ts +8 -0
- package/types/excalidraw/components/Stats/DragInput.d.ts +22 -0
- package/types/excalidraw/components/Stats/FontSize.d.ts +7 -0
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +9 -0
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +12 -0
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +9 -0
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +12 -0
- package/types/excalidraw/components/Stats/Position.d.ts +8 -0
- package/types/excalidraw/components/Stats/index.d.ts +15 -0
- package/types/excalidraw/components/Stats/utils.d.ts +15 -0
- package/types/excalidraw/components/icons.d.ts +3 -0
- package/types/excalidraw/constants.d.ts +5 -0
- package/types/excalidraw/element/embeddable.d.ts +4 -1
- package/types/excalidraw/element/linearElementEditor.d.ts +4 -1
- package/types/excalidraw/element/resizeElements.d.ts +9 -1
- package/types/excalidraw/groups.d.ts +1 -1
- package/types/excalidraw/math.d.ts +2 -0
- package/types/excalidraw/mermaid.d.ts +2 -0
- package/types/excalidraw/scene/Scene.d.ts +3 -0
- package/types/excalidraw/types.d.ts +6 -1
|
@@ -158,7 +158,10 @@ export declare const actionChangeFillStyle: {
|
|
|
158
158
|
isSpeaking?: boolean | undefined;
|
|
159
159
|
isMuted?: boolean | undefined;
|
|
160
160
|
}>>;
|
|
161
|
-
|
|
161
|
+
stats: {
|
|
162
|
+
open: boolean;
|
|
163
|
+
panels: number;
|
|
164
|
+
};
|
|
162
165
|
currentChartType: import("../element/types").ChartType;
|
|
163
166
|
pasteDialog: {
|
|
164
167
|
shown: false;
|
|
@@ -355,7 +358,10 @@ export declare const actionChangeStrokeWidth: {
|
|
|
355
358
|
isSpeaking?: boolean | undefined;
|
|
356
359
|
isMuted?: boolean | undefined;
|
|
357
360
|
}>>;
|
|
358
|
-
|
|
361
|
+
stats: {
|
|
362
|
+
open: boolean;
|
|
363
|
+
panels: number;
|
|
364
|
+
};
|
|
359
365
|
currentChartType: import("../element/types").ChartType;
|
|
360
366
|
pasteDialog: {
|
|
361
367
|
shown: false;
|
|
@@ -552,7 +558,10 @@ export declare const actionChangeSloppiness: {
|
|
|
552
558
|
isSpeaking?: boolean | undefined;
|
|
553
559
|
isMuted?: boolean | undefined;
|
|
554
560
|
}>>;
|
|
555
|
-
|
|
561
|
+
stats: {
|
|
562
|
+
open: boolean;
|
|
563
|
+
panels: number;
|
|
564
|
+
};
|
|
556
565
|
currentChartType: import("../element/types").ChartType;
|
|
557
566
|
pasteDialog: {
|
|
558
567
|
shown: false;
|
|
@@ -749,7 +758,10 @@ export declare const actionChangeStrokeStyle: {
|
|
|
749
758
|
isSpeaking?: boolean | undefined;
|
|
750
759
|
isMuted?: boolean | undefined;
|
|
751
760
|
}>>;
|
|
752
|
-
|
|
761
|
+
stats: {
|
|
762
|
+
open: boolean;
|
|
763
|
+
panels: number;
|
|
764
|
+
};
|
|
753
765
|
currentChartType: import("../element/types").ChartType;
|
|
754
766
|
pasteDialog: {
|
|
755
767
|
shown: false;
|
|
@@ -946,7 +958,10 @@ export declare const actionChangeOpacity: {
|
|
|
946
958
|
isSpeaking?: boolean | undefined;
|
|
947
959
|
isMuted?: boolean | undefined;
|
|
948
960
|
}>>;
|
|
949
|
-
|
|
961
|
+
stats: {
|
|
962
|
+
open: boolean;
|
|
963
|
+
panels: number;
|
|
964
|
+
};
|
|
950
965
|
currentChartType: import("../element/types").ChartType;
|
|
951
966
|
pasteDialog: {
|
|
952
967
|
shown: false;
|
|
@@ -1144,7 +1159,10 @@ export declare const actionChangeFontSize: {
|
|
|
1144
1159
|
isSpeaking?: boolean | undefined;
|
|
1145
1160
|
isMuted?: boolean | undefined;
|
|
1146
1161
|
}>>;
|
|
1147
|
-
|
|
1162
|
+
stats: {
|
|
1163
|
+
open: boolean;
|
|
1164
|
+
panels: number;
|
|
1165
|
+
};
|
|
1148
1166
|
currentChartType: import("../element/types").ChartType;
|
|
1149
1167
|
pasteDialog: {
|
|
1150
1168
|
shown: false;
|
|
@@ -1342,7 +1360,10 @@ export declare const actionDecreaseFontSize: {
|
|
|
1342
1360
|
isSpeaking?: boolean | undefined;
|
|
1343
1361
|
isMuted?: boolean | undefined;
|
|
1344
1362
|
}>>;
|
|
1345
|
-
|
|
1363
|
+
stats: {
|
|
1364
|
+
open: boolean;
|
|
1365
|
+
panels: number;
|
|
1366
|
+
};
|
|
1346
1367
|
currentChartType: import("../element/types").ChartType;
|
|
1347
1368
|
pasteDialog: {
|
|
1348
1369
|
shown: false;
|
|
@@ -1540,7 +1561,10 @@ export declare const actionIncreaseFontSize: {
|
|
|
1540
1561
|
isSpeaking?: boolean | undefined;
|
|
1541
1562
|
isMuted?: boolean | undefined;
|
|
1542
1563
|
}>>;
|
|
1543
|
-
|
|
1564
|
+
stats: {
|
|
1565
|
+
open: boolean;
|
|
1566
|
+
panels: number;
|
|
1567
|
+
};
|
|
1544
1568
|
currentChartType: import("../element/types").ChartType;
|
|
1545
1569
|
pasteDialog: {
|
|
1546
1570
|
shown: false;
|
|
@@ -1737,7 +1761,10 @@ export declare const actionChangeFontFamily: {
|
|
|
1737
1761
|
isSpeaking?: boolean | undefined;
|
|
1738
1762
|
isMuted?: boolean | undefined;
|
|
1739
1763
|
}>>;
|
|
1740
|
-
|
|
1764
|
+
stats: {
|
|
1765
|
+
open: boolean;
|
|
1766
|
+
panels: number;
|
|
1767
|
+
};
|
|
1741
1768
|
currentChartType: import("../element/types").ChartType;
|
|
1742
1769
|
pasteDialog: {
|
|
1743
1770
|
shown: false;
|
|
@@ -1934,7 +1961,10 @@ export declare const actionChangeTextAlign: {
|
|
|
1934
1961
|
isSpeaking?: boolean | undefined;
|
|
1935
1962
|
isMuted?: boolean | undefined;
|
|
1936
1963
|
}>>;
|
|
1937
|
-
|
|
1964
|
+
stats: {
|
|
1965
|
+
open: boolean;
|
|
1966
|
+
panels: number;
|
|
1967
|
+
};
|
|
1938
1968
|
currentChartType: import("../element/types").ChartType;
|
|
1939
1969
|
pasteDialog: {
|
|
1940
1970
|
shown: false;
|
|
@@ -2133,7 +2163,10 @@ export declare const actionChangeVerticalAlign: {
|
|
|
2133
2163
|
isSpeaking?: boolean | undefined;
|
|
2134
2164
|
isMuted?: boolean | undefined;
|
|
2135
2165
|
}>>;
|
|
2136
|
-
|
|
2166
|
+
stats: {
|
|
2167
|
+
open: boolean;
|
|
2168
|
+
panels: number;
|
|
2169
|
+
};
|
|
2137
2170
|
currentChartType: import("../element/types").ChartType;
|
|
2138
2171
|
pasteDialog: {
|
|
2139
2172
|
shown: false;
|
|
@@ -2330,7 +2363,10 @@ export declare const actionChangeRoundness: {
|
|
|
2330
2363
|
isSpeaking?: boolean | undefined;
|
|
2331
2364
|
isMuted?: boolean | undefined;
|
|
2332
2365
|
}>>;
|
|
2333
|
-
|
|
2366
|
+
stats: {
|
|
2367
|
+
open: boolean;
|
|
2368
|
+
panels: number;
|
|
2369
|
+
};
|
|
2334
2370
|
currentChartType: import("../element/types").ChartType;
|
|
2335
2371
|
pasteDialog: {
|
|
2336
2372
|
shown: false;
|
|
@@ -2530,7 +2566,10 @@ export declare const actionChangeArrowhead: {
|
|
|
2530
2566
|
isSpeaking?: boolean | undefined;
|
|
2531
2567
|
isMuted?: boolean | undefined;
|
|
2532
2568
|
}>>;
|
|
2533
|
-
|
|
2569
|
+
stats: {
|
|
2570
|
+
open: boolean;
|
|
2571
|
+
panels: number;
|
|
2572
|
+
};
|
|
2534
2573
|
currentChartType: import("../element/types").ChartType;
|
|
2535
2574
|
pasteDialog: {
|
|
2536
2575
|
shown: false;
|
|
@@ -142,7 +142,10 @@ export declare const actionSelectAll: {
|
|
|
142
142
|
isSpeaking?: boolean | undefined;
|
|
143
143
|
isMuted?: boolean | undefined;
|
|
144
144
|
}>>;
|
|
145
|
-
|
|
145
|
+
stats: {
|
|
146
|
+
open: boolean;
|
|
147
|
+
panels: number;
|
|
148
|
+
};
|
|
146
149
|
currentChartType: import("../element/types").ChartType;
|
|
147
150
|
pasteDialog: {
|
|
148
151
|
shown: false;
|
|
@@ -137,7 +137,10 @@ export declare const actionCopyStyles: {
|
|
|
137
137
|
isSpeaking?: boolean | undefined;
|
|
138
138
|
isMuted?: boolean | undefined;
|
|
139
139
|
}>>;
|
|
140
|
-
|
|
140
|
+
stats: {
|
|
141
|
+
open: boolean;
|
|
142
|
+
panels: number;
|
|
143
|
+
};
|
|
141
144
|
currentChartType: import("../element/types").ChartType;
|
|
142
145
|
pasteDialog: {
|
|
143
146
|
shown: false;
|
|
@@ -143,7 +143,10 @@ export declare const actionToggleGridMode: {
|
|
|
143
143
|
isSpeaking?: boolean | undefined;
|
|
144
144
|
isMuted?: boolean | undefined;
|
|
145
145
|
}>>;
|
|
146
|
-
|
|
146
|
+
stats: {
|
|
147
|
+
open: boolean;
|
|
148
|
+
panels: number;
|
|
149
|
+
};
|
|
147
150
|
currentChartType: import("../element/types").ChartType;
|
|
148
151
|
pasteDialog: {
|
|
149
152
|
shown: false;
|
|
@@ -141,7 +141,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
141
141
|
isSpeaking?: boolean | undefined;
|
|
142
142
|
isMuted?: boolean | undefined;
|
|
143
143
|
}>>;
|
|
144
|
-
|
|
144
|
+
stats: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
panels: number;
|
|
147
|
+
};
|
|
145
148
|
currentChartType: import("../element/types").ChartType;
|
|
146
149
|
pasteDialog: {
|
|
147
150
|
shown: false;
|
|
@@ -7,9 +7,13 @@ export declare const actionToggleStats: {
|
|
|
7
7
|
trackEvent: {
|
|
8
8
|
category: "menu";
|
|
9
9
|
};
|
|
10
|
+
keywords: string[];
|
|
10
11
|
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
11
12
|
appState: {
|
|
12
|
-
|
|
13
|
+
stats: {
|
|
14
|
+
open: boolean;
|
|
15
|
+
panels: number;
|
|
16
|
+
};
|
|
13
17
|
contextMenu: {
|
|
14
18
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
15
19
|
top: number;
|
|
@@ -141,7 +141,10 @@ export declare const actionToggleViewMode: {
|
|
|
141
141
|
isSpeaking?: boolean | undefined;
|
|
142
142
|
isMuted?: boolean | undefined;
|
|
143
143
|
}>>;
|
|
144
|
-
|
|
144
|
+
stats: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
panels: number;
|
|
147
|
+
};
|
|
145
148
|
currentChartType: import("../element/types").ChartType;
|
|
146
149
|
pasteDialog: {
|
|
147
150
|
shown: false;
|
|
@@ -141,7 +141,10 @@ export declare const actionToggleZenMode: {
|
|
|
141
141
|
isSpeaking?: boolean | undefined;
|
|
142
142
|
isMuted?: boolean | undefined;
|
|
143
143
|
}>>;
|
|
144
|
-
|
|
144
|
+
stats: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
panels: number;
|
|
147
|
+
};
|
|
145
148
|
currentChartType: import("../element/types").ChartType;
|
|
146
149
|
pasteDialog: {
|
|
147
150
|
shown: false;
|
|
@@ -15,7 +15,7 @@ export type ActionResult = {
|
|
|
15
15
|
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
16
16
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
17
17
|
export type ActionFilterFn = (action: Action) => void;
|
|
18
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize";
|
|
18
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize" | "elementStats";
|
|
19
19
|
export type PanelComponentProps = {
|
|
20
20
|
elements: readonly ExcalidrawElement[];
|
|
21
21
|
appState: AppState;
|
|
@@ -56,7 +56,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
56
56
|
[groupId: string]: boolean;
|
|
57
57
|
} | undefined;
|
|
58
58
|
editingGroupId?: string | null | undefined;
|
|
59
|
-
|
|
59
|
+
stats?: {
|
|
60
|
+
open: boolean;
|
|
61
|
+
panels: number;
|
|
62
|
+
} | undefined;
|
|
60
63
|
currentChartType?: import("./element/types").ChartType | undefined;
|
|
61
64
|
selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
|
|
62
65
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
|
+
import type { ActionResult } from "../actions/types";
|
|
4
5
|
import type { EXPORT_IMAGE_TYPES } from "../constants";
|
|
5
6
|
import type { ExportedElements } from "../data";
|
|
6
7
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
@@ -256,7 +257,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
256
257
|
private onMagicSettingsConfirm;
|
|
257
258
|
onMagicframeToolSelect: () => void;
|
|
258
259
|
private openEyeDropper;
|
|
259
|
-
|
|
260
|
+
syncActionResult: (actionResult: ActionResult) => void;
|
|
260
261
|
private onBlur;
|
|
261
262
|
private onUnload;
|
|
262
263
|
private disableEvent;
|
|
@@ -358,6 +359,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
358
359
|
collaborators?: SceneData["collaborators"];
|
|
359
360
|
/** @default StoreAction.NONE */
|
|
360
361
|
storeAction?: SceneData["storeAction"];
|
|
362
|
+
forceFlushSync?: boolean | undefined;
|
|
361
363
|
}) => void;
|
|
362
364
|
private triggerRender;
|
|
363
365
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
interface AngleProps {
|
|
3
|
+
element: ExcalidrawElement;
|
|
4
|
+
elementsMap: ElementsMap;
|
|
5
|
+
}
|
|
6
|
+
declare const Angle: ({ element, elementsMap }: AngleProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Angle;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface CollapsibleProps {
|
|
2
|
+
label: React.ReactNode;
|
|
3
|
+
open: boolean;
|
|
4
|
+
openTrigger: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const Collapsible: ({ label, open, openTrigger, children, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Collapsible;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
interface DimensionDragInputProps {
|
|
3
|
+
property: "width" | "height";
|
|
4
|
+
element: ExcalidrawElement;
|
|
5
|
+
elementsMap: ElementsMap;
|
|
6
|
+
}
|
|
7
|
+
declare const DimensionDragInput: ({ property, element, elementsMap, }: DimensionDragInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default DimensionDragInput;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
import "./DragInput.scss";
|
|
3
|
+
export type DragInputCallbackType = ({ accumulatedChange, instantChange, originalElements, originalElementsMap, shouldKeepAspectRatio, shouldChangeByStepSize, nextValue, }: {
|
|
4
|
+
accumulatedChange: number;
|
|
5
|
+
instantChange: number;
|
|
6
|
+
originalElements: readonly ExcalidrawElement[];
|
|
7
|
+
originalElementsMap: ElementsMap;
|
|
8
|
+
shouldKeepAspectRatio: boolean;
|
|
9
|
+
shouldChangeByStepSize: boolean;
|
|
10
|
+
nextValue?: number;
|
|
11
|
+
}) => void;
|
|
12
|
+
interface StatsDragInputProps {
|
|
13
|
+
label: string | React.ReactNode;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
value: number | "Mixed";
|
|
16
|
+
elements: readonly ExcalidrawElement[];
|
|
17
|
+
editable?: boolean;
|
|
18
|
+
shouldKeepAspectRatio?: boolean;
|
|
19
|
+
dragInputCallback: DragInputCallbackType;
|
|
20
|
+
}
|
|
21
|
+
declare const StatsDragInput: ({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, }: StatsDragInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default StatsDragInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawTextElement } from "../../element/types";
|
|
2
|
+
interface FontSizeProps {
|
|
3
|
+
element: ExcalidrawTextElement;
|
|
4
|
+
elementsMap: ElementsMap;
|
|
5
|
+
}
|
|
6
|
+
declare const FontSize: ({ element, elementsMap }: FontSizeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default FontSize;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
import type Scene from "../../scene/Scene";
|
|
3
|
+
interface MultiAngleProps {
|
|
4
|
+
elements: readonly ExcalidrawElement[];
|
|
5
|
+
elementsMap: ElementsMap;
|
|
6
|
+
scene: Scene;
|
|
7
|
+
}
|
|
8
|
+
declare const MultiAngle: ({ elements, elementsMap, scene }: MultiAngleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default MultiAngle;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
import type Scene from "../../scene/Scene";
|
|
3
|
+
import type { AtomicUnit } from "./utils";
|
|
4
|
+
interface MultiDimensionProps {
|
|
5
|
+
property: "width" | "height";
|
|
6
|
+
elements: readonly ExcalidrawElement[];
|
|
7
|
+
elementsMap: ElementsMap;
|
|
8
|
+
atomicUnits: AtomicUnit[];
|
|
9
|
+
scene: Scene;
|
|
10
|
+
}
|
|
11
|
+
declare const MultiDimension: ({ property, elements, elementsMap, atomicUnits, scene, }: MultiDimensionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default MultiDimension;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
import type Scene from "../../scene/Scene";
|
|
3
|
+
interface MultiFontSizeProps {
|
|
4
|
+
elements: readonly ExcalidrawElement[];
|
|
5
|
+
elementsMap: ElementsMap;
|
|
6
|
+
scene: Scene;
|
|
7
|
+
}
|
|
8
|
+
declare const MultiFontSize: ({ elements, elementsMap, scene, }: MultiFontSizeProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default MultiFontSize;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
import type Scene from "../../scene/Scene";
|
|
3
|
+
import type { AtomicUnit } from "./utils";
|
|
4
|
+
interface MultiPositionProps {
|
|
5
|
+
property: "x" | "y";
|
|
6
|
+
elements: readonly ExcalidrawElement[];
|
|
7
|
+
elementsMap: ElementsMap;
|
|
8
|
+
atomicUnits: AtomicUnit[];
|
|
9
|
+
scene: Scene;
|
|
10
|
+
}
|
|
11
|
+
declare const MultiPosition: ({ property, elements, elementsMap, atomicUnits, scene, }: MultiPositionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default MultiPosition;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
|
+
interface PositionProps {
|
|
3
|
+
property: "x" | "y";
|
|
4
|
+
element: ExcalidrawElement;
|
|
5
|
+
elementsMap: ElementsMap;
|
|
6
|
+
}
|
|
7
|
+
declare const Position: ({ property, element, elementsMap }: PositionProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Position;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
|
+
import type { AppState, ExcalidrawProps } from "../../types";
|
|
3
|
+
import type Scene from "../../scene/Scene";
|
|
4
|
+
interface StatsProps {
|
|
5
|
+
scene: Scene;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
renderCustomStats: ExcalidrawProps["renderCustomStats"];
|
|
8
|
+
}
|
|
9
|
+
export declare const Stats: (props: StatsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const StatsInner: import("react").MemoExoticComponent<({ scene, onClose, renderCustomStats, selectedElements, appState, sceneNonce, }: StatsProps & {
|
|
11
|
+
sceneNonce: number;
|
|
12
|
+
selectedElements: readonly NonDeletedExcalidrawElement[];
|
|
13
|
+
appState: AppState;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
|
+
export declare const SMALLEST_DELTA = 0.01;
|
|
3
|
+
export declare const isPropertyEditable: (element: ExcalidrawElement, property: keyof ExcalidrawElement) => boolean;
|
|
4
|
+
export declare const getStepSizedValue: (value: number, stepSize: number) => number;
|
|
5
|
+
export type AtomicUnit = Record<string, true>;
|
|
6
|
+
export declare const getElementsInAtomicUnit: (atomicUnit: AtomicUnit, elementsMap: ElementsMap, originalElementsMap?: ElementsMap) => {
|
|
7
|
+
original: NonDeletedExcalidrawElement;
|
|
8
|
+
latest: NonDeletedExcalidrawElement;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const newOrigin: (x1: number, y1: number, w1: number, h1: number, w2: number, h2: number, angle: number) => {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const resizeElement: (nextWidth: number, nextHeight: number, keepAspectRatio: boolean, latestElement: ExcalidrawElement, origElement: ExcalidrawElement, elementsMap: ElementsMap, originalElementsMap: Map<string, ExcalidrawElement>, shouldInformMutation?: boolean) => void;
|
|
15
|
+
export declare const moveElement: (newTopLeftX: number, newTopLeftY: number, latestElement: ExcalidrawElement, originalElement: ExcalidrawElement, elementsMap: ElementsMap, originalElementsMap: ElementsMap, shouldInformMutation?: boolean) => void;
|
|
@@ -156,6 +156,7 @@ export declare const TextAlignBottomIcon: React.MemoExoticComponent<({ theme }:
|
|
|
156
156
|
export declare const TextAlignMiddleIcon: React.MemoExoticComponent<({ theme }: {
|
|
157
157
|
theme: Theme;
|
|
158
158
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
159
|
+
export declare const angleIcon: import("react/jsx-runtime").JSX.Element;
|
|
159
160
|
export declare const publishIcon: import("react/jsx-runtime").JSX.Element;
|
|
160
161
|
export declare const eraser: import("react/jsx-runtime").JSX.Element;
|
|
161
162
|
export declare const handIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -201,4 +202,6 @@ export declare const loginIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
201
202
|
export declare const youtubeIcon: import("react/jsx-runtime").JSX.Element;
|
|
202
203
|
export declare const gridIcon: import("react/jsx-runtime").JSX.Element;
|
|
203
204
|
export declare const lineEditorIcon: import("react/jsx-runtime").JSX.Element;
|
|
205
|
+
export declare const collapseDownIcon: import("react/jsx-runtime").JSX.Element;
|
|
206
|
+
export declare const collapseUpIcon: import("react/jsx-runtime").JSX.Element;
|
|
204
207
|
export {};
|
|
@@ -290,3 +290,8 @@ export declare const EDITOR_LS_KEYS: {
|
|
|
290
290
|
* where filename is optional and we can't retrieve name from app state
|
|
291
291
|
*/
|
|
292
292
|
export declare const DEFAULT_FILENAME = "Untitled";
|
|
293
|
+
export declare const STATS_PANELS: {
|
|
294
|
+
readonly generalStats: 1;
|
|
295
|
+
readonly elementProperties: 2;
|
|
296
|
+
};
|
|
297
|
+
export declare const MIN_WIDTH_OR_HEIGHT = 1;
|
|
@@ -146,7 +146,10 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
146
146
|
isSpeaking?: boolean | undefined;
|
|
147
147
|
isMuted?: boolean | undefined;
|
|
148
148
|
}>>;
|
|
149
|
-
|
|
149
|
+
stats: {
|
|
150
|
+
open: boolean;
|
|
151
|
+
panels: number;
|
|
152
|
+
};
|
|
150
153
|
currentChartType: import("./types").ChartType;
|
|
151
154
|
pasteDialog: {
|
|
152
155
|
shown: false;
|
|
@@ -253,7 +253,10 @@ export declare class LinearElementEditor {
|
|
|
253
253
|
isSpeaking?: boolean | undefined;
|
|
254
254
|
isMuted?: boolean | undefined;
|
|
255
255
|
}>>;
|
|
256
|
-
|
|
256
|
+
stats: {
|
|
257
|
+
open: boolean;
|
|
258
|
+
panels: number;
|
|
259
|
+
};
|
|
257
260
|
currentChartType: import("./types").ChartType;
|
|
258
261
|
pasteDialog: {
|
|
259
262
|
shown: false;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import type { ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, ElementsMap } from "./types";
|
|
1
|
+
import type { ExcalidrawLinearElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, NonDeleted, ElementsMap } from "./types";
|
|
2
2
|
import type { MaybeTransformHandleType, TransformHandleDirection } from "./transformHandles";
|
|
3
3
|
import type { PointerDownState } from "../types";
|
|
4
4
|
export declare const normalizeAngle: (angle: number) => number;
|
|
5
5
|
export declare const transformElements: (originalElements: PointerDownState["originalElements"], transformHandleType: MaybeTransformHandleType, selectedElements: readonly NonDeletedExcalidrawElement[], elementsMap: ElementsMap, shouldRotateWithDiscreteAngle: boolean, shouldResizeFromCenter: boolean, shouldMaintainAspectRatio: boolean, pointerX: number, pointerY: number, centerX: number, centerY: number) => boolean;
|
|
6
|
+
export declare const rescalePointsInElement: (element: NonDeletedExcalidrawElement, width: number, height: number, normalizePoints: boolean) => {
|
|
7
|
+
points: (readonly [number, number])[];
|
|
8
|
+
} | {
|
|
9
|
+
points?: undefined;
|
|
10
|
+
};
|
|
11
|
+
export declare const measureFontSizeFromWidth: (element: NonDeleted<ExcalidrawTextElement>, elementsMap: ElementsMap, nextWidth: number) => {
|
|
12
|
+
size: number;
|
|
13
|
+
} | null;
|
|
6
14
|
export declare const resizeSingleElement: (originalElements: PointerDownState["originalElements"], shouldMaintainAspectRatio: boolean, element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, transformHandleDirection: TransformHandleDirection, shouldResizeFromCenter: boolean, pointerX: number, pointerY: number) => void;
|
|
7
15
|
export declare const resizeMultipleElements: (originalElements: PointerDownState["originalElements"], selectedElements: readonly NonDeletedExcalidrawElement[], elementsMap: ElementsMap, transformHandleType: TransformHandleDirection, shouldResizeFromCenter: boolean, shouldMaintainAspectRatio: boolean, pointerX: number, pointerY: number) => void;
|
|
8
16
|
export declare const getResizeOffsetXY: (transformHandleType: MaybeTransformHandleType, selectedElements: NonDeletedExcalidrawElement[], elementsMap: ElementsMap, x: number, y: number) => [number, number];
|
|
@@ -29,5 +29,5 @@ export declare const removeFromSelectedGroups: (groupIds: ExcalidrawElement["gro
|
|
|
29
29
|
}) => string[];
|
|
30
30
|
export declare const getMaximumGroups: (elements: ExcalidrawElement[], elementsMap: ElementsMap) => ExcalidrawElement[][];
|
|
31
31
|
export declare const getNonDeletedGroupIds: (elements: ElementsMap) => Set<string>;
|
|
32
|
-
export declare const elementsAreInSameGroup: (elements: ExcalidrawElement[]) => boolean;
|
|
32
|
+
export declare const elementsAreInSameGroup: (elements: readonly ExcalidrawElement[]) => boolean;
|
|
33
33
|
export declare const isInGroup: (element: NonDeletedExcalidrawElement) => boolean;
|
|
@@ -28,6 +28,8 @@ export declare const getBezierCurveLength: (element: NonDeleted<ExcalidrawLinear
|
|
|
28
28
|
export declare const mapIntervalToBezierT: (element: NonDeleted<ExcalidrawLinearElement>, endPoint: readonly [number, number], interval: number) => number;
|
|
29
29
|
export declare const arePointsEqual: (p1: readonly [number, number], p2: readonly [number, number]) => boolean;
|
|
30
30
|
export declare const isRightAngle: (angle: number) => boolean;
|
|
31
|
+
export declare const radianToDegree: (r: number) => number;
|
|
32
|
+
export declare const degreeToRadian: (d: number) => number;
|
|
31
33
|
export declare const rangesOverlap: ([a0, a1]: [number, number], [b0, b1]: [number, number]) => boolean;
|
|
32
34
|
export declare const rangeIntersection: (rangeA: [number, number], rangeB: [number, number]) => [number, number] | null;
|
|
33
35
|
export declare const isValueInRange: (value: number, min: number, max: number) => boolean;
|
|
@@ -10,6 +10,9 @@ declare class Scene {
|
|
|
10
10
|
private static sceneMapByElement;
|
|
11
11
|
private static sceneMapById;
|
|
12
12
|
static mapElementToScene(elementKey: ElementKey, scene: Scene): void;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated pass down `app.scene` and use it directly
|
|
15
|
+
*/
|
|
13
16
|
static getScene(elementKey: ElementKey): Scene | null;
|
|
14
17
|
private callbacks;
|
|
15
18
|
private nonDeletedElements;
|
|
@@ -277,7 +277,11 @@ export interface AppState {
|
|
|
277
277
|
offsetLeft: number;
|
|
278
278
|
fileHandle: FileSystemHandle | null;
|
|
279
279
|
collaborators: Map<SocketId, Collaborator>;
|
|
280
|
-
|
|
280
|
+
stats: {
|
|
281
|
+
open: boolean;
|
|
282
|
+
/** bitmap. Use `STATS_PANELS` bit values */
|
|
283
|
+
panels: number;
|
|
284
|
+
};
|
|
281
285
|
currentChartType: ChartType;
|
|
282
286
|
pasteDialog: {
|
|
283
287
|
shown: false;
|
|
@@ -502,6 +506,7 @@ export type AppClassProperties = {
|
|
|
502
506
|
files: BinaryFiles;
|
|
503
507
|
device: App["device"];
|
|
504
508
|
scene: App["scene"];
|
|
509
|
+
syncActionResult: App["syncActionResult"];
|
|
505
510
|
pasteFromClipboard: App["pasteFromClipboard"];
|
|
506
511
|
id: App["id"];
|
|
507
512
|
onInsertElements: App["onInsertElements"];
|