@dwelle/excalidraw 0.5.0-abd0a1f → 0.5.0-ae046ec

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.
Files changed (555) hide show
  1. package/CHANGELOG.md +201 -0
  2. package/README.md +111 -14
  3. package/dist/dev/chunk-LCV6WMJR.js +69 -0
  4. package/dist/dev/chunk-LCV6WMJR.js.map +7 -0
  5. package/dist/dev/{chunk-QXIM7HQU.js → chunk-PM32OSOR.js} +88 -5
  6. package/dist/dev/chunk-PM32OSOR.js.map +7 -0
  7. package/dist/dev/{chunk-H7AEBD3S.js → chunk-YKFFZU55.js} +7242 -4707
  8. package/dist/dev/chunk-YKFFZU55.js.map +7 -0
  9. package/dist/dev/{chunk-HLABF5RW.js → chunk-YT2G2JXZ.js} +2 -2
  10. package/dist/dev/components/TTDDialog/CodeMirrorEditor-3GQVBCH7.js +259 -0
  11. package/dist/dev/components/TTDDialog/CodeMirrorEditor-3GQVBCH7.js.map +7 -0
  12. package/dist/dev/data/{image-J6JG4BTI.js → image-HMDF2L4D.js} +3 -3
  13. package/dist/dev/index.css +1470 -704
  14. package/dist/dev/index.css.map +3 -3
  15. package/dist/dev/index.js +14824 -9135
  16. package/dist/dev/index.js.map +4 -4
  17. package/dist/dev/locales/{ar-SA-JK5MQ7TT.js → ar-SA-2YSRL2Y5.js} +81 -5
  18. package/dist/dev/locales/ar-SA-2YSRL2Y5.js.map +7 -0
  19. package/dist/dev/locales/{az-AZ-2PAD62G4.js → az-AZ-Y4BDU6NT.js} +79 -3
  20. package/dist/dev/locales/az-AZ-Y4BDU6NT.js.map +7 -0
  21. package/dist/dev/locales/{bg-BG-HUKVYCRK.js → bg-BG-VL3Z2EMR.js} +80 -4
  22. package/dist/dev/locales/bg-BG-VL3Z2EMR.js.map +7 -0
  23. package/dist/dev/locales/{bn-BD-V2CQI46P.js → bn-BD-4B2A67HP.js} +79 -3
  24. package/dist/dev/locales/bn-BD-4B2A67HP.js.map +7 -0
  25. package/dist/dev/locales/{bn-IN-MBEO4C3J.js → bn-IN-4LXCFZMW.js} +79 -3
  26. package/dist/dev/locales/bn-IN-4LXCFZMW.js.map +7 -0
  27. package/dist/dev/locales/{ca-ES-KWEKW4C3.js → ca-ES-M4YCZMII.js} +81 -5
  28. package/dist/dev/locales/ca-ES-M4YCZMII.js.map +7 -0
  29. package/dist/dev/locales/{cs-CZ-W5AHZB5H.js → cs-CZ-UFSXS6HC.js} +80 -4
  30. package/dist/dev/locales/cs-CZ-UFSXS6HC.js.map +7 -0
  31. package/dist/dev/locales/{da-DK-ITTM6YM4.js → da-DK-GITJMZWC.js} +79 -3
  32. package/dist/dev/locales/da-DK-GITJMZWC.js.map +7 -0
  33. package/dist/dev/locales/{de-CH-OAWPDQFJ.js → de-CH-AEAPIGWW.js} +87 -11
  34. package/dist/dev/locales/de-CH-AEAPIGWW.js.map +7 -0
  35. package/dist/dev/locales/{de-DE-ZRDYEPMS.js → de-DE-5ZLSO65Y.js} +81 -5
  36. package/dist/dev/locales/de-DE-5ZLSO65Y.js.map +7 -0
  37. package/dist/dev/locales/{el-GR-QXASZLPE.js → el-GR-GYPZT4GZ.js} +81 -5
  38. package/dist/dev/locales/el-GR-GYPZT4GZ.js.map +7 -0
  39. package/dist/dev/locales/{en-44H6FWTU.js → en-XFEPEVLS.js} +8 -2
  40. package/dist/dev/locales/{es-ES-VLQBB7FJ.js → es-ES-JFMAP7BU.js} +81 -5
  41. package/dist/dev/locales/es-ES-JFMAP7BU.js.map +7 -0
  42. package/dist/dev/locales/{eu-ES-TF2DGTZU.js → eu-ES-WNVIIFRL.js} +81 -5
  43. package/dist/dev/locales/eu-ES-WNVIIFRL.js.map +7 -0
  44. package/dist/dev/locales/{fa-IR-ITKFQ7QV.js → fa-IR-WYXLIZOT.js} +86 -10
  45. package/dist/dev/locales/fa-IR-WYXLIZOT.js.map +7 -0
  46. package/dist/dev/locales/{fi-FI-UWZRVXFI.js → fi-FI-54NSFYWG.js} +80 -4
  47. package/dist/dev/locales/fi-FI-54NSFYWG.js.map +7 -0
  48. package/dist/dev/locales/{fr-FR-A72LKGCO.js → fr-FR-D5OGMLN6.js} +81 -5
  49. package/dist/dev/locales/fr-FR-D5OGMLN6.js.map +7 -0
  50. package/dist/dev/locales/{gl-ES-2QCVIBFP.js → gl-ES-KHXPF3VA.js} +80 -4
  51. package/dist/dev/locales/gl-ES-KHXPF3VA.js.map +7 -0
  52. package/dist/dev/locales/{he-IL-WJNUHU26.js → he-IL-QSUPCRTQ.js} +81 -5
  53. package/dist/dev/locales/he-IL-QSUPCRTQ.js.map +7 -0
  54. package/dist/dev/locales/{hi-IN-XGMO235V.js → hi-IN-TY7QEP7S.js} +89 -13
  55. package/dist/dev/locales/hi-IN-TY7QEP7S.js.map +7 -0
  56. package/dist/dev/locales/{hu-HU-37FDQFIS.js → hu-HU-FHTE6N2G.js} +169 -93
  57. package/dist/dev/locales/hu-HU-FHTE6N2G.js.map +7 -0
  58. package/dist/dev/locales/{id-ID-EJIDCO4E.js → id-ID-4WWGEFMB.js} +81 -5
  59. package/dist/dev/locales/id-ID-4WWGEFMB.js.map +7 -0
  60. package/dist/dev/locales/{it-IT-X34PIOJ2.js → it-IT-P47ZQPB3.js} +81 -5
  61. package/dist/dev/locales/it-IT-P47ZQPB3.js.map +7 -0
  62. package/dist/dev/locales/{ja-JP-37FC23PR.js → ja-JP-URB5LBRT.js} +183 -107
  63. package/dist/dev/locales/ja-JP-URB5LBRT.js.map +7 -0
  64. package/dist/dev/locales/{kaa-7ZYDFVKA.js → kaa-FMANZGDI.js} +79 -3
  65. package/dist/dev/locales/kaa-FMANZGDI.js.map +7 -0
  66. package/dist/dev/locales/{kab-KAB-MILWXBA6.js → kab-KAB-LKRLZQXY.js} +80 -4
  67. package/dist/dev/locales/kab-KAB-LKRLZQXY.js.map +7 -0
  68. package/dist/dev/locales/{kk-KZ-7BWTPIAV.js → kk-KZ-3254S5T2.js} +79 -3
  69. package/dist/dev/locales/kk-KZ-3254S5T2.js.map +7 -0
  70. package/dist/dev/locales/{km-KH-BV4P2KSZ.js → km-KH-L5X6KSOP.js} +80 -4
  71. package/dist/dev/locales/km-KH-L5X6KSOP.js.map +7 -0
  72. package/dist/dev/locales/{ko-KR-TSXE5P7B.js → ko-KR-MFE6HC5B.js} +80 -4
  73. package/dist/dev/locales/ko-KR-MFE6HC5B.js.map +7 -0
  74. package/dist/dev/locales/{ku-TR-ASSXNN3U.js → ku-TR-QMA34F2F.js} +80 -4
  75. package/dist/dev/locales/ku-TR-QMA34F2F.js.map +7 -0
  76. package/dist/dev/locales/{lt-LT-G7RZYQQU.js → lt-LT-ZZ4ADZ7N.js} +79 -3
  77. package/dist/dev/locales/lt-LT-ZZ4ADZ7N.js.map +7 -0
  78. package/dist/dev/locales/{lv-LV-DXNPBJZU.js → lv-LV-BXTRSXJG.js} +80 -4
  79. package/dist/dev/locales/lv-LV-BXTRSXJG.js.map +7 -0
  80. package/dist/dev/locales/{mr-IN-7F2ZCTCF.js → mr-IN-57KQDHC2.js} +81 -5
  81. package/dist/dev/locales/mr-IN-57KQDHC2.js.map +7 -0
  82. package/dist/dev/locales/{my-MM-NBI3KQGW.js → my-MM-63XGVQB2.js} +79 -3
  83. package/dist/dev/locales/my-MM-63XGVQB2.js.map +7 -0
  84. package/dist/dev/locales/{nb-NO-4DCTQT6L.js → nb-NO-355CTFN2.js} +81 -5
  85. package/dist/dev/locales/nb-NO-355CTFN2.js.map +7 -0
  86. package/dist/dev/locales/{nl-NL-XGZJ7V2V.js → nl-NL-CYL7CDFO.js} +82 -6
  87. package/dist/dev/locales/nl-NL-CYL7CDFO.js.map +7 -0
  88. package/dist/dev/locales/{nn-NO-FR534JV5.js → nn-NO-XXWWVC6Z.js} +79 -3
  89. package/dist/dev/locales/nn-NO-XXWWVC6Z.js.map +7 -0
  90. package/dist/dev/locales/{oc-FR-YQCIKZIK.js → oc-FR-DRSDA2BN.js} +81 -5
  91. package/dist/dev/locales/oc-FR-DRSDA2BN.js.map +7 -0
  92. package/dist/dev/locales/{pa-IN-UM43JGD2.js → pa-IN-QDAURTVI.js} +80 -4
  93. package/dist/dev/locales/pa-IN-QDAURTVI.js.map +7 -0
  94. package/dist/dev/locales/{percentages-OGWD7R2K.js → percentages-QGLYMXSX.js} +2 -2
  95. package/dist/dev/locales/{pl-PL-2UGKA6HK.js → pl-PL-MVJZXY6Q.js} +81 -5
  96. package/dist/dev/locales/pl-PL-MVJZXY6Q.js.map +7 -0
  97. package/dist/dev/locales/{pt-BR-H23QFYE3.js → pt-BR-YJKF7STY.js} +99 -23
  98. package/dist/dev/locales/pt-BR-YJKF7STY.js.map +7 -0
  99. package/dist/dev/locales/{pt-PT-RHKJH5I5.js → pt-PT-VDTL5PFO.js} +81 -5
  100. package/dist/dev/locales/pt-PT-VDTL5PFO.js.map +7 -0
  101. package/dist/dev/locales/{ro-RO-IIFONL3T.js → ro-RO-UPPQBRED.js} +81 -5
  102. package/dist/dev/locales/ro-RO-UPPQBRED.js.map +7 -0
  103. package/dist/dev/locales/{ru-RU-QEP6D7GK.js → ru-RU-W4CHGSNY.js} +83 -7
  104. package/dist/dev/locales/ru-RU-W4CHGSNY.js.map +7 -0
  105. package/dist/dev/locales/{si-LK-LZYJQLHF.js → si-LK-YBM4EAKD.js} +81 -5
  106. package/dist/dev/locales/si-LK-YBM4EAKD.js.map +7 -0
  107. package/dist/dev/locales/{sk-SK-RWC6UWGY.js → sk-SK-7437AQRD.js} +81 -5
  108. package/dist/dev/locales/sk-SK-7437AQRD.js.map +7 -0
  109. package/dist/dev/locales/{sl-SI-QJT2CAUO.js → sl-SI-4HMLL4KH.js} +81 -5
  110. package/dist/dev/locales/sl-SI-4HMLL4KH.js.map +7 -0
  111. package/dist/dev/locales/{sv-SE-3MAT3NDX.js → sv-SE-ZOD3YMID.js} +81 -5
  112. package/dist/dev/locales/sv-SE-ZOD3YMID.js.map +7 -0
  113. package/dist/dev/locales/{ta-IN-J7XOYF2T.js → ta-IN-LS6WD24E.js} +79 -3
  114. package/dist/dev/locales/ta-IN-LS6WD24E.js.map +7 -0
  115. package/dist/dev/locales/{th-TH-2OI52EOQ.js → th-TH-LOAXQ4RD.js} +110 -34
  116. package/dist/dev/locales/th-TH-LOAXQ4RD.js.map +7 -0
  117. package/dist/dev/locales/{tr-TR-G7TAUHUI.js → tr-TR-CPR4DIZR.js} +102 -26
  118. package/dist/dev/locales/tr-TR-CPR4DIZR.js.map +7 -0
  119. package/dist/dev/locales/{uk-UA-IVSVBJIG.js → uk-UA-DVTOBJYO.js} +95 -19
  120. package/dist/dev/locales/uk-UA-DVTOBJYO.js.map +7 -0
  121. package/dist/dev/locales/{uz-UZ-KCVDUVDE.js → uz-UZ-DDPKFZAS.js} +79 -3
  122. package/dist/dev/locales/uz-UZ-DDPKFZAS.js.map +7 -0
  123. package/dist/dev/locales/{vi-VN-KBZAVWP5.js → vi-VN-EIMT27KG.js} +79 -3
  124. package/dist/dev/locales/vi-VN-EIMT27KG.js.map +7 -0
  125. package/dist/dev/locales/{zh-CN-IS26RG2D.js → zh-CN-2TSGH3JY.js} +81 -5
  126. package/dist/dev/locales/zh-CN-2TSGH3JY.js.map +7 -0
  127. package/dist/dev/locales/{zh-HK-KBWQ6SJC.js → zh-HK-FQYY5CF5.js} +79 -3
  128. package/dist/dev/locales/zh-HK-FQYY5CF5.js.map +7 -0
  129. package/dist/dev/locales/{zh-TW-JKJWJQ4J.js → zh-TW-7WFSJB6W.js} +128 -52
  130. package/dist/dev/locales/zh-TW-7WFSJB6W.js.map +7 -0
  131. package/dist/dev/subset-shared.chunk.js +1 -1
  132. package/dist/dev/subset-worker.chunk.js +1 -1
  133. package/dist/prod/chunk-CCYZTFWI.js +34 -0
  134. package/dist/prod/chunk-CJTDIR4C.js +1 -0
  135. package/dist/prod/{chunk-IMFBDYQ2.js → chunk-GKRZY6UX.js} +1 -1
  136. package/dist/prod/chunk-SRXBQMQ3.js +12 -0
  137. package/dist/prod/components/TTDDialog/CodeMirrorEditor-VCQRJXMS.js +1 -0
  138. package/dist/prod/data/image-K6LYZCHG.js +1 -0
  139. package/dist/prod/index.css +1 -1
  140. package/dist/prod/index.js +37 -32
  141. package/dist/prod/locales/ar-SA-YLAB6A27.js +8 -0
  142. package/dist/prod/locales/az-AZ-5JXPK2I2.js +1 -0
  143. package/dist/prod/locales/bg-BG-NIQ2RVNG.js +5 -0
  144. package/dist/prod/locales/bn-BD-BN65R3DE.js +3 -0
  145. package/dist/prod/locales/bn-IN-2YT4KVKB.js +3 -0
  146. package/dist/prod/locales/ca-ES-KSERGC3M.js +8 -0
  147. package/dist/prod/locales/cs-CZ-EOMS3IHD.js +7 -0
  148. package/dist/prod/locales/da-DK-AVL3DJQK.js +2 -0
  149. package/dist/prod/locales/de-CH-M25HCZK4.js +7 -0
  150. package/dist/prod/locales/de-DE-BEN6XGXY.js +7 -0
  151. package/dist/prod/locales/el-GR-UBGIF2NW.js +7 -0
  152. package/dist/prod/locales/en-5WHFLXFD.js +1 -0
  153. package/dist/prod/locales/es-ES-SQEM5MNY.js +7 -0
  154. package/dist/prod/locales/eu-ES-YG5N2JAG.js +7 -0
  155. package/dist/prod/locales/fa-IR-EVNM7MAJ.js +9 -0
  156. package/dist/prod/locales/fi-FI-MW7ZEZ64.js +6 -0
  157. package/dist/prod/locales/fr-FR-Q7ZPXBDE.js +12 -0
  158. package/dist/prod/locales/gl-ES-O5B74VQL.js +6 -0
  159. package/dist/prod/locales/he-IL-QGC2WXJA.js +8 -0
  160. package/dist/prod/locales/hi-IN-DEZ33NMQ.js +3 -0
  161. package/dist/prod/locales/hu-HU-2ZPNVYSC.js +3 -0
  162. package/dist/prod/locales/id-ID-W65WM5EO.js +8 -0
  163. package/dist/prod/locales/it-IT-GAWJM2XW.js +12 -0
  164. package/dist/prod/locales/ja-JP-FOAUPTH5.js +12 -0
  165. package/dist/prod/locales/kaa-UEDB54S7.js +1 -0
  166. package/dist/prod/locales/kab-KAB-CTLMBVE3.js +4 -0
  167. package/dist/prod/locales/kk-KZ-XZK63ADD.js +1 -0
  168. package/dist/prod/locales/km-KH-PBSJLZ2M.js +7 -0
  169. package/dist/prod/locales/ko-KR-YNTPN6WQ.js +5 -0
  170. package/dist/prod/locales/ku-TR-XUD5BUEU.js +6 -0
  171. package/dist/prod/locales/lt-LT-LYCDYH7O.js +3 -0
  172. package/dist/prod/locales/lv-LV-7ROPDEEI.js +4 -0
  173. package/dist/prod/locales/mr-IN-TU6BXRKP.js +9 -0
  174. package/dist/prod/locales/my-MM-SJ3RWIEQ.js +1 -0
  175. package/dist/prod/locales/nb-NO-GONF2AKR.js +8 -0
  176. package/dist/prod/locales/nl-NL-UZF6UEKB.js +13 -0
  177. package/dist/prod/locales/nn-NO-ZVFRXEEO.js +4 -0
  178. package/dist/prod/locales/oc-FR-MBF2Z56W.js +4 -0
  179. package/dist/prod/locales/pa-IN-3JCDVKKL.js +4 -0
  180. package/dist/prod/locales/percentages-WBIPKLEE.js +1 -0
  181. package/dist/prod/locales/pl-PL-EERMMCTN.js +12 -0
  182. package/dist/prod/locales/pt-BR-W4AF5QMX.js +6 -0
  183. package/dist/prod/locales/pt-PT-GNPUWAHX.js +8 -0
  184. package/dist/prod/locales/ro-RO-DXHP33S5.js +12 -0
  185. package/dist/prod/locales/ru-RU-TTW2P7NF.js +10 -0
  186. package/dist/prod/locales/si-LK-BE6O7LVF.js +1 -0
  187. package/dist/prod/locales/sk-SK-OI3KJLWQ.js +7 -0
  188. package/dist/prod/locales/sl-SI-HF74RBGV.js +6 -0
  189. package/dist/prod/locales/sv-SE-TXR2SQGA.js +8 -0
  190. package/dist/prod/locales/ta-IN-Y2DOZGBR.js +6 -0
  191. package/dist/prod/locales/th-TH-JUAISFQR.js +1 -0
  192. package/dist/prod/locales/tr-TR-U3HGKQXH.js +4 -0
  193. package/dist/prod/locales/uk-UA-FP2TKAFK.js +6 -0
  194. package/dist/prod/locales/uz-UZ-WY5QKWXJ.js +1 -0
  195. package/dist/prod/locales/vi-VN-DE5I4H6K.js +7 -0
  196. package/dist/prod/locales/zh-CN-VWHOHS7G.js +11 -0
  197. package/dist/prod/locales/zh-HK-KQF7FW7H.js +1 -0
  198. package/dist/prod/locales/zh-TW-6VHVWZKW.js +13 -0
  199. package/dist/prod/subset-shared.chunk.js +1 -1
  200. package/dist/prod/subset-worker.chunk.js +1 -1
  201. package/dist/types/common/debug.d.ts +21 -0
  202. package/dist/types/common/src/appEventBus.d.ts +27 -0
  203. package/dist/types/common/src/colors.d.ts +58 -42
  204. package/dist/types/common/src/constants.d.ts +13 -7
  205. package/dist/types/common/src/editorInterface.d.ts +2 -2
  206. package/dist/types/common/src/index.d.ts +3 -1
  207. package/dist/types/common/src/points.d.ts +1 -1
  208. package/dist/types/common/src/utils.d.ts +5 -51
  209. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  210. package/dist/types/element/src/Scene.d.ts +8 -4
  211. package/dist/types/element/src/align.d.ts +2 -2
  212. package/dist/types/element/src/arrowheads.d.ts +3 -0
  213. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  214. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  215. package/dist/types/element/src/binding.d.ts +21 -14
  216. package/dist/types/element/src/bounds.d.ts +23 -8
  217. package/dist/types/element/src/collision.d.ts +4 -3
  218. package/dist/types/element/src/comparisons.d.ts +1 -0
  219. package/dist/types/element/src/distribute.d.ts +3 -2
  220. package/dist/types/element/src/duplicate.d.ts +4 -3
  221. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  222. package/dist/types/element/src/embeddable.d.ts +2 -2
  223. package/dist/types/element/src/flowchart.d.ts +7 -7
  224. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  225. package/dist/types/element/src/frame.d.ts +9 -8
  226. package/dist/types/element/src/groups.d.ts +9 -9
  227. package/dist/types/element/src/index.d.ts +4 -1
  228. package/dist/types/element/src/linearElementEditor.d.ts +15 -10
  229. package/dist/types/element/src/mutateElement.d.ts +2 -0
  230. package/dist/types/element/src/newElement.d.ts +1 -0
  231. package/dist/types/element/src/renderElement.d.ts +0 -3
  232. package/dist/types/element/src/resizeElements.d.ts +2 -2
  233. package/dist/types/element/src/selection.d.ts +12 -8
  234. package/dist/types/element/src/shape.d.ts +1 -1
  235. package/dist/types/element/src/textElement.d.ts +8 -8
  236. package/dist/types/element/src/textWrapping.d.ts +26 -0
  237. package/dist/types/element/src/transform.d.ts +2 -2
  238. package/dist/types/element/src/typeChecks.d.ts +26 -25
  239. package/dist/types/element/src/types.d.ts +13 -3
  240. package/dist/types/element/src/utils.d.ts +6 -4
  241. package/dist/types/element/src/zindex.d.ts +2 -2
  242. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +56 -50
  243. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  244. package/dist/types/excalidraw/actions/actionBoundText.d.ts +39 -35
  245. package/dist/types/excalidraw/actions/actionCanvas.d.ts +295 -800
  246. package/dist/types/excalidraw/actions/actionClipboard.d.ts +38 -34
  247. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +19 -17
  248. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +61 -53
  249. package/dist/types/excalidraw/actions/actionDeselect.d.ts +161 -0
  250. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  251. package/dist/types/excalidraw/actions/actionElementLink.d.ts +15 -17
  252. package/dist/types/excalidraw/actions/actionElementLock.d.ts +39 -35
  253. package/dist/types/excalidraw/actions/actionExport.d.ts +134 -405
  254. package/dist/types/excalidraw/actions/actionFrame.d.ts +68 -234
  255. package/dist/types/excalidraw/actions/actionGroup.d.ts +54 -50
  256. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +24 -19
  257. package/dist/types/excalidraw/actions/actionLink.d.ts +20 -18
  258. package/dist/types/excalidraw/actions/actionMenu.d.ts +15 -17
  259. package/dist/types/excalidraw/actions/actionProperties.d.ts +63 -50
  260. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +24 -22
  261. package/dist/types/excalidraw/actions/actionStyles.d.ts +19 -16
  262. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  263. package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionToggleArrowBinding.d.ts} +34 -31
  264. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +23 -22
  265. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +174 -0
  266. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +20 -18
  267. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +19 -22
  268. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  269. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +20 -18
  270. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +21 -19
  271. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +20 -18
  272. package/dist/types/excalidraw/actions/index.d.ts +4 -2
  273. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  274. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  275. package/dist/types/excalidraw/actions/types.d.ts +8 -4
  276. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  277. package/dist/types/excalidraw/appState.d.ts +28 -24
  278. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  279. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  280. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  281. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  282. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  283. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  284. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  285. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  286. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  287. package/dist/types/excalidraw/components/Actions.d.ts +17 -12
  288. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  289. package/dist/types/excalidraw/components/App.cursor.d.ts +29 -0
  290. package/dist/types/excalidraw/components/App.d.ts +220 -78
  291. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  292. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  293. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  294. package/dist/types/excalidraw/components/Card.d.ts +1 -2
  295. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +0 -5
  296. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
  297. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  298. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  299. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  300. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  301. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  302. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  303. package/dist/types/excalidraw/components/FilledButton.d.ts +1 -0
  304. package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
  305. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  306. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  307. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  308. package/dist/types/excalidraw/components/LayerUI.d.ts +4 -3
  309. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  310. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  311. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  312. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -2
  313. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  314. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  315. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  316. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  317. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  318. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  319. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  320. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  321. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  322. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  323. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  324. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  325. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  326. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  327. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  328. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  329. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  330. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  331. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  332. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  333. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  334. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  335. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  336. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  337. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  338. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  339. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  340. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -28
  341. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  342. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -1
  343. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  344. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  345. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  346. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  347. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +14 -13
  348. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  349. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  350. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  351. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  352. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  353. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  354. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  355. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  356. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  357. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  358. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  359. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  360. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  361. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  362. package/dist/types/excalidraw/components/Tools.d.ts +134 -0
  363. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +4 -1
  364. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  365. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  366. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -16
  367. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  368. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -12
  369. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  370. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
  371. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  372. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  373. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  374. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  375. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  376. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  377. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  378. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
  379. package/dist/types/excalidraw/components/icons.d.ts +30 -10
  380. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
  381. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -14
  382. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +36 -0
  383. package/dist/types/excalidraw/data/blob.d.ts +161 -156
  384. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  385. package/dist/types/excalidraw/data/index.d.ts +6 -7
  386. package/dist/types/excalidraw/data/json.d.ts +89 -78
  387. package/dist/types/excalidraw/data/library.d.ts +1 -1
  388. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  389. package/dist/types/excalidraw/data/restore.d.ts +1 -1
  390. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  391. package/dist/types/excalidraw/errors.d.ts +14 -0
  392. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  393. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  394. package/dist/types/excalidraw/index.d.ts +33 -8
  395. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  396. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  397. package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
  398. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -3
  399. package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
  400. package/dist/types/excalidraw/scene/export.d.ts +3 -3
  401. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  402. package/dist/types/excalidraw/scene/types.d.ts +4 -4
  403. package/dist/types/excalidraw/snapping.d.ts +7 -7
  404. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  405. package/dist/types/excalidraw/types.d.ts +449 -74
  406. package/dist/types/excalidraw/viewport.d.ts +268 -0
  407. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +6 -3
  408. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  409. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  410. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  411. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  412. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  413. package/dist/types/math/src/constants.d.ts +0 -1
  414. package/dist/types/math/src/curve.d.ts +4 -1
  415. package/dist/types/math/src/point.d.ts +8 -2
  416. package/dist/types/math/src/types.d.ts +25 -1
  417. package/package.json +9 -7
  418. package/dist/dev/chunk-DJHLEOOZ.js +0 -69
  419. package/dist/dev/chunk-DJHLEOOZ.js.map +0 -7
  420. package/dist/dev/chunk-H7AEBD3S.js.map +0 -7
  421. package/dist/dev/chunk-QXIM7HQU.js.map +0 -7
  422. package/dist/dev/locales/ar-SA-JK5MQ7TT.js.map +0 -7
  423. package/dist/dev/locales/az-AZ-2PAD62G4.js.map +0 -7
  424. package/dist/dev/locales/bg-BG-HUKVYCRK.js.map +0 -7
  425. package/dist/dev/locales/bn-BD-V2CQI46P.js.map +0 -7
  426. package/dist/dev/locales/bn-IN-MBEO4C3J.js.map +0 -7
  427. package/dist/dev/locales/ca-ES-KWEKW4C3.js.map +0 -7
  428. package/dist/dev/locales/cs-CZ-W5AHZB5H.js.map +0 -7
  429. package/dist/dev/locales/da-DK-ITTM6YM4.js.map +0 -7
  430. package/dist/dev/locales/de-CH-OAWPDQFJ.js.map +0 -7
  431. package/dist/dev/locales/de-DE-ZRDYEPMS.js.map +0 -7
  432. package/dist/dev/locales/el-GR-QXASZLPE.js.map +0 -7
  433. package/dist/dev/locales/es-ES-VLQBB7FJ.js.map +0 -7
  434. package/dist/dev/locales/eu-ES-TF2DGTZU.js.map +0 -7
  435. package/dist/dev/locales/fa-IR-ITKFQ7QV.js.map +0 -7
  436. package/dist/dev/locales/fi-FI-UWZRVXFI.js.map +0 -7
  437. package/dist/dev/locales/fr-FR-A72LKGCO.js.map +0 -7
  438. package/dist/dev/locales/gl-ES-2QCVIBFP.js.map +0 -7
  439. package/dist/dev/locales/he-IL-WJNUHU26.js.map +0 -7
  440. package/dist/dev/locales/hi-IN-XGMO235V.js.map +0 -7
  441. package/dist/dev/locales/hu-HU-37FDQFIS.js.map +0 -7
  442. package/dist/dev/locales/id-ID-EJIDCO4E.js.map +0 -7
  443. package/dist/dev/locales/it-IT-X34PIOJ2.js.map +0 -7
  444. package/dist/dev/locales/ja-JP-37FC23PR.js.map +0 -7
  445. package/dist/dev/locales/kaa-7ZYDFVKA.js.map +0 -7
  446. package/dist/dev/locales/kab-KAB-MILWXBA6.js.map +0 -7
  447. package/dist/dev/locales/kk-KZ-7BWTPIAV.js.map +0 -7
  448. package/dist/dev/locales/km-KH-BV4P2KSZ.js.map +0 -7
  449. package/dist/dev/locales/ko-KR-TSXE5P7B.js.map +0 -7
  450. package/dist/dev/locales/ku-TR-ASSXNN3U.js.map +0 -7
  451. package/dist/dev/locales/lt-LT-G7RZYQQU.js.map +0 -7
  452. package/dist/dev/locales/lv-LV-DXNPBJZU.js.map +0 -7
  453. package/dist/dev/locales/mr-IN-7F2ZCTCF.js.map +0 -7
  454. package/dist/dev/locales/my-MM-NBI3KQGW.js.map +0 -7
  455. package/dist/dev/locales/nb-NO-4DCTQT6L.js.map +0 -7
  456. package/dist/dev/locales/nl-NL-XGZJ7V2V.js.map +0 -7
  457. package/dist/dev/locales/nn-NO-FR534JV5.js.map +0 -7
  458. package/dist/dev/locales/oc-FR-YQCIKZIK.js.map +0 -7
  459. package/dist/dev/locales/pa-IN-UM43JGD2.js.map +0 -7
  460. package/dist/dev/locales/pl-PL-2UGKA6HK.js.map +0 -7
  461. package/dist/dev/locales/pt-BR-H23QFYE3.js.map +0 -7
  462. package/dist/dev/locales/pt-PT-RHKJH5I5.js.map +0 -7
  463. package/dist/dev/locales/ro-RO-IIFONL3T.js.map +0 -7
  464. package/dist/dev/locales/ru-RU-QEP6D7GK.js.map +0 -7
  465. package/dist/dev/locales/si-LK-LZYJQLHF.js.map +0 -7
  466. package/dist/dev/locales/sk-SK-RWC6UWGY.js.map +0 -7
  467. package/dist/dev/locales/sl-SI-QJT2CAUO.js.map +0 -7
  468. package/dist/dev/locales/sv-SE-3MAT3NDX.js.map +0 -7
  469. package/dist/dev/locales/ta-IN-J7XOYF2T.js.map +0 -7
  470. package/dist/dev/locales/th-TH-2OI52EOQ.js.map +0 -7
  471. package/dist/dev/locales/tr-TR-G7TAUHUI.js.map +0 -7
  472. package/dist/dev/locales/uk-UA-IVSVBJIG.js.map +0 -7
  473. package/dist/dev/locales/uz-UZ-KCVDUVDE.js.map +0 -7
  474. package/dist/dev/locales/vi-VN-KBZAVWP5.js.map +0 -7
  475. package/dist/dev/locales/zh-CN-IS26RG2D.js.map +0 -7
  476. package/dist/dev/locales/zh-HK-KBWQ6SJC.js.map +0 -7
  477. package/dist/dev/locales/zh-TW-JKJWJQ4J.js.map +0 -7
  478. package/dist/prod/chunk-2GRP4Q3X.js +0 -33
  479. package/dist/prod/chunk-AJI3LATG.js +0 -1
  480. package/dist/prod/chunk-UYOW6QDE.js +0 -12
  481. package/dist/prod/data/image-XLQGG5L3.js +0 -1
  482. package/dist/prod/locales/ar-SA-IYHKZRSE.js +0 -8
  483. package/dist/prod/locales/az-AZ-WL5GYRHK.js +0 -1
  484. package/dist/prod/locales/bg-BG-FXZYTRPD.js +0 -5
  485. package/dist/prod/locales/bn-BD-KO6YL5G2.js +0 -3
  486. package/dist/prod/locales/bn-IN-PC6JHKYB.js +0 -3
  487. package/dist/prod/locales/ca-ES-AREX5NEO.js +0 -8
  488. package/dist/prod/locales/cs-CZ-HXAZMFYH.js +0 -7
  489. package/dist/prod/locales/da-DK-5X7ZLFU3.js +0 -2
  490. package/dist/prod/locales/de-CH-76ZNVSOF.js +0 -7
  491. package/dist/prod/locales/de-DE-G3JVZ4MQ.js +0 -7
  492. package/dist/prod/locales/el-GR-4AZTZGY6.js +0 -7
  493. package/dist/prod/locales/en-4QS4OFJI.js +0 -1
  494. package/dist/prod/locales/es-ES-ART7BI3G.js +0 -7
  495. package/dist/prod/locales/eu-ES-BIF4XBMT.js +0 -7
  496. package/dist/prod/locales/fa-IR-D4HHKAAI.js +0 -9
  497. package/dist/prod/locales/fi-FI-O35ZY7UI.js +0 -6
  498. package/dist/prod/locales/fr-FR-XEFNCM4I.js +0 -12
  499. package/dist/prod/locales/gl-ES-U4NYM3X5.js +0 -6
  500. package/dist/prod/locales/he-IL-656ABAVQ.js +0 -8
  501. package/dist/prod/locales/hi-IN-Z55GAFFR.js +0 -3
  502. package/dist/prod/locales/hu-HU-UJ62DVIW.js +0 -3
  503. package/dist/prod/locales/id-ID-FLZFU3OO.js +0 -8
  504. package/dist/prod/locales/it-IT-GIGIGIBJ.js +0 -12
  505. package/dist/prod/locales/ja-JP-43VXGDWI.js +0 -7
  506. package/dist/prod/locales/kaa-L3IMSDYL.js +0 -1
  507. package/dist/prod/locales/kab-KAB-XKPWJLNL.js +0 -4
  508. package/dist/prod/locales/kk-KZ-SXPDDY2H.js +0 -1
  509. package/dist/prod/locales/km-KH-DOS4CPGC.js +0 -7
  510. package/dist/prod/locales/ko-KR-BGC6VCY4.js +0 -5
  511. package/dist/prod/locales/ku-TR-J7IUITIA.js +0 -6
  512. package/dist/prod/locales/lt-LT-AC3LV5KG.js +0 -3
  513. package/dist/prod/locales/lv-LV-I6AY7QG2.js +0 -4
  514. package/dist/prod/locales/mr-IN-5SP4HV5B.js +0 -9
  515. package/dist/prod/locales/my-MM-S7ECRBYZ.js +0 -1
  516. package/dist/prod/locales/nb-NO-6PNHTF4R.js +0 -8
  517. package/dist/prod/locales/nl-NL-R4C4SUIG.js +0 -13
  518. package/dist/prod/locales/nn-NO-3TFXTM7Y.js +0 -4
  519. package/dist/prod/locales/oc-FR-IK6GIE7H.js +0 -4
  520. package/dist/prod/locales/pa-IN-YAKHYJET.js +0 -4
  521. package/dist/prod/locales/percentages-OL6W367U.js +0 -1
  522. package/dist/prod/locales/pl-PL-BIY22ZWU.js +0 -12
  523. package/dist/prod/locales/pt-BR-Q23NUPD6.js +0 -6
  524. package/dist/prod/locales/pt-PT-LOPEJLPJ.js +0 -8
  525. package/dist/prod/locales/ro-RO-W3D2ZATV.js +0 -12
  526. package/dist/prod/locales/ru-RU-DCTW7QSH.js +0 -10
  527. package/dist/prod/locales/si-LK-FYRRHO3C.js +0 -1
  528. package/dist/prod/locales/sk-SK-MC7UOHQO.js +0 -7
  529. package/dist/prod/locales/sl-SI-L6B6HFY5.js +0 -6
  530. package/dist/prod/locales/sv-SE-KMY6L2BA.js +0 -8
  531. package/dist/prod/locales/ta-IN-ZQCYE2JK.js +0 -6
  532. package/dist/prod/locales/th-TH-WS7ECBAV.js +0 -1
  533. package/dist/prod/locales/tr-TR-S5FI7JRW.js +0 -4
  534. package/dist/prod/locales/uk-UA-4EZUWUSQ.js +0 -6
  535. package/dist/prod/locales/uz-UZ-OKHL6AFA.js +0 -1
  536. package/dist/prod/locales/vi-VN-K34TWHF7.js +0 -7
  537. package/dist/prod/locales/zh-CN-JE4UZWNO.js +0 -11
  538. package/dist/prod/locales/zh-HK-RM35YDXX.js +0 -1
  539. package/dist/prod/locales/zh-TW-ONGLV6Y5.js +0 -9
  540. package/dist/types/common/src/visualdebug.d.ts +0 -41
  541. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  542. package/dist/types/excalidraw/charts.d.ts +0 -27
  543. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  544. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  545. package/dist/types/excalidraw/components/shapes.d.ts +0 -190
  546. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  547. package/dist/types/excalidraw/scene/scrollConstraints.d.ts +0 -46
  548. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  549. package/dist/types/utils/src/bbox.d.ts +0 -9
  550. package/dist/types/utils/src/index.d.ts +0 -4
  551. package/dist/types/utils/src/withinBounds.d.ts +0 -19
  552. /package/dist/dev/{chunk-HLABF5RW.js.map → chunk-YT2G2JXZ.js.map} +0 -0
  553. /package/dist/dev/data/{image-J6JG4BTI.js.map → image-HMDF2L4D.js.map} +0 -0
  554. /package/dist/dev/locales/{en-44H6FWTU.js.map → en-XFEPEVLS.js.map} +0 -0
  555. /package/dist/dev/locales/{percentages-OGWD7R2K.js.map → percentages-QGLYMXSX.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -11,8 +11,209 @@ The change should be grouped under one of the below section and must contain PR
11
11
  Please add the latest change on the top under the correct section.
12
12
  -->
13
13
 
14
+ ## Unreleased
15
+
16
+ ## Excalidraw API
17
+
18
+ ### Host-controlled active tool (2026-07-14) [#11665](https://github.com/excalidraw/excalidraw/pull/11665)
19
+
20
+ - Added `activeTool` prop (`{ type: ToolType } | { type: "custom"; customType: string }`) for forcing the active editor tool (controlled). While set, user- and API-driven tool switching is ignored — `setActiveTool` refuses non-matching activations with a console warning, non-forced toolbar buttons render disabled, and the tool-lock toggle (`Q`) is inert — and the editor snaps back if internal flows reset the tool (e.g. `restore()` on scene load). The forced tool behaves as if locked — it doesn't revert to selection after use and drawn elements aren't auto-selected — without mutating `appState.activeTool.locked`, so the user's persisted padlock preference stays untouched. Unset the prop to return tool control to the editor (the current tool stays active). The forced tool must be activatable to take effect — not disabled via `UIOptions.tools`, and (while non-interactive) allowed via `interaction.enabled.tools`; otherwise the editor stays on the `selection` tool and applies the forced tool once it becomes activatable. `image` cannot be forced (its activation opens the file picker). Composes with `interaction.enabled.tools` for presentation-style hosts: force `laser` for the presenter, `selection` + `interaction={false}` for viewers.
21
+
22
+ ### User-driven tools while non-interactive (2026-07-14) [#11665](https://github.com/excalidraw/excalidraw/pull/11665)
23
+
24
+ - Added `interaction.enabled.tools` (`{ laser?: boolean; custom?: boolean }`) — the listed tools stay user-driven while the editor is otherwise non-interactive: pointer input keeps driving the tool when it's the active tool. With `laser` enabled, pointer strokes draw laser trails and pointer positions keep broadcasting through `onPointerUpdate`, so e.g. collaborators see a presenter's laser & cursor while the presenter's editor is otherwise inert. With `custom` enabled, custom tools (`activeTool.type === "custom"`) keep receiving `onPointerDown` / `onPointerUp` — activate them with `locked: true` or they revert to the selection tool (and go inert) after the first pointer interaction. Enabling a tool does not enable user-driven tool _switching_ — the keyboard stays disabled and tool selection remains host-driven (`ExcalidrawAPI.setActiveTool`). Composes with `enabled.navigation`: the enabled tool wins the primary-pointer drag, while wheel input (and wheel-button drag) still pans/zooms. The editor consumes touch input over the canvas while the active tool is enabled (strokes don't scroll the page).
25
+
26
+ - While the editor is non-interactive, `ExcalidrawAPI.setActiveTool` only activates tools allowed via `interaction.enabled.tools` — activating any other tool is refused with a console warning (previously the switch went through even though the tool couldn't be used, e.g. updating the canvas cursor). The same invariant is maintained for the tool state itself: when the active tool loses its exception (e.g. `enabled.tools` changes, or the editor becomes fully non-interactive mid-session), it resets to the default `selection` tool, so stale tool state — e.g. a presenter's laser after handing off — doesn't leak through `onChange` / collab pointer payloads.
27
+
28
+ ### Interaction and UI control (2026-07-05) [#11605](https://github.com/excalidraw/excalidraw/pull/11605)
29
+
30
+ - Added `interaction` prop (`boolean | { enabled?: { navigation?: boolean; links?: boolean; embeds?: boolean; interactiveContent?: boolean; browserZoom?: boolean } }`). When set to `false`, the editor becomes fully inert for the user — no panning, zooming, selecting, editing, keyboard shortcuts, clipboard, or drag&drop. It implies view mode (`appState.viewModeEnabled` reports `true` and cannot be unset while non-interactive), and the page scrolls naturally over the component since wheel/touch input is no longer captured (the browser's own zoom is still prevented over the editor by default). Interactions under `enabled` are opt-in exceptions: with `navigation` allowed, the user can pan (pointer drag, wheel, PageUp/PageDown — shift for horizontal) and zoom (ctrl/cmd + wheel, pinch, and the canvas zoom & zoom-to-fit shortcuts — ctrl/cmd +/-/0, shift+1/2/3) the canvas view-mode style — respecting `appState.scrollConstraints`, so it composes with viewport locking for constrained viewers, while the rest of the keyboard stays disabled and the editor consumes wheel & touch input again (the page no longer scrolls over the editor); with `links` allowed, link icons render and linked elements stay clickable (view-mode behavior: clicking anywhere on a linked element opens its link) while the editor stays otherwise non-interactive — when links are not allowed, link icons are not rendered at all; with `embeds` allowed, embeddable & iframe elements stay interactive (hover & click activates them, view-mode style); `interactiveContent` is an additive shorthand enabling `links` & `embeds` (and future interactive content kinds) together; with `browserZoom` allowed, the browser's own zoom gestures (ctrl/cmd + wheel, pinch, keyboard) stay available over the editor (moot when `navigation` is allowed, since the editor consumes the zoom input instead). The scene still renders and remains fully controllable through the imperative API (`updateScene`, `setViewport`, ...), making it suitable for live previews, thumbnails, and annotation overlays.
31
+
32
+ - Added `ui` prop (`boolean | { enabled: { zoom?: boolean; scrollBackToContent?: boolean } }`). When set to `false`, Excalidraw's default UI is not rendered — toolbar, default menu and footer controls, sidebars, canvas popups, and context menu. The object form likewise hides the default UI but opts the zoom controls and/or scroll-back-to-content button back in. Canvas content (elements, text editing, frame names, embeds) still renders, and the editor remains interactive unless `interaction={false}` is set as well. Host children continue to mount (they may be functional, e.g. a collaboration component), and host-supplied UI — including Excalidraw-exported components such as `<MainMenu>` and `<Footer>` — continues to render together with any supporting dialogs it opens. You're responsible for hiding your own presentational components.
33
+
34
+ ### Tool system & toolbar rework [#11649](https://github.com/excalidraw/excalidraw/pull/11649)
35
+
36
+ The toolbar UI was rewritten from hidden radio/checkbox inputs to real `<button>` elements composed from a central tool registry, and all tool activation now goes through a single `setActiveTool` code path.
37
+
38
+ #### Breaking changes
39
+
40
+ - `ExcalidrawAPI.setActiveTool(tool, keepSelection?)` — the second parameter changed from a boolean to an options object: `setActiveTool(tool, { keepSelection?: boolean; toggle?: boolean = false })`. The hand and eraser tools are now _toggle tools_: activating one records the previously active tool, and if `toggle=true`, activating it again switches back — including via `setActiveTool` itself, so repeated `setActiveTool({ type: "hand" }, { toggle: true })` calls alternate rather than no-op. By default `false` for idempotent activation.
41
+
42
+ - Tool buttons render as semantic `<button>` elements with `aria-pressed` instead of `<label>`-wrapped hidden `<input type="radio">` / `<input type="checkbox">`. If you style or query the editor DOM:
43
+
44
+ - The `.ToolIcon_type_radio`, `.ToolIcon_type_checkbox`, and `.ToolIcon--selected` class names no longer exist — the pressed state is exposed through the `.ToolIcon--checked` class and the `aria-pressed` attribute.
45
+ - `<Sidebar.Trigger>` (including the default Library trigger) renders a `<button>` instead of a `<label>` + checkbox.
46
+
47
+ - Removed internal actions superseded by the `setActiveTool` funnel and the tool registry: `toggleHandTool`, `toggleEraserTool`, `toggleLassoTool`, `setFrameAsActiveTool`, `setEmbeddableAsActiveTool` (these `ActionName`s no longer exist).
48
+
49
+ #### Behavior changes
50
+
51
+ - Hand (`H`) and eraser (`E`) shortcuts now reliably toggle back to the previously active tool (previously inconsistent across platforms and input paths, and unavailable for hand in view mode). Pressing `Escape` while hand or eraser is active likewise returns to the previous tool. Re-clicking their toolbar buttons is a no-op.
52
+ - Clicking the active selection tool switches to lasso on all platforms (previously this only worked on iOS due to a controlled-radio quirk).
53
+ - Tool letter shortcuts are CapsLock-insensitive, `Shift+letter` never switches tools, and `Ctrl+E` no longer toggles the eraser.
54
+ - Switching tools no longer creates undo-history entries.
55
+ - Command palette tool commands are derived from the tool registry: the duplicate "Hand" entry is gone, "Web Embed" was added, and "Lasso" is always listed.
56
+ - Pen mode now activates on the first pen tap on any tool button (previously deferred and occasionally dropped).
57
+
58
+ #### Fixes
59
+
60
+ - Mobile toolbar popovers: the active option stays highlighted after tapping it (the highlight was being suppressed by sticky touch-hover).
61
+ - The active-tool highlight can no longer desync from the actually active tool (controlled-radio DOM desync).
62
+
63
+ ### Viewport control & scroll/zoom locking (2026-07-03) [#11554](https://github.com/excalidraw/excalidraw/pull/11554)
64
+
65
+ `ExcalidrawAPI.scrollToContent` was rebuilt into `ExcalidrawAPI.setViewport()` — a single API for navigating the viewport (`fit: "scale-down" | "contain" | "none"`), locking scroll/zoom to a target (with rubberband overscroll), fitting around the rendered editor UI, and initializing the viewport on scene load.
66
+
67
+ #### Breaking changes
68
+
69
+ - `ExcalidrawAPI.scrollToContent(target?, opts?)` was replaced with `ExcalidrawAPI.setViewport(opts | null)`.
70
+
71
+ ```tsx
72
+ // before
73
+ excalidrawAPI.scrollToContent(element, {
74
+ fitToViewport: true,
75
+ animate: true,
76
+ });
77
+ // after
78
+ excalidrawAPI.setViewport({ target: element, fit: "contain" });
79
+ ```
80
+
81
+ - `target` is required and no longer defaults to the whole scene — pass `target: excalidrawAPI.getSceneElements()` for the old default. Besides element(s) or an element id / element-link URL, it now also accepts `Bounds` and `{ x, y, width?, height? }` rects (missing dimensions default to the viewport size). Deleted and non-scene elements in the target are filtered out with a console warning.
82
+ - `fitToContent` / `fitToViewport` were replaced by `fit: "scale-down" | "contain"` respectively, defaulting to `"scale-down"` (zoomed so the target fits, at most 100%). Previously the default depended on the target: element-id / element-link (string) targets defaulted to fit-to-content — matching the new default — while element(s) or omitted targets defaulted to recentering at the current zoom without changing it; pass `fit: "none"` for that behavior.
83
+ - `animate` / `duration` were replaced by `animation: boolean | { duration?: number }`. Navigation now always animates by default; previously only string targets did, while element(s) targets jumped unless `animate: true` — pass `animation: false` to jump instantly.
84
+ - `canvasOffsets` was replaced by `offsets`, which also accepts UI-derived offsets (see Features below).
85
+ - `viewportZoomFactor`, `minZoom`, and `maxZoom` are no longer supported.
86
+
87
+ - `zoomToFitBounds` takes `fit: "scale-down" | "contain" | "none"` instead of `fitToViewport` / `viewportZoomFactor`, and no longer rounds the resulting zoom down to the nearest 10% step by default — pass `steppedZoom: true` to keep the old rounding.
88
+
89
+ #### Features
90
+
91
+ - `setViewport({ ..., lock })` locks the viewport to the resolved target: `lock.scroll` constrains panning to the target box and `lock.zoom` makes the resolved zoom the minimum zoom (zooming in stays allowed). During an animated navigation into a locked viewport, user pan, zoom, fit, and page-navigation input is consumed without mutating or cancelling the transition; the destination lock is installed together with the final viewport once the animation settles. A newer `setViewport(...)` supersedes the transition and starts from the currently rendered viewport. `setViewport(null)` cancels a pending transition and clears any pending or active lock without navigating; a navigation without `lock` likewise supersedes any lock.
92
+
93
+ - `lock.overscroll` adds a rubberband to the lock: panning can overshoot the constraint by the given amount (viewport px, zoom-independent) and snaps back once wheel input settles or the active pointer or multi-finger gesture is released. Defaults to `true` = `DEFAULT_OVERSCROLL` (150px, exported from the package root); pass a number to customize, or `false` / `0` for a rigid lock. Zooming itself remains hard-clamped against the lock, gliding along its edge instead of overscrolling, and stays available during snap-back without cancelling the rubberband animation or discarding its existing screen-space overscroll.
94
+
95
+ - While a lock is active, the zoom-to-fit shortcuts (shift+1/2/3) target the locked box instead of the scene elements (with no selection), so they return the viewport to the lock's resting state; reset-zoom (ctrl/cmd+0) resets to the lock's minimum zoom instead of 100%. Fit results are always re-clamped against the lock. [#11605](https://github.com/excalidraw/excalidraw/pull/11605)
96
+
97
+ - Added `<Excalidraw initialState={{ viewport }} />` for initializing the viewport (and optionally installing a lock) once on scene load. Accepts the same options as `setViewport` except `animation`, and takes precedence over `initialData.scrollToContent`.
98
+
99
+ - The `offsets` option (on `setViewport` and `initialState.viewport`) insets the usable viewport per side so targets aren't fitted underneath overlaid UI. It combines static pixel sides with `ui: true | ViewportOffsetsOptions`, which measures the currently rendered editor UI (toolbar, styles panel, sidebar…) — with configurable padding, per-side overrides, and reserving space for currently-hidden surfaces (`reserve: { stylesPanel?: boolean; sidebar?: boolean }`). The same measurement is exposed through the new `ExcalidrawAPI.getViewportOffsets(opts?)`, and custom UI rendered inside the editor container can opt into being measured via the `data-viewport-ui="top" | "bottom" | "side"` attribute.
100
+
101
+ ### Other Breaking changes
102
+
103
+ - `UIAppState` no longer includes `zoom`, `shouldCacheIgnoreZoom`, and the canvas-interaction transients `snapLines`, `originSnapOffset`, `suggestedBinding`, `frameToHighlight`, and `elementsToHighlight`. These update per pointermove or per animation frame and no longer re-render the editor UI, so UI render props receiving `UIAppState` (`renderCustomStats`, custom `<Footer/>` content, etc.) don't receive them anymore and would render stale values if they read them off the full `AppState`. Subscribe through `useExcalidrawStateValue` instead — the component re-renders only when the selected value changes:
104
+
105
+ ```tsx
106
+ import { useExcalidrawStateValue } from "@excalidraw/excalidraw";
107
+
108
+ const ZoomReadout = () => {
109
+ // `undefined` on initial render, before the editor API initializes
110
+ const zoomValue = useExcalidrawStateValue(
111
+ (appState) => appState.zoom.value,
112
+ );
113
+
114
+ if (zoomValue == null) {
115
+ return null;
116
+ }
117
+
118
+ return <div>{(zoomValue * 100).toFixed(0)}%</div>;
119
+ };
120
+ ```
121
+
122
+ Outside of React components, you can also subscribe via `ExcalidrawAPI.onStateChange((appState) => appState.zoom.value, (zoomValue) => {...})`, or keep using the existing `onScrollChange(scrollX, scrollY, zoom)` prop.
123
+
124
+ - Theme changes initiated by the default UI are now delegated to `<Excalidraw onThemeChange={(theme) => ...} />` when supplied. If `onThemeChange` is not supplied, light/dark theme toggling still falls back to updating the internal editor state.
125
+
126
+ - `MainMenu.DefaultItems.ToggleTheme` no longer accepts the item-level `onSelect` callback. Host apps that need to control light/dark/system theme should pass `onThemeChange` to `<Excalidraw />` instead.
127
+ - `MainMenu.DefaultItems.ToggleTheme` with system theme support now uses `allowSystemTheme` together with `theme={Theme | "system"}` only to render the selected value. For the regular light/dark item, pass `allowSystemTheme={false}`.
128
+ - `CommandPalette.defaultItems.toggleTheme` was removed. The default theme command is now rendered by the command palette itself when `UIOptions.canvasActions.toggleTheme` enables the action (see below).
129
+ - `UIOptions.canvasActions.toggleTheme` still controls default theme UI availability. When it is `null`, it defaults to `true` if `props.theme` is omitted or `props.onThemeChange` is supplied, and otherwise defaults to disabled.
130
+
131
+ - Renamed the `excalidrawAPI` prop to `onExcalidrawAPI`.
132
+ - `onExcalidrawAPI` is now called on mount (instead of during constructor), and later on unmount (with `null` value). The API may be removed altogether in the future (you can use `onMount` & `onUnmount` to manage the `ExcalidrawAPI` object (e.g. to cache it to a global state), already).
133
+
134
+ ### Other Features
135
+
136
+ - Added `ExcalidrawAPI.isDestroyed` flag. Set to `true` once the editor unmounts. Calling any `get*` method, `onStateChange`, or `onEvent` on a destroyed API instance will throw in development and `console.error` in production. The `ExcalidrawAPI` will be reset to `null` on unmount, but to be extra safe, you should check `ExcalidrawAPI.isDestroyed` before calling these methods to guard against subtle race conditions in your code.
137
+
138
+ - Added `onMount`, `onInitialize`, and `onUnmount` props. `onMount` receives `{ excalidrawAPI, container }` once the editor root is mounted. `onInitialize` fires once the initial scene has loaded. `onUnmount` fires just before unmounting.
139
+
140
+ - Same events are also accessible imperatively through `api.onEvent(...)`.
141
+
142
+ ```tsx
143
+ <Excalidraw
144
+ onExcalidrawAPI={(api) => {
145
+ api.onEvent("editor:mount", ({ excalidrawAPI, container }) => {
146
+ console.log(container);
147
+ });
148
+
149
+ api.onEvent("editor:initialize").then((readyApi) => {
150
+ readyApi.setViewport({
151
+ target: readyApi.getSceneElements(),
152
+ animation: false,
153
+ });
154
+ });
155
+ }}
156
+ />
157
+ ```
158
+
159
+ Note that in future releases, most, if not all, `excalidrawAPI.on*` subscriptions will be removed in favor of `excalidrawAPI.onEvent(name)`.
160
+
161
+ - Also added `"editor:unmount"` lifecycle event, only accessible via `api.onEvent("editor:unmount")`.
162
+
163
+ - Exported `<ExcalidrawAPIProvider/>`, `useExcalidrawAPI()`, `useExcalidrawStateValue(prop | props | selectorFunction)`, and `useOnExcalidrawStateChange(prop | props | selectorFunction, callback)` from the package. The imperative API also now exposes `onStateChange(prop | props | selectorFunction, callback?)`, and `onEvent(name, callback)`.
164
+
165
+ ```tsx
166
+ <ExcalidrawAPIProvider>
167
+ <Excalidraw />
168
+ <Logger />
169
+ </ExcalidrawAPIProvider>;
170
+
171
+ function Logger() {
172
+ // initially null before the ExcalidrawAPIProvider initializes after
173
+ // <Excalidraw/> renders
174
+ // When <Excalidraw/> unmounts, is reset back to null
175
+ const api = useExcalidrawAPI();
176
+
177
+ useExcalidrawStateValue("viewModeEnabled", (viewModeEnabled) => {
178
+ console.log("view mode changed:", viewModeEnabled);
179
+ });
180
+
181
+ React.useEffect(() => {
182
+ if (api) {
183
+ console.log("editor instance id:", api.id);
184
+ }
185
+ }, [api]);
186
+
187
+ return null;
188
+ }
189
+ ```
190
+
191
+ - Added `onExport` so host apps can delay JSON export until async work completes. The handler receives the export data plus an `AbortSignal`, and may return a `Promise` or an async generator that yields progress updates for the built-in toast UI.
192
+
193
+ ```tsx
194
+ <Excalidraw
195
+ onExport={async function* (_type, { files }, { signal }) {
196
+ yield { type: "progress", message: "Waiting for images..." };
197
+
198
+ await waitForImagesToLoad(files, signal);
199
+
200
+ if (signal.aborted) {
201
+ return;
202
+ }
203
+
204
+ yield { type: "progress", message: "Export ready", progress: 1 };
205
+ }}
206
+ />
207
+ ```
208
+
14
209
  ## Excalidraw Library
15
210
 
211
+ ### Breaking changes
212
+
213
+ - `updateActiveTool` (from `@excalidraw/common`): the `lastActiveToolBeforeEraser` property of the `data` parameter was renamed to `lastActiveTool` (it was already stored under that name on `appState.activeTool`, and is no longer eraser-specific).
214
+
215
+ - `getClosestElementBounds` is no longer exported from `@excalidraw/element`. Use `getCommonBounds` / `getElementBounds` from `@excalidraw/element`, or reimplement the closest-target distance check with `getElementBounds` if you need the same behavior [#11554](https://github.com/excalidraw/excalidraw/pull/11554).
216
+
16
217
  ## 0.18.0 (2025-03-11)
17
218
 
18
219
  ### Highlights
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Excalidraw
2
2
 
3
- **Excalidraw** is exported as a component to be directly embedded in your project.
3
+ **Excalidraw** is exported as a React component that you can embed directly in your app.
4
4
 
5
5
  ## Installation
6
6
 
7
- Use `npm` or `yarn` to install the package.
7
+ Install the package together with its React peer dependencies.
8
8
 
9
9
  ```bash
10
10
  npm install react react-dom @excalidraw/excalidraw
@@ -12,34 +12,131 @@ npm install react react-dom @excalidraw/excalidraw
12
12
  yarn add react react-dom @excalidraw/excalidraw
13
13
  ```
14
14
 
15
- > **Note**: If you don't want to wait for the next stable release and try out the unreleased changes, use `@excalidraw/excalidraw@next`.
15
+ > **Note**: If you want to try unreleased changes, use `@excalidraw/excalidraw@next`.
16
16
 
17
- #### Self-hosting fonts
17
+ ## Quick start
18
18
 
19
- By default, Excalidraw will try to download all the used fonts from the [CDN](https://esm.run/@excalidraw/excalidraw/dist/prod).
19
+ The minimum working setup has two easy-to-miss requirements:
20
20
 
21
- For self-hosting purposes, you'll have to copy the content of the folder `node_modules/@excalidraw/excalidraw/dist/prod/fonts` to the path where your assets should be served from (i.e. `public/` directory in your project). In that case, you should also set `window.EXCALIDRAW_ASSET_PATH` to the very same path, i.e. `/` in case it's in the root:
21
+ 1. Import the package CSS:
22
22
 
23
- ```js
24
- <script>window.EXCALIDRAW_ASSET_PATH = "/";</script>
23
+ ```ts
24
+ import "@excalidraw/excalidraw/index.css";
25
25
  ```
26
26
 
27
- ### Dimensions of Excalidraw
27
+ 2. Render Excalidraw inside a container with a non-zero height.
28
28
 
29
- Excalidraw takes _100%_ of `width` and `height` of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.
29
+ ```tsx
30
+ import { Excalidraw } from "@excalidraw/excalidraw";
31
+ import "@excalidraw/excalidraw/index.css";
32
+
33
+ export default function App() {
34
+ return (
35
+ <div style={{ height: "100vh" }}>
36
+ <Excalidraw />
37
+ </div>
38
+ );
39
+ }
40
+ ```
41
+
42
+ Excalidraw fills `100%` of the width and height of its parent. If the parent has no height, the canvas will not be visible.
43
+
44
+ ## Next.js / SSR frameworks
45
+
46
+ Excalidraw should be rendered on the client. In SSR frameworks such as Next.js, use a client component and load it dynamically with SSR disabled.
47
+
48
+ ```tsx
49
+ // app/components/ExcalidrawClient.tsx
50
+ "use client";
51
+
52
+ import { Excalidraw } from "@excalidraw/excalidraw";
53
+ import "@excalidraw/excalidraw/index.css";
54
+
55
+ export default function ExcalidrawClient() {
56
+ return (
57
+ <div style={{ height: "100vh" }}>
58
+ <Excalidraw />
59
+ </div>
60
+ );
61
+ }
62
+ ```
63
+
64
+ ```tsx
65
+ // app/page.tsx
66
+ import dynamic from "next/dynamic";
67
+
68
+ const ExcalidrawClient = dynamic(
69
+ () => import("./components/ExcalidrawClient"),
70
+ { ssr: false },
71
+ );
72
+
73
+ export default function Page() {
74
+ return <ExcalidrawClient />;
75
+ }
76
+ ```
77
+
78
+ See the local examples for complete setups:
79
+
80
+ - [examples/with-nextjs](https://github.com/excalidraw/excalidraw/tree/master/examples/with-nextjs)
81
+ - [examples/with-script-in-browser](https://github.com/excalidraw/excalidraw/tree/master/examples/with-script-in-browser)
82
+
83
+ ## LLM / agent tips
84
+
85
+ If an LLM or coding agent is setting up Excalidraw, these shortcuts usually save more time than re-prompting:
86
+
87
+ - Start with a plain `<Excalidraw />` in a `100vh` container. Add refs, `initialData`, persistence, or custom UI only after the base embed works.
88
+ - If the canvas is blank, check the CSS import and parent height first. Those are the two most common integration failures.
89
+ - In Next.js or other SSR frameworks, assume client-only rendering first. Use `"use client"` and `dynamic(..., { ssr: false })` before debugging hydration or `window is not defined` errors.
90
+ - If imports or entrypoints are unclear, inspect `node_modules/@excalidraw/excalidraw/package.json`. The installed package exports are the source of truth.
91
+ - Do not set `window.EXCALIDRAW_ASSET_PATH` unless you are intentionally self-hosting fonts/assets.
92
+ - When docs and generated code drift, copy the nearest working example from this repo, especially `examples/with-nextjs` or `examples/with-script-in-browser`.
93
+
94
+ ## Migrating to `@excalidraw/excalidraw@0.18.x`
95
+
96
+ Version `0.18.x` removes the old `types/`-prefixed deep import paths. If you were importing types from `@excalidraw/excalidraw/types/...`, switch to the new type-only subpaths below.
97
+
98
+ | Old path | New path |
99
+ | --- | --- |
100
+ | `@excalidraw/excalidraw/types/data/transform.js` | `@excalidraw/excalidraw/element/transform` |
101
+ | `@excalidraw/excalidraw/types/data/types.js` | `@excalidraw/excalidraw/data/types` |
102
+ | `@excalidraw/excalidraw/types/element/types.js` | `@excalidraw/excalidraw/element/types` |
103
+ | `@excalidraw/excalidraw/types/utility-types.js` | `@excalidraw/excalidraw/common/utility-types` |
104
+ | `@excalidraw/excalidraw/types/types.js` | `@excalidraw/excalidraw/types` |
105
+
106
+ Drop the `.js` extension. The new package `exports` map resolves these paths without it.
107
+
108
+ These deep subpaths are for `import type` only. Runtime imports should come from the package root, plus `@excalidraw/excalidraw/index.css` for styles.
109
+
110
+ For example:
111
+
112
+ ```ts
113
+ import { exportToSvg } from "@excalidraw/excalidraw";
114
+ ```
115
+
116
+ ## Self-hosting fonts
117
+
118
+ By default, Excalidraw downloads the fonts it needs from the [CDN](https://esm.run/@excalidraw/excalidraw/dist/prod).
119
+
120
+ For self-hosting, copy the contents of `node_modules/@excalidraw/excalidraw/dist/prod/fonts` into the path where your app serves static assets, for example `public/`. Then set `window.EXCALIDRAW_ASSET_PATH` to that same path:
121
+
122
+ ```html
123
+ <script>
124
+ window.EXCALIDRAW_ASSET_PATH = "/";
125
+ </script>
126
+ ```
30
127
 
31
128
  ## Demo
32
129
 
33
- Go to [CodeSandbox](https://codesandbox.io/p/sandbox/github/excalidraw/excalidraw/tree/master/examples/with-script-in-browser) example.
130
+ Try the [CodeSandbox example](https://codesandbox.io/p/sandbox/github/excalidraw/excalidraw/tree/master/examples/with-script-in-browser).
34
131
 
35
132
  ## Integration
36
133
 
37
- Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration).
134
+ Read the [integration docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration).
38
135
 
39
136
  ## API
40
137
 
41
- Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api).
138
+ Read the [API docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api).
42
139
 
43
140
  ## Contributing
44
141
 
45
- Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/contributing).
142
+ Read the [contributing docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/contributing).
@@ -0,0 +1,69 @@
1
+ // locales/percentages.json
2
+ var en = 100;
3
+ var kaa = 21;
4
+ var percentages_default = {
5
+ "ar-SA": 82,
6
+ "az-AZ": 24,
7
+ "bg-BG": 63,
8
+ "bn-BD": 38,
9
+ "bn-IN": 38,
10
+ "ca-ES": 82,
11
+ "cs-CZ": 74,
12
+ "da-DK": 28,
13
+ "de-CH": 83,
14
+ "de-DE": 83,
15
+ "el-GR": 77,
16
+ en,
17
+ "es-ES": 82,
18
+ "eu-ES": 70,
19
+ "fa-IR": 83,
20
+ "fi-FI": 60,
21
+ "fr-FR": 97,
22
+ "gl-ES": 61,
23
+ "he-IL": 82,
24
+ "hi-IN": 83,
25
+ "hu-HU": 65,
26
+ "id-ID": 81,
27
+ "it-IT": 98,
28
+ "ja-JP": 96,
29
+ kaa,
30
+ "kab-KAB": 54,
31
+ "kk-KZ": 13,
32
+ "km-KH": 54,
33
+ "ko-KR": 73,
34
+ "ku-TR": 58,
35
+ "lt-LT": 33,
36
+ "lv-LV": 51,
37
+ "mr-IN": 82,
38
+ "my-MM": 24,
39
+ "nb-NO": 82,
40
+ "nl-NL": 96,
41
+ "nn-NO": 43,
42
+ "oc-FR": 76,
43
+ "pa-IN": 52,
44
+ "pl-PL": 90,
45
+ "pt-BR": 86,
46
+ "pt-PT": 82,
47
+ "ro-RO": 98,
48
+ "ru-RU": 98,
49
+ "si-LK": 67,
50
+ "sk-SK": 90,
51
+ "sl-SI": 82,
52
+ "sv-SE": 82,
53
+ "ta-IN": 78,
54
+ "th-TH": 65,
55
+ "tr-TR": 92,
56
+ "uk-UA": 86,
57
+ "uz-UZ": 0,
58
+ "vi-VN": 68,
59
+ "zh-CN": 91,
60
+ "zh-HK": 16,
61
+ "zh-TW": 98
62
+ };
63
+
64
+ export {
65
+ en,
66
+ kaa,
67
+ percentages_default
68
+ };
69
+ //# sourceMappingURL=chunk-LCV6WMJR.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../locales/percentages.json"],
4
+ "sourcesContent": ["{\n \"ar-SA\": 82,\n \"az-AZ\": 24,\n \"bg-BG\": 63,\n \"bn-BD\": 38,\n \"bn-IN\": 38,\n \"ca-ES\": 82,\n \"cs-CZ\": 74,\n \"da-DK\": 28,\n \"de-CH\": 83,\n \"de-DE\": 83,\n \"el-GR\": 77,\n \"en\": 100,\n \"es-ES\": 82,\n \"eu-ES\": 70,\n \"fa-IR\": 83,\n \"fi-FI\": 60,\n \"fr-FR\": 97,\n \"gl-ES\": 61,\n \"he-IL\": 82,\n \"hi-IN\": 83,\n \"hu-HU\": 65,\n \"id-ID\": 81,\n \"it-IT\": 98,\n \"ja-JP\": 96,\n \"kaa\": 21,\n \"kab-KAB\": 54,\n \"kk-KZ\": 13,\n \"km-KH\": 54,\n \"ko-KR\": 73,\n \"ku-TR\": 58,\n \"lt-LT\": 33,\n \"lv-LV\": 51,\n \"mr-IN\": 82,\n \"my-MM\": 24,\n \"nb-NO\": 82,\n \"nl-NL\": 96,\n \"nn-NO\": 43,\n \"oc-FR\": 76,\n \"pa-IN\": 52,\n \"pl-PL\": 90,\n \"pt-BR\": 86,\n \"pt-PT\": 82,\n \"ro-RO\": 98,\n \"ru-RU\": 98,\n \"si-LK\": 67,\n \"sk-SK\": 90,\n \"sl-SI\": 82,\n \"sv-SE\": 82,\n \"ta-IN\": 78,\n \"th-TH\": 65,\n \"tr-TR\": 92,\n \"uk-UA\": 86,\n \"uz-UZ\": 0,\n \"vi-VN\": 68,\n \"zh-CN\": 91,\n \"zh-HK\": 16,\n \"zh-TW\": 98\n}\n"],
5
+ "mappings": ";AAYE,SAAM;AAaN,UAAO;AAzBT;AAAA,EACE,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT;AAAA,EACA,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT;AAAA,EACA,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;",
6
+ "names": []
7
+ }
@@ -3,6 +3,10 @@ var labels = {
3
3
  paste: "Paste",
4
4
  pasteAsPlaintext: "Paste as plaintext",
5
5
  pasteCharts: "Paste charts",
6
+ chartType_bar: "Bar chart",
7
+ chartType_line: "Line chart",
8
+ chartType_radar: "Radar chart",
9
+ chartType_plaintext: "Plain text",
6
10
  selectAll: "Select all",
7
11
  multiSelect: "Add element to selection",
8
12
  moveCanvas: "Move canvas",
@@ -31,6 +35,9 @@ var labels = {
31
35
  strokeStyle_dashed: "Dashed",
32
36
  strokeStyle_dotted: "Dotted",
33
37
  sloppiness: "Sloppiness",
38
+ pressure: "Pressure",
39
+ pressure_constant: "Constant",
40
+ pressure_variable: "Variable",
34
41
  opacity: "Opacity",
35
42
  textAlign: "Text align",
36
43
  edges: "Edges",
@@ -49,7 +56,14 @@ var labels = {
49
56
  arrowhead_crowfoot_many: "Crow's foot (many)",
50
57
  arrowhead_crowfoot_one: "Crow's foot (one)",
51
58
  arrowhead_crowfoot_one_or_many: "Crow's foot (one or many)",
59
+ arrowhead_cardinality_one: "Cardinality (one)",
60
+ arrowhead_cardinality_many: "Cardinality (many)",
61
+ arrowhead_cardinality_one_or_many: "Cardinality (one or many)",
62
+ arrowhead_cardinality_exactly_one: "Cardinality (exactly one)",
63
+ arrowhead_cardinality_zero_or_one: "Cardinality (zero or one)",
64
+ arrowhead_cardinality_zero_or_many: "Cardinality (zero or many)",
52
65
  more_options: "More options",
66
+ cardinality: "Cardinality",
53
67
  arrowtypes: "Arrow type",
54
68
  arrowtype_sharp: "Sharp arrow",
55
69
  arrowtype_round: "Curved arrow",
@@ -171,7 +185,14 @@ var labels = {
171
185
  linkToElement: "Link to object",
172
186
  wrapSelectionInFrame: "Wrap selection in frame",
173
187
  tab: "Tab",
174
- shapeSwitch: "Switch shape"
188
+ shapeSwitch: "Switch shape",
189
+ preferences: "Preferences",
190
+ preferences_toolLock: "Tool lock",
191
+ boxSelectionMode: "Select on",
192
+ boxSelectionContain: "Wrap",
193
+ boxSelectionOverlap: "Overlap",
194
+ arrowBinding: "Arrow binding",
195
+ midpointSnapping: "Snap to midpoints"
175
196
  };
176
197
  var elementLink = {
177
198
  title: "Link to object",
@@ -354,6 +375,7 @@ var hints = {
354
375
  resize: "You can constrain proportions by holding {{shortcut_1}} while resizing,\nhold {{shortcut_2}} to resize from the center",
355
376
  resizeImage: "You can resize freely by holding {{shortcut_1}},\nhold {{shortcut_2}} to resize from the center",
356
377
  rotate: "You can constrain angles by holding {{shortcut}} while rotating",
378
+ toggleArrowhead: "Double-click to toggle the arrowhead",
357
379
  lineEditor_info: "Hold {{shortcut_1}} and Double-click or press {{shortcut_2}} to edit points",
358
380
  lineEditor_line_info: "Double-click or press {{shortcut}} to edit points",
359
381
  lineEditor_pointSelected: "Press {{shortcut_1}} to remove point(s),\n{{shortcut_2}} to duplicate, or drag to move",
@@ -397,6 +419,10 @@ var roomDialog = {
397
419
  var errorDialog = {
398
420
  title: "Error"
399
421
  };
422
+ var progressDialog = {
423
+ title: "Saving",
424
+ defaultMessage: "Preparing to save..."
425
+ };
400
426
  var exportDialog = {
401
427
  disk_title: "Save to disk",
402
428
  disk_details: "Export the scene data to a file from which you can import later.",
@@ -559,7 +585,9 @@ var colors = {
559
585
  };
560
586
  var welcomeScreen = {
561
587
  app: {
562
- center_heading: "All your data is saved locally in your browser.",
588
+ center_heading: "Your drawings are saved in your browser's storage.",
589
+ center_heading_line2: "Browser storage can be cleared unexpectedly.",
590
+ center_heading_line3: "Save your work to a file regularly to avoid losing it.",
563
591
  center_heading_plus: "Did you want to go to the Excalidraw+ instead?",
564
592
  menuHint: "Export, preferences, languages, ..."
565
593
  },
@@ -612,9 +640,58 @@ var overwriteConfirm = {
612
640
  var mermaid = {
613
641
  title: "Mermaid to Excalidraw",
614
642
  button: "Insert",
615
- description: "Currently only <flowchartLink>Flowchart</flowchartLink>,<sequenceLink> Sequence, </sequenceLink> and <classLink>Class </classLink>Diagrams are supported. The other types will be rendered as image in Excalidraw.",
643
+ description: "Currently only <flowchartLink>Flowchart</flowchartLink>, <sequenceLink>Sequence</sequenceLink>, <classLink>Class</classLink>, and <erdLink>Entity Relationship</erdLink> Diagrams are supported. The other types will be rendered as image in Excalidraw.",
616
644
  syntax: "Mermaid Syntax",
617
- preview: "Preview"
645
+ preview: "Preview",
646
+ label: "Mermaid",
647
+ inputPlaceholder: "Write Mermaid diagram defintion here...",
648
+ autoFixAvailable: "Auto-fix is available"
649
+ };
650
+ var ttd = {
651
+ error: "Error!"
652
+ };
653
+ var chat = {
654
+ inputPlaceholder: "Start typing your diagram idea here... ({{shortcut}} for new line)",
655
+ inputPlaceholderWithMessages: "Continue refining your diagram...",
656
+ generating: "Generating...",
657
+ rateLimitRemaining: "{{count}} requests left today",
658
+ role: {
659
+ user: "You",
660
+ assistant: "AI Assistant",
661
+ system: "System"
662
+ },
663
+ aiBeta: "AI Beta",
664
+ label: "Chat",
665
+ menu: "Menu",
666
+ newChat: "New Chat",
667
+ deleteChat: "Delete chat",
668
+ deleteMessage: "Delete message",
669
+ viewAsMermaid: "View as Mermaid",
670
+ placeholder: {
671
+ title: "Let's design your diagram",
672
+ description: "Describe the diagram you want to create, and we'll generate it for you.",
673
+ hint: "At the moment we know Flowchart, Sequence, Class, State, and Entity Relationship diagrams."
674
+ },
675
+ preview: "Preview",
676
+ insert: "Insert",
677
+ retry: "Retry",
678
+ errors: {
679
+ promptTooShort: "Prompt is too short (min {{min}} characters)",
680
+ promptTooLong: "Prompt is too long (max {{max}} characters)",
681
+ generationFailed: "Generation failed",
682
+ invalidDiagram: "Generated an invalid diagram :(. You may edit manually, retry with auto-fix, or try a different prompt.",
683
+ fixInMermaid: "Edit Mermaid manually \u2192",
684
+ aiRepair: "Regenerate (auto-fix) \u2192",
685
+ requestAborted: "Request aborted",
686
+ requestFailed: "Request failed",
687
+ mermaidParseError: "Mermaid syntax error"
688
+ },
689
+ rateLimit: {
690
+ messageLimit: "You've hit your AI limit on the free plan. Try out Excalidraw+ for more or come back tomorrow.",
691
+ generalRateLimit: "Hold your horses, you're too fast for us! Please wait a moment before trying again.",
692
+ messageLimitInputPlaceholder: "You've reached your message limit"
693
+ },
694
+ upsellBtnLabel: "Upgrade to Plus"
618
695
  };
619
696
  var quickSearch = {
620
697
  placeholder: "Quick search"
@@ -681,6 +758,7 @@ var en_default = {
681
758
  shareDialog,
682
759
  roomDialog,
683
760
  errorDialog,
761
+ progressDialog,
684
762
  exportDialog,
685
763
  helpDialog,
686
764
  clearCanvasDialog,
@@ -696,6 +774,8 @@ var en_default = {
696
774
  colorPicker,
697
775
  overwriteConfirm,
698
776
  mermaid,
777
+ ttd,
778
+ chat,
699
779
  quickSearch,
700
780
  fontList,
701
781
  userList,
@@ -720,6 +800,7 @@ export {
720
800
  shareDialog,
721
801
  roomDialog,
722
802
  errorDialog,
803
+ progressDialog,
723
804
  exportDialog,
724
805
  helpDialog,
725
806
  clearCanvasDialog,
@@ -735,6 +816,8 @@ export {
735
816
  colorPicker,
736
817
  overwriteConfirm,
737
818
  mermaid,
819
+ ttd,
820
+ chat,
738
821
  quickSearch,
739
822
  fontList,
740
823
  userList,
@@ -742,4 +825,4 @@ export {
742
825
  keys,
743
826
  en_default
744
827
  };
745
- //# sourceMappingURL=chunk-QXIM7HQU.js.map
828
+ //# sourceMappingURL=chunk-PM32OSOR.js.map