@excalidraw/excalidraw 0.18.0-9036812b6 → 0.18.0-9ba0f5d
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-FB2NA5UG.js → chunk-6JJSWC4C.js} +1 -1
- package/dist/dev/{chunk-FB2NA5UG.js.map → chunk-6JJSWC4C.js.map} +2 -2
- package/dist/dev/chunk-DJHLEOOZ.js +69 -0
- package/dist/dev/chunk-DJHLEOOZ.js.map +7 -0
- package/dist/dev/{chunk-QF5FRM6O.js → chunk-MNO2YU5M.js} +101 -27
- package/dist/dev/chunk-MNO2YU5M.js.map +7 -0
- package/dist/dev/{chunk-FRLWKCNE.js → chunk-PW6TXCLQ.js} +330 -476
- package/dist/dev/chunk-PW6TXCLQ.js.map +7 -0
- package/dist/dev/{chunk-CP5DND7P.js → chunk-Y3BTNZQY.js} +2 -2
- package/dist/dev/data/{image-T2LJEHDP.js → image-2BHUUSLM.js} +3 -3
- package/dist/dev/index.css +1900 -774
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +11938 -7867
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{ar-SA-XORAP2EK.js → ar-SA-JK5MQ7TT.js} +300 -142
- package/dist/dev/locales/ar-SA-JK5MQ7TT.js.map +7 -0
- package/dist/dev/locales/{az-AZ-NAUU3Z4Y.js → az-AZ-2PAD62G4.js} +241 -83
- package/dist/dev/locales/az-AZ-2PAD62G4.js.map +7 -0
- package/dist/dev/locales/{bg-BG-AAABLFCY.js → bg-BG-HUKVYCRK.js} +229 -71
- package/dist/dev/locales/bg-BG-HUKVYCRK.js.map +7 -0
- package/dist/dev/locales/{bn-BD-PM4AC5WG.js → bn-BD-V2CQI46P.js} +209 -51
- package/dist/dev/locales/bn-BD-V2CQI46P.js.map +7 -0
- package/dist/dev/locales/bn-IN-MBEO4C3J.js +744 -0
- package/dist/dev/locales/bn-IN-MBEO4C3J.js.map +7 -0
- package/dist/dev/locales/{ca-ES-YNNMFRQX.js → ca-ES-KWEKW4C3.js} +275 -117
- package/dist/dev/locales/ca-ES-KWEKW4C3.js.map +7 -0
- package/dist/dev/locales/{cs-CZ-DGZA5IKG.js → cs-CZ-W5AHZB5H.js} +229 -71
- package/dist/dev/locales/cs-CZ-W5AHZB5H.js.map +7 -0
- package/dist/dev/locales/{da-DK-N76F4QAJ.js → da-DK-ITTM6YM4.js} +298 -140
- package/dist/dev/locales/da-DK-ITTM6YM4.js.map +7 -0
- package/dist/dev/locales/de-CH-OAWPDQFJ.js +744 -0
- package/dist/dev/locales/de-CH-OAWPDQFJ.js.map +7 -0
- package/dist/dev/locales/{de-DE-DMRXZ2SZ.js → de-DE-ZRDYEPMS.js} +199 -41
- package/dist/dev/locales/de-DE-ZRDYEPMS.js.map +7 -0
- package/dist/dev/locales/{el-GR-HIKPLEXI.js → el-GR-QXASZLPE.js} +274 -116
- package/dist/dev/locales/el-GR-QXASZLPE.js.map +7 -0
- package/dist/dev/locales/{en-SMAPCEOQ.js → en-JRVQ7H6V.js} +8 -2
- package/dist/dev/locales/{es-ES-AQYVXC32.js → es-ES-VLQBB7FJ.js} +212 -54
- package/dist/dev/locales/es-ES-VLQBB7FJ.js.map +7 -0
- package/dist/dev/locales/{eu-ES-3TOEU5DE.js → eu-ES-TF2DGTZU.js} +210 -52
- package/dist/dev/locales/eu-ES-TF2DGTZU.js.map +7 -0
- package/dist/dev/locales/{fa-IR-527GAKUP.js → fa-IR-ITKFQ7QV.js} +286 -128
- package/dist/dev/locales/fa-IR-ITKFQ7QV.js.map +7 -0
- package/dist/dev/locales/{fi-FI-M3WLVDFP.js → fi-FI-UWZRVXFI.js} +240 -82
- package/dist/dev/locales/fi-FI-UWZRVXFI.js.map +7 -0
- package/dist/dev/locales/{fr-FR-YE4VDJFI.js → fr-FR-A72LKGCO.js} +203 -45
- package/dist/dev/locales/fr-FR-A72LKGCO.js.map +7 -0
- package/dist/dev/locales/{gl-ES-KMXUYGUN.js → gl-ES-2QCVIBFP.js} +212 -54
- package/dist/dev/locales/gl-ES-2QCVIBFP.js.map +7 -0
- package/dist/dev/locales/he-IL-WJNUHU26.js +744 -0
- package/dist/dev/locales/he-IL-WJNUHU26.js.map +7 -0
- package/dist/dev/locales/hi-IN-XGMO235V.js +744 -0
- package/dist/dev/locales/hi-IN-XGMO235V.js.map +7 -0
- package/dist/dev/locales/{hu-HU-VIYZI3X4.js → hu-HU-37FDQFIS.js} +238 -80
- package/dist/dev/locales/hu-HU-37FDQFIS.js.map +7 -0
- package/dist/dev/locales/{id-ID-22TWZNLA.js → id-ID-EJIDCO4E.js} +245 -87
- package/dist/dev/locales/id-ID-EJIDCO4E.js.map +7 -0
- package/dist/dev/locales/{it-IT-MDEQ2SG3.js → it-IT-X34PIOJ2.js} +202 -44
- package/dist/dev/locales/it-IT-X34PIOJ2.js.map +7 -0
- package/dist/dev/locales/{ja-JP-K2DI4W6B.js → ja-JP-37FC23PR.js} +247 -89
- package/dist/dev/locales/ja-JP-37FC23PR.js.map +7 -0
- package/dist/dev/locales/{kaa-6BPSNM3R.js → kaa-7ZYDFVKA.js} +202 -44
- package/dist/dev/locales/kaa-7ZYDFVKA.js.map +7 -0
- package/dist/dev/locales/{kab-KAB-2S7ZURK7.js → kab-KAB-MILWXBA6.js} +210 -52
- package/dist/dev/locales/kab-KAB-MILWXBA6.js.map +7 -0
- package/dist/dev/locales/{kk-KZ-UJPYGRQQ.js → kk-KZ-7BWTPIAV.js} +175 -17
- package/dist/dev/locales/kk-KZ-7BWTPIAV.js.map +7 -0
- package/dist/dev/locales/{km-KH-M5T5JKUE.js → km-KH-BV4P2KSZ.js} +198 -40
- package/dist/dev/locales/km-KH-BV4P2KSZ.js.map +7 -0
- package/dist/dev/locales/{ko-KR-RQX37SNF.js → ko-KR-TSXE5P7B.js} +218 -60
- package/dist/dev/locales/ko-KR-TSXE5P7B.js.map +7 -0
- package/dist/dev/locales/{ku-TR-5XJDIERL.js → ku-TR-ASSXNN3U.js} +198 -40
- package/dist/dev/locales/ku-TR-ASSXNN3U.js.map +7 -0
- package/dist/dev/locales/{lt-LT-MGUBX6CA.js → lt-LT-G7RZYQQU.js} +179 -21
- package/dist/dev/locales/lt-LT-G7RZYQQU.js.map +7 -0
- package/dist/dev/locales/{lv-LV-MD7N5VHD.js → lv-LV-DXNPBJZU.js} +196 -38
- package/dist/dev/locales/lv-LV-DXNPBJZU.js.map +7 -0
- package/dist/dev/locales/{mr-IN-4XWMNGQC.js → mr-IN-7F2ZCTCF.js} +204 -46
- package/dist/dev/locales/mr-IN-7F2ZCTCF.js.map +7 -0
- package/dist/dev/locales/{my-MM-O4Z74GN5.js → my-MM-NBI3KQGW.js} +181 -23
- package/dist/dev/locales/my-MM-NBI3KQGW.js.map +7 -0
- package/dist/dev/locales/{nb-NO-BMB73KRH.js → nb-NO-4DCTQT6L.js} +220 -62
- package/dist/dev/locales/nb-NO-4DCTQT6L.js.map +7 -0
- package/dist/dev/locales/{nl-NL-F2257BLQ.js → nl-NL-XGZJ7V2V.js} +297 -139
- package/dist/dev/locales/nl-NL-XGZJ7V2V.js.map +7 -0
- package/dist/dev/locales/{nn-NO-NCORG7TS.js → nn-NO-FR534JV5.js} +201 -43
- package/dist/dev/locales/nn-NO-FR534JV5.js.map +7 -0
- package/dist/dev/locales/{oc-FR-ATFBDMF6.js → oc-FR-YQCIKZIK.js} +220 -62
- package/dist/dev/locales/oc-FR-YQCIKZIK.js.map +7 -0
- package/dist/dev/locales/{pa-IN-D2I375G4.js → pa-IN-UM43JGD2.js} +190 -32
- package/dist/dev/locales/pa-IN-UM43JGD2.js.map +7 -0
- package/dist/dev/locales/{percentages-YKFLWNK2.js → percentages-OGWD7R2K.js} +2 -2
- package/dist/dev/locales/{pl-PL-YJHOWAAW.js → pl-PL-2UGKA6HK.js} +214 -56
- package/dist/dev/locales/pl-PL-2UGKA6HK.js.map +7 -0
- package/dist/dev/locales/{pt-BR-APOPYZJ7.js → pt-BR-H23QFYE3.js} +237 -79
- package/dist/dev/locales/pt-BR-H23QFYE3.js.map +7 -0
- package/dist/dev/locales/pt-PT-RHKJH5I5.js +744 -0
- package/dist/dev/locales/pt-PT-RHKJH5I5.js.map +7 -0
- package/dist/dev/locales/{ro-RO-L575VRQA.js → ro-RO-IIFONL3T.js} +203 -45
- package/dist/dev/locales/ro-RO-IIFONL3T.js.map +7 -0
- package/dist/dev/locales/{ru-RU-BLG6HZG5.js → ru-RU-QEP6D7GK.js} +253 -95
- package/dist/dev/locales/ru-RU-QEP6D7GK.js.map +7 -0
- package/dist/dev/locales/si-LK-LZYJQLHF.js +744 -0
- package/dist/dev/locales/si-LK-LZYJQLHF.js.map +7 -0
- package/dist/dev/locales/{sk-SK-DY6IPO5U.js → sk-SK-RWC6UWGY.js} +200 -42
- package/dist/dev/locales/sk-SK-RWC6UWGY.js.map +7 -0
- package/dist/dev/locales/{sl-SI-5DZSRA47.js → sl-SI-QJT2CAUO.js} +197 -39
- package/dist/dev/locales/sl-SI-QJT2CAUO.js.map +7 -0
- package/dist/dev/locales/{sv-SE-V32YHALQ.js → sv-SE-3MAT3NDX.js} +202 -44
- package/dist/dev/locales/sv-SE-3MAT3NDX.js.map +7 -0
- package/dist/dev/locales/{ta-IN-5JRAGQAO.js → ta-IN-J7XOYF2T.js} +257 -99
- package/dist/dev/locales/ta-IN-J7XOYF2T.js.map +7 -0
- package/dist/dev/locales/{th-TH-55ACRHDJ.js → th-TH-2OI52EOQ.js} +289 -131
- package/dist/dev/locales/th-TH-2OI52EOQ.js.map +7 -0
- package/dist/dev/locales/{tr-TR-7QYBXDBO.js → tr-TR-G7TAUHUI.js} +257 -99
- package/dist/dev/locales/tr-TR-G7TAUHUI.js.map +7 -0
- package/dist/dev/locales/{uk-UA-TJS2TMRH.js → uk-UA-IVSVBJIG.js} +229 -71
- package/dist/dev/locales/uk-UA-IVSVBJIG.js.map +7 -0
- package/dist/dev/locales/{si-LK-KT7GGO6D.js → uz-UZ-KCVDUVDE.js} +212 -54
- package/dist/dev/locales/uz-UZ-KCVDUVDE.js.map +7 -0
- package/dist/dev/locales/vi-VN-KBZAVWP5.js +744 -0
- package/dist/dev/locales/vi-VN-KBZAVWP5.js.map +7 -0
- package/dist/dev/locales/{zh-CN-4MXUOFTH.js → zh-CN-IS26RG2D.js} +199 -41
- package/dist/dev/locales/zh-CN-IS26RG2D.js.map +7 -0
- package/dist/dev/locales/{zh-HK-RBTGIU3U.js → zh-HK-KBWQ6SJC.js} +175 -17
- package/dist/dev/locales/zh-HK-KBWQ6SJC.js.map +7 -0
- package/dist/dev/locales/{zh-TW-U5VF4CCU.js → zh-TW-JKJWJQ4J.js} +204 -46
- package/dist/dev/locales/zh-TW-JKJWJQ4J.js.map +7 -0
- package/dist/dev/subset-shared.chunk.js +2 -2
- package/dist/dev/subset-worker.chunk.js +2 -2
- package/dist/prod/chunk-AJI3LATG.js +1 -0
- package/dist/prod/chunk-COMIBRVY.js +12 -0
- package/dist/prod/chunk-R7EP47KM.js +4 -0
- package/dist/prod/{chunk-LS7FJGPW.js → chunk-Z5NKEFVG.js} +8 -8
- package/dist/prod/data/{image-53OPA26C.js → image-WVUQOLPF.js} +1 -1
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +35 -25
- package/dist/prod/locales/ar-SA-IYHKZRSE.js +8 -0
- package/dist/prod/locales/az-AZ-WL5GYRHK.js +1 -0
- package/dist/prod/locales/bg-BG-FXZYTRPD.js +5 -0
- package/dist/prod/locales/bn-BD-KO6YL5G2.js +3 -0
- package/dist/prod/locales/bn-IN-PC6JHKYB.js +3 -0
- package/dist/prod/locales/ca-ES-AREX5NEO.js +8 -0
- package/dist/prod/locales/cs-CZ-HXAZMFYH.js +7 -0
- package/dist/prod/locales/da-DK-5X7ZLFU3.js +2 -0
- package/dist/prod/locales/de-CH-76ZNVSOF.js +7 -0
- package/dist/prod/locales/de-DE-G3JVZ4MQ.js +7 -0
- package/dist/prod/locales/el-GR-4AZTZGY6.js +7 -0
- package/dist/prod/locales/en-TSRAEZ4E.js +1 -0
- package/dist/prod/locales/es-ES-ART7BI3G.js +7 -0
- package/dist/prod/locales/eu-ES-BIF4XBMT.js +7 -0
- package/dist/prod/locales/fa-IR-D4HHKAAI.js +9 -0
- package/dist/prod/locales/fi-FI-O35ZY7UI.js +6 -0
- package/dist/prod/locales/fr-FR-XEFNCM4I.js +12 -0
- package/dist/prod/locales/gl-ES-U4NYM3X5.js +6 -0
- package/dist/prod/locales/he-IL-656ABAVQ.js +8 -0
- package/dist/prod/locales/hi-IN-Z55GAFFR.js +3 -0
- package/dist/prod/locales/hu-HU-UJ62DVIW.js +3 -0
- package/dist/prod/locales/id-ID-FLZFU3OO.js +8 -0
- package/dist/prod/locales/it-IT-GIGIGIBJ.js +12 -0
- package/dist/prod/locales/ja-JP-43VXGDWI.js +7 -0
- package/dist/prod/locales/kaa-L3IMSDYL.js +1 -0
- package/dist/prod/locales/kab-KAB-XKPWJLNL.js +4 -0
- package/dist/prod/locales/kk-KZ-SXPDDY2H.js +1 -0
- package/dist/prod/locales/km-KH-DOS4CPGC.js +7 -0
- package/dist/prod/locales/ko-KR-BGC6VCY4.js +5 -0
- package/dist/prod/locales/ku-TR-J7IUITIA.js +6 -0
- package/dist/prod/locales/lt-LT-AC3LV5KG.js +3 -0
- package/dist/prod/locales/lv-LV-I6AY7QG2.js +4 -0
- package/dist/prod/locales/mr-IN-5SP4HV5B.js +9 -0
- package/dist/prod/locales/my-MM-S7ECRBYZ.js +1 -0
- package/dist/prod/locales/nb-NO-6PNHTF4R.js +8 -0
- package/dist/prod/locales/nl-NL-R4C4SUIG.js +13 -0
- package/dist/prod/locales/nn-NO-3TFXTM7Y.js +4 -0
- package/dist/prod/locales/oc-FR-IK6GIE7H.js +4 -0
- package/dist/prod/locales/pa-IN-YAKHYJET.js +4 -0
- package/dist/prod/locales/percentages-OL6W367U.js +1 -0
- package/dist/prod/locales/pl-PL-BIY22ZWU.js +12 -0
- package/dist/prod/locales/pt-BR-Q23NUPD6.js +6 -0
- package/dist/prod/locales/pt-PT-LOPEJLPJ.js +8 -0
- package/dist/prod/locales/ro-RO-W3D2ZATV.js +12 -0
- package/dist/prod/locales/ru-RU-DCTW7QSH.js +10 -0
- package/dist/prod/locales/si-LK-FYRRHO3C.js +1 -0
- package/dist/prod/locales/sk-SK-MC7UOHQO.js +7 -0
- package/dist/prod/locales/sl-SI-L6B6HFY5.js +6 -0
- package/dist/prod/locales/sv-SE-KMY6L2BA.js +8 -0
- package/dist/prod/locales/ta-IN-ZQCYE2JK.js +6 -0
- package/dist/prod/locales/th-TH-WS7ECBAV.js +1 -0
- package/dist/prod/locales/tr-TR-S5FI7JRW.js +4 -0
- package/dist/prod/locales/uk-UA-4EZUWUSQ.js +6 -0
- package/dist/prod/locales/uz-UZ-OKHL6AFA.js +1 -0
- package/dist/prod/locales/vi-VN-K34TWHF7.js +7 -0
- package/dist/prod/locales/zh-CN-JE4UZWNO.js +11 -0
- package/dist/prod/locales/zh-HK-RM35YDXX.js +1 -0
- package/dist/prod/locales/zh-TW-ONGLV6Y5.js +9 -0
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/bounds.d.ts +10 -0
- package/dist/types/common/src/colors.d.ts +59 -39
- package/dist/types/common/src/constants.d.ts +33 -26
- package/dist/types/common/src/editorInterface.d.ts +34 -0
- package/dist/types/common/src/font-metadata.d.ts +1 -3
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/keys.d.ts +1 -1
- package/dist/types/common/src/utility-types.d.ts +0 -1
- package/dist/types/common/src/utils.d.ts +49 -34
- package/dist/types/element/src/Scene.d.ts +9 -5
- package/dist/types/element/src/binding.d.ts +58 -44
- package/dist/types/element/src/bounds.d.ts +3 -11
- package/dist/types/element/src/collision.d.ts +6 -2
- package/dist/types/element/src/comparisons.d.ts +7 -7
- package/dist/types/element/src/delta.d.ts +6 -3
- package/dist/types/element/src/dragElements.d.ts +3 -3
- package/dist/types/element/src/duplicate.d.ts +3 -3
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +5 -1
- package/dist/types/element/src/heading.d.ts +2 -1
- package/dist/types/element/src/image.d.ts +1 -11
- package/dist/types/element/src/index.d.ts +2 -3
- package/dist/types/element/src/linearElementEditor.d.ts +16 -20
- package/dist/types/element/src/mutateElement.d.ts +3 -1
- package/dist/types/element/src/newElement.d.ts +6 -6
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +4 -7
- package/dist/types/element/src/resizeElements.d.ts +10 -10
- package/dist/types/element/src/resizeTest.d.ts +6 -5
- package/dist/types/element/src/selection.d.ts +3 -7
- package/dist/types/element/src/shape.d.ts +8 -7
- 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/textMeasurements.d.ts +1 -3
- package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
- package/dist/types/element/src/transformHandles.d.ts +8 -27
- package/dist/types/element/src/typeChecks.d.ts +4 -7
- package/dist/types/element/src/types.d.ts +7 -11
- package/dist/types/element/src/utils.d.ts +5 -2
- package/dist/types/element/src/zindex.d.ts +7 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +93 -136
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +67 -96
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +402 -758
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +86 -856
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +32 -47
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +107 -156
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +28 -45
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +66 -95
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +33 -48
- package/dist/types/excalidraw/actions/actionExport.d.ts +144 -1104
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
- package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionFrame.d.ts +213 -308
- package/dist/types/excalidraw/actions/actionGroup.d.ts +70 -107
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +123 -178
- package/dist/types/excalidraw/actions/actionLink.d.ts +30 -45
- package/dist/types/excalidraw/actions/actionMenu.d.ts +27 -410
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
- package/dist/types/excalidraw/actions/actionProperties.d.ts +129 -2488
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +35 -54
- package/dist/types/excalidraw/actions/actionStyles.d.ts +32 -47
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +32 -47
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +32 -47
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +25 -42
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +32 -47
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +32 -47
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +33 -48
- package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -3
- package/dist/types/excalidraw/actions/index.d.ts +2 -2
- package/dist/types/excalidraw/actions/register.d.ts +2 -2
- package/dist/types/excalidraw/actions/types.d.ts +4 -4
- package/dist/types/excalidraw/appState.d.ts +12 -7
- package/dist/types/excalidraw/clipboard.d.ts +55 -16
- package/dist/types/excalidraw/components/Actions.d.ts +22 -5
- package/dist/types/excalidraw/components/App.d.ts +67 -65
- package/dist/types/excalidraw/components/ButtonIconCycle.d.ts +1 -1
- package/dist/types/excalidraw/components/Card.d.ts +1 -3
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
- 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/ColorPicker/colorPickerUtils.d.ts +0 -1
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -3
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
- package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
- package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -2
- package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
- package/dist/types/excalidraw/components/FilledButton.d.ts +2 -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/FontPicker/keyboardNavHandlers.d.ts +0 -1
- package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -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/LibraryMenuControlButtons.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
- package/dist/types/excalidraw/components/LinkButton.d.ts +4 -0
- package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
- package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
- package/dist/types/excalidraw/components/Modal.d.ts +0 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
- 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/RadioGroup.d.ts +0 -1
- package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
- package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
- package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
- package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
- package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +27 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +26 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +4 -25
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +2 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +8 -0
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
- package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +91 -0
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
- package/dist/types/excalidraw/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/Toast.d.ts +3 -3
- package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/dist/types/excalidraw/components/Trans.d.ts +2 -2
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -32
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +6 -5
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +10 -18
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +3 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
- package/dist/types/excalidraw/components/icons.d.ts +26 -12
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +4 -3
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +25 -30
- package/dist/types/excalidraw/components/shapes.d.ts +129 -1
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
- package/dist/types/excalidraw/data/blob.d.ts +324 -10
- package/dist/types/excalidraw/data/encode.d.ts +4 -4
- package/dist/types/excalidraw/data/encryption.d.ts +5 -5
- package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
- package/dist/types/excalidraw/data/index.d.ts +3 -3
- package/dist/types/excalidraw/data/json.d.ts +159 -2
- package/dist/types/excalidraw/data/library.d.ts +24 -9
- package/dist/types/excalidraw/data/restore.d.ts +27 -7
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
- package/dist/types/excalidraw/errors.d.ts +14 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
- package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/i18n.d.ts +2 -2
- package/dist/types/excalidraw/index.d.ts +6 -7
- package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
- package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
- package/dist/types/excalidraw/scene/export.d.ts +2 -2
- package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
- package/dist/types/excalidraw/scene/types.d.ts +22 -5
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/excalidraw/snapping.d.ts +5 -5
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
- package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
- package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
- package/dist/types/excalidraw/types.d.ts +32 -20
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
- package/dist/types/math/src/polygon.d.ts +2 -2
- package/dist/types/math/src/range.d.ts +1 -3
- package/dist/types/math/src/segment.d.ts +4 -3
- package/dist/types/utils/src/bbox.d.ts +1 -1
- package/dist/types/utils/src/export.d.ts +5 -5
- package/dist/types/utils/src/shape.d.ts +6 -6
- package/dist/types/utils/src/withinBounds.d.ts +2 -2
- package/history.ts +1 -1
- package/package.json +7 -8
- package/dist/dev/chunk-FRLWKCNE.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-YZO7PSYQ.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/{chunk-CP5DND7P.js.map → chunk-Y3BTNZQY.js.map} +0 -0
- /package/dist/dev/data/{image-T2LJEHDP.js.map → image-2BHUUSLM.js.map} +0 -0
- /package/dist/dev/locales/{en-SMAPCEOQ.js.map → en-JRVQ7H6V.js.map} +0 -0
- /package/dist/dev/locales/{percentages-YKFLWNK2.js.map → percentages-OGWD7R2K.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
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
|
-
import type { MaybePromise } from "./utility-types";
|
|
3
|
+
import type { MaybePromise, ResolutionType } from "./utility-types";
|
|
4
4
|
import type { EVENT } from "./constants";
|
|
5
5
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
6
6
|
export declare const getDateTime: () => string;
|
|
7
7
|
export declare const capitalizeString: (str: string) => string;
|
|
8
8
|
export declare const isToolIcon: (target: Element | EventTarget | null) => target is HTMLElement;
|
|
9
|
-
export declare const isInputLike: (target: Element | EventTarget | null) => target is
|
|
9
|
+
export declare const isInputLike: (target: Element | EventTarget | null) => target is HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLBRElement | HTMLDivElement;
|
|
10
10
|
export declare const isInteractive: (target: Element | EventTarget | null) => boolean;
|
|
11
|
-
export declare const isWritableElement: (target: Element | EventTarget | null) => target is
|
|
11
|
+
export declare const isWritableElement: (target: Element | EventTarget | null) => target is HTMLInputElement | HTMLTextAreaElement | HTMLBRElement | HTMLDivElement;
|
|
12
12
|
export declare const getFontFamilyString: ({ fontFamily, }: {
|
|
13
13
|
fontFamily: FontFamilyValues;
|
|
14
14
|
}) => string;
|
|
@@ -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;
|
|
@@ -69,17 +71,20 @@ export declare const easeToValuesRAF: <T extends Record<keyof T, number>, K exte
|
|
|
69
71
|
* Interpolate a single value.
|
|
70
72
|
* Return undefined to be handled by the default interpolator.
|
|
71
73
|
*/
|
|
72
|
-
interpolateValue?: (
|
|
74
|
+
interpolateValue?: (fromValue: number, toValue: number,
|
|
75
|
+
/** no easing applied */
|
|
76
|
+
progress: number, key: K) => number | undefined;
|
|
73
77
|
onStep: (values: T) => void;
|
|
74
|
-
duration?: number
|
|
75
|
-
onStart?: (
|
|
76
|
-
onEnd?: (
|
|
77
|
-
onCancel?: (
|
|
78
|
+
duration?: number;
|
|
79
|
+
onStart?: () => void;
|
|
80
|
+
onEnd?: () => void;
|
|
81
|
+
onCancel?: () => void;
|
|
78
82
|
}) => () => void;
|
|
79
|
-
export declare const chunk: <T extends
|
|
83
|
+
export declare const chunk: <T extends any>(array: readonly T[], size: number) => T[][];
|
|
80
84
|
export declare const selectNode: (node: Element) => void;
|
|
81
85
|
export declare const removeSelection: () => void;
|
|
82
86
|
export declare const distance: (x: number, y: number) => number;
|
|
87
|
+
export declare const isSelectionLikeTool: (type: ToolType | "custom") => type is "selection" | "lasso";
|
|
83
88
|
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: (({
|
|
84
89
|
type: ToolType;
|
|
85
90
|
} | {
|
|
@@ -94,7 +99,6 @@ export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">,
|
|
|
94
99
|
export declare const isFullScreen: () => boolean;
|
|
95
100
|
export declare const allowFullScreen: () => Promise<void>;
|
|
96
101
|
export declare const exitFullScreen: () => Promise<void>;
|
|
97
|
-
export declare const getShortcutKey: (shortcut: string) => string;
|
|
98
102
|
export declare const viewportCoordsToSceneCoords: ({ clientX, clientY }: {
|
|
99
103
|
clientX: number;
|
|
100
104
|
clientY: number;
|
|
@@ -138,9 +142,7 @@ export declare const muteFSAbortError: (error?: Error) => void;
|
|
|
138
142
|
export declare const findIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
139
143
|
export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
140
144
|
/** returns the first non-null mapped value */
|
|
141
|
-
export declare const mapFind: <T, K>(collection: readonly T[], iteratee: (value: T, index: number) => K |
|
|
142
|
-
export declare const isTransparent: (color: string) => boolean;
|
|
143
|
-
export declare const isBindingFallthroughEnabled: (el: ExcalidrawBindableElement) => boolean;
|
|
145
|
+
export declare const mapFind: <T, K>(collection: readonly T[], iteratee: (value: T, index: number) => K | undefined | null) => K | undefined;
|
|
144
146
|
export type ResolvablePromise<T> = Promise<T> & {
|
|
145
147
|
resolve: [T] extends [undefined] ? (value?: MaybePromise<Awaited<T>>) => void : (value: MaybePromise<Awaited<T>>) => void;
|
|
146
148
|
reject: (error: Error) => void;
|
|
@@ -158,16 +160,16 @@ export declare const getUpdatedTimestamp: () => number;
|
|
|
158
160
|
* Transforms array of objects containing `id` attribute,
|
|
159
161
|
* or array of ids (strings), into a Map, keyd by `id`.
|
|
160
162
|
*/
|
|
161
|
-
export declare const arrayToMap: <T extends
|
|
163
|
+
export declare const arrayToMap: <T extends {
|
|
162
164
|
id: string;
|
|
163
|
-
}>(items: Map<string, T>
|
|
165
|
+
} | string>(items: readonly T[] | Map<string, T>) => Map<string, T>;
|
|
164
166
|
export declare const arrayToMapWithIndex: <T extends {
|
|
165
167
|
id: string;
|
|
166
168
|
}>(elements: readonly T[]) => Map<string, [element: T, index: number]>;
|
|
167
169
|
/**
|
|
168
170
|
* Transform array into an object, use only when array order is irrelevant.
|
|
169
171
|
*/
|
|
170
|
-
export declare const arrayToObject: <T>(array: readonly T[], groupBy?: (
|
|
172
|
+
export declare const arrayToObject: <T>(array: readonly T[], groupBy?: (value: T) => string | number) => {
|
|
171
173
|
[key: string]: T;
|
|
172
174
|
};
|
|
173
175
|
/** Doubly linked node */
|
|
@@ -183,11 +185,11 @@ export declare const arrayToList: <T>(array: readonly T[]) => Node<T>[];
|
|
|
183
185
|
* Converts a readonly array or map into an iterable.
|
|
184
186
|
* Useful for avoiding entry allocations when iterating object / map on each iteration.
|
|
185
187
|
*/
|
|
186
|
-
export declare const toIterable: <T>(values: ReadonlyMap<string, T>
|
|
188
|
+
export declare const toIterable: <T>(values: readonly T[] | ReadonlyMap<string, T>) => Iterable<T>;
|
|
187
189
|
/**
|
|
188
190
|
* Converts a readonly array or map into an array.
|
|
189
191
|
*/
|
|
190
|
-
export declare const toArray: <T>(values: ReadonlyMap<string, T>
|
|
192
|
+
export declare const toArray: <T>(values: readonly T[] | ReadonlyMap<string, T>) => T[];
|
|
191
193
|
export declare const isTestEnv: () => boolean;
|
|
192
194
|
export declare const isDevEnv: () => boolean;
|
|
193
195
|
export declare const isProdEnv: () => boolean;
|
|
@@ -199,18 +201,18 @@ export declare const updateObject: <T extends Record<string, any>>(obj: T, updat
|
|
|
199
201
|
export declare const isPrimitive: (val: any) => boolean;
|
|
200
202
|
export declare const getFrame: () => "top" | "iframe";
|
|
201
203
|
export declare const isRunningInIframe: () => boolean;
|
|
202
|
-
export declare const isPromiseLike: (value: any) => value is Promise<
|
|
204
|
+
export declare const isPromiseLike: (value: any) => value is Promise<ResolutionType<typeof value>>;
|
|
203
205
|
export declare const queryFocusableElements: (container: HTMLElement | null) => HTMLElement[];
|
|
204
206
|
/**
|
|
205
207
|
* Returns whether object/array is shallow equal.
|
|
206
208
|
* Considers empty object/arrays as equal (whether top-level or second-level).
|
|
207
209
|
*/
|
|
208
|
-
export declare const isShallowEqual: <T extends Record<string, any>, K extends readonly unknown[]>(objA: T, objB: T, comparators?: { [key in keyof T]?: (
|
|
210
|
+
export declare const isShallowEqual: <T extends Record<string, any>, K extends readonly unknown[]>(objA: T, objB: T, comparators?: { [key in keyof T]?: (a: T[key], b: T[key]) => boolean; } | (keyof T extends K[number] ? K extends readonly (keyof T)[] ? K : {
|
|
209
211
|
_error: "keys are either missing or include keys not in compared obj";
|
|
210
212
|
} : {
|
|
211
213
|
_error: "keys are either missing or include keys not in compared obj";
|
|
212
|
-
})
|
|
213
|
-
export declare const composeEventHandlers: <E>(originalEventHandler?: (
|
|
214
|
+
}), debug?: boolean) => boolean;
|
|
215
|
+
export declare const composeEventHandlers: <E>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
|
|
214
216
|
checkForDefaultPrevented?: boolean | undefined;
|
|
215
217
|
}) => (event: E) => void;
|
|
216
218
|
/**
|
|
@@ -222,11 +224,15 @@ export declare function invariant(condition: any, message: string): asserts cond
|
|
|
222
224
|
/**
|
|
223
225
|
* Memoizes on values of `opts` object (strict equality).
|
|
224
226
|
*/
|
|
225
|
-
export declare const memoize: <T extends Record<string, any>, R extends
|
|
227
|
+
export declare const memoize: <T extends Record<string, any>, R extends any>(func: (opts: T) => R) => typeof func & {
|
|
226
228
|
clear: () => void;
|
|
227
229
|
};
|
|
228
230
|
/** Checks if value is inside given collection. Useful for type-safety. */
|
|
229
|
-
export declare const isMemberOf: <T extends string>(
|
|
231
|
+
export declare const isMemberOf: <T extends string>(
|
|
232
|
+
/** Set/Map/Array/Object */
|
|
233
|
+
collection: Set<T> | readonly T[] | Record<T, any> | Map<T, any>,
|
|
234
|
+
/** value to look for */
|
|
235
|
+
value: string) => value is T;
|
|
230
236
|
export declare const cloneJSON: <T>(obj: T) => T;
|
|
231
237
|
export declare const updateStable: <T extends any[] | Record<string, any>>(prevValue: T, nextValue: T) => T;
|
|
232
238
|
export declare function addEventListener<K extends keyof WindowEventMap>(target: Window & typeof globalThis, type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): UnsubscribeCallback;
|
|
@@ -237,21 +243,25 @@ export declare function addEventListener<K extends keyof FontFaceSetEventMap>(ta
|
|
|
237
243
|
export declare function addEventListener<K extends keyof HTMLElementEventMap>(target: Document | (Window & typeof globalThis) | HTMLElement | undefined | null | false, type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): UnsubscribeCallback;
|
|
238
244
|
export declare function getSvgPathFromStroke(points: number[][], closed?: boolean): string;
|
|
239
245
|
export declare const normalizeEOL: (str: string) => string;
|
|
240
|
-
type HasBrand<T> = {
|
|
241
|
-
[K in keyof T]: K extends `~brand${infer _}` ? true : never;
|
|
246
|
+
export type HasBrand<T> = {
|
|
247
|
+
[K in keyof T]: K extends `~brand${infer _}` | "_brand" ? true : never;
|
|
242
248
|
}[keyof T];
|
|
243
249
|
type RemoveAllBrands<T> = HasBrand<T> extends true ? {
|
|
244
|
-
[K in keyof T as K extends `~brand~${infer _}` ? never : K]: T[K];
|
|
245
|
-
} :
|
|
246
|
-
type
|
|
250
|
+
[K in keyof T as K extends `~brand~${infer _}` | "_brand" ? never : K]: T[K];
|
|
251
|
+
} : T;
|
|
252
|
+
type UnbrandForValue<T> = T extends Map<infer E, infer F> ? Map<UnbrandForValue<E>, UnbrandForValue<F>> : T extends Set<infer E> ? Set<UnbrandForValue<E>> : T extends readonly any[] ? T extends any[] ? unknown[] : readonly unknown[] : RemoveAllBrands<T>;
|
|
253
|
+
export type Unbrand<T> = T extends Map<infer E, infer F> ? Map<Unbrand<E>, Unbrand<F>> : T extends Set<infer E> ? Set<Unbrand<E>> : T extends readonly (infer E)[] ? Array<Unbrand<E>> : RemoveAllBrands<T>;
|
|
254
|
+
export type CombineBrands<BrandedType, CurrentType> = BrandedType extends readonly (infer BE)[] ? CurrentType extends readonly (infer CE)[] ? Array<CE & BE> : CurrentType & BrandedType : CurrentType & BrandedType;
|
|
255
|
+
export type CombineBrandsIfNeeded<T, Required> = [T] extends [Required] ? T[] : HasBrand<T> extends true ? CombineBrands<T, Required>[] : Required[];
|
|
247
256
|
/**
|
|
248
257
|
* Makes type into a branded type, ensuring that value is assignable to
|
|
249
|
-
* the base
|
|
258
|
+
* the base unbranded type. Optionally you can explicitly supply current value
|
|
250
259
|
* type to combine both (useful for composite branded types. Make sure you
|
|
251
260
|
* compose branded types which are not composite themselves.)
|
|
252
261
|
*/
|
|
253
|
-
export declare
|
|
254
|
-
export declare
|
|
262
|
+
export declare function toBrandedType<BrandedType>(value: UnbrandForValue<BrandedType>): BrandedType;
|
|
263
|
+
export declare function toBrandedType<BrandedType, CurrentType>(value: CurrentType): CombineBrands<BrandedType, CurrentType>;
|
|
264
|
+
export declare const promiseTry: <TValue, TArgs extends unknown[]>(fn: (...args: TArgs) => PromiseLike<TValue> | TValue, ...args: TArgs) => Promise<TValue>;
|
|
255
265
|
export declare const isAnyTrue: (...args: boolean[]) => boolean;
|
|
256
266
|
export declare const safelyParseJSON: (json: string) => Record<string, any> | null;
|
|
257
267
|
/**
|
|
@@ -263,5 +273,10 @@ export declare const castArray: <T>(value: T | T[]) => T[];
|
|
|
263
273
|
/** hack for Array.isArray type guard not working with readonly value[] */
|
|
264
274
|
export declare const isReadonlyArray: (value?: any) => value is readonly any[];
|
|
265
275
|
export declare const sizeOf: (value: readonly unknown[] | Readonly<Map<string, unknown>> | Readonly<Record<string, unknown>> | ReadonlySet<unknown>) => number;
|
|
266
|
-
export declare const reduceToCommonValue: <T, R = T>(collection:
|
|
276
|
+
export declare const reduceToCommonValue: <T, R = T>(collection: readonly T[] | ReadonlySet<T>, getValue?: (item: T) => R) => R | null;
|
|
277
|
+
type FEATURE_FLAGS = {
|
|
278
|
+
COMPLEX_BINDINGS: boolean;
|
|
279
|
+
};
|
|
280
|
+
export declare const getFeatureFlag: <F extends keyof FEATURE_FLAGS>(flag: F) => FEATURE_FLAGS[F];
|
|
281
|
+
export declare const setFeatureFlag: <F extends keyof FEATURE_FLAGS>(flag: F, value: FEATURE_FLAGS[F]) => void;
|
|
267
282
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ElementUpdate } from "@excalidraw/element";
|
|
2
|
-
import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawFrameLikeElement, ElementsMapOrArray, OrderedExcalidrawElement, Ordered } from "@excalidraw/element/types";
|
|
2
|
+
import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawFrameLikeElement, ElementsMapOrArray, SceneElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, Ordered } from "@excalidraw/element/types";
|
|
3
3
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
4
4
|
import type { AppState } from "../../excalidraw/types";
|
|
5
5
|
type SceneStateCallback = () => void;
|
|
@@ -22,12 +22,14 @@ export declare class Scene {
|
|
|
22
22
|
*/
|
|
23
23
|
private sceneNonce;
|
|
24
24
|
getSceneNonce(): number | undefined;
|
|
25
|
-
getNonDeletedElementsMap():
|
|
25
|
+
getNonDeletedElementsMap(): NonDeletedSceneElementsMap;
|
|
26
26
|
getElementsIncludingDeleted(): readonly OrderedExcalidrawElement[];
|
|
27
|
-
getElementsMapIncludingDeleted():
|
|
27
|
+
getElementsMapIncludingDeleted(): 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,68 +1,81 @@
|
|
|
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
|
+
import type { Bounds } from "@excalidraw/common";
|
|
4
5
|
import { type Heading } from "./heading";
|
|
5
6
|
import type { Scene } from "./Scene";
|
|
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
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
export declare const bindOrUnbindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, draggingPoints: PointsPositionUpdates, scenePointerX: number, scenePointerY: number, scene: Scene, appState: AppState, opts?: {
|
|
34
|
+
newArrow?: boolean;
|
|
35
|
+
altKey?: boolean;
|
|
36
|
+
angleLocked?: boolean;
|
|
37
|
+
initialBinding?: boolean;
|
|
38
|
+
}) => {
|
|
39
|
+
start: BindingStrategy;
|
|
40
|
+
end: BindingStrategy;
|
|
41
|
+
};
|
|
42
|
+
export declare const getBindingStrategyForDraggingBindingElementEndpoints: (arrow: NonDeleted<ExcalidrawArrowElement>, draggingPoints: PointsPositionUpdates, screenPointerX: number, screenPointerY: number, elementsMap: NonDeletedSceneElementsMap, elements: readonly Ordered<NonDeletedExcalidrawElement>[], appState: AppState, opts?: {
|
|
43
|
+
newArrow?: boolean;
|
|
44
|
+
angleLocked?: boolean;
|
|
45
|
+
altKey?: boolean;
|
|
46
|
+
finalize?: boolean;
|
|
47
|
+
initialBinding?: boolean;
|
|
48
|
+
zoom?: AppState["zoom"];
|
|
49
|
+
}) => {
|
|
50
|
+
start: BindingStrategy;
|
|
51
|
+
end: BindingStrategy;
|
|
52
|
+
};
|
|
53
|
+
export declare const bindOrUnbindBindingElements: (selectedArrows: NonDeleted<ExcalidrawArrowElement>[], scene: Scene, appState: AppState) => void;
|
|
54
|
+
export declare const bindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, hoveredElement: ExcalidrawBindableElement, mode: BindMode, startOrEnd: "start" | "end", scene: Scene, focusPoint?: GlobalPoint) => void;
|
|
55
|
+
export declare const unbindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, startOrEnd: "start" | "end", scene: Scene) => ExcalidrawBindableElement["id"] | null;
|
|
36
56
|
export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement, scene: Scene, options?: {
|
|
37
57
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
38
|
-
newSize?: {
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
};
|
|
42
58
|
changedElements?: Map<string, ExcalidrawElement>;
|
|
43
59
|
}) => void;
|
|
44
|
-
export declare const updateBindings: (latestElement: ExcalidrawElement, scene: Scene, options?: {
|
|
60
|
+
export declare const updateBindings: (latestElement: ExcalidrawElement, scene: Scene, appState: AppState, options?: {
|
|
45
61
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
46
62
|
newSize?: {
|
|
47
63
|
width: number;
|
|
48
64
|
height: number;
|
|
49
65
|
};
|
|
50
|
-
zoom?: AppState["zoom"];
|
|
51
66
|
}) => void;
|
|
52
67
|
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
|
|
68
|
+
export declare const bindPointToSnapToElementOutline: (arrowElement: ExcalidrawArrowElement, bindableElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, customIntersector?: LineSegment<GlobalPoint>) => GlobalPoint;
|
|
69
|
+
export declare const avoidRectangularCorner: (arrowElement: ExcalidrawArrowElement, bindTarget: ExcalidrawBindableElement, elementsMap: ElementsMap, p: GlobalPoint) => GlobalPoint;
|
|
70
|
+
export declare const updateBoundPoint: (arrow: NonDeleted<ExcalidrawArrowElement>, startOrEnd: "startBinding" | "endBinding", binding: FixedPointBinding | null | undefined, bindableElement: ExcalidrawBindableElement, elementsMap: ElementsMap, customIntersector?: LineSegment<GlobalPoint>) => LocalPoint | null;
|
|
56
71
|
export declare const calculateFixedPointForElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawElbowArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap) => {
|
|
57
72
|
fixedPoint: FixedPoint;
|
|
58
73
|
};
|
|
74
|
+
export declare const calculateFixedPointForNonElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, focusPoint?: GlobalPoint) => {
|
|
75
|
+
fixedPoint: FixedPoint;
|
|
76
|
+
};
|
|
59
77
|
export declare const fixDuplicatedBindingsAfterDuplication: (duplicatedElements: ExcalidrawElement[], origIdToDuplicateId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>, duplicateElementsMap: NonDeletedSceneElementsMap) => void;
|
|
60
78
|
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
79
|
export declare const bindingProperties: Set<BindableProp | BindingProp>;
|
|
67
80
|
export type BindableProp = "boundElements";
|
|
68
81
|
export type BindingProp = "frameId" | "containerId" | "startBinding" | "endBinding";
|
|
@@ -104,7 +117,8 @@ export declare class BindableElement {
|
|
|
104
117
|
*/
|
|
105
118
|
static rebindAffected: (elements: ElementsMap, bindableElement: ExcalidrawElement | undefined, updateElementWith: (affected: ExcalidrawElement, updates: ElementUpdate<ExcalidrawElement>) => void) => void;
|
|
106
119
|
}
|
|
107
|
-
export declare const getGlobalFixedPointForBindableElement: (fixedPointRatio:
|
|
108
|
-
export declare const getGlobalFixedPoints: (arrow:
|
|
120
|
+
export declare const getGlobalFixedPointForBindableElement: (fixedPointRatio: FixedPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap) => GlobalPoint;
|
|
121
|
+
export declare const getGlobalFixedPoints: (arrow: ExcalidrawArrowElement, elementsMap: ElementsMap) => [GlobalPoint, GlobalPoint];
|
|
109
122
|
export declare const getArrowLocalFixedPoints: (arrow: ExcalidrawElbowArrowElement, elementsMap: ElementsMap) => LocalPoint[];
|
|
110
123
|
export declare const normalizeFixedPoint: <T extends FixedPoint | null>(fixedPoint: T) => T extends null ? null : FixedPoint;
|
|
124
|
+
export declare const getBindingSideMidPoint: (binding: FixedPointBinding, elementsMap: ElementsMap) => GlobalPoint | LocalPoint | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Bounds } from "@excalidraw/common";
|
|
1
2
|
import type { Degrees, GlobalPoint, LineSegment, LocalPoint } from "@excalidraw/math";
|
|
2
3
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
3
4
|
import type { Drawable, Op } from "roughjs/bin/core";
|
|
@@ -9,15 +10,6 @@ export type RectangleBox = {
|
|
|
9
10
|
height: number;
|
|
10
11
|
angle: number;
|
|
11
12
|
};
|
|
12
|
-
/**
|
|
13
|
-
* x and y position of top left corner, x and y position of bottom right corner
|
|
14
|
-
*/
|
|
15
|
-
export type Bounds = readonly [
|
|
16
|
-
minX: number,
|
|
17
|
-
minY: number,
|
|
18
|
-
maxX: number,
|
|
19
|
-
maxY: number
|
|
20
|
-
];
|
|
21
13
|
export type SceneBounds = readonly [
|
|
22
14
|
sceneX: number,
|
|
23
15
|
sceneY: number,
|
|
@@ -45,7 +37,7 @@ export declare const getElementLineSegments: (element: ExcalidrawElement, elemen
|
|
|
45
37
|
export declare const getRectangleBoxAbsoluteCoords: (boxSceneCoords: RectangleBox) => number[];
|
|
46
38
|
export declare const getDiamondPoints: (element: ExcalidrawElement) => number[];
|
|
47
39
|
export declare const getCubicBezierCurveBound: (p0: GlobalPoint, p1: GlobalPoint, p2: GlobalPoint, p3: GlobalPoint) => Bounds;
|
|
48
|
-
export declare const getMinMaxXYFromCurvePathOps: (ops: Op[], transformXY?: (
|
|
40
|
+
export declare const getMinMaxXYFromCurvePathOps: (ops: Op[], transformXY?: (p: GlobalPoint) => GlobalPoint) => Bounds;
|
|
49
41
|
export declare const getBoundsFromPoints: (points: ExcalidrawFreeDrawElement["points"]) => Bounds;
|
|
50
42
|
/** @returns number in pixels */
|
|
51
43
|
export declare const getArrowheadSize: (arrowhead: Arrowhead) => number;
|
|
@@ -74,7 +66,7 @@ export interface BoundingBox {
|
|
|
74
66
|
width: number;
|
|
75
67
|
height: number;
|
|
76
68
|
}
|
|
77
|
-
export declare const getCommonBoundingBox: (elements: ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
|
|
69
|
+
export declare const getCommonBoundingBox: (elements: readonly ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
|
|
78
70
|
/**
|
|
79
71
|
* returns scene coords of user's editor viewport (visible canvas area) bounds
|
|
80
72
|
*/
|
|
@@ -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) => NonDeleted<ExcalidrawBindableElement>[];
|
|
18
|
+
export declare const getHoveredElementForBinding: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, toleranceFn?: (element: ExcalidrawBindableElement) => number) => 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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
|
-
export declare const hasBackground: (type: ElementOrToolType) =>
|
|
3
|
-
export declare const hasStrokeColor: (type: ElementOrToolType) =>
|
|
4
|
-
export declare const hasStrokeWidth: (type: ElementOrToolType) =>
|
|
5
|
-
export declare const hasStrokeStyle: (type: ElementOrToolType) =>
|
|
6
|
-
export declare const canChangeRoundness: (type: ElementOrToolType) =>
|
|
7
|
-
export declare const toolIsArrow: (type: ElementOrToolType) =>
|
|
8
|
-
export declare const canHaveArrowheads: (type: ElementOrToolType) =>
|
|
2
|
+
export declare const hasBackground: (type: ElementOrToolType) => type is "line" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "iframe" | "freedraw";
|
|
3
|
+
export declare const hasStrokeColor: (type: ElementOrToolType) => type is "line" | "arrow" | "text" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "freedraw";
|
|
4
|
+
export declare const hasStrokeWidth: (type: ElementOrToolType) => type is "line" | "arrow" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "iframe" | "freedraw";
|
|
5
|
+
export declare const hasStrokeStyle: (type: ElementOrToolType) => type is "line" | "arrow" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "iframe";
|
|
6
|
+
export declare const canChangeRoundness: (type: ElementOrToolType) => type is "line" | "rectangle" | "diamond" | "embeddable" | "iframe" | "image";
|
|
7
|
+
export declare const toolIsArrow: (type: ElementOrToolType) => type is "arrow";
|
|
8
|
+
export declare const canHaveArrowheads: (type: ElementOrToolType) => type is "arrow";
|
|
@@ -32,13 +32,13 @@ export declare class Delta<T> {
|
|
|
32
32
|
/**
|
|
33
33
|
* Merges two deltas into a new one.
|
|
34
34
|
*/
|
|
35
|
-
static merge<T>(delta1: Delta<T>, delta2: Delta<T>): Delta<T>;
|
|
35
|
+
static merge<T>(delta1: Delta<T>, delta2: Delta<T>, delta3?: Delta<T>): Delta<T>;
|
|
36
36
|
/**
|
|
37
37
|
* Merges deleted and inserted object partials.
|
|
38
38
|
*/
|
|
39
39
|
static mergeObjects<T extends {
|
|
40
40
|
[key: string]: unknown;
|
|
41
|
-
}>(prev: T, added: T, removed
|
|
41
|
+
}>(prev: T, added: T, removed?: T): T;
|
|
42
42
|
/**
|
|
43
43
|
* Merges deleted and inserted array partials.
|
|
44
44
|
*/
|
|
@@ -118,6 +118,7 @@ export interface DeltaContainer<T> {
|
|
|
118
118
|
export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
119
119
|
delta: Delta<ObservedAppState>;
|
|
120
120
|
private constructor();
|
|
121
|
+
static create(delta: Delta<ObservedAppState>): AppStateDelta;
|
|
121
122
|
static calculate<T extends ObservedAppState>(prevAppState: T, nextAppState: T): AppStateDelta;
|
|
122
123
|
static restore(appStateDeltaDTO: DTO<AppStateDelta>): AppStateDelta;
|
|
123
124
|
static empty(): AppStateDelta;
|
|
@@ -144,7 +145,7 @@ export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
|
144
145
|
}
|
|
145
146
|
type ElementPartial<TElement extends ExcalidrawElement = ExcalidrawElement> = Omit<Partial<Ordered<TElement>>, "id" | "updated" | "seed">;
|
|
146
147
|
export type ApplyToOptions = {
|
|
147
|
-
excludedProperties
|
|
148
|
+
excludedProperties?: Set<keyof ElementPartial>;
|
|
148
149
|
};
|
|
149
150
|
/**
|
|
150
151
|
* Elements change is a low level primitive to capture a change between two sets of elements.
|
|
@@ -163,6 +164,7 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
163
164
|
private static satisfiesRemoval;
|
|
164
165
|
private static satisfiesUpdate;
|
|
165
166
|
private static satisfiesCommmonInvariants;
|
|
167
|
+
private static satisfiesUniqueInvariants;
|
|
166
168
|
private static validate;
|
|
167
169
|
/**
|
|
168
170
|
* Calculates the `Delta`s between the previous and next set of elements.
|
|
@@ -212,6 +214,7 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
212
214
|
* should be rebound (if possible) with the current element ~ bindings should be bidirectional.
|
|
213
215
|
*/
|
|
214
216
|
private static rebindAffected;
|
|
217
|
+
static redrawElements(nextElements: SceneElementsMap, changedElements: Map<string, OrderedExcalidrawElement>): SceneElementsMap;
|
|
215
218
|
private static redrawTextBoundingBoxes;
|
|
216
219
|
private static redrawBoundArrows;
|
|
217
220
|
private static reorderElements;
|
|
@@ -24,10 +24,10 @@ export declare const dragNewElement: ({ newElement, elementType, originX, origin
|
|
|
24
24
|
scene: Scene;
|
|
25
25
|
/** whether to keep given aspect ratio when `isResizeWithSidesSameLength` is
|
|
26
26
|
true */
|
|
27
|
-
widthAspectRatio?: number | null
|
|
27
|
+
widthAspectRatio?: number | null;
|
|
28
28
|
originOffset?: {
|
|
29
29
|
x: number;
|
|
30
30
|
y: number;
|
|
31
|
-
} | null
|
|
32
|
-
informMutation?: boolean
|
|
31
|
+
} | null;
|
|
32
|
+
informMutation?: boolean;
|
|
33
33
|
}) => void;
|
|
@@ -17,12 +17,12 @@ import type { ExcalidrawElement, GroupId } from "./types";
|
|
|
17
17
|
export declare const duplicateElement: <TElement extends ExcalidrawElement>(editingGroupId: AppState["editingGroupId"], groupIdMapForOperation: Map<GroupId, GroupId>, element: TElement, randomizeSeed?: boolean) => Readonly<TElement>;
|
|
18
18
|
export declare const duplicateElements: (opts: {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
|
-
randomizeSeed?: boolean
|
|
21
|
-
overrides?: (
|
|
20
|
+
randomizeSeed?: boolean;
|
|
21
|
+
overrides?: (data: {
|
|
22
22
|
duplicateElement: ExcalidrawElement;
|
|
23
23
|
origElement: ExcalidrawElement;
|
|
24
24
|
origIdToDuplicateId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>;
|
|
25
|
-
}) => Partial<ExcalidrawElement
|
|
25
|
+
}) => Partial<ExcalidrawElement>;
|
|
26
26
|
} & ({
|
|
27
27
|
/**
|
|
28
28
|
* Duplicates all elements in array.
|
|
@@ -26,11 +26,11 @@ export declare class InvalidFractionalIndexError extends Error {
|
|
|
26
26
|
export declare const validateFractionalIndices: (elements: readonly ExcalidrawElement[], { shouldThrow, includeBoundTextValidation, ignoreLogs, reconciliationContext, }: {
|
|
27
27
|
shouldThrow: boolean;
|
|
28
28
|
includeBoundTextValidation: boolean;
|
|
29
|
-
ignoreLogs?: true
|
|
29
|
+
ignoreLogs?: true;
|
|
30
30
|
reconciliationContext?: {
|
|
31
31
|
localElements: ReadonlyArray<ExcalidrawElement>;
|
|
32
32
|
remoteElements: ReadonlyArray<ExcalidrawElement>;
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
34
|
}) => void;
|
|
35
35
|
/**
|
|
36
36
|
* Order the elements based on the fractional indices.
|
|
@@ -53,7 +53,11 @@ export declare const updateFrameMembershipOfSelectedElements: <T extends Element
|
|
|
53
53
|
* filters out elements that are inside groups that contain a frame element
|
|
54
54
|
* anywhere in the group tree
|
|
55
55
|
*/
|
|
56
|
-
export declare const omitGroupsContainingFrameLikes: (allElements: ElementsMapOrArray,
|
|
56
|
+
export declare const omitGroupsContainingFrameLikes: (allElements: ElementsMapOrArray,
|
|
57
|
+
/** subset of elements you want to filter. Optional perf optimization so we
|
|
58
|
+
* don't have to filter all elements unnecessarily
|
|
59
|
+
*/
|
|
60
|
+
selectedElements?: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
57
61
|
/**
|
|
58
62
|
* depending on the appState, return target frame, which is the frame the given element
|
|
59
63
|
* is going to be added to or remove from
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Bounds } from "@excalidraw/common";
|
|
1
2
|
import type { LocalPoint, GlobalPoint, Vector } from "@excalidraw/math";
|
|
2
3
|
import type { ExcalidrawBindableElement } from "./types";
|
|
3
4
|
export declare const HEADING_RIGHT: Heading;
|
|
@@ -11,5 +12,5 @@ export declare const headingForPointIsHorizontal: <P extends GlobalPoint | Local
|
|
|
11
12
|
export declare const compareHeading: (a: Heading, b: Heading) => boolean;
|
|
12
13
|
export declare const headingIsHorizontal: (a: Heading) => boolean;
|
|
13
14
|
export declare const headingIsVertical: (a: Heading) => boolean;
|
|
14
|
-
export declare const headingForPointFromElement: <Point extends GlobalPoint>(element: Readonly<ExcalidrawBindableElement>, aabb:
|
|
15
|
+
export declare const headingForPointFromElement: <Point extends GlobalPoint>(element: Readonly<ExcalidrawBindableElement>, aabb: Readonly<Bounds>, p: Readonly<Point>) => Heading;
|
|
15
16
|
export declare const flipHeading: (h: Heading) => Heading;
|
|
@@ -10,17 +10,7 @@ export declare const updateImageCache: ({ fileIds, files, imageCache, }: {
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
imageCache: Map<FileId, {
|
|
12
12
|
image: HTMLImageElement | Promise<HTMLImageElement>;
|
|
13
|
-
mimeType: import("
|
|
14
|
-
readonly svg: "image/svg+xml";
|
|
15
|
-
readonly png: "image/png";
|
|
16
|
-
readonly jpg: "image/jpeg";
|
|
17
|
-
readonly gif: "image/gif";
|
|
18
|
-
readonly webp: "image/webp";
|
|
19
|
-
readonly bmp: "image/bmp";
|
|
20
|
-
readonly ico: "image/x-icon";
|
|
21
|
-
readonly avif: "image/avif";
|
|
22
|
-
readonly jfif: "image/jfif";
|
|
23
|
-
}>;
|
|
13
|
+
mimeType: import("@excalidraw/common/utility-types").ValueOf<typeof import("@excalidraw/common").IMAGE_MIME_TYPES>;
|
|
24
14
|
}>;
|
|
25
15
|
/** includes errored files because they cache was updated nonetheless */
|
|
26
16
|
updatedFiles: Map<FileId, true>;
|