@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,10 +3,19 @@ import Footer from "./components/footer/FooterCenter";
|
|
|
3
3
|
import LiveCollaborationTrigger from "./components/live-collaboration/LiveCollaborationTrigger";
|
|
4
4
|
import MainMenu from "./components/main-menu/MainMenu";
|
|
5
5
|
import WelcomeScreen from "./components/welcome-screen/WelcomeScreen";
|
|
6
|
+
import { useOnAppStateChange as _useOnAppStateChange } from "./hooks/useAppStateValue";
|
|
6
7
|
import "./css/app.scss";
|
|
7
8
|
import "./css/styles.scss";
|
|
8
9
|
import "./fonts/fonts.css";
|
|
9
|
-
import type { ExcalidrawProps } from "./types";
|
|
10
|
+
import type { AppState, ExcalidrawProps } from "./types";
|
|
11
|
+
/**
|
|
12
|
+
* Stateless provider that allows `useExcalidrawAPI()` (and hooks built
|
|
13
|
+
* on it, such as `useAppStateValue()` and `useOnAppStateChange()`) to work
|
|
14
|
+
* outside the <Excalidraw> component tree.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ExcalidrawAPIProvider: ({ children, }: {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
19
|
export declare const Excalidraw: React.MemoExoticComponent<(props: ExcalidrawProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
20
|
export { getSceneVersion, hashElementsVersion, hashString, getNonDeletedElements, } from "@excalidraw/element";
|
|
12
21
|
export { getTextFromElements } from "@excalidraw/element";
|
|
@@ -19,7 +28,7 @@ export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json";
|
|
|
19
28
|
export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, } from "./data/blob";
|
|
20
29
|
export { mergeLibraryItems, getLibraryItemsHash } from "./data/library";
|
|
21
30
|
export { isLinearElement } from "@excalidraw/element";
|
|
22
|
-
export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, normalizeLink, sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, getFormFactor, } from "@excalidraw/common";
|
|
31
|
+
export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, normalizeLink, sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, getFormFactor, throttleRAF, } from "@excalidraw/common";
|
|
23
32
|
export { mutateElement, newElementWith, bumpVersion, } from "@excalidraw/element";
|
|
24
33
|
export { CaptureUpdateAction } from "@excalidraw/element";
|
|
25
34
|
export { parseLibraryTokensFromUrl, useHandleLibrary } from "./data/library";
|
|
@@ -28,7 +37,7 @@ export { Button } from "./components/Button";
|
|
|
28
37
|
export { Footer };
|
|
29
38
|
export { MainMenu };
|
|
30
39
|
export { Ellipsify } from "./components/Ellipsify";
|
|
31
|
-
export { useEditorInterface, useStylesPanelMode } from "./components/App";
|
|
40
|
+
export { useEditorInterface, useStylesPanelMode, useExcalidrawAPI, ExcalidrawAPIContext, } from "./components/App";
|
|
32
41
|
export { WelcomeScreen };
|
|
33
42
|
export { LiveCollaborationTrigger };
|
|
34
43
|
export { Stats } from "./components/Stats";
|
|
@@ -39,4 +48,17 @@ export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsW
|
|
|
39
48
|
export { DiagramToCodePlugin } from "./components/DiagramToCodePlugin/DiagramToCodePlugin";
|
|
40
49
|
export { getDataURL } from "./data/blob";
|
|
41
50
|
export { isElementLink } from "@excalidraw/element";
|
|
51
|
+
export { Fonts } from "./fonts/Fonts";
|
|
42
52
|
export { setCustomTextMetricsProvider } from "@excalidraw/element";
|
|
53
|
+
export { CommandPalette } from "./components/CommandPalette/CommandPalette";
|
|
54
|
+
export { renderSpreadsheet, tryParseSpreadsheet, isSpreadsheetValidForChartType, } from "./charts";
|
|
55
|
+
/**
|
|
56
|
+
* hook that subscribes to specific appState prop(s)
|
|
57
|
+
*
|
|
58
|
+
* @param prop - appState prop(s) to subscribe to, or a selector function.
|
|
59
|
+
* NOTE `prop/selector` is memoized and will not change after initial render
|
|
60
|
+
*/
|
|
61
|
+
export declare function useExcalidrawStateValue<K extends keyof AppState>(prop: K): AppState[K] | undefined;
|
|
62
|
+
export declare function useExcalidrawStateValue<T extends keyof AppState>(props: T[]): AppState | undefined;
|
|
63
|
+
export declare function useExcalidrawStateValue<T>(selector: (appState: AppState) => T): T | undefined;
|
|
64
|
+
export { _useOnAppStateChange as useOnExcalidrawStateChange };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { EditorInterface } from "@excalidraw/common";
|
|
3
|
+
import type { ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
4
|
+
export declare const getTextBoxPadding: (zoomValue: number) => number;
|
|
5
|
+
export declare const getTextAutoResizeHandle: (textElement: ExcalidrawTextElement, zoomValue: number, formFactor: EditorInterface["formFactor"]) => {
|
|
6
|
+
center: GlobalPoint | import("@excalidraw/math").LocalPoint;
|
|
7
|
+
start: GlobalPoint;
|
|
8
|
+
end: GlobalPoint;
|
|
9
|
+
hitboxWidth: number;
|
|
10
|
+
hitboxHeight: number;
|
|
11
|
+
} | null;
|
|
12
|
+
export declare const isPointHittingTextAutoResizeHandle: (point: Readonly<{
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}>, textElement: ExcalidrawTextElement, zoomValue: number, formFactor: EditorInterface["formFactor"]) => boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { IMAGE_MIME_TYPES, UserIdleState, throttleRAF, MIME_TYPES, ColorTuple, EditorInterface } from "@excalidraw/common";
|
|
2
2
|
import type { LinearElementEditor } from "@excalidraw/element";
|
|
3
3
|
import type { MaybeTransformHandleType } from "@excalidraw/element";
|
|
4
|
-
import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead,
|
|
4
|
+
import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, FontFamilyValues, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement, ArrangeAlgorithms, BindMode, ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
5
5
|
import type { Merge, MaybePromise, ValueOf, MakeBrand } from "@excalidraw/common/utility-types";
|
|
6
6
|
import type { CaptureUpdateActionType, DurableIncrement, EphemeralIncrement } from "@excalidraw/element";
|
|
7
|
+
import type { GlobalPoint } from "@excalidraw/math";
|
|
7
8
|
import type { Action } from "./actions/types";
|
|
8
9
|
import type { Spreadsheet } from "./charts";
|
|
9
10
|
import type { ClipboardData } from "./clipboard";
|
|
10
11
|
import type App from "./components/App";
|
|
11
12
|
import type Library from "./data/library";
|
|
12
|
-
import type { FileSystemHandle } from "./data/filesystem";
|
|
13
13
|
import type { ContextMenuItems } from "./components/ContextMenu";
|
|
14
14
|
import type { SnapLine } from "./snapping";
|
|
15
15
|
import type { ImportedDataState } from "./data/types";
|
|
@@ -17,6 +17,7 @@ import type { Language } from "./i18n";
|
|
|
17
17
|
import type { isOverScrollBars } from "./scene/scrollbars";
|
|
18
18
|
import type React from "react";
|
|
19
19
|
import type { JSX } from "react";
|
|
20
|
+
export type { App };
|
|
20
21
|
export type SocketId = string & {
|
|
21
22
|
_brand: "SocketId";
|
|
22
23
|
};
|
|
@@ -128,6 +129,7 @@ export type StaticCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
128
129
|
croppingElementId: AppState["croppingElementId"];
|
|
129
130
|
}>;
|
|
130
131
|
export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
132
|
+
activeTool: AppState["activeTool"];
|
|
131
133
|
activeEmbeddable: AppState["activeEmbeddable"];
|
|
132
134
|
selectionElement: AppState["selectionElement"];
|
|
133
135
|
selectedGroupIds: AppState["selectedGroupIds"];
|
|
@@ -135,6 +137,7 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
135
137
|
multiElement: AppState["multiElement"];
|
|
136
138
|
newElement: AppState["newElement"];
|
|
137
139
|
isBindingEnabled: AppState["isBindingEnabled"];
|
|
140
|
+
isMidpointSnappingEnabled: AppState["isMidpointSnappingEnabled"];
|
|
138
141
|
suggestedBinding: AppState["suggestedBinding"];
|
|
139
142
|
isRotating: AppState["isRotating"];
|
|
140
143
|
elementsToHighlight: AppState["elementsToHighlight"];
|
|
@@ -150,6 +153,7 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
150
153
|
frameRendering: AppState["frameRendering"];
|
|
151
154
|
shouldCacheIgnoreZoom: AppState["shouldCacheIgnoreZoom"];
|
|
152
155
|
exportScale: AppState["exportScale"];
|
|
156
|
+
currentItemArrowType: AppState["currentItemArrowType"];
|
|
153
157
|
}>;
|
|
154
158
|
export type ObservedAppState = ObservedStandaloneAppState & ObservedElementsAppState;
|
|
155
159
|
export type ObservedStandaloneAppState = {
|
|
@@ -215,9 +219,20 @@ export interface AppState {
|
|
|
215
219
|
* - set on pointer down, updated during pointer move
|
|
216
220
|
*/
|
|
217
221
|
selectionElement: NonDeletedExcalidrawElement | null;
|
|
222
|
+
/**
|
|
223
|
+
* tracking current arrow binding editor state (takes into account
|
|
224
|
+
* `bindingPreference` and keyboard modifiers (ctrl/alt)
|
|
225
|
+
*/
|
|
218
226
|
isBindingEnabled: boolean;
|
|
227
|
+
/** user arrow binding preference */
|
|
228
|
+
bindingPreference: "enabled" | "disabled";
|
|
229
|
+
/** user preference whether arrow snap to midpoints while binding */
|
|
230
|
+
isMidpointSnappingEnabled: boolean;
|
|
219
231
|
startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
|
|
220
|
-
suggestedBinding:
|
|
232
|
+
suggestedBinding: {
|
|
233
|
+
element: NonDeleted<ExcalidrawBindableElement>;
|
|
234
|
+
midPoint?: GlobalPoint;
|
|
235
|
+
} | null;
|
|
221
236
|
frameToHighlight: NonDeleted<ExcalidrawFrameLikeElement> | null;
|
|
222
237
|
frameRendering: {
|
|
223
238
|
enabled: boolean;
|
|
@@ -230,7 +245,7 @@ export interface AppState {
|
|
|
230
245
|
/**
|
|
231
246
|
* set when a new text is created or when an existing text is being edited
|
|
232
247
|
*/
|
|
233
|
-
editingTextElement:
|
|
248
|
+
editingTextElement: ExcalidrawTextElement | null;
|
|
234
249
|
activeTool: {
|
|
235
250
|
/**
|
|
236
251
|
* indicates a previous tool we should revert back to if we deselect the
|
|
@@ -289,6 +304,10 @@ export interface AppState {
|
|
|
289
304
|
} | {
|
|
290
305
|
name: "elementLinkSelector";
|
|
291
306
|
sourceElementId: ExcalidrawElement["id"];
|
|
307
|
+
} | {
|
|
308
|
+
name: "charts";
|
|
309
|
+
data: Spreadsheet;
|
|
310
|
+
rawText: string;
|
|
292
311
|
};
|
|
293
312
|
/**
|
|
294
313
|
* Reflects user preference for whether the default sidebar should be docked.
|
|
@@ -311,7 +330,7 @@ export interface AppState {
|
|
|
311
330
|
selectedElementsAreBeingDragged: boolean;
|
|
312
331
|
shouldCacheIgnoreZoom: boolean;
|
|
313
332
|
toast: {
|
|
314
|
-
message:
|
|
333
|
+
message: React.ReactNode;
|
|
315
334
|
closable?: boolean;
|
|
316
335
|
duration?: number;
|
|
317
336
|
} | null;
|
|
@@ -333,21 +352,13 @@ export interface AppState {
|
|
|
333
352
|
height: number;
|
|
334
353
|
offsetTop: number;
|
|
335
354
|
offsetLeft: number;
|
|
336
|
-
fileHandle:
|
|
355
|
+
fileHandle: FileSystemFileHandle | null;
|
|
337
356
|
collaborators: Map<SocketId, Collaborator>;
|
|
338
357
|
stats: {
|
|
339
358
|
open: boolean;
|
|
340
359
|
/** bitmap. Use `STATS_PANELS` bit values */
|
|
341
360
|
panels: number;
|
|
342
361
|
};
|
|
343
|
-
currentChartType: ChartType;
|
|
344
|
-
pasteDialog: {
|
|
345
|
-
shown: false;
|
|
346
|
-
data: null;
|
|
347
|
-
} | {
|
|
348
|
-
shown: true;
|
|
349
|
-
data: Spreadsheet;
|
|
350
|
-
};
|
|
351
362
|
showHyperlinkPopup: false | "info" | "editor";
|
|
352
363
|
selectedLinearElement: LinearElementEditor | null;
|
|
353
364
|
snapLines: readonly SnapLine[];
|
|
@@ -434,11 +445,36 @@ export type OnUserFollowedPayload = {
|
|
|
434
445
|
userToFollow: UserToFollow;
|
|
435
446
|
action: "FOLLOW" | "UNFOLLOW";
|
|
436
447
|
};
|
|
448
|
+
export type OnExportProgress = {
|
|
449
|
+
type: "progress";
|
|
450
|
+
message?: React.ReactNode;
|
|
451
|
+
/** 0-1 range */
|
|
452
|
+
progress?: number;
|
|
453
|
+
};
|
|
437
454
|
export interface ExcalidrawProps {
|
|
438
455
|
onChange?: (elements: readonly OrderedExcalidrawElement[], appState: AppState, files: BinaryFiles) => void;
|
|
456
|
+
/**
|
|
457
|
+
* note: only subscribes if the props.onIncrement is defined on initial render
|
|
458
|
+
*/
|
|
439
459
|
onIncrement?: (event: DurableIncrement | EphemeralIncrement) => void;
|
|
440
460
|
initialData?: (() => MaybePromise<ExcalidrawInitialDataState | null>) | MaybePromise<ExcalidrawInitialDataState | null>;
|
|
441
|
-
|
|
461
|
+
/**
|
|
462
|
+
* Invoked as soon as the Excalidraw API is available
|
|
463
|
+
* NOTE editor is not yet mounted, and state is not yet initialized
|
|
464
|
+
*/
|
|
465
|
+
onExcalidrawAPI?: (api: ExcalidrawImperativeAPI | null) => void;
|
|
466
|
+
/**
|
|
467
|
+
* Invoked once the editor root is mounted.
|
|
468
|
+
*/
|
|
469
|
+
onMount?: (payload: ExcalidrawMountPayload) => void;
|
|
470
|
+
/**
|
|
471
|
+
* Invoked when the editor root is unmounted.
|
|
472
|
+
*/
|
|
473
|
+
onUnmount?: () => void;
|
|
474
|
+
/**
|
|
475
|
+
* Invoked once the initial scene is loaded.
|
|
476
|
+
*/
|
|
477
|
+
onInitialize?: (api: ExcalidrawImperativeAPI) => void;
|
|
442
478
|
isCollaborating?: boolean;
|
|
443
479
|
onPointerUpdate?: (payload: {
|
|
444
480
|
pointer: {
|
|
@@ -497,6 +533,29 @@ export interface ExcalidrawProps {
|
|
|
497
533
|
strokeColorTopPicks?: ColorTuple;
|
|
498
534
|
backgroundColorTopPicks?: ColorTuple;
|
|
499
535
|
renderScrollbars?: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* Called before exporting to a file.
|
|
538
|
+
*
|
|
539
|
+
* Allows the host app to intercept and delay saving until async operations
|
|
540
|
+
* (e.g., images are loaded) complete.
|
|
541
|
+
*
|
|
542
|
+
* If Promise/AsyncGenerator is returned, a progress toast will be shown
|
|
543
|
+
* until the operation completes. Generator can yield progress updates.
|
|
544
|
+
*/
|
|
545
|
+
onExport?: (
|
|
546
|
+
/** type of export. Currently we only call for JSON exports or
|
|
547
|
+
* JSON-embedded PNG (which is also identified as `json` type here)*/
|
|
548
|
+
type: "json", data: {
|
|
549
|
+
elements: readonly ExcalidrawElement[];
|
|
550
|
+
appState: AppState;
|
|
551
|
+
files: BinaryFiles;
|
|
552
|
+
}, options: {
|
|
553
|
+
/** signal that gets aborted if user cancels the export (e.g. closes
|
|
554
|
+
* the native file picker dialog). In that case, you can either
|
|
555
|
+
* return immediately, or throw AbortError.
|
|
556
|
+
*/
|
|
557
|
+
signal: AbortSignal;
|
|
558
|
+
}) => MaybePromise<void> | AsyncGenerator<OnExportProgress, void>;
|
|
500
559
|
}
|
|
501
560
|
export type SceneData = {
|
|
502
561
|
elements?: ImportedDataState["elements"];
|
|
@@ -548,6 +607,8 @@ export type AppProps = Merge<ExcalidrawProps, {
|
|
|
548
607
|
export type AppClassProperties = {
|
|
549
608
|
props: AppProps;
|
|
550
609
|
state: AppState;
|
|
610
|
+
api: App["api"];
|
|
611
|
+
sessionExportThemeOverride: App["sessionExportThemeOverride"];
|
|
551
612
|
interactiveCanvas: HTMLCanvasElement | null;
|
|
552
613
|
/** static canvas */
|
|
553
614
|
canvas: HTMLCanvasElement;
|
|
@@ -588,7 +649,11 @@ export type AppClassProperties = {
|
|
|
588
649
|
onPointerUpEmitter: App["onPointerUpEmitter"];
|
|
589
650
|
updateEditorAtom: App["updateEditorAtom"];
|
|
590
651
|
onPointerDownEmitter: App["onPointerDownEmitter"];
|
|
652
|
+
onEvent: App["onEvent"];
|
|
653
|
+
onStateChange: App["onStateChange"];
|
|
654
|
+
lastPointerMoveCoords: App["lastPointerMoveCoords"];
|
|
591
655
|
bindModeHandler: App["bindModeHandler"];
|
|
656
|
+
setAppState: App["setAppState"];
|
|
592
657
|
};
|
|
593
658
|
export type PointerDownState = Readonly<{
|
|
594
659
|
origin: Readonly<{
|
|
@@ -649,7 +714,18 @@ export type PointerDownState = Readonly<{
|
|
|
649
714
|
};
|
|
650
715
|
}>;
|
|
651
716
|
export type UnsubscribeCallback = () => void;
|
|
717
|
+
export type ExcalidrawMountPayload = {
|
|
718
|
+
excalidrawAPI: ExcalidrawImperativeAPI;
|
|
719
|
+
container: HTMLDivElement | null;
|
|
720
|
+
};
|
|
721
|
+
export type ExcalidrawImperativeAPIEventMap = {
|
|
722
|
+
"editor:mount": [payload: ExcalidrawMountPayload];
|
|
723
|
+
"editor:initialize": [api: ExcalidrawImperativeAPI];
|
|
724
|
+
"editor:unmount": [];
|
|
725
|
+
};
|
|
652
726
|
export interface ExcalidrawImperativeAPI {
|
|
727
|
+
/** Whether the editor has been unmounted and the API is no longer usable. */
|
|
728
|
+
isDestroyed: boolean;
|
|
653
729
|
updateScene: InstanceType<typeof App>["updateScene"];
|
|
654
730
|
applyDeltas: InstanceType<typeof App>["applyDeltas"];
|
|
655
731
|
mutateElement: InstanceType<typeof App>["mutateElement"];
|
|
@@ -688,6 +764,8 @@ export interface ExcalidrawImperativeAPI {
|
|
|
688
764
|
onPointerUp: (callback: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState, event: PointerEvent) => void) => UnsubscribeCallback;
|
|
689
765
|
onScrollChange: (callback: (scrollX: number, scrollY: number, zoom: Zoom) => void) => UnsubscribeCallback;
|
|
690
766
|
onUserFollow: (callback: (payload: OnUserFollowedPayload) => void) => UnsubscribeCallback;
|
|
767
|
+
onStateChange: InstanceType<typeof App>["onStateChange"];
|
|
768
|
+
onEvent: InstanceType<typeof App>["onEvent"];
|
|
691
769
|
}
|
|
692
770
|
export type FrameNameBounds = {
|
|
693
771
|
x: number;
|
|
@@ -728,4 +806,3 @@ export type Offsets = Partial<{
|
|
|
728
806
|
bottom: number;
|
|
729
807
|
left: number;
|
|
730
808
|
}>;
|
|
731
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExcalidrawElement, ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
2
2
|
import type App from "../components/App";
|
|
3
3
|
type SubmitHandler = () => void;
|
|
4
|
-
export declare const textWysiwyg: ({ id, onChange, onSubmit, getViewportCoords, element, canvas, excalidrawContainer, app, autoSelect, }: {
|
|
4
|
+
export declare const textWysiwyg: ({ id, onChange, onSubmit, getViewportCoords, element, canvas, excalidrawContainer, app, autoSelect, initialCaretSceneCoords, }: {
|
|
5
5
|
id: ExcalidrawElement["id"];
|
|
6
6
|
/**
|
|
7
7
|
* textWysiwyg only deals with `originalText`
|
|
@@ -20,5 +20,9 @@ export declare const textWysiwyg: ({ id, onChange, onSubmit, getViewportCoords,
|
|
|
20
20
|
excalidrawContainer: HTMLDivElement | null;
|
|
21
21
|
app: App;
|
|
22
22
|
autoSelect?: boolean;
|
|
23
|
+
initialCaretSceneCoords?: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
} | null;
|
|
23
27
|
}) => SubmitHandler;
|
|
24
28
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LocalPoint, GlobalPoint, Radians, Degrees, Vector } from "./types";
|
|
1
|
+
import type { LocalPoint, GlobalPoint, Radians, Degrees, Vector, GlobalCoord, LocalCoord } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Create a properly typed Point instance from the X and Y coordinates.
|
|
4
4
|
*
|
|
@@ -7,6 +7,11 @@ import type { LocalPoint, GlobalPoint, Radians, Degrees, Vector } from "./types"
|
|
|
7
7
|
* @returns The branded and created point
|
|
8
8
|
*/
|
|
9
9
|
export declare function pointFrom<Point extends GlobalPoint | LocalPoint>(x: number, y: number): Point;
|
|
10
|
+
export declare function pointFrom<Coord extends GlobalCoord | LocalCoord>(coords: Coord): Coord extends GlobalCoord ? GlobalPoint : LocalPoint;
|
|
11
|
+
export declare function pointFrom<Point extends GlobalPoint | LocalPoint>(coords: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}): Point;
|
|
10
15
|
/**
|
|
11
16
|
* Converts and remaps an array containing a pair of numbers to Point.
|
|
12
17
|
*
|
|
@@ -52,7 +57,7 @@ export declare function pointsEqual<Point extends GlobalPoint | LocalPoint>(a: P
|
|
|
52
57
|
* @param angle The radians to rotate the point by
|
|
53
58
|
* @returns The rotated point
|
|
54
59
|
*/
|
|
55
|
-
export declare function pointRotateRads<Point extends GlobalPoint | LocalPoint>(
|
|
60
|
+
export declare function pointRotateRads<Point extends GlobalPoint | LocalPoint>(point: Point, center: Point, angle: Radians): Point;
|
|
56
61
|
/**
|
|
57
62
|
* Rotate a point by [angle] degree.
|
|
58
63
|
*
|
|
@@ -19,12 +19,24 @@ export type InclusiveRange = [number, number] & {
|
|
|
19
19
|
_brand: "excalimath_degree";
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* Represents a 2D position in world
|
|
22
|
+
* Represents a 2D position in world/canvas/scene space. A
|
|
23
23
|
* global coordinate.
|
|
24
24
|
*/
|
|
25
25
|
export type GlobalPoint = [x: number, y: number] & {
|
|
26
26
|
_brand: "excalimath__globalpoint";
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Represents a 2D position in world/canvas/scene space. A
|
|
30
|
+
* global coordinate.
|
|
31
|
+
*
|
|
32
|
+
* TODO remove this once we migrate the codebase to use Point tuples everywhere
|
|
33
|
+
*/
|
|
34
|
+
export type GlobalCoord = {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
} & {
|
|
38
|
+
_brand: "excalimath__globalcoord";
|
|
39
|
+
};
|
|
28
40
|
/**
|
|
29
41
|
* Represents a 2D position in whatever local space it's
|
|
30
42
|
* needed. A local coordinate.
|
|
@@ -32,6 +44,18 @@ export type GlobalPoint = [x: number, y: number] & {
|
|
|
32
44
|
export type LocalPoint = [x: number, y: number] & {
|
|
33
45
|
_brand: "excalimath__localpoint";
|
|
34
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Represents a 2D position in whatever local space it's needed.
|
|
49
|
+
* A local coordinate.
|
|
50
|
+
*
|
|
51
|
+
* TODO remove this once we migrate the codebase to use Point tuples everywhere
|
|
52
|
+
*/
|
|
53
|
+
export type LocalCoord = {
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
} & {
|
|
57
|
+
_brand: "excalimath__localcoord";
|
|
58
|
+
};
|
|
35
59
|
/**
|
|
36
60
|
* A line is an infinitely long object with no width, depth, or curvature.
|
|
37
61
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/excalidraw",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.503",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/excalidraw/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -82,14 +82,10 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@braintree/sanitize-url": "6.0.2",
|
|
85
|
-
"@excalidraw/common": "npm:@myoc/common@0.19.5-ffbfd9327",
|
|
86
|
-
"@excalidraw/element": "npm:@myoc/element@0.19.5-ffbfd9327",
|
|
87
85
|
"@excalidraw/laser-pointer": "1.3.1",
|
|
88
|
-
"@excalidraw/math": "npm:@myoc/element@0.19.5-ffbfd9327",
|
|
89
86
|
"@excalidraw/random-username": "1.1.0",
|
|
90
|
-
"@
|
|
91
|
-
"
|
|
92
|
-
"browser-fs-access": "0.29.1",
|
|
87
|
+
"@lezer/highlight": "^1.0.0",
|
|
88
|
+
"browser-fs-access": "0.38.0",
|
|
93
89
|
"canvas-roundrect-polyfill": "0.0.1",
|
|
94
90
|
"clsx": "1.1.1",
|
|
95
91
|
"cross-env": "7.0.3",
|
|
@@ -110,9 +106,13 @@
|
|
|
110
106
|
"png-chunks-extract": "1.0.0",
|
|
111
107
|
"points-on-curve": "1.0.1",
|
|
112
108
|
"pwacompat": "2.0.17",
|
|
109
|
+
"radix-ui": "1.4.3",
|
|
113
110
|
"roughjs": "4.6.4",
|
|
114
111
|
"sass": "1.51.0",
|
|
115
|
-
"tunnel-rat": "0.1.2"
|
|
112
|
+
"tunnel-rat": "0.1.2",
|
|
113
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.503",
|
|
114
|
+
"@excalidraw/math": "npm:@myoc/math@0.19.503",
|
|
115
|
+
"@excalidraw/element": "npm:@myoc/element@0.19.503"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
118
|
"@size-limit/preset-big-lib": "9.0.0",
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// locales/percentages.json
|
|
2
|
-
var en = 100;
|
|
3
|
-
var kaa = 23;
|
|
4
|
-
var percentages_default = {
|
|
5
|
-
"ar-SA": 91,
|
|
6
|
-
"az-AZ": 27,
|
|
7
|
-
"bg-BG": 70,
|
|
8
|
-
"bn-BD": 42,
|
|
9
|
-
"bn-IN": 42,
|
|
10
|
-
"ca-ES": 91,
|
|
11
|
-
"cs-CZ": 82,
|
|
12
|
-
"da-DK": 30,
|
|
13
|
-
"de-CH": 91,
|
|
14
|
-
"de-DE": 92,
|
|
15
|
-
"el-GR": 86,
|
|
16
|
-
en,
|
|
17
|
-
"es-ES": 91,
|
|
18
|
-
"eu-ES": 78,
|
|
19
|
-
"fa-IR": 91,
|
|
20
|
-
"fi-FI": 67,
|
|
21
|
-
"fr-FR": 99,
|
|
22
|
-
"gl-ES": 67,
|
|
23
|
-
"he-IL": 91,
|
|
24
|
-
"hi-IN": 91,
|
|
25
|
-
"hu-HU": 53,
|
|
26
|
-
"id-ID": 90,
|
|
27
|
-
"it-IT": 100,
|
|
28
|
-
"ja-JP": 87,
|
|
29
|
-
kaa,
|
|
30
|
-
"kab-KAB": 60,
|
|
31
|
-
"kk-KZ": 14,
|
|
32
|
-
"km-KH": 60,
|
|
33
|
-
"ko-KR": 80,
|
|
34
|
-
"ku-TR": 64,
|
|
35
|
-
"lt-LT": 37,
|
|
36
|
-
"lv-LV": 56,
|
|
37
|
-
"mr-IN": 91,
|
|
38
|
-
"my-MM": 27,
|
|
39
|
-
"nb-NO": 91,
|
|
40
|
-
"nl-NL": 100,
|
|
41
|
-
"nn-NO": 48,
|
|
42
|
-
"oc-FR": 84,
|
|
43
|
-
"pa-IN": 58,
|
|
44
|
-
"pl-PL": 99,
|
|
45
|
-
"pt-BR": 90,
|
|
46
|
-
"pt-PT": 91,
|
|
47
|
-
"ro-RO": 100,
|
|
48
|
-
"ru-RU": 99,
|
|
49
|
-
"si-LK": 75,
|
|
50
|
-
"sk-SK": 100,
|
|
51
|
-
"sl-SI": 91,
|
|
52
|
-
"sv-SE": 91,
|
|
53
|
-
"ta-IN": 86,
|
|
54
|
-
"th-TH": 63,
|
|
55
|
-
"tr-TR": 94,
|
|
56
|
-
"uk-UA": 90,
|
|
57
|
-
"uz-UZ": 0,
|
|
58
|
-
"vi-VN": 75,
|
|
59
|
-
"zh-CN": 99,
|
|
60
|
-
"zh-HK": 17,
|
|
61
|
-
"zh-TW": 91
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export {
|
|
65
|
-
en,
|
|
66
|
-
kaa,
|
|
67
|
-
percentages_default
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=chunk-DJHLEOOZ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../locales/percentages.json"],
|
|
4
|
-
"sourcesContent": ["{\n \"ar-SA\": 91,\n \"az-AZ\": 27,\n \"bg-BG\": 70,\n \"bn-BD\": 42,\n \"bn-IN\": 42,\n \"ca-ES\": 91,\n \"cs-CZ\": 82,\n \"da-DK\": 30,\n \"de-CH\": 91,\n \"de-DE\": 92,\n \"el-GR\": 86,\n \"en\": 100,\n \"es-ES\": 91,\n \"eu-ES\": 78,\n \"fa-IR\": 91,\n \"fi-FI\": 67,\n \"fr-FR\": 99,\n \"gl-ES\": 67,\n \"he-IL\": 91,\n \"hi-IN\": 91,\n \"hu-HU\": 53,\n \"id-ID\": 90,\n \"it-IT\": 100,\n \"ja-JP\": 87,\n \"kaa\": 23,\n \"kab-KAB\": 60,\n \"kk-KZ\": 14,\n \"km-KH\": 60,\n \"ko-KR\": 80,\n \"ku-TR\": 64,\n \"lt-LT\": 37,\n \"lv-LV\": 56,\n \"mr-IN\": 91,\n \"my-MM\": 27,\n \"nb-NO\": 91,\n \"nl-NL\": 100,\n \"nn-NO\": 48,\n \"oc-FR\": 84,\n \"pa-IN\": 58,\n \"pl-PL\": 99,\n \"pt-BR\": 90,\n \"pt-PT\": 91,\n \"ro-RO\": 100,\n \"ru-RU\": 99,\n \"si-LK\": 75,\n \"sk-SK\": 100,\n \"sl-SI\": 91,\n \"sv-SE\": 91,\n \"ta-IN\": 86,\n \"th-TH\": 63,\n \"tr-TR\": 94,\n \"uk-UA\": 90,\n \"uz-UZ\": 0,\n \"vi-VN\": 75,\n \"zh-CN\": 99,\n \"zh-HK\": 17,\n \"zh-TW\": 91\n}\n"],
|
|
5
|
-
"mappings": ";AAYE,SAAM;AAaN,UAAO;AAzBT;AAAA,EACE,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT;AAAA,EACA,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT;AAAA,EACA,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|