@excalidraw/excalidraw 0.18.0-817d8c5 → 0.18.0-864353b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -11
- package/dist/dev/{chunk-LMHBUWQS.js → chunk-7YMZV3TY.js} +15 -4
- package/dist/dev/chunk-7YMZV3TY.js.map +7 -0
- package/dist/dev/chunk-BBNNHA7I.js +7 -0
- package/dist/dev/chunk-BBNNHA7I.js.map +7 -0
- package/dist/dev/chunk-FB2NA5UG.js +4132 -0
- package/dist/dev/chunk-FB2NA5UG.js.map +7 -0
- package/dist/dev/{chunk-3SN6HYVK.js → chunk-LL55DS44.js} +19504 -21522
- package/dist/dev/chunk-LL55DS44.js.map +7 -0
- package/dist/dev/data/{image-V26YBSDB.js → image-OFYK7EOY.js} +3 -3
- package/dist/dev/index.css +3098 -3023
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +27238 -22881
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-OZCJJ2HN.js → en-KIY5SGI3.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +2 -2
- package/dist/dev/subset-worker.chunk.js +2 -2
- package/dist/prod/chunk-F44EGBV2.js +33 -0
- package/dist/prod/chunk-LS7FJGPW.js +86 -0
- package/dist/prod/{chunk-6U3AYISY.js → chunk-OUULIERA.js} +4 -4
- package/dist/prod/chunk-UH6Q3EIV.js +7 -0
- package/dist/prod/data/image-CUOH64HE.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +20 -16
- package/dist/prod/locales/{en-B4ZKOASM.js → en-GCLCIHXH.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/{excalidraw/binaryheap.d.ts → common/src/binary-heap.d.ts} +1 -1
- package/dist/types/{excalidraw → common/src}/colors.d.ts +1 -0
- package/dist/types/{excalidraw → common/src}/constants.d.ts +18 -7
- package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
- package/dist/types/{excalidraw/fonts/FontMetadata.d.ts → common/src/font-metadata.d.ts} +15 -5
- package/dist/types/common/src/index.d.ts +12 -0
- package/dist/types/{excalidraw → common/src}/points.d.ts +2 -0
- package/dist/types/common/src/promise-pool.d.ts +6 -0
- package/dist/types/{excalidraw → common/src}/utility-types.d.ts +5 -0
- package/dist/types/{excalidraw → common/src}/utils.d.ts +24 -11
- package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +14 -17
- package/dist/types/{excalidraw/scene → element/src}/Shape.d.ts +2 -2
- package/dist/types/{excalidraw/scene → element/src}/ShapeCache.d.ts +4 -4
- package/dist/types/element/src/align.d.ts +7 -0
- package/dist/types/{excalidraw/element → element/src}/binding.d.ts +24 -16
- package/dist/types/{excalidraw/element → element/src}/bounds.d.ts +9 -4
- package/dist/types/{excalidraw/element → element/src}/collision.d.ts +3 -3
- package/dist/types/{excalidraw/scene → element/src}/comparisons.d.ts +1 -1
- package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +41 -36
- package/dist/types/{excalidraw → element/src}/distribute.d.ts +1 -1
- package/dist/types/{excalidraw/element → element/src}/dragElements.d.ts +5 -4
- package/dist/types/element/src/duplicate.d.ts +63 -0
- package/dist/types/{excalidraw/element → element/src}/elbowArrow.d.ts +1 -1
- package/dist/types/{excalidraw/element → element/src}/elementLink.d.ts +1 -1
- package/dist/types/element/src/embeddable.d.ts +10 -0
- package/dist/types/{excalidraw/element → element/src}/flowchart.d.ts +4 -3
- package/dist/types/{excalidraw → element/src}/fractionalIndex.d.ts +5 -2
- package/dist/types/{excalidraw → element/src}/frame.d.ts +8 -7
- package/dist/types/{excalidraw → element/src}/groups.d.ts +5 -5
- package/dist/types/{excalidraw/element → element/src}/heading.d.ts +1 -2
- package/dist/types/{excalidraw/element → element/src}/image.d.ts +2 -2
- package/dist/types/element/src/index.d.ts +59 -0
- package/dist/types/{excalidraw/element → element/src}/linearElementEditor.d.ts +22 -33
- package/dist/types/{excalidraw/element → element/src}/mutateElement.d.ts +11 -3
- package/dist/types/{excalidraw/element → element/src}/newElement.d.ts +4 -43
- package/dist/types/{excalidraw/renderer → element/src}/renderElement.d.ts +3 -3
- package/dist/types/{excalidraw/element → element/src}/resizeElements.d.ts +6 -6
- package/dist/types/{excalidraw/element → element/src}/resizeTest.d.ts +4 -4
- package/dist/types/{excalidraw/scene → element/src}/selection.d.ts +13 -7
- package/dist/types/element/src/shapes.d.ts +27 -0
- package/dist/types/{excalidraw/element → element/src}/showSelectedShapeActions.d.ts +1 -1
- package/dist/types/{excalidraw/element → element/src}/sizeHelpers.d.ts +3 -3
- package/dist/types/element/src/store.d.ts +227 -0
- package/dist/types/{excalidraw/element → element/src}/textElement.d.ts +8 -7
- package/dist/types/{excalidraw/element → element/src}/transformHandles.d.ts +3 -3
- package/dist/types/{excalidraw/element → element/src}/typeChecks.d.ts +17 -3
- package/dist/types/{excalidraw/element → element/src}/types.d.ts +16 -3
- package/dist/types/{excalidraw → element/src}/zindex.d.ts +5 -4
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +91 -94
- package/dist/types/excalidraw/actions/actionAlign.d.ts +15 -15
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +66 -68
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +576 -413
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +195 -200
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +32 -33
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +93 -95
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +7 -7
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +5 -9
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +36 -37
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +78 -82
- package/dist/types/excalidraw/{element/embeddable.d.ts → actions/actionEmbeddable.d.ts} +32 -43
- package/dist/types/excalidraw/actions/actionExport.d.ts +295 -304
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +95 -57
- package/dist/types/excalidraw/actions/actionFlip.d.ts +7 -7
- package/dist/types/excalidraw/actions/actionFrame.d.ts +203 -207
- package/dist/types/excalidraw/actions/actionGroup.d.ts +65 -67
- package/dist/types/excalidraw/actions/actionHistory.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +526 -34
- package/dist/types/excalidraw/actions/actionLink.d.ts +36 -37
- package/dist/types/excalidraw/actions/actionMenu.d.ts +95 -98
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +61 -63
- package/dist/types/excalidraw/actions/actionProperties.d.ts +428 -435
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +33 -34
- package/dist/types/excalidraw/actions/actionStyles.d.ts +38 -39
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +34 -35
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +34 -35
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +34 -207
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +33 -35
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +34 -36
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +34 -36
- package/dist/types/excalidraw/actions/actionZindex.d.ts +16 -16
- package/dist/types/excalidraw/actions/index.d.ts +1 -0
- package/dist/types/excalidraw/actions/manager.d.ts +2 -2
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +6 -5
- package/dist/types/excalidraw/animated-trail.d.ts +7 -1
- package/dist/types/excalidraw/appState.d.ts +33 -23
- package/dist/types/excalidraw/charts.d.ts +1 -1
- package/dist/types/excalidraw/clipboard.d.ts +7 -7
- package/dist/types/excalidraw/components/Actions.d.ts +3 -3
- package/dist/types/excalidraw/components/App.d.ts +38 -20
- package/dist/types/excalidraw/components/Avatar.d.ts +1 -1
- package/dist/types/excalidraw/components/ButtonIcon.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -5
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +1 -2
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +4 -5
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +3 -4
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +3 -3
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +4 -4
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/ContextMenu.d.ts +2 -2
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
- package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +2 -2
- package/dist/types/excalidraw/components/DialogActionButton.d.ts +1 -1
- package/dist/types/excalidraw/{element → components}/ElementCanvasButtons.d.ts +1 -1
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +5 -4
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/FixedSideContainer.d.ts +1 -1
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +3 -3
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/HintViewer.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +1 -1
- package/dist/types/excalidraw/components/ImageExportDialog.d.ts +2 -2
- package/dist/types/excalidraw/components/InitializeApp.d.ts +1 -1
- package/dist/types/excalidraw/components/Island.d.ts +1 -1
- package/dist/types/excalidraw/components/JSONExportDialog.d.ts +2 -2
- package/dist/types/excalidraw/components/LayerUI.d.ts +3 -3
- package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +3 -3
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -2
- package/dist/types/excalidraw/components/LoadingMessage.d.ts +1 -1
- package/dist/types/excalidraw/components/MagicButton.d.ts +1 -1
- package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -3
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
- package/dist/types/excalidraw/components/PublishLibrary.d.ts +1 -1
- package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
- package/dist/types/excalidraw/components/Range.d.ts +3 -3
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/common.d.ts +1 -1
- package/dist/types/excalidraw/components/Stack.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/FontSize.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Position.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/index.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -11
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +1 -1
- package/dist/types/excalidraw/components/TextField.d.ts +1 -1
- package/dist/types/excalidraw/components/Toast.d.ts +1 -1
- package/dist/types/excalidraw/components/ToolButton.d.ts +2 -2
- package/dist/types/excalidraw/components/Tooltip.d.ts +1 -1
- package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/dist/types/excalidraw/components/UserList.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +4 -3
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -2
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +3 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +2 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +5 -4
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +3 -2
- package/dist/types/excalidraw/components/icons.d.ts +5 -1
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +4 -1
- package/dist/types/excalidraw/components/shapes.d.ts +62 -0
- package/dist/types/excalidraw/context/tunnels.d.ts +1 -1
- package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +1 -1
- package/dist/types/excalidraw/data/blob.d.ts +3 -3
- package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
- package/dist/types/excalidraw/data/index.d.ts +2 -2
- package/dist/types/excalidraw/data/json.d.ts +1 -1
- package/dist/types/excalidraw/data/library.d.ts +3 -3
- package/dist/types/excalidraw/data/reconcile.d.ts +2 -2
- package/dist/types/excalidraw/data/resave.d.ts +1 -1
- package/dist/types/excalidraw/data/restore.d.ts +1 -1
- package/dist/types/excalidraw/data/transform.d.ts +4 -4
- package/dist/types/excalidraw/data/types.d.ts +3 -3
- package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
- package/dist/types/excalidraw/eraser/index.d.ts +14 -0
- package/dist/types/excalidraw/errors.d.ts +0 -3
- package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -13
- package/dist/types/excalidraw/history.d.ts +15 -23
- package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/dist/types/excalidraw/i18n.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +16 -15
- package/dist/types/excalidraw/laser-trails.d.ts +1 -1
- package/dist/types/excalidraw/lasso/index.d.ts +16 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +12 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +8 -3
- package/dist/types/excalidraw/renderer/staticSvgScene.d.ts +2 -2
- package/dist/types/excalidraw/scene/Renderer.d.ts +3 -3
- package/dist/types/excalidraw/scene/export.d.ts +1 -1
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/scroll.d.ts +1 -1
- package/dist/types/excalidraw/scene/scrollbars.d.ts +2 -3
- package/dist/types/excalidraw/scene/types.d.ts +6 -4
- package/dist/types/excalidraw/snapping.d.ts +5 -6
- package/dist/types/excalidraw/types.d.ts +39 -18
- package/dist/types/excalidraw/visualdebug.d.ts +2 -2
- package/dist/types/excalidraw/{element → wysiwyg}/textWysiwyg.d.ts +4 -2
- package/dist/types/math/{angle.d.ts → src/angle.d.ts} +2 -0
- package/dist/types/math/{curve.d.ts → src/curve.d.ts} +2 -0
- package/dist/types/math/{point.d.ts → src/point.d.ts} +3 -3
- package/dist/types/math/{polygon.d.ts → src/polygon.d.ts} +1 -0
- package/dist/types/math/{segment.d.ts → src/segment.d.ts} +1 -1
- package/dist/types/math/{types.d.ts → src/types.d.ts} +1 -0
- package/dist/types/math/{vector.d.ts → src/vector.d.ts} +4 -0
- package/dist/types/utils/{bbox.d.ts → src/bbox.d.ts} +1 -1
- package/dist/types/utils/{collision.d.ts → src/collision.d.ts} +2 -3
- package/dist/types/utils/{export.d.ts → src/export.d.ts} +2 -2
- package/dist/types/utils/{index.d.ts → src/index.d.ts} +1 -1
- package/dist/types/utils/{geometry → src}/shape.d.ts +2 -15
- package/dist/types/utils/{withinBounds.d.ts → src/withinBounds.d.ts} +2 -2
- package/history.ts +70 -94
- package/package.json +16 -4
- package/dist/dev/chunk-3SN6HYVK.js.map +0 -7
- package/dist/dev/chunk-53KHN5WM.js +0 -7
- package/dist/dev/chunk-53KHN5WM.js.map +0 -7
- package/dist/dev/chunk-LMHBUWQS.js.map +0 -7
- package/dist/dev/chunk-OKSO7T74.js +0 -4132
- package/dist/dev/chunk-OKSO7T74.js.map +0 -7
- package/dist/prod/chunk-36CXSE6H.js +0 -34
- package/dist/prod/chunk-EIO257PC.js +0 -86
- package/dist/prod/chunk-G5N3DNGT.js +0 -7
- package/dist/prod/data/image-N4WCURRR.js +0 -1
- package/dist/types/excalidraw/align.d.ts +0 -7
- package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/dist/types/excalidraw/element/index.d.ts +0 -26
- package/dist/types/excalidraw/shapes.d.ts +0 -85
- package/dist/types/excalidraw/store.d.ts +0 -129
- package/dist/dev/data/{image-V26YBSDB.js.map → image-OFYK7EOY.js.map} +0 -0
- package/dist/dev/locales/{en-OZCJJ2HN.js.map → en-KIY5SGI3.js.map} +0 -0
- package/dist/types/{excalidraw → common/src}/keys.d.ts +0 -0
- package/dist/types/{excalidraw → common/src}/queue.d.ts +0 -0
- package/dist/types/{excalidraw → common/src}/random.d.ts +0 -0
- package/dist/types/{excalidraw/data → common/src}/url.d.ts +0 -0
- package/dist/types/{excalidraw/element → element/src}/containerCache.d.ts +0 -0
- package/dist/types/{excalidraw/element → element/src}/cropElement.d.ts +0 -0
- package/dist/types/{excalidraw/element → element/src}/distance.d.ts +0 -0
- package/dist/types/{excalidraw/element → element/src}/sortElements.d.ts +0 -0
- package/dist/types/{excalidraw/element → element/src}/textMeasurements.d.ts +0 -0
- package/dist/types/{excalidraw/element → element/src}/textWrapping.d.ts +0 -0
- package/dist/types/{excalidraw/element → element/src}/utils.d.ts +1 -1
- /package/dist/types/math/{ellipse.d.ts → src/ellipse.d.ts} +0 -0
- /package/dist/types/math/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/types/math/{line.d.ts → src/line.d.ts} +0 -0
- /package/dist/types/math/{range.d.ts → src/range.d.ts} +0 -0
- /package/dist/types/math/{rectangle.d.ts → src/rectangle.d.ts} +0 -0
- /package/dist/types/math/{triangle.d.ts → src/triangle.d.ts} +0 -0
- /package/dist/types/math/{utils.d.ts → src/utils.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A,B,C,D,E,F,G,H,I,J,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
1
|
+
import{A,B,C,D,E,F,G,H,I,J,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-OUULIERA.js";import"../chunk-SRAX5OIU.js";export{f as alerts,e as buttons,l as canvasError,s as clearCanvasDialog,C as colorPicker,A as colors,I as commandPalette,v as confirmDialog,J as default,i as element,b as elementLink,x as encrypted,p as errorDialog,m as errorSplash,g as errors,q as exportDialog,G as fontList,j as headings,r as helpDialog,k as hints,w as imageExportDialog,a as labels,c as library,E as mermaid,D as overwriteConfirm,t as publishDialog,u as publishSuccessDialog,F as quickSearch,o as roomDialog,d as search,n as shareDialog,y as stats,z as toast,h as toolBar,H as userList,B as welcomeScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-LS7FJGPW.js";import"./chunk-UH6Q3EIV.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,c as t}from"./chunk-
|
|
1
|
+
import{a as r,c as t}from"./chunk-LS7FJGPW.js";import"./chunk-UH6Q3EIV.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import oc from "open-color";
|
|
2
2
|
import type { Merge } from "./utility-types";
|
|
3
|
+
export declare const COLOR_OUTLINE_CONTRAST_THRESHOLD = 240;
|
|
3
4
|
export type ColorPickerColor = Exclude<keyof oc, "indigo" | "lime"> | "transparent" | "bronze";
|
|
4
5
|
export type ColorTuple = readonly [string, string, string, string, string];
|
|
5
6
|
export type ColorPalette = Merge<Record<ColorPickerColor, ColorTuple>, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ExcalidrawElement, FontFamilyValues } from "@excalidraw/element/types";
|
|
2
|
+
import type { AppProps, AppState } from "@excalidraw/excalidraw/types";
|
|
3
3
|
export declare const isDarwin: boolean;
|
|
4
4
|
export declare const isWindows: boolean;
|
|
5
5
|
export declare const isAndroid: boolean;
|
|
@@ -82,11 +82,13 @@ export declare const YOUTUBE_STATES: {
|
|
|
82
82
|
export declare const ENV: {
|
|
83
83
|
TEST: string;
|
|
84
84
|
DEVELOPMENT: string;
|
|
85
|
+
PRODUCTION: string;
|
|
85
86
|
};
|
|
86
87
|
export declare const CLASSES: {
|
|
87
88
|
SHAPE_ACTIONS_MENU: string;
|
|
88
89
|
ZOOM_ACTIONS: string;
|
|
89
90
|
SEARCH_MENU_INPUT_WRAPPER: string;
|
|
91
|
+
CONVERT_ELEMENT_TYPE_POPUP: string;
|
|
90
92
|
};
|
|
91
93
|
export declare const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai";
|
|
92
94
|
export declare const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
|
|
@@ -107,6 +109,7 @@ export declare const FONT_FAMILY: {
|
|
|
107
109
|
"Lilita One": number;
|
|
108
110
|
"Comic Shanns": number;
|
|
109
111
|
"Liberation Sans": number;
|
|
112
|
+
Assistant: number;
|
|
110
113
|
};
|
|
111
114
|
export declare const FONT_FAMILY_FALLBACKS: {
|
|
112
115
|
Xiaolai: number;
|
|
@@ -120,11 +123,11 @@ export declare const THEME: {
|
|
|
120
123
|
export declare const FRAME_STYLE: {
|
|
121
124
|
strokeColor: string;
|
|
122
125
|
strokeWidth: number;
|
|
123
|
-
strokeStyle: import("
|
|
124
|
-
fillStyle: import("
|
|
126
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
127
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
125
128
|
roughness: number;
|
|
126
129
|
roundness: {
|
|
127
|
-
type: import("
|
|
130
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
128
131
|
value?: number | undefined;
|
|
129
132
|
} | null;
|
|
130
133
|
backgroundColor: string;
|
|
@@ -193,7 +196,7 @@ export declare const EXPORT_DATA_TYPES: {
|
|
|
193
196
|
readonly excalidrawLibrary: "excalidrawlib";
|
|
194
197
|
readonly excalidrawClipboardWithAPI: "excalidraw-api/clipboard";
|
|
195
198
|
};
|
|
196
|
-
export declare const
|
|
199
|
+
export declare const getExportSource: () => string;
|
|
197
200
|
export declare const IMAGE_RENDER_TIMEOUT = 500;
|
|
198
201
|
export declare const TAP_TWICE_TIMEOUT = 300;
|
|
199
202
|
export declare const TOUCH_CTX_MENU_TIMEOUT = 500;
|
|
@@ -224,6 +227,7 @@ export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
|
224
227
|
export declare const DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT = 1440;
|
|
225
228
|
export declare const MAX_ALLOWED_FILE_BYTES: number;
|
|
226
229
|
export declare const SVG_NS = "http://www.w3.org/2000/svg";
|
|
230
|
+
export declare const SVG_DOCUMENT_PREAMBLE = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
|
|
227
231
|
export declare const ENCRYPTION_KEY_BITS = 128;
|
|
228
232
|
export declare const VERSIONS: {
|
|
229
233
|
readonly excalidraw: 2;
|
|
@@ -276,9 +280,10 @@ export declare const DEFAULT_SIDEBAR: {
|
|
|
276
280
|
readonly name: "default";
|
|
277
281
|
readonly defaultTab: "library";
|
|
278
282
|
};
|
|
279
|
-
export declare const LIBRARY_DISABLED_TYPES: Set<"
|
|
283
|
+
export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "image" | "iframe">;
|
|
280
284
|
export declare const TOOL_TYPE: {
|
|
281
285
|
readonly selection: "selection";
|
|
286
|
+
readonly lasso: "lasso";
|
|
282
287
|
readonly rectangle: "rectangle";
|
|
283
288
|
readonly diamond: "diamond";
|
|
284
289
|
readonly ellipse: "ellipse";
|
|
@@ -321,3 +326,9 @@ export declare enum UserIdleState {
|
|
|
321
326
|
AWAY = "away",
|
|
322
327
|
IDLE = "idle"
|
|
323
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* distance at which we merge points instead of adding a new merge-point
|
|
331
|
+
* when converting a line to a polygon (merge currently means overlaping
|
|
332
|
+
* the start and end points)
|
|
333
|
+
*/
|
|
334
|
+
export declare const LINE_POLYGON_POINT_MERGE_DISTANCE = 20;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UnsubscribeCallback } from "
|
|
1
|
+
import type { UnsubscribeCallback } from "@excalidraw/excalidraw/types";
|
|
2
2
|
type Subscriber<T extends any[]> = (...payload: T) => void;
|
|
3
3
|
export declare class Emitter<T extends any[] = []> {
|
|
4
4
|
subscribers: Subscriber<T>[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ExcalidrawTextElement, FontFamilyValues } from "@excalidraw/element/types";
|
|
2
2
|
/**
|
|
3
3
|
* Encapsulates font metrics with additional font metadata.
|
|
4
4
|
* */
|
|
@@ -14,12 +14,12 @@ export interface FontMetadata {
|
|
|
14
14
|
/** harcoded unitless line-height, https://github.com/excalidraw/excalidraw/pull/6360#issuecomment-1477635971 */
|
|
15
15
|
lineHeight: number;
|
|
16
16
|
};
|
|
17
|
-
/** element to be displayed as an icon */
|
|
18
|
-
icon?: JSX.Element;
|
|
19
17
|
/** flag to indicate a deprecated font */
|
|
20
18
|
deprecated?: true;
|
|
21
|
-
/**
|
|
22
|
-
|
|
19
|
+
/**
|
|
20
|
+
* whether this is a font that users can use (= shown in font picker)
|
|
21
|
+
*/
|
|
22
|
+
private?: true;
|
|
23
23
|
/** flag to indiccate a local-only font */
|
|
24
24
|
local?: true;
|
|
25
25
|
/** flag to indicate a fallback font */
|
|
@@ -36,3 +36,13 @@ export declare const GOOGLE_FONTS_RANGES: {
|
|
|
36
36
|
};
|
|
37
37
|
/** local protocol to skip the local font from registering or inlining */
|
|
38
38
|
export declare const LOCAL_FONT_PROTOCOL = "local:";
|
|
39
|
+
/**
|
|
40
|
+
* Calculates vertical offset for a text with alphabetic baseline.
|
|
41
|
+
*/
|
|
42
|
+
export declare const getVerticalOffset: (fontFamily: ExcalidrawTextElement["fontFamily"], fontSize: ExcalidrawTextElement["fontSize"], lineHeightPx: number) => number;
|
|
43
|
+
/**
|
|
44
|
+
* Gets line height for a selected family.
|
|
45
|
+
*/
|
|
46
|
+
export declare const getLineHeight: (fontFamily: FontFamilyValues) => number & {
|
|
47
|
+
_brand: "unitlessLineHeight";
|
|
48
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./binary-heap";
|
|
2
|
+
export * from "./colors";
|
|
3
|
+
export * from "./constants";
|
|
4
|
+
export * from "./font-metadata";
|
|
5
|
+
export * from "./queue";
|
|
6
|
+
export * from "./keys";
|
|
7
|
+
export * from "./points";
|
|
8
|
+
export * from "./promise-pool";
|
|
9
|
+
export * from "./random";
|
|
10
|
+
export * from "./url";
|
|
11
|
+
export * from "./utils";
|
|
12
|
+
export * from "./emitter";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { NullableGridSize } from "@excalidraw/excalidraw/types";
|
|
2
3
|
export declare const getSizeFromPoints: (points: readonly (GlobalPoint | LocalPoint)[]) => {
|
|
3
4
|
width: number;
|
|
4
5
|
height: number;
|
|
5
6
|
};
|
|
6
7
|
/** @arg dimension, 0 for rescaling only x, 1 for y */
|
|
7
8
|
export declare const rescalePoints: <Point extends GlobalPoint | LocalPoint>(dimension: 0 | 1, newSize: number, points: readonly Point[], normalize: boolean) => Point[];
|
|
9
|
+
export declare const getGridPoint: (x: number, y: number, gridSize: NullableGridSize) => [number, number];
|
|
@@ -31,3 +31,8 @@ export type MakeBrand<T extends string> = {
|
|
|
31
31
|
/** Maybe just promise or already fulfilled one! */
|
|
32
32
|
export type MaybePromise<T> = T | Promise<T>;
|
|
33
33
|
export type AllPossibleKeys<T> = T extends any ? keyof T : never;
|
|
34
|
+
/** Strip all the methods or functions from a type */
|
|
35
|
+
export type DTO<T> = {
|
|
36
|
+
[K in keyof T as T[K] extends Function ? never : K]: T[K];
|
|
37
|
+
};
|
|
38
|
+
export type MapEntry<M extends Map<any, any>> = M extends Map<infer K, infer V> ? [K, V] : never;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { ExcalidrawBindableElement, FontFamilyValues, FontString } from "
|
|
3
|
-
import type { ActiveTool, AppState, ToolType, UnsubscribeCallback, Zoom } from "
|
|
1
|
+
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { ExcalidrawBindableElement, FontFamilyValues, FontString, ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { ActiveTool, AppState, ToolType, UnsubscribeCallback, Zoom } from "@excalidraw/excalidraw/types";
|
|
4
4
|
import type { MaybePromise } from "./utility-types";
|
|
5
|
+
import type { EVENT } from "./constants";
|
|
5
6
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
6
7
|
export declare const getDateTime: () => string;
|
|
7
8
|
export declare const capitalizeString: (str: string) => string;
|
|
8
9
|
export declare const isToolIcon: (target: Element | EventTarget | null) => target is HTMLElement;
|
|
9
|
-
export declare const isInputLike: (target: Element | EventTarget | null) => target is HTMLInputElement |
|
|
10
|
+
export declare const isInputLike: (target: Element | EventTarget | null) => target is HTMLInputElement | HTMLSelectElement | HTMLBRElement | HTMLDivElement | HTMLTextAreaElement;
|
|
10
11
|
export declare const isInteractive: (target: Element | EventTarget | null) => boolean;
|
|
11
|
-
export declare const isWritableElement: (target: Element | EventTarget | null) => target is HTMLInputElement |
|
|
12
|
+
export declare const isWritableElement: (target: Element | EventTarget | null) => target is HTMLInputElement | HTMLBRElement | HTMLDivElement | HTMLTextAreaElement;
|
|
12
13
|
export declare const getFontFamilyString: ({ fontFamily, }: {
|
|
13
14
|
fontFamily: FontFamilyValues;
|
|
14
15
|
}) => string;
|
|
@@ -87,6 +88,7 @@ export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">,
|
|
|
87
88
|
customType: string;
|
|
88
89
|
}) & {
|
|
89
90
|
locked?: boolean;
|
|
91
|
+
fromSelection?: boolean;
|
|
90
92
|
}) & {
|
|
91
93
|
lastActiveToolBeforeEraser?: ActiveTool | null;
|
|
92
94
|
}) => AppState["activeTool"];
|
|
@@ -136,6 +138,8 @@ export declare const tupleToCoors: (xyTuple: readonly [number, number]) => {
|
|
|
136
138
|
export declare const muteFSAbortError: (error?: Error) => void;
|
|
137
139
|
export declare const findIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
138
140
|
export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
141
|
+
/** returns the first non-null mapped value */
|
|
142
|
+
export declare const mapFind: <T, K>(collection: readonly T[], iteratee: (value: T, index: number) => K | null | undefined) => K | undefined;
|
|
139
143
|
export declare const isTransparent: (color: string) => boolean;
|
|
140
144
|
export declare const isBindingFallthroughEnabled: (el: ExcalidrawBindableElement) => boolean;
|
|
141
145
|
export type ResolvablePromise<T> = Promise<T> & {
|
|
@@ -176,8 +180,18 @@ export type Node<T> = T & {
|
|
|
176
180
|
* Creates a circular doubly linked list by adding `prev` and `next` props to the existing array nodes.
|
|
177
181
|
*/
|
|
178
182
|
export declare const arrayToList: <T>(array: readonly T[]) => Node<T>[];
|
|
183
|
+
/**
|
|
184
|
+
* Converts a readonly array or map into an iterable.
|
|
185
|
+
* Useful for avoiding entry allocations when iterating object / map on each iteration.
|
|
186
|
+
*/
|
|
187
|
+
export declare const toIterable: <T>(values: ReadonlyMap<string, T> | readonly T[]) => Iterable<T>;
|
|
188
|
+
/**
|
|
189
|
+
* Converts a readonly array or map into an array.
|
|
190
|
+
*/
|
|
191
|
+
export declare const toArray: <T>(values: ReadonlyMap<string, T> | readonly T[]) => T[];
|
|
179
192
|
export declare const isTestEnv: () => boolean;
|
|
180
193
|
export declare const isDevEnv: () => boolean;
|
|
194
|
+
export declare const isProdEnv: () => boolean;
|
|
181
195
|
export declare const isServerEnv: () => boolean;
|
|
182
196
|
export declare const wrapEvent: <T extends Event>(name: EVENT, nativeEvent: T) => CustomEvent<{
|
|
183
197
|
nativeEvent: T;
|
|
@@ -241,16 +255,15 @@ export declare const toBrandedType: <BrandedType, CurrentType = BrandedType>(val
|
|
|
241
255
|
export declare const promiseTry: <TValue, TArgs extends unknown[]>(fn: (...args: TArgs) => TValue | PromiseLike<TValue>, ...args: TArgs) => Promise<TValue>;
|
|
242
256
|
export declare const isAnyTrue: (...args: boolean[]) => boolean;
|
|
243
257
|
export declare const safelyParseJSON: (json: string) => Record<string, any> | null;
|
|
244
|
-
export declare class PromisePool<T> {
|
|
245
|
-
private readonly pool;
|
|
246
|
-
private readonly entries;
|
|
247
|
-
constructor(source: IterableIterator<Promise<void | readonly [number, T]>>, concurrency: number);
|
|
248
|
-
all(): PromiseLike<T[]>;
|
|
249
|
-
}
|
|
250
258
|
/**
|
|
251
259
|
* use when you need to render unsafe string as HTML attribute, but MAKE SURE
|
|
252
260
|
* the attribute is double-quoted when constructing the HTML string
|
|
253
261
|
*/
|
|
254
262
|
export declare const escapeDoubleQuotes: (str: string) => string;
|
|
255
263
|
export declare const castArray: <T>(value: T | T[]) => T[];
|
|
264
|
+
export declare const elementCenterPoint: (element: ExcalidrawElement, xOffset?: number, yOffset?: number) => GlobalPoint;
|
|
265
|
+
/** hack for Array.isArray type guard not working with readonly value[] */
|
|
266
|
+
export declare const isReadonlyArray: (value?: any) => value is readonly any[];
|
|
267
|
+
export declare const sizeOf: (value: readonly unknown[] | Readonly<Map<string, unknown>> | Readonly<Record<string, unknown>> | ReadonlySet<unknown>) => number;
|
|
268
|
+
export declare const reduceToCommonValue: <T, R = T>(collection: ReadonlySet<T> | readonly T[], getValue?: ((item: T) => R) | undefined) => R | null;
|
|
256
269
|
export {};
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
type
|
|
5
|
-
type ElementKey = ExcalidrawElement | ElementIdKey;
|
|
1
|
+
import { type ElementUpdate } from "@excalidraw/element";
|
|
2
|
+
import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawFrameLikeElement, ElementsMapOrArray, OrderedExcalidrawElement, Ordered } from "@excalidraw/element/types";
|
|
3
|
+
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
4
|
+
import type { AppState } from "../../excalidraw/types";
|
|
6
5
|
type SceneStateCallback = () => void;
|
|
7
6
|
type SceneStateCallbackRemover = () => void;
|
|
8
7
|
export type ExcalidrawElementsIncludingDeleted = readonly ExcalidrawElement[];
|
|
9
|
-
declare class Scene {
|
|
10
|
-
private static sceneMapByElement;
|
|
11
|
-
private static sceneMapById;
|
|
12
|
-
static mapElementToScene(elementKey: ElementKey, scene: Scene): void;
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated pass down `app.scene` and use it directly
|
|
15
|
-
*/
|
|
16
|
-
static getScene(elementKey: ElementKey): Scene | null;
|
|
8
|
+
export declare class Scene {
|
|
17
9
|
private callbacks;
|
|
18
10
|
private nonDeletedElements;
|
|
19
11
|
private nonDeletedElementsMap;
|
|
@@ -30,11 +22,12 @@ declare class Scene {
|
|
|
30
22
|
*/
|
|
31
23
|
private sceneNonce;
|
|
32
24
|
getSceneNonce(): number | undefined;
|
|
33
|
-
getNonDeletedElementsMap(): Map<string, Ordered<NonDeletedExcalidrawElement>> & import("
|
|
25
|
+
getNonDeletedElementsMap(): Map<string, Ordered<NonDeletedExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"NonDeletedSceneElementsMap">;
|
|
34
26
|
getElementsIncludingDeleted(): readonly OrderedExcalidrawElement[];
|
|
35
|
-
getElementsMapIncludingDeleted(): Map<string, Ordered<ExcalidrawElement>> & import("
|
|
27
|
+
getElementsMapIncludingDeleted(): Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
|
|
36
28
|
getNonDeletedElements(): readonly Ordered<NonDeletedExcalidrawElement>[];
|
|
37
29
|
getFramesIncludingDeleted(): readonly ExcalidrawFrameLikeElement[];
|
|
30
|
+
constructor(elements?: ElementsMapOrArray | null);
|
|
38
31
|
getSelectedElements(opts: {
|
|
39
32
|
selectedElementIds: AppState["selectedElementIds"];
|
|
40
33
|
/**
|
|
@@ -73,7 +66,11 @@ declare class Scene {
|
|
|
73
66
|
getElementIndex(elementId: string): number;
|
|
74
67
|
getContainerElement: (element: (ExcalidrawElement & {
|
|
75
68
|
containerId: ExcalidrawElement["id"] | null;
|
|
76
|
-
}) | null) => import("
|
|
69
|
+
}) | null) => import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | null;
|
|
77
70
|
getElementsFromId: (id: string) => ExcalidrawElement[];
|
|
71
|
+
mutateElement<TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, options?: {
|
|
72
|
+
informMutation: boolean;
|
|
73
|
+
isDragging: boolean;
|
|
74
|
+
}): TElement;
|
|
78
75
|
}
|
|
79
|
-
export
|
|
76
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { EmbedsValidationStatus } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { ExcalidrawElement, NonDeletedExcalidrawElement, ExcalidrawSelectionElement } from "./types";
|
|
1
3
|
import type { Drawable, Options } from "roughjs/bin/core";
|
|
2
4
|
import type { RoughGenerator } from "roughjs/bin/generator";
|
|
3
|
-
import type { ExcalidrawElement, NonDeletedExcalidrawElement, ExcalidrawSelectionElement } from "../element/types";
|
|
4
|
-
import type { EmbedsValidationStatus } from "../types";
|
|
5
5
|
export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean) => Options;
|
|
6
6
|
/**
|
|
7
7
|
* Generates the roughjs shape for given element.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { AppState, EmbedsValidationStatus } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { ElementShape, ElementShapes } from "@excalidraw/excalidraw/scene/types";
|
|
3
|
+
import type { ExcalidrawElement } from "./types";
|
|
1
4
|
import type { Drawable } from "roughjs/bin/core";
|
|
2
|
-
import type { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import type { ElementShape, ElementShapes } from "./types";
|
|
4
|
-
import type { AppState, EmbedsValidationStatus } from "../types";
|
|
5
5
|
export declare class ShapeCache {
|
|
6
6
|
private static rg;
|
|
7
7
|
private static cache;
|
|
@@ -17,7 +17,7 @@ export declare class ShapeCache {
|
|
|
17
17
|
* Generates & caches shape for element if not already cached, otherwise
|
|
18
18
|
* returns cached shape.
|
|
19
19
|
*/
|
|
20
|
-
static generateElementShape: <T extends import("
|
|
20
|
+
static generateElementShape: <T extends import("./types").ExcalidrawRectangleElement | import("./types").ExcalidrawDiamondElement | import("./types").ExcalidrawEllipseElement | import("./types").ExcalidrawTextElement | import("./types").ExcalidrawLinearElement | import("./types").ExcalidrawArrowElement | import("./types").ExcalidrawFreeDrawElement | import("./types").ExcalidrawImageElement | import("./types").ExcalidrawFrameElement | import("./types").ExcalidrawMagicFrameElement | import("./types").ExcalidrawIframeElement | import("./types").ExcalidrawEmbeddableElement>(element: T, renderConfig: {
|
|
21
21
|
isExporting: boolean;
|
|
22
22
|
canvasBackgroundColor: AppState["viewBackgroundColor"];
|
|
23
23
|
embedsValidationStatus: EmbedsValidationStatus;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Scene } from "./Scene";
|
|
2
|
+
import type { ExcalidrawElement } from "./types";
|
|
3
|
+
export interface Alignment {
|
|
4
|
+
position: "start" | "center" | "end";
|
|
5
|
+
axis: "x" | "y";
|
|
6
|
+
}
|
|
7
|
+
export declare const alignElements: (selectedElements: ExcalidrawElement[], alignment: Alignment, scene: Scene) => ExcalidrawElement[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { LocalPoint } from "@excalidraw/math";
|
|
3
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import { type Heading } from "./heading";
|
|
5
|
+
import type { Scene } from "./Scene";
|
|
2
6
|
import type { Bounds } from "./bounds";
|
|
3
|
-
import type { AppState } from "../types";
|
|
4
7
|
import type { ElementUpdate } from "./mutateElement";
|
|
5
|
-
import type
|
|
6
|
-
import { type Heading } from "./heading";
|
|
7
|
-
import type { LocalPoint } from "@excalidraw/math";
|
|
8
|
-
import { type GlobalPoint } from "@excalidraw/math";
|
|
8
|
+
import type { ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, ExcalidrawLinearElement, NonDeletedExcalidrawElement, ElementsMap, NonDeletedSceneElementsMap, ExcalidrawElbowArrowElement, FixedPoint } from "./types";
|
|
9
9
|
export type SuggestedBinding = NonDeleted<ExcalidrawBindableElement> | SuggestedPointBinding;
|
|
10
10
|
export type SuggestedPointBinding = [
|
|
11
11
|
NonDeleted<ExcalidrawLinearElement>,
|
|
@@ -17,35 +17,43 @@ export declare const isBindingEnabled: (appState: AppState) => boolean;
|
|
|
17
17
|
export declare const FIXED_BINDING_DISTANCE = 5;
|
|
18
18
|
export declare const BINDING_HIGHLIGHT_THICKNESS = 10;
|
|
19
19
|
export declare const BINDING_HIGHLIGHT_OFFSET = 4;
|
|
20
|
-
export declare const bindOrUnbindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, startBindingElement: ExcalidrawBindableElement | null | "keep", endBindingElement: ExcalidrawBindableElement | null | "keep",
|
|
21
|
-
export declare const bindOrUnbindLinearElements: (selectedElements: NonDeleted<ExcalidrawLinearElement>[],
|
|
20
|
+
export declare const bindOrUnbindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, startBindingElement: ExcalidrawBindableElement | null | "keep", endBindingElement: ExcalidrawBindableElement | null | "keep", scene: Scene) => void;
|
|
21
|
+
export declare const bindOrUnbindLinearElements: (selectedElements: NonDeleted<ExcalidrawLinearElement>[], isBindingEnabled: boolean, draggingPoints: readonly number[] | null, scene: Scene, zoom?: AppState["zoom"]) => void;
|
|
22
22
|
export declare const getSuggestedBindingsForArrows: (selectedElements: NonDeleted<ExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, zoom: AppState["zoom"]) => SuggestedBinding[];
|
|
23
23
|
export declare const maybeBindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, appState: AppState, pointerCoords: {
|
|
24
24
|
x: number;
|
|
25
25
|
y: number;
|
|
26
|
-
},
|
|
27
|
-
export declare const bindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end",
|
|
26
|
+
}, scene: Scene) => void;
|
|
27
|
+
export declare const bindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", scene: Scene) => void;
|
|
28
28
|
export declare const isLinearElementSimpleAndAlreadyBound: (linearElement: NonDeleted<ExcalidrawLinearElement>, alreadyBoundToId: ExcalidrawBindableElement["id"] | undefined, bindableElement: ExcalidrawBindableElement) => boolean;
|
|
29
29
|
export declare const getHoveredElementForBinding: (pointerCoords: {
|
|
30
30
|
x: number;
|
|
31
31
|
y: number;
|
|
32
32
|
}, elements: readonly NonDeletedExcalidrawElement[], elementsMap: NonDeletedSceneElementsMap, zoom?: AppState["zoom"], fullShape?: boolean, considerAllElements?: boolean) => NonDeleted<ExcalidrawBindableElement> | null;
|
|
33
|
-
export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement,
|
|
33
|
+
export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement, scene: Scene, options?: {
|
|
34
|
+
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
35
|
+
newSize?: {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
};
|
|
39
|
+
changedElements?: Map<string, ExcalidrawElement>;
|
|
40
|
+
}) => void;
|
|
41
|
+
export declare const updateBindings: (latestElement: ExcalidrawElement, scene: Scene, options?: {
|
|
34
42
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
35
43
|
newSize?: {
|
|
36
44
|
width: number;
|
|
37
45
|
height: number;
|
|
38
46
|
};
|
|
39
|
-
|
|
47
|
+
zoom?: AppState["zoom"];
|
|
40
48
|
}) => void;
|
|
41
|
-
export declare const getHeadingForElbowArrowSnap: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined | null, aabb: Bounds | undefined | null,
|
|
42
|
-
export declare const bindPointToSnapToElementOutline: (arrow: ExcalidrawElbowArrowElement, bindableElement: ExcalidrawBindableElement
|
|
49
|
+
export declare const getHeadingForElbowArrowSnap: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined | null, aabb: Bounds | undefined | null, origPoint: GlobalPoint, zoom?: AppState["zoom"]) => Heading;
|
|
50
|
+
export declare const bindPointToSnapToElementOutline: (arrow: ExcalidrawElbowArrowElement, bindableElement: ExcalidrawBindableElement, startOrEnd: "start" | "end") => GlobalPoint;
|
|
43
51
|
export declare const avoidRectangularCorner: (element: ExcalidrawBindableElement, p: GlobalPoint) => GlobalPoint;
|
|
44
52
|
export declare const snapToMid: (element: ExcalidrawBindableElement, p: GlobalPoint, tolerance?: number) => GlobalPoint;
|
|
45
|
-
export declare const calculateFixedPointForElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawElbowArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end"
|
|
53
|
+
export declare const calculateFixedPointForElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawElbowArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end") => {
|
|
46
54
|
fixedPoint: FixedPoint;
|
|
47
55
|
};
|
|
48
|
-
export declare const
|
|
56
|
+
export declare const fixDuplicatedBindingsAfterDuplication: (duplicatedElements: ExcalidrawElement[], origIdToDuplicateId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>, duplicateElementsMap: NonDeletedSceneElementsMap) => void;
|
|
49
57
|
export declare const fixBindingsAfterDeletion: (sceneElements: readonly ExcalidrawElement[], deletedElements: readonly ExcalidrawElement[]) => void;
|
|
50
58
|
export declare const bindingBorderTest: (element: NonDeleted<ExcalidrawBindableElement>, { x, y }: {
|
|
51
59
|
x: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ExcalidrawElement, ExcalidrawLinearElement, Arrowhead, ExcalidrawFreeDrawElement, NonDeleted, ElementsMap } from "./types";
|
|
2
|
-
import type { Drawable, Op } from "roughjs/bin/core";
|
|
3
|
-
import type { AppState } from "../types";
|
|
4
1
|
import type { Degrees, GlobalPoint, LineSegment } from "@excalidraw/math";
|
|
2
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
3
|
+
import type { Drawable, Op } from "roughjs/bin/core";
|
|
4
|
+
import type { Arrowhead, ElementsMap, ElementsMapOrArray, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, NonDeleted } from "./types";
|
|
5
5
|
export type RectangleBox = {
|
|
6
6
|
x: number;
|
|
7
7
|
y: number;
|
|
@@ -30,6 +30,11 @@ export declare class ElementBounds {
|
|
|
30
30
|
private static calculateBounds;
|
|
31
31
|
}
|
|
32
32
|
export declare const getElementAbsoluteCoords: (element: ExcalidrawElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
|
|
33
|
+
/**
|
|
34
|
+
* Given an element, return the line segments that make up the element.
|
|
35
|
+
*
|
|
36
|
+
* Uses helpers from /math
|
|
37
|
+
*/
|
|
33
38
|
export declare const getElementLineSegments: (element: ExcalidrawElement, elementsMap: ElementsMap) => LineSegment<GlobalPoint>[];
|
|
34
39
|
/**
|
|
35
40
|
* Scene -> Scene coords, but in x1,x2,y1,y2 format.
|
|
@@ -46,7 +51,7 @@ export declare const getArrowheadSize: (arrowhead: Arrowhead) => number;
|
|
|
46
51
|
export declare const getArrowheadAngle: (arrowhead: Arrowhead) => Degrees;
|
|
47
52
|
export declare const getArrowheadPoints: (element: ExcalidrawLinearElement, shape: Drawable[], position: "start" | "end", arrowhead: Arrowhead) => number[] | null;
|
|
48
53
|
export declare const getElementBounds: (element: ExcalidrawElement, elementsMap: ElementsMap) => Bounds;
|
|
49
|
-
export declare const getCommonBounds: (elements:
|
|
54
|
+
export declare const getCommonBounds: (elements: ElementsMapOrArray, elementsMap?: ElementsMap) => Bounds;
|
|
50
55
|
export declare const getDraggedElementsBounds: (elements: ExcalidrawElement[], dragOffset: {
|
|
51
56
|
x: number;
|
|
52
57
|
y: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { FrameNameBounds } from "../types";
|
|
3
|
-
import type { GeometricShape } from "@excalidraw/utils/geometry/shape";
|
|
1
|
+
import { type GeometricShape } from "@excalidraw/utils/shape";
|
|
4
2
|
import type { GlobalPoint, LineSegment, LocalPoint } from "@excalidraw/math";
|
|
3
|
+
import type { FrameNameBounds } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
5
5
|
export declare const shouldTestInside: (element: ExcalidrawElement) => boolean;
|
|
6
6
|
export type HitTestArgs<Point extends GlobalPoint | LocalPoint> = {
|
|
7
7
|
x: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ElementOrToolType } from "
|
|
1
|
+
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
2
|
export declare const hasBackground: (type: ElementOrToolType) => boolean;
|
|
3
3
|
export declare const hasStrokeColor: (type: ElementOrToolType) => boolean;
|
|
4
4
|
export declare const hasStrokeWidth: (type: ElementOrToolType) => boolean;
|