@excalidraw/common 0.18.0-d255747 → 0.18.0-dabd83c
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 +237 -104
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/colors.d.ts +23 -1
- package/dist/types/common/src/constants.d.ts +68 -7
- package/dist/types/common/src/keys.d.ts +6 -0
- package/dist/types/common/src/points.d.ts +1 -1
- package/dist/types/common/src/random.d.ts +7 -0
- package/dist/types/common/src/utils.d.ts +13 -44
- package/dist/types/element/src/Scene.d.ts +2 -2
- package/dist/types/element/src/align.d.ts +5 -2
- package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
- package/dist/types/element/src/arrows/focus.d.ts +5 -2
- package/dist/types/element/src/binding.d.ts +90 -13
- package/dist/types/element/src/bounds.d.ts +28 -7
- package/dist/types/element/src/bucketFill.d.ts +110 -0
- package/dist/types/element/src/collision.d.ts +21 -5
- package/dist/types/element/src/comparisons.d.ts +8 -5
- package/dist/types/element/src/convertToShape.d.ts +23 -0
- package/dist/types/element/src/cropElement.d.ts +36 -4
- package/dist/types/element/src/delta.d.ts +30 -2
- package/dist/types/element/src/distribute.d.ts +5 -2
- package/dist/types/element/src/dragElements.d.ts +34 -2
- package/dist/types/element/src/duplicate.d.ts +63 -3
- package/dist/types/element/src/elbowArrow.d.ts +5 -0
- package/dist/types/element/src/embeddable.d.ts +3 -2
- package/dist/types/element/src/flowchart.d.ts +9 -11
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +25 -7
- package/dist/types/element/src/groups.d.ts +10 -15
- package/dist/types/element/src/image.d.ts +5 -2
- package/dist/types/element/src/index.d.ts +7 -1
- package/dist/types/element/src/linearElementEditor.d.ts +31 -11
- package/dist/types/element/src/listMarker.d.ts +39 -0
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +55 -3
- package/dist/types/element/src/renderElement.d.ts +31 -7
- package/dist/types/element/src/renderEnvironment.d.ts +66 -0
- package/dist/types/element/src/resizeElements.d.ts +14 -4
- package/dist/types/element/src/selection.d.ts +7 -13
- package/dist/types/element/src/shape.d.ts +29 -1
- package/dist/types/element/src/sizeHelpers.d.ts +6 -0
- package/dist/types/element/src/sortElements.d.ts +10 -0
- package/dist/types/element/src/stickyNote.d.ts +191 -0
- package/dist/types/element/src/textElement.d.ts +22 -10
- package/dist/types/element/src/textMeasurements.d.ts +15 -11
- package/dist/types/element/src/textWrapping.d.ts +3 -2
- package/dist/types/element/src/transform.d.ts +31 -8
- package/dist/types/element/src/typeChecks.d.ts +28 -27
- package/dist/types/element/src/types.d.ts +43 -7
- package/dist/types/element/src/utils.d.ts +15 -4
- package/dist/types/element/src/zindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +98 -15
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +79 -202
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +306 -939
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +68 -10
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +34 -5
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -518
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +34 -5
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +34 -5
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +69 -11
- package/dist/types/excalidraw/actions/actionExport.d.ts +76 -18
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +132 -648
- package/dist/types/excalidraw/actions/actionGroup.d.ts +83 -25
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +89 -8
- package/dist/types/excalidraw/actions/actionLink.d.ts +35 -6
- package/dist/types/excalidraw/actions/actionMenu.d.ts +34 -5
- package/dist/types/excalidraw/actions/actionProperties.d.ts +106 -32
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +39 -10
- package/dist/types/excalidraw/actions/actionStyles.d.ts +31 -6
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +452 -6
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +35 -6
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +38 -10
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +35 -6
- package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +206 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +35 -6
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +38 -10
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionToggleShowHints.d.ts} +50 -18
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +35 -6
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +36 -7
- package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +35 -6
- package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
- package/dist/types/excalidraw/actions/index.d.ts +4 -2
- package/dist/types/excalidraw/actions/manager.d.ts +1 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +8 -4
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +37 -12
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
- package/dist/types/excalidraw/charts/index.d.ts +2 -1
- package/dist/types/excalidraw/components/Actions.d.ts +26 -13
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.arrowText.d.ts +70 -0
- package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
- package/dist/types/excalidraw/components/App.clipboard.d.ts +59 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
- package/dist/types/excalidraw/components/App.d.ts +329 -114
- package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
- package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
- package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
- package/dist/types/excalidraw/components/App.host.d.ts +102 -0
- package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
- package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
- package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
- package/dist/types/excalidraw/components/App.selectionTool.d.ts +94 -0
- package/dist/types/excalidraw/components/App.text.d.ts +194 -0
- package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
- package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +133 -0
- package/dist/types/excalidraw/components/App.wheel.d.ts +30 -0
- package/dist/types/excalidraw/components/App.wrap.d.ts +39 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -3
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +5 -1
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -3
- package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
- package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
- package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
- package/dist/types/excalidraw/components/Island.d.ts +7 -0
- package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
- package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
- package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
- package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
- package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
- package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
- package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
- package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
- package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
- package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
- package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
- package/dist/types/excalidraw/components/Popover.d.ts +1 -3
- package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
- package/dist/types/excalidraw/components/Toast.d.ts +12 -1
- package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
- package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
- package/dist/types/excalidraw/components/Tools.d.ts +151 -0
- package/dist/types/excalidraw/components/Tooltip.d.ts +26 -2
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
- package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
- package/dist/types/excalidraw/components/UserList.d.ts +3 -2
- package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
- package/dist/types/excalidraw/components/footer/Footer.d.ts +5 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +15 -4
- package/dist/types/excalidraw/components/icons.d.ts +8 -1
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +10 -4
- package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
- package/dist/types/excalidraw/data/blob.d.ts +84 -26
- package/dist/types/excalidraw/data/index.d.ts +7 -7
- package/dist/types/excalidraw/data/json.d.ts +48 -19
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/fonts/Fonts.d.ts +12 -8
- package/dist/types/excalidraw/history.d.ts +10 -4
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
- package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
- package/dist/types/excalidraw/lasso/index.d.ts +2 -3
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
- package/dist/types/excalidraw/mermaid.d.ts +7 -0
- package/dist/types/excalidraw/reactUtils.d.ts +1 -1
- package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
- package/dist/types/excalidraw/renderer/animation.d.ts +15 -4
- package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +2 -4
- package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
- package/dist/types/excalidraw/scene/Renderer.d.ts +76 -13
- package/dist/types/excalidraw/scene/export.d.ts +344 -21
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/types.d.ts +30 -5
- package/dist/types/excalidraw/snapping.d.ts +7 -7
- package/dist/types/excalidraw/types.d.ts +613 -28
- package/dist/types/excalidraw/viewport.d.ts +308 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +13 -3
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +36 -0
- package/dist/types/math/src/curve.d.ts +19 -12
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/pca.d.ts +79 -0
- package/dist/types/math/src/point.d.ts +1 -0
- package/dist/types/math/src/polygon.d.ts +25 -1
- package/dist/types/math/src/segment.d.ts +6 -0
- package/dist/types/utils/src/index.d.ts +4 -3
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +1 -1
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
- package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
- package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
- package/dist/types/excalidraw/components/shapes.d.ts +0 -263
- package/dist/types/excalidraw/cursor.d.ts +0 -5
- package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
- package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/export.d.ts +0 -35
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
name: "
|
|
1
|
+
export declare const actionToggleShowHints: {
|
|
2
|
+
name: "showHints";
|
|
3
|
+
label: string;
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
keywords: string[];
|
|
6
|
+
viewMode: false;
|
|
3
7
|
trackEvent: {
|
|
4
|
-
category: "
|
|
8
|
+
category: "canvas";
|
|
9
|
+
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
5
10
|
};
|
|
6
|
-
|
|
7
|
-
label: string;
|
|
8
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => {
|
|
9
|
-
elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
11
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
10
12
|
appState: {
|
|
11
|
-
|
|
12
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
13
|
-
locked: boolean;
|
|
14
|
-
fromSelection: boolean;
|
|
15
|
-
} & import("../types").ActiveTool;
|
|
13
|
+
showHints: boolean;
|
|
16
14
|
contextMenu: {
|
|
17
15
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
18
16
|
top: number;
|
|
@@ -33,10 +31,23 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
33
31
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
34
32
|
bindingPreference: "enabled" | "disabled";
|
|
35
33
|
isMidpointSnappingEnabled: boolean;
|
|
34
|
+
splitOnPaste: boolean;
|
|
35
|
+
inputDevice: import("../types").InputDevice;
|
|
36
36
|
suggestedBinding: {
|
|
37
37
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
38
38
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
39
39
|
} | null;
|
|
40
|
+
textToolHover: {
|
|
41
|
+
type: "text";
|
|
42
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
43
|
+
} | {
|
|
44
|
+
type: "container";
|
|
45
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
46
|
+
} | {
|
|
47
|
+
type: "arrow";
|
|
48
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
49
|
+
anchor: "start" | "end" | "label";
|
|
50
|
+
} | null;
|
|
40
51
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
41
52
|
frameRendering: {
|
|
42
53
|
enabled: boolean;
|
|
@@ -44,9 +55,14 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
44
55
|
outline: boolean;
|
|
45
56
|
clip: boolean;
|
|
46
57
|
};
|
|
47
|
-
editingFrame:
|
|
48
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
58
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
59
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
49
60
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
61
|
+
activeTool: {
|
|
62
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
63
|
+
locked: boolean;
|
|
64
|
+
fromSelection: boolean;
|
|
65
|
+
} & import("../types").ActiveTool;
|
|
50
66
|
preferredSelectionTool: {
|
|
51
67
|
type: "selection" | "lasso";
|
|
52
68
|
initialized: boolean;
|
|
@@ -58,11 +74,14 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
58
74
|
exportWithDarkMode: boolean;
|
|
59
75
|
exportScale: number;
|
|
60
76
|
currentItemStrokeColor: string;
|
|
77
|
+
currentItemStickynoteStrokeColor: string;
|
|
78
|
+
currentItemStickynoteBackgroundColor: string;
|
|
61
79
|
currentItemBackgroundColor: string;
|
|
62
80
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
63
|
-
|
|
81
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
64
82
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
65
83
|
currentItemRoughness: number;
|
|
84
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
66
85
|
currentItemOpacity: number;
|
|
67
86
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
68
87
|
currentItemFontSize: number;
|
|
@@ -75,6 +94,7 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
75
94
|
viewBackgroundColor: string;
|
|
76
95
|
scrollX: number;
|
|
77
96
|
scrollY: number;
|
|
97
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
78
98
|
cursorButton: "up" | "down";
|
|
79
99
|
scrolledOutside: boolean;
|
|
80
100
|
name: string | null;
|
|
@@ -121,8 +141,13 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
121
141
|
message: React.ReactNode;
|
|
122
142
|
closable?: boolean;
|
|
123
143
|
duration?: number;
|
|
144
|
+
action?: {
|
|
145
|
+
label: string;
|
|
146
|
+
onClick: () => void;
|
|
147
|
+
};
|
|
124
148
|
} | null;
|
|
125
149
|
zenModeEnabled: boolean;
|
|
150
|
+
minimapEnabled: boolean;
|
|
126
151
|
theme: import("@excalidraw/element/types").Theme;
|
|
127
152
|
gridSize: number;
|
|
128
153
|
gridStep: number;
|
|
@@ -150,8 +175,6 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
150
175
|
y: number;
|
|
151
176
|
} | null;
|
|
152
177
|
objectsSnapModeEnabled: boolean;
|
|
153
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
154
|
-
followedBy: Set<import("../types").SocketId>;
|
|
155
178
|
isCropping: boolean;
|
|
156
179
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
157
180
|
searchMatches: Readonly<{
|
|
@@ -163,9 +186,18 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
163
186
|
[groupId: string]: true;
|
|
164
187
|
};
|
|
165
188
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
189
|
+
colorTopPicks: {
|
|
190
|
+
elementStroke: readonly string[] | null;
|
|
191
|
+
elementBackground: readonly string[] | null;
|
|
192
|
+
bucketFill: readonly string[] | null;
|
|
193
|
+
stickyNoteStroke: readonly string[] | null;
|
|
194
|
+
stickyNoteBackground: readonly string[] | null;
|
|
195
|
+
};
|
|
196
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
166
197
|
};
|
|
167
|
-
captureUpdate: "
|
|
198
|
+
captureUpdate: "NEVER";
|
|
168
199
|
};
|
|
200
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
169
201
|
} & {
|
|
170
202
|
keyTest?: undefined;
|
|
171
203
|
};
|
|
@@ -33,10 +33,24 @@ export declare const actionToggleStats: {
|
|
|
33
33
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
34
34
|
bindingPreference: "enabled" | "disabled";
|
|
35
35
|
isMidpointSnappingEnabled: boolean;
|
|
36
|
+
showHints: boolean;
|
|
37
|
+
splitOnPaste: boolean;
|
|
38
|
+
inputDevice: import("../types").InputDevice;
|
|
36
39
|
suggestedBinding: {
|
|
37
40
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
38
41
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
39
42
|
} | null;
|
|
43
|
+
textToolHover: {
|
|
44
|
+
type: "text";
|
|
45
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
46
|
+
} | {
|
|
47
|
+
type: "container";
|
|
48
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
49
|
+
} | {
|
|
50
|
+
type: "arrow";
|
|
51
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
52
|
+
anchor: "start" | "end" | "label";
|
|
53
|
+
} | null;
|
|
40
54
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
41
55
|
frameRendering: {
|
|
42
56
|
enabled: boolean;
|
|
@@ -44,8 +58,8 @@ export declare const actionToggleStats: {
|
|
|
44
58
|
outline: boolean;
|
|
45
59
|
clip: boolean;
|
|
46
60
|
};
|
|
47
|
-
editingFrame:
|
|
48
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
61
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
62
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
49
63
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
50
64
|
activeTool: {
|
|
51
65
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -63,11 +77,14 @@ export declare const actionToggleStats: {
|
|
|
63
77
|
exportWithDarkMode: boolean;
|
|
64
78
|
exportScale: number;
|
|
65
79
|
currentItemStrokeColor: string;
|
|
80
|
+
currentItemStickynoteStrokeColor: string;
|
|
81
|
+
currentItemStickynoteBackgroundColor: string;
|
|
66
82
|
currentItemBackgroundColor: string;
|
|
67
83
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
68
|
-
|
|
84
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
69
85
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
70
86
|
currentItemRoughness: number;
|
|
87
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
71
88
|
currentItemOpacity: number;
|
|
72
89
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
73
90
|
currentItemFontSize: number;
|
|
@@ -80,6 +97,7 @@ export declare const actionToggleStats: {
|
|
|
80
97
|
viewBackgroundColor: string;
|
|
81
98
|
scrollX: number;
|
|
82
99
|
scrollY: number;
|
|
100
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
83
101
|
cursorButton: "up" | "down";
|
|
84
102
|
scrolledOutside: boolean;
|
|
85
103
|
name: string | null;
|
|
@@ -126,8 +144,13 @@ export declare const actionToggleStats: {
|
|
|
126
144
|
message: React.ReactNode;
|
|
127
145
|
closable?: boolean;
|
|
128
146
|
duration?: number;
|
|
147
|
+
action?: {
|
|
148
|
+
label: string;
|
|
149
|
+
onClick: () => void;
|
|
150
|
+
};
|
|
129
151
|
} | null;
|
|
130
152
|
zenModeEnabled: boolean;
|
|
153
|
+
minimapEnabled: boolean;
|
|
131
154
|
theme: import("@excalidraw/element/types").Theme;
|
|
132
155
|
gridSize: number;
|
|
133
156
|
gridStep: number;
|
|
@@ -151,8 +174,6 @@ export declare const actionToggleStats: {
|
|
|
151
174
|
y: number;
|
|
152
175
|
} | null;
|
|
153
176
|
objectsSnapModeEnabled: boolean;
|
|
154
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
155
|
-
followedBy: Set<import("../types").SocketId>;
|
|
156
177
|
isCropping: boolean;
|
|
157
178
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
158
179
|
searchMatches: Readonly<{
|
|
@@ -164,10 +185,18 @@ export declare const actionToggleStats: {
|
|
|
164
185
|
[groupId: string]: true;
|
|
165
186
|
};
|
|
166
187
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
188
|
+
colorTopPicks: {
|
|
189
|
+
elementStroke: readonly string[] | null;
|
|
190
|
+
elementBackground: readonly string[] | null;
|
|
191
|
+
bucketFill: readonly string[] | null;
|
|
192
|
+
stickyNoteStroke: readonly string[] | null;
|
|
193
|
+
stickyNoteBackground: readonly string[] | null;
|
|
194
|
+
};
|
|
195
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
167
196
|
};
|
|
168
197
|
captureUpdate: "EVENTUALLY";
|
|
169
198
|
};
|
|
170
|
-
checked: (appState: Readonly<import("../types").
|
|
199
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
171
200
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
172
201
|
} & {
|
|
173
202
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -30,10 +30,24 @@ export declare const actionToggleViewMode: {
|
|
|
30
30
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
31
|
bindingPreference: "enabled" | "disabled";
|
|
32
32
|
isMidpointSnappingEnabled: boolean;
|
|
33
|
+
showHints: boolean;
|
|
34
|
+
splitOnPaste: boolean;
|
|
35
|
+
inputDevice: import("../types").InputDevice;
|
|
33
36
|
suggestedBinding: {
|
|
34
37
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
35
38
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
36
39
|
} | null;
|
|
40
|
+
textToolHover: {
|
|
41
|
+
type: "text";
|
|
42
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
43
|
+
} | {
|
|
44
|
+
type: "container";
|
|
45
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
46
|
+
} | {
|
|
47
|
+
type: "arrow";
|
|
48
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
49
|
+
anchor: "start" | "end" | "label";
|
|
50
|
+
} | null;
|
|
37
51
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
38
52
|
frameRendering: {
|
|
39
53
|
enabled: boolean;
|
|
@@ -41,8 +55,8 @@ export declare const actionToggleViewMode: {
|
|
|
41
55
|
outline: boolean;
|
|
42
56
|
clip: boolean;
|
|
43
57
|
};
|
|
44
|
-
editingFrame:
|
|
45
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
58
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
59
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
46
60
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
47
61
|
activeTool: {
|
|
48
62
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -60,11 +74,14 @@ export declare const actionToggleViewMode: {
|
|
|
60
74
|
exportWithDarkMode: boolean;
|
|
61
75
|
exportScale: number;
|
|
62
76
|
currentItemStrokeColor: string;
|
|
77
|
+
currentItemStickynoteStrokeColor: string;
|
|
78
|
+
currentItemStickynoteBackgroundColor: string;
|
|
63
79
|
currentItemBackgroundColor: string;
|
|
64
80
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
65
|
-
|
|
81
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
66
82
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
67
83
|
currentItemRoughness: number;
|
|
84
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
68
85
|
currentItemOpacity: number;
|
|
69
86
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
70
87
|
currentItemFontSize: number;
|
|
@@ -77,6 +94,7 @@ export declare const actionToggleViewMode: {
|
|
|
77
94
|
viewBackgroundColor: string;
|
|
78
95
|
scrollX: number;
|
|
79
96
|
scrollY: number;
|
|
97
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
80
98
|
cursorButton: "up" | "down";
|
|
81
99
|
scrolledOutside: boolean;
|
|
82
100
|
name: string | null;
|
|
@@ -123,8 +141,13 @@ export declare const actionToggleViewMode: {
|
|
|
123
141
|
message: React.ReactNode;
|
|
124
142
|
closable?: boolean;
|
|
125
143
|
duration?: number;
|
|
144
|
+
action?: {
|
|
145
|
+
label: string;
|
|
146
|
+
onClick: () => void;
|
|
147
|
+
};
|
|
126
148
|
} | null;
|
|
127
149
|
zenModeEnabled: boolean;
|
|
150
|
+
minimapEnabled: boolean;
|
|
128
151
|
theme: import("@excalidraw/element/types").Theme;
|
|
129
152
|
gridSize: number;
|
|
130
153
|
gridStep: number;
|
|
@@ -151,8 +174,6 @@ export declare const actionToggleViewMode: {
|
|
|
151
174
|
y: number;
|
|
152
175
|
} | null;
|
|
153
176
|
objectsSnapModeEnabled: boolean;
|
|
154
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
155
|
-
followedBy: Set<import("../types").SocketId>;
|
|
156
177
|
isCropping: boolean;
|
|
157
178
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
158
179
|
searchMatches: Readonly<{
|
|
@@ -164,11 +185,19 @@ export declare const actionToggleViewMode: {
|
|
|
164
185
|
[groupId: string]: true;
|
|
165
186
|
};
|
|
166
187
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
188
|
+
colorTopPicks: {
|
|
189
|
+
elementStroke: readonly string[] | null;
|
|
190
|
+
elementBackground: readonly string[] | null;
|
|
191
|
+
bucketFill: readonly string[] | null;
|
|
192
|
+
stickyNoteStroke: readonly string[] | null;
|
|
193
|
+
stickyNoteBackground: readonly string[] | null;
|
|
194
|
+
};
|
|
195
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
167
196
|
};
|
|
168
197
|
captureUpdate: "EVENTUALLY";
|
|
169
198
|
};
|
|
170
|
-
checked: (appState: Readonly<import("../types").
|
|
171
|
-
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
199
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
200
|
+
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
172
201
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
173
202
|
} & {
|
|
174
203
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const actionToggleWrap: {
|
|
2
|
+
name: "toggleWrap";
|
|
3
|
+
label: string;
|
|
4
|
+
trackEvent: {
|
|
5
|
+
category: "element";
|
|
6
|
+
};
|
|
7
|
+
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
8
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => import("./types").ActionResult;
|
|
9
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
|
|
10
|
+
} & {
|
|
11
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
|
|
12
|
+
};
|
|
@@ -30,10 +30,24 @@ export declare const actionToggleZenMode: {
|
|
|
30
30
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
31
|
bindingPreference: "enabled" | "disabled";
|
|
32
32
|
isMidpointSnappingEnabled: boolean;
|
|
33
|
+
showHints: boolean;
|
|
34
|
+
splitOnPaste: boolean;
|
|
35
|
+
inputDevice: import("../types").InputDevice;
|
|
33
36
|
suggestedBinding: {
|
|
34
37
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
35
38
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
36
39
|
} | null;
|
|
40
|
+
textToolHover: {
|
|
41
|
+
type: "text";
|
|
42
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
43
|
+
} | {
|
|
44
|
+
type: "container";
|
|
45
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
46
|
+
} | {
|
|
47
|
+
type: "arrow";
|
|
48
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
49
|
+
anchor: "start" | "end" | "label";
|
|
50
|
+
} | null;
|
|
37
51
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
38
52
|
frameRendering: {
|
|
39
53
|
enabled: boolean;
|
|
@@ -41,8 +55,8 @@ export declare const actionToggleZenMode: {
|
|
|
41
55
|
outline: boolean;
|
|
42
56
|
clip: boolean;
|
|
43
57
|
};
|
|
44
|
-
editingFrame:
|
|
45
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
58
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
59
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
46
60
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
47
61
|
activeTool: {
|
|
48
62
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -60,11 +74,14 @@ export declare const actionToggleZenMode: {
|
|
|
60
74
|
exportWithDarkMode: boolean;
|
|
61
75
|
exportScale: number;
|
|
62
76
|
currentItemStrokeColor: string;
|
|
77
|
+
currentItemStickynoteStrokeColor: string;
|
|
78
|
+
currentItemStickynoteBackgroundColor: string;
|
|
63
79
|
currentItemBackgroundColor: string;
|
|
64
80
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
65
|
-
|
|
81
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
66
82
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
67
83
|
currentItemRoughness: number;
|
|
84
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
68
85
|
currentItemOpacity: number;
|
|
69
86
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
70
87
|
currentItemFontSize: number;
|
|
@@ -77,6 +94,7 @@ export declare const actionToggleZenMode: {
|
|
|
77
94
|
viewBackgroundColor: string;
|
|
78
95
|
scrollX: number;
|
|
79
96
|
scrollY: number;
|
|
97
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
80
98
|
cursorButton: "up" | "down";
|
|
81
99
|
scrolledOutside: boolean;
|
|
82
100
|
name: string | null;
|
|
@@ -123,7 +141,12 @@ export declare const actionToggleZenMode: {
|
|
|
123
141
|
message: React.ReactNode;
|
|
124
142
|
closable?: boolean;
|
|
125
143
|
duration?: number;
|
|
144
|
+
action?: {
|
|
145
|
+
label: string;
|
|
146
|
+
onClick: () => void;
|
|
147
|
+
};
|
|
126
148
|
} | null;
|
|
149
|
+
minimapEnabled: boolean;
|
|
127
150
|
theme: import("@excalidraw/element/types").Theme;
|
|
128
151
|
gridSize: number;
|
|
129
152
|
gridStep: number;
|
|
@@ -151,8 +174,6 @@ export declare const actionToggleZenMode: {
|
|
|
151
174
|
y: number;
|
|
152
175
|
} | null;
|
|
153
176
|
objectsSnapModeEnabled: boolean;
|
|
154
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
155
|
-
followedBy: Set<import("../types").SocketId>;
|
|
156
177
|
isCropping: boolean;
|
|
157
178
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
158
179
|
searchMatches: Readonly<{
|
|
@@ -164,10 +185,18 @@ export declare const actionToggleZenMode: {
|
|
|
164
185
|
[groupId: string]: true;
|
|
165
186
|
};
|
|
166
187
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
188
|
+
colorTopPicks: {
|
|
189
|
+
elementStroke: readonly string[] | null;
|
|
190
|
+
elementBackground: readonly string[] | null;
|
|
191
|
+
bucketFill: readonly string[] | null;
|
|
192
|
+
stickyNoteStroke: readonly string[] | null;
|
|
193
|
+
stickyNoteBackground: readonly string[] | null;
|
|
194
|
+
};
|
|
195
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
167
196
|
};
|
|
168
197
|
captureUpdate: "EVENTUALLY";
|
|
169
198
|
};
|
|
170
|
-
checked: (appState: Readonly<import("../types").
|
|
199
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
171
200
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
172
201
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
173
202
|
} & {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ColorPaletteCustom, ColorTuple } from "@excalidraw/common";
|
|
2
|
+
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { AppState } from "../types";
|
|
4
|
+
export type ColorProperty = "strokeColor" | "backgroundColor";
|
|
5
|
+
/**
|
|
6
|
+
* Sticky notes are their own color domain: own defaults, own top picks, no
|
|
7
|
+
* transparent. A pick targets the regular domain, the sticky domain, or both
|
|
8
|
+
* ("mixed" selections write both defaults and use the regular picker).
|
|
9
|
+
*/
|
|
10
|
+
export type ColorTargetKind = "regular" | "sticky" | "mixed";
|
|
11
|
+
export type ColorDefaultKey = "currentItemStrokeColor" | "currentItemBackgroundColor" | "currentItemStickynoteStrokeColor" | "currentItemStickynoteBackgroundColor";
|
|
12
|
+
export type ColorTargetAppState = Pick<AppState, "selectedElementIds" | "editingTextElement" | "activeTool" | ColorDefaultKey>;
|
|
13
|
+
export type ColorTarget = {
|
|
14
|
+
kind: ColorTargetKind;
|
|
15
|
+
property: ColorProperty;
|
|
16
|
+
/** the current-item defaults a pick is written to (normalized per domain) */
|
|
17
|
+
appStateKeys: readonly ColorDefaultKey[];
|
|
18
|
+
/** the default shown when no element is targeted */
|
|
19
|
+
currentValue: string;
|
|
20
|
+
palette: ColorPaletteCustom;
|
|
21
|
+
topPicks: ColorTuple;
|
|
22
|
+
customizableTopPicks: keyof AppState["colorTopPicks"];
|
|
23
|
+
excludedColors: readonly string[] | undefined;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Who a stroke/background pick targets. Resolve it from the state an action
|
|
27
|
+
* runs against, at execution time — never capture it in a render closure:
|
|
28
|
+
* the memoized picker keeps a stale `onChange`, and the always-visible top
|
|
29
|
+
* picks fire it without a re-render.
|
|
30
|
+
*
|
|
31
|
+
* Targets are the selected color-capable elements (for stroke incl. bound
|
|
32
|
+
* labels, since a note's visible text is its label) plus the text being
|
|
33
|
+
* edited (`handleTextWysiwyg` deselects while editing) — or, for a
|
|
34
|
+
* background pick on a note's label, the note (see `getColorTargetElement`).
|
|
35
|
+
* With no target, the active tool decides the domain.
|
|
36
|
+
*/
|
|
37
|
+
export declare const resolveColorTarget: (appState: ColorTargetAppState, elements: readonly ExcalidrawElement[], property: ColorProperty) => ColorTarget;
|
|
38
|
+
/** the current-item default updates for a picked color */
|
|
39
|
+
export declare const getColorTargetAppStateUpdates: (target: ColorTarget, color: string) => Partial<AppState>;
|
|
@@ -2,9 +2,8 @@ export { actionDeleteSelected } from "./actionDeleteSelected";
|
|
|
2
2
|
export { actionBringForward, actionBringToFront, actionSendBackward, actionSendToBack, } from "./actionZindex";
|
|
3
3
|
export { actionSelectAll } from "./actionSelectAll";
|
|
4
4
|
export { actionDuplicateSelection } from "./actionDuplicateSelection";
|
|
5
|
-
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
5
|
+
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeBucketFillBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeFreedrawMode, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
6
6
|
export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
|
|
7
|
-
export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
|
|
8
7
|
export { actionFinalize } from "./actionFinalize";
|
|
9
8
|
export { actionDeselect } from "./actionDeselect";
|
|
10
9
|
export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
|
|
@@ -22,8 +21,11 @@ export { actionToggleZenMode } from "./actionToggleZenMode";
|
|
|
22
21
|
export { actionToggleObjectsSnapMode } from "./actionToggleObjectsSnapMode";
|
|
23
22
|
export { actionToggleArrowBinding } from "./actionToggleArrowBinding";
|
|
24
23
|
export { actionToggleMidpointSnapping } from "./actionToggleMidpointSnapping";
|
|
24
|
+
export { actionToggleShowHints } from "./actionToggleShowHints";
|
|
25
25
|
export { actionToggleStats } from "./actionToggleStats";
|
|
26
|
+
export { actionToggleMinimap } from "./actionToggleMinimap";
|
|
26
27
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
28
|
+
export { actionToggleWrap } from "./actionToggleWrap";
|
|
27
29
|
export { actionLink } from "./actionLink";
|
|
28
30
|
export { actionToggleElementLock } from "./actionElementLock";
|
|
29
31
|
export { actionToggleLinearEditor } from "./actionLinearEditor";
|
|
@@ -11,6 +11,7 @@ export declare class ActionManager {
|
|
|
11
11
|
constructor(updater: UpdaterFn, getAppState: () => AppState, getElementsIncludingDeleted: () => readonly OrderedExcalidrawElement[], app: AppClassProperties);
|
|
12
12
|
registerAction(action: Action): void;
|
|
13
13
|
registerAll(actions: readonly Action[]): void;
|
|
14
|
+
private isActionBlockedByViewportTransition;
|
|
14
15
|
handleKeyDown(event: React.KeyboardEvent | KeyboardEvent): boolean;
|
|
15
16
|
executeAction<T extends Action>(action: T, source?: ActionSource, value?: Parameters<T["perform"]>[2]): void;
|
|
16
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "toggleWrap" | "autoResize"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -14,10 +14,10 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "showHints" | "stats" | "minimap" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "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" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleWrap" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
|
-
appState:
|
|
20
|
+
appState: UIAppState;
|
|
21
21
|
updateData: <T = any>(formData?: T) => void;
|
|
22
22
|
appProps: ExcalidrawProps;
|
|
23
23
|
data?: Record<string, any>;
|
|
@@ -26,7 +26,7 @@ export type PanelComponentProps = {
|
|
|
26
26
|
};
|
|
27
27
|
export interface Action<TData = any> {
|
|
28
28
|
name: ActionName;
|
|
29
|
-
label: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<
|
|
29
|
+
label: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<UIAppState>, app: AppClassProperties) => string);
|
|
30
30
|
keywords?: string[];
|
|
31
31
|
icon?: React.ReactNode | ((appState: UIAppState, elements: readonly ExcalidrawElement[]) => React.ReactNode);
|
|
32
32
|
PanelComponent?: React.FC<PanelComponentProps>;
|
|
@@ -34,7 +34,7 @@ export interface Action<TData = any> {
|
|
|
34
34
|
keyPriority?: number;
|
|
35
35
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
36
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
37
|
-
checked?: (appState: Readonly<
|
|
37
|
+
checked?: (appState: Readonly<UIAppState>) => boolean;
|
|
38
38
|
trackEvent: false | {
|
|
39
39
|
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
|
|
40
40
|
action?: string;
|
|
@@ -43,5 +43,9 @@ export interface Action<TData = any> {
|
|
|
43
43
|
/** if set to `true`, allow action to be performed in viewMode.
|
|
44
44
|
* Defaults to `false` */
|
|
45
45
|
viewMode?: boolean;
|
|
46
|
+
/** if set to `true`, the action counts as canvas navigation and remains
|
|
47
|
+
* available in the non-interactive editor when
|
|
48
|
+
* `interaction: { enabled: { navigation: true } }`. Defaults to `false` */
|
|
49
|
+
navigation?: boolean;
|
|
46
50
|
}
|
|
47
51
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LaserPointer } from "@excalidraw/laser-pointer";
|
|
2
2
|
import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
|
|
3
|
-
import type { AnimationFrameHandler } from "./animation-frame-handler";
|
|
4
3
|
import type App from "./components/App";
|
|
5
4
|
export interface Trail {
|
|
6
5
|
start(container: SVGSVGElement): void;
|
|
@@ -15,7 +14,6 @@ export interface AnimatedTrailOptions {
|
|
|
15
14
|
animateTrail?: boolean;
|
|
16
15
|
}
|
|
17
16
|
export declare class AnimatedTrail implements Trail {
|
|
18
|
-
private animationFrameHandler;
|
|
19
17
|
protected app: App;
|
|
20
18
|
private options;
|
|
21
19
|
private currentTrail?;
|
|
@@ -23,9 +21,12 @@ export declare class AnimatedTrail implements Trail {
|
|
|
23
21
|
private container?;
|
|
24
22
|
private trailElement;
|
|
25
23
|
private trailAnimation?;
|
|
26
|
-
|
|
24
|
+
private key;
|
|
25
|
+
private static counter;
|
|
26
|
+
constructor(app: App, options: Partial<LaserPointerOptions> & Partial<AnimatedTrailOptions>);
|
|
27
27
|
get hasCurrentTrail(): boolean;
|
|
28
28
|
hasLastPoint(x: number, y: number): boolean;
|
|
29
|
+
private cleanup;
|
|
29
30
|
start(container?: SVGSVGElement): void;
|
|
30
31
|
stop(): void;
|
|
31
32
|
startPath(x: number, y: number): void;
|