@zsviczian/excalidraw 0.10.0-textfix-17 → 0.11.0-obsidian-2
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/README.md +231 -84
- package/dist/excalidraw.development.js +1212 -608
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +7 -0
- package/package.json +19 -14
- package/types/actions/actionAddToLibrary.d.ts +286 -1
- package/types/actions/actionAlign.d.ts +73 -6
- package/types/actions/actionCanvas.d.ts +809 -8
- package/types/actions/actionClipboard.d.ts +523 -4
- package/types/actions/actionDeleteSelected.d.ts +310 -1
- package/types/actions/actionDistribute.d.ts +27 -2
- package/types/actions/actionDuplicateSelection.d.ts +19 -1
- package/types/actions/actionExport.d.ts +903 -8
- package/types/actions/actionFinalize.d.ts +198 -1
- package/types/actions/actionFlip.d.ts +29 -2
- package/types/actions/actionGroup.d.ts +39 -2
- package/types/actions/actionMenu.d.ts +311 -4
- package/types/actions/actionNavigate.d.ts +11 -1
- package/types/actions/actionProperties.d.ts +1232 -12
- package/types/actions/actionSelectAll.d.ts +12 -1
- package/types/actions/actionStyles.d.ts +116 -2
- package/types/actions/actionToggleGridMode.d.ts +104 -1
- package/types/actions/actionToggleStats.d.ts +103 -1
- package/types/actions/actionToggleViewMode.d.ts +103 -1
- package/types/actions/actionToggleZenMode.d.ts +103 -1
- package/types/actions/actionUnbindText.d.ts +11 -0
- package/types/actions/actionZindex.d.ts +55 -4
- package/types/actions/index.d.ts +3 -1
- package/types/actions/register.d.ts +3 -1
- package/types/actions/shortcuts.d.ts +2 -1
- package/types/actions/types.d.ts +3 -2
- package/types/align.d.ts +0 -1
- package/types/analytics.d.ts +1 -1
- package/types/appState.d.ts +0 -4
- package/types/components/App.d.ts +21 -2
- package/types/components/ButtonIconSelect.d.ts +1 -0
- package/types/components/ColorPicker.d.ts +6 -1
- package/types/components/ContextMenu.d.ts +3 -0
- package/types/components/LayerUI.d.ts +2 -1
- package/types/components/MobileMenu.d.ts +2 -1
- package/types/components/PenModeButton.d.ts +13 -0
- package/types/components/Popover.d.ts +5 -1
- package/types/components/Tooltip.d.ts +7 -0
- package/types/components/icons.d.ts +4 -0
- package/types/constants.d.ts +9 -9
- package/types/disitrubte.d.ts +0 -1
- package/types/element/Hyperlink.d.ts +125 -0
- package/types/element/bounds.d.ts +4 -0
- package/types/element/collision.d.ts +1 -0
- package/types/element/dragElements.d.ts +2 -2
- package/types/element/linearElementEditor.d.ts +10 -4
- package/types/element/newElement.d.ts +6 -3
- package/types/element/resizeElements.d.ts +1 -1
- package/types/element/textElement.d.ts +9 -5
- package/types/element/textWysiwyg.d.ts +5 -5
- package/types/element/types.d.ts +2 -0
- package/types/groups.d.ts +1 -0
- package/types/keys.d.ts +6 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ar-SA-json-bad937b9c5872d8bb08c.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-bg-BG-json-b75f0626e77ba4b93a1a.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-bn-BD-json-ba2910bdfa31bf4a3b47.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ca-ES-json-d4752239985378d6687b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-cs-CZ-json-3f0957ec0784a1e70989.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-da-DK-json-30c4bddb0657ba3ec9f0.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-de-DE-json-1f36c83788d93a26c574.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-el-GR-json-c7749e93b5ee2ef46f01.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-es-ES-json-c58a268683a5a98cb339.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-eu-ES-json-a3036124af529be40107.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fa-IR-json-e49ff1b123f75b3fe6ae.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fi-FI-json-25e90ae7a679737c89fa.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fr-FR-json-7d9dfefbcbd632631e26.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-he-IL-json-5f850f9fc31f38e08e11.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hi-IN-json-022f6946007c53005bf4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hu-HU-json-29933e37837a1a237a79.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-id-ID-json-7dc2565e1c0b98d44e81.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-it-IT-json-30125a866f08cd0c8dce.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ja-JP-json-045af0024c647d78ff48.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-kab-KAB-json-dec84820b3b3b8cea91e.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-kk-KZ-json-a2be2aa000093bb0c4b1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ko-KR-json-df4ca911d661a3668791.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-lt-LT-json-e9bd2413c78d8cd605c1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-lv-LV-json-35f7377cd0651c3473cb.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-my-MM-json-4326db071b2b5ad9ebd2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nb-NO-json-f99ea85b15d9c0fd412f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nl-NL-json-676bbee6b2201018afea.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nn-NO-json-1a9f7d30feff1eafa425.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-oc-FR-json-5ce59f015d4aaae56795.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pa-IN-json-5edc5b8da2685495dc6f.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pl-PL-json-2a6bca3404366166de44.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-BR-json-df0e1971ca6c9ab7ba96.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-PT-json-088903851b38144d92cd.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ro-RO-json-e9e42a4eea14e9780121.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ru-RU-json-6619d335c0dc5729f858.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-si-LK-json-29566ffe4c2aab9bc9d7.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sk-SK-json-68881f095026d35935f3.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sv-SE-json-11387dba5283047f00f2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ta-IN-json-fadfdd197ff5b857ed62.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-tr-TR-json-b92a92cca02f833721d4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-uk-UA-json-550e1d2467d2c10ba4c5.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-CN-json-02c2e2cacd9b605b9433.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-HK-json-24ab7abe8e695f165b3b.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-TW-json-9a0e7901a1a58502bfa4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/image-b76d879db8316c30fd0d.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-41e5c0be76c29ad2aba4.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-ar-SA-json-37ef19edefea75b3680e.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-bg-BG-json-7d5458f5cc2a84d8f6e2.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-bn-BD-json-448d07219c41f8dbb55b.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-ca-ES-json-1b5b2fc0229d73e426e2.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-cs-CZ-json-eb093b2c8ac7708896f3.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-da-DK-json-d8afa5e01e2078a828c2.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-de-DE-json-a6cee4c1996e3aafa069.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-el-GR-json-9db54ad72bc0f1b46368.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-es-ES-json-6d364eae9cd78b062862.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-eu-ES-json-a6295f834d0adb4083eb.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-fa-IR-json-994aead70f24c0e04f88.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-fi-FI-json-0208c92c12556594091e.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-fr-FR-json-d12919b5af660f8cd0e2.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-he-IL-json-ee1c784d61ae761756b4.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-hi-IN-json-77fcce82aa2ea23ebc57.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-hu-HU-json-2afc786729254afcc04b.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-id-ID-json-261de18ed01a905bb8a7.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-it-IT-json-02005e1fe5f9ef001a3e.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-ja-JP-json-ee12ac450c12bf9abd0a.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-kab-KAB-json-4b948b48bde7a5aa988b.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-kk-KZ-json-4902d8f64c4c6345ea0e.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-ko-KR-json-afd4100bf8ede6c92721.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-lt-LT-json-a611d0fc2fe568829b13.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-lv-LV-json-f95d6c285bf18cdd5eaa.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-my-MM-json-84db1bbb92c1dee8e250.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-nb-NO-json-d80c0c3712700e7aaad3.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-nl-NL-json-67080c662a350e8983ec.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-nn-NO-json-5d74e695d9a164368952.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-oc-FR-json-19acf217a1bd641a3e5f.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-pa-IN-json-6070668134134cdc4cc5.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-pl-PL-json-49b6e8525a0d9ac86381.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-pt-BR-json-194bb19328e2a094db3f.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-pt-PT-json-8959660f187eb41da2fc.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-ro-RO-json-a61aaf893c100b18bbb8.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-ru-RU-json-8fb78f4f8f1373c5c428.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-si-LK-json-0a6676ca84d9add83859.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-sk-SK-json-bc378d74487614e52ac9.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-sv-SE-json-aadcfeee9542d5b32173.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-ta-IN-json-4e673cde4ee803280436.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-tr-TR-json-4bcb79efe0490c66f154.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-uk-UA-json-1482d7b2e2e8a0232419.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-zh-CN-json-8c7c0fec6b0765479622.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-zh-HK-json-70b4a1bb0d8d99abfa2a.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/i18n-zh-TW-json-d4e760d2810c47bf381a.d.ts +2 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-8825d180ee32659f8996.d.ts +0 -0
- package/types/packages/excalidraw/example/App.d.ts +1 -0
- package/types/packages/excalidraw/example/index.d.ts +1 -0
- package/types/packages/excalidraw/example/initialData.d.ts +172 -0
- package/types/packages/excalidraw/example/sidebar/Sidebar.d.ts +1 -0
- package/types/packages/excalidraw/index.d.ts +1 -1
- package/types/packages/excalidraw/webpack.dev-server.config.d.ts +19 -0
- package/types/packages/excalidraw/webpack.dev.config.d.ts +15 -5
- package/types/packages/excalidraw/webpack.prod.config.d.ts +2 -1
- package/types/packages/utils.d.ts +4 -0
- package/types/renderer/renderElement.d.ts +12 -1
- package/types/scene/comparisons.d.ts +1 -1
- package/types/scene/index.d.ts +1 -1
- package/types/scene/zoom.d.ts +12 -5
- package/types/shapes.d.ts +1 -1
- package/types/types.d.ts +32 -7
- package/types/utils.d.ts +19 -0
- package/dist/excalidraw-assets/Cascadia.woff2 +0 -0
- package/dist/excalidraw-assets/Virgil.woff2 +0 -0
- package/dist/excalidraw-assets/i18n-ar-SA-json-6fcb7979cd290e0e51d9.js +0 -1
- package/dist/excalidraw-assets/i18n-bg-BG-json-eb8b237a2970da7034ad.js +0 -1
- package/dist/excalidraw-assets/i18n-bn-BD-json-87d5cd14de43ad6ec162.js +0 -1
- package/dist/excalidraw-assets/i18n-ca-ES-json-93b7462bd1d0fe76d2b5.js +0 -1
- package/dist/excalidraw-assets/i18n-cs-CZ-json-1244df10086a058f2d41.js +0 -1
- package/dist/excalidraw-assets/i18n-da-DK-json-85af69d03d5a188d4d3e.js +0 -1
- package/dist/excalidraw-assets/i18n-de-DE-json-e676479528793fb9755f.js +0 -1
- package/dist/excalidraw-assets/i18n-el-GR-json-cef06f766f46d7ab798a.js +0 -1
- package/dist/excalidraw-assets/i18n-es-ES-json-2996f978aa8d44a1bc72.js +0 -1
- package/dist/excalidraw-assets/i18n-fa-IR-json-84150b1f61e3d7a0afcf.js +0 -1
- package/dist/excalidraw-assets/i18n-fi-FI-json-bb5e3af1d7bb005f0c7d.js +0 -1
- package/dist/excalidraw-assets/i18n-fr-FR-json-f470b9806c21d127df35.js +0 -1
- package/dist/excalidraw-assets/i18n-he-IL-json-dfc95883bf533087b673.js +0 -1
- package/dist/excalidraw-assets/i18n-hi-IN-json-07d3a348a9723eeb51a3.js +0 -1
- package/dist/excalidraw-assets/i18n-hu-HU-json-dbaf9c47430503d4a710.js +0 -1
- package/dist/excalidraw-assets/i18n-id-ID-json-43b313d6c7c52122220b.js +0 -1
- package/dist/excalidraw-assets/i18n-it-IT-json-1cd7244d3b42597e1555.js +0 -1
- package/dist/excalidraw-assets/i18n-ja-JP-json-c6208f4ec6ec8d61df2f.js +0 -1
- package/dist/excalidraw-assets/i18n-kab-KAB-json-7aaa4a5ea8484b941af2.js +0 -1
- package/dist/excalidraw-assets/i18n-kk-KZ-json-654dee98c29976300a26.js +0 -1
- package/dist/excalidraw-assets/i18n-ko-KR-json-fc3ee48a144b19bcca0d.js +0 -1
- package/dist/excalidraw-assets/i18n-lv-LV-json-bfb22930b5a31d1f92ee.js +0 -1
- package/dist/excalidraw-assets/i18n-my-MM-json-6d186d192f0024208fe2.js +0 -1
- package/dist/excalidraw-assets/i18n-nb-NO-json-a8b16b7360f5df195438.js +0 -1
- package/dist/excalidraw-assets/i18n-nl-NL-json-be44386cc68047e2da24.js +0 -1
- package/dist/excalidraw-assets/i18n-nn-NO-json-074a3f14a8e56d66eeb7.js +0 -1
- package/dist/excalidraw-assets/i18n-oc-FR-json-ad1cdc3ba675116187a4.js +0 -1
- package/dist/excalidraw-assets/i18n-pa-IN-json-319132bcecbfaf90ef79.js +0 -1
- package/dist/excalidraw-assets/i18n-pl-PL-json-2df7909ca92201d653d7.js +0 -1
- package/dist/excalidraw-assets/i18n-pt-BR-json-ad09ed1c16a3d2b6d4b8.js +0 -1
- package/dist/excalidraw-assets/i18n-pt-PT-json-73605e7eed8d224609aa.js +0 -1
- package/dist/excalidraw-assets/i18n-ro-RO-json-b48f7b508a0884880f63.js +0 -1
- package/dist/excalidraw-assets/i18n-ru-RU-json-cd5378c60549c20232c7.js +0 -1
- package/dist/excalidraw-assets/i18n-si-LK-json-c5e207625d8f7a06eb15.js +0 -1
- package/dist/excalidraw-assets/i18n-sk-SK-json-0261a2d60b0803cc8354.js +0 -1
- package/dist/excalidraw-assets/i18n-sv-SE-json-4b274bae10479b585716.js +0 -1
- package/dist/excalidraw-assets/i18n-ta-IN-json-f20bc85c68e334566d53.js +0 -1
- package/dist/excalidraw-assets/i18n-tr-TR-json-17f1500f11b6e08b677b.js +0 -1
- package/dist/excalidraw-assets/i18n-uk-UA-json-4798e5a14cecdddbfb50.js +0 -1
- package/dist/excalidraw-assets/i18n-zh-CN-json-a13fbd80677ff3f0122c.js +0 -1
- package/dist/excalidraw-assets/i18n-zh-HK-json-f82802143c7042511410.js +0 -1
- package/dist/excalidraw-assets/i18n-zh-TW-json-79c634b00f4602a2d9a6.js +0 -1
- package/dist/excalidraw-assets/image-87e58979d258cd38208c.js +0 -1
- package/dist/excalidraw-assets/vendor-8698157b56eb5e0ee549.js +0 -2
- package/dist/excalidraw-assets/vendor-8698157b56eb5e0ee549.js.LICENSE.txt +0 -12
- package/dist/excalidraw-assets-dev/Cascadia.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Virgil.woff2 +0 -0
- package/dist/excalidraw-assets-dev/i18n-ar-SA-json-6681743eb68e3b3041cb.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-bg-BG-json-c907a37ea9ff74c38200.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-bn-BD-json-b02ff15ce32c21861fb1.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-ca-ES-json-f9ecdae168e193e1819d.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-cs-CZ-json-b0c7af8af120bd1ba4ac.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-da-DK-json-bdae60049eb02dee741f.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-de-DE-json-0314c69da1a79cb476ef.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-el-GR-json-db678ec2c7b5ee5b6197.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-es-ES-json-f960cfc72c2bce33bcd9.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-fa-IR-json-3091ac88e5a7ad285607.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-fi-FI-json-b3a67612e607442c8940.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-fr-FR-json-628bf75e5684419e4522.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-he-IL-json-9fa5f88c445c6edfb81d.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-hi-IN-json-a398aa828f8d1bd25761.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-hu-HU-json-8fb512cf21c00656b011.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-id-ID-json-d18bde26a8a7165a4c7b.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-it-IT-json-612f895e69a992314230.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-ja-JP-json-8fb6a4429e8c4a09e6a0.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-kab-KAB-json-01a8363dae577ccfd06c.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-kk-KZ-json-d0fff58ffff7c34c30a2.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-ko-KR-json-d24a9b7640741fe02d9a.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-lv-LV-json-d9b01c32504b031e4160.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-my-MM-json-98a11afd5a8088489b91.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-nb-NO-json-de73a55ddde48cdff43c.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-nl-NL-json-88ff95be82b97ffcc7f1.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-nn-NO-json-8f60e0ec70a2e17ad33c.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-oc-FR-json-6a0ee550cb6fb3f1b259.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-pa-IN-json-9bde99f7eb773f876f85.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-pl-PL-json-bb2ca88481a524fc7a5f.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-pt-BR-json-b40463ff0ba1a0307563.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-pt-PT-json-cb72d009cf6ba3b55e0c.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-ro-RO-json-b516bae00ed365b97098.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-ru-RU-json-328be001476f936e0f00.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-si-LK-json-4be44d4d292b6dbf260e.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-sk-SK-json-2c5b8dc8f0812e1152f1.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-sv-SE-json-d96e772ca45119bbb532.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-ta-IN-json-9ba773bdb3a546e68ec3.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-tr-TR-json-d0b9b5ae9d184cffc8a2.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-uk-UA-json-deae797b510faf78ab8e.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-zh-CN-json-f972d84c7b7156249d21.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-zh-HK-json-239376fabfdff19a7ebd.js +0 -22
- package/dist/excalidraw-assets-dev/i18n-zh-TW-json-7ea4288fed6cce43f00c.js +0 -22
- package/dist/excalidraw-assets-dev/image-e50a452aa26d28419e39.js +0 -42
- package/dist/excalidraw-assets-dev/vendor-1bc8ceaafd8623c96dd4.js +0 -278
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { ActionName } from "./types";
|
|
2
|
+
export declare type ShortcutName = SubtypeOf<ActionName, "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink">;
|
|
2
3
|
export declare const getShortcutFromShortcutName: (name: ShortcutName) => string;
|
package/types/actions/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare type ActionResult = {
|
|
|
14
14
|
declare type ActionFn = (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export declare type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export declare type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme";
|
|
17
|
+
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink";
|
|
18
18
|
export declare type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -31,9 +31,10 @@ export interface Action {
|
|
|
31
31
|
perform: ActionFn;
|
|
32
32
|
keyPriority?: number;
|
|
33
33
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
34
|
-
contextItemLabel?: string;
|
|
34
|
+
contextItemLabel?: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => string);
|
|
35
35
|
contextItemPredicate?: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
36
36
|
checked?: (appState: Readonly<AppState>) => boolean;
|
|
37
|
+
trackEvent?: boolean | ((action: Action, type: "ui" | "keyboard" | "api", value: any) => void);
|
|
37
38
|
}
|
|
38
39
|
export interface ActionsManagerInterface {
|
|
39
40
|
actions: Record<ActionName, Action>;
|
package/types/align.d.ts
CHANGED
package/types/analytics.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const trackEvent: (category: string,
|
|
1
|
+
export declare const trackEvent: (category: string, action: string, label?: string | undefined, value?: number | undefined) => void;
|
package/types/appState.d.ts
CHANGED
|
@@ -6,10 +6,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
6
6
|
viewBackgroundColor?: string | undefined;
|
|
7
7
|
zoom?: Readonly<{
|
|
8
8
|
value: NormalizedZoomValue;
|
|
9
|
-
translation: Readonly<{
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
}>;
|
|
13
9
|
}> | undefined;
|
|
14
10
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
15
11
|
theme?: string | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
|
-
import { ExcalidrawElement } from "../element/types";
|
|
4
|
+
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../element/types";
|
|
5
5
|
import History from "../history";
|
|
6
6
|
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData } from "../types";
|
|
7
|
+
export declare let showFourthFont: boolean;
|
|
7
8
|
export declare const useIsMobile: () => boolean;
|
|
8
9
|
export declare const useExcalidrawContainer: () => {
|
|
9
10
|
container: HTMLDivElement | null;
|
|
@@ -28,12 +29,16 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
28
29
|
private excalidrawContainerValue;
|
|
29
30
|
files: BinaryFiles;
|
|
30
31
|
imageCache: AppClassProperties["imageCache"];
|
|
32
|
+
hitLinkElement?: NonDeletedExcalidrawElement;
|
|
33
|
+
lastPointerDown: React.PointerEvent<HTMLCanvasElement> | null;
|
|
34
|
+
lastPointerUp: React.PointerEvent<HTMLElement> | PointerEvent | null;
|
|
35
|
+
contextMenuOpen: boolean;
|
|
31
36
|
constructor(props: AppProps);
|
|
32
37
|
private renderCanvas;
|
|
33
38
|
render(): JSX.Element;
|
|
34
39
|
focusContainer: AppClassProperties["focusContainer"];
|
|
35
40
|
getSceneElementsIncludingDeleted: () => readonly ExcalidrawElement[];
|
|
36
|
-
getSceneElements: () => readonly
|
|
41
|
+
getSceneElements: () => readonly NonDeletedExcalidrawElement[];
|
|
37
42
|
private syncActionResult;
|
|
38
43
|
private onBlur;
|
|
39
44
|
private onUnload;
|
|
@@ -67,19 +72,29 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
67
72
|
setAppState: (obj: any) => void;
|
|
68
73
|
removePointer: (event: React.PointerEvent<HTMLElement> | PointerEvent) => void;
|
|
69
74
|
toggleLock: () => void;
|
|
75
|
+
togglePenMode: () => void;
|
|
70
76
|
toggleZenMode: () => void;
|
|
71
77
|
toggleStats: () => void;
|
|
72
78
|
scrollToContent: (target?: ExcalidrawElement | readonly ExcalidrawElement[]) => void;
|
|
79
|
+
zoomToFit: (target?: readonly ExcalidrawElement[], maxZoom?: number, margin?: number) => void;
|
|
80
|
+
updateContainerSize: (containers: NonDeletedExcalidrawElement[]) => void;
|
|
73
81
|
clearToast: () => void;
|
|
74
82
|
setToastMessage: (toastMessage: string) => void;
|
|
75
83
|
restoreFileFromShare: () => Promise<void>;
|
|
76
84
|
/** adds supplied files to existing files in the appState */
|
|
77
85
|
addFiles: ExcalidrawImperativeAPI["addFiles"];
|
|
86
|
+
setLocalFont: ExcalidrawImperativeAPI["setLocalFont"];
|
|
87
|
+
selectElements: ExcalidrawImperativeAPI["selectElements"];
|
|
88
|
+
bringToFront: ExcalidrawImperativeAPI["bringToFront"];
|
|
89
|
+
bringForward: ExcalidrawImperativeAPI["bringForward"];
|
|
90
|
+
sendToBack: ExcalidrawImperativeAPI["sendToBack"];
|
|
91
|
+
sendBackward: ExcalidrawImperativeAPI["sendBackward"];
|
|
78
92
|
updateScene: <K extends keyof AppState>(sceneData: {
|
|
79
93
|
elements?: SceneData["elements"];
|
|
80
94
|
appState?: Pick<AppState, K> | null | undefined;
|
|
81
95
|
collaborators?: SceneData["collaborators"];
|
|
82
96
|
commitToHistory?: SceneData["commitToHistory"];
|
|
97
|
+
libraryItems?: SceneData["libraryItems"];
|
|
83
98
|
}) => void;
|
|
84
99
|
private onSceneUpdated;
|
|
85
100
|
private updateCurrentCursorPosition;
|
|
@@ -96,10 +111,14 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
96
111
|
private getElementsAtPosition;
|
|
97
112
|
private startTextEditing;
|
|
98
113
|
private handleCanvasDoubleClick;
|
|
114
|
+
private getElementLinkAtPosition;
|
|
115
|
+
private redirectToLink;
|
|
99
116
|
private handleCanvasPointerMove;
|
|
100
117
|
private handleTouchMove;
|
|
101
118
|
private handleCanvasPointerDown;
|
|
119
|
+
private handleCanvasPointerUp;
|
|
102
120
|
private maybeOpenContextMenuAfterPointerDownOnTouchDevices;
|
|
121
|
+
private resetContextMenuTimer;
|
|
103
122
|
private maybeCleanupAfterMissingPointerUp;
|
|
104
123
|
private handleCanvasPanUsingWheelOrSpaceDrag;
|
|
105
124
|
private updateGestureOnPointerDown;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./ColorPicker.scss";
|
|
3
|
-
export declare const ColorPicker: ({ type, color, onChange, label, isActive, setActive, }: {
|
|
3
|
+
export declare const ColorPicker: ({ type, color, onChange, label, isActive, setActive, colorPalette, }: {
|
|
4
4
|
type: "canvasBackground" | "elementBackground" | "elementStroke";
|
|
5
5
|
color: string | null;
|
|
6
6
|
onChange: (color: string) => void;
|
|
7
7
|
label: string;
|
|
8
8
|
isActive: boolean;
|
|
9
9
|
setActive: (active: boolean) => void;
|
|
10
|
+
colorPalette: {
|
|
11
|
+
canvasBackground?: string[];
|
|
12
|
+
elementBackground?: string[];
|
|
13
|
+
elementStroke?: string[];
|
|
14
|
+
};
|
|
10
15
|
}) => JSX.Element;
|
|
@@ -2,6 +2,7 @@ import "./ContextMenu.scss";
|
|
|
2
2
|
import { Action } from "../actions/types";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
4
|
import { AppState } from "../types";
|
|
5
|
+
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
5
6
|
export declare type ContextMenuOption = "separator" | Action;
|
|
6
7
|
declare type ContextMenuProps = {
|
|
7
8
|
options: ContextMenuOption[];
|
|
@@ -10,6 +11,7 @@ declare type ContextMenuProps = {
|
|
|
10
11
|
left: number;
|
|
11
12
|
actionManager: ActionManager;
|
|
12
13
|
appState: Readonly<AppState>;
|
|
14
|
+
elements: readonly NonDeletedExcalidrawElement[];
|
|
13
15
|
};
|
|
14
16
|
declare type ContextMenuParams = {
|
|
15
17
|
options: (ContextMenuOption | false | null | undefined)[];
|
|
@@ -18,6 +20,7 @@ declare type ContextMenuParams = {
|
|
|
18
20
|
actionManager: ContextMenuProps["actionManager"];
|
|
19
21
|
appState: Readonly<AppState>;
|
|
20
22
|
container: HTMLElement;
|
|
23
|
+
elements: readonly NonDeletedExcalidrawElement[];
|
|
21
24
|
};
|
|
22
25
|
declare const _default: {
|
|
23
26
|
push(params: ContextMenuParams): void;
|
|
@@ -15,6 +15,7 @@ interface LayerUIProps {
|
|
|
15
15
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
16
16
|
onCollabButtonClick?: () => void;
|
|
17
17
|
onLockToggle: () => void;
|
|
18
|
+
onPenModeToggle: () => void;
|
|
18
19
|
onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
|
|
19
20
|
zenModeEnabled: boolean;
|
|
20
21
|
showExitZenModeBtn: boolean;
|
|
@@ -34,5 +35,5 @@ interface LayerUIProps {
|
|
|
34
35
|
insertOnCanvasDirectly: boolean;
|
|
35
36
|
}) => void;
|
|
36
37
|
}
|
|
37
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, canvas, elements, onCollabButtonClick, onLockToggle, onInsertElements, zenModeEnabled, showExitZenModeBtn, showThemeBtn, toggleZenMode, isCollaborating, renderTopRightUI, renderCustomFooter, viewModeEnabled, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, }: LayerUIProps) => JSX.Element>;
|
|
38
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, canvas, elements, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, zenModeEnabled, showExitZenModeBtn, showThemeBtn, toggleZenMode, isCollaborating, renderTopRightUI, renderCustomFooter, viewModeEnabled, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, }: LayerUIProps) => JSX.Element>;
|
|
38
39
|
export default _default;
|
|
@@ -12,6 +12,7 @@ declare type MobileMenuProps = {
|
|
|
12
12
|
libraryMenu: JSX.Element | null;
|
|
13
13
|
onCollabButtonClick?: () => void;
|
|
14
14
|
onLockToggle: () => void;
|
|
15
|
+
onPenModeToggle: () => void;
|
|
15
16
|
canvas: HTMLCanvasElement | null;
|
|
16
17
|
isCollaborating: boolean;
|
|
17
18
|
renderCustomFooter?: (isMobile: boolean, appState: AppState) => JSX.Element;
|
|
@@ -22,5 +23,5 @@ declare type MobileMenuProps = {
|
|
|
22
23
|
}) => void;
|
|
23
24
|
renderTopRightUI?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
24
25
|
};
|
|
25
|
-
export declare const MobileMenu: ({ appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, canvas, isCollaborating, renderCustomFooter, viewModeEnabled, showThemeBtn, onImageAction, renderTopRightUI, }: MobileMenuProps) => JSX.Element;
|
|
26
|
+
export declare const MobileMenu: ({ appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, viewModeEnabled, showThemeBtn, onImageAction, renderTopRightUI, }: MobileMenuProps) => JSX.Element;
|
|
26
27
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./ToolIcon.scss";
|
|
3
|
+
declare type PenModeIconProps = {
|
|
4
|
+
title?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
onChange?(): void;
|
|
8
|
+
zenModeEnabled?: boolean;
|
|
9
|
+
isMobile?: boolean;
|
|
10
|
+
penDetected: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const PenModeButton: (props: PenModeIconProps) => JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -6,6 +6,10 @@ declare type Props = {
|
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
onCloseRequest?(event: PointerEvent): void;
|
|
8
8
|
fitInViewport?: boolean;
|
|
9
|
+
offsetLeft?: number;
|
|
10
|
+
offsetTop?: number;
|
|
11
|
+
viewportWidth?: number;
|
|
12
|
+
viewportHeight?: number;
|
|
9
13
|
};
|
|
10
|
-
export declare const Popover: ({ children, left, top, onCloseRequest, fitInViewport, }: Props) => JSX.Element;
|
|
14
|
+
export declare const Popover: ({ children, left, top, onCloseRequest, fitInViewport, offsetLeft, offsetTop, viewportWidth, viewportHeight, }: Props) => JSX.Element;
|
|
11
15
|
export {};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import "./Tooltip.scss";
|
|
2
2
|
import React from "react";
|
|
3
|
+
export declare const getTooltipDiv: () => HTMLDivElement;
|
|
4
|
+
export declare const updateTooltipPosition: (tooltip: HTMLDivElement, item: {
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}, position?: "bottom" | "top") => void;
|
|
3
10
|
declare type TooltipProps = {
|
|
4
11
|
children: React.ReactNode;
|
|
5
12
|
label: string;
|
|
@@ -149,6 +149,9 @@ export declare const FontSizeExtraLargeIcon: React.MemoExoticComponent<({ theme
|
|
|
149
149
|
export declare const FontFamilyHandDrawnIcon: React.MemoExoticComponent<({ theme }: {
|
|
150
150
|
theme: Theme;
|
|
151
151
|
}) => JSX.Element>;
|
|
152
|
+
export declare const FontFamilyLocalFontIcon: React.MemoExoticComponent<({ theme }: {
|
|
153
|
+
theme: Theme;
|
|
154
|
+
}) => JSX.Element>;
|
|
152
155
|
export declare const FontFamilyNormalIcon: React.MemoExoticComponent<({ theme }: {
|
|
153
156
|
theme: Theme;
|
|
154
157
|
}) => JSX.Element>;
|
|
@@ -165,4 +168,5 @@ export declare const TextAlignRightIcon: React.MemoExoticComponent<({ theme }: {
|
|
|
165
168
|
theme: Theme;
|
|
166
169
|
}) => JSX.Element>;
|
|
167
170
|
export declare const publishIcon: JSX.Element;
|
|
171
|
+
export declare const editIcon: JSX.Element;
|
|
168
172
|
export {};
|
package/types/constants.d.ts
CHANGED
|
@@ -17,10 +17,10 @@ export declare const CURSOR_TYPE: {
|
|
|
17
17
|
AUTO: string;
|
|
18
18
|
};
|
|
19
19
|
export declare const POINTER_BUTTON: {
|
|
20
|
-
MAIN:
|
|
21
|
-
WHEEL:
|
|
22
|
-
SECONDARY:
|
|
23
|
-
TOUCH:
|
|
20
|
+
readonly MAIN: 0;
|
|
21
|
+
readonly WHEEL: 1;
|
|
22
|
+
readonly SECONDARY: 2;
|
|
23
|
+
readonly TOUCH: -1;
|
|
24
24
|
};
|
|
25
25
|
export declare enum EVENT {
|
|
26
26
|
COPY = "copy",
|
|
@@ -47,7 +47,8 @@ export declare enum EVENT {
|
|
|
47
47
|
TOUCH_END = "touchend",
|
|
48
48
|
HASHCHANGE = "hashchange",
|
|
49
49
|
VISIBILITY_CHANGE = "visibilitychange",
|
|
50
|
-
SCROLL = "scroll"
|
|
50
|
+
SCROLL = "scroll",
|
|
51
|
+
EXCALIDRAW_LINK = "excalidraw-link"
|
|
51
52
|
}
|
|
52
53
|
export declare const ENV: {
|
|
53
54
|
TEST: string;
|
|
@@ -60,6 +61,7 @@ export declare const FONT_FAMILY: {
|
|
|
60
61
|
Virgil: number;
|
|
61
62
|
Helvetica: number;
|
|
62
63
|
Cascadia: number;
|
|
64
|
+
LocalFont: number;
|
|
63
65
|
};
|
|
64
66
|
export declare const THEME: {
|
|
65
67
|
LIGHT: string;
|
|
@@ -89,9 +91,6 @@ export declare const EXPORT_DATA_TYPES: {
|
|
|
89
91
|
readonly excalidrawLibrary: "excalidrawlib";
|
|
90
92
|
};
|
|
91
93
|
export declare const EXPORT_SOURCE: string;
|
|
92
|
-
export declare const STORAGE_KEYS: {
|
|
93
|
-
readonly LOCAL_STORAGE_LIBRARY: "excalidraw-library";
|
|
94
|
-
};
|
|
95
94
|
export declare const IMAGE_RENDER_TIMEOUT = 500;
|
|
96
95
|
export declare const TAP_TWICE_TIMEOUT = 300;
|
|
97
96
|
export declare const TOUCH_CTX_MENU_TIMEOUT = 500;
|
|
@@ -100,6 +99,7 @@ export declare const TOAST_TIMEOUT = 5000;
|
|
|
100
99
|
export declare const VERSION_TIMEOUT = 30000;
|
|
101
100
|
export declare const SCROLL_TIMEOUT = 100;
|
|
102
101
|
export declare const ZOOM_STEP = 0.1;
|
|
102
|
+
export declare const HYPERLINK_TOOLTIP_DELAY = 300;
|
|
103
103
|
export declare const IDLE_THRESHOLD = 60000;
|
|
104
104
|
export declare const ACTIVE_THRESHOLD = 3000;
|
|
105
105
|
export declare const MODES: {
|
|
@@ -130,4 +130,4 @@ export declare const VERSIONS: {
|
|
|
130
130
|
readonly excalidraw: 2;
|
|
131
131
|
readonly excalidrawLibrary: 2;
|
|
132
132
|
};
|
|
133
|
-
export declare const
|
|
133
|
+
export declare const BOUND_TEXT_PADDING = 5;
|
package/types/disitrubte.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export interface Distribution {
|
|
|
4
4
|
axis: "x" | "y";
|
|
5
5
|
}
|
|
6
6
|
export declare const distributeElements: (selectedElements: ExcalidrawElement[], distribution: Distribution) => ExcalidrawElement[];
|
|
7
|
-
export declare const getMaximumGroups: (elements: ExcalidrawElement[]) => ExcalidrawElement[][];
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AppState, ExcalidrawProps } from "../types";
|
|
3
|
+
import { NonDeletedExcalidrawElement } from "./types";
|
|
4
|
+
import { Bounds } from "./bounds";
|
|
5
|
+
import "./Hyperlink.scss";
|
|
6
|
+
export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
|
|
7
|
+
export declare const Hyperlink: ({ element, appState, setAppState, onLinkOpen, }: {
|
|
8
|
+
element: NonDeletedExcalidrawElement;
|
|
9
|
+
appState: AppState;
|
|
10
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
11
|
+
onLinkOpen: ExcalidrawProps["onLinkOpen"];
|
|
12
|
+
}) => JSX.Element | null;
|
|
13
|
+
export declare const normalizeLink: (link: string) => string;
|
|
14
|
+
export declare const isLocalLink: (link: string | null) => boolean;
|
|
15
|
+
export declare const actionLink: {
|
|
16
|
+
name: "hyperlink";
|
|
17
|
+
perform: (elements: readonly import("./types").ExcalidrawElement[], appState: Readonly<AppState>) => false | {
|
|
18
|
+
elements: readonly import("./types").ExcalidrawElement[];
|
|
19
|
+
appState: {
|
|
20
|
+
showHyperlinkPopup: "editor";
|
|
21
|
+
openMenu: null;
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
errorMessage: string | null;
|
|
24
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
25
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
26
|
+
multiElement: import("./types").NonDeleted<import("./types").ExcalidrawLinearElement> | null;
|
|
27
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
28
|
+
isBindingEnabled: boolean;
|
|
29
|
+
startBoundElement: import("./types").NonDeleted<import("./types").ExcalidrawBindableElement> | null;
|
|
30
|
+
suggestedBindings: import("./binding").SuggestedBinding[];
|
|
31
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
32
|
+
editingLinearElement: import("./linearElementEditor").LinearElementEditor | null;
|
|
33
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
34
|
+
elementLocked: boolean;
|
|
35
|
+
penMode: boolean;
|
|
36
|
+
penDetected: boolean;
|
|
37
|
+
exportBackground: boolean;
|
|
38
|
+
exportEmbedScene: boolean;
|
|
39
|
+
exportWithDarkMode: boolean;
|
|
40
|
+
exportScale: number;
|
|
41
|
+
currentItemStrokeColor: string;
|
|
42
|
+
currentItemBackgroundColor: string;
|
|
43
|
+
currentItemFillStyle: import("./types").FillStyle;
|
|
44
|
+
currentItemStrokeWidth: number;
|
|
45
|
+
currentItemStrokeStyle: import("./types").StrokeStyle;
|
|
46
|
+
currentItemRoughness: number;
|
|
47
|
+
currentItemOpacity: number;
|
|
48
|
+
currentItemFontFamily: number;
|
|
49
|
+
currentItemFontSize: number;
|
|
50
|
+
currentItemTextAlign: import("./types").TextAlign;
|
|
51
|
+
currentItemStrokeSharpness: import("./types").StrokeSharpness;
|
|
52
|
+
currentItemStartArrowhead: import("./types").Arrowhead | null;
|
|
53
|
+
currentItemEndArrowhead: import("./types").Arrowhead | null;
|
|
54
|
+
currentItemLinearStrokeSharpness: import("./types").StrokeSharpness;
|
|
55
|
+
viewBackgroundColor: string;
|
|
56
|
+
scrollX: number;
|
|
57
|
+
scrollY: number;
|
|
58
|
+
cursorButton: "up" | "down";
|
|
59
|
+
scrolledOutside: boolean;
|
|
60
|
+
name: string;
|
|
61
|
+
isResizing: boolean;
|
|
62
|
+
isRotating: boolean;
|
|
63
|
+
zoom: Readonly<{
|
|
64
|
+
value: import("../types").NormalizedZoomValue;
|
|
65
|
+
}>;
|
|
66
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
67
|
+
lastPointerDownWith: import("./types").PointerType;
|
|
68
|
+
selectedElementIds: {
|
|
69
|
+
[id: string]: boolean;
|
|
70
|
+
};
|
|
71
|
+
previousSelectedElementIds: {
|
|
72
|
+
[id: string]: boolean;
|
|
73
|
+
};
|
|
74
|
+
shouldCacheIgnoreZoom: boolean;
|
|
75
|
+
showHelpDialog: boolean;
|
|
76
|
+
toastMessage: string | null;
|
|
77
|
+
zenModeEnabled: boolean;
|
|
78
|
+
theme: string;
|
|
79
|
+
gridSize: number | null;
|
|
80
|
+
viewModeEnabled: boolean;
|
|
81
|
+
selectedGroupIds: {
|
|
82
|
+
[groupId: string]: boolean;
|
|
83
|
+
};
|
|
84
|
+
editingGroupId: string | null;
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
offsetTop: number;
|
|
88
|
+
offsetLeft: number;
|
|
89
|
+
isLibraryOpen: boolean;
|
|
90
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
91
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
92
|
+
showStats: boolean;
|
|
93
|
+
currentChartType: import("./types").ChartType;
|
|
94
|
+
pasteDialog: {
|
|
95
|
+
shown: false;
|
|
96
|
+
data: null;
|
|
97
|
+
} | {
|
|
98
|
+
shown: true;
|
|
99
|
+
data: import("../charts").Spreadsheet;
|
|
100
|
+
};
|
|
101
|
+
pendingImageElement: import("./types").NonDeleted<import("./types").ExcalidrawImageElement> | null;
|
|
102
|
+
linkOpacity: number;
|
|
103
|
+
trayModeEnabled: boolean;
|
|
104
|
+
colorPalette: {
|
|
105
|
+
canvasBackground?: string[] | undefined;
|
|
106
|
+
elementBackground?: string[] | undefined;
|
|
107
|
+
elementStroke?: string[] | undefined;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
commitToHistory: true;
|
|
111
|
+
};
|
|
112
|
+
trackEvent: (action: import("../actions/types").Action, source: "ui" | "keyboard" | "api") => void;
|
|
113
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
114
|
+
contextItemLabel: (elements: readonly import("./types").ExcalidrawElement[], appState: Readonly<AppState>) => "labels.link.edit" | "labels.link.create";
|
|
115
|
+
contextItemPredicate: (elements: readonly import("./types").ExcalidrawElement[], appState: AppState) => boolean;
|
|
116
|
+
PanelComponent: ({ elements, appState, updateData }: import("react").PropsWithChildren<import("../actions/types").PanelComponentProps>) => JSX.Element;
|
|
117
|
+
} & {
|
|
118
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
119
|
+
};
|
|
120
|
+
export declare const getContextMenuLabel: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => "labels.link.edit" | "labels.link.create";
|
|
121
|
+
export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: number, appState: AppState) => [x: number, y: number, width: number, height: number];
|
|
122
|
+
export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, appState: AppState, [x, y]: readonly [number, number], isMobile: boolean) => boolean;
|
|
123
|
+
export declare const showHyperlinkTooltip: (element: NonDeletedExcalidrawElement, appState: AppState) => void;
|
|
124
|
+
export declare const hideHyperlinkToolip: () => void;
|
|
125
|
+
export declare const shouldHideLinkPopup: (element: NonDeletedExcalidrawElement, appState: AppState, [clientX, clientY]: readonly [number, number]) => Boolean;
|
|
@@ -19,5 +19,9 @@ export interface Box {
|
|
|
19
19
|
minY: number;
|
|
20
20
|
maxX: number;
|
|
21
21
|
maxY: number;
|
|
22
|
+
midX: number;
|
|
23
|
+
midY: number;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
22
26
|
}
|
|
23
27
|
export declare const getCommonBoundingBox: (elements: ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => Box;
|
|
@@ -5,6 +5,7 @@ import { AppState } from "../types";
|
|
|
5
5
|
export declare const hitTest: (element: NonDeletedExcalidrawElement, appState: AppState, x: number, y: number) => boolean;
|
|
6
6
|
export declare const isHittingElementBoundingBoxWithoutHittingElement: (element: NonDeletedExcalidrawElement, appState: AppState, x: number, y: number) => boolean;
|
|
7
7
|
export declare const isHittingElementNotConsideringBoundingBox: (element: NonDeletedExcalidrawElement, appState: AppState, point: readonly [number, number]) => boolean;
|
|
8
|
+
export declare const isPointHittingElementBoundingBox: (element: NonDeleted<ExcalidrawElement>, [x, y]: readonly [number, number], threshold: number) => boolean;
|
|
8
9
|
export declare const bindingBorderTest: (element: NonDeleted<ExcalidrawBindableElement>, { x, y }: {
|
|
9
10
|
x: number;
|
|
10
11
|
y: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SHAPES } from "../shapes";
|
|
2
2
|
import { NonDeletedExcalidrawElement } from "./types";
|
|
3
|
-
import { PointerDownState } from "../types";
|
|
4
|
-
export declare const dragSelectedElements: (pointerDownState: PointerDownState, selectedElements: NonDeletedExcalidrawElement[], pointerX: number, pointerY: number, lockDirection
|
|
3
|
+
import { AppState, PointerDownState } from "../types";
|
|
4
|
+
export declare const dragSelectedElements: (pointerDownState: PointerDownState, selectedElements: NonDeletedExcalidrawElement[], pointerX: number, pointerY: number, lockDirection: boolean | undefined, distanceX: number | undefined, distanceY: number | undefined, appState: AppState) => void;
|
|
5
5
|
export declare const getDragOffsetXY: (selectedElements: NonDeletedExcalidrawElement[], x: number, y: number) => [number, number];
|
|
6
6
|
export declare const dragNewElement: (draggingElement: NonDeletedExcalidrawElement, elementType: typeof SHAPES[number]["value"], originX: number, originY: number, x: number, y: number, width: number, height: number, shouldMaintainAspectRatio: boolean, shouldResizeFromCenter: boolean, widthAspectRatio?: number | null | undefined) => void;
|
|
@@ -98,6 +98,8 @@ export declare class LinearElementEditor {
|
|
|
98
98
|
editingElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
99
99
|
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
100
100
|
elementLocked: boolean;
|
|
101
|
+
penMode: boolean;
|
|
102
|
+
penDetected: boolean;
|
|
101
103
|
exportBackground: boolean;
|
|
102
104
|
exportEmbedScene: boolean;
|
|
103
105
|
exportWithDarkMode: boolean;
|
|
@@ -126,10 +128,6 @@ export declare class LinearElementEditor {
|
|
|
126
128
|
isRotating: boolean;
|
|
127
129
|
zoom: Readonly<{
|
|
128
130
|
value: import("../types").NormalizedZoomValue;
|
|
129
|
-
translation: Readonly<{
|
|
130
|
-
x: number;
|
|
131
|
-
y: number;
|
|
132
|
-
}>;
|
|
133
131
|
}>;
|
|
134
132
|
openMenu: "canvas" | "shape" | null;
|
|
135
133
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
@@ -168,6 +166,14 @@ export declare class LinearElementEditor {
|
|
|
168
166
|
data: import("../charts").Spreadsheet;
|
|
169
167
|
};
|
|
170
168
|
pendingImageElement: NonDeleted<import("./types").ExcalidrawImageElement> | null;
|
|
169
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
170
|
+
linkOpacity: number;
|
|
171
|
+
trayModeEnabled: boolean;
|
|
172
|
+
colorPalette: {
|
|
173
|
+
canvasBackground?: string[] | undefined;
|
|
174
|
+
elementBackground?: string[] | undefined;
|
|
175
|
+
elementStroke?: string[] | undefined;
|
|
176
|
+
};
|
|
171
177
|
};
|
|
172
178
|
};
|
|
173
179
|
static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, pointIndices: readonly number[]): void;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement, ExcalidrawLinearElement, ExcalidrawGenericElement, NonDeleted, TextAlign, GroupId, VerticalAlign, Arrowhead, ExcalidrawFreeDrawElement, FontFamilyValues, ExcalidrawRectangleElement } from "../element/types";
|
|
2
2
|
import { AppState } from "../types";
|
|
3
|
-
declare type ElementConstructorOpts = MarkOptional<Omit<ExcalidrawGenericElement, "id" | "type" | "isDeleted" | "updated">, "width" | "height" | "angle" | "groupIds" | "boundElements" | "seed" | "version" | "versionNonce">;
|
|
3
|
+
declare type ElementConstructorOpts = MarkOptional<Omit<ExcalidrawGenericElement, "id" | "type" | "isDeleted" | "updated">, "width" | "height" | "angle" | "groupIds" | "boundElements" | "seed" | "version" | "versionNonce" | "link">;
|
|
4
4
|
export declare const newElement: (opts: {
|
|
5
5
|
type: ExcalidrawGenericElement["type"];
|
|
6
6
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawGenericElement>;
|
|
7
7
|
export declare const newTextElement: (opts: {
|
|
8
8
|
text: string;
|
|
9
|
+
rawText: string;
|
|
9
10
|
fontSize: number;
|
|
10
11
|
fontFamily: FontFamilyValues;
|
|
11
12
|
textAlign: TextAlign;
|
|
12
13
|
verticalAlign: VerticalAlign;
|
|
13
14
|
containerId?: ExcalidrawRectangleElement["id"];
|
|
14
15
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawTextElement>;
|
|
15
|
-
export declare const updateTextElement: (element: ExcalidrawTextElement, { text, isDeleted, originalText, }: {
|
|
16
|
+
export declare const updateTextElement: (element: ExcalidrawTextElement, { text, isDeleted, originalText, rawText, link, }: {
|
|
16
17
|
text: string;
|
|
17
18
|
isDeleted?: boolean | undefined;
|
|
18
19
|
originalText: string;
|
|
19
|
-
|
|
20
|
+
rawText?: string | undefined;
|
|
21
|
+
link?: string | undefined;
|
|
22
|
+
}) => ExcalidrawTextElement;
|
|
20
23
|
export declare const newFreeDrawElement: (opts: {
|
|
21
24
|
type: "freedraw";
|
|
22
25
|
points?: ExcalidrawFreeDrawElement["points"];
|
|
@@ -4,6 +4,6 @@ import { PointerDownState } from "../types";
|
|
|
4
4
|
export declare const normalizeAngle: (angle: number) => number;
|
|
5
5
|
export declare const transformElements: (pointerDownState: PointerDownState, transformHandleType: MaybeTransformHandleType, selectedElements: readonly NonDeletedExcalidrawElement[], resizeArrowDirection: "origin" | "end", shouldRotateWithDiscreteAngle: boolean, shouldResizeFromCenter: boolean, shouldMaintainAspectRatio: boolean, pointerX: number, pointerY: number, centerX: number, centerY: number) => boolean;
|
|
6
6
|
export declare const reshapeSingleTwoPointElement: (element: NonDeleted<ExcalidrawLinearElement>, resizeArrowDirection: "origin" | "end", shouldRotateWithDiscreteAngle: boolean, pointerX: number, pointerY: number) => void;
|
|
7
|
-
export declare const resizeSingleElement: (
|
|
7
|
+
export declare const resizeSingleElement: (originalElements: PointerDownState["originalElements"], shouldMaintainAspectRatio: boolean, element: NonDeletedExcalidrawElement, transformHandleDirection: TransformHandleDirection, shouldResizeFromCenter: boolean, pointerX: number, pointerY: number) => void;
|
|
8
8
|
export declare const getResizeOffsetXY: (transformHandleType: MaybeTransformHandleType, selectedElements: NonDeletedExcalidrawElement[], x: number, y: number) => [number, number];
|
|
9
9
|
export declare const getResizeArrowDirection: (transformHandleType: MaybeTransformHandleType, element: NonDeleted<ExcalidrawLinearElement>) => "origin" | "end";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ExcalidrawElement, ExcalidrawTextElement, FontString, NonDeletedExcalidrawElement } from "./types";
|
|
1
|
+
import { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, FontString, NonDeletedExcalidrawElement } from "./types";
|
|
2
2
|
import { MaybeTransformHandleType } from "./transformHandles";
|
|
3
|
-
|
|
3
|
+
import { AppState } from "../types";
|
|
4
|
+
export declare const redrawTextBoundingBox: (element: ExcalidrawTextElement, container: ExcalidrawElement | null, appState: AppState) => void;
|
|
4
5
|
export declare const bindTextToShapeAfterDuplication: (sceneElements: ExcalidrawElement[], oldElements: ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
|
|
5
|
-
export declare const handleBindTextResize: (
|
|
6
|
+
export declare const handleBindTextResize: (element: NonDeletedExcalidrawElement, transformHandleType: MaybeTransformHandleType) => void;
|
|
6
7
|
export declare const measureText: (text: string, font: FontString, maxWidth?: number | null | undefined) => {
|
|
7
8
|
width: number;
|
|
8
9
|
height: number;
|
|
@@ -12,12 +13,15 @@ export declare const getApproxLineHeight: (font: FontString) => number;
|
|
|
12
13
|
export declare const wrapText: (text: string, font: FontString, containerWidth: number) => string;
|
|
13
14
|
export declare const charWidth: {
|
|
14
15
|
calculate: (char: string, font: FontString) => number;
|
|
15
|
-
updateCache: (char: string, font: FontString) => void;
|
|
16
|
-
clearCacheforFont: (font: FontString) => void;
|
|
17
16
|
getCache: (font: FontString) => number[];
|
|
18
17
|
};
|
|
19
18
|
export declare const getApproxMinLineWidth: (font: FontString) => number;
|
|
20
19
|
export declare const getApproxMinLineHeight: (font: FontString) => number;
|
|
21
20
|
export declare const getMinCharWidth: (font: FontString) => number;
|
|
21
|
+
export declare const getMaxCharWidth: (font: FontString) => number;
|
|
22
22
|
export declare const getApproxCharsToFitInWidth: (font: FontString, width: number) => number;
|
|
23
23
|
export declare const getBoundTextElementId: (container: ExcalidrawElement | null) => string | undefined;
|
|
24
|
+
export declare const getBoundTextElement: (element: ExcalidrawElement | null) => ExcalidrawTextElementWithContainer | null;
|
|
25
|
+
export declare const getContainerElement: (element: (ExcalidrawElement & {
|
|
26
|
+
containerId: ExcalidrawElement["id"] | null;
|
|
27
|
+
}) | null) => ExcalidrawElement | null;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "./types";
|
|
2
|
-
import
|
|
3
|
-
export declare const textWysiwyg: ({ id,
|
|
1
|
+
import { ExcalidrawElement, ExcalidrawTextElement } from "./types";
|
|
2
|
+
import App from "../components/App";
|
|
3
|
+
export declare const textWysiwyg: ({ id, onChange, onSubmit, getViewportCoords, element, canvas, excalidrawContainer, app, }: {
|
|
4
4
|
id: ExcalidrawElement["id"];
|
|
5
|
-
appState: AppState;
|
|
6
5
|
onChange?: ((text: string) => void) | undefined;
|
|
7
6
|
onSubmit: (data: {
|
|
8
7
|
text: string;
|
|
@@ -10,7 +9,8 @@ export declare const textWysiwyg: ({ id, appState, onChange, onSubmit, getViewpo
|
|
|
10
9
|
originalText: string;
|
|
11
10
|
}) => void;
|
|
12
11
|
getViewportCoords: (x: number, y: number) => [number, number];
|
|
13
|
-
element:
|
|
12
|
+
element: ExcalidrawTextElement;
|
|
14
13
|
canvas: HTMLCanvasElement | null;
|
|
15
14
|
excalidrawContainer: HTMLDivElement | null;
|
|
15
|
+
app: App;
|
|
16
16
|
}) => void;
|