@excalidraw/excalidraw 0.18.0-de715913e → 0.18.0-ec07091
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-QF5FRM6O.js → chunk-2DD3XXK2.js} +8 -3
- package/dist/dev/chunk-2DD3XXK2.js.map +7 -0
- package/dist/dev/{chunk-CRKRRBMD.js → chunk-N4PQJPAH.js} +49 -60
- package/dist/dev/chunk-N4PQJPAH.js.map +7 -0
- package/dist/dev/data/{image-IWGLHPIX.js → image-RT6RLBUE.js} +2 -2
- package/dist/dev/index.css +686 -501
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +2814 -1644
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-SMAPCEOQ.js → en-3RV5RSZR.js} +2 -2
- package/dist/prod/{chunk-I4UNSFV6.js → chunk-H6T42UNN.js} +1 -1
- package/dist/prod/chunk-SVEJI6WL.js +4 -0
- package/dist/prod/data/{image-4SM4COIL.js → image-HPGPBQV2.js} +1 -1
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +19 -19
- package/dist/prod/locales/{en-TYY6KWIJ.js → en-JEKVR2WV.js} +1 -1
- package/dist/types/common/src/constants.d.ts +20 -4
- package/dist/types/common/src/utils.d.ts +3 -0
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/delta.d.ts +2 -2
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +4 -1
- package/dist/types/element/src/store.d.ts +3 -2
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -3
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +29 -15
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +6 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +18 -9
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +8 -4
- package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +3 -2
- package/dist/types/excalidraw/actions/actionLink.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +6 -3
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +48 -24
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/index.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +1 -0
- package/dist/types/excalidraw/clipboard.d.ts +64 -1
- package/dist/types/excalidraw/components/Actions.d.ts +8 -1
- package/dist/types/excalidraw/components/App.d.ts +10 -8
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
- package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
- package/dist/types/excalidraw/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/icons.d.ts +6 -0
- package/dist/types/excalidraw/components/shapes.d.ts +129 -1
- package/dist/types/excalidraw/data/blob.d.ts +3 -7
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/types.d.ts +5 -1
- package/dist/types/math/src/segment.d.ts +1 -0
- package/package.json +5 -5
- package/dist/dev/chunk-CRKRRBMD.js.map +0 -7
- package/dist/dev/chunk-QF5FRM6O.js.map +0 -7
- package/dist/prod/chunk-HHV2PJKY.js +0 -4
- /package/dist/dev/data/{image-IWGLHPIX.js.map → image-RT6RLBUE.js.map} +0 -0
- /package/dist/dev/locales/{en-SMAPCEOQ.js.map → en-3RV5RSZR.js.map} +0 -0
|
@@ -9,7 +9,7 @@ export declare const actionChangeStrokeColor: {
|
|
|
9
9
|
label: string;
|
|
10
10
|
trackEvent: false;
|
|
11
11
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any) => any;
|
|
12
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
} & {
|
|
14
14
|
keyTest?: undefined;
|
|
15
15
|
};
|
|
@@ -26,7 +26,7 @@ export declare const actionChangeBackgroundColor: {
|
|
|
26
26
|
appState: any;
|
|
27
27
|
captureUpdate: "IMMEDIATELY";
|
|
28
28
|
};
|
|
29
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
} & {
|
|
31
31
|
keyTest?: undefined;
|
|
32
32
|
};
|
|
@@ -104,7 +104,7 @@ export declare const actionChangeFillStyle: {
|
|
|
104
104
|
value: import("../types").NormalizedZoomValue;
|
|
105
105
|
}>;
|
|
106
106
|
openMenu: "canvas" | "shape" | null;
|
|
107
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
107
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
108
108
|
openSidebar: {
|
|
109
109
|
name: string;
|
|
110
110
|
tab?: string | undefined;
|
|
@@ -205,6 +205,7 @@ export declare const actionChangeFillStyle: {
|
|
|
205
205
|
lockedMultiSelections: {
|
|
206
206
|
[groupId: string]: true;
|
|
207
207
|
};
|
|
208
|
+
stylesPanelMode: "compact" | "full";
|
|
208
209
|
};
|
|
209
210
|
captureUpdate: "IMMEDIATELY";
|
|
210
211
|
};
|
|
@@ -286,7 +287,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
286
287
|
value: import("../types").NormalizedZoomValue;
|
|
287
288
|
}>;
|
|
288
289
|
openMenu: "canvas" | "shape" | null;
|
|
289
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
290
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
290
291
|
openSidebar: {
|
|
291
292
|
name: string;
|
|
292
293
|
tab?: string | undefined;
|
|
@@ -387,10 +388,11 @@ export declare const actionChangeStrokeWidth: {
|
|
|
387
388
|
lockedMultiSelections: {
|
|
388
389
|
[groupId: string]: true;
|
|
389
390
|
};
|
|
391
|
+
stylesPanelMode: "compact" | "full";
|
|
390
392
|
};
|
|
391
393
|
captureUpdate: "IMMEDIATELY";
|
|
392
394
|
};
|
|
393
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
395
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
394
396
|
} & {
|
|
395
397
|
keyTest?: undefined;
|
|
396
398
|
};
|
|
@@ -468,7 +470,7 @@ export declare const actionChangeSloppiness: {
|
|
|
468
470
|
value: import("../types").NormalizedZoomValue;
|
|
469
471
|
}>;
|
|
470
472
|
openMenu: "canvas" | "shape" | null;
|
|
471
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
473
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
472
474
|
openSidebar: {
|
|
473
475
|
name: string;
|
|
474
476
|
tab?: string | undefined;
|
|
@@ -569,10 +571,11 @@ export declare const actionChangeSloppiness: {
|
|
|
569
571
|
lockedMultiSelections: {
|
|
570
572
|
[groupId: string]: true;
|
|
571
573
|
};
|
|
574
|
+
stylesPanelMode: "compact" | "full";
|
|
572
575
|
};
|
|
573
576
|
captureUpdate: "IMMEDIATELY";
|
|
574
577
|
};
|
|
575
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
578
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
576
579
|
} & {
|
|
577
580
|
keyTest?: undefined;
|
|
578
581
|
};
|
|
@@ -650,7 +653,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
650
653
|
value: import("../types").NormalizedZoomValue;
|
|
651
654
|
}>;
|
|
652
655
|
openMenu: "canvas" | "shape" | null;
|
|
653
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
656
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
654
657
|
openSidebar: {
|
|
655
658
|
name: string;
|
|
656
659
|
tab?: string | undefined;
|
|
@@ -751,10 +754,11 @@ export declare const actionChangeStrokeStyle: {
|
|
|
751
754
|
lockedMultiSelections: {
|
|
752
755
|
[groupId: string]: true;
|
|
753
756
|
};
|
|
757
|
+
stylesPanelMode: "compact" | "full";
|
|
754
758
|
};
|
|
755
759
|
captureUpdate: "IMMEDIATELY";
|
|
756
760
|
};
|
|
757
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
761
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
758
762
|
} & {
|
|
759
763
|
keyTest?: undefined;
|
|
760
764
|
};
|
|
@@ -832,7 +836,7 @@ export declare const actionChangeOpacity: {
|
|
|
832
836
|
value: import("../types").NormalizedZoomValue;
|
|
833
837
|
}>;
|
|
834
838
|
openMenu: "canvas" | "shape" | null;
|
|
835
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
839
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
836
840
|
openSidebar: {
|
|
837
841
|
name: string;
|
|
838
842
|
tab?: string | undefined;
|
|
@@ -933,6 +937,7 @@ export declare const actionChangeOpacity: {
|
|
|
933
937
|
lockedMultiSelections: {
|
|
934
938
|
[groupId: string]: true;
|
|
935
939
|
};
|
|
940
|
+
stylesPanelMode: "compact" | "full";
|
|
936
941
|
};
|
|
937
942
|
captureUpdate: "IMMEDIATELY";
|
|
938
943
|
};
|
|
@@ -1014,7 +1019,7 @@ export declare const actionChangeFontSize: {
|
|
|
1014
1019
|
value: import("../types").NormalizedZoomValue;
|
|
1015
1020
|
}>;
|
|
1016
1021
|
openMenu: "canvas" | "shape" | null;
|
|
1017
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1022
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
1018
1023
|
openSidebar: {
|
|
1019
1024
|
name: string;
|
|
1020
1025
|
tab?: string | undefined;
|
|
@@ -1115,10 +1120,11 @@ export declare const actionChangeFontSize: {
|
|
|
1115
1120
|
lockedMultiSelections: {
|
|
1116
1121
|
[groupId: string]: true;
|
|
1117
1122
|
};
|
|
1123
|
+
stylesPanelMode: "compact" | "full";
|
|
1118
1124
|
};
|
|
1119
1125
|
captureUpdate: "IMMEDIATELY";
|
|
1120
1126
|
};
|
|
1121
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
1127
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
1122
1128
|
} & {
|
|
1123
1129
|
keyTest?: undefined;
|
|
1124
1130
|
};
|
|
@@ -1197,7 +1203,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
1197
1203
|
value: import("../types").NormalizedZoomValue;
|
|
1198
1204
|
}>;
|
|
1199
1205
|
openMenu: "canvas" | "shape" | null;
|
|
1200
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1206
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
1201
1207
|
openSidebar: {
|
|
1202
1208
|
name: string;
|
|
1203
1209
|
tab?: string | undefined;
|
|
@@ -1298,6 +1304,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
1298
1304
|
lockedMultiSelections: {
|
|
1299
1305
|
[groupId: string]: true;
|
|
1300
1306
|
};
|
|
1307
|
+
stylesPanelMode: "compact" | "full";
|
|
1301
1308
|
};
|
|
1302
1309
|
captureUpdate: "IMMEDIATELY";
|
|
1303
1310
|
};
|
|
@@ -1380,7 +1387,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
1380
1387
|
value: import("../types").NormalizedZoomValue;
|
|
1381
1388
|
}>;
|
|
1382
1389
|
openMenu: "canvas" | "shape" | null;
|
|
1383
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1390
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
1384
1391
|
openSidebar: {
|
|
1385
1392
|
name: string;
|
|
1386
1393
|
tab?: string | undefined;
|
|
@@ -1481,6 +1488,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
1481
1488
|
lockedMultiSelections: {
|
|
1482
1489
|
[groupId: string]: true;
|
|
1483
1490
|
};
|
|
1491
|
+
stylesPanelMode: "compact" | "full";
|
|
1484
1492
|
};
|
|
1485
1493
|
captureUpdate: "IMMEDIATELY";
|
|
1486
1494
|
};
|
|
@@ -1496,7 +1504,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1496
1504
|
appState: {
|
|
1497
1505
|
currentItemFontFamily: number;
|
|
1498
1506
|
currentHoveredFontFamily: number | null;
|
|
1499
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1507
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
1500
1508
|
contextMenu: {
|
|
1501
1509
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
1502
1510
|
top: number;
|
|
@@ -1662,6 +1670,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1662
1670
|
lockedMultiSelections: {
|
|
1663
1671
|
[groupId: string]: true;
|
|
1664
1672
|
};
|
|
1673
|
+
stylesPanelMode: "compact" | "full";
|
|
1665
1674
|
};
|
|
1666
1675
|
captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
|
|
1667
1676
|
} | {
|
|
@@ -1669,7 +1678,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1669
1678
|
appState: {
|
|
1670
1679
|
currentItemFontFamily: number;
|
|
1671
1680
|
currentHoveredFontFamily: number | null;
|
|
1672
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1681
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
1673
1682
|
contextMenu: {
|
|
1674
1683
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
1675
1684
|
top: number;
|
|
@@ -1835,10 +1844,11 @@ export declare const actionChangeFontFamily: {
|
|
|
1835
1844
|
lockedMultiSelections: {
|
|
1836
1845
|
[groupId: string]: true;
|
|
1837
1846
|
};
|
|
1847
|
+
stylesPanelMode: "compact" | "full";
|
|
1838
1848
|
};
|
|
1839
1849
|
captureUpdate: "NEVER";
|
|
1840
1850
|
};
|
|
1841
|
-
PanelComponent: ({ elements, appState, app, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
1851
|
+
PanelComponent: ({ elements, appState, app, updateData, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
1842
1852
|
} & {
|
|
1843
1853
|
keyTest?: undefined;
|
|
1844
1854
|
};
|
|
@@ -1916,7 +1926,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1916
1926
|
value: import("../types").NormalizedZoomValue;
|
|
1917
1927
|
}>;
|
|
1918
1928
|
openMenu: "canvas" | "shape" | null;
|
|
1919
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1929
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
1920
1930
|
openSidebar: {
|
|
1921
1931
|
name: string;
|
|
1922
1932
|
tab?: string | undefined;
|
|
@@ -2017,10 +2027,11 @@ export declare const actionChangeTextAlign: {
|
|
|
2017
2027
|
lockedMultiSelections: {
|
|
2018
2028
|
[groupId: string]: true;
|
|
2019
2029
|
};
|
|
2030
|
+
stylesPanelMode: "compact" | "full";
|
|
2020
2031
|
};
|
|
2021
2032
|
captureUpdate: "IMMEDIATELY";
|
|
2022
2033
|
};
|
|
2023
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2034
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2024
2035
|
} & {
|
|
2025
2036
|
keyTest?: undefined;
|
|
2026
2037
|
};
|
|
@@ -2100,7 +2111,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
2100
2111
|
value: import("../types").NormalizedZoomValue;
|
|
2101
2112
|
}>;
|
|
2102
2113
|
openMenu: "canvas" | "shape" | null;
|
|
2103
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
2114
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
2104
2115
|
openSidebar: {
|
|
2105
2116
|
name: string;
|
|
2106
2117
|
tab?: string | undefined;
|
|
@@ -2201,10 +2212,11 @@ export declare const actionChangeVerticalAlign: {
|
|
|
2201
2212
|
lockedMultiSelections: {
|
|
2202
2213
|
[groupId: string]: true;
|
|
2203
2214
|
};
|
|
2215
|
+
stylesPanelMode: "compact" | "full";
|
|
2204
2216
|
};
|
|
2205
2217
|
captureUpdate: "IMMEDIATELY";
|
|
2206
2218
|
};
|
|
2207
|
-
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2219
|
+
PanelComponent: ({ elements, appState, updateData, app, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2208
2220
|
} & {
|
|
2209
2221
|
keyTest?: undefined;
|
|
2210
2222
|
};
|
|
@@ -2282,7 +2294,7 @@ export declare const actionChangeRoundness: {
|
|
|
2282
2294
|
value: import("../types").NormalizedZoomValue;
|
|
2283
2295
|
}>;
|
|
2284
2296
|
openMenu: "canvas" | "shape" | null;
|
|
2285
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
2297
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
2286
2298
|
openSidebar: {
|
|
2287
2299
|
name: string;
|
|
2288
2300
|
tab?: string | undefined;
|
|
@@ -2383,6 +2395,7 @@ export declare const actionChangeRoundness: {
|
|
|
2383
2395
|
lockedMultiSelections: {
|
|
2384
2396
|
[groupId: string]: true;
|
|
2385
2397
|
};
|
|
2398
|
+
stylesPanelMode: "compact" | "full";
|
|
2386
2399
|
};
|
|
2387
2400
|
captureUpdate: "IMMEDIATELY";
|
|
2388
2401
|
};
|
|
@@ -2467,7 +2480,7 @@ export declare const actionChangeArrowhead: {
|
|
|
2467
2480
|
value: import("../types").NormalizedZoomValue;
|
|
2468
2481
|
}>;
|
|
2469
2482
|
openMenu: "canvas" | "shape" | null;
|
|
2470
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
2483
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
2471
2484
|
openSidebar: {
|
|
2472
2485
|
name: string;
|
|
2473
2486
|
tab?: string | undefined;
|
|
@@ -2568,6 +2581,7 @@ export declare const actionChangeArrowhead: {
|
|
|
2568
2581
|
lockedMultiSelections: {
|
|
2569
2582
|
[groupId: string]: true;
|
|
2570
2583
|
};
|
|
2584
|
+
stylesPanelMode: "compact" | "full";
|
|
2571
2585
|
};
|
|
2572
2586
|
captureUpdate: "IMMEDIATELY";
|
|
2573
2587
|
};
|
|
@@ -2575,6 +2589,15 @@ export declare const actionChangeArrowhead: {
|
|
|
2575
2589
|
} & {
|
|
2576
2590
|
keyTest?: undefined;
|
|
2577
2591
|
};
|
|
2592
|
+
export declare const actionChangeArrowProperties: {
|
|
2593
|
+
name: "changeArrowProperties";
|
|
2594
|
+
label: string;
|
|
2595
|
+
trackEvent: false;
|
|
2596
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any, app: AppClassProperties) => false;
|
|
2597
|
+
PanelComponent: ({ elements, appState, updateData, app, renderAction }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2598
|
+
} & {
|
|
2599
|
+
keyTest?: undefined;
|
|
2600
|
+
};
|
|
2578
2601
|
export declare const actionChangeArrowType: {
|
|
2579
2602
|
name: "changeArrowType";
|
|
2580
2603
|
label: string;
|
|
@@ -2649,7 +2672,7 @@ export declare const actionChangeArrowType: {
|
|
|
2649
2672
|
value: import("../types").NormalizedZoomValue;
|
|
2650
2673
|
}>;
|
|
2651
2674
|
openMenu: "canvas" | "shape" | null;
|
|
2652
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
2675
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
2653
2676
|
openSidebar: {
|
|
2654
2677
|
name: string;
|
|
2655
2678
|
tab?: string | undefined;
|
|
@@ -2750,6 +2773,7 @@ export declare const actionChangeArrowType: {
|
|
|
2750
2773
|
lockedMultiSelections: {
|
|
2751
2774
|
[groupId: string]: true;
|
|
2752
2775
|
};
|
|
2776
|
+
stylesPanelMode: "compact" | "full";
|
|
2753
2777
|
};
|
|
2754
2778
|
captureUpdate: "IMMEDIATELY";
|
|
2755
2779
|
};
|
|
@@ -86,7 +86,7 @@ export declare const actionSelectAll: {
|
|
|
86
86
|
value: import("../types").NormalizedZoomValue;
|
|
87
87
|
}>;
|
|
88
88
|
openMenu: "canvas" | "shape" | null;
|
|
89
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
89
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
90
90
|
openSidebar: {
|
|
91
91
|
name: string;
|
|
92
92
|
tab?: string | undefined;
|
|
@@ -179,6 +179,7 @@ export declare const actionSelectAll: {
|
|
|
179
179
|
lockedMultiSelections: {
|
|
180
180
|
[groupId: string]: true;
|
|
181
181
|
};
|
|
182
|
+
stylesPanelMode: "compact" | "full";
|
|
182
183
|
};
|
|
183
184
|
captureUpdate: "IMMEDIATELY";
|
|
184
185
|
};
|
|
@@ -79,7 +79,7 @@ export declare const actionCopyStyles: {
|
|
|
79
79
|
value: import("../types").NormalizedZoomValue;
|
|
80
80
|
}>;
|
|
81
81
|
openMenu: "canvas" | "shape" | null;
|
|
82
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
82
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
83
83
|
openSidebar: {
|
|
84
84
|
name: string;
|
|
85
85
|
tab?: string | undefined;
|
|
@@ -175,6 +175,7 @@ export declare const actionCopyStyles: {
|
|
|
175
175
|
lockedMultiSelections: {
|
|
176
176
|
[groupId: string]: true;
|
|
177
177
|
};
|
|
178
|
+
stylesPanelMode: "compact" | "full";
|
|
178
179
|
};
|
|
179
180
|
captureUpdate: "EVENTUALLY";
|
|
180
181
|
};
|
|
@@ -81,7 +81,7 @@ export declare const actionToggleGridMode: {
|
|
|
81
81
|
value: import("../types").NormalizedZoomValue;
|
|
82
82
|
}>;
|
|
83
83
|
openMenu: "canvas" | "shape" | null;
|
|
84
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
84
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
85
85
|
openSidebar: {
|
|
86
86
|
name: string;
|
|
87
87
|
tab?: string | undefined;
|
|
@@ -180,6 +180,7 @@ export declare const actionToggleGridMode: {
|
|
|
180
180
|
lockedMultiSelections: {
|
|
181
181
|
[groupId: string]: true;
|
|
182
182
|
};
|
|
183
|
+
stylesPanelMode: "compact" | "full";
|
|
183
184
|
};
|
|
184
185
|
captureUpdate: "EVENTUALLY";
|
|
185
186
|
};
|
|
@@ -79,7 +79,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
79
79
|
value: import("../types").NormalizedZoomValue;
|
|
80
80
|
}>;
|
|
81
81
|
openMenu: "canvas" | "shape" | null;
|
|
82
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
82
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
83
83
|
openSidebar: {
|
|
84
84
|
name: string;
|
|
85
85
|
tab?: string | undefined;
|
|
@@ -178,6 +178,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
178
178
|
lockedMultiSelections: {
|
|
179
179
|
[groupId: string]: true;
|
|
180
180
|
};
|
|
181
|
+
stylesPanelMode: "compact" | "full";
|
|
181
182
|
};
|
|
182
183
|
captureUpdate: "EVENTUALLY";
|
|
183
184
|
};
|
|
@@ -85,7 +85,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
85
85
|
value: import("../types").NormalizedZoomValue;
|
|
86
86
|
}>;
|
|
87
87
|
openMenu: "canvas" | "shape" | null;
|
|
88
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
88
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
89
89
|
defaultSidebarDockedPreference: boolean;
|
|
90
90
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
91
91
|
selectedElementIds: Readonly<{
|
|
@@ -171,6 +171,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
171
171
|
lockedMultiSelections: {
|
|
172
172
|
[groupId: string]: true;
|
|
173
173
|
};
|
|
174
|
+
stylesPanelMode: "compact" | "full";
|
|
174
175
|
};
|
|
175
176
|
captureUpdate: "EVENTUALLY";
|
|
176
177
|
};
|
|
@@ -81,7 +81,7 @@ export declare const actionToggleStats: {
|
|
|
81
81
|
value: import("../types").NormalizedZoomValue;
|
|
82
82
|
}>;
|
|
83
83
|
openMenu: "canvas" | "shape" | null;
|
|
84
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
84
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
85
85
|
openSidebar: {
|
|
86
86
|
name: string;
|
|
87
87
|
tab?: string | undefined;
|
|
@@ -178,6 +178,7 @@ export declare const actionToggleStats: {
|
|
|
178
178
|
lockedMultiSelections: {
|
|
179
179
|
[groupId: string]: true;
|
|
180
180
|
};
|
|
181
|
+
stylesPanelMode: "compact" | "full";
|
|
181
182
|
};
|
|
182
183
|
captureUpdate: "EVENTUALLY";
|
|
183
184
|
};
|
|
@@ -78,7 +78,7 @@ export declare const actionToggleViewMode: {
|
|
|
78
78
|
value: import("../types").NormalizedZoomValue;
|
|
79
79
|
}>;
|
|
80
80
|
openMenu: "canvas" | "shape" | null;
|
|
81
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
81
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
82
82
|
openSidebar: {
|
|
83
83
|
name: string;
|
|
84
84
|
tab?: string | undefined;
|
|
@@ -178,6 +178,7 @@ export declare const actionToggleViewMode: {
|
|
|
178
178
|
lockedMultiSelections: {
|
|
179
179
|
[groupId: string]: true;
|
|
180
180
|
};
|
|
181
|
+
stylesPanelMode: "compact" | "full";
|
|
181
182
|
};
|
|
182
183
|
captureUpdate: "EVENTUALLY";
|
|
183
184
|
};
|
|
@@ -78,7 +78,7 @@ export declare const actionToggleZenMode: {
|
|
|
78
78
|
value: import("../types").NormalizedZoomValue;
|
|
79
79
|
}>;
|
|
80
80
|
openMenu: "canvas" | "shape" | null;
|
|
81
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
81
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
82
82
|
openSidebar: {
|
|
83
83
|
name: string;
|
|
84
84
|
tab?: string | undefined;
|
|
@@ -178,6 +178,7 @@ export declare const actionToggleZenMode: {
|
|
|
178
178
|
lockedMultiSelections: {
|
|
179
179
|
[groupId: string]: true;
|
|
180
180
|
};
|
|
181
|
+
stylesPanelMode: "compact" | "full";
|
|
181
182
|
};
|
|
182
183
|
captureUpdate: "EVENTUALLY";
|
|
183
184
|
};
|
|
@@ -2,7 +2,7 @@ export { actionDeleteSelected } from "./actionDeleteSelected";
|
|
|
2
2
|
export { actionBringForward, actionBringToFront, actionSendBackward, actionSendToBack, } from "./actionZindex";
|
|
3
3
|
export { actionSelectAll } from "./actionSelectAll";
|
|
4
4
|
export { actionDuplicateSelection } from "./actionDuplicateSelection";
|
|
5
|
-
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, } from "./actionProperties";
|
|
5
|
+
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
6
6
|
export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
|
|
7
7
|
export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
|
|
8
8
|
export { actionFinalize } from "./actionFinalize";
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "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;
|
|
@@ -69,6 +69,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
69
69
|
lockedMultiSelections?: {
|
|
70
70
|
[groupId: string]: true;
|
|
71
71
|
} | undefined;
|
|
72
|
+
stylesPanelMode?: "compact" | "full" | undefined;
|
|
72
73
|
};
|
|
73
74
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
74
75
|
viewBackgroundColor?: string | undefined;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ALLOWED_PASTE_MIME_TYPES } from "@excalidraw/common";
|
|
2
|
+
import type { ValueOf } from "@excalidraw/common/utility-types";
|
|
3
|
+
import type { IMAGE_MIME_TYPES, STRING_MIME_TYPES } from "@excalidraw/common";
|
|
2
4
|
import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
5
|
+
import type { FileSystemHandle } from "./data/filesystem";
|
|
3
6
|
import type { Spreadsheet } from "./charts";
|
|
4
7
|
import type { BinaryFiles } from "./types";
|
|
5
8
|
export type PastedMixedContent = {
|
|
@@ -57,10 +60,70 @@ export declare const readSystemClipboard: () => Promise<{
|
|
|
57
60
|
"image/avif"?: string | File | undefined;
|
|
58
61
|
"image/jfif"?: string | File | undefined;
|
|
59
62
|
}>;
|
|
63
|
+
type AllowedParsedDataTransferItem = {
|
|
64
|
+
type: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
65
|
+
kind: "file";
|
|
66
|
+
file: File;
|
|
67
|
+
fileHandle: FileSystemHandle | null;
|
|
68
|
+
} | {
|
|
69
|
+
type: ValueOf<typeof STRING_MIME_TYPES>;
|
|
70
|
+
kind: "string";
|
|
71
|
+
value: string;
|
|
72
|
+
};
|
|
73
|
+
type ParsedDataTransferItem = {
|
|
74
|
+
type: string;
|
|
75
|
+
kind: "file";
|
|
76
|
+
file: File;
|
|
77
|
+
fileHandle: FileSystemHandle | null;
|
|
78
|
+
} | {
|
|
79
|
+
type: string;
|
|
80
|
+
kind: "string";
|
|
81
|
+
value: string;
|
|
82
|
+
};
|
|
83
|
+
type ParsedDataTransferItemType<T extends AllowedParsedDataTransferItem["type"]> = AllowedParsedDataTransferItem & {
|
|
84
|
+
type: T;
|
|
85
|
+
};
|
|
86
|
+
export type ParsedDataTransferFile = Extract<AllowedParsedDataTransferItem, {
|
|
87
|
+
kind: "file";
|
|
88
|
+
}>;
|
|
89
|
+
type ParsedDataTranferList = ParsedDataTransferItem[] & {
|
|
90
|
+
/**
|
|
91
|
+
* Only allows filtering by known `string` data types, since `file`
|
|
92
|
+
* types can have multiple items of the same type (e.g. multiple image files)
|
|
93
|
+
* unlike `string` data transfer items.
|
|
94
|
+
*/
|
|
95
|
+
findByType: typeof findDataTransferItemType;
|
|
96
|
+
/**
|
|
97
|
+
* Only allows filtering by known `string` data types, since `file`
|
|
98
|
+
* types can have multiple items of the same type (e.g. multiple image files)
|
|
99
|
+
* unlike `string` data transfer items.
|
|
100
|
+
*/
|
|
101
|
+
getData: typeof getDataTransferItemData;
|
|
102
|
+
getFiles: typeof getDataTransferFiles;
|
|
103
|
+
};
|
|
104
|
+
declare const findDataTransferItemType: <T extends ValueOf<{
|
|
105
|
+
readonly text: "text/plain";
|
|
106
|
+
readonly html: "text/html";
|
|
107
|
+
readonly json: "application/json";
|
|
108
|
+
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
109
|
+
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
110
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
111
|
+
}>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
|
|
112
|
+
declare const getDataTransferItemData: <T extends ValueOf<{
|
|
113
|
+
readonly text: "text/plain";
|
|
114
|
+
readonly html: "text/html";
|
|
115
|
+
readonly json: "application/json";
|
|
116
|
+
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
117
|
+
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
118
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
119
|
+
}>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
|
|
120
|
+
declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
|
|
121
|
+
export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
|
|
60
122
|
/**
|
|
61
123
|
* Attempts to parse clipboard event.
|
|
62
124
|
*/
|
|
63
|
-
export declare const parseClipboard: (
|
|
125
|
+
export declare const parseClipboard: (dataList: ParsedDataTranferList, isPlainPaste?: boolean) => Promise<ClipboardData>;
|
|
64
126
|
export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
|
|
65
127
|
export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
128
|
+
export declare const isClipboardEvent: (event: React.SyntheticEvent | Event) => event is ClipboardEvent;
|
|
66
129
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
2
2
|
import "./Actions.scss";
|
|
3
|
-
import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
|
|
3
|
+
import type { AppClassProperties, AppProps, UIAppState, Zoom, AppState } from "../types";
|
|
4
4
|
import type { ActionManager } from "../actions/manager";
|
|
5
5
|
export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
6
6
|
export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
@@ -10,6 +10,13 @@ export declare const SelectedShapeActions: ({ appState, elementsMap, renderActio
|
|
|
10
10
|
renderAction: ActionManager["renderAction"];
|
|
11
11
|
app: AppClassProperties;
|
|
12
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const CompactShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
|
|
14
|
+
appState: UIAppState;
|
|
15
|
+
elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap;
|
|
16
|
+
renderAction: ActionManager["renderAction"];
|
|
17
|
+
app: AppClassProperties;
|
|
18
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
20
|
export declare const ShapesSwitcher: ({ activeTool, appState, app, UIOptions, }: {
|
|
14
21
|
activeTool: UIAppState["activeTool"];
|
|
15
22
|
appState: UIAppState;
|