@myoc/excalidraw 0.19.502 → 0.19.504
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/CHANGELOG.md +586 -9
- package/README.md +111 -14
- package/dist/dev/{chunk-WBVI4CIR.js → chunk-KLM3KPI7.js} +26 -3
- package/dist/dev/chunk-KLM3KPI7.js.map +7 -0
- package/dist/dev/{chunk-ERXRO4IP.js → chunk-OF725VHI.js} +2 -2
- package/dist/dev/chunk-URPEKBQ3.js +69 -0
- package/dist/dev/chunk-URPEKBQ3.js.map +7 -0
- package/dist/dev/{chunk-WGIZZ2NT.js → chunk-Z5DMFRJ5.js} +60 -72
- package/dist/dev/chunk-Z5DMFRJ5.js.map +7 -0
- package/dist/dev/data/{image-BOZX7YCK.js → image-ZR5DXOGS.js} +3 -3
- package/dist/dev/index.css +225 -95
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +6949 -4013
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{ar-SA-B565KYUE.js → ar-SA-U3PIVEZH.js} +4 -2
- package/dist/dev/locales/{ar-SA-B565KYUE.js.map → ar-SA-U3PIVEZH.js.map} +2 -2
- package/dist/dev/locales/{az-AZ-2OH7OPJT.js → az-AZ-COAM4HVM.js} +3 -1
- package/dist/dev/locales/{az-AZ-2OH7OPJT.js.map → az-AZ-COAM4HVM.js.map} +2 -2
- package/dist/dev/locales/{bg-BG-MP6UWIVG.js → bg-BG-D6B2W7JL.js} +4 -2
- package/dist/dev/locales/{bg-BG-MP6UWIVG.js.map → bg-BG-D6B2W7JL.js.map} +2 -2
- package/dist/dev/locales/{bn-BD-WUCPUYTQ.js → bn-BD-BU7GZAZW.js} +3 -1
- package/dist/dev/locales/{bn-BD-WUCPUYTQ.js.map → bn-BD-BU7GZAZW.js.map} +2 -2
- package/dist/dev/locales/{bn-IN-QX4DSL53.js → bn-IN-MYKDEVNA.js} +3 -1
- package/dist/dev/locales/{bn-IN-QX4DSL53.js.map → bn-IN-MYKDEVNA.js.map} +2 -2
- package/dist/dev/locales/{ca-ES-KWEKW4C3.js → ca-ES-GEEW5L7T.js} +57 -3
- package/dist/dev/locales/{ca-ES-KWEKW4C3.js.map → ca-ES-GEEW5L7T.js.map} +2 -2
- package/dist/dev/locales/{cs-CZ-W5AHZB5H.js → cs-CZ-LNVE3QM5.js} +57 -3
- package/dist/dev/locales/{cs-CZ-W5AHZB5H.js.map → cs-CZ-LNVE3QM5.js.map} +2 -2
- package/dist/dev/locales/{da-DK-ITTM6YM4.js → da-DK-CAYJG7FJ.js} +56 -2
- package/dist/dev/locales/{da-DK-ITTM6YM4.js.map → da-DK-CAYJG7FJ.js.map} +2 -2
- package/dist/dev/locales/{de-CH-OAWPDQFJ.js → de-CH-GCXOD4LK.js} +63 -9
- package/dist/dev/locales/de-CH-GCXOD4LK.js.map +7 -0
- package/dist/dev/locales/{de-DE-ZRDYEPMS.js → de-DE-CGDBECYD.js} +57 -3
- package/dist/dev/locales/{de-DE-ZRDYEPMS.js.map → de-DE-CGDBECYD.js.map} +2 -2
- package/dist/dev/locales/{el-GR-QXASZLPE.js → el-GR-G5QZC24A.js} +57 -3
- package/dist/dev/locales/{el-GR-QXASZLPE.js.map → el-GR-G5QZC24A.js.map} +2 -2
- package/dist/dev/locales/{en-GV3XLAUG.js → en-I7VEBYIX.js} +4 -2
- package/dist/dev/locales/{es-ES-VLQBB7FJ.js → es-ES-UMEOH76W.js} +57 -3
- package/dist/dev/locales/{es-ES-VLQBB7FJ.js.map → es-ES-UMEOH76W.js.map} +2 -2
- package/dist/dev/locales/{eu-ES-TF2DGTZU.js → eu-ES-IWRZXJC5.js} +57 -3
- package/dist/dev/locales/{eu-ES-TF2DGTZU.js.map → eu-ES-IWRZXJC5.js.map} +2 -2
- package/dist/dev/locales/{fa-IR-ITKFQ7QV.js → fa-IR-QOYVIIJA.js} +57 -3
- package/dist/dev/locales/{fa-IR-ITKFQ7QV.js.map → fa-IR-QOYVIIJA.js.map} +2 -2
- package/dist/dev/locales/{fi-FI-UWZRVXFI.js → fi-FI-BXRW65OA.js} +57 -3
- package/dist/dev/locales/{fi-FI-UWZRVXFI.js.map → fi-FI-BXRW65OA.js.map} +2 -2
- package/dist/dev/locales/{fr-FR-A72LKGCO.js → fr-FR-R2QH5VCW.js} +57 -3
- package/dist/dev/locales/{fr-FR-A72LKGCO.js.map → fr-FR-R2QH5VCW.js.map} +2 -2
- package/dist/dev/locales/{gl-ES-2QCVIBFP.js → gl-ES-4ES3ZADP.js} +57 -3
- package/dist/dev/locales/{gl-ES-2QCVIBFP.js.map → gl-ES-4ES3ZADP.js.map} +2 -2
- package/dist/dev/locales/{he-IL-WJNUHU26.js → he-IL-TRQRRYPH.js} +57 -3
- package/dist/dev/locales/{he-IL-WJNUHU26.js.map → he-IL-TRQRRYPH.js.map} +2 -2
- package/dist/dev/locales/{hi-IN-XGMO235V.js → hi-IN-U46BOJEC.js} +66 -12
- package/dist/dev/locales/hi-IN-U46BOJEC.js.map +7 -0
- package/dist/dev/locales/{hu-HU-37FDQFIS.js → hu-HU-JDULJ6XL.js} +146 -92
- package/dist/dev/locales/hu-HU-JDULJ6XL.js.map +7 -0
- package/dist/dev/locales/{id-ID-EJIDCO4E.js → id-ID-BLIXNCUT.js} +57 -3
- package/dist/dev/locales/{id-ID-EJIDCO4E.js.map → id-ID-BLIXNCUT.js.map} +2 -2
- package/dist/dev/locales/{it-IT-X34PIOJ2.js → it-IT-6TBW7RUK.js} +57 -3
- package/dist/dev/locales/{it-IT-X34PIOJ2.js.map → it-IT-6TBW7RUK.js.map} +2 -2
- package/dist/dev/locales/{ja-JP-37FC23PR.js → ja-JP-6HYAQFYX.js} +57 -3
- package/dist/dev/locales/{ja-JP-37FC23PR.js.map → ja-JP-6HYAQFYX.js.map} +2 -2
- package/dist/dev/locales/{kaa-7ZYDFVKA.js → kaa-Z5UP62XJ.js} +56 -2
- package/dist/dev/locales/{kaa-7ZYDFVKA.js.map → kaa-Z5UP62XJ.js.map} +2 -2
- package/dist/dev/locales/{kab-KAB-MILWXBA6.js → kab-KAB-Z7STWQKS.js} +57 -3
- package/dist/dev/locales/{kab-KAB-MILWXBA6.js.map → kab-KAB-Z7STWQKS.js.map} +2 -2
- package/dist/dev/locales/{kk-KZ-7BWTPIAV.js → kk-KZ-BWHY45DX.js} +56 -2
- package/dist/dev/locales/{kk-KZ-7BWTPIAV.js.map → kk-KZ-BWHY45DX.js.map} +2 -2
- package/dist/dev/locales/{km-KH-BV4P2KSZ.js → km-KH-HGLNWNRU.js} +57 -3
- package/dist/dev/locales/{km-KH-BV4P2KSZ.js.map → km-KH-HGLNWNRU.js.map} +2 -2
- package/dist/dev/locales/{ko-KR-TSXE5P7B.js → ko-KR-CO36WKPC.js} +57 -3
- package/dist/dev/locales/{ko-KR-TSXE5P7B.js.map → ko-KR-CO36WKPC.js.map} +2 -2
- package/dist/dev/locales/{ku-TR-ASSXNN3U.js → ku-TR-AACVIARC.js} +57 -3
- package/dist/dev/locales/{ku-TR-ASSXNN3U.js.map → ku-TR-AACVIARC.js.map} +2 -2
- package/dist/dev/locales/{lt-LT-G7RZYQQU.js → lt-LT-CFYYFLDV.js} +56 -2
- package/dist/dev/locales/{lt-LT-G7RZYQQU.js.map → lt-LT-CFYYFLDV.js.map} +2 -2
- package/dist/dev/locales/{lv-LV-DXNPBJZU.js → lv-LV-QCBBOFFU.js} +57 -3
- package/dist/dev/locales/{lv-LV-DXNPBJZU.js.map → lv-LV-QCBBOFFU.js.map} +2 -2
- package/dist/dev/locales/{mr-IN-7F2ZCTCF.js → mr-IN-B2CM5GK5.js} +57 -3
- package/dist/dev/locales/{mr-IN-7F2ZCTCF.js.map → mr-IN-B2CM5GK5.js.map} +2 -2
- package/dist/dev/locales/{my-MM-NBI3KQGW.js → my-MM-756BNN36.js} +56 -2
- package/dist/dev/locales/{my-MM-NBI3KQGW.js.map → my-MM-756BNN36.js.map} +2 -2
- package/dist/dev/locales/{nb-NO-4DCTQT6L.js → nb-NO-5BLHQI4J.js} +57 -3
- package/dist/dev/locales/{nb-NO-4DCTQT6L.js.map → nb-NO-5BLHQI4J.js.map} +2 -2
- package/dist/dev/locales/{nl-NL-XGZJ7V2V.js → nl-NL-225BLGAH.js} +58 -4
- package/dist/dev/locales/nl-NL-225BLGAH.js.map +7 -0
- package/dist/dev/locales/{nn-NO-FR534JV5.js → nn-NO-4J7MR6GH.js} +56 -2
- package/dist/dev/locales/{nn-NO-FR534JV5.js.map → nn-NO-4J7MR6GH.js.map} +2 -2
- package/dist/dev/locales/{oc-FR-YQCIKZIK.js → oc-FR-XCETH7KF.js} +57 -3
- package/dist/dev/locales/{oc-FR-YQCIKZIK.js.map → oc-FR-XCETH7KF.js.map} +2 -2
- package/dist/dev/locales/{pa-IN-UM43JGD2.js → pa-IN-32NBAN5L.js} +57 -3
- package/dist/dev/locales/{pa-IN-UM43JGD2.js.map → pa-IN-32NBAN5L.js.map} +2 -2
- package/dist/dev/locales/{percentages-OGWD7R2K.js → percentages-ZRLRVMSI.js} +2 -2
- package/dist/dev/locales/{pl-PL-2UGKA6HK.js → pl-PL-R6OJ54BT.js} +57 -3
- package/dist/dev/locales/{pl-PL-2UGKA6HK.js.map → pl-PL-R6OJ54BT.js.map} +2 -2
- package/dist/dev/locales/{pt-BR-H23QFYE3.js → pt-BR-7AFGAKGR.js} +57 -3
- package/dist/dev/locales/{pt-BR-H23QFYE3.js.map → pt-BR-7AFGAKGR.js.map} +2 -2
- package/dist/dev/locales/{pt-PT-RHKJH5I5.js → pt-PT-S6BMW6MY.js} +57 -3
- package/dist/dev/locales/{pt-PT-RHKJH5I5.js.map → pt-PT-S6BMW6MY.js.map} +2 -2
- package/dist/dev/locales/{ro-RO-IIFONL3T.js → ro-RO-4JVGQHS2.js} +57 -3
- package/dist/dev/locales/{ro-RO-IIFONL3T.js.map → ro-RO-4JVGQHS2.js.map} +2 -2
- package/dist/dev/locales/{ru-RU-QEP6D7GK.js → ru-RU-IESI752T.js} +59 -5
- package/dist/dev/locales/ru-RU-IESI752T.js.map +7 -0
- package/dist/dev/locales/{si-LK-LZYJQLHF.js → si-LK-H75E7PKD.js} +57 -3
- package/dist/dev/locales/{si-LK-LZYJQLHF.js.map → si-LK-H75E7PKD.js.map} +2 -2
- package/dist/dev/locales/{sk-SK-RWC6UWGY.js → sk-SK-EUK2NR2F.js} +57 -3
- package/dist/dev/locales/{sk-SK-RWC6UWGY.js.map → sk-SK-EUK2NR2F.js.map} +2 -2
- package/dist/dev/locales/{sl-SI-QJT2CAUO.js → sl-SI-AKW7R5PW.js} +57 -3
- package/dist/dev/locales/{sl-SI-QJT2CAUO.js.map → sl-SI-AKW7R5PW.js.map} +2 -2
- package/dist/dev/locales/{sv-SE-3MAT3NDX.js → sv-SE-QIBOOXLJ.js} +57 -3
- package/dist/dev/locales/{sv-SE-3MAT3NDX.js.map → sv-SE-QIBOOXLJ.js.map} +2 -2
- package/dist/dev/locales/{ta-IN-J7XOYF2T.js → ta-IN-LBK2NQ5K.js} +56 -2
- package/dist/dev/locales/{ta-IN-J7XOYF2T.js.map → ta-IN-LBK2NQ5K.js.map} +2 -2
- package/dist/dev/locales/{th-TH-2OI52EOQ.js → th-TH-YJ2E6GVT.js} +56 -2
- package/dist/dev/locales/{th-TH-2OI52EOQ.js.map → th-TH-YJ2E6GVT.js.map} +2 -2
- package/dist/dev/locales/{tr-TR-G7TAUHUI.js → tr-TR-Y5GO2XJW.js} +57 -3
- package/dist/dev/locales/{tr-TR-G7TAUHUI.js.map → tr-TR-Y5GO2XJW.js.map} +2 -2
- package/dist/dev/locales/{uk-UA-IVSVBJIG.js → uk-UA-XYAFHHJW.js} +57 -3
- package/dist/dev/locales/{uk-UA-IVSVBJIG.js.map → uk-UA-XYAFHHJW.js.map} +2 -2
- package/dist/dev/locales/{uz-UZ-KCVDUVDE.js → uz-UZ-LF3CBRYE.js} +56 -2
- package/dist/dev/locales/{uz-UZ-KCVDUVDE.js.map → uz-UZ-LF3CBRYE.js.map} +2 -2
- package/dist/dev/locales/{vi-VN-KBZAVWP5.js → vi-VN-WDPZEUOJ.js} +56 -2
- package/dist/dev/locales/{vi-VN-KBZAVWP5.js.map → vi-VN-WDPZEUOJ.js.map} +2 -2
- package/dist/dev/locales/{zh-CN-IS26RG2D.js → zh-CN-SZ37453H.js} +57 -3
- package/dist/dev/locales/{zh-CN-IS26RG2D.js.map → zh-CN-SZ37453H.js.map} +2 -2
- package/dist/dev/locales/{zh-HK-KBWQ6SJC.js → zh-HK-QDQ5QNBC.js} +56 -2
- package/dist/dev/locales/{zh-HK-KBWQ6SJC.js.map → zh-HK-QDQ5QNBC.js.map} +2 -2
- package/dist/dev/locales/{zh-TW-JKJWJQ4J.js → zh-TW-CYU6GFBV.js} +57 -3
- package/dist/dev/locales/{zh-TW-JKJWJQ4J.js.map → zh-TW-CYU6GFBV.js.map} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-3FGJVPJS.js +12 -0
- package/dist/prod/chunk-3PELD44J.js +1 -0
- package/dist/prod/chunk-44LLHLSZ.js +4 -0
- package/dist/prod/{chunk-SNEYYD2R.js → chunk-KG57QRSG.js} +1 -1
- package/dist/prod/data/image-XPYUWCHN.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +26 -24
- package/dist/prod/locales/{ar-SA-EYKRCXR6.js → ar-SA-TS6M4GHP.js} +1 -1
- package/dist/prod/locales/{az-AZ-ZNDJBVCS.js → az-AZ-HJWG4CPD.js} +1 -1
- package/dist/prod/locales/{bg-BG-O5I6U3AR.js → bg-BG-K42QREUV.js} +1 -1
- package/dist/prod/locales/{bn-IN-HPUBVY4I.js → bn-BD-IFEECH4W.js} +1 -1
- package/dist/prod/locales/{bn-BD-CXZY522G.js → bn-IN-OE7SKNFR.js} +1 -1
- package/dist/prod/locales/{ca-ES-AREX5NEO.js → ca-ES-MKBCGNOG.js} +3 -3
- package/dist/prod/locales/{cs-CZ-HXAZMFYH.js → cs-CZ-V77HGUP7.js} +2 -2
- package/dist/prod/locales/{da-DK-5X7ZLFU3.js → da-DK-I5RFNTM4.js} +2 -2
- package/dist/prod/locales/{de-DE-G3JVZ4MQ.js → de-CH-WLRDEVBV.js} +3 -3
- package/dist/prod/locales/{de-CH-76ZNVSOF.js → de-DE-DTI4WUSC.js} +4 -4
- package/dist/prod/locales/{el-GR-4AZTZGY6.js → el-GR-ZXDJ2OS4.js} +3 -3
- package/dist/prod/locales/en-Y2V7YPBM.js +1 -0
- package/dist/prod/locales/{es-ES-ART7BI3G.js → es-ES-DYQHAD43.js} +2 -2
- package/dist/prod/locales/{eu-ES-BIF4XBMT.js → eu-ES-QDSYU5Y3.js} +3 -3
- package/dist/prod/locales/{fa-IR-D4HHKAAI.js → fa-IR-26LZG4PM.js} +3 -3
- package/dist/prod/locales/{fi-FI-O35ZY7UI.js → fi-FI-6YS4KDE4.js} +2 -2
- package/dist/prod/locales/{fr-FR-XEFNCM4I.js → fr-FR-BRLLPTZC.js} +2 -2
- package/dist/prod/locales/{gl-ES-U4NYM3X5.js → gl-ES-OKUZTLYG.js} +3 -3
- package/dist/prod/locales/{he-IL-656ABAVQ.js → he-IL-26MGYIU7.js} +3 -3
- package/dist/prod/locales/hi-IN-Q4ZOGTP2.js +3 -0
- package/dist/prod/locales/hu-HU-P2OXPSN5.js +3 -0
- package/dist/prod/locales/{id-ID-FLZFU3OO.js → id-ID-2EIKXYN6.js} +3 -3
- package/dist/prod/locales/{it-IT-GIGIGIBJ.js → it-IT-4CFKVXI2.js} +4 -4
- package/dist/prod/locales/{ja-JP-43VXGDWI.js → ja-JP-MAND2Z4V.js} +4 -4
- package/dist/prod/locales/{kaa-L3IMSDYL.js → kaa-HQRTCXTJ.js} +1 -1
- package/dist/prod/locales/{kab-KAB-XKPWJLNL.js → kab-KAB-JKIKKTGH.js} +2 -2
- package/dist/prod/locales/{kk-KZ-SXPDDY2H.js → kk-KZ-HXQ63ZFC.js} +1 -1
- package/dist/prod/locales/{km-KH-DOS4CPGC.js → km-KH-PKL3LSGX.js} +3 -3
- package/dist/prod/locales/{ko-KR-BGC6VCY4.js → ko-KR-KXLREZX3.js} +2 -2
- package/dist/prod/locales/{ku-TR-J7IUITIA.js → ku-TR-MJ4IER3X.js} +3 -3
- package/dist/prod/locales/{lt-LT-AC3LV5KG.js → lt-LT-H6WFQ6FJ.js} +2 -2
- package/dist/prod/locales/{lv-LV-I6AY7QG2.js → lv-LV-GOCK6SJW.js} +2 -2
- package/dist/prod/locales/{mr-IN-5SP4HV5B.js → mr-IN-IXVLDMEQ.js} +2 -2
- package/dist/prod/locales/{my-MM-S7ECRBYZ.js → my-MM-YG6MYTTD.js} +1 -1
- package/dist/prod/locales/{nb-NO-6PNHTF4R.js → nb-NO-XGWJISD2.js} +3 -3
- package/dist/prod/locales/{nl-NL-R4C4SUIG.js → nl-NL-XVDVCPNC.js} +4 -4
- package/dist/prod/locales/{nn-NO-3TFXTM7Y.js → nn-NO-EMX5MJX5.js} +2 -2
- package/dist/prod/locales/{oc-FR-IK6GIE7H.js → oc-FR-ROEINTVO.js} +2 -2
- package/dist/prod/locales/{pa-IN-YAKHYJET.js → pa-IN-ZYN6SUDY.js} +1 -1
- package/dist/prod/locales/percentages-5DKR754L.js +1 -0
- package/dist/prod/locales/{pl-PL-BIY22ZWU.js → pl-PL-6VTG7PHC.js} +3 -3
- package/dist/prod/locales/{pt-BR-Q23NUPD6.js → pt-BR-5YFKRR5G.js} +2 -2
- package/dist/prod/locales/{pt-PT-LOPEJLPJ.js → pt-PT-GEIXXZ67.js} +1 -1
- package/dist/prod/locales/{ro-RO-W3D2ZATV.js → ro-RO-E2P6TFZI.js} +4 -4
- package/dist/prod/locales/{ru-RU-DCTW7QSH.js → ru-RU-YBIIY43T.js} +4 -4
- package/dist/prod/locales/{si-LK-FYRRHO3C.js → si-LK-673C2CI2.js} +1 -1
- package/dist/prod/locales/{sk-SK-MC7UOHQO.js → sk-SK-CKZHQ4AP.js} +2 -2
- package/dist/prod/locales/{sl-SI-L6B6HFY5.js → sl-SI-557H2GWM.js} +2 -2
- package/dist/prod/locales/{sv-SE-KMY6L2BA.js → sv-SE-XOPKKDWS.js} +3 -3
- package/dist/prod/locales/{ta-IN-ZQCYE2JK.js → ta-IN-XBH7DQI3.js} +3 -3
- package/dist/prod/locales/{th-TH-WS7ECBAV.js → th-TH-TOCWH3R4.js} +1 -1
- package/dist/prod/locales/{tr-TR-S5FI7JRW.js → tr-TR-GXW6CYY5.js} +2 -2
- package/dist/prod/locales/{uk-UA-4EZUWUSQ.js → uk-UA-IJKTNUDG.js} +3 -3
- package/dist/prod/locales/{uz-UZ-OKHL6AFA.js → uz-UZ-TBZZEA4V.js} +1 -1
- package/dist/prod/locales/{vi-VN-K34TWHF7.js → vi-VN-MULSGNVB.js} +3 -3
- package/dist/prod/locales/{zh-CN-JE4UZWNO.js → zh-CN-MVX3E32U.js} +3 -3
- package/dist/prod/locales/{zh-HK-RM35YDXX.js → zh-HK-JNU5RLIE.js} +1 -1
- package/dist/prod/locales/{zh-TW-ONGLV6Y5.js → zh-TW-LENVCA6T.js} +3 -3
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/debug.d.ts +21 -0
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +1 -1
- package/dist/types/common/src/constants.d.ts +3 -0
- package/dist/types/common/src/index.d.ts +3 -0
- package/dist/types/common/src/utils.d.ts +4 -7
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +2 -0
- package/dist/types/element/src/arrange-algorithms/maxRects.d.ts +16 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/arrows/focus.d.ts +27 -0
- package/dist/types/element/src/arrows/helpers.d.ts +5 -0
- package/dist/types/element/src/binding.d.ts +13 -8
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/collision.d.ts +4 -3
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/index.d.ts +4 -0
- package/dist/types/element/src/linearElementEditor.d.ts +6 -1
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/selection.d.ts +5 -1
- package/dist/types/element/src/shapes.d.ts +2 -22
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/element/src/types.d.ts +6 -3
- package/dist/types/element/src/utils.d.ts +5 -3
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
- package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
- package/dist/types/excalidraw/actions/actionArrange.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +159 -148
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +28 -26
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +43 -38
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +28 -26
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionExport.d.ts +87 -380
- package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionFrame.d.ts +54 -50
- package/dist/types/excalidraw/actions/actionGroup.d.ts +31 -29
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
- package/dist/types/excalidraw/actions/actionLink.d.ts +15 -14
- package/dist/types/excalidraw/actions/actionMenu.d.ts +11 -14
- package/dist/types/excalidraw/actions/actionProperties.d.ts +33 -31
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -15
- package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -15
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +181 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +15 -14
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +15 -14
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +11 -14
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +15 -14
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +15 -14
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +15 -14
- package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/dist/types/excalidraw/actions/index.d.ts +2 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +15 -13
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clipboard.d.ts +6 -7
- package/dist/types/excalidraw/components/App.d.ts +57 -14
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
- package/dist/types/excalidraw/components/icons.d.ts +23 -9
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
- package/dist/types/excalidraw/components/shapes.d.ts +263 -0
- package/dist/types/excalidraw/data/blob.d.ts +57 -56
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
- package/dist/types/excalidraw/data/index.d.ts +2 -3
- package/dist/types/excalidraw/data/json.d.ts +43 -34
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/editorPreferences.d.ts +11 -0
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/index.d.ts +26 -3
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +114 -16
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
- package/dist/types/math/src/point.d.ts +7 -2
- package/dist/types/math/src/types.d.ts +25 -1
- package/package.json +8 -8
- package/dist/dev/chunk-DJHLEOOZ.js +0 -69
- package/dist/dev/chunk-DJHLEOOZ.js.map +0 -7
- package/dist/dev/chunk-WBVI4CIR.js.map +0 -7
- package/dist/dev/chunk-WGIZZ2NT.js.map +0 -7
- package/dist/dev/locales/de-CH-OAWPDQFJ.js.map +0 -7
- package/dist/dev/locales/hi-IN-XGMO235V.js.map +0 -7
- package/dist/dev/locales/hu-HU-37FDQFIS.js.map +0 -7
- package/dist/dev/locales/nl-NL-XGZJ7V2V.js.map +0 -7
- package/dist/dev/locales/ru-RU-QEP6D7GK.js.map +0 -7
- package/dist/prod/chunk-AJI3LATG.js +0 -1
- package/dist/prod/chunk-P4DO2K62.js +0 -4
- package/dist/prod/chunk-SXXYW6U7.js +0 -12
- package/dist/prod/data/image-P7BXXOZA.js +0 -1
- package/dist/prod/locales/en-IT7EQLWB.js +0 -1
- package/dist/prod/locales/hi-IN-Z55GAFFR.js +0 -3
- package/dist/prod/locales/hu-HU-UJ62DVIW.js +0 -3
- package/dist/prod/locales/percentages-OL6W367U.js +0 -1
- package/dist/types/excalidraw/charts.d.ts +0 -27
- /package/dist/dev/{chunk-ERXRO4IP.js.map → chunk-OF725VHI.js.map} +0 -0
- /package/dist/dev/data/{image-BOZX7YCK.js.map → image-ZR5DXOGS.js.map} +0 -0
- /package/dist/dev/locales/{en-GV3XLAUG.js.map → en-I7VEBYIX.js.map} +0 -0
- /package/dist/dev/locales/{percentages-OGWD7R2K.js.map → percentages-ZRLRVMSI.js.map} +0 -0
|
@@ -12,10 +12,10 @@ export declare const actionSendBackward: {
|
|
|
12
12
|
captureUpdate: "IMMEDIATELY";
|
|
13
13
|
};
|
|
14
14
|
keyPriority: number;
|
|
15
|
-
keyTest: (event:
|
|
15
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
16
16
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
} & {
|
|
18
|
-
keyTest?: ((event:
|
|
18
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
19
19
|
};
|
|
20
20
|
export declare const actionBringForward: {
|
|
21
21
|
name: "bringForward";
|
|
@@ -31,10 +31,10 @@ export declare const actionBringForward: {
|
|
|
31
31
|
captureUpdate: "IMMEDIATELY";
|
|
32
32
|
};
|
|
33
33
|
keyPriority: number;
|
|
34
|
-
keyTest: (event:
|
|
34
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
35
35
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
} & {
|
|
37
|
-
keyTest?: ((event:
|
|
37
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
38
38
|
};
|
|
39
39
|
export declare const actionSendToBack: {
|
|
40
40
|
name: "sendToBack";
|
|
@@ -49,10 +49,10 @@ export declare const actionSendToBack: {
|
|
|
49
49
|
appState: Readonly<import("../types").AppState>;
|
|
50
50
|
captureUpdate: "IMMEDIATELY";
|
|
51
51
|
};
|
|
52
|
-
keyTest: (event:
|
|
52
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
53
53
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
} & {
|
|
55
|
-
keyTest?: ((event:
|
|
55
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
56
56
|
};
|
|
57
57
|
export declare const actionBringToFront: {
|
|
58
58
|
name: "bringToFront";
|
|
@@ -67,8 +67,8 @@ export declare const actionBringToFront: {
|
|
|
67
67
|
appState: Readonly<import("../types").AppState>;
|
|
68
68
|
captureUpdate: "IMMEDIATELY";
|
|
69
69
|
};
|
|
70
|
-
keyTest: (event:
|
|
70
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
71
71
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
72
72
|
} & {
|
|
73
|
-
keyTest?: ((event:
|
|
73
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
74
74
|
};
|
|
@@ -21,6 +21,8 @@ export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, copyText, } fr
|
|
|
21
21
|
export { actionToggleGridMode } from "./actionToggleGridMode";
|
|
22
22
|
export { actionToggleZenMode } from "./actionToggleZenMode";
|
|
23
23
|
export { actionToggleObjectsSnapMode } from "./actionToggleObjectsSnapMode";
|
|
24
|
+
export { actionToggleArrowBinding } from "./actionToggleArrowBinding";
|
|
25
|
+
export { actionToggleMidpointSnapping } from "./actionToggleMidpointSnapping";
|
|
24
26
|
export { actionToggleStats } from "./actionToggleStats";
|
|
25
27
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
26
28
|
export { actionLink } from "./actionLink";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -13,20 +13,31 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
13
13
|
selectedElementIds?: Readonly<{
|
|
14
14
|
[id: string]: true;
|
|
15
15
|
}> | undefined;
|
|
16
|
+
activeTool?: ({
|
|
17
|
+
lastActiveTool: import("./types").ActiveTool | null;
|
|
18
|
+
locked: boolean;
|
|
19
|
+
fromSelection: boolean;
|
|
20
|
+
} & import("./types").ActiveTool) | undefined;
|
|
16
21
|
selectedGroupIds?: {
|
|
17
22
|
[groupId: string]: boolean;
|
|
18
23
|
} | undefined;
|
|
19
24
|
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
25
|
+
isBindingEnabled?: boolean | undefined;
|
|
26
|
+
isMidpointSnappingEnabled?: boolean | undefined;
|
|
20
27
|
zenModeEnabled?: boolean | undefined;
|
|
21
28
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
22
29
|
exportScale?: number | undefined;
|
|
30
|
+
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
23
31
|
bindMode?: import("@excalidraw/element/types").BindMode | undefined;
|
|
24
32
|
gridSize?: number | undefined;
|
|
33
|
+
gridModeEnabled?: boolean | undefined;
|
|
34
|
+
objectsSnapModeEnabled?: boolean | undefined;
|
|
35
|
+
wheelZoomsOnDefault?: boolean | undefined;
|
|
36
|
+
gridStep?: number | undefined;
|
|
25
37
|
showWelcomeScreen?: boolean | undefined;
|
|
26
38
|
myocSimplifiedMode?: boolean | undefined;
|
|
27
39
|
dontResizeLimitMBs?: number | undefined;
|
|
28
40
|
hideMainMenus?: boolean | undefined;
|
|
29
|
-
wheelZoomsOnDefault?: boolean | undefined;
|
|
30
41
|
arrangeConfiguration?: {
|
|
31
42
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
32
43
|
gap: number;
|
|
@@ -35,11 +46,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
35
46
|
mode: import("./types").NormaliseMode;
|
|
36
47
|
metric: import("./types").NormaliseMetric;
|
|
37
48
|
} | undefined;
|
|
38
|
-
|
|
39
|
-
lastActiveTool: import("./types").ActiveTool | null;
|
|
40
|
-
locked: boolean;
|
|
41
|
-
fromSelection: boolean;
|
|
42
|
-
} & import("./types").ActiveTool) | undefined;
|
|
49
|
+
bindingPreference?: "disabled" | "enabled" | undefined;
|
|
43
50
|
preferredSelectionTool?: {
|
|
44
51
|
type: "selection" | "lasso";
|
|
45
52
|
initialized: boolean;
|
|
@@ -62,7 +69,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
62
69
|
currentItemStartArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
63
70
|
currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
64
71
|
currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
|
|
65
|
-
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
66
72
|
cursorButton?: "up" | "down" | undefined;
|
|
67
73
|
scrolledOutside?: boolean | undefined;
|
|
68
74
|
openMenu?: "canvas" | null | undefined;
|
|
@@ -75,14 +81,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
75
81
|
previousSelectedElementIds?: {
|
|
76
82
|
[id: string]: true;
|
|
77
83
|
} | undefined;
|
|
78
|
-
gridStep?: number | undefined;
|
|
79
|
-
gridModeEnabled?: boolean | undefined;
|
|
80
84
|
stats?: {
|
|
81
85
|
open: boolean;
|
|
82
86
|
panels: number;
|
|
83
87
|
} | undefined;
|
|
84
|
-
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
85
|
-
objectsSnapModeEnabled?: boolean | undefined;
|
|
86
88
|
lockedMultiSelections?: {
|
|
87
89
|
[groupId: string]: true;
|
|
88
90
|
} | undefined;
|
|
@@ -90,8 +92,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
90
92
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
91
93
|
viewBackgroundColor?: string | undefined;
|
|
92
94
|
gridSize?: number | undefined;
|
|
93
|
-
gridStep?: number | undefined;
|
|
94
95
|
gridModeEnabled?: boolean | undefined;
|
|
96
|
+
gridStep?: number | undefined;
|
|
95
97
|
lockedMultiSelections?: {
|
|
96
98
|
[groupId: string]: true;
|
|
97
99
|
} | undefined;
|
|
@@ -99,8 +101,8 @@ export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
|
99
101
|
export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
|
|
100
102
|
viewBackgroundColor?: string | undefined;
|
|
101
103
|
gridSize?: number | undefined;
|
|
102
|
-
gridStep?: number | undefined;
|
|
103
104
|
gridModeEnabled?: boolean | undefined;
|
|
105
|
+
gridStep?: number | undefined;
|
|
104
106
|
lockedMultiSelections?: {
|
|
105
107
|
[groupId: string]: true;
|
|
106
108
|
} | undefined;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Radians } from "@excalidraw/math";
|
|
2
|
+
export declare const CARTESIAN_BASE_SLOT_WIDTH = 44;
|
|
3
|
+
export declare const CARTESIAN_BAR_SLOT_EXTRA_PER_SERIES = 22;
|
|
4
|
+
export declare const CARTESIAN_BAR_SLOT_EXTRA_MAX = 66;
|
|
5
|
+
export declare const CARTESIAN_LINE_SLOT_WIDTH = 48;
|
|
6
|
+
export declare const CARTESIAN_GAP = 14;
|
|
7
|
+
export declare const CARTESIAN_BAR_HEIGHT = 304;
|
|
8
|
+
export declare const CARTESIAN_LINE_HEIGHT = 320;
|
|
9
|
+
export declare const CARTESIAN_LABEL_ROTATION: Radians;
|
|
10
|
+
export declare const CARTESIAN_LABEL_MIN_WIDTH = 28;
|
|
11
|
+
export declare const CARTESIAN_LABEL_SLOT_PADDING = 4;
|
|
12
|
+
export declare const CARTESIAN_LABEL_AXIS_CLEARANCE = 2;
|
|
13
|
+
export declare const CARTESIAN_LABEL_MAX_WIDTH_BUFFER = 10;
|
|
14
|
+
export declare const CARTESIAN_LABEL_ROTATED_WIDTH_BUFFER = 10;
|
|
15
|
+
export declare const CARTESIAN_LABEL_OVERFLOW_PREFERENCE_BUFFER = 8;
|
|
16
|
+
export declare const BAR_GAP = 12;
|
|
17
|
+
export declare const BAR_HEIGHT = 256;
|
|
18
|
+
export declare const GRID_OPACITY = 10;
|
|
19
|
+
export declare const RADAR_GRID_LEVELS = 4;
|
|
20
|
+
export declare const RADAR_LABEL_OFFSET: number;
|
|
21
|
+
export declare const RADAR_PADDING: number;
|
|
22
|
+
export declare const RADAR_SINGLE_SERIES_LOG_SCALE_THRESHOLD = 100;
|
|
23
|
+
export declare const RADAR_AXIS_LABEL_MAX_WIDTH = 140;
|
|
24
|
+
export declare const RADAR_AXIS_LABEL_ALIGNMENT_THRESHOLD = 0.35;
|
|
25
|
+
export declare const RADAR_AXIS_LABEL_CLEARANCE: number;
|
|
26
|
+
export declare const RADAR_LEGEND_SWATCH_SIZE = 20;
|
|
27
|
+
export declare const RADAR_LEGEND_ITEM_GAP: number;
|
|
28
|
+
export declare const RADAR_LEGEND_TEXT_GAP = 12;
|
|
29
|
+
export declare const commonProps: {
|
|
30
|
+
readonly fillStyle: "hachure";
|
|
31
|
+
readonly fontFamily: number;
|
|
32
|
+
readonly fontSize: 20;
|
|
33
|
+
readonly opacity: 100;
|
|
34
|
+
readonly roughness: 1;
|
|
35
|
+
readonly strokeColor: "#1e1e1e";
|
|
36
|
+
readonly roundness: null;
|
|
37
|
+
readonly strokeStyle: "solid";
|
|
38
|
+
readonly strokeWidth: 1;
|
|
39
|
+
readonly verticalAlign: string;
|
|
40
|
+
readonly locked: false;
|
|
41
|
+
};
|
|
42
|
+
export type CartesianChartType = "bar" | "line";
|
|
43
|
+
export type CartesianChartLayout = {
|
|
44
|
+
slotWidth: number;
|
|
45
|
+
gap: number;
|
|
46
|
+
chartHeight: number;
|
|
47
|
+
xLabelMaxWidth: number;
|
|
48
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getFontString } from "@excalidraw/common";
|
|
2
|
+
import type { ChartType } from "@excalidraw/element/types";
|
|
3
|
+
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
4
|
+
import { type CartesianChartLayout, type CartesianChartType } from "./charts.constants";
|
|
5
|
+
import type { ChartElements, Spreadsheet, SpreadsheetSeries } from "./charts.types";
|
|
6
|
+
export declare const isSpreadsheetValidForChartType: (spreadsheet: Spreadsheet | null, chartType: ChartType) => boolean;
|
|
7
|
+
export declare const getCartesianChartLayout: (chartType: CartesianChartType, seriesCount: number) => CartesianChartLayout;
|
|
8
|
+
export declare const getChartDimensions: (spreadsheet: Spreadsheet, layout: CartesianChartLayout) => {
|
|
9
|
+
chartWidth: number;
|
|
10
|
+
chartHeight: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const getRadarDimensions: () => {
|
|
13
|
+
chartWidth: number;
|
|
14
|
+
chartHeight: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const getSeriesColors: (seriesCount: number, colorOffset: number) => readonly string[];
|
|
17
|
+
export declare const getColorOffset: (colorSeed?: number) => number;
|
|
18
|
+
export declare const getBackgroundColor: (colorOffset: number) => "#fff5f5" | "#ffc9c9" | "#ff8787" | "#fa5252" | "#e03131" | "#fff0f6" | "#fcc2d7" | "#f783ac" | "#e64980" | "#c2255c" | "#f8f0fc" | "#eebefa" | "#da77f2" | "#be4bdb" | "#9c36b5" | "#f3f0ff" | "#d0bfff" | "#9775fa" | "#7950f2" | "#6741d9" | "#e7f5ff" | "#a5d8ff" | "#4dabf7" | "#228be6" | "#1971c2" | "#e3fafc" | "#99e9f2" | "#3bc9db" | "#15aabf" | "#0c8599" | "#e6fcf5" | "#96f2d7" | "#38d9a9" | "#12b886" | "#099268" | "#ebfbee" | "#b2f2bb" | "#69db7c" | "#40c057" | "#2f9e44" | "#fff9db" | "#ffec99" | "#ffd43b" | "#fab005" | "#f08c00" | "#fff4e6" | "#ffd8a8" | "#ffa94d" | "#fd7e14" | "#e8590c";
|
|
19
|
+
export declare const getRadarValueScale: (series: SpreadsheetSeries[], _labelsLength: number) => {
|
|
20
|
+
renderSteps: boolean;
|
|
21
|
+
normalize: (value: number, _axisIndex: number) => number;
|
|
22
|
+
};
|
|
23
|
+
export declare const getRadarDisplayText: (text: string, fontString: ReturnType<typeof getFontString>, maxWidth: number) => string;
|
|
24
|
+
export declare const createRadarAxisLabels: (labels: readonly string[], angles: readonly number[], centerX: number, centerY: number, radius: number, backgroundColor: string) => {
|
|
25
|
+
axisLabels: ChartElements;
|
|
26
|
+
axisLabelTopY: number;
|
|
27
|
+
axisLabelBottomY: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const createSeriesLegend: (series: SpreadsheetSeries[], seriesColors: readonly string[], centerX: number, minLegendTopY: number, fallbackLegendY: number, backgroundColor: string) => ChartElements;
|
|
30
|
+
export declare const getRotatedTextElementBottom: (element: NonDeletedExcalidrawElement) => number;
|
|
31
|
+
export declare const chartXLabels: (spreadsheet: Spreadsheet, x: number, y: number, backgroundColor: string, layout: CartesianChartLayout) => ChartElements;
|
|
32
|
+
export declare const chartBaseElements: (spreadsheet: Spreadsheet, x: number, y: number, backgroundColor: string, layout: CartesianChartLayout, maxValue?: number, debug?: boolean) => ChartElements;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ParseSpreadsheetResult } from "./charts.types";
|
|
2
|
+
/**
|
|
3
|
+
* @private exported for testing
|
|
4
|
+
*/
|
|
5
|
+
export declare const tryParseNumber: (s: string) => number | null;
|
|
6
|
+
/**
|
|
7
|
+
* @private exported for testing
|
|
8
|
+
*/
|
|
9
|
+
export declare const tryParseCells: (cells: string[][]) => ParseSpreadsheetResult;
|
|
10
|
+
export declare const tryParseSpreadsheet: (text: string) => ParseSpreadsheetResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
+
export type ChartElements = readonly NonDeletedExcalidrawElement[];
|
|
3
|
+
export interface Spreadsheet {
|
|
4
|
+
title: string | null;
|
|
5
|
+
labels: string[] | null;
|
|
6
|
+
series: SpreadsheetSeries[];
|
|
7
|
+
}
|
|
8
|
+
export interface SpreadsheetSeries {
|
|
9
|
+
title: string | null;
|
|
10
|
+
values: number[];
|
|
11
|
+
}
|
|
12
|
+
export type ParseSpreadsheetResult = {
|
|
13
|
+
ok: false;
|
|
14
|
+
reason: string;
|
|
15
|
+
} | {
|
|
16
|
+
ok: true;
|
|
17
|
+
data: Spreadsheet;
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChartType } from "@excalidraw/element/types";
|
|
2
|
+
import { tryParseCells, tryParseNumber, tryParseSpreadsheet } from "./charts.parse";
|
|
3
|
+
import type { ChartElements, Spreadsheet } from "./charts.types";
|
|
4
|
+
export { type ParseSpreadsheetResult, type Spreadsheet, type SpreadsheetSeries, type ChartElements, } from "./charts.types";
|
|
5
|
+
export { isSpreadsheetValidForChartType } from "./charts.helpers";
|
|
6
|
+
export { tryParseCells, tryParseNumber, tryParseSpreadsheet };
|
|
7
|
+
export declare const renderSpreadsheet: (chartType: ChartType, spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number) => ChartElements | null;
|
|
@@ -2,15 +2,12 @@ import { ALLOWED_PASTE_MIME_TYPES } from "@excalidraw/common";
|
|
|
2
2
|
import type { ValueOf } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { IMAGE_MIME_TYPES, STRING_MIME_TYPES } from "@excalidraw/common";
|
|
4
4
|
import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
5
|
-
import type { FileSystemHandle } from "./data/filesystem";
|
|
6
|
-
import type { Spreadsheet } from "./charts";
|
|
7
5
|
import type { BinaryFiles } from "./types";
|
|
8
6
|
export type PastedMixedContent = {
|
|
9
7
|
type: "text" | "imageUrl";
|
|
10
8
|
value: string;
|
|
11
9
|
}[];
|
|
12
10
|
export interface ClipboardData {
|
|
13
|
-
spreadsheet?: Spreadsheet;
|
|
14
11
|
elements?: readonly ExcalidrawElement[];
|
|
15
12
|
files?: BinaryFiles;
|
|
16
13
|
text?: string;
|
|
@@ -54,7 +51,7 @@ type AllowedParsedDataTransferItem = {
|
|
|
54
51
|
type: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
55
52
|
kind: "file";
|
|
56
53
|
file: File;
|
|
57
|
-
fileHandle:
|
|
54
|
+
fileHandle: FileSystemFileHandle | null;
|
|
58
55
|
} | {
|
|
59
56
|
type: ValueOf<typeof STRING_MIME_TYPES>;
|
|
60
57
|
kind: "string";
|
|
@@ -64,7 +61,7 @@ type ParsedDataTransferItem = {
|
|
|
64
61
|
type: string;
|
|
65
62
|
kind: "file";
|
|
66
63
|
file: File;
|
|
67
|
-
fileHandle:
|
|
64
|
+
fileHandle: FileSystemFileHandle | null;
|
|
68
65
|
} | {
|
|
69
66
|
type: string;
|
|
70
67
|
kind: "string";
|
|
@@ -76,7 +73,7 @@ type ParsedDataTransferItemType<T extends AllowedParsedDataTransferItem["type"]>
|
|
|
76
73
|
export type ParsedDataTransferFile = Extract<AllowedParsedDataTransferItem, {
|
|
77
74
|
kind: "file";
|
|
78
75
|
}>;
|
|
79
|
-
type ParsedDataTranferList = ParsedDataTransferItem[] & {
|
|
76
|
+
export type ParsedDataTranferList = ParsedDataTransferItem[] & {
|
|
80
77
|
/**
|
|
81
78
|
* Only allows filtering by known `string` data types, since `file`
|
|
82
79
|
* types can have multiple items of the same type (e.g. multiple image files)
|
|
@@ -94,12 +91,14 @@ type ParsedDataTranferList = ParsedDataTransferItem[] & {
|
|
|
94
91
|
declare const findDataTransferItemType: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
|
|
95
92
|
declare const getDataTransferItemData: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
|
|
96
93
|
declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
|
|
94
|
+
/** @returns list of MIME types, synchronously */
|
|
95
|
+
export declare const parseDataTransferEventMimeTypes: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Set<string>;
|
|
97
96
|
export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
|
|
98
97
|
/**
|
|
99
98
|
* Attempts to parse clipboard event.
|
|
100
99
|
*/
|
|
101
100
|
export declare const parseClipboard: (dataList: ParsedDataTranferList, isPlainPaste?: boolean) => Promise<ClipboardData>;
|
|
102
101
|
export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
|
|
103
|
-
export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
102
|
+
export declare const copyTextToSystemClipboard: <MimeType extends ValueOf<typeof STRING_MIME_TYPES>>(text: string | { [K in MimeType]: string; } | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
104
103
|
export declare const isClipboardEvent: (event: React.SyntheticEvent | Event) => event is ClipboardEvent;
|
|
105
104
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
|
|
3
|
-
import {
|
|
2
|
+
import { AppEventBus, type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
|
|
3
|
+
import { FlowChartCreator, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
|
|
4
|
+
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
|
|
4
5
|
import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
5
6
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
6
7
|
import { ActionManager } from "../actions/manager";
|
|
@@ -13,15 +14,31 @@ import { LaserTrails } from "../laser-trails";
|
|
|
13
14
|
import { isOverScrollBars } from "../scene/scrollbars";
|
|
14
15
|
import { LassoTrail } from "../lasso";
|
|
15
16
|
import { EraserTrail } from "../eraser";
|
|
17
|
+
import { type OnStateChange } from "./AppStateObserver";
|
|
16
18
|
import type { ExportedElements } from "../data";
|
|
17
|
-
import type {
|
|
18
|
-
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
|
|
19
|
+
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, ExcalidrawImperativeAPIEventMap, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
|
|
19
20
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
20
21
|
import type { ActionResult } from "../actions/types";
|
|
22
|
+
declare const editorLifecycleEventBehavior: {
|
|
23
|
+
readonly "editor:mount": {
|
|
24
|
+
readonly cardinality: "once";
|
|
25
|
+
readonly replay: "last";
|
|
26
|
+
};
|
|
27
|
+
readonly "editor:initialize": {
|
|
28
|
+
readonly cardinality: "once";
|
|
29
|
+
readonly replay: "last";
|
|
30
|
+
};
|
|
31
|
+
readonly "editor:unmount": {
|
|
32
|
+
readonly cardinality: "once";
|
|
33
|
+
readonly replay: "last";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
21
36
|
export declare const ExcalidrawContainerContext: React.Context<{
|
|
22
37
|
container: HTMLDivElement | null;
|
|
23
38
|
id: string | null;
|
|
24
39
|
}>;
|
|
40
|
+
export declare const ExcalidrawAPIContext: React.Context<ExcalidrawImperativeAPI | null>;
|
|
41
|
+
export declare const ExcalidrawAPISetContext: React.Context<((api: ExcalidrawImperativeAPI | null) => void) | null>;
|
|
25
42
|
export declare const useApp: () => AppClassProperties;
|
|
26
43
|
export declare const useAppProps: () => AppProps;
|
|
27
44
|
export declare const useEditorInterface: () => Readonly<{
|
|
@@ -44,9 +61,14 @@ export declare const useExcalidrawElements: () => readonly NonDeletedExcalidrawE
|
|
|
44
61
|
export declare const useExcalidrawAppState: () => AppState;
|
|
45
62
|
export declare const useExcalidrawSetAppState: () => <K extends keyof AppState>(state: AppState | ((prevState: Readonly<AppState>, props: Readonly<any>) => AppState | Pick<AppState, K> | null) | Pick<AppState, K> | null, callback?: (() => void) | undefined) => void;
|
|
46
63
|
export declare const useExcalidrawActionManager: () => ActionManager;
|
|
64
|
+
/**
|
|
65
|
+
* Requires wrapping your component in <ExcalidrawAPIContext.Provider>
|
|
66
|
+
*/
|
|
67
|
+
export declare const useExcalidrawAPI: () => ExcalidrawImperativeAPI | null;
|
|
47
68
|
declare class App extends React.Component<AppProps, AppState> {
|
|
48
69
|
canvas: AppClassProperties["canvas"];
|
|
49
70
|
interactiveCanvas: AppClassProperties["interactiveCanvas"];
|
|
71
|
+
sessionExportThemeOverride: AppState["theme"] | undefined;
|
|
50
72
|
rc: RoughCanvas;
|
|
51
73
|
unmounted: boolean;
|
|
52
74
|
actionManager: ActionManager;
|
|
@@ -80,19 +102,31 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
80
102
|
/** embeds that have been inserted to DOM (as a perf optim, we don't want to
|
|
81
103
|
* insert to DOM before user initially scrolls to them) */
|
|
82
104
|
private initializedEmbeds;
|
|
83
|
-
private handleToastClose;
|
|
84
105
|
private elementsPendingErasure;
|
|
106
|
+
private _initialized;
|
|
107
|
+
private readonly editorLifecycleEvents;
|
|
108
|
+
onEvent: AppEventBus<ExcalidrawImperativeAPIEventMap, typeof editorLifecycleEventBehavior>["on"];
|
|
109
|
+
private appStateObserver;
|
|
110
|
+
onStateChange: OnStateChange;
|
|
85
111
|
flowChartCreator: FlowChartCreator;
|
|
86
112
|
private flowChartNavigator;
|
|
87
113
|
bindModeHandler: ReturnType<typeof setTimeout> | null;
|
|
88
114
|
hitLinkElement?: NonDeletedExcalidrawElement;
|
|
89
115
|
lastPointerDownEvent: React.PointerEvent<HTMLElement> | null;
|
|
90
116
|
lastPointerUpEvent: React.PointerEvent<HTMLElement> | PointerEvent | null;
|
|
117
|
+
lastPointerUpIsDoubleClick: boolean;
|
|
91
118
|
lastPointerMoveEvent: PointerEvent | null;
|
|
119
|
+
/** current frame pointer cords */
|
|
92
120
|
lastPointerMoveCoords: {
|
|
93
121
|
x: number;
|
|
94
122
|
y: number;
|
|
95
123
|
} | null;
|
|
124
|
+
private lastCompletedCanvasClicks;
|
|
125
|
+
/** previous frame pointer coords */
|
|
126
|
+
previousPointerMoveCoords: {
|
|
127
|
+
x: number;
|
|
128
|
+
y: number;
|
|
129
|
+
} | null;
|
|
96
130
|
lastViewportPosition: {
|
|
97
131
|
x: number;
|
|
98
132
|
y: number;
|
|
@@ -232,6 +266,9 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
232
266
|
}>]>;
|
|
233
267
|
missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
|
|
234
268
|
onRemoveEventListenersEmitter: Emitter<[]>;
|
|
269
|
+
api: ExcalidrawImperativeAPI;
|
|
270
|
+
addImageElementsToScene: ExcalidrawImperativeAPI["addImageElementsToScene"];
|
|
271
|
+
private createExcalidrawAPI;
|
|
235
272
|
constructor(props: AppProps);
|
|
236
273
|
updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
237
274
|
private onWindowMessage;
|
|
@@ -245,8 +282,12 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
245
282
|
* If disabled, returns null.
|
|
246
283
|
*/
|
|
247
284
|
getEffectiveGridSize: () => NullableGridSize;
|
|
285
|
+
private getTextCreationGridPoint;
|
|
248
286
|
private getHTMLIFrameElement;
|
|
249
|
-
private
|
|
287
|
+
private handleIframeLikeElementHover;
|
|
288
|
+
/** @returns true if iframe-like element click handled */
|
|
289
|
+
private handleIframeLikeCenterClick;
|
|
290
|
+
private isDoubleClick;
|
|
250
291
|
private isIframeLikeElementCenter;
|
|
251
292
|
private updateEmbedValidationStatus;
|
|
252
293
|
private updateEmbeddables;
|
|
@@ -371,11 +412,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
371
412
|
private maybeUnfollowRemoteUser;
|
|
372
413
|
/** use when changing scrollX/scrollY/zoom based on user interaction */
|
|
373
414
|
private translateCanvas;
|
|
374
|
-
setToast: (toast:
|
|
375
|
-
|
|
376
|
-
closable?: boolean;
|
|
377
|
-
duration?: number;
|
|
378
|
-
} | null) => void;
|
|
415
|
+
setToast: (toast: AppState["toast"]) => void;
|
|
416
|
+
private handleToastClose;
|
|
379
417
|
restoreFileFromShare: () => Promise<void>;
|
|
380
418
|
/**
|
|
381
419
|
* adds supplied files to existing files in the appState.
|
|
@@ -441,7 +479,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
441
479
|
private onGestureEnd;
|
|
442
480
|
private handleTextWysiwyg;
|
|
443
481
|
private deselectElements;
|
|
482
|
+
private getSelectedTextElement;
|
|
483
|
+
private getSelectedTextEditingContainerAtPosition;
|
|
444
484
|
private getTextElementAtPosition;
|
|
485
|
+
private isHittingTextAutoResizeHandle;
|
|
486
|
+
private handleTextAutoResizeHandlePointerDown;
|
|
445
487
|
private getElementAtPosition;
|
|
446
488
|
private getElementsAtPosition;
|
|
447
489
|
getElementHitThreshold(element: ExcalidrawElement): number;
|
|
@@ -450,9 +492,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
450
492
|
private startTextEditing;
|
|
451
493
|
private startImageCropping;
|
|
452
494
|
private finishImageCropping;
|
|
495
|
+
private shouldHandleBrowserCanvasDoubleClick;
|
|
453
496
|
private handleCanvasDoubleClick;
|
|
497
|
+
private handleCanvasClick;
|
|
454
498
|
private getElementLinkAtPosition;
|
|
455
|
-
private
|
|
499
|
+
private handleElementLinkClick;
|
|
456
500
|
private getTopLayerFrameAtSceneCoords;
|
|
457
501
|
private handleCanvasPointerMove;
|
|
458
502
|
private handleEraser;
|
|
@@ -523,12 +567,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
523
567
|
/** generally you should use `addNewImagesToImageCache()` directly if you need
|
|
524
568
|
* to render new images. This is just a failsafe */
|
|
525
569
|
private scheduleImageRefresh;
|
|
526
|
-
private updateBindingEnabledOnPointerMove;
|
|
527
570
|
private clearSelection;
|
|
528
571
|
private handleInteractiveCanvasRef;
|
|
529
572
|
private insertImages;
|
|
530
573
|
private handleAppOnDrop;
|
|
531
|
-
loadFileToCanvas: (file: File, fileHandle:
|
|
574
|
+
loadFileToCanvas: (file: File, fileHandle: FileSystemFileHandle | null) => Promise<void>;
|
|
532
575
|
private handleCanvasContextMenu;
|
|
533
576
|
private maybeDragNewGenericElement;
|
|
534
577
|
private maybeHandleCrop;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AppState, UnsubscribeCallback } from "../types";
|
|
2
|
+
type StateChangeSelector = keyof AppState | (keyof AppState)[] | ((appState: AppState) => unknown);
|
|
3
|
+
export type OnStateChange = {
|
|
4
|
+
<K extends keyof AppState>(prop: K, callback: (value: AppState[K], appState: AppState) => void, opts?: {
|
|
5
|
+
once: boolean;
|
|
6
|
+
}): UnsubscribeCallback;
|
|
7
|
+
<K extends keyof AppState>(prop: K): Promise<AppState[K]>;
|
|
8
|
+
(prop: (keyof AppState)[], callback: (appState: AppState, appState2: AppState) => void, opts?: {
|
|
9
|
+
once: boolean;
|
|
10
|
+
}): UnsubscribeCallback;
|
|
11
|
+
(prop: (keyof AppState)[]): Promise<AppState>;
|
|
12
|
+
<T>(prop: (appState: AppState) => T, callback: (value: T, appState: AppState) => void, opts?: {
|
|
13
|
+
once: boolean;
|
|
14
|
+
}): UnsubscribeCallback;
|
|
15
|
+
<T>(prop: (appState: AppState) => T): Promise<T>;
|
|
16
|
+
(opts: {
|
|
17
|
+
predicate: (appState: AppState) => boolean;
|
|
18
|
+
callback: (appState: AppState) => void;
|
|
19
|
+
once?: boolean;
|
|
20
|
+
}): UnsubscribeCallback;
|
|
21
|
+
(opts: {
|
|
22
|
+
predicate: (appState: AppState) => boolean;
|
|
23
|
+
}): Promise<AppState>;
|
|
24
|
+
(selector: StateChangeSelector, callback: (value: any, appState: AppState) => void): any;
|
|
25
|
+
};
|
|
26
|
+
export declare class AppStateObserver {
|
|
27
|
+
private readonly getState;
|
|
28
|
+
private listeners;
|
|
29
|
+
constructor(getState: () => AppState);
|
|
30
|
+
private isStateChangePredicateOptions;
|
|
31
|
+
private subscribe;
|
|
32
|
+
private normalize;
|
|
33
|
+
onStateChange: OnStateChange;
|
|
34
|
+
flush(prevState: AppState): void;
|
|
35
|
+
clear(): void;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -14,7 +14,7 @@ export type CommandPaletteItem = {
|
|
|
14
14
|
category: string;
|
|
15
15
|
order?: number;
|
|
16
16
|
predicate?: boolean | Action["predicate"];
|
|
17
|
-
shortcut?: string;
|
|
17
|
+
shortcut?: string | null;
|
|
18
18
|
/** if false, command will not show while in view mode */
|
|
19
19
|
viewMode?: boolean;
|
|
20
20
|
perform: (data: {
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import "./IconPicker.scss";
|
|
2
2
|
import type { JSX } from "react";
|
|
3
|
-
|
|
3
|
+
type Option<T> = {
|
|
4
|
+
value: T;
|
|
5
|
+
text: string;
|
|
6
|
+
icon: JSX.Element;
|
|
7
|
+
keyBinding: string | null;
|
|
8
|
+
};
|
|
9
|
+
type PickerSection<T> = {
|
|
10
|
+
name: string;
|
|
11
|
+
options: readonly Option<T>[];
|
|
12
|
+
};
|
|
13
|
+
export declare function IconPicker<T>({ value, label, visibleSections, hiddenSections, onChange, }: {
|
|
4
14
|
label: string;
|
|
5
15
|
value: T;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
text: string;
|
|
9
|
-
icon: JSX.Element;
|
|
10
|
-
keyBinding: string | null;
|
|
11
|
-
}[];
|
|
16
|
+
visibleSections: readonly PickerSection<T>[];
|
|
17
|
+
hiddenSections?: readonly PickerSection<T>[];
|
|
12
18
|
onChange: (value: T) => void;
|
|
13
|
-
numberOfOptionsToAlwaysShow?: number;
|
|
14
|
-
group?: string;
|
|
15
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import "./PasteChartDialog.scss";
|
|
3
|
-
import type {
|
|
4
|
-
export declare const PasteChartDialog: ({
|
|
5
|
-
|
|
2
|
+
import type { Spreadsheet } from "../charts";
|
|
3
|
+
export declare const PasteChartDialog: ({ data, rawText, onClose, }: {
|
|
4
|
+
data: Spreadsheet;
|
|
5
|
+
rawText: string;
|
|
6
6
|
onClose: () => void;
|
|
7
|
-
setAppState: React.Component<any, UIAppState>["setState"];
|
|
8
7
|
}) => import("react/jsx-runtime").JSX.Element;
|