@zsviczian/excalidraw 0.13.0-obsidian-2 → 0.14.1-obsidian

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 (80) hide show
  1. package/README.md +417 -19
  2. package/dist/excalidraw.development.js +581 -1153
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -102
  5. package/package.json +1 -1
  6. package/types/actions/actionAddToLibrary.d.ts +39 -18
  7. package/types/actions/actionAlign.d.ts +6 -18
  8. package/types/actions/actionBoundText.d.ts +15 -8
  9. package/types/actions/actionCanvas.d.ts +246 -76
  10. package/types/actions/actionClipboard.d.ts +84 -31
  11. package/types/actions/actionDeleteSelected.d.ts +40 -21
  12. package/types/actions/actionDistribute.d.ts +2 -6
  13. package/types/actions/actionDuplicateSelection.d.ts +1 -3
  14. package/types/actions/actionExport.d.ts +125 -78
  15. package/types/actions/actionFinalize.d.ts +27 -15
  16. package/types/actions/actionFlip.d.ts +2 -2
  17. package/types/actions/actionGroup.d.ts +4 -8
  18. package/types/actions/actionLinearEditor.d.ts +14 -7
  19. package/types/actions/actionMenu.d.ts +40 -26
  20. package/types/actions/actionNavigate.d.ts +1 -3
  21. package/types/actions/actionProperties.d.ts +182 -117
  22. package/types/actions/actionStyles.d.ts +13 -6
  23. package/types/actions/actionToggleGridMode.d.ts +14 -6
  24. package/types/actions/actionToggleLock.d.ts +13 -6
  25. package/types/actions/actionToggleStats.d.ts +13 -6
  26. package/types/actions/actionToggleViewMode.d.ts +14 -6
  27. package/types/actions/actionToggleZenMode.d.ts +14 -6
  28. package/types/actions/actionZindex.d.ts +4 -12
  29. package/types/actions/manager.d.ts +2 -1
  30. package/types/actions/types.d.ts +3 -5
  31. package/types/appState.d.ts +8 -6
  32. package/types/components/ActiveConfirmDialog.d.ts +24 -0
  33. package/types/components/App.d.ts +8 -50
  34. package/types/components/Button.d.ts +15 -0
  35. package/types/components/CollabButton.d.ts +1 -2
  36. package/types/components/ContextMenu.d.ts +8 -20
  37. package/types/components/HandButton.d.ts +10 -0
  38. package/types/components/JSONExportDialog.d.ts +3 -1
  39. package/types/components/LayerUI.d.ts +3 -3
  40. package/types/components/LibraryMenuHeaderContent.d.ts +23 -0
  41. package/types/components/LockButton.d.ts +0 -1
  42. package/types/components/MobileMenu.d.ts +5 -6
  43. package/types/components/ToolButton.d.ts +1 -1
  44. package/types/components/UserList.d.ts +0 -2
  45. package/types/components/dropdownMenu/DropdownMenu.d.ts +66 -0
  46. package/types/components/dropdownMenu/DropdownMenuContent.d.ts +15 -0
  47. package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
  48. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
  49. package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
  50. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
  51. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +13 -0
  52. package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  53. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
  54. package/types/components/dropdownMenu/common.d.ts +6 -0
  55. package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
  56. package/types/components/footer/Footer.d.ts +13 -0
  57. package/types/components/footer/FooterCenter.d.ts +8 -0
  58. package/types/components/icons.d.ts +2 -1
  59. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
  60. package/types/components/main-menu/DefaultItems.d.ts +44 -0
  61. package/types/components/main-menu/MainMenu.d.ts +60 -0
  62. package/types/components/mainMenu/DefaultItems.d.ts +44 -0
  63. package/types/components/mainMenu/MainMenu.d.ts +63 -0
  64. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
  65. package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
  66. package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
  67. package/types/constants.d.ts +6 -4
  68. package/types/element/Hyperlink.d.ts +15 -10
  69. package/types/element/linearElementEditor.d.ts +14 -6
  70. package/types/element/textElement.d.ts +7 -0
  71. package/types/element/textWysiwyg.d.ts +6 -1
  72. package/types/excalidraw-app/data/index.d.ts +5 -0
  73. package/types/excalidraw-app/data/localStorage.d.ts +5 -0
  74. package/types/keys.d.ts +2 -3
  75. package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
  76. package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
  77. package/types/packages/excalidraw/index.d.ts +10 -0
  78. package/types/renderer/easingFunctions.d.ts +6 -0
  79. package/types/types.d.ts +54 -26
  80. package/types/utils.d.ts +23 -3
package/types/utils.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { EVENT } from "./constants";
2
2
  import { FontFamilyValues, FontString } from "./element/types";
3
- import { AppState, LastActiveToolBeforeEraser, Zoom } from "./types";
3
+ import { AppState, LastActiveTool, Zoom } from "./types";
4
4
  import { SHAPES } from "./shapes";
5
+ import React from "react";
5
6
  export declare const setDateTimeForTests: (dateTime: string) => void;
6
7
  export declare const getDateTime: () => string;
7
8
  export declare const capitalizeString: (str: string) => string;
@@ -33,12 +34,12 @@ export declare const selectNode: (node: Element) => void;
33
34
  export declare const removeSelection: () => void;
34
35
  export declare const distance: (x: number, y: number) => number;
35
36
  export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: ({
36
- type: (typeof SHAPES)[number]["value"] | "eraser";
37
+ type: (typeof SHAPES)[number]["value"] | "eraser" | "hand";
37
38
  } | {
38
39
  type: "custom";
39
40
  customType: string;
40
41
  }) & {
41
- lastActiveToolBeforeEraser?: LastActiveToolBeforeEraser;
42
+ lastActiveToolBeforeEraser?: LastActiveTool;
42
43
  }) => AppState["activeTool"];
43
44
  export declare const resetCursor: (canvas: HTMLCanvasElement | null) => void;
44
45
  export declare const setCursor: (canvas: HTMLCanvasElement | null, cursor: string) => void;
@@ -134,3 +135,22 @@ export declare const isPrimitive: (val: any) => boolean;
134
135
  export declare const getFrame: () => "top" | "iframe";
135
136
  export declare const isPromiseLike: (value: any) => value is Promise<any>;
136
137
  export declare const queryFocusableElements: (container: HTMLElement | null) => HTMLElement[];
138
+ /**
139
+ * Partitions React children into named components and the rest of children.
140
+ *
141
+ * Returns known children as a dictionary of react children keyed by their
142
+ * displayName, and the rest children as an array.
143
+ *
144
+ * NOTE all named react components are included in the dictionary, irrespective
145
+ * of the supplied type parameter. This means you may be throwing away
146
+ * children that you aren't expecting, but should nonetheless be rendered.
147
+ * To guard against this (provided you care about the rest children at all),
148
+ * supply a second parameter with an object with keys of the expected children.
149
+ */
150
+ export declare const getReactChildren: <KnownChildren extends {
151
+ [x: string]: React.ReactNode;
152
+ }>(children: React.ReactNode, expectedComponents?: Record<keyof KnownChildren, any> | undefined) => readonly [Partial<KnownChildren>, React.ReactNode[]];
153
+ export declare const isShallowEqual: <T extends Record<string, any>>(objA: T, objB: T) => boolean;
154
+ export declare const composeEventHandlers: <E>(originalEventHandler?: ((event: E) => void) | undefined, ourEventHandler?: ((event: E) => void) | undefined, { checkForDefaultPrevented }?: {
155
+ checkForDefaultPrevented?: boolean | undefined;
156
+ }) => (event: E) => void;