@excalidraw/math 0.18.0-9ba0f5d → 0.18.0-a9ca16e

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 (128) hide show
  1. package/dist/dev/index.js +116 -125
  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 +1 -1
  7. package/dist/types/common/src/constants.d.ts +4 -0
  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 +2 -0
  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 +1 -1
  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/elbowArrow.d.ts +2 -0
  20. package/dist/types/element/src/index.d.ts +3 -0
  21. package/dist/types/element/src/linearElementEditor.d.ts +5 -0
  22. package/dist/types/element/src/mutateElement.d.ts +2 -0
  23. package/dist/types/element/src/selection.d.ts +5 -1
  24. package/dist/types/element/src/textElement.d.ts +1 -1
  25. package/dist/types/element/src/textWrapping.d.ts +26 -0
  26. package/dist/types/element/src/types.d.ts +5 -2
  27. package/dist/types/element/src/utils.d.ts +5 -3
  28. package/dist/types/element/src/zindex.d.ts +1 -1
  29. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
  30. package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
  31. package/dist/types/excalidraw/actions/actionCanvas.d.ts +157 -145
  32. package/dist/types/excalidraw/actions/actionClipboard.d.ts +26 -24
  33. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
  34. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +41 -36
  35. package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
  36. package/dist/types/excalidraw/actions/actionElementLock.d.ts +26 -24
  37. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
  38. package/dist/types/excalidraw/actions/actionExport.d.ts +75 -347
  39. package/dist/types/excalidraw/actions/actionFrame.d.ts +52 -48
  40. package/dist/types/excalidraw/actions/actionGroup.d.ts +27 -25
  41. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
  42. package/dist/types/excalidraw/actions/actionLink.d.ts +13 -12
  43. package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -12
  44. package/dist/types/excalidraw/actions/actionProperties.d.ts +28 -26
  45. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -12
  46. package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -11
  47. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  48. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  49. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +13 -12
  50. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  51. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -12
  52. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -12
  53. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -12
  54. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -12
  55. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -12
  56. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  57. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  58. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  59. package/dist/types/excalidraw/appState.d.ts +9 -7
  60. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  61. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  62. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  63. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  64. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  65. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  66. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  67. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  68. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  69. package/dist/types/excalidraw/components/App.d.ts +53 -13
  70. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  71. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  72. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  73. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  74. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  75. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  76. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +2 -6
  77. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +2 -1
  78. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  79. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +11 -7
  80. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  81. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  82. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  83. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  84. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  85. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +4 -0
  86. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  87. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  88. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  89. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  90. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -16
  91. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  92. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -12
  93. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  94. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
  95. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  96. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  97. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  98. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  99. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  100. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  101. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
  102. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -14
  103. package/dist/types/excalidraw/components/shapes.d.ts +74 -1
  104. package/dist/types/excalidraw/data/blob.d.ts +45 -44
  105. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  106. package/dist/types/excalidraw/data/index.d.ts +2 -3
  107. package/dist/types/excalidraw/data/json.d.ts +37 -28
  108. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  109. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  110. package/dist/types/excalidraw/types.d.ts +93 -16
  111. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  112. package/dist/types/math/src/point.d.ts +7 -2
  113. package/dist/types/math/src/types.d.ts +25 -1
  114. package/package.json +2 -2
  115. package/dist/types/excalidraw/charts.d.ts +0 -27
  116. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  117. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  118. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  119. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  120. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  121. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  122. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  123. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  124. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  125. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  126. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  127. package/dist/types/excalidraw/index.d.ts +0 -46
  128. package/dist/types/excalidraw/polyfill.d.ts +0 -2
@@ -0,0 +1,172 @@
1
+ export declare const actionToggleMidpointSnapping: {
2
+ name: "midpointSnapping";
3
+ label: string;
4
+ viewMode: false;
5
+ trackEvent: {
6
+ category: "canvas";
7
+ predicate: (appState: Readonly<import("../types").AppState>) => boolean;
8
+ };
9
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ appState: {
11
+ isMidpointSnappingEnabled: boolean;
12
+ contextMenu: {
13
+ items: import("../components/ContextMenu").ContextMenuItems;
14
+ top: number;
15
+ left: number;
16
+ } | null;
17
+ showWelcomeScreen: boolean;
18
+ isLoading: boolean;
19
+ errorMessage: React.ReactNode;
20
+ activeEmbeddable: {
21
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
22
+ state: "hover" | "active";
23
+ } | null;
24
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
25
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
26
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
27
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
28
+ isBindingEnabled: boolean;
29
+ bindingPreference: "enabled" | "disabled";
30
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
+ suggestedBinding: {
32
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
33
+ midPoint?: import("@excalidraw/math").GlobalPoint;
34
+ } | null;
35
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
+ frameRendering: {
37
+ enabled: boolean;
38
+ name: boolean;
39
+ outline: boolean;
40
+ clip: boolean;
41
+ };
42
+ editingFrame: string | null;
43
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
44
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
45
+ activeTool: {
46
+ lastActiveTool: import("../types").ActiveTool | null;
47
+ locked: boolean;
48
+ fromSelection: boolean;
49
+ } & import("../types").ActiveTool;
50
+ preferredSelectionTool: {
51
+ type: "selection" | "lasso";
52
+ initialized: boolean;
53
+ };
54
+ penMode: boolean;
55
+ penDetected: boolean;
56
+ exportBackground: boolean;
57
+ exportEmbedScene: boolean;
58
+ exportWithDarkMode: boolean;
59
+ exportScale: number;
60
+ currentItemStrokeColor: string;
61
+ currentItemBackgroundColor: string;
62
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
63
+ currentItemStrokeWidth: number;
64
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
65
+ currentItemRoughness: number;
66
+ currentItemOpacity: number;
67
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
68
+ currentItemFontSize: number;
69
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
70
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
71
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
72
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
73
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
74
+ currentItemArrowType: "sharp" | "round" | "elbow";
75
+ viewBackgroundColor: string;
76
+ scrollX: number;
77
+ scrollY: number;
78
+ cursorButton: "up" | "down";
79
+ scrolledOutside: boolean;
80
+ name: string | null;
81
+ isResizing: boolean;
82
+ isRotating: boolean;
83
+ zoom: import("../types").Zoom;
84
+ openMenu: "canvas" | null;
85
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
86
+ openSidebar: {
87
+ name: import("../types").SidebarName;
88
+ tab?: import("../types").SidebarTabName;
89
+ } | null;
90
+ openDialog: null | {
91
+ name: "imageExport" | "help" | "jsonExport";
92
+ } | {
93
+ name: "ttd";
94
+ tab: "text-to-diagram" | "mermaid";
95
+ } | {
96
+ name: "commandPalette";
97
+ } | {
98
+ name: "settings";
99
+ } | {
100
+ name: "elementLinkSelector";
101
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
102
+ } | {
103
+ name: "charts";
104
+ data: import("../charts").Spreadsheet;
105
+ rawText: string;
106
+ };
107
+ defaultSidebarDockedPreference: boolean;
108
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
109
+ selectedElementIds: Readonly<{
110
+ [id: string]: true;
111
+ }>;
112
+ hoveredElementIds: Readonly<{
113
+ [id: string]: true;
114
+ }>;
115
+ previousSelectedElementIds: {
116
+ [id: string]: true;
117
+ };
118
+ selectedElementsAreBeingDragged: boolean;
119
+ shouldCacheIgnoreZoom: boolean;
120
+ toast: {
121
+ message: React.ReactNode;
122
+ closable?: boolean;
123
+ duration?: number;
124
+ } | null;
125
+ zenModeEnabled: boolean;
126
+ theme: import("@excalidraw/element/types").Theme;
127
+ gridSize: number;
128
+ gridStep: number;
129
+ gridModeEnabled: boolean;
130
+ viewModeEnabled: boolean;
131
+ selectedGroupIds: {
132
+ [groupId: string]: boolean;
133
+ };
134
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
135
+ width: number;
136
+ height: number;
137
+ offsetTop: number;
138
+ offsetLeft: number;
139
+ fileHandle: FileSystemFileHandle | null;
140
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
141
+ stats: {
142
+ open: boolean;
143
+ panels: number;
144
+ };
145
+ showHyperlinkPopup: false | "info" | "editor";
146
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
147
+ snapLines: readonly import("../snapping").SnapLine[];
148
+ originSnapOffset: {
149
+ x: number;
150
+ y: number;
151
+ } | null;
152
+ objectsSnapModeEnabled: boolean;
153
+ userToFollow: import("../types").UserToFollow | null;
154
+ followedBy: Set<import("../types").SocketId>;
155
+ isCropping: boolean;
156
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
157
+ searchMatches: Readonly<{
158
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
159
+ matches: readonly import("../types").SearchMatch[];
160
+ }> | null;
161
+ activeLockedId: string | null;
162
+ lockedMultiSelections: {
163
+ [groupId: string]: true;
164
+ };
165
+ bindMode: import("@excalidraw/element/types").BindMode;
166
+ };
167
+ captureUpdate: "NEVER";
168
+ };
169
+ checked: (appState: Readonly<import("../types").AppState>) => boolean;
170
+ } & {
171
+ keyTest?: undefined;
172
+ };
@@ -28,8 +28,13 @@ export declare const actionToggleObjectsSnapMode: {
28
28
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
29
29
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
30
  isBindingEnabled: boolean;
31
+ bindingPreference: "enabled" | "disabled";
32
+ isMidpointSnappingEnabled: boolean;
31
33
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
+ suggestedBinding: {
35
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
36
+ midPoint?: import("@excalidraw/math").GlobalPoint;
37
+ } | null;
33
38
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
39
  frameRendering: {
35
40
  enabled: boolean;
@@ -39,7 +44,7 @@ export declare const actionToggleObjectsSnapMode: {
39
44
  };
40
45
  editingFrame: string | null;
41
46
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
42
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
47
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
43
48
  activeTool: {
44
49
  lastActiveTool: import("../types").ActiveTool | null;
45
50
  locked: boolean;
@@ -97,6 +102,10 @@ export declare const actionToggleObjectsSnapMode: {
97
102
  } | {
98
103
  name: "elementLinkSelector";
99
104
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
105
+ } | {
106
+ name: "charts";
107
+ data: import("../charts").Spreadsheet;
108
+ rawText: string;
100
109
  };
101
110
  defaultSidebarDockedPreference: boolean;
102
111
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -112,7 +121,7 @@ export declare const actionToggleObjectsSnapMode: {
112
121
  selectedElementsAreBeingDragged: boolean;
113
122
  shouldCacheIgnoreZoom: boolean;
114
123
  toast: {
115
- message: string;
124
+ message: React.ReactNode;
116
125
  closable?: boolean;
117
126
  duration?: number;
118
127
  } | null;
@@ -129,20 +138,12 @@ export declare const actionToggleObjectsSnapMode: {
129
138
  height: number;
130
139
  offsetTop: number;
131
140
  offsetLeft: number;
132
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
141
+ fileHandle: FileSystemFileHandle | null;
133
142
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
134
143
  stats: {
135
144
  open: boolean;
136
145
  panels: number;
137
146
  };
138
- currentChartType: import("@excalidraw/element/types").ChartType;
139
- pasteDialog: {
140
- shown: false;
141
- data: null;
142
- } | {
143
- shown: true;
144
- data: import("../charts").Spreadsheet;
145
- };
146
147
  showHyperlinkPopup: false | "info" | "editor";
147
148
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
148
149
  snapLines: readonly import("../snapping").SnapLine[];
@@ -34,8 +34,13 @@ export declare const actionToggleSearchMenu: {
34
34
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
35
35
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
36
36
  isBindingEnabled: boolean;
37
+ bindingPreference: "enabled" | "disabled";
38
+ isMidpointSnappingEnabled: boolean;
37
39
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
38
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
40
+ suggestedBinding: {
41
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
42
+ midPoint?: import("@excalidraw/math").GlobalPoint;
43
+ } | null;
39
44
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
40
45
  frameRendering: {
41
46
  enabled: boolean;
@@ -45,7 +50,7 @@ export declare const actionToggleSearchMenu: {
45
50
  };
46
51
  editingFrame: string | null;
47
52
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
48
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
53
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
49
54
  activeTool: {
50
55
  lastActiveTool: import("../types").ActiveTool | null;
51
56
  locked: boolean;
@@ -101,7 +106,7 @@ export declare const actionToggleSearchMenu: {
101
106
  selectedElementsAreBeingDragged: boolean;
102
107
  shouldCacheIgnoreZoom: boolean;
103
108
  toast: {
104
- message: string;
109
+ message: React.ReactNode;
105
110
  closable?: boolean;
106
111
  duration?: number;
107
112
  } | null;
@@ -119,20 +124,12 @@ export declare const actionToggleSearchMenu: {
119
124
  height: number;
120
125
  offsetTop: number;
121
126
  offsetLeft: number;
122
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
127
+ fileHandle: FileSystemFileHandle | null;
123
128
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
124
129
  stats: {
125
130
  open: boolean;
126
131
  panels: number;
127
132
  };
128
- currentChartType: import("@excalidraw/element/types").ChartType;
129
- pasteDialog: {
130
- shown: false;
131
- data: null;
132
- } | {
133
- shown: true;
134
- data: import("../charts").Spreadsheet;
135
- };
136
133
  showHyperlinkPopup: false | "info" | "editor";
137
134
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
138
135
  snapLines: readonly import("../snapping").SnapLine[];
@@ -30,8 +30,13 @@ export declare const actionToggleStats: {
30
30
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
31
31
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
32
32
  isBindingEnabled: boolean;
33
+ bindingPreference: "enabled" | "disabled";
34
+ isMidpointSnappingEnabled: boolean;
33
35
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
36
+ suggestedBinding: {
37
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
38
+ midPoint?: import("@excalidraw/math").GlobalPoint;
39
+ } | null;
35
40
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
41
  frameRendering: {
37
42
  enabled: boolean;
@@ -41,7 +46,7 @@ export declare const actionToggleStats: {
41
46
  };
42
47
  editingFrame: string | null;
43
48
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
44
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
49
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
45
50
  activeTool: {
46
51
  lastActiveTool: import("../types").ActiveTool | null;
47
52
  locked: boolean;
@@ -99,6 +104,10 @@ export declare const actionToggleStats: {
99
104
  } | {
100
105
  name: "elementLinkSelector";
101
106
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
107
+ } | {
108
+ name: "charts";
109
+ data: import("../charts").Spreadsheet;
110
+ rawText: string;
102
111
  };
103
112
  defaultSidebarDockedPreference: boolean;
104
113
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -114,7 +123,7 @@ export declare const actionToggleStats: {
114
123
  selectedElementsAreBeingDragged: boolean;
115
124
  shouldCacheIgnoreZoom: boolean;
116
125
  toast: {
117
- message: string;
126
+ message: React.ReactNode;
118
127
  closable?: boolean;
119
128
  duration?: number;
120
129
  } | null;
@@ -132,16 +141,8 @@ export declare const actionToggleStats: {
132
141
  height: number;
133
142
  offsetTop: number;
134
143
  offsetLeft: number;
135
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
144
+ fileHandle: FileSystemFileHandle | null;
136
145
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
137
- currentChartType: import("@excalidraw/element/types").ChartType;
138
- pasteDialog: {
139
- shown: false;
140
- data: null;
141
- } | {
142
- shown: true;
143
- data: import("../charts").Spreadsheet;
144
- };
145
146
  showHyperlinkPopup: false | "info" | "editor";
146
147
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
147
148
  snapLines: readonly import("../snapping").SnapLine[];
@@ -27,8 +27,13 @@ export declare const actionToggleViewMode: {
27
27
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  isBindingEnabled: boolean;
30
+ bindingPreference: "enabled" | "disabled";
31
+ isMidpointSnappingEnabled: boolean;
30
32
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
+ suggestedBinding: {
34
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
35
+ midPoint?: import("@excalidraw/math").GlobalPoint;
36
+ } | null;
32
37
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
33
38
  frameRendering: {
34
39
  enabled: boolean;
@@ -38,7 +43,7 @@ export declare const actionToggleViewMode: {
38
43
  };
39
44
  editingFrame: string | null;
40
45
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
41
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
42
47
  activeTool: {
43
48
  lastActiveTool: import("../types").ActiveTool | null;
44
49
  locked: boolean;
@@ -96,6 +101,10 @@ export declare const actionToggleViewMode: {
96
101
  } | {
97
102
  name: "elementLinkSelector";
98
103
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
104
+ } | {
105
+ name: "charts";
106
+ data: import("../charts").Spreadsheet;
107
+ rawText: string;
99
108
  };
100
109
  defaultSidebarDockedPreference: boolean;
101
110
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -111,7 +120,7 @@ export declare const actionToggleViewMode: {
111
120
  selectedElementsAreBeingDragged: boolean;
112
121
  shouldCacheIgnoreZoom: boolean;
113
122
  toast: {
114
- message: string;
123
+ message: React.ReactNode;
115
124
  closable?: boolean;
116
125
  duration?: number;
117
126
  } | null;
@@ -128,20 +137,12 @@ export declare const actionToggleViewMode: {
128
137
  height: number;
129
138
  offsetTop: number;
130
139
  offsetLeft: number;
131
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
140
+ fileHandle: FileSystemFileHandle | null;
132
141
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
133
142
  stats: {
134
143
  open: boolean;
135
144
  panels: number;
136
145
  };
137
- currentChartType: import("@excalidraw/element/types").ChartType;
138
- pasteDialog: {
139
- shown: false;
140
- data: null;
141
- } | {
142
- shown: true;
143
- data: import("../charts").Spreadsheet;
144
- };
145
146
  showHyperlinkPopup: false | "info" | "editor";
146
147
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
147
148
  snapLines: readonly import("../snapping").SnapLine[];
@@ -27,8 +27,13 @@ export declare const actionToggleZenMode: {
27
27
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  isBindingEnabled: boolean;
30
+ bindingPreference: "enabled" | "disabled";
31
+ isMidpointSnappingEnabled: boolean;
30
32
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
33
+ suggestedBinding: {
34
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
35
+ midPoint?: import("@excalidraw/math").GlobalPoint;
36
+ } | null;
32
37
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
33
38
  frameRendering: {
34
39
  enabled: boolean;
@@ -38,7 +43,7 @@ export declare const actionToggleZenMode: {
38
43
  };
39
44
  editingFrame: string | null;
40
45
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
41
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
42
47
  activeTool: {
43
48
  lastActiveTool: import("../types").ActiveTool | null;
44
49
  locked: boolean;
@@ -96,6 +101,10 @@ export declare const actionToggleZenMode: {
96
101
  } | {
97
102
  name: "elementLinkSelector";
98
103
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
104
+ } | {
105
+ name: "charts";
106
+ data: import("../charts").Spreadsheet;
107
+ rawText: string;
99
108
  };
100
109
  defaultSidebarDockedPreference: boolean;
101
110
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -111,7 +120,7 @@ export declare const actionToggleZenMode: {
111
120
  selectedElementsAreBeingDragged: boolean;
112
121
  shouldCacheIgnoreZoom: boolean;
113
122
  toast: {
114
- message: string;
123
+ message: React.ReactNode;
115
124
  closable?: boolean;
116
125
  duration?: number;
117
126
  } | null;
@@ -128,20 +137,12 @@ export declare const actionToggleZenMode: {
128
137
  height: number;
129
138
  offsetTop: number;
130
139
  offsetLeft: number;
131
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
140
+ fileHandle: FileSystemFileHandle | null;
132
141
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
133
142
  stats: {
134
143
  open: boolean;
135
144
  panels: number;
136
145
  };
137
- currentChartType: import("@excalidraw/element/types").ChartType;
138
- pasteDialog: {
139
- shown: false;
140
- data: null;
141
- } | {
142
- shown: true;
143
- data: import("../charts").Spreadsheet;
144
- };
145
146
  showHyperlinkPopup: false | "info" | "editor";
146
147
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
147
148
  snapLines: readonly import("../snapping").SnapLine[];
@@ -19,6 +19,8 @@ export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, copyText, } fr
19
19
  export { actionToggleGridMode } from "./actionToggleGridMode";
20
20
  export { actionToggleZenMode } from "./actionToggleZenMode";
21
21
  export { actionToggleObjectsSnapMode } from "./actionToggleObjectsSnapMode";
22
+ export { actionToggleArrowBinding } from "./actionToggleArrowBinding";
23
+ export { actionToggleMidpointSnapping } from "./actionToggleMidpointSnapping";
22
24
  export { actionToggleStats } from "./actionToggleStats";
23
25
  export { actionUnbindText, actionBindText } from "./actionBoundText";
24
26
  export { actionLink } from "./actionLink";
@@ -1,4 +1,4 @@
1
1
  import type { SubtypeOf } from "@excalidraw/common/utility-types";
2
2
  import type { ActionName } from "./types";
3
- export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
3
+ export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
4
4
  export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -13,21 +13,25 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
13
13
  selectedElementIds?: Readonly<{
14
14
  [id: string]: true;
15
15
  }> | undefined;
16
+ activeTool?: ({
17
+ lastActiveTool: import("./types").ActiveTool | null;
18
+ locked: boolean;
19
+ fromSelection: boolean;
20
+ } & import("./types").ActiveTool) | undefined;
16
21
  selectedGroupIds?: {
17
22
  [groupId: string]: boolean;
18
23
  } | undefined;
19
24
  selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
25
+ isBindingEnabled?: boolean | undefined;
26
+ isMidpointSnappingEnabled?: boolean | undefined;
20
27
  zenModeEnabled?: boolean | undefined;
21
28
  shouldCacheIgnoreZoom?: boolean | undefined;
22
29
  exportScale?: number | undefined;
30
+ currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
23
31
  bindMode?: import("@excalidraw/element/types").BindMode | undefined;
24
32
  gridSize?: number | undefined;
25
33
  showWelcomeScreen?: boolean | undefined;
26
- activeTool?: ({
27
- lastActiveTool: import("./types").ActiveTool | null;
28
- locked: boolean;
29
- fromSelection: boolean;
30
- } & import("./types").ActiveTool) | undefined;
34
+ bindingPreference?: "enabled" | "disabled" | undefined;
31
35
  preferredSelectionTool?: {
32
36
  type: "selection" | "lasso";
33
37
  initialized: boolean;
@@ -50,7 +54,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
50
54
  currentItemStartArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
51
55
  currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
52
56
  currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
53
- currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
54
57
  cursorButton?: "up" | "down" | undefined;
55
58
  scrolledOutside?: boolean | undefined;
56
59
  openMenu?: "canvas" | null | undefined;
@@ -69,7 +72,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
69
72
  open: boolean;
70
73
  panels: number;
71
74
  } | undefined;
72
- currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
73
75
  objectsSnapModeEnabled?: boolean | undefined;
74
76
  lockedMultiSelections?: {
75
77
  [groupId: string]: true;
@@ -0,0 +1,2 @@
1
+ import type { ChartElements, Spreadsheet } from "./charts.types";
2
+ export declare const renderBarChart: (spreadsheet: Spreadsheet, x: number, y: number, colorSeed?: number) => ChartElements;
@@ -0,0 +1,48 @@
1
+ import type { Radians } from "@excalidraw/math";
2
+ export declare const CARTESIAN_BASE_SLOT_WIDTH = 44;
3
+ export declare const CARTESIAN_BAR_SLOT_EXTRA_PER_SERIES = 22;
4
+ export declare const CARTESIAN_BAR_SLOT_EXTRA_MAX = 66;
5
+ export declare const CARTESIAN_LINE_SLOT_WIDTH = 48;
6
+ export declare const CARTESIAN_GAP = 14;
7
+ export declare const CARTESIAN_BAR_HEIGHT = 304;
8
+ export declare const CARTESIAN_LINE_HEIGHT = 320;
9
+ export declare const CARTESIAN_LABEL_ROTATION: Radians;
10
+ export declare const CARTESIAN_LABEL_MIN_WIDTH = 28;
11
+ export declare const CARTESIAN_LABEL_SLOT_PADDING = 4;
12
+ export declare const CARTESIAN_LABEL_AXIS_CLEARANCE = 2;
13
+ export declare const CARTESIAN_LABEL_MAX_WIDTH_BUFFER = 10;
14
+ export declare const CARTESIAN_LABEL_ROTATED_WIDTH_BUFFER = 10;
15
+ export declare const CARTESIAN_LABEL_OVERFLOW_PREFERENCE_BUFFER = 8;
16
+ export declare const BAR_GAP = 12;
17
+ export declare const BAR_HEIGHT = 256;
18
+ export declare const GRID_OPACITY = 10;
19
+ export declare const RADAR_GRID_LEVELS = 4;
20
+ export declare const RADAR_LABEL_OFFSET: number;
21
+ export declare const RADAR_PADDING: number;
22
+ export declare const RADAR_SINGLE_SERIES_LOG_SCALE_THRESHOLD = 100;
23
+ export declare const RADAR_AXIS_LABEL_MAX_WIDTH = 140;
24
+ export declare const RADAR_AXIS_LABEL_ALIGNMENT_THRESHOLD = 0.35;
25
+ export declare const RADAR_AXIS_LABEL_CLEARANCE: number;
26
+ export declare const RADAR_LEGEND_SWATCH_SIZE = 20;
27
+ export declare const RADAR_LEGEND_ITEM_GAP: number;
28
+ export declare const RADAR_LEGEND_TEXT_GAP = 12;
29
+ export declare const commonProps: {
30
+ readonly fillStyle: "hachure";
31
+ readonly fontFamily: number;
32
+ readonly fontSize: 20;
33
+ readonly opacity: 100;
34
+ readonly roughness: 1;
35
+ readonly strokeColor: "#1e1e1e";
36
+ readonly roundness: null;
37
+ readonly strokeStyle: "solid";
38
+ readonly strokeWidth: 1;
39
+ readonly verticalAlign: string;
40
+ readonly locked: false;
41
+ };
42
+ export type CartesianChartType = "bar" | "line";
43
+ export type CartesianChartLayout = {
44
+ slotWidth: number;
45
+ gap: number;
46
+ chartHeight: number;
47
+ xLabelMaxWidth: number;
48
+ };