@zsviczian/excalidraw 0.17.1-obsidian-39 → 0.17.1-obsidian-41
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 +63 -30
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +2 -1
- package/dist/styles.production.css +1 -1
- package/package.json +1 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +12 -9
- package/types/excalidraw/actions/actionBoundText.d.ts +8 -6
- package/types/excalidraw/actions/actionCanvas.d.ts +56 -42
- package/types/excalidraw/actions/actionClipboard.d.ts +28 -21
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +12 -9
- package/types/excalidraw/actions/actionElementLock.d.ts +8 -6
- package/types/excalidraw/actions/actionExport.d.ts +36 -27
- package/types/excalidraw/actions/actionFinalize.d.ts +8 -6
- package/types/excalidraw/actions/actionFrame.d.ts +16 -12
- package/types/excalidraw/actions/actionGroup.d.ts +8 -6
- package/types/excalidraw/actions/actionLinearEditor.d.ts +4 -3
- package/types/excalidraw/actions/actionLink.d.ts +4 -3
- package/types/excalidraw/actions/actionMenu.d.ts +12 -9
- package/types/excalidraw/actions/actionNavigate.d.ts +8 -6
- package/types/excalidraw/actions/actionProperties.d.ts +60 -45
- package/types/excalidraw/actions/actionSelectAll.d.ts +4 -3
- package/types/excalidraw/actions/actionStyles.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleStats.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -3
- package/types/excalidraw/appState.d.ts +9 -3
- package/types/excalidraw/components/App.d.ts +7 -1
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +10 -0
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +10 -0
- package/types/excalidraw/components/Stats/DragInput.d.ts +4 -1
- package/types/excalidraw/components/Stats/index.d.ts +4 -4
- package/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/types/excalidraw/constants.d.ts +2 -1
- package/types/excalidraw/element/dragElements.d.ts +2 -2
- package/types/excalidraw/element/embeddable.d.ts +4 -3
- package/types/excalidraw/element/linearElementEditor.d.ts +11 -10
- package/types/excalidraw/index.d.ts +1 -1
- package/types/excalidraw/math.d.ts +3 -2
- package/types/excalidraw/obsidianUtils.d.ts +2 -1
- package/types/excalidraw/scene/index.d.ts +1 -1
- package/types/excalidraw/scene/normalize.d.ts +4 -0
- package/types/excalidraw/scene/zoom.d.ts +0 -1
- package/types/excalidraw/snapping.d.ts +8 -7
- package/types/excalidraw/types.d.ts +13 -5
- package/types/utils/export.d.ts +1 -1
|
@@ -129,8 +129,9 @@ export declare const actionChangeFillStyle: {
|
|
|
129
129
|
} | null;
|
|
130
130
|
zenModeEnabled: boolean;
|
|
131
131
|
theme: import("../element/types").Theme;
|
|
132
|
-
gridSize: number
|
|
133
|
-
|
|
132
|
+
gridSize: number;
|
|
133
|
+
gridStep: number;
|
|
134
|
+
gridModeEnabled: boolean;
|
|
134
135
|
viewModeEnabled: boolean;
|
|
135
136
|
selectedGroupIds: {
|
|
136
137
|
[groupId: string]: boolean;
|
|
@@ -196,8 +197,8 @@ export declare const actionChangeFillStyle: {
|
|
|
196
197
|
gridColor: {
|
|
197
198
|
Bold: string;
|
|
198
199
|
Regular: string;
|
|
199
|
-
MajorGridFrequency?: number | undefined;
|
|
200
200
|
};
|
|
201
|
+
highlightSearchResult: boolean;
|
|
201
202
|
dynamicStyle: {
|
|
202
203
|
[x: string]: string;
|
|
203
204
|
};
|
|
@@ -331,8 +332,9 @@ export declare const actionChangeStrokeWidth: {
|
|
|
331
332
|
} | null;
|
|
332
333
|
zenModeEnabled: boolean;
|
|
333
334
|
theme: import("../element/types").Theme;
|
|
334
|
-
gridSize: number
|
|
335
|
-
|
|
335
|
+
gridSize: number;
|
|
336
|
+
gridStep: number;
|
|
337
|
+
gridModeEnabled: boolean;
|
|
336
338
|
viewModeEnabled: boolean;
|
|
337
339
|
selectedGroupIds: {
|
|
338
340
|
[groupId: string]: boolean;
|
|
@@ -398,8 +400,8 @@ export declare const actionChangeStrokeWidth: {
|
|
|
398
400
|
gridColor: {
|
|
399
401
|
Bold: string;
|
|
400
402
|
Regular: string;
|
|
401
|
-
MajorGridFrequency?: number | undefined;
|
|
402
403
|
};
|
|
404
|
+
highlightSearchResult: boolean;
|
|
403
405
|
dynamicStyle: {
|
|
404
406
|
[x: string]: string;
|
|
405
407
|
};
|
|
@@ -533,8 +535,9 @@ export declare const actionChangeSloppiness: {
|
|
|
533
535
|
} | null;
|
|
534
536
|
zenModeEnabled: boolean;
|
|
535
537
|
theme: import("../element/types").Theme;
|
|
536
|
-
gridSize: number
|
|
537
|
-
|
|
538
|
+
gridSize: number;
|
|
539
|
+
gridStep: number;
|
|
540
|
+
gridModeEnabled: boolean;
|
|
538
541
|
viewModeEnabled: boolean;
|
|
539
542
|
selectedGroupIds: {
|
|
540
543
|
[groupId: string]: boolean;
|
|
@@ -600,8 +603,8 @@ export declare const actionChangeSloppiness: {
|
|
|
600
603
|
gridColor: {
|
|
601
604
|
Bold: string;
|
|
602
605
|
Regular: string;
|
|
603
|
-
MajorGridFrequency?: number | undefined;
|
|
604
606
|
};
|
|
607
|
+
highlightSearchResult: boolean;
|
|
605
608
|
dynamicStyle: {
|
|
606
609
|
[x: string]: string;
|
|
607
610
|
};
|
|
@@ -735,8 +738,9 @@ export declare const actionChangeStrokeStyle: {
|
|
|
735
738
|
} | null;
|
|
736
739
|
zenModeEnabled: boolean;
|
|
737
740
|
theme: import("../element/types").Theme;
|
|
738
|
-
gridSize: number
|
|
739
|
-
|
|
741
|
+
gridSize: number;
|
|
742
|
+
gridStep: number;
|
|
743
|
+
gridModeEnabled: boolean;
|
|
740
744
|
viewModeEnabled: boolean;
|
|
741
745
|
selectedGroupIds: {
|
|
742
746
|
[groupId: string]: boolean;
|
|
@@ -802,8 +806,8 @@ export declare const actionChangeStrokeStyle: {
|
|
|
802
806
|
gridColor: {
|
|
803
807
|
Bold: string;
|
|
804
808
|
Regular: string;
|
|
805
|
-
MajorGridFrequency?: number | undefined;
|
|
806
809
|
};
|
|
810
|
+
highlightSearchResult: boolean;
|
|
807
811
|
dynamicStyle: {
|
|
808
812
|
[x: string]: string;
|
|
809
813
|
};
|
|
@@ -937,8 +941,9 @@ export declare const actionChangeOpacity: {
|
|
|
937
941
|
} | null;
|
|
938
942
|
zenModeEnabled: boolean;
|
|
939
943
|
theme: import("../element/types").Theme;
|
|
940
|
-
gridSize: number
|
|
941
|
-
|
|
944
|
+
gridSize: number;
|
|
945
|
+
gridStep: number;
|
|
946
|
+
gridModeEnabled: boolean;
|
|
942
947
|
viewModeEnabled: boolean;
|
|
943
948
|
selectedGroupIds: {
|
|
944
949
|
[groupId: string]: boolean;
|
|
@@ -1004,8 +1009,8 @@ export declare const actionChangeOpacity: {
|
|
|
1004
1009
|
gridColor: {
|
|
1005
1010
|
Bold: string;
|
|
1006
1011
|
Regular: string;
|
|
1007
|
-
MajorGridFrequency?: number | undefined;
|
|
1008
1012
|
};
|
|
1013
|
+
highlightSearchResult: boolean;
|
|
1009
1014
|
dynamicStyle: {
|
|
1010
1015
|
[x: string]: string;
|
|
1011
1016
|
};
|
|
@@ -1140,8 +1145,9 @@ export declare const actionChangeFontSize: {
|
|
|
1140
1145
|
} | null;
|
|
1141
1146
|
zenModeEnabled: boolean;
|
|
1142
1147
|
theme: import("../element/types").Theme;
|
|
1143
|
-
gridSize: number
|
|
1144
|
-
|
|
1148
|
+
gridSize: number;
|
|
1149
|
+
gridStep: number;
|
|
1150
|
+
gridModeEnabled: boolean;
|
|
1145
1151
|
viewModeEnabled: boolean;
|
|
1146
1152
|
selectedGroupIds: {
|
|
1147
1153
|
[groupId: string]: boolean;
|
|
@@ -1207,8 +1213,8 @@ export declare const actionChangeFontSize: {
|
|
|
1207
1213
|
gridColor: {
|
|
1208
1214
|
Bold: string;
|
|
1209
1215
|
Regular: string;
|
|
1210
|
-
MajorGridFrequency?: number | undefined;
|
|
1211
1216
|
};
|
|
1217
|
+
highlightSearchResult: boolean;
|
|
1212
1218
|
dynamicStyle: {
|
|
1213
1219
|
[x: string]: string;
|
|
1214
1220
|
};
|
|
@@ -1343,8 +1349,9 @@ export declare const actionDecreaseFontSize: {
|
|
|
1343
1349
|
} | null;
|
|
1344
1350
|
zenModeEnabled: boolean;
|
|
1345
1351
|
theme: import("../element/types").Theme;
|
|
1346
|
-
gridSize: number
|
|
1347
|
-
|
|
1352
|
+
gridSize: number;
|
|
1353
|
+
gridStep: number;
|
|
1354
|
+
gridModeEnabled: boolean;
|
|
1348
1355
|
viewModeEnabled: boolean;
|
|
1349
1356
|
selectedGroupIds: {
|
|
1350
1357
|
[groupId: string]: boolean;
|
|
@@ -1410,8 +1417,8 @@ export declare const actionDecreaseFontSize: {
|
|
|
1410
1417
|
gridColor: {
|
|
1411
1418
|
Bold: string;
|
|
1412
1419
|
Regular: string;
|
|
1413
|
-
MajorGridFrequency?: number | undefined;
|
|
1414
1420
|
};
|
|
1421
|
+
highlightSearchResult: boolean;
|
|
1415
1422
|
dynamicStyle: {
|
|
1416
1423
|
[x: string]: string;
|
|
1417
1424
|
};
|
|
@@ -1546,8 +1553,9 @@ export declare const actionIncreaseFontSize: {
|
|
|
1546
1553
|
} | null;
|
|
1547
1554
|
zenModeEnabled: boolean;
|
|
1548
1555
|
theme: import("../element/types").Theme;
|
|
1549
|
-
gridSize: number
|
|
1550
|
-
|
|
1556
|
+
gridSize: number;
|
|
1557
|
+
gridStep: number;
|
|
1558
|
+
gridModeEnabled: boolean;
|
|
1551
1559
|
viewModeEnabled: boolean;
|
|
1552
1560
|
selectedGroupIds: {
|
|
1553
1561
|
[groupId: string]: boolean;
|
|
@@ -1613,8 +1621,8 @@ export declare const actionIncreaseFontSize: {
|
|
|
1613
1621
|
gridColor: {
|
|
1614
1622
|
Bold: string;
|
|
1615
1623
|
Regular: string;
|
|
1616
|
-
MajorGridFrequency?: number | undefined;
|
|
1617
1624
|
};
|
|
1625
|
+
highlightSearchResult: boolean;
|
|
1618
1626
|
dynamicStyle: {
|
|
1619
1627
|
[x: string]: string;
|
|
1620
1628
|
};
|
|
@@ -1747,8 +1755,9 @@ export declare const actionChangeFontFamily: {
|
|
|
1747
1755
|
} | null;
|
|
1748
1756
|
zenModeEnabled: boolean;
|
|
1749
1757
|
theme: import("../element/types").Theme;
|
|
1750
|
-
gridSize: number
|
|
1751
|
-
|
|
1758
|
+
gridSize: number;
|
|
1759
|
+
gridStep: number;
|
|
1760
|
+
gridModeEnabled: boolean;
|
|
1752
1761
|
viewModeEnabled: boolean;
|
|
1753
1762
|
selectedGroupIds: {
|
|
1754
1763
|
[groupId: string]: boolean;
|
|
@@ -1814,8 +1823,8 @@ export declare const actionChangeFontFamily: {
|
|
|
1814
1823
|
gridColor: {
|
|
1815
1824
|
Bold: string;
|
|
1816
1825
|
Regular: string;
|
|
1817
|
-
MajorGridFrequency?: number | undefined;
|
|
1818
1826
|
};
|
|
1827
|
+
highlightSearchResult: boolean;
|
|
1819
1828
|
dynamicStyle: {
|
|
1820
1829
|
[x: string]: string;
|
|
1821
1830
|
};
|
|
@@ -1940,8 +1949,9 @@ export declare const actionChangeFontFamily: {
|
|
|
1940
1949
|
} | null;
|
|
1941
1950
|
zenModeEnabled: boolean;
|
|
1942
1951
|
theme: import("../element/types").Theme;
|
|
1943
|
-
gridSize: number
|
|
1944
|
-
|
|
1952
|
+
gridSize: number;
|
|
1953
|
+
gridStep: number;
|
|
1954
|
+
gridModeEnabled: boolean;
|
|
1945
1955
|
viewModeEnabled: boolean;
|
|
1946
1956
|
selectedGroupIds: {
|
|
1947
1957
|
[groupId: string]: boolean;
|
|
@@ -2007,8 +2017,8 @@ export declare const actionChangeFontFamily: {
|
|
|
2007
2017
|
gridColor: {
|
|
2008
2018
|
Bold: string;
|
|
2009
2019
|
Regular: string;
|
|
2010
|
-
MajorGridFrequency?: number | undefined;
|
|
2011
2020
|
};
|
|
2021
|
+
highlightSearchResult: boolean;
|
|
2012
2022
|
dynamicStyle: {
|
|
2013
2023
|
[x: string]: string;
|
|
2014
2024
|
};
|
|
@@ -2142,8 +2152,9 @@ export declare const actionChangeTextAlign: {
|
|
|
2142
2152
|
} | null;
|
|
2143
2153
|
zenModeEnabled: boolean;
|
|
2144
2154
|
theme: import("../element/types").Theme;
|
|
2145
|
-
gridSize: number
|
|
2146
|
-
|
|
2155
|
+
gridSize: number;
|
|
2156
|
+
gridStep: number;
|
|
2157
|
+
gridModeEnabled: boolean;
|
|
2147
2158
|
viewModeEnabled: boolean;
|
|
2148
2159
|
selectedGroupIds: {
|
|
2149
2160
|
[groupId: string]: boolean;
|
|
@@ -2209,8 +2220,8 @@ export declare const actionChangeTextAlign: {
|
|
|
2209
2220
|
gridColor: {
|
|
2210
2221
|
Bold: string;
|
|
2211
2222
|
Regular: string;
|
|
2212
|
-
MajorGridFrequency?: number | undefined;
|
|
2213
2223
|
};
|
|
2224
|
+
highlightSearchResult: boolean;
|
|
2214
2225
|
dynamicStyle: {
|
|
2215
2226
|
[x: string]: string;
|
|
2216
2227
|
};
|
|
@@ -2346,8 +2357,9 @@ export declare const actionChangeVerticalAlign: {
|
|
|
2346
2357
|
} | null;
|
|
2347
2358
|
zenModeEnabled: boolean;
|
|
2348
2359
|
theme: import("../element/types").Theme;
|
|
2349
|
-
gridSize: number
|
|
2350
|
-
|
|
2360
|
+
gridSize: number;
|
|
2361
|
+
gridStep: number;
|
|
2362
|
+
gridModeEnabled: boolean;
|
|
2351
2363
|
viewModeEnabled: boolean;
|
|
2352
2364
|
selectedGroupIds: {
|
|
2353
2365
|
[groupId: string]: boolean;
|
|
@@ -2413,8 +2425,8 @@ export declare const actionChangeVerticalAlign: {
|
|
|
2413
2425
|
gridColor: {
|
|
2414
2426
|
Bold: string;
|
|
2415
2427
|
Regular: string;
|
|
2416
|
-
MajorGridFrequency?: number | undefined;
|
|
2417
2428
|
};
|
|
2429
|
+
highlightSearchResult: boolean;
|
|
2418
2430
|
dynamicStyle: {
|
|
2419
2431
|
[x: string]: string;
|
|
2420
2432
|
};
|
|
@@ -2548,8 +2560,9 @@ export declare const actionChangeRoundness: {
|
|
|
2548
2560
|
} | null;
|
|
2549
2561
|
zenModeEnabled: boolean;
|
|
2550
2562
|
theme: import("../element/types").Theme;
|
|
2551
|
-
gridSize: number
|
|
2552
|
-
|
|
2563
|
+
gridSize: number;
|
|
2564
|
+
gridStep: number;
|
|
2565
|
+
gridModeEnabled: boolean;
|
|
2553
2566
|
viewModeEnabled: boolean;
|
|
2554
2567
|
selectedGroupIds: {
|
|
2555
2568
|
[groupId: string]: boolean;
|
|
@@ -2615,8 +2628,8 @@ export declare const actionChangeRoundness: {
|
|
|
2615
2628
|
gridColor: {
|
|
2616
2629
|
Bold: string;
|
|
2617
2630
|
Regular: string;
|
|
2618
|
-
MajorGridFrequency?: number | undefined;
|
|
2619
2631
|
};
|
|
2632
|
+
highlightSearchResult: boolean;
|
|
2620
2633
|
dynamicStyle: {
|
|
2621
2634
|
[x: string]: string;
|
|
2622
2635
|
};
|
|
@@ -2753,8 +2766,9 @@ export declare const actionChangeArrowhead: {
|
|
|
2753
2766
|
} | null;
|
|
2754
2767
|
zenModeEnabled: boolean;
|
|
2755
2768
|
theme: import("../element/types").Theme;
|
|
2756
|
-
gridSize: number
|
|
2757
|
-
|
|
2769
|
+
gridSize: number;
|
|
2770
|
+
gridStep: number;
|
|
2771
|
+
gridModeEnabled: boolean;
|
|
2758
2772
|
viewModeEnabled: boolean;
|
|
2759
2773
|
selectedGroupIds: {
|
|
2760
2774
|
[groupId: string]: boolean;
|
|
@@ -2820,8 +2834,8 @@ export declare const actionChangeArrowhead: {
|
|
|
2820
2834
|
gridColor: {
|
|
2821
2835
|
Bold: string;
|
|
2822
2836
|
Regular: string;
|
|
2823
|
-
MajorGridFrequency?: number | undefined;
|
|
2824
2837
|
};
|
|
2838
|
+
highlightSearchResult: boolean;
|
|
2825
2839
|
dynamicStyle: {
|
|
2826
2840
|
[x: string]: string;
|
|
2827
2841
|
};
|
|
@@ -2955,8 +2969,9 @@ export declare const actionChangeArrowType: {
|
|
|
2955
2969
|
} | null;
|
|
2956
2970
|
zenModeEnabled: boolean;
|
|
2957
2971
|
theme: import("../element/types").Theme;
|
|
2958
|
-
gridSize: number
|
|
2959
|
-
|
|
2972
|
+
gridSize: number;
|
|
2973
|
+
gridStep: number;
|
|
2974
|
+
gridModeEnabled: boolean;
|
|
2960
2975
|
viewModeEnabled: boolean;
|
|
2961
2976
|
selectedGroupIds: {
|
|
2962
2977
|
[groupId: string]: boolean;
|
|
@@ -3022,8 +3037,8 @@ export declare const actionChangeArrowType: {
|
|
|
3022
3037
|
gridColor: {
|
|
3023
3038
|
Bold: string;
|
|
3024
3039
|
Regular: string;
|
|
3025
|
-
MajorGridFrequency?: number | undefined;
|
|
3026
3040
|
};
|
|
3041
|
+
highlightSearchResult: boolean;
|
|
3027
3042
|
dynamicStyle: {
|
|
3028
3043
|
[x: string]: string;
|
|
3029
3044
|
};
|
|
@@ -116,8 +116,9 @@ export declare const actionSelectAll: {
|
|
|
116
116
|
} | null;
|
|
117
117
|
zenModeEnabled: boolean;
|
|
118
118
|
theme: import("../element/types").Theme;
|
|
119
|
-
gridSize: number
|
|
120
|
-
|
|
119
|
+
gridSize: number;
|
|
120
|
+
gridStep: number;
|
|
121
|
+
gridModeEnabled: boolean;
|
|
121
122
|
viewModeEnabled: boolean;
|
|
122
123
|
width: number;
|
|
123
124
|
height: number;
|
|
@@ -179,8 +180,8 @@ export declare const actionSelectAll: {
|
|
|
179
180
|
gridColor: {
|
|
180
181
|
Bold: string;
|
|
181
182
|
Regular: string;
|
|
182
|
-
MajorGridFrequency?: number | undefined;
|
|
183
183
|
};
|
|
184
|
+
highlightSearchResult: boolean;
|
|
184
185
|
dynamicStyle: {
|
|
185
186
|
[x: string]: string;
|
|
186
187
|
};
|
|
@@ -107,8 +107,9 @@ export declare const actionCopyStyles: {
|
|
|
107
107
|
shouldCacheIgnoreZoom: boolean;
|
|
108
108
|
zenModeEnabled: boolean;
|
|
109
109
|
theme: import("../element/types").Theme;
|
|
110
|
-
gridSize: number
|
|
111
|
-
|
|
110
|
+
gridSize: number;
|
|
111
|
+
gridStep: number;
|
|
112
|
+
gridModeEnabled: boolean;
|
|
112
113
|
viewModeEnabled: boolean;
|
|
113
114
|
selectedGroupIds: {
|
|
114
115
|
[groupId: string]: boolean;
|
|
@@ -174,8 +175,8 @@ export declare const actionCopyStyles: {
|
|
|
174
175
|
gridColor: {
|
|
175
176
|
Bold: string;
|
|
176
177
|
Regular: string;
|
|
177
|
-
MajorGridFrequency?: number | undefined;
|
|
178
178
|
};
|
|
179
|
+
highlightSearchResult: boolean;
|
|
179
180
|
dynamicStyle: {
|
|
180
181
|
[x: string]: string;
|
|
181
182
|
};
|
|
@@ -11,7 +11,7 @@ export declare const actionToggleGridMode: {
|
|
|
11
11
|
};
|
|
12
12
|
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>): {
|
|
13
13
|
appState: {
|
|
14
|
-
|
|
14
|
+
gridModeEnabled: boolean;
|
|
15
15
|
objectsSnapModeEnabled: false;
|
|
16
16
|
contextMenu: {
|
|
17
17
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -114,7 +114,8 @@ export declare const actionToggleGridMode: {
|
|
|
114
114
|
} | null;
|
|
115
115
|
zenModeEnabled: boolean;
|
|
116
116
|
theme: import("../element/types").Theme;
|
|
117
|
-
|
|
117
|
+
gridSize: number;
|
|
118
|
+
gridStep: number;
|
|
118
119
|
viewModeEnabled: boolean;
|
|
119
120
|
selectedGroupIds: {
|
|
120
121
|
[groupId: string]: boolean;
|
|
@@ -180,8 +181,8 @@ export declare const actionToggleGridMode: {
|
|
|
180
181
|
gridColor: {
|
|
181
182
|
Bold: string;
|
|
182
183
|
Regular: string;
|
|
183
|
-
MajorGridFrequency?: number | undefined;
|
|
184
184
|
};
|
|
185
|
+
highlightSearchResult: boolean;
|
|
185
186
|
dynamicStyle: {
|
|
186
187
|
[x: string]: string;
|
|
187
188
|
};
|
|
@@ -10,7 +10,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
10
10
|
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
11
11
|
appState: {
|
|
12
12
|
objectsSnapModeEnabled: boolean;
|
|
13
|
-
|
|
13
|
+
gridModeEnabled: false;
|
|
14
14
|
contextMenu: {
|
|
15
15
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
16
16
|
top: number;
|
|
@@ -112,7 +112,8 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
112
112
|
} | null;
|
|
113
113
|
zenModeEnabled: boolean;
|
|
114
114
|
theme: import("../element/types").Theme;
|
|
115
|
-
|
|
115
|
+
gridSize: number;
|
|
116
|
+
gridStep: number;
|
|
116
117
|
viewModeEnabled: boolean;
|
|
117
118
|
selectedGroupIds: {
|
|
118
119
|
[groupId: string]: boolean;
|
|
@@ -178,8 +179,8 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
178
179
|
gridColor: {
|
|
179
180
|
Bold: string;
|
|
180
181
|
Regular: string;
|
|
181
|
-
MajorGridFrequency?: number | undefined;
|
|
182
182
|
};
|
|
183
|
+
highlightSearchResult: boolean;
|
|
183
184
|
dynamicStyle: {
|
|
184
185
|
[x: string]: string;
|
|
185
186
|
};
|
|
@@ -115,8 +115,9 @@ export declare const actionToggleStats: {
|
|
|
115
115
|
} | null;
|
|
116
116
|
zenModeEnabled: boolean;
|
|
117
117
|
theme: import("../element/types").Theme;
|
|
118
|
-
gridSize: number
|
|
119
|
-
|
|
118
|
+
gridSize: number;
|
|
119
|
+
gridStep: number;
|
|
120
|
+
gridModeEnabled: boolean;
|
|
120
121
|
viewModeEnabled: boolean;
|
|
121
122
|
selectedGroupIds: {
|
|
122
123
|
[groupId: string]: boolean;
|
|
@@ -178,8 +179,8 @@ export declare const actionToggleStats: {
|
|
|
178
179
|
gridColor: {
|
|
179
180
|
Bold: string;
|
|
180
181
|
Regular: string;
|
|
181
|
-
MajorGridFrequency?: number | undefined;
|
|
182
182
|
};
|
|
183
|
+
highlightSearchResult: boolean;
|
|
183
184
|
dynamicStyle: {
|
|
184
185
|
[x: string]: string;
|
|
185
186
|
};
|
|
@@ -112,8 +112,9 @@ export declare const actionToggleViewMode: {
|
|
|
112
112
|
} | null;
|
|
113
113
|
zenModeEnabled: boolean;
|
|
114
114
|
theme: import("../element/types").Theme;
|
|
115
|
-
gridSize: number
|
|
116
|
-
|
|
115
|
+
gridSize: number;
|
|
116
|
+
gridStep: number;
|
|
117
|
+
gridModeEnabled: boolean;
|
|
117
118
|
selectedGroupIds: {
|
|
118
119
|
[groupId: string]: boolean;
|
|
119
120
|
};
|
|
@@ -178,8 +179,8 @@ export declare const actionToggleViewMode: {
|
|
|
178
179
|
gridColor: {
|
|
179
180
|
Bold: string;
|
|
180
181
|
Regular: string;
|
|
181
|
-
MajorGridFrequency?: number | undefined;
|
|
182
182
|
};
|
|
183
|
+
highlightSearchResult: boolean;
|
|
183
184
|
dynamicStyle: {
|
|
184
185
|
[x: string]: string;
|
|
185
186
|
};
|
|
@@ -111,8 +111,9 @@ export declare const actionToggleZenMode: {
|
|
|
111
111
|
duration?: number | undefined;
|
|
112
112
|
} | null;
|
|
113
113
|
theme: import("../element/types").Theme;
|
|
114
|
-
gridSize: number
|
|
115
|
-
|
|
114
|
+
gridSize: number;
|
|
115
|
+
gridStep: number;
|
|
116
|
+
gridModeEnabled: boolean;
|
|
116
117
|
viewModeEnabled: boolean;
|
|
117
118
|
selectedGroupIds: {
|
|
118
119
|
[groupId: string]: boolean;
|
|
@@ -178,8 +179,8 @@ export declare const actionToggleZenMode: {
|
|
|
178
179
|
gridColor: {
|
|
179
180
|
Bold: string;
|
|
180
181
|
Regular: string;
|
|
181
|
-
MajorGridFrequency?: number | undefined;
|
|
182
182
|
};
|
|
183
|
+
highlightSearchResult: boolean;
|
|
183
184
|
dynamicStyle: {
|
|
184
185
|
[x: string]: string;
|
|
185
186
|
};
|
|
@@ -2,6 +2,7 @@ import type { AppState, NormalizedZoomValue } from "./types";
|
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
4
|
zenModeEnabled?: boolean | undefined;
|
|
5
|
+
gridModeEnabled?: boolean | undefined;
|
|
5
6
|
objectsSnapModeEnabled?: boolean | undefined;
|
|
6
7
|
theme?: import("./element/types").Theme | undefined;
|
|
7
8
|
name?: string | null | undefined;
|
|
@@ -52,7 +53,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
52
53
|
[id: string]: true;
|
|
53
54
|
} | undefined;
|
|
54
55
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
55
|
-
gridSize?: number |
|
|
56
|
+
gridSize?: number | undefined;
|
|
57
|
+
gridStep?: number | undefined;
|
|
56
58
|
selectedGroupIds?: {
|
|
57
59
|
[groupId: string]: boolean;
|
|
58
60
|
} | undefined;
|
|
@@ -65,12 +67,16 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
65
67
|
selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
|
|
66
68
|
};
|
|
67
69
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
70
|
+
gridModeEnabled?: boolean | undefined;
|
|
68
71
|
viewBackgroundColor?: string | undefined;
|
|
69
|
-
gridSize?: number |
|
|
72
|
+
gridSize?: number | undefined;
|
|
73
|
+
gridStep?: number | undefined;
|
|
70
74
|
};
|
|
71
75
|
export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
|
|
76
|
+
gridModeEnabled?: boolean | undefined;
|
|
72
77
|
viewBackgroundColor?: string | undefined;
|
|
73
|
-
gridSize?: number |
|
|
78
|
+
gridSize?: number | undefined;
|
|
79
|
+
gridStep?: number | undefined;
|
|
74
80
|
};
|
|
75
81
|
export declare const isEraserActive: ({ activeTool, }: {
|
|
76
82
|
activeTool: AppState["activeTool"];
|
|
@@ -8,7 +8,7 @@ import { LinearElementEditor } from "../element/linearElementEditor";
|
|
|
8
8
|
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
|
|
9
9
|
import { History } from "../history";
|
|
10
10
|
import Scene from "../scene/Scene";
|
|
11
|
-
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload } from "../types";
|
|
11
|
+
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, NullableGridSize } from "../types";
|
|
12
12
|
import type { FileSystemHandle } from "../data/filesystem";
|
|
13
13
|
import { Fonts } from "../fonts";
|
|
14
14
|
import { Renderer } from "../scene/Renderer";
|
|
@@ -228,6 +228,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
228
228
|
constructor(props: AppProps);
|
|
229
229
|
private onWindowMessage;
|
|
230
230
|
private cacheEmbeddableRef;
|
|
231
|
+
/**
|
|
232
|
+
* Returns gridSize taking into account `gridModeEnabled`.
|
|
233
|
+
* If disabled, returns null.
|
|
234
|
+
*/
|
|
235
|
+
getEffectiveGridSize: () => NullableGridSize;
|
|
231
236
|
private getHTMLIFrameElement;
|
|
232
237
|
private handleEmbeddableCenterClick;
|
|
233
238
|
private isIframeLikeElementCenter;
|
|
@@ -349,6 +354,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
349
354
|
/** adds supplied files to existing files in the appState */
|
|
350
355
|
addFiles: ExcalidrawImperativeAPI["addFiles"];
|
|
351
356
|
setMobileModeAllowed: ExcalidrawImperativeAPI["setMobileModeAllowed"];
|
|
357
|
+
private debounceClearHighlightSearchResults;
|
|
352
358
|
selectElements: ExcalidrawImperativeAPI["selectElements"];
|
|
353
359
|
bringToFront: ExcalidrawImperativeAPI["bringToFront"];
|
|
354
360
|
bringForward: ExcalidrawImperativeAPI["bringForward"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type Scene from "../../scene/Scene";
|
|
2
|
+
import type { AppState } from "../../types";
|
|
3
|
+
interface PositionProps {
|
|
4
|
+
property: "gridStep";
|
|
5
|
+
scene: Scene;
|
|
6
|
+
appState: AppState;
|
|
7
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
8
|
+
}
|
|
9
|
+
declare const CanvasGrid: ({ property, scene, appState, setAppState, }: PositionProps) => JSX.Element;
|
|
10
|
+
export default CanvasGrid;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type Scene from "../../scene/Scene";
|
|
2
|
+
import type { AppState } from "../../types";
|
|
3
|
+
interface PositionProps {
|
|
4
|
+
property: "gridSize";
|
|
5
|
+
scene: Scene;
|
|
6
|
+
appState: AppState;
|
|
7
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
8
|
+
}
|
|
9
|
+
declare const CanvasGridSize: ({ property, scene, appState, setAppState, }: PositionProps) => JSX.Element;
|
|
10
|
+
export default CanvasGridSize;
|
|
@@ -14,6 +14,7 @@ export type DragInputCallbackType<P extends StatsInputProperty, E = ExcalidrawEl
|
|
|
14
14
|
nextValue?: number;
|
|
15
15
|
property: P;
|
|
16
16
|
originalAppState: AppState;
|
|
17
|
+
setInputValue: (value: number) => void;
|
|
17
18
|
}) => void;
|
|
18
19
|
interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElement> {
|
|
19
20
|
label: string | React.ReactNode;
|
|
@@ -26,6 +27,8 @@ interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElemen
|
|
|
26
27
|
property: T;
|
|
27
28
|
scene: Scene;
|
|
28
29
|
appState: AppState;
|
|
30
|
+
/** how many px you need to drag to get 1 unit change */
|
|
31
|
+
sensitivity?: number;
|
|
29
32
|
}
|
|
30
|
-
declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, }: StatsDragInputProps<T, E>) => JSX.Element | null;
|
|
33
|
+
declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, }: StatsDragInputProps<T, E>) => JSX.Element | null;
|
|
31
34
|
export default StatsDragInput;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
|
-
import type { AppState, ExcalidrawProps } from "../../types";
|
|
3
|
-
import type Scene from "../../scene/Scene";
|
|
2
|
+
import type { AppClassProperties, AppState, ExcalidrawProps } from "../../types";
|
|
4
3
|
import "./Stats.scss";
|
|
5
4
|
interface StatsProps {
|
|
6
|
-
|
|
5
|
+
app: AppClassProperties;
|
|
7
6
|
onClose: () => void;
|
|
8
7
|
renderCustomStats: ExcalidrawProps["renderCustomStats"];
|
|
9
8
|
}
|
|
@@ -27,9 +26,10 @@ export declare const Stats: {
|
|
|
27
26
|
displayName: string;
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
|
-
export declare const StatsInner: import("react").MemoExoticComponent<({
|
|
29
|
+
export declare const StatsInner: import("react").MemoExoticComponent<({ app, onClose, renderCustomStats, selectedElements, appState, sceneNonce, gridModeEnabled, }: StatsProps & {
|
|
31
30
|
sceneNonce: number;
|
|
32
31
|
selectedElements: readonly NonDeletedExcalidrawElement[];
|
|
33
32
|
appState: AppState;
|
|
33
|
+
gridModeEnabled: boolean;
|
|
34
34
|
}) => JSX.Element>;
|
|
35
35
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "../../element/types";
|
|
2
2
|
import type Scene from "../../scene/Scene";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
|
-
export type StatsInputProperty = "x" | "y" | "width" | "height" | "angle" | "fontSize";
|
|
4
|
+
export type StatsInputProperty = "x" | "y" | "width" | "height" | "angle" | "fontSize" | "gridStep" | "gridSize";
|
|
5
5
|
export declare const SMALLEST_DELTA = 0.01;
|
|
6
6
|
export declare const isPropertyEditable: (element: ExcalidrawElement, property: keyof ExcalidrawElement) => boolean;
|
|
7
7
|
export declare const getStepSizedValue: (value: number, stepSize: number) => number;
|
|
@@ -143,7 +143,8 @@ export declare const COLOR_WHITE = "#ffffff";
|
|
|
143
143
|
export declare const COLOR_CHARCOAL_BLACK = "#1e1e1e";
|
|
144
144
|
export declare const COLOR_VOICE_CALL = "#a2f1a6";
|
|
145
145
|
export declare const CANVAS_ONLY_ACTIONS: string[];
|
|
146
|
-
export declare const
|
|
146
|
+
export declare const DEFAULT_GRID_SIZE = 20;
|
|
147
|
+
export declare const DEFAULT_GRID_STEP = 5;
|
|
147
148
|
export declare const IMAGE_MIME_TYPES: {
|
|
148
149
|
readonly svg: "image/svg+xml";
|
|
149
150
|
readonly png: "image/png";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NonDeletedExcalidrawElement } from "./types";
|
|
2
|
-
import type { AppState, NormalizedZoomValue, PointerDownState } from "../types";
|
|
2
|
+
import type { AppState, NormalizedZoomValue, NullableGridSize, PointerDownState } from "../types";
|
|
3
3
|
import type Scene from "../scene/Scene";
|
|
4
4
|
export declare const dragSelectedElements: (pointerDownState: PointerDownState, _selectedElements: NonDeletedExcalidrawElement[], offset: {
|
|
5
5
|
x: number;
|
|
@@ -7,7 +7,7 @@ export declare const dragSelectedElements: (pointerDownState: PointerDownState,
|
|
|
7
7
|
}, scene: Scene, snapOffset: {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
|
-
}, gridSize:
|
|
10
|
+
}, gridSize: NullableGridSize) => void;
|
|
11
11
|
export declare const getDragOffsetXY: (selectedElements: NonDeletedExcalidrawElement[], x: number, y: number) => [number, number];
|
|
12
12
|
export declare const dragNewElement: (newElement: NonDeletedExcalidrawElement, elementType: AppState["activeTool"]["type"], originX: number, originY: number, x: number, y: number, width: number, height: number, shouldMaintainAspectRatio: boolean, shouldResizeFromCenter: boolean, zoom: NormalizedZoomValue, widthAspectRatio?: number | null, originOffset?: {
|
|
13
13
|
x: number;
|