@dwelle/excalidraw 0.4.0-d8d86cf → 0.4.0-da7ef3e

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 (232) hide show
  1. package/CHANGELOG.md +706 -0
  2. package/README.md +18 -1422
  3. package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js → vendor-d415b28e9024dee4bb1b.js} +2 -2
  4. package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
  5. package/dist/excalidraw.development.js +3035 -1464
  6. package/dist/excalidraw.production.min.js +1 -1
  7. package/dist/excalidraw.production.min.js.LICENSE.txt +20 -0
  8. package/main.js +1 -8
  9. package/package.json +9 -4
  10. package/types/actions/actionAddToLibrary.d.ts +130 -52
  11. package/types/actions/actionAlign.d.ts +25 -32
  12. package/types/actions/actionBoundText.d.ts +191 -22
  13. package/types/actions/actionCanvas.d.ts +774 -174
  14. package/types/actions/actionClipboard.d.ts +232 -88
  15. package/types/actions/actionDeleteSelected.d.ts +129 -57
  16. package/types/actions/actionDistribute.d.ts +7 -12
  17. package/types/actions/actionDuplicateSelection.d.ts +2 -5
  18. package/types/actions/actionElementLock.d.ts +283 -0
  19. package/types/actions/actionExport.d.ts +448 -229
  20. package/types/actions/actionFinalize.d.ts +87 -41
  21. package/types/actions/actionFlip.d.ts +4 -7
  22. package/types/actions/actionFrame.d.ts +441 -0
  23. package/types/actions/actionGroup.d.ts +260 -15
  24. package/types/actions/actionHistory.d.ts +1 -1
  25. package/types/actions/actionLinearEditor.d.ts +46 -20
  26. package/types/actions/actionMenu.d.ts +136 -65
  27. package/types/actions/actionNavigate.d.ts +2 -3
  28. package/types/actions/actionProperties.d.ts +590 -277
  29. package/types/actions/actionSelectAll.d.ts +127 -2
  30. package/types/actions/actionStyles.d.ts +44 -19
  31. package/types/actions/actionToggleGridMode.d.ts +46 -19
  32. package/types/actions/{actionToggleLock.d.ts → actionToggleObjectsSnapMode.d.ts} +58 -31
  33. package/types/actions/actionToggleStats.d.ts +45 -19
  34. package/types/actions/actionToggleViewMode.d.ts +46 -19
  35. package/types/actions/actionToggleZenMode.d.ts +46 -19
  36. package/types/actions/actionZindex.d.ts +8 -16
  37. package/types/actions/index.d.ts +2 -1
  38. package/types/actions/manager.d.ts +3 -2
  39. package/types/actions/shortcuts.d.ts +2 -1
  40. package/types/actions/types.d.ts +16 -13
  41. package/types/appState.d.ts +23 -18
  42. package/types/charts.d.ts +2 -2
  43. package/types/clients.d.ts +5 -6
  44. package/types/clipboard.d.ts +3 -2
  45. package/types/colors.d.ts +60 -5
  46. package/types/components/Actions.d.ts +7 -7
  47. package/types/components/ActiveConfirmDialog.d.ts +4 -0
  48. package/types/components/App.d.ts +88 -74
  49. package/types/components/Avatar.d.ts +1 -2
  50. package/types/components/BraveMeasureTextError.d.ts +2 -0
  51. package/types/components/Button.d.ts +16 -0
  52. package/types/components/ButtonIconSelect.d.ts +11 -3
  53. package/types/components/Card.d.ts +6 -0
  54. package/types/components/ColorPicker/ColorInput.d.ts +9 -0
  55. package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
  56. package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
  57. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
  58. package/types/components/ColorPicker/Picker.d.ts +18 -0
  59. package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
  60. package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
  61. package/types/components/ColorPicker/ShadeList.d.ts +8 -0
  62. package/types/components/ColorPicker/TopPicks.d.ts +9 -0
  63. package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
  64. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +20 -0
  65. package/types/components/ContextMenu.d.ts +9 -22
  66. package/types/components/DefaultSidebar.d.ts +29 -0
  67. package/types/components/Dialog.d.ts +3 -4
  68. package/types/components/ErrorDialog.d.ts +3 -2
  69. package/types/components/ExcalidrawLogo.d.ts +15 -0
  70. package/types/components/EyeDropper.d.ts +28 -0
  71. package/types/components/FilledButton.d.ts +17 -0
  72. package/types/components/FixedSideContainer.d.ts +1 -1
  73. package/types/components/HandButton.d.ts +10 -0
  74. package/types/components/HelpButton.d.ts +1 -2
  75. package/types/components/HintViewer.d.ts +4 -5
  76. package/types/components/HomeButton.d.ts +1 -1
  77. package/types/components/ImageExportDialog.d.ts +8 -13
  78. package/types/components/Island.d.ts +1 -1
  79. package/types/components/JSONExportDialog.d.ts +7 -5
  80. package/types/components/LayerUI.d.ts +10 -16
  81. package/types/components/LibraryMenu.d.ts +13 -14
  82. package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
  83. package/types/components/LibraryMenuControlButtons.d.ts +9 -0
  84. package/types/components/LibraryMenuHeaderContent.d.ts +10 -5
  85. package/types/components/LibraryMenuItems.d.ts +6 -7
  86. package/types/components/LibraryMenuSection.d.ts +22 -0
  87. package/types/components/LibraryUnit.d.ts +6 -3
  88. package/types/components/LoadingMessage.d.ts +0 -1
  89. package/types/components/LockButton.d.ts +1 -2
  90. package/types/components/MobileMenu.d.ts +10 -12
  91. package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
  92. package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
  93. package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
  94. package/types/components/PasteChartDialog.d.ts +4 -5
  95. package/types/components/PenModeButton.d.ts +1 -1
  96. package/types/components/Popover.d.ts +1 -1
  97. package/types/components/ProjectName.d.ts +2 -1
  98. package/types/components/PublishLibrary.d.ts +2 -2
  99. package/types/components/RadioGroup.d.ts +12 -0
  100. package/types/components/Section.d.ts +1 -1
  101. package/types/components/Sidebar/Sidebar.d.ts +66 -63
  102. package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
  103. package/types/components/Sidebar/SidebarTab.d.ts +8 -0
  104. package/types/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
  105. package/types/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
  106. package/types/components/Sidebar/SidebarTabs.d.ts +6 -0
  107. package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
  108. package/types/components/Sidebar/common.d.ts +24 -7
  109. package/types/components/Spinner.d.ts +2 -1
  110. package/types/components/Stack.d.ts +4 -3
  111. package/types/components/Stats.d.ts +3 -3
  112. package/types/components/Switch.d.ts +9 -0
  113. package/types/components/ToolButton.d.ts +6 -5
  114. package/types/components/Tooltip.d.ts +1 -1
  115. package/types/components/Trans.d.ts +9 -0
  116. package/types/components/UserList.d.ts +0 -2
  117. package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
  118. package/types/components/canvases/StaticCanvas.d.ts +18 -0
  119. package/types/components/canvases/index.d.ts +3 -0
  120. package/types/components/dropdownMenu/DropdownMenu.d.ts +67 -0
  121. package/types/components/dropdownMenu/DropdownMenuContent.d.ts +15 -0
  122. package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
  123. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
  124. package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
  125. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
  126. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +13 -0
  127. package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  128. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +10 -0
  129. package/types/components/dropdownMenu/common.d.ts +6 -0
  130. package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
  131. package/types/components/footer/Footer.d.ts +12 -0
  132. package/types/components/footer/FooterCenter.d.ts +8 -0
  133. package/types/components/hoc/withInternalFallback.d.ts +4 -0
  134. package/types/components/icons.d.ts +15 -2
  135. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +9 -0
  136. package/types/components/main-menu/DefaultItems.d.ts +47 -0
  137. package/types/components/main-menu/MainMenu.d.ts +61 -0
  138. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +57 -0
  139. package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
  140. package/types/components/welcome-screen/WelcomeScreen.d.ts +84 -0
  141. package/types/constants.d.ts +94 -18
  142. package/types/context/tunnels.d.ts +19 -0
  143. package/types/context/ui-appState.d.ts +4 -0
  144. package/types/data/blob.d.ts +3 -2
  145. package/types/data/encode.d.ts +1 -1
  146. package/types/data/filesystem.d.ts +2 -1
  147. package/types/data/index.d.ts +1 -1
  148. package/types/data/library.d.ts +3 -45
  149. package/types/data/restore.d.ts +10 -4
  150. package/types/data/transform.d.ts +71 -0
  151. package/types/data/types.d.ts +3 -5
  152. package/types/data/url.d.ts +7 -0
  153. package/types/element/Hyperlink.d.ts +57 -30
  154. package/types/element/binding.d.ts +4 -3
  155. package/types/element/bounds.d.ts +31 -7
  156. package/types/element/collision.d.ts +7 -7
  157. package/types/element/dragElements.d.ts +12 -2
  158. package/types/element/embeddable.d.ts +159 -0
  159. package/types/element/image.d.ts +11 -1
  160. package/types/element/index.d.ts +3 -2
  161. package/types/element/linearElementEditor.d.ts +49 -24
  162. package/types/element/mutateElement.d.ts +2 -1
  163. package/types/element/newElement.d.ts +48 -15
  164. package/types/element/resizeElements.d.ts +3 -2
  165. package/types/element/showSelectedShapeActions.d.ts +2 -2
  166. package/types/element/sizeHelpers.d.ts +8 -1
  167. package/types/element/sortElements.d.ts +2 -0
  168. package/types/element/textElement.d.ts +44 -11
  169. package/types/element/textWysiwyg.d.ts +7 -2
  170. package/types/element/transformHandles.d.ts +15 -8
  171. package/types/element/typeChecks.d.ts +13 -2
  172. package/types/element/types.d.ts +64 -36
  173. package/types/emitter.d.ts +1 -1
  174. package/types/errors.d.ts +1 -1
  175. package/types/frame.d.ts +40 -0
  176. package/types/ga.d.ts +5 -5
  177. package/types/groups.d.ts +15 -11
  178. package/types/history.d.ts +3 -3
  179. package/types/hooks/useCreatePortalContainer.d.ts +4 -0
  180. package/types/hooks/useLibraryItemSvg.d.ts +11 -0
  181. package/types/hooks/useOutsideClick.d.ts +19 -2
  182. package/types/hooks/useScrollPosition.d.ts +1 -0
  183. package/types/hooks/useStable.d.ts +1 -0
  184. package/types/hooks/useTransition.d.ts +2 -0
  185. package/types/i18n.d.ts +11 -2
  186. package/types/jotai.d.ts +20 -108
  187. package/types/keys.d.ts +7 -4
  188. package/types/math.d.ts +6 -1
  189. package/types/packages/excalidraw/example/App.d.ts +7 -1
  190. package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
  191. package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
  192. package/types/packages/excalidraw/example/initialData.d.ts +182 -64
  193. package/types/packages/excalidraw/index.d.ts +19 -3
  194. package/types/packages/excalidraw/main.d.ts +3 -1
  195. package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
  196. package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
  197. package/types/packages/utils.d.ts +28 -24
  198. package/types/renderer/renderElement.d.ts +12 -22
  199. package/types/renderer/renderScene.d.ts +19 -29
  200. package/types/renderer/renderSnaps.d.ts +2 -0
  201. package/types/renderer/roundRect.d.ts +1 -1
  202. package/types/scene/Renderer.d.ts +25 -0
  203. package/types/scene/Scene.d.ts +27 -5
  204. package/types/scene/Shape.d.ts +12 -0
  205. package/types/scene/ShapeCache.d.ts +20 -0
  206. package/types/scene/comparisons.d.ts +1 -1
  207. package/types/scene/export.d.ts +182 -10
  208. package/types/scene/index.d.ts +1 -1
  209. package/types/scene/scroll.d.ts +1 -1
  210. package/types/scene/scrollbars.d.ts +2 -6
  211. package/types/scene/selection.d.ts +27 -6
  212. package/types/scene/types.d.ts +69 -26
  213. package/types/snapping.d.ts +108 -0
  214. package/types/types.d.ts +196 -81
  215. package/types/utility-types.d.ts +24 -0
  216. package/types/utils.d.ts +78 -12
  217. package/types/zindex.d.ts +4 -4
  218. package/types/components/ActiveFile.d.ts +0 -7
  219. package/types/components/ClearCanvas.d.ts +0 -4
  220. package/types/components/CollabButton.d.ts +0 -6
  221. package/types/components/ColorPicker.d.ts +0 -14
  222. package/types/components/Footer.d.ts +0 -10
  223. package/types/components/LibraryButton.d.ts +0 -8
  224. package/types/components/MenuItem.d.ts +0 -11
  225. package/types/components/MenuUtils.d.ts +0 -1
  226. package/types/components/SingleLibraryItem.d.ts +0 -10
  227. package/types/components/WelcomeScreen.d.ts +0 -10
  228. package/types/components/WelcomeScreenDecor.d.ts +0 -6
  229. package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
  230. /package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js.LICENSE.txt → vendor-d415b28e9024dee4bb1b.js.LICENSE.txt} +0 -0
  231. /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.d.ts → vendor-d415b28e9024dee4bb1b.d.ts} +0 -0
  232. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
@@ -1,14 +0,0 @@
1
- import "./ColorPicker.scss";
2
- import { ExcalidrawElement } from "../element/types";
3
- import { AppState } from "../types";
4
- export declare const getCustomColors: (elements: readonly ExcalidrawElement[], type: "elementBackground" | "elementStroke") => string[];
5
- export declare const ColorPicker: ({ type, color, onChange, label, isActive, setActive, elements, appState, }: {
6
- type: "canvasBackground" | "elementBackground" | "elementStroke";
7
- color: string | null;
8
- onChange: (color: string) => void;
9
- label: string;
10
- isActive: boolean;
11
- setActive: (active: boolean) => void;
12
- elements: readonly ExcalidrawElement[];
13
- appState: AppState;
14
- }) => JSX.Element;
@@ -1,10 +0,0 @@
1
- import { ActionManager } from "../actions/manager";
2
- import { AppState, ExcalidrawProps } from "../types";
3
- declare const Footer: ({ appState, actionManager, renderCustomFooter, showExitZenModeBtn, renderWelcomeScreen, }: {
4
- appState: AppState;
5
- actionManager: ActionManager;
6
- renderCustomFooter?: ExcalidrawProps["renderFooter"];
7
- showExitZenModeBtn: boolean;
8
- renderWelcomeScreen: boolean;
9
- }) => JSX.Element;
10
- export default Footer;
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import { AppState } from "../types";
3
- import "./LibraryButton.scss";
4
- export declare const LibraryButton: React.FC<{
5
- appState: AppState;
6
- setAppState: React.Component<any, AppState>["setState"];
7
- isMobile?: boolean;
8
- }>;
@@ -1,11 +0,0 @@
1
- import "./Menu.scss";
2
- interface MenuProps {
3
- icon: JSX.Element;
4
- onClick: () => void;
5
- label: string;
6
- dataTestId: string;
7
- shortcut?: string;
8
- isCollaborating?: boolean;
9
- }
10
- declare const MenuItem: ({ icon, onClick, label, dataTestId, shortcut, isCollaborating, }: MenuProps) => JSX.Element;
11
- export default MenuItem;
@@ -1 +0,0 @@
1
- export declare const Separator: () => JSX.Element;
@@ -1,10 +0,0 @@
1
- import { AppState, LibraryItem } from "../types";
2
- import "./SingleLibraryItem.scss";
3
- declare const SingleLibraryItem: ({ libItem, appState, index, onChange, onRemove, }: {
4
- libItem: LibraryItem;
5
- appState: AppState;
6
- index: number;
7
- onChange: (val: string, index: number) => void;
8
- onRemove: (id: string) => void;
9
- }) => JSX.Element;
10
- export default SingleLibraryItem;
@@ -1,10 +0,0 @@
1
- import { ActionManager } from "../actions/manager";
2
- import { AppState } from "../types";
3
- import { AppProps } from "../types";
4
- import "./WelcomeScreen.scss";
5
- declare const WelcomeScreen: ({ appState, actionManager, onCollabButtonClick, }: {
6
- appState: AppState;
7
- actionManager: ActionManager;
8
- onCollabButtonClick: AppProps["onCollabButtonClick"];
9
- }) => JSX.Element;
10
- export default WelcomeScreen;
@@ -1,6 +0,0 @@
1
- import { ReactNode } from "react";
2
- declare const WelcomeScreenDecor: ({ children, shouldRender, }: {
3
- children: ReactNode;
4
- shouldRender: boolean;
5
- }) => JSX.Element | null;
6
- export default WelcomeScreenDecor;
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- export declare const withUpstreamOverride: <P>(Component: React.ComponentType<P>) => readonly [React.FC<{
3
- children: React.ReactNode;
4
- }>, {
5
- (props: P & {
6
- /** @private internal */
7
- __isFallback?: boolean | undefined;
8
- }): JSX.Element | null;
9
- displayName: string;
10
- }];