@dwelle/excalidraw 0.5.0-e6263588 → 0.5.0-e9944c4
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 +16 -0
- package/dist/dev/{chunk-MYBMQLFV.js → chunk-6FPW7UII.js} +2 -2
- package/dist/dev/{chunk-MYBMQLFV.js.map → chunk-6FPW7UII.js.map} +1 -1
- package/dist/dev/{chunk-MUNVYEGW.js → chunk-A4LHQJCQ.js} +16 -3
- package/dist/dev/chunk-A4LHQJCQ.js.map +7 -0
- package/dist/dev/{chunk-GK2P2Z4N.js → chunk-MUXNIGJA.js} +5140 -3664
- package/dist/dev/chunk-MUXNIGJA.js.map +7 -0
- package/dist/dev/chunk-Q67DF2PJ.js +69 -0
- package/dist/dev/chunk-Q67DF2PJ.js.map +7 -0
- package/dist/dev/components/TTDDialog/{CodeMirrorEditor-FCA7YAIL.js → CodeMirrorEditor-XFPXQDTD.js} +2 -2
- package/dist/dev/data/{image-5N65CA7G.js → image-DBJ5VI3T.js} +3 -3
- package/dist/dev/index.css +324 -221
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +3846 -1991
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{ar-SA-YEOLME2Y.js → ar-SA-EW44IW4V.js} +14 -2
- package/dist/dev/locales/ar-SA-EW44IW4V.js.map +7 -0
- package/dist/dev/locales/{az-AZ-DQL36U4O.js → az-AZ-AI7WAYA2.js} +14 -2
- package/dist/dev/locales/az-AZ-AI7WAYA2.js.map +7 -0
- package/dist/dev/locales/{bg-BG-LG6R5FEQ.js → bg-BG-43ZNGDXF.js} +14 -2
- package/dist/dev/locales/bg-BG-43ZNGDXF.js.map +7 -0
- package/dist/dev/locales/{bn-BD-W63P7JT5.js → bn-BD-PU4CN7NP.js} +14 -2
- package/dist/dev/locales/bn-BD-PU4CN7NP.js.map +7 -0
- package/dist/dev/locales/{bn-IN-SCHACAA6.js → bn-IN-54CF43JL.js} +14 -2
- package/dist/dev/locales/bn-IN-54CF43JL.js.map +7 -0
- package/dist/dev/locales/{ca-ES-XP3CQTWV.js → ca-ES-RHJO3QDO.js} +14 -2
- package/dist/dev/locales/ca-ES-RHJO3QDO.js.map +7 -0
- package/dist/dev/locales/{cs-CZ-EXLEOJMD.js → cs-CZ-ZRSAO3BA.js} +14 -2
- package/dist/dev/locales/cs-CZ-ZRSAO3BA.js.map +7 -0
- package/dist/dev/locales/{da-DK-46ONLZRX.js → da-DK-OAB6DEJX.js} +14 -2
- package/dist/dev/locales/da-DK-OAB6DEJX.js.map +7 -0
- package/dist/dev/locales/{de-CH-A5QH3YGW.js → de-CH-QF7JLXTF.js} +14 -2
- package/dist/dev/locales/de-CH-QF7JLXTF.js.map +7 -0
- package/dist/dev/locales/{de-DE-FVCCKR5N.js → de-DE-5ZO4KOPT.js} +14 -2
- package/dist/dev/locales/de-DE-5ZO4KOPT.js.map +7 -0
- package/dist/dev/locales/{el-GR-SB4MX5JS.js → el-GR-F74ZSUEO.js} +14 -2
- package/dist/dev/locales/el-GR-F74ZSUEO.js.map +7 -0
- package/dist/dev/locales/{en-AZHTDC2Z.js → en-INQU5YPU.js} +2 -2
- package/dist/dev/locales/{es-ES-VRTYQG6S.js → es-ES-3B3IENPS.js} +14 -2
- package/dist/dev/locales/es-ES-3B3IENPS.js.map +7 -0
- package/dist/dev/locales/{eu-ES-3OHEU2YV.js → eu-ES-NH447TVU.js} +14 -2
- package/dist/dev/locales/eu-ES-NH447TVU.js.map +7 -0
- package/dist/dev/locales/{fa-IR-74WR2KXF.js → fa-IR-V44PNTTK.js} +46 -34
- package/dist/dev/locales/fa-IR-V44PNTTK.js.map +7 -0
- package/dist/dev/locales/{fi-FI-XZQC4II2.js → fi-FI-ZXSYWCC4.js} +14 -2
- package/dist/dev/locales/fi-FI-ZXSYWCC4.js.map +7 -0
- package/dist/dev/locales/{fr-FR-RABBDBKM.js → fr-FR-RJSOSEYS.js} +25 -13
- package/dist/dev/locales/fr-FR-RJSOSEYS.js.map +7 -0
- package/dist/dev/locales/{gl-ES-OU3Q6XUE.js → gl-ES-NAUVMVFY.js} +14 -2
- package/dist/dev/locales/gl-ES-NAUVMVFY.js.map +7 -0
- package/dist/dev/locales/{he-IL-6NCD5D54.js → he-IL-JBKWWR75.js} +67 -55
- package/dist/dev/locales/he-IL-JBKWWR75.js.map +7 -0
- package/dist/dev/locales/{hi-IN-M54WKOJI.js → hi-IN-SD773MVZ.js} +14 -2
- package/dist/dev/locales/hi-IN-SD773MVZ.js.map +7 -0
- package/dist/dev/locales/{hu-HU-HAW63BCI.js → hu-HU-OTA7GOAV.js} +14 -2
- package/dist/dev/locales/hu-HU-OTA7GOAV.js.map +7 -0
- package/dist/dev/locales/{id-ID-TFSPHGWX.js → id-ID-KGCGQFTT.js} +100 -88
- package/dist/dev/locales/id-ID-KGCGQFTT.js.map +7 -0
- package/dist/dev/locales/{it-IT-MH3BAO5W.js → it-IT-EWGEXMVK.js} +25 -13
- package/dist/dev/locales/it-IT-EWGEXMVK.js.map +7 -0
- package/dist/dev/locales/{ja-JP-UGJBHLX6.js → ja-JP-YMGRGBPS.js} +17 -5
- package/dist/dev/locales/ja-JP-YMGRGBPS.js.map +7 -0
- package/dist/dev/locales/{kaa-5ZUEYWIM.js → kaa-RRE7XUCW.js} +14 -2
- package/dist/dev/locales/kaa-RRE7XUCW.js.map +7 -0
- package/dist/dev/locales/{kab-KAB-RLAZQZSM.js → kab-KAB-ZCYVOJU4.js} +14 -2
- package/dist/dev/locales/kab-KAB-ZCYVOJU4.js.map +7 -0
- package/dist/dev/locales/{kk-KZ-CIP7GOIF.js → kk-KZ-TO6XEFJC.js} +14 -2
- package/dist/dev/locales/kk-KZ-TO6XEFJC.js.map +7 -0
- package/dist/dev/locales/{km-KH-YMR4247H.js → km-KH-3HTDL5HB.js} +14 -2
- package/dist/dev/locales/km-KH-3HTDL5HB.js.map +7 -0
- package/dist/dev/locales/{ko-KR-WGKQKR2R.js → ko-KR-O4L4O7L6.js} +14 -2
- package/dist/dev/locales/ko-KR-O4L4O7L6.js.map +7 -0
- package/dist/dev/locales/{ku-TR-ZSJN6TN6.js → ku-TR-AFJWDY67.js} +14 -2
- package/dist/dev/locales/ku-TR-AFJWDY67.js.map +7 -0
- package/dist/dev/locales/{lt-LT-FT6ZGIZP.js → lt-LT-7QOT2VDQ.js} +14 -2
- package/dist/dev/locales/lt-LT-7QOT2VDQ.js.map +7 -0
- package/dist/dev/locales/{lv-LV-U74YKDPR.js → lv-LV-WV6C4NYF.js} +14 -2
- package/dist/dev/locales/lv-LV-WV6C4NYF.js.map +7 -0
- package/dist/dev/locales/{mr-IN-KN72LOIA.js → mr-IN-3TLYWOEI.js} +14 -2
- package/dist/dev/locales/mr-IN-3TLYWOEI.js.map +7 -0
- package/dist/dev/locales/{my-MM-E57NLQ7W.js → my-MM-NNL2QJT3.js} +14 -2
- package/dist/dev/locales/my-MM-NNL2QJT3.js.map +7 -0
- package/dist/dev/locales/{nb-NO-FYQDWD7X.js → nb-NO-PG3XLMEV.js} +14 -2
- package/dist/dev/locales/nb-NO-PG3XLMEV.js.map +7 -0
- package/dist/dev/locales/{nl-NL-D5MZQRAC.js → nl-NL-MMOYEKKQ.js} +14 -2
- package/dist/dev/locales/nl-NL-MMOYEKKQ.js.map +7 -0
- package/dist/dev/locales/{nn-NO-5ZEUZJV4.js → nn-NO-AAC2I2YX.js} +14 -2
- package/dist/dev/locales/nn-NO-AAC2I2YX.js.map +7 -0
- package/dist/dev/locales/{oc-FR-MVW6LDAP.js → oc-FR-SR6MFB4N.js} +14 -2
- package/dist/dev/locales/oc-FR-SR6MFB4N.js.map +7 -0
- package/dist/dev/locales/{pa-IN-2NH3SVNI.js → pa-IN-ADGMQLQI.js} +14 -2
- package/dist/dev/locales/pa-IN-ADGMQLQI.js.map +7 -0
- package/dist/dev/locales/{percentages-QBBLQLIV.js → percentages-X2QIQ6XJ.js} +2 -2
- package/dist/dev/locales/{pl-PL-M6LYWLHY.js → pl-PL-FNIPTMVP.js} +14 -2
- package/dist/dev/locales/pl-PL-FNIPTMVP.js.map +7 -0
- package/dist/dev/locales/{pt-BR-27M3CCS7.js → pt-BR-67FMCDNE.js} +14 -2
- package/dist/dev/locales/pt-BR-67FMCDNE.js.map +7 -0
- package/dist/dev/locales/{pt-PT-V3C226NP.js → pt-PT-4G3GI4SF.js} +14 -2
- package/dist/dev/locales/pt-PT-4G3GI4SF.js.map +7 -0
- package/dist/dev/locales/{ro-RO-S4GNBAJI.js → ro-RO-CUZFN555.js} +25 -13
- package/dist/dev/locales/ro-RO-CUZFN555.js.map +7 -0
- package/dist/dev/locales/{ru-RU-CRRT5JUZ.js → ru-RU-4GHINTII.js} +14 -2
- package/dist/dev/locales/ru-RU-4GHINTII.js.map +7 -0
- package/dist/dev/locales/{si-LK-APMICZ7H.js → si-LK-SSNT7T4A.js} +14 -2
- package/dist/dev/locales/si-LK-SSNT7T4A.js.map +7 -0
- package/dist/dev/locales/{sk-SK-7ZFDZG6Y.js → sk-SK-J7TKZQEH.js} +14 -2
- package/dist/dev/locales/sk-SK-J7TKZQEH.js.map +7 -0
- package/dist/dev/locales/{sl-SI-BBENCX7D.js → sl-SI-SIBMLDYY.js} +130 -118
- package/dist/dev/locales/sl-SI-SIBMLDYY.js.map +7 -0
- package/dist/dev/locales/{sv-SE-35QJIOEW.js → sv-SE-6GYGFZNL.js} +25 -13
- package/dist/dev/locales/sv-SE-6GYGFZNL.js.map +7 -0
- package/dist/dev/locales/{ta-IN-4N5CFIWZ.js → ta-IN-7AW6CTGA.js} +14 -2
- package/dist/dev/locales/ta-IN-7AW6CTGA.js.map +7 -0
- package/dist/dev/locales/{th-TH-2F4V4IDB.js → th-TH-FP7ULYYM.js} +23 -11
- package/dist/dev/locales/th-TH-FP7ULYYM.js.map +7 -0
- package/dist/dev/locales/{tr-TR-NDFP3F7P.js → tr-TR-UDQGNXAG.js} +14 -2
- package/dist/dev/locales/tr-TR-UDQGNXAG.js.map +7 -0
- package/dist/dev/locales/{uk-UA-4I6VBQZ5.js → uk-UA-25HL2NCU.js} +51 -39
- package/dist/dev/locales/uk-UA-25HL2NCU.js.map +7 -0
- package/dist/dev/locales/{uz-UZ-UVKC7UNZ.js → uz-UZ-OPSBAY4H.js} +14 -2
- package/dist/dev/locales/uz-UZ-OPSBAY4H.js.map +7 -0
- package/dist/dev/locales/{vi-VN-UQCETDRL.js → vi-VN-DK367UGA.js} +14 -2
- package/dist/dev/locales/vi-VN-DK367UGA.js.map +7 -0
- package/dist/dev/locales/{zh-CN-RSRHKN75.js → zh-CN-QCVKNWUH.js} +14 -2
- package/dist/dev/locales/zh-CN-QCVKNWUH.js.map +7 -0
- package/dist/dev/locales/{zh-HK-XSFQ32U4.js → zh-HK-WFGYHWPG.js} +14 -2
- package/dist/dev/locales/zh-HK-WFGYHWPG.js.map +7 -0
- package/dist/dev/locales/{zh-TW-KFVYWRFJ.js → zh-TW-WHQS4ZSD.js} +33 -21
- package/dist/dev/locales/zh-TW-WHQS4ZSD.js.map +7 -0
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-25DVBZY5.js +34 -0
- package/dist/prod/chunk-52O7NOSZ.js +12 -0
- package/dist/prod/chunk-DYU5D34O.js +1 -0
- package/dist/prod/{chunk-KVZVLATH.js → chunk-RNVAYDMN.js} +1 -1
- package/dist/prod/components/TTDDialog/{CodeMirrorEditor-IYDFKSMV.js → CodeMirrorEditor-WLFHUPRX.js} +1 -1
- package/dist/prod/data/image-USJGQDOA.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +63 -94
- package/dist/prod/locales/{ar-SA-PQUY64WN.js → ar-SA-5WIASEJP.js} +5 -5
- package/dist/prod/locales/az-AZ-V5EUQD6C.js +1 -0
- package/dist/prod/locales/bg-BG-EXASCMTR.js +5 -0
- package/dist/prod/locales/bn-BD-U4SYNFCO.js +3 -0
- package/dist/prod/locales/bn-IN-HKDJIITE.js +3 -0
- package/dist/prod/locales/ca-ES-2KGUU5XB.js +8 -0
- package/dist/prod/locales/cs-CZ-VUCGPRML.js +7 -0
- package/dist/prod/locales/da-DK-NNDP2IVP.js +2 -0
- package/dist/prod/locales/de-CH-I7RAVIZN.js +11 -0
- package/dist/prod/locales/de-DE-WBQ3DQLR.js +11 -0
- package/dist/prod/locales/el-GR-TYQHVGXW.js +7 -0
- package/dist/prod/locales/{en-VMWWLRQY.js → en-MYE3M2F3.js} +1 -1
- package/dist/prod/locales/es-ES-JEUOREKJ.js +12 -0
- package/dist/prod/locales/eu-ES-SO5DEEAN.js +8 -0
- package/dist/prod/locales/fa-IR-I4JNTJHK.js +9 -0
- package/dist/prod/locales/fi-FI-REAEF6HQ.js +6 -0
- package/dist/prod/locales/fr-FR-SUCL7J6B.js +12 -0
- package/dist/prod/locales/gl-ES-KHCSOGVH.js +6 -0
- package/dist/prod/locales/he-IL-JYXVXV2Q.js +9 -0
- package/dist/prod/locales/hi-IN-BU52H3BO.js +3 -0
- package/dist/prod/locales/hu-HU-OWADXDQ3.js +3 -0
- package/dist/prod/locales/id-ID-2WY7E4VX.js +8 -0
- package/dist/prod/locales/it-IT-INVHSAJF.js +12 -0
- package/dist/prod/locales/ja-JP-JBNTKYP4.js +12 -0
- package/dist/prod/locales/kaa-TC3VIB7V.js +1 -0
- package/dist/prod/locales/kab-KAB-UOUDSQKM.js +4 -0
- package/dist/prod/locales/kk-KZ-P5H2X7YS.js +1 -0
- package/dist/prod/locales/{km-KH-PCWDKPHP.js → km-KH-IHMV2US7.js} +4 -4
- package/dist/prod/locales/ko-KR-ZTMANIDF.js +5 -0
- package/dist/prod/locales/ku-TR-GPJTRB5G.js +6 -0
- package/dist/prod/locales/lt-LT-V3XDOK3P.js +3 -0
- package/dist/prod/locales/lv-LV-DVQ3FADO.js +4 -0
- package/dist/prod/locales/mr-IN-VZ6HH5FE.js +9 -0
- package/dist/prod/locales/my-MM-XYKWHRK6.js +1 -0
- package/dist/prod/locales/nb-NO-UNO2GGZJ.js +8 -0
- package/dist/prod/locales/nl-NL-76EFHT4P.js +13 -0
- package/dist/prod/locales/nn-NO-CFKD7ABE.js +4 -0
- package/dist/prod/locales/oc-FR-YBJTCJ3J.js +4 -0
- package/dist/prod/locales/pa-IN-SNOXSMRV.js +4 -0
- package/dist/prod/locales/percentages-LWOC67ZH.js +1 -0
- package/dist/prod/locales/pl-PL-BSY6YFZ3.js +12 -0
- package/dist/prod/locales/pt-BR-CZDV62R3.js +10 -0
- package/dist/prod/locales/pt-PT-JO57XJJW.js +12 -0
- package/dist/prod/locales/ro-RO-UZ5ICYYN.js +12 -0
- package/dist/prod/locales/ru-RU-AN7JPREC.js +10 -0
- package/dist/prod/locales/si-LK-7CBLD6QQ.js +1 -0
- package/dist/prod/locales/sk-SK-SWR6DKBI.js +7 -0
- package/dist/prod/locales/sl-SI-QY5KCFGA.js +8 -0
- package/dist/prod/locales/sv-SE-O3OFCY3J.js +12 -0
- package/dist/prod/locales/ta-IN-V6NHHU6Z.js +6 -0
- package/dist/prod/locales/th-TH-WLSZUSBX.js +1 -0
- package/dist/prod/locales/tr-TR-GUFYG22B.js +4 -0
- package/dist/prod/locales/uk-UA-K6SV5NFQ.js +6 -0
- package/dist/prod/locales/uz-UZ-TVKTZO2G.js +1 -0
- package/dist/prod/locales/vi-VN-7FKFXJNO.js +7 -0
- package/dist/prod/locales/zh-CN-AOKVLNNK.js +11 -0
- package/dist/prod/locales/zh-HK-CDKPF5DC.js +1 -0
- package/dist/prod/locales/zh-TW-ZVGYESGW.js +13 -0
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/colors.d.ts +13 -7
- package/dist/types/common/src/constants.d.ts +44 -0
- package/dist/types/common/src/keys.d.ts +2 -0
- package/dist/types/common/src/random.d.ts +7 -0
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/comparisons.d.ts +5 -3
- package/dist/types/element/src/delta.d.ts +23 -1
- package/dist/types/element/src/flowchart.d.ts +5 -1
- package/dist/types/element/src/frame.d.ts +2 -2
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +10 -0
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +24 -2
- package/dist/types/element/src/sizeHelpers.d.ts +6 -0
- package/dist/types/element/src/sortElements.d.ts +10 -0
- package/dist/types/element/src/stickyNote.d.ts +183 -0
- package/dist/types/element/src/textElement.d.ts +2 -1
- package/dist/types/element/src/transform.d.ts +25 -6
- package/dist/types/element/src/typeChecks.d.ts +3 -2
- package/dist/types/element/src/types.d.ts +35 -6
- package/dist/types/element/src/utils.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -6
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +20 -4
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +70 -14
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +20 -4
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +31 -7
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +20 -4
- package/dist/types/excalidraw/actions/actionExport.d.ts +20 -4
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +81 -7
- package/dist/types/excalidraw/actions/actionGroup.d.ts +21 -5
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +61 -3
- package/dist/types/excalidraw/actions/actionLink.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +30 -10
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionStyles.d.ts +11 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -2
- package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
- package/dist/types/excalidraw/appState.d.ts +21 -1
- package/dist/types/excalidraw/components/App.arrowText.d.ts +40 -8
- package/dist/types/excalidraw/components/App.bucketFill.d.ts +14 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +10 -3
- package/dist/types/excalidraw/components/App.d.ts +111 -14
- package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
- package/dist/types/excalidraw/components/App.wheel.d.ts +33 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +6 -2
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
- package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
- package/dist/types/excalidraw/components/IconButton.d.ts +2 -0
- package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +1 -0
- package/dist/types/excalidraw/components/Tools.d.ts +7 -2
- package/dist/types/excalidraw/components/UserList.d.ts +3 -2
- package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
- package/dist/types/excalidraw/components/icons.d.ts +4 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +2 -2
- package/dist/types/excalidraw/data/blob.d.ts +20 -4
- package/dist/types/excalidraw/data/json.d.ts +10 -2
- package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
- package/dist/types/excalidraw/index.d.ts +3 -1
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +50 -1
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +88 -6
- package/dist/types/excalidraw/viewport.d.ts +10 -2
- package/dist/types/math/src/curve.d.ts +19 -12
- package/dist/types/math/src/segment.d.ts +6 -0
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +2 -2
- package/dist/dev/chunk-GK2P2Z4N.js.map +0 -7
- package/dist/dev/chunk-HY55C7T4.js +0 -69
- package/dist/dev/chunk-HY55C7T4.js.map +0 -7
- package/dist/dev/chunk-MUNVYEGW.js.map +0 -7
- package/dist/dev/locales/ar-SA-YEOLME2Y.js.map +0 -7
- package/dist/dev/locales/az-AZ-DQL36U4O.js.map +0 -7
- package/dist/dev/locales/bg-BG-LG6R5FEQ.js.map +0 -7
- package/dist/dev/locales/bn-BD-W63P7JT5.js.map +0 -7
- package/dist/dev/locales/bn-IN-SCHACAA6.js.map +0 -7
- package/dist/dev/locales/ca-ES-XP3CQTWV.js.map +0 -7
- package/dist/dev/locales/cs-CZ-EXLEOJMD.js.map +0 -7
- package/dist/dev/locales/da-DK-46ONLZRX.js.map +0 -7
- package/dist/dev/locales/de-CH-A5QH3YGW.js.map +0 -7
- package/dist/dev/locales/de-DE-FVCCKR5N.js.map +0 -7
- package/dist/dev/locales/el-GR-SB4MX5JS.js.map +0 -7
- package/dist/dev/locales/es-ES-VRTYQG6S.js.map +0 -7
- package/dist/dev/locales/eu-ES-3OHEU2YV.js.map +0 -7
- package/dist/dev/locales/fa-IR-74WR2KXF.js.map +0 -7
- package/dist/dev/locales/fi-FI-XZQC4II2.js.map +0 -7
- package/dist/dev/locales/fr-FR-RABBDBKM.js.map +0 -7
- package/dist/dev/locales/gl-ES-OU3Q6XUE.js.map +0 -7
- package/dist/dev/locales/he-IL-6NCD5D54.js.map +0 -7
- package/dist/dev/locales/hi-IN-M54WKOJI.js.map +0 -7
- package/dist/dev/locales/hu-HU-HAW63BCI.js.map +0 -7
- package/dist/dev/locales/id-ID-TFSPHGWX.js.map +0 -7
- package/dist/dev/locales/it-IT-MH3BAO5W.js.map +0 -7
- package/dist/dev/locales/ja-JP-UGJBHLX6.js.map +0 -7
- package/dist/dev/locales/kaa-5ZUEYWIM.js.map +0 -7
- package/dist/dev/locales/kab-KAB-RLAZQZSM.js.map +0 -7
- package/dist/dev/locales/kk-KZ-CIP7GOIF.js.map +0 -7
- package/dist/dev/locales/km-KH-YMR4247H.js.map +0 -7
- package/dist/dev/locales/ko-KR-WGKQKR2R.js.map +0 -7
- package/dist/dev/locales/ku-TR-ZSJN6TN6.js.map +0 -7
- package/dist/dev/locales/lt-LT-FT6ZGIZP.js.map +0 -7
- package/dist/dev/locales/lv-LV-U74YKDPR.js.map +0 -7
- package/dist/dev/locales/mr-IN-KN72LOIA.js.map +0 -7
- package/dist/dev/locales/my-MM-E57NLQ7W.js.map +0 -7
- package/dist/dev/locales/nb-NO-FYQDWD7X.js.map +0 -7
- package/dist/dev/locales/nl-NL-D5MZQRAC.js.map +0 -7
- package/dist/dev/locales/nn-NO-5ZEUZJV4.js.map +0 -7
- package/dist/dev/locales/oc-FR-MVW6LDAP.js.map +0 -7
- package/dist/dev/locales/pa-IN-2NH3SVNI.js.map +0 -7
- package/dist/dev/locales/pl-PL-M6LYWLHY.js.map +0 -7
- package/dist/dev/locales/pt-BR-27M3CCS7.js.map +0 -7
- package/dist/dev/locales/pt-PT-V3C226NP.js.map +0 -7
- package/dist/dev/locales/ro-RO-S4GNBAJI.js.map +0 -7
- package/dist/dev/locales/ru-RU-CRRT5JUZ.js.map +0 -7
- package/dist/dev/locales/si-LK-APMICZ7H.js.map +0 -7
- package/dist/dev/locales/sk-SK-7ZFDZG6Y.js.map +0 -7
- package/dist/dev/locales/sl-SI-BBENCX7D.js.map +0 -7
- package/dist/dev/locales/sv-SE-35QJIOEW.js.map +0 -7
- package/dist/dev/locales/ta-IN-4N5CFIWZ.js.map +0 -7
- package/dist/dev/locales/th-TH-2F4V4IDB.js.map +0 -7
- package/dist/dev/locales/tr-TR-NDFP3F7P.js.map +0 -7
- package/dist/dev/locales/uk-UA-4I6VBQZ5.js.map +0 -7
- package/dist/dev/locales/uz-UZ-UVKC7UNZ.js.map +0 -7
- package/dist/dev/locales/vi-VN-UQCETDRL.js.map +0 -7
- package/dist/dev/locales/zh-CN-RSRHKN75.js.map +0 -7
- package/dist/dev/locales/zh-HK-XSFQ32U4.js.map +0 -7
- package/dist/dev/locales/zh-TW-KFVYWRFJ.js.map +0 -7
- package/dist/prod/chunk-7XWMRXBY.js +0 -1
- package/dist/prod/chunk-JTZGFME4.js +0 -34
- package/dist/prod/chunk-ZKUAT4MX.js +0 -12
- package/dist/prod/data/image-GN2OCBLE.js +0 -1
- package/dist/prod/locales/az-AZ-OXJXL76K.js +0 -1
- package/dist/prod/locales/bg-BG-W2GKIJDF.js +0 -5
- package/dist/prod/locales/bn-BD-TGL7M4PJ.js +0 -3
- package/dist/prod/locales/bn-IN-BKETKYEH.js +0 -3
- package/dist/prod/locales/ca-ES-LD5SCRVV.js +0 -8
- package/dist/prod/locales/cs-CZ-OFPU5DBV.js +0 -7
- package/dist/prod/locales/da-DK-FRDJFYWF.js +0 -2
- package/dist/prod/locales/de-CH-ZG7H3QK3.js +0 -11
- package/dist/prod/locales/de-DE-SIJYH4IH.js +0 -11
- package/dist/prod/locales/el-GR-IEE2CGI2.js +0 -7
- package/dist/prod/locales/es-ES-TVVPWKV5.js +0 -12
- package/dist/prod/locales/eu-ES-CGBMFQDT.js +0 -8
- package/dist/prod/locales/fa-IR-IE6XAPR4.js +0 -9
- package/dist/prod/locales/fi-FI-P7TKNHRM.js +0 -6
- package/dist/prod/locales/fr-FR-QI2XZNT7.js +0 -12
- package/dist/prod/locales/gl-ES-TLYCNOZZ.js +0 -6
- package/dist/prod/locales/he-IL-ZX43XLGP.js +0 -9
- package/dist/prod/locales/hi-IN-UTYRMTUF.js +0 -3
- package/dist/prod/locales/hu-HU-AJOSEBW6.js +0 -3
- package/dist/prod/locales/id-ID-ETLTVG6C.js +0 -8
- package/dist/prod/locales/it-IT-B4B6TP6L.js +0 -12
- package/dist/prod/locales/ja-JP-IYKVURR5.js +0 -12
- package/dist/prod/locales/kaa-SE2BUIKX.js +0 -1
- package/dist/prod/locales/kab-KAB-Y3GLKXLR.js +0 -4
- package/dist/prod/locales/kk-KZ-ABWUFVOH.js +0 -1
- package/dist/prod/locales/ko-KR-7JQDXKGM.js +0 -5
- package/dist/prod/locales/ku-TR-NAH2Q5B7.js +0 -6
- package/dist/prod/locales/lt-LT-VQFYRSNQ.js +0 -3
- package/dist/prod/locales/lv-LV-T62VSYUM.js +0 -4
- package/dist/prod/locales/mr-IN-V4FHLCJE.js +0 -9
- package/dist/prod/locales/my-MM-E3SQ6E54.js +0 -1
- package/dist/prod/locales/nb-NO-MLNOFN5H.js +0 -8
- package/dist/prod/locales/nl-NL-D5L3ZV4M.js +0 -13
- package/dist/prod/locales/nn-NO-NNHDGPKB.js +0 -4
- package/dist/prod/locales/oc-FR-DWCRF55G.js +0 -4
- package/dist/prod/locales/pa-IN-3JSAY44M.js +0 -4
- package/dist/prod/locales/percentages-ETZPVQEE.js +0 -1
- package/dist/prod/locales/pl-PL-ACURYKP3.js +0 -12
- package/dist/prod/locales/pt-BR-LOX7MLGD.js +0 -10
- package/dist/prod/locales/pt-PT-CZ2U2RFQ.js +0 -12
- package/dist/prod/locales/ro-RO-2HECL2X6.js +0 -12
- package/dist/prod/locales/ru-RU-HAYNXO46.js +0 -10
- package/dist/prod/locales/si-LK-W5KNS4H6.js +0 -1
- package/dist/prod/locales/sk-SK-7K2CFGDV.js +0 -7
- package/dist/prod/locales/sl-SI-OXV2QZWW.js +0 -6
- package/dist/prod/locales/sv-SE-JTOBZRGL.js +0 -12
- package/dist/prod/locales/ta-IN-KFAVKXGT.js +0 -6
- package/dist/prod/locales/th-TH-VDMSCPDL.js +0 -1
- package/dist/prod/locales/tr-TR-CEZ6GX45.js +0 -4
- package/dist/prod/locales/uk-UA-Q3H3OXQC.js +0 -6
- package/dist/prod/locales/uz-UZ-NGCSWWPX.js +0 -1
- package/dist/prod/locales/vi-VN-P3NDEVPS.js +0 -7
- package/dist/prod/locales/zh-CN-SS3O57GA.js +0 -11
- package/dist/prod/locales/zh-HK-LWJT3VCF.js +0 -1
- package/dist/prod/locales/zh-TW-VJXC72RT.js +0 -13
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
- /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-FCA7YAIL.js.map → CodeMirrorEditor-XFPXQDTD.js.map} +0 -0
- /package/dist/dev/data/{image-5N65CA7G.js.map → image-DBJ5VI3T.js.map} +0 -0
- /package/dist/dev/locales/{en-AZHTDC2Z.js.map → en-INQU5YPU.js.map} +0 -0
- /package/dist/dev/locales/{percentages-QBBLQLIV.js.map → percentages-X2QIQ6XJ.js.map} +0 -0
|
@@ -36,6 +36,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
36
36
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
37
37
|
bindingPreference: "enabled" | "disabled";
|
|
38
38
|
isMidpointSnappingEnabled: boolean;
|
|
39
|
+
inputDevice: import("../types").InputDevice;
|
|
39
40
|
suggestedBinding: {
|
|
40
41
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
41
42
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -70,6 +71,8 @@ export declare const actionToggleSearchMenu: {
|
|
|
70
71
|
exportWithDarkMode: boolean;
|
|
71
72
|
exportScale: number;
|
|
72
73
|
currentItemStrokeColor: string;
|
|
74
|
+
currentItemStickynoteStrokeColor: string;
|
|
75
|
+
currentItemStickynoteBackgroundColor: string;
|
|
73
76
|
currentItemBackgroundColor: string;
|
|
74
77
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
75
78
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -143,8 +146,6 @@ export declare const actionToggleSearchMenu: {
|
|
|
143
146
|
y: number;
|
|
144
147
|
} | null;
|
|
145
148
|
objectsSnapModeEnabled: boolean;
|
|
146
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
147
|
-
followedBy: Set<import("../types").SocketId>;
|
|
148
149
|
isCropping: boolean;
|
|
149
150
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
150
151
|
searchMatches: Readonly<{
|
|
@@ -156,6 +157,13 @@ export declare const actionToggleSearchMenu: {
|
|
|
156
157
|
[groupId: string]: true;
|
|
157
158
|
};
|
|
158
159
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
160
|
+
colorTopPicks: {
|
|
161
|
+
elementStroke: readonly string[] | null;
|
|
162
|
+
elementBackground: readonly string[] | null;
|
|
163
|
+
bucketFill: readonly string[] | null;
|
|
164
|
+
stickyNoteStroke: readonly string[] | null;
|
|
165
|
+
stickyNoteBackground: readonly string[] | null;
|
|
166
|
+
};
|
|
159
167
|
};
|
|
160
168
|
captureUpdate: "EVENTUALLY";
|
|
161
169
|
};
|
|
@@ -33,6 +33,7 @@ export declare const actionToggleStats: {
|
|
|
33
33
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
34
34
|
bindingPreference: "enabled" | "disabled";
|
|
35
35
|
isMidpointSnappingEnabled: boolean;
|
|
36
|
+
inputDevice: import("../types").InputDevice;
|
|
36
37
|
suggestedBinding: {
|
|
37
38
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
38
39
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -67,6 +68,8 @@ export declare const actionToggleStats: {
|
|
|
67
68
|
exportWithDarkMode: boolean;
|
|
68
69
|
exportScale: number;
|
|
69
70
|
currentItemStrokeColor: string;
|
|
71
|
+
currentItemStickynoteStrokeColor: string;
|
|
72
|
+
currentItemStickynoteBackgroundColor: string;
|
|
70
73
|
currentItemBackgroundColor: string;
|
|
71
74
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
72
75
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -157,8 +160,6 @@ export declare const actionToggleStats: {
|
|
|
157
160
|
y: number;
|
|
158
161
|
} | null;
|
|
159
162
|
objectsSnapModeEnabled: boolean;
|
|
160
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
161
|
-
followedBy: Set<import("../types").SocketId>;
|
|
162
163
|
isCropping: boolean;
|
|
163
164
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
164
165
|
searchMatches: Readonly<{
|
|
@@ -170,6 +171,13 @@ export declare const actionToggleStats: {
|
|
|
170
171
|
[groupId: string]: true;
|
|
171
172
|
};
|
|
172
173
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
174
|
+
colorTopPicks: {
|
|
175
|
+
elementStroke: readonly string[] | null;
|
|
176
|
+
elementBackground: readonly string[] | null;
|
|
177
|
+
bucketFill: readonly string[] | null;
|
|
178
|
+
stickyNoteStroke: readonly string[] | null;
|
|
179
|
+
stickyNoteBackground: readonly string[] | null;
|
|
180
|
+
};
|
|
173
181
|
};
|
|
174
182
|
captureUpdate: "EVENTUALLY";
|
|
175
183
|
};
|
|
@@ -30,6 +30,7 @@ export declare const actionToggleViewMode: {
|
|
|
30
30
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
31
|
bindingPreference: "enabled" | "disabled";
|
|
32
32
|
isMidpointSnappingEnabled: boolean;
|
|
33
|
+
inputDevice: import("../types").InputDevice;
|
|
33
34
|
suggestedBinding: {
|
|
34
35
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
35
36
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -64,6 +65,8 @@ export declare const actionToggleViewMode: {
|
|
|
64
65
|
exportWithDarkMode: boolean;
|
|
65
66
|
exportScale: number;
|
|
66
67
|
currentItemStrokeColor: string;
|
|
68
|
+
currentItemStickynoteStrokeColor: string;
|
|
69
|
+
currentItemStickynoteBackgroundColor: string;
|
|
67
70
|
currentItemBackgroundColor: string;
|
|
68
71
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
69
72
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -157,8 +160,6 @@ export declare const actionToggleViewMode: {
|
|
|
157
160
|
y: number;
|
|
158
161
|
} | null;
|
|
159
162
|
objectsSnapModeEnabled: boolean;
|
|
160
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
161
|
-
followedBy: Set<import("../types").SocketId>;
|
|
162
163
|
isCropping: boolean;
|
|
163
164
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
164
165
|
searchMatches: Readonly<{
|
|
@@ -170,6 +171,13 @@ export declare const actionToggleViewMode: {
|
|
|
170
171
|
[groupId: string]: true;
|
|
171
172
|
};
|
|
172
173
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
174
|
+
colorTopPicks: {
|
|
175
|
+
elementStroke: readonly string[] | null;
|
|
176
|
+
elementBackground: readonly string[] | null;
|
|
177
|
+
bucketFill: readonly string[] | null;
|
|
178
|
+
stickyNoteStroke: readonly string[] | null;
|
|
179
|
+
stickyNoteBackground: readonly string[] | null;
|
|
180
|
+
};
|
|
173
181
|
};
|
|
174
182
|
captureUpdate: "EVENTUALLY";
|
|
175
183
|
};
|
|
@@ -30,6 +30,7 @@ export declare const actionToggleZenMode: {
|
|
|
30
30
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
31
|
bindingPreference: "enabled" | "disabled";
|
|
32
32
|
isMidpointSnappingEnabled: boolean;
|
|
33
|
+
inputDevice: import("../types").InputDevice;
|
|
33
34
|
suggestedBinding: {
|
|
34
35
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
35
36
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -64,6 +65,8 @@ export declare const actionToggleZenMode: {
|
|
|
64
65
|
exportWithDarkMode: boolean;
|
|
65
66
|
exportScale: number;
|
|
66
67
|
currentItemStrokeColor: string;
|
|
68
|
+
currentItemStickynoteStrokeColor: string;
|
|
69
|
+
currentItemStickynoteBackgroundColor: string;
|
|
67
70
|
currentItemBackgroundColor: string;
|
|
68
71
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
69
72
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -157,8 +160,6 @@ export declare const actionToggleZenMode: {
|
|
|
157
160
|
y: number;
|
|
158
161
|
} | null;
|
|
159
162
|
objectsSnapModeEnabled: boolean;
|
|
160
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
161
|
-
followedBy: Set<import("../types").SocketId>;
|
|
162
163
|
isCropping: boolean;
|
|
163
164
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
164
165
|
searchMatches: Readonly<{
|
|
@@ -170,6 +171,13 @@ export declare const actionToggleZenMode: {
|
|
|
170
171
|
[groupId: string]: true;
|
|
171
172
|
};
|
|
172
173
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
174
|
+
colorTopPicks: {
|
|
175
|
+
elementStroke: readonly string[] | null;
|
|
176
|
+
elementBackground: readonly string[] | null;
|
|
177
|
+
bucketFill: readonly string[] | null;
|
|
178
|
+
stickyNoteStroke: readonly string[] | null;
|
|
179
|
+
stickyNoteBackground: readonly string[] | null;
|
|
180
|
+
};
|
|
173
181
|
};
|
|
174
182
|
captureUpdate: "EVENTUALLY";
|
|
175
183
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ColorPaletteCustom, ColorTuple } from "@excalidraw/common";
|
|
2
|
+
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { AppState } from "../types";
|
|
4
|
+
export type ColorProperty = "strokeColor" | "backgroundColor";
|
|
5
|
+
/**
|
|
6
|
+
* Sticky notes are their own color domain: own defaults, own top picks, no
|
|
7
|
+
* transparent. A pick targets the regular domain, the sticky domain, or both
|
|
8
|
+
* ("mixed" selections write both defaults and use the regular picker).
|
|
9
|
+
*/
|
|
10
|
+
export type ColorTargetKind = "regular" | "sticky" | "mixed";
|
|
11
|
+
export type ColorDefaultKey = "currentItemStrokeColor" | "currentItemBackgroundColor" | "currentItemStickynoteStrokeColor" | "currentItemStickynoteBackgroundColor";
|
|
12
|
+
export type ColorTargetAppState = Pick<AppState, "selectedElementIds" | "editingTextElement" | "activeTool" | ColorDefaultKey>;
|
|
13
|
+
export type ColorTarget = {
|
|
14
|
+
kind: ColorTargetKind;
|
|
15
|
+
property: ColorProperty;
|
|
16
|
+
/** the current-item defaults a pick is written to (normalized per domain) */
|
|
17
|
+
appStateKeys: readonly ColorDefaultKey[];
|
|
18
|
+
/** the default shown when no element is targeted */
|
|
19
|
+
currentValue: string;
|
|
20
|
+
palette: ColorPaletteCustom;
|
|
21
|
+
topPicks: ColorTuple;
|
|
22
|
+
customizableTopPicks: keyof AppState["colorTopPicks"];
|
|
23
|
+
excludedColors: readonly string[] | undefined;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Who a stroke/background pick targets. Resolve it from the state an action
|
|
27
|
+
* runs against, at execution time — never capture it in a render closure:
|
|
28
|
+
* the memoized picker keeps a stale `onChange`, and the always-visible top
|
|
29
|
+
* picks fire it without a re-render.
|
|
30
|
+
*
|
|
31
|
+
* Targets are the selected color-capable elements (for stroke incl. bound
|
|
32
|
+
* labels, since a note's visible text is its label) plus the text being
|
|
33
|
+
* edited (`handleTextWysiwyg` deselects while editing) — or, for a
|
|
34
|
+
* background pick on a note's label, the note (see `getColorTargetElement`).
|
|
35
|
+
* With no target, the active tool decides the domain.
|
|
36
|
+
*/
|
|
37
|
+
export declare const resolveColorTarget: (appState: ColorTargetAppState, elements: readonly ExcalidrawElement[], property: ColorProperty) => ColorTarget;
|
|
38
|
+
/** the current-item default updates for a picked color */
|
|
39
|
+
export declare const getColorTargetAppStateUpdates: (target: ColorTarget, color: string) => Partial<AppState>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppState } from "./types";
|
|
1
|
+
import type { AppState, InputDevice } from "./types";
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
4
|
theme?: import("@excalidraw/element/types").Theme | undefined;
|
|
@@ -34,6 +34,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
34
34
|
showWelcomeScreen?: boolean | undefined;
|
|
35
35
|
boxSelectionMode?: import("./types").BoxSelectionMode | undefined;
|
|
36
36
|
bindingPreference?: "enabled" | "disabled" | undefined;
|
|
37
|
+
inputDevice?: InputDevice | undefined;
|
|
37
38
|
preferredSelectionTool?: {
|
|
38
39
|
type: "selection" | "lasso";
|
|
39
40
|
initialized: boolean;
|
|
@@ -44,6 +45,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
44
45
|
exportEmbedScene?: boolean | undefined;
|
|
45
46
|
exportWithDarkMode?: boolean | undefined;
|
|
46
47
|
currentItemStrokeColor?: string | undefined;
|
|
48
|
+
currentItemStickynoteStrokeColor?: string | undefined;
|
|
49
|
+
currentItemStickynoteBackgroundColor?: string | undefined;
|
|
47
50
|
currentItemBackgroundColor?: string | undefined;
|
|
48
51
|
currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
|
|
49
52
|
currentItemStrokeWidthKey?: import("@excalidraw/common").StrokeWidthKey | undefined;
|
|
@@ -78,6 +81,13 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
78
81
|
lockedMultiSelections?: {
|
|
79
82
|
[groupId: string]: true;
|
|
80
83
|
} | undefined;
|
|
84
|
+
colorTopPicks?: {
|
|
85
|
+
elementStroke: readonly string[] | null;
|
|
86
|
+
elementBackground: readonly string[] | null;
|
|
87
|
+
bucketFill: readonly string[] | null;
|
|
88
|
+
stickyNoteStroke: readonly string[] | null;
|
|
89
|
+
stickyNoteBackground: readonly string[] | null;
|
|
90
|
+
} | undefined;
|
|
81
91
|
};
|
|
82
92
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
83
93
|
viewBackgroundColor?: string | undefined;
|
|
@@ -103,3 +113,13 @@ export declare const isEraserActive: ({ activeTool, }: {
|
|
|
103
113
|
export declare const isHandToolActive: ({ activeTool, }: {
|
|
104
114
|
activeTool: AppState["activeTool"];
|
|
105
115
|
}) => boolean;
|
|
116
|
+
/**
|
|
117
|
+
* The device the wheel mappings follow for the given preference.
|
|
118
|
+
*
|
|
119
|
+
* `auto` is meant to detect the device from the wheel events themselves
|
|
120
|
+
* (line vs. pixel delta modes, whole vs. fractional deltas, one vs. two axes
|
|
121
|
+
* moving, event cadence and momentum tails). That is not implemented yet, so
|
|
122
|
+
* it resolves to `trackpad` — the mapping the editor has always had, and the
|
|
123
|
+
* default to keep until detection exists.
|
|
124
|
+
*/
|
|
125
|
+
export declare const resolveInputDevice: (inputDevice: InputDevice) => Exclude<InputDevice, "auto">;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
+
import { LinearElementEditor } from "@excalidraw/element";
|
|
1
2
|
import type { ArrowEndpoint } from "@excalidraw/element";
|
|
2
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, FixedPoint, NonDeleted } from "@excalidraw/element/types";
|
|
3
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, FixedPoint, NonDeleted, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
3
4
|
import type App from "./App";
|
|
4
|
-
import type { AppState } from "../types";
|
|
5
|
+
import type { AppState, PointerDownState } from "../types";
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
* a click would attach text to an arrow — a free endpoint (binds the arrow to
|
|
8
|
-
* a new text element positioned against that endpoint) or the arrow's midpoint
|
|
9
|
-
* (adds a label bound to the arrow) — and the endpoint-bound flavor of
|
|
10
|
-
* drag-sizing a new text.
|
|
7
|
+
* Text ↔ arrow interactions.
|
|
11
8
|
*
|
|
12
|
-
*
|
|
9
|
+
* With the text tool: the hover affordance showing where a click would attach
|
|
10
|
+
* text to an arrow — a free endpoint (binds the arrow to a new text element
|
|
11
|
+
* positioned against that endpoint) or the arrow's midpoint (adds a label
|
|
12
|
+
* bound to the arrow) — and the endpoint-bound flavor of drag-sizing a new
|
|
13
|
+
* text.
|
|
14
|
+
*
|
|
15
|
+
* With the selection tool: dragging an arrow's existing label along the arrow
|
|
16
|
+
* — the grab affordance, the drag itself, and where a double-click starts
|
|
17
|
+
* editing a label the drag has moved.
|
|
18
|
+
*
|
|
19
|
+
* The scene-level logic lives in `@excalidraw/element`'s
|
|
20
|
+
* `arrowEndpointText.ts` and `linearElementEditor.ts`.
|
|
13
21
|
*/
|
|
14
22
|
export declare class AppArrowText {
|
|
15
23
|
private app;
|
|
@@ -69,4 +77,28 @@ export declare class AppArrowText {
|
|
|
69
77
|
x: number;
|
|
70
78
|
y: number;
|
|
71
79
|
}): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Whether the arrow's label is what a grab at this position would pick up:
|
|
82
|
+
* the pointer is over the label, and no element stacked above the arrow
|
|
83
|
+
* owns the hit instead.
|
|
84
|
+
*/
|
|
85
|
+
isBoundTextGrabbable(element: NonDeletedExcalidrawElement, x: number, y: number): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The pointer-move half of dragging a label along its arrow. Owns the move
|
|
88
|
+
* whenever the gesture started on the label (`pointerDownState.hit.arrowLabel`),
|
|
89
|
+
* dragging only once past the threshold. Returns whether it owned it.
|
|
90
|
+
*/
|
|
91
|
+
maybeDragLabel(linearElementEditor: LinearElementEditor, pointerDownState: PointerDownState, pointerCoords: {
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
}): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Where a double-click on a labeled arrow should start text editing: the
|
|
97
|
+
* center of the label itself, which a label drag may have moved away from
|
|
98
|
+
* the arrow's midpoint. Null when the element is not a labeled arrow.
|
|
99
|
+
*/
|
|
100
|
+
getLabelCenter(element: ExcalidrawElement): {
|
|
101
|
+
x: number;
|
|
102
|
+
y: number;
|
|
103
|
+
} | null;
|
|
72
104
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Theme } from "@excalidraw/element/types";
|
|
1
2
|
import type App from "./App";
|
|
2
3
|
type ScenePoint = {
|
|
3
4
|
x: number;
|
|
@@ -7,6 +8,7 @@ type ScenePoint = {
|
|
|
7
8
|
export declare class AppBucketFill {
|
|
8
9
|
private app;
|
|
9
10
|
constructor(app: App);
|
|
11
|
+
private temporaryEyeDropper;
|
|
10
12
|
/**
|
|
11
13
|
* The click armed on pointer down, committed on pointer up. Deferring the
|
|
12
14
|
* scene mutation to pointer up is what lets a pinch/pan second finger, a
|
|
@@ -24,11 +26,23 @@ export declare class AppBucketFill {
|
|
|
24
26
|
handlePointerUp: () => void;
|
|
25
27
|
/** Abort the armed fill (second finger, context menu, pointercancel). */
|
|
26
28
|
cancel: () => void;
|
|
29
|
+
cycleBackgroundColor: () => void;
|
|
30
|
+
openTemporaryEyeDropper: () => void;
|
|
31
|
+
closeTemporaryEyeDropper: () => void;
|
|
27
32
|
/**
|
|
28
33
|
* Apply the current bucket fill settings to an existing fill-compatible
|
|
29
34
|
* element (no-op when nothing would change). One undoable step.
|
|
30
35
|
*/
|
|
31
36
|
private restyle;
|
|
32
37
|
private fill;
|
|
38
|
+
/**
|
|
39
|
+
* The color the bucket fill tool actually fills with: the shared
|
|
40
|
+
* `currentItemBackgroundColor`, falling back to green when that is
|
|
41
|
+
* transparent (the tool's picker doesn't offer transparent, but the shared
|
|
42
|
+
* state can hold it from the generic shape picker).
|
|
43
|
+
*/
|
|
44
|
+
getBucketFillBackgroundColor: (backgroundColor: string,
|
|
45
|
+
/** supply only for display purposes such as when applying to the cursor */
|
|
46
|
+
theme?: Theme) => string;
|
|
33
47
|
}
|
|
34
48
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type App from "./App";
|
|
2
1
|
import type { AppState } from "../types";
|
|
2
|
+
import type App from "./App";
|
|
3
3
|
/**
|
|
4
4
|
* Captures all cursor management for the interactive canvas.
|
|
5
5
|
*
|
|
@@ -10,10 +10,9 @@ import type { AppState } from "../types";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class AppCursor {
|
|
12
12
|
private app;
|
|
13
|
+
private toolCursorMemo;
|
|
13
14
|
private eraserCanvasCache;
|
|
14
15
|
private eraserPreviewDataURL;
|
|
15
|
-
private drawShapeCanvasCache;
|
|
16
|
-
private drawShapePreviewDataURL;
|
|
17
16
|
constructor(app: App);
|
|
18
17
|
private get canvas();
|
|
19
18
|
set: (cursor: string) => void;
|
|
@@ -25,6 +24,14 @@ export declare class AppCursor {
|
|
|
25
24
|
reset: () => void;
|
|
26
25
|
/** applies the given tool's cursor (defaults to the active tool) */
|
|
27
26
|
applyForTool: (activeTool?: AppState["activeTool"]) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Re-runs the hover cursor logic at the last known pointer position by
|
|
29
|
+
* re-dispatching a synthetic pointermove — for state changes that alter
|
|
30
|
+
* what hovering means without the pointer moving (e.g. the tool reverting
|
|
31
|
+
* to selection after an element is created). Mouse only: touch and pen
|
|
32
|
+
* have no resting hover to restore.
|
|
33
|
+
*/
|
|
34
|
+
refreshHover: () => void;
|
|
28
35
|
/** clears the inline cursor so the environment default (CSS) applies */
|
|
29
36
|
private clear;
|
|
30
37
|
private applyEraser;
|
|
@@ -4,6 +4,7 @@ import { LinearElementEditor } from "@excalidraw/element";
|
|
|
4
4
|
import { Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
|
|
5
5
|
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
6
6
|
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawTextContainer, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
7
|
+
import type { ArrowEndpoint, TransformHandleDirection } from "@excalidraw/element";
|
|
7
8
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
8
9
|
import { ActionManager } from "../actions/manager";
|
|
9
10
|
import { History } from "../history";
|
|
@@ -17,10 +18,12 @@ import { LassoTrail } from "../lasso";
|
|
|
17
18
|
import { EraserTrail } from "../eraser";
|
|
18
19
|
import { AppArrowText } from "./App.arrowText";
|
|
19
20
|
import { AppBucketFill } from "./App.bucketFill";
|
|
21
|
+
import { AppToolDrag } from "./App.toolDrag";
|
|
20
22
|
import { AppCursor } from "./App.cursor";
|
|
21
23
|
import { AppDrawShape } from "./App.drawshape";
|
|
22
24
|
import { AppFlowchart } from "./App.flowchart";
|
|
23
25
|
import { AppViewport } from "./App.viewport";
|
|
26
|
+
import { AppWheel } from "./App.wheel";
|
|
24
27
|
import { CursorHints } from "./CursorHint";
|
|
25
28
|
import { type OnStateChange } from "./AppStateObserver";
|
|
26
29
|
import type { ExportedElements } from "../data";
|
|
@@ -82,6 +85,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
82
85
|
editorInterface: EditorInterface;
|
|
83
86
|
private stylesPanelMode;
|
|
84
87
|
private excalidrawContainerRef;
|
|
88
|
+
get ownerDocument(): Document;
|
|
89
|
+
get ownerWindow(): Window & typeof globalThis;
|
|
85
90
|
scene: Scene;
|
|
86
91
|
fonts: Fonts;
|
|
87
92
|
renderer: Renderer;
|
|
@@ -93,7 +98,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
93
98
|
library: AppClassProperties["library"];
|
|
94
99
|
libraryItemsFromStorage: LibraryItems | undefined;
|
|
95
100
|
id: string;
|
|
96
|
-
|
|
101
|
+
store: Store;
|
|
97
102
|
private history;
|
|
98
103
|
excalidrawContainerValue: {
|
|
99
104
|
container: HTMLDivElement | null;
|
|
@@ -119,14 +124,23 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
119
124
|
private appStateObserver;
|
|
120
125
|
onStateChange: OnStateChange;
|
|
121
126
|
bucketFill: AppBucketFill;
|
|
127
|
+
toolDrag: AppToolDrag;
|
|
122
128
|
flowchart: AppFlowchart;
|
|
123
129
|
cursor: AppCursor;
|
|
124
130
|
arrowText: AppArrowText;
|
|
125
131
|
viewport: AppViewport;
|
|
132
|
+
wheel: AppWheel;
|
|
126
133
|
bindModeHandler: ReturnType<typeof setTimeout> | null;
|
|
127
134
|
private textWysiwygSubmitHandler;
|
|
128
135
|
hitLinkElement?: NonDeletedExcalidrawElement;
|
|
129
136
|
lastPointerDownEvent: React.PointerEvent<HTMLElement> | null;
|
|
137
|
+
/**
|
|
138
|
+
* the handle of the resize in progress while `state.isResizing` — for UI
|
|
139
|
+
* that words itself by handle (a sticky note's corners resize
|
|
140
|
+
* proportionally, its edges freely); not app state, so it costs no
|
|
141
|
+
* re-render of its own
|
|
142
|
+
*/
|
|
143
|
+
activeResizeHandle: TransformHandleDirection | null;
|
|
130
144
|
lastPointerUpEvent: React.PointerEvent<HTMLElement> | PointerEvent | null;
|
|
131
145
|
lastPointerUpIsDoubleClick: boolean;
|
|
132
146
|
lastPointerMoveEvent: PointerEvent | null;
|
|
@@ -185,6 +199,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
185
199
|
wasAddedToSelection: boolean;
|
|
186
200
|
hasBeenDuplicated: boolean;
|
|
187
201
|
hasHitCommonBoundingBoxOfSelectedElements: boolean;
|
|
202
|
+
arrowLabel: boolean;
|
|
188
203
|
};
|
|
189
204
|
withCmdOrCtrl: boolean;
|
|
190
205
|
drag: {
|
|
@@ -247,6 +262,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
247
262
|
wasAddedToSelection: boolean;
|
|
248
263
|
hasBeenDuplicated: boolean;
|
|
249
264
|
hasHitCommonBoundingBoxOfSelectedElements: boolean;
|
|
265
|
+
arrowLabel: boolean;
|
|
250
266
|
};
|
|
251
267
|
withCmdOrCtrl: boolean;
|
|
252
268
|
drag: {
|
|
@@ -338,10 +354,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
338
354
|
isToolLocked(): boolean;
|
|
339
355
|
/**
|
|
340
356
|
* Whether the active tool captures the primary pointer instead of the
|
|
341
|
-
* view-mode drag-to-pan — the laser
|
|
342
|
-
* any tool allowed via
|
|
343
|
-
*
|
|
344
|
-
* active; this predicate only
|
|
357
|
+
* view-mode drag-to-pan — the laser and host-implemented custom tools do;
|
|
358
|
+
* while non-interactive, any tool allowed via
|
|
359
|
+
* `interaction.enabled.tools` does. (Editing tools capture the pointer
|
|
360
|
+
* trivially since view mode implies they're not active; this predicate only
|
|
361
|
+
* matters where view-mode gates apply.)
|
|
345
362
|
*/
|
|
346
363
|
isActiveToolPointerCapturing(): boolean;
|
|
347
364
|
/** Whether Excalidraw's full default UI is rendered. */
|
|
@@ -363,6 +380,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
363
380
|
getEffectiveGridSize: () => NullableGridSize;
|
|
364
381
|
private getTextCreationGridPoint;
|
|
365
382
|
private getHTMLIFrameElement;
|
|
383
|
+
/**
|
|
384
|
+
* AI-generated iframe elements aren't interactive while their generation
|
|
385
|
+
* is still in progress (the partial content is render-only).
|
|
386
|
+
*/
|
|
387
|
+
private isIframeLikeInteractive;
|
|
366
388
|
private handleIframeLikeElementHover;
|
|
367
389
|
/** @returns true if iframe-like element click handled */
|
|
368
390
|
private handleIframeLikeCenterClick;
|
|
@@ -403,7 +425,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
403
425
|
private onBlur;
|
|
404
426
|
private onUnload;
|
|
405
427
|
private disableEvent;
|
|
406
|
-
private preventBrowserZoomWheel;
|
|
407
428
|
private handleNavigationModeKeyDown;
|
|
408
429
|
/**
|
|
409
430
|
* PageUp/PageDown scroll the canvas by a page — vertically, or
|
|
@@ -477,7 +498,13 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
477
498
|
updateFrameRendering: (opts: Partial<AppState["frameRendering"]> | ((prevState: AppState["frameRendering"]) => Partial<AppState["frameRendering"]>)) => void;
|
|
478
499
|
togglePenMode: (force: boolean | null) => void;
|
|
479
500
|
revealIfHidden: (elements: NonDeletedExcalidrawElement[]) => void;
|
|
480
|
-
|
|
501
|
+
/** emits a follow/unfollow intent to the host (which owns the
|
|
502
|
+
* `userToFollow` state) via both the `onUserFollow` prop and the
|
|
503
|
+
* imperative API emitter */
|
|
504
|
+
emitUserFollowIntent: (payload: OnUserFollowedPayload) => void;
|
|
505
|
+
/** emits an UNFOLLOW intent if currently following someone — use on
|
|
506
|
+
* user-initiated viewport changes which should break follow mode */
|
|
507
|
+
requestUnfollow: () => void;
|
|
481
508
|
setToast: (toast: AppState["toast"]) => void;
|
|
482
509
|
restoreFileFromShare: () => Promise<void>;
|
|
483
510
|
/**
|
|
@@ -565,9 +592,12 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
565
592
|
}) & {
|
|
566
593
|
preferSelected?: boolean;
|
|
567
594
|
}): NonDeleted<ExcalidrawElement> | null;
|
|
568
|
-
|
|
595
|
+
getElementsAtPosition(x: number, y: number, opts?: {
|
|
596
|
+
includeBoundTextElement?: boolean;
|
|
597
|
+
includeLockedElements?: boolean;
|
|
598
|
+
}): NonDeleted<ExcalidrawElement>[];
|
|
569
599
|
getElementHitThreshold(element: ExcalidrawElement): number;
|
|
570
|
-
|
|
600
|
+
hitElement(x: number, y: number, element: NonDeletedExcalidrawElement, considerBoundingBox?: boolean): boolean;
|
|
571
601
|
getTextBindableContainerAtPosition(x: number, y: number): (Readonly<{
|
|
572
602
|
id: string;
|
|
573
603
|
x: number;
|
|
@@ -595,6 +625,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
595
625
|
frameId: string | null;
|
|
596
626
|
boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
|
|
597
627
|
updated: number;
|
|
628
|
+
created: number | null;
|
|
598
629
|
link: string | null;
|
|
599
630
|
locked: boolean;
|
|
600
631
|
customData?: Record<string, any>;
|
|
@@ -629,6 +660,43 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
629
660
|
frameId: string | null;
|
|
630
661
|
boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
|
|
631
662
|
updated: number;
|
|
663
|
+
created: number | null;
|
|
664
|
+
link: string | null;
|
|
665
|
+
locked: boolean;
|
|
666
|
+
customData?: Record<string, any>;
|
|
667
|
+
}> & Readonly<{
|
|
668
|
+
type: "stickynote";
|
|
669
|
+
baseHeight: number;
|
|
670
|
+
}> & {
|
|
671
|
+
isDeleted: false;
|
|
672
|
+
}) | (Readonly<{
|
|
673
|
+
id: string;
|
|
674
|
+
x: number;
|
|
675
|
+
y: number;
|
|
676
|
+
strokeColor: string;
|
|
677
|
+
backgroundColor: string;
|
|
678
|
+
fillStyle: import("@excalidraw/element/types").FillStyle;
|
|
679
|
+
strokeWidth: number;
|
|
680
|
+
strokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
681
|
+
roundness: null | {
|
|
682
|
+
type: import("@excalidraw/element/types").RoundnessType;
|
|
683
|
+
value?: number;
|
|
684
|
+
};
|
|
685
|
+
roughness: number;
|
|
686
|
+
opacity: number;
|
|
687
|
+
width: number;
|
|
688
|
+
height: number;
|
|
689
|
+
angle: Radians;
|
|
690
|
+
seed: number;
|
|
691
|
+
version: number;
|
|
692
|
+
versionNonce: number;
|
|
693
|
+
index: import("@excalidraw/element/types").FractionalIndex | null;
|
|
694
|
+
isDeleted: boolean;
|
|
695
|
+
groupIds: readonly import("@excalidraw/element/types").GroupId[];
|
|
696
|
+
frameId: string | null;
|
|
697
|
+
boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
|
|
698
|
+
updated: number;
|
|
699
|
+
created: number | null;
|
|
632
700
|
link: string | null;
|
|
633
701
|
locked: boolean;
|
|
634
702
|
customData?: Record<string, any>;
|
|
@@ -663,6 +731,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
663
731
|
frameId: string | null;
|
|
664
732
|
boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
|
|
665
733
|
updated: number;
|
|
734
|
+
created: number | null;
|
|
666
735
|
link: string | null;
|
|
667
736
|
locked: boolean;
|
|
668
737
|
customData?: Record<string, any>;
|
|
@@ -697,6 +766,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
697
766
|
frameId: string | null;
|
|
698
767
|
boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
|
|
699
768
|
updated: number;
|
|
769
|
+
created: number | null;
|
|
700
770
|
link: string | null;
|
|
701
771
|
locked: boolean;
|
|
702
772
|
customData?: Record<string, any>;
|
|
@@ -725,7 +795,25 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
725
795
|
* so the whole create-and-type lands in a single entry.
|
|
726
796
|
*/
|
|
727
797
|
private isEditingTextContent;
|
|
728
|
-
|
|
798
|
+
startTextEditing: ({ sceneX, sceneY, insertAtParentCenter, container, autoEdit, initialCaretSceneCoords, arrowEndpoint, }: {
|
|
799
|
+
/** X position to insert text at */
|
|
800
|
+
sceneX: number;
|
|
801
|
+
/** Y position to insert text at */
|
|
802
|
+
sceneY: number;
|
|
803
|
+
/** whether to attempt to insert at element center if applicable */
|
|
804
|
+
insertAtParentCenter?: boolean;
|
|
805
|
+
container?: ExcalidrawTextContainer | null;
|
|
806
|
+
autoEdit?: boolean;
|
|
807
|
+
initialCaretSceneCoords?: {
|
|
808
|
+
x: number;
|
|
809
|
+
y: number;
|
|
810
|
+
};
|
|
811
|
+
/**
|
|
812
|
+
* creates the text as a label for this arrow endpoint: the binding then
|
|
813
|
+
* dictates the text's position and alignment, overriding (sceneX, sceneY)
|
|
814
|
+
*/
|
|
815
|
+
arrowEndpoint?: ArrowEndpoint | null;
|
|
816
|
+
}) => void;
|
|
729
817
|
private startImageCropping;
|
|
730
818
|
private finishImageCropping;
|
|
731
819
|
private shouldHandleBrowserCanvasDoubleClick;
|
|
@@ -778,6 +866,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
778
866
|
private handleCanvasPointerMove;
|
|
779
867
|
private handleEraser;
|
|
780
868
|
private handleTouchMove;
|
|
869
|
+
/**
|
|
870
|
+
* Applies the hover affordances of a selected linear element: the cursor,
|
|
871
|
+
* plus the hovered-handle state that renders them highlighted.
|
|
872
|
+
*/
|
|
781
873
|
handleHoverSelectedLinearElement(linearElementEditor: LinearElementEditor, scenePointerX: number, scenePointerY: number): void;
|
|
782
874
|
private handleCanvasPointerDown;
|
|
783
875
|
private handleCanvasPointerUp;
|
|
@@ -820,8 +912,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
820
912
|
}) => NonDeleted<ExcalidrawEmbeddableElement> | undefined;
|
|
821
913
|
private newImagePlaceholder;
|
|
822
914
|
private handleLinearElementOnPointerDown;
|
|
823
|
-
|
|
824
|
-
|
|
915
|
+
getCurrentItemRoundness(elementType: "selection" | "rectangle" | "stickynote" | "diamond" | "ellipse" | "iframe" | "embeddable"): {
|
|
916
|
+
type: 2 | 3;
|
|
917
|
+
} | null;
|
|
918
|
+
getCurrentItemStrokeWidth(elementType: ExcalidrawElement["type"]): number;
|
|
825
919
|
private createGenericElementOnPointerDown;
|
|
826
920
|
private createFrameElementOnPointerDown;
|
|
827
921
|
private maybeCacheReferenceSnapPoints;
|
|
@@ -860,7 +954,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
860
954
|
private maybeHandleCrop;
|
|
861
955
|
private maybeHandleResize;
|
|
862
956
|
private getContextMenuItems;
|
|
863
|
-
private handleWheel;
|
|
864
957
|
getTextWysiwygSnappedToCenterPosition(x: number, y: number, appState: AppState, container?: ExcalidrawTextContainer | null): {
|
|
865
958
|
viewportX: number;
|
|
866
959
|
viewportY: number;
|
|
@@ -868,7 +961,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
868
961
|
elementCenterY: number;
|
|
869
962
|
} | undefined;
|
|
870
963
|
private savePointer;
|
|
871
|
-
|
|
964
|
+
resetShouldCacheIgnoreZoomDebounced: {
|
|
965
|
+
(): void;
|
|
966
|
+
flush(): void;
|
|
967
|
+
cancel(): void;
|
|
968
|
+
};
|
|
872
969
|
private updateDOMRect;
|
|
873
970
|
refresh: () => void;
|
|
874
971
|
private getCanvasOffsets;
|