@dwelle/excalidraw 0.5.0-e6263588 → 0.5.0-e9944c4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/dev/{chunk-MYBMQLFV.js → chunk-6FPW7UII.js} +2 -2
  3. package/dist/dev/{chunk-MYBMQLFV.js.map → chunk-6FPW7UII.js.map} +1 -1
  4. package/dist/dev/{chunk-MUNVYEGW.js → chunk-A4LHQJCQ.js} +16 -3
  5. package/dist/dev/chunk-A4LHQJCQ.js.map +7 -0
  6. package/dist/dev/{chunk-GK2P2Z4N.js → chunk-MUXNIGJA.js} +5140 -3664
  7. package/dist/dev/chunk-MUXNIGJA.js.map +7 -0
  8. package/dist/dev/chunk-Q67DF2PJ.js +69 -0
  9. package/dist/dev/chunk-Q67DF2PJ.js.map +7 -0
  10. package/dist/dev/components/TTDDialog/{CodeMirrorEditor-FCA7YAIL.js → CodeMirrorEditor-XFPXQDTD.js} +2 -2
  11. package/dist/dev/data/{image-5N65CA7G.js → image-DBJ5VI3T.js} +3 -3
  12. package/dist/dev/index.css +324 -221
  13. package/dist/dev/index.css.map +3 -3
  14. package/dist/dev/index.js +3846 -1991
  15. package/dist/dev/index.js.map +4 -4
  16. package/dist/dev/locales/{ar-SA-YEOLME2Y.js → ar-SA-EW44IW4V.js} +14 -2
  17. package/dist/dev/locales/ar-SA-EW44IW4V.js.map +7 -0
  18. package/dist/dev/locales/{az-AZ-DQL36U4O.js → az-AZ-AI7WAYA2.js} +14 -2
  19. package/dist/dev/locales/az-AZ-AI7WAYA2.js.map +7 -0
  20. package/dist/dev/locales/{bg-BG-LG6R5FEQ.js → bg-BG-43ZNGDXF.js} +14 -2
  21. package/dist/dev/locales/bg-BG-43ZNGDXF.js.map +7 -0
  22. package/dist/dev/locales/{bn-BD-W63P7JT5.js → bn-BD-PU4CN7NP.js} +14 -2
  23. package/dist/dev/locales/bn-BD-PU4CN7NP.js.map +7 -0
  24. package/dist/dev/locales/{bn-IN-SCHACAA6.js → bn-IN-54CF43JL.js} +14 -2
  25. package/dist/dev/locales/bn-IN-54CF43JL.js.map +7 -0
  26. package/dist/dev/locales/{ca-ES-XP3CQTWV.js → ca-ES-RHJO3QDO.js} +14 -2
  27. package/dist/dev/locales/ca-ES-RHJO3QDO.js.map +7 -0
  28. package/dist/dev/locales/{cs-CZ-EXLEOJMD.js → cs-CZ-ZRSAO3BA.js} +14 -2
  29. package/dist/dev/locales/cs-CZ-ZRSAO3BA.js.map +7 -0
  30. package/dist/dev/locales/{da-DK-46ONLZRX.js → da-DK-OAB6DEJX.js} +14 -2
  31. package/dist/dev/locales/da-DK-OAB6DEJX.js.map +7 -0
  32. package/dist/dev/locales/{de-CH-A5QH3YGW.js → de-CH-QF7JLXTF.js} +14 -2
  33. package/dist/dev/locales/de-CH-QF7JLXTF.js.map +7 -0
  34. package/dist/dev/locales/{de-DE-FVCCKR5N.js → de-DE-5ZO4KOPT.js} +14 -2
  35. package/dist/dev/locales/de-DE-5ZO4KOPT.js.map +7 -0
  36. package/dist/dev/locales/{el-GR-SB4MX5JS.js → el-GR-F74ZSUEO.js} +14 -2
  37. package/dist/dev/locales/el-GR-F74ZSUEO.js.map +7 -0
  38. package/dist/dev/locales/{en-AZHTDC2Z.js → en-INQU5YPU.js} +2 -2
  39. package/dist/dev/locales/{es-ES-VRTYQG6S.js → es-ES-3B3IENPS.js} +14 -2
  40. package/dist/dev/locales/es-ES-3B3IENPS.js.map +7 -0
  41. package/dist/dev/locales/{eu-ES-3OHEU2YV.js → eu-ES-NH447TVU.js} +14 -2
  42. package/dist/dev/locales/eu-ES-NH447TVU.js.map +7 -0
  43. package/dist/dev/locales/{fa-IR-74WR2KXF.js → fa-IR-V44PNTTK.js} +46 -34
  44. package/dist/dev/locales/fa-IR-V44PNTTK.js.map +7 -0
  45. package/dist/dev/locales/{fi-FI-XZQC4II2.js → fi-FI-ZXSYWCC4.js} +14 -2
  46. package/dist/dev/locales/fi-FI-ZXSYWCC4.js.map +7 -0
  47. package/dist/dev/locales/{fr-FR-RABBDBKM.js → fr-FR-RJSOSEYS.js} +25 -13
  48. package/dist/dev/locales/fr-FR-RJSOSEYS.js.map +7 -0
  49. package/dist/dev/locales/{gl-ES-OU3Q6XUE.js → gl-ES-NAUVMVFY.js} +14 -2
  50. package/dist/dev/locales/gl-ES-NAUVMVFY.js.map +7 -0
  51. package/dist/dev/locales/{he-IL-6NCD5D54.js → he-IL-JBKWWR75.js} +67 -55
  52. package/dist/dev/locales/he-IL-JBKWWR75.js.map +7 -0
  53. package/dist/dev/locales/{hi-IN-M54WKOJI.js → hi-IN-SD773MVZ.js} +14 -2
  54. package/dist/dev/locales/hi-IN-SD773MVZ.js.map +7 -0
  55. package/dist/dev/locales/{hu-HU-HAW63BCI.js → hu-HU-OTA7GOAV.js} +14 -2
  56. package/dist/dev/locales/hu-HU-OTA7GOAV.js.map +7 -0
  57. package/dist/dev/locales/{id-ID-TFSPHGWX.js → id-ID-KGCGQFTT.js} +100 -88
  58. package/dist/dev/locales/id-ID-KGCGQFTT.js.map +7 -0
  59. package/dist/dev/locales/{it-IT-MH3BAO5W.js → it-IT-EWGEXMVK.js} +25 -13
  60. package/dist/dev/locales/it-IT-EWGEXMVK.js.map +7 -0
  61. package/dist/dev/locales/{ja-JP-UGJBHLX6.js → ja-JP-YMGRGBPS.js} +17 -5
  62. package/dist/dev/locales/ja-JP-YMGRGBPS.js.map +7 -0
  63. package/dist/dev/locales/{kaa-5ZUEYWIM.js → kaa-RRE7XUCW.js} +14 -2
  64. package/dist/dev/locales/kaa-RRE7XUCW.js.map +7 -0
  65. package/dist/dev/locales/{kab-KAB-RLAZQZSM.js → kab-KAB-ZCYVOJU4.js} +14 -2
  66. package/dist/dev/locales/kab-KAB-ZCYVOJU4.js.map +7 -0
  67. package/dist/dev/locales/{kk-KZ-CIP7GOIF.js → kk-KZ-TO6XEFJC.js} +14 -2
  68. package/dist/dev/locales/kk-KZ-TO6XEFJC.js.map +7 -0
  69. package/dist/dev/locales/{km-KH-YMR4247H.js → km-KH-3HTDL5HB.js} +14 -2
  70. package/dist/dev/locales/km-KH-3HTDL5HB.js.map +7 -0
  71. package/dist/dev/locales/{ko-KR-WGKQKR2R.js → ko-KR-O4L4O7L6.js} +14 -2
  72. package/dist/dev/locales/ko-KR-O4L4O7L6.js.map +7 -0
  73. package/dist/dev/locales/{ku-TR-ZSJN6TN6.js → ku-TR-AFJWDY67.js} +14 -2
  74. package/dist/dev/locales/ku-TR-AFJWDY67.js.map +7 -0
  75. package/dist/dev/locales/{lt-LT-FT6ZGIZP.js → lt-LT-7QOT2VDQ.js} +14 -2
  76. package/dist/dev/locales/lt-LT-7QOT2VDQ.js.map +7 -0
  77. package/dist/dev/locales/{lv-LV-U74YKDPR.js → lv-LV-WV6C4NYF.js} +14 -2
  78. package/dist/dev/locales/lv-LV-WV6C4NYF.js.map +7 -0
  79. package/dist/dev/locales/{mr-IN-KN72LOIA.js → mr-IN-3TLYWOEI.js} +14 -2
  80. package/dist/dev/locales/mr-IN-3TLYWOEI.js.map +7 -0
  81. package/dist/dev/locales/{my-MM-E57NLQ7W.js → my-MM-NNL2QJT3.js} +14 -2
  82. package/dist/dev/locales/my-MM-NNL2QJT3.js.map +7 -0
  83. package/dist/dev/locales/{nb-NO-FYQDWD7X.js → nb-NO-PG3XLMEV.js} +14 -2
  84. package/dist/dev/locales/nb-NO-PG3XLMEV.js.map +7 -0
  85. package/dist/dev/locales/{nl-NL-D5MZQRAC.js → nl-NL-MMOYEKKQ.js} +14 -2
  86. package/dist/dev/locales/nl-NL-MMOYEKKQ.js.map +7 -0
  87. package/dist/dev/locales/{nn-NO-5ZEUZJV4.js → nn-NO-AAC2I2YX.js} +14 -2
  88. package/dist/dev/locales/nn-NO-AAC2I2YX.js.map +7 -0
  89. package/dist/dev/locales/{oc-FR-MVW6LDAP.js → oc-FR-SR6MFB4N.js} +14 -2
  90. package/dist/dev/locales/oc-FR-SR6MFB4N.js.map +7 -0
  91. package/dist/dev/locales/{pa-IN-2NH3SVNI.js → pa-IN-ADGMQLQI.js} +14 -2
  92. package/dist/dev/locales/pa-IN-ADGMQLQI.js.map +7 -0
  93. package/dist/dev/locales/{percentages-QBBLQLIV.js → percentages-X2QIQ6XJ.js} +2 -2
  94. package/dist/dev/locales/{pl-PL-M6LYWLHY.js → pl-PL-FNIPTMVP.js} +14 -2
  95. package/dist/dev/locales/pl-PL-FNIPTMVP.js.map +7 -0
  96. package/dist/dev/locales/{pt-BR-27M3CCS7.js → pt-BR-67FMCDNE.js} +14 -2
  97. package/dist/dev/locales/pt-BR-67FMCDNE.js.map +7 -0
  98. package/dist/dev/locales/{pt-PT-V3C226NP.js → pt-PT-4G3GI4SF.js} +14 -2
  99. package/dist/dev/locales/pt-PT-4G3GI4SF.js.map +7 -0
  100. package/dist/dev/locales/{ro-RO-S4GNBAJI.js → ro-RO-CUZFN555.js} +25 -13
  101. package/dist/dev/locales/ro-RO-CUZFN555.js.map +7 -0
  102. package/dist/dev/locales/{ru-RU-CRRT5JUZ.js → ru-RU-4GHINTII.js} +14 -2
  103. package/dist/dev/locales/ru-RU-4GHINTII.js.map +7 -0
  104. package/dist/dev/locales/{si-LK-APMICZ7H.js → si-LK-SSNT7T4A.js} +14 -2
  105. package/dist/dev/locales/si-LK-SSNT7T4A.js.map +7 -0
  106. package/dist/dev/locales/{sk-SK-7ZFDZG6Y.js → sk-SK-J7TKZQEH.js} +14 -2
  107. package/dist/dev/locales/sk-SK-J7TKZQEH.js.map +7 -0
  108. package/dist/dev/locales/{sl-SI-BBENCX7D.js → sl-SI-SIBMLDYY.js} +130 -118
  109. package/dist/dev/locales/sl-SI-SIBMLDYY.js.map +7 -0
  110. package/dist/dev/locales/{sv-SE-35QJIOEW.js → sv-SE-6GYGFZNL.js} +25 -13
  111. package/dist/dev/locales/sv-SE-6GYGFZNL.js.map +7 -0
  112. package/dist/dev/locales/{ta-IN-4N5CFIWZ.js → ta-IN-7AW6CTGA.js} +14 -2
  113. package/dist/dev/locales/ta-IN-7AW6CTGA.js.map +7 -0
  114. package/dist/dev/locales/{th-TH-2F4V4IDB.js → th-TH-FP7ULYYM.js} +23 -11
  115. package/dist/dev/locales/th-TH-FP7ULYYM.js.map +7 -0
  116. package/dist/dev/locales/{tr-TR-NDFP3F7P.js → tr-TR-UDQGNXAG.js} +14 -2
  117. package/dist/dev/locales/tr-TR-UDQGNXAG.js.map +7 -0
  118. package/dist/dev/locales/{uk-UA-4I6VBQZ5.js → uk-UA-25HL2NCU.js} +51 -39
  119. package/dist/dev/locales/uk-UA-25HL2NCU.js.map +7 -0
  120. package/dist/dev/locales/{uz-UZ-UVKC7UNZ.js → uz-UZ-OPSBAY4H.js} +14 -2
  121. package/dist/dev/locales/uz-UZ-OPSBAY4H.js.map +7 -0
  122. package/dist/dev/locales/{vi-VN-UQCETDRL.js → vi-VN-DK367UGA.js} +14 -2
  123. package/dist/dev/locales/vi-VN-DK367UGA.js.map +7 -0
  124. package/dist/dev/locales/{zh-CN-RSRHKN75.js → zh-CN-QCVKNWUH.js} +14 -2
  125. package/dist/dev/locales/zh-CN-QCVKNWUH.js.map +7 -0
  126. package/dist/dev/locales/{zh-HK-XSFQ32U4.js → zh-HK-WFGYHWPG.js} +14 -2
  127. package/dist/dev/locales/zh-HK-WFGYHWPG.js.map +7 -0
  128. package/dist/dev/locales/{zh-TW-KFVYWRFJ.js → zh-TW-WHQS4ZSD.js} +33 -21
  129. package/dist/dev/locales/zh-TW-WHQS4ZSD.js.map +7 -0
  130. package/dist/dev/subset-shared.chunk.js +1 -1
  131. package/dist/dev/subset-worker.chunk.js +1 -1
  132. package/dist/prod/chunk-25DVBZY5.js +34 -0
  133. package/dist/prod/chunk-52O7NOSZ.js +12 -0
  134. package/dist/prod/chunk-DYU5D34O.js +1 -0
  135. package/dist/prod/{chunk-KVZVLATH.js → chunk-RNVAYDMN.js} +1 -1
  136. package/dist/prod/components/TTDDialog/{CodeMirrorEditor-IYDFKSMV.js → CodeMirrorEditor-WLFHUPRX.js} +1 -1
  137. package/dist/prod/data/image-USJGQDOA.js +1 -0
  138. package/dist/prod/index.css +1 -1
  139. package/dist/prod/index.js +63 -94
  140. package/dist/prod/locales/{ar-SA-PQUY64WN.js → ar-SA-5WIASEJP.js} +5 -5
  141. package/dist/prod/locales/az-AZ-V5EUQD6C.js +1 -0
  142. package/dist/prod/locales/bg-BG-EXASCMTR.js +5 -0
  143. package/dist/prod/locales/bn-BD-U4SYNFCO.js +3 -0
  144. package/dist/prod/locales/bn-IN-HKDJIITE.js +3 -0
  145. package/dist/prod/locales/ca-ES-2KGUU5XB.js +8 -0
  146. package/dist/prod/locales/cs-CZ-VUCGPRML.js +7 -0
  147. package/dist/prod/locales/da-DK-NNDP2IVP.js +2 -0
  148. package/dist/prod/locales/de-CH-I7RAVIZN.js +11 -0
  149. package/dist/prod/locales/de-DE-WBQ3DQLR.js +11 -0
  150. package/dist/prod/locales/el-GR-TYQHVGXW.js +7 -0
  151. package/dist/prod/locales/{en-VMWWLRQY.js → en-MYE3M2F3.js} +1 -1
  152. package/dist/prod/locales/es-ES-JEUOREKJ.js +12 -0
  153. package/dist/prod/locales/eu-ES-SO5DEEAN.js +8 -0
  154. package/dist/prod/locales/fa-IR-I4JNTJHK.js +9 -0
  155. package/dist/prod/locales/fi-FI-REAEF6HQ.js +6 -0
  156. package/dist/prod/locales/fr-FR-SUCL7J6B.js +12 -0
  157. package/dist/prod/locales/gl-ES-KHCSOGVH.js +6 -0
  158. package/dist/prod/locales/he-IL-JYXVXV2Q.js +9 -0
  159. package/dist/prod/locales/hi-IN-BU52H3BO.js +3 -0
  160. package/dist/prod/locales/hu-HU-OWADXDQ3.js +3 -0
  161. package/dist/prod/locales/id-ID-2WY7E4VX.js +8 -0
  162. package/dist/prod/locales/it-IT-INVHSAJF.js +12 -0
  163. package/dist/prod/locales/ja-JP-JBNTKYP4.js +12 -0
  164. package/dist/prod/locales/kaa-TC3VIB7V.js +1 -0
  165. package/dist/prod/locales/kab-KAB-UOUDSQKM.js +4 -0
  166. package/dist/prod/locales/kk-KZ-P5H2X7YS.js +1 -0
  167. package/dist/prod/locales/{km-KH-PCWDKPHP.js → km-KH-IHMV2US7.js} +4 -4
  168. package/dist/prod/locales/ko-KR-ZTMANIDF.js +5 -0
  169. package/dist/prod/locales/ku-TR-GPJTRB5G.js +6 -0
  170. package/dist/prod/locales/lt-LT-V3XDOK3P.js +3 -0
  171. package/dist/prod/locales/lv-LV-DVQ3FADO.js +4 -0
  172. package/dist/prod/locales/mr-IN-VZ6HH5FE.js +9 -0
  173. package/dist/prod/locales/my-MM-XYKWHRK6.js +1 -0
  174. package/dist/prod/locales/nb-NO-UNO2GGZJ.js +8 -0
  175. package/dist/prod/locales/nl-NL-76EFHT4P.js +13 -0
  176. package/dist/prod/locales/nn-NO-CFKD7ABE.js +4 -0
  177. package/dist/prod/locales/oc-FR-YBJTCJ3J.js +4 -0
  178. package/dist/prod/locales/pa-IN-SNOXSMRV.js +4 -0
  179. package/dist/prod/locales/percentages-LWOC67ZH.js +1 -0
  180. package/dist/prod/locales/pl-PL-BSY6YFZ3.js +12 -0
  181. package/dist/prod/locales/pt-BR-CZDV62R3.js +10 -0
  182. package/dist/prod/locales/pt-PT-JO57XJJW.js +12 -0
  183. package/dist/prod/locales/ro-RO-UZ5ICYYN.js +12 -0
  184. package/dist/prod/locales/ru-RU-AN7JPREC.js +10 -0
  185. package/dist/prod/locales/si-LK-7CBLD6QQ.js +1 -0
  186. package/dist/prod/locales/sk-SK-SWR6DKBI.js +7 -0
  187. package/dist/prod/locales/sl-SI-QY5KCFGA.js +8 -0
  188. package/dist/prod/locales/sv-SE-O3OFCY3J.js +12 -0
  189. package/dist/prod/locales/ta-IN-V6NHHU6Z.js +6 -0
  190. package/dist/prod/locales/th-TH-WLSZUSBX.js +1 -0
  191. package/dist/prod/locales/tr-TR-GUFYG22B.js +4 -0
  192. package/dist/prod/locales/uk-UA-K6SV5NFQ.js +6 -0
  193. package/dist/prod/locales/uz-UZ-TVKTZO2G.js +1 -0
  194. package/dist/prod/locales/vi-VN-7FKFXJNO.js +7 -0
  195. package/dist/prod/locales/zh-CN-AOKVLNNK.js +11 -0
  196. package/dist/prod/locales/zh-HK-CDKPF5DC.js +1 -0
  197. package/dist/prod/locales/zh-TW-ZVGYESGW.js +13 -0
  198. package/dist/prod/subset-shared.chunk.js +1 -1
  199. package/dist/prod/subset-worker.chunk.js +1 -1
  200. package/dist/types/common/src/colors.d.ts +13 -7
  201. package/dist/types/common/src/constants.d.ts +44 -0
  202. package/dist/types/common/src/keys.d.ts +2 -0
  203. package/dist/types/common/src/random.d.ts +7 -0
  204. package/dist/types/element/src/Scene.d.ts +1 -1
  205. package/dist/types/element/src/comparisons.d.ts +5 -3
  206. package/dist/types/element/src/delta.d.ts +23 -1
  207. package/dist/types/element/src/flowchart.d.ts +5 -1
  208. package/dist/types/element/src/frame.d.ts +2 -2
  209. package/dist/types/element/src/index.d.ts +1 -0
  210. package/dist/types/element/src/linearElementEditor.d.ts +10 -0
  211. package/dist/types/element/src/mutateElement.d.ts +1 -1
  212. package/dist/types/element/src/newElement.d.ts +24 -2
  213. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  214. package/dist/types/element/src/sortElements.d.ts +10 -0
  215. package/dist/types/element/src/stickyNote.d.ts +183 -0
  216. package/dist/types/element/src/textElement.d.ts +2 -1
  217. package/dist/types/element/src/transform.d.ts +25 -6
  218. package/dist/types/element/src/typeChecks.d.ts +3 -2
  219. package/dist/types/element/src/types.d.ts +35 -6
  220. package/dist/types/element/src/utils.d.ts +7 -3
  221. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -6
  222. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  223. package/dist/types/excalidraw/actions/actionBoundText.d.ts +20 -4
  224. package/dist/types/excalidraw/actions/actionCanvas.d.ts +70 -14
  225. package/dist/types/excalidraw/actions/actionClipboard.d.ts +20 -4
  226. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +10 -2
  227. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +31 -7
  228. package/dist/types/excalidraw/actions/actionDeselect.d.ts +10 -2
  229. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  230. package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -2
  231. package/dist/types/excalidraw/actions/actionElementLock.d.ts +20 -4
  232. package/dist/types/excalidraw/actions/actionExport.d.ts +20 -4
  233. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
  234. package/dist/types/excalidraw/actions/actionFrame.d.ts +81 -7
  235. package/dist/types/excalidraw/actions/actionGroup.d.ts +21 -5
  236. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +61 -3
  237. package/dist/types/excalidraw/actions/actionLink.d.ts +10 -2
  238. package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -2
  239. package/dist/types/excalidraw/actions/actionProperties.d.ts +30 -10
  240. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -2
  241. package/dist/types/excalidraw/actions/actionStyles.d.ts +11 -3
  242. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +10 -2
  243. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -2
  244. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +10 -2
  245. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -2
  246. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -2
  247. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +10 -2
  248. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -2
  249. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -2
  250. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  251. package/dist/types/excalidraw/appState.d.ts +21 -1
  252. package/dist/types/excalidraw/components/App.arrowText.d.ts +40 -8
  253. package/dist/types/excalidraw/components/App.bucketFill.d.ts +14 -0
  254. package/dist/types/excalidraw/components/App.cursor.d.ts +10 -3
  255. package/dist/types/excalidraw/components/App.d.ts +111 -14
  256. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  257. package/dist/types/excalidraw/components/App.wheel.d.ts +33 -0
  258. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +6 -2
  259. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  260. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -1
  261. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +4 -2
  262. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  263. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  264. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
  265. package/dist/types/excalidraw/components/IconButton.d.ts +2 -0
  266. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  267. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +1 -0
  268. package/dist/types/excalidraw/components/Tools.d.ts +7 -2
  269. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  270. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  271. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
  272. package/dist/types/excalidraw/components/icons.d.ts +4 -0
  273. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
  274. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +2 -2
  275. package/dist/types/excalidraw/data/blob.d.ts +20 -4
  276. package/dist/types/excalidraw/data/json.d.ts +10 -2
  277. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  278. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  279. package/dist/types/excalidraw/index.d.ts +3 -1
  280. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  281. package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
  282. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  283. package/dist/types/excalidraw/scene/Renderer.d.ts +50 -1
  284. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  285. package/dist/types/excalidraw/scene/types.d.ts +1 -0
  286. package/dist/types/excalidraw/types.d.ts +88 -6
  287. package/dist/types/excalidraw/viewport.d.ts +10 -2
  288. package/dist/types/math/src/curve.d.ts +19 -12
  289. package/dist/types/math/src/segment.d.ts +6 -0
  290. package/dist/types/utils/src/shape.d.ts +2 -2
  291. package/package.json +2 -2
  292. package/dist/dev/chunk-GK2P2Z4N.js.map +0 -7
  293. package/dist/dev/chunk-HY55C7T4.js +0 -69
  294. package/dist/dev/chunk-HY55C7T4.js.map +0 -7
  295. package/dist/dev/chunk-MUNVYEGW.js.map +0 -7
  296. package/dist/dev/locales/ar-SA-YEOLME2Y.js.map +0 -7
  297. package/dist/dev/locales/az-AZ-DQL36U4O.js.map +0 -7
  298. package/dist/dev/locales/bg-BG-LG6R5FEQ.js.map +0 -7
  299. package/dist/dev/locales/bn-BD-W63P7JT5.js.map +0 -7
  300. package/dist/dev/locales/bn-IN-SCHACAA6.js.map +0 -7
  301. package/dist/dev/locales/ca-ES-XP3CQTWV.js.map +0 -7
  302. package/dist/dev/locales/cs-CZ-EXLEOJMD.js.map +0 -7
  303. package/dist/dev/locales/da-DK-46ONLZRX.js.map +0 -7
  304. package/dist/dev/locales/de-CH-A5QH3YGW.js.map +0 -7
  305. package/dist/dev/locales/de-DE-FVCCKR5N.js.map +0 -7
  306. package/dist/dev/locales/el-GR-SB4MX5JS.js.map +0 -7
  307. package/dist/dev/locales/es-ES-VRTYQG6S.js.map +0 -7
  308. package/dist/dev/locales/eu-ES-3OHEU2YV.js.map +0 -7
  309. package/dist/dev/locales/fa-IR-74WR2KXF.js.map +0 -7
  310. package/dist/dev/locales/fi-FI-XZQC4II2.js.map +0 -7
  311. package/dist/dev/locales/fr-FR-RABBDBKM.js.map +0 -7
  312. package/dist/dev/locales/gl-ES-OU3Q6XUE.js.map +0 -7
  313. package/dist/dev/locales/he-IL-6NCD5D54.js.map +0 -7
  314. package/dist/dev/locales/hi-IN-M54WKOJI.js.map +0 -7
  315. package/dist/dev/locales/hu-HU-HAW63BCI.js.map +0 -7
  316. package/dist/dev/locales/id-ID-TFSPHGWX.js.map +0 -7
  317. package/dist/dev/locales/it-IT-MH3BAO5W.js.map +0 -7
  318. package/dist/dev/locales/ja-JP-UGJBHLX6.js.map +0 -7
  319. package/dist/dev/locales/kaa-5ZUEYWIM.js.map +0 -7
  320. package/dist/dev/locales/kab-KAB-RLAZQZSM.js.map +0 -7
  321. package/dist/dev/locales/kk-KZ-CIP7GOIF.js.map +0 -7
  322. package/dist/dev/locales/km-KH-YMR4247H.js.map +0 -7
  323. package/dist/dev/locales/ko-KR-WGKQKR2R.js.map +0 -7
  324. package/dist/dev/locales/ku-TR-ZSJN6TN6.js.map +0 -7
  325. package/dist/dev/locales/lt-LT-FT6ZGIZP.js.map +0 -7
  326. package/dist/dev/locales/lv-LV-U74YKDPR.js.map +0 -7
  327. package/dist/dev/locales/mr-IN-KN72LOIA.js.map +0 -7
  328. package/dist/dev/locales/my-MM-E57NLQ7W.js.map +0 -7
  329. package/dist/dev/locales/nb-NO-FYQDWD7X.js.map +0 -7
  330. package/dist/dev/locales/nl-NL-D5MZQRAC.js.map +0 -7
  331. package/dist/dev/locales/nn-NO-5ZEUZJV4.js.map +0 -7
  332. package/dist/dev/locales/oc-FR-MVW6LDAP.js.map +0 -7
  333. package/dist/dev/locales/pa-IN-2NH3SVNI.js.map +0 -7
  334. package/dist/dev/locales/pl-PL-M6LYWLHY.js.map +0 -7
  335. package/dist/dev/locales/pt-BR-27M3CCS7.js.map +0 -7
  336. package/dist/dev/locales/pt-PT-V3C226NP.js.map +0 -7
  337. package/dist/dev/locales/ro-RO-S4GNBAJI.js.map +0 -7
  338. package/dist/dev/locales/ru-RU-CRRT5JUZ.js.map +0 -7
  339. package/dist/dev/locales/si-LK-APMICZ7H.js.map +0 -7
  340. package/dist/dev/locales/sk-SK-7ZFDZG6Y.js.map +0 -7
  341. package/dist/dev/locales/sl-SI-BBENCX7D.js.map +0 -7
  342. package/dist/dev/locales/sv-SE-35QJIOEW.js.map +0 -7
  343. package/dist/dev/locales/ta-IN-4N5CFIWZ.js.map +0 -7
  344. package/dist/dev/locales/th-TH-2F4V4IDB.js.map +0 -7
  345. package/dist/dev/locales/tr-TR-NDFP3F7P.js.map +0 -7
  346. package/dist/dev/locales/uk-UA-4I6VBQZ5.js.map +0 -7
  347. package/dist/dev/locales/uz-UZ-UVKC7UNZ.js.map +0 -7
  348. package/dist/dev/locales/vi-VN-UQCETDRL.js.map +0 -7
  349. package/dist/dev/locales/zh-CN-RSRHKN75.js.map +0 -7
  350. package/dist/dev/locales/zh-HK-XSFQ32U4.js.map +0 -7
  351. package/dist/dev/locales/zh-TW-KFVYWRFJ.js.map +0 -7
  352. package/dist/prod/chunk-7XWMRXBY.js +0 -1
  353. package/dist/prod/chunk-JTZGFME4.js +0 -34
  354. package/dist/prod/chunk-ZKUAT4MX.js +0 -12
  355. package/dist/prod/data/image-GN2OCBLE.js +0 -1
  356. package/dist/prod/locales/az-AZ-OXJXL76K.js +0 -1
  357. package/dist/prod/locales/bg-BG-W2GKIJDF.js +0 -5
  358. package/dist/prod/locales/bn-BD-TGL7M4PJ.js +0 -3
  359. package/dist/prod/locales/bn-IN-BKETKYEH.js +0 -3
  360. package/dist/prod/locales/ca-ES-LD5SCRVV.js +0 -8
  361. package/dist/prod/locales/cs-CZ-OFPU5DBV.js +0 -7
  362. package/dist/prod/locales/da-DK-FRDJFYWF.js +0 -2
  363. package/dist/prod/locales/de-CH-ZG7H3QK3.js +0 -11
  364. package/dist/prod/locales/de-DE-SIJYH4IH.js +0 -11
  365. package/dist/prod/locales/el-GR-IEE2CGI2.js +0 -7
  366. package/dist/prod/locales/es-ES-TVVPWKV5.js +0 -12
  367. package/dist/prod/locales/eu-ES-CGBMFQDT.js +0 -8
  368. package/dist/prod/locales/fa-IR-IE6XAPR4.js +0 -9
  369. package/dist/prod/locales/fi-FI-P7TKNHRM.js +0 -6
  370. package/dist/prod/locales/fr-FR-QI2XZNT7.js +0 -12
  371. package/dist/prod/locales/gl-ES-TLYCNOZZ.js +0 -6
  372. package/dist/prod/locales/he-IL-ZX43XLGP.js +0 -9
  373. package/dist/prod/locales/hi-IN-UTYRMTUF.js +0 -3
  374. package/dist/prod/locales/hu-HU-AJOSEBW6.js +0 -3
  375. package/dist/prod/locales/id-ID-ETLTVG6C.js +0 -8
  376. package/dist/prod/locales/it-IT-B4B6TP6L.js +0 -12
  377. package/dist/prod/locales/ja-JP-IYKVURR5.js +0 -12
  378. package/dist/prod/locales/kaa-SE2BUIKX.js +0 -1
  379. package/dist/prod/locales/kab-KAB-Y3GLKXLR.js +0 -4
  380. package/dist/prod/locales/kk-KZ-ABWUFVOH.js +0 -1
  381. package/dist/prod/locales/ko-KR-7JQDXKGM.js +0 -5
  382. package/dist/prod/locales/ku-TR-NAH2Q5B7.js +0 -6
  383. package/dist/prod/locales/lt-LT-VQFYRSNQ.js +0 -3
  384. package/dist/prod/locales/lv-LV-T62VSYUM.js +0 -4
  385. package/dist/prod/locales/mr-IN-V4FHLCJE.js +0 -9
  386. package/dist/prod/locales/my-MM-E3SQ6E54.js +0 -1
  387. package/dist/prod/locales/nb-NO-MLNOFN5H.js +0 -8
  388. package/dist/prod/locales/nl-NL-D5L3ZV4M.js +0 -13
  389. package/dist/prod/locales/nn-NO-NNHDGPKB.js +0 -4
  390. package/dist/prod/locales/oc-FR-DWCRF55G.js +0 -4
  391. package/dist/prod/locales/pa-IN-3JSAY44M.js +0 -4
  392. package/dist/prod/locales/percentages-ETZPVQEE.js +0 -1
  393. package/dist/prod/locales/pl-PL-ACURYKP3.js +0 -12
  394. package/dist/prod/locales/pt-BR-LOX7MLGD.js +0 -10
  395. package/dist/prod/locales/pt-PT-CZ2U2RFQ.js +0 -12
  396. package/dist/prod/locales/ro-RO-2HECL2X6.js +0 -12
  397. package/dist/prod/locales/ru-RU-HAYNXO46.js +0 -10
  398. package/dist/prod/locales/si-LK-W5KNS4H6.js +0 -1
  399. package/dist/prod/locales/sk-SK-7K2CFGDV.js +0 -7
  400. package/dist/prod/locales/sl-SI-OXV2QZWW.js +0 -6
  401. package/dist/prod/locales/sv-SE-JTOBZRGL.js +0 -12
  402. package/dist/prod/locales/ta-IN-KFAVKXGT.js +0 -6
  403. package/dist/prod/locales/th-TH-VDMSCPDL.js +0 -1
  404. package/dist/prod/locales/tr-TR-CEZ6GX45.js +0 -4
  405. package/dist/prod/locales/uk-UA-Q3H3OXQC.js +0 -6
  406. package/dist/prod/locales/uz-UZ-NGCSWWPX.js +0 -1
  407. package/dist/prod/locales/vi-VN-P3NDEVPS.js +0 -7
  408. package/dist/prod/locales/zh-CN-SS3O57GA.js +0 -11
  409. package/dist/prod/locales/zh-HK-LWJT3VCF.js +0 -1
  410. package/dist/prod/locales/zh-TW-VJXC72RT.js +0 -13
  411. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  412. /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-FCA7YAIL.js.map → CodeMirrorEditor-XFPXQDTD.js.map} +0 -0
  413. /package/dist/dev/data/{image-5N65CA7G.js.map → image-DBJ5VI3T.js.map} +0 -0
  414. /package/dist/dev/locales/{en-AZHTDC2Z.js.map → en-INQU5YPU.js.map} +0 -0
  415. /package/dist/dev/locales/{percentages-QBBLQLIV.js.map → percentages-X2QIQ6XJ.js.map} +0 -0
@@ -53,6 +53,7 @@ export declare class Renderer {
53
53
  frameId: string | null;
54
54
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
55
55
  updated: number;
56
+ created: number | null;
56
57
  link: string | null;
57
58
  locked: boolean;
58
59
  customData?: Record<string, any>;
@@ -92,6 +93,7 @@ export declare class Renderer {
92
93
  frameId: string | null;
93
94
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
94
95
  updated: number;
96
+ created: number | null;
95
97
  link: string | null;
96
98
  locked: boolean;
97
99
  customData?: Record<string, any>;
@@ -126,6 +128,43 @@ export declare class Renderer {
126
128
  frameId: string | null;
127
129
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
128
130
  updated: number;
131
+ created: number | null;
132
+ link: string | null;
133
+ locked: boolean;
134
+ customData?: Record<string, any>;
135
+ }> & Readonly<{
136
+ type: "stickynote";
137
+ baseHeight: number;
138
+ }> & {
139
+ isDeleted: false;
140
+ }) | (Readonly<{
141
+ id: string;
142
+ x: number;
143
+ y: number;
144
+ strokeColor: string;
145
+ backgroundColor: string;
146
+ fillStyle: import("@excalidraw/element/types").FillStyle;
147
+ strokeWidth: number;
148
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
149
+ roundness: null | {
150
+ type: import("@excalidraw/element/types").RoundnessType;
151
+ value?: number;
152
+ };
153
+ roughness: number;
154
+ opacity: number;
155
+ width: number;
156
+ height: number;
157
+ angle: import("@excalidraw/math").Radians;
158
+ seed: number;
159
+ version: number;
160
+ versionNonce: number;
161
+ index: import("@excalidraw/element/types").FractionalIndex | null;
162
+ isDeleted: boolean;
163
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
164
+ frameId: string | null;
165
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
166
+ updated: number;
167
+ created: number | null;
129
168
  link: string | null;
130
169
  locked: boolean;
131
170
  customData?: Record<string, any>;
@@ -160,6 +199,7 @@ export declare class Renderer {
160
199
  frameId: string | null;
161
200
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
162
201
  updated: number;
202
+ created: number | null;
163
203
  link: string | null;
164
204
  locked: boolean;
165
205
  customData?: Record<string, any>;
@@ -194,6 +234,7 @@ export declare class Renderer {
194
234
  frameId: string | null;
195
235
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
196
236
  updated: number;
237
+ created: number | null;
197
238
  link: string | null;
198
239
  locked: boolean;
199
240
  customData?: Record<string, any>;
@@ -228,6 +269,7 @@ export declare class Renderer {
228
269
  frameId: string | null;
229
270
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
230
271
  updated: number;
272
+ created: number | null;
231
273
  link: string | null;
232
274
  locked: boolean;
233
275
  customData?: Record<string, any>;
@@ -265,6 +307,7 @@ export declare class Renderer {
265
307
  frameId: string | null;
266
308
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
267
309
  updated: number;
310
+ created: number | null;
268
311
  link: string | null;
269
312
  locked: boolean;
270
313
  customData?: Record<string, any>;
@@ -303,6 +346,7 @@ export declare class Renderer {
303
346
  frameId: string | null;
304
347
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
305
348
  updated: number;
349
+ created: number | null;
306
350
  link: string | null;
307
351
  locked: boolean;
308
352
  customData?: Record<string, any>;
@@ -338,6 +382,7 @@ export declare class Renderer {
338
382
  frameId: string | null;
339
383
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
340
384
  updated: number;
385
+ created: number | null;
341
386
  link: string | null;
342
387
  locked: boolean;
343
388
  customData?: Record<string, any>;
@@ -373,6 +418,7 @@ export declare class Renderer {
373
418
  frameId: string | null;
374
419
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
375
420
  updated: number;
421
+ created: number | null;
376
422
  link: string | null;
377
423
  locked: boolean;
378
424
  customData?: Record<string, any>;
@@ -380,15 +426,17 @@ export declare class Renderer {
380
426
  type: "text";
381
427
  fontSize: number;
382
428
  fontFamily: import("@excalidraw/element/types").FontFamilyValues;
429
+ baseFontSize: number | null;
383
430
  text: string;
384
431
  textAlign: import("@excalidraw/element/types").TextAlign;
385
432
  verticalAlign: import("@excalidraw/element/types").VerticalAlign;
386
- containerId: import("@excalidraw/element/types").ExcalidrawGenericElement["id"] | null;
433
+ containerId: import("@excalidraw/element/types").ExcalidrawTextContainer["id"] | null;
387
434
  originalText: string;
388
435
  autoResize: boolean;
389
436
  lineHeight: number & {
390
437
  _brand: "unitlessLineHeight";
391
438
  };
439
+ labelPosition?: number | null;
392
440
  }> & {
393
441
  isDeleted: false;
394
442
  }) | (Readonly<{
@@ -418,6 +466,7 @@ export declare class Renderer {
418
466
  frameId: string | null;
419
467
  boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
420
468
  updated: number;
469
+ created: number | null;
421
470
  link: string | null;
422
471
  locked: boolean;
423
472
  customData?: Record<string, any>;
@@ -1,4 +1,4 @@
1
1
  export { isSomeElementSelected, getElementsWithinSelection, getSelectedElements, getTargetElements, } from "@excalidraw/element";
2
2
  export { getScrollToContentState } from "../viewport";
3
- export { hasBackground, hasStrokeWidth, hasStrokeStyle, hasFreedrawMode, canHaveArrowheads, canChangeRoundness, } from "@excalidraw/element";
3
+ export { hasBackground, hasFillStyle, hasRoughness, hasStrokeWidth, hasStrokeStyle, hasFreedrawMode, canHaveArrowheads, canChangeRoundness, } from "@excalidraw/element";
4
4
  export { getNormalizedZoom, getNormalizedGridSize, getNormalizedGridStep, } from "./normalize";
@@ -139,6 +139,7 @@ export type ElementShapes = {
139
139
  arrow: Drawable[];
140
140
  line: Drawable[];
141
141
  text: null;
142
+ stickynote: null;
142
143
  image: null;
143
144
  frame: null;
144
145
  magicframe: null;
@@ -85,7 +85,7 @@ export type BinaryFileData = {
85
85
  };
86
86
  export type BinaryFileMetadata = Omit<BinaryFileData, "dataURL">;
87
87
  export type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
88
- export type ToolType = "selection" | "lasso" | "rectangle" | "diamond" | "ellipse" | "arrow" | "line" | "freedraw" | "text" | "image" | "eraser" | "hand" | "frame" | "magicframe" | "embeddable" | "laser" | "autoshape" | "bucketfill";
88
+ export type ToolType = "selection" | "lasso" | "rectangle" | "diamond" | "ellipse" | "arrow" | "line" | "freedraw" | "text" | "image" | "eraser" | "hand" | "frame" | "magicframe" | "stickynote" | "embeddable" | "laser" | "autoshape" | "bucketfill";
89
89
  export type ElementOrToolType = ExcalidrawElementType | ToolType | "custom";
90
90
  export type ActiveTool = {
91
91
  type: ToolType;
@@ -174,6 +174,11 @@ export type ObservedElementsAppState = {
174
174
  activeLockedId: AppState["activeLockedId"];
175
175
  };
176
176
  export type BoxSelectionMode = "contain" | "overlap";
177
+ /**
178
+ * The pointing device the wheel mappings are tuned for. `auto` is reserved
179
+ * for detecting it from the wheel events; see `resolveInputDevice`.
180
+ */
181
+ export type InputDevice = "auto" | "mouse" | "trackpad";
177
182
  /**
178
183
  * A box, in scene coordinates, that pan & zoom are constrained to.
179
184
  *
@@ -253,6 +258,13 @@ export interface AppState {
253
258
  bindingPreference: "enabled" | "disabled";
254
259
  /** user preference whether arrow snap to midpoints while binding */
255
260
  isMidpointSnappingEnabled: boolean;
261
+ /**
262
+ * user preference for what the wheel does: with a `trackpad` a plain wheel
263
+ * pans and ctrl/cmd+wheel (how a pinch is delivered) zooms; with a `mouse`
264
+ * a plain wheel zooms and ctrl/cmd+wheel pans vertically. `auto` resolves
265
+ * to `trackpad` until device detection exists — see `resolveInputDevice`
266
+ */
267
+ inputDevice: InputDevice;
256
268
  /**
257
269
  * The bindable element the UI highlights for the user when an arrow is
258
270
  * dragged or otherwise its endpoint being close to said element.
@@ -306,6 +318,8 @@ export interface AppState {
306
318
  exportWithDarkMode: boolean;
307
319
  exportScale: number;
308
320
  currentItemStrokeColor: string;
321
+ currentItemStickynoteStrokeColor: string;
322
+ currentItemStickynoteBackgroundColor: string;
309
323
  currentItemBackgroundColor: string;
310
324
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
311
325
  currentItemStrokeWidthKey: StrokeWidthKey;
@@ -412,10 +426,6 @@ export interface AppState {
412
426
  y: number;
413
427
  } | null;
414
428
  objectsSnapModeEnabled: boolean;
415
- /** the user's socket id & username who is being followed on the canvas */
416
- userToFollow: UserToFollow | null;
417
- /** the socket ids of the users following the current user */
418
- followedBy: Set<SocketId>;
419
429
  /** image cropping */
420
430
  isCropping: boolean;
421
431
  croppingElementId: ExcalidrawElement["id"] | null;
@@ -430,6 +440,20 @@ export interface AppState {
430
440
  [groupId: string]: true;
431
441
  };
432
442
  bindMode: BindMode;
443
+ /** user-customized color-picker top picks (pinned via drag & drop from the
444
+ * color picker popup). `null` means no customization (defaults, or
445
+ * host-supplied `topPicks`, are used). Kept per picker. */
446
+ colorTopPicks: {
447
+ elementStroke: readonly string[] | null;
448
+ elementBackground: readonly string[] | null;
449
+ /** the bucket-fill tool keeps a list separate from `elementBackground`
450
+ * even though both drive `currentItemBackgroundColor` (its defaults and
451
+ * use case differ — no transparent) */
452
+ bucketFill: readonly string[] | null;
453
+ /** sticky notes are their own color domain (own defaults, own picks) */
454
+ stickyNoteStroke: readonly string[] | null;
455
+ stickyNoteBackground: readonly string[] | null;
456
+ };
433
457
  }
434
458
  export type SearchMatch = {
435
459
  id: string;
@@ -495,6 +519,23 @@ export type OnUserFollowedPayload = {
495
519
  userToFollow: UserToFollow;
496
520
  action: "FOLLOW" | "UNFOLLOW";
497
521
  };
522
+ export type ViewportStatusFrame = {
523
+ /** the badge (bottom-center pill) */
524
+ label?: {
525
+ label: React.ReactNode;
526
+ icon?: React.ReactNode;
527
+ /** badge background; defaults to var(--color-primary-hover) */
528
+ background?: string;
529
+ /** badge text color; defaults to var(--color-primary-light) */
530
+ color?: string;
531
+ /** makes the badge label interactive */
532
+ onClick?: () => void;
533
+ /** renders a close button when set */
534
+ onClose?: () => void;
535
+ };
536
+ /** viewport-edge border: CSS color, or `false` for none */
537
+ border: false | string;
538
+ };
498
539
  export type OnExportProgress = {
499
540
  type: "progress";
500
541
  message?: React.ReactNode;
@@ -609,6 +650,16 @@ export type UIConfig = {
609
650
  export interface ExcalidrawProps {
610
651
  id?: string | null;
611
652
  className?: string;
653
+ /**
654
+ * Document that owns Excalidraw's mounted DOM.
655
+ *
656
+ * Set only when it differs from the global `document`, such as when code
657
+ * executing in a parent window mounts Excalidraw into an iframe document.
658
+ * The value must remain stable for the editor's lifetime.
659
+ *
660
+ * @default document
661
+ */
662
+ ownerDocument?: Document;
612
663
  onChange?: (elements: readonly OrderedExcalidrawElement[], appState: AppState, files: BinaryFiles, id?: string | null) => void;
613
664
  onThemeChange?: (theme: Theme | "system") => void;
614
665
  /**
@@ -761,6 +812,21 @@ export interface ExcalidrawProps {
761
812
  aiEnabled?: boolean;
762
813
  showDeprecatedFonts?: boolean;
763
814
  renderScrollbars?: boolean;
815
+ viewportStatusFrame?: ViewportStatusFrame | null;
816
+ /**
817
+ * Rendered inside the UserList "who's here" dropdown (desktop) and inline
818
+ * in the mobile menu's collaborators section, below a divider. Accepts a
819
+ * render function — called with `isMobile` so hosts can render different
820
+ * UI for each surface — in addition to a plain node.
821
+ */
822
+ currentUserControls?: React.ReactNode | ((isMobile: boolean) => React.ReactNode);
823
+ /**
824
+ * The user being followed on the canvas, if any. Controlled by the host —
825
+ * the editor never sets it; it emits follow/unfollow intents via
826
+ * `onUserFollow` (prop or imperative API) and renders the followed
827
+ * user's avatar highlight from this value.
828
+ */
829
+ userToFollow?: UserToFollow | null;
764
830
  /**
765
831
  * Called before exporting to a file.
766
832
  *
@@ -786,7 +852,8 @@ export interface ExcalidrawProps {
786
852
  }) => MaybePromise<void> | AsyncGenerator<OnExportProgress, void>;
787
853
  }
788
854
  export type SceneData = {
789
- elements?: ImportedDataState["elements"];
855
+ /** Expects normalized elements; restore imported data before updating the scene. */
856
+ elements?: readonly ExcalidrawElement[] | null;
790
857
  appState?: ImportedDataState["appState"];
791
858
  collaborators?: Map<SocketId, Collaborator>;
792
859
  captureUpdate?: CaptureUpdateActionType;
@@ -846,6 +913,8 @@ export type AppProps = Merge<ExcalidrawProps, {
846
913
  export type AppClassProperties = {
847
914
  props: AppProps;
848
915
  state: AppState;
916
+ readonly ownerDocument: Document;
917
+ readonly ownerWindow: Window & typeof globalThis;
849
918
  api: App["api"];
850
919
  setSessionExportThemeOverride: App["setSessionExportThemeOverride"];
851
920
  interactiveCanvas: HTMLCanvasElement | null;
@@ -879,7 +948,11 @@ export type AppClassProperties = {
879
948
  dismissLinearEditor: App["dismissLinearEditor"];
880
949
  flowchart: App["flowchart"];
881
950
  drawShape: App["drawShape"];
951
+ arrowText: App["arrowText"];
882
952
  cursor: App["cursor"];
953
+ bucketFill: App["bucketFill"];
954
+ toolDrag: App["toolDrag"];
955
+ activeResizeHandle: App["activeResizeHandle"];
883
956
  isToolLocked: App["isToolLocked"];
884
957
  getEffectiveGridSize: App["getEffectiveGridSize"];
885
958
  setPlugins: App["setPlugins"];
@@ -894,6 +967,8 @@ export type AppClassProperties = {
894
967
  lastPointerMoveCoords: App["lastPointerMoveCoords"];
895
968
  lastPointerMoveEvent: App["lastPointerMoveEvent"];
896
969
  bindModeHandler: App["bindModeHandler"];
970
+ emitUserFollowIntent: App["emitUserFollowIntent"];
971
+ requestUnfollow: App["requestUnfollow"];
897
972
  setAppState: App["setAppState"];
898
973
  isInteractionEnabled: App["isInteractionEnabled"];
899
974
  isNavigationEnabled: App["isNavigationEnabled"];
@@ -932,6 +1007,7 @@ export type PointerDownState = Readonly<{
932
1007
  wasAddedToSelection: boolean;
933
1008
  hasBeenDuplicated: boolean;
934
1009
  hasHitCommonBoundingBoxOfSelectedElements: boolean;
1010
+ arrowLabel: boolean;
935
1011
  };
936
1012
  withCmdOrCtrl: boolean;
937
1013
  drag: {
@@ -1040,6 +1116,12 @@ export type NullableGridSize = (AppState["gridSize"] & MakeBrand<"NullableGridSi
1040
1116
  export type GenerateDiagramToCode = (props: {
1041
1117
  frame: NonDeleted<ExcalidrawMagicFrameElement>;
1042
1118
  children: readonly NonDeletedExcalidrawElement[];
1119
+ /**
1120
+ * Optional streaming hook. Call with the accumulated response text as it
1121
+ * streams in so the editor can progressively render the partial HTML
1122
+ * inside the generated frame.
1123
+ */
1124
+ onPartial?: (html: string) => void;
1043
1125
  }) => MaybePromise<{
1044
1126
  html: string;
1045
1127
  }>;
@@ -108,6 +108,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
108
108
  boxSelectionMode: import("./types").BoxSelectionMode;
109
109
  bindingPreference: "enabled" | "disabled";
110
110
  isMidpointSnappingEnabled: boolean;
111
+ inputDevice: import("./types").InputDevice;
111
112
  suggestedBinding: {
112
113
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
113
114
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -142,6 +143,8 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
142
143
  exportWithDarkMode: boolean;
143
144
  exportScale: number;
144
145
  currentItemStrokeColor: string;
146
+ currentItemStickynoteStrokeColor: string;
147
+ currentItemStickynoteBackgroundColor: string;
145
148
  currentItemBackgroundColor: string;
146
149
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
147
150
  currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
@@ -233,8 +236,6 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
233
236
  y: number;
234
237
  } | null;
235
238
  objectsSnapModeEnabled: boolean;
236
- userToFollow: import("./types").UserToFollow | null;
237
- followedBy: Set<import("./types").SocketId>;
238
239
  isCropping: boolean;
239
240
  croppingElementId: ExcalidrawElement["id"] | null;
240
241
  searchMatches: Readonly<{
@@ -246,6 +247,13 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
246
247
  [groupId: string]: true;
247
248
  };
248
249
  bindMode: import("@excalidraw/element/types").BindMode;
250
+ colorTopPicks: {
251
+ elementStroke: readonly string[] | null;
252
+ elementBackground: readonly string[] | null;
253
+ bucketFill: readonly string[] | null;
254
+ stickyNoteStroke: readonly string[] | null;
255
+ stickyNoteBackground: readonly string[] | null;
256
+ };
249
257
  };
250
258
  captureUpdate: "EVENTUALLY";
251
259
  };
@@ -16,20 +16,25 @@ export declare function curveIntersectLineSegment<Point extends GlobalPoint | Lo
16
16
  tolerance?: number;
17
17
  iterLimit?: number;
18
18
  }): Point[];
19
+ /**
20
+ * Finds the parameter on the Bezier curve whose point is closest to another
21
+ * point
22
+ *
23
+ * @param c The curve to test
24
+ * @param p The point to measure from
25
+ * @param tolerance The width of the search window under which the bisection
26
+ * stops refining the parameter
27
+ */
28
+ export declare function curveClosestParameter<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, p: Point, tolerance?: number): number;
19
29
  /**
20
30
  * Finds the closest point on the Bezier curve from another point
21
31
  *
22
- * @param x
23
- * @param y
24
- * @param P0
25
- * @param P1
26
- * @param P2
27
- * @param P3
28
- * @param tolerance
29
- * @param maxLevel
30
- * @returns
32
+ * @param c The curve to test
33
+ * @param p The point to measure from
34
+ * @param tolerance The width of the search window under which the bisection
35
+ * stops refining the parameter
31
36
  */
32
- export declare function curveClosestPoint<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, p: Point, tolerance?: number): Point | null;
37
+ export declare function curveClosestPoint<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, p: Point, tolerance?: number): Point;
33
38
  /**
34
39
  * Determines the distance between a point and the closest point on the
35
40
  * Bezier curve.
@@ -37,7 +42,7 @@ export declare function curveClosestPoint<Point extends GlobalPoint | LocalPoint
37
42
  * @param c The curve to test
38
43
  * @param p The point to measure from
39
44
  */
40
- export declare function curvePointDistance<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, p: Point): number;
45
+ export declare function curvePointDistance<Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, p: Point, tolerance?: number): number;
41
46
  /**
42
47
  * Determines if the parameter is a Curve
43
48
  */
@@ -74,4 +79,6 @@ export declare function curveLengthAtParameter<P extends GlobalPoint | LocalPoin
74
79
  * @param percent A value between 0 and 1 representing the percentage of the curve's length
75
80
  * @returns The point at the specified percentage of curve length
76
81
  */
77
- export declare function curvePointAtLength<P extends GlobalPoint | LocalPoint>(c: Curve<P>, percent: number): P;
82
+ export declare function curvePointAtLength<P extends GlobalPoint | LocalPoint>(c: Curve<P>, percent: number,
83
+ /** pass the curve's total length when already known to skip recomputing it */
84
+ totalLength?: number): P;
@@ -29,6 +29,11 @@ export declare const lineSegmentRotate: <Point extends LocalPoint | GlobalPoint>
29
29
  export declare const segmentsIntersectAt: <Point extends GlobalPoint | LocalPoint>(a: Readonly<LineSegment<Point>>, b: Readonly<LineSegment<Point>>) => Point | null;
30
30
  export declare const pointOnLineSegment: <Point extends LocalPoint | GlobalPoint>(point: Point, line: LineSegment<Point>, threshold?: number) => boolean;
31
31
  export declare const distanceToLineSegment: <Point extends LocalPoint | GlobalPoint>(point: Point, line: LineSegment<Point>) => number;
32
+ /**
33
+ * Returns the point at parameter `t` along the segment, where `t = 0` is the
34
+ * segment's start and `t = 1` its end. Not clamped.
35
+ */
36
+ export declare function lineSegmentPointAt<Point extends GlobalPoint | LocalPoint>(line: LineSegment<Point>, t: number): Point;
32
37
  /**
33
38
  * Returns the intersection point of a segment and a line
34
39
  *
@@ -38,3 +43,4 @@ export declare const distanceToLineSegment: <Point extends LocalPoint | GlobalPo
38
43
  */
39
44
  export declare function lineSegmentIntersectionPoints<Point extends GlobalPoint | LocalPoint>(l: LineSegment<Point>, s: LineSegment<Point>, threshold?: number): Point | null;
40
45
  export declare function lineSegmentsDistance<Point extends GlobalPoint | LocalPoint>(s1: LineSegment<Point>, s2: LineSegment<Point>): number;
46
+ export declare function lineSegmentClosestParameter<Point extends GlobalPoint | LocalPoint>(point: Point, line: LineSegment<Point>): number;
@@ -1,5 +1,5 @@
1
1
  import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
- import type { ElementsMap, ExcalidrawBindableElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawEllipseElement, ExcalidrawEmbeddableElement, ExcalidrawFrameLikeElement, ExcalidrawFreeDrawElement, ExcalidrawIframeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawRectangleElement, ExcalidrawSelectionElement, ExcalidrawTextElement } from "@excalidraw/element/types";
2
+ import type { ElementsMap, ExcalidrawBindableElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawEllipseElement, ExcalidrawEmbeddableElement, ExcalidrawFrameLikeElement, ExcalidrawFreeDrawElement, ExcalidrawIframeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawRectangleElement, ExcalidrawSelectionElement, ExcalidrawStickyNoteElement, ExcalidrawTextElement } from "@excalidraw/element/types";
3
3
  import type { Curve, LineSegment, Polygon, Radians } from "@excalidraw/math";
4
4
  import type { Drawable, Op } from "roughjs/bin/core";
5
5
  export type Polyline<Point extends GlobalPoint | LocalPoint> = LineSegment<Point>[];
@@ -29,7 +29,7 @@ export type GeometricShape<Point extends GlobalPoint | LocalPoint> = {
29
29
  type: "polycurve";
30
30
  data: Polycurve<Point>;
31
31
  };
32
- type RectangularElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawTextElement | ExcalidrawSelectionElement;
32
+ type RectangularElement = ExcalidrawRectangleElement | ExcalidrawStickyNoteElement | ExcalidrawDiamondElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawTextElement | ExcalidrawSelectionElement;
33
33
  export declare const getPolygonShape: <Point extends GlobalPoint | LocalPoint>(element: RectangularElement) => GeometricShape<Point>;
34
34
  export declare const getSelectionBoxShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap, padding?: number) => GeometricShape<Point>;
35
35
  export declare const getEllipseShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawEllipseElement) => GeometricShape<Point>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dwelle/excalidraw",
3
- "version": "0.5.0-e6263588",
3
+ "version": "0.5.0-e9944c4",
4
4
  "type": "module",
5
5
  "types": "./dist/types/excalidraw/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -128,4 +128,4 @@
128
128
  "jest-diff": "29.7.0",
129
129
  "typescript": "5.9.3"
130
130
  }
131
- }
131
+ }