@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,183 @@
|
|
|
1
|
+
import type { Scene } from "./Scene";
|
|
2
|
+
import type { VerticalResizeAnchor } from "./sizeHelpers";
|
|
3
|
+
import type { TransformHandleDirection } from "./transformHandles";
|
|
4
|
+
import type { ElementsMap, ExcalidrawElement, ExcalidrawStickyNoteElement, ExcalidrawTextElement, NonDeletedExcalidrawElement } from "./types";
|
|
5
|
+
export type StickyNoteRenderPoint = {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
export type StickyNotePathCommand = {
|
|
10
|
+
type: "move";
|
|
11
|
+
point: StickyNoteRenderPoint;
|
|
12
|
+
} | {
|
|
13
|
+
type: "line";
|
|
14
|
+
point: StickyNoteRenderPoint;
|
|
15
|
+
} | {
|
|
16
|
+
type: "quadratic";
|
|
17
|
+
control: StickyNoteRenderPoint;
|
|
18
|
+
point: StickyNoteRenderPoint;
|
|
19
|
+
};
|
|
20
|
+
export declare const normalizeStickyNoteStrokeColor: (strokeColor: string | null | undefined) => string;
|
|
21
|
+
export declare const normalizeStickyNoteBackgroundColor: (backgroundColor: string | null | undefined) => string;
|
|
22
|
+
/**
|
|
23
|
+
* The update that applies a picked color to an element under the sticky
|
|
24
|
+
* note policy: a note is always filled and its label — the visible text,
|
|
25
|
+
* which the note's own `strokeColor` seeds — never goes transparent. Every
|
|
26
|
+
* color surface (actions, both eyedroppers, paste styles, bind) routes
|
|
27
|
+
* through this instead of re-deriving the rule.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The element a color pick on `element` lands on. A note's label has no fill
|
|
31
|
+
* of its own, so a background pick on the label — the styles panel while
|
|
32
|
+
* editing it — goes to the note; everything else colors itself.
|
|
33
|
+
*/
|
|
34
|
+
export declare const getColorTargetElement: (element: ExcalidrawElement, property: "strokeColor" | "backgroundColor", elementsMap: ElementsMap) => ExcalidrawElement;
|
|
35
|
+
export declare const getColorUpdate: (element: ExcalidrawElement, property: "strokeColor" | "backgroundColor", color: string, elementsMap: ElementsMap) => {
|
|
36
|
+
strokeColor: string;
|
|
37
|
+
} | {
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A note's ink is one color: the container's `strokeColor` — the seed for a
|
|
42
|
+
* new label and what the creation-date footer paints with — and its label's.
|
|
43
|
+
* Run after a property write to copy the side that changed onto the other;
|
|
44
|
+
* when both changed, or neither (data that drifted), the label wins: it is
|
|
45
|
+
* the text the user styled. A transparent label always takes the note's
|
|
46
|
+
* color. Returns the same array when nothing needs to change.
|
|
47
|
+
*/
|
|
48
|
+
export declare const syncStickyNoteInk: <T extends ExcalidrawElement>(elements: readonly T[], prevElementsMap: ElementsMap) => readonly T[];
|
|
49
|
+
export declare const getStickyNoteCornerRadius: (element: ExcalidrawStickyNoteElement) => number;
|
|
50
|
+
export declare const getStickyNoteRenderPoints: (element: ExcalidrawStickyNoteElement, { offsetX, offsetY, seedOffset, }?: {
|
|
51
|
+
offsetX?: number;
|
|
52
|
+
offsetY?: number;
|
|
53
|
+
seedOffset?: number;
|
|
54
|
+
}) => StickyNoteRenderPoint[];
|
|
55
|
+
export declare const getStickyNotePathCommands: (element: ExcalidrawStickyNoteElement, { shadow }?: {
|
|
56
|
+
shadow?: boolean;
|
|
57
|
+
}) => StickyNotePathCommand[];
|
|
58
|
+
export declare const normalizeStickyNoteFontSize: (fontSize: number) => number;
|
|
59
|
+
/** whether the text element is the label of a sticky note */
|
|
60
|
+
export declare const isStickyNoteBoundText: (textElement: ExcalidrawTextElement, elementsMap: ElementsMap) => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The font size the user picked: the ceiling the auto-fit shrinks from for a
|
|
63
|
+
* sticky note label, plain `fontSize` for any other text.
|
|
64
|
+
*
|
|
65
|
+
* Container-aware on purpose — generic binding repair (duplication, history)
|
|
66
|
+
* rewrites `containerId` without touching the ceiling, so a numeric
|
|
67
|
+
* `baseFontSize` alone does not prove the text is still sticky-bound.
|
|
68
|
+
*/
|
|
69
|
+
export declare const getBaseFontSize: (textElement: ExcalidrawTextElement, elementsMap: ElementsMap) => number;
|
|
70
|
+
/** the update that applies a user-picked font size (see `getBaseFontSize`) */
|
|
71
|
+
export declare const getBaseFontSizeUpdate: (textElement: ExcalidrawTextElement, fontSize: number, elementsMap: ElementsMap) => {
|
|
72
|
+
fontSize: number;
|
|
73
|
+
} | {
|
|
74
|
+
baseFontSize: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* The creation-date label: absolute, so painting needs no clock and exports
|
|
78
|
+
* don't go stale, and short ("7 Sep") while the year is the current one.
|
|
79
|
+
* `null` when the note has no usable timestamp (files restored without one).
|
|
80
|
+
* Fixed English in the viewer's local time zone — the element package has no
|
|
81
|
+
* locale, and the footer is chosen by width bucket rather than measured.
|
|
82
|
+
*/
|
|
83
|
+
export declare const getStickyNoteDateLabel: (created: ExcalidrawStickyNoteElement["created"], { short, now }?: {
|
|
84
|
+
short?: boolean;
|
|
85
|
+
now?: number;
|
|
86
|
+
}) => string | null;
|
|
87
|
+
/**
|
|
88
|
+
* What the footer paints and where, in note-local coordinates — shared by the
|
|
89
|
+
* canvas and SVG renderers, which take the font and opacity from
|
|
90
|
+
* `STICKY_NOTE_FOOTER`. `null` for the 0×0 creation draft and anything under
|
|
91
|
+
* the data floor, where the band would overlap the top padding.
|
|
92
|
+
*/
|
|
93
|
+
export declare const getStickyNoteFooter: (element: Pick<ExcalidrawStickyNoteElement, "created" | "width" | "height">, now?: number) => {
|
|
94
|
+
text: string;
|
|
95
|
+
x: number;
|
|
96
|
+
y: number;
|
|
97
|
+
} | null;
|
|
98
|
+
/**
|
|
99
|
+
* The smallest note the UI lets a user create or resize to: one line at the
|
|
100
|
+
* label's font ceiling plus padding (and, vertically, the footer), never below
|
|
101
|
+
* `STICKY_NOTE_MIN_SIZE`. Without the font term a fresh note would grow on
|
|
102
|
+
* the very first keystroke. Data-level passes (restore, action post-passes)
|
|
103
|
+
* only enforce the constant floor — the layout grows a note as needed.
|
|
104
|
+
*/
|
|
105
|
+
export declare const getStickyNoteMinSize: ({ fontSize, fontFamily, }: Pick<ExcalidrawTextElement, "fontSize" | "fontFamily">) => {
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
};
|
|
109
|
+
export type StickyNoteLayoutAnchor = VerticalResizeAnchor;
|
|
110
|
+
export type StickyNoteLayoutOpts = {
|
|
111
|
+
/** unwrapped text to lay out; defaults to the label's `originalText` */
|
|
112
|
+
originalText?: string;
|
|
113
|
+
/**
|
|
114
|
+
* absolute base-height intent — the gesture-start value to preserve, or the
|
|
115
|
+
* height a resize asked for. Omitted = keep the note's live `baseHeight`
|
|
116
|
+
* (typing, style changes, restore).
|
|
117
|
+
*/
|
|
118
|
+
baseHeight?: number;
|
|
119
|
+
/**
|
|
120
|
+
* absolute font-ceiling intent (a proportional resize passes
|
|
121
|
+
* `gesture-start ceiling × scale`). Omitted = keep the label's live ceiling.
|
|
122
|
+
* Never a multiplier on the live value — that compounds across pointer-moves.
|
|
123
|
+
*/
|
|
124
|
+
baseFontSize?: number;
|
|
125
|
+
/** the edge that stays put when the content correction changes the height */
|
|
126
|
+
anchor?: StickyNoteLayoutAnchor;
|
|
127
|
+
};
|
|
128
|
+
export type StickyNoteLayout = {
|
|
129
|
+
container: Pick<ExcalidrawStickyNoteElement, "x" | "y" | "width" | "height" | "baseHeight">;
|
|
130
|
+
text: Pick<ExcalidrawTextElement, "text" | "fontSize" | "baseFontSize" | "width" | "height" | "x" | "y" | "angle"> | null;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* The single source of truth for a sticky note's geometry: wraps the label at
|
|
134
|
+
* the note's width, fits the font under the ceiling, grows the note past
|
|
135
|
+
* `baseHeight` only when the text still overflows at the minimum size, and
|
|
136
|
+
* positions the label inside. Pure — returns the updates for both elements.
|
|
137
|
+
*/
|
|
138
|
+
export declare const getStickyNoteLayout: (container: ExcalidrawStickyNoteElement, textElement: ExcalidrawTextElement | null, opts?: StickyNoteLayoutOpts) => StickyNoteLayout;
|
|
139
|
+
/**
|
|
140
|
+
* Resize intents for a sticky note — the §3.3 matrix of the plan. Every value
|
|
141
|
+
* is absolute and derived from the gesture-start snapshot on each pointer-move,
|
|
142
|
+
* so releasing Shift (or Alt) mid-gesture restores the original base height
|
|
143
|
+
* and ceiling instead of keeping values a previous move scaled.
|
|
144
|
+
*
|
|
145
|
+
* - width-only gestures (free E/W, Stats W) preserve the base height
|
|
146
|
+
* - height-changing gestures use the requested height as the new base
|
|
147
|
+
* - proportional gestures (Shift on any handle, aspect-locked multi-select,
|
|
148
|
+
* Stats group) additionally scale the font ceiling with the note
|
|
149
|
+
* - flips preserve everything
|
|
150
|
+
* - the content correction anchors at the edge the gesture holds still
|
|
151
|
+
*/
|
|
152
|
+
export declare const getStickyNoteResizeIntent: (
|
|
153
|
+
/** the note with the requested geometry already applied */
|
|
154
|
+
container: ExcalidrawStickyNoteElement, originalElementsMap: ElementsMap, handleDirection: TransformHandleDirection, { proportional, fromCenter, flip, }: {
|
|
155
|
+
proportional: boolean;
|
|
156
|
+
fromCenter: boolean;
|
|
157
|
+
flip?: boolean;
|
|
158
|
+
}) => Pick<StickyNoteLayoutOpts, "baseHeight" | "baseFontSize" | "anchor">;
|
|
159
|
+
/**
|
|
160
|
+
* Applies `getStickyNoteLayout` to a live scene, then runs the bound-arrow
|
|
161
|
+
* pass unless the caller already owns one (`bindings: false`) or needs to
|
|
162
|
+
* forward its context (`bindings: { simultaneouslyUpdated }` — arrows resized
|
|
163
|
+
* in the same gesture must not be moved by the pass, `updateBoundElements`
|
|
164
|
+
* skips them only when told).
|
|
165
|
+
*/
|
|
166
|
+
export declare const updateStickyNoteLayout: (container: ExcalidrawStickyNoteElement, scene: Scene, { text, bindings, ...layoutOpts }?: StickyNoteLayoutOpts & {
|
|
167
|
+
/** the label to lay out when it is an uncommitted clone (font actions clone before install) */
|
|
168
|
+
text?: ExcalidrawTextElement | null;
|
|
169
|
+
bindings?: {
|
|
170
|
+
simultaneouslyUpdated?: readonly NonDeletedExcalidrawElement[];
|
|
171
|
+
} | false;
|
|
172
|
+
}) => StickyNoteLayout;
|
|
173
|
+
/**
|
|
174
|
+
* Applies `getStickyNoteLayout` inside an immutable elements array (property
|
|
175
|
+
* actions, paste styles, restore): the notes among `affectedIds` — or the
|
|
176
|
+
* notes whose labels are — get both halves merged into their clones. Elements
|
|
177
|
+
* that need no change keep their identity and version; when `prevElementsMap`
|
|
178
|
+
* is given, notes whose layout inputs did not change skip the fit entirely.
|
|
179
|
+
* Bound arrows are the caller's job once the result is installed.
|
|
180
|
+
*/
|
|
181
|
+
export declare const relayoutStickyNotes: <T extends ExcalidrawElement>(elements: readonly T[], affectedIds: ReadonlySet<ExcalidrawElement["id"]>, opts?: {
|
|
182
|
+
prevElementsMap?: ElementsMap;
|
|
183
|
+
}) => readonly T[];
|
|
@@ -4,7 +4,7 @@ import type { Scene } from "./Scene";
|
|
|
4
4
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
5
5
|
import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeleted } from "./types";
|
|
6
6
|
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null, scene: Scene) => void;
|
|
7
|
-
export declare const handleBindTextResize: (container: ExcalidrawElement, scene: Scene, transformHandleType: MaybeTransformHandleType, shouldMaintainAspectRatio?: boolean, shouldResizeFromCenter?: boolean) => void;
|
|
7
|
+
export declare const handleBindTextResize: (container: ExcalidrawElement, scene: Scene, transformHandleType: MaybeTransformHandleType, shouldMaintainAspectRatio?: boolean, shouldResizeFromCenter?: boolean, flipByY?: boolean) => void;
|
|
8
8
|
export declare const computeBoundTextPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
9
9
|
x: number;
|
|
10
10
|
y: number;
|
|
@@ -40,4 +40,5 @@ export declare const getBoundTextMaxWidth: (container: ExcalidrawElement, boundT
|
|
|
40
40
|
export declare const getBoundTextMaxHeight: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer) => number;
|
|
41
41
|
/** retrieves text from text elements and concatenates to a single string */
|
|
42
42
|
export declare const getTextFromElements: (elements: readonly ExcalidrawElement[], separator?: string) => string;
|
|
43
|
+
export declare const DEFAULT_BOUND_TEXT_LABEL_POSITION = 0.5;
|
|
43
44
|
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { MarkOptional } from "@excalidraw/common/utility-types";
|
|
2
2
|
import { type ElementConstructorOpts } from "./newElement";
|
|
3
|
-
import type { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawIframeLikeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawMagicFrameElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, NonDeletedExcalidrawElement, Ordered, TextAlign, VerticalAlign } from "./types";
|
|
3
|
+
import type { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawIframeLikeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawMagicFrameElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, NonDeletedExcalidrawElement, Ordered, TextAlign, VerticalAlign, ExcalidrawStickyNoteElement } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Options for elements generated from a skeleton fragment (bound labels and
|
|
6
|
+
* binding endpoints). Such elements are always constructed fresh, hence they
|
|
7
|
+
* never carry a creation time of their own.
|
|
8
|
+
*/
|
|
9
|
+
type FragmentConstructorOpts = MarkOptional<Omit<ElementConstructorOpts, "created">, "x" | "y">;
|
|
4
10
|
export type ValidLinearElement = {
|
|
5
11
|
type: "arrow" | "line";
|
|
6
12
|
x: number;
|
|
@@ -11,7 +17,7 @@ export type ValidLinearElement = {
|
|
|
11
17
|
fontFamily?: FontFamilyValues;
|
|
12
18
|
textAlign?: TextAlign;
|
|
13
19
|
verticalAlign?: VerticalAlign;
|
|
14
|
-
} &
|
|
20
|
+
} & FragmentConstructorOpts;
|
|
15
21
|
end?: (({
|
|
16
22
|
type: Exclude<ExcalidrawBindableElement["type"], "image" | "text" | "frame" | "magicframe" | "embeddable" | "iframe">;
|
|
17
23
|
id?: ExcalidrawGenericElement["id"];
|
|
@@ -25,7 +31,7 @@ export type ValidLinearElement = {
|
|
|
25
31
|
type?: "text";
|
|
26
32
|
id: ExcalidrawTextElement["id"];
|
|
27
33
|
text: string;
|
|
28
|
-
}) & Partial<ExcalidrawTextElement
|
|
34
|
+
}) & Partial<Omit<ExcalidrawTextElement, "created">>)) & FragmentConstructorOpts;
|
|
29
35
|
start?: (({
|
|
30
36
|
type: Exclude<ExcalidrawBindableElement["type"], "image" | "text" | "frame" | "magicframe" | "embeddable" | "iframe">;
|
|
31
37
|
id?: ExcalidrawGenericElement["id"];
|
|
@@ -39,7 +45,7 @@ export type ValidLinearElement = {
|
|
|
39
45
|
type?: "text";
|
|
40
46
|
id: ExcalidrawTextElement["id"];
|
|
41
47
|
text: string;
|
|
42
|
-
}) & Partial<ExcalidrawTextElement
|
|
48
|
+
}) & Partial<Omit<ExcalidrawTextElement, "created">>)) & FragmentConstructorOpts;
|
|
43
49
|
} & Partial<ExcalidrawLinearElement>;
|
|
44
50
|
export type ValidContainer = {
|
|
45
51
|
type: Exclude<ExcalidrawGenericElement["type"], "selection">;
|
|
@@ -50,13 +56,25 @@ export type ValidContainer = {
|
|
|
50
56
|
fontFamily?: FontFamilyValues;
|
|
51
57
|
textAlign?: TextAlign;
|
|
52
58
|
verticalAlign?: VerticalAlign;
|
|
53
|
-
} &
|
|
59
|
+
} & FragmentConstructorOpts;
|
|
54
60
|
} & ElementConstructorOpts;
|
|
61
|
+
/**
|
|
62
|
+
* A sticky note: an always-filled note whose label auto-fits. `label.fontSize`
|
|
63
|
+
* is the font ceiling the fit shrinks from; the note grows past its height
|
|
64
|
+
* (kept as `baseHeight`) only once the label hits the minimum font size.
|
|
65
|
+
*/
|
|
66
|
+
export type ValidStickyNote = {
|
|
67
|
+
type: "stickynote";
|
|
68
|
+
id?: ExcalidrawStickyNoteElement["id"];
|
|
69
|
+
label?: Extract<ValidContainer, {
|
|
70
|
+
label?: unknown;
|
|
71
|
+
}>["label"];
|
|
72
|
+
} & ElementConstructorOpts & Partial<Pick<ExcalidrawStickyNoteElement, "baseHeight">>;
|
|
55
73
|
export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, ExcalidrawIframeLikeElement | ExcalidrawFreeDrawElement> | ({
|
|
56
74
|
type: Extract<ExcalidrawLinearElement["type"], "line">;
|
|
57
75
|
x: number;
|
|
58
76
|
y: number;
|
|
59
|
-
} & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidLinearElement | ({
|
|
77
|
+
} & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidStickyNote | ValidLinearElement | ({
|
|
60
78
|
type: "text";
|
|
61
79
|
text: string;
|
|
62
80
|
x: number;
|
|
@@ -79,3 +97,4 @@ export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, Excal
|
|
|
79
97
|
export declare const convertToExcalidrawElements: (elementsSkeleton: ExcalidrawElementSkeleton[] | null, opts?: {
|
|
80
98
|
regenerateIds: boolean;
|
|
81
99
|
}) => Ordered<NonDeletedExcalidrawElement>[];
|
|
100
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { MarkNonNullable } from "@excalidraw/common/utility-types";
|
|
3
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType } from "./types";
|
|
3
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType, ExcalidrawStickyNoteElement } from "./types";
|
|
4
4
|
export declare const isInitializedImageElement: <T extends ExcalidrawElement>(element: T | null) => element is T & InitializedExcalidrawImageElement;
|
|
5
5
|
export declare const isImageElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawImageElement;
|
|
6
6
|
export declare const isEmbeddableElement: <T extends ExcalidrawElement>(element: T | null | undefined) => element is T & ExcalidrawEmbeddableElement;
|
|
7
7
|
export declare const isIframeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawIframeElement;
|
|
8
8
|
export declare const isIframeLikeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawIframeLikeElement;
|
|
9
9
|
export declare const isTextElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawTextElement;
|
|
10
|
+
export declare const isStickyNoteElement: <T extends ExcalidrawElement>(element: T | null | undefined) => element is T & ExcalidrawStickyNoteElement;
|
|
10
11
|
export declare const isFrameElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawFrameElement;
|
|
11
12
|
export declare const isMagicFrameElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawMagicFrameElement;
|
|
12
13
|
export declare const isFrameLikeElement: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawFrameLikeElement;
|
|
@@ -35,7 +36,7 @@ export declare const hasBoundTextElement: <T extends ExcalidrawElement>(element:
|
|
|
35
36
|
export declare const isBoundToContainer: <T extends ExcalidrawElement>(element: T | null) => element is T & ExcalidrawTextElementWithContainer;
|
|
36
37
|
export declare const isArrowBoundToElement: (element: ExcalidrawArrowElement) => boolean;
|
|
37
38
|
export declare const isUsingAdaptiveRadius: (type: string) => type is "rectangle" | "embeddable" | "iframe" | "image";
|
|
38
|
-
export declare const isUsingProportionalRadius: (type: string) => type is "line" | "arrow" | "diamond";
|
|
39
|
+
export declare const isUsingProportionalRadius: (type: string) => type is "line" | "arrow" | "stickynote" | "diamond";
|
|
39
40
|
export declare const canApplyRoundnessTypeToElement: (roundnessType: RoundnessType, element: ExcalidrawElement) => boolean;
|
|
40
41
|
export declare const getDefaultRoundnessTypeForElement: (element: ExcalidrawElement) => {
|
|
41
42
|
type: 2;
|
|
@@ -66,6 +66,11 @@ type _ExcalidrawElementBase = Readonly<{
|
|
|
66
66
|
boundElements: readonly BoundElement[] | null;
|
|
67
67
|
/** epoch (ms) timestamp of last element update */
|
|
68
68
|
updated: number;
|
|
69
|
+
/** Client wall-clock creation time in epoch milliseconds; null if unknown.
|
|
70
|
+
Preserved for this element's lifetime, including edits and undo/redo,
|
|
71
|
+
and excluded from `ElementUpdate` (mutateElement / newElementWith).
|
|
72
|
+
Duplicating an element starts a new lifetime. Not an ordering clock. */
|
|
73
|
+
created: number | null;
|
|
69
74
|
link: string | null;
|
|
70
75
|
locked: boolean;
|
|
71
76
|
customData?: Record<string, any>;
|
|
@@ -76,6 +81,14 @@ export type ExcalidrawSelectionElement = _ExcalidrawElementBase & {
|
|
|
76
81
|
export type ExcalidrawRectangleElement = _ExcalidrawElementBase & {
|
|
77
82
|
type: "rectangle";
|
|
78
83
|
};
|
|
84
|
+
export type ExcalidrawStickyNoteElement = _ExcalidrawElementBase & Readonly<{
|
|
85
|
+
type: "stickynote";
|
|
86
|
+
/**
|
|
87
|
+
* The height the user set, from which the layout derives `height`: the
|
|
88
|
+
* note grows above it to fit its label and never shrinks below it
|
|
89
|
+
*/
|
|
90
|
+
baseHeight: number;
|
|
91
|
+
}>;
|
|
79
92
|
export type ExcalidrawDiamondElement = _ExcalidrawElementBase & {
|
|
80
93
|
type: "diamond";
|
|
81
94
|
};
|
|
@@ -150,14 +163,14 @@ export type ExcalidrawFrameLikeElement = ExcalidrawFrameElement | ExcalidrawMagi
|
|
|
150
163
|
* These are elements that don't have any additional properties.
|
|
151
164
|
*/
|
|
152
165
|
export type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
153
|
-
export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
154
|
-
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
|
|
166
|
+
export type ExcalidrawFlowchartNodeElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
|
|
167
|
+
export type ExcalidrawRectanguloidElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawImageElement | ExcalidrawTextElement | ExcalidrawFreeDrawElement | ExcalidrawIframeLikeElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawSelectionElement;
|
|
155
168
|
/**
|
|
156
169
|
* ExcalidrawElement should be JSON serializable and (eventually) contain
|
|
157
170
|
* no computed data. The list of all ExcalidrawElements should be shareable
|
|
158
171
|
* between peers and contain no state local to the peer.
|
|
159
172
|
*/
|
|
160
|
-
export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawArrowElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
|
|
173
|
+
export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawStickyNoteElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawArrowElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement;
|
|
161
174
|
export type ExcalidrawNonSelectionElement = Exclude<ExcalidrawElement, ExcalidrawSelectionElement>;
|
|
162
175
|
export type Ordered<TElement extends ExcalidrawElement> = TElement & {
|
|
163
176
|
index: FractionalIndex;
|
|
@@ -171,10 +184,19 @@ export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
|
|
|
171
184
|
type: "text";
|
|
172
185
|
fontSize: number;
|
|
173
186
|
fontFamily: FontFamilyValues;
|
|
187
|
+
/**
|
|
188
|
+
* The font size the user picked, from which the layout derives `fontSize`.
|
|
189
|
+
* Today only sticky note labels have one: the auto-fit shrinks below it
|
|
190
|
+
* and never above it (compare `baseHeight`, which the note grows above).
|
|
191
|
+
* `null` for every other text. Read it through `getBaseFontSize` —
|
|
192
|
+
* generic binding repair can detach a label without clearing this, so
|
|
193
|
+
* the container decides its meaning.
|
|
194
|
+
*/
|
|
195
|
+
baseFontSize: number | null;
|
|
174
196
|
text: string;
|
|
175
197
|
textAlign: TextAlign;
|
|
176
198
|
verticalAlign: VerticalAlign;
|
|
177
|
-
containerId:
|
|
199
|
+
containerId: ExcalidrawTextContainer["id"] | null;
|
|
178
200
|
originalText: string;
|
|
179
201
|
/**
|
|
180
202
|
* If `true` the width will fit the text. If `false`, the text will
|
|
@@ -190,9 +212,16 @@ export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
|
|
|
190
212
|
lineHeight: number & {
|
|
191
213
|
_brand: "unitlessLineHeight";
|
|
192
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* Position of text bound to a linear element (such as an arrow),
|
|
217
|
+
* expressed as a normalized arc-length parameter (0–1) along the
|
|
218
|
+
* container's whole path. Independent of how the path is segmented,
|
|
219
|
+
* so it survives midpoint insertion and other geometry changes.
|
|
220
|
+
* */
|
|
221
|
+
labelPosition?: number | null;
|
|
193
222
|
}>;
|
|
194
|
-
export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
|
|
195
|
-
export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawArrowElement;
|
|
223
|
+
export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawEmbeddableElement | ExcalidrawFrameElement | ExcalidrawMagicFrameElement;
|
|
224
|
+
export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawArrowElement;
|
|
196
225
|
export type ExcalidrawTextElementWithContainer = {
|
|
197
226
|
containerId: ExcalidrawTextContainer["id"];
|
|
198
227
|
} & ExcalidrawTextElement;
|
|
@@ -2,13 +2,16 @@ import { type GlobalPoint } from "@excalidraw/math";
|
|
|
2
2
|
import type { Curve, LineSegment } from "@excalidraw/math";
|
|
3
3
|
import type { AppState, Zoom } from "@excalidraw/excalidraw/types";
|
|
4
4
|
import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
5
|
+
export type LinearPathSegment = LineSegment<GlobalPoint> | Curve<GlobalPoint>;
|
|
6
|
+
type ElementShape = [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
5
7
|
/**
|
|
6
8
|
* Returns the **rotated** components of freedraw, line or arrow elements.
|
|
7
9
|
*
|
|
8
10
|
* @param element The linear element to deconstruct
|
|
9
11
|
* @returns The rotated in components.
|
|
10
12
|
*/
|
|
11
|
-
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap):
|
|
13
|
+
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): ElementShape;
|
|
14
|
+
export declare function getLinearElementPathSegments(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement, elementsMap: ElementsMap): LinearPathSegment[];
|
|
12
15
|
/**
|
|
13
16
|
* Get the building components of a rectanguloid element in the form of
|
|
14
17
|
* line segments and curves **unrotated**.
|
|
@@ -17,7 +20,7 @@ export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLi
|
|
|
17
20
|
* @param offset Optional offset to expand the rectanguloid shape
|
|
18
21
|
* @returns Tuple of **unrotated** line segments (0) and curves (1)
|
|
19
22
|
*/
|
|
20
|
-
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number):
|
|
23
|
+
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): ElementShape;
|
|
21
24
|
export declare function getDiamondBaseCorners(element: ExcalidrawDiamondElement, offset?: number): Curve<GlobalPoint>[];
|
|
22
25
|
/**
|
|
23
26
|
* Get the **unrotated** building components of a diamond element
|
|
@@ -27,10 +30,11 @@ export declare function getDiamondBaseCorners(element: ExcalidrawDiamondElement,
|
|
|
27
30
|
* @param offset An optional offset
|
|
28
31
|
* @returns Tuple of line **unrotated** segments (0) and curves (1)
|
|
29
32
|
*/
|
|
30
|
-
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number):
|
|
33
|
+
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): ElementShape;
|
|
31
34
|
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
|
|
32
35
|
/** supply if you want the loop detection to account for current zoom */
|
|
33
36
|
zoomValue?: Zoom["value"]) => boolean;
|
|
34
37
|
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
35
38
|
export declare const getSnapOutlineMidPoint: (point: GlobalPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap, zoom: AppState["zoom"]) => GlobalPoint | undefined;
|
|
36
39
|
export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, zoom: AppState["zoom"], isMidpointSnappingEnabled?: boolean) => GlobalPoint | null;
|
|
40
|
+
export {};
|
|
@@ -29,6 +29,7 @@ export declare const actionAddToLibrary: {
|
|
|
29
29
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
30
30
|
bindingPreference: "enabled" | "disabled";
|
|
31
31
|
isMidpointSnappingEnabled: boolean;
|
|
32
|
+
inputDevice: import("../types").InputDevice;
|
|
32
33
|
suggestedBinding: {
|
|
33
34
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
34
35
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -63,6 +64,8 @@ export declare const actionAddToLibrary: {
|
|
|
63
64
|
exportWithDarkMode: boolean;
|
|
64
65
|
exportScale: number;
|
|
65
66
|
currentItemStrokeColor: string;
|
|
67
|
+
currentItemStickynoteStrokeColor: string;
|
|
68
|
+
currentItemStickynoteBackgroundColor: string;
|
|
66
69
|
currentItemBackgroundColor: string;
|
|
67
70
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
68
71
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -152,8 +155,6 @@ export declare const actionAddToLibrary: {
|
|
|
152
155
|
y: number;
|
|
153
156
|
} | null;
|
|
154
157
|
objectsSnapModeEnabled: boolean;
|
|
155
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
156
|
-
followedBy: Set<import("../types").SocketId>;
|
|
157
158
|
isCropping: boolean;
|
|
158
159
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
159
160
|
searchMatches: Readonly<{
|
|
@@ -165,6 +166,13 @@ export declare const actionAddToLibrary: {
|
|
|
165
166
|
[groupId: string]: true;
|
|
166
167
|
};
|
|
167
168
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
169
|
+
colorTopPicks: {
|
|
170
|
+
elementStroke: readonly string[] | null;
|
|
171
|
+
elementBackground: readonly string[] | null;
|
|
172
|
+
bucketFill: readonly string[] | null;
|
|
173
|
+
stickyNoteStroke: readonly string[] | null;
|
|
174
|
+
stickyNoteBackground: readonly string[] | null;
|
|
175
|
+
};
|
|
168
176
|
};
|
|
169
177
|
} | {
|
|
170
178
|
captureUpdate: "EVENTUALLY";
|
|
@@ -189,6 +197,7 @@ export declare const actionAddToLibrary: {
|
|
|
189
197
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
190
198
|
bindingPreference: "enabled" | "disabled";
|
|
191
199
|
isMidpointSnappingEnabled: boolean;
|
|
200
|
+
inputDevice: import("../types").InputDevice;
|
|
192
201
|
suggestedBinding: {
|
|
193
202
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
194
203
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -223,6 +232,8 @@ export declare const actionAddToLibrary: {
|
|
|
223
232
|
exportWithDarkMode: boolean;
|
|
224
233
|
exportScale: number;
|
|
225
234
|
currentItemStrokeColor: string;
|
|
235
|
+
currentItemStickynoteStrokeColor: string;
|
|
236
|
+
currentItemStickynoteBackgroundColor: string;
|
|
226
237
|
currentItemBackgroundColor: string;
|
|
227
238
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
228
239
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -317,8 +328,6 @@ export declare const actionAddToLibrary: {
|
|
|
317
328
|
y: number;
|
|
318
329
|
} | null;
|
|
319
330
|
objectsSnapModeEnabled: boolean;
|
|
320
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
321
|
-
followedBy: Set<import("../types").SocketId>;
|
|
322
331
|
isCropping: boolean;
|
|
323
332
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
324
333
|
searchMatches: Readonly<{
|
|
@@ -330,6 +339,13 @@ export declare const actionAddToLibrary: {
|
|
|
330
339
|
[groupId: string]: true;
|
|
331
340
|
};
|
|
332
341
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
342
|
+
colorTopPicks: {
|
|
343
|
+
elementStroke: readonly string[] | null;
|
|
344
|
+
elementBackground: readonly string[] | null;
|
|
345
|
+
bucketFill: readonly string[] | null;
|
|
346
|
+
stickyNoteStroke: readonly string[] | null;
|
|
347
|
+
stickyNoteBackground: readonly string[] | null;
|
|
348
|
+
};
|
|
333
349
|
};
|
|
334
350
|
}> | {
|
|
335
351
|
captureUpdate: "EVENTUALLY";
|
|
@@ -354,6 +370,7 @@ export declare const actionAddToLibrary: {
|
|
|
354
370
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
355
371
|
bindingPreference: "enabled" | "disabled";
|
|
356
372
|
isMidpointSnappingEnabled: boolean;
|
|
373
|
+
inputDevice: import("../types").InputDevice;
|
|
357
374
|
suggestedBinding: {
|
|
358
375
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
359
376
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -388,6 +405,8 @@ export declare const actionAddToLibrary: {
|
|
|
388
405
|
exportWithDarkMode: boolean;
|
|
389
406
|
exportScale: number;
|
|
390
407
|
currentItemStrokeColor: string;
|
|
408
|
+
currentItemStickynoteStrokeColor: string;
|
|
409
|
+
currentItemStickynoteBackgroundColor: string;
|
|
391
410
|
currentItemBackgroundColor: string;
|
|
392
411
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
393
412
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -482,8 +501,6 @@ export declare const actionAddToLibrary: {
|
|
|
482
501
|
y: number;
|
|
483
502
|
} | null;
|
|
484
503
|
objectsSnapModeEnabled: boolean;
|
|
485
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
486
|
-
followedBy: Set<import("../types").SocketId>;
|
|
487
504
|
isCropping: boolean;
|
|
488
505
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
489
506
|
searchMatches: Readonly<{
|
|
@@ -495,6 +512,13 @@ export declare const actionAddToLibrary: {
|
|
|
495
512
|
[groupId: string]: true;
|
|
496
513
|
};
|
|
497
514
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
515
|
+
colorTopPicks: {
|
|
516
|
+
elementStroke: readonly string[] | null;
|
|
517
|
+
elementBackground: readonly string[] | null;
|
|
518
|
+
bucketFill: readonly string[] | null;
|
|
519
|
+
stickyNoteStroke: readonly string[] | null;
|
|
520
|
+
stickyNoteBackground: readonly string[] | null;
|
|
521
|
+
};
|
|
498
522
|
};
|
|
499
523
|
};
|
|
500
524
|
label: string;
|
|
@@ -11,7 +11,7 @@ export declare const actionAlignTop: {
|
|
|
11
11
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
12
12
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
13
13
|
appState: Readonly<AppState>;
|
|
14
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
14
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
15
15
|
captureUpdate: "IMMEDIATELY";
|
|
16
16
|
};
|
|
17
17
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -29,7 +29,7 @@ export declare const actionAlignBottom: {
|
|
|
29
29
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
30
30
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
31
31
|
appState: Readonly<AppState>;
|
|
32
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
32
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
33
33
|
captureUpdate: "IMMEDIATELY";
|
|
34
34
|
};
|
|
35
35
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -47,7 +47,7 @@ export declare const actionAlignLeft: {
|
|
|
47
47
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
48
48
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
49
49
|
appState: Readonly<AppState>;
|
|
50
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
50
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
51
51
|
captureUpdate: "IMMEDIATELY";
|
|
52
52
|
};
|
|
53
53
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -65,7 +65,7 @@ export declare const actionAlignRight: {
|
|
|
65
65
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
66
66
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
67
67
|
appState: Readonly<AppState>;
|
|
68
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
68
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
69
69
|
captureUpdate: "IMMEDIATELY";
|
|
70
70
|
};
|
|
71
71
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -83,7 +83,7 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
83
83
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
84
84
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
85
85
|
appState: Readonly<AppState>;
|
|
86
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
86
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
87
87
|
captureUpdate: "IMMEDIATELY";
|
|
88
88
|
};
|
|
89
89
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -100,7 +100,7 @@ export declare const actionAlignHorizontallyCentered: {
|
|
|
100
100
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
101
101
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
102
102
|
appState: Readonly<AppState>;
|
|
103
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
103
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
104
104
|
captureUpdate: "IMMEDIATELY";
|
|
105
105
|
};
|
|
106
106
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|