@excalidraw/math 0.18.0-6135548 → 0.18.0-699826

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 (150) hide show
  1. package/dist/dev/index.js +150 -130
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/appEventBus.d.ts +27 -0
  6. package/dist/types/common/src/colors.d.ts +2 -2
  7. package/dist/types/common/src/constants.d.ts +5 -2
  8. package/dist/types/common/src/index.d.ts +3 -0
  9. package/dist/types/common/src/utils.d.ts +4 -7
  10. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  11. package/dist/types/element/src/Scene.d.ts +7 -3
  12. package/dist/types/element/src/arrowheads.d.ts +3 -0
  13. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  14. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  15. package/dist/types/element/src/binding.d.ts +13 -8
  16. package/dist/types/element/src/bounds.d.ts +22 -3
  17. package/dist/types/element/src/collision.d.ts +4 -3
  18. package/dist/types/element/src/distribute.d.ts +2 -1
  19. package/dist/types/element/src/duplicate.d.ts +1 -0
  20. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  21. package/dist/types/element/src/frame.d.ts +7 -6
  22. package/dist/types/element/src/index.d.ts +3 -0
  23. package/dist/types/element/src/linearElementEditor.d.ts +7 -2
  24. package/dist/types/element/src/mutateElement.d.ts +2 -0
  25. package/dist/types/element/src/selection.d.ts +7 -3
  26. package/dist/types/element/src/shape.d.ts +1 -1
  27. package/dist/types/element/src/textElement.d.ts +1 -1
  28. package/dist/types/element/src/textWrapping.d.ts +26 -0
  29. package/dist/types/element/src/typeChecks.d.ts +1 -0
  30. package/dist/types/element/src/types.d.ts +5 -2
  31. package/dist/types/element/src/utils.d.ts +6 -4
  32. package/dist/types/element/src/zindex.d.ts +1 -1
  33. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +41 -38
  34. package/dist/types/excalidraw/actions/actionBoundText.d.ts +29 -27
  35. package/dist/types/excalidraw/actions/actionCanvas.d.ts +169 -157
  36. package/dist/types/excalidraw/actions/actionClipboard.d.ts +28 -26
  37. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +14 -13
  38. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +44 -39
  39. package/dist/types/excalidraw/actions/actionDeselect.d.ts +159 -0
  40. package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -13
  41. package/dist/types/excalidraw/actions/actionElementLock.d.ts +28 -26
  42. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +14 -13
  43. package/dist/types/excalidraw/actions/actionExport.d.ts +77 -349
  44. package/dist/types/excalidraw/actions/actionFrame.d.ts +56 -52
  45. package/dist/types/excalidraw/actions/actionGroup.d.ts +29 -27
  46. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +16 -13
  47. package/dist/types/excalidraw/actions/actionLink.d.ts +14 -13
  48. package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -13
  49. package/dist/types/excalidraw/actions/actionProperties.d.ts +30 -28
  50. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +14 -13
  51. package/dist/types/excalidraw/actions/actionStyles.d.ts +14 -12
  52. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  53. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  54. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +14 -13
  55. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  56. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +14 -13
  57. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -13
  58. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +14 -13
  59. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +14 -13
  60. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +14 -13
  61. package/dist/types/excalidraw/actions/index.d.ts +3 -0
  62. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  63. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  64. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  65. package/dist/types/excalidraw/appState.d.ts +10 -7
  66. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  67. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  68. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  69. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  70. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  71. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  72. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  73. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  74. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  75. package/dist/types/excalidraw/components/App.d.ts +63 -16
  76. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  77. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  78. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  79. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  80. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  81. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  82. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  83. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  84. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +2 -6
  85. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +2 -1
  86. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  87. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +11 -7
  88. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  89. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  90. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  91. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  92. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  93. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +4 -0
  94. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  95. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  96. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  97. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
  98. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  99. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  100. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
  101. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  102. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
  103. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  104. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  105. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  106. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  107. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  108. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  109. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  110. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  111. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
  112. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
  113. package/dist/types/excalidraw/components/shapes.d.ts +81 -1
  114. package/dist/types/excalidraw/data/blob.d.ts +47 -46
  115. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  116. package/dist/types/excalidraw/data/index.d.ts +2 -3
  117. package/dist/types/excalidraw/data/json.d.ts +37 -28
  118. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  119. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  120. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  121. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  122. package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
  123. package/dist/types/excalidraw/scene/Renderer.d.ts +425 -19
  124. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  125. package/dist/types/excalidraw/types.d.ts +116 -18
  126. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  127. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  128. package/dist/types/math/src/constants.d.ts +0 -1
  129. package/dist/types/math/src/curve.d.ts +4 -1
  130. package/dist/types/math/src/point.d.ts +8 -2
  131. package/dist/types/math/src/types.d.ts +25 -1
  132. package/dist/types/utils/src/index.d.ts +1 -2
  133. package/package.json +2 -2
  134. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  135. package/dist/types/excalidraw/charts.d.ts +0 -27
  136. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  137. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  138. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  139. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  140. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  141. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  142. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  143. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  144. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  145. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  146. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  147. package/dist/types/excalidraw/index.d.ts +0 -46
  148. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  149. package/dist/types/utils/src/bbox.d.ts +0 -9
  150. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -0,0 +1 @@
1
+ export declare const getMermaidAutoFixCandidates: (sourceText: string, errorMessage: string) => string[];
@@ -0,0 +1,10 @@
1
+ export declare const isMermaidParseSyntaxError: (message: string) => boolean;
2
+ export declare const isMermaidAutoFixableError: (message: string) => boolean;
3
+ export declare const isMermaidCaretLine: (line: string) => boolean;
4
+ export declare const getMermaidInactiveParticipant: (message: string) => string | null;
5
+ export declare const getMermaidErrorLineNumber: (message: string, sourceText?: string) => number | null;
6
+ export declare const getMermaidSyntaxErrorGuidance: (message: string, sourceText?: string) => {
7
+ summary: string;
8
+ likelyCauses: string[];
9
+ } | null;
10
+ export declare const formatMermaidParseErrorMessage: (message: string) => string;
@@ -1,9 +1,13 @@
1
1
  import "./Toast.scss";
2
- import type { CSSProperties } from "react";
3
- export declare const Toast: ({ message, onClose, closable, duration, style, }: {
4
- message: string;
2
+ import type { CSSProperties, ReactNode } from "react";
3
+ export declare const Toast: (({ message, onClose, closable, duration, style, }: {
4
+ message: ReactNode;
5
5
  onClose: () => void;
6
6
  closable?: boolean;
7
7
  duration?: number;
8
8
  style?: CSSProperties;
9
- }) => import("react/jsx-runtime").JSX.Element;
9
+ }) => import("react/jsx-runtime").JSX.Element) & {
10
+ ProgressBar: ({ progress }: {
11
+ progress: number;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ };
@@ -11,7 +11,7 @@ type InteractiveCanvasProps = {
11
11
  visibleElements: readonly NonDeletedExcalidrawElement[];
12
12
  selectedElements: readonly NonDeletedExcalidrawElement[];
13
13
  allElementsMap: NonDeletedSceneElementsMap;
14
- sceneNonce: number | undefined;
14
+ canvasNonce: string;
15
15
  selectionNonce: number | undefined;
16
16
  scale: number;
17
17
  appState: InteractiveCanvasAppState;
@@ -21,6 +21,7 @@ type InteractiveCanvasProps = {
21
21
  renderInteractiveSceneCallback: (data: RenderInteractiveSceneCallback) => void;
22
22
  handleCanvasRef: (canvas: HTMLCanvasElement | null) => void;
23
23
  onContextMenu: Exclude<DOMAttributes<HTMLCanvasElement | HTMLDivElement>["onContextMenu"], undefined>;
24
+ onClick: Exclude<DOMAttributes<HTMLCanvasElement>["onClick"], undefined>;
24
25
  onPointerMove: Exclude<DOMAttributes<HTMLCanvasElement>["onPointerMove"], undefined>;
25
26
  onPointerUp: Exclude<DOMAttributes<HTMLCanvasElement>["onPointerUp"], undefined>;
26
27
  onPointerCancel: Exclude<DOMAttributes<HTMLCanvasElement>["onPointerCancel"], undefined>;
@@ -4,6 +4,7 @@ import type { AppState } from "../../types";
4
4
  import type { RoughCanvas } from "roughjs/bin/canvas";
5
5
  interface NewElementCanvasProps {
6
6
  appState: AppState;
7
+ newElement: NonNullable<AppState["newElement"]>;
7
8
  elementsMap: RenderableElementsMap;
8
9
  allElementsMap: NonDeletedSceneElementsMap;
9
10
  scale: number;
@@ -9,7 +9,7 @@ type StaticCanvasProps = {
9
9
  elementsMap: RenderableElementsMap;
10
10
  allElementsMap: NonDeletedSceneElementsMap;
11
11
  visibleElements: readonly NonDeletedExcalidrawElement[];
12
- sceneNonce: number | undefined;
12
+ canvasNonce: string;
13
13
  selectionNonce: number | undefined;
14
14
  scale: number;
15
15
  appState: StaticCanvasAppState;
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
2
  import "./DropdownMenu.scss";
3
3
  declare const DropdownMenu: {
4
- ({ children, open, placement, }: {
4
+ ({ children, open, }: {
5
5
  children?: React.ReactNode;
6
6
  open: boolean;
7
- placement?: "top" | "bottom";
8
7
  }): import("react/jsx-runtime").JSX.Element;
9
8
  Trigger: {
10
9
  ({ className, children, onToggle, title, ...rest }: {
@@ -16,30 +15,19 @@ declare const DropdownMenu: {
16
15
  displayName: string;
17
16
  };
18
17
  Content: {
19
- ({ children, onClickOutside, className, onSelect, style, placement, }: {
18
+ ({ children, onClickOutside, className, onSelect, open, align, style, }: {
20
19
  children?: React.ReactNode;
21
20
  onClickOutside?: () => void;
22
21
  className?: string;
23
22
  onSelect?: (event: Event) => void;
23
+ open?: boolean;
24
24
  style?: React.CSSProperties;
25
- placement?: "top" | "bottom";
25
+ align?: "start" | "center" | "end";
26
26
  }): import("react/jsx-runtime").JSX.Element;
27
27
  displayName: string;
28
28
  };
29
29
  Item: {
30
- ({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, badge, ...rest }: {
31
- icon?: React.JSX.Element;
32
- value?: string | number | undefined;
33
- order?: number;
34
- onSelect?: (event: Event) => void;
35
- children: React.ReactNode;
36
- shortcut?: string;
37
- hovered?: boolean;
38
- selected?: boolean;
39
- textStyle?: React.CSSProperties;
40
- className?: string;
41
- badge?: React.ReactNode;
42
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
30
+ ({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: import("./DropdownMenuItem").DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
43
31
  displayName: string;
44
32
  Badge: {
45
33
  ({ type, children, }: {
@@ -49,6 +37,9 @@ declare const DropdownMenu: {
49
37
  displayName: string;
50
38
  };
51
39
  };
40
+ ItemCheckbox: (props: Omit<import("./DropdownMenuItem").DropdownMenuItemProps, "icon"> & {
41
+ checked: boolean;
42
+ }) => import("react/jsx-runtime").JSX.Element;
52
43
  ItemLink: {
53
44
  ({ icon, shortcut, href, children, onSelect, className, selected, rel, ...rest }: {
54
45
  href: string;
@@ -80,6 +71,28 @@ declare const DropdownMenu: {
80
71
  (): import("react/jsx-runtime").JSX.Element;
81
72
  displayName: string;
82
73
  };
74
+ Sub: {
75
+ ({ children }: {
76
+ children?: React.ReactNode;
77
+ }): import("react/jsx-runtime").JSX.Element;
78
+ Trigger: {
79
+ ({ children, icon, shortcut, className, }: {
80
+ children: React.ReactNode;
81
+ icon?: React.JSX.Element;
82
+ shortcut?: string;
83
+ className?: string;
84
+ }): import("react/jsx-runtime").JSX.Element;
85
+ displayName: string;
86
+ };
87
+ Content: {
88
+ ({ children, className, }: {
89
+ children?: React.ReactNode;
90
+ className?: string;
91
+ }): import("react/jsx-runtime").JSX.Element;
92
+ displayName: string;
93
+ };
94
+ displayName: string;
95
+ };
83
96
  displayName: string;
84
97
  };
85
98
  export default DropdownMenu;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  declare const MenuContent: {
3
- ({ children, onClickOutside, className, onSelect, style, placement, }: {
3
+ ({ children, onClickOutside, className, onSelect, open, align, style, }: {
4
4
  children?: React.ReactNode;
5
5
  onClickOutside?: () => void;
6
6
  className?: string;
@@ -8,8 +8,9 @@ declare const MenuContent: {
8
8
  * Called when any menu item is selected (clicked on).
9
9
  */
10
10
  onSelect?: (event: Event) => void;
11
+ open?: boolean;
11
12
  style?: React.CSSProperties;
12
- placement?: "top" | "bottom";
13
+ align?: "start" | "center" | "end";
13
14
  }): import("react/jsx-runtime").JSX.Element;
14
15
  displayName: string;
15
16
  };
@@ -1,20 +1,18 @@
1
1
  import React from "react";
2
2
  import type { ValueOf } from "@excalidraw/common/utility-types";
3
3
  import type { JSX } from "react";
4
+ export type DropdownMenuItemProps = {
5
+ icon?: JSX.Element;
6
+ badge?: React.ReactNode;
7
+ value?: string | number | undefined;
8
+ onSelect?: (event: Event) => void;
9
+ children: React.ReactNode;
10
+ shortcut?: string;
11
+ selected?: boolean;
12
+ className?: string;
13
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">;
4
14
  declare const DropdownMenuItem: {
5
- ({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, badge, ...rest }: {
6
- icon?: JSX.Element;
7
- value?: string | number | undefined;
8
- order?: number;
9
- onSelect?: (event: Event) => void;
10
- children: React.ReactNode;
11
- shortcut?: string;
12
- hovered?: boolean;
13
- selected?: boolean;
14
- textStyle?: React.CSSProperties;
15
- className?: string;
16
- badge?: React.ReactNode;
17
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
15
+ ({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
18
16
  displayName: string;
19
17
  Badge: {
20
18
  ({ type, children, }: {
@@ -0,0 +1,5 @@
1
+ import type { DropdownMenuItemProps } from "./DropdownMenuItem";
2
+ declare const DropdownMenuItemCheckbox: (props: Omit<DropdownMenuItemProps, "icon"> & {
3
+ checked: boolean;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default DropdownMenuItemCheckbox;
@@ -9,9 +9,10 @@ type Props<T> = {
9
9
  onChange: (value: T) => void;
10
10
  children: React.ReactNode;
11
11
  name: string;
12
+ icon?: React.ReactNode;
12
13
  };
13
14
  declare const DropdownMenuItemContentRadio: {
14
- <T>({ value, shortcut, onChange, choices, children, name, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
+ <T>({ value, shortcut, onChange, choices, children, name, icon, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
16
  displayName: string;
16
17
  };
17
18
  export default DropdownMenuItemContentRadio;
@@ -0,0 +1,23 @@
1
+ declare const DropdownMenuSub: {
2
+ ({ children }: {
3
+ children?: React.ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ Trigger: {
6
+ ({ children, icon, shortcut, className, }: {
7
+ children: React.ReactNode;
8
+ icon?: import("react").JSX.Element;
9
+ shortcut?: string;
10
+ className?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ Content: {
15
+ ({ children, className, }: {
16
+ children?: React.ReactNode;
17
+ className?: string;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ displayName: string;
20
+ };
21
+ displayName: string;
22
+ };
23
+ export default DropdownMenuSub;
@@ -0,0 +1,8 @@
1
+ declare const DropdownMenuSubContent: {
2
+ ({ children, className, }: {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ export default DropdownMenuSubContent;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { JSX } from "react";
3
+ declare const DropdownMenuSubTrigger: {
4
+ ({ children, icon, shortcut, className, }: {
5
+ children: React.ReactNode;
6
+ icon?: JSX.Element;
7
+ shortcut?: string;
8
+ className?: string;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export default DropdownMenuSubTrigger;
@@ -3,4 +3,4 @@ export declare const DropdownMenuContentPropsContext: React.Context<{
3
3
  onSelect?: (event: Event) => void;
4
4
  }>;
5
5
  export declare const getDropdownMenuItemClassName: (className?: string, selected?: boolean, hovered?: boolean) => string;
6
- export declare const useHandleDropdownMenuItemClick: (origOnClick: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement> | undefined, onSelect: ((event: Event) => void) | undefined) => (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void;
6
+ export declare const useHandleDropdownMenuItemSelect: (onSelect: ((event: Event) => void) | undefined) => (event: Event) => void;
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
2
  export declare const getMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
3
3
  export declare const getMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
4
+ export declare const getSubMenuTriggerComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
5
+ export declare const getSubMenuContentComponent: (children: React.ReactNode) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
@@ -116,38 +116,49 @@ export declare const SloppinessArtistIcon: import("react/jsx-runtime").JSX.Eleme
116
116
  export declare const SloppinessCartoonistIcon: import("react/jsx-runtime").JSX.Element;
117
117
  export declare const EdgeSharpIcon: import("react/jsx-runtime").JSX.Element;
118
118
  export declare const EdgeRoundIcon: import("react/jsx-runtime").JSX.Element;
119
- export declare const ArrowheadNoneIcon: import("react/jsx-runtime").JSX.Element;
119
+ export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ flip }: {
120
+ flip?: boolean;
121
+ }) => import("react/jsx-runtime").JSX.Element>;
120
122
  export declare const ArrowheadArrowIcon: React.MemoExoticComponent<({ flip }: {
121
123
  flip?: boolean;
122
124
  }) => import("react/jsx-runtime").JSX.Element>;
125
+ export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
126
+ flip?: boolean;
127
+ }) => import("react/jsx-runtime").JSX.Element>;
128
+ export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
129
+ flip?: boolean;
130
+ }) => import("react/jsx-runtime").JSX.Element>;
123
131
  export declare const ArrowheadCircleIcon: React.MemoExoticComponent<({ flip }: {
124
132
  flip?: boolean;
125
133
  }) => import("react/jsx-runtime").JSX.Element>;
126
134
  export declare const ArrowheadCircleOutlineIcon: React.MemoExoticComponent<({ flip }: {
127
135
  flip?: boolean;
128
136
  }) => import("react/jsx-runtime").JSX.Element>;
129
- export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
137
+ export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
130
138
  flip?: boolean;
131
139
  }) => import("react/jsx-runtime").JSX.Element>;
132
- export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
140
+ export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
133
141
  flip?: boolean;
134
142
  }) => import("react/jsx-runtime").JSX.Element>;
135
- export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
143
+ export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
136
144
  flip?: boolean;
137
145
  }) => import("react/jsx-runtime").JSX.Element>;
138
- export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
146
+ export declare const ArrowheadCardinalityOneIcon: React.MemoExoticComponent<({ flip }: {
139
147
  flip?: boolean;
140
148
  }) => import("react/jsx-runtime").JSX.Element>;
141
- export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
149
+ export declare const ArrowheadCardinalityManyIcon: React.MemoExoticComponent<({ flip }: {
150
+ flip?: boolean;
151
+ }) => import("react/jsx-runtime").JSX.Element>;
152
+ export declare const ArrowheadCardinalityOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
142
153
  flip?: boolean;
143
154
  }) => import("react/jsx-runtime").JSX.Element>;
144
- export declare const ArrowheadCrowfootIcon: React.MemoExoticComponent<({ flip }: {
155
+ export declare const ArrowheadCardinalityExactlyOneIcon: React.MemoExoticComponent<({ flip }: {
145
156
  flip?: boolean;
146
157
  }) => import("react/jsx-runtime").JSX.Element>;
147
- export declare const ArrowheadCrowfootOneIcon: React.MemoExoticComponent<({ flip }: {
158
+ export declare const ArrowheadCardinalityZeroOrOneIcon: React.MemoExoticComponent<({ flip }: {
148
159
  flip?: boolean;
149
160
  }) => import("react/jsx-runtime").JSX.Element>;
150
- export declare const ArrowheadCrowfootOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
161
+ export declare const ArrowheadCardinalityZeroOrManyIcon: React.MemoExoticComponent<({ flip }: {
151
162
  flip?: boolean;
152
163
  }) => import("react/jsx-runtime").JSX.Element>;
153
164
  export declare const FontSizeSmallIcon: import("react/jsx-runtime").JSX.Element;
@@ -236,4 +247,7 @@ export declare const chevronLeftIcon: import("react/jsx-runtime").JSX.Element;
236
247
  export declare const sidebarRightIcon: import("react/jsx-runtime").JSX.Element;
237
248
  export declare const messageCircleIcon: import("react/jsx-runtime").JSX.Element;
238
249
  export declare const presentationIcon: import("react/jsx-runtime").JSX.Element;
250
+ export declare const emptyIcon: import("react/jsx-runtime").JSX.Element;
251
+ export declare const chevronRight: import("react/jsx-runtime").JSX.Element;
252
+ export declare const settingsIcon: import("react/jsx-runtime").JSX.Element;
239
253
  export {};
@@ -35,11 +35,14 @@ export declare const ClearCanvas: {
35
35
  export declare const ToggleTheme: {
36
36
  (props: {
37
37
  allowSystemTheme: true;
38
+ /**
39
+ * Controls the theme of this UI component only.
40
+ * You should subscribe to `props.onThemeChange` and control the theme
41
+ * upstream.
42
+ */
38
43
  theme: Theme | "system";
39
- onSelect: (theme: Theme | "system") => void;
40
44
  } | {
41
- allowSystemTheme?: false;
42
- onSelect?: (theme: Theme) => void;
45
+ allowSystemTheme: false;
43
46
  }): import("react/jsx-runtime").JSX.Element | null;
44
47
  displayName: string;
45
48
  };
@@ -62,3 +65,21 @@ export declare const LiveCollaborationTrigger: {
62
65
  }): import("react/jsx-runtime").JSX.Element;
63
66
  displayName: string;
64
67
  };
68
+ export declare const PreferencesToggleGridModeItem: () => import("react/jsx-runtime").JSX.Element;
69
+ export declare const PreferencesToggleZenModeItem: () => import("react/jsx-runtime").JSX.Element;
70
+ export declare const Preferences: {
71
+ ({ children, additionalItems, }: {
72
+ children?: React.ReactNode;
73
+ additionalItems?: React.ReactNode;
74
+ }): import("react/jsx-runtime").JSX.Element;
75
+ ToggleToolLock: () => import("react/jsx-runtime").JSX.Element;
76
+ BoxSelectionMode: () => import("react/jsx-runtime").JSX.Element;
77
+ ToggleSnapMode: () => import("react/jsx-runtime").JSX.Element;
78
+ ToggleArrowBinding: () => import("react/jsx-runtime").JSX.Element;
79
+ ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
80
+ ToggleGridMode: () => import("react/jsx-runtime").JSX.Element;
81
+ ToggleZenMode: () => import("react/jsx-runtime").JSX.Element;
82
+ ToggleViewMode: () => import("react/jsx-runtime").JSX.Element;
83
+ ToggleElementProperties: () => import("react/jsx-runtime").JSX.Element;
84
+ displayName: string;
85
+ };
@@ -19,19 +19,7 @@ declare const MainMenu: React.FC<{
19
19
  displayName: string;
20
20
  };
21
21
  Item: {
22
- ({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, badge, ...rest }: {
23
- icon?: React.JSX.Element;
24
- value?: string | number | undefined;
25
- order?: number;
26
- onSelect?: (event: Event) => void;
27
- children: React.ReactNode;
28
- shortcut?: string;
29
- hovered?: boolean;
30
- selected?: boolean;
31
- textStyle?: React.CSSProperties;
32
- className?: string;
33
- badge?: React.ReactNode;
34
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
22
+ ({ icon, badge, value, children, shortcut, className, selected, onSelect, ...rest }: import("../dropdownMenu/DropdownMenuItem").DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
35
23
  displayName: string;
36
24
  Badge: {
37
25
  ({ type, children, }: {
@@ -72,6 +60,28 @@ declare const MainMenu: React.FC<{
72
60
  (): import("react/jsx-runtime").JSX.Element;
73
61
  displayName: string;
74
62
  };
63
+ Sub: {
64
+ ({ children }: {
65
+ children?: React.ReactNode;
66
+ }): import("react/jsx-runtime").JSX.Element;
67
+ Trigger: {
68
+ ({ children, icon, shortcut, className, }: {
69
+ children: React.ReactNode;
70
+ icon?: React.JSX.Element;
71
+ shortcut?: string;
72
+ className?: string;
73
+ }): import("react/jsx-runtime").JSX.Element;
74
+ displayName: string;
75
+ };
76
+ Content: {
77
+ ({ children, className, }: {
78
+ children?: React.ReactNode;
79
+ className?: string;
80
+ }): import("react/jsx-runtime").JSX.Element;
81
+ displayName: string;
82
+ };
83
+ displayName: string;
84
+ };
75
85
  DefaultItems: typeof DefaultItems;
76
86
  };
77
87
  export default MainMenu;