@zsviczian/excalidraw 0.16.1-obsidian-6 → 0.16.1-obsidian-8
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/excalidraw.development.js +83 -39
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +24 -6
- package/types/actions/actionBoundText.d.ts +16 -4
- package/types/actions/actionCanvas.d.ts +104 -26
- package/types/actions/actionClipboard.d.ts +355 -18
- package/types/actions/actionDeleteSelected.d.ts +24 -6
- package/types/actions/actionElementLock.d.ts +16 -4
- package/types/actions/actionExport.d.ts +71 -17
- package/types/actions/actionFinalize.d.ts +16 -4
- package/types/actions/actionFrame.d.ts +24 -6
- package/types/actions/actionGroup.d.ts +16 -4
- package/types/actions/actionLinearEditor.d.ts +8 -2
- package/types/actions/actionMenu.d.ts +23 -5
- package/types/actions/actionProperties.d.ts +104 -26
- package/types/actions/actionSelectAll.d.ts +8 -2
- package/types/actions/actionStyles.d.ts +8 -2
- package/types/actions/actionToggleGridMode.d.ts +8 -2
- package/types/actions/actionToggleObjectsSnapMode.d.ts +8 -2
- package/types/actions/actionToggleStats.d.ts +8 -2
- package/types/actions/actionToggleViewMode.d.ts +8 -2
- package/types/actions/actionToggleZenMode.d.ts +8 -2
- package/types/actions/actionZindex.d.ts +2 -2
- package/types/actions/manager.d.ts +1 -1
- package/types/clipboard.d.ts +21 -3
- package/types/components/App.d.ts +2 -3
- package/types/components/ContextMenu.d.ts +2 -1
- package/types/components/MermaidToExcalidraw.d.ts +1 -1
- package/types/components/Modal.d.ts +3 -1
- package/types/constants.d.ts +2 -0
- package/types/data/transform.d.ts +7 -3
- package/types/element/Hyperlink.d.ts +9 -3
- package/types/element/bounds.d.ts +11 -5
- package/types/element/embeddable.d.ts +8 -2
- package/types/element/linearElementEditor.d.ts +10 -3
- package/types/element/newElement.d.ts +3 -1
- package/types/element/resizeTest.d.ts +2 -1
- package/types/element/transformHandles.d.ts +2 -1
- package/types/frame.d.ts +1 -0
- package/types/hooks/useCreatePortalContainer.d.ts +6 -4
- package/types/math.d.ts +1 -0
- package/types/packages/bbox.d.ts +11 -0
- package/types/packages/excalidraw/index.d.ts +1 -0
- package/types/packages/utils.d.ts +2 -0
- package/types/packages/withinBounds.d.ts +19 -0
- package/types/scene/export.d.ts +0 -1
- package/types/types.d.ts +11 -3
- package/types/utils.d.ts +2 -0
- package/types/zindex.d.ts +4 -4
|
@@ -94,7 +94,7 @@ export declare const actionChangeFillStyle: {
|
|
|
94
94
|
name: string;
|
|
95
95
|
tab?: string | undefined;
|
|
96
96
|
} | null;
|
|
97
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
97
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
98
98
|
defaultSidebarDockedPreference: boolean;
|
|
99
99
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
100
100
|
selectedElementIds: Readonly<{
|
|
@@ -159,7 +159,13 @@ export declare const actionChangeFillStyle: {
|
|
|
159
159
|
Regular: string;
|
|
160
160
|
MajorGridFrequency?: number | undefined;
|
|
161
161
|
};
|
|
162
|
-
dynamicStyle:
|
|
162
|
+
dynamicStyle: {
|
|
163
|
+
[x: string]: string;
|
|
164
|
+
};
|
|
165
|
+
frameColor: {
|
|
166
|
+
stroke: string;
|
|
167
|
+
fill: string;
|
|
168
|
+
};
|
|
163
169
|
invertBindingBehaviour: boolean;
|
|
164
170
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
165
171
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -251,7 +257,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
251
257
|
name: string;
|
|
252
258
|
tab?: string | undefined;
|
|
253
259
|
} | null;
|
|
254
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
260
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
255
261
|
defaultSidebarDockedPreference: boolean;
|
|
256
262
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
257
263
|
selectedElementIds: Readonly<{
|
|
@@ -316,7 +322,13 @@ export declare const actionChangeStrokeWidth: {
|
|
|
316
322
|
Regular: string;
|
|
317
323
|
MajorGridFrequency?: number | undefined;
|
|
318
324
|
};
|
|
319
|
-
dynamicStyle:
|
|
325
|
+
dynamicStyle: {
|
|
326
|
+
[x: string]: string;
|
|
327
|
+
};
|
|
328
|
+
frameColor: {
|
|
329
|
+
stroke: string;
|
|
330
|
+
fill: string;
|
|
331
|
+
};
|
|
320
332
|
invertBindingBehaviour: boolean;
|
|
321
333
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
322
334
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -408,7 +420,7 @@ export declare const actionChangeSloppiness: {
|
|
|
408
420
|
name: string;
|
|
409
421
|
tab?: string | undefined;
|
|
410
422
|
} | null;
|
|
411
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
423
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
412
424
|
defaultSidebarDockedPreference: boolean;
|
|
413
425
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
414
426
|
selectedElementIds: Readonly<{
|
|
@@ -473,7 +485,13 @@ export declare const actionChangeSloppiness: {
|
|
|
473
485
|
Regular: string;
|
|
474
486
|
MajorGridFrequency?: number | undefined;
|
|
475
487
|
};
|
|
476
|
-
dynamicStyle:
|
|
488
|
+
dynamicStyle: {
|
|
489
|
+
[x: string]: string;
|
|
490
|
+
};
|
|
491
|
+
frameColor: {
|
|
492
|
+
stroke: string;
|
|
493
|
+
fill: string;
|
|
494
|
+
};
|
|
477
495
|
invertBindingBehaviour: boolean;
|
|
478
496
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
479
497
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -565,7 +583,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
565
583
|
name: string;
|
|
566
584
|
tab?: string | undefined;
|
|
567
585
|
} | null;
|
|
568
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
586
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
569
587
|
defaultSidebarDockedPreference: boolean;
|
|
570
588
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
571
589
|
selectedElementIds: Readonly<{
|
|
@@ -630,7 +648,13 @@ export declare const actionChangeStrokeStyle: {
|
|
|
630
648
|
Regular: string;
|
|
631
649
|
MajorGridFrequency?: number | undefined;
|
|
632
650
|
};
|
|
633
|
-
dynamicStyle:
|
|
651
|
+
dynamicStyle: {
|
|
652
|
+
[x: string]: string;
|
|
653
|
+
};
|
|
654
|
+
frameColor: {
|
|
655
|
+
stroke: string;
|
|
656
|
+
fill: string;
|
|
657
|
+
};
|
|
634
658
|
invertBindingBehaviour: boolean;
|
|
635
659
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
636
660
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -722,7 +746,7 @@ export declare const actionChangeOpacity: {
|
|
|
722
746
|
name: string;
|
|
723
747
|
tab?: string | undefined;
|
|
724
748
|
} | null;
|
|
725
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
749
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
726
750
|
defaultSidebarDockedPreference: boolean;
|
|
727
751
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
728
752
|
selectedElementIds: Readonly<{
|
|
@@ -787,7 +811,13 @@ export declare const actionChangeOpacity: {
|
|
|
787
811
|
Regular: string;
|
|
788
812
|
MajorGridFrequency?: number | undefined;
|
|
789
813
|
};
|
|
790
|
-
dynamicStyle:
|
|
814
|
+
dynamicStyle: {
|
|
815
|
+
[x: string]: string;
|
|
816
|
+
};
|
|
817
|
+
frameColor: {
|
|
818
|
+
stroke: string;
|
|
819
|
+
fill: string;
|
|
820
|
+
};
|
|
791
821
|
invertBindingBehaviour: boolean;
|
|
792
822
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
793
823
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -879,7 +909,7 @@ export declare const actionChangeFontSize: {
|
|
|
879
909
|
name: string;
|
|
880
910
|
tab?: string | undefined;
|
|
881
911
|
} | null;
|
|
882
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
912
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
883
913
|
defaultSidebarDockedPreference: boolean;
|
|
884
914
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
885
915
|
selectedElementIds: Readonly<{
|
|
@@ -944,7 +974,13 @@ export declare const actionChangeFontSize: {
|
|
|
944
974
|
Regular: string;
|
|
945
975
|
MajorGridFrequency?: number | undefined;
|
|
946
976
|
};
|
|
947
|
-
dynamicStyle:
|
|
977
|
+
dynamicStyle: {
|
|
978
|
+
[x: string]: string;
|
|
979
|
+
};
|
|
980
|
+
frameColor: {
|
|
981
|
+
stroke: string;
|
|
982
|
+
fill: string;
|
|
983
|
+
};
|
|
948
984
|
invertBindingBehaviour: boolean;
|
|
949
985
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
950
986
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1036,7 +1072,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
1036
1072
|
name: string;
|
|
1037
1073
|
tab?: string | undefined;
|
|
1038
1074
|
} | null;
|
|
1039
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1075
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
1040
1076
|
defaultSidebarDockedPreference: boolean;
|
|
1041
1077
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1042
1078
|
selectedElementIds: Readonly<{
|
|
@@ -1101,7 +1137,13 @@ export declare const actionDecreaseFontSize: {
|
|
|
1101
1137
|
Regular: string;
|
|
1102
1138
|
MajorGridFrequency?: number | undefined;
|
|
1103
1139
|
};
|
|
1104
|
-
dynamicStyle:
|
|
1140
|
+
dynamicStyle: {
|
|
1141
|
+
[x: string]: string;
|
|
1142
|
+
};
|
|
1143
|
+
frameColor: {
|
|
1144
|
+
stroke: string;
|
|
1145
|
+
fill: string;
|
|
1146
|
+
};
|
|
1105
1147
|
invertBindingBehaviour: boolean;
|
|
1106
1148
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1107
1149
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1193,7 +1235,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
1193
1235
|
name: string;
|
|
1194
1236
|
tab?: string | undefined;
|
|
1195
1237
|
} | null;
|
|
1196
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1238
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
1197
1239
|
defaultSidebarDockedPreference: boolean;
|
|
1198
1240
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1199
1241
|
selectedElementIds: Readonly<{
|
|
@@ -1258,7 +1300,13 @@ export declare const actionIncreaseFontSize: {
|
|
|
1258
1300
|
Regular: string;
|
|
1259
1301
|
MajorGridFrequency?: number | undefined;
|
|
1260
1302
|
};
|
|
1261
|
-
dynamicStyle:
|
|
1303
|
+
dynamicStyle: {
|
|
1304
|
+
[x: string]: string;
|
|
1305
|
+
};
|
|
1306
|
+
frameColor: {
|
|
1307
|
+
stroke: string;
|
|
1308
|
+
fill: string;
|
|
1309
|
+
};
|
|
1262
1310
|
invertBindingBehaviour: boolean;
|
|
1263
1311
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1264
1312
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1350,7 +1398,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1350
1398
|
name: string;
|
|
1351
1399
|
tab?: string | undefined;
|
|
1352
1400
|
} | null;
|
|
1353
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1401
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
1354
1402
|
defaultSidebarDockedPreference: boolean;
|
|
1355
1403
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1356
1404
|
selectedElementIds: Readonly<{
|
|
@@ -1415,7 +1463,13 @@ export declare const actionChangeFontFamily: {
|
|
|
1415
1463
|
Regular: string;
|
|
1416
1464
|
MajorGridFrequency?: number | undefined;
|
|
1417
1465
|
};
|
|
1418
|
-
dynamicStyle:
|
|
1466
|
+
dynamicStyle: {
|
|
1467
|
+
[x: string]: string;
|
|
1468
|
+
};
|
|
1469
|
+
frameColor: {
|
|
1470
|
+
stroke: string;
|
|
1471
|
+
fill: string;
|
|
1472
|
+
};
|
|
1419
1473
|
invertBindingBehaviour: boolean;
|
|
1420
1474
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1421
1475
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1507,7 +1561,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1507
1561
|
name: string;
|
|
1508
1562
|
tab?: string | undefined;
|
|
1509
1563
|
} | null;
|
|
1510
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1564
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
1511
1565
|
defaultSidebarDockedPreference: boolean;
|
|
1512
1566
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1513
1567
|
selectedElementIds: Readonly<{
|
|
@@ -1572,7 +1626,13 @@ export declare const actionChangeTextAlign: {
|
|
|
1572
1626
|
Regular: string;
|
|
1573
1627
|
MajorGridFrequency?: number | undefined;
|
|
1574
1628
|
};
|
|
1575
|
-
dynamicStyle:
|
|
1629
|
+
dynamicStyle: {
|
|
1630
|
+
[x: string]: string;
|
|
1631
|
+
};
|
|
1632
|
+
frameColor: {
|
|
1633
|
+
stroke: string;
|
|
1634
|
+
fill: string;
|
|
1635
|
+
};
|
|
1576
1636
|
invertBindingBehaviour: boolean;
|
|
1577
1637
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1578
1638
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1666,7 +1726,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1666
1726
|
name: string;
|
|
1667
1727
|
tab?: string | undefined;
|
|
1668
1728
|
} | null;
|
|
1669
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1729
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
1670
1730
|
defaultSidebarDockedPreference: boolean;
|
|
1671
1731
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1672
1732
|
selectedElementIds: Readonly<{
|
|
@@ -1731,7 +1791,13 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1731
1791
|
Regular: string;
|
|
1732
1792
|
MajorGridFrequency?: number | undefined;
|
|
1733
1793
|
};
|
|
1734
|
-
dynamicStyle:
|
|
1794
|
+
dynamicStyle: {
|
|
1795
|
+
[x: string]: string;
|
|
1796
|
+
};
|
|
1797
|
+
frameColor: {
|
|
1798
|
+
stroke: string;
|
|
1799
|
+
fill: string;
|
|
1800
|
+
};
|
|
1735
1801
|
invertBindingBehaviour: boolean;
|
|
1736
1802
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1737
1803
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1823,7 +1889,7 @@ export declare const actionChangeRoundness: {
|
|
|
1823
1889
|
name: string;
|
|
1824
1890
|
tab?: string | undefined;
|
|
1825
1891
|
} | null;
|
|
1826
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1892
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
1827
1893
|
defaultSidebarDockedPreference: boolean;
|
|
1828
1894
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1829
1895
|
selectedElementIds: Readonly<{
|
|
@@ -1888,7 +1954,13 @@ export declare const actionChangeRoundness: {
|
|
|
1888
1954
|
Regular: string;
|
|
1889
1955
|
MajorGridFrequency?: number | undefined;
|
|
1890
1956
|
};
|
|
1891
|
-
dynamicStyle:
|
|
1957
|
+
dynamicStyle: {
|
|
1958
|
+
[x: string]: string;
|
|
1959
|
+
};
|
|
1960
|
+
frameColor: {
|
|
1961
|
+
stroke: string;
|
|
1962
|
+
fill: string;
|
|
1963
|
+
};
|
|
1892
1964
|
invertBindingBehaviour: boolean;
|
|
1893
1965
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1894
1966
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -1983,7 +2055,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1983
2055
|
name: string;
|
|
1984
2056
|
tab?: string | undefined;
|
|
1985
2057
|
} | null;
|
|
1986
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
2058
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
1987
2059
|
defaultSidebarDockedPreference: boolean;
|
|
1988
2060
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1989
2061
|
selectedElementIds: Readonly<{
|
|
@@ -2048,7 +2120,13 @@ export declare const actionChangeArrowhead: {
|
|
|
2048
2120
|
Regular: string;
|
|
2049
2121
|
MajorGridFrequency?: number | undefined;
|
|
2050
2122
|
};
|
|
2051
|
-
dynamicStyle:
|
|
2123
|
+
dynamicStyle: {
|
|
2124
|
+
[x: string]: string;
|
|
2125
|
+
};
|
|
2126
|
+
frameColor: {
|
|
2127
|
+
stroke: string;
|
|
2128
|
+
fill: string;
|
|
2129
|
+
};
|
|
2052
2130
|
invertBindingBehaviour: boolean;
|
|
2053
2131
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
2054
2132
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -85,7 +85,7 @@ export declare const actionSelectAll: {
|
|
|
85
85
|
name: string;
|
|
86
86
|
tab?: string | undefined;
|
|
87
87
|
} | null;
|
|
88
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
88
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
89
89
|
defaultSidebarDockedPreference: boolean;
|
|
90
90
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
91
91
|
previousSelectedElementIds: {
|
|
@@ -143,7 +143,13 @@ export declare const actionSelectAll: {
|
|
|
143
143
|
Regular: string;
|
|
144
144
|
MajorGridFrequency?: number | undefined;
|
|
145
145
|
};
|
|
146
|
-
dynamicStyle:
|
|
146
|
+
dynamicStyle: {
|
|
147
|
+
[x: string]: string;
|
|
148
|
+
};
|
|
149
|
+
frameColor: {
|
|
150
|
+
stroke: string;
|
|
151
|
+
fill: string;
|
|
152
|
+
};
|
|
147
153
|
invertBindingBehaviour: boolean;
|
|
148
154
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
149
155
|
originSnapOffset: {
|
|
@@ -79,7 +79,7 @@ export declare const actionCopyStyles: {
|
|
|
79
79
|
name: string;
|
|
80
80
|
tab?: string | undefined;
|
|
81
81
|
} | null;
|
|
82
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
82
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
83
83
|
defaultSidebarDockedPreference: boolean;
|
|
84
84
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
85
85
|
selectedElementIds: Readonly<{
|
|
@@ -139,7 +139,13 @@ export declare const actionCopyStyles: {
|
|
|
139
139
|
Regular: string;
|
|
140
140
|
MajorGridFrequency?: number | undefined;
|
|
141
141
|
};
|
|
142
|
-
dynamicStyle:
|
|
142
|
+
dynamicStyle: {
|
|
143
|
+
[x: string]: string;
|
|
144
|
+
};
|
|
145
|
+
frameColor: {
|
|
146
|
+
stroke: string;
|
|
147
|
+
fill: string;
|
|
148
|
+
};
|
|
143
149
|
invertBindingBehaviour: boolean;
|
|
144
150
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
145
151
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -80,7 +80,7 @@ export declare const actionToggleGridMode: {
|
|
|
80
80
|
name: string;
|
|
81
81
|
tab?: string | undefined;
|
|
82
82
|
} | null;
|
|
83
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
83
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
84
84
|
defaultSidebarDockedPreference: boolean;
|
|
85
85
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
86
86
|
selectedElementIds: Readonly<{
|
|
@@ -144,7 +144,13 @@ export declare const actionToggleGridMode: {
|
|
|
144
144
|
Regular: string;
|
|
145
145
|
MajorGridFrequency?: number | undefined;
|
|
146
146
|
};
|
|
147
|
-
dynamicStyle:
|
|
147
|
+
dynamicStyle: {
|
|
148
|
+
[x: string]: string;
|
|
149
|
+
};
|
|
150
|
+
frameColor: {
|
|
151
|
+
stroke: string;
|
|
152
|
+
fill: string;
|
|
153
|
+
};
|
|
148
154
|
invertBindingBehaviour: boolean;
|
|
149
155
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
150
156
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -79,7 +79,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
79
79
|
name: string;
|
|
80
80
|
tab?: string | undefined;
|
|
81
81
|
} | null;
|
|
82
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
82
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
83
83
|
defaultSidebarDockedPreference: boolean;
|
|
84
84
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
85
85
|
selectedElementIds: Readonly<{
|
|
@@ -143,7 +143,13 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
143
143
|
Regular: string;
|
|
144
144
|
MajorGridFrequency?: number | undefined;
|
|
145
145
|
};
|
|
146
|
-
dynamicStyle:
|
|
146
|
+
dynamicStyle: {
|
|
147
|
+
[x: string]: string;
|
|
148
|
+
};
|
|
149
|
+
frameColor: {
|
|
150
|
+
stroke: string;
|
|
151
|
+
fill: string;
|
|
152
|
+
};
|
|
147
153
|
invertBindingBehaviour: boolean;
|
|
148
154
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
149
155
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -77,7 +77,7 @@ export declare const actionToggleStats: {
|
|
|
77
77
|
name: string;
|
|
78
78
|
tab?: string | undefined;
|
|
79
79
|
} | null;
|
|
80
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
80
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
81
81
|
defaultSidebarDockedPreference: boolean;
|
|
82
82
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
83
83
|
selectedElementIds: Readonly<{
|
|
@@ -141,7 +141,13 @@ export declare const actionToggleStats: {
|
|
|
141
141
|
Regular: string;
|
|
142
142
|
MajorGridFrequency?: number | undefined;
|
|
143
143
|
};
|
|
144
|
-
dynamicStyle:
|
|
144
|
+
dynamicStyle: {
|
|
145
|
+
[x: string]: string;
|
|
146
|
+
};
|
|
147
|
+
frameColor: {
|
|
148
|
+
stroke: string;
|
|
149
|
+
fill: string;
|
|
150
|
+
};
|
|
145
151
|
invertBindingBehaviour: boolean;
|
|
146
152
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
147
153
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -78,7 +78,7 @@ export declare const actionToggleViewMode: {
|
|
|
78
78
|
name: string;
|
|
79
79
|
tab?: string | undefined;
|
|
80
80
|
} | null;
|
|
81
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
81
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
82
82
|
defaultSidebarDockedPreference: boolean;
|
|
83
83
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
84
84
|
selectedElementIds: Readonly<{
|
|
@@ -142,7 +142,13 @@ export declare const actionToggleViewMode: {
|
|
|
142
142
|
Regular: string;
|
|
143
143
|
MajorGridFrequency?: number | undefined;
|
|
144
144
|
};
|
|
145
|
-
dynamicStyle:
|
|
145
|
+
dynamicStyle: {
|
|
146
|
+
[x: string]: string;
|
|
147
|
+
};
|
|
148
|
+
frameColor: {
|
|
149
|
+
stroke: string;
|
|
150
|
+
fill: string;
|
|
151
|
+
};
|
|
146
152
|
invertBindingBehaviour: boolean;
|
|
147
153
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
148
154
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -78,7 +78,7 @@ export declare const actionToggleZenMode: {
|
|
|
78
78
|
name: string;
|
|
79
79
|
tab?: string | undefined;
|
|
80
80
|
} | null;
|
|
81
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
81
|
+
openDialog: "mermaid" | "imageExport" | "help" | "jsonExport" | null;
|
|
82
82
|
defaultSidebarDockedPreference: boolean;
|
|
83
83
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
84
84
|
selectedElementIds: Readonly<{
|
|
@@ -142,7 +142,13 @@ export declare const actionToggleZenMode: {
|
|
|
142
142
|
Regular: string;
|
|
143
143
|
MajorGridFrequency?: number | undefined;
|
|
144
144
|
};
|
|
145
|
-
dynamicStyle:
|
|
145
|
+
dynamicStyle: {
|
|
146
|
+
[x: string]: string;
|
|
147
|
+
};
|
|
148
|
+
frameColor: {
|
|
149
|
+
stroke: string;
|
|
150
|
+
fill: string;
|
|
151
|
+
};
|
|
146
152
|
invertBindingBehaviour: boolean;
|
|
147
153
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
148
154
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -39,7 +39,7 @@ export declare const actionSendToBack: {
|
|
|
39
39
|
category: "element";
|
|
40
40
|
};
|
|
41
41
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
42
|
-
elements: import("../element/types").ExcalidrawElement[];
|
|
42
|
+
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
43
43
|
appState: Readonly<import("../types").AppState>;
|
|
44
44
|
commitToHistory: true;
|
|
45
45
|
};
|
|
@@ -55,7 +55,7 @@ export declare const actionBringToFront: {
|
|
|
55
55
|
category: "element";
|
|
56
56
|
};
|
|
57
57
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
58
|
-
elements: import("../element/types").ExcalidrawElement[];
|
|
58
|
+
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
59
59
|
appState: Readonly<import("../types").AppState>;
|
|
60
60
|
commitToHistory: true;
|
|
61
61
|
};
|
|
@@ -12,7 +12,7 @@ export declare class ActionManager {
|
|
|
12
12
|
registerAction(action: Action): void;
|
|
13
13
|
registerAll(actions: readonly Action[]): void;
|
|
14
14
|
handleKeyDown(event: React.KeyboardEvent | KeyboardEvent): boolean;
|
|
15
|
-
executeAction(action:
|
|
15
|
+
executeAction<T extends Action>(action: T, source?: ActionSource, value?: Parameters<T["perform"]>[2]): void;
|
|
16
16
|
/**
|
|
17
17
|
* @param data additional data sent to the PanelComponent
|
|
18
18
|
*/
|
package/types/clipboard.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
|
|
2
2
|
import { BinaryFiles } from "./types";
|
|
3
3
|
import { Spreadsheet } from "./charts";
|
|
4
|
+
import { ALLOWED_PASTE_MIME_TYPES } from "./constants";
|
|
4
5
|
export type PastedMixedContent = {
|
|
5
6
|
type: "text" | "imageUrl";
|
|
6
7
|
value: string;
|
|
@@ -14,13 +15,30 @@ export interface ClipboardData {
|
|
|
14
15
|
errorMessage?: string;
|
|
15
16
|
programmaticAPI?: boolean;
|
|
16
17
|
}
|
|
18
|
+
type AllowedPasteMimeTypes = typeof ALLOWED_PASTE_MIME_TYPES[number];
|
|
17
19
|
export declare const probablySupportsClipboardReadText: boolean;
|
|
18
20
|
export declare const probablySupportsClipboardWriteText: boolean;
|
|
19
21
|
export declare const probablySupportsClipboardBlob: boolean;
|
|
20
|
-
export declare const
|
|
22
|
+
export declare const createPasteEvent: ({ types, files, }: {
|
|
23
|
+
types?: {
|
|
24
|
+
"text/plain"?: string | undefined;
|
|
25
|
+
"text/html"?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
files?: File[] | undefined;
|
|
28
|
+
}) => ClipboardEvent;
|
|
29
|
+
export declare const serializeAsClipboardJSON: ({ elements, files, }: {
|
|
30
|
+
elements: readonly NonDeletedExcalidrawElement[];
|
|
31
|
+
files: BinaryFiles | null;
|
|
32
|
+
}) => string;
|
|
33
|
+
export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], files: BinaryFiles | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
34
|
+
export declare const readSystemClipboard: () => Promise<{
|
|
35
|
+
"text/plain"?: string | undefined;
|
|
36
|
+
"text/html"?: string | undefined;
|
|
37
|
+
}>;
|
|
21
38
|
/**
|
|
22
39
|
* Attempts to parse clipboard. Prefers system clipboard.
|
|
23
40
|
*/
|
|
24
|
-
export declare const parseClipboard: (event: ClipboardEvent
|
|
41
|
+
export declare const parseClipboard: (event: ClipboardEvent, isPlainPaste?: boolean) => Promise<ClipboardData>;
|
|
25
42
|
export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
|
|
26
|
-
export declare const copyTextToSystemClipboard: (text: string | null) => Promise<void>;
|
|
43
|
+
export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
44
|
+
export {};
|
|
@@ -246,12 +246,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
246
246
|
private onScroll;
|
|
247
247
|
private onCut;
|
|
248
248
|
private onCopy;
|
|
249
|
-
private cutAll;
|
|
250
|
-
private copyAll;
|
|
251
249
|
private static resetTapTwice;
|
|
252
250
|
private onTouchStart;
|
|
253
251
|
private onTouchEnd;
|
|
254
|
-
pasteFromClipboard: (event: ClipboardEvent
|
|
252
|
+
pasteFromClipboard: (event: ClipboardEvent) => Promise<void>;
|
|
255
253
|
addElementsFromPasteOrLibrary: (opts: {
|
|
256
254
|
elements: readonly ExcalidrawElement[];
|
|
257
255
|
files: BinaryFiles | null;
|
|
@@ -346,6 +344,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
346
344
|
}) & {
|
|
347
345
|
locked?: boolean;
|
|
348
346
|
}) => void;
|
|
347
|
+
setOpenDialog: (dialogType: AppState["openDialog"]) => void;
|
|
349
348
|
private setCursor;
|
|
350
349
|
private resetCursor;
|
|
351
350
|
/**
|
|
@@ -9,7 +9,8 @@ type ContextMenuProps = {
|
|
|
9
9
|
items: ContextMenuItems;
|
|
10
10
|
top: number;
|
|
11
11
|
left: number;
|
|
12
|
+
onClose: (callback?: () => void) => void;
|
|
12
13
|
};
|
|
13
14
|
export declare const CONTEXT_MENU_SEPARATOR = "separator";
|
|
14
|
-
export declare const ContextMenu: React.MemoExoticComponent<({ actionManager, items, top, left }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element>;
|
|
15
|
+
export declare const ContextMenu: React.MemoExoticComponent<({ actionManager, items, top, left, onClose }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element>;
|
|
15
16
|
export {};
|
|
@@ -6,7 +6,7 @@ declare const MermaidToExcalidraw: ({ selectedElements, }: {
|
|
|
6
6
|
selectedElements: readonly NonDeletedExcalidrawElement[];
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default MermaidToExcalidraw;
|
|
9
|
-
export declare const mermaidToExcalidraw: (mermaidDefinition: string, opts?: MermaidOptions) => Promise<{
|
|
9
|
+
export declare const mermaidToExcalidraw: (mermaidDefinition: string, opts?: MermaidOptions, forceSVG?: boolean) => Promise<{
|
|
10
10
|
elements: ExcalidrawElement[];
|
|
11
11
|
files: any;
|
|
12
12
|
} | undefined>;
|
package/types/constants.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ export declare const IMAGE_MIME_TYPES: {
|
|
|
125
125
|
readonly avif: "image/avif";
|
|
126
126
|
readonly jfif: "image/jfif";
|
|
127
127
|
};
|
|
128
|
+
export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html"];
|
|
128
129
|
export declare const MIME_TYPES: {
|
|
129
130
|
readonly svg: "image/svg+xml";
|
|
130
131
|
readonly png: "image/png";
|
|
@@ -223,6 +224,7 @@ export declare const ROUGHNESS: {
|
|
|
223
224
|
readonly cartoonist: 2;
|
|
224
225
|
};
|
|
225
226
|
export declare const STROKE_WIDTH: {
|
|
227
|
+
readonly extraThin: 0.5;
|
|
226
228
|
readonly thin: 1;
|
|
227
229
|
readonly bold: 2;
|
|
228
230
|
readonly extraBold: 4;
|
|
@@ -52,7 +52,7 @@ export type ValidContainer = {
|
|
|
52
52
|
verticalAlign?: VerticalAlign;
|
|
53
53
|
} & MarkOptional<ElementConstructorOpts, "x" | "y">;
|
|
54
54
|
} & ElementConstructorOpts;
|
|
55
|
-
export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, ExcalidrawEmbeddableElement | ExcalidrawFreeDrawElement
|
|
55
|
+
export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, ExcalidrawEmbeddableElement | ExcalidrawFreeDrawElement> | ({
|
|
56
56
|
type: Extract<ExcalidrawLinearElement["type"], "line">;
|
|
57
57
|
x: number;
|
|
58
58
|
y: number;
|
|
@@ -67,7 +67,11 @@ export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, Excal
|
|
|
67
67
|
x: number;
|
|
68
68
|
y: number;
|
|
69
69
|
fileId: FileId;
|
|
70
|
-
} & Partial<ExcalidrawImageElement>)
|
|
71
|
-
|
|
70
|
+
} & Partial<ExcalidrawImageElement>) | ({
|
|
71
|
+
type: "frame";
|
|
72
|
+
children: readonly ExcalidrawElement["id"][];
|
|
73
|
+
name?: string;
|
|
74
|
+
} & Partial<ExcalidrawFrameElement>);
|
|
75
|
+
export declare const convertToExcalidrawElements: (elementsSkeleton: ExcalidrawElementSkeleton[] | null, opts?: {
|
|
72
76
|
regenerateIds: boolean;
|
|
73
77
|
}) => ExcalidrawElement[];
|