@excalidraw/excalidraw 0.18.0-195a743 → 0.18.0-200a6bd94
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/dist/dev/chunk-CP5DND7P.js +7 -0
- package/dist/dev/chunk-CP5DND7P.js.map +7 -0
- package/dist/dev/{chunk-T3M44BFV.js → chunk-QF5FRM6O.js} +12 -4
- package/dist/dev/chunk-QF5FRM6O.js.map +7 -0
- package/dist/dev/chunk-VISTIWDQ.js +5668 -0
- package/dist/dev/chunk-VISTIWDQ.js.map +7 -0
- package/dist/dev/data/{image-TTQKTTOH.js → image-XM2PNARE.js} +3 -3
- package/dist/dev/index.css +89 -22
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +7634 -9487
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-I23TB6DJ.js → en-SMAPCEOQ.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-A66AFZZU.js +7 -0
- package/dist/prod/chunk-I4UNSFV6.js +12 -0
- package/dist/prod/chunk-YZO7PSYQ.js +4 -0
- package/dist/prod/data/image-53OPA26C.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +26 -19
- package/dist/prod/locales/{en-TC3OFDA6.js → en-TYY6KWIJ.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/constants.d.ts +20 -3
- package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
- package/dist/types/common/src/font-metadata.d.ts +4 -2
- package/dist/types/common/src/index.d.ts +1 -0
- package/dist/types/common/src/utility-types.d.ts +5 -0
- package/dist/types/common/src/utils.d.ts +15 -5
- package/dist/types/element/src/Scene.d.ts +4 -4
- package/dist/types/element/src/align.d.ts +3 -2
- package/dist/types/element/src/binding.d.ts +11 -8
- package/dist/types/element/src/bounds.d.ts +12 -4
- package/dist/types/element/src/collision.d.ts +18 -12
- package/dist/types/element/src/cropElement.d.ts +1 -1
- package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +73 -38
- package/dist/types/element/src/distance.d.ts +2 -2
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/dragElements.d.ts +1 -1
- package/dist/types/element/src/flowchart.d.ts +1 -1
- package/dist/types/element/src/fractionalIndex.d.ts +8 -2
- package/dist/types/element/src/frame.d.ts +3 -2
- package/dist/types/element/src/groups.d.ts +1 -0
- package/dist/types/element/src/index.d.ts +43 -2
- package/dist/types/element/src/linearElementEditor.d.ts +17 -30
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +3 -2
- package/dist/types/element/src/resizeElements.d.ts +2 -1
- package/dist/types/element/src/selection.d.ts +0 -5
- package/dist/types/element/src/shape.d.ts +42 -0
- package/dist/types/element/src/sizeHelpers.d.ts +2 -1
- package/dist/types/element/src/store.d.ts +232 -0
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/typeChecks.d.ts +16 -1
- package/dist/types/element/src/types.d.ts +13 -3
- package/dist/types/element/src/utils.d.ts +16 -6
- package/dist/types/element/src/zindex.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +36 -48
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +24 -32
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +160 -212
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +72 -94
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +36 -47
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +11 -15
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +39 -48
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionExport.d.ts +118 -154
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +71 -38
- package/dist/types/excalidraw/actions/actionFrame.d.ts +95 -111
- package/dist/types/excalidraw/actions/actionGroup.d.ts +24 -32
- package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +537 -17
- package/dist/types/excalidraw/actions/actionLink.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionMenu.d.ts +35 -47
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +24 -32
- package/dist/types/excalidraw/actions/actionProperties.d.ts +186 -238
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +11 -188
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -16
- package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/types.d.ts +3 -2
- package/dist/types/excalidraw/appState.d.ts +16 -7
- package/dist/types/excalidraw/components/Actions.d.ts +0 -4
- package/dist/types/excalidraw/components/App.d.ts +18 -20
- package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -28
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
- package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
- package/dist/types/excalidraw/components/Range.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +12 -2
- package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/utils.d.ts +2 -1
- package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +3 -0
- package/dist/types/excalidraw/components/shapes.d.ts +1 -1
- package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
- package/dist/types/excalidraw/data/transform.d.ts +1 -1
- package/dist/types/excalidraw/eraser/index.d.ts +0 -2
- package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
- package/dist/types/excalidraw/history.d.ts +30 -22
- package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +10 -9
- package/dist/types/excalidraw/lasso/index.d.ts +1 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
- package/dist/types/excalidraw/renderer/helpers.d.ts +7 -2
- package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -2
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/snapping.d.ts +2 -2
- package/dist/types/excalidraw/types.d.ts +27 -14
- package/dist/types/math/src/angle.d.ts +2 -0
- package/dist/types/math/src/constants.d.ts +3 -0
- package/dist/types/math/src/curve.d.ts +34 -0
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/point.d.ts +1 -1
- package/dist/types/math/src/rectangle.d.ts +2 -0
- package/dist/types/math/src/vector.d.ts +8 -2
- package/dist/types/utils/src/bbox.d.ts +1 -1
- package/dist/types/utils/src/index.d.ts +1 -1
- package/dist/types/utils/src/withinBounds.d.ts +1 -1
- package/history.ts +147 -110
- package/package.json +12 -9
- package/dist/dev/chunk-H3EW23X2.js +0 -18294
- package/dist/dev/chunk-H3EW23X2.js.map +0 -7
- package/dist/dev/chunk-T3M44BFV.js.map +0 -7
- package/dist/dev/chunk-WMGEUIQQ.js +0 -7
- package/dist/dev/chunk-WMGEUIQQ.js.map +0 -7
- package/dist/prod/chunk-2Z7RPVPO.js +0 -12
- package/dist/prod/chunk-7M43VNIB.js +0 -33
- package/dist/prod/chunk-GK4XUKZB.js +0 -7
- package/dist/prod/data/image-7YYIWLVQ.js +0 -1
- package/dist/types/element/src/Shape.d.ts +0 -17
- package/dist/types/element/src/ShapeCache.d.ts +0 -25
- package/dist/types/element/src/shapes.d.ts +0 -23
- package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/dist/types/excalidraw/store.d.ts +0 -129
- package/dist/types/excalidraw/visualdebug.d.ts +0 -41
- package/dist/types/utils/src/collision.d.ts +0 -8
- /package/dist/dev/data/{image-TTQKTTOH.js.map → image-XM2PNARE.js.map} +0 -0
- /package/dist/dev/locales/{en-I23TB6DJ.js.map → en-SMAPCEOQ.js.map} +0 -0
|
@@ -21,7 +21,7 @@ export declare const actionToggleViewMode: {
|
|
|
21
21
|
errorMessage: import("react").ReactNode;
|
|
22
22
|
activeEmbeddable: {
|
|
23
23
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
24
|
-
state: "
|
|
24
|
+
state: "active" | "hover";
|
|
25
25
|
} | null;
|
|
26
26
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
27
27
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -29,7 +29,7 @@ export declare const actionToggleViewMode: {
|
|
|
29
29
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
30
30
|
isBindingEnabled: boolean;
|
|
31
31
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
|
-
suggestedBindings: import("@excalidraw/element
|
|
32
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
33
33
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
34
34
|
frameRendering: {
|
|
35
35
|
enabled: boolean;
|
|
@@ -40,7 +40,6 @@ export declare const actionToggleViewMode: {
|
|
|
40
40
|
editingFrame: string | null;
|
|
41
41
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
42
42
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
43
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
44
43
|
activeTool: {
|
|
45
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
45
|
locked: boolean;
|
|
@@ -88,7 +87,7 @@ export declare const actionToggleViewMode: {
|
|
|
88
87
|
name: "imageExport" | "help" | "jsonExport";
|
|
89
88
|
} | {
|
|
90
89
|
name: "ttd";
|
|
91
|
-
tab: "text-to-diagram"
|
|
90
|
+
tab: "mermaid" | "text-to-diagram";
|
|
92
91
|
} | {
|
|
93
92
|
name: "commandPalette";
|
|
94
93
|
} | {
|
|
@@ -159,9 +158,8 @@ export declare const actionToggleViewMode: {
|
|
|
159
158
|
shown: true;
|
|
160
159
|
data: import("../charts").Spreadsheet;
|
|
161
160
|
};
|
|
162
|
-
pendingImageElementId: string | null;
|
|
163
161
|
showHyperlinkPopup: false | "editor" | "info";
|
|
164
|
-
selectedLinearElement: import("@excalidraw/element
|
|
162
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
163
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
164
|
originSnapOffset: {
|
|
167
165
|
x: number;
|
|
@@ -172,16 +170,14 @@ export declare const actionToggleViewMode: {
|
|
|
172
170
|
followedBy: Set<import("../types").SocketId>;
|
|
173
171
|
isCropping: boolean;
|
|
174
172
|
croppingElementId: string | null;
|
|
175
|
-
searchMatches:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}[];
|
|
184
|
-
}[];
|
|
173
|
+
searchMatches: Readonly<{
|
|
174
|
+
focusedId: string | null;
|
|
175
|
+
matches: readonly import("../types").SearchMatch[];
|
|
176
|
+
}> | null;
|
|
177
|
+
activeLockedId: string | null;
|
|
178
|
+
lockedMultiSelections: {
|
|
179
|
+
[groupId: string]: true;
|
|
180
|
+
};
|
|
185
181
|
};
|
|
186
182
|
captureUpdate: "EVENTUALLY";
|
|
187
183
|
};
|
|
@@ -21,7 +21,7 @@ export declare const actionToggleZenMode: {
|
|
|
21
21
|
errorMessage: import("react").ReactNode;
|
|
22
22
|
activeEmbeddable: {
|
|
23
23
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
24
|
-
state: "
|
|
24
|
+
state: "active" | "hover";
|
|
25
25
|
} | null;
|
|
26
26
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
27
27
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -29,7 +29,7 @@ export declare const actionToggleZenMode: {
|
|
|
29
29
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
30
30
|
isBindingEnabled: boolean;
|
|
31
31
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
|
-
suggestedBindings: import("@excalidraw/element
|
|
32
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
33
33
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
34
34
|
frameRendering: {
|
|
35
35
|
enabled: boolean;
|
|
@@ -40,7 +40,6 @@ export declare const actionToggleZenMode: {
|
|
|
40
40
|
editingFrame: string | null;
|
|
41
41
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
42
42
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
43
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
44
43
|
activeTool: {
|
|
45
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
45
|
locked: boolean;
|
|
@@ -88,7 +87,7 @@ export declare const actionToggleZenMode: {
|
|
|
88
87
|
name: "imageExport" | "help" | "jsonExport";
|
|
89
88
|
} | {
|
|
90
89
|
name: "ttd";
|
|
91
|
-
tab: "text-to-diagram"
|
|
90
|
+
tab: "mermaid" | "text-to-diagram";
|
|
92
91
|
} | {
|
|
93
92
|
name: "commandPalette";
|
|
94
93
|
} | {
|
|
@@ -159,9 +158,8 @@ export declare const actionToggleZenMode: {
|
|
|
159
158
|
shown: true;
|
|
160
159
|
data: import("../charts").Spreadsheet;
|
|
161
160
|
};
|
|
162
|
-
pendingImageElementId: string | null;
|
|
163
161
|
showHyperlinkPopup: false | "editor" | "info";
|
|
164
|
-
selectedLinearElement: import("@excalidraw/element
|
|
162
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
163
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
164
|
originSnapOffset: {
|
|
167
165
|
x: number;
|
|
@@ -172,16 +170,14 @@ export declare const actionToggleZenMode: {
|
|
|
172
170
|
followedBy: Set<import("../types").SocketId>;
|
|
173
171
|
isCropping: boolean;
|
|
174
172
|
croppingElementId: string | null;
|
|
175
|
-
searchMatches:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}[];
|
|
184
|
-
}[];
|
|
173
|
+
searchMatches: Readonly<{
|
|
174
|
+
focusedId: string | null;
|
|
175
|
+
matches: readonly import("../types").SearchMatch[];
|
|
176
|
+
}> | null;
|
|
177
|
+
activeLockedId: string | null;
|
|
178
|
+
lockedMultiSelections: {
|
|
179
|
+
[groupId: string]: true;
|
|
180
|
+
};
|
|
185
181
|
};
|
|
186
182
|
captureUpdate: "EVENTUALLY";
|
|
187
183
|
};
|
|
@@ -46,7 +46,7 @@ export declare const actionSendToBack: {
|
|
|
46
46
|
category: "element";
|
|
47
47
|
};
|
|
48
48
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
49
|
-
elements: import("@excalidraw/element/types").ExcalidrawElement[] |
|
|
49
|
+
elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
|
|
50
50
|
appState: Readonly<import("../types").AppState>;
|
|
51
51
|
captureUpdate: "IMMEDIATELY";
|
|
52
52
|
};
|
|
@@ -64,7 +64,7 @@ export declare const actionBringToFront: {
|
|
|
64
64
|
category: "element";
|
|
65
65
|
};
|
|
66
66
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
67
|
-
elements: import("@excalidraw/element/types").ExcalidrawElement[] |
|
|
67
|
+
elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
|
|
68
68
|
appState: Readonly<import("../types").AppState>;
|
|
69
69
|
captureUpdate: "IMMEDIATELY";
|
|
70
70
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type { CaptureUpdateActionType } from "
|
|
2
|
+
import type { CaptureUpdateActionType } from "@excalidraw/element";
|
|
3
3
|
import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
4
|
import type React from "react";
|
|
5
5
|
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, 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" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "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";
|
|
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" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "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;
|
|
@@ -22,6 +22,7 @@ export type PanelComponentProps = {
|
|
|
22
22
|
appProps: ExcalidrawProps;
|
|
23
23
|
data?: Record<string, any>;
|
|
24
24
|
app: AppClassProperties;
|
|
25
|
+
renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => React.JSX.Element | null;
|
|
25
26
|
};
|
|
26
27
|
export interface Action {
|
|
27
28
|
name: ActionName;
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import type { AppState, NormalizedZoomValue } from "./types";
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
|
+
viewBackgroundColor?: string | undefined;
|
|
4
5
|
name?: string | null | undefined;
|
|
5
|
-
activeTool?: ({
|
|
6
|
-
lastActiveTool: import("./types").ActiveTool | null;
|
|
7
|
-
locked: boolean;
|
|
8
|
-
fromSelection: boolean;
|
|
9
|
-
} & import("./types").ActiveTool) | undefined;
|
|
10
6
|
zoom?: Readonly<{
|
|
11
7
|
value: NormalizedZoomValue;
|
|
12
8
|
}> | undefined;
|
|
13
9
|
scrollX?: number | undefined;
|
|
14
10
|
scrollY?: number | undefined;
|
|
15
|
-
viewBackgroundColor?: string | undefined;
|
|
16
11
|
editingGroupId?: string | null | undefined;
|
|
17
12
|
selectedElementIds?: Readonly<{
|
|
18
13
|
[id: string]: true;
|
|
@@ -21,9 +16,14 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
21
16
|
selectedGroupIds?: {
|
|
22
17
|
[groupId: string]: boolean;
|
|
23
18
|
} | undefined;
|
|
24
|
-
selectedLinearElement?: import("@excalidraw/element
|
|
19
|
+
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
25
20
|
zenModeEnabled?: boolean | undefined;
|
|
26
21
|
showWelcomeScreen?: boolean | undefined;
|
|
22
|
+
activeTool?: ({
|
|
23
|
+
lastActiveTool: import("./types").ActiveTool | null;
|
|
24
|
+
locked: boolean;
|
|
25
|
+
fromSelection: boolean;
|
|
26
|
+
} & import("./types").ActiveTool) | undefined;
|
|
27
27
|
penMode?: boolean | undefined;
|
|
28
28
|
penDetected?: boolean | undefined;
|
|
29
29
|
exportBackground?: boolean | undefined;
|
|
@@ -66,18 +66,27 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
66
66
|
} | undefined;
|
|
67
67
|
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
68
68
|
objectsSnapModeEnabled?: boolean | undefined;
|
|
69
|
+
lockedMultiSelections?: {
|
|
70
|
+
[groupId: string]: true;
|
|
71
|
+
} | undefined;
|
|
69
72
|
};
|
|
70
73
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
71
74
|
viewBackgroundColor?: string | undefined;
|
|
72
75
|
gridSize?: number | undefined;
|
|
73
76
|
gridStep?: number | undefined;
|
|
74
77
|
gridModeEnabled?: boolean | undefined;
|
|
78
|
+
lockedMultiSelections?: {
|
|
79
|
+
[groupId: string]: true;
|
|
80
|
+
} | undefined;
|
|
75
81
|
};
|
|
76
82
|
export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
|
|
77
83
|
viewBackgroundColor?: string | undefined;
|
|
78
84
|
gridSize?: number | undefined;
|
|
79
85
|
gridStep?: number | undefined;
|
|
80
86
|
gridModeEnabled?: boolean | undefined;
|
|
87
|
+
lockedMultiSelections?: {
|
|
88
|
+
[groupId: string]: true;
|
|
89
|
+
} | undefined;
|
|
81
90
|
};
|
|
82
91
|
export declare const isEraserActive: ({ activeTool, }: {
|
|
83
92
|
activeTool: AppState["activeTool"];
|
|
@@ -28,7 +28,3 @@ export declare const ExitZenModeAction: ({ actionManager, showExitZenModeBtn, }:
|
|
|
28
28
|
actionManager: ActionManager;
|
|
29
29
|
showExitZenModeBtn: boolean;
|
|
30
30
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export declare const FinalizeAction: ({ renderAction, className, }: {
|
|
32
|
-
renderAction: ActionManager["renderAction"];
|
|
33
|
-
className?: string | undefined;
|
|
34
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type EXPORT_IMAGE_TYPES } from "@excalidraw/common";
|
|
3
|
-
import { LinearElementEditor } from "@excalidraw/element
|
|
4
|
-
import {
|
|
5
|
-
import Scene from "@excalidraw/element/Scene";
|
|
6
|
-
import type { ElementUpdate } from "@excalidraw/element/mutateElement";
|
|
7
|
-
import type { ExcalidrawElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
|
|
2
|
+
import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
|
|
3
|
+
import { LinearElementEditor, FlowChartCreator, Scene, Store, type ElementUpdate } from "@excalidraw/element";
|
|
4
|
+
import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
|
|
8
5
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
9
6
|
import { ActionManager } from "../actions/manager";
|
|
10
7
|
import { AnimationFrameHandler } from "../animation-frame-handler";
|
|
@@ -12,8 +9,6 @@ import { History } from "../history";
|
|
|
12
9
|
import { Fonts } from "../fonts";
|
|
13
10
|
import { type WritableAtom } from "../editor-jotai";
|
|
14
11
|
import { Renderer } from "../scene/Renderer";
|
|
15
|
-
import { Emitter } from "../emitter";
|
|
16
|
-
import { Store } from "../store";
|
|
17
12
|
import { LaserTrails } from "../laser-trails";
|
|
18
13
|
import { LassoTrail } from "../lasso";
|
|
19
14
|
import { EraserTrail } from "../eraser";
|
|
@@ -83,6 +78,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
83
78
|
/** embeds that have been inserted to DOM (as a perf optim, we don't want to
|
|
84
79
|
* insert to DOM before user initially scrolls to them) */
|
|
85
80
|
private initializedEmbeds;
|
|
81
|
+
private handleToastClose;
|
|
86
82
|
private elementsPendingErasure;
|
|
87
83
|
flowChartCreator: FlowChartCreator;
|
|
88
84
|
private flowChartNavigator;
|
|
@@ -127,7 +123,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
127
123
|
};
|
|
128
124
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
129
125
|
resize: {
|
|
130
|
-
handleType: import("@excalidraw/element
|
|
126
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
131
127
|
isResizing: boolean;
|
|
132
128
|
offset: {
|
|
133
129
|
x: number;
|
|
@@ -196,7 +192,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
196
192
|
};
|
|
197
193
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
198
194
|
resize: {
|
|
199
|
-
handleType: import("@excalidraw/element
|
|
195
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
200
196
|
isResizing: boolean;
|
|
201
197
|
offset: {
|
|
202
198
|
x: number;
|
|
@@ -270,6 +266,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
270
266
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
271
267
|
focusContainer: AppClassProperties["focusContainer"];
|
|
272
268
|
getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
269
|
+
getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
|
|
273
270
|
getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
|
|
274
271
|
onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
|
|
275
272
|
onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
|
|
@@ -415,12 +412,9 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
415
412
|
private onKeyDown;
|
|
416
413
|
private onKeyUp;
|
|
417
414
|
private isToolSupported;
|
|
418
|
-
setActiveTool: (tool: (
|
|
419
|
-
type:
|
|
415
|
+
setActiveTool: (tool: ({
|
|
416
|
+
type: ToolType;
|
|
420
417
|
} | {
|
|
421
|
-
type: Extract<ToolType, "image">;
|
|
422
|
-
insertOnCanvasDirectly?: boolean;
|
|
423
|
-
}) | {
|
|
424
418
|
type: "custom";
|
|
425
419
|
customType: string;
|
|
426
420
|
}) & {
|
|
@@ -446,7 +440,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
446
440
|
private getTextElementAtPosition;
|
|
447
441
|
private getElementAtPosition;
|
|
448
442
|
private getElementsAtPosition;
|
|
449
|
-
getElementHitThreshold(): number;
|
|
443
|
+
getElementHitThreshold(element: ExcalidrawElement): number;
|
|
450
444
|
private hitElement;
|
|
451
445
|
private getTextBindableContainerAtPosition;
|
|
452
446
|
private startTextEditing;
|
|
@@ -509,13 +503,18 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
509
503
|
private restoreReadyToEraseElements;
|
|
510
504
|
private eraseElements;
|
|
511
505
|
private initializeImage;
|
|
506
|
+
/**
|
|
507
|
+
* use during async image initialization,
|
|
508
|
+
* when the placeholder image could have been modified in the meantime,
|
|
509
|
+
* and when you don't want to loose those modifications
|
|
510
|
+
*/
|
|
511
|
+
private getLatestInitializedImageElement;
|
|
512
512
|
/**
|
|
513
513
|
* inserts image into elements array and rerenders
|
|
514
514
|
*/
|
|
515
|
-
insertImageElement
|
|
516
|
-
private setImagePreviewCursor;
|
|
515
|
+
private insertImageElement;
|
|
517
516
|
private onImageAction;
|
|
518
|
-
|
|
517
|
+
private getImageNaturalDimensions;
|
|
519
518
|
/** updates image cache, refreshing updated elements and/or setting status
|
|
520
519
|
to error for images that fail during <img> element creation */
|
|
521
520
|
private updateImageCache;
|
|
@@ -526,7 +525,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
526
525
|
private scheduleImageRefresh;
|
|
527
526
|
private updateBindingEnabledOnPointerMove;
|
|
528
527
|
private maybeSuggestBindingAtCursor;
|
|
529
|
-
private maybeSuggestBindingsForLinearElementAtCoords;
|
|
530
528
|
private clearSelection;
|
|
531
529
|
private handleInteractiveCanvasRef;
|
|
532
530
|
private handleAppOnDrop;
|
|
@@ -10,6 +10,7 @@ interface ButtonIconProps {
|
|
|
10
10
|
/** include standalone style (could interfere with parent styles) */
|
|
11
11
|
standalone?: boolean;
|
|
12
12
|
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
13
|
+
style?: React.CSSProperties;
|
|
13
14
|
}
|
|
14
15
|
export declare const ButtonIcon: import("react").ForwardRefExoticComponent<ButtonIconProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
16
|
export {};
|
|
@@ -4,6 +4,7 @@ interface ColorInputProps {
|
|
|
4
4
|
onChange: (color: string) => void;
|
|
5
5
|
label: string;
|
|
6
6
|
colorPickerType: ColorPickerType;
|
|
7
|
+
placeholder?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare const ColorInput: ({ color, onChange, label, colorPickerType, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -6,7 +6,11 @@ import type { AppState } from "../../types";
|
|
|
6
6
|
export declare const getColor: (color: string) => string | null;
|
|
7
7
|
interface ColorPickerProps {
|
|
8
8
|
type: ColorPickerType;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* null indicates no color should be displayed as active
|
|
11
|
+
* (e.g. when multiple shapes selected with different colors)
|
|
12
|
+
*/
|
|
13
|
+
color: string | null;
|
|
10
14
|
onChange: (color: string) => void;
|
|
11
15
|
label: string;
|
|
12
16
|
elements: readonly ExcalidrawElement[];
|
|
@@ -3,9 +3,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
|
3
3
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
4
4
|
import type { ColorPickerType } from "./colorPickerUtils";
|
|
5
5
|
interface PickerProps {
|
|
6
|
-
color: string;
|
|
6
|
+
color: string | null;
|
|
7
7
|
onChange: (color: string) => void;
|
|
8
|
-
label: string;
|
|
9
8
|
type: ColorPickerType;
|
|
10
9
|
elements: readonly ExcalidrawElement[];
|
|
11
10
|
palette: ColorPaletteCustom;
|
|
@@ -14,5 +13,5 @@ interface PickerProps {
|
|
|
14
13
|
onEyeDropperToggle: (force?: boolean) => void;
|
|
15
14
|
onEscape: (event: React.KeyboardEvent | KeyboardEvent) => void;
|
|
16
15
|
}
|
|
17
|
-
export declare const Picker:
|
|
16
|
+
export declare const Picker: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<unknown>>;
|
|
18
17
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
2
2
|
interface PickerColorListProps {
|
|
3
3
|
palette: ColorPaletteCustom;
|
|
4
|
-
color: string;
|
|
4
|
+
color: string | null;
|
|
5
5
|
onChange: (color: string) => void;
|
|
6
|
-
label: string;
|
|
7
6
|
activeShade: number;
|
|
8
7
|
}
|
|
9
|
-
declare const PickerColorList: ({ palette, color, onChange,
|
|
8
|
+
declare const PickerColorList: ({ palette, color, onChange, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default PickerColorList;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
2
2
|
interface ShadeListProps {
|
|
3
|
-
|
|
3
|
+
color: string | null;
|
|
4
4
|
onChange: (color: string) => void;
|
|
5
5
|
palette: ColorPaletteCustom;
|
|
6
6
|
}
|
|
7
|
-
export declare const ShadeList: ({
|
|
7
|
+
export declare const ShadeList: ({ color, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { ColorPickerType } from "./colorPickerUtils";
|
|
|
2
2
|
interface TopPicksProps {
|
|
3
3
|
onChange: (color: string) => void;
|
|
4
4
|
type: ColorPickerType;
|
|
5
|
-
activeColor: string;
|
|
5
|
+
activeColor: string | null;
|
|
6
6
|
topPicks?: readonly string[];
|
|
7
7
|
}
|
|
8
8
|
export declare const TopPicks: ({ onChange, type, activeColor, topPicks, }: TopPicksProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,7 +2,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
|
2
2
|
import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common";
|
|
3
3
|
export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
|
|
4
4
|
palette: ColorPaletteCustom;
|
|
5
|
-
color: string;
|
|
5
|
+
color: string | null;
|
|
6
6
|
}) => {
|
|
7
7
|
colorName: ColorPickerColor;
|
|
8
8
|
shade: number | null;
|
|
@@ -5,7 +5,7 @@ interface ColorPickerKeyNavHandlerProps {
|
|
|
5
5
|
event: React.KeyboardEvent;
|
|
6
6
|
activeColorPickerSection: ActiveColorPickerSectionAtomType;
|
|
7
7
|
palette: ColorPaletteCustom;
|
|
8
|
-
color: string;
|
|
8
|
+
color: string | null;
|
|
9
9
|
onChange: (color: string) => void;
|
|
10
10
|
customColors: string[];
|
|
11
11
|
setActiveColorPickerSection: (update: React.SetStateAction<ActiveColorPickerSectionAtomType>) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
1
|
+
import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@excalidraw/element/types";
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import "./ConvertElementTypePopup.scss";
|
|
4
4
|
import type App from "./App";
|
|
5
5
|
export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
@@ -9,32 +9,6 @@ export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").P
|
|
|
9
9
|
type: "panel";
|
|
10
10
|
} | null;
|
|
11
11
|
};
|
|
12
|
-
export declare const fontSize_conversionCacheAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
13
|
-
[id: string]: {
|
|
14
|
-
fontSize: number;
|
|
15
|
-
elementType: ConvertibleGenericTypes;
|
|
16
|
-
};
|
|
17
|
-
} | null> & {
|
|
18
|
-
init: {
|
|
19
|
-
[id: string]: {
|
|
20
|
-
fontSize: number;
|
|
21
|
-
elementType: ConvertibleGenericTypes;
|
|
22
|
-
};
|
|
23
|
-
} | null;
|
|
24
|
-
};
|
|
25
|
-
export declare const linearElement_conversionCacheAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
26
|
-
[id: string]: {
|
|
27
|
-
properties: Partial<ExcalidrawLinearElement> | Partial<ExcalidrawElbowArrowElement>;
|
|
28
|
-
initialType: ConvertibleLinearTypes;
|
|
29
|
-
};
|
|
30
|
-
} | null> & {
|
|
31
|
-
init: {
|
|
32
|
-
[id: string]: {
|
|
33
|
-
properties: Partial<ExcalidrawLinearElement> | Partial<ExcalidrawElbowArrowElement>;
|
|
34
|
-
initialType: ConvertibleLinearTypes;
|
|
35
|
-
};
|
|
36
|
-
} | null;
|
|
37
|
-
};
|
|
38
12
|
declare const ConvertElementTypePopup: ({ app }: {
|
|
39
13
|
app: App;
|
|
40
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import "./ElementLinkDialog.scss";
|
|
4
4
|
import type { AppProps, UIAppState } from "../types";
|
|
5
5
|
declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, generateLinkForSelection, }: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./Range.scss";
|
|
2
|
+
import type { AppClassProperties } from "../types";
|
|
2
3
|
export type RangeProps = {
|
|
3
4
|
updateData: (value: number) => void;
|
|
4
|
-
|
|
5
|
-
elements: any;
|
|
5
|
+
app: AppClassProperties;
|
|
6
6
|
testId?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const Range: ({ updateData,
|
|
8
|
+
export declare const Range: ({ updateData, app, testId }: RangeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface AngleProps {
|
|
5
5
|
element: ExcalidrawElement;
|
|
@@ -5,6 +5,7 @@ interface CollapsibleProps {
|
|
|
5
5
|
openTrigger: () => void;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
className?: string;
|
|
8
|
+
showCollapsedIcon?: boolean;
|
|
8
9
|
}
|
|
9
|
-
declare const Collapsible: ({ label, open, openTrigger, children, className, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const Collapsible: ({ label, open, openTrigger, children, className, showCollapsedIcon, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default Collapsible;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface DimensionDragInputProps {
|
|
5
5
|
property: "width" | "height";
|