@dwelle/excalidraw 0.3.4

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 (242) hide show
  1. package/CHANGELOG.md +680 -0
  2. package/README.md +927 -0
  3. package/dist/excalidraw-assets/Cascadia.woff2 +0 -0
  4. package/dist/excalidraw-assets/Virgil.woff2 +0 -0
  5. package/dist/excalidraw-assets/image-02a1f3ecd6baf42daaa6.js +1 -0
  6. package/dist/excalidraw-assets/image-eafab0c39ce13f7fea67.js +1 -0
  7. package/dist/excalidraw-assets/vendor-448ccb79e58765b61834.js +2 -0
  8. package/dist/excalidraw-assets/vendor-448ccb79e58765b61834.js.LICENSE.txt +1 -0
  9. package/dist/excalidraw-assets/vendor-cb708a4580b007d81177.js +2 -0
  10. package/dist/excalidraw-assets/vendor-cb708a4580b007d81177.js.LICENSE.txt +1 -0
  11. package/dist/excalidraw-assets-dev/Cascadia.woff2 +0 -0
  12. package/dist/excalidraw-assets-dev/Virgil.woff2 +0 -0
  13. package/dist/excalidraw-assets-dev/image-cacb3d0c02eb2e346ecc.js +33 -0
  14. package/dist/excalidraw-assets-dev/vendor-0454f90696ac835aeb45.js +356 -0
  15. package/dist/excalidraw-assets-dev/vendor-7664c12c379862ed98a5.js +356 -0
  16. package/dist/excalidraw.development.js +2924 -0
  17. package/dist/excalidraw.production.min.js +2 -0
  18. package/dist/excalidraw.production.min.js.LICENSE.txt +1 -0
  19. package/main.js +8 -0
  20. package/package.json +72 -0
  21. package/types/actions/actionAddToLibrary.d.ts +1 -0
  22. package/types/actions/actionAlign.d.ts +6 -0
  23. package/types/actions/actionCanvas.d.ts +8 -0
  24. package/types/actions/actionClipboard.d.ts +4 -0
  25. package/types/actions/actionDeleteSelected.d.ts +1 -0
  26. package/types/actions/actionDistribute.d.ts +2 -0
  27. package/types/actions/actionDuplicateSelection.d.ts +1 -0
  28. package/types/actions/actionExport.d.ts +9 -0
  29. package/types/actions/actionFinalize.d.ts +1 -0
  30. package/types/actions/actionFlip.d.ts +2 -0
  31. package/types/actions/actionGroup.d.ts +2 -0
  32. package/types/actions/actionHistory.d.ts +6 -0
  33. package/types/actions/actionMenu.d.ts +4 -0
  34. package/types/actions/actionNavigate.d.ts +1 -0
  35. package/types/actions/actionProperties.d.ts +12 -0
  36. package/types/actions/actionSelectAll.d.ts +1 -0
  37. package/types/actions/actionStyles.d.ts +3 -0
  38. package/types/actions/actionToggleGridMode.d.ts +1 -0
  39. package/types/actions/actionToggleStats.d.ts +1 -0
  40. package/types/actions/actionToggleViewMode.d.ts +1 -0
  41. package/types/actions/actionToggleZenMode.d.ts +1 -0
  42. package/types/actions/actionZindex.d.ts +4 -0
  43. package/types/actions/index.d.ts +20 -0
  44. package/types/actions/manager.d.ts +28 -0
  45. package/types/actions/register.d.ts +3 -0
  46. package/types/actions/shortcuts.d.ts +2 -0
  47. package/types/actions/types.d.ts +49 -0
  48. package/types/align.d.ts +7 -0
  49. package/types/analytics.d.ts +1 -0
  50. package/types/appState.d.ts +59 -0
  51. package/types/charts.d.ts +19 -0
  52. package/types/clients.d.ts +6 -0
  53. package/types/clipboard.d.ts +19 -0
  54. package/types/colors.d.ts +6 -0
  55. package/types/components/Actions.d.ts +19 -0
  56. package/types/components/ActiveFile.d.ts +8 -0
  57. package/types/components/App.d.ts +154 -0
  58. package/types/components/Avatar.d.ts +10 -0
  59. package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +9 -0
  60. package/types/components/ButtonIconSelect.d.ts +11 -0
  61. package/types/components/Card.d.ts +6 -0
  62. package/types/components/CheckboxItem.d.ts +6 -0
  63. package/types/components/CollabButton.d.ts +8 -0
  64. package/types/components/ColorPicker.d.ts +10 -0
  65. package/types/components/ContextMenu.d.ts +25 -0
  66. package/types/components/DarkModeToggle.d.ts +8 -0
  67. package/types/components/Dialog.d.ts +12 -0
  68. package/types/components/ErrorDialog.d.ts +5 -0
  69. package/types/components/FixedSideContainer.d.ts +9 -0
  70. package/types/components/HelpDialog.d.ts +5 -0
  71. package/types/components/HelpIcon.d.ts +9 -0
  72. package/types/components/HintViewer.d.ts +10 -0
  73. package/types/components/IconPicker.d.ts +14 -0
  74. package/types/components/ImageExportDialog.d.ts +16 -0
  75. package/types/components/InitializeApp.d.ts +16 -0
  76. package/types/components/Island.d.ts +10 -0
  77. package/types/components/JSONExportDialog.d.ts +13 -0
  78. package/types/components/LayerUI.d.ts +34 -0
  79. package/types/components/LibraryButton.d.ts +6 -0
  80. package/types/components/LibraryUnit.d.ts +9 -0
  81. package/types/components/LoadingMessage.d.ts +2 -0
  82. package/types/components/LockButton.d.ts +11 -0
  83. package/types/components/MobileMenu.d.ts +24 -0
  84. package/types/components/Modal.d.ts +11 -0
  85. package/types/components/PasteChartDialog.d.ts +9 -0
  86. package/types/components/Popover.d.ts +11 -0
  87. package/types/components/ProjectName.d.ts +11 -0
  88. package/types/components/Section.d.ts +7 -0
  89. package/types/components/Stack.d.ts +15 -0
  90. package/types/components/Stats.d.ts +11 -0
  91. package/types/components/Toast.d.ts +6 -0
  92. package/types/components/ToolButton.d.ts +35 -0
  93. package/types/components/Tooltip.d.ts +9 -0
  94. package/types/components/UserList.d.ts +13 -0
  95. package/types/components/icons.d.ts +163 -0
  96. package/types/constants.d.ts +115 -0
  97. package/types/data/blob.d.ts +11 -0
  98. package/types/data/encode.d.ts +25 -0
  99. package/types/data/image.d.ts +15 -0
  100. package/types/data/index.d.ts +13 -0
  101. package/types/data/json.d.ts +17 -0
  102. package/types/data/library.d.ts +14 -0
  103. package/types/data/resave.d.ts +5 -0
  104. package/types/data/restore.d.ts +13 -0
  105. package/types/data/types.d.ts +27 -0
  106. package/types/disitrubte.d.ts +7 -0
  107. package/types/element/binding.d.ts +33 -0
  108. package/types/element/bounds.d.ts +16 -0
  109. package/types/element/collision.d.ts +19 -0
  110. package/types/element/dragElements.d.ts +7 -0
  111. package/types/element/index.d.ts +22 -0
  112. package/types/element/linearElementEditor.d.ts +62 -0
  113. package/types/element/mutateElement.d.ts +11 -0
  114. package/types/element/newElement.d.ts +45 -0
  115. package/types/element/resizeElements.d.ts +9 -0
  116. package/types/element/resizeTest.d.ts +13 -0
  117. package/types/element/showSelectedShapeActions.d.ts +3 -0
  118. package/types/element/sizeHelpers.d.ts +16 -0
  119. package/types/element/textElement.d.ts +2 -0
  120. package/types/element/textWysiwyg.d.ts +15 -0
  121. package/types/element/transformHandles.d.ts +28 -0
  122. package/types/element/typeChecks.d.ts +11 -0
  123. package/types/element/types.d.ts +106 -0
  124. package/types/errors.d.ts +5 -0
  125. package/types/ga.d.ts +63 -0
  126. package/types/gadirections.d.ts +8 -0
  127. package/types/galines.d.ts +22 -0
  128. package/types/gapoints.d.ts +7 -0
  129. package/types/gatransforms.d.ts +10 -0
  130. package/types/gesture.d.ts +6 -0
  131. package/types/groups.d.ts +26 -0
  132. package/types/history.d.ts +52 -0
  133. package/types/hooks/useCallbackRefState.d.ts +1 -0
  134. package/types/i18n.d.ts +15 -0
  135. package/types/keys.d.ts +61 -0
  136. package/types/math.d.ts +20 -0
  137. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ar-SA-json-9a3fdf94110439c2826a.d.ts +0 -0
  138. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ar-SA-json-efd63375f9605b72c4af.d.ts +0 -0
  139. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-bg-BG-json-047db6df7a74c0298938.d.ts +0 -0
  140. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-bg-BG-json-35c0e8b92b0dba8a4e6d.d.ts +0 -0
  141. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ca-ES-json-6acefe26cfe1d2f12349.d.ts +0 -0
  142. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ca-ES-json-9924fbd53652d5f15134.d.ts +0 -0
  143. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-cs-CZ-json-85a469d813bb069829e7.d.ts +0 -0
  144. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-de-DE-json-a52c17c4bd1b1db22464.d.ts +0 -0
  145. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-de-DE-json-f85a8a52534c04c3f3b8.d.ts +0 -0
  146. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-el-GR-json-060595a09e0004e33936.d.ts +0 -0
  147. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-el-GR-json-3b209ec86ca2ce69bdfa.d.ts +0 -0
  148. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-es-ES-json-32dc3bf0f789ef18e65d.d.ts +0 -0
  149. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-es-ES-json-af5c541f9ac1526a9eb7.d.ts +0 -0
  150. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fa-IR-json-7ee232d4ef08da0903f6.d.ts +0 -0
  151. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fa-IR-json-c732ff7772327332c259.d.ts +0 -0
  152. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fi-FI-json-46abeda8d809d4091924.d.ts +0 -0
  153. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fi-FI-json-c1d5c5510660a11a428e.d.ts +0 -0
  154. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fr-FR-json-6a418571305eecefe9bc.d.ts +0 -0
  155. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-fr-FR-json-79fa555bfea0a356f393.d.ts +0 -0
  156. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-he-IL-json-157ae036fcf470528687.d.ts +0 -0
  157. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-he-IL-json-d006423b531ab062bb85.d.ts +0 -0
  158. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hi-IN-json-3035c3b3ab3ce981dbc7.d.ts +0 -0
  159. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hi-IN-json-d959b869453c591a8861.d.ts +0 -0
  160. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hu-HU-json-50a13e322a60bb701615.d.ts +0 -0
  161. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-hu-HU-json-a366989217753fe3d02b.d.ts +0 -0
  162. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-id-ID-json-87212daac6113b5bf808.d.ts +0 -0
  163. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-id-ID-json-8d13d29ee41be15a1f99.d.ts +0 -0
  164. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-it-IT-json-59f2e9d3dac07f3264cb.d.ts +0 -0
  165. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-it-IT-json-90283cd2809f4165506b.d.ts +0 -0
  166. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ja-JP-json-9e0a78ddb43d5709fb29.d.ts +0 -0
  167. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ja-JP-json-ccb5ffd0f8a0980c2ec0.d.ts +0 -0
  168. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-kab-KAB-json-d9acc7b8ee952e356d06.d.ts +0 -0
  169. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-kab-KAB-json-dac787e0446cdb747fe1.d.ts +0 -0
  170. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ko-KR-json-d61af373bea59d1ff4c6.d.ts +0 -0
  171. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ko-KR-json-e42ededaa35032a201b9.d.ts +0 -0
  172. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-lv-LV-json-07f6bffcb44fdd9aad4f.d.ts +0 -0
  173. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-lv-LV-json-7eea5c4054f8418fdd10.d.ts +0 -0
  174. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-my-MM-json-26d1e27bab3b8ac4a3e6.d.ts +0 -0
  175. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-my-MM-json-a8f9bb37a7b947e9dfba.d.ts +0 -0
  176. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nb-NO-json-8ce0749d46f0b4a8defb.d.ts +0 -0
  177. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nb-NO-json-c01fab8602e1b658d5d1.d.ts +0 -0
  178. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nl-NL-json-23fdfd9f11bc8efbaf56.d.ts +0 -0
  179. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nl-NL-json-cf922daa828029c1aff5.d.ts +0 -0
  180. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nn-NO-json-b5931de6e1ed336bf087.d.ts +0 -0
  181. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-nn-NO-json-d363be6b3dcdbf3a868a.d.ts +0 -0
  182. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-oc-FR-json-29d6193adb907d4f5890.d.ts +0 -0
  183. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-oc-FR-json-c6414107ad634b113aba.d.ts +0 -0
  184. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pa-IN-json-27063e4865142ac11b1a.d.ts +0 -0
  185. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pa-IN-json-f0c779291da384fb5173.d.ts +0 -0
  186. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pl-PL-json-16af1b83ac16af57ad07.d.ts +0 -0
  187. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pl-PL-json-a4a5c6e0a9877c43476a.d.ts +0 -0
  188. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-BR-json-03a046855063512eb9ff.d.ts +0 -0
  189. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-BR-json-db86828d6e3ced9f9854.d.ts +0 -0
  190. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-PT-json-7ed352e9de6dc74ef503.d.ts +0 -0
  191. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-pt-PT-json-bc0cd589bd87a3079407.d.ts +0 -0
  192. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ro-RO-json-75692b7a0166d6ad27a4.d.ts +0 -0
  193. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ro-RO-json-f13a2e7b7a63fbfb6ae7.d.ts +0 -0
  194. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ru-RU-json-69b1a919b7f42adfd6ec.d.ts +0 -0
  195. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-ru-RU-json-7c2a2061d0ca99cf7007.d.ts +0 -0
  196. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sk-SK-json-0ef09f90308059d22ae8.d.ts +0 -0
  197. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sk-SK-json-4757551ceb15fa0a29a9.d.ts +0 -0
  198. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sv-SE-json-dc7718d79b9bf93a4ba4.d.ts +0 -0
  199. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-sv-SE-json-fa5bd09f128972b13ac2.d.ts +0 -0
  200. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-tr-TR-json-b574833ee1c2f58fd24e.d.ts +0 -0
  201. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-tr-TR-json-cba7e62d9610795a5ac3.d.ts +0 -0
  202. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-uk-UA-json-a9a8ea7adb95c0a03680.d.ts +0 -0
  203. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-uk-UA-json-f0cab296bdc4089ffa77.d.ts +0 -0
  204. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-CN-json-45da9983459601b845e8.d.ts +0 -0
  205. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-CN-json-94f562845a945a45e385.d.ts +0 -0
  206. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-TW-json-0e77c896018bcd221bf6.d.ts +0 -0
  207. package/types/packages/excalidraw/dist/excalidraw-assets/i18n-zh-TW-json-7dd3d9ba72493687c286.d.ts +0 -0
  208. package/types/packages/excalidraw/dist/excalidraw-assets/image-02a1f3ecd6baf42daaa6.d.ts +0 -0
  209. package/types/packages/excalidraw/dist/excalidraw-assets/image-eafab0c39ce13f7fea67.d.ts +0 -0
  210. package/types/packages/excalidraw/dist/excalidraw-assets/vendor-448ccb79e58765b61834.d.ts +0 -0
  211. package/types/packages/excalidraw/dist/excalidraw-assets/vendor-cb708a4580b007d81177.d.ts +0 -0
  212. package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-cacb3d0c02eb2e346ecc.d.ts +0 -0
  213. package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-0454f90696ac835aeb45.d.ts +0 -0
  214. package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-7664c12c379862ed98a5.d.ts +0 -0
  215. package/types/packages/excalidraw/dist/excalidraw.development.d.ts +2 -0
  216. package/types/packages/excalidraw/dist/excalidraw.production.min.d.ts +3 -0
  217. package/types/packages/excalidraw/entry.d.ts +3 -0
  218. package/types/packages/excalidraw/index.d.ts +16 -0
  219. package/types/packages/excalidraw/main.d.ts +2 -0
  220. package/types/packages/excalidraw/publicPath.d.ts +1 -0
  221. package/types/packages/excalidraw/webpack.dev.config.d.ts +81 -0
  222. package/types/packages/excalidraw/webpack.prod.config.d.ts +91 -0
  223. package/types/packages/utils.d.ts +26 -0
  224. package/types/points.d.ts +6 -0
  225. package/types/random.d.ts +3 -0
  226. package/types/renderer/index.d.ts +1 -0
  227. package/types/renderer/renderElement.d.ts +23 -0
  228. package/types/renderer/renderScene.d.ts +21 -0
  229. package/types/renderer/roundRect.d.ts +11 -0
  230. package/types/scene/Scene.d.ts +26 -0
  231. package/types/scene/comparisons.d.ts +10 -0
  232. package/types/scene/export.d.ts +20 -0
  233. package/types/scene/index.d.ts +5 -0
  234. package/types/scene/scroll.d.ts +17 -0
  235. package/types/scene/scrollbars.d.ts +16 -0
  236. package/types/scene/selection.d.ts +11 -0
  237. package/types/scene/types.d.ts +50 -0
  238. package/types/scene/zoom.d.ts +6 -0
  239. package/types/shapes.d.ts +35 -0
  240. package/types/types.d.ts +287 -0
  241. package/types/utils.d.ts +94 -0
  242. package/types/zindex.d.ts +6 -0
@@ -0,0 +1,2 @@
1
+ export = __WEBPACK_EXTERNAL_MODULE_react_dom__;
2
+ export = __WEBPACK_EXTERNAL_MODULE_react_dom__;
@@ -0,0 +1,3 @@
1
+ declare const _exports: any;
2
+ export = _exports;
3
+ export var Excalidraw: any;
@@ -0,0 +1,3 @@
1
+ export default Excalidraw;
2
+ export * from "./index";
3
+ import Excalidraw from "./index";
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import "./publicPath";
3
+ import "../../css/app.scss";
4
+ import "../../css/styles.scss";
5
+ import { ExcalidrawAPIRefValue, ExcalidrawProps } from "../../types";
6
+ declare type PublicExcalidrawProps = Omit<ExcalidrawProps, "forwardedRef">;
7
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<PublicExcalidrawProps & React.RefAttributes<ExcalidrawAPIRefValue>>>;
8
+ export default _default;
9
+ export { getSceneVersion, getElementMap, isInvisiblySmallElement, } from "../../element";
10
+ export { defaultLang, languages } from "../../i18n";
11
+ export { restore, restoreElements, restoreAppState } from "../../data/restore";
12
+ export { exportToBlob, exportToCanvas, exportToSvg, serializeAsJSON, loadLibraryFromBlob, loadFromBlob, getFreeDrawSvgPath, } from "../../packages/utils";
13
+ export { FONT_FAMILY } from "../../constants";
14
+ export { exportToClipboard } from "../utils";
15
+ export { getDefaultAppState } from "../../appState";
16
+ export { cleanAppStateForExport, clearAppStateForLocalStorage, } from "../../appState";
@@ -0,0 +1,2 @@
1
+ declare const _exports: any;
2
+ export = _exports;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,81 @@
1
+ import autoprefixer = require("autoprefixer");
2
+ import webpack = require("webpack");
3
+ export const mode: string;
4
+ export const devtool: boolean;
5
+ export const entry: {
6
+ "excalidraw.development": string;
7
+ };
8
+ export namespace output {
9
+ const path: string;
10
+ const library: string;
11
+ const libraryTarget: string;
12
+ const filename: string;
13
+ const chunkFilename: string;
14
+ const publicPath: string;
15
+ }
16
+ export namespace resolve {
17
+ const extensions: string[];
18
+ }
19
+ export namespace module {
20
+ const rules: ({
21
+ test: RegExp;
22
+ exclude: RegExp;
23
+ use: (string | {
24
+ loader: string;
25
+ options?: undefined;
26
+ } | {
27
+ loader: string;
28
+ options: {
29
+ postcssOptions: {
30
+ plugins: (import("postcss").Plugin & autoprefixer.ExportedAPI)[];
31
+ };
32
+ };
33
+ })[];
34
+ } | {
35
+ test: RegExp;
36
+ exclude: RegExp;
37
+ use: {
38
+ loader: string;
39
+ options: {
40
+ transpileOnly: boolean;
41
+ configFile: string;
42
+ };
43
+ }[];
44
+ } | {
45
+ test: RegExp;
46
+ use: {
47
+ loader: string;
48
+ options: {
49
+ name: string;
50
+ outputPath: string;
51
+ };
52
+ }[];
53
+ exclude?: undefined;
54
+ })[];
55
+ }
56
+ export namespace optimization {
57
+ namespace splitChunks {
58
+ const chunks: string;
59
+ namespace cacheGroups {
60
+ namespace vendors {
61
+ const test: RegExp;
62
+ const name: string;
63
+ }
64
+ }
65
+ }
66
+ }
67
+ export const plugins: webpack.EvalSourceMapDevToolPlugin[];
68
+ export const externals: {
69
+ react: {
70
+ root: string;
71
+ commonjs2: string;
72
+ commonjs: string;
73
+ amd: string;
74
+ };
75
+ "react-dom": {
76
+ root: string;
77
+ commonjs2: string;
78
+ commonjs: string;
79
+ amd: string;
80
+ };
81
+ };
@@ -0,0 +1,91 @@
1
+ import autoprefixer = require("autoprefixer");
2
+ export const mode: string;
3
+ export const entry: {
4
+ "excalidraw.production.min": string;
5
+ };
6
+ export namespace output {
7
+ const path: string;
8
+ const library: string;
9
+ const libraryTarget: string;
10
+ const filename: string;
11
+ const chunkFilename: string;
12
+ const publicPath: string;
13
+ }
14
+ export namespace resolve {
15
+ const extensions: string[];
16
+ }
17
+ export namespace module {
18
+ const rules: ({
19
+ test: RegExp;
20
+ exclude: RegExp;
21
+ use: (string | {
22
+ loader: string;
23
+ options?: undefined;
24
+ } | {
25
+ loader: string;
26
+ options: {
27
+ postcssOptions: {
28
+ plugins: (import("postcss").Plugin & autoprefixer.ExportedAPI)[];
29
+ };
30
+ };
31
+ })[];
32
+ } | {
33
+ test: RegExp;
34
+ exclude: RegExp;
35
+ use: ({
36
+ loader: string;
37
+ options: {
38
+ transpileOnly: boolean;
39
+ configFile: string;
40
+ presets?: undefined;
41
+ plugins?: undefined;
42
+ };
43
+ } | {
44
+ loader: string;
45
+ options: {
46
+ presets: string[];
47
+ plugins: string[];
48
+ transpileOnly?: undefined;
49
+ configFile?: undefined;
50
+ };
51
+ })[];
52
+ } | {
53
+ test: RegExp;
54
+ use: {
55
+ loader: string;
56
+ options: {
57
+ name: string;
58
+ outputPath: string;
59
+ };
60
+ }[];
61
+ exclude?: undefined;
62
+ })[];
63
+ }
64
+ export namespace optimization {
65
+ const minimize: boolean;
66
+ const minimizer: any[];
67
+ namespace splitChunks {
68
+ const chunks: string;
69
+ namespace cacheGroups {
70
+ namespace vendors {
71
+ const test: RegExp;
72
+ const name: string;
73
+ }
74
+ }
75
+ }
76
+ }
77
+ export const plugins: any[];
78
+ export const externals: {
79
+ react: {
80
+ root: string;
81
+ commonjs2: string;
82
+ commonjs: string;
83
+ amd: string;
84
+ };
85
+ "react-dom": {
86
+ root: string;
87
+ commonjs2: string;
88
+ commonjs: string;
89
+ amd: string;
90
+ };
91
+ };
@@ -0,0 +1,26 @@
1
+ import { AppState } from "../types";
2
+ import { ExcalidrawElement } from "../element/types";
3
+ declare type ExportOpts = {
4
+ elements: readonly ExcalidrawElement[];
5
+ appState?: Partial<Omit<AppState, "offsetTop" | "offsetLeft">>;
6
+ getDimensions?: (width: number, height: number) => {
7
+ width: number;
8
+ height: number;
9
+ scale: number;
10
+ };
11
+ };
12
+ export declare const exportToCanvas: ({ elements, appState, getDimensions, }: ExportOpts) => HTMLCanvasElement;
13
+ export declare const exportToBlob: (opts: ExportOpts & {
14
+ mimeType?: string;
15
+ quality?: number;
16
+ }) => Promise<Blob | null>;
17
+ export declare const exportToSvg: ({ elements, appState, exportPadding, }: Omit<ExportOpts, "getDimensions"> & {
18
+ exportPadding?: number | undefined;
19
+ }) => Promise<SVGSVGElement>;
20
+ export declare const exportToClipboard: (opts: ExportOpts & {
21
+ mimeType?: string;
22
+ quality?: number;
23
+ }) => Promise<void>;
24
+ export { serializeAsJSON } from "../data/json";
25
+ export { loadFromBlob, loadLibraryFromBlob } from "../data/blob";
26
+ export { getFreeDrawSvgPath } from "../renderer/renderElement";
@@ -0,0 +1,6 @@
1
+ import { Point } from "./types";
2
+ export declare const getSizeFromPoints: (points: readonly Point[]) => {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ export declare const rescalePoints: (dimension: 0 | 1, nextDimensionSize: number, prevPoints: readonly Point[]) => Point[];
@@ -0,0 +1,3 @@
1
+ export declare const randomInteger: () => number;
2
+ export declare const reseed: (seed: number) => void;
3
+ export declare const randomId: () => string;
@@ -0,0 +1 @@
1
+ export { renderScene } from "./renderScene";
@@ -0,0 +1,23 @@
1
+ import { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement } from "../element/types";
2
+ import { RoughCanvas } from "roughjs/bin/canvas";
3
+ import { Drawable, Options } from "roughjs/bin/core";
4
+ import { RoughSVG } from "roughjs/bin/svg";
5
+ import { SceneState } from "../scene/types";
6
+ import { Zoom } from "../types";
7
+ export interface ExcalidrawElementWithCanvas {
8
+ element: ExcalidrawElement | ExcalidrawTextElement;
9
+ canvas: HTMLCanvasElement;
10
+ canvasZoom: Zoom["value"];
11
+ canvasOffsetX: number;
12
+ canvasOffsetY: number;
13
+ }
14
+ export declare const getShapeForElement: (element: ExcalidrawElement) => Drawable | Drawable[] | null | undefined;
15
+ export declare const invalidateShapeForElement: (element: ExcalidrawElement) => boolean;
16
+ export declare const clearRenderCache: () => void;
17
+ export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean) => Options;
18
+ export declare const renderElement: (element: NonDeletedExcalidrawElement, rc: RoughCanvas, context: CanvasRenderingContext2D, renderOptimizations: boolean, sceneState: SceneState) => void;
19
+ export declare const renderElementToSvg: (element: NonDeletedExcalidrawElement, rsvg: RoughSVG, svgRoot: SVGElement, offsetX?: number | undefined, offsetY?: number | undefined) => void;
20
+ export declare let pathsCache: WeakMap<ExcalidrawFreeDrawElement, Path2D>;
21
+ export declare function generateFreeDrawShape(element: ExcalidrawFreeDrawElement): Path2D;
22
+ export declare function getFreeDrawPath2D(element: ExcalidrawFreeDrawElement): Path2D | undefined;
23
+ export declare function getFreeDrawSvgPath(element: ExcalidrawFreeDrawElement): string;
@@ -0,0 +1,21 @@
1
+ import { RoughCanvas } from "roughjs/bin/canvas";
2
+ import { RoughSVG } from "roughjs/bin/svg";
3
+ import { AppState } from "../types";
4
+ import { NonDeletedExcalidrawElement } from "../element/types";
5
+ import { SceneState } from "../scene/types";
6
+ export declare const renderScene: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, selectionElement: NonDeletedExcalidrawElement | null, scale: number, rc: RoughCanvas, canvas: HTMLCanvasElement, sceneState: SceneState, { renderScrollbars, renderSelection, renderOptimizations, renderGrid, }?: {
7
+ renderScrollbars?: boolean | undefined;
8
+ renderSelection?: boolean | undefined;
9
+ renderOptimizations?: boolean | undefined;
10
+ renderGrid?: boolean | undefined;
11
+ }) => {
12
+ atLeastOneVisibleElement: boolean;
13
+ scrollBars?: undefined;
14
+ } | {
15
+ atLeastOneVisibleElement: boolean;
16
+ scrollBars: import("../scene/types").ScrollBars | undefined;
17
+ };
18
+ export declare const renderSceneToSvg: (elements: readonly NonDeletedExcalidrawElement[], rsvg: RoughSVG, svgRoot: SVGElement, { offsetX, offsetY, }?: {
19
+ offsetX?: number | undefined;
20
+ offsetY?: number | undefined;
21
+ }) => void;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * https://stackoverflow.com/a/3368118
3
+ * Draws a rounded rectangle using the current state of the canvas.
4
+ * @param {CanvasRenderingContext2D} context
5
+ * @param {Number} x The top left x coordinate
6
+ * @param {Number} y The top left y coordinate
7
+ * @param {Number} width The width of the rectangle
8
+ * @param {Number} height The height of the rectangle
9
+ * @param {Number} radius The corner radius
10
+ */
11
+ export declare const roundRect: (context: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number) => void;
@@ -0,0 +1,26 @@
1
+ import { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted } from "../element/types";
2
+ import { LinearElementEditor } from "../element/linearElementEditor";
3
+ declare type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
4
+ declare type ElementKey = ExcalidrawElement | ElementIdKey;
5
+ declare type SceneStateCallback = () => void;
6
+ declare type SceneStateCallbackRemover = () => void;
7
+ declare class Scene {
8
+ private static sceneMapByElement;
9
+ private static sceneMapById;
10
+ static mapElementToScene(elementKey: ElementKey, scene: Scene): void;
11
+ static getScene(elementKey: ElementKey): Scene | null;
12
+ private callbacks;
13
+ private nonDeletedElements;
14
+ private elements;
15
+ private elementsMap;
16
+ getElementsIncludingDeleted(): readonly ExcalidrawElement[];
17
+ getElements(): readonly NonDeletedExcalidrawElement[];
18
+ getElement(id: ExcalidrawElement["id"]): ExcalidrawElement | null;
19
+ getNonDeletedElement(id: ExcalidrawElement["id"]): NonDeleted<ExcalidrawElement> | null;
20
+ getNonDeletedElements(ids: readonly ExcalidrawElement["id"][]): NonDeleted<ExcalidrawElement>[];
21
+ replaceAllElements(nextElements: readonly ExcalidrawElement[]): void;
22
+ informMutation(): void;
23
+ addCallback(cb: SceneStateCallback): SceneStateCallbackRemover;
24
+ destroy(): void;
25
+ }
26
+ export default Scene;
@@ -0,0 +1,10 @@
1
+ import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../element/types";
2
+ export declare const hasBackground: (type: string) => boolean;
3
+ export declare const hasStrokeWidth: (type: string) => boolean;
4
+ export declare const hasStrokeStyle: (type: string) => boolean;
5
+ export declare const canChangeSharpness: (type: string) => boolean;
6
+ export declare const hasText: (type: string) => boolean;
7
+ export declare const canHaveArrowheads: (type: string) => boolean;
8
+ export declare const getElementAtPosition: (elements: readonly NonDeletedExcalidrawElement[], isAtPositionFn: (element: NonDeletedExcalidrawElement) => boolean) => NonDeletedExcalidrawElement | null;
9
+ export declare const getElementsAtPosition: (elements: readonly NonDeletedExcalidrawElement[], isAtPositionFn: (element: NonDeletedExcalidrawElement) => boolean) => NonDeletedExcalidrawElement[];
10
+ export declare const getElementContainingPosition: (elements: readonly ExcalidrawElement[], x: number, y: number) => ExcalidrawElement | null;
@@ -0,0 +1,20 @@
1
+ import { NonDeletedExcalidrawElement } from "../element/types";
2
+ import { AppState } from "../types";
3
+ export declare const SVG_EXPORT_TAG = "<!-- svg-source:excalidraw -->";
4
+ export declare const exportToCanvas: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, { exportBackground, exportPadding, viewBackgroundColor, }: {
5
+ exportBackground: boolean;
6
+ exportPadding?: number | undefined;
7
+ viewBackgroundColor: string;
8
+ }, createCanvas?: (width: number, height: number) => {
9
+ canvas: HTMLCanvasElement;
10
+ scale: number;
11
+ }) => HTMLCanvasElement;
12
+ export declare const exportToSvg: (elements: readonly NonDeletedExcalidrawElement[], appState: {
13
+ exportBackground: boolean;
14
+ exportPadding?: number;
15
+ exportScale?: number;
16
+ viewBackgroundColor: string;
17
+ exportWithDarkMode?: boolean;
18
+ exportEmbedScene?: boolean;
19
+ }) => Promise<SVGSVGElement>;
20
+ export declare const getExportSize: (elements: readonly NonDeletedExcalidrawElement[], exportPadding: number, scale: number) => [number, number];
@@ -0,0 +1,5 @@
1
+ export { isOverScrollBars } from "./scrollbars";
2
+ export { isSomeElementSelected, getElementsWithinSelection, getCommonAttributeOfSelectedElements, getSelectedElements, getTargetElements, } from "./selection";
3
+ export { calculateScrollCenter } from "./scroll";
4
+ export { hasBackground, hasStrokeWidth, hasStrokeStyle, canHaveArrowheads, canChangeSharpness, getElementAtPosition, getElementContainingPosition, hasText, getElementsAtPosition, } from "./comparisons";
5
+ export { getNormalizedZoom, getNewZoom } from "./zoom";
@@ -0,0 +1,17 @@
1
+ import { AppState, PointerCoords, Zoom } from "../types";
2
+ import { ExcalidrawElement } from "../element/types";
3
+ export declare const centerScrollOn: ({ scenePoint, viewportDimensions, zoom, }: {
4
+ scenePoint: PointerCoords;
5
+ viewportDimensions: {
6
+ height: number;
7
+ width: number;
8
+ };
9
+ zoom: Zoom;
10
+ }) => {
11
+ scrollX: number;
12
+ scrollY: number;
13
+ };
14
+ export declare const calculateScrollCenter: (elements: readonly ExcalidrawElement[], appState: AppState, canvas: HTMLCanvasElement | null) => {
15
+ scrollX: number;
16
+ scrollY: number;
17
+ };
@@ -0,0 +1,16 @@
1
+ import { ExcalidrawElement } from "../element/types";
2
+ import { Zoom } from "../types";
3
+ import { ScrollBars } from "./types";
4
+ export declare const SCROLLBAR_MARGIN = 4;
5
+ export declare const SCROLLBAR_WIDTH = 6;
6
+ export declare const SCROLLBAR_COLOR = "rgba(0,0,0,0.3)";
7
+ export declare const getScrollBars: (elements: readonly ExcalidrawElement[], viewportWidth: number, viewportHeight: number, { scrollX, scrollY, zoom, }: {
8
+ scrollX: number;
9
+ scrollY: number;
10
+ zoom: Zoom;
11
+ }) => ScrollBars;
12
+ export declare const isOverScrollBars: (scrollBars: ScrollBars, x: number, y: number) => {
13
+ isOverEither: boolean;
14
+ isOverHorizontal: boolean;
15
+ isOverVertical: boolean;
16
+ };
@@ -0,0 +1,11 @@
1
+ import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../element/types";
2
+ import { AppState } from "../types";
3
+ export declare const getElementsWithinSelection: (elements: readonly NonDeletedExcalidrawElement[], selection: NonDeletedExcalidrawElement) => NonDeletedExcalidrawElement[];
4
+ export declare const isSomeElementSelected: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => boolean;
5
+ /**
6
+ * Returns common attribute (picked by `getAttribute` callback) of selected
7
+ * elements. If elements don't share the same value, returns `null`.
8
+ */
9
+ export declare const getCommonAttributeOfSelectedElements: <T>(elements: readonly NonDeletedExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T) => T | null;
10
+ export declare const getSelectedElements: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => NonDeletedExcalidrawElement[];
11
+ export declare const getTargetElements: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => NonDeletedExcalidrawElement[];
@@ -0,0 +1,50 @@
1
+ import { ExcalidrawTextElement } from "../element/types";
2
+ import { Zoom } from "../types";
3
+ export declare type SceneState = {
4
+ scrollX: number;
5
+ scrollY: number;
6
+ viewBackgroundColor: string | null;
7
+ exportWithDarkMode?: boolean;
8
+ zoom: Zoom;
9
+ shouldCacheIgnoreZoom: boolean;
10
+ remotePointerViewportCoords: {
11
+ [id: string]: {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ };
16
+ remotePointerButton?: {
17
+ [id: string]: string | undefined;
18
+ };
19
+ remoteSelectedElementIds: {
20
+ [elementId: string]: string[];
21
+ };
22
+ remotePointerUsernames: {
23
+ [id: string]: string;
24
+ };
25
+ remotePointerUserStates: {
26
+ [id: string]: string;
27
+ };
28
+ };
29
+ export declare type SceneScroll = {
30
+ scrollX: number;
31
+ scrollY: number;
32
+ };
33
+ export interface Scene {
34
+ elements: ExcalidrawTextElement[];
35
+ }
36
+ export declare type ExportType = "png" | "clipboard" | "clipboard-svg" | "backend" | "svg";
37
+ export declare type ScrollBars = {
38
+ horizontal: {
39
+ x: number;
40
+ y: number;
41
+ width: number;
42
+ height: number;
43
+ } | null;
44
+ vertical: {
45
+ x: number;
46
+ y: number;
47
+ width: number;
48
+ height: number;
49
+ } | null;
50
+ };
@@ -0,0 +1,6 @@
1
+ import { NormalizedZoomValue, PointerCoords, Zoom } from "../types";
2
+ export declare const getNewZoom: (newZoomValue: NormalizedZoomValue, prevZoom: Zoom, canvasOffset: {
3
+ left: number;
4
+ top: number;
5
+ }, zoomOnViewportPoint?: PointerCoords) => Zoom;
6
+ export declare const getNormalizedZoom: (zoom: number) => NormalizedZoomValue;