@myoc/excalidraw 0.19.502 → 0.19.503
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 +520 -0
- 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-YVUPBWS6.js} +58 -70
- package/dist/dev/chunk-YVUPBWS6.js.map +7 -0
- package/dist/dev/data/{image-BOZX7YCK.js → image-I24D3FB6.js} +3 -3
- package/dist/dev/index.css +225 -95
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +6746 -3772
- 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-2VV6LBBJ.js +4 -0
- package/dist/prod/chunk-3FGJVPJS.js +12 -0
- package/dist/prod/chunk-3PELD44J.js +1 -0
- package/dist/prod/{chunk-SNEYYD2R.js → chunk-KG57QRSG.js} +1 -1
- package/dist/prod/data/image-IFJHSHJP.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/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 +5 -0
- 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 +5 -2
- 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/actionBoundText.d.ts +27 -25
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +143 -132
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +26 -24
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +41 -36
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +26 -24
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionExport.d.ts +75 -368
- package/dist/types/excalidraw/actions/actionFrame.d.ts +52 -48
- package/dist/types/excalidraw/actions/actionGroup.d.ts +27 -25
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
- package/dist/types/excalidraw/actions/actionLink.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionProperties.d.ts +28 -26
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -11
- 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 +13 -12
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -12
- 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 +9 -7
- 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 +55 -13
- 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/data/blob.d.ts +45 -44
- 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 +37 -28
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/index.d.ts +25 -3
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +93 -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-I24D3FB6.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
|
@@ -3,4 +3,4 @@ export declare const DropdownMenuContentPropsContext: React.Context<{
|
|
|
3
3
|
onSelect?: (event: Event) => void;
|
|
4
4
|
}>;
|
|
5
5
|
export declare const getDropdownMenuItemClassName: (className?: string, selected?: boolean, hovered?: boolean) => string;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const useHandleDropdownMenuItemSelect: (onSelect: ((event: Event) => void) | undefined) => (event: Event) => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const getMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
3
3
|
export declare const getMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
4
|
+
export declare const getSubMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
5
|
+
export declare const getSubMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
@@ -116,38 +116,49 @@ export declare const SloppinessArtistIcon: import("react/jsx-runtime").JSX.Eleme
|
|
|
116
116
|
export declare const SloppinessCartoonistIcon: import("react/jsx-runtime").JSX.Element;
|
|
117
117
|
export declare const EdgeSharpIcon: import("react/jsx-runtime").JSX.Element;
|
|
118
118
|
export declare const EdgeRoundIcon: import("react/jsx-runtime").JSX.Element;
|
|
119
|
-
export declare const ArrowheadNoneIcon:
|
|
119
|
+
export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ flip }: {
|
|
120
|
+
flip?: boolean;
|
|
121
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
120
122
|
export declare const ArrowheadArrowIcon: React.MemoExoticComponent<({ flip }: {
|
|
121
123
|
flip?: boolean;
|
|
122
124
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
125
|
+
export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
|
|
126
|
+
flip?: boolean;
|
|
127
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
128
|
+
export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
|
|
129
|
+
flip?: boolean;
|
|
130
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
123
131
|
export declare const ArrowheadCircleIcon: React.MemoExoticComponent<({ flip }: {
|
|
124
132
|
flip?: boolean;
|
|
125
133
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
126
134
|
export declare const ArrowheadCircleOutlineIcon: React.MemoExoticComponent<({ flip }: {
|
|
127
135
|
flip?: boolean;
|
|
128
136
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
129
|
-
export declare const
|
|
137
|
+
export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
|
|
130
138
|
flip?: boolean;
|
|
131
139
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
132
|
-
export declare const
|
|
140
|
+
export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
|
|
133
141
|
flip?: boolean;
|
|
134
142
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
135
|
-
export declare const
|
|
143
|
+
export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
|
|
136
144
|
flip?: boolean;
|
|
137
145
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
138
|
-
export declare const
|
|
146
|
+
export declare const ArrowheadCardinalityOneIcon: React.MemoExoticComponent<({ flip }: {
|
|
139
147
|
flip?: boolean;
|
|
140
148
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
141
|
-
export declare const
|
|
149
|
+
export declare const ArrowheadCardinalityManyIcon: React.MemoExoticComponent<({ flip }: {
|
|
150
|
+
flip?: boolean;
|
|
151
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
152
|
+
export declare const ArrowheadCardinalityOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
|
|
142
153
|
flip?: boolean;
|
|
143
154
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
144
|
-
export declare const
|
|
155
|
+
export declare const ArrowheadCardinalityExactlyOneIcon: React.MemoExoticComponent<({ flip }: {
|
|
145
156
|
flip?: boolean;
|
|
146
157
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
147
|
-
export declare const
|
|
158
|
+
export declare const ArrowheadCardinalityZeroOrOneIcon: React.MemoExoticComponent<({ flip }: {
|
|
148
159
|
flip?: boolean;
|
|
149
160
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
150
|
-
export declare const
|
|
161
|
+
export declare const ArrowheadCardinalityZeroOrManyIcon: React.MemoExoticComponent<({ flip }: {
|
|
151
162
|
flip?: boolean;
|
|
152
163
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
153
164
|
export declare const FontSizeSmallIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -238,4 +249,7 @@ export declare const chevronLeftIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
238
249
|
export declare const sidebarRightIcon: import("react/jsx-runtime").JSX.Element;
|
|
239
250
|
export declare const messageCircleIcon: import("react/jsx-runtime").JSX.Element;
|
|
240
251
|
export declare const presentationIcon: import("react/jsx-runtime").JSX.Element;
|
|
252
|
+
export declare const emptyIcon: import("react/jsx-runtime").JSX.Element;
|
|
253
|
+
export declare const chevronRight: import("react/jsx-runtime").JSX.Element;
|
|
254
|
+
export declare const settingsIcon: import("react/jsx-runtime").JSX.Element;
|
|
241
255
|
export {};
|
|
@@ -58,3 +58,20 @@ export declare const LiveCollaborationTrigger: {
|
|
|
58
58
|
}): import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
displayName: string;
|
|
60
60
|
};
|
|
61
|
+
export declare const PreferencesToggleGridModeItem: () => import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export declare const PreferencesToggleZenModeItem: () => import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare const Preferences: {
|
|
64
|
+
({ children, additionalItems, }: {
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
additionalItems?: React.ReactNode;
|
|
67
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
ToggleToolLock: () => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
ToggleSnapMode: () => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
ToggleArrowBinding: () => import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
ToggleGridMode: () => import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
ToggleZenMode: () => import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
ToggleViewMode: () => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
ToggleElementProperties: () => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
displayName: string;
|
|
77
|
+
};
|
|
@@ -19,19 +19,7 @@ declare const MainMenu: React.FC<{
|
|
|
19
19
|
displayName: string;
|
|
20
20
|
};
|
|
21
21
|
Item: {
|
|
22
|
-
({ icon,
|
|
23
|
-
icon?: React.JSX.Element;
|
|
24
|
-
value?: string | number | undefined;
|
|
25
|
-
order?: number;
|
|
26
|
-
onSelect?: (event: Event) => void;
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
shortcut?: string;
|
|
29
|
-
hovered?: boolean;
|
|
30
|
-
selected?: boolean;
|
|
31
|
-
textStyle?: React.CSSProperties;
|
|
32
|
-
className?: string;
|
|
33
|
-
badge?: React.ReactNode;
|
|
34
|
-
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: import("../dropdownMenu/DropdownMenuItem").DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
35
23
|
displayName: string;
|
|
36
24
|
Badge: {
|
|
37
25
|
({ type, children, }: {
|
|
@@ -72,6 +60,28 @@ declare const MainMenu: React.FC<{
|
|
|
72
60
|
(): import("react/jsx-runtime").JSX.Element;
|
|
73
61
|
displayName: string;
|
|
74
62
|
};
|
|
63
|
+
Sub: {
|
|
64
|
+
({ children }: {
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
Trigger: {
|
|
68
|
+
({ children, icon, shortcut, className, }: {
|
|
69
|
+
children: React.ReactNode;
|
|
70
|
+
icon?: React.JSX.Element;
|
|
71
|
+
shortcut?: string;
|
|
72
|
+
className?: string;
|
|
73
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
displayName: string;
|
|
75
|
+
};
|
|
76
|
+
Content: {
|
|
77
|
+
({ children, className, }: {
|
|
78
|
+
children?: React.ReactNode;
|
|
79
|
+
className?: string;
|
|
80
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
displayName: string;
|
|
84
|
+
};
|
|
75
85
|
DefaultItems: typeof DefaultItems;
|
|
76
86
|
};
|
|
77
87
|
export default MainMenu;
|
|
@@ -2,12 +2,11 @@ import { IMAGE_MIME_TYPES, MIME_TYPES } from "@excalidraw/common";
|
|
|
2
2
|
import type { ValueOf } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
|
|
4
4
|
import type { AppState, DataURL, LibraryItem } from "../types";
|
|
5
|
-
import type { FileSystemHandle } from "browser-fs-access";
|
|
6
5
|
import type { ImportedLibraryData } from "./types";
|
|
7
6
|
export declare const getMimeType: (blob: Blob | string) => string;
|
|
8
|
-
export declare const getFileHandleType: (handle:
|
|
7
|
+
export declare const getFileHandleType: (handle: FileSystemFileHandle | null) => string | null;
|
|
9
8
|
export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
|
|
10
|
-
export declare const isImageFileHandle: (handle:
|
|
9
|
+
export declare const isImageFileHandle: (handle: FileSystemFileHandle | null) => handle is FileSystemFileHandle;
|
|
11
10
|
export declare const isSupportedImageFileType: (type: string | null | undefined) => boolean;
|
|
12
11
|
export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
|
|
13
12
|
type: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
@@ -15,8 +14,8 @@ export declare const isSupportedImageFile: (blob: Blob | null | undefined) => bl
|
|
|
15
14
|
export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File,
|
|
16
15
|
/** @see restore.localAppState */
|
|
17
16
|
localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
|
|
18
|
-
/**
|
|
19
|
-
fileHandle?:
|
|
17
|
+
/** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
|
|
18
|
+
fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
20
19
|
type: "application/vnd.excalidraw+json";
|
|
21
20
|
data: {
|
|
22
21
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
@@ -43,12 +42,21 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
43
42
|
} | {
|
|
44
43
|
name: "elementLinkSelector";
|
|
45
44
|
sourceElementId: ExcalidrawElement["id"];
|
|
45
|
+
} | {
|
|
46
|
+
name: "charts";
|
|
47
|
+
data: import("../charts").Spreadsheet;
|
|
48
|
+
rawText: string;
|
|
46
49
|
};
|
|
47
50
|
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
48
51
|
selectedElementIds: Readonly<{
|
|
49
52
|
[id: string]: true;
|
|
50
53
|
}>;
|
|
51
54
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
55
|
+
activeTool: {
|
|
56
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
57
|
+
locked: boolean;
|
|
58
|
+
fromSelection: boolean;
|
|
59
|
+
} & import("../types").ActiveTool;
|
|
52
60
|
activeEmbeddable: {
|
|
53
61
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
54
62
|
state: "hover" | "active";
|
|
@@ -61,13 +69,17 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
61
69
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
62
70
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
63
71
|
isBindingEnabled: boolean;
|
|
64
|
-
|
|
72
|
+
isMidpointSnappingEnabled: boolean;
|
|
73
|
+
suggestedBinding: {
|
|
74
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
75
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
76
|
+
} | null;
|
|
65
77
|
isRotating: boolean;
|
|
66
78
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
67
79
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
68
80
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
69
81
|
zenModeEnabled: boolean;
|
|
70
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
82
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
71
83
|
isCropping: boolean;
|
|
72
84
|
croppingElementId: ExcalidrawElement["id"] | null;
|
|
73
85
|
searchMatches: Readonly<{
|
|
@@ -80,6 +92,7 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
80
92
|
}>;
|
|
81
93
|
shouldCacheIgnoreZoom: boolean;
|
|
82
94
|
exportScale: number;
|
|
95
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
83
96
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
84
97
|
gridSize: number;
|
|
85
98
|
contextMenu: {
|
|
@@ -103,13 +116,9 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
103
116
|
};
|
|
104
117
|
errorMessage: React.ReactNode;
|
|
105
118
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
119
|
+
bindingPreference: "enabled" | "disabled";
|
|
106
120
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
107
121
|
editingFrame: string | null;
|
|
108
|
-
activeTool: {
|
|
109
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
110
|
-
locked: boolean;
|
|
111
|
-
fromSelection: boolean;
|
|
112
|
-
} & import("../types").ActiveTool;
|
|
113
122
|
preferredSelectionTool: {
|
|
114
123
|
type: "selection" | "lasso";
|
|
115
124
|
initialized: boolean;
|
|
@@ -133,7 +142,6 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
133
142
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
134
143
|
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
135
144
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
136
|
-
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
137
145
|
cursorButton: "up" | "down";
|
|
138
146
|
scrolledOutside: boolean;
|
|
139
147
|
isResizing: boolean;
|
|
@@ -150,25 +158,17 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
150
158
|
};
|
|
151
159
|
selectedElementsAreBeingDragged: boolean;
|
|
152
160
|
toast: {
|
|
153
|
-
message:
|
|
161
|
+
message: React.ReactNode;
|
|
154
162
|
closable?: boolean;
|
|
155
163
|
duration?: number;
|
|
156
164
|
} | null;
|
|
157
165
|
gridStep: number;
|
|
158
166
|
gridModeEnabled: boolean;
|
|
159
|
-
fileHandle:
|
|
167
|
+
fileHandle: FileSystemFileHandle | null;
|
|
160
168
|
stats: {
|
|
161
169
|
open: boolean;
|
|
162
170
|
panels: number;
|
|
163
171
|
};
|
|
164
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
165
|
-
pasteDialog: {
|
|
166
|
-
shown: false;
|
|
167
|
-
data: null;
|
|
168
|
-
} | {
|
|
169
|
-
shown: true;
|
|
170
|
-
data: import("../charts").Spreadsheet;
|
|
171
|
-
};
|
|
172
172
|
showHyperlinkPopup: false | "info" | "editor";
|
|
173
173
|
originSnapOffset: {
|
|
174
174
|
x: number;
|
|
@@ -190,8 +190,8 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
190
190
|
export declare const loadFromBlob: (blob: Blob,
|
|
191
191
|
/** @see restore.localAppState */
|
|
192
192
|
localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
|
|
193
|
-
/**
|
|
194
|
-
fileHandle?:
|
|
193
|
+
/** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
|
|
194
|
+
fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
195
195
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
196
196
|
appState: {
|
|
197
197
|
viewBackgroundColor: string;
|
|
@@ -216,12 +216,21 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
216
216
|
} | {
|
|
217
217
|
name: "elementLinkSelector";
|
|
218
218
|
sourceElementId: ExcalidrawElement["id"];
|
|
219
|
+
} | {
|
|
220
|
+
name: "charts";
|
|
221
|
+
data: import("../charts").Spreadsheet;
|
|
222
|
+
rawText: string;
|
|
219
223
|
};
|
|
220
224
|
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
221
225
|
selectedElementIds: Readonly<{
|
|
222
226
|
[id: string]: true;
|
|
223
227
|
}>;
|
|
224
228
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
229
|
+
activeTool: {
|
|
230
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
231
|
+
locked: boolean;
|
|
232
|
+
fromSelection: boolean;
|
|
233
|
+
} & import("../types").ActiveTool;
|
|
225
234
|
activeEmbeddable: {
|
|
226
235
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
227
236
|
state: "hover" | "active";
|
|
@@ -234,13 +243,17 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
234
243
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
235
244
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
236
245
|
isBindingEnabled: boolean;
|
|
237
|
-
|
|
246
|
+
isMidpointSnappingEnabled: boolean;
|
|
247
|
+
suggestedBinding: {
|
|
248
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
249
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
250
|
+
} | null;
|
|
238
251
|
isRotating: boolean;
|
|
239
252
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
240
253
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
241
254
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
242
255
|
zenModeEnabled: boolean;
|
|
243
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
256
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
244
257
|
isCropping: boolean;
|
|
245
258
|
croppingElementId: ExcalidrawElement["id"] | null;
|
|
246
259
|
searchMatches: Readonly<{
|
|
@@ -253,6 +266,7 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
253
266
|
}>;
|
|
254
267
|
shouldCacheIgnoreZoom: boolean;
|
|
255
268
|
exportScale: number;
|
|
269
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
256
270
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
257
271
|
gridSize: number;
|
|
258
272
|
contextMenu: {
|
|
@@ -276,13 +290,9 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
276
290
|
};
|
|
277
291
|
errorMessage: React.ReactNode;
|
|
278
292
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
293
|
+
bindingPreference: "enabled" | "disabled";
|
|
279
294
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
280
295
|
editingFrame: string | null;
|
|
281
|
-
activeTool: {
|
|
282
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
283
|
-
locked: boolean;
|
|
284
|
-
fromSelection: boolean;
|
|
285
|
-
} & import("../types").ActiveTool;
|
|
286
296
|
preferredSelectionTool: {
|
|
287
297
|
type: "selection" | "lasso";
|
|
288
298
|
initialized: boolean;
|
|
@@ -306,7 +316,6 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
306
316
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
307
317
|
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
308
318
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
309
|
-
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
310
319
|
cursorButton: "up" | "down";
|
|
311
320
|
scrolledOutside: boolean;
|
|
312
321
|
isResizing: boolean;
|
|
@@ -323,25 +332,17 @@ fileHandle?: FileSystemHandle | null) => Promise<{
|
|
|
323
332
|
};
|
|
324
333
|
selectedElementsAreBeingDragged: boolean;
|
|
325
334
|
toast: {
|
|
326
|
-
message:
|
|
335
|
+
message: React.ReactNode;
|
|
327
336
|
closable?: boolean;
|
|
328
337
|
duration?: number;
|
|
329
338
|
} | null;
|
|
330
339
|
gridStep: number;
|
|
331
340
|
gridModeEnabled: boolean;
|
|
332
|
-
fileHandle:
|
|
341
|
+
fileHandle: FileSystemFileHandle | null;
|
|
333
342
|
stats: {
|
|
334
343
|
open: boolean;
|
|
335
344
|
panels: number;
|
|
336
345
|
};
|
|
337
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
338
|
-
pasteDialog: {
|
|
339
|
-
shown: false;
|
|
340
|
-
data: null;
|
|
341
|
-
} | {
|
|
342
|
-
shown: true;
|
|
343
|
-
data: import("../charts").Spreadsheet;
|
|
344
|
-
};
|
|
345
346
|
showHyperlinkPopup: false | "info" | "editor";
|
|
346
347
|
originSnapOffset: {
|
|
347
348
|
x: number;
|
|
@@ -376,7 +377,7 @@ export declare const SVGStringToFile: (SVGString: string, filename?: string) =>
|
|
|
376
377
|
type: typeof MIME_TYPES.svg;
|
|
377
378
|
};
|
|
378
379
|
export declare const ImageURLToFile: (imageUrl: string, filename?: string) => Promise<File | undefined>;
|
|
379
|
-
export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<
|
|
380
|
+
export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemFileHandle | null>;
|
|
380
381
|
export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: string, name: string | undefined) => File;
|
|
381
382
|
/** attempts to detect correct mimeType if none is set, or if an image
|
|
382
383
|
* has an incorrect extension.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { supported as nativeFileSystemSupported } from "browser-fs-access";
|
|
2
2
|
import { MIME_TYPES } from "@excalidraw/common";
|
|
3
|
-
import type { FileSystemHandle } from "browser-fs-access";
|
|
4
3
|
type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">;
|
|
5
4
|
export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
|
|
6
5
|
extensions?: FILE_EXTENSION[];
|
|
@@ -14,8 +13,7 @@ export declare const fileSave: (blob: Blob | Promise<Blob>, opts: {
|
|
|
14
13
|
extension: FILE_EXTENSION;
|
|
15
14
|
mimeTypes?: string[];
|
|
16
15
|
description: string;
|
|
17
|
-
/** existing
|
|
18
|
-
fileHandle?:
|
|
19
|
-
}) => Promise<
|
|
16
|
+
/** existing FileSystemFileHandle */
|
|
17
|
+
fileHandle?: FileSystemFileHandle | null;
|
|
18
|
+
}) => Promise<FileSystemFileHandle | null>;
|
|
20
19
|
export { nativeFileSystemSupported };
|
|
21
|
-
export type { FileSystemHandle };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type { FileSystemHandle } from "./filesystem";
|
|
3
2
|
import type { ExportType } from "../scene/types";
|
|
4
3
|
import type { AppState, BinaryFiles } from "../types";
|
|
5
4
|
export { loadFromBlob } from "./blob";
|
|
@@ -17,6 +16,6 @@ export declare const exportCanvas: (type: Omit<ExportType, "backend">, elements:
|
|
|
17
16
|
viewBackgroundColor: string;
|
|
18
17
|
/** filename, if applicable */
|
|
19
18
|
name?: string;
|
|
20
|
-
fileHandle?:
|
|
19
|
+
fileHandle?: FileSystemFileHandle | null;
|
|
21
20
|
exportingFrame: ExcalidrawFrameLikeElement | null;
|
|
22
|
-
}) => Promise<
|
|
21
|
+
}) => Promise<FileSystemFileHandle | null | undefined>;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
1
|
+
import type { ExcalidrawElement, NonDeleted } from "@excalidraw/element/types";
|
|
2
|
+
import type { MaybePromise } from "@excalidraw/common/utility-types";
|
|
2
3
|
import type { AppState, BinaryFiles, LibraryItems } from "../types";
|
|
3
4
|
import type { ImportedDataState, ImportedLibraryData } from "./types";
|
|
5
|
+
export type JSONExportData = {
|
|
6
|
+
elements: readonly NonDeleted<ExcalidrawElement>[];
|
|
7
|
+
appState: AppState;
|
|
8
|
+
files: BinaryFiles;
|
|
9
|
+
};
|
|
4
10
|
export declare const serializeAsJSON: (elements: readonly ExcalidrawElement[], appState: Partial<AppState>, files: BinaryFiles, type: "local" | "database") => string;
|
|
5
|
-
export declare const saveAsJSON: (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
fileHandle:
|
|
11
|
+
export declare const saveAsJSON: ({ data, filename, fileHandle, }: {
|
|
12
|
+
data: MaybePromise<JSONExportData>;
|
|
13
|
+
filename: string;
|
|
14
|
+
fileHandle: AppState["fileHandle"];
|
|
15
|
+
}) => Promise<{
|
|
16
|
+
fileHandle: FileSystemFileHandle | null;
|
|
9
17
|
}>;
|
|
10
18
|
export declare const loadFromJSON: (localAppState: AppState, localElements: readonly ExcalidrawElement[] | null) => Promise<{
|
|
11
19
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
@@ -32,12 +40,21 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
32
40
|
} | {
|
|
33
41
|
name: "elementLinkSelector";
|
|
34
42
|
sourceElementId: ExcalidrawElement["id"];
|
|
43
|
+
} | {
|
|
44
|
+
name: "charts";
|
|
45
|
+
data: import("../charts").Spreadsheet;
|
|
46
|
+
rawText: string;
|
|
35
47
|
};
|
|
36
48
|
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
37
49
|
selectedElementIds: Readonly<{
|
|
38
50
|
[id: string]: true;
|
|
39
51
|
}>;
|
|
40
|
-
frameToHighlight:
|
|
52
|
+
frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
53
|
+
activeTool: {
|
|
54
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
55
|
+
locked: boolean;
|
|
56
|
+
fromSelection: boolean;
|
|
57
|
+
} & import("../types").ActiveTool;
|
|
41
58
|
activeEmbeddable: {
|
|
42
59
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
43
60
|
state: "hover" | "active";
|
|
@@ -47,16 +64,20 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
47
64
|
[groupId: string]: boolean;
|
|
48
65
|
};
|
|
49
66
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
50
|
-
multiElement:
|
|
51
|
-
newElement:
|
|
67
|
+
multiElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
68
|
+
newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
52
69
|
isBindingEnabled: boolean;
|
|
53
|
-
|
|
70
|
+
isMidpointSnappingEnabled: boolean;
|
|
71
|
+
suggestedBinding: {
|
|
72
|
+
element: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
73
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
74
|
+
} | null;
|
|
54
75
|
isRotating: boolean;
|
|
55
|
-
elementsToHighlight:
|
|
76
|
+
elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
|
|
56
77
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
57
78
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
58
79
|
zenModeEnabled: boolean;
|
|
59
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
80
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
60
81
|
isCropping: boolean;
|
|
61
82
|
croppingElementId: ExcalidrawElement["id"] | null;
|
|
62
83
|
searchMatches: Readonly<{
|
|
@@ -69,6 +90,7 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
69
90
|
}>;
|
|
70
91
|
shouldCacheIgnoreZoom: boolean;
|
|
71
92
|
exportScale: number;
|
|
93
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
72
94
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
73
95
|
gridSize: number;
|
|
74
96
|
contextMenu: {
|
|
@@ -92,13 +114,9 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
92
114
|
};
|
|
93
115
|
errorMessage: React.ReactNode;
|
|
94
116
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
95
|
-
|
|
117
|
+
bindingPreference: "enabled" | "disabled";
|
|
118
|
+
startBoundElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
96
119
|
editingFrame: string | null;
|
|
97
|
-
activeTool: {
|
|
98
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
99
|
-
locked: boolean;
|
|
100
|
-
fromSelection: boolean;
|
|
101
|
-
} & import("../types").ActiveTool;
|
|
102
120
|
preferredSelectionTool: {
|
|
103
121
|
type: "selection" | "lasso";
|
|
104
122
|
initialized: boolean;
|
|
@@ -122,7 +140,6 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
122
140
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
123
141
|
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
124
142
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
125
|
-
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
126
143
|
cursorButton: "up" | "down";
|
|
127
144
|
scrolledOutside: boolean;
|
|
128
145
|
isResizing: boolean;
|
|
@@ -139,25 +156,17 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
139
156
|
};
|
|
140
157
|
selectedElementsAreBeingDragged: boolean;
|
|
141
158
|
toast: {
|
|
142
|
-
message:
|
|
159
|
+
message: React.ReactNode;
|
|
143
160
|
closable?: boolean;
|
|
144
161
|
duration?: number;
|
|
145
162
|
} | null;
|
|
146
163
|
gridStep: number;
|
|
147
164
|
gridModeEnabled: boolean;
|
|
148
|
-
fileHandle:
|
|
165
|
+
fileHandle: FileSystemFileHandle | null;
|
|
149
166
|
stats: {
|
|
150
167
|
open: boolean;
|
|
151
168
|
panels: number;
|
|
152
169
|
};
|
|
153
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
154
|
-
pasteDialog: {
|
|
155
|
-
shown: false;
|
|
156
|
-
data: null;
|
|
157
|
-
} | {
|
|
158
|
-
shown: true;
|
|
159
|
-
data: import("../charts").Spreadsheet;
|
|
160
|
-
};
|
|
161
170
|
showHyperlinkPopup: false | "info" | "editor";
|
|
162
171
|
originSnapOffset: {
|
|
163
172
|
x: number;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import type { MaybePromise } from "@excalidraw/common/utility-types";
|
|
1
2
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
3
|
import type { AppState, BinaryFiles } from "../types";
|
|
3
|
-
export declare const resaveAsImageWithScene: (
|
|
4
|
-
|
|
4
|
+
export declare const resaveAsImageWithScene: (data: MaybePromise<{
|
|
5
|
+
elements: readonly ExcalidrawElement[];
|
|
6
|
+
appState: AppState;
|
|
7
|
+
files: BinaryFiles;
|
|
8
|
+
}>, fileHandle: FileSystemFileHandle, filename: string) => Promise<{
|
|
9
|
+
fileHandle: FileSystemFileHandle;
|
|
5
10
|
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AppState } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Subscribes to specific appState changes. The component re-renders
|
|
4
|
+
* only when the specified prop(s) change — not on every appState update.
|
|
5
|
+
*
|
|
6
|
+
* Works both inside and outside the <Excalidraw> tree, as long as
|
|
7
|
+
* ExcalidrawAPIContext.Provider is an ancestor (automatically provided
|
|
8
|
+
* inside <Excalidraw>, or manually by the host app).
|
|
9
|
+
*
|
|
10
|
+
* Returns the narrowed value depending on prop form:
|
|
11
|
+
* - `keyof AppState` → `AppState[K]`
|
|
12
|
+
* - `(keyof AppState)[]` → whole `AppState`
|
|
13
|
+
* - selector function → selector's return type `T`
|
|
14
|
+
*
|
|
15
|
+
* If excalidrawAPI is not ready yet (host apps), hook is rerendered with latest
|
|
16
|
+
* value once available.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useAppStateValue<K extends keyof AppState>(prop: K, _internal?: boolean): AppState[K];
|
|
19
|
+
export declare function useAppStateValue(props: (keyof AppState)[], _internal?: boolean): AppState;
|
|
20
|
+
export declare function useAppStateValue<T>(selector: (appState: AppState) => T, _internal?: boolean): T;
|
|
21
|
+
/**
|
|
22
|
+
* Subscribes to specific appState changes without causing component rerenders.
|
|
23
|
+
*
|
|
24
|
+
* The callback is called on every matching change, but also on initial render
|
|
25
|
+
* so you can initialize your state.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useOnAppStateChange<K extends keyof AppState>(prop: K, callback: (value: AppState[K], appState: AppState) => void): undefined;
|
|
28
|
+
export declare function useOnAppStateChange(props: (keyof AppState)[], callback: (props: AppState, appState: AppState) => void): undefined;
|
|
29
|
+
export declare function useOnAppStateChange<T>(selector: (appState: AppState) => T, callback: (value: T, appState: AppState) => void): undefined;
|