@excalidraw/element 0.18.0-9ba0f5d → 0.18.0-a52cd20
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 +13141 -8453
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +20 -19
- package/dist/types/common/debug.d.ts +21 -0
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +24 -2
- package/dist/types/common/src/constants.d.ts +70 -7
- package/dist/types/common/src/index.d.ts +3 -0
- package/dist/types/common/src/keys.d.ts +4 -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 +10 -50
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +9 -5
- package/dist/types/element/src/align.d.ts +2 -2
- package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/arrows/focus.d.ts +30 -0
- package/dist/types/element/src/arrows/helpers.d.ts +5 -0
- package/dist/types/element/src/binding.d.ts +37 -17
- package/dist/types/element/src/bounds.d.ts +23 -8
- package/dist/types/element/src/bucketFill.d.ts +110 -0
- package/dist/types/element/src/collision.d.ts +7 -3
- 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/delta.d.ts +23 -1
- package/dist/types/element/src/distribute.d.ts +3 -2
- package/dist/types/element/src/dragElements.d.ts +27 -0
- package/dist/types/element/src/duplicate.d.ts +64 -3
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/embeddable.d.ts +2 -2
- package/dist/types/element/src/flowchart.d.ts +11 -7
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +11 -10
- package/dist/types/element/src/groups.d.ts +9 -9
- package/dist/types/element/src/index.d.ts +8 -1
- package/dist/types/element/src/linearElementEditor.d.ts +32 -10
- package/dist/types/element/src/mutateElement.d.ts +3 -1
- package/dist/types/element/src/newElement.d.ts +53 -3
- package/dist/types/element/src/renderElement.d.ts +21 -7
- package/dist/types/element/src/resizeElements.d.ts +2 -2
- package/dist/types/element/src/selection.d.ts +11 -7
- package/dist/types/element/src/shape.d.ts +28 -2
- 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 +183 -0
- package/dist/types/element/src/textElement.d.ts +21 -10
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/element/src/transform.d.ts +26 -7
- package/dist/types/element/src/typeChecks.d.ts +29 -27
- package/dist/types/element/src/types.d.ts +48 -9
- package/dist/types/element/src/utils.d.ts +19 -6
- package/dist/types/element/src/visualdebug.d.ts +1 -2
- package/dist/types/element/src/zindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +125 -53
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +85 -37
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +356 -1019
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +84 -36
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +42 -18
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +130 -55
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +182 -0
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +38 -18
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +85 -37
- package/dist/types/excalidraw/actions/actionExport.d.ts +133 -359
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +187 -236
- package/dist/types/excalidraw/actions/actionGroup.d.ts +100 -52
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +99 -21
- package/dist/types/excalidraw/actions/actionLink.d.ts +43 -19
- package/dist/types/excalidraw/actions/actionMenu.d.ts +38 -18
- package/dist/types/excalidraw/actions/actionProperties.d.ts +120 -56
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +46 -22
- package/dist/types/excalidraw/actions/actionStyles.d.ts +43 -18
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionToggleArrowBinding.d.ts} +57 -32
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +46 -23
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +195 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +43 -19
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +42 -23
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +43 -19
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +44 -20
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +43 -19
- 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 +39 -13
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clipboard.d.ts +6 -7
- package/dist/types/excalidraw/components/Actions.d.ts +17 -12
- 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.cursor.d.ts +38 -0
- package/dist/types/excalidraw/components/App.d.ts +604 -89
- package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
- package/dist/types/excalidraw/components/App.duplicate.d.ts +51 -0
- package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
- package/dist/types/excalidraw/components/App.pan.d.ts +62 -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 +113 -0
- package/dist/types/excalidraw/components/App.wheel.d.ts +26 -0
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -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/CommandPalette/types.d.ts +1 -1
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
- 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/IconPicker.d.ts +14 -9
- 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/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/PasteChartDialog.d.ts +4 -5
- 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/PropertiesPopover.d.ts +1 -1
- package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- 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 +1 -1
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +2 -6
- package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +11 -7
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +4 -0
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- 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 +15 -1
- 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 +4 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -16
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -12
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
- package/dist/types/excalidraw/components/icons.d.ts +30 -10
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +26 -3
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -14
- 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 +107 -60
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
- package/dist/types/excalidraw/data/index.d.ts +6 -7
- package/dist/types/excalidraw/data/json.d.ts +62 -30
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- 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 +3 -2
- 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/renderOverrides.d.ts +9 -0
- package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
- package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +2 -4
- package/dist/types/excalidraw/scene/Renderer.d.ts +489 -20
- package/dist/types/excalidraw/scene/export.d.ts +3 -3
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/types.d.ts +7 -4
- package/dist/types/excalidraw/snapping.d.ts +7 -7
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +619 -42
- package/dist/types/excalidraw/viewport.d.ts +302 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +12 -3
- package/dist/types/fractional-indexing/src/index.d.ts +29 -0
- 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/constants.d.ts +0 -1
- package/dist/types/math/src/curve.d.ts +23 -13
- 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 +8 -2
- package/dist/types/math/src/polygon.d.ts +25 -1
- package/dist/types/math/src/segment.d.ts +6 -0
- package/dist/types/math/src/types.d.ts +25 -1
- package/dist/types/utils/src/export.d.ts +4 -3
- package/dist/types/utils/src/index.d.ts +1 -2
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +4 -3
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/charts.d.ts +0 -27
- package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
- 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/InitializeApp.d.ts +0 -10
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
- package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
- package/dist/types/excalidraw/components/shapes.d.ts +0 -190
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
- package/dist/types/excalidraw/cursor.d.ts +0 -5
- package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
- package/dist/types/excalidraw/index.d.ts +0 -46
- package/dist/types/excalidraw/polyfill.d.ts +0 -2
- 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/withinBounds.d.ts +0 -19
|
@@ -9,7 +9,7 @@ type StaticCanvasProps = {
|
|
|
9
9
|
elementsMap: RenderableElementsMap;
|
|
10
10
|
allElementsMap: NonDeletedSceneElementsMap;
|
|
11
11
|
visibleElements: readonly NonDeletedExcalidrawElement[];
|
|
12
|
-
|
|
12
|
+
canvasNonce: string;
|
|
13
13
|
selectionNonce: number | undefined;
|
|
14
14
|
scale: number;
|
|
15
15
|
appState: StaticCanvasAppState;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./DropdownMenu.scss";
|
|
3
3
|
declare const DropdownMenu: {
|
|
4
|
-
({ children, open,
|
|
4
|
+
({ children, open, }: {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
open: boolean;
|
|
7
|
-
placement?: "top" | "bottom";
|
|
8
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
Trigger: {
|
|
10
9
|
({ className, children, onToggle, title, ...rest }: {
|
|
@@ -16,29 +15,19 @@ declare const DropdownMenu: {
|
|
|
16
15
|
displayName: string;
|
|
17
16
|
};
|
|
18
17
|
Content: {
|
|
19
|
-
({ children, onClickOutside, className, onSelect,
|
|
18
|
+
({ children, onClickOutside, className, onSelect, open, align, style, }: {
|
|
20
19
|
children?: React.ReactNode;
|
|
21
20
|
onClickOutside?: () => void;
|
|
22
21
|
className?: string;
|
|
23
22
|
onSelect?: (event: Event) => void;
|
|
23
|
+
open?: boolean;
|
|
24
24
|
style?: React.CSSProperties;
|
|
25
|
-
|
|
25
|
+
align?: "start" | "center" | "end";
|
|
26
26
|
}): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
displayName: string;
|
|
28
28
|
};
|
|
29
29
|
Item: {
|
|
30
|
-
({ icon,
|
|
31
|
-
icon?: React.JSX.Element;
|
|
32
|
-
value?: string | number | undefined;
|
|
33
|
-
order?: number;
|
|
34
|
-
onSelect?: (event: Event) => void;
|
|
35
|
-
children: React.ReactNode;
|
|
36
|
-
shortcut?: string;
|
|
37
|
-
hovered?: boolean;
|
|
38
|
-
selected?: boolean;
|
|
39
|
-
textStyle?: React.CSSProperties;
|
|
40
|
-
className?: string;
|
|
41
|
-
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: import("./DropdownMenuItem").DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
42
31
|
displayName: string;
|
|
43
32
|
Badge: {
|
|
44
33
|
({ type, children, }: {
|
|
@@ -48,6 +37,9 @@ declare const DropdownMenu: {
|
|
|
48
37
|
displayName: string;
|
|
49
38
|
};
|
|
50
39
|
};
|
|
40
|
+
ItemCheckbox: (props: Omit<import("./DropdownMenuItem").DropdownMenuItemProps, "icon"> & {
|
|
41
|
+
checked: boolean;
|
|
42
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
51
43
|
ItemLink: {
|
|
52
44
|
({ icon, shortcut, href, children, onSelect, className, selected, rel, ...rest }: {
|
|
53
45
|
href: string;
|
|
@@ -79,6 +71,28 @@ declare const DropdownMenu: {
|
|
|
79
71
|
(): import("react/jsx-runtime").JSX.Element;
|
|
80
72
|
displayName: string;
|
|
81
73
|
};
|
|
74
|
+
Sub: {
|
|
75
|
+
({ children }: {
|
|
76
|
+
children?: React.ReactNode;
|
|
77
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
Trigger: {
|
|
79
|
+
({ children, icon, shortcut, className, }: {
|
|
80
|
+
children: React.ReactNode;
|
|
81
|
+
icon?: React.JSX.Element;
|
|
82
|
+
shortcut?: string;
|
|
83
|
+
className?: string;
|
|
84
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
87
|
+
Content: {
|
|
88
|
+
({ children, className, }: {
|
|
89
|
+
children?: React.ReactNode;
|
|
90
|
+
className?: string;
|
|
91
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
displayName: string;
|
|
93
|
+
};
|
|
94
|
+
displayName: string;
|
|
95
|
+
};
|
|
82
96
|
displayName: string;
|
|
83
97
|
};
|
|
84
98
|
export default DropdownMenu;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const MenuContent: {
|
|
3
|
-
({ children, onClickOutside, className, onSelect,
|
|
3
|
+
({ children, onClickOutside, className, onSelect, open, align, style, }: {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
onClickOutside?: () => void;
|
|
6
6
|
className?: string;
|
|
@@ -8,8 +8,9 @@ declare const MenuContent: {
|
|
|
8
8
|
* Called when any menu item is selected (clicked on).
|
|
9
9
|
*/
|
|
10
10
|
onSelect?: (event: Event) => void;
|
|
11
|
+
open?: boolean;
|
|
11
12
|
style?: React.CSSProperties;
|
|
12
|
-
|
|
13
|
+
align?: "start" | "center" | "end";
|
|
13
14
|
}): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
displayName: string;
|
|
15
16
|
};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ValueOf } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { JSX } from "react";
|
|
4
|
+
export type DropdownMenuItemProps = {
|
|
5
|
+
icon?: JSX.Element;
|
|
6
|
+
badge?: React.ReactNode;
|
|
7
|
+
value?: string | number | undefined;
|
|
8
|
+
onSelect?: (event: Event) => void;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
shortcut?: string;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">;
|
|
4
14
|
declare const DropdownMenuItem: {
|
|
5
|
-
({ icon,
|
|
6
|
-
icon?: JSX.Element;
|
|
7
|
-
value?: string | number | undefined;
|
|
8
|
-
order?: number;
|
|
9
|
-
onSelect?: (event: Event) => void;
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
shortcut?: string;
|
|
12
|
-
hovered?: boolean;
|
|
13
|
-
selected?: boolean;
|
|
14
|
-
textStyle?: React.CSSProperties;
|
|
15
|
-
className?: string;
|
|
16
|
-
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
displayName: string;
|
|
18
17
|
Badge: {
|
|
19
18
|
({ type, children, }: {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { JSX } from "react";
|
|
2
|
-
declare const MenuItemContent: ({ textStyle, icon, shortcut, children, }: {
|
|
2
|
+
declare const MenuItemContent: ({ textStyle, icon, shortcut, children, badge, }: {
|
|
3
3
|
icon?: JSX.Element;
|
|
4
4
|
shortcut?: string;
|
|
5
5
|
textStyle?: React.CSSProperties;
|
|
6
6
|
children: React.ReactNode;
|
|
7
|
+
badge?: React.ReactNode;
|
|
7
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default MenuItemContent;
|
|
@@ -9,9 +9,10 @@ type Props<T> = {
|
|
|
9
9
|
onChange: (value: T) => void;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
name: string;
|
|
12
|
+
icon?: React.ReactNode;
|
|
12
13
|
};
|
|
13
14
|
declare const DropdownMenuItemContentRadio: {
|
|
14
|
-
<T>({ value, shortcut, onChange, choices, children, name, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
<T>({ value, shortcut, onChange, choices, children, name, icon, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
18
|
export default DropdownMenuItemContentRadio;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const DropdownMenuSub: {
|
|
2
|
+
({ children }: {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Trigger: {
|
|
6
|
+
({ children, icon, shortcut, className, }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
icon?: import("react").JSX.Element;
|
|
9
|
+
shortcut?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
Content: {
|
|
15
|
+
({ children, className, }: {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default DropdownMenuSub;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { JSX } from "react";
|
|
3
|
+
declare const DropdownMenuSubTrigger: {
|
|
4
|
+
({ children, icon, shortcut, className, }: {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
icon?: JSX.Element;
|
|
7
|
+
shortcut?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export default DropdownMenuSubTrigger;
|
|
@@ -3,4 +3,4 @@ export declare const DropdownMenuContentPropsContext: React.Context<{
|
|
|
3
3
|
onSelect?: (event: Event) => void;
|
|
4
4
|
}>;
|
|
5
5
|
export declare const getDropdownMenuItemClassName: (className?: string, selected?: boolean, hovered?: boolean) => string;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const useHandleDropdownMenuItemSelect: (onSelect: ((event: Event) => void) | undefined) => (event: Event) => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const getMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
3
3
|
export declare const getMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
4
|
+
export declare const getSubMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
5
|
+
export declare const getSubMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { ActionManager } from "../../actions/manager";
|
|
2
2
|
import type { UIAppState } from "../../types";
|
|
3
3
|
declare const Footer: {
|
|
4
|
-
({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, }: {
|
|
4
|
+
({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, defaultUIEnabled, zoomUIEnabled, }: {
|
|
5
5
|
appState: UIAppState;
|
|
6
6
|
actionManager: ActionManager;
|
|
7
7
|
showExitZenModeBtn: boolean;
|
|
8
8
|
renderWelcomeScreen: boolean;
|
|
9
|
+
defaultUIEnabled: boolean;
|
|
10
|
+
zoomUIEnabled: boolean;
|
|
9
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
displayName: string;
|
|
11
13
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { GlobalPoint, Radians } from "@excalidraw/math";
|
|
2
2
|
import type { Bounds } from "@excalidraw/common";
|
|
3
3
|
import type { ElementsMap, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
4
|
-
import type { AppState
|
|
4
|
+
import type { AppState } from "../../types";
|
|
5
5
|
export declare const DEFAULT_LINK_SIZE = 12;
|
|
6
6
|
export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
|
|
7
7
|
export declare const ELEMENT_LINK_IMG: HTMLImageElement;
|
|
8
|
-
export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: Radians, appState: Pick<
|
|
8
|
+
export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: Radians, appState: Pick<AppState, "zoom">) => Bounds;
|
|
9
9
|
export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: GlobalPoint) => boolean;
|
|
10
10
|
export declare const isPointHittingLink: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: GlobalPoint, isMobile: boolean) => boolean;
|
|
@@ -57,6 +57,7 @@ export declare const saveAs: import("react/jsx-runtime").JSX.Element;
|
|
|
57
57
|
export declare const LoadIcon: import("react/jsx-runtime").JSX.Element;
|
|
58
58
|
export declare const clipboard: import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
export declare const palette: import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare const bucketFillIconSvgPaths: readonly ["M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z", "M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z", "M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"];
|
|
60
61
|
export declare const bucketFillIcon: import("react/jsx-runtime").JSX.Element;
|
|
61
62
|
export declare const slashIcon: import("react/jsx-runtime").JSX.Element;
|
|
62
63
|
export declare const ExportImageIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -114,40 +115,53 @@ export declare const StrokeStyleDottedIcon: import("react/jsx-runtime").JSX.Elem
|
|
|
114
115
|
export declare const SloppinessArchitectIcon: import("react/jsx-runtime").JSX.Element;
|
|
115
116
|
export declare const SloppinessArtistIcon: import("react/jsx-runtime").JSX.Element;
|
|
116
117
|
export declare const SloppinessCartoonistIcon: import("react/jsx-runtime").JSX.Element;
|
|
118
|
+
export declare const strokeVariabilityConstantIcon: import("react/jsx-runtime").JSX.Element;
|
|
119
|
+
export declare const strokeVariabilityVariableIcon: import("react/jsx-runtime").JSX.Element;
|
|
117
120
|
export declare const EdgeSharpIcon: import("react/jsx-runtime").JSX.Element;
|
|
118
121
|
export declare const EdgeRoundIcon: import("react/jsx-runtime").JSX.Element;
|
|
119
|
-
export declare const ArrowheadNoneIcon:
|
|
122
|
+
export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ flip }: {
|
|
123
|
+
flip?: boolean;
|
|
124
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
120
125
|
export declare const ArrowheadArrowIcon: React.MemoExoticComponent<({ flip }: {
|
|
121
126
|
flip?: boolean;
|
|
122
127
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
128
|
+
export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
|
|
129
|
+
flip?: boolean;
|
|
130
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
131
|
+
export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
|
|
132
|
+
flip?: boolean;
|
|
133
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
123
134
|
export declare const ArrowheadCircleIcon: React.MemoExoticComponent<({ flip }: {
|
|
124
135
|
flip?: boolean;
|
|
125
136
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
126
137
|
export declare const ArrowheadCircleOutlineIcon: React.MemoExoticComponent<({ flip }: {
|
|
127
138
|
flip?: boolean;
|
|
128
139
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
129
|
-
export declare const
|
|
140
|
+
export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
|
|
130
141
|
flip?: boolean;
|
|
131
142
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
132
|
-
export declare const
|
|
143
|
+
export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
|
|
133
144
|
flip?: boolean;
|
|
134
145
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
135
|
-
export declare const
|
|
146
|
+
export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
|
|
136
147
|
flip?: boolean;
|
|
137
148
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
138
|
-
export declare const
|
|
149
|
+
export declare const ArrowheadCardinalityOneIcon: React.MemoExoticComponent<({ flip }: {
|
|
139
150
|
flip?: boolean;
|
|
140
151
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
141
|
-
export declare const
|
|
152
|
+
export declare const ArrowheadCardinalityManyIcon: React.MemoExoticComponent<({ flip }: {
|
|
153
|
+
flip?: boolean;
|
|
154
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
155
|
+
export declare const ArrowheadCardinalityOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
|
|
142
156
|
flip?: boolean;
|
|
143
157
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
144
|
-
export declare const
|
|
158
|
+
export declare const ArrowheadCardinalityExactlyOneIcon: React.MemoExoticComponent<({ flip }: {
|
|
145
159
|
flip?: boolean;
|
|
146
160
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
147
|
-
export declare const
|
|
161
|
+
export declare const ArrowheadCardinalityZeroOrOneIcon: React.MemoExoticComponent<({ flip }: {
|
|
148
162
|
flip?: boolean;
|
|
149
163
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
150
|
-
export declare const
|
|
164
|
+
export declare const ArrowheadCardinalityZeroOrManyIcon: React.MemoExoticComponent<({ flip }: {
|
|
151
165
|
flip?: boolean;
|
|
152
166
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
153
167
|
export declare const FontSizeSmallIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -183,13 +197,15 @@ export declare const playerPlayIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
183
197
|
export declare const playerStopFilledIcon: import("react/jsx-runtime").JSX.Element;
|
|
184
198
|
export declare const tablerCheckIcon: import("react/jsx-runtime").JSX.Element;
|
|
185
199
|
export declare const alertTriangleIcon: import("react/jsx-runtime").JSX.Element;
|
|
200
|
+
export declare const eyeDropperIconSvgPaths: readonly ["M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z", "M11 7l6 6"];
|
|
186
201
|
export declare const eyeDropperIcon: import("react/jsx-runtime").JSX.Element;
|
|
187
|
-
export declare const extraToolsIcon: import("react/jsx-runtime").JSX.Element;
|
|
188
202
|
export declare const frameToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
203
|
+
export declare const stickyNoteToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
189
204
|
export declare const mermaidLogoIcon: import("react/jsx-runtime").JSX.Element;
|
|
190
205
|
export declare const RetryIcon: import("react/jsx-runtime").JSX.Element;
|
|
191
206
|
export declare const stackPushIcon: import("react/jsx-runtime").JSX.Element;
|
|
192
207
|
export declare const ArrowRightIcon: import("react/jsx-runtime").JSX.Element;
|
|
208
|
+
export declare const drawShapeToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
193
209
|
export declare const laserPointerToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
194
210
|
export declare const MagicIcon: import("react/jsx-runtime").JSX.Element;
|
|
195
211
|
export declare const MagicIconThin: import("react/jsx-runtime").JSX.Element;
|
|
@@ -236,4 +252,8 @@ export declare const chevronLeftIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
236
252
|
export declare const sidebarRightIcon: import("react/jsx-runtime").JSX.Element;
|
|
237
253
|
export declare const messageCircleIcon: import("react/jsx-runtime").JSX.Element;
|
|
238
254
|
export declare const presentationIcon: import("react/jsx-runtime").JSX.Element;
|
|
255
|
+
export declare const emptyIcon: import("react/jsx-runtime").JSX.Element;
|
|
256
|
+
export declare const chevronDownIcon: import("react/jsx-runtime").JSX.Element;
|
|
257
|
+
export declare const chevronRight: import("react/jsx-runtime").JSX.Element;
|
|
258
|
+
export declare const settingsIcon: import("react/jsx-runtime").JSX.Element;
|
|
239
259
|
export {};
|
|
@@ -35,11 +35,14 @@ export declare const ClearCanvas: {
|
|
|
35
35
|
export declare const ToggleTheme: {
|
|
36
36
|
(props: {
|
|
37
37
|
allowSystemTheme: true;
|
|
38
|
+
/**
|
|
39
|
+
* Controls the theme of this UI component only.
|
|
40
|
+
* You should subscribe to `props.onThemeChange` and control the theme
|
|
41
|
+
* upstream.
|
|
42
|
+
*/
|
|
38
43
|
theme: Theme | "system";
|
|
39
|
-
onSelect: (theme: Theme | "system") => void;
|
|
40
44
|
} | {
|
|
41
|
-
allowSystemTheme
|
|
42
|
-
onSelect?: (theme: Theme) => void;
|
|
45
|
+
allowSystemTheme: false;
|
|
43
46
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
44
47
|
displayName: string;
|
|
45
48
|
};
|
|
@@ -62,3 +65,23 @@ export declare const LiveCollaborationTrigger: {
|
|
|
62
65
|
}): import("react/jsx-runtime").JSX.Element;
|
|
63
66
|
displayName: string;
|
|
64
67
|
};
|
|
68
|
+
export declare const PreferencesToggleGridModeItem: () => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare const PreferencesToggleZenModeItem: () => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export declare const Preferences: {
|
|
71
|
+
({ children, additionalItems, }: {
|
|
72
|
+
children?: React.ReactNode;
|
|
73
|
+
additionalItems?: React.ReactNode;
|
|
74
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
ToggleToolLock: () => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
BoxSelectionMode: () => import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
InputDevice: () => import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
ToggleSnapMode: () => import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
ToggleArrowBinding: () => import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
ToggleShowHints: () => import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
ToggleGridMode: () => import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
ToggleZenMode: () => import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
ToggleViewMode: () => import("react/jsx-runtime").JSX.Element | null;
|
|
85
|
+
ToggleElementProperties: () => import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
displayName: string;
|
|
87
|
+
};
|
|
@@ -19,20 +19,7 @@ declare const MainMenu: React.FC<{
|
|
|
19
19
|
displayName: string;
|
|
20
20
|
};
|
|
21
21
|
Item: {
|
|
22
|
-
({ icon,
|
|
23
|
-
icon?: React.JSX.Element;
|
|
24
|
-
value?: string | number | undefined;
|
|
25
|
-
order?: number;
|
|
26
|
-
onSelect?: (event: Event) => void;
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
shortcut? /**
|
|
29
|
-
* Called when any menu item is selected (clicked on).
|
|
30
|
-
*/: string;
|
|
31
|
-
hovered?: boolean;
|
|
32
|
-
selected?: boolean;
|
|
33
|
-
textStyle?: React.CSSProperties;
|
|
34
|
-
className?: string;
|
|
35
|
-
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: import("../dropdownMenu/DropdownMenuItem").DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
36
23
|
displayName: string;
|
|
37
24
|
Badge: {
|
|
38
25
|
({ type, children, }: {
|
|
@@ -73,6 +60,28 @@ declare const MainMenu: React.FC<{
|
|
|
73
60
|
(): import("react/jsx-runtime").JSX.Element;
|
|
74
61
|
displayName: string;
|
|
75
62
|
};
|
|
63
|
+
Sub: {
|
|
64
|
+
({ children }: {
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
Trigger: {
|
|
68
|
+
({ children, icon, shortcut, className, }: {
|
|
69
|
+
children: React.ReactNode;
|
|
70
|
+
icon?: React.JSX.Element;
|
|
71
|
+
shortcut?: string;
|
|
72
|
+
className?: string;
|
|
73
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
displayName: string;
|
|
75
|
+
};
|
|
76
|
+
Content: {
|
|
77
|
+
({ children, className, }: {
|
|
78
|
+
children?: React.ReactNode;
|
|
79
|
+
className?: string;
|
|
80
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
displayName: string;
|
|
84
|
+
};
|
|
76
85
|
DefaultItems: typeof DefaultItems;
|
|
77
86
|
};
|
|
78
87
|
export default MainMenu;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Positions an element beside a cursor within a container, flipping the
|
|
3
|
+
* element to the other side of the cursor when it would overflow the
|
|
4
|
+
* container, resolved independently on each axis.
|
|
5
|
+
*
|
|
6
|
+
* Takes the cursor in client (viewport) coordinates and returns
|
|
7
|
+
* container-local coordinates.
|
|
8
|
+
*/
|
|
9
|
+
export declare const positionElementBesideCursor: ({ cursor, element, container, gap, }: {
|
|
10
|
+
/** client (viewport) coordinates */
|
|
11
|
+
cursor: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
element: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
/** the container's bounding client rect */
|
|
20
|
+
container: Pick<DOMRect, "left" | "top" | "width" | "height">;
|
|
21
|
+
/** distance between the cursor and the positioned element */
|
|
22
|
+
gap: number;
|
|
23
|
+
}) => {
|
|
24
|
+
left: number;
|
|
25
|
+
top: number;
|
|
26
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
2
|
+
import type { AppClassProperties, UIAppState } from "../types";
|
|
3
|
+
export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
4
|
+
export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[], elementsMap: ElementsMap) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Single source of truth for "which shape-action controls are relevant right
|
|
7
|
+
* now". Each flag answers whether a given control should be shown, given the
|
|
8
|
+
* active tool and the current selection. All three styles-panel layouts
|
|
9
|
+
* (full / compact / mobile) and the compact popovers consume these flags so
|
|
10
|
+
* that visibility logic lives in one place and layout stays pure.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getShapeActionPredicates: (appState: UIAppState, targetElements: ExcalidrawElement[], elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap, app: AppClassProperties) => {
|
|
13
|
+
/** some element(s) selected */
|
|
14
|
+
hasSelection: boolean;
|
|
15
|
+
/** actions on selected elements (delete/duplicate/...) */
|
|
16
|
+
showExtraActions: boolean;
|
|
17
|
+
strokeColor: boolean;
|
|
18
|
+
backgroundColor: boolean;
|
|
19
|
+
fill: boolean;
|
|
20
|
+
strokeWidth: boolean;
|
|
21
|
+
freedrawMode: boolean;
|
|
22
|
+
strokeStyle: boolean;
|
|
23
|
+
sloppiness: boolean;
|
|
24
|
+
roundness: boolean;
|
|
25
|
+
arrowType: boolean;
|
|
26
|
+
arrowheads: boolean;
|
|
27
|
+
text: boolean;
|
|
28
|
+
textAlign: boolean;
|
|
29
|
+
verticalAlign: boolean;
|
|
30
|
+
opacity: boolean;
|
|
31
|
+
layers: boolean;
|
|
32
|
+
align: boolean;
|
|
33
|
+
distribute: boolean;
|
|
34
|
+
link: boolean;
|
|
35
|
+
linkSingleOnly: boolean;
|
|
36
|
+
cropEditor: boolean;
|
|
37
|
+
lineEditor: boolean;
|
|
38
|
+
};
|
|
39
|
+
export type ShapeActionPredicates = ReturnType<typeof getShapeActionPredicates>;
|