@excalidraw/excalidraw 0.18.0-b7aac689a → 0.18.0-c141960
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-QF5FRM6O.js → chunk-AWYOLLYX.js} +49 -26
- package/dist/dev/chunk-AWYOLLYX.js.map +7 -0
- package/dist/dev/chunk-PMQWN2AA.js +69 -0
- package/dist/dev/chunk-PMQWN2AA.js.map +7 -0
- package/dist/dev/{chunk-CBGOW5JB.js → chunk-SJTAY27F.js} +185 -389
- package/dist/dev/chunk-SJTAY27F.js.map +7 -0
- package/dist/dev/data/{image-SURZSZNX.js → image-S2GFZH7W.js} +2 -2
- package/dist/dev/index.css +944 -498
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +10424 -7221
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{ar-SA-XORAP2EK.js → ar-SA-USQAA427.js} +299 -142
- package/dist/dev/locales/ar-SA-USQAA427.js.map +7 -0
- package/dist/dev/locales/{az-AZ-NAUU3Z4Y.js → az-AZ-CVQRXULV.js} +240 -83
- package/dist/dev/locales/az-AZ-CVQRXULV.js.map +7 -0
- package/dist/dev/locales/{bg-BG-AAABLFCY.js → bg-BG-E4I2JVOQ.js} +228 -71
- package/dist/dev/locales/bg-BG-E4I2JVOQ.js.map +7 -0
- package/dist/dev/locales/{bn-BD-PM4AC5WG.js → bn-BD-O55ROP2R.js} +208 -51
- package/dist/dev/locales/bn-BD-O55ROP2R.js.map +7 -0
- package/dist/dev/locales/bn-IN-OL7OUKTP.js +743 -0
- package/dist/dev/locales/bn-IN-OL7OUKTP.js.map +7 -0
- package/dist/dev/locales/{ca-ES-YNNMFRQX.js → ca-ES-73KY52DM.js} +274 -117
- package/dist/dev/locales/ca-ES-73KY52DM.js.map +7 -0
- package/dist/dev/locales/{cs-CZ-DGZA5IKG.js → cs-CZ-2YGHPQ24.js} +228 -71
- package/dist/dev/locales/cs-CZ-2YGHPQ24.js.map +7 -0
- package/dist/dev/locales/{da-DK-N76F4QAJ.js → da-DK-OEIZIPJU.js} +297 -140
- package/dist/dev/locales/da-DK-OEIZIPJU.js.map +7 -0
- package/dist/dev/locales/de-CH-4GJTW23D.js +743 -0
- package/dist/dev/locales/de-CH-4GJTW23D.js.map +7 -0
- package/dist/dev/locales/{de-DE-DMRXZ2SZ.js → de-DE-YRH6WMM5.js} +198 -41
- package/dist/dev/locales/de-DE-YRH6WMM5.js.map +7 -0
- package/dist/dev/locales/{el-GR-HIKPLEXI.js → el-GR-W7S64QNM.js} +273 -116
- package/dist/dev/locales/el-GR-W7S64QNM.js.map +7 -0
- package/dist/dev/locales/{en-SMAPCEOQ.js → en-ZO6QSABV.js} +4 -2
- package/dist/dev/locales/{es-ES-AQYVXC32.js → es-ES-7JEN5PTZ.js} +211 -54
- package/dist/dev/locales/es-ES-7JEN5PTZ.js.map +7 -0
- package/dist/dev/locales/{eu-ES-3TOEU5DE.js → eu-ES-HQNHU6VR.js} +209 -52
- package/dist/dev/locales/eu-ES-HQNHU6VR.js.map +7 -0
- package/dist/dev/locales/{fa-IR-527GAKUP.js → fa-IR-IN6XOPA6.js} +285 -128
- package/dist/dev/locales/fa-IR-IN6XOPA6.js.map +7 -0
- package/dist/dev/locales/{fi-FI-M3WLVDFP.js → fi-FI-5BAAYJDZ.js} +239 -82
- package/dist/dev/locales/fi-FI-5BAAYJDZ.js.map +7 -0
- package/dist/dev/locales/{fr-FR-YE4VDJFI.js → fr-FR-KCXBY2R4.js} +202 -45
- package/dist/dev/locales/fr-FR-KCXBY2R4.js.map +7 -0
- package/dist/dev/locales/{gl-ES-KMXUYGUN.js → gl-ES-5OPGWS6N.js} +211 -54
- package/dist/dev/locales/gl-ES-5OPGWS6N.js.map +7 -0
- package/dist/dev/locales/he-IL-3A6ZWK6L.js +743 -0
- package/dist/dev/locales/he-IL-3A6ZWK6L.js.map +7 -0
- package/dist/dev/locales/hi-IN-HZTBH6EG.js +743 -0
- package/dist/dev/locales/hi-IN-HZTBH6EG.js.map +7 -0
- package/dist/dev/locales/{hu-HU-VIYZI3X4.js → hu-HU-52IRZEAZ.js} +237 -80
- package/dist/dev/locales/hu-HU-52IRZEAZ.js.map +7 -0
- package/dist/dev/locales/{id-ID-22TWZNLA.js → id-ID-W6HBGXTS.js} +244 -87
- package/dist/dev/locales/id-ID-W6HBGXTS.js.map +7 -0
- package/dist/dev/locales/{it-IT-MDEQ2SG3.js → it-IT-AV75ICYT.js} +201 -44
- package/dist/dev/locales/it-IT-AV75ICYT.js.map +7 -0
- package/dist/dev/locales/{ja-JP-K2DI4W6B.js → ja-JP-SS4G3ZXF.js} +246 -89
- package/dist/dev/locales/ja-JP-SS4G3ZXF.js.map +7 -0
- package/dist/dev/locales/{kaa-6BPSNM3R.js → kaa-Y5BBB3IW.js} +201 -44
- package/dist/dev/locales/kaa-Y5BBB3IW.js.map +7 -0
- package/dist/dev/locales/{kab-KAB-2S7ZURK7.js → kab-KAB-KDVZQXBT.js} +209 -52
- package/dist/dev/locales/kab-KAB-KDVZQXBT.js.map +7 -0
- package/dist/dev/locales/{kk-KZ-UJPYGRQQ.js → kk-KZ-762YODLJ.js} +174 -17
- package/dist/dev/locales/kk-KZ-762YODLJ.js.map +7 -0
- package/dist/dev/locales/{km-KH-M5T5JKUE.js → km-KH-K2TE5MIK.js} +197 -40
- package/dist/dev/locales/km-KH-K2TE5MIK.js.map +7 -0
- package/dist/dev/locales/{ko-KR-RQX37SNF.js → ko-KR-75RUMBCO.js} +217 -60
- package/dist/dev/locales/ko-KR-75RUMBCO.js.map +7 -0
- package/dist/dev/locales/{ku-TR-5XJDIERL.js → ku-TR-E6DJ6LYM.js} +197 -40
- package/dist/dev/locales/ku-TR-E6DJ6LYM.js.map +7 -0
- package/dist/dev/locales/{lt-LT-MGUBX6CA.js → lt-LT-BYS5DA45.js} +178 -21
- package/dist/dev/locales/lt-LT-BYS5DA45.js.map +7 -0
- package/dist/dev/locales/{lv-LV-MD7N5VHD.js → lv-LV-SPQ2VWX3.js} +195 -38
- package/dist/dev/locales/lv-LV-SPQ2VWX3.js.map +7 -0
- package/dist/dev/locales/{mr-IN-4XWMNGQC.js → mr-IN-2HLK6LUA.js} +203 -46
- package/dist/dev/locales/mr-IN-2HLK6LUA.js.map +7 -0
- package/dist/dev/locales/{my-MM-O4Z74GN5.js → my-MM-P2LR44WR.js} +180 -23
- package/dist/dev/locales/my-MM-P2LR44WR.js.map +7 -0
- package/dist/dev/locales/{nb-NO-BMB73KRH.js → nb-NO-7YZHFFVS.js} +219 -62
- package/dist/dev/locales/nb-NO-7YZHFFVS.js.map +7 -0
- package/dist/dev/locales/{nl-NL-F2257BLQ.js → nl-NL-TF2OVIKN.js} +217 -60
- package/dist/dev/locales/nl-NL-TF2OVIKN.js.map +7 -0
- package/dist/dev/locales/{nn-NO-NCORG7TS.js → nn-NO-2BWEL2IS.js} +200 -43
- package/dist/dev/locales/nn-NO-2BWEL2IS.js.map +7 -0
- package/dist/dev/locales/{oc-FR-ATFBDMF6.js → oc-FR-5JYIFGLE.js} +212 -55
- package/dist/dev/locales/oc-FR-5JYIFGLE.js.map +7 -0
- package/dist/dev/locales/{pa-IN-D2I375G4.js → pa-IN-KBBGER76.js} +189 -32
- package/dist/dev/locales/pa-IN-KBBGER76.js.map +7 -0
- package/dist/dev/locales/{percentages-YKFLWNK2.js → percentages-2RAYDWNS.js} +2 -2
- package/dist/dev/locales/{pl-PL-YJHOWAAW.js → pl-PL-BWZ2X734.js} +213 -56
- package/dist/dev/locales/pl-PL-BWZ2X734.js.map +7 -0
- package/dist/dev/locales/{pt-BR-APOPYZJ7.js → pt-BR-ERVIQI63.js} +236 -79
- package/dist/dev/locales/pt-BR-ERVIQI63.js.map +7 -0
- package/dist/dev/locales/pt-PT-ZNJ5NB5S.js +743 -0
- package/dist/dev/locales/pt-PT-ZNJ5NB5S.js.map +7 -0
- package/dist/dev/locales/{ro-RO-L575VRQA.js → ro-RO-UYNXGUB7.js} +202 -45
- package/dist/dev/locales/ro-RO-UYNXGUB7.js.map +7 -0
- package/dist/dev/locales/{ru-RU-BLG6HZG5.js → ru-RU-F7LPIMGQ.js} +252 -95
- package/dist/dev/locales/ru-RU-F7LPIMGQ.js.map +7 -0
- package/dist/dev/locales/si-LK-5GF2DJUH.js +743 -0
- package/dist/dev/locales/si-LK-5GF2DJUH.js.map +7 -0
- package/dist/dev/locales/{sk-SK-DY6IPO5U.js → sk-SK-H6WE7IJX.js} +199 -42
- package/dist/dev/locales/sk-SK-H6WE7IJX.js.map +7 -0
- package/dist/dev/locales/{sl-SI-5DZSRA47.js → sl-SI-4PJ6LBI7.js} +196 -39
- package/dist/dev/locales/sl-SI-4PJ6LBI7.js.map +7 -0
- package/dist/dev/locales/{sv-SE-V32YHALQ.js → sv-SE-E5VQLCRE.js} +201 -44
- package/dist/dev/locales/sv-SE-E5VQLCRE.js.map +7 -0
- package/dist/dev/locales/{ta-IN-5JRAGQAO.js → ta-IN-2YWIVLKF.js} +256 -99
- package/dist/dev/locales/ta-IN-2YWIVLKF.js.map +7 -0
- package/dist/dev/locales/{th-TH-55ACRHDJ.js → th-TH-IV7RUTDK.js} +288 -131
- package/dist/dev/locales/th-TH-IV7RUTDK.js.map +7 -0
- package/dist/dev/locales/{tr-TR-7QYBXDBO.js → tr-TR-LEQWIQH7.js} +256 -99
- package/dist/dev/locales/tr-TR-LEQWIQH7.js.map +7 -0
- package/dist/dev/locales/{uk-UA-TJS2TMRH.js → uk-UA-DWVOQPTB.js} +228 -71
- package/dist/dev/locales/uk-UA-DWVOQPTB.js.map +7 -0
- package/dist/dev/locales/{si-LK-KT7GGO6D.js → uz-UZ-CKXQ3QKG.js} +211 -54
- package/dist/dev/locales/uz-UZ-CKXQ3QKG.js.map +7 -0
- package/dist/dev/locales/vi-VN-3P6DZOGS.js +743 -0
- package/dist/dev/locales/vi-VN-3P6DZOGS.js.map +7 -0
- package/dist/dev/locales/{zh-CN-4MXUOFTH.js → zh-CN-XXVG53TQ.js} +198 -41
- package/dist/dev/locales/zh-CN-XXVG53TQ.js.map +7 -0
- package/dist/dev/locales/{zh-HK-RBTGIU3U.js → zh-HK-JCHGKEUE.js} +174 -17
- package/dist/dev/locales/zh-HK-JCHGKEUE.js.map +7 -0
- package/dist/dev/locales/{zh-TW-U5VF4CCU.js → zh-TW-ARVT7RZU.js} +203 -46
- package/dist/dev/locales/zh-TW-ARVT7RZU.js.map +7 -0
- package/dist/prod/chunk-KRJFZ5JQ.js +1 -0
- package/dist/prod/chunk-N7QNUCIG.js +12 -0
- package/dist/prod/chunk-XJNFOLHK.js +4 -0
- package/dist/prod/data/{image-HXEZYJPQ.js → image-SMWA6JLH.js} +1 -1
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +23 -23
- package/dist/prod/locales/ar-SA-F62BVQMB.js +8 -0
- package/dist/prod/locales/az-AZ-7PGSKYOB.js +1 -0
- package/dist/prod/locales/bg-BG-AAEXMUQ4.js +5 -0
- package/dist/prod/locales/bn-BD-ONOFQYIQ.js +3 -0
- package/dist/prod/locales/bn-IN-YT3I2M3F.js +3 -0
- package/dist/prod/locales/ca-ES-GG4YH2FN.js +8 -0
- package/dist/prod/locales/cs-CZ-IS5VTBOP.js +7 -0
- package/dist/prod/locales/da-DK-VPQ2KWAY.js +2 -0
- package/dist/prod/locales/de-CH-G4Y2G6IS.js +7 -0
- package/dist/prod/locales/de-DE-RAT2LIDI.js +7 -0
- package/dist/prod/locales/el-GR-DNJB2AZO.js +7 -0
- package/dist/prod/locales/en-FOCNVEEU.js +1 -0
- package/dist/prod/locales/es-ES-IMTENLBU.js +7 -0
- package/dist/prod/locales/eu-ES-XLOS36YS.js +7 -0
- package/dist/prod/locales/fa-IR-J6Z2YOGX.js +9 -0
- package/dist/prod/locales/fi-FI-B2IQ7SBP.js +6 -0
- package/dist/prod/locales/fr-FR-N5BRDCMI.js +12 -0
- package/dist/prod/locales/gl-ES-BOYALFRN.js +6 -0
- package/dist/prod/locales/he-IL-H7M7HGY5.js +8 -0
- package/dist/prod/locales/hi-IN-7AB5CA2Q.js +3 -0
- package/dist/prod/locales/hu-HU-ZZM7UJLP.js +3 -0
- package/dist/prod/locales/id-ID-RZ7JNCXA.js +8 -0
- package/dist/prod/locales/it-IT-ZX7HN56D.js +8 -0
- package/dist/prod/locales/ja-JP-NBNBUHIR.js +7 -0
- package/dist/prod/locales/kaa-QWYSGEM7.js +1 -0
- package/dist/prod/locales/kab-KAB-Q3HBKQ5I.js +4 -0
- package/dist/prod/locales/kk-KZ-HF2NTCRX.js +1 -0
- package/dist/prod/locales/km-KH-CN6HHF5U.js +7 -0
- package/dist/prod/locales/ko-KR-SJQMUXM7.js +5 -0
- package/dist/prod/locales/ku-TR-VM4BHTPC.js +6 -0
- package/dist/prod/locales/lt-LT-QIWZQ7AG.js +3 -0
- package/dist/prod/locales/lv-LV-YQFCB4WZ.js +4 -0
- package/dist/prod/locales/mr-IN-GR2ZJPSQ.js +9 -0
- package/dist/prod/locales/my-MM-M5XJDJQ2.js +1 -0
- package/dist/prod/locales/nb-NO-2RU2YF7H.js +8 -0
- package/dist/prod/locales/nl-NL-MUHXDQFK.js +7 -0
- package/dist/prod/locales/nn-NO-72RCA552.js +4 -0
- package/dist/prod/locales/oc-FR-65ITQYQ2.js +4 -0
- package/dist/prod/locales/pa-IN-WESENMFH.js +4 -0
- package/dist/prod/locales/percentages-OEPNEGCM.js +1 -0
- package/dist/prod/locales/pl-PL-7C4NGVUA.js +12 -0
- package/dist/prod/locales/pt-BR-QH23C2IX.js +6 -0
- package/dist/prod/locales/pt-PT-O5XBATXI.js +8 -0
- package/dist/prod/locales/ro-RO-QHCHEGM5.js +12 -0
- package/dist/prod/locales/ru-RU-FUMQ2LLB.js +6 -0
- package/dist/prod/locales/si-LK-JYUINGNN.js +1 -0
- package/dist/prod/locales/sk-SK-R25O52BS.js +7 -0
- package/dist/prod/locales/sl-SI-5KPVX4FS.js +6 -0
- package/dist/prod/locales/sv-SE-MVMXV6O4.js +8 -0
- package/dist/prod/locales/ta-IN-A32FQB4D.js +6 -0
- package/dist/prod/locales/th-TH-CXMWNVBY.js +1 -0
- package/dist/prod/locales/tr-TR-YHFI3W2D.js +4 -0
- package/dist/prod/locales/uk-UA-UTJIIKT5.js +6 -0
- package/dist/prod/locales/uz-UZ-H4EGTR7D.js +1 -0
- package/dist/prod/locales/vi-VN-XBV2ESZM.js +7 -0
- package/dist/prod/locales/zh-CN-CKCJ4HAO.js +11 -0
- package/dist/prod/locales/zh-HK-ISASRRMF.js +1 -0
- package/dist/prod/locales/zh-TW-KYRW5V3R.js +9 -0
- package/dist/types/common/src/constants.d.ts +21 -15
- package/dist/types/common/src/editorInterface.d.ts +34 -0
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/utils.d.ts +9 -3
- package/dist/types/common/src/visualdebug.d.ts +41 -0
- package/dist/types/element/src/Scene.d.ts +6 -2
- package/dist/types/element/src/align.d.ts +2 -1
- package/dist/types/element/src/binding.d.ts +55 -43
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/collision.d.ts +6 -2
- package/dist/types/element/src/delta.d.ts +16 -4
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/groups.d.ts +1 -0
- package/dist/types/element/src/index.d.ts +1 -3
- package/dist/types/element/src/linearElementEditor.d.ts +17 -19
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +5 -2
- package/dist/types/element/src/resizeTest.d.ts +5 -4
- package/dist/types/element/src/store.d.ts +6 -1
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/transformHandles.d.ts +5 -4
- package/dist/types/element/src/typeChecks.d.ts +2 -3
- package/dist/types/element/src/types.d.ts +7 -11
- package/dist/types/element/src/utils.d.ts +2 -1
- package/dist/types/element/src/zindex.d.ts +7 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +34 -16
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +25 -13
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +153 -275
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +45 -777
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +45 -29
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +11 -7
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +23 -11
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionExport.d.ts +68 -952
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
- package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +50 -28
- package/dist/types/excalidraw/actions/actionGroup.d.ts +24 -12
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +47 -14
- package/dist/types/excalidraw/actions/actionLink.d.ts +9 -3
- package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -374
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +21 -361
- package/dist/types/excalidraw/actions/actionProperties.d.ts +87 -2418
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -7
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -6
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/index.d.ts +2 -2
- package/dist/types/excalidraw/actions/manager.d.ts +1 -1
- package/dist/types/excalidraw/actions/register.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +4 -4
- package/dist/types/excalidraw/appState.d.ts +9 -4
- package/dist/types/excalidraw/clipboard.d.ts +64 -1
- package/dist/types/excalidraw/components/Actions.d.ts +20 -7
- package/dist/types/excalidraw/components/App.d.ts +35 -25
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
- package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
- package/dist/types/excalidraw/components/FilledButton.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
- package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
- package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/LinkButton.d.ts +4 -0
- package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
- package/dist/types/excalidraw/components/Popover.d.ts +2 -1
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
- package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +10 -0
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +13 -1
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
- package/dist/types/excalidraw/components/shapes.d.ts +129 -1
- package/dist/types/excalidraw/data/blob.d.ts +3 -7
- package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
- package/dist/types/excalidraw/data/restore.d.ts +7 -2
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +3 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/index.d.ts +4 -4
- package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +1 -5
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +5 -13
- package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/dist/types/excalidraw/scene/types.d.ts +15 -3
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +37 -24
- package/dist/types/math/src/segment.d.ts +1 -0
- package/history.ts +1 -1
- package/package.json +6 -6
- package/dist/dev/chunk-CBGOW5JB.js.map +0 -7
- package/dist/dev/chunk-MFAYKRVR.js +0 -66
- package/dist/dev/chunk-MFAYKRVR.js.map +0 -7
- package/dist/dev/chunk-QF5FRM6O.js.map +0 -7
- package/dist/dev/locales/ar-SA-XORAP2EK.js.map +0 -7
- package/dist/dev/locales/az-AZ-NAUU3Z4Y.js.map +0 -7
- package/dist/dev/locales/bg-BG-AAABLFCY.js.map +0 -7
- package/dist/dev/locales/bn-BD-PM4AC5WG.js.map +0 -7
- package/dist/dev/locales/ca-ES-YNNMFRQX.js.map +0 -7
- package/dist/dev/locales/cs-CZ-DGZA5IKG.js.map +0 -7
- package/dist/dev/locales/da-DK-N76F4QAJ.js.map +0 -7
- package/dist/dev/locales/de-DE-DMRXZ2SZ.js.map +0 -7
- package/dist/dev/locales/el-GR-HIKPLEXI.js.map +0 -7
- package/dist/dev/locales/es-ES-AQYVXC32.js.map +0 -7
- package/dist/dev/locales/eu-ES-3TOEU5DE.js.map +0 -7
- package/dist/dev/locales/fa-IR-527GAKUP.js.map +0 -7
- package/dist/dev/locales/fi-FI-M3WLVDFP.js.map +0 -7
- package/dist/dev/locales/fr-FR-YE4VDJFI.js.map +0 -7
- package/dist/dev/locales/gl-ES-KMXUYGUN.js.map +0 -7
- package/dist/dev/locales/he-IL-4MU5N22B.js +0 -586
- package/dist/dev/locales/he-IL-4MU5N22B.js.map +0 -7
- package/dist/dev/locales/hi-IN-ZHZNZWFC.js +0 -586
- package/dist/dev/locales/hi-IN-ZHZNZWFC.js.map +0 -7
- package/dist/dev/locales/hu-HU-VIYZI3X4.js.map +0 -7
- package/dist/dev/locales/id-ID-22TWZNLA.js.map +0 -7
- package/dist/dev/locales/it-IT-MDEQ2SG3.js.map +0 -7
- package/dist/dev/locales/ja-JP-K2DI4W6B.js.map +0 -7
- package/dist/dev/locales/kaa-6BPSNM3R.js.map +0 -7
- package/dist/dev/locales/kab-KAB-2S7ZURK7.js.map +0 -7
- package/dist/dev/locales/kk-KZ-UJPYGRQQ.js.map +0 -7
- package/dist/dev/locales/km-KH-M5T5JKUE.js.map +0 -7
- package/dist/dev/locales/ko-KR-RQX37SNF.js.map +0 -7
- package/dist/dev/locales/ku-TR-5XJDIERL.js.map +0 -7
- package/dist/dev/locales/lt-LT-MGUBX6CA.js.map +0 -7
- package/dist/dev/locales/lv-LV-MD7N5VHD.js.map +0 -7
- package/dist/dev/locales/mr-IN-4XWMNGQC.js.map +0 -7
- package/dist/dev/locales/my-MM-O4Z74GN5.js.map +0 -7
- package/dist/dev/locales/nb-NO-BMB73KRH.js.map +0 -7
- package/dist/dev/locales/nl-NL-F2257BLQ.js.map +0 -7
- package/dist/dev/locales/nn-NO-NCORG7TS.js.map +0 -7
- package/dist/dev/locales/oc-FR-ATFBDMF6.js.map +0 -7
- package/dist/dev/locales/pa-IN-D2I375G4.js.map +0 -7
- package/dist/dev/locales/pl-PL-YJHOWAAW.js.map +0 -7
- package/dist/dev/locales/pt-BR-APOPYZJ7.js.map +0 -7
- package/dist/dev/locales/pt-PT-W56WCN7P.js +0 -586
- package/dist/dev/locales/pt-PT-W56WCN7P.js.map +0 -7
- package/dist/dev/locales/ro-RO-L575VRQA.js.map +0 -7
- package/dist/dev/locales/ru-RU-BLG6HZG5.js.map +0 -7
- package/dist/dev/locales/si-LK-KT7GGO6D.js.map +0 -7
- package/dist/dev/locales/sk-SK-DY6IPO5U.js.map +0 -7
- package/dist/dev/locales/sl-SI-5DZSRA47.js.map +0 -7
- package/dist/dev/locales/sv-SE-V32YHALQ.js.map +0 -7
- package/dist/dev/locales/ta-IN-5JRAGQAO.js.map +0 -7
- package/dist/dev/locales/th-TH-55ACRHDJ.js.map +0 -7
- package/dist/dev/locales/tr-TR-7QYBXDBO.js.map +0 -7
- package/dist/dev/locales/uk-UA-TJS2TMRH.js.map +0 -7
- package/dist/dev/locales/vi-VN-Y5CQ2EKQ.js +0 -586
- package/dist/dev/locales/vi-VN-Y5CQ2EKQ.js.map +0 -7
- package/dist/dev/locales/zh-CN-4MXUOFTH.js.map +0 -7
- package/dist/dev/locales/zh-HK-RBTGIU3U.js.map +0 -7
- package/dist/dev/locales/zh-TW-U5VF4CCU.js.map +0 -7
- package/dist/prod/chunk-I4UNSFV6.js +0 -12
- package/dist/prod/chunk-IRHK23LL.js +0 -4
- package/dist/prod/chunk-Z3N5DIM6.js +0 -1
- package/dist/prod/locales/ar-SA-G6X2FPQ2.js +0 -10
- package/dist/prod/locales/az-AZ-76LH7QW2.js +0 -1
- package/dist/prod/locales/bg-BG-XCXSNQG7.js +0 -5
- package/dist/prod/locales/bn-BD-2XOGV67Q.js +0 -5
- package/dist/prod/locales/ca-ES-6MX7JW3Y.js +0 -8
- package/dist/prod/locales/cs-CZ-2BRQDIVT.js +0 -11
- package/dist/prod/locales/da-DK-5WZEPLOC.js +0 -5
- package/dist/prod/locales/de-DE-XR44H4JA.js +0 -8
- package/dist/prod/locales/el-GR-BZB4AONW.js +0 -10
- package/dist/prod/locales/en-TYY6KWIJ.js +0 -1
- package/dist/prod/locales/es-ES-U4NZUMDT.js +0 -9
- package/dist/prod/locales/eu-ES-A7QVB2H4.js +0 -11
- package/dist/prod/locales/fa-IR-HGAKTJCU.js +0 -8
- package/dist/prod/locales/fi-FI-Z5N7JZ37.js +0 -6
- package/dist/prod/locales/fr-FR-RHASNOE6.js +0 -9
- package/dist/prod/locales/gl-ES-HMX3MZ6V.js +0 -10
- package/dist/prod/locales/he-IL-6SHJWFNN.js +0 -10
- package/dist/prod/locales/hi-IN-IWLTKZ5I.js +0 -4
- package/dist/prod/locales/hu-HU-A5ZG7DT2.js +0 -7
- package/dist/prod/locales/id-ID-SAP4L64H.js +0 -10
- package/dist/prod/locales/it-IT-JPQ66NNP.js +0 -11
- package/dist/prod/locales/ja-JP-DBVTYXUO.js +0 -8
- package/dist/prod/locales/kaa-6HZHGXH3.js +0 -1
- package/dist/prod/locales/kab-KAB-ZGHBKWFO.js +0 -8
- package/dist/prod/locales/kk-KZ-P5N5QNE5.js +0 -1
- package/dist/prod/locales/km-KH-HSX4SM5Z.js +0 -11
- package/dist/prod/locales/ko-KR-MTYHY66A.js +0 -9
- package/dist/prod/locales/ku-TR-6OUDTVRD.js +0 -9
- package/dist/prod/locales/lt-LT-XHIRWOB4.js +0 -3
- package/dist/prod/locales/lv-LV-5QDEKY6T.js +0 -7
- package/dist/prod/locales/mr-IN-CRQNXWMA.js +0 -13
- package/dist/prod/locales/my-MM-5M5IBNSE.js +0 -1
- package/dist/prod/locales/nb-NO-T6EIAALU.js +0 -10
- package/dist/prod/locales/nl-NL-IS3SIHDZ.js +0 -8
- package/dist/prod/locales/nn-NO-6E72VCQL.js +0 -8
- package/dist/prod/locales/oc-FR-POXYY2M6.js +0 -8
- package/dist/prod/locales/pa-IN-N4M65BXN.js +0 -4
- package/dist/prod/locales/percentages-BXMCSKIN.js +0 -1
- package/dist/prod/locales/pl-PL-T2D74RX3.js +0 -9
- package/dist/prod/locales/pt-BR-5N22H2LF.js +0 -9
- package/dist/prod/locales/pt-PT-UZXXM6DQ.js +0 -9
- package/dist/prod/locales/ro-RO-JPDTUUEW.js +0 -11
- package/dist/prod/locales/ru-RU-B4JR7IUQ.js +0 -9
- package/dist/prod/locales/si-LK-N5RQ5JYF.js +0 -1
- package/dist/prod/locales/sk-SK-C5VTKIMK.js +0 -6
- package/dist/prod/locales/sl-SI-NN7IZMDC.js +0 -6
- package/dist/prod/locales/sv-SE-XGPEYMSR.js +0 -10
- package/dist/prod/locales/ta-IN-2NMHFXQM.js +0 -9
- package/dist/prod/locales/th-TH-HPSO5L25.js +0 -2
- package/dist/prod/locales/tr-TR-DEFEU3FU.js +0 -7
- package/dist/prod/locales/uk-UA-QMV73CPH.js +0 -6
- package/dist/prod/locales/vi-VN-M7AON7JQ.js +0 -5
- package/dist/prod/locales/zh-CN-LNUGB5OW.js +0 -10
- package/dist/prod/locales/zh-HK-E62DVLB3.js +0 -1
- package/dist/prod/locales/zh-TW-RAJ6MFWO.js +0 -9
- /package/dist/dev/data/{image-SURZSZNX.js.map → image-S2GFZH7W.js.map} +0 -0
- /package/dist/dev/locales/{en-SMAPCEOQ.js.map → en-ZO6QSABV.js.map} +0 -0
- /package/dist/dev/locales/{percentages-YKFLWNK2.js.map → percentages-2RAYDWNS.js.map} +0 -0
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import type { ExcalidrawElement, FontFamilyValues } from "@excalidraw/element/types";
|
|
2
2
|
import type { AppProps, AppState } from "@excalidraw/excalidraw/types";
|
|
3
|
-
export declare const isDarwin: boolean;
|
|
4
|
-
export declare const isWindows: boolean;
|
|
5
|
-
export declare const isAndroid: boolean;
|
|
6
|
-
export declare const isFirefox: boolean;
|
|
7
|
-
export declare const isChrome: boolean;
|
|
8
|
-
export declare const isSafari: boolean;
|
|
9
|
-
export declare const isIOS: boolean;
|
|
10
|
-
export declare const isBrave: () => boolean;
|
|
11
3
|
export declare const supportsResizeObserver: boolean;
|
|
12
4
|
export declare const APP_NAME = "Excalidraw";
|
|
13
5
|
export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
|
|
14
6
|
export declare const DRAGGING_THRESHOLD = 10;
|
|
7
|
+
export declare const MINIMUM_ARROW_SIZE = 20;
|
|
15
8
|
export declare const LINE_CONFIRM_THRESHOLD = 8;
|
|
16
9
|
export declare const ELEMENT_SHIFT_TRANSLATE_AMOUNT = 5;
|
|
17
10
|
export declare const ELEMENT_TRANSLATE_AMOUNT = 1;
|
|
@@ -85,10 +78,13 @@ export declare const ENV: {
|
|
|
85
78
|
PRODUCTION: string;
|
|
86
79
|
};
|
|
87
80
|
export declare const CLASSES: {
|
|
81
|
+
SIDEBAR: string;
|
|
88
82
|
SHAPE_ACTIONS_MENU: string;
|
|
89
83
|
ZOOM_ACTIONS: string;
|
|
90
84
|
SEARCH_MENU_INPUT_WRAPPER: string;
|
|
91
85
|
CONVERT_ELEMENT_TYPE_POPUP: string;
|
|
86
|
+
SHAPE_ACTIONS_THEME_SCOPE: string;
|
|
87
|
+
FRAME_NAME: string;
|
|
92
88
|
};
|
|
93
89
|
export declare const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai";
|
|
94
90
|
export declare const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
|
|
@@ -174,6 +170,14 @@ export declare const IMAGE_MIME_TYPES: {
|
|
|
174
170
|
readonly avif: "image/avif";
|
|
175
171
|
readonly jfif: "image/jfif";
|
|
176
172
|
};
|
|
173
|
+
export declare const STRING_MIME_TYPES: {
|
|
174
|
+
readonly text: "text/plain";
|
|
175
|
+
readonly html: "text/html";
|
|
176
|
+
readonly json: "application/json";
|
|
177
|
+
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
178
|
+
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
179
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
180
|
+
};
|
|
177
181
|
export declare const MIME_TYPES: {
|
|
178
182
|
readonly svg: "image/svg+xml";
|
|
179
183
|
readonly png: "image/png";
|
|
@@ -184,14 +188,15 @@ export declare const MIME_TYPES: {
|
|
|
184
188
|
readonly ico: "image/x-icon";
|
|
185
189
|
readonly avif: "image/avif";
|
|
186
190
|
readonly jfif: "image/jfif";
|
|
191
|
+
readonly "excalidraw.svg": "image/svg+xml";
|
|
192
|
+
readonly "excalidraw.png": "image/png";
|
|
193
|
+
readonly binary: "application/octet-stream";
|
|
187
194
|
readonly text: "text/plain";
|
|
188
195
|
readonly html: "text/html";
|
|
189
196
|
readonly json: "application/json";
|
|
190
197
|
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
191
198
|
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
192
|
-
readonly
|
|
193
|
-
readonly "excalidraw.png": "image/png";
|
|
194
|
-
readonly binary: "application/octet-stream";
|
|
199
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
195
200
|
};
|
|
196
201
|
export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
|
|
197
202
|
export declare const EXPORT_IMAGE_TYPES: {
|
|
@@ -226,10 +231,6 @@ export declare const URL_HASH_KEYS: {
|
|
|
226
231
|
readonly addLibrary: "addLibrary";
|
|
227
232
|
};
|
|
228
233
|
export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
|
|
229
|
-
export declare const MQ_MAX_WIDTH_PORTRAIT = 730;
|
|
230
|
-
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
231
|
-
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
232
|
-
export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
|
|
233
234
|
export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
|
|
234
235
|
export declare const EXPORT_SCALES: number[];
|
|
235
236
|
export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
@@ -341,3 +342,8 @@ export declare enum UserIdleState {
|
|
|
341
342
|
* the start and end points)
|
|
342
343
|
*/
|
|
343
344
|
export declare const LINE_POLYGON_POINT_MERGE_DISTANCE = 20;
|
|
345
|
+
export declare const DOUBLE_TAP_POSITION_THRESHOLD = 35;
|
|
346
|
+
export declare const BIND_MODE_TIMEOUT = 700;
|
|
347
|
+
export declare const MOBILE_ACTION_BUTTON_BG: {
|
|
348
|
+
readonly background: "var(--mobile-action-button-bg)";
|
|
349
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type StylesPanelMode = "compact" | "full" | "mobile";
|
|
2
|
+
export type EditorInterface = Readonly<{
|
|
3
|
+
formFactor: "phone" | "tablet" | "desktop";
|
|
4
|
+
desktopUIMode: "compact" | "full";
|
|
5
|
+
userAgent: Readonly<{
|
|
6
|
+
isMobileDevice: boolean;
|
|
7
|
+
platform: "ios" | "android" | "other" | "unknown";
|
|
8
|
+
}>;
|
|
9
|
+
isTouchScreen: boolean;
|
|
10
|
+
canFitSidebar: boolean;
|
|
11
|
+
isLandscape: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const MQ_MAX_MOBILE = 599;
|
|
14
|
+
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
15
|
+
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
16
|
+
export declare const MQ_MIN_TABLET: number;
|
|
17
|
+
export declare const MQ_MAX_TABLET = 1400;
|
|
18
|
+
export declare const MQ_MIN_WIDTH_DESKTOP = 1440;
|
|
19
|
+
export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
|
|
20
|
+
export declare const isDarwin: boolean;
|
|
21
|
+
export declare const isWindows: boolean;
|
|
22
|
+
export declare const isAndroid: boolean;
|
|
23
|
+
export declare const isFirefox: boolean;
|
|
24
|
+
export declare const isChrome: boolean;
|
|
25
|
+
export declare const isSafari: boolean;
|
|
26
|
+
export declare const isIOS: boolean;
|
|
27
|
+
export declare const isBrave: () => boolean;
|
|
28
|
+
export declare const isMobileBreakpoint: (width: number, height: number) => boolean;
|
|
29
|
+
export declare const isTabletBreakpoint: (editorWidth: number, editorHeight: number) => boolean;
|
|
30
|
+
export declare const getFormFactor: (editorWidth: number, editorHeight: number) => EditorInterface["formFactor"];
|
|
31
|
+
export declare const deriveStylesPanelMode: (editorInterface: EditorInterface) => StylesPanelMode;
|
|
32
|
+
export declare const createUserAgentDescriptor: (userAgentString: string) => EditorInterface["userAgent"];
|
|
33
|
+
export declare const loadDesktopUIModePreference: () => "compact" | "full" | null;
|
|
34
|
+
export declare const setDesktopUIMode: (mode: EditorInterface["desktopUIMode"]) => "compact" | "full" | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FontFamilyValues, FontString } from "@excalidraw/element/types";
|
|
2
2
|
import type { ActiveTool, AppState, ToolType, UnsubscribeCallback, Zoom } from "@excalidraw/excalidraw/types";
|
|
3
3
|
import type { MaybePromise } from "./utility-types";
|
|
4
4
|
import type { EVENT } from "./constants";
|
|
@@ -17,6 +17,8 @@ export declare const getFontString: ({ fontSize, fontFamily, }: {
|
|
|
17
17
|
fontSize: number;
|
|
18
18
|
fontFamily: FontFamilyValues;
|
|
19
19
|
}) => FontString;
|
|
20
|
+
/** executes callback in the frame that's after the current one */
|
|
21
|
+
export declare const nextAnimationFrame: (cb: () => any) => Promise<void>;
|
|
20
22
|
export declare const debounce: <T extends any[]>(fn: (...args: T) => void, timeout: number) => {
|
|
21
23
|
(...args: T): void;
|
|
22
24
|
flush(): void;
|
|
@@ -80,6 +82,7 @@ export declare const chunk: <T extends unknown>(array: readonly T[], size: numbe
|
|
|
80
82
|
export declare const selectNode: (node: Element) => void;
|
|
81
83
|
export declare const removeSelection: () => void;
|
|
82
84
|
export declare const distance: (x: number, y: number) => number;
|
|
85
|
+
export declare const isSelectionLikeTool: (type: ToolType | "custom") => boolean;
|
|
83
86
|
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: (({
|
|
84
87
|
type: ToolType;
|
|
85
88
|
} | {
|
|
@@ -94,7 +97,6 @@ export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">,
|
|
|
94
97
|
export declare const isFullScreen: () => boolean;
|
|
95
98
|
export declare const allowFullScreen: () => Promise<void>;
|
|
96
99
|
export declare const exitFullScreen: () => Promise<void>;
|
|
97
|
-
export declare const getShortcutKey: (shortcut: string) => string;
|
|
98
100
|
export declare const viewportCoordsToSceneCoords: ({ clientX, clientY }: {
|
|
99
101
|
clientX: number;
|
|
100
102
|
clientY: number;
|
|
@@ -140,7 +142,6 @@ export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, in
|
|
|
140
142
|
/** returns the first non-null mapped value */
|
|
141
143
|
export declare const mapFind: <T, K>(collection: readonly T[], iteratee: (value: T, index: number) => K | null | undefined) => K | undefined;
|
|
142
144
|
export declare const isTransparent: (color: string) => boolean;
|
|
143
|
-
export declare const isBindingFallthroughEnabled: (el: ExcalidrawBindableElement) => boolean;
|
|
144
145
|
export type ResolvablePromise<T> = Promise<T> & {
|
|
145
146
|
resolve: [T] extends [undefined] ? (value?: MaybePromise<Awaited<T>>) => void : (value: MaybePromise<Awaited<T>>) => void;
|
|
146
147
|
reject: (error: Error) => void;
|
|
@@ -264,4 +265,9 @@ export declare const castArray: <T>(value: T | T[]) => T[];
|
|
|
264
265
|
export declare const isReadonlyArray: (value?: any) => value is readonly any[];
|
|
265
266
|
export declare const sizeOf: (value: readonly unknown[] | Readonly<Map<string, unknown>> | Readonly<Record<string, unknown>> | ReadonlySet<unknown>) => number;
|
|
266
267
|
export declare const reduceToCommonValue: <T, R = T>(collection: ReadonlySet<T> | readonly T[], getValue?: ((item: T) => R) | undefined) => R | null;
|
|
268
|
+
type FEATURE_FLAGS = {
|
|
269
|
+
COMPLEX_BINDINGS: boolean;
|
|
270
|
+
};
|
|
271
|
+
export declare const getFeatureFlag: <F extends "COMPLEX_BINDINGS">(flag: F) => FEATURE_FLAGS[F];
|
|
272
|
+
export declare const setFeatureFlag: <F extends "COMPLEX_BINDINGS">(flag: F, value: FEATURE_FLAGS[F]) => void;
|
|
267
273
|
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
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";
|
|
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: readonly LocalPoint[];
|
|
39
|
+
}, options?: any) => void;
|
|
40
|
+
export declare const debugCloseFrame: () => void;
|
|
41
|
+
export declare const debugClear: () => void;
|
|
@@ -27,7 +27,9 @@ export declare class Scene {
|
|
|
27
27
|
getElementsMapIncludingDeleted(): Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
|
|
28
28
|
getNonDeletedElements(): readonly Ordered<NonDeletedExcalidrawElement>[];
|
|
29
29
|
getFramesIncludingDeleted(): readonly ExcalidrawFrameLikeElement[];
|
|
30
|
-
constructor(elements?: ElementsMapOrArray | null
|
|
30
|
+
constructor(elements?: ElementsMapOrArray | null, options?: {
|
|
31
|
+
skipValidation?: true;
|
|
32
|
+
});
|
|
31
33
|
getSelectedElements(opts: {
|
|
32
34
|
selectedElementIds: AppState["selectedElementIds"];
|
|
33
35
|
/**
|
|
@@ -55,7 +57,9 @@ export declare class Scene {
|
|
|
55
57
|
* @returns whether a change was made
|
|
56
58
|
*/
|
|
57
59
|
mapElements(iteratee: (element: ExcalidrawElement) => ExcalidrawElement): boolean;
|
|
58
|
-
replaceAllElements(nextElements: ElementsMapOrArray
|
|
60
|
+
replaceAllElements(nextElements: ElementsMapOrArray, options?: {
|
|
61
|
+
skipValidation?: true;
|
|
62
|
+
}): void;
|
|
59
63
|
triggerUpdate(): void;
|
|
60
64
|
onUpdate(cb: SceneStateCallback): SceneStateCallbackRemover;
|
|
61
65
|
destroy(): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
1
2
|
import type { Scene } from "./Scene";
|
|
2
3
|
import type { ExcalidrawElement } from "./types";
|
|
3
4
|
export interface Alignment {
|
|
4
5
|
position: "start" | "center" | "end";
|
|
5
6
|
axis: "x" | "y";
|
|
6
7
|
}
|
|
7
|
-
export declare const alignElements: (selectedElements: ExcalidrawElement[], alignment: Alignment, scene: Scene) => ExcalidrawElement[];
|
|
8
|
+
export declare const alignElements: (selectedElements: ExcalidrawElement[], alignment: Alignment, scene: Scene, appState: Readonly<AppState>) => ExcalidrawElement[];
|
|
@@ -1,68 +1,80 @@
|
|
|
1
1
|
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
|
-
import type { LocalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { LineSegment, LocalPoint } from "@excalidraw/math";
|
|
3
3
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
4
4
|
import { type Heading } from "./heading";
|
|
5
5
|
import type { Scene } from "./Scene";
|
|
6
6
|
import type { Bounds } from "./bounds";
|
|
7
7
|
import type { ElementUpdate } from "./mutateElement";
|
|
8
|
-
import type { ExcalidrawBindableElement, ExcalidrawElement,
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
NonDeleted<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import type { BindMode, ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, ExcalidrawElbowArrowElement, ExcalidrawElement, FixedPoint, FixedPointBinding, NonDeleted, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered, PointsPositionUpdates } from "./types";
|
|
9
|
+
export type BindingStrategy = {
|
|
10
|
+
mode: BindMode;
|
|
11
|
+
element: NonDeleted<ExcalidrawBindableElement>;
|
|
12
|
+
focusPoint: GlobalPoint;
|
|
13
|
+
} | {
|
|
14
|
+
mode: null;
|
|
15
|
+
element?: undefined;
|
|
16
|
+
focusPoint?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
mode: undefined;
|
|
19
|
+
element?: undefined;
|
|
20
|
+
focusPoint?: undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* gaps exclude element strokeWidth
|
|
24
|
+
*
|
|
25
|
+
* IMPORTANT: currently must be > 0 (this also applies to the computed gap)
|
|
26
|
+
*/
|
|
27
|
+
export declare const BASE_BINDING_GAP = 10;
|
|
28
|
+
export declare const BASE_BINDING_GAP_ELBOW = 5;
|
|
29
|
+
export declare const getBindingGap: (bindTarget: ExcalidrawBindableElement, opts: Pick<ExcalidrawArrowElement, "elbowed">) => number;
|
|
30
|
+
export declare const maxBindingDistance_simple: (zoom?: AppState["zoom"]) => number;
|
|
15
31
|
export declare const shouldEnableBindingForPointerEvent: (event: React.PointerEvent<HTMLElement>) => boolean;
|
|
16
32
|
export declare const isBindingEnabled: (appState: AppState) => boolean;
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
33
|
+
export declare const bindOrUnbindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, draggingPoints: PointsPositionUpdates, scene: Scene, appState: AppState, opts?: {
|
|
34
|
+
newArrow?: boolean;
|
|
35
|
+
altKey?: boolean;
|
|
36
|
+
initialBinding?: boolean;
|
|
37
|
+
}) => {
|
|
38
|
+
start: BindingStrategy;
|
|
39
|
+
end: BindingStrategy;
|
|
40
|
+
};
|
|
41
|
+
export declare const getBindingStrategyForDraggingBindingElementEndpoints: (arrow: NonDeleted<ExcalidrawArrowElement>, draggingPoints: PointsPositionUpdates, elementsMap: NonDeletedSceneElementsMap, elements: readonly Ordered<NonDeletedExcalidrawElement>[], appState: AppState, opts?: {
|
|
42
|
+
newArrow?: boolean;
|
|
43
|
+
shiftKey?: boolean;
|
|
44
|
+
altKey?: boolean;
|
|
45
|
+
finalize?: boolean;
|
|
46
|
+
initialBinding?: boolean;
|
|
47
|
+
zoom?: AppState["zoom"];
|
|
48
|
+
}) => {
|
|
49
|
+
start: BindingStrategy;
|
|
50
|
+
end: BindingStrategy;
|
|
51
|
+
};
|
|
52
|
+
export declare const bindOrUnbindBindingElements: (selectedArrows: NonDeleted<ExcalidrawArrowElement>[], scene: Scene, appState: AppState) => void;
|
|
53
|
+
export declare const bindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, hoveredElement: ExcalidrawBindableElement, mode: BindMode, startOrEnd: "start" | "end", scene: Scene, focusPoint?: GlobalPoint) => void;
|
|
54
|
+
export declare const unbindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, startOrEnd: "start" | "end", scene: Scene) => ExcalidrawBindableElement["id"] | null;
|
|
36
55
|
export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement, scene: Scene, options?: {
|
|
37
56
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
38
|
-
newSize?: {
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
};
|
|
42
57
|
changedElements?: Map<string, ExcalidrawElement>;
|
|
43
58
|
}) => void;
|
|
44
|
-
export declare const updateBindings: (latestElement: ExcalidrawElement, scene: Scene, options?: {
|
|
59
|
+
export declare const updateBindings: (latestElement: ExcalidrawElement, scene: Scene, appState: AppState, options?: {
|
|
45
60
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
46
61
|
newSize?: {
|
|
47
62
|
width: number;
|
|
48
63
|
height: number;
|
|
49
64
|
};
|
|
50
|
-
zoom?: AppState["zoom"];
|
|
51
65
|
}) => void;
|
|
52
66
|
export declare const getHeadingForElbowArrowSnap: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined | null, aabb: Bounds | undefined | null, origPoint: GlobalPoint, elementsMap: ElementsMap, zoom?: AppState["zoom"]) => Heading;
|
|
53
|
-
export declare const bindPointToSnapToElementOutline: (
|
|
54
|
-
export declare const avoidRectangularCorner: (
|
|
55
|
-
export declare const
|
|
67
|
+
export declare const bindPointToSnapToElementOutline: (arrowElement: ExcalidrawArrowElement, bindableElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, customIntersector?: LineSegment<GlobalPoint>) => GlobalPoint;
|
|
68
|
+
export declare const avoidRectangularCorner: (arrowElement: ExcalidrawArrowElement, bindTarget: ExcalidrawBindableElement, elementsMap: ElementsMap, p: GlobalPoint) => GlobalPoint;
|
|
69
|
+
export declare const updateBoundPoint: (arrow: NonDeleted<ExcalidrawArrowElement>, startOrEnd: "startBinding" | "endBinding", binding: FixedPointBinding | null | undefined, bindableElement: ExcalidrawBindableElement, elementsMap: ElementsMap, customIntersector?: LineSegment<GlobalPoint>) => LocalPoint | null;
|
|
56
70
|
export declare const calculateFixedPointForElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawElbowArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap) => {
|
|
57
71
|
fixedPoint: FixedPoint;
|
|
58
72
|
};
|
|
73
|
+
export declare const calculateFixedPointForNonElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, focusPoint?: GlobalPoint) => {
|
|
74
|
+
fixedPoint: FixedPoint;
|
|
75
|
+
};
|
|
59
76
|
export declare const fixDuplicatedBindingsAfterDuplication: (duplicatedElements: ExcalidrawElement[], origIdToDuplicateId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>, duplicateElementsMap: NonDeletedSceneElementsMap) => void;
|
|
60
77
|
export declare const fixBindingsAfterDeletion: (sceneElements: readonly ExcalidrawElement[], deletedElements: readonly ExcalidrawElement[]) => void;
|
|
61
|
-
export declare const bindingBorderTest: (element: NonDeleted<ExcalidrawBindableElement>, { x, y }: {
|
|
62
|
-
x: number;
|
|
63
|
-
y: number;
|
|
64
|
-
}, elementsMap: NonDeletedSceneElementsMap, zoom?: AppState["zoom"], fullShape?: boolean) => boolean;
|
|
65
|
-
export declare const maxBindingGap: (element: ExcalidrawElement, elementWidth: number, elementHeight: number, zoom?: AppState["zoom"]) => number;
|
|
66
78
|
export declare const bindingProperties: Set<BindableProp | BindingProp>;
|
|
67
79
|
export type BindableProp = "boundElements";
|
|
68
80
|
export type BindingProp = "frameId" | "containerId" | "startBinding" | "endBinding";
|
|
@@ -104,7 +116,7 @@ export declare class BindableElement {
|
|
|
104
116
|
*/
|
|
105
117
|
static rebindAffected: (elements: ElementsMap, bindableElement: ExcalidrawElement | undefined, updateElementWith: (affected: ExcalidrawElement, updates: ElementUpdate<ExcalidrawElement>) => void) => void;
|
|
106
118
|
}
|
|
107
|
-
export declare const getGlobalFixedPointForBindableElement: (fixedPointRatio:
|
|
108
|
-
export declare const getGlobalFixedPoints: (arrow:
|
|
119
|
+
export declare const getGlobalFixedPointForBindableElement: (fixedPointRatio: FixedPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap) => GlobalPoint;
|
|
120
|
+
export declare const getGlobalFixedPoints: (arrow: ExcalidrawArrowElement, elementsMap: ElementsMap) => [GlobalPoint, GlobalPoint];
|
|
109
121
|
export declare const getArrowLocalFixedPoints: (arrow: ExcalidrawElbowArrowElement, elementsMap: ElementsMap) => LocalPoint[];
|
|
110
122
|
export declare const normalizeFixedPoint: <T extends FixedPoint | null>(fixedPoint: T) => T extends null ? null : FixedPoint;
|
|
@@ -74,7 +74,7 @@ export interface BoundingBox {
|
|
|
74
74
|
width: number;
|
|
75
75
|
height: number;
|
|
76
76
|
}
|
|
77
|
-
export declare const getCommonBoundingBox: (elements: ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
|
|
77
|
+
export declare const getCommonBoundingBox: (elements: readonly ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
|
|
78
78
|
/**
|
|
79
79
|
* returns scene coords of user's editor viewport (visible canvas area) bounds
|
|
80
80
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobalPoint, LineSegment } from "@excalidraw/math";
|
|
2
2
|
import type { FrameNameBounds } from "@excalidraw/excalidraw/types";
|
|
3
|
-
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
3
|
+
import type { ElementsMap, ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered } from "./types";
|
|
4
4
|
export declare const shouldTestInside: (element: ExcalidrawElement) => boolean;
|
|
5
5
|
export type HitTestArgs = {
|
|
6
6
|
point: GlobalPoint;
|
|
@@ -8,11 +8,14 @@ export type HitTestArgs = {
|
|
|
8
8
|
threshold: number;
|
|
9
9
|
elementsMap: ElementsMap;
|
|
10
10
|
frameNameBound?: FrameNameBounds | null;
|
|
11
|
+
overrideShouldTestInside?: boolean;
|
|
11
12
|
};
|
|
12
|
-
export declare const hitElementItself: ({ point, element, threshold, elementsMap, frameNameBound, }: HitTestArgs) => boolean;
|
|
13
|
+
export declare const hitElementItself: ({ point, element, threshold, elementsMap, frameNameBound, overrideShouldTestInside, }: HitTestArgs) => boolean;
|
|
13
14
|
export declare const hitElementBoundingBox: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap, tolerance?: number) => boolean;
|
|
14
15
|
export declare const hitElementBoundingBoxOnly: (hitArgs: HitTestArgs, elementsMap: ElementsMap) => boolean;
|
|
15
16
|
export declare const hitElementBoundText: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap) => boolean;
|
|
17
|
+
export declare const getAllHoveredElementAtPoint: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, toleranceFn?: ((element: ExcalidrawBindableElement) => number) | undefined) => NonDeleted<ExcalidrawBindableElement>[];
|
|
18
|
+
export declare const getHoveredElementForBinding: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, toleranceFn?: ((element: ExcalidrawBindableElement) => number) | undefined) => NonDeleted<ExcalidrawBindableElement> | null;
|
|
16
19
|
/**
|
|
17
20
|
* Intersect a line with an element for binding test
|
|
18
21
|
*
|
|
@@ -30,3 +33,4 @@ export declare const intersectElementWithLineSegment: (element: ExcalidrawElemen
|
|
|
30
33
|
* @returns
|
|
31
34
|
*/
|
|
32
35
|
export declare const isPointInElement: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap) => boolean;
|
|
36
|
+
export declare const isBindableElementInsideOtherBindable: (innerElement: ExcalidrawBindableElement, outerElement: ExcalidrawBindableElement, elementsMap: ElementsMap) => boolean;
|
|
@@ -29,12 +29,16 @@ export declare class Delta<T> {
|
|
|
29
29
|
}>(prevObject: T, nextObject: T, modifier?: (partial: Partial<T>) => Partial<T>, postProcess?: (deleted: Partial<T>, inserted: Partial<T>) => [Partial<T>, Partial<T>]): Delta<T>;
|
|
30
30
|
static empty(): Delta<unknown>;
|
|
31
31
|
static isEmpty<T>(delta: Delta<T>): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Merges two deltas into a new one.
|
|
34
|
+
*/
|
|
35
|
+
static merge<T>(delta1: Delta<T>, delta2: Delta<T>, delta3?: Delta<T>): Delta<T>;
|
|
32
36
|
/**
|
|
33
37
|
* Merges deleted and inserted object partials.
|
|
34
38
|
*/
|
|
35
39
|
static mergeObjects<T extends {
|
|
36
40
|
[key: string]: unknown;
|
|
37
|
-
}>(prev: T, added: T, removed
|
|
41
|
+
}>(prev: T, added: T, removed?: T): T;
|
|
38
42
|
/**
|
|
39
43
|
* Merges deleted and inserted array partials.
|
|
40
44
|
*/
|
|
@@ -102,18 +106,24 @@ export interface DeltaContainer<T> {
|
|
|
102
106
|
* @returns a tuple of the next object `T` with applied `Delta`s, and `boolean`, indicating whether the applied deltas resulted in a visible change.
|
|
103
107
|
*/
|
|
104
108
|
applyTo(previous: T, ...options: unknown[]): [T, boolean];
|
|
109
|
+
/**
|
|
110
|
+
* Squashes the current delta with the given one.
|
|
111
|
+
*/
|
|
112
|
+
squash(delta: DeltaContainer<T>): this;
|
|
105
113
|
/**
|
|
106
114
|
* Checks whether all `Delta`s are empty.
|
|
107
115
|
*/
|
|
108
116
|
isEmpty(): boolean;
|
|
109
117
|
}
|
|
110
118
|
export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
111
|
-
|
|
119
|
+
delta: Delta<ObservedAppState>;
|
|
112
120
|
private constructor();
|
|
121
|
+
static create(delta: Delta<ObservedAppState>): AppStateDelta;
|
|
113
122
|
static calculate<T extends ObservedAppState>(prevAppState: T, nextAppState: T): AppStateDelta;
|
|
114
123
|
static restore(appStateDeltaDTO: DTO<AppStateDelta>): AppStateDelta;
|
|
115
124
|
static empty(): AppStateDelta;
|
|
116
125
|
inverse(): AppStateDelta;
|
|
126
|
+
squash(delta: AppStateDelta): this;
|
|
117
127
|
applyTo(appState: AppState, nextElements: SceneElementsMap): [AppState, boolean];
|
|
118
128
|
isEmpty(): boolean;
|
|
119
129
|
/**
|
|
@@ -122,7 +132,6 @@ export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
|
122
132
|
* @returns `true` if a visible change is found, `false` otherwise.
|
|
123
133
|
*/
|
|
124
134
|
private filterInvisibleChanges;
|
|
125
|
-
private static convertToAppStateKey;
|
|
126
135
|
private static filterSelectedElements;
|
|
127
136
|
private static filterSelectedGroups;
|
|
128
137
|
private static stripElementsProps;
|
|
@@ -136,7 +145,7 @@ export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
|
136
145
|
}
|
|
137
146
|
type ElementPartial<TElement extends ExcalidrawElement = ExcalidrawElement> = Omit<Partial<Ordered<TElement>>, "id" | "updated" | "seed">;
|
|
138
147
|
export type ApplyToOptions = {
|
|
139
|
-
excludedProperties
|
|
148
|
+
excludedProperties?: Set<keyof ElementPartial>;
|
|
140
149
|
};
|
|
141
150
|
/**
|
|
142
151
|
* Elements change is a low level primitive to capture a change between two sets of elements.
|
|
@@ -155,6 +164,7 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
155
164
|
private static satisfiesRemoval;
|
|
156
165
|
private static satisfiesUpdate;
|
|
157
166
|
private static satisfiesCommmonInvariants;
|
|
167
|
+
private static satisfiesUniqueInvariants;
|
|
158
168
|
private static validate;
|
|
159
169
|
/**
|
|
160
170
|
* Calculates the `Delta`s between the previous and next set of elements.
|
|
@@ -177,6 +187,7 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
177
187
|
*/
|
|
178
188
|
applyLatestChanges(prevElements: SceneElementsMap, nextElements: SceneElementsMap, modifierOptions?: "deleted" | "inserted"): ElementsDelta;
|
|
179
189
|
applyTo(elements: SceneElementsMap, snapshot?: StoreSnapshot["elements"], options?: ApplyToOptions): [SceneElementsMap, boolean];
|
|
190
|
+
squash(delta: ElementsDelta): this;
|
|
180
191
|
private static createApplier;
|
|
181
192
|
private static createGetter;
|
|
182
193
|
private static applyDelta;
|
|
@@ -203,6 +214,7 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
203
214
|
* should be rebound (if possible) with the current element ~ bindings should be bidirectional.
|
|
204
215
|
*/
|
|
205
216
|
private static rebindAffected;
|
|
217
|
+
static redrawElements(nextElements: SceneElementsMap, changedElements: Map<string, OrderedExcalidrawElement>): SceneElementsMap;
|
|
206
218
|
private static redrawTextBoundingBoxes;
|
|
207
219
|
private static redrawBoundArrows;
|
|
208
220
|
private static reorderElements;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
1
2
|
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
2
3
|
export interface Distribution {
|
|
3
4
|
space: "between";
|
|
4
5
|
axis: "x" | "y";
|
|
5
6
|
}
|
|
6
|
-
export declare const distributeElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, distribution: Distribution) => ExcalidrawElement[];
|
|
7
|
+
export declare const distributeElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, distribution: Distribution, appState: Readonly<AppState>) => ExcalidrawElement[];
|
|
@@ -31,3 +31,4 @@ export declare const getNonDeletedGroupIds: (elements: ElementsMap) => Set<strin
|
|
|
31
31
|
export declare const elementsAreInSameGroup: (elements: readonly ExcalidrawElement[]) => boolean;
|
|
32
32
|
export declare const isInGroup: (element: NonDeletedExcalidrawElement) => boolean;
|
|
33
33
|
export declare const getNewGroupIdsForDuplication: (groupIds: ExcalidrawElement["groupIds"], editingGroupId: AppState["editingGroupId"], mapper: (groupId: GroupId) => GroupId) => string[];
|
|
34
|
+
export declare const getSelectedElementsByGroup: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, appState: Readonly<AppState>) => ExcalidrawElement[][];
|
|
@@ -11,9 +11,6 @@ export declare const hashString: (s: string) => number;
|
|
|
11
11
|
export declare const getVisibleElements: (elements: readonly ExcalidrawElement[]) => readonly NonDeletedExcalidrawElement[];
|
|
12
12
|
export declare const getNonDeletedElements: <T extends ExcalidrawElement>(elements: readonly T[]) => readonly NonDeleted<T>[];
|
|
13
13
|
export declare const isNonDeletedElement: <T extends ExcalidrawElement>(element: T) => element is NonDeleted<T>;
|
|
14
|
-
export declare const clearElementsForDatabase: (elements: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
15
|
-
export declare const clearElementsForExport: (elements: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
16
|
-
export declare const clearElementsForLocalStorage: (elements: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
17
14
|
export * from "./align";
|
|
18
15
|
export * from "./binding";
|
|
19
16
|
export * from "./bounds";
|
|
@@ -38,6 +35,7 @@ export * from "./image";
|
|
|
38
35
|
export * from "./linearElementEditor";
|
|
39
36
|
export * from "./mutateElement";
|
|
40
37
|
export * from "./newElement";
|
|
38
|
+
export * from "./positionElementsOnGrid";
|
|
41
39
|
export * from "./renderElement";
|
|
42
40
|
export * from "./resizeElements";
|
|
43
41
|
export * from "./resizeTest";
|