@dwelle/excalidraw 0.5.0-abd0a1f → 0.5.0-aee77a4

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 (409) hide show
  1. package/CHANGELOG.md +152 -0
  2. package/README.md +111 -14
  3. package/dist/dev/{chunk-HLABF5RW.js → chunk-7PSZ5NAU.js} +2 -2
  4. package/dist/dev/{chunk-H7AEBD3S.js → chunk-KMKDSKPP.js} +6480 -3725
  5. package/dist/dev/chunk-KMKDSKPP.js.map +7 -0
  6. package/dist/dev/{chunk-QXIM7HQU.js → chunk-L5TK3F2L.js} +87 -5
  7. package/dist/dev/chunk-L5TK3F2L.js.map +7 -0
  8. package/dist/dev/chunk-URPEKBQ3.js +69 -0
  9. package/dist/dev/chunk-URPEKBQ3.js.map +7 -0
  10. package/dist/dev/components/TTDDialog/CodeMirrorEditor-33NYKHBV.js +259 -0
  11. package/dist/dev/components/TTDDialog/CodeMirrorEditor-33NYKHBV.js.map +7 -0
  12. package/dist/dev/data/{image-J6JG4BTI.js → image-F4QVJM47.js} +3 -3
  13. package/dist/dev/index.css +1122 -217
  14. package/dist/dev/index.css.map +3 -3
  15. package/dist/dev/index.js +9666 -4848
  16. package/dist/dev/index.js.map +4 -4
  17. package/dist/dev/locales/{ar-SA-JK5MQ7TT.js → ar-SA-AGVJN2FU.js} +57 -3
  18. package/dist/dev/locales/{ar-SA-JK5MQ7TT.js.map → ar-SA-AGVJN2FU.js.map} +2 -2
  19. package/dist/dev/locales/{az-AZ-2PAD62G4.js → az-AZ-62IXPX5D.js} +56 -2
  20. package/dist/dev/locales/{az-AZ-2PAD62G4.js.map → az-AZ-62IXPX5D.js.map} +2 -2
  21. package/dist/dev/locales/{bg-BG-HUKVYCRK.js → bg-BG-UBDZF4KA.js} +57 -3
  22. package/dist/dev/locales/{bg-BG-HUKVYCRK.js.map → bg-BG-UBDZF4KA.js.map} +2 -2
  23. package/dist/dev/locales/{bn-BD-V2CQI46P.js → bn-BD-4TAUVZOD.js} +56 -2
  24. package/dist/dev/locales/{bn-BD-V2CQI46P.js.map → bn-BD-4TAUVZOD.js.map} +2 -2
  25. package/dist/dev/locales/{bn-IN-MBEO4C3J.js → bn-IN-PUGL2LDE.js} +56 -2
  26. package/dist/dev/locales/{bn-IN-MBEO4C3J.js.map → bn-IN-PUGL2LDE.js.map} +2 -2
  27. package/dist/dev/locales/{ca-ES-KWEKW4C3.js → ca-ES-GEEW5L7T.js} +57 -3
  28. package/dist/dev/locales/{ca-ES-KWEKW4C3.js.map → ca-ES-GEEW5L7T.js.map} +2 -2
  29. package/dist/dev/locales/{cs-CZ-W5AHZB5H.js → cs-CZ-LNVE3QM5.js} +57 -3
  30. package/dist/dev/locales/{cs-CZ-W5AHZB5H.js.map → cs-CZ-LNVE3QM5.js.map} +2 -2
  31. package/dist/dev/locales/{da-DK-ITTM6YM4.js → da-DK-CAYJG7FJ.js} +56 -2
  32. package/dist/dev/locales/{da-DK-ITTM6YM4.js.map → da-DK-CAYJG7FJ.js.map} +2 -2
  33. package/dist/dev/locales/{de-CH-OAWPDQFJ.js → de-CH-GCXOD4LK.js} +63 -9
  34. package/dist/dev/locales/de-CH-GCXOD4LK.js.map +7 -0
  35. package/dist/dev/locales/{de-DE-ZRDYEPMS.js → de-DE-CGDBECYD.js} +57 -3
  36. package/dist/dev/locales/{de-DE-ZRDYEPMS.js.map → de-DE-CGDBECYD.js.map} +2 -2
  37. package/dist/dev/locales/{el-GR-QXASZLPE.js → el-GR-G5QZC24A.js} +57 -3
  38. package/dist/dev/locales/{el-GR-QXASZLPE.js.map → el-GR-G5QZC24A.js.map} +2 -2
  39. package/dist/dev/locales/{en-44H6FWTU.js → en-7NUPYLED.js} +8 -2
  40. package/dist/dev/locales/{es-ES-VLQBB7FJ.js → es-ES-UMEOH76W.js} +57 -3
  41. package/dist/dev/locales/{es-ES-VLQBB7FJ.js.map → es-ES-UMEOH76W.js.map} +2 -2
  42. package/dist/dev/locales/{eu-ES-TF2DGTZU.js → eu-ES-IWRZXJC5.js} +57 -3
  43. package/dist/dev/locales/{eu-ES-TF2DGTZU.js.map → eu-ES-IWRZXJC5.js.map} +2 -2
  44. package/dist/dev/locales/{fa-IR-ITKFQ7QV.js → fa-IR-QOYVIIJA.js} +57 -3
  45. package/dist/dev/locales/{fa-IR-ITKFQ7QV.js.map → fa-IR-QOYVIIJA.js.map} +2 -2
  46. package/dist/dev/locales/{fi-FI-UWZRVXFI.js → fi-FI-BXRW65OA.js} +57 -3
  47. package/dist/dev/locales/{fi-FI-UWZRVXFI.js.map → fi-FI-BXRW65OA.js.map} +2 -2
  48. package/dist/dev/locales/{fr-FR-A72LKGCO.js → fr-FR-R2QH5VCW.js} +57 -3
  49. package/dist/dev/locales/{fr-FR-A72LKGCO.js.map → fr-FR-R2QH5VCW.js.map} +2 -2
  50. package/dist/dev/locales/{gl-ES-2QCVIBFP.js → gl-ES-4ES3ZADP.js} +57 -3
  51. package/dist/dev/locales/{gl-ES-2QCVIBFP.js.map → gl-ES-4ES3ZADP.js.map} +2 -2
  52. package/dist/dev/locales/{he-IL-WJNUHU26.js → he-IL-TRQRRYPH.js} +57 -3
  53. package/dist/dev/locales/{he-IL-WJNUHU26.js.map → he-IL-TRQRRYPH.js.map} +2 -2
  54. package/dist/dev/locales/{hi-IN-XGMO235V.js → hi-IN-U46BOJEC.js} +66 -12
  55. package/dist/dev/locales/hi-IN-U46BOJEC.js.map +7 -0
  56. package/dist/dev/locales/{hu-HU-37FDQFIS.js → hu-HU-JDULJ6XL.js} +146 -92
  57. package/dist/dev/locales/hu-HU-JDULJ6XL.js.map +7 -0
  58. package/dist/dev/locales/{id-ID-EJIDCO4E.js → id-ID-BLIXNCUT.js} +57 -3
  59. package/dist/dev/locales/{id-ID-EJIDCO4E.js.map → id-ID-BLIXNCUT.js.map} +2 -2
  60. package/dist/dev/locales/{it-IT-X34PIOJ2.js → it-IT-6TBW7RUK.js} +57 -3
  61. package/dist/dev/locales/{it-IT-X34PIOJ2.js.map → it-IT-6TBW7RUK.js.map} +2 -2
  62. package/dist/dev/locales/{ja-JP-37FC23PR.js → ja-JP-6HYAQFYX.js} +57 -3
  63. package/dist/dev/locales/{ja-JP-37FC23PR.js.map → ja-JP-6HYAQFYX.js.map} +2 -2
  64. package/dist/dev/locales/{kaa-7ZYDFVKA.js → kaa-Z5UP62XJ.js} +56 -2
  65. package/dist/dev/locales/{kaa-7ZYDFVKA.js.map → kaa-Z5UP62XJ.js.map} +2 -2
  66. package/dist/dev/locales/{kab-KAB-MILWXBA6.js → kab-KAB-Z7STWQKS.js} +57 -3
  67. package/dist/dev/locales/{kab-KAB-MILWXBA6.js.map → kab-KAB-Z7STWQKS.js.map} +2 -2
  68. package/dist/dev/locales/{kk-KZ-7BWTPIAV.js → kk-KZ-BWHY45DX.js} +56 -2
  69. package/dist/dev/locales/{kk-KZ-7BWTPIAV.js.map → kk-KZ-BWHY45DX.js.map} +2 -2
  70. package/dist/dev/locales/{km-KH-BV4P2KSZ.js → km-KH-HGLNWNRU.js} +57 -3
  71. package/dist/dev/locales/{km-KH-BV4P2KSZ.js.map → km-KH-HGLNWNRU.js.map} +2 -2
  72. package/dist/dev/locales/{ko-KR-TSXE5P7B.js → ko-KR-CO36WKPC.js} +57 -3
  73. package/dist/dev/locales/{ko-KR-TSXE5P7B.js.map → ko-KR-CO36WKPC.js.map} +2 -2
  74. package/dist/dev/locales/{ku-TR-ASSXNN3U.js → ku-TR-AACVIARC.js} +57 -3
  75. package/dist/dev/locales/{ku-TR-ASSXNN3U.js.map → ku-TR-AACVIARC.js.map} +2 -2
  76. package/dist/dev/locales/{lt-LT-G7RZYQQU.js → lt-LT-CFYYFLDV.js} +56 -2
  77. package/dist/dev/locales/{lt-LT-G7RZYQQU.js.map → lt-LT-CFYYFLDV.js.map} +2 -2
  78. package/dist/dev/locales/{lv-LV-DXNPBJZU.js → lv-LV-QCBBOFFU.js} +57 -3
  79. package/dist/dev/locales/{lv-LV-DXNPBJZU.js.map → lv-LV-QCBBOFFU.js.map} +2 -2
  80. package/dist/dev/locales/{mr-IN-7F2ZCTCF.js → mr-IN-B2CM5GK5.js} +57 -3
  81. package/dist/dev/locales/{mr-IN-7F2ZCTCF.js.map → mr-IN-B2CM5GK5.js.map} +2 -2
  82. package/dist/dev/locales/{my-MM-NBI3KQGW.js → my-MM-756BNN36.js} +56 -2
  83. package/dist/dev/locales/{my-MM-NBI3KQGW.js.map → my-MM-756BNN36.js.map} +2 -2
  84. package/dist/dev/locales/{nb-NO-4DCTQT6L.js → nb-NO-5BLHQI4J.js} +57 -3
  85. package/dist/dev/locales/{nb-NO-4DCTQT6L.js.map → nb-NO-5BLHQI4J.js.map} +2 -2
  86. package/dist/dev/locales/{nl-NL-XGZJ7V2V.js → nl-NL-225BLGAH.js} +58 -4
  87. package/dist/dev/locales/nl-NL-225BLGAH.js.map +7 -0
  88. package/dist/dev/locales/{nn-NO-FR534JV5.js → nn-NO-4J7MR6GH.js} +56 -2
  89. package/dist/dev/locales/{nn-NO-FR534JV5.js.map → nn-NO-4J7MR6GH.js.map} +2 -2
  90. package/dist/dev/locales/{oc-FR-YQCIKZIK.js → oc-FR-XCETH7KF.js} +57 -3
  91. package/dist/dev/locales/{oc-FR-YQCIKZIK.js.map → oc-FR-XCETH7KF.js.map} +2 -2
  92. package/dist/dev/locales/{pa-IN-UM43JGD2.js → pa-IN-32NBAN5L.js} +57 -3
  93. package/dist/dev/locales/{pa-IN-UM43JGD2.js.map → pa-IN-32NBAN5L.js.map} +2 -2
  94. package/dist/dev/locales/{percentages-OGWD7R2K.js → percentages-ZRLRVMSI.js} +2 -2
  95. package/dist/dev/locales/{pl-PL-2UGKA6HK.js → pl-PL-R6OJ54BT.js} +57 -3
  96. package/dist/dev/locales/{pl-PL-2UGKA6HK.js.map → pl-PL-R6OJ54BT.js.map} +2 -2
  97. package/dist/dev/locales/{pt-BR-H23QFYE3.js → pt-BR-7AFGAKGR.js} +57 -3
  98. package/dist/dev/locales/{pt-BR-H23QFYE3.js.map → pt-BR-7AFGAKGR.js.map} +2 -2
  99. package/dist/dev/locales/{pt-PT-RHKJH5I5.js → pt-PT-S6BMW6MY.js} +57 -3
  100. package/dist/dev/locales/{pt-PT-RHKJH5I5.js.map → pt-PT-S6BMW6MY.js.map} +2 -2
  101. package/dist/dev/locales/{ro-RO-IIFONL3T.js → ro-RO-4JVGQHS2.js} +57 -3
  102. package/dist/dev/locales/{ro-RO-IIFONL3T.js.map → ro-RO-4JVGQHS2.js.map} +2 -2
  103. package/dist/dev/locales/{ru-RU-QEP6D7GK.js → ru-RU-IESI752T.js} +59 -5
  104. package/dist/dev/locales/ru-RU-IESI752T.js.map +7 -0
  105. package/dist/dev/locales/{si-LK-LZYJQLHF.js → si-LK-H75E7PKD.js} +57 -3
  106. package/dist/dev/locales/{si-LK-LZYJQLHF.js.map → si-LK-H75E7PKD.js.map} +2 -2
  107. package/dist/dev/locales/{sk-SK-RWC6UWGY.js → sk-SK-EUK2NR2F.js} +57 -3
  108. package/dist/dev/locales/{sk-SK-RWC6UWGY.js.map → sk-SK-EUK2NR2F.js.map} +2 -2
  109. package/dist/dev/locales/{sl-SI-QJT2CAUO.js → sl-SI-AKW7R5PW.js} +57 -3
  110. package/dist/dev/locales/{sl-SI-QJT2CAUO.js.map → sl-SI-AKW7R5PW.js.map} +2 -2
  111. package/dist/dev/locales/{sv-SE-3MAT3NDX.js → sv-SE-QIBOOXLJ.js} +57 -3
  112. package/dist/dev/locales/{sv-SE-3MAT3NDX.js.map → sv-SE-QIBOOXLJ.js.map} +2 -2
  113. package/dist/dev/locales/{ta-IN-J7XOYF2T.js → ta-IN-LBK2NQ5K.js} +56 -2
  114. package/dist/dev/locales/{ta-IN-J7XOYF2T.js.map → ta-IN-LBK2NQ5K.js.map} +2 -2
  115. package/dist/dev/locales/{th-TH-2OI52EOQ.js → th-TH-YJ2E6GVT.js} +56 -2
  116. package/dist/dev/locales/{th-TH-2OI52EOQ.js.map → th-TH-YJ2E6GVT.js.map} +2 -2
  117. package/dist/dev/locales/{tr-TR-G7TAUHUI.js → tr-TR-Y5GO2XJW.js} +57 -3
  118. package/dist/dev/locales/{tr-TR-G7TAUHUI.js.map → tr-TR-Y5GO2XJW.js.map} +2 -2
  119. package/dist/dev/locales/{uk-UA-IVSVBJIG.js → uk-UA-XYAFHHJW.js} +57 -3
  120. package/dist/dev/locales/{uk-UA-IVSVBJIG.js.map → uk-UA-XYAFHHJW.js.map} +2 -2
  121. package/dist/dev/locales/{uz-UZ-KCVDUVDE.js → uz-UZ-LF3CBRYE.js} +56 -2
  122. package/dist/dev/locales/{uz-UZ-KCVDUVDE.js.map → uz-UZ-LF3CBRYE.js.map} +2 -2
  123. package/dist/dev/locales/{vi-VN-KBZAVWP5.js → vi-VN-WDPZEUOJ.js} +56 -2
  124. package/dist/dev/locales/{vi-VN-KBZAVWP5.js.map → vi-VN-WDPZEUOJ.js.map} +2 -2
  125. package/dist/dev/locales/{zh-CN-IS26RG2D.js → zh-CN-SZ37453H.js} +57 -3
  126. package/dist/dev/locales/{zh-CN-IS26RG2D.js.map → zh-CN-SZ37453H.js.map} +2 -2
  127. package/dist/dev/locales/{zh-HK-KBWQ6SJC.js → zh-HK-QDQ5QNBC.js} +56 -2
  128. package/dist/dev/locales/{zh-HK-KBWQ6SJC.js.map → zh-HK-QDQ5QNBC.js.map} +2 -2
  129. package/dist/dev/locales/{zh-TW-JKJWJQ4J.js → zh-TW-CYU6GFBV.js} +57 -3
  130. package/dist/dev/locales/{zh-TW-JKJWJQ4J.js.map → zh-TW-CYU6GFBV.js.map} +2 -2
  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-2EAGZNAM.js +34 -0
  134. package/dist/prod/chunk-3PELD44J.js +1 -0
  135. package/dist/prod/{chunk-IMFBDYQ2.js → chunk-GQMIMNEC.js} +1 -1
  136. package/dist/prod/chunk-YI6WNTBI.js +12 -0
  137. package/dist/prod/components/TTDDialog/CodeMirrorEditor-MVUGL3IG.js +1 -0
  138. package/dist/prod/data/image-45GW2AOF.js +1 -0
  139. package/dist/prod/index.css +1 -1
  140. package/dist/prod/index.js +39 -22
  141. package/dist/prod/locales/{ar-SA-IYHKZRSE.js → ar-SA-NXDWD63E.js} +2 -2
  142. package/dist/prod/locales/{az-AZ-WL5GYRHK.js → az-AZ-MXSORGZV.js} +1 -1
  143. package/dist/prod/locales/{bg-BG-FXZYTRPD.js → bg-BG-O6MV2KSF.js} +3 -3
  144. package/dist/prod/locales/{bn-BD-KO6YL5G2.js → bn-BD-T2VJNT7N.js} +2 -2
  145. package/dist/prod/locales/{bn-IN-PC6JHKYB.js → bn-IN-MMW2ORAC.js} +2 -2
  146. package/dist/prod/locales/{ca-ES-AREX5NEO.js → ca-ES-MKBCGNOG.js} +3 -3
  147. package/dist/prod/locales/{cs-CZ-HXAZMFYH.js → cs-CZ-V77HGUP7.js} +2 -2
  148. package/dist/prod/locales/{da-DK-5X7ZLFU3.js → da-DK-I5RFNTM4.js} +2 -2
  149. package/dist/prod/locales/{de-DE-G3JVZ4MQ.js → de-CH-WLRDEVBV.js} +3 -3
  150. package/dist/prod/locales/{de-CH-76ZNVSOF.js → de-DE-DTI4WUSC.js} +4 -4
  151. package/dist/prod/locales/{el-GR-4AZTZGY6.js → el-GR-ZXDJ2OS4.js} +3 -3
  152. package/dist/prod/locales/en-WABAEZHC.js +1 -0
  153. package/dist/prod/locales/{es-ES-ART7BI3G.js → es-ES-DYQHAD43.js} +2 -2
  154. package/dist/prod/locales/{eu-ES-BIF4XBMT.js → eu-ES-QDSYU5Y3.js} +3 -3
  155. package/dist/prod/locales/{fa-IR-D4HHKAAI.js → fa-IR-26LZG4PM.js} +3 -3
  156. package/dist/prod/locales/{fi-FI-O35ZY7UI.js → fi-FI-6YS4KDE4.js} +2 -2
  157. package/dist/prod/locales/{fr-FR-XEFNCM4I.js → fr-FR-BRLLPTZC.js} +2 -2
  158. package/dist/prod/locales/{gl-ES-U4NYM3X5.js → gl-ES-OKUZTLYG.js} +3 -3
  159. package/dist/prod/locales/{he-IL-656ABAVQ.js → he-IL-26MGYIU7.js} +3 -3
  160. package/dist/prod/locales/hi-IN-Q4ZOGTP2.js +3 -0
  161. package/dist/prod/locales/hu-HU-P2OXPSN5.js +3 -0
  162. package/dist/prod/locales/{id-ID-FLZFU3OO.js → id-ID-2EIKXYN6.js} +3 -3
  163. package/dist/prod/locales/{it-IT-GIGIGIBJ.js → it-IT-4CFKVXI2.js} +4 -4
  164. package/dist/prod/locales/{ja-JP-43VXGDWI.js → ja-JP-MAND2Z4V.js} +4 -4
  165. package/dist/prod/locales/{kaa-L3IMSDYL.js → kaa-HQRTCXTJ.js} +1 -1
  166. package/dist/prod/locales/{kab-KAB-XKPWJLNL.js → kab-KAB-JKIKKTGH.js} +2 -2
  167. package/dist/prod/locales/{kk-KZ-SXPDDY2H.js → kk-KZ-HXQ63ZFC.js} +1 -1
  168. package/dist/prod/locales/{km-KH-DOS4CPGC.js → km-KH-PKL3LSGX.js} +3 -3
  169. package/dist/prod/locales/{ko-KR-BGC6VCY4.js → ko-KR-KXLREZX3.js} +2 -2
  170. package/dist/prod/locales/{ku-TR-J7IUITIA.js → ku-TR-MJ4IER3X.js} +3 -3
  171. package/dist/prod/locales/{lt-LT-AC3LV5KG.js → lt-LT-H6WFQ6FJ.js} +2 -2
  172. package/dist/prod/locales/{lv-LV-I6AY7QG2.js → lv-LV-GOCK6SJW.js} +2 -2
  173. package/dist/prod/locales/{mr-IN-5SP4HV5B.js → mr-IN-IXVLDMEQ.js} +2 -2
  174. package/dist/prod/locales/{my-MM-S7ECRBYZ.js → my-MM-YG6MYTTD.js} +1 -1
  175. package/dist/prod/locales/{nb-NO-6PNHTF4R.js → nb-NO-XGWJISD2.js} +3 -3
  176. package/dist/prod/locales/{nl-NL-R4C4SUIG.js → nl-NL-XVDVCPNC.js} +4 -4
  177. package/dist/prod/locales/{nn-NO-3TFXTM7Y.js → nn-NO-EMX5MJX5.js} +2 -2
  178. package/dist/prod/locales/{oc-FR-IK6GIE7H.js → oc-FR-ROEINTVO.js} +2 -2
  179. package/dist/prod/locales/{pa-IN-YAKHYJET.js → pa-IN-ZYN6SUDY.js} +1 -1
  180. package/dist/prod/locales/percentages-5DKR754L.js +1 -0
  181. package/dist/prod/locales/{pl-PL-BIY22ZWU.js → pl-PL-6VTG7PHC.js} +3 -3
  182. package/dist/prod/locales/{pt-BR-Q23NUPD6.js → pt-BR-5YFKRR5G.js} +2 -2
  183. package/dist/prod/locales/{pt-PT-LOPEJLPJ.js → pt-PT-GEIXXZ67.js} +1 -1
  184. package/dist/prod/locales/{ro-RO-W3D2ZATV.js → ro-RO-E2P6TFZI.js} +4 -4
  185. package/dist/prod/locales/{ru-RU-DCTW7QSH.js → ru-RU-YBIIY43T.js} +4 -4
  186. package/dist/prod/locales/{si-LK-FYRRHO3C.js → si-LK-673C2CI2.js} +1 -1
  187. package/dist/prod/locales/{sk-SK-MC7UOHQO.js → sk-SK-CKZHQ4AP.js} +2 -2
  188. package/dist/prod/locales/{sl-SI-L6B6HFY5.js → sl-SI-557H2GWM.js} +2 -2
  189. package/dist/prod/locales/{sv-SE-KMY6L2BA.js → sv-SE-XOPKKDWS.js} +3 -3
  190. package/dist/prod/locales/{ta-IN-ZQCYE2JK.js → ta-IN-XBH7DQI3.js} +3 -3
  191. package/dist/prod/locales/{th-TH-WS7ECBAV.js → th-TH-TOCWH3R4.js} +1 -1
  192. package/dist/prod/locales/{tr-TR-S5FI7JRW.js → tr-TR-GXW6CYY5.js} +2 -2
  193. package/dist/prod/locales/{uk-UA-4EZUWUSQ.js → uk-UA-IJKTNUDG.js} +3 -3
  194. package/dist/prod/locales/{uz-UZ-OKHL6AFA.js → uz-UZ-TBZZEA4V.js} +1 -1
  195. package/dist/prod/locales/{vi-VN-K34TWHF7.js → vi-VN-MULSGNVB.js} +3 -3
  196. package/dist/prod/locales/{zh-CN-JE4UZWNO.js → zh-CN-MVX3E32U.js} +3 -3
  197. package/dist/prod/locales/{zh-HK-RM35YDXX.js → zh-HK-JNU5RLIE.js} +1 -1
  198. package/dist/prod/locales/{zh-TW-ONGLV6Y5.js → zh-TW-LENVCA6T.js} +3 -3
  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/utils.d.ts +4 -50
  208. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  209. package/dist/types/element/src/Scene.d.ts +7 -3
  210. package/dist/types/element/src/arrowheads.d.ts +3 -0
  211. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  212. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  213. package/dist/types/element/src/binding.d.ts +13 -8
  214. package/dist/types/element/src/bounds.d.ts +22 -7
  215. package/dist/types/element/src/collision.d.ts +4 -3
  216. package/dist/types/element/src/comparisons.d.ts +1 -0
  217. package/dist/types/element/src/distribute.d.ts +2 -1
  218. package/dist/types/element/src/duplicate.d.ts +1 -0
  219. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  220. package/dist/types/element/src/frame.d.ts +7 -6
  221. package/dist/types/element/src/groups.d.ts +3 -3
  222. package/dist/types/element/src/index.d.ts +3 -0
  223. package/dist/types/element/src/linearElementEditor.d.ts +7 -2
  224. package/dist/types/element/src/mutateElement.d.ts +2 -0
  225. package/dist/types/element/src/newElement.d.ts +1 -0
  226. package/dist/types/element/src/selection.d.ts +8 -4
  227. package/dist/types/element/src/shape.d.ts +1 -1
  228. package/dist/types/element/src/textElement.d.ts +1 -1
  229. package/dist/types/element/src/textWrapping.d.ts +26 -0
  230. package/dist/types/element/src/typeChecks.d.ts +1 -0
  231. package/dist/types/element/src/types.d.ts +11 -2
  232. package/dist/types/element/src/utils.d.ts +6 -4
  233. package/dist/types/element/src/zindex.d.ts +1 -1
  234. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +50 -44
  235. package/dist/types/excalidraw/actions/actionBoundText.d.ts +35 -31
  236. package/dist/types/excalidraw/actions/actionCanvas.d.ts +538 -550
  237. package/dist/types/excalidraw/actions/actionClipboard.d.ts +34 -30
  238. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +17 -15
  239. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +54 -46
  240. package/dist/types/excalidraw/actions/actionDeselect.d.ts +161 -0
  241. package/dist/types/excalidraw/actions/actionElementLink.d.ts +13 -15
  242. package/dist/types/excalidraw/actions/actionElementLock.d.ts +35 -31
  243. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +17 -15
  244. package/dist/types/excalidraw/actions/actionExport.d.ts +131 -402
  245. package/dist/types/excalidraw/actions/actionFrame.d.ts +81 -72
  246. package/dist/types/excalidraw/actions/actionGroup.d.ts +50 -46
  247. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +22 -17
  248. package/dist/types/excalidraw/actions/actionLink.d.ts +18 -16
  249. package/dist/types/excalidraw/actions/actionMenu.d.ts +13 -15
  250. package/dist/types/excalidraw/actions/actionProperties.d.ts +46 -33
  251. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +18 -16
  252. package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -14
  253. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  254. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +174 -0
  255. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +21 -20
  256. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +174 -0
  257. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +18 -16
  258. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +17 -20
  259. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  260. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +18 -16
  261. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +18 -16
  262. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +18 -16
  263. package/dist/types/excalidraw/actions/index.d.ts +4 -1
  264. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  265. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  266. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  267. package/dist/types/excalidraw/appState.d.ts +25 -21
  268. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  269. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  270. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  271. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  272. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  273. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  274. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  275. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  276. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  277. package/dist/types/excalidraw/components/Actions.d.ts +2 -3
  278. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  279. package/dist/types/excalidraw/components/App.d.ts +110 -52
  280. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  281. package/dist/types/excalidraw/components/Card.d.ts +1 -2
  282. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +0 -5
  283. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
  284. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  285. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  286. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  287. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
  288. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  289. package/dist/types/excalidraw/components/FilledButton.d.ts +1 -0
  290. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  291. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  292. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  293. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  294. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  295. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  296. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  297. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  298. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  299. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  300. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  301. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  302. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  303. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  304. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  305. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  306. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  307. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  308. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  309. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -28
  310. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  311. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -1
  312. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  313. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  314. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  315. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  316. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +14 -13
  317. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  318. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  319. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  320. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  321. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  322. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  323. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  324. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  325. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  326. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  327. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  328. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  329. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
  330. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  331. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  332. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -16
  333. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  334. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -12
  335. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  336. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
  337. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  338. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  339. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  340. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  341. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  342. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  343. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
  344. package/dist/types/excalidraw/components/icons.d.ts +30 -10
  345. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
  346. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -14
  347. package/dist/types/excalidraw/components/shapes.d.ts +81 -1
  348. package/dist/types/excalidraw/data/blob.d.ts +157 -152
  349. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  350. package/dist/types/excalidraw/data/index.d.ts +2 -3
  351. package/dist/types/excalidraw/data/json.d.ts +88 -77
  352. package/dist/types/excalidraw/data/library.d.ts +1 -1
  353. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  354. package/dist/types/excalidraw/data/restore.d.ts +1 -1
  355. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  356. package/dist/types/excalidraw/errors.d.ts +14 -0
  357. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  358. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  359. package/dist/types/excalidraw/index.d.ts +31 -6
  360. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  361. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  362. package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
  363. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -3
  364. package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
  365. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  366. package/dist/types/excalidraw/scene/types.d.ts +0 -3
  367. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  368. package/dist/types/excalidraw/types.d.ts +264 -56
  369. package/dist/types/excalidraw/viewport.d.ts +316 -0
  370. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  371. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  372. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  373. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  374. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  375. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  376. package/dist/types/math/src/constants.d.ts +0 -1
  377. package/dist/types/math/src/curve.d.ts +4 -1
  378. package/dist/types/math/src/point.d.ts +8 -2
  379. package/dist/types/math/src/types.d.ts +25 -1
  380. package/package.json +9 -7
  381. package/dist/dev/chunk-DJHLEOOZ.js +0 -69
  382. package/dist/dev/chunk-DJHLEOOZ.js.map +0 -7
  383. package/dist/dev/chunk-H7AEBD3S.js.map +0 -7
  384. package/dist/dev/chunk-QXIM7HQU.js.map +0 -7
  385. package/dist/dev/locales/de-CH-OAWPDQFJ.js.map +0 -7
  386. package/dist/dev/locales/hi-IN-XGMO235V.js.map +0 -7
  387. package/dist/dev/locales/hu-HU-37FDQFIS.js.map +0 -7
  388. package/dist/dev/locales/nl-NL-XGZJ7V2V.js.map +0 -7
  389. package/dist/dev/locales/ru-RU-QEP6D7GK.js.map +0 -7
  390. package/dist/prod/chunk-2GRP4Q3X.js +0 -33
  391. package/dist/prod/chunk-AJI3LATG.js +0 -1
  392. package/dist/prod/chunk-UYOW6QDE.js +0 -12
  393. package/dist/prod/data/image-XLQGG5L3.js +0 -1
  394. package/dist/prod/locales/en-4QS4OFJI.js +0 -1
  395. package/dist/prod/locales/hi-IN-Z55GAFFR.js +0 -3
  396. package/dist/prod/locales/hu-HU-UJ62DVIW.js +0 -3
  397. package/dist/prod/locales/percentages-OL6W367U.js +0 -1
  398. package/dist/types/common/src/visualdebug.d.ts +0 -41
  399. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  400. package/dist/types/excalidraw/charts.d.ts +0 -27
  401. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  402. package/dist/types/excalidraw/scene/scrollConstraints.d.ts +0 -46
  403. package/dist/types/utils/src/bbox.d.ts +0 -9
  404. package/dist/types/utils/src/index.d.ts +0 -4
  405. package/dist/types/utils/src/withinBounds.d.ts +0 -19
  406. /package/dist/dev/{chunk-HLABF5RW.js.map → chunk-7PSZ5NAU.js.map} +0 -0
  407. /package/dist/dev/data/{image-J6JG4BTI.js.map → image-F4QVJM47.js.map} +0 -0
  408. /package/dist/dev/locales/{en-44H6FWTU.js.map → en-7NUPYLED.js.map} +0 -0
  409. /package/dist/dev/locales/{percentages-OGWD7R2K.js.map → percentages-ZRLRVMSI.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -11,8 +11,160 @@ 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
+ ### Viewport control & scroll/zoom locking
19
+
20
+ `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 [#11554](https://github.com/excalidraw/excalidraw/pull/11554).
21
+
22
+ #### Breaking changes
23
+
24
+ - `ExcalidrawAPI.scrollToContent(target?, opts?)` was replaced with `ExcalidrawAPI.setViewport(opts | null)`.
25
+
26
+ ```tsx
27
+ // before
28
+ excalidrawAPI.scrollToContent(element, {
29
+ fitToViewport: true,
30
+ animate: true,
31
+ });
32
+ // after
33
+ excalidrawAPI.setViewport({ target: element, fit: "contain" });
34
+ ```
35
+
36
+ - `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.
37
+ - `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.
38
+ - `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.
39
+ - `canvasOffsets` was replaced by `offsets`, which also accepts UI-derived offsets (see Features below).
40
+ - `viewportZoomFactor`, `minZoom`, and `maxZoom` are no longer supported.
41
+
42
+ - `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.
43
+
44
+ #### Features
45
+
46
+ - `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). When the navigation is animated, the lock is installed once the viewport settles. `setViewport(null)` clears an active lock without navigating; a navigation without `lock` also supersedes a previously installed one.
47
+
48
+ - `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 the interaction settles — on touch, once the multi-finger gesture ends. Defaults to `true` = `DEFAULT_OVERSCROLL` (150px, exported from the package root); pass a number to customize, or `false` / `0` for a rigid lock. Zooming is always hard-clamped against the lock, gliding along its edge instead of overscrolling.
49
+
50
+ - 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`.
51
+
52
+ - 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.
53
+
54
+ ### Breaking changes
55
+
56
+ - `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:
57
+
58
+ ```tsx
59
+ import { useExcalidrawStateValue } from "@excalidraw/excalidraw";
60
+
61
+ const ZoomReadout = () => {
62
+ // `undefined` on initial render, before the editor API initializes
63
+ const zoomValue = useExcalidrawStateValue(
64
+ (appState) => appState.zoom.value,
65
+ );
66
+
67
+ if (zoomValue == null) {
68
+ return null;
69
+ }
70
+
71
+ return <div>{(zoomValue * 100).toFixed(0)}%</div>;
72
+ };
73
+ ```
74
+
75
+ 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.
76
+
77
+ - 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.
78
+
79
+ - `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.
80
+ - `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}`.
81
+ - `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).
82
+ - `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.
83
+
84
+ - Renamed the `excalidrawAPI` prop to `onExcalidrawAPI`.
85
+ - `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).
86
+
87
+ ### Features
88
+
89
+ - 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.
90
+
91
+ - 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.
92
+
93
+ - Same events are also accessible imperatively through `api.onEvent(...)`.
94
+
95
+ ```tsx
96
+ <Excalidraw
97
+ onExcalidrawAPI={(api) => {
98
+ api.onEvent("editor:mount", ({ excalidrawAPI, container }) => {
99
+ console.log(container);
100
+ });
101
+
102
+ api.onEvent("editor:initialize").then((readyApi) => {
103
+ readyApi.setViewport({
104
+ target: readyApi.getSceneElements(),
105
+ animation: false,
106
+ });
107
+ });
108
+ }}
109
+ />
110
+ ```
111
+
112
+ Note that in future releases, most, if not all, `excalidrawAPI.on*` subscriptions will be removed in favor of `excalidrawAPI.onEvent(name)`.
113
+
114
+ - Also added `"editor:unmount"` lifecycle event, only accessible via `api.onEvent("editor:unmount")`.
115
+
116
+ - 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)`.
117
+
118
+ ```tsx
119
+ <ExcalidrawAPIProvider>
120
+ <Excalidraw />
121
+ <Logger />
122
+ </ExcalidrawAPIProvider>;
123
+
124
+ function Logger() {
125
+ // initially null before the ExcalidrawAPIProvider initializes after
126
+ // <Excalidraw/> renders
127
+ // When <Excalidraw/> unmounts, is reset back to null
128
+ const api = useExcalidrawAPI();
129
+
130
+ useExcalidrawStateValue("viewModeEnabled", (viewModeEnabled) => {
131
+ console.log("view mode changed:", viewModeEnabled);
132
+ });
133
+
134
+ React.useEffect(() => {
135
+ if (api) {
136
+ console.log("editor instance id:", api.id);
137
+ }
138
+ }, [api]);
139
+
140
+ return null;
141
+ }
142
+ ```
143
+
144
+ - 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.
145
+
146
+ ```tsx
147
+ <Excalidraw
148
+ onExport={async function* (_type, { files }, { signal }) {
149
+ yield { type: "progress", message: "Waiting for images..." };
150
+
151
+ await waitForImagesToLoad(files, signal);
152
+
153
+ if (signal.aborted) {
154
+ return;
155
+ }
156
+
157
+ yield { type: "progress", message: "Export ready", progress: 1 };
158
+ }}
159
+ />
160
+ ```
161
+
14
162
  ## Excalidraw Library
15
163
 
164
+ ### Breaking changes
165
+
166
+ - `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).
167
+
16
168
  ## 0.18.0 (2025-03-11)
17
169
 
18
170
  ### 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).
@@ -1,7 +1,7 @@
1
1
  // <define:import.meta.env>
2
- var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3015", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3000", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@excalidraw/excalidraw", PKG_VERSION: "0.5.0-abd0a1f", DEV: true };
2
+ var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3016", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3001", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@excalidraw/excalidraw", PKG_VERSION: "0.5.0-aee77a4", DEV: true };
3
3
 
4
4
  export {
5
5
  define_import_meta_env_default
6
6
  };
7
- //# sourceMappingURL=chunk-HLABF5RW.js.map
7
+ //# sourceMappingURL=chunk-7PSZ5NAU.js.map