@excalidraw/excalidraw 0.18.0-432a46e → 0.18.0-508de2f3a
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-3JWCK6AW.js +5677 -0
- package/dist/dev/chunk-3JWCK6AW.js.map +7 -0
- package/dist/dev/chunk-BVDPDK7J.js +7 -0
- package/dist/dev/chunk-BVDPDK7J.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-CNYZRAWA.js} +3 -3
- package/dist/dev/index.css +147 -68
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +9456 -9767
- 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-2HQY2INW.js +4 -0
- package/dist/prod/chunk-I4UNSFV6.js +12 -0
- package/dist/prod/chunk-XRPJNYI4.js +7 -0
- package/dist/prod/data/image-DYRE7ZKS.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 +24 -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 +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 +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} +78 -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 +57 -0
- package/dist/types/{packages/element → element}/src/linearElementEditor.d.ts +23 -36
- package/dist/types/{packages/element → element}/src/mutateElement.d.ts +12 -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 +42 -51
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionBoundText.d.ts +28 -34
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionCanvas.d.ts +351 -214
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionClipboard.d.ts +84 -100
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionCropEditor.d.ts +14 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionDeleteSelected.d.ts +42 -50
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionElementLink.d.ts +13 -16
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionElementLock.d.ts +43 -51
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionEmbeddable.d.ts +14 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionExport.d.ts +136 -163
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionFinalize.d.ts +75 -40
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionFrame.d.ts +103 -115
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionGroup.d.ts +28 -34
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionHistory.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +713 -0
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionLink.d.ts +13 -16
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionMenu.d.ts +39 -48
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionNavigate.d.ts +27 -33
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionProperties.d.ts +218 -255
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionSelectAll.d.ts +14 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionStyles.d.ts +14 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleGridMode.d.ts +14 -17
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleObjectsSnapMode.d.ts +14 -17
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +182 -0
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleStats.d.ts +14 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleViewMode.d.ts +14 -18
- package/dist/types/{packages/excalidraw → excalidraw}/actions/actionToggleZenMode.d.ts +14 -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/Actions.d.ts +0 -4
- package/dist/types/{packages/excalidraw → excalidraw}/components/App.d.ts +41 -24
- 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/excalidraw/components/Ellipsify.d.ts +4 -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/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/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}/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 +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/{packages/excalidraw → excalidraw}/snapping.d.ts +2 -2
- package/dist/types/{packages/excalidraw → excalidraw}/types.d.ts +38 -15
- 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 +146 -109
- 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/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-CNYZRAWA.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/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/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/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/resave.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/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,189 +0,0 @@
|
|
|
1
|
-
import { type TransformHandleDirection } from "@excalidraw/element/transformHandles";
|
|
2
|
-
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
3
|
-
import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, ExcalidrawArrowElement, ExcalidrawRectangleElement, ExcalidrawEllipseElement, ExcalidrawDiamondElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer, ExcalidrawImageElement } from "@excalidraw/element/types";
|
|
4
|
-
import type { ToolType } from "../../types";
|
|
5
|
-
export type KeyboardModifiers = {
|
|
6
|
-
alt?: boolean;
|
|
7
|
-
shift?: boolean;
|
|
8
|
-
ctrl?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare class Keyboard {
|
|
11
|
-
static withModifierKeys: (modifiers: KeyboardModifiers, cb: () => void) => void;
|
|
12
|
-
static keyDown: (key: string, target?: HTMLElement | Document | Window) => void;
|
|
13
|
-
static keyUp: (key: string, target?: HTMLElement | Document | Window) => void;
|
|
14
|
-
static keyPress: (key: string, target?: HTMLElement | Document | Window) => void;
|
|
15
|
-
static codeDown: (code: string) => void;
|
|
16
|
-
static codeUp: (code: string) => void;
|
|
17
|
-
static codePress: (code: string) => void;
|
|
18
|
-
static undo: () => void;
|
|
19
|
-
static redo: () => void;
|
|
20
|
-
static exitTextEditor: (textarea: HTMLTextAreaElement) => void;
|
|
21
|
-
}
|
|
22
|
-
export declare class Pointer {
|
|
23
|
-
private readonly pointerType;
|
|
24
|
-
private readonly pointerId;
|
|
25
|
-
clientX: number;
|
|
26
|
-
clientY: number;
|
|
27
|
-
constructor(pointerType: "mouse" | "touch" | "pen", pointerId?: number);
|
|
28
|
-
reset(): void;
|
|
29
|
-
getPosition(): number[];
|
|
30
|
-
restorePosition(x?: number, y?: number): void;
|
|
31
|
-
private getEvent;
|
|
32
|
-
move(dx: number, dy: number): void;
|
|
33
|
-
down(dx?: number, dy?: number): void;
|
|
34
|
-
up(dx?: number, dy?: number): void;
|
|
35
|
-
click(dx?: number, dy?: number): void;
|
|
36
|
-
doubleClick(dx?: number, dy?: number): void;
|
|
37
|
-
moveTo(x?: number, y?: number): void;
|
|
38
|
-
downAt(x?: number, y?: number): void;
|
|
39
|
-
upAt(x?: number, y?: number): void;
|
|
40
|
-
clickAt(x: number, y: number): void;
|
|
41
|
-
rightClickAt(x: number, y: number): void;
|
|
42
|
-
doubleClickAt(x: number, y: number): void;
|
|
43
|
-
select(
|
|
44
|
-
/** if multiple elements supplied, they're shift-selected */
|
|
45
|
-
elements: ExcalidrawElement | ExcalidrawElement[]): void;
|
|
46
|
-
clickOn(element: ExcalidrawElement): void;
|
|
47
|
-
doubleClickOn(element: ExcalidrawElement): void;
|
|
48
|
-
}
|
|
49
|
-
/** Tools that can be used to draw shapes */
|
|
50
|
-
type DrawingToolName = Exclude<ToolType, "lock" | "selection" | "eraser">;
|
|
51
|
-
type Element<T extends DrawingToolName> = T extends "line" | "freedraw" ? ExcalidrawLinearElement : T extends "arrow" ? ExcalidrawArrowElement : T extends "text" ? ExcalidrawTextElement : T extends "rectangle" ? ExcalidrawRectangleElement : T extends "ellipse" ? ExcalidrawEllipseElement : T extends "diamond" ? ExcalidrawDiamondElement : ExcalidrawElement;
|
|
52
|
-
export declare class UI {
|
|
53
|
-
static clickTool: (toolName: ToolType | "lock") => void;
|
|
54
|
-
static clickLabeledElement: (label: string) => void;
|
|
55
|
-
static clickOnTestId: (testId: string) => void;
|
|
56
|
-
static clickByTitle: (title: string) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Creates an Excalidraw element, and returns a proxy that wraps it so that
|
|
59
|
-
* accessing props will return the latest ones from the object existing in
|
|
60
|
-
* the app's elements array. This is because across the app lifecycle we tend
|
|
61
|
-
* to recreate element objects and the returned reference will become stale.
|
|
62
|
-
*
|
|
63
|
-
* If you need to get the actual element, not the proxy, call `get()` method
|
|
64
|
-
* on the proxy object.
|
|
65
|
-
*/
|
|
66
|
-
static createElement<T extends DrawingToolName>(type: T, { position, x, y, size, width: initialWidth, height: initialHeight, angle, points: initialPoints, }?: {
|
|
67
|
-
position?: number;
|
|
68
|
-
x?: number;
|
|
69
|
-
y?: number;
|
|
70
|
-
size?: number;
|
|
71
|
-
width?: number;
|
|
72
|
-
height?: number;
|
|
73
|
-
angle?: number;
|
|
74
|
-
points?: T extends "line" | "arrow" | "freedraw" ? LocalPoint[] : never;
|
|
75
|
-
}): Element<T> & {
|
|
76
|
-
/** Returns the actual, current element from the elements array, instead
|
|
77
|
-
of the proxy */
|
|
78
|
-
get(): Element<T>;
|
|
79
|
-
};
|
|
80
|
-
static editText<T extends ExcalidrawTextElement | ExcalidrawTextContainer>(element: T, text: string): Promise<(T & Readonly<{
|
|
81
|
-
id: string;
|
|
82
|
-
x: number;
|
|
83
|
-
y: number;
|
|
84
|
-
strokeColor: string;
|
|
85
|
-
backgroundColor: string;
|
|
86
|
-
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
87
|
-
strokeWidth: number;
|
|
88
|
-
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
89
|
-
roundness: {
|
|
90
|
-
type: import("@excalidraw/element/types").RoundnessType;
|
|
91
|
-
value?: number | undefined;
|
|
92
|
-
} | null;
|
|
93
|
-
roughness: number;
|
|
94
|
-
opacity: number;
|
|
95
|
-
width: number;
|
|
96
|
-
height: number;
|
|
97
|
-
angle: Radians;
|
|
98
|
-
seed: number;
|
|
99
|
-
version: number;
|
|
100
|
-
versionNonce: number;
|
|
101
|
-
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
102
|
-
isDeleted: boolean;
|
|
103
|
-
groupIds: readonly string[];
|
|
104
|
-
frameId: string | null;
|
|
105
|
-
boundElements: readonly Readonly<{
|
|
106
|
-
id: string;
|
|
107
|
-
type: "text" | "arrow";
|
|
108
|
-
}>[] | null;
|
|
109
|
-
updated: number;
|
|
110
|
-
link: string | null;
|
|
111
|
-
locked: boolean;
|
|
112
|
-
customData?: Record<string, any> | undefined;
|
|
113
|
-
}> & Readonly<{
|
|
114
|
-
type: "text";
|
|
115
|
-
fontSize: number;
|
|
116
|
-
fontFamily: number;
|
|
117
|
-
text: string;
|
|
118
|
-
textAlign: string;
|
|
119
|
-
verticalAlign: string;
|
|
120
|
-
containerId: string | null;
|
|
121
|
-
originalText: string;
|
|
122
|
-
autoResize: boolean;
|
|
123
|
-
lineHeight: number & {
|
|
124
|
-
_brand: "unitlessLineHeight";
|
|
125
|
-
};
|
|
126
|
-
}>) | ({
|
|
127
|
-
containerId: string;
|
|
128
|
-
} & Readonly<{
|
|
129
|
-
id: string;
|
|
130
|
-
x: number;
|
|
131
|
-
y: number;
|
|
132
|
-
strokeColor: string;
|
|
133
|
-
backgroundColor: string;
|
|
134
|
-
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
135
|
-
strokeWidth: number;
|
|
136
|
-
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
137
|
-
roundness: {
|
|
138
|
-
type: import("@excalidraw/element/types").RoundnessType;
|
|
139
|
-
value?: number | undefined;
|
|
140
|
-
} | null;
|
|
141
|
-
roughness: number;
|
|
142
|
-
opacity: number;
|
|
143
|
-
width: number;
|
|
144
|
-
height: number;
|
|
145
|
-
angle: Radians;
|
|
146
|
-
seed: number;
|
|
147
|
-
version: number;
|
|
148
|
-
versionNonce: number;
|
|
149
|
-
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
150
|
-
isDeleted: boolean;
|
|
151
|
-
groupIds: readonly string[];
|
|
152
|
-
frameId: string | null;
|
|
153
|
-
boundElements: readonly Readonly<{
|
|
154
|
-
id: string;
|
|
155
|
-
type: "text" | "arrow";
|
|
156
|
-
}>[] | null;
|
|
157
|
-
updated: number;
|
|
158
|
-
link: string | null;
|
|
159
|
-
locked: boolean;
|
|
160
|
-
customData?: Record<string, any> | undefined;
|
|
161
|
-
}> & Readonly<{
|
|
162
|
-
type: "text";
|
|
163
|
-
fontSize: number;
|
|
164
|
-
fontFamily: number;
|
|
165
|
-
text: string;
|
|
166
|
-
textAlign: string;
|
|
167
|
-
verticalAlign: string;
|
|
168
|
-
containerId: string | null;
|
|
169
|
-
originalText: string;
|
|
170
|
-
autoResize: boolean;
|
|
171
|
-
lineHeight: number & {
|
|
172
|
-
_brand: "unitlessLineHeight";
|
|
173
|
-
};
|
|
174
|
-
}> & {
|
|
175
|
-
/** Returns the actual, current element from the elements array, instead of
|
|
176
|
-
the proxy */
|
|
177
|
-
get(): ExcalidrawTextElementWithContainer;
|
|
178
|
-
})>;
|
|
179
|
-
static updateInput: (input: HTMLInputElement, value: string | number) => void;
|
|
180
|
-
static resize(element: ExcalidrawElement | ExcalidrawElement[], handle: TransformHandleDirection, mouseMove: [deltaX: number, deltaY: number], keyboardModifiers?: KeyboardModifiers): void;
|
|
181
|
-
static crop(element: ExcalidrawImageElement, handle: TransformHandleDirection, naturalWidth: number, naturalHeight: number, mouseMove: [deltaX: number, deltaY: number], keepAspectRatio?: boolean): void;
|
|
182
|
-
static rotate(element: ExcalidrawElement | ExcalidrawElement[], mouseMove: [deltaX: number, deltaY: number], keyboardModifiers?: KeyboardModifiers): void;
|
|
183
|
-
static group(elements: ExcalidrawElement[]): void;
|
|
184
|
-
static ungroup(elements: ExcalidrawElement[]): void;
|
|
185
|
-
static queryContextMenu: () => HTMLElement | null;
|
|
186
|
-
static queryStats: () => HTMLElement | null;
|
|
187
|
-
static queryStatsProperty: (label: string) => globalThis.Element | null;
|
|
188
|
-
}
|
|
189
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { ToolType } from "@excalidraw/excalidraw/types";
|
|
2
|
-
export declare const queryByToolName: import("@testing-library/react").QueryBy<(ToolType | "lock")[]>, getAllByToolName: import("@testing-library/react").GetAllBy<(ToolType | "lock")[]>, getByToolName: import("@testing-library/react").GetBy<(ToolType | "lock")[]>, findAllByToolName: import("@testing-library/react").FindAllBy<(ToolType | "lock")[]>, findByToolName: import("@testing-library/react").FindBy<(ToolType | "lock")[]>;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import "pepjs";
|
|
3
|
-
import { queries, cleanup } from "@testing-library/react";
|
|
4
|
-
import { ORIG_ID } from "@excalidraw/common";
|
|
5
|
-
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
6
|
-
import type { RenderResult, RenderOptions } from "@testing-library/react";
|
|
7
|
-
import type { ImportedDataState } from "../data/types";
|
|
8
|
-
export { cleanup as unmountComponent };
|
|
9
|
-
declare const customQueries: {
|
|
10
|
-
queryByToolName: import("@testing-library/react").QueryBy<(import("../types").ToolType | "lock")[]>;
|
|
11
|
-
getAllByToolName: import("@testing-library/react").GetAllBy<(import("../types").ToolType | "lock")[]>;
|
|
12
|
-
getByToolName: import("@testing-library/react").GetBy<(import("../types").ToolType | "lock")[]>;
|
|
13
|
-
findAllByToolName: import("@testing-library/react").FindAllBy<(import("../types").ToolType | "lock")[]>;
|
|
14
|
-
findByToolName: import("@testing-library/react").FindBy<(import("../types").ToolType | "lock")[]>;
|
|
15
|
-
getByLabelText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T;
|
|
16
|
-
getAllByLabelText<T_1 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T_1[];
|
|
17
|
-
queryByLabelText<T_2 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T_2 | null;
|
|
18
|
-
queryAllByLabelText<T_3 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T_3[];
|
|
19
|
-
findByLabelText<T_4 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_4>;
|
|
20
|
-
findAllByLabelText<T_5 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_5[]>;
|
|
21
|
-
getByPlaceholderText<T_6 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_6;
|
|
22
|
-
getAllByPlaceholderText<T_7 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_7[];
|
|
23
|
-
queryByPlaceholderText<T_8 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_8 | null;
|
|
24
|
-
queryAllByPlaceholderText<T_9 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_9[];
|
|
25
|
-
findByPlaceholderText<T_10 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_10>;
|
|
26
|
-
findAllByPlaceholderText<T_11 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_11[]>;
|
|
27
|
-
getByText<T_12 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T_12;
|
|
28
|
-
getAllByText<T_13 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T_13[];
|
|
29
|
-
queryByText<T_14 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T_14 | null;
|
|
30
|
-
queryAllByText<T_15 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined): T_15[];
|
|
31
|
-
findByText<T_16 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_16>;
|
|
32
|
-
findAllByText<T_17 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_17[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Assertion helper that strips the actual elements of extra attributes
|
|
35
|
-
* so that diffs are easier to read in case of failure.
|
|
36
|
-
*
|
|
37
|
-
* Asserts element order as well, and selected element ids
|
|
38
|
-
* (when `selected: true` set for given element).
|
|
39
|
-
*
|
|
40
|
-
* If testing cloned elements, you can use { `[ORIG_ID]: origElement.id }
|
|
41
|
-
* If you need to refer to cloned element properties, you can use
|
|
42
|
-
* `getCloneByOrigId()`, e.g.: `{ frameId: getCloneByOrigId(origFrame.id)?.id }`
|
|
43
|
-
*/
|
|
44
|
-
getByAltText<T_18 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_18;
|
|
45
|
-
getAllByAltText<T_19 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_19[];
|
|
46
|
-
queryByAltText<T_20 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_20 | null;
|
|
47
|
-
queryAllByAltText<T_21 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_21[];
|
|
48
|
-
findByAltText<T_22 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_22>;
|
|
49
|
-
findAllByAltText<T_23 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_23[]>;
|
|
50
|
-
getByTitle<T_24 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_24;
|
|
51
|
-
getAllByTitle<T_25 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_25[];
|
|
52
|
-
queryByTitle<T_26 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_26 | null;
|
|
53
|
-
queryAllByTitle<T_27 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_27[];
|
|
54
|
-
findByTitle<T_28 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_28>;
|
|
55
|
-
findAllByTitle<T_29 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_29[]>;
|
|
56
|
-
getByDisplayValue<T_30 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_30;
|
|
57
|
-
getAllByDisplayValue<T_31 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_31[];
|
|
58
|
-
queryByDisplayValue<T_32 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_32 | null;
|
|
59
|
-
queryAllByDisplayValue<T_33 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_33[];
|
|
60
|
-
findByDisplayValue<T_34 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_34>;
|
|
61
|
-
findAllByDisplayValue<T_35 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_35[]>;
|
|
62
|
-
getByRole<T_36 extends HTMLElement = HTMLElement>(container: HTMLElement, role: import("@testing-library/react").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T_36;
|
|
63
|
-
getAllByRole<T_37 extends HTMLElement = HTMLElement>(container: HTMLElement, role: import("@testing-library/react").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T_37[];
|
|
64
|
-
queryByRole<T_38 extends HTMLElement = HTMLElement>(container: HTMLElement, role: import("@testing-library/react").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T_38 | null;
|
|
65
|
-
queryAllByRole<T_39 extends HTMLElement = HTMLElement>(container: HTMLElement, role: import("@testing-library/react").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T_39[];
|
|
66
|
-
findByRole<T_40 extends HTMLElement = HTMLElement>(container: HTMLElement, role: import("@testing-library/react").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_40>;
|
|
67
|
-
findAllByRole<T_41 extends HTMLElement = HTMLElement>(container: HTMLElement, role: import("@testing-library/react").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_41[]>;
|
|
68
|
-
getByTestId<T_42 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_42;
|
|
69
|
-
getAllByTestId<T_43 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_43[];
|
|
70
|
-
queryByTestId<T_44 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_44 | null;
|
|
71
|
-
queryAllByTestId<T_45 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined): T_45[];
|
|
72
|
-
findByTestId<T_46 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_46>;
|
|
73
|
-
findAllByTestId<T_47 extends HTMLElement = HTMLElement>(container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined): Promise<T_47[]>;
|
|
74
|
-
};
|
|
75
|
-
type TestRenderFn = (ui: React.ReactElement, options?: Omit<RenderOptions & {
|
|
76
|
-
localStorageData?: ImportedDataState;
|
|
77
|
-
}, "queries">) => Promise<RenderResult<typeof customQueries>>;
|
|
78
|
-
declare const renderApp: TestRenderFn;
|
|
79
|
-
export * from "@testing-library/react";
|
|
80
|
-
export { renderApp as render };
|
|
81
|
-
/**
|
|
82
|
-
* For state-sharing across test helpers.
|
|
83
|
-
* NOTE: there shouldn't be concurrency issues as each test is running in its
|
|
84
|
-
* own process and thus gets its own instance of this module when running
|
|
85
|
-
* tests in parallel.
|
|
86
|
-
*/
|
|
87
|
-
export declare class GlobalTestState {
|
|
88
|
-
/**
|
|
89
|
-
* automatically updated on each call to render()
|
|
90
|
-
*/
|
|
91
|
-
static renderResult: RenderResult<typeof customQueries>;
|
|
92
|
-
/**
|
|
93
|
-
* retrieves static canvas for currently rendered app instance
|
|
94
|
-
*/
|
|
95
|
-
static get canvas(): HTMLCanvasElement;
|
|
96
|
-
/**
|
|
97
|
-
* retrieves interactive canvas for currently rendered app instance
|
|
98
|
-
*/
|
|
99
|
-
static get interactiveCanvas(): HTMLCanvasElement;
|
|
100
|
-
}
|
|
101
|
-
export declare const mockBoundingClientRect: ({ top, left, bottom, right, width, height, x, y, toJSON, }?: {
|
|
102
|
-
top?: number;
|
|
103
|
-
left?: number;
|
|
104
|
-
bottom?: number;
|
|
105
|
-
right?: number;
|
|
106
|
-
width?: number;
|
|
107
|
-
x?: number;
|
|
108
|
-
y?: number;
|
|
109
|
-
height?: number;
|
|
110
|
-
toJSON?: (() => void) | undefined;
|
|
111
|
-
}) => void;
|
|
112
|
-
export declare const withExcalidrawDimensions: (dimensions: {
|
|
113
|
-
width: number;
|
|
114
|
-
height: number;
|
|
115
|
-
}, cb: () => void) => Promise<void>;
|
|
116
|
-
export declare const restoreOriginalGetBoundingClientRect: () => void;
|
|
117
|
-
export declare const assertSelectedElements: (...elements: ((ExcalidrawElement["id"] | ExcalidrawElement)[] | ExcalidrawElement["id"] | ExcalidrawElement)[]) => void;
|
|
118
|
-
export declare const toggleMenu: (container: HTMLElement) => void;
|
|
119
|
-
export declare const togglePopover: (label: string) => void;
|
|
120
|
-
export declare const getCloneByOrigId: <T extends boolean = false>(origId: ExcalidrawElement["id"], returnNullIfNotExists?: T) => T extends true ? ExcalidrawElement | null : ExcalidrawElement;
|
|
121
|
-
/**
|
|
122
|
-
* Assertion helper that strips the actual elements of extra attributes
|
|
123
|
-
* so that diffs are easier to read in case of failure.
|
|
124
|
-
*
|
|
125
|
-
* Asserts element order as well, and selected element ids
|
|
126
|
-
* (when `selected: true` set for given element).
|
|
127
|
-
*
|
|
128
|
-
* If testing cloned elements, you can use { `[ORIG_ID]: origElement.id }
|
|
129
|
-
* If you need to refer to cloned element properties, you can use
|
|
130
|
-
* `getCloneByOrigId()`, e.g.: `{ frameId: getCloneByOrigId(origFrame.id)?.id }`
|
|
131
|
-
*/
|
|
132
|
-
export declare const assertElements: <T extends "link" | "x" | "y" | "angle" | "id" | "strokeColor" | "backgroundColor" | "fillStyle" | "strokeWidth" | "strokeStyle" | "roundness" | "roughness" | "opacity" | "width" | "height" | "seed" | "version" | "versionNonce" | "index" | "isDeleted" | "groupIds" | "frameId" | "boundElements" | "updated" | "locked" | "customData" | "type" | "fileId" | "status" | "scale" | "crop" | "fontSize" | "fontFamily" | "text" | "textAlign" | "verticalAlign" | "containerId" | "originalText" | "autoResize" | "lineHeight" | "points" | "lastCommittedPoint" | "startBinding" | "endBinding" | "startArrowhead" | "endArrowhead" | "elbowed" | "pressures" | "simulatePressure" | "name">(actualElements: readonly ExcalidrawElement[], expectedElements: (Partial<Record<T, any>> & {
|
|
133
|
-
/** meta, will be stripped for element attribute checks */
|
|
134
|
-
selected?: true | undefined;
|
|
135
|
-
} & ({
|
|
136
|
-
id: ExcalidrawElement["id"];
|
|
137
|
-
} | {
|
|
138
|
-
[ORIG_ID]?: string | undefined;
|
|
139
|
-
}))[]) => void;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
-
import type { Curve } from "@excalidraw/math";
|
|
3
|
-
import type { LineSegment } from "@excalidraw/utils";
|
|
4
|
-
import type { Bounds } from "@excalidraw/element/bounds";
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
visualDebug?: {
|
|
8
|
-
data: DebugElement[][];
|
|
9
|
-
currentFrame?: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export type DebugElement = {
|
|
14
|
-
color: string;
|
|
15
|
-
data: LineSegment<GlobalPoint> | Curve<GlobalPoint>;
|
|
16
|
-
permanent: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare const debugDrawCubicBezier: (c: Curve<GlobalPoint>, opts?: {
|
|
19
|
-
color?: string;
|
|
20
|
-
permanent?: boolean;
|
|
21
|
-
}) => void;
|
|
22
|
-
export declare const debugDrawLine: (segment: LineSegment<GlobalPoint> | LineSegment<GlobalPoint>[], opts?: {
|
|
23
|
-
color?: string;
|
|
24
|
-
permanent?: boolean;
|
|
25
|
-
}) => void;
|
|
26
|
-
export declare const debugDrawPoint: (p: GlobalPoint, opts?: {
|
|
27
|
-
color?: string;
|
|
28
|
-
permanent?: boolean;
|
|
29
|
-
fuzzy?: boolean;
|
|
30
|
-
}) => void;
|
|
31
|
-
export declare const debugDrawBounds: (box: Bounds | Bounds[], opts?: {
|
|
32
|
-
color?: string;
|
|
33
|
-
permanent?: boolean;
|
|
34
|
-
}) => void;
|
|
35
|
-
export declare const debugDrawPoints: ({ x, y, points, }: {
|
|
36
|
-
x: number;
|
|
37
|
-
y: number;
|
|
38
|
-
points: LocalPoint[];
|
|
39
|
-
}, options?: any) => void;
|
|
40
|
-
export declare const debugCloseFrame: () => void;
|
|
41
|
-
export declare const debugClear: () => void;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { Curve, GlobalPoint, LineSegment, LocalPoint } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param a
|
|
5
|
-
* @param b
|
|
6
|
-
* @param c
|
|
7
|
-
* @param d
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare function curve<Point extends GlobalPoint | LocalPoint>(a: Point, b: Point, c: Point, d: Point): Curve<Point>;
|
|
11
|
-
/**
|
|
12
|
-
* Computes the intersection between a cubic spline and a line segment.
|
|
13
|
-
*/
|
|
14
|
-
export declare function curveIntersectLineSegment<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, l: LineSegment<Point>): Point[];
|
|
15
|
-
/**
|
|
16
|
-
* Finds the closest point on the Bezier curve from another point
|
|
17
|
-
*
|
|
18
|
-
* @param x
|
|
19
|
-
* @param y
|
|
20
|
-
* @param P0
|
|
21
|
-
* @param P1
|
|
22
|
-
* @param P2
|
|
23
|
-
* @param P3
|
|
24
|
-
* @param tolerance
|
|
25
|
-
* @param maxLevel
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
export declare function curveClosestPoint<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, p: Point, tolerance?: number): Point | null;
|
|
29
|
-
/**
|
|
30
|
-
* Determines the distance between a point and the closest point on the
|
|
31
|
-
* Bezier curve.
|
|
32
|
-
*
|
|
33
|
-
* @param c The curve to test
|
|
34
|
-
* @param p The point to measure from
|
|
35
|
-
*/
|
|
36
|
-
export declare function curvePointDistance<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, p: Point): number;
|
|
37
|
-
/**
|
|
38
|
-
* Determines if the parameter is a Curve
|
|
39
|
-
*/
|
|
40
|
-
export declare function isCurve<P extends GlobalPoint | LocalPoint>(v: unknown): v is Curve<P>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type GlobalPoint, type LocalPoint, type Polygon } from "@excalidraw/math";
|
|
2
|
-
import type { Curve } from "@excalidraw/math";
|
|
3
|
-
import type { Polyline, GeometricShape } from "./shape";
|
|
4
|
-
export declare const isPointOnShape: <Point extends GlobalPoint | LocalPoint>(point: Point, shape: GeometricShape<Point>, tolerance?: number) => boolean;
|
|
5
|
-
export declare const isPointInShape: <Point extends GlobalPoint | LocalPoint>(point: Point, shape: GeometricShape<Point>) => boolean;
|
|
6
|
-
export declare const isPointInBounds: <Point extends GlobalPoint | LocalPoint>(point: Point, bounds: Polygon<Point>) => boolean;
|
|
7
|
-
export declare const pointOnCurve: <Point extends GlobalPoint | LocalPoint>(point: Point, curve: Curve<Point>, threshold: number) => boolean;
|
|
8
|
-
export declare const pointOnPolyline: <Point extends GlobalPoint | LocalPoint>(point: Point, polyline: Polyline<Point>, threshold?: number) => boolean;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/actions/actionDuplicateSelection.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/components/BraveMeasureTextError.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/components/ColorPicker/PickerHeading.d.ts
RENAMED
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/components/CommandPalette/CommandPalette.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/components/FollowMode/FollowMode.d.ts
RENAMED
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/components/FontPicker/FontPicker.d.ts
RENAMED
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/components/FontPicker/FontPickerList.d.ts
RENAMED
|
File without changes
|
/package/dist/types/{packages/excalidraw → excalidraw}/components/FontPicker/FontPickerTrigger.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|