@excalidraw/math 0.18.0-2b1c2a9 → 0.18.0-2c3dcc0
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/index.js +8 -2
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/index.js +1 -1
- package/dist/types/common/src/colors.d.ts +3 -0
- package/dist/types/common/src/constants.d.ts +56 -0
- package/dist/types/common/src/keys.d.ts +4 -0
- package/dist/types/common/src/random.d.ts +7 -0
- package/dist/types/common/src/utils.d.ts +12 -1
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/align.d.ts +4 -1
- package/dist/types/element/src/binding.d.ts +75 -7
- package/dist/types/element/src/bounds.d.ts +10 -2
- package/dist/types/element/src/collision.d.ts +21 -5
- package/dist/types/element/src/comparisons.d.ts +5 -3
- package/dist/types/element/src/cropElement.d.ts +36 -4
- package/dist/types/element/src/delta.d.ts +30 -2
- package/dist/types/element/src/distribute.d.ts +4 -1
- package/dist/types/element/src/dragElements.d.ts +8 -3
- package/dist/types/element/src/duplicate.d.ts +60 -0
- package/dist/types/element/src/elbowArrow.d.ts +5 -0
- package/dist/types/element/src/embeddable.d.ts +2 -1
- package/dist/types/element/src/flowchart.d.ts +6 -8
- package/dist/types/element/src/frame.d.ts +21 -3
- package/dist/types/element/src/groups.d.ts +1 -6
- package/dist/types/element/src/image.d.ts +5 -2
- package/dist/types/element/src/index.d.ts +3 -0
- package/dist/types/element/src/linearElementEditor.d.ts +4 -1
- package/dist/types/element/src/listMarker.d.ts +39 -0
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +40 -3
- package/dist/types/element/src/renderElement.d.ts +31 -4
- package/dist/types/element/src/renderEnvironment.d.ts +66 -0
- package/dist/types/element/src/resizeElements.d.ts +15 -5
- package/dist/types/element/src/selection.d.ts +4 -10
- package/dist/types/element/src/shape.d.ts +17 -1
- package/dist/types/element/src/sizeHelpers.d.ts +6 -0
- package/dist/types/element/src/stickyNote.d.ts +191 -0
- package/dist/types/element/src/textElement.d.ts +10 -2
- package/dist/types/element/src/textMeasurements.d.ts +15 -11
- package/dist/types/element/src/textWrapping.d.ts +3 -2
- package/dist/types/element/src/transform.d.ts +30 -7
- package/dist/types/element/src/typeChecks.d.ts +3 -2
- package/dist/types/element/src/types.d.ts +28 -6
- package/dist/types/element/src/utils.d.ts +8 -1
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +48 -3
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +62 -208
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +121 -16
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +32 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -546
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +20 -2
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +32 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +39 -9
- package/dist/types/excalidraw/actions/actionFrame.d.ts +92 -479
- package/dist/types/excalidraw/actions/actionGroup.d.ts +34 -4
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +66 -2
- package/dist/types/excalidraw/actions/actionLink.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +42 -8
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +17 -2
- package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -2
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +452 -6
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +201 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +198 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +16 -1
- package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +16 -1
- package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
- package/dist/types/excalidraw/actions/index.d.ts +3 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +26 -8
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
- package/dist/types/excalidraw/charts/index.d.ts +2 -1
- package/dist/types/excalidraw/components/Actions.d.ts +10 -2
- package/dist/types/excalidraw/components/App.arrowText.d.ts +5 -39
- package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
- package/dist/types/excalidraw/components/App.d.ts +129 -218
- package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
- package/dist/types/excalidraw/components/App.host.d.ts +102 -0
- package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
- package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
- package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
- package/dist/types/excalidraw/components/App.selectionTool.d.ts +94 -0
- package/dist/types/excalidraw/components/App.text.d.ts +194 -0
- package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
- package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +64 -4
- package/dist/types/excalidraw/components/App.wheel.d.ts +30 -0
- package/dist/types/excalidraw/components/App.wrap.d.ts +39 -0
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
- package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -1
- package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
- package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
- package/dist/types/excalidraw/components/IconButton.d.ts +2 -0
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
- package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
- package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
- package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
- package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
- package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
- package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
- package/dist/types/excalidraw/components/Tools.d.ts +7 -2
- package/dist/types/excalidraw/components/Tooltip.d.ts +26 -2
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
- package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +2 -0
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +13 -2
- package/dist/types/excalidraw/components/icons.d.ts +2 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +3 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +2 -2
- package/dist/types/excalidraw/data/blob.d.ts +46 -16
- package/dist/types/excalidraw/data/index.d.ts +3 -3
- package/dist/types/excalidraw/data/json.d.ts +23 -8
- package/dist/types/excalidraw/fonts/Fonts.d.ts +9 -6
- package/dist/types/excalidraw/history.d.ts +10 -4
- package/dist/types/excalidraw/mermaid.d.ts +7 -0
- package/dist/types/excalidraw/reactUtils.d.ts +1 -1
- package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
- package/dist/types/excalidraw/renderer/animation.d.ts +11 -4
- package/dist/types/excalidraw/renderer/helpers.d.ts +18 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
- package/dist/types/excalidraw/scene/Renderer.d.ts +64 -3
- package/dist/types/excalidraw/scene/export.d.ts +343 -20
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +26 -2
- package/dist/types/excalidraw/types.d.ts +191 -22
- package/dist/types/excalidraw/viewport.d.ts +29 -1
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +12 -1
- package/dist/types/utils/src/index.d.ts +3 -1
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +2 -2
- package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +0 -31
- package/dist/types/utils/src/export.d.ts +0 -35
|
@@ -29,11 +29,20 @@ export declare const actionAddToLibrary: {
|
|
|
29
29
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
30
30
|
bindingPreference: "enabled" | "disabled";
|
|
31
31
|
isMidpointSnappingEnabled: boolean;
|
|
32
|
+
showHints: boolean;
|
|
33
|
+
inputDevice: import("../types").InputDevice;
|
|
32
34
|
suggestedBinding: {
|
|
33
35
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
34
36
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
35
37
|
} | null;
|
|
36
|
-
|
|
38
|
+
textToolHover: {
|
|
39
|
+
type: "text";
|
|
40
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
41
|
+
} | {
|
|
42
|
+
type: "container";
|
|
43
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
44
|
+
} | {
|
|
45
|
+
type: "arrow";
|
|
37
46
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
38
47
|
anchor: "start" | "end" | "label";
|
|
39
48
|
} | null;
|
|
@@ -63,6 +72,8 @@ export declare const actionAddToLibrary: {
|
|
|
63
72
|
exportWithDarkMode: boolean;
|
|
64
73
|
exportScale: number;
|
|
65
74
|
currentItemStrokeColor: string;
|
|
75
|
+
currentItemStickynoteStrokeColor: string;
|
|
76
|
+
currentItemStickynoteBackgroundColor: string;
|
|
66
77
|
currentItemBackgroundColor: string;
|
|
67
78
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
68
79
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -125,6 +136,7 @@ export declare const actionAddToLibrary: {
|
|
|
125
136
|
selectedElementsAreBeingDragged: boolean;
|
|
126
137
|
shouldCacheIgnoreZoom: boolean;
|
|
127
138
|
zenModeEnabled: boolean;
|
|
139
|
+
minimapEnabled: boolean;
|
|
128
140
|
theme: import("@excalidraw/element/types").Theme;
|
|
129
141
|
gridSize: number;
|
|
130
142
|
gridStep: number;
|
|
@@ -167,7 +179,10 @@ export declare const actionAddToLibrary: {
|
|
|
167
179
|
elementStroke: readonly string[] | null;
|
|
168
180
|
elementBackground: readonly string[] | null;
|
|
169
181
|
bucketFill: readonly string[] | null;
|
|
182
|
+
stickyNoteStroke: readonly string[] | null;
|
|
183
|
+
stickyNoteBackground: readonly string[] | null;
|
|
170
184
|
};
|
|
185
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
171
186
|
};
|
|
172
187
|
} | {
|
|
173
188
|
captureUpdate: "EVENTUALLY";
|
|
@@ -192,11 +207,20 @@ export declare const actionAddToLibrary: {
|
|
|
192
207
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
193
208
|
bindingPreference: "enabled" | "disabled";
|
|
194
209
|
isMidpointSnappingEnabled: boolean;
|
|
210
|
+
showHints: boolean;
|
|
211
|
+
inputDevice: import("../types").InputDevice;
|
|
195
212
|
suggestedBinding: {
|
|
196
213
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
197
214
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
198
215
|
} | null;
|
|
199
|
-
|
|
216
|
+
textToolHover: {
|
|
217
|
+
type: "text";
|
|
218
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
219
|
+
} | {
|
|
220
|
+
type: "container";
|
|
221
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
222
|
+
} | {
|
|
223
|
+
type: "arrow";
|
|
200
224
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
201
225
|
anchor: "start" | "end" | "label";
|
|
202
226
|
} | null;
|
|
@@ -226,6 +250,8 @@ export declare const actionAddToLibrary: {
|
|
|
226
250
|
exportWithDarkMode: boolean;
|
|
227
251
|
exportScale: number;
|
|
228
252
|
currentItemStrokeColor: string;
|
|
253
|
+
currentItemStickynoteStrokeColor: string;
|
|
254
|
+
currentItemStickynoteBackgroundColor: string;
|
|
229
255
|
currentItemBackgroundColor: string;
|
|
230
256
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
231
257
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -293,6 +319,7 @@ export declare const actionAddToLibrary: {
|
|
|
293
319
|
duration?: number;
|
|
294
320
|
} | null;
|
|
295
321
|
zenModeEnabled: boolean;
|
|
322
|
+
minimapEnabled: boolean;
|
|
296
323
|
theme: import("@excalidraw/element/types").Theme;
|
|
297
324
|
gridSize: number;
|
|
298
325
|
gridStep: number;
|
|
@@ -335,7 +362,10 @@ export declare const actionAddToLibrary: {
|
|
|
335
362
|
elementStroke: readonly string[] | null;
|
|
336
363
|
elementBackground: readonly string[] | null;
|
|
337
364
|
bucketFill: readonly string[] | null;
|
|
365
|
+
stickyNoteStroke: readonly string[] | null;
|
|
366
|
+
stickyNoteBackground: readonly string[] | null;
|
|
338
367
|
};
|
|
368
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
339
369
|
};
|
|
340
370
|
}> | {
|
|
341
371
|
captureUpdate: "EVENTUALLY";
|
|
@@ -360,11 +390,20 @@ export declare const actionAddToLibrary: {
|
|
|
360
390
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
361
391
|
bindingPreference: "enabled" | "disabled";
|
|
362
392
|
isMidpointSnappingEnabled: boolean;
|
|
393
|
+
showHints: boolean;
|
|
394
|
+
inputDevice: import("../types").InputDevice;
|
|
363
395
|
suggestedBinding: {
|
|
364
396
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
365
397
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
366
398
|
} | null;
|
|
367
|
-
|
|
399
|
+
textToolHover: {
|
|
400
|
+
type: "text";
|
|
401
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
402
|
+
} | {
|
|
403
|
+
type: "container";
|
|
404
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
405
|
+
} | {
|
|
406
|
+
type: "arrow";
|
|
368
407
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
369
408
|
anchor: "start" | "end" | "label";
|
|
370
409
|
} | null;
|
|
@@ -394,6 +433,8 @@ export declare const actionAddToLibrary: {
|
|
|
394
433
|
exportWithDarkMode: boolean;
|
|
395
434
|
exportScale: number;
|
|
396
435
|
currentItemStrokeColor: string;
|
|
436
|
+
currentItemStickynoteStrokeColor: string;
|
|
437
|
+
currentItemStickynoteBackgroundColor: string;
|
|
397
438
|
currentItemBackgroundColor: string;
|
|
398
439
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
399
440
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -461,6 +502,7 @@ export declare const actionAddToLibrary: {
|
|
|
461
502
|
duration?: number;
|
|
462
503
|
} | null;
|
|
463
504
|
zenModeEnabled: boolean;
|
|
505
|
+
minimapEnabled: boolean;
|
|
464
506
|
theme: import("@excalidraw/element/types").Theme;
|
|
465
507
|
gridSize: number;
|
|
466
508
|
gridStep: number;
|
|
@@ -503,7 +545,10 @@ export declare const actionAddToLibrary: {
|
|
|
503
545
|
elementStroke: readonly string[] | null;
|
|
504
546
|
elementBackground: readonly string[] | null;
|
|
505
547
|
bucketFill: readonly string[] | null;
|
|
548
|
+
stickyNoteStroke: readonly string[] | null;
|
|
549
|
+
stickyNoteBackground: readonly string[] | null;
|
|
506
550
|
};
|
|
551
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
507
552
|
};
|
|
508
553
|
};
|
|
509
554
|
label: string;
|
|
@@ -11,7 +11,7 @@ export declare const actionAlignTop: {
|
|
|
11
11
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
12
12
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
13
13
|
appState: Readonly<AppState>;
|
|
14
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
14
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
15
15
|
captureUpdate: "IMMEDIATELY";
|
|
16
16
|
};
|
|
17
17
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -29,7 +29,7 @@ export declare const actionAlignBottom: {
|
|
|
29
29
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
30
30
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
31
31
|
appState: Readonly<AppState>;
|
|
32
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
32
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
33
33
|
captureUpdate: "IMMEDIATELY";
|
|
34
34
|
};
|
|
35
35
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -47,7 +47,7 @@ export declare const actionAlignLeft: {
|
|
|
47
47
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
48
48
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
49
49
|
appState: Readonly<AppState>;
|
|
50
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
50
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
51
51
|
captureUpdate: "IMMEDIATELY";
|
|
52
52
|
};
|
|
53
53
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -65,7 +65,7 @@ export declare const actionAlignRight: {
|
|
|
65
65
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
66
66
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
67
67
|
appState: Readonly<AppState>;
|
|
68
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
68
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
69
69
|
captureUpdate: "IMMEDIATELY";
|
|
70
70
|
};
|
|
71
71
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -83,7 +83,7 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
83
83
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
84
84
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
85
85
|
appState: Readonly<AppState>;
|
|
86
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
86
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
87
87
|
captureUpdate: "IMMEDIATELY";
|
|
88
88
|
};
|
|
89
89
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -100,7 +100,7 @@ export declare const actionAlignHorizontallyCentered: {
|
|
|
100
100
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
101
101
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
102
102
|
appState: Readonly<AppState>;
|
|
103
|
-
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
103
|
+
elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
|
|
104
104
|
captureUpdate: "IMMEDIATELY";
|
|
105
105
|
};
|
|
106
106
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
2
|
-
import type {
|
|
3
|
-
import type { AppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeleted, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
+
import type { ActionResult } from "./types";
|
|
3
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Frees the container's text as it rendered (wrapped the same, at a fixed
|
|
6
|
+
* width), the container going back to the height it had without it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const unbindTextFromContainer: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, app: AppClassProperties) => void;
|
|
4
9
|
export declare const actionUnbindText: {
|
|
5
10
|
name: "unbindText";
|
|
6
11
|
label: string;
|
|
7
12
|
trackEvent: {
|
|
8
13
|
category: "element";
|
|
9
14
|
};
|
|
10
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app:
|
|
11
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app:
|
|
15
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
16
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
12
17
|
elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
13
|
-
appState: Readonly<AppState>;
|
|
14
|
-
captureUpdate: "IMMEDIATELY";
|
|
15
|
-
};
|
|
16
|
-
} & {
|
|
17
|
-
keyTest?: undefined;
|
|
18
|
-
};
|
|
19
|
-
export declare const actionBindText: {
|
|
20
|
-
name: "bindText";
|
|
21
|
-
label: string;
|
|
22
|
-
trackEvent: {
|
|
23
|
-
category: "element";
|
|
24
|
-
};
|
|
25
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
26
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
|
|
27
|
-
elements: ExcalidrawElement[];
|
|
28
18
|
appState: {
|
|
29
|
-
selectedElementIds:
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
selectedElementIds: AppState["selectedElementIds"];
|
|
20
|
+
editingGroupId: AppState["editingGroupId"];
|
|
21
|
+
selectedGroupIds: AppState["selectedGroupIds"];
|
|
22
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
32
23
|
contextMenu: {
|
|
33
24
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
34
25
|
top: number;
|
|
@@ -38,26 +29,35 @@ export declare const actionBindText: {
|
|
|
38
29
|
isLoading: boolean;
|
|
39
30
|
errorMessage: React.ReactNode;
|
|
40
31
|
activeEmbeddable: {
|
|
41
|
-
element:
|
|
32
|
+
element: NonDeletedExcalidrawElement;
|
|
42
33
|
state: "hover" | "active";
|
|
43
34
|
} | null;
|
|
44
|
-
newElement:
|
|
45
|
-
resizingElement:
|
|
46
|
-
multiElement:
|
|
47
|
-
selectionElement:
|
|
35
|
+
newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
36
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
37
|
+
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
38
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
48
39
|
isBindingEnabled: boolean;
|
|
49
40
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
50
41
|
bindingPreference: "enabled" | "disabled";
|
|
51
42
|
isMidpointSnappingEnabled: boolean;
|
|
43
|
+
showHints: boolean;
|
|
44
|
+
inputDevice: import("../types").InputDevice;
|
|
52
45
|
suggestedBinding: {
|
|
53
|
-
element:
|
|
46
|
+
element: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
54
47
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
55
48
|
} | null;
|
|
56
|
-
|
|
49
|
+
textToolHover: {
|
|
50
|
+
type: "text";
|
|
51
|
+
elementId: ExcalidrawElement["id"];
|
|
52
|
+
} | {
|
|
53
|
+
type: "container";
|
|
54
|
+
elementId: ExcalidrawElement["id"];
|
|
55
|
+
} | {
|
|
56
|
+
type: "arrow";
|
|
57
57
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
58
58
|
anchor: "start" | "end" | "label";
|
|
59
59
|
} | null;
|
|
60
|
-
frameToHighlight:
|
|
60
|
+
frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
61
61
|
frameRendering: {
|
|
62
62
|
enabled: boolean;
|
|
63
63
|
name: boolean;
|
|
@@ -65,7 +65,7 @@ export declare const actionBindText: {
|
|
|
65
65
|
clip: boolean;
|
|
66
66
|
};
|
|
67
67
|
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
68
|
-
elementsToHighlight: readonly
|
|
68
|
+
elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
|
|
69
69
|
editingTextElement: ExcalidrawTextElement | null;
|
|
70
70
|
activeTool: {
|
|
71
71
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -83,6 +83,8 @@ export declare const actionBindText: {
|
|
|
83
83
|
exportWithDarkMode: boolean;
|
|
84
84
|
exportScale: number;
|
|
85
85
|
currentItemStrokeColor: string;
|
|
86
|
+
currentItemStickynoteStrokeColor: string;
|
|
87
|
+
currentItemStickynoteBackgroundColor: string;
|
|
86
88
|
currentItemBackgroundColor: string;
|
|
87
89
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
88
90
|
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
@@ -147,15 +149,12 @@ export declare const actionBindText: {
|
|
|
147
149
|
duration?: number;
|
|
148
150
|
} | null;
|
|
149
151
|
zenModeEnabled: boolean;
|
|
152
|
+
minimapEnabled: boolean;
|
|
150
153
|
theme: import("@excalidraw/element/types").Theme;
|
|
151
154
|
gridSize: number;
|
|
152
155
|
gridStep: number;
|
|
153
156
|
gridModeEnabled: boolean;
|
|
154
157
|
viewModeEnabled: boolean;
|
|
155
|
-
selectedGroupIds: {
|
|
156
|
-
[groupId: string]: boolean;
|
|
157
|
-
};
|
|
158
|
-
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
159
158
|
width: number;
|
|
160
159
|
height: number;
|
|
161
160
|
offsetTop: number;
|
|
@@ -167,7 +166,6 @@ export declare const actionBindText: {
|
|
|
167
166
|
panels: number;
|
|
168
167
|
};
|
|
169
168
|
showHyperlinkPopup: false | "info" | "editor";
|
|
170
|
-
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
171
169
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
172
170
|
originSnapOffset: {
|
|
173
171
|
x: number;
|
|
@@ -189,190 +187,46 @@ export declare const actionBindText: {
|
|
|
189
187
|
elementStroke: readonly string[] | null;
|
|
190
188
|
elementBackground: readonly string[] | null;
|
|
191
189
|
bucketFill: readonly string[] | null;
|
|
190
|
+
stickyNoteStroke: readonly string[] | null;
|
|
191
|
+
stickyNoteBackground: readonly string[] | null;
|
|
192
192
|
};
|
|
193
|
+
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
193
194
|
};
|
|
194
195
|
captureUpdate: "IMMEDIATELY";
|
|
195
196
|
};
|
|
196
197
|
} & {
|
|
197
198
|
keyTest?: undefined;
|
|
198
199
|
};
|
|
200
|
+
export declare const actionBindText: {
|
|
201
|
+
name: "bindText";
|
|
202
|
+
label: string;
|
|
203
|
+
trackEvent: {
|
|
204
|
+
category: "element";
|
|
205
|
+
};
|
|
206
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
207
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
|
|
208
|
+
} & {
|
|
209
|
+
keyTest?: undefined;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* A note and its label share one ink: the text the user styled wins, unless it
|
|
213
|
+
* is transparent (a note's label never is).
|
|
214
|
+
*/
|
|
215
|
+
export declare const getStickyNoteInk: (textElement: ExcalidrawTextElement, container: ExcalidrawElement) => string | null;
|
|
216
|
+
/** binds the text to the (label-less) container, selecting the container */
|
|
217
|
+
export declare const bindTextToContainer: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElement: ExcalidrawTextElement, container: NonDeleted<ExcalidrawTextContainer>, app: AppClassProperties) => ActionResult;
|
|
218
|
+
export declare const pushTextAboveContainer: (elements: readonly ExcalidrawElement[], container: ExcalidrawElement, textElement: ExcalidrawTextElement) => ExcalidrawElement[];
|
|
219
|
+
export declare const pushContainerBelowText: (elements: readonly ExcalidrawElement[], container: ExcalidrawElement, textElement: ExcalidrawTextElement) => ExcalidrawElement[];
|
|
199
220
|
export declare const actionWrapTextInContainer: {
|
|
200
221
|
name: "wrapTextInContainer";
|
|
201
222
|
label: string;
|
|
202
223
|
trackEvent: {
|
|
203
224
|
category: "element";
|
|
204
225
|
};
|
|
205
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app:
|
|
206
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app:
|
|
207
|
-
elements: readonly ExcalidrawElement[];
|
|
208
|
-
appState: {
|
|
209
|
-
selectedElementIds: Mutable<Readonly<{
|
|
210
|
-
[id: string]: true;
|
|
211
|
-
}>>;
|
|
212
|
-
contextMenu: {
|
|
213
|
-
items: import("../components/ContextMenu").ContextMenuItems;
|
|
214
|
-
top: number;
|
|
215
|
-
left: number;
|
|
216
|
-
} | null;
|
|
217
|
-
showWelcomeScreen: boolean;
|
|
218
|
-
isLoading: boolean;
|
|
219
|
-
errorMessage: React.ReactNode;
|
|
220
|
-
activeEmbeddable: {
|
|
221
|
-
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
222
|
-
state: "hover" | "active";
|
|
223
|
-
} | null;
|
|
224
|
-
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
225
|
-
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
226
|
-
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
227
|
-
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
228
|
-
isBindingEnabled: boolean;
|
|
229
|
-
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
230
|
-
bindingPreference: "enabled" | "disabled";
|
|
231
|
-
isMidpointSnappingEnabled: boolean;
|
|
232
|
-
suggestedBinding: {
|
|
233
|
-
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
234
|
-
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
235
|
-
} | null;
|
|
236
|
-
hoveredArrowTextAnchor: {
|
|
237
|
-
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
238
|
-
anchor: "start" | "end" | "label";
|
|
239
|
-
} | null;
|
|
240
|
-
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
241
|
-
frameRendering: {
|
|
242
|
-
enabled: boolean;
|
|
243
|
-
name: boolean;
|
|
244
|
-
outline: boolean;
|
|
245
|
-
clip: boolean;
|
|
246
|
-
};
|
|
247
|
-
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
248
|
-
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
249
|
-
editingTextElement: ExcalidrawTextElement | null;
|
|
250
|
-
activeTool: {
|
|
251
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
252
|
-
locked: boolean;
|
|
253
|
-
fromSelection: boolean;
|
|
254
|
-
} & import("../types").ActiveTool;
|
|
255
|
-
preferredSelectionTool: {
|
|
256
|
-
type: "selection" | "lasso";
|
|
257
|
-
initialized: boolean;
|
|
258
|
-
};
|
|
259
|
-
penMode: boolean;
|
|
260
|
-
penDetected: boolean;
|
|
261
|
-
exportBackground: boolean;
|
|
262
|
-
exportEmbedScene: boolean;
|
|
263
|
-
exportWithDarkMode: boolean;
|
|
264
|
-
exportScale: number;
|
|
265
|
-
currentItemStrokeColor: string;
|
|
266
|
-
currentItemBackgroundColor: string;
|
|
267
|
-
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
268
|
-
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
269
|
-
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
270
|
-
currentItemRoughness: number;
|
|
271
|
-
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
272
|
-
currentItemOpacity: number;
|
|
273
|
-
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
274
|
-
currentItemFontSize: number;
|
|
275
|
-
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
276
|
-
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
277
|
-
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
278
|
-
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
279
|
-
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
280
|
-
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
281
|
-
viewBackgroundColor: string;
|
|
282
|
-
scrollX: number;
|
|
283
|
-
scrollY: number;
|
|
284
|
-
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
285
|
-
cursorButton: "up" | "down";
|
|
286
|
-
scrolledOutside: boolean;
|
|
287
|
-
name: string | null;
|
|
288
|
-
isResizing: boolean;
|
|
289
|
-
isRotating: boolean;
|
|
290
|
-
zoom: import("../types").Zoom;
|
|
291
|
-
openMenu: "canvas" | null;
|
|
292
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
293
|
-
openSidebar: {
|
|
294
|
-
name: import("../types").SidebarName;
|
|
295
|
-
tab?: import("../types").SidebarTabName;
|
|
296
|
-
} | null;
|
|
297
|
-
openDialog: null | {
|
|
298
|
-
name: "imageExport" | "help" | "jsonExport";
|
|
299
|
-
} | {
|
|
300
|
-
name: "ttd";
|
|
301
|
-
tab: "text-to-diagram" | "mermaid";
|
|
302
|
-
} | {
|
|
303
|
-
name: "commandPalette";
|
|
304
|
-
} | {
|
|
305
|
-
name: "settings";
|
|
306
|
-
} | {
|
|
307
|
-
name: "elementLinkSelector";
|
|
308
|
-
sourceElementId: ExcalidrawElement["id"];
|
|
309
|
-
} | {
|
|
310
|
-
name: "charts";
|
|
311
|
-
data: import("../charts").Spreadsheet;
|
|
312
|
-
rawText: string;
|
|
313
|
-
};
|
|
314
|
-
defaultSidebarDockedPreference: boolean;
|
|
315
|
-
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
316
|
-
hoveredElementIds: Readonly<{
|
|
317
|
-
[id: string]: true;
|
|
318
|
-
}>;
|
|
319
|
-
previousSelectedElementIds: {
|
|
320
|
-
[id: string]: true;
|
|
321
|
-
};
|
|
322
|
-
selectedElementsAreBeingDragged: boolean;
|
|
323
|
-
shouldCacheIgnoreZoom: boolean;
|
|
324
|
-
toast: {
|
|
325
|
-
message: React.ReactNode;
|
|
326
|
-
closable?: boolean;
|
|
327
|
-
duration?: number;
|
|
328
|
-
} | null;
|
|
329
|
-
zenModeEnabled: boolean;
|
|
330
|
-
theme: import("@excalidraw/element/types").Theme;
|
|
331
|
-
gridSize: number;
|
|
332
|
-
gridStep: number;
|
|
333
|
-
gridModeEnabled: boolean;
|
|
334
|
-
viewModeEnabled: boolean;
|
|
335
|
-
selectedGroupIds: {
|
|
336
|
-
[groupId: string]: boolean;
|
|
337
|
-
};
|
|
338
|
-
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
339
|
-
width: number;
|
|
340
|
-
height: number;
|
|
341
|
-
offsetTop: number;
|
|
342
|
-
offsetLeft: number;
|
|
343
|
-
fileHandle: FileSystemFileHandle | null;
|
|
344
|
-
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
345
|
-
stats: {
|
|
346
|
-
open: boolean;
|
|
347
|
-
panels: number;
|
|
348
|
-
};
|
|
349
|
-
showHyperlinkPopup: false | "info" | "editor";
|
|
350
|
-
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
351
|
-
snapLines: readonly import("../snapping").SnapLine[];
|
|
352
|
-
originSnapOffset: {
|
|
353
|
-
x: number;
|
|
354
|
-
y: number;
|
|
355
|
-
} | null;
|
|
356
|
-
objectsSnapModeEnabled: boolean;
|
|
357
|
-
isCropping: boolean;
|
|
358
|
-
croppingElementId: ExcalidrawElement["id"] | null;
|
|
359
|
-
searchMatches: Readonly<{
|
|
360
|
-
focusedId: ExcalidrawElement["id"] | null;
|
|
361
|
-
matches: readonly import("../types").SearchMatch[];
|
|
362
|
-
}> | null;
|
|
363
|
-
activeLockedId: string | null;
|
|
364
|
-
lockedMultiSelections: {
|
|
365
|
-
[groupId: string]: true;
|
|
366
|
-
};
|
|
367
|
-
bindMode: import("@excalidraw/element/types").BindMode;
|
|
368
|
-
colorTopPicks: {
|
|
369
|
-
elementStroke: readonly string[] | null;
|
|
370
|
-
elementBackground: readonly string[] | null;
|
|
371
|
-
bucketFill: readonly string[] | null;
|
|
372
|
-
};
|
|
373
|
-
};
|
|
374
|
-
captureUpdate: "IMMEDIATELY";
|
|
375
|
-
};
|
|
226
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
227
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
|
|
376
228
|
} & {
|
|
377
229
|
keyTest?: undefined;
|
|
378
230
|
};
|
|
231
|
+
/** wraps each (unbound) text in a new container, selecting the containers */
|
|
232
|
+
export declare const wrapTextsInContainers: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElements: readonly ExcalidrawTextElement[], app: AppClassProperties) => ActionResult;
|