@excalidraw/excalidraw 0.18.0-432a46e → 0.18.0-4e0441e
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/chunk-CP5DND7P.js +7 -0
- package/dist/dev/chunk-CP5DND7P.js.map +7 -0
- package/dist/dev/{chunk-LMHBUWQS.js → chunk-LLUJPE5U.js} +62 -29
- package/dist/dev/chunk-LLUJPE5U.js.map +7 -0
- package/dist/dev/chunk-YMRX7R7U.js +5671 -0
- package/dist/dev/chunk-YMRX7R7U.js.map +7 -0
- package/dist/dev/data/{image-5HAY2PCR.js → image-L23D26XS.js} +3 -3
- package/dist/dev/index.css +997 -521
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +13994 -12296
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-OZCJJ2HN.js → en-YSPYSBUR.js} +4 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-A66AFZZU.js +7 -0
- package/dist/prod/chunk-HT4FKTIQ.js +4 -0
- package/dist/prod/chunk-RSFMSEP5.js +12 -0
- package/dist/prod/data/image-NWF7UX55.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +25 -17
- package/dist/prod/locales/en-SFRQHD7K.js +1 -0
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/{packages/common → common}/src/colors.d.ts +1 -0
- package/dist/types/{packages/common → common}/src/constants.d.ts +47 -7
- package/dist/types/{packages/excalidraw → common/src}/emitter.d.ts +1 -1
- package/dist/types/{packages/common → common}/src/font-metadata.d.ts +4 -2
- package/dist/types/{packages/common → common}/src/index.d.ts +1 -0
- package/dist/types/{packages/common → common}/src/utility-types.d.ts +5 -0
- package/dist/types/{packages/common → common}/src/utils.d.ts +21 -2
- package/dist/types/{packages/excalidraw/scene → element/src}/Scene.d.ts +16 -15
- package/dist/types/element/src/align.d.ts +8 -0
- package/dist/types/{packages/element → element}/src/binding.d.ts +26 -15
- package/dist/types/{packages/element → element}/src/bounds.d.ts +19 -6
- package/dist/types/element/src/collision.d.ts +32 -0
- package/dist/types/{packages/element → element}/src/cropElement.d.ts +1 -1
- package/dist/types/{packages/excalidraw/change.d.ts → element/src/delta.d.ts} +77 -40
- package/dist/types/element/src/distance.d.ts +3 -0
- package/dist/types/{packages/element → element}/src/distribute.d.ts +2 -1
- package/dist/types/{packages/element → element}/src/dragElements.d.ts +3 -2
- package/dist/types/{packages/element → element}/src/duplicate.d.ts +10 -13
- package/dist/types/{packages/element → element}/src/elbowArrow.d.ts +1 -1
- package/dist/types/{packages/element → element}/src/flowchart.d.ts +3 -2
- package/dist/types/{packages/element → element}/src/fractionalIndex.d.ts +9 -3
- package/dist/types/{packages/element → element}/src/frame.d.ts +5 -4
- package/dist/types/{packages/element → element}/src/groups.d.ts +1 -0
- package/dist/types/{packages/element → element}/src/heading.d.ts +0 -1
- package/dist/types/element/src/index.d.ts +58 -0
- package/dist/types/{packages/element → element}/src/linearElementEditor.d.ts +23 -36
- package/dist/types/{packages/element → element}/src/mutateElement.d.ts +11 -3
- package/dist/types/{packages/element → element}/src/newElement.d.ts +4 -3
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/{packages/element → element}/src/renderElement.d.ts +4 -1
- package/dist/types/{packages/element → element}/src/resizeElements.d.ts +5 -4
- package/dist/types/{packages/element → element}/src/selection.d.ts +11 -5
- package/dist/types/element/src/shape.d.ts +42 -0
- package/dist/types/{packages/element → element}/src/sizeHelpers.d.ts +2 -2
- package/dist/types/element/src/store.d.ts +237 -0
- package/dist/types/{packages/element → element}/src/textElement.d.ts +5 -3
- package/dist/types/{packages/element → element}/src/transformHandles.d.ts +1 -1
- package/dist/types/{packages/element → element}/src/typeChecks.d.ts +19 -1
- package/dist/types/{packages/element → element}/src/types.d.ts +15 -2
- package/dist/types/element/src/utils.d.ts +31 -0
- package/dist/types/{packages/element → element}/src/zindex.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionAddToLibrary.d.ts +60 -54
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionBoundText.d.ts +40 -36
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionCanvas.d.ts +431 -228
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionClipboard.d.ts +120 -106
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionCropEditor.d.ts +20 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionDeleteSelected.d.ts +60 -53
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionElementLink.d.ts +19 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionElementLock.d.ts +55 -53
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionEmbeddable.d.ts +20 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionExport.d.ts +190 -172
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionFinalize.d.ts +87 -42
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionFrame.d.ts +127 -119
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionGroup.d.ts +40 -36
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionHistory.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +718 -0
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionLink.d.ts +19 -17
- package/dist/types/excalidraw/actions/actionMenu.d.ts +184 -0
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionNavigate.d.ts +40 -36
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionProperties.d.ts +320 -273
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionSelectAll.d.ts +20 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionStyles.d.ts +20 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleGridMode.d.ts +20 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleObjectsSnapMode.d.ts +20 -18
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +187 -0
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleStats.d.ts +20 -19
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleViewMode.d.ts +20 -19
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleZenMode.d.ts +20 -19
- package/dist/types/{packages/excalidraw → excalidraw}/actions/index.d.ts +2 -2
- package/dist/types/{packages/excalidraw → excalidraw}/actions/types.d.ts +4 -3
- package/dist/types/{packages/excalidraw → excalidraw}/animated-trail.d.ts +7 -1
- package/dist/types/{packages/excalidraw → excalidraw}/appState.d.ts +24 -10
- package/dist/types/excalidraw/clipboard.d.ts +129 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/Actions.d.ts +17 -7
- package/dist/types/{packages/excalidraw → excalidraw}/components/App.d.ts +43 -25
- package/dist/types/{packages/excalidraw → excalidraw}/components/ButtonIcon.d.ts +1 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/ColorInput.d.ts +2 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/ColorPicker.d.ts +6 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +7 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/Picker.d.ts +4 -3
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/PickerColorList.d.ts +3 -3
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +9 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/TopPicks.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/colorPickerUtils.d.ts +2 -2
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/ElementLinkDialog.d.ts +4 -3
- package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/ExcalidrawLogo.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +8 -0
- package/dist/types/excalidraw/components/InlineIcon.d.ts +5 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/LayerUI.d.ts +2 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/MobileMenu.d.ts +3 -5
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/Popover.d.ts +2 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/PropertiesPopover.d.ts +1 -0
- package/dist/types/{packages/excalidraw/components/ButtonIconSelect.d.ts → excalidraw/components/RadioSelection.d.ts} +1 -1
- package/dist/types/excalidraw/components/Range.d.ts +8 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/Angle.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/CanvasGrid.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/Collapsible.d.ts +2 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/Dimension.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/DragInput.d.ts +12 -2
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/FontSize.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/MultiAngle.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/MultiDimension.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/MultiFontSize.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/MultiPosition.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/Position.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/utils.d.ts +4 -11
- package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
- package/dist/types/{packages/excalidraw → excalidraw}/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/canvases/InteractiveCanvas.d.ts +1 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenu.d.ts +4 -2
- package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/hyperlink/Hyperlink.d.ts +3 -2
- package/dist/types/{packages/excalidraw → excalidraw}/components/hyperlink/helpers.d.ts +2 -1
- package/dist/types/{packages/excalidraw → excalidraw}/components/icons.d.ts +9 -0
- package/dist/types/excalidraw/components/shapes.d.ts +190 -0
- package/dist/types/{packages/excalidraw → excalidraw}/data/blob.d.ts +3 -7
- package/dist/types/{packages/excalidraw → excalidraw}/data/reconcile.d.ts +1 -0
- package/dist/types/{packages/excalidraw → excalidraw}/data/restore.d.ts +6 -1
- package/dist/types/{packages/excalidraw → excalidraw}/data/transform.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/data/types.d.ts +4 -1
- package/dist/types/{packages/excalidraw → excalidraw}/editor-jotai.d.ts +6 -6
- package/dist/types/excalidraw/eraser/index.d.ts +12 -0
- package/dist/types/{packages/excalidraw → excalidraw}/fonts/Fonts.d.ts +1 -1
- package/dist/types/excalidraw/history.d.ts +48 -0
- package/dist/types/{packages/excalidraw → excalidraw}/hooks/useEmitter.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/{packages/excalidraw → excalidraw}/index.d.ts +11 -10
- package/dist/types/excalidraw/lasso/index.d.ts +16 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +13 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +18 -0
- package/dist/types/excalidraw/renderer/staticScene.d.ts +14 -0
- package/dist/types/{packages/excalidraw → excalidraw}/scene/Renderer.d.ts +1 -2
- package/dist/types/excalidraw/scene/index.d.ts +4 -0
- package/dist/types/{packages/excalidraw → excalidraw}/scene/scrollbars.d.ts +2 -3
- package/dist/types/{packages/excalidraw → excalidraw}/scene/types.d.ts +2 -0
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/{packages/excalidraw → excalidraw}/snapping.d.ts +2 -2
- package/dist/types/{packages/excalidraw → excalidraw}/types.d.ts +48 -17
- package/dist/types/{packages/excalidraw → excalidraw}/wysiwyg/textWysiwyg.d.ts +3 -1
- package/dist/types/{packages/math → math}/src/angle.d.ts +2 -0
- package/dist/types/math/src/constants.d.ts +3 -0
- package/dist/types/math/src/curve.d.ts +74 -0
- package/dist/types/{packages/math → math}/src/index.d.ts +1 -0
- package/dist/types/{packages/math → math}/src/point.d.ts +1 -1
- package/dist/types/{packages/math → math}/src/polygon.d.ts +1 -0
- package/dist/types/{packages/math → math}/src/rectangle.d.ts +2 -0
- package/dist/types/{packages/math → math}/src/segment.d.ts +2 -1
- package/dist/types/{packages/math → math}/src/types.d.ts +1 -0
- package/dist/types/{packages/math → math}/src/vector.d.ts +8 -2
- package/dist/types/{packages/utils → utils}/src/bbox.d.ts +1 -1
- package/dist/types/{packages/utils → utils}/src/index.d.ts +1 -1
- package/dist/types/{packages/utils → utils}/src/withinBounds.d.ts +1 -1
- package/history.ts +146 -109
- package/package.json +31 -11
- package/dist/dev/chunk-LMHBUWQS.js.map +0 -7
- package/dist/dev/chunk-S7W4OWSF.js +0 -18442
- package/dist/dev/chunk-S7W4OWSF.js.map +0 -7
- package/dist/dev/chunk-ZG3EI5XS.js +0 -7
- package/dist/dev/chunk-ZG3EI5XS.js.map +0 -7
- package/dist/prod/chunk-6U3AYISY.js +0 -12
- package/dist/prod/chunk-LRITYP5X.js +0 -31
- package/dist/prod/chunk-U24AOZ3B.js +0 -7
- package/dist/prod/data/image-W3GRS73V.js +0 -1
- package/dist/prod/locales/en-B4ZKOASM.js +0 -1
- package/dist/types/excalidraw-app/app_constants.d.ts +0 -44
- package/dist/types/packages/element/src/Shape.d.ts +0 -17
- package/dist/types/packages/element/src/ShapeCache.d.ts +0 -25
- package/dist/types/packages/element/src/align.d.ts +0 -7
- package/dist/types/packages/element/src/collision.d.ts +0 -26
- package/dist/types/packages/element/src/distance.d.ts +0 -3
- package/dist/types/packages/element/src/index.d.ts +0 -16
- package/dist/types/packages/element/src/shapes.d.ts +0 -23
- package/dist/types/packages/element/src/utils.d.ts +0 -21
- package/dist/types/packages/excalidraw/actions/actionLinearEditor.d.ts +0 -192
- package/dist/types/packages/excalidraw/actions/actionMenu.d.ts +0 -554
- package/dist/types/packages/excalidraw/actions/actionToggleSearchMenu.d.ts +0 -357
- package/dist/types/packages/excalidraw/clipboard.d.ts +0 -66
- package/dist/types/packages/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/dist/types/packages/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +0 -8
- package/dist/types/packages/excalidraw/components/ColorPicker/ShadeList.d.ts +0 -8
- package/dist/types/packages/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +0 -6
- package/dist/types/packages/excalidraw/components/InlineIcon.d.ts +0 -3
- package/dist/types/packages/excalidraw/components/Range.d.ts +0 -8
- package/dist/types/packages/excalidraw/components/shapes.d.ts +0 -62
- package/dist/types/packages/excalidraw/history.d.ts +0 -40
- package/dist/types/packages/excalidraw/renderer/helpers.d.ts +0 -13
- package/dist/types/packages/excalidraw/renderer/staticScene.d.ts +0 -11
- package/dist/types/packages/excalidraw/scene/index.d.ts +0 -4
- package/dist/types/packages/excalidraw/store.d.ts +0 -129
- package/dist/types/packages/excalidraw/tests/fixtures/diagramFixture.d.ts +0 -504
- package/dist/types/packages/excalidraw/tests/fixtures/elementFixture.d.ts +0 -7
- package/dist/types/packages/excalidraw/tests/helpers/api.d.ts +0 -89
- package/dist/types/packages/excalidraw/tests/helpers/colorize.d.ts +0 -2
- package/dist/types/packages/excalidraw/tests/helpers/mocks.d.ts +0 -5
- package/dist/types/packages/excalidraw/tests/helpers/polyfills.d.ts +0 -36
- package/dist/types/packages/excalidraw/tests/helpers/ui.d.ts +0 -189
- package/dist/types/packages/excalidraw/tests/queries/dom.d.ts +0 -2
- package/dist/types/packages/excalidraw/tests/queries/toolQueries.d.ts +0 -2
- package/dist/types/packages/excalidraw/tests/test-utils.d.ts +0 -139
- package/dist/types/packages/excalidraw/visualdebug.d.ts +0 -41
- package/dist/types/packages/math/src/curve.d.ts +0 -40
- package/dist/types/packages/utils/src/collision.d.ts +0 -8
- /package/dist/dev/data/{image-5HAY2PCR.js.map → image-L23D26XS.js.map} +0 -0
- /package/dist/dev/locales/{en-OZCJJ2HN.js.map → en-YSPYSBUR.js.map} +0 -0
- /package/dist/types/{packages/common → common}/src/binary-heap.d.ts +0 -0
- /package/dist/types/{packages/common → common}/src/keys.d.ts +0 -0
- /package/dist/types/{packages/common → common}/src/points.d.ts +0 -0
- /package/dist/types/{packages/common → common}/src/promise-pool.d.ts +0 -0
- /package/dist/types/{packages/common → common}/src/queue.d.ts +0 -0
- /package/dist/types/{packages/common → common}/src/random.d.ts +0 -0
- /package/dist/types/{packages/common → common}/src/url.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/comparisons.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/containerCache.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/elementLink.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/embeddable.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/image.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/resizeTest.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/showSelectedShapeActions.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/sortElements.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/textMeasurements.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/textWrapping.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/actionAlign.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/actionDistribute.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/actionDuplicateSelection.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/actionFlip.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/actionTextAutoResize.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/actionZindex.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/manager.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/register.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/actions/shortcuts.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/analytics.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/animation-frame-handler.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/charts.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/clients.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ActiveConfirmDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Avatar.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/BraveMeasureTextError.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Button.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ButtonIconCycle.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ButtonSeparator.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Card.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/CheckboxItem.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/PickerHeading.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/CommandPalette/defaultCommandPaletteItems.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/CommandPalette/types.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ConfirmDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ContextMenu.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/DarkModeToggle.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/DefaultSidebar.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Dialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/DialogActionButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ElementCanvasButtons.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ErrorDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/EyeDropper.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/FilledButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/FixedSideContainer.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/FollowMode/FollowMode.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/FontPicker/FontPickerList.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/FontPicker/keyboardNavHandlers.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/HandButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/HelpButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/HelpDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/HintViewer.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/IconPicker.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ImageExportDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/InitializeApp.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Island.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/JSONExportDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LaserPointerButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LibraryMenu.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LibraryMenuBrowseButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LibraryMenuControlButtons.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LibraryMenuHeaderContent.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LibraryMenuItems.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LibraryUnit.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LoadingMessage.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/LockButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/MagicButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Modal.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/OverwriteConfirm/OverwriteConfirm.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/OverwriteConfirm/OverwriteConfirmState.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Paragraph.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/PasteChartDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/PenModeButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ProjectName.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/PublishLibrary.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/QuickSearch.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/RadioGroup.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/SVGLayer.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ScrollableList.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/SearchMenu.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Section.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ShareableLinkDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/Sidebar.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/SidebarHeader.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/SidebarTab.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/SidebarTabTrigger.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/SidebarTabTriggers.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/SidebarTabs.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/SidebarTrigger.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Sidebar/common.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Spinner.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Stack.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Stats/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Switch.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/MermaidToExcalidraw.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialog.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogInput.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogOutput.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogPanel.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogPanels.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogTab.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogTabTrigger.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogTabTriggers.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/TTDDialogTabs.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/common.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Toast.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ToolButton.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Tooltip.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Trans.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/UserList.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/canvases/NewElementCanvas.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/canvases/StaticCanvas.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/canvases/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuGroup.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuItem.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuItemContent.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuItemCustom.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuItemLink.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuSeparator.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuTrigger.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/common.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/dropdownMenuUtils.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/footer/Footer.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/footer/FooterCenter.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/hoc/withInternalFallback.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/main-menu/DefaultItems.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/main-menu/MainMenu.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/welcome-screen/WelcomeScreen.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/context/tunnels.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/context/ui-appState.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/cursor.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/EditorLocalStorage.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/ai/types.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/encode.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/encryption.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/filesystem.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/image.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/json.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/library.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/resave.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/deburr.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/errors.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Cascadia/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/ComicShanns/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Emoji/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/ExcalidrawFontFace.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Excalifont/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Helvetica/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Liberation/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Lilita/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Nunito/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Virgil/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/Xiaolai/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/fonts/index.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/gesture.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useCallbackRefState.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useCopiedIndicator.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useCreatePortalContainer.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useOutsideClick.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useScrollPosition.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useStable.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useStableCallback.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/hooks/useTransition.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/i18n.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/index-node.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/laser-trails.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/mermaid.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/polyfill.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/reactUtils.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/renderer/interactiveScene.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/renderer/renderNewElementScene.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/renderer/renderSnaps.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/renderer/roundRect.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/renderer/staticSvgScene.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/scene/export.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/scene/normalize.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/scene/scroll.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/scene/zoom.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/harfbuzz/harfbuzz-bindings.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/harfbuzz/harfbuzz-loader.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/harfbuzz/harfbuzz-wasm.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/subset-main.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/subset-shared.chunk.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/subset-worker.chunk.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/woff2/woff2-bindings.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/woff2/woff2-loader.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/subset/woff2/woff2-wasm.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/workers.d.ts +0 -0
- /package/dist/types/{packages/math → math}/src/ellipse.d.ts +0 -0
- /package/dist/types/{packages/math → math}/src/line.d.ts +0 -0
- /package/dist/types/{packages/math → math}/src/range.d.ts +0 -0
- /package/dist/types/{packages/math → math}/src/triangle.d.ts +0 -0
- /package/dist/types/{packages/math → math}/src/utils.d.ts +0 -0
- /package/dist/types/{packages/utils → utils}/src/export.d.ts +0 -0
- /package/dist/types/{packages/utils → utils}/src/shape.d.ts +0 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type EXPORT_IMAGE_TYPES } from "@excalidraw/common";
|
|
3
|
-
import { LinearElementEditor } from "@excalidraw/element
|
|
4
|
-
import {
|
|
5
|
-
import type {
|
|
2
|
+
import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
|
|
3
|
+
import { LinearElementEditor, FlowChartCreator, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
|
|
4
|
+
import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
5
|
+
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
6
6
|
import { ActionManager } from "../actions/manager";
|
|
7
7
|
import { AnimationFrameHandler } from "../animation-frame-handler";
|
|
8
8
|
import { History } from "../history";
|
|
9
|
-
import Scene from "../scene/Scene";
|
|
10
9
|
import { Fonts } from "../fonts";
|
|
10
|
+
import { type WritableAtom } from "../editor-jotai";
|
|
11
11
|
import { Renderer } from "../scene/Renderer";
|
|
12
|
-
import { Emitter } from "../emitter";
|
|
13
|
-
import { Store } from "../store";
|
|
14
|
-
import { AnimatedTrail } from "../animated-trail";
|
|
15
12
|
import { LaserTrails } from "../laser-trails";
|
|
13
|
+
import { LassoTrail } from "../lasso";
|
|
14
|
+
import { EraserTrail } from "../eraser";
|
|
16
15
|
import type { ExportedElements } from "../data";
|
|
17
16
|
import type { FileSystemHandle } from "../data/filesystem";
|
|
18
17
|
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
|
|
@@ -79,6 +78,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
79
78
|
/** embeds that have been inserted to DOM (as a perf optim, we don't want to
|
|
80
79
|
* insert to DOM before user initially scrolls to them) */
|
|
81
80
|
private initializedEmbeds;
|
|
81
|
+
private handleToastClose;
|
|
82
82
|
private elementsPendingErasure;
|
|
83
83
|
flowChartCreator: FlowChartCreator;
|
|
84
84
|
private flowChartNavigator;
|
|
@@ -96,11 +96,13 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
96
96
|
};
|
|
97
97
|
animationFrameHandler: AnimationFrameHandler;
|
|
98
98
|
laserTrails: LaserTrails;
|
|
99
|
-
eraserTrail:
|
|
99
|
+
eraserTrail: EraserTrail;
|
|
100
|
+
lassoTrail: LassoTrail;
|
|
100
101
|
onChangeEmitter: Emitter<[elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles]>;
|
|
101
102
|
onPointerDownEmitter: Emitter<[activeTool: {
|
|
102
103
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
103
104
|
locked: boolean;
|
|
105
|
+
fromSelection: boolean;
|
|
104
106
|
} & import("../types").ActiveTool, pointerDownState: Readonly<{
|
|
105
107
|
origin: Readonly<{
|
|
106
108
|
x: number;
|
|
@@ -121,7 +123,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
121
123
|
};
|
|
122
124
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
123
125
|
resize: {
|
|
124
|
-
handleType: import("@excalidraw/element
|
|
126
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
125
127
|
isResizing: boolean;
|
|
126
128
|
offset: {
|
|
127
129
|
x: number;
|
|
@@ -147,6 +149,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
147
149
|
x: number;
|
|
148
150
|
y: number;
|
|
149
151
|
} | null;
|
|
152
|
+
origin: {
|
|
153
|
+
x: number;
|
|
154
|
+
y: number;
|
|
155
|
+
};
|
|
156
|
+
blockDragging: boolean;
|
|
150
157
|
};
|
|
151
158
|
eventListeners: {
|
|
152
159
|
onMove: {
|
|
@@ -165,6 +172,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
165
172
|
onPointerUpEmitter: Emitter<[activeTool: {
|
|
166
173
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
167
174
|
locked: boolean;
|
|
175
|
+
fromSelection: boolean;
|
|
168
176
|
} & import("../types").ActiveTool, pointerDownState: Readonly<{
|
|
169
177
|
origin: Readonly<{
|
|
170
178
|
x: number;
|
|
@@ -185,7 +193,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
185
193
|
};
|
|
186
194
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
187
195
|
resize: {
|
|
188
|
-
handleType: import("@excalidraw/element
|
|
196
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
189
197
|
isResizing: boolean;
|
|
190
198
|
offset: {
|
|
191
199
|
x: number;
|
|
@@ -211,6 +219,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
211
219
|
x: number;
|
|
212
220
|
y: number;
|
|
213
221
|
} | null;
|
|
222
|
+
origin: {
|
|
223
|
+
x: number;
|
|
224
|
+
y: number;
|
|
225
|
+
};
|
|
226
|
+
blockDragging: boolean;
|
|
214
227
|
};
|
|
215
228
|
eventListeners: {
|
|
216
229
|
onMove: {
|
|
@@ -233,6 +246,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
233
246
|
missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
|
|
234
247
|
onRemoveEventListenersEmitter: Emitter<[]>;
|
|
235
248
|
constructor(props: AppProps);
|
|
249
|
+
updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
236
250
|
private onWindowMessage;
|
|
237
251
|
private cacheEmbeddableRef;
|
|
238
252
|
/**
|
|
@@ -254,6 +268,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
254
268
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
255
269
|
focusContainer: AppClassProperties["focusContainer"];
|
|
256
270
|
getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
271
|
+
getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
|
|
257
272
|
getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
|
|
258
273
|
onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
|
|
259
274
|
onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
|
|
@@ -285,6 +300,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
285
300
|
private resetScene;
|
|
286
301
|
private initializeScene;
|
|
287
302
|
private isMobileBreakpoint;
|
|
303
|
+
private isTabletBreakpoint;
|
|
288
304
|
private refreshViewportBreakpoints;
|
|
289
305
|
private refreshEditorBreakpoints;
|
|
290
306
|
private clearImageShapeCache;
|
|
@@ -303,6 +319,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
303
319
|
private static resetTapTwice;
|
|
304
320
|
private onTouchStart;
|
|
305
321
|
private onTouchEnd;
|
|
322
|
+
private insertClipboardContent;
|
|
306
323
|
pasteFromClipboard: (event: ClipboardEvent) => Promise<void>;
|
|
307
324
|
addElementsFromPasteOrLibrary: (opts: {
|
|
308
325
|
elements: readonly ExcalidrawElement[];
|
|
@@ -384,6 +401,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
384
401
|
*/
|
|
385
402
|
captureUpdate?: SceneData["captureUpdate"];
|
|
386
403
|
}) => void;
|
|
404
|
+
applyDeltas: (deltas: StoreDelta[], options?: ApplyToOptions) => [SceneElementsMap, AppState, boolean];
|
|
405
|
+
mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
|
|
387
406
|
private triggerRender;
|
|
388
407
|
/**
|
|
389
408
|
* @returns whether the menu was toggled on or off
|
|
@@ -398,17 +417,15 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
398
417
|
private onKeyDown;
|
|
399
418
|
private onKeyUp;
|
|
400
419
|
private isToolSupported;
|
|
401
|
-
setActiveTool: (tool: (
|
|
402
|
-
type:
|
|
420
|
+
setActiveTool: (tool: ({
|
|
421
|
+
type: ToolType;
|
|
403
422
|
} | {
|
|
404
|
-
type: Extract<ToolType, "image">;
|
|
405
|
-
insertOnCanvasDirectly?: boolean;
|
|
406
|
-
}) | {
|
|
407
423
|
type: "custom";
|
|
408
424
|
customType: string;
|
|
409
425
|
}) & {
|
|
410
426
|
locked?: boolean;
|
|
411
|
-
|
|
427
|
+
fromSelection?: boolean;
|
|
428
|
+
}, keepSelection?: boolean) => void;
|
|
412
429
|
setOpenDialog: (dialogType: AppState["openDialog"]) => void;
|
|
413
430
|
private setCursor;
|
|
414
431
|
private resetCursor;
|
|
@@ -428,7 +445,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
428
445
|
private getTextElementAtPosition;
|
|
429
446
|
private getElementAtPosition;
|
|
430
447
|
private getElementsAtPosition;
|
|
431
|
-
|
|
448
|
+
getElementHitThreshold(element: ExcalidrawElement): number;
|
|
432
449
|
private hitElement;
|
|
433
450
|
private getTextBindableContainerAtPosition;
|
|
434
451
|
private startTextEditing;
|
|
@@ -476,7 +493,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
476
493
|
sceneY: number;
|
|
477
494
|
link: string;
|
|
478
495
|
}) => NonDeleted<ExcalidrawEmbeddableElement> | undefined;
|
|
479
|
-
private
|
|
496
|
+
private newImagePlaceholder;
|
|
480
497
|
private handleLinearElementOnPointerDown;
|
|
481
498
|
private getCurrentItemRoundness;
|
|
482
499
|
private createGenericElementOnPointerDown;
|
|
@@ -492,12 +509,13 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
492
509
|
private eraseElements;
|
|
493
510
|
private initializeImage;
|
|
494
511
|
/**
|
|
495
|
-
*
|
|
512
|
+
* use during async image initialization,
|
|
513
|
+
* when the placeholder image could have been modified in the meantime,
|
|
514
|
+
* and when you don't want to loose those modifications
|
|
496
515
|
*/
|
|
497
|
-
|
|
498
|
-
private
|
|
499
|
-
private
|
|
500
|
-
initializeImageDimensions: (imageElement: ExcalidrawImageElement, forceNaturalSize?: boolean) => void;
|
|
516
|
+
private getLatestInitializedImageElement;
|
|
517
|
+
private onImageToolbarButtonClick;
|
|
518
|
+
private getImageNaturalDimensions;
|
|
501
519
|
/** updates image cache, refreshing updated elements and/or setting status
|
|
502
520
|
to error for images that fail during <img> element creation */
|
|
503
521
|
private updateImageCache;
|
|
@@ -508,9 +526,9 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
508
526
|
private scheduleImageRefresh;
|
|
509
527
|
private updateBindingEnabledOnPointerMove;
|
|
510
528
|
private maybeSuggestBindingAtCursor;
|
|
511
|
-
private maybeSuggestBindingsForLinearElementAtCoords;
|
|
512
529
|
private clearSelection;
|
|
513
530
|
private handleInteractiveCanvasRef;
|
|
531
|
+
private insertImages;
|
|
514
532
|
private handleAppOnDrop;
|
|
515
533
|
loadFileToCanvas: (file: File, fileHandle: FileSystemHandle | null) => Promise<void>;
|
|
516
534
|
private handleCanvasContextMenu;
|
|
@@ -10,6 +10,7 @@ interface ButtonIconProps {
|
|
|
10
10
|
/** include standalone style (could interfere with parent styles) */
|
|
11
11
|
standalone?: boolean;
|
|
12
12
|
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
13
|
+
style?: React.CSSProperties;
|
|
13
14
|
}
|
|
14
15
|
export declare const ButtonIcon: import("react").ForwardRefExoticComponent<ButtonIconProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
16
|
export {};
|
package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/ColorInput.d.ts
RENAMED
|
@@ -4,6 +4,7 @@ interface ColorInputProps {
|
|
|
4
4
|
onChange: (color: string) => void;
|
|
5
5
|
label: string;
|
|
6
6
|
colorPickerType: ColorPickerType;
|
|
7
|
+
placeholder?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare const ColorInput: ({ color, onChange, label, colorPickerType, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/ColorPicker.d.ts
RENAMED
|
@@ -6,7 +6,11 @@ import type { AppState } from "../../types";
|
|
|
6
6
|
export declare const getColor: (color: string) => string | null;
|
|
7
7
|
interface ColorPickerProps {
|
|
8
8
|
type: ColorPickerType;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* null indicates no color should be displayed as active
|
|
11
|
+
* (e.g. when multiple shapes selected with different colors)
|
|
12
|
+
*/
|
|
13
|
+
color: string | null;
|
|
10
14
|
onChange: (color: string) => void;
|
|
11
15
|
label: string;
|
|
12
16
|
elements: readonly ExcalidrawElement[];
|
|
@@ -14,6 +18,7 @@ interface ColorPickerProps {
|
|
|
14
18
|
palette?: ColorPaletteCustom | null;
|
|
15
19
|
topPicks?: ColorTuple;
|
|
16
20
|
updateData: (formData?: any) => void;
|
|
21
|
+
compactMode?: boolean;
|
|
17
22
|
}
|
|
18
23
|
export declare const ColorPicker: ({ type, color, onChange, label, elements, palette, topPicks, updateData, appState, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
24
|
export {};
|
|
@@ -3,16 +3,17 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
|
3
3
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
4
4
|
import type { ColorPickerType } from "./colorPickerUtils";
|
|
5
5
|
interface PickerProps {
|
|
6
|
-
color: string;
|
|
6
|
+
color: string | null;
|
|
7
7
|
onChange: (color: string) => void;
|
|
8
|
-
label: string;
|
|
9
8
|
type: ColorPickerType;
|
|
10
9
|
elements: readonly ExcalidrawElement[];
|
|
11
10
|
palette: ColorPaletteCustom;
|
|
12
11
|
updateData: (formData?: any) => void;
|
|
13
12
|
children?: React.ReactNode;
|
|
13
|
+
showTitle?: boolean;
|
|
14
14
|
onEyeDropperToggle: (force?: boolean) => void;
|
|
15
15
|
onEscape: (event: React.KeyboardEvent | KeyboardEvent) => void;
|
|
16
|
+
showHotKey?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare const Picker:
|
|
18
|
+
export declare const Picker: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<unknown>>;
|
|
18
19
|
export {};
|
package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/PickerColorList.d.ts
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
2
2
|
interface PickerColorListProps {
|
|
3
3
|
palette: ColorPaletteCustom;
|
|
4
|
-
color: string;
|
|
4
|
+
color: string | null;
|
|
5
5
|
onChange: (color: string) => void;
|
|
6
|
-
label: string;
|
|
7
6
|
activeShade: number;
|
|
7
|
+
showHotKey?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const PickerColorList: ({ palette, color, onChange,
|
|
9
|
+
declare const PickerColorList: ({ palette, color, onChange, activeShade, showHotKey, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default PickerColorList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
2
|
+
interface ShadeListProps {
|
|
3
|
+
color: string | null;
|
|
4
|
+
onChange: (color: string) => void;
|
|
5
|
+
palette: ColorPaletteCustom;
|
|
6
|
+
showHotKey?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const ShadeList: ({ color, onChange, palette, showHotKey, }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import type { ColorPickerType } from "./colorPickerUtils";
|
|
|
2
2
|
interface TopPicksProps {
|
|
3
3
|
onChange: (color: string) => void;
|
|
4
4
|
type: ColorPickerType;
|
|
5
|
-
activeColor: string;
|
|
5
|
+
activeColor: string | null;
|
|
6
6
|
topPicks?: readonly string[];
|
|
7
7
|
}
|
|
8
8
|
export declare const TopPicks: ({ onChange, type, activeColor, topPicks, }: TopPicksProps) => import("react/jsx-runtime").JSX.Element | null;
|
package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/colorPickerUtils.d.ts
RENAMED
|
@@ -2,7 +2,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
|
2
2
|
import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common";
|
|
3
3
|
export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
|
|
4
4
|
palette: ColorPaletteCustom;
|
|
5
|
-
color: string;
|
|
5
|
+
color: string | null;
|
|
6
6
|
}) => {
|
|
7
7
|
colorName: ColorPickerColor;
|
|
8
8
|
shade: number | null;
|
|
@@ -17,5 +17,5 @@ export type ActiveColorPickerSectionAtomType = "custom" | "baseColors" | "shades
|
|
|
17
17
|
export declare const activeColorPickerSectionAtom: import("jotai/vanilla/atom").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
|
|
18
18
|
init: ActiveColorPickerSectionAtomType;
|
|
19
19
|
};
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const isColorDark: (color: string, threshold?: number) => boolean;
|
|
21
21
|
export type ColorPickerType = "canvasBackground" | "elementBackground" | "elementStroke";
|
|
@@ -5,7 +5,7 @@ interface ColorPickerKeyNavHandlerProps {
|
|
|
5
5
|
event: React.KeyboardEvent;
|
|
6
6
|
activeColorPickerSection: ActiveColorPickerSectionAtomType;
|
|
7
7
|
palette: ColorPaletteCustom;
|
|
8
|
-
color: string;
|
|
8
|
+
color: string | null;
|
|
9
9
|
onChange: (color: string) => void;
|
|
10
10
|
customColors: string[];
|
|
11
11
|
setActiveColorPickerSection: (update: React.SetStateAction<ActiveColorPickerSectionAtomType>) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@excalidraw/element/types";
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
|
+
import "./ConvertElementTypePopup.scss";
|
|
4
|
+
import type App from "./App";
|
|
5
|
+
export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
6
|
+
type: "panel";
|
|
7
|
+
} | null> & {
|
|
8
|
+
init: {
|
|
9
|
+
type: "panel";
|
|
10
|
+
} | null;
|
|
11
|
+
};
|
|
12
|
+
declare const ConvertElementTypePopup: ({ app }: {
|
|
13
|
+
app: App;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const adjustBoundTextSize: (container: ExcalidrawTextContainer, boundText: ExcalidrawTextElementWithContainer, scene: Scene) => void;
|
|
16
|
+
type ConversionType = "generic" | "linear" | null;
|
|
17
|
+
export declare const convertElementTypes: (app: App, { conversionType, nextType, direction, }: {
|
|
18
|
+
conversionType: ConversionType;
|
|
19
|
+
nextType?: ConvertibleTypes | undefined;
|
|
20
|
+
direction?: "left" | "right" | undefined;
|
|
21
|
+
}) => boolean;
|
|
22
|
+
export declare const getConversionTypeFromElements: (elements: ExcalidrawElement[]) => ConversionType;
|
|
23
|
+
export default ConvertElementTypePopup;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
2
3
|
import "./ElementLinkDialog.scss";
|
|
3
4
|
import type { AppProps, UIAppState } from "../types";
|
|
4
|
-
declare const ElementLinkDialog: ({ sourceElementId, onClose,
|
|
5
|
+
declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, generateLinkForSelection, }: {
|
|
5
6
|
sourceElementId: ExcalidrawElement["id"];
|
|
6
|
-
elementsMap: ElementsMap;
|
|
7
7
|
appState: UIAppState;
|
|
8
|
+
scene: Scene;
|
|
8
9
|
onClose?: (() => void) | undefined;
|
|
9
10
|
generateLinkForSelection: AppProps["generateLinkForSelection"];
|
|
10
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./ExcalidrawLogo.scss";
|
|
3
|
-
type LogoSize = "xs" | "small" | "normal" | "large" | "custom";
|
|
3
|
+
type LogoSize = "xs" | "small" | "normal" | "large" | "custom" | "mobile";
|
|
4
4
|
interface LogoProps {
|
|
5
5
|
size?: LogoSize;
|
|
6
6
|
withText?: boolean;
|
|
@@ -16,6 +16,7 @@ interface FontPickerProps {
|
|
|
16
16
|
onHover: (fontFamily: FontFamilyValues) => void;
|
|
17
17
|
onLeave: () => void;
|
|
18
18
|
onPopupChange: (open: boolean) => void;
|
|
19
|
+
compactMode?: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare const FontPicker: React.MemoExoticComponent<({ isOpened, selectedFontFamily, hoveredFontFamily, onSelect, onHover, onLeave, onPopupChange, }: FontPickerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
21
|
+
export declare const FontPicker: React.MemoExoticComponent<({ isOpened, selectedFontFamily, hoveredFontFamily, onSelect, onHover, onLeave, onPopupChange, compactMode, }: FontPickerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
21
22
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FontFamilyValues } from "@excalidraw/element/types";
|
|
2
|
+
interface FontPickerTriggerProps {
|
|
3
|
+
selectedFontFamily: FontFamilyValues | null;
|
|
4
|
+
isOpened?: boolean;
|
|
5
|
+
compactMode?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const FontPickerTrigger: ({ selectedFontFamily, isOpened, compactMode, }: FontPickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -17,6 +17,7 @@ interface LayerUIProps {
|
|
|
17
17
|
onPenModeToggle: AppClassProperties["togglePenMode"];
|
|
18
18
|
showExitZenModeBtn: boolean;
|
|
19
19
|
langCode: Language["code"];
|
|
20
|
+
renderTopLeftUI?: ExcalidrawProps["renderTopLeftUI"];
|
|
20
21
|
renderTopRightUI?: ExcalidrawProps["renderTopRightUI"];
|
|
21
22
|
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
22
23
|
UIOptions: AppProps["UIOptions"];
|
|
@@ -27,5 +28,5 @@ interface LayerUIProps {
|
|
|
27
28
|
isCollaborating: boolean;
|
|
28
29
|
generateLinkForSelection?: AppProps["generateLinkForSelection"];
|
|
29
30
|
}
|
|
30
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, generateLinkForSelection, }: LayerUIProps) => import("react/jsx-runtime").JSX.Element>;
|
|
31
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopLeftUI, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, generateLinkForSelection, }: LayerUIProps) => import("react/jsx-runtime").JSX.Element>;
|
|
31
32
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import type { ExcalidrawElement, NonDeleted } from "@excalidraw/element/types";
|
|
|
3
3
|
import type { SvgCache } from "../hooks/useLibraryItemSvg";
|
|
4
4
|
import type { LibraryItem } from "../types";
|
|
5
5
|
import type { ReactNode } from "react";
|
|
6
|
-
type LibraryOrPendingItem = (LibraryItem | /* pending library item */ {
|
|
6
|
+
type LibraryOrPendingItem = readonly (LibraryItem | /* pending library item */ {
|
|
7
7
|
id: null;
|
|
8
8
|
elements: readonly NonDeleted<ExcalidrawElement>[];
|
|
9
9
|
})[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
3
3
|
import type { ActionManager } from "../actions/manager";
|
|
4
|
-
import type { AppClassProperties, AppProps, AppState,
|
|
4
|
+
import type { AppClassProperties, AppProps, AppState, UIAppState } from "../types";
|
|
5
5
|
import type { JSX } from "react";
|
|
6
6
|
type MobileMenuProps = {
|
|
7
7
|
appState: UIAppState;
|
|
@@ -10,16 +10,14 @@ type MobileMenuProps = {
|
|
|
10
10
|
renderImageExportDialog: () => React.ReactNode;
|
|
11
11
|
setAppState: React.Component<any, AppState>["setState"];
|
|
12
12
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
13
|
-
onLockToggle: () => void;
|
|
14
13
|
onHandToolToggle: () => void;
|
|
15
14
|
onPenModeToggle: AppClassProperties["togglePenMode"];
|
|
16
15
|
renderTopRightUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
17
|
-
|
|
16
|
+
renderTopLeftUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
18
17
|
renderSidebars: () => JSX.Element | null;
|
|
19
|
-
device: Device;
|
|
20
18
|
renderWelcomeScreen: boolean;
|
|
21
19
|
UIOptions: AppProps["UIOptions"];
|
|
22
20
|
app: AppClassProperties;
|
|
23
21
|
};
|
|
24
|
-
export declare const MobileMenu: ({ appState, elements, actionManager, setAppState,
|
|
22
|
+
export declare const MobileMenu: ({ appState, elements, actionManager, setAppState, onHandToolToggle, renderTopLeftUI, renderTopRightUI, renderSidebars, renderWelcomeScreen, UIOptions, app, }: MobileMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
23
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./ToolIcon.scss";
|
|
3
|
+
import "./MobileToolBar.scss";
|
|
4
|
+
import type { AppClassProperties, UIAppState } from "../types";
|
|
5
|
+
type MobileToolBarProps = {
|
|
6
|
+
app: AppClassProperties;
|
|
7
|
+
onHandToolToggle: () => void;
|
|
8
|
+
setAppState: React.Component<any, UIAppState>["setState"];
|
|
9
|
+
};
|
|
10
|
+
export declare const MobileToolBar: ({ app, onHandToolToggle, setAppState, }: MobileToolBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -10,6 +10,7 @@ type Props = {
|
|
|
10
10
|
offsetTop?: number;
|
|
11
11
|
viewportWidth?: number;
|
|
12
12
|
viewportHeight?: number;
|
|
13
|
+
className?: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const Popover: ({ children, left, top, onCloseRequest, fitInViewport, offsetLeft, offsetTop, viewportWidth, viewportHeight, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Popover: ({ children, left, top, onCloseRequest, fitInViewport, offsetLeft, offsetTop, viewportWidth, viewportHeight, className, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -10,6 +10,7 @@ interface PropertiesPopoverProps {
|
|
|
10
10
|
onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
|
|
11
11
|
onFocusOutside?: Popover.PopoverContentProps["onFocusOutside"];
|
|
12
12
|
onPointerDownOutside?: Popover.PopoverContentProps["onPointerDownOutside"];
|
|
13
|
+
preventAutoFocusOnTouch?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare const PropertiesPopover: React.ForwardRefExoticComponent<PropertiesPopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
16
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./Range.scss";
|
|
2
|
+
import type { AppClassProperties } from "../types";
|
|
3
|
+
export type RangeProps = {
|
|
4
|
+
updateData: (value: number) => void;
|
|
5
|
+
app: AppClassProperties;
|
|
6
|
+
testId?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Range: ({ updateData, app, testId }: RangeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ interface CollapsibleProps {
|
|
|
5
5
|
openTrigger: () => void;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
className?: string;
|
|
8
|
+
showCollapsedIcon?: boolean;
|
|
8
9
|
}
|
|
9
|
-
declare const Collapsible: ({ label, open, openTrigger, children, className, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const Collapsible: ({ label, open, openTrigger, children, className, showCollapsedIcon, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default Collapsible;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface DimensionDragInputProps {
|
|
5
5
|
property: "width" | "height";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { Scene } from "@excalidraw/element";
|
|
4
|
+
import { useApp, useExcalidrawSetAppState } from "../App";
|
|
3
5
|
import "./DragInput.scss";
|
|
4
6
|
import type { StatsInputProperty } from "./utils";
|
|
5
|
-
import type Scene from "../../scene/Scene";
|
|
6
7
|
import type { AppState } from "../../types";
|
|
7
8
|
export type DragInputCallbackType<P extends StatsInputProperty, E = ExcalidrawElement> = (props: {
|
|
8
9
|
accumulatedChange: number;
|
|
@@ -16,6 +17,14 @@ export type DragInputCallbackType<P extends StatsInputProperty, E = ExcalidrawEl
|
|
|
16
17
|
property: P;
|
|
17
18
|
originalAppState: AppState;
|
|
18
19
|
setInputValue: (value: number) => void;
|
|
20
|
+
app: ReturnType<typeof useApp>;
|
|
21
|
+
setAppState: ReturnType<typeof useExcalidrawSetAppState>;
|
|
22
|
+
}) => void;
|
|
23
|
+
export type DragFinishedCallbackType<E = ExcalidrawElement> = (props: {
|
|
24
|
+
app: ReturnType<typeof useApp>;
|
|
25
|
+
setAppState: ReturnType<typeof useExcalidrawSetAppState>;
|
|
26
|
+
originalElements: readonly E[] | null;
|
|
27
|
+
originalAppState: AppState;
|
|
19
28
|
}) => void;
|
|
20
29
|
interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElement> {
|
|
21
30
|
label: string | React.ReactNode;
|
|
@@ -30,6 +39,7 @@ interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElemen
|
|
|
30
39
|
appState: AppState;
|
|
31
40
|
/** how many px you need to drag to get 1 unit change */
|
|
32
41
|
sensitivity?: number;
|
|
42
|
+
dragFinishedCallback?: DragFinishedCallbackType;
|
|
33
43
|
}
|
|
34
|
-
declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, }: StatsDragInputProps<T, E>) => import("react/jsx-runtime").JSX.Element | null;
|
|
44
|
+
declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, dragFinishedCallback, }: StatsDragInputProps<T, E>) => import("react/jsx-runtime").JSX.Element | null;
|
|
35
45
|
export default StatsDragInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface FontSizeProps {
|
|
5
5
|
element: ExcalidrawElement;
|