@dwelle/excalidraw 0.4.0-e3bee83 → 0.4.0-e587816
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.
- package/CHANGELOG.md +525 -0
- package/README.md +18 -1820
- package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js → vendor-d415b28e9024dee4bb1b.js} +2 -2
- package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
- package/dist/excalidraw.development.js +3071 -1566
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +20 -0
- package/main.js +1 -8
- package/package.json +9 -4
- package/types/actions/actionAddToLibrary.d.ts +103 -55
- package/types/actions/actionAlign.d.ts +33 -28
- package/types/actions/actionBoundText.d.ts +175 -22
- package/types/actions/actionCanvas.d.ts +680 -170
- package/types/actions/actionClipboard.d.ts +174 -100
- package/types/actions/actionDeleteSelected.d.ts +102 -60
- package/types/actions/actionDistribute.d.ts +11 -12
- package/types/actions/actionDuplicateSelection.d.ts +3 -4
- package/types/actions/actionElementLock.d.ts +271 -0
- package/types/actions/actionExport.d.ts +363 -221
- package/types/actions/actionFinalize.d.ts +70 -42
- package/types/actions/actionFlip.d.ts +8 -11
- package/types/actions/actionFrame.d.ts +423 -0
- package/types/actions/actionGroup.d.ts +250 -13
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +37 -21
- package/types/actions/actionMenu.d.ts +108 -62
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +465 -256
- package/types/actions/actionSelectAll.d.ts +123 -4
- package/types/actions/actionStyles.d.ts +39 -24
- package/types/actions/actionToggleGridMode.d.ts +37 -22
- package/types/actions/{actionToggleLock.d.ts → actionToggleObjectsSnapMode.d.ts} +49 -32
- package/types/actions/actionToggleStats.d.ts +37 -22
- package/types/actions/actionToggleViewMode.d.ts +37 -22
- package/types/actions/actionToggleZenMode.d.ts +37 -22
- package/types/actions/actionZindex.d.ts +12 -12
- package/types/actions/index.d.ts +2 -1
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +2 -1
- package/types/actions/types.d.ts +11 -9
- package/types/appState.d.ts +18 -18
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +5 -6
- package/types/clipboard.d.ts +8 -7
- package/types/colors.d.ts +60 -5
- package/types/components/Actions.d.ts +7 -12
- package/types/components/ActiveConfirmDialog.d.ts +4 -0
- package/types/components/App.d.ts +93 -35
- package/types/components/Avatar.d.ts +1 -2
- package/types/components/BraveMeasureTextError.d.ts +2 -0
- package/types/components/Button.d.ts +3 -2
- package/types/components/ButtonIconSelect.d.ts +11 -3
- package/types/components/Card.d.ts +0 -1
- package/types/components/ColorPicker/ColorInput.d.ts +9 -0
- package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
- package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
- package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
- package/types/components/ColorPicker/Picker.d.ts +18 -0
- package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
- package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
- package/types/components/ColorPicker/ShadeList.d.ts +8 -0
- package/types/components/ColorPicker/TopPicks.d.ts +9 -0
- package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +20 -0
- package/types/components/ContextMenu.d.ts +3 -3
- package/types/components/DefaultSidebar.d.ts +29 -0
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/ErrorDialog.d.ts +3 -2
- package/types/components/ExcalidrawLogo.d.ts +15 -0
- package/types/components/EyeDropper.d.ts +28 -0
- package/types/components/FilledButton.d.ts +17 -0
- package/types/components/FixedSideContainer.d.ts +1 -1
- package/types/components/HandButton.d.ts +10 -0
- package/types/components/HelpButton.d.ts +1 -2
- package/types/components/HintViewer.d.ts +4 -5
- package/types/components/HomeButton.d.ts +1 -1
- package/types/components/ImageExportDialog.d.ts +8 -13
- package/types/components/Island.d.ts +1 -1
- package/types/components/JSONExportDialog.d.ts +5 -5
- package/types/components/LaserTool/LaserPathManager.d.ts +28 -0
- package/types/components/LaserTool/LaserPointerButton.d.ts +10 -0
- package/types/components/LaserTool/LaserTool.d.ts +7 -0
- package/types/components/LayerUI.d.ts +9 -15
- package/types/components/LibraryMenu.d.ts +13 -14
- package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
- package/types/components/LibraryMenuControlButtons.d.ts +9 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +10 -28
- package/types/components/LibraryMenuItems.d.ts +6 -7
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +6 -3
- package/types/components/LoadingMessage.d.ts +0 -1
- package/types/components/LockButton.d.ts +1 -2
- package/types/components/MobileMenu.d.ts +8 -11
- package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
- package/types/components/PasteChartDialog.d.ts +4 -5
- package/types/components/PenModeButton.d.ts +1 -1
- package/types/components/Popover.d.ts +1 -1
- package/types/components/ProjectName.d.ts +2 -1
- package/types/components/PublishLibrary.d.ts +2 -2
- package/types/components/RadioGroup.d.ts +12 -0
- package/types/components/Section.d.ts +1 -1
- package/types/components/Sidebar/Sidebar.d.ts +66 -63
- package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
- package/types/components/Sidebar/SidebarTab.d.ts +8 -0
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
- package/types/components/Sidebar/SidebarTabs.d.ts +6 -0
- package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
- package/types/components/Sidebar/common.d.ts +24 -7
- package/types/components/Spinner.d.ts +2 -1
- package/types/components/Stack.d.ts +4 -3
- package/types/components/Stats.d.ts +3 -3
- package/types/components/Switch.d.ts +9 -0
- package/types/components/ToolButton.d.ts +6 -5
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/Trans.d.ts +9 -0
- package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
- package/types/components/canvases/StaticCanvas.d.ts +18 -0
- package/types/components/canvases/index.d.ts +3 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +15 -9
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +7 -3
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +4 -4
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +4 -2
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -2
- package/types/components/dropdownMenu/common.d.ts +6 -0
- package/types/components/footer/Footer.d.ts +4 -5
- package/types/components/hoc/withInternalFallback.d.ts +4 -0
- package/types/components/icons.d.ts +16 -1
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
- package/types/components/main-menu/MainMenu.d.ts +22 -13
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.d.ts +2 -3
- package/types/constants.d.ts +94 -10
- package/types/context/tunnels.d.ts +19 -0
- package/types/context/ui-appState.d.ts +4 -0
- package/types/cursor.d.ts +5 -0
- package/types/data/blob.d.ts +5 -3
- package/types/data/encode.d.ts +1 -1
- package/types/data/filesystem.d.ts +2 -1
- package/types/data/library.d.ts +3 -45
- package/types/data/restore.d.ts +10 -4
- package/types/data/transform.d.ts +73 -0
- package/types/data/types.d.ts +3 -5
- package/types/data/url.d.ts +7 -0
- package/types/element/Hyperlink.d.ts +48 -29
- package/types/element/binding.d.ts +4 -3
- package/types/element/bounds.d.ts +40 -10
- package/types/element/collision.d.ts +7 -7
- package/types/element/dragElements.d.ts +12 -2
- package/types/element/embeddable.d.ts +153 -0
- package/types/element/image.d.ts +11 -1
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +43 -27
- package/types/element/mutateElement.d.ts +3 -2
- package/types/element/newElement.d.ts +48 -15
- package/types/element/resizeElements.d.ts +3 -2
- package/types/element/resizeTest.d.ts +2 -1
- package/types/element/showSelectedShapeActions.d.ts +2 -2
- package/types/element/sizeHelpers.d.ts +8 -1
- package/types/element/sortElements.d.ts +2 -0
- package/types/element/textElement.d.ts +43 -17
- package/types/element/textWysiwyg.d.ts +1 -1
- package/types/element/transformHandles.d.ts +16 -8
- package/types/element/typeChecks.d.ts +5 -2
- package/types/element/types.d.ts +59 -35
- package/types/emitter.d.ts +1 -2
- package/types/errors.d.ts +1 -1
- package/types/frame.d.ts +46 -0
- package/types/ga.d.ts +5 -5
- package/types/groups.d.ts +15 -11
- package/types/history.d.ts +3 -3
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +11 -0
- package/types/hooks/useOutsideClick.d.ts +19 -2
- package/types/hooks/useScrollPosition.d.ts +1 -0
- package/types/hooks/useStable.d.ts +1 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/i18n.d.ts +11 -2
- package/types/jotai.d.ts +20 -108
- package/types/keys.d.ts +5 -4
- package/types/math.d.ts +5 -0
- package/types/packages/bbox.d.ts +11 -0
- package/types/packages/excalidraw/example/App.d.ts +7 -1
- package/types/packages/excalidraw/example/initialData.d.ts +182 -64
- package/types/packages/excalidraw/index.d.ts +11 -4
- package/types/packages/excalidraw/main.d.ts +3 -1
- package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
- package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
- package/types/packages/utils.d.ts +11 -2
- package/types/packages/withinBounds.d.ts +19 -0
- package/types/renderer/renderElement.d.ts +12 -22
- package/types/renderer/renderScene.d.ts +19 -27
- package/types/renderer/renderSnaps.d.ts +2 -0
- package/types/renderer/roundRect.d.ts +1 -1
- package/types/scene/Renderer.d.ts +25 -0
- package/types/scene/Scene.d.ts +27 -5
- package/types/scene/Shape.d.ts +12 -0
- package/types/scene/ShapeCache.d.ts +20 -0
- package/types/scene/comparisons.d.ts +0 -1
- package/types/scene/export.d.ts +50 -11
- package/types/scene/index.d.ts +1 -1
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +27 -6
- package/types/scene/types.d.ts +70 -34
- package/types/snapping.d.ts +108 -0
- package/types/types.d.ts +200 -84
- package/types/utility-types.d.ts +24 -0
- package/types/utils.d.ts +73 -29
- package/types/zindex.d.ts +4 -4
- package/types/components/ColorPicker.d.ts +0 -14
- package/types/components/LibraryButton.d.ts +0 -8
- package/types/components/SingleLibraryItem.d.ts +0 -10
- package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
- /package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js.LICENSE.txt → vendor-d415b28e9024dee4bb1b.js.LICENSE.txt} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.d.ts → vendor-d415b28e9024dee4bb1b.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
|
@@ -1,10 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ExcalidrawElementSkeleton } from "../../../data/transform";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
elements: ExcalidrawElementSkeleton[];
|
|
4
|
+
appState: {
|
|
5
|
+
viewBackgroundColor: string;
|
|
6
|
+
currentItemFontFamily: number;
|
|
7
|
+
};
|
|
8
|
+
scrollToContent: boolean;
|
|
9
|
+
libraryItems: ({
|
|
10
|
+
type: string;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
strokeColor: string;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
strokeSharpness: string;
|
|
18
|
+
points: number[][];
|
|
19
|
+
}[] | ({
|
|
20
|
+
type: string;
|
|
21
|
+
fillStyle: string;
|
|
22
|
+
strokeWidth: number;
|
|
23
|
+
strokeStyle: string;
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
strokeColor: string;
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
groupIds: string[];
|
|
31
|
+
points: number[][];
|
|
32
|
+
roughness?: undefined;
|
|
33
|
+
opacity?: undefined;
|
|
34
|
+
angle?: undefined;
|
|
35
|
+
seed?: undefined;
|
|
36
|
+
strokeSharpness?: undefined;
|
|
37
|
+
boundElementIds?: undefined;
|
|
38
|
+
} | {
|
|
3
39
|
type: string;
|
|
4
|
-
version: number;
|
|
5
|
-
versionNonce: number;
|
|
6
|
-
isDeleted: boolean;
|
|
7
|
-
id: string;
|
|
8
40
|
fillStyle: string;
|
|
9
41
|
strokeWidth: number;
|
|
10
42
|
strokeStyle: string;
|
|
@@ -18,48 +50,72 @@ declare namespace _default {
|
|
|
18
50
|
width: number;
|
|
19
51
|
height: number;
|
|
20
52
|
seed: number;
|
|
21
|
-
groupIds:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
updated?: undefined;
|
|
26
|
-
link?: undefined;
|
|
27
|
-
status?: undefined;
|
|
28
|
-
scale?: undefined;
|
|
53
|
+
groupIds: string[];
|
|
54
|
+
strokeSharpness: string;
|
|
55
|
+
points: number[][];
|
|
56
|
+
boundElementIds?: undefined;
|
|
29
57
|
} | {
|
|
30
|
-
fileId: string;
|
|
31
58
|
type: string;
|
|
59
|
+
fillStyle: string;
|
|
60
|
+
strokeWidth: number;
|
|
61
|
+
strokeStyle: string;
|
|
62
|
+
roughness: number;
|
|
63
|
+
opacity: number;
|
|
64
|
+
angle: number;
|
|
32
65
|
x: number;
|
|
33
66
|
y: number;
|
|
67
|
+
strokeColor: string;
|
|
68
|
+
backgroundColor: string;
|
|
34
69
|
width: number;
|
|
35
70
|
height: number;
|
|
71
|
+
seed: number;
|
|
72
|
+
groupIds: string[];
|
|
73
|
+
strokeSharpness: string;
|
|
74
|
+
boundElementIds: string[];
|
|
75
|
+
points?: undefined;
|
|
76
|
+
} | {
|
|
77
|
+
type: string;
|
|
78
|
+
fillStyle: string;
|
|
79
|
+
strokeWidth: number;
|
|
80
|
+
strokeStyle: string;
|
|
81
|
+
roughness: number;
|
|
82
|
+
opacity: number;
|
|
36
83
|
angle: number;
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
37
86
|
strokeColor: string;
|
|
38
87
|
backgroundColor: string;
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
seed: number;
|
|
91
|
+
groupIds: string[];
|
|
92
|
+
strokeSharpness: string;
|
|
93
|
+
points?: undefined;
|
|
94
|
+
boundElementIds?: undefined;
|
|
95
|
+
})[] | ({
|
|
96
|
+
type: string;
|
|
39
97
|
fillStyle: string;
|
|
40
98
|
strokeWidth: number;
|
|
41
99
|
strokeStyle: string;
|
|
42
100
|
roughness: number;
|
|
43
101
|
opacity: number;
|
|
44
|
-
|
|
45
|
-
|
|
102
|
+
angle: number;
|
|
103
|
+
x: number;
|
|
104
|
+
y: number;
|
|
105
|
+
strokeColor: string;
|
|
106
|
+
backgroundColor: string;
|
|
107
|
+
width: number;
|
|
108
|
+
height: number;
|
|
46
109
|
seed: number;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
status: string;
|
|
54
|
-
scale: number[];
|
|
110
|
+
groupIds: string[];
|
|
111
|
+
strokeSharpness: string;
|
|
112
|
+
points: number[][];
|
|
113
|
+
version?: undefined;
|
|
114
|
+
versionNonce?: undefined;
|
|
115
|
+
isDeleted?: undefined;
|
|
55
116
|
id?: undefined;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const viewBackgroundColor: string;
|
|
59
|
-
const currentItemFontFamily: number;
|
|
60
|
-
}
|
|
61
|
-
const scrollToContent: boolean;
|
|
62
|
-
const libraryItems: (({
|
|
117
|
+
boundElementIds?: undefined;
|
|
118
|
+
} | {
|
|
63
119
|
type: string;
|
|
64
120
|
version: number;
|
|
65
121
|
versionNonce: number;
|
|
@@ -80,19 +136,10 @@ declare namespace _default {
|
|
|
80
136
|
seed: number;
|
|
81
137
|
groupIds: string[];
|
|
82
138
|
strokeSharpness: string;
|
|
83
|
-
boundElementIds: never[];
|
|
84
|
-
startBinding: null;
|
|
85
|
-
endBinding: null;
|
|
86
139
|
points: number[][];
|
|
87
|
-
|
|
88
|
-
startArrowhead: null;
|
|
89
|
-
endArrowhead: null;
|
|
140
|
+
boundElementIds?: undefined;
|
|
90
141
|
} | {
|
|
91
142
|
type: string;
|
|
92
|
-
version: number;
|
|
93
|
-
versionNonce: number;
|
|
94
|
-
isDeleted: boolean;
|
|
95
|
-
id: string;
|
|
96
143
|
fillStyle: string;
|
|
97
144
|
strokeWidth: number;
|
|
98
145
|
strokeStyle: string;
|
|
@@ -109,18 +156,13 @@ declare namespace _default {
|
|
|
109
156
|
groupIds: string[];
|
|
110
157
|
strokeSharpness: string;
|
|
111
158
|
boundElementIds: string[];
|
|
112
|
-
startBinding?: undefined;
|
|
113
|
-
endBinding?: undefined;
|
|
114
159
|
points?: undefined;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
160
|
+
version?: undefined;
|
|
161
|
+
versionNonce?: undefined;
|
|
162
|
+
isDeleted?: undefined;
|
|
163
|
+
id?: undefined;
|
|
118
164
|
})[] | ({
|
|
119
165
|
type: string;
|
|
120
|
-
version: number;
|
|
121
|
-
versionNonce: number;
|
|
122
|
-
isDeleted: boolean;
|
|
123
|
-
id: string;
|
|
124
166
|
fillStyle: string;
|
|
125
167
|
strokeWidth: number;
|
|
126
168
|
strokeStyle: string;
|
|
@@ -136,17 +178,9 @@ declare namespace _default {
|
|
|
136
178
|
seed: number;
|
|
137
179
|
groupIds: string[];
|
|
138
180
|
strokeSharpness: string;
|
|
139
|
-
boundElementIds: string[];
|
|
140
181
|
points?: undefined;
|
|
141
|
-
lastCommittedPoint?: undefined;
|
|
142
|
-
startArrowhead?: undefined;
|
|
143
|
-
endArrowhead?: undefined;
|
|
144
182
|
} | {
|
|
145
183
|
type: string;
|
|
146
|
-
version: number;
|
|
147
|
-
versionNonce: number;
|
|
148
|
-
isDeleted: boolean;
|
|
149
|
-
id: string;
|
|
150
184
|
fillStyle: string;
|
|
151
185
|
strokeWidth: number;
|
|
152
186
|
strokeStyle: string;
|
|
@@ -162,11 +196,95 @@ declare namespace _default {
|
|
|
162
196
|
seed: number;
|
|
163
197
|
groupIds: string[];
|
|
164
198
|
strokeSharpness: string;
|
|
165
|
-
boundElementIds: never[];
|
|
166
199
|
points: number[][];
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
200
|
+
} | {
|
|
201
|
+
type: string;
|
|
202
|
+
fillStyle: string;
|
|
203
|
+
strokeWidth: number;
|
|
204
|
+
strokeStyle: string;
|
|
205
|
+
x: number;
|
|
206
|
+
y: number;
|
|
207
|
+
strokeColor: string;
|
|
208
|
+
backgroundColor: string;
|
|
209
|
+
width: number;
|
|
210
|
+
height: number;
|
|
211
|
+
groupIds: string[];
|
|
212
|
+
strokeSharpness: string;
|
|
213
|
+
points: number[][];
|
|
214
|
+
roughness?: undefined;
|
|
215
|
+
opacity?: undefined;
|
|
216
|
+
angle?: undefined;
|
|
217
|
+
seed?: undefined;
|
|
218
|
+
} | {
|
|
219
|
+
type: string;
|
|
220
|
+
fillStyle: string;
|
|
221
|
+
strokeWidth: number;
|
|
222
|
+
strokeStyle: string;
|
|
223
|
+
roughness: number;
|
|
224
|
+
opacity: number;
|
|
225
|
+
angle: number;
|
|
226
|
+
x: number;
|
|
227
|
+
y: number;
|
|
228
|
+
strokeColor: string;
|
|
229
|
+
backgroundColor: string;
|
|
230
|
+
width: number;
|
|
231
|
+
height: number;
|
|
232
|
+
groupIds: string[];
|
|
233
|
+
strokeSharpness: string;
|
|
234
|
+
points: number[][];
|
|
235
|
+
seed?: undefined;
|
|
236
|
+
} | {
|
|
237
|
+
type: string;
|
|
238
|
+
fillStyle: string;
|
|
239
|
+
strokeWidth: number;
|
|
240
|
+
strokeStyle: string;
|
|
241
|
+
opacity: number;
|
|
242
|
+
x: number;
|
|
243
|
+
y: number;
|
|
244
|
+
strokeColor: string;
|
|
245
|
+
backgroundColor: string;
|
|
246
|
+
width: number;
|
|
247
|
+
height: number;
|
|
248
|
+
seed: number;
|
|
249
|
+
groupIds: string[];
|
|
250
|
+
strokeSharpness: string;
|
|
251
|
+
points: number[][];
|
|
252
|
+
roughness?: undefined;
|
|
253
|
+
angle?: undefined;
|
|
254
|
+
})[] | ({
|
|
255
|
+
type: string;
|
|
256
|
+
fillStyle: string;
|
|
257
|
+
strokeWidth: number;
|
|
258
|
+
strokeStyle: string;
|
|
259
|
+
roughness: number;
|
|
260
|
+
opacity: number;
|
|
261
|
+
angle: number;
|
|
262
|
+
x: number;
|
|
263
|
+
y: number;
|
|
264
|
+
strokeColor: string;
|
|
265
|
+
backgroundColor: string;
|
|
266
|
+
width: number;
|
|
267
|
+
height: number;
|
|
268
|
+
seed: number;
|
|
269
|
+
groupIds: string[];
|
|
270
|
+
strokeSharpness: string;
|
|
271
|
+
} | {
|
|
272
|
+
type: string;
|
|
273
|
+
fillStyle: string;
|
|
274
|
+
strokeWidth: number;
|
|
275
|
+
strokeStyle: string;
|
|
276
|
+
x: number;
|
|
277
|
+
y: number;
|
|
278
|
+
strokeColor: string;
|
|
279
|
+
backgroundColor: string;
|
|
280
|
+
width: number;
|
|
281
|
+
height: number;
|
|
282
|
+
seed: number;
|
|
283
|
+
groupIds: string[];
|
|
284
|
+
strokeSharpness: string;
|
|
285
|
+
roughness?: undefined;
|
|
286
|
+
opacity?: undefined;
|
|
287
|
+
angle?: undefined;
|
|
170
288
|
})[])[];
|
|
171
|
-
}
|
|
289
|
+
};
|
|
172
290
|
export default _default;
|
|
@@ -6,14 +6,14 @@ import Footer from "../../components/footer/FooterCenter";
|
|
|
6
6
|
import MainMenu from "../../components/main-menu/MainMenu";
|
|
7
7
|
import WelcomeScreen from "../../components/welcome-screen/WelcomeScreen";
|
|
8
8
|
import LiveCollaborationTrigger from "../../components/live-collaboration/LiveCollaborationTrigger";
|
|
9
|
-
|
|
9
|
+
type PublicExcalidrawProps = Omit<ExcalidrawProps, "forwardedRef">;
|
|
10
10
|
export declare const Excalidraw: React.MemoExoticComponent<React.ForwardRefExoticComponent<PublicExcalidrawProps & React.RefAttributes<ExcalidrawAPIRefValue>>>;
|
|
11
11
|
export { getSceneVersion, isInvisiblySmallElement, getNonDeletedElements, } from "../../element";
|
|
12
|
-
export { defaultLang, languages } from "../../i18n";
|
|
12
|
+
export { defaultLang, useI18n, languages } from "../../i18n";
|
|
13
13
|
export { restore, restoreAppState, restoreElements, restoreLibraryItems, } from "../../data/restore";
|
|
14
14
|
export { exportToBlob, exportToSvg, serializeAsJSON, serializeLibraryAsJSON, loadLibraryFromBlob, loadFromBlob, loadSceneOrLibraryFromBlob, getFreeDrawSvgPath, exportToClipboard, mergeLibraryItems, } from "../../packages/utils";
|
|
15
15
|
export { isLinearElement } from "../../element/typeChecks";
|
|
16
|
-
export { FONT_FAMILY, THEME, MIME_TYPES } from "../../constants";
|
|
16
|
+
export { FONT_FAMILY, THEME, MIME_TYPES, DEFAULT_LASER_COLOR, } from "../../constants";
|
|
17
17
|
export { mutateElement, newElementWith, bumpVersion, } from "../../element/mutateElement";
|
|
18
18
|
export { parseLibraryTokensFromUrl, useHandleLibrary, } from "../../data/library";
|
|
19
19
|
export { sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, } from "../../utils";
|
|
@@ -24,7 +24,14 @@ export { MainMenu };
|
|
|
24
24
|
export { useDevice } from "../../components/App";
|
|
25
25
|
export { WelcomeScreen };
|
|
26
26
|
export { LiveCollaborationTrigger };
|
|
27
|
+
export { DefaultSidebar } from "../../components/DefaultSidebar";
|
|
28
|
+
export { exportToCanvas } from "../../scene/export";
|
|
29
|
+
export { normalizeLink } from "../../data/url";
|
|
30
|
+
export { convertToExcalidrawElements } from "../../data/transform";
|
|
31
|
+
export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "../withinBounds";
|
|
27
32
|
export { getDefaultAppState, cleanAppStateForExport, clearAppStateForLocalStorage, } from "../../appState";
|
|
28
33
|
export { jotaiScope, jotaiStore } from "../../jotai";
|
|
29
34
|
export { libraryItemsAtom } from "../../data/library";
|
|
30
|
-
export
|
|
35
|
+
export * as icons from "../../components/icons";
|
|
36
|
+
export * as actions from "../../actions/index";
|
|
37
|
+
export { duplicateElements, duplicateElement } from "../../element/newElement";
|
|
@@ -36,13 +36,16 @@ export namespace module {
|
|
|
36
36
|
} | {
|
|
37
37
|
test: RegExp;
|
|
38
38
|
exclude: RegExp;
|
|
39
|
-
use: {
|
|
39
|
+
use: ({
|
|
40
|
+
loader: string;
|
|
41
|
+
options?: undefined;
|
|
42
|
+
} | {
|
|
40
43
|
loader: string;
|
|
41
44
|
options: {
|
|
42
45
|
transpileOnly: boolean;
|
|
43
46
|
configFile: string;
|
|
44
47
|
};
|
|
45
|
-
}[];
|
|
48
|
+
})[];
|
|
46
49
|
type?: undefined;
|
|
47
50
|
} | {
|
|
48
51
|
test: RegExp;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ExportToCanvasConfig, ExportToCanvasData } from "../scene/export";
|
|
2
2
|
import { MIME_TYPES } from "../constants";
|
|
3
3
|
export { MIME_TYPES };
|
|
4
|
-
|
|
4
|
+
type ExportToBlobConfig = ExportToCanvasConfig & {
|
|
5
5
|
mimeType?: string;
|
|
6
6
|
quality?: number;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type ExportToSvgConfig = Pick<ExportToCanvasConfig, "canvasBackgroundColor" | "padding" | "theme"> & {
|
|
9
|
+
exportPadding?: number;
|
|
10
|
+
renderEmbeddables?: boolean;
|
|
11
|
+
};
|
|
9
12
|
export declare const exportToBlob: ({ data, config, }: {
|
|
10
13
|
data: ExportToCanvasData;
|
|
11
14
|
config?: ExportToBlobConfig | undefined;
|
|
@@ -14,6 +17,10 @@ export declare const exportToSvg: ({ data, config, }: {
|
|
|
14
17
|
data: ExportToCanvasData;
|
|
15
18
|
config?: ExportToSvgConfig | undefined;
|
|
16
19
|
}) => Promise<SVGSVGElement>;
|
|
20
|
+
export declare const exportToCanvas: ({ data, config, }: {
|
|
21
|
+
data: ExportToCanvasData;
|
|
22
|
+
config?: ExportToCanvasConfig | undefined;
|
|
23
|
+
}) => Promise<HTMLCanvasElement>;
|
|
17
24
|
export declare const exportToClipboard: ({ type, data, config, }: {
|
|
18
25
|
data: ExportToCanvasData;
|
|
19
26
|
} & ({
|
|
@@ -26,6 +33,8 @@ export declare const exportToClipboard: ({ type, data, config, }: {
|
|
|
26
33
|
type: "json";
|
|
27
34
|
config?: undefined;
|
|
28
35
|
})) => Promise<void>;
|
|
36
|
+
export * from "./bbox";
|
|
37
|
+
export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "./withinBounds";
|
|
29
38
|
export { serializeAsJSON, serializeLibraryAsJSON } from "../data/json";
|
|
30
39
|
export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, } from "../data/blob";
|
|
31
40
|
export { getFreeDrawSvgPath } from "../renderer/renderElement";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
2
|
+
import { Bounds } from "../element/bounds";
|
|
3
|
+
type Element = NonDeletedExcalidrawElement;
|
|
4
|
+
type Elements = readonly NonDeletedExcalidrawElement[];
|
|
5
|
+
export declare const isElementInsideBBox: (element: Element, bbox: Bounds, eitherDirection?: boolean) => boolean;
|
|
6
|
+
export declare const elementPartiallyOverlapsWithOrContainsBBox: (element: Element, bbox: Bounds) => boolean;
|
|
7
|
+
export declare const elementsOverlappingBBox: ({ elements, bounds, type, errorMargin, }: {
|
|
8
|
+
elements: Elements;
|
|
9
|
+
bounds: Bounds;
|
|
10
|
+
/** safety offset. Defaults to 0. */
|
|
11
|
+
errorMargin?: number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* - overlap: elements overlapping or inside bounds
|
|
14
|
+
* - contain: elements inside bounds or bounds inside elements
|
|
15
|
+
* - inside: elements inside bounds
|
|
16
|
+
**/
|
|
17
|
+
type: "overlap" | "contain" | "inside";
|
|
18
|
+
}) => NonDeletedExcalidrawElement[];
|
|
19
|
+
export {};
|
|
@@ -1,36 +1,26 @@
|
|
|
1
1
|
import { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement } from "../element/types";
|
|
2
|
-
import { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { AppState, BinaryFiles, Zoom } from "../types";
|
|
2
|
+
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
|
+
import type { RoughSVG } from "roughjs/bin/svg";
|
|
4
|
+
import { StaticCanvasRenderConfig } from "../scene/types";
|
|
5
|
+
import { AppState, StaticCanvasAppState, BinaryFiles, InteractiveCanvasAppState } from "../types";
|
|
7
6
|
export interface ExcalidrawElementWithCanvas {
|
|
8
7
|
element: ExcalidrawElement | ExcalidrawTextElement;
|
|
9
8
|
canvas: HTMLCanvasElement;
|
|
10
|
-
theme:
|
|
11
|
-
|
|
9
|
+
theme: AppState["theme"];
|
|
10
|
+
scale: number;
|
|
11
|
+
zoomValue: AppState["zoom"]["value"];
|
|
12
12
|
canvasOffsetX: number;
|
|
13
13
|
canvasOffsetY: number;
|
|
14
14
|
boundTextElementVersion: number | null;
|
|
15
|
+
containingFrameOpacity: number;
|
|
15
16
|
}
|
|
16
17
|
export declare const DEFAULT_LINK_SIZE = 14;
|
|
17
|
-
declare
|
|
18
|
-
declare type ElementShapes = {
|
|
19
|
-
freedraw: Drawable | null;
|
|
20
|
-
arrow: Drawable[];
|
|
21
|
-
line: Drawable[];
|
|
22
|
-
text: null;
|
|
23
|
-
image: null;
|
|
24
|
-
};
|
|
25
|
-
export declare const getShapeForElement: <T extends ExcalidrawElement>(element: T) => T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] | undefined : Drawable | null | undefined;
|
|
26
|
-
export declare const setShapeForElement: <T extends ExcalidrawElement>(element: T, shape: T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] : Drawable) => WeakMap<ExcalidrawElement, ElementShape>;
|
|
27
|
-
export declare const invalidateShapeForElement: (element: ExcalidrawElement) => boolean;
|
|
18
|
+
export declare let elementWithCanvasCache: WeakMap<ExcalidrawElement, ExcalidrawElementWithCanvas>;
|
|
28
19
|
export declare const clearRenderCache: () => void;
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const renderElement: (element: NonDeletedExcalidrawElement, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig:
|
|
31
|
-
export declare const renderElementToSvg: (element: NonDeletedExcalidrawElement, rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, offsetX: number, offsetY: number, exportWithDarkMode?: boolean) => void;
|
|
20
|
+
export declare const renderSelectionElement: (element: NonDeletedExcalidrawElement, context: CanvasRenderingContext2D, appState: InteractiveCanvasAppState) => void;
|
|
21
|
+
export declare const renderElement: (element: NonDeletedExcalidrawElement, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig: StaticCanvasRenderConfig, appState: StaticCanvasAppState) => void;
|
|
22
|
+
export declare const renderElementToSvg: (element: NonDeletedExcalidrawElement, rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, offsetX: number, offsetY: number, exportWithDarkMode?: boolean, exportingFrameId?: string | null, renderEmbeddables?: boolean) => void;
|
|
32
23
|
export declare let pathsCache: WeakMap<ExcalidrawFreeDrawElement, Path2D>;
|
|
33
24
|
export declare function generateFreeDrawShape(element: ExcalidrawFreeDrawElement): Path2D;
|
|
34
25
|
export declare function getFreeDrawPath2D(element: ExcalidrawFreeDrawElement): Path2D | undefined;
|
|
35
26
|
export declare function getFreeDrawSvgPath(element: ExcalidrawFreeDrawElement): string;
|
|
36
|
-
export {};
|
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import { RoughCanvas } from "roughjs/bin/canvas";
|
|
2
1
|
import { RoughSVG } from "roughjs/bin/svg";
|
|
3
|
-
import {
|
|
2
|
+
import { BinaryFiles } from "../types";
|
|
4
3
|
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
5
|
-
import {
|
|
4
|
+
import { InteractiveSceneRenderConfig, StaticSceneRenderConfig } from "../scene/types";
|
|
5
|
+
import "canvas-roundrect-polyfill";
|
|
6
6
|
export declare const DEFAULT_SPACING = 2;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
renderConfig: RenderConfig;
|
|
13
|
-
}) => {
|
|
7
|
+
/**
|
|
8
|
+
* Interactive scene is the ui-canvas where we render boundinb boxes, selections
|
|
9
|
+
* and other ui stuff.
|
|
10
|
+
*/
|
|
11
|
+
export declare const renderInteractiveScene: <U extends ({ canvas, elements, visibleElements, selectedElements, scale, appState, renderConfig, }: InteractiveSceneRenderConfig) => {
|
|
14
12
|
atLeastOneVisibleElement: boolean;
|
|
15
|
-
scrollBars?: undefined;
|
|
16
|
-
} | {
|
|
17
|
-
atLeastOneVisibleElement: boolean;
|
|
18
|
-
scrollBars: import("../scene/types").ScrollBars | undefined;
|
|
19
|
-
};
|
|
20
|
-
/** renderScene throttled to animation framerate */
|
|
21
|
-
export declare const renderScene: <T extends boolean = false>(config: {
|
|
22
13
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
23
|
-
appState: AppState;
|
|
24
|
-
rc: RoughCanvas;
|
|
25
|
-
canvas: HTMLCanvasElement;
|
|
26
|
-
renderConfig: RenderConfig;
|
|
27
|
-
callback?: ((data: ReturnType<typeof _renderScene>) => void) | undefined;
|
|
28
|
-
}, throttle?: T | undefined) => T extends true ? void : {
|
|
29
|
-
atLeastOneVisibleElement: boolean;
|
|
30
14
|
scrollBars?: undefined;
|
|
31
15
|
} | {
|
|
32
|
-
atLeastOneVisibleElement: boolean;
|
|
33
16
|
scrollBars: import("../scene/types").ScrollBars | undefined;
|
|
34
|
-
|
|
35
|
-
|
|
17
|
+
atLeastOneVisibleElement: boolean;
|
|
18
|
+
elements: readonly NonDeletedExcalidrawElement[];
|
|
19
|
+
}, T extends boolean = false>(renderConfig: InteractiveSceneRenderConfig, throttle?: T | undefined) => T extends true ? void : ReturnType<U>;
|
|
20
|
+
/**
|
|
21
|
+
* Static scene is the non-ui canvas where we render elements.
|
|
22
|
+
*/
|
|
23
|
+
export declare const renderStaticScene: (renderConfig: StaticSceneRenderConfig, throttle?: boolean) => void;
|
|
24
|
+
export declare const cancelRender: () => void;
|
|
25
|
+
export declare const renderSceneToSvg: (elements: readonly NonDeletedExcalidrawElement[], rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, { offsetX, offsetY, exportWithDarkMode, exportingFrameId, renderEmbeddables, }?: {
|
|
36
26
|
offsetX?: number | undefined;
|
|
37
27
|
offsetY?: number | undefined;
|
|
38
28
|
exportWithDarkMode?: boolean | undefined;
|
|
29
|
+
exportingFrameId?: string | null | undefined;
|
|
30
|
+
renderEmbeddables?: boolean | undefined;
|
|
39
31
|
}) => void;
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* @param {Number} height The height of the rectangle
|
|
9
9
|
* @param {Number} radius The corner radius
|
|
10
10
|
*/
|
|
11
|
-
export declare const roundRect: (context: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number) => void;
|
|
11
|
+
export declare const roundRect: (context: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number, strokeColor?: string) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
2
|
+
import { AppState } from "../types";
|
|
3
|
+
import Scene from "./Scene";
|
|
4
|
+
export declare class Renderer {
|
|
5
|
+
private scene;
|
|
6
|
+
constructor(scene: Scene);
|
|
7
|
+
getRenderableElements: ((opts: {
|
|
8
|
+
zoom: AppState["zoom"];
|
|
9
|
+
offsetLeft: AppState["offsetLeft"];
|
|
10
|
+
offsetTop: AppState["offsetTop"];
|
|
11
|
+
scrollX: AppState["scrollX"];
|
|
12
|
+
scrollY: AppState["scrollY"];
|
|
13
|
+
height: AppState["height"];
|
|
14
|
+
width: AppState["width"];
|
|
15
|
+
editingElement: AppState["editingElement"];
|
|
16
|
+
pendingImageElementId: AppState["pendingImageElementId"];
|
|
17
|
+
versionNonce: ReturnType<InstanceType<typeof Scene>["getVersionNonce"]>;
|
|
18
|
+
}) => {
|
|
19
|
+
canvasElements: NonDeletedExcalidrawElement[];
|
|
20
|
+
visibleElements: readonly NonDeletedExcalidrawElement[];
|
|
21
|
+
}) & {
|
|
22
|
+
clear: () => void;
|
|
23
|
+
};
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
package/types/scene/Scene.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted } from "../element/types";
|
|
1
|
+
import { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ExcalidrawFrameElement } from "../element/types";
|
|
2
2
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { AppState } from "../types";
|
|
4
|
+
type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
|
|
5
|
+
type ElementKey = ExcalidrawElement | ElementIdKey;
|
|
6
|
+
type SceneStateCallback = () => void;
|
|
7
|
+
type SceneStateCallbackRemover = () => void;
|
|
8
|
+
export type ExcalidrawElementsIncludingDeleted = readonly ExcalidrawElement[];
|
|
7
9
|
declare class Scene {
|
|
8
10
|
private static sceneMapByElement;
|
|
9
11
|
private static sceneMapById;
|
|
@@ -12,10 +14,28 @@ declare class Scene {
|
|
|
12
14
|
private callbacks;
|
|
13
15
|
private nonDeletedElements;
|
|
14
16
|
private elements;
|
|
17
|
+
private nonDeletedFrames;
|
|
18
|
+
private frames;
|
|
15
19
|
private elementsMap;
|
|
20
|
+
private selectedElementsCache;
|
|
21
|
+
private versionNonce;
|
|
16
22
|
getElementsIncludingDeleted(): readonly ExcalidrawElement[];
|
|
17
23
|
getNonDeletedElements(): readonly NonDeletedExcalidrawElement[];
|
|
24
|
+
getFramesIncludingDeleted(): readonly ExcalidrawFrameElement[];
|
|
25
|
+
getSelectedElements(opts: {
|
|
26
|
+
selectedElementIds: AppState["selectedElementIds"];
|
|
27
|
+
/**
|
|
28
|
+
* for specific cases where you need to use elements not from current
|
|
29
|
+
* scene state. This in effect will likely result in cache-miss, and
|
|
30
|
+
* the cache won't be updated in this case.
|
|
31
|
+
*/
|
|
32
|
+
elements?: readonly ExcalidrawElement[];
|
|
33
|
+
includeBoundTextElement?: boolean;
|
|
34
|
+
includeElementsInFrames?: boolean;
|
|
35
|
+
}): NonDeleted<ExcalidrawElement>[];
|
|
36
|
+
getNonDeletedFrames(): readonly NonDeleted<ExcalidrawFrameElement>[];
|
|
18
37
|
getElement<T extends ExcalidrawElement>(id: T["id"]): T | null;
|
|
38
|
+
getVersionNonce(): number | undefined;
|
|
19
39
|
getNonDeletedElement(id: ExcalidrawElement["id"]): NonDeleted<ExcalidrawElement> | null;
|
|
20
40
|
/**
|
|
21
41
|
* A utility method to help with updating all scene elements, with the added
|
|
@@ -35,6 +55,8 @@ declare class Scene {
|
|
|
35
55
|
addCallback(cb: SceneStateCallback): SceneStateCallbackRemover;
|
|
36
56
|
destroy(): void;
|
|
37
57
|
insertElementAtIndex(element: ExcalidrawElement, index: number): void;
|
|
58
|
+
insertElementsAtIndex(elements: ExcalidrawElement[], index: number): void;
|
|
59
|
+
addNewElement: (element: ExcalidrawElement) => void;
|
|
38
60
|
getElementIndex(elementId: string): number;
|
|
39
61
|
}
|
|
40
62
|
export default Scene;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Drawable, Options } from "roughjs/bin/core";
|
|
2
|
+
import type { RoughGenerator } from "roughjs/bin/generator";
|
|
3
|
+
import type { ExcalidrawElement, NonDeletedExcalidrawElement, ExcalidrawSelectionElement } from "../element/types";
|
|
4
|
+
export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean) => Options;
|
|
5
|
+
/**
|
|
6
|
+
* Generates the roughjs shape for given element.
|
|
7
|
+
*
|
|
8
|
+
* Low-level. Use `ShapeCache.generateElementShape` instead.
|
|
9
|
+
*
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
export declare const _generateElementShape: (element: Exclude<NonDeletedExcalidrawElement, ExcalidrawSelectionElement>, generator: RoughGenerator, isExporting?: boolean) => Drawable | Drawable[] | null;
|