@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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ExcalidrawNonSelectionElement, NonDeleted } from "@excalidraw/element/types";
|
|
2
|
+
import type App from "./App";
|
|
3
|
+
import type { ToolType } from "../types";
|
|
4
|
+
type ScenePoint = {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
/** what a drag places: any element the new-element canvas can preview */
|
|
9
|
+
type DraggedElement = NonDeleted<ExcalidrawNonSelectionElement>;
|
|
10
|
+
/**
|
|
11
|
+
* A tool the user can drag out of the toolbar to drop a default-sized element
|
|
12
|
+
* where the pointer is released.
|
|
13
|
+
*/
|
|
14
|
+
type DraggableTool = {
|
|
15
|
+
/** the element the drop creates, centered on the pointer */
|
|
16
|
+
createElement: (app: App, center: ScenePoint) => DraggedElement;
|
|
17
|
+
/** what the tool does once its element is on the canvas (e.g. start editing) */
|
|
18
|
+
onDrop?: (app: App, element: DraggedElement) => void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The tools that can be dragged out of the toolbar. Add an entry to make a
|
|
22
|
+
* tool's button draggable — the gesture, preview and drop are shared.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DRAGGABLE_TOOLS: Partial<Record<ToolType, DraggableTool>>;
|
|
25
|
+
/** CSS opacity of the preview canvas while dragging */
|
|
26
|
+
export declare const TOOL_DRAG_PREVIEW_OPACITY = 0.5;
|
|
27
|
+
/**
|
|
28
|
+
* Dragging a tool out of the toolbar. The preview element exists only here
|
|
29
|
+
* until the drop — it is not in the scene, the store or the history, so
|
|
30
|
+
* collaborators never see it and an aborted drag leaves nothing behind. It
|
|
31
|
+
* is painted by the `NewElementCanvas`, drawn exactly as it will land, with
|
|
32
|
+
* the canvas itself made translucent.
|
|
33
|
+
*
|
|
34
|
+
* The button arms on pointerdown; the drag starts once the pointer has
|
|
35
|
+
* moved `DRAGGING_THRESHOLD`, so a plain click still selects the tool. The
|
|
36
|
+
* gesture lives on the owner window (the pointer leaves the button at once),
|
|
37
|
+
* like the other pointer gestures in `App`.
|
|
38
|
+
*/
|
|
39
|
+
export declare class AppToolDrag {
|
|
40
|
+
private app;
|
|
41
|
+
constructor(app: App);
|
|
42
|
+
/** the element under the pointer while dragging, `null` otherwise */
|
|
43
|
+
preview: DraggedElement | null;
|
|
44
|
+
private armed;
|
|
45
|
+
private tool;
|
|
46
|
+
private type;
|
|
47
|
+
static isDraggable: (type: ToolType) => boolean;
|
|
48
|
+
isDragging: () => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Arm a drag from a tool button's pointerdown. Returns whether the tool is
|
|
51
|
+
* draggable (the caller lets a non-draggable press fall through).
|
|
52
|
+
*/
|
|
53
|
+
handleButtonPointerDown: (type: ToolType, event: PointerEvent) => boolean;
|
|
54
|
+
private onPointerMove;
|
|
55
|
+
private onPointerUp;
|
|
56
|
+
private onKeyDown;
|
|
57
|
+
/** drop the gesture without a trace */
|
|
58
|
+
cancel: () => void;
|
|
59
|
+
private isOverCanvas;
|
|
60
|
+
private addListeners;
|
|
61
|
+
private removeListeners;
|
|
62
|
+
}
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type App from "./App";
|
|
2
|
+
/**
|
|
3
|
+
* Wheel input over the editor: pans the canvas, or zooms it around the
|
|
4
|
+
* pointer (`viewport.lastPosition`) — on ctrl/cmd+wheel (which is also how
|
|
5
|
+
* a trackpad pinch is delivered), while the wheel button itself is held
|
|
6
|
+
* down, or on a plain wheel when the input device is a mouse
|
|
7
|
+
* (`appState.inputDevice`; ctrl/cmd+wheel pans instead then).
|
|
8
|
+
*/
|
|
9
|
+
export declare class AppWheel {
|
|
10
|
+
private app;
|
|
11
|
+
private dependencies;
|
|
12
|
+
constructor(app: App, dependencies: {
|
|
13
|
+
/** whether a drag-pan (wheel button, space+drag, hand tool) is in
|
|
14
|
+
* progress — wheel input is ignored meanwhile */
|
|
15
|
+
isPanning: () => boolean;
|
|
16
|
+
/** applies the pointer movement the drag-pan is holding back for its
|
|
17
|
+
* next frame, if any */
|
|
18
|
+
flushPanMove: () => void;
|
|
19
|
+
});
|
|
20
|
+
/** the editor surfaces whose wheel input the editor consumes; everywhere
|
|
21
|
+
* else (menus, sidebars, …) the DOM keeps scrolling. The frame-name labels
|
|
22
|
+
* are DOM, but sit inside the container this listener is attached to */
|
|
23
|
+
private isOverEditorSurface;
|
|
24
|
+
handle: (event: WheelEvent) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Prevents the browser's own zoom over the non-interactive editor while
|
|
27
|
+
* letting regular scroll through (trackpad pinch is delivered as
|
|
28
|
+
* ctrl+wheel).
|
|
29
|
+
*/
|
|
30
|
+
preventBrowserZoom: (event: WheelEvent) => void;
|
|
31
|
+
/** zooms around the pointer by a wheel delta (positive = zoom out) */
|
|
32
|
+
private zoomBy;
|
|
33
|
+
}
|
|
@@ -2,7 +2,7 @@ import type { ColorTuple, ColorPaletteCustom } from "@excalidraw/common";
|
|
|
2
2
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
3
|
import "./ColorPicker.scss";
|
|
4
4
|
import type { ColorPickerType } from "./colorPickerUtils";
|
|
5
|
-
import type { UIAppState } from "../../types";
|
|
5
|
+
import type { AppState, UIAppState } from "../../types";
|
|
6
6
|
interface ColorPickerProps {
|
|
7
7
|
type: ColorPickerType;
|
|
8
8
|
/**
|
|
@@ -19,6 +19,10 @@ interface ColorPickerProps {
|
|
|
19
19
|
updateData: (formData?: any) => void;
|
|
20
20
|
/** palette colors to hide from the popup, keeping hotkey positions */
|
|
21
21
|
excludedColors?: readonly string[];
|
|
22
|
+
/** allow users to customize the top picks strip by drag & dropping colors
|
|
23
|
+
* from the picker popup onto it. The value names the
|
|
24
|
+
* `appState.colorTopPicks` slot the customization is stored in */
|
|
25
|
+
customizableTopPicks?: keyof AppState["colorTopPicks"];
|
|
22
26
|
}
|
|
23
|
-
export declare const ColorPicker: ({ type, color, onChange, label, elements, palette, topPicks, updateData, appState, excludedColors, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element
|
|
27
|
+
export declare const ColorPicker: import("react").MemoExoticComponent<({ type, color, onChange, label, elements, palette, topPicks, updateData, appState, excludedColors, customizableTopPicks, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
24
28
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { Theme } from "@excalidraw/element/types";
|
|
1
2
|
interface CustomColorListProps {
|
|
3
|
+
theme: Theme;
|
|
2
4
|
colors: string[];
|
|
3
5
|
color: string | null;
|
|
4
6
|
onChange: (color: string) => void;
|
|
5
7
|
label: string;
|
|
6
8
|
}
|
|
7
|
-
export declare const CustomColorList: ({ colors, color, onChange, label, }: CustomColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const CustomColorList: ({ theme, colors, color, onChange, label, }: CustomColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
+
import type { ExcalidrawElement, Theme } from "@excalidraw/element/types";
|
|
3
3
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
4
4
|
import type { ColorPickerType } from "./colorPickerUtils";
|
|
5
5
|
interface PickerProps {
|
|
6
|
+
theme: Theme;
|
|
6
7
|
color: string | null;
|
|
7
8
|
onChange: (color: string) => void;
|
|
8
9
|
type: ColorPickerType;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ColorPaletteCustom } from "@excalidraw/common";
|
|
2
|
+
import type { Theme } from "@excalidraw/element/types";
|
|
2
3
|
interface PickerColorListProps {
|
|
4
|
+
theme: Theme;
|
|
3
5
|
palette: ColorPaletteCustom;
|
|
4
6
|
color: string | null;
|
|
5
7
|
onChange: (color: string) => void;
|
|
@@ -11,5 +13,5 @@ interface PickerColorListProps {
|
|
|
11
13
|
*/
|
|
12
14
|
excludedColors?: readonly string[];
|
|
13
15
|
}
|
|
14
|
-
declare const PickerColorList: ({ palette, color, onChange, activeShade, showHotKey, excludedColors, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const PickerColorList: ({ theme, palette, color, onChange, activeShade, showHotKey, excludedColors, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export default PickerColorList;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ColorPaletteCustom } from "@excalidraw/common";
|
|
2
|
+
import type { Theme } from "@excalidraw/element/types";
|
|
2
3
|
interface ShadeListProps {
|
|
4
|
+
theme: Theme;
|
|
3
5
|
color: string | null;
|
|
4
6
|
onChange: (color: string) => void;
|
|
5
7
|
palette: ColorPaletteCustom;
|
|
6
8
|
showHotKey?: boolean;
|
|
7
9
|
}
|
|
8
|
-
export declare const ShadeList: ({ color, onChange, palette, showHotKey, }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const ShadeList: ({ theme, color, onChange, palette, showHotKey, }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import type { Theme } from "@excalidraw/element/types";
|
|
1
2
|
import type { ColorPickerType } from "./colorPickerUtils";
|
|
2
3
|
interface TopPicksProps {
|
|
4
|
+
theme: Theme;
|
|
3
5
|
onChange: (color: string) => void;
|
|
4
6
|
type: ColorPickerType;
|
|
5
7
|
activeColor: string | null;
|
|
6
8
|
topPicks?: readonly string[];
|
|
9
|
+
/** present when the strip is user-customizable — enables the right-click
|
|
10
|
+
* context menu resetting the strip to its default picks */
|
|
11
|
+
onReset?: () => void;
|
|
12
|
+
/** whether custom picks are currently applied (enables the reset item) */
|
|
13
|
+
isCustomized?: boolean;
|
|
7
14
|
}
|
|
8
|
-
export declare const TopPicks: ({ onChange, type, activeColor, topPicks, }: TopPicksProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export declare const TopPicks: ({ theme, onChange, type, activeColor, topPicks, onReset, isCustomized, }: TopPicksProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
16
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type DragOrigin = {
|
|
2
|
+
kind: "swatch";
|
|
3
|
+
} | {
|
|
4
|
+
kind: "pick";
|
|
5
|
+
index: number;
|
|
6
|
+
};
|
|
7
|
+
export type TopPicksDragState = {
|
|
8
|
+
color: string;
|
|
9
|
+
origin: DragOrigin;
|
|
10
|
+
/** hovered strip slot — the slot to replace (swatch drags) or the final
|
|
11
|
+
* position (pick reorders). null while the pointer is outside the strip */
|
|
12
|
+
overIndex: number | null;
|
|
13
|
+
/** index of an already-pinned identical color that blocks the drop */
|
|
14
|
+
duplicateIndex: number | null;
|
|
15
|
+
/** signed distance between strip slot centers (for reorder preview) */
|
|
16
|
+
slotSpan: number;
|
|
17
|
+
} | null;
|
|
18
|
+
export type ColorPickerDnD = {
|
|
19
|
+
dragState: TopPicksDragState;
|
|
20
|
+
startSwatchDrag: (event: React.PointerEvent, color: string | null) => void;
|
|
21
|
+
startPickDrag: (event: React.PointerEvent, index: number, color: string) => void;
|
|
22
|
+
setStripEl: (el: HTMLDivElement | null) => void;
|
|
23
|
+
};
|
|
24
|
+
export declare const ColorPickerDnDContext: import("react").Context<ColorPickerDnD | null>;
|
|
25
|
+
export declare const useColorPickerDnD: () => ColorPickerDnD | null;
|
|
26
|
+
export declare const useTopPicksDnD: ({ enabled, picks, onPicksChange, }: {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
picks: readonly string[];
|
|
29
|
+
onPicksChange: (picks: string[]) => void;
|
|
30
|
+
}) => ColorPickerDnD;
|
|
31
|
+
export {};
|
|
@@ -41,6 +41,8 @@ type IconButtonProps = (IconButtonBaseProps & {
|
|
|
41
41
|
onSelect?(data: {
|
|
42
42
|
pointerType: PointerType | null;
|
|
43
43
|
}): void;
|
|
44
|
+
/** the press that may become a click — e.g. to arm a drag out of the toolbar */
|
|
45
|
+
onPointerDown?(event: React.PointerEvent<HTMLButtonElement>): void;
|
|
44
46
|
});
|
|
45
47
|
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<unknown>>;
|
|
46
48
|
export {};
|
|
@@ -29,6 +29,7 @@ interface LayerUIProps {
|
|
|
29
29
|
scrollBackToContentUIEnabled: boolean;
|
|
30
30
|
isCollaborating: boolean;
|
|
31
31
|
generateLinkForSelection?: AppProps["generateLinkForSelection"];
|
|
32
|
+
currentUserControls?: ExcalidrawProps["currentUserControls"];
|
|
32
33
|
}
|
|
33
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onPenModeToggle, showExitZenModeBtn, renderTopLeftUI, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, defaultUIEnabled, zoomUIEnabled, scrollBackToContentUIEnabled, isCollaborating, generateLinkForSelection, }: LayerUIProps) => import("react/jsx-runtime").JSX.Element>;
|
|
34
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onPenModeToggle, showExitZenModeBtn, renderTopLeftUI, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, defaultUIEnabled, zoomUIEnabled, scrollBackToContentUIEnabled, isCollaborating, generateLinkForSelection, currentUserControls, }: LayerUIProps) => import("react/jsx-runtime").JSX.Element>;
|
|
34
35
|
export default _default;
|
|
@@ -20,5 +20,6 @@ export type StreamChunk = {
|
|
|
20
20
|
status?: number;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
+
export declare function parseSSEStream(reader: ReadableStreamDefaultReader<Uint8Array>): AsyncGenerator<string, void, unknown>;
|
|
23
24
|
export declare function TTDStreamFetch(options: StreamingOptions): Promise<TTTDDialog.OnTextSubmitRetValue>;
|
|
24
25
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AppClassProperties, AppState, ToolType, UIAppState } from "../types";
|
|
2
2
|
export type ToolConfig = {
|
|
3
3
|
icon: React.ReactNode;
|
|
4
|
-
/** letter shortcut(s) — the first one is shown in tooltips */
|
|
4
|
+
/** letter shortcut(s) — the first one is shown in tooltips and badges */
|
|
5
5
|
letterKey?: string | readonly string[];
|
|
6
6
|
/** whether `letterKey` requires Shift to be held (e.g. Shift+X) */
|
|
7
7
|
shiftKey?: boolean;
|
|
@@ -31,6 +31,7 @@ export declare const TOOLS: {
|
|
|
31
31
|
line: ToolConfig;
|
|
32
32
|
freedraw: ToolConfig;
|
|
33
33
|
text: ToolConfig;
|
|
34
|
+
stickynote: ToolConfig;
|
|
34
35
|
image: ToolConfig;
|
|
35
36
|
eraser: ToolConfig;
|
|
36
37
|
frame: ToolConfig;
|
|
@@ -49,7 +50,7 @@ export declare const TOGGLE_TOOLS: readonly (ToolType | "custom")[];
|
|
|
49
50
|
export declare const getToolLetter: (type: ToolbarToolType) => string | undefined;
|
|
50
51
|
/** human-readable shortcut hint, e.g. "R or 2", used in tooltips & aria */
|
|
51
52
|
export declare const getToolShortcut: (type: ToolbarToolType) => string;
|
|
52
|
-
export declare const findShapeByKey: (key: string, app: AppClassProperties, shiftKey?: boolean) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | "autoshape" | "bucketfill" | null;
|
|
53
|
+
export declare const findShapeByKey: (key: string, app: AppClassProperties, shiftKey?: boolean) => "line" | "arrow" | "text" | "selection" | "rectangle" | "stickynote" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | "autoshape" | "bucketfill" | null;
|
|
53
54
|
/**
|
|
54
55
|
* Whether a toolbar entry activating the given tool renders disabled — true
|
|
55
56
|
* when the active tool is host-controlled (`props.activeTool`) and the entry
|
|
@@ -99,6 +100,10 @@ export declare const TextToolButton: {
|
|
|
99
100
|
({ app, activeTool, hideKeyBinding, hideShortcut, }: ToolButtonComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
100
101
|
displayName: string;
|
|
101
102
|
};
|
|
103
|
+
export declare const StickyNoteToolButton: {
|
|
104
|
+
({ app, activeTool, hideKeyBinding, hideShortcut, }: ToolButtonComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
displayName: string;
|
|
106
|
+
};
|
|
102
107
|
export declare const ImageToolButton: {
|
|
103
108
|
({ app, activeTool, hideKeyBinding, hideShortcut, }: ToolButtonComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
104
109
|
displayName: string;
|
|
@@ -7,12 +7,13 @@ export type GoToCollaboratorComponentProps = {
|
|
|
7
7
|
withName: boolean;
|
|
8
8
|
isBeingFollowed: boolean;
|
|
9
9
|
};
|
|
10
|
-
type UserListUserObject = Pick<Collaborator, "avatarUrl" | "id" | "socketId" | "username" | "isInCall" | "isSpeaking" | "isMuted">;
|
|
10
|
+
type UserListUserObject = Pick<Collaborator, "avatarUrl" | "id" | "socketId" | "username" | "isInCall" | "isSpeaking" | "isMuted" | "isCurrentUser">;
|
|
11
11
|
type UserListProps = {
|
|
12
12
|
className?: string;
|
|
13
13
|
mobile?: boolean;
|
|
14
14
|
collaborators: Map<SocketId, UserListUserObject>;
|
|
15
15
|
userToFollow: SocketId | null;
|
|
16
|
+
currentUserControls?: React.ReactNode | ((isMobile: boolean) => React.ReactNode);
|
|
16
17
|
};
|
|
17
|
-
export declare const UserList: React.MemoExoticComponent<({ className, mobile, collaborators, userToFollow }: UserListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
+
export declare const UserList: React.MemoExoticComponent<({ className, mobile, collaborators, userToFollow, currentUserControls, }: UserListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
19
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./ViewportStatusFrame.scss";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
import type { ViewportStatusFrame as ViewportStatusFrameType } from "../../types";
|
|
4
|
+
export declare const ViewportStatusBorder: ({ border, style, }: {
|
|
5
|
+
border: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ViewportStatusBadge: ({ label, border, }: {
|
|
9
|
+
label: NonNullable<ViewportStatusFrameType["label"]>;
|
|
10
|
+
border?: ViewportStatusFrameType["border"];
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,8 @@ interface NewElementCanvasProps {
|
|
|
10
10
|
scale: number;
|
|
11
11
|
rc: RoughCanvas;
|
|
12
12
|
renderConfig: StaticCanvasRenderConfig;
|
|
13
|
+
/** CSS opacity of the whole canvas — a translucent preview of a finished element */
|
|
14
|
+
opacity?: number;
|
|
13
15
|
}
|
|
14
16
|
declare const NewElementCanvas: (props: NewElementCanvasProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export default NewElementCanvas;
|
|
@@ -57,6 +57,7 @@ export declare const saveAs: import("react/jsx-runtime").JSX.Element;
|
|
|
57
57
|
export declare const LoadIcon: import("react/jsx-runtime").JSX.Element;
|
|
58
58
|
export declare const clipboard: import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
export declare const palette: import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare const bucketFillIconSvgPaths: readonly ["M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z", "M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z", "M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"];
|
|
60
61
|
export declare const bucketFillIcon: import("react/jsx-runtime").JSX.Element;
|
|
61
62
|
export declare const slashIcon: import("react/jsx-runtime").JSX.Element;
|
|
62
63
|
export declare const ExportImageIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -196,8 +197,10 @@ export declare const playerPlayIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
196
197
|
export declare const playerStopFilledIcon: import("react/jsx-runtime").JSX.Element;
|
|
197
198
|
export declare const tablerCheckIcon: import("react/jsx-runtime").JSX.Element;
|
|
198
199
|
export declare const alertTriangleIcon: import("react/jsx-runtime").JSX.Element;
|
|
200
|
+
export declare const eyeDropperIconSvgPaths: readonly ["M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z", "M11 7l6 6"];
|
|
199
201
|
export declare const eyeDropperIcon: import("react/jsx-runtime").JSX.Element;
|
|
200
202
|
export declare const frameToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
203
|
+
export declare const stickyNoteToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
201
204
|
export declare const mermaidLogoIcon: import("react/jsx-runtime").JSX.Element;
|
|
202
205
|
export declare const RetryIcon: import("react/jsx-runtime").JSX.Element;
|
|
203
206
|
export declare const stackPushIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -250,6 +253,7 @@ export declare const sidebarRightIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
250
253
|
export declare const messageCircleIcon: import("react/jsx-runtime").JSX.Element;
|
|
251
254
|
export declare const presentationIcon: import("react/jsx-runtime").JSX.Element;
|
|
252
255
|
export declare const emptyIcon: import("react/jsx-runtime").JSX.Element;
|
|
256
|
+
export declare const chevronDownIcon: import("react/jsx-runtime").JSX.Element;
|
|
253
257
|
export declare const chevronRight: import("react/jsx-runtime").JSX.Element;
|
|
254
258
|
export declare const settingsIcon: import("react/jsx-runtime").JSX.Element;
|
|
255
259
|
export {};
|
|
@@ -74,6 +74,7 @@ export declare const Preferences: {
|
|
|
74
74
|
}): import("react/jsx-runtime").JSX.Element;
|
|
75
75
|
ToggleToolLock: () => import("react/jsx-runtime").JSX.Element;
|
|
76
76
|
BoxSelectionMode: () => import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
InputDevice: () => import("react/jsx-runtime").JSX.Element;
|
|
77
78
|
ToggleSnapMode: () => import("react/jsx-runtime").JSX.Element;
|
|
78
79
|
ToggleArrowBinding: () => import("react/jsx-runtime").JSX.Element;
|
|
79
80
|
ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
1
|
+
import type { ElementsMap, ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
2
2
|
import type { AppClassProperties, UIAppState } from "../types";
|
|
3
3
|
export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
4
|
-
export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
4
|
+
export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[], elementsMap: ElementsMap) => boolean;
|
|
5
5
|
/**
|
|
6
6
|
* Single source of truth for "which shape-action controls are relevant right
|
|
7
7
|
* now". Each flag answers whether a given control should be shown, given the
|
|
@@ -114,6 +114,7 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
114
114
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
115
115
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
116
116
|
bindingPreference: "enabled" | "disabled";
|
|
117
|
+
inputDevice: import("../types").InputDevice;
|
|
117
118
|
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
118
119
|
preferredSelectionTool: {
|
|
119
120
|
type: "selection" | "lasso";
|
|
@@ -125,6 +126,8 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
125
126
|
exportEmbedScene: boolean;
|
|
126
127
|
exportWithDarkMode: boolean;
|
|
127
128
|
currentItemStrokeColor: string;
|
|
129
|
+
currentItemStickynoteStrokeColor: string;
|
|
130
|
+
currentItemStickynoteBackgroundColor: string;
|
|
128
131
|
currentItemBackgroundColor: string;
|
|
129
132
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
130
133
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -172,11 +175,16 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
172
175
|
y: number;
|
|
173
176
|
} | null;
|
|
174
177
|
objectsSnapModeEnabled: boolean;
|
|
175
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
176
|
-
followedBy: Set<import("../types").SocketId>;
|
|
177
178
|
lockedMultiSelections: {
|
|
178
179
|
[groupId: string]: true;
|
|
179
180
|
};
|
|
181
|
+
colorTopPicks: {
|
|
182
|
+
elementStroke: readonly string[] | null;
|
|
183
|
+
elementBackground: readonly string[] | null;
|
|
184
|
+
bucketFill: readonly string[] | null;
|
|
185
|
+
stickyNoteStroke: readonly string[] | null;
|
|
186
|
+
stickyNoteBackground: readonly string[] | null;
|
|
187
|
+
};
|
|
180
188
|
};
|
|
181
189
|
files: import("../types").BinaryFiles;
|
|
182
190
|
};
|
|
@@ -285,6 +293,7 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
285
293
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
286
294
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
287
295
|
bindingPreference: "enabled" | "disabled";
|
|
296
|
+
inputDevice: import("../types").InputDevice;
|
|
288
297
|
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
289
298
|
preferredSelectionTool: {
|
|
290
299
|
type: "selection" | "lasso";
|
|
@@ -296,6 +305,8 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
296
305
|
exportEmbedScene: boolean;
|
|
297
306
|
exportWithDarkMode: boolean;
|
|
298
307
|
currentItemStrokeColor: string;
|
|
308
|
+
currentItemStickynoteStrokeColor: string;
|
|
309
|
+
currentItemStickynoteBackgroundColor: string;
|
|
299
310
|
currentItemBackgroundColor: string;
|
|
300
311
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
301
312
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -343,11 +354,16 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
343
354
|
y: number;
|
|
344
355
|
} | null;
|
|
345
356
|
objectsSnapModeEnabled: boolean;
|
|
346
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
347
|
-
followedBy: Set<import("../types").SocketId>;
|
|
348
357
|
lockedMultiSelections: {
|
|
349
358
|
[groupId: string]: true;
|
|
350
359
|
};
|
|
360
|
+
colorTopPicks: {
|
|
361
|
+
elementStroke: readonly string[] | null;
|
|
362
|
+
elementBackground: readonly string[] | null;
|
|
363
|
+
bucketFill: readonly string[] | null;
|
|
364
|
+
stickyNoteStroke: readonly string[] | null;
|
|
365
|
+
stickyNoteBackground: readonly string[] | null;
|
|
366
|
+
};
|
|
351
367
|
};
|
|
352
368
|
files: import("../types").BinaryFiles;
|
|
353
369
|
}>;
|
|
@@ -112,6 +112,7 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
112
112
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
113
113
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
114
114
|
bindingPreference: "enabled" | "disabled";
|
|
115
|
+
inputDevice: import("../types").InputDevice;
|
|
115
116
|
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
116
117
|
preferredSelectionTool: {
|
|
117
118
|
type: "selection" | "lasso";
|
|
@@ -123,6 +124,8 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
123
124
|
exportEmbedScene: boolean;
|
|
124
125
|
exportWithDarkMode: boolean;
|
|
125
126
|
currentItemStrokeColor: string;
|
|
127
|
+
currentItemStickynoteStrokeColor: string;
|
|
128
|
+
currentItemStickynoteBackgroundColor: string;
|
|
126
129
|
currentItemBackgroundColor: string;
|
|
127
130
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
128
131
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -170,11 +173,16 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
170
173
|
y: number;
|
|
171
174
|
} | null;
|
|
172
175
|
objectsSnapModeEnabled: boolean;
|
|
173
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
174
|
-
followedBy: Set<import("../types").SocketId>;
|
|
175
176
|
lockedMultiSelections: {
|
|
176
177
|
[groupId: string]: true;
|
|
177
178
|
};
|
|
179
|
+
colorTopPicks: {
|
|
180
|
+
elementStroke: readonly string[] | null;
|
|
181
|
+
elementBackground: readonly string[] | null;
|
|
182
|
+
bucketFill: readonly string[] | null;
|
|
183
|
+
stickyNoteStroke: readonly string[] | null;
|
|
184
|
+
stickyNoteBackground: readonly string[] | null;
|
|
185
|
+
};
|
|
178
186
|
};
|
|
179
187
|
files: BinaryFiles;
|
|
180
188
|
}>;
|
|
@@ -15,7 +15,8 @@ export declare class Fonts {
|
|
|
15
15
|
fontFaces: ExcalidrawFontFace[];
|
|
16
16
|
}>;
|
|
17
17
|
private readonly scene;
|
|
18
|
-
|
|
18
|
+
private readonly ownerDocument;
|
|
19
|
+
constructor(scene: Scene, ownerDocument?: Document);
|
|
19
20
|
/**
|
|
20
21
|
* Get all the font families for the given scene.
|
|
21
22
|
*/
|
|
@@ -36,7 +37,7 @@ export declare class Fonts {
|
|
|
36
37
|
/**
|
|
37
38
|
* Load font faces for passed elements - use when the scene is unavailable (i.e. export).
|
|
38
39
|
*/
|
|
39
|
-
static loadElementsFonts: (elements: readonly ExcalidrawElement[]) => Promise<FontFace[]>;
|
|
40
|
+
static loadElementsFonts: (elements: readonly ExcalidrawElement[], ownerDocument?: Document) => Promise<FontFace[]>;
|
|
40
41
|
/**
|
|
41
42
|
* Generate CSS @font-face declarations for the given elements.
|
|
42
43
|
*/
|
|
@@ -2,13 +2,13 @@ export type CaretPosition = {
|
|
|
2
2
|
start: number;
|
|
3
3
|
end: number;
|
|
4
4
|
};
|
|
5
|
-
export declare const saveCaretPosition: () => CaretPosition | null;
|
|
6
|
-
export declare const restoreCaretPosition: (position: CaretPosition | null) => void;
|
|
7
|
-
export declare const withCaretPositionPreservation: (callback: () => void, isCompactMode: boolean, isEditingText: boolean, onPreventClose?: () => void) => void;
|
|
8
|
-
export declare const useTextEditorFocus: () => {
|
|
5
|
+
export declare const saveCaretPosition: (ownerDocument?: Document) => CaretPosition | null;
|
|
6
|
+
export declare const restoreCaretPosition: (position: CaretPosition | null, ownerDocument?: Document) => void;
|
|
7
|
+
export declare const withCaretPositionPreservation: (callback: () => void, isCompactMode: boolean, isEditingText: boolean, onPreventClose?: () => void, ownerDocument?: Document) => void;
|
|
8
|
+
export declare const useTextEditorFocus: (ownerDocument?: Document) => {
|
|
9
9
|
saveCaretPosition: () => void;
|
|
10
10
|
restoreCaretPosition: () => void;
|
|
11
11
|
clearSavedPosition: () => void;
|
|
12
12
|
hasSavedPosition: boolean;
|
|
13
13
|
};
|
|
14
|
-
export declare const temporarilyDisableTextEditorBlur: (duration?: number) => void;
|
|
14
|
+
export declare const temporarilyDisableTextEditorBlur: (ownerDocument?: Document, duration?: number) => void;
|
|
@@ -46,8 +46,10 @@ export { exportToCanvas } from "./scene/export";
|
|
|
46
46
|
export { DefaultSidebar } from "./components/DefaultSidebar";
|
|
47
47
|
export { TTDDialog } from "./components/TTDDialog/TTDDialog";
|
|
48
48
|
export { TTDDialogTrigger } from "./components/TTDDialog/TTDDialogTrigger";
|
|
49
|
-
export { TTDStreamFetch } from "./components/TTDDialog/utils/TTDStreamFetch";
|
|
49
|
+
export { TTDStreamFetch, parseSSEStream, } from "./components/TTDDialog/utils/TTDStreamFetch";
|
|
50
|
+
export type { StreamChunk } from "./components/TTDDialog/utils/TTDStreamFetch";
|
|
50
51
|
export type { TTDPersistenceAdapter, SavedChat, SavedChats, } from "./components/TTDDialog/types";
|
|
52
|
+
export type { ViewportStatusFrame } from "./types";
|
|
51
53
|
export { zoomToFitBounds, DEFAULT_OVERSCROLL } from "./viewport";
|
|
52
54
|
export { getCommonBounds, getVisibleSceneBounds, convertToExcalidrawElements, } from "@excalidraw/element";
|
|
53
55
|
export { elementsOverlappingBBox } from "@excalidraw/element";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ElementsSegmentsMap, GlobalPoint } from "@excalidraw/math/types";
|
|
2
2
|
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { BoxSelectionMode } from "../types";
|
|
3
4
|
export declare const getLassoSelectedElementIds: (input: {
|
|
4
5
|
lassoPath: GlobalPoint[];
|
|
5
6
|
elements: readonly ExcalidrawElement[];
|
|
@@ -8,6 +9,7 @@ export declare const getLassoSelectedElementIds: (input: {
|
|
|
8
9
|
intersectedElements: Set<ExcalidrawElement["id"]>;
|
|
9
10
|
enclosedElements: Set<ExcalidrawElement["id"]>;
|
|
10
11
|
simplifyDistance?: number;
|
|
12
|
+
mode?: BoxSelectionMode;
|
|
11
13
|
}) => {
|
|
12
14
|
selectedElementIds: string[];
|
|
13
15
|
};
|
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
import type { StaticCanvasRenderConfig } from "../scene/types";
|
|
2
2
|
import type { AppState } from "../types";
|
|
3
|
+
export declare const DEFAULT_SELECTION_COLOR = "#6965db";
|
|
4
|
+
/**
|
|
5
|
+
* Returns the theme's selection color (`--color-selection`), read from the
|
|
6
|
+
* computed style of any element inside the editor container so that host
|
|
7
|
+
* overrides are respected. Falls back to the default when unavailable.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getSelectionColor: (element: Element | null | undefined) => string;
|
|
3
10
|
export declare const fillCircle: (context: CanvasRenderingContext2D, cx: number, cy: number, radius: number, stroke: boolean, fill?: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The scroll the renderers draw at: the real one, rounded to whole device
|
|
13
|
+
* pixels. Panning writes a fractional scroll (pointer delta ÷ zoom), and an
|
|
14
|
+
* element's cached bitmap blitted at a fractional device offset gets
|
|
15
|
+
* resampled — so as the fraction drifts under a pan, every element pulses
|
|
16
|
+
* between crisp and soft. A whole-pixel scroll moves the scene the way a
|
|
17
|
+
* browser scrolls a page: each element keeps its own, constant sub-pixel
|
|
18
|
+
* phase and a pan never changes how anything is filtered. The difference
|
|
19
|
+
* stays under half a device pixel, so hit-testing and DOM overlays keep
|
|
20
|
+
* using the real scroll. Identity when nothing needs to change.
|
|
21
|
+
*/
|
|
22
|
+
export declare const snapScrollToDevicePixels: <T extends {
|
|
23
|
+
scrollX: number;
|
|
24
|
+
scrollY: number;
|
|
25
|
+
zoom: {
|
|
26
|
+
value: number;
|
|
27
|
+
};
|
|
28
|
+
}>(appState: T, scale: number) => T;
|
|
4
29
|
export declare const getNormalizedCanvasDimensions: (canvas: HTMLCanvasElement, scale: number) => [number, number];
|
|
5
30
|
export declare const bootstrapCanvas: ({ canvas, scale, normalizedWidth, normalizedHeight, theme, isExporting, canvasBackgroundColor, }: {
|
|
6
31
|
canvas: HTMLCanvasElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getScrollBars } from "../scene/scrollbars";
|
|
2
2
|
import type { InteractiveSceneRenderConfig } from "../scene/types";
|
|
3
|
-
declare const _renderInteractiveScene: ({ app, canvas, elementsMap, visibleElements, selectedElements, allElementsMap, scale, appState, renderConfig, editorInterface, animationState, deltaTime, }: InteractiveSceneRenderConfig) => {
|
|
3
|
+
declare const _renderInteractiveScene: ({ app, canvas, elementsMap, visibleElements, selectedElements, allElementsMap, scale, appState: unsnappedAppState, renderConfig, editorInterface, animationState, deltaTime, }: InteractiveSceneRenderConfig) => {
|
|
4
4
|
scrollBars?: ReturnType<typeof getScrollBars>;
|
|
5
5
|
animationState?: typeof animationState;
|
|
6
6
|
};
|