@excalidraw/excalidraw 0.18.0-432a46e → 0.18.0-4e471c107
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-CBGOW5JB.js +5669 -0
- package/dist/dev/chunk-CBGOW5JB.js.map +7 -0
- package/dist/dev/chunk-CP5DND7P.js +7 -0
- package/dist/dev/chunk-CP5DND7P.js.map +7 -0
- package/dist/dev/{chunk-LMHBUWQS.js → chunk-QF5FRM6O.js} +16 -5
- package/dist/dev/chunk-QF5FRM6O.js.map +7 -0
- package/dist/dev/data/{image-5HAY2PCR.js → image-SURZSZNX.js} +3 -3
- package/dist/dev/index.css +143 -68
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +17109 -17527
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-OZCJJ2HN.js → en-SMAPCEOQ.js} +2 -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-I4UNSFV6.js +12 -0
- package/dist/prod/chunk-IRHK23LL.js +4 -0
- package/dist/prod/data/image-HXEZYJPQ.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +25 -17
- package/dist/prod/locales/{en-B4ZKOASM.js → en-TYY6KWIJ.js} +1 -1
- 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 +23 -3
- 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 +18 -1
- package/dist/types/{packages/excalidraw/scene → element/src}/Scene.d.ts +11 -14
- package/dist/types/element/src/align.d.ts +7 -0
- package/dist/types/{packages/element → element}/src/binding.d.ts +26 -15
- package/dist/types/{packages/element → element}/src/bounds.d.ts +18 -5
- 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} +63 -38
- package/dist/types/element/src/distance.d.ts +3 -0
- 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/heading.d.ts +0 -1
- package/dist/types/element/src/index.d.ts +57 -0
- package/dist/types/{packages/element → element}/src/linearElementEditor.d.ts +22 -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/{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 +232 -0
- package/dist/types/{packages/element → element}/src/textElement.d.ts +5 -3
- 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 +45 -51
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionBoundText.d.ts +30 -34
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionCanvas.d.ts +364 -214
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionClipboard.d.ts +87 -98
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionCropEditor.d.ts +15 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionDeleteSelected.d.ts +40 -45
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionElementLink.d.ts +14 -16
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionElementLock.d.ts +45 -51
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionEmbeddable.d.ts +15 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionExport.d.ts +145 -163
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionFinalize.d.ts +73 -37
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionFrame.d.ts +107 -115
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionGroup.d.ts +30 -34
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionHistory.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +683 -0
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionLink.d.ts +14 -16
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionMenu.d.ts +42 -48
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionNavigate.d.ts +29 -33
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionProperties.d.ts +218 -240
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionSelectAll.d.ts +14 -16
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionStyles.d.ts +15 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleGridMode.d.ts +15 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleObjectsSnapMode.d.ts +15 -17
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +183 -0
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleStats.d.ts +15 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleViewMode.d.ts +15 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleZenMode.d.ts +15 -18
- 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 +20 -10
- package/dist/types/{packages/excalidraw → excalidraw}/components/App.d.ts +38 -22
- 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 +5 -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 +2 -3
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/PickerColorList.d.ts +2 -3
- package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/ShadeList.d.ts +2 -2
- 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/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/ElementLinkDialog.d.ts +4 -3
- 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/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/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 +4 -0
- package/dist/types/{packages/excalidraw → excalidraw}/components/shapes.d.ts +1 -1
- package/dist/types/{packages/excalidraw → excalidraw}/data/transform.d.ts +1 -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}/index.d.ts +9 -9
- 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/{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/{packages/excalidraw → excalidraw}/snapping.d.ts +2 -2
- package/dist/types/{packages/excalidraw → excalidraw}/types.d.ts +32 -11
- 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 +1 -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 +147 -110
- package/package.json +30 -10
- 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/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/actionToggleSearchMenu.d.ts +0 -357
- 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/Range.d.ts +0 -8
- 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/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-SURZSZNX.js.map} +0 -0
- /package/dist/dev/locales/{en-OZCJJ2HN.js.map → en-SMAPCEOQ.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/distribute.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/groups.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/image.d.ts +0 -0
- /package/dist/types/{packages/element → element}/src/renderElement.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/element → element}/src/transformHandles.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/index.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}/clipboard.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/Actions.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/CommandPalette.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/ExcalidrawLogo.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/FontPicker.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/FontPickerTrigger.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/InlineIcon.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/LayerUI.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/LibraryMenuSection.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/MobileMenu.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/Popover.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/ProjectName.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/PropertiesPopover.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/TTDDialogTrigger.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TTDDialog/common.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/TextField.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/DropdownMenu.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/components/dropdownMenu/DropdownMenuContent.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/blob.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/reconcile.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/resave.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/restore.d.ts +0 -0
- /package/dist/types/{packages/excalidraw → excalidraw}/data/types.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/useLibraryItemSvg.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/staticScene.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
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { Emitter } from "@excalidraw/common";
|
|
2
|
+
import type App from "@excalidraw/excalidraw/components/App";
|
|
3
|
+
import type { DTO, ValueOf } from "@excalidraw/common/utility-types";
|
|
4
|
+
import type { AppState, ObservedAppState } from "@excalidraw/excalidraw/types";
|
|
5
|
+
import { ElementsDelta, AppStateDelta } from "./delta";
|
|
6
|
+
import type { ApplyToOptions } from "./delta";
|
|
7
|
+
import type { ExcalidrawElement, OrderedExcalidrawElement, SceneElementsMap } from "./types";
|
|
8
|
+
export declare const CaptureUpdateAction: {
|
|
9
|
+
/**
|
|
10
|
+
* Immediately undoable.
|
|
11
|
+
*
|
|
12
|
+
* Use for updates which should be captured.
|
|
13
|
+
* Should be used for most of the local updates, except ephemerals such as dragging or resizing.
|
|
14
|
+
*
|
|
15
|
+
* These updates will _immediately_ make it to the local undo / redo stacks.
|
|
16
|
+
*/
|
|
17
|
+
readonly IMMEDIATELY: "IMMEDIATELY";
|
|
18
|
+
/**
|
|
19
|
+
* Never undoable.
|
|
20
|
+
*
|
|
21
|
+
* Use for updates which should never be recorded, such as remote updates
|
|
22
|
+
* or scene initialization.
|
|
23
|
+
*
|
|
24
|
+
* These updates will _never_ make it to the local undo / redo stacks.
|
|
25
|
+
*/
|
|
26
|
+
readonly NEVER: "NEVER";
|
|
27
|
+
/**
|
|
28
|
+
* Eventually undoable.
|
|
29
|
+
*
|
|
30
|
+
* Use for updates which should not be captured immediately - likely
|
|
31
|
+
* exceptions which are part of some async multi-step process. Otherwise, all
|
|
32
|
+
* such updates would end up being captured with the next
|
|
33
|
+
* `CaptureUpdateAction.IMMEDIATELY` - triggered either by the next `updateScene`
|
|
34
|
+
* or internally by the editor.
|
|
35
|
+
*
|
|
36
|
+
* These updates will _eventually_ make it to the local undo / redo stacks.
|
|
37
|
+
*/
|
|
38
|
+
readonly EVENTUALLY: "EVENTUALLY";
|
|
39
|
+
};
|
|
40
|
+
export type CaptureUpdateActionType = ValueOf<typeof CaptureUpdateAction>;
|
|
41
|
+
/**
|
|
42
|
+
* Store which captures the observed changes and emits them as `StoreIncrement` events.
|
|
43
|
+
*/
|
|
44
|
+
export declare class Store {
|
|
45
|
+
private readonly app;
|
|
46
|
+
readonly onDurableIncrementEmitter: Emitter<[DurableIncrement]>;
|
|
47
|
+
readonly onStoreIncrementEmitter: Emitter<[DurableIncrement | EphemeralIncrement]>;
|
|
48
|
+
private scheduledMacroActions;
|
|
49
|
+
private scheduledMicroActions;
|
|
50
|
+
private _snapshot;
|
|
51
|
+
get snapshot(): StoreSnapshot;
|
|
52
|
+
set snapshot(snapshot: StoreSnapshot);
|
|
53
|
+
constructor(app: App);
|
|
54
|
+
scheduleAction(action: CaptureUpdateActionType): void;
|
|
55
|
+
/**
|
|
56
|
+
* Use to schedule a delta calculation, which will consquentially be emitted as `DurableStoreIncrement` and pushed in the undo stack.
|
|
57
|
+
*/
|
|
58
|
+
scheduleCapture(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Schedule special "micro" actions, to-be executed before the next commit, before it executes a scheduled "macro" action.
|
|
61
|
+
*/
|
|
62
|
+
scheduleMicroAction(params: {
|
|
63
|
+
action: CaptureUpdateActionType;
|
|
64
|
+
elements: readonly ExcalidrawElement[] | undefined;
|
|
65
|
+
appState: AppState | ObservedAppState | undefined;
|
|
66
|
+
} | {
|
|
67
|
+
action: typeof CaptureUpdateAction.IMMEDIATELY;
|
|
68
|
+
change: StoreChange;
|
|
69
|
+
delta: StoreDelta;
|
|
70
|
+
} | {
|
|
71
|
+
action: typeof CaptureUpdateAction.NEVER | typeof CaptureUpdateAction.EVENTUALLY;
|
|
72
|
+
change: StoreChange;
|
|
73
|
+
}): void;
|
|
74
|
+
/**
|
|
75
|
+
* Performs the incoming `CaptureUpdateAction` and emits the corresponding `StoreIncrement`.
|
|
76
|
+
* Emits `DurableStoreIncrement` when action is "capture", emits `EphemeralStoreIncrement` otherwise.
|
|
77
|
+
*
|
|
78
|
+
* @emits StoreIncrement
|
|
79
|
+
*/
|
|
80
|
+
commit(elements: SceneElementsMap | undefined, appState: AppState | ObservedAppState | undefined): void;
|
|
81
|
+
/**
|
|
82
|
+
* Clears the store instance.
|
|
83
|
+
*/
|
|
84
|
+
clear(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Performs delta & change calculation and emits a durable increment.
|
|
87
|
+
*
|
|
88
|
+
* @emits StoreIncrement.
|
|
89
|
+
*/
|
|
90
|
+
private emitDurableIncrement;
|
|
91
|
+
/**
|
|
92
|
+
* Performs change calculation and emits an ephemeral increment.
|
|
93
|
+
*
|
|
94
|
+
* @emits EphemeralStoreIncrement
|
|
95
|
+
*/
|
|
96
|
+
private emitEphemeralIncrement;
|
|
97
|
+
private applyChangeToSnapshot;
|
|
98
|
+
/**
|
|
99
|
+
* Clones the snapshot if there are changes detected.
|
|
100
|
+
*/
|
|
101
|
+
private maybeCloneSnapshot;
|
|
102
|
+
private flushMicroActions;
|
|
103
|
+
private processAction;
|
|
104
|
+
/**
|
|
105
|
+
* Returns the scheduled macro action.
|
|
106
|
+
*/
|
|
107
|
+
private getScheduledMacroAction;
|
|
108
|
+
/**
|
|
109
|
+
* Ensures that the scheduled actions invariant is satisfied.
|
|
110
|
+
*/
|
|
111
|
+
private satisfiesScheduledActionsInvariant;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Repsents a change to the store containing changed elements and appState.
|
|
115
|
+
*/
|
|
116
|
+
export declare class StoreChange {
|
|
117
|
+
readonly elements: Record<string, OrderedExcalidrawElement>;
|
|
118
|
+
readonly appState: Partial<ObservedAppState>;
|
|
119
|
+
private constructor();
|
|
120
|
+
static create(prevSnapshot: StoreSnapshot, nextSnapshot: StoreSnapshot): StoreChange;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Encpasulates any change to the store (durable or ephemeral).
|
|
124
|
+
*/
|
|
125
|
+
export declare abstract class StoreIncrement {
|
|
126
|
+
readonly type: "durable" | "ephemeral";
|
|
127
|
+
readonly change: StoreChange;
|
|
128
|
+
protected constructor(type: "durable" | "ephemeral", change: StoreChange);
|
|
129
|
+
static isDurable(increment: StoreIncrement): increment is DurableIncrement;
|
|
130
|
+
static isEphemeral(increment: StoreIncrement): increment is EphemeralIncrement;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Represents a durable change to the store.
|
|
134
|
+
*/
|
|
135
|
+
export declare class DurableIncrement extends StoreIncrement {
|
|
136
|
+
readonly change: StoreChange;
|
|
137
|
+
readonly delta: StoreDelta;
|
|
138
|
+
constructor(change: StoreChange, delta: StoreDelta);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Represents an ephemeral change to the store.
|
|
142
|
+
*/
|
|
143
|
+
export declare class EphemeralIncrement extends StoreIncrement {
|
|
144
|
+
readonly change: StoreChange;
|
|
145
|
+
constructor(change: StoreChange);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Represents a captured delta by the Store.
|
|
149
|
+
*/
|
|
150
|
+
export declare class StoreDelta {
|
|
151
|
+
readonly id: string;
|
|
152
|
+
readonly elements: ElementsDelta;
|
|
153
|
+
readonly appState: AppStateDelta;
|
|
154
|
+
protected constructor(id: string, elements: ElementsDelta, appState: AppStateDelta);
|
|
155
|
+
/**
|
|
156
|
+
* Create a new instance of `StoreDelta`.
|
|
157
|
+
*/
|
|
158
|
+
static create(elements: ElementsDelta, appState: AppStateDelta, opts?: {
|
|
159
|
+
id: string;
|
|
160
|
+
}): StoreDelta;
|
|
161
|
+
/**
|
|
162
|
+
* Calculate the delta between the previous and next snapshot.
|
|
163
|
+
*/
|
|
164
|
+
static calculate(prevSnapshot: StoreSnapshot, nextSnapshot: StoreSnapshot): StoreDelta;
|
|
165
|
+
/**
|
|
166
|
+
* Restore a store delta instance from a DTO.
|
|
167
|
+
*/
|
|
168
|
+
static restore(storeDeltaDTO: DTO<StoreDelta>): StoreDelta;
|
|
169
|
+
/**
|
|
170
|
+
* Parse and load the delta from the remote payload.
|
|
171
|
+
*/
|
|
172
|
+
static load({ id, elements: { added, removed, updated }, }: DTO<StoreDelta>): StoreDelta;
|
|
173
|
+
/**
|
|
174
|
+
* Inverse store delta, creates new instance of `StoreDelta`.
|
|
175
|
+
*/
|
|
176
|
+
static inverse(delta: StoreDelta): StoreDelta;
|
|
177
|
+
/**
|
|
178
|
+
* Apply the delta to the passed elements and appState, does not modify the snapshot.
|
|
179
|
+
*/
|
|
180
|
+
static applyTo(delta: StoreDelta, elements: SceneElementsMap, appState: AppState, options?: ApplyToOptions): [SceneElementsMap, AppState, boolean];
|
|
181
|
+
/**
|
|
182
|
+
* Apply latest (remote) changes to the delta, creates new instance of `StoreDelta`.
|
|
183
|
+
*/
|
|
184
|
+
static applyLatestChanges(delta: StoreDelta, prevElements: SceneElementsMap, nextElements: SceneElementsMap, modifierOptions?: "deleted" | "inserted"): StoreDelta;
|
|
185
|
+
isEmpty(): boolean;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Represents a snapshot of the captured or updated changes in the store,
|
|
189
|
+
* used for producing deltas and emitting `DurableStoreIncrement`s.
|
|
190
|
+
*/
|
|
191
|
+
export declare class StoreSnapshot {
|
|
192
|
+
readonly elements: SceneElementsMap;
|
|
193
|
+
readonly appState: ObservedAppState;
|
|
194
|
+
readonly metadata: {
|
|
195
|
+
didElementsChange: boolean;
|
|
196
|
+
didAppStateChange: boolean;
|
|
197
|
+
isEmpty?: boolean;
|
|
198
|
+
};
|
|
199
|
+
private _lastChangedElementsHash;
|
|
200
|
+
private _lastChangedAppStateHash;
|
|
201
|
+
private constructor();
|
|
202
|
+
static create(elements: SceneElementsMap, appState: AppState | ObservedAppState, metadata?: {
|
|
203
|
+
didElementsChange: boolean;
|
|
204
|
+
didAppStateChange: boolean;
|
|
205
|
+
}): StoreSnapshot;
|
|
206
|
+
static empty(): StoreSnapshot;
|
|
207
|
+
getChangedElements(prevSnapshot: StoreSnapshot): Record<string, OrderedExcalidrawElement>;
|
|
208
|
+
getChangedAppState(prevSnapshot: StoreSnapshot): Partial<ObservedAppState>;
|
|
209
|
+
isEmpty(): boolean | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* Apply the change and return a new snapshot instance.
|
|
212
|
+
*/
|
|
213
|
+
applyChange(change: StoreChange): StoreSnapshot;
|
|
214
|
+
/**
|
|
215
|
+
* Efficiently clone the existing snapshot, only if we detected changes.
|
|
216
|
+
*
|
|
217
|
+
* @returns same instance if there are no changes detected, new instance otherwise.
|
|
218
|
+
*/
|
|
219
|
+
maybeClone(action: CaptureUpdateActionType, elements: SceneElementsMap | undefined, appState: AppState | ObservedAppState | undefined): StoreSnapshot;
|
|
220
|
+
private maybeCreateAppStateSnapshot;
|
|
221
|
+
private maybeCreateElementsSnapshot;
|
|
222
|
+
private detectChangedAppState;
|
|
223
|
+
/**
|
|
224
|
+
* Detect if there are any changed elements.
|
|
225
|
+
*/
|
|
226
|
+
private detectChangedElements;
|
|
227
|
+
/**
|
|
228
|
+
* Perform structural clone, deep cloning only elements that changed.
|
|
229
|
+
*/
|
|
230
|
+
private createElementsSnapshot;
|
|
231
|
+
}
|
|
232
|
+
export declare const getObservedAppState: (appState: AppState | ObservedAppState) => ObservedAppState;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { ExtractSetType } from "@excalidraw/common/utility-types";
|
|
3
|
+
import type { Radians } from "@excalidraw/math";
|
|
4
|
+
import type { Scene } from "./Scene";
|
|
3
5
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
4
6
|
import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
|
|
5
|
-
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null,
|
|
6
|
-
export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement,
|
|
7
|
+
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null, scene: Scene) => void;
|
|
8
|
+
export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement, scene: Scene, transformHandleType: MaybeTransformHandleType, shouldMaintainAspectRatio?: boolean) => void;
|
|
7
9
|
export declare const computeBoundTextPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
8
10
|
x: number;
|
|
9
11
|
y: number;
|
|
@@ -19,7 +21,7 @@ export declare const getContainerCoords: (container: NonDeletedExcalidrawElement
|
|
|
19
21
|
x: number;
|
|
20
22
|
y: number;
|
|
21
23
|
};
|
|
22
|
-
export declare const getTextElementAngle: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null) =>
|
|
24
|
+
export declare const getTextElementAngle: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null) => 0 | Radians;
|
|
23
25
|
export declare const getBoundTextElementPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
24
26
|
x: number;
|
|
25
27
|
y: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { MarkNonNullable } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { Bounds } from "./bounds";
|
|
4
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, PointBinding, FixedPointBinding, ExcalidrawFlowchartNodeElement } from "./types";
|
|
4
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, PointBinding, FixedPointBinding, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType } from "./types";
|
|
5
5
|
export declare const isInitializedImageElement: (element: ExcalidrawElement | null) => element is InitializedExcalidrawImageElement;
|
|
6
6
|
export declare const isImageElement: (element: ExcalidrawElement | null) => element is ExcalidrawImageElement;
|
|
7
7
|
export declare const isEmbeddableElement: (element: ExcalidrawElement | null | undefined) => element is ExcalidrawEmbeddableElement;
|
|
@@ -14,8 +14,15 @@ export declare const isFrameLikeElement: (element: ExcalidrawElement | null) =>
|
|
|
14
14
|
export declare const isFreeDrawElement: (element?: ExcalidrawElement | null) => element is ExcalidrawFreeDrawElement;
|
|
15
15
|
export declare const isFreeDrawElementType: (elementType: ExcalidrawElementType) => boolean;
|
|
16
16
|
export declare const isLinearElement: (element?: ExcalidrawElement | null) => element is ExcalidrawLinearElement;
|
|
17
|
+
export declare const isLineElement: (element?: ExcalidrawElement | null) => element is ExcalidrawLineElement;
|
|
17
18
|
export declare const isArrowElement: (element?: ExcalidrawElement | null) => element is ExcalidrawArrowElement;
|
|
18
19
|
export declare const isElbowArrow: (element?: ExcalidrawElement) => element is ExcalidrawElbowArrowElement;
|
|
20
|
+
/**
|
|
21
|
+
* sharp or curved arrow, but not elbow
|
|
22
|
+
*/
|
|
23
|
+
export declare const isSimpleArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
24
|
+
export declare const isSharpArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
25
|
+
export declare const isCurvedArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
19
26
|
export declare const isLinearElementType: (elementType: ElementOrToolType) => boolean;
|
|
20
27
|
export declare const isBindingElement: (element?: ExcalidrawElement | null, includeLocked?: boolean) => element is ExcalidrawLinearElement;
|
|
21
28
|
export declare const isBindingElementType: (elementType: ElementOrToolType) => boolean;
|
|
@@ -27,6 +34,7 @@ export declare const isExcalidrawElement: (element: any) => element is Excalidra
|
|
|
27
34
|
export declare const isFlowchartNodeElement: (element: ExcalidrawElement) => element is ExcalidrawFlowchartNodeElement;
|
|
28
35
|
export declare const hasBoundTextElement: (element: ExcalidrawElement | null) => element is MarkNonNullable<ExcalidrawBindableElement, "boundElements">;
|
|
29
36
|
export declare const isBoundToContainer: (element: ExcalidrawElement | null) => element is ExcalidrawTextElementWithContainer;
|
|
37
|
+
export declare const isArrowBoundToElement: (element: ExcalidrawArrowElement) => boolean;
|
|
30
38
|
export declare const isUsingAdaptiveRadius: (type: string) => boolean;
|
|
31
39
|
export declare const isUsingProportionalRadius: (type: string) => boolean;
|
|
32
40
|
export declare const canApplyRoundnessTypeToElement: (roundnessType: RoundnessType, element: ExcalidrawElement) => boolean;
|
|
@@ -37,3 +45,13 @@ export declare const getDefaultRoundnessTypeForElement: (element: ExcalidrawElem
|
|
|
37
45
|
} | null;
|
|
38
46
|
export declare const isFixedPointBinding: (binding: PointBinding | FixedPointBinding) => binding is FixedPointBinding;
|
|
39
47
|
export declare const isBounds: (box: unknown) => box is Bounds;
|
|
48
|
+
export declare const getLinearElementSubType: (element: ExcalidrawLinearElement) => ExcalidrawLinearElementSubType;
|
|
49
|
+
/**
|
|
50
|
+
* Checks if current element points meet all the conditions for polygon=true
|
|
51
|
+
* (this isn't a element type check, for that use isLineElement).
|
|
52
|
+
*
|
|
53
|
+
* If you want to check if points *can* be turned into a polygon, use
|
|
54
|
+
* canBecomePolygon(points).
|
|
55
|
+
*/
|
|
56
|
+
export declare const isValidPolygon: (points: ExcalidrawLineElement["points"]) => boolean;
|
|
57
|
+
export declare const canBecomePolygon: (points: ExcalidrawLineElement["points"]) => boolean;
|
|
@@ -151,7 +151,7 @@ export type ExcalidrawFrameLikeElement = ExcalidrawFrameElement | ExcalidrawMagi
|
|
|
151
151
|
*/
|
|
152
152
|
export type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
153
153
|
export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
154
|
-
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement;
|
|
154
|
+
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
|
|
155
155
|
/**
|
|
156
156
|
* ExcalidrawElement should be JSON serializable and (eventually) contain
|
|
157
157
|
* no computed data. The list of all ExcalidrawElements should be shareable
|
|
@@ -205,6 +205,11 @@ export type PointBinding = {
|
|
|
205
205
|
export type FixedPointBinding = Merge<PointBinding, {
|
|
206
206
|
fixedPoint: FixedPoint;
|
|
207
207
|
}>;
|
|
208
|
+
type Index = number;
|
|
209
|
+
export type PointsPositionUpdates = Map<Index, {
|
|
210
|
+
point: LocalPoint;
|
|
211
|
+
isDragging?: boolean;
|
|
212
|
+
}>;
|
|
208
213
|
export type Arrowhead = "arrow" | "bar" | "dot" | "circle" | "circle_outline" | "triangle" | "triangle_outline" | "diamond" | "diamond_outline" | "crowfoot_one" | "crowfoot_many" | "crowfoot_one_or_many";
|
|
209
214
|
export type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
|
|
210
215
|
type: "line" | "arrow";
|
|
@@ -215,10 +220,14 @@ export type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
|
|
|
215
220
|
startArrowhead: Arrowhead | null;
|
|
216
221
|
endArrowhead: Arrowhead | null;
|
|
217
222
|
}>;
|
|
223
|
+
export type ExcalidrawLineElement = ExcalidrawLinearElement & Readonly<{
|
|
224
|
+
type: "line";
|
|
225
|
+
polygon: boolean;
|
|
226
|
+
}>;
|
|
218
227
|
export type FixedSegment = {
|
|
219
228
|
start: LocalPoint;
|
|
220
229
|
end: LocalPoint;
|
|
221
|
-
index:
|
|
230
|
+
index: Index;
|
|
222
231
|
};
|
|
223
232
|
export type ExcalidrawArrowElement = ExcalidrawLinearElement & Readonly<{
|
|
224
233
|
type: "arrow";
|
|
@@ -279,4 +288,8 @@ export type SceneElementsMap = Map<ExcalidrawElement["id"], Ordered<ExcalidrawEl
|
|
|
279
288
|
*/
|
|
280
289
|
export type NonDeletedSceneElementsMap = Map<ExcalidrawElement["id"], Ordered<NonDeletedExcalidrawElement>> & MakeBrand<"NonDeletedSceneElementsMap">;
|
|
281
290
|
export type ElementsMapOrArray = readonly ExcalidrawElement[] | Readonly<ElementsMap>;
|
|
291
|
+
export type ExcalidrawLinearElementSubType = "line" | "sharpArrow" | "curvedArrow" | "elbowArrow";
|
|
292
|
+
export type ConvertibleGenericTypes = "rectangle" | "diamond" | "ellipse";
|
|
293
|
+
export type ConvertibleLinearTypes = ExcalidrawLinearElementSubType;
|
|
294
|
+
export type ConvertibleTypes = ConvertibleGenericTypes | ConvertibleLinearTypes;
|
|
282
295
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { Curve, LineSegment } from "@excalidraw/math";
|
|
3
|
+
import type { Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import type { ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* Returns the **rotated** components of freedraw, line or arrow elements.
|
|
7
|
+
*
|
|
8
|
+
* @param element The linear element to deconstruct
|
|
9
|
+
* @returns The rotated in components.
|
|
10
|
+
*/
|
|
11
|
+
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
12
|
+
/**
|
|
13
|
+
* Get the building components of a rectanguloid element in the form of
|
|
14
|
+
* line segments and curves **unrotated**.
|
|
15
|
+
*
|
|
16
|
+
* @param element Target rectanguloid element
|
|
17
|
+
* @param offset Optional offset to expand the rectanguloid shape
|
|
18
|
+
* @returns Tuple of **unrotated** line segments (0) and curves (1)
|
|
19
|
+
*/
|
|
20
|
+
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
21
|
+
/**
|
|
22
|
+
* Get the **unrotated** building components of a diamond element
|
|
23
|
+
* in the form of line segments and curves as a tuple, in this order.
|
|
24
|
+
*
|
|
25
|
+
* @param element The element to deconstruct
|
|
26
|
+
* @param offset An optional offset
|
|
27
|
+
* @returns Tuple of line **unrotated** segments (0) and curves (1)
|
|
28
|
+
*/
|
|
29
|
+
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
30
|
+
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"], zoomValue?: Zoom["value"]) => boolean;
|
|
31
|
+
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
|
-
import type Scene from "
|
|
2
|
+
import type { Scene } from "./Scene";
|
|
3
3
|
import type { ExcalidrawElement } from "./types";
|
|
4
4
|
export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
5
5
|
export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
@@ -20,7 +20,7 @@ export declare const actionAddToLibrary: {
|
|
|
20
20
|
errorMessage: import("react").ReactNode;
|
|
21
21
|
activeEmbeddable: {
|
|
22
22
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
23
|
-
state: "
|
|
23
|
+
state: "active" | "hover";
|
|
24
24
|
} | null;
|
|
25
25
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
26
26
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -28,7 +28,7 @@ export declare const actionAddToLibrary: {
|
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
30
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
|
-
suggestedBindings: import("@excalidraw/element
|
|
31
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
32
32
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
33
33
|
frameRendering: {
|
|
34
34
|
enabled: boolean;
|
|
@@ -39,10 +39,11 @@ export declare const actionAddToLibrary: {
|
|
|
39
39
|
editingFrame: string | null;
|
|
40
40
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
41
41
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
42
|
-
editingLinearElement: import("@excalidraw/element
|
|
42
|
+
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
43
43
|
activeTool: {
|
|
44
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
45
45
|
locked: boolean;
|
|
46
|
+
fromSelection: boolean;
|
|
46
47
|
} & import("../types").ActiveTool;
|
|
47
48
|
penMode: boolean;
|
|
48
49
|
penDetected: boolean;
|
|
@@ -76,7 +77,7 @@ export declare const actionAddToLibrary: {
|
|
|
76
77
|
zoom: Readonly<{
|
|
77
78
|
value: import("../types").NormalizedZoomValue;
|
|
78
79
|
}>;
|
|
79
|
-
openMenu: "
|
|
80
|
+
openMenu: "canvas" | "shape" | null;
|
|
80
81
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
81
82
|
openSidebar: {
|
|
82
83
|
name: string;
|
|
@@ -86,7 +87,7 @@ export declare const actionAddToLibrary: {
|
|
|
86
87
|
name: "imageExport" | "help" | "jsonExport";
|
|
87
88
|
} | {
|
|
88
89
|
name: "ttd";
|
|
89
|
-
tab: "text-to-diagram"
|
|
90
|
+
tab: "mermaid" | "text-to-diagram";
|
|
90
91
|
} | {
|
|
91
92
|
name: "commandPalette";
|
|
92
93
|
} | {
|
|
@@ -153,9 +154,8 @@ export declare const actionAddToLibrary: {
|
|
|
153
154
|
shown: true;
|
|
154
155
|
data: import("../charts").Spreadsheet;
|
|
155
156
|
};
|
|
156
|
-
pendingImageElementId: string | null;
|
|
157
157
|
showHyperlinkPopup: false | "editor" | "info";
|
|
158
|
-
selectedLinearElement: import("@excalidraw/element
|
|
158
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
159
159
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
160
160
|
originSnapOffset: {
|
|
161
161
|
x: number;
|
|
@@ -166,16 +166,14 @@ export declare const actionAddToLibrary: {
|
|
|
166
166
|
followedBy: Set<import("../types").SocketId>;
|
|
167
167
|
isCropping: boolean;
|
|
168
168
|
croppingElementId: string | null;
|
|
169
|
-
searchMatches:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}[];
|
|
178
|
-
}[];
|
|
169
|
+
searchMatches: Readonly<{
|
|
170
|
+
focusedId: string | null;
|
|
171
|
+
matches: readonly import("../types").SearchMatch[];
|
|
172
|
+
}> | null;
|
|
173
|
+
activeLockedId: string | null;
|
|
174
|
+
lockedMultiSelections: {
|
|
175
|
+
[groupId: string]: true;
|
|
176
|
+
};
|
|
179
177
|
};
|
|
180
178
|
} | {
|
|
181
179
|
captureUpdate: "EVENTUALLY";
|
|
@@ -190,7 +188,7 @@ export declare const actionAddToLibrary: {
|
|
|
190
188
|
isLoading: boolean;
|
|
191
189
|
activeEmbeddable: {
|
|
192
190
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
193
|
-
state: "
|
|
191
|
+
state: "active" | "hover";
|
|
194
192
|
} | null;
|
|
195
193
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
196
194
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -198,7 +196,7 @@ export declare const actionAddToLibrary: {
|
|
|
198
196
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
199
197
|
isBindingEnabled: boolean;
|
|
200
198
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
201
|
-
suggestedBindings: import("@excalidraw/element
|
|
199
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
202
200
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
203
201
|
frameRendering: {
|
|
204
202
|
enabled: boolean;
|
|
@@ -209,10 +207,11 @@ export declare const actionAddToLibrary: {
|
|
|
209
207
|
editingFrame: string | null;
|
|
210
208
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
211
209
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
212
|
-
editingLinearElement: import("@excalidraw/element
|
|
210
|
+
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
213
211
|
activeTool: {
|
|
214
212
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
215
213
|
locked: boolean;
|
|
214
|
+
fromSelection: boolean;
|
|
216
215
|
} & import("../types").ActiveTool;
|
|
217
216
|
penMode: boolean;
|
|
218
217
|
penDetected: boolean;
|
|
@@ -246,7 +245,7 @@ export declare const actionAddToLibrary: {
|
|
|
246
245
|
zoom: Readonly<{
|
|
247
246
|
value: import("../types").NormalizedZoomValue;
|
|
248
247
|
}>;
|
|
249
|
-
openMenu: "
|
|
248
|
+
openMenu: "canvas" | "shape" | null;
|
|
250
249
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
251
250
|
openSidebar: {
|
|
252
251
|
name: string;
|
|
@@ -256,7 +255,7 @@ export declare const actionAddToLibrary: {
|
|
|
256
255
|
name: "imageExport" | "help" | "jsonExport";
|
|
257
256
|
} | {
|
|
258
257
|
name: "ttd";
|
|
259
|
-
tab: "text-to-diagram"
|
|
258
|
+
tab: "mermaid" | "text-to-diagram";
|
|
260
259
|
} | {
|
|
261
260
|
name: "commandPalette";
|
|
262
261
|
} | {
|
|
@@ -328,9 +327,8 @@ export declare const actionAddToLibrary: {
|
|
|
328
327
|
shown: true;
|
|
329
328
|
data: import("../charts").Spreadsheet;
|
|
330
329
|
};
|
|
331
|
-
pendingImageElementId: string | null;
|
|
332
330
|
showHyperlinkPopup: false | "editor" | "info";
|
|
333
|
-
selectedLinearElement: import("@excalidraw/element
|
|
331
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
334
332
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
335
333
|
originSnapOffset: {
|
|
336
334
|
x: number;
|
|
@@ -341,16 +339,14 @@ export declare const actionAddToLibrary: {
|
|
|
341
339
|
followedBy: Set<import("../types").SocketId>;
|
|
342
340
|
isCropping: boolean;
|
|
343
341
|
croppingElementId: string | null;
|
|
344
|
-
searchMatches:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}[];
|
|
353
|
-
}[];
|
|
342
|
+
searchMatches: Readonly<{
|
|
343
|
+
focusedId: string | null;
|
|
344
|
+
matches: readonly import("../types").SearchMatch[];
|
|
345
|
+
}> | null;
|
|
346
|
+
activeLockedId: string | null;
|
|
347
|
+
lockedMultiSelections: {
|
|
348
|
+
[groupId: string]: true;
|
|
349
|
+
};
|
|
354
350
|
};
|
|
355
351
|
}> | {
|
|
356
352
|
captureUpdate: "EVENTUALLY";
|
|
@@ -365,7 +361,7 @@ export declare const actionAddToLibrary: {
|
|
|
365
361
|
isLoading: boolean;
|
|
366
362
|
activeEmbeddable: {
|
|
367
363
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
368
|
-
state: "
|
|
364
|
+
state: "active" | "hover";
|
|
369
365
|
} | null;
|
|
370
366
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
371
367
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -373,7 +369,7 @@ export declare const actionAddToLibrary: {
|
|
|
373
369
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
374
370
|
isBindingEnabled: boolean;
|
|
375
371
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
376
|
-
suggestedBindings: import("@excalidraw/element
|
|
372
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
377
373
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
378
374
|
frameRendering: {
|
|
379
375
|
enabled: boolean;
|
|
@@ -384,10 +380,11 @@ export declare const actionAddToLibrary: {
|
|
|
384
380
|
editingFrame: string | null;
|
|
385
381
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
386
382
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
387
|
-
editingLinearElement: import("@excalidraw/element
|
|
383
|
+
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
388
384
|
activeTool: {
|
|
389
385
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
390
386
|
locked: boolean;
|
|
387
|
+
fromSelection: boolean;
|
|
391
388
|
} & import("../types").ActiveTool;
|
|
392
389
|
penMode: boolean;
|
|
393
390
|
penDetected: boolean;
|
|
@@ -421,7 +418,7 @@ export declare const actionAddToLibrary: {
|
|
|
421
418
|
zoom: Readonly<{
|
|
422
419
|
value: import("../types").NormalizedZoomValue;
|
|
423
420
|
}>;
|
|
424
|
-
openMenu: "
|
|
421
|
+
openMenu: "canvas" | "shape" | null;
|
|
425
422
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
426
423
|
openSidebar: {
|
|
427
424
|
name: string;
|
|
@@ -431,7 +428,7 @@ export declare const actionAddToLibrary: {
|
|
|
431
428
|
name: "imageExport" | "help" | "jsonExport";
|
|
432
429
|
} | {
|
|
433
430
|
name: "ttd";
|
|
434
|
-
tab: "text-to-diagram"
|
|
431
|
+
tab: "mermaid" | "text-to-diagram";
|
|
435
432
|
} | {
|
|
436
433
|
name: "commandPalette";
|
|
437
434
|
} | {
|
|
@@ -503,9 +500,8 @@ export declare const actionAddToLibrary: {
|
|
|
503
500
|
shown: true;
|
|
504
501
|
data: import("../charts").Spreadsheet;
|
|
505
502
|
};
|
|
506
|
-
pendingImageElementId: string | null;
|
|
507
503
|
showHyperlinkPopup: false | "editor" | "info";
|
|
508
|
-
selectedLinearElement: import("@excalidraw/element
|
|
504
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
509
505
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
510
506
|
originSnapOffset: {
|
|
511
507
|
x: number;
|
|
@@ -516,16 +512,14 @@ export declare const actionAddToLibrary: {
|
|
|
516
512
|
followedBy: Set<import("../types").SocketId>;
|
|
517
513
|
isCropping: boolean;
|
|
518
514
|
croppingElementId: string | null;
|
|
519
|
-
searchMatches:
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}[];
|
|
528
|
-
}[];
|
|
515
|
+
searchMatches: Readonly<{
|
|
516
|
+
focusedId: string | null;
|
|
517
|
+
matches: readonly import("../types").SearchMatch[];
|
|
518
|
+
}> | null;
|
|
519
|
+
activeLockedId: string | null;
|
|
520
|
+
lockedMultiSelections: {
|
|
521
|
+
[groupId: string]: true;
|
|
522
|
+
};
|
|
529
523
|
};
|
|
530
524
|
};
|
|
531
525
|
label: string;
|