@excalidraw/excalidraw 0.17.1-d2f67e6 → 0.17.1-e63dd02
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/CHANGELOG.md +4 -0
- package/dist/browser/dev/excalidraw-assets-dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-EM6LVGFW.js → chunk-IT7T3AIK.js} +23 -5
- package/dist/browser/dev/excalidraw-assets-dev/chunk-IT7T3AIK.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-B4UMSLQQ.js → chunk-RNHSD5AR.js} +7451 -2098
- package/dist/browser/dev/excalidraw-assets-dev/chunk-RNHSD5AR.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{dist-6QVAH5JA.js → dist-DNSPZDOZ.js} +31 -19
- package/dist/browser/dev/excalidraw-assets-dev/dist-DNSPZDOZ.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-AZFA5HJJ.js → en-XV7OZCPP.js} +6 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-V7E6IT6R.js → image-77HZYGLG.js} +2 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css → image-WDHYGKKP.css} +1 -1
- package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css.map → image-WDHYGKKP.css.map} +2 -2
- package/dist/browser/dev/index.css +449 -114
- package/dist/browser/dev/index.css.map +3 -3
- package/dist/browser/dev/index.js +4143 -5956
- package/dist/browser/dev/index.js.map +4 -4
- package/dist/browser/prod/excalidraw-assets/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/chunk-OYEADJSR.js +63 -0
- package/dist/browser/prod/excalidraw-assets/{chunk-7DXALCB2.js → chunk-PDYFZJMS.js} +3 -3
- package/dist/browser/prod/excalidraw-assets/dist-NLUQPPQQ.js +7 -0
- package/dist/browser/prod/excalidraw-assets/en-YVAVVILW.js +1 -0
- package/dist/browser/prod/excalidraw-assets/image-X3GFZHNN.js +1 -0
- package/dist/browser/prod/index.css +1 -1
- package/dist/browser/prod/index.js +40 -50
- package/dist/dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/dev/{en-EB2MBPAV.json → en-YNVBSAIL.json} +18 -4
- package/dist/dev/index.css +449 -114
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +21626 -18122
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionAddToLibrary.d.ts +9 -3
- package/dist/excalidraw/actions/actionBoundText.d.ts +6 -2
- package/dist/excalidraw/actions/actionCanvas.d.ts +36 -12
- package/dist/excalidraw/actions/actionClipboard.d.ts +22 -7
- package/dist/excalidraw/actions/actionDeleteSelected.d.ts +12 -5
- package/dist/excalidraw/actions/actionDeleteSelected.js +24 -5
- package/dist/excalidraw/actions/actionDuplicateSelection.js +1 -2
- package/dist/excalidraw/actions/actionElementLock.d.ts +6 -2
- package/dist/excalidraw/actions/actionExport.d.ts +27 -9
- package/dist/excalidraw/actions/actionFinalize.d.ts +6 -2
- package/dist/excalidraw/actions/actionFinalize.js +2 -2
- package/dist/excalidraw/actions/actionFlip.js +2 -2
- package/dist/excalidraw/actions/actionFrame.d.ts +12 -4
- package/dist/excalidraw/actions/actionGroup.d.ts +6 -2
- package/dist/excalidraw/actions/actionHistory.js +4 -4
- package/dist/excalidraw/actions/actionLinearEditor.d.ts +3 -1
- package/dist/excalidraw/actions/actionLinearEditor.js +3 -2
- package/dist/excalidraw/actions/actionLink.d.ts +3 -1
- package/dist/excalidraw/actions/actionMenu.d.ts +9 -3
- package/dist/excalidraw/actions/actionNavigate.d.ts +6 -2
- package/dist/excalidraw/actions/actionProperties.d.ts +411 -56
- package/dist/excalidraw/actions/actionProperties.js +383 -58
- package/dist/excalidraw/actions/actionSelectAll.d.ts +3 -1
- package/dist/excalidraw/actions/actionStyles.d.ts +3 -1
- package/dist/excalidraw/actions/actionStyles.js +3 -2
- package/dist/excalidraw/actions/actionToggleGridMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleStats.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleViewMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleZenMode.d.ts +3 -1
- package/dist/excalidraw/actions/types.d.ts +1 -1
- package/dist/excalidraw/analytics.js +9 -7
- package/dist/excalidraw/appState.d.ts +1 -0
- package/dist/excalidraw/appState.js +9 -1
- package/dist/excalidraw/binaryheap.d.ts +12 -0
- package/dist/excalidraw/binaryheap.js +93 -0
- package/dist/excalidraw/change.d.ts +2 -1
- package/dist/excalidraw/change.js +6 -4
- package/dist/excalidraw/charts.js +0 -10
- package/dist/excalidraw/components/Actions.js +7 -5
- package/dist/excalidraw/components/App.d.ts +5 -9
- package/dist/excalidraw/components/App.js +218 -161
- package/dist/excalidraw/components/ButtonIcon.d.ts +15 -0
- package/dist/excalidraw/components/ButtonIcon.js +8 -0
- package/dist/excalidraw/components/ButtonIconSelect.js +2 -3
- package/dist/excalidraw/components/ButtonSeparator.d.ts +2 -0
- package/dist/excalidraw/components/ButtonSeparator.js +7 -0
- package/dist/excalidraw/components/ColorPicker/ColorPicker.js +47 -79
- package/dist/excalidraw/components/ColorPicker/Picker.js +1 -1
- package/dist/excalidraw/components/FontPicker/FontPicker.d.ts +21 -0
- package/dist/excalidraw/components/FontPicker/FontPicker.js +49 -0
- package/dist/excalidraw/components/FontPicker/FontPickerList.d.ts +25 -0
- package/dist/excalidraw/components/FontPicker/FontPickerList.js +119 -0
- package/dist/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +7 -0
- package/dist/excalidraw/components/FontPicker/FontPickerTrigger.js +13 -0
- package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +14 -0
- package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.js +38 -0
- package/dist/excalidraw/components/HelpDialog.js +1 -1
- package/dist/excalidraw/components/HintViewer.js +6 -3
- package/dist/excalidraw/components/PropertiesPopover.d.ts +15 -0
- package/dist/excalidraw/components/PropertiesPopover.js +31 -0
- package/dist/excalidraw/components/QuickSearch.d.ts +9 -0
- package/dist/excalidraw/components/QuickSearch.js +8 -0
- package/dist/excalidraw/components/ScrollableList.d.ts +9 -0
- package/dist/excalidraw/components/ScrollableList.js +8 -0
- package/dist/excalidraw/components/Stats/Angle.d.ts +7 -3
- package/dist/excalidraw/components/Stats/Angle.js +39 -31
- package/dist/excalidraw/components/Stats/Dimension.d.ts +6 -3
- package/dist/excalidraw/components/Stats/Dimension.js +51 -49
- package/dist/excalidraw/components/Stats/DragInput.d.ts +15 -6
- package/dist/excalidraw/components/Stats/DragInput.js +59 -26
- package/dist/excalidraw/components/Stats/FontSize.d.ts +8 -4
- package/dist/excalidraw/components/Stats/FontSize.js +39 -36
- package/dist/excalidraw/components/Stats/MultiAngle.d.ts +5 -3
- package/dist/excalidraw/components/Stats/MultiAngle.js +43 -34
- package/dist/excalidraw/components/Stats/MultiDimension.d.ts +5 -3
- package/dist/excalidraw/components/Stats/MultiDimension.js +101 -99
- package/dist/excalidraw/components/Stats/MultiFontSize.d.ts +6 -3
- package/dist/excalidraw/components/Stats/MultiFontSize.js +47 -32
- package/dist/excalidraw/components/Stats/MultiPosition.d.ts +3 -1
- package/dist/excalidraw/components/Stats/MultiPosition.js +52 -48
- package/dist/excalidraw/components/Stats/Position.d.ts +5 -1
- package/dist/excalidraw/components/Stats/Position.js +31 -29
- package/dist/excalidraw/components/Stats/index.js +5 -17
- package/dist/excalidraw/components/Stats/utils.d.ts +14 -3
- package/dist/excalidraw/components/Stats/utils.js +48 -9
- package/dist/excalidraw/components/TTDDialog/common.d.ts +2 -2
- package/dist/excalidraw/components/TTDDialog/common.js +3 -7
- package/dist/excalidraw/components/UserList.js +22 -22
- package/dist/excalidraw/components/canvases/StaticCanvas.js +1 -0
- package/dist/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +12 -3
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +24 -4
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.js +55 -14
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.js +2 -2
- package/dist/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/excalidraw/components/dropdownMenu/common.js +3 -2
- package/dist/excalidraw/components/icons.d.ts +4 -0
- package/dist/excalidraw/components/icons.js +7 -0
- package/dist/excalidraw/components/main-menu/MainMenu.d.ts +12 -3
- package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Center.js +2 -2
- package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Hints.js +3 -3
- package/dist/excalidraw/constants.d.ts +17 -2
- package/dist/excalidraw/constants.js +21 -4
- package/dist/excalidraw/data/reconcile.js +18 -1
- package/dist/excalidraw/data/restore.js +55 -9
- package/dist/excalidraw/data/transform.js +8 -5
- package/dist/excalidraw/element/binding.d.ts +28 -9
- package/dist/excalidraw/element/binding.js +303 -71
- package/dist/excalidraw/element/collision.d.ts +1 -1
- package/dist/excalidraw/element/collision.js +4 -1
- package/dist/excalidraw/element/dragElements.d.ts +2 -2
- package/dist/excalidraw/element/dragElements.js +13 -3
- package/dist/excalidraw/element/embeddable.d.ts +3 -1
- package/dist/excalidraw/element/heading.d.ts +11 -0
- package/dist/excalidraw/element/heading.js +81 -0
- package/dist/excalidraw/element/index.d.ts +1 -1
- package/dist/excalidraw/element/index.js +1 -1
- package/dist/excalidraw/element/linearElementEditor.d.ts +21 -13
- package/dist/excalidraw/element/linearElementEditor.js +133 -56
- package/dist/excalidraw/element/newElement.d.ts +8 -3
- package/dist/excalidraw/element/newElement.js +15 -2
- package/dist/excalidraw/element/resizeElements.d.ts +4 -3
- package/dist/excalidraw/element/resizeElements.js +47 -23
- package/dist/excalidraw/element/routing.d.ts +13 -0
- package/dist/excalidraw/element/routing.js +641 -0
- package/dist/excalidraw/element/textElement.d.ts +3 -26
- package/dist/excalidraw/element/textElement.js +54 -110
- package/dist/excalidraw/element/textWysiwyg.js +39 -47
- package/dist/excalidraw/element/transformHandles.js +7 -2
- package/dist/excalidraw/element/typeChecks.d.ts +5 -2
- package/dist/excalidraw/element/typeChecks.js +17 -0
- package/dist/excalidraw/element/types.d.ts +12 -1
- package/dist/excalidraw/fonts/ExcalidrawFont.d.ts +21 -0
- package/dist/excalidraw/fonts/ExcalidrawFont.js +112 -0
- package/dist/excalidraw/fonts/index.d.ts +58 -0
- package/dist/excalidraw/fonts/index.js +240 -0
- package/dist/excalidraw/fonts/metadata.d.ts +36 -0
- package/dist/excalidraw/fonts/metadata.js +91 -0
- package/dist/excalidraw/fractionalIndex.d.ts +11 -4
- package/dist/excalidraw/fractionalIndex.js +38 -6
- package/dist/excalidraw/frame.d.ts +1 -1
- package/dist/excalidraw/frame.js +3 -3
- package/dist/excalidraw/history.d.ts +4 -3
- package/dist/excalidraw/history.js +8 -8
- package/dist/excalidraw/index.d.ts +1 -1
- package/dist/excalidraw/index.js +3 -3
- package/dist/excalidraw/locales/en.json +18 -4
- package/dist/excalidraw/math.d.ts +43 -0
- package/dist/excalidraw/math.js +110 -0
- package/dist/excalidraw/mermaid.js +4 -3
- package/dist/excalidraw/renderer/interactiveScene.js +33 -17
- package/dist/excalidraw/renderer/renderElement.d.ts +2 -0
- package/dist/excalidraw/renderer/renderElement.js +74 -54
- package/dist/excalidraw/renderer/staticSvgScene.js +2 -1
- package/dist/excalidraw/scene/Scene.js +9 -3
- package/dist/excalidraw/scene/Shape.js +56 -5
- package/dist/excalidraw/scene/comparisons.d.ts +1 -0
- package/dist/excalidraw/scene/comparisons.js +1 -1
- package/dist/excalidraw/scene/export.d.ts +2 -1
- package/dist/excalidraw/scene/export.js +33 -35
- package/dist/excalidraw/scene/types.d.ts +1 -4
- package/dist/excalidraw/shapes.d.ts +8 -0
- package/dist/excalidraw/shapes.js +57 -0
- package/dist/excalidraw/types.d.ts +8 -3
- package/dist/excalidraw/utils.d.ts +11 -1
- package/dist/excalidraw/utils.js +22 -0
- package/dist/prod/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/prod/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/prod/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/prod/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/prod/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/prod/{en-EB2MBPAV.json → en-YNVBSAIL.json} +18 -4
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +49 -53
- package/dist/utils/export.d.ts +2 -1
- package/dist/utils/export.js +2 -1
- package/dist/utils/geometry/geometry.d.ts +2 -1
- package/dist/utils/geometry/geometry.js +5 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/history.ts +9 -2
- package/package.json +2 -2
- package/dist/browser/dev/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/browser/dev/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/chunk-B4UMSLQQ.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/chunk-EM6LVGFW.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/dist-6QVAH5JA.js.map +0 -7
- package/dist/browser/prod/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/browser/prod/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/chunk-EGOLGOLD.js +0 -55
- package/dist/browser/prod/excalidraw-assets/dist-567JAXHK.js +0 -7
- package/dist/browser/prod/excalidraw-assets/en-6E7MYLWO.js +0 -1
- package/dist/browser/prod/excalidraw-assets/image-SI7BKULC.js +0 -1
- package/dist/dev/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/dev/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/excalidraw/scene/Fonts.d.ts +0 -19
- package/dist/excalidraw/scene/Fonts.js +0 -66
- package/dist/prod/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/prod/Virgil-UZN6MUT6.woff2 +0 -0
- /package/dist/browser/dev/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets-dev/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets-dev/Assistant-Medium-DZ25RZU3.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets-dev/Assistant-Regular-PLF2XOGW.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets-dev/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{en-AZFA5HJJ.js.map → en-XV7OZCPP.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-V7E6IT6R.js.map → image-77HZYGLG.js.map} +0 -0
- /package/dist/browser/prod/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets/Assistant-Medium-DZ25RZU3.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets/Assistant-Regular-PLF2XOGW.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
|
@@ -64,7 +64,9 @@ export declare const actionToggleZenMode: {
|
|
|
64
64
|
currentItemTextAlign: string;
|
|
65
65
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
66
66
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
67
|
+
currentHoveredFontFamily: number | null;
|
|
67
68
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
69
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
68
70
|
viewBackgroundColor: string;
|
|
69
71
|
scrollX: number;
|
|
70
72
|
scrollY: number;
|
|
@@ -77,7 +79,7 @@ export declare const actionToggleZenMode: {
|
|
|
77
79
|
value: import("../types").NormalizedZoomValue;
|
|
78
80
|
}>;
|
|
79
81
|
openMenu: "canvas" | "shape" | null;
|
|
80
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
82
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
81
83
|
openSidebar: {
|
|
82
84
|
name: string;
|
|
83
85
|
tab?: string | undefined;
|
|
@@ -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" | "commandPalette" | "autoResize" | "elementStats";
|
|
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" | "changeArrowType" | "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" | "commandPalette" | "autoResize" | "elementStats";
|
|
19
19
|
export type PanelComponentProps = {
|
|
20
20
|
elements: readonly ExcalidrawElement[];
|
|
21
21
|
appState: AppState;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
// place here categories that you want to track. We want to track just a
|
|
2
2
|
// small subset of categories at a given time.
|
|
3
|
-
const ALLOWED_CATEGORIES_TO_TRACK = ["
|
|
3
|
+
const ALLOWED_CATEGORIES_TO_TRACK = new Set(["command_palette"]);
|
|
4
4
|
export const trackEvent = (category, action, label, value) => {
|
|
5
5
|
try {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// comment out to debug locally
|
|
10
|
-
|| import.meta.env.PROD) {
|
|
6
|
+
if (typeof window === "undefined" ||
|
|
7
|
+
import.meta.env.VITE_WORKER_ID ||
|
|
8
|
+
import.meta.env.VITE_APP_ENABLE_TRACKING !== "true") {
|
|
11
9
|
return;
|
|
12
10
|
}
|
|
13
|
-
if (!ALLOWED_CATEGORIES_TO_TRACK.
|
|
11
|
+
if (!ALLOWED_CATEGORIES_TO_TRACK.has(category)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (import.meta.env.DEV) {
|
|
15
|
+
// comment out to debug in dev
|
|
14
16
|
return;
|
|
15
17
|
}
|
|
16
18
|
if (!import.meta.env.PROD) {
|
|
@@ -5,6 +5,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
5
5
|
objectsSnapModeEnabled?: boolean | undefined;
|
|
6
6
|
theme?: import("./element/types").Theme | undefined;
|
|
7
7
|
name?: string | null | undefined;
|
|
8
|
+
currentItemArrowType?: "sharp" | "round" | "elbow" | undefined;
|
|
8
9
|
showWelcomeScreen?: boolean | undefined;
|
|
9
10
|
activeTool?: ({
|
|
10
11
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { COLOR_PALETTE } from "./colors";
|
|
2
|
-
import { DEFAULT_ELEMENT_PROPS, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_TEXT_ALIGN, EXPORT_SCALES, STATS_PANELS, THEME, } from "./constants";
|
|
2
|
+
import { ARROW_TYPE, DEFAULT_ELEMENT_PROPS, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_TEXT_ALIGN, EXPORT_SCALES, STATS_PANELS, THEME, } from "./constants";
|
|
3
3
|
const defaultExportScale = EXPORT_SCALES.includes(devicePixelRatio)
|
|
4
4
|
? devicePixelRatio
|
|
5
5
|
: 1;
|
|
@@ -19,9 +19,11 @@ export const getDefaultAppState = () => {
|
|
|
19
19
|
currentItemStartArrowhead: null,
|
|
20
20
|
currentItemStrokeColor: DEFAULT_ELEMENT_PROPS.strokeColor,
|
|
21
21
|
currentItemRoundness: "round",
|
|
22
|
+
currentItemArrowType: ARROW_TYPE.round,
|
|
22
23
|
currentItemStrokeStyle: DEFAULT_ELEMENT_PROPS.strokeStyle,
|
|
23
24
|
currentItemStrokeWidth: DEFAULT_ELEMENT_PROPS.strokeWidth,
|
|
24
25
|
currentItemTextAlign: DEFAULT_TEXT_ALIGN,
|
|
26
|
+
currentHoveredFontFamily: null,
|
|
25
27
|
cursorButton: "up",
|
|
26
28
|
activeEmbeddable: null,
|
|
27
29
|
draggingElement: null,
|
|
@@ -116,6 +118,11 @@ const APP_STATE_STORAGE_CONF = ((config) => config)({
|
|
|
116
118
|
export: false,
|
|
117
119
|
server: false,
|
|
118
120
|
},
|
|
121
|
+
currentItemArrowType: {
|
|
122
|
+
browser: true,
|
|
123
|
+
export: false,
|
|
124
|
+
server: false,
|
|
125
|
+
},
|
|
119
126
|
currentItemOpacity: { browser: true, export: false, server: false },
|
|
120
127
|
currentItemRoughness: { browser: true, export: false, server: false },
|
|
121
128
|
currentItemStartArrowhead: { browser: true, export: false, server: false },
|
|
@@ -123,6 +130,7 @@ const APP_STATE_STORAGE_CONF = ((config) => config)({
|
|
|
123
130
|
currentItemStrokeStyle: { browser: true, export: false, server: false },
|
|
124
131
|
currentItemStrokeWidth: { browser: true, export: false, server: false },
|
|
125
132
|
currentItemTextAlign: { browser: true, export: false, server: false },
|
|
133
|
+
currentHoveredFontFamily: { browser: false, export: false, server: false },
|
|
126
134
|
cursorButton: { browser: true, export: false, server: false },
|
|
127
135
|
activeEmbeddable: { browser: false, export: false, server: false },
|
|
128
136
|
draggingElement: { browser: false, export: false, server: false },
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class BinaryHeap<T> {
|
|
2
|
+
private scoreFunction;
|
|
3
|
+
private content;
|
|
4
|
+
constructor(scoreFunction: (node: T) => number);
|
|
5
|
+
sinkDown(idx: number): void;
|
|
6
|
+
bubbleUp(idx: number): void;
|
|
7
|
+
push(node: T): void;
|
|
8
|
+
pop(): T | null;
|
|
9
|
+
remove(node: T): void;
|
|
10
|
+
size(): number;
|
|
11
|
+
rescoreElement(node: T): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export default class BinaryHeap {
|
|
2
|
+
scoreFunction;
|
|
3
|
+
content = [];
|
|
4
|
+
constructor(scoreFunction) {
|
|
5
|
+
this.scoreFunction = scoreFunction;
|
|
6
|
+
}
|
|
7
|
+
sinkDown(idx) {
|
|
8
|
+
const node = this.content[idx];
|
|
9
|
+
while (idx > 0) {
|
|
10
|
+
const parentN = ((idx + 1) >> 1) - 1;
|
|
11
|
+
const parent = this.content[parentN];
|
|
12
|
+
if (this.scoreFunction(node) < this.scoreFunction(parent)) {
|
|
13
|
+
this.content[parentN] = node;
|
|
14
|
+
this.content[idx] = parent;
|
|
15
|
+
idx = parentN; // TODO: Optimize
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
bubbleUp(idx) {
|
|
23
|
+
const length = this.content.length;
|
|
24
|
+
const node = this.content[idx];
|
|
25
|
+
const score = this.scoreFunction(node);
|
|
26
|
+
while (true) {
|
|
27
|
+
const child2N = (idx + 1) << 1;
|
|
28
|
+
const child1N = child2N - 1;
|
|
29
|
+
let swap = null;
|
|
30
|
+
let child1Score = 0;
|
|
31
|
+
if (child1N < length) {
|
|
32
|
+
const child1 = this.content[child1N];
|
|
33
|
+
child1Score = this.scoreFunction(child1);
|
|
34
|
+
if (child1Score < score) {
|
|
35
|
+
swap = child1N;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (child2N < length) {
|
|
39
|
+
const child2 = this.content[child2N];
|
|
40
|
+
const child2Score = this.scoreFunction(child2);
|
|
41
|
+
if (child2Score < (swap === null ? score : child1Score)) {
|
|
42
|
+
swap = child2N;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (swap !== null) {
|
|
46
|
+
this.content[idx] = this.content[swap];
|
|
47
|
+
this.content[swap] = node;
|
|
48
|
+
idx = swap; // TODO: Optimize
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
push(node) {
|
|
56
|
+
this.content.push(node);
|
|
57
|
+
this.sinkDown(this.content.length - 1);
|
|
58
|
+
}
|
|
59
|
+
pop() {
|
|
60
|
+
if (this.content.length === 0) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const result = this.content[0];
|
|
64
|
+
const end = this.content.pop();
|
|
65
|
+
if (this.content.length > 0) {
|
|
66
|
+
this.content[0] = end;
|
|
67
|
+
this.bubbleUp(0);
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
remove(node) {
|
|
72
|
+
if (this.content.length === 0) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const i = this.content.indexOf(node);
|
|
76
|
+
const end = this.content.pop();
|
|
77
|
+
if (i < this.content.length) {
|
|
78
|
+
this.content[i] = end;
|
|
79
|
+
if (this.scoreFunction(end) < this.scoreFunction(node)) {
|
|
80
|
+
this.sinkDown(i);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
this.bubbleUp(i);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
size() {
|
|
88
|
+
return this.content.length;
|
|
89
|
+
}
|
|
90
|
+
rescoreElement(node) {
|
|
91
|
+
this.sinkDown(this.content.indexOf(node));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ElementUpdate } from "./element/mutateElement";
|
|
2
2
|
import type { OrderedExcalidrawElement, SceneElementsMap } from "./element/types";
|
|
3
|
+
import type Scene from "./scene/Scene";
|
|
3
4
|
import type { AppState, ObservedAppState } from "./types";
|
|
4
5
|
import type { ValueOf } from "./utility-types";
|
|
5
6
|
/**
|
|
@@ -153,7 +154,7 @@ export declare class ElementsChange implements Change<SceneElementsMap> {
|
|
|
153
154
|
* @returns new instance with modified delta/s
|
|
154
155
|
*/
|
|
155
156
|
applyLatestChanges(elements: SceneElementsMap): ElementsChange;
|
|
156
|
-
applyTo(elements: SceneElementsMap, snapshot: Map<string, OrderedExcalidrawElement
|
|
157
|
+
applyTo(elements: SceneElementsMap, snapshot: Map<string, OrderedExcalidrawElement>, scene: Scene): [SceneElementsMap, boolean];
|
|
157
158
|
private static createApplier;
|
|
158
159
|
private static createGetter;
|
|
159
160
|
private static applyDelta;
|
|
@@ -599,7 +599,7 @@ export class ElementsChange {
|
|
|
599
599
|
shouldRedistribute: true, // redistribute the deltas as `isDeleted` could have been updated
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
|
-
applyTo(elements, snapshot) {
|
|
602
|
+
applyTo(elements, snapshot, scene) {
|
|
603
603
|
let nextElements = toBrandedType(new Map(elements));
|
|
604
604
|
let changedElements;
|
|
605
605
|
const flags = {
|
|
@@ -635,7 +635,7 @@ export class ElementsChange {
|
|
|
635
635
|
try {
|
|
636
636
|
// TODO: #7348 refactor away mutations below, so that we couldn't end up in an incosistent state
|
|
637
637
|
ElementsChange.redrawTextBoundingBoxes(nextElements, changedElements);
|
|
638
|
-
ElementsChange.redrawBoundArrows(nextElements, changedElements);
|
|
638
|
+
ElementsChange.redrawBoundArrows(nextElements, changedElements, scene);
|
|
639
639
|
// the following reorder performs also mutations, but only on new instances of changed elements
|
|
640
640
|
// (unless something goes really bad and it fallbacks to fixing all invalid indices)
|
|
641
641
|
nextElements = ElementsChange.reorderElements(nextElements, changedElements, flags);
|
|
@@ -847,10 +847,12 @@ export class ElementsChange {
|
|
|
847
847
|
redrawTextBoundingBox(boundText, container, elements, false);
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
static redrawBoundArrows(elements, changed) {
|
|
850
|
+
static redrawBoundArrows(elements, changed, scene) {
|
|
851
851
|
for (const element of changed.values()) {
|
|
852
852
|
if (!element.isDeleted && isBindableElement(element)) {
|
|
853
|
-
updateBoundElements(element, elements
|
|
853
|
+
updateBoundElements(element, elements, scene, {
|
|
854
|
+
changedElements: changed,
|
|
855
|
+
});
|
|
854
856
|
}
|
|
855
857
|
}
|
|
856
858
|
}
|
|
@@ -181,8 +181,6 @@ const chartLines = (spreadsheet, x, y, groupId, backgroundColor) => {
|
|
|
181
181
|
type: "line",
|
|
182
182
|
x,
|
|
183
183
|
y,
|
|
184
|
-
startArrowhead: null,
|
|
185
|
-
endArrowhead: null,
|
|
186
184
|
width: chartWidth,
|
|
187
185
|
points: [
|
|
188
186
|
[0, 0],
|
|
@@ -196,8 +194,6 @@ const chartLines = (spreadsheet, x, y, groupId, backgroundColor) => {
|
|
|
196
194
|
type: "line",
|
|
197
195
|
x,
|
|
198
196
|
y,
|
|
199
|
-
startArrowhead: null,
|
|
200
|
-
endArrowhead: null,
|
|
201
197
|
height: chartHeight,
|
|
202
198
|
points: [
|
|
203
199
|
[0, 0],
|
|
@@ -211,8 +207,6 @@ const chartLines = (spreadsheet, x, y, groupId, backgroundColor) => {
|
|
|
211
207
|
type: "line",
|
|
212
208
|
x,
|
|
213
209
|
y: y - BAR_HEIGHT - BAR_GAP,
|
|
214
|
-
startArrowhead: null,
|
|
215
|
-
endArrowhead: null,
|
|
216
210
|
strokeStyle: "dotted",
|
|
217
211
|
width: chartWidth,
|
|
218
212
|
opacity: GRID_OPACITY,
|
|
@@ -306,8 +300,6 @@ const chartTypeLine = (spreadsheet, x, y) => {
|
|
|
306
300
|
type: "line",
|
|
307
301
|
x: x + BAR_GAP + BAR_WIDTH / 2,
|
|
308
302
|
y: y - BAR_GAP,
|
|
309
|
-
startArrowhead: null,
|
|
310
|
-
endArrowhead: null,
|
|
311
303
|
height: maxY - minY,
|
|
312
304
|
width: maxX - minX,
|
|
313
305
|
strokeWidth: 2,
|
|
@@ -339,8 +331,6 @@ const chartTypeLine = (spreadsheet, x, y) => {
|
|
|
339
331
|
type: "line",
|
|
340
332
|
x: x + cx + BAR_WIDTH / 2 + BAR_GAP / 2,
|
|
341
333
|
y: y - cy,
|
|
342
|
-
startArrowhead: null,
|
|
343
|
-
endArrowhead: null,
|
|
344
334
|
height: cy,
|
|
345
335
|
strokeStyle: "dotted",
|
|
346
336
|
opacity: GRID_OPACITY,
|
|
@@ -7,9 +7,9 @@ import { SHAPES } from "../shapes";
|
|
|
7
7
|
import { capitalizeString, isTransparent } from "../utils";
|
|
8
8
|
import Stack from "./Stack";
|
|
9
9
|
import { ToolButton } from "./ToolButton";
|
|
10
|
-
import { hasStrokeColor } from "../scene/comparisons";
|
|
10
|
+
import { hasStrokeColor, toolIsArrow } from "../scene/comparisons";
|
|
11
11
|
import { trackEvent } from "../analytics";
|
|
12
|
-
import { hasBoundTextElement, isLinearElement, isTextElement, } from "../element/typeChecks";
|
|
12
|
+
import { hasBoundTextElement, isElbowArrow, isLinearElement, isTextElement, } from "../element/typeChecks";
|
|
13
13
|
import clsx from "clsx";
|
|
14
14
|
import { actionToggleZenMode } from "../actions";
|
|
15
15
|
import { Tooltip } from "./Tooltip";
|
|
@@ -55,7 +55,8 @@ export const SelectedShapeActions = ({ appState, elementsMap, renderAction, }) =
|
|
|
55
55
|
const showLinkIcon = targetElements.length === 1 || isSingleElementBoundContainer;
|
|
56
56
|
const showLineEditorAction = !appState.editingLinearElement &&
|
|
57
57
|
targetElements.length === 1 &&
|
|
58
|
-
isLinearElement(targetElements[0])
|
|
58
|
+
isLinearElement(targetElements[0]) &&
|
|
59
|
+
!isElbowArrow(targetElements[0]);
|
|
59
60
|
return (_jsxs("div", { className: "panelColumn", children: [_jsx("div", { children: canChangeStrokeColor(appState, targetElements) &&
|
|
60
61
|
renderAction("changeStrokeColor") }), canChangeBackgroundColor(appState, targetElements) && (_jsx("div", { children: renderAction("changeBackgroundColor") })), showFillIcons && renderAction("changeFillStyle"), (hasStrokeWidth(appState.activeTool.type) ||
|
|
61
62
|
targetElements.some((element) => hasStrokeWidth(element.type))) &&
|
|
@@ -63,8 +64,9 @@ export const SelectedShapeActions = ({ appState, elementsMap, renderAction, }) =
|
|
|
63
64
|
targetElements.some((element) => element.type === "freedraw")) &&
|
|
64
65
|
renderAction("changeStrokeShape"), (hasStrokeStyle(appState.activeTool.type) ||
|
|
65
66
|
targetElements.some((element) => hasStrokeStyle(element.type))) && (_jsxs(_Fragment, { children: [renderAction("changeStrokeStyle"), renderAction("changeSloppiness")] })), (canChangeRoundness(appState.activeTool.type) ||
|
|
66
|
-
targetElements.some((element) => canChangeRoundness(element.type))) && (_jsx(_Fragment, { children: renderAction("changeRoundness") })), (appState.activeTool.type
|
|
67
|
-
targetElements.some(
|
|
67
|
+
targetElements.some((element) => canChangeRoundness(element.type))) && (_jsx(_Fragment, { children: renderAction("changeRoundness") })), (toolIsArrow(appState.activeTool.type) ||
|
|
68
|
+
targetElements.some((element) => toolIsArrow(element.type))) && (_jsx(_Fragment, { children: renderAction("changeArrowType") })), (appState.activeTool.type === "text" ||
|
|
69
|
+
targetElements.some(isTextElement)) && (_jsxs(_Fragment, { children: [renderAction("changeFontFamily"), renderAction("changeFontSize"), (appState.activeTool.type === "text" ||
|
|
68
70
|
suppportsHorizontalAlign(targetElements, elementsMap)) &&
|
|
69
71
|
renderAction("changeTextAlign")] })), shouldAllowVerticalAlign(targetElements, elementsMap) &&
|
|
70
72
|
renderAction("changeVerticalAlign"), (canHaveArrowheads(appState.activeTool.type) ||
|
|
@@ -2,15 +2,15 @@ import React from "react";
|
|
|
2
2
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
4
|
import type { ActionResult } from "../actions/types";
|
|
5
|
-
import type
|
|
5
|
+
import { type EXPORT_IMAGE_TYPES } from "../constants";
|
|
6
6
|
import type { ExportedElements } from "../data";
|
|
7
7
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
8
8
|
import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
|
|
9
9
|
import { History } from "../history";
|
|
10
10
|
import Scene from "../scene/Scene";
|
|
11
|
-
import type { GeometricShape } from "../../utils/geometry/shape";
|
|
12
11
|
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload } from "../types";
|
|
13
12
|
import type { FileSystemHandle } from "../data/filesystem";
|
|
13
|
+
import { Fonts } from "../fonts";
|
|
14
14
|
import { Renderer } from "../scene/Renderer";
|
|
15
15
|
import { Emitter } from "../emitter";
|
|
16
16
|
import { Store } from "../store";
|
|
@@ -51,8 +51,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
51
51
|
device: Device;
|
|
52
52
|
private excalidrawContainerRef;
|
|
53
53
|
scene: Scene;
|
|
54
|
+
fonts: Fonts;
|
|
54
55
|
renderer: Renderer;
|
|
55
|
-
private fonts;
|
|
56
56
|
private resizeObserver;
|
|
57
57
|
private nearestScrollableContainer;
|
|
58
58
|
library: AppClassProperties["library"];
|
|
@@ -253,6 +253,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
253
253
|
private onMagicSettingsConfirm;
|
|
254
254
|
onMagicframeToolSelect: () => void;
|
|
255
255
|
private openEyeDropper;
|
|
256
|
+
dismissLinearEditor: () => void;
|
|
256
257
|
syncActionResult: (actionResult: ActionResult) => void;
|
|
257
258
|
private onBlur;
|
|
258
259
|
private onUnload;
|
|
@@ -388,12 +389,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
388
389
|
private handleTextWysiwyg;
|
|
389
390
|
private deselectElements;
|
|
390
391
|
private getTextElementAtPosition;
|
|
391
|
-
/**
|
|
392
|
-
* get the pure geometric shape of an excalidraw element
|
|
393
|
-
* which is then used for hit detection
|
|
394
|
-
*/
|
|
395
|
-
getElementShape(element: ExcalidrawElement): GeometricShape;
|
|
396
|
-
private getBoundTextShape;
|
|
397
392
|
private getElementAtPosition;
|
|
398
393
|
private getElementsAtPosition;
|
|
399
394
|
private getElementHitThreshold;
|
|
@@ -495,6 +490,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
495
490
|
declare global {
|
|
496
491
|
interface Window {
|
|
497
492
|
h: {
|
|
493
|
+
scene: Scene;
|
|
498
494
|
elements: readonly ExcalidrawElement[];
|
|
499
495
|
state: AppState;
|
|
500
496
|
setState: React.Component<any, AppState>["setState"];
|