@excalidraw/excalidraw 0.18.0-6fc8502 → 0.18.0-864353b
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-X3RYHLJU.js → chunk-7YMZV3TY.js} +14 -4
- package/dist/dev/chunk-7YMZV3TY.js.map +7 -0
- package/dist/dev/chunk-BBNNHA7I.js +7 -0
- package/dist/dev/chunk-BBNNHA7I.js.map +7 -0
- package/dist/dev/{chunk-KYBDXI6F.js → chunk-LL55DS44.js} +15037 -10099
- package/dist/dev/chunk-LL55DS44.js.map +7 -0
- package/dist/dev/data/{image-NKFINVKH.js → image-OFYK7EOY.js} +3 -3
- package/dist/dev/index.css +100 -22
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +3531 -6486
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-CKWC2GMK.js → en-KIY5SGI3.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-F44EGBV2.js +33 -0
- package/dist/prod/{chunk-IUH5AXLB.js → chunk-OUULIERA.js} +4 -4
- package/dist/prod/chunk-UH6Q3EIV.js +7 -0
- package/dist/prod/data/image-CUOH64HE.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +18 -17
- package/dist/prod/locales/{en-SBO6ZHT2.js → en-GCLCIHXH.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 +11 -1
- 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 +22 -4
- package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +11 -14
- package/dist/types/element/src/ShapeCache.d.ts +1 -1
- package/dist/types/element/src/align.d.ts +3 -3
- package/dist/types/element/src/binding.d.ts +19 -12
- package/dist/types/element/src/bounds.d.ts +2 -2
- package/dist/types/element/src/collision.d.ts +1 -1
- package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
- package/dist/types/element/src/dragElements.d.ts +3 -2
- package/dist/types/element/src/duplicate.d.ts +10 -13
- package/dist/types/element/src/elbowArrow.d.ts +1 -1
- package/dist/types/element/src/flowchart.d.ts +3 -2
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +5 -4
- package/dist/types/element/src/index.d.ts +45 -2
- package/dist/types/element/src/linearElementEditor.d.ts +20 -31
- package/dist/types/element/src/mutateElement.d.ts +10 -2
- package/dist/types/element/src/newElement.d.ts +4 -3
- package/dist/types/element/src/resizeElements.d.ts +4 -4
- package/dist/types/element/src/selection.d.ts +11 -5
- package/dist/types/element/src/shapes.d.ts +5 -1
- package/dist/types/element/src/sizeHelpers.d.ts +2 -2
- package/dist/types/element/src/store.d.ts +227 -0
- package/dist/types/element/src/textElement.d.ts +5 -3
- package/dist/types/element/src/transformHandles.d.ts +4 -4
- package/dist/types/element/src/typeChecks.d.ts +15 -1
- package/dist/types/element/src/types.d.ts +14 -1
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +39 -45
- package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +26 -30
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +262 -288
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +81 -92
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -15
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +38 -43
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +13 -15
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +41 -46
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -15
- package/dist/types/excalidraw/actions/actionExport.d.ts +210 -228
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +72 -36
- package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionFrame.d.ts +96 -104
- package/dist/types/excalidraw/actions/actionGroup.d.ts +32 -36
- package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +505 -14
- package/dist/types/excalidraw/actions/actionLink.d.ts +13 -15
- package/dist/types/excalidraw/actions/actionMenu.d.ts +39 -45
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +25 -29
- package/dist/types/excalidraw/actions/actionProperties.d.ts +192 -214
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +15 -17
- package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -19
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +15 -17
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +15 -17
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +15 -190
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +15 -17
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +15 -17
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +15 -17
- package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/dist/types/excalidraw/actions/types.d.ts +4 -3
- package/dist/types/excalidraw/appState.d.ts +38 -29
- package/dist/types/excalidraw/components/App.d.ts +24 -11
- 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 +23 -0
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
- 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 +1 -1
- 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 +4 -11
- package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- 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/blob.d.ts +1 -1
- package/dist/types/excalidraw/data/transform.d.ts +1 -1
- package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
- package/dist/types/excalidraw/eraser/index.d.ts +14 -0
- package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
- package/dist/types/excalidraw/history.d.ts +14 -22
- package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +9 -9
- package/dist/types/excalidraw/lasso/index.d.ts +1 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +1 -2
- package/dist/types/excalidraw/renderer/helpers.d.ts +7 -2
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/scrollbars.d.ts +2 -3
- package/dist/types/excalidraw/scene/types.d.ts +2 -0
- package/dist/types/excalidraw/snapping.d.ts +2 -2
- package/dist/types/excalidraw/types.d.ts +28 -6
- package/dist/types/excalidraw/visualdebug.d.ts +1 -1
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
- package/dist/types/math/src/angle.d.ts +2 -0
- package/dist/types/math/src/curve.d.ts +2 -0
- package/dist/types/math/src/point.d.ts +1 -1
- package/dist/types/math/src/types.d.ts +1 -0
- package/dist/types/math/src/vector.d.ts +4 -0
- 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 +68 -94
- package/package.json +3 -3
- package/dist/dev/chunk-H7XJ5UVD.js +0 -7
- package/dist/dev/chunk-H7XJ5UVD.js.map +0 -7
- package/dist/dev/chunk-KYBDXI6F.js.map +0 -7
- package/dist/dev/chunk-X3RYHLJU.js.map +0 -7
- package/dist/prod/chunk-CAN5RS4P.js +0 -31
- package/dist/prod/chunk-KJYFYP64.js +0 -7
- package/dist/prod/data/image-5XD47O4X.js +0 -1
- package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/dist/types/excalidraw/store.d.ts +0 -129
- /package/dist/dev/data/{image-NKFINVKH.js.map → image-OFYK7EOY.js.map} +0 -0
- /package/dist/dev/locales/{en-CKWC2GMK.js.map → en-KIY5SGI3.js.map} +0 -0
|
@@ -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,7 @@ 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
|
|
43
|
+
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
44
44
|
activeTool: {
|
|
45
45
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
46
|
locked: boolean;
|
|
@@ -78,7 +78,7 @@ export declare const actionToggleViewMode: {
|
|
|
78
78
|
zoom: Readonly<{
|
|
79
79
|
value: import("../types").NormalizedZoomValue;
|
|
80
80
|
}>;
|
|
81
|
-
openMenu: "
|
|
81
|
+
openMenu: "canvas" | "shape" | null;
|
|
82
82
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
83
83
|
openSidebar: {
|
|
84
84
|
name: string;
|
|
@@ -160,8 +160,8 @@ export declare const actionToggleViewMode: {
|
|
|
160
160
|
data: import("../charts").Spreadsheet;
|
|
161
161
|
};
|
|
162
162
|
pendingImageElementId: string | null;
|
|
163
|
-
showHyperlinkPopup: false | "
|
|
164
|
-
selectedLinearElement: import("@excalidraw/element
|
|
163
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
164
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
165
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
166
|
originSnapOffset: {
|
|
167
167
|
x: number;
|
|
@@ -172,22 +172,20 @@ export declare const actionToggleViewMode: {
|
|
|
172
172
|
followedBy: Set<import("../types").SocketId>;
|
|
173
173
|
isCropping: boolean;
|
|
174
174
|
croppingElementId: string | null;
|
|
175
|
-
searchMatches:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}[];
|
|
184
|
-
}[];
|
|
175
|
+
searchMatches: Readonly<{
|
|
176
|
+
focusedId: string | null;
|
|
177
|
+
matches: readonly import("../types").SearchMatch[];
|
|
178
|
+
}> | null;
|
|
179
|
+
activeLockedId: string | null;
|
|
180
|
+
lockedMultiSelections: {
|
|
181
|
+
[groupId: string]: true;
|
|
182
|
+
};
|
|
185
183
|
};
|
|
186
184
|
captureUpdate: "EVENTUALLY";
|
|
187
185
|
};
|
|
188
186
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
189
187
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
190
|
-
keyTest: (event:
|
|
188
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
191
189
|
} & {
|
|
192
|
-
keyTest?: ((event:
|
|
190
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
193
191
|
};
|
|
@@ -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,7 @@ 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
|
|
43
|
+
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
44
44
|
activeTool: {
|
|
45
45
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
46
|
locked: boolean;
|
|
@@ -78,7 +78,7 @@ export declare const actionToggleZenMode: {
|
|
|
78
78
|
zoom: Readonly<{
|
|
79
79
|
value: import("../types").NormalizedZoomValue;
|
|
80
80
|
}>;
|
|
81
|
-
openMenu: "
|
|
81
|
+
openMenu: "canvas" | "shape" | null;
|
|
82
82
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
83
83
|
openSidebar: {
|
|
84
84
|
name: string;
|
|
@@ -160,8 +160,8 @@ export declare const actionToggleZenMode: {
|
|
|
160
160
|
data: import("../charts").Spreadsheet;
|
|
161
161
|
};
|
|
162
162
|
pendingImageElementId: string | null;
|
|
163
|
-
showHyperlinkPopup: false | "
|
|
164
|
-
selectedLinearElement: import("@excalidraw/element
|
|
163
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
164
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
165
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
166
|
originSnapOffset: {
|
|
167
167
|
x: number;
|
|
@@ -172,22 +172,20 @@ export declare const actionToggleZenMode: {
|
|
|
172
172
|
followedBy: Set<import("../types").SocketId>;
|
|
173
173
|
isCropping: boolean;
|
|
174
174
|
croppingElementId: string | null;
|
|
175
|
-
searchMatches:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}[];
|
|
184
|
-
}[];
|
|
175
|
+
searchMatches: Readonly<{
|
|
176
|
+
focusedId: string | null;
|
|
177
|
+
matches: readonly import("../types").SearchMatch[];
|
|
178
|
+
}> | null;
|
|
179
|
+
activeLockedId: string | null;
|
|
180
|
+
lockedMultiSelections: {
|
|
181
|
+
[groupId: string]: true;
|
|
182
|
+
};
|
|
185
183
|
};
|
|
186
184
|
captureUpdate: "EVENTUALLY";
|
|
187
185
|
};
|
|
188
186
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
189
187
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
190
|
-
keyTest: (event:
|
|
188
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
191
189
|
} & {
|
|
192
|
-
keyTest?: ((event:
|
|
190
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
193
191
|
};
|
|
@@ -13,10 +13,10 @@ export declare const actionSendBackward: {
|
|
|
13
13
|
captureUpdate: "IMMEDIATELY";
|
|
14
14
|
};
|
|
15
15
|
keyPriority: number;
|
|
16
|
-
keyTest: (event:
|
|
16
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
17
17
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
} & {
|
|
19
|
-
keyTest?: ((event:
|
|
19
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
20
20
|
};
|
|
21
21
|
export declare const actionBringForward: {
|
|
22
22
|
name: "bringForward";
|
|
@@ -32,10 +32,10 @@ export declare const actionBringForward: {
|
|
|
32
32
|
captureUpdate: "IMMEDIATELY";
|
|
33
33
|
};
|
|
34
34
|
keyPriority: number;
|
|
35
|
-
keyTest: (event:
|
|
35
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
36
36
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
} & {
|
|
38
|
-
keyTest?: ((event:
|
|
38
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
39
39
|
};
|
|
40
40
|
export declare const actionSendToBack: {
|
|
41
41
|
name: "sendToBack";
|
|
@@ -50,10 +50,10 @@ export declare const actionSendToBack: {
|
|
|
50
50
|
appState: Readonly<import("../types").AppState>;
|
|
51
51
|
captureUpdate: "IMMEDIATELY";
|
|
52
52
|
};
|
|
53
|
-
keyTest: (event:
|
|
53
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
54
54
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
} & {
|
|
56
|
-
keyTest?: ((event:
|
|
56
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
57
57
|
};
|
|
58
58
|
export declare const actionBringToFront: {
|
|
59
59
|
name: "bringToFront";
|
|
@@ -68,8 +68,8 @@ export declare const actionBringToFront: {
|
|
|
68
68
|
appState: Readonly<import("../types").AppState>;
|
|
69
69
|
captureUpdate: "IMMEDIATELY";
|
|
70
70
|
};
|
|
71
|
-
keyTest: (event:
|
|
71
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
72
72
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
73
73
|
} & {
|
|
74
|
-
keyTest?: ((event:
|
|
74
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
75
75
|
};
|
|
@@ -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";
|
|
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;
|
|
@@ -35,7 +36,7 @@ export interface Action {
|
|
|
35
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
36
37
|
checked?: (appState: Readonly<AppState>) => boolean;
|
|
37
38
|
trackEvent: false | {
|
|
38
|
-
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu";
|
|
39
|
+
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
|
|
39
40
|
action?: string;
|
|
40
41
|
predicate?: (appState: Readonly<AppState>, elements: readonly ExcalidrawElement[], value: any) => boolean;
|
|
41
42
|
};
|
|
@@ -1,29 +1,14 @@
|
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
stats?: {
|
|
5
|
+
open: boolean;
|
|
6
|
+
panels: number;
|
|
7
|
+
} | undefined;
|
|
8
|
+
exportWithDarkMode?: boolean | undefined;
|
|
9
|
+
cursorButton?: "up" | "down" | undefined;
|
|
9
10
|
scrollX?: number | undefined;
|
|
10
11
|
scrollY?: number | undefined;
|
|
11
|
-
editingGroupId?: string | null | undefined;
|
|
12
|
-
selectedElementIds?: Readonly<{
|
|
13
|
-
[id: string]: true;
|
|
14
|
-
}> | undefined;
|
|
15
|
-
theme?: import("@excalidraw/element/types").Theme | undefined;
|
|
16
|
-
selectedGroupIds?: {
|
|
17
|
-
[groupId: string]: boolean;
|
|
18
|
-
} | undefined;
|
|
19
|
-
selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
|
|
20
|
-
zenModeEnabled?: boolean | undefined;
|
|
21
|
-
gridModeEnabled?: boolean | undefined;
|
|
22
|
-
objectsSnapModeEnabled?: boolean | undefined;
|
|
23
|
-
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
24
|
-
exportScale?: number | undefined;
|
|
25
|
-
gridSize?: number | undefined;
|
|
26
|
-
gridStep?: number | undefined;
|
|
27
12
|
showWelcomeScreen?: boolean | undefined;
|
|
28
13
|
activeTool?: ({
|
|
29
14
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
@@ -34,7 +19,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
34
19
|
penDetected?: boolean | undefined;
|
|
35
20
|
exportBackground?: boolean | undefined;
|
|
36
21
|
exportEmbedScene?: boolean | undefined;
|
|
37
|
-
|
|
22
|
+
exportScale?: number | undefined;
|
|
38
23
|
currentItemStrokeColor?: string | undefined;
|
|
39
24
|
currentItemBackgroundColor?: string | undefined;
|
|
40
25
|
currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
|
|
@@ -49,35 +34,59 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
49
34
|
currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
50
35
|
currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
|
|
51
36
|
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
52
|
-
|
|
37
|
+
viewBackgroundColor?: string | undefined;
|
|
53
38
|
scrolledOutside?: boolean | undefined;
|
|
54
|
-
|
|
39
|
+
name?: string | null | undefined;
|
|
40
|
+
zoom?: Readonly<{
|
|
41
|
+
value: NormalizedZoomValue;
|
|
42
|
+
}> | undefined;
|
|
43
|
+
openMenu?: "canvas" | "shape" | null | undefined;
|
|
55
44
|
openSidebar?: {
|
|
56
45
|
name: string;
|
|
57
46
|
tab?: string | undefined;
|
|
58
47
|
} | null | undefined;
|
|
59
48
|
defaultSidebarDockedPreference?: boolean | undefined;
|
|
60
49
|
lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
|
|
50
|
+
selectedElementIds?: Readonly<{
|
|
51
|
+
[id: string]: true;
|
|
52
|
+
}> | undefined;
|
|
61
53
|
previousSelectedElementIds?: {
|
|
62
54
|
[id: string]: true;
|
|
63
55
|
} | undefined;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
57
|
+
zenModeEnabled?: boolean | undefined;
|
|
58
|
+
theme?: import("@excalidraw/element/types").Theme | undefined;
|
|
59
|
+
gridSize?: number | undefined;
|
|
60
|
+
gridStep?: number | undefined;
|
|
61
|
+
gridModeEnabled?: boolean | undefined;
|
|
62
|
+
selectedGroupIds?: {
|
|
63
|
+
[groupId: string]: boolean;
|
|
67
64
|
} | undefined;
|
|
65
|
+
editingGroupId?: string | null | undefined;
|
|
68
66
|
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
67
|
+
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
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
|
-
gridModeEnabled?: boolean | undefined;
|
|
73
75
|
gridSize?: number | undefined;
|
|
74
76
|
gridStep?: number | undefined;
|
|
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
|
-
gridModeEnabled?: boolean | undefined;
|
|
79
84
|
gridSize?: number | undefined;
|
|
80
85
|
gridStep?: number | undefined;
|
|
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"];
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type EXPORT_IMAGE_TYPES } from "@excalidraw/common";
|
|
3
|
-
import { LinearElementEditor } from "@excalidraw/element
|
|
4
|
-
import { FlowChartCreator } from "@excalidraw/element
|
|
2
|
+
import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
|
|
3
|
+
import { LinearElementEditor } from "@excalidraw/element";
|
|
4
|
+
import { FlowChartCreator } from "@excalidraw/element";
|
|
5
|
+
import { Scene } from "@excalidraw/element";
|
|
6
|
+
import { Store } from "@excalidraw/element";
|
|
7
|
+
import type { ElementUpdate } from "@excalidraw/element";
|
|
5
8
|
import type { ExcalidrawElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
|
|
9
|
+
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
6
10
|
import { ActionManager } from "../actions/manager";
|
|
7
11
|
import { AnimationFrameHandler } from "../animation-frame-handler";
|
|
8
12
|
import { History } from "../history";
|
|
9
|
-
import Scene from "../scene/Scene";
|
|
10
13
|
import { Fonts } from "../fonts";
|
|
14
|
+
import { type WritableAtom } from "../editor-jotai";
|
|
11
15
|
import { Renderer } from "../scene/Renderer";
|
|
12
|
-
import { Emitter } from "../emitter";
|
|
13
|
-
import { Store } from "../store";
|
|
14
|
-
import { AnimatedTrail } from "../animated-trail";
|
|
15
16
|
import { LaserTrails } from "../laser-trails";
|
|
16
17
|
import { LassoTrail } from "../lasso";
|
|
18
|
+
import { EraserTrail } from "../eraser";
|
|
17
19
|
import type { ExportedElements } from "../data";
|
|
18
20
|
import type { FileSystemHandle } from "../data/filesystem";
|
|
19
21
|
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
|
|
@@ -97,7 +99,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
97
99
|
};
|
|
98
100
|
animationFrameHandler: AnimationFrameHandler;
|
|
99
101
|
laserTrails: LaserTrails;
|
|
100
|
-
eraserTrail:
|
|
102
|
+
eraserTrail: EraserTrail;
|
|
101
103
|
lassoTrail: LassoTrail;
|
|
102
104
|
onChangeEmitter: Emitter<[elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles]>;
|
|
103
105
|
onPointerDownEmitter: Emitter<[activeTool: {
|
|
@@ -124,7 +126,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
124
126
|
};
|
|
125
127
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
126
128
|
resize: {
|
|
127
|
-
handleType: import("@excalidraw/element
|
|
129
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
128
130
|
isResizing: boolean;
|
|
129
131
|
offset: {
|
|
130
132
|
x: number;
|
|
@@ -150,6 +152,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
150
152
|
x: number;
|
|
151
153
|
y: number;
|
|
152
154
|
} | null;
|
|
155
|
+
origin: {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
};
|
|
153
159
|
};
|
|
154
160
|
eventListeners: {
|
|
155
161
|
onMove: {
|
|
@@ -189,7 +195,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
189
195
|
};
|
|
190
196
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
191
197
|
resize: {
|
|
192
|
-
handleType: import("@excalidraw/element
|
|
198
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
193
199
|
isResizing: boolean;
|
|
194
200
|
offset: {
|
|
195
201
|
x: number;
|
|
@@ -215,6 +221,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
215
221
|
x: number;
|
|
216
222
|
y: number;
|
|
217
223
|
} | null;
|
|
224
|
+
origin: {
|
|
225
|
+
x: number;
|
|
226
|
+
y: number;
|
|
227
|
+
};
|
|
218
228
|
};
|
|
219
229
|
eventListeners: {
|
|
220
230
|
onMove: {
|
|
@@ -237,6 +247,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
237
247
|
missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
|
|
238
248
|
onRemoveEventListenersEmitter: Emitter<[]>;
|
|
239
249
|
constructor(props: AppProps);
|
|
250
|
+
updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
240
251
|
private onWindowMessage;
|
|
241
252
|
private cacheEmbeddableRef;
|
|
242
253
|
/**
|
|
@@ -258,6 +269,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
258
269
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
259
270
|
focusContainer: AppClassProperties["focusContainer"];
|
|
260
271
|
getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
272
|
+
getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
|
|
261
273
|
getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
|
|
262
274
|
onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
|
|
263
275
|
onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
|
|
@@ -388,6 +400,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
388
400
|
*/
|
|
389
401
|
captureUpdate?: SceneData["captureUpdate"];
|
|
390
402
|
}) => void;
|
|
403
|
+
mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
|
|
391
404
|
private triggerRender;
|
|
392
405
|
/**
|
|
393
406
|
* @returns whether the menu was toggled on or off
|
|
@@ -433,7 +446,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
433
446
|
private getTextElementAtPosition;
|
|
434
447
|
private getElementAtPosition;
|
|
435
448
|
private getElementsAtPosition;
|
|
436
|
-
|
|
449
|
+
getElementHitThreshold(): number;
|
|
437
450
|
private hitElement;
|
|
438
451
|
private getTextBindableContainerAtPosition;
|
|
439
452
|
private startTextEditing;
|
|
@@ -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;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@excalidraw/element/types";
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
|
+
import "./ConvertElementTypePopup.scss";
|
|
4
|
+
import type App from "./App";
|
|
5
|
+
export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
6
|
+
type: "panel";
|
|
7
|
+
} | null> & {
|
|
8
|
+
init: {
|
|
9
|
+
type: "panel";
|
|
10
|
+
} | null;
|
|
11
|
+
};
|
|
12
|
+
declare const ConvertElementTypePopup: ({ app }: {
|
|
13
|
+
app: App;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const adjustBoundTextSize: (container: ExcalidrawTextContainer, boundText: ExcalidrawTextElementWithContainer, scene: Scene) => void;
|
|
16
|
+
type ConversionType = "generic" | "linear" | null;
|
|
17
|
+
export declare const convertElementTypes: (app: App, { conversionType, nextType, direction, }: {
|
|
18
|
+
conversionType: ConversionType;
|
|
19
|
+
nextType?: ConvertibleTypes | undefined;
|
|
20
|
+
direction?: "left" | "right" | undefined;
|
|
21
|
+
}) => boolean;
|
|
22
|
+
export declare const getConversionTypeFromElements: (elements: ExcalidrawElement[]) => ConversionType;
|
|
23
|
+
export default ConvertElementTypePopup;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
2
3
|
import "./ElementLinkDialog.scss";
|
|
3
4
|
import type { AppProps, UIAppState } from "../types";
|
|
4
|
-
declare const ElementLinkDialog: ({ sourceElementId, onClose,
|
|
5
|
+
declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, generateLinkForSelection, }: {
|
|
5
6
|
sourceElementId: ExcalidrawElement["id"];
|
|
6
|
-
elementsMap: ElementsMap;
|
|
7
7
|
appState: UIAppState;
|
|
8
|
+
scene: Scene;
|
|
8
9
|
onClose?: (() => void) | undefined;
|
|
9
10
|
generateLinkForSelection: AppProps["generateLinkForSelection"];
|
|
10
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|