@dwelle/excalidraw 0.6.0-rc.2 → 0.6.0-rc.3
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/README.md +1 -3
- package/dist/dev/{chunk-LCPOPWNR.js → chunk-FCTATTEX.js} +2 -2
- package/dist/dev/{chunk-NGUTX5QY.js → chunk-GPAPUEH7.js} +14 -14
- package/dist/dev/{chunk-NGUTX5QY.js.map → chunk-GPAPUEH7.js.map} +2 -2
- package/dist/dev/data/{image-2IPPJHZ4.js → image-KIZE4OBD.js} +3 -3
- package/dist/dev/index.js +170 -145
- package/dist/dev/index.js.map +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-BE2LY6VO.js → chunk-DZ7HA6XS.js} +1 -1
- package/dist/prod/{chunk-R7OERAXD.js → chunk-TQDSDB2B.js} +4 -4
- package/dist/prod/data/image-SCXWNX5A.js +1 -0
- package/dist/prod/index.js +11 -11
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +13 -13
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +13 -13
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +11 -11
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +7 -7
- package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +15 -15
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionZindex.d.ts +4 -4
- package/dist/types/excalidraw/actions/types.d.ts +2 -2
- package/dist/types/excalidraw/components/App.d.ts +12 -2
- package/dist/types/excalidraw/element/embeddable.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +1 -1
- package/dist/types/excalidraw/store.d.ts +6 -6
- package/dist/types/excalidraw/types.d.ts +2 -2
- package/package.json +2 -10
- package/dist/prod/data/image-DXJVNPGL.js +0 -1
- /package/dist/dev/{chunk-LCPOPWNR.js.map → chunk-FCTATTEX.js.map} +0 -0
- /package/dist/dev/data/{image-2IPPJHZ4.js.map → image-KIZE4OBD.js.map} +0 -0
|
@@ -11,7 +11,7 @@ export declare const actionGroup: {
|
|
|
11
11
|
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
12
12
|
appState: Readonly<AppState>;
|
|
13
13
|
elements: readonly OrderedExcalidrawElement[];
|
|
14
|
-
|
|
14
|
+
captureUpdate: "EVENTUALLY";
|
|
15
15
|
} | {
|
|
16
16
|
appState: {
|
|
17
17
|
selectedElementIds: Readonly<{
|
|
@@ -187,7 +187,7 @@ export declare const actionGroup: {
|
|
|
187
187
|
}[];
|
|
188
188
|
};
|
|
189
189
|
elements: OrderedExcalidrawElement[];
|
|
190
|
-
|
|
190
|
+
captureUpdate: "IMMEDIATELY";
|
|
191
191
|
};
|
|
192
192
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
193
193
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -205,7 +205,7 @@ export declare const actionUngroup: {
|
|
|
205
205
|
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
206
206
|
appState: Readonly<AppState>;
|
|
207
207
|
elements: readonly OrderedExcalidrawElement[];
|
|
208
|
-
|
|
208
|
+
captureUpdate: "EVENTUALLY";
|
|
209
209
|
} | {
|
|
210
210
|
appState: {
|
|
211
211
|
selectedElementIds: Readonly<{
|
|
@@ -381,7 +381,7 @@ export declare const actionUngroup: {
|
|
|
381
381
|
}[];
|
|
382
382
|
};
|
|
383
383
|
elements: OrderedExcalidrawElement[];
|
|
384
|
-
|
|
384
|
+
captureUpdate: "IMMEDIATELY";
|
|
385
385
|
};
|
|
386
386
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
387
387
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
@@ -184,7 +184,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
184
184
|
}[];
|
|
185
185
|
}[];
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
captureUpdate: "IMMEDIATELY";
|
|
188
188
|
};
|
|
189
189
|
PanelComponent: ({ appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
190
190
|
} & {
|
|
@@ -179,7 +179,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
179
179
|
}[];
|
|
180
180
|
}[];
|
|
181
181
|
};
|
|
182
|
-
|
|
182
|
+
captureUpdate: "EVENTUALLY";
|
|
183
183
|
};
|
|
184
184
|
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
185
185
|
} & {
|
|
@@ -365,7 +365,7 @@ export declare const actionToggleEditMenu: {
|
|
|
365
365
|
}[];
|
|
366
366
|
}[];
|
|
367
367
|
};
|
|
368
|
-
|
|
368
|
+
captureUpdate: "EVENTUALLY";
|
|
369
369
|
};
|
|
370
370
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
371
371
|
} & {
|
|
@@ -546,7 +546,7 @@ export declare const actionShortcuts: {
|
|
|
546
546
|
}[];
|
|
547
547
|
}[];
|
|
548
548
|
};
|
|
549
|
-
|
|
549
|
+
captureUpdate: "EVENTUALLY";
|
|
550
550
|
};
|
|
551
551
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
552
552
|
} & {
|
|
@@ -181,7 +181,7 @@ export declare const actionGoToCollaborator: {
|
|
|
181
181
|
}[];
|
|
182
182
|
}[];
|
|
183
183
|
};
|
|
184
|
-
|
|
184
|
+
captureUpdate: "EVENTUALLY";
|
|
185
185
|
} | {
|
|
186
186
|
appState: {
|
|
187
187
|
userToFollow: {
|
|
@@ -359,7 +359,7 @@ export declare const actionGoToCollaborator: {
|
|
|
359
359
|
}[];
|
|
360
360
|
}[];
|
|
361
361
|
};
|
|
362
|
-
|
|
362
|
+
captureUpdate: "EVENTUALLY";
|
|
363
363
|
};
|
|
364
364
|
PanelComponent: ({ updateData, data, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
365
365
|
} & {
|
|
@@ -201,7 +201,7 @@ export declare const actionChangeFillStyle: {
|
|
|
201
201
|
}[];
|
|
202
202
|
}[];
|
|
203
203
|
};
|
|
204
|
-
|
|
204
|
+
captureUpdate: "IMMEDIATELY";
|
|
205
205
|
};
|
|
206
206
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
207
207
|
} & {
|
|
@@ -386,7 +386,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
386
386
|
}[];
|
|
387
387
|
}[];
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
captureUpdate: "IMMEDIATELY";
|
|
390
390
|
};
|
|
391
391
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
392
392
|
} & {
|
|
@@ -571,7 +571,7 @@ export declare const actionChangeSloppiness: {
|
|
|
571
571
|
}[];
|
|
572
572
|
}[];
|
|
573
573
|
};
|
|
574
|
-
|
|
574
|
+
captureUpdate: "IMMEDIATELY";
|
|
575
575
|
};
|
|
576
576
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
577
577
|
} & {
|
|
@@ -756,7 +756,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
756
756
|
}[];
|
|
757
757
|
}[];
|
|
758
758
|
};
|
|
759
|
-
|
|
759
|
+
captureUpdate: "IMMEDIATELY";
|
|
760
760
|
};
|
|
761
761
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
762
762
|
} & {
|
|
@@ -941,7 +941,7 @@ export declare const actionChangeOpacity: {
|
|
|
941
941
|
}[];
|
|
942
942
|
}[];
|
|
943
943
|
};
|
|
944
|
-
|
|
944
|
+
captureUpdate: "IMMEDIATELY";
|
|
945
945
|
};
|
|
946
946
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
947
947
|
} & {
|
|
@@ -1126,7 +1126,7 @@ export declare const actionChangeFontSize: {
|
|
|
1126
1126
|
}[];
|
|
1127
1127
|
}[];
|
|
1128
1128
|
};
|
|
1129
|
-
|
|
1129
|
+
captureUpdate: "IMMEDIATELY";
|
|
1130
1130
|
};
|
|
1131
1131
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
1132
1132
|
} & {
|
|
@@ -1312,7 +1312,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
1312
1312
|
}[];
|
|
1313
1313
|
}[];
|
|
1314
1314
|
};
|
|
1315
|
-
|
|
1315
|
+
captureUpdate: "IMMEDIATELY";
|
|
1316
1316
|
};
|
|
1317
1317
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1318
1318
|
} & {
|
|
@@ -1498,7 +1498,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
1498
1498
|
}[];
|
|
1499
1499
|
}[];
|
|
1500
1500
|
};
|
|
1501
|
-
|
|
1501
|
+
captureUpdate: "IMMEDIATELY";
|
|
1502
1502
|
};
|
|
1503
1503
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1504
1504
|
} & {
|
|
@@ -1682,7 +1682,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1682
1682
|
}[];
|
|
1683
1683
|
}[];
|
|
1684
1684
|
};
|
|
1685
|
-
|
|
1685
|
+
captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
|
|
1686
1686
|
} | {
|
|
1687
1687
|
elements: ExcalidrawElement[];
|
|
1688
1688
|
appState: {
|
|
@@ -1858,7 +1858,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1858
1858
|
}[];
|
|
1859
1859
|
}[];
|
|
1860
1860
|
};
|
|
1861
|
-
|
|
1861
|
+
captureUpdate: "NEVER";
|
|
1862
1862
|
};
|
|
1863
1863
|
PanelComponent: ({ elements, appState, app, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
1864
1864
|
} & {
|
|
@@ -2043,7 +2043,7 @@ export declare const actionChangeTextAlign: {
|
|
|
2043
2043
|
}[];
|
|
2044
2044
|
}[];
|
|
2045
2045
|
};
|
|
2046
|
-
|
|
2046
|
+
captureUpdate: "IMMEDIATELY";
|
|
2047
2047
|
};
|
|
2048
2048
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2049
2049
|
} & {
|
|
@@ -2230,7 +2230,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
2230
2230
|
}[];
|
|
2231
2231
|
}[];
|
|
2232
2232
|
};
|
|
2233
|
-
|
|
2233
|
+
captureUpdate: "IMMEDIATELY";
|
|
2234
2234
|
};
|
|
2235
2235
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2236
2236
|
} & {
|
|
@@ -2415,7 +2415,7 @@ export declare const actionChangeRoundness: {
|
|
|
2415
2415
|
}[];
|
|
2416
2416
|
}[];
|
|
2417
2417
|
};
|
|
2418
|
-
|
|
2418
|
+
captureUpdate: "IMMEDIATELY";
|
|
2419
2419
|
};
|
|
2420
2420
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2421
2421
|
} & {
|
|
@@ -2603,7 +2603,7 @@ export declare const actionChangeArrowhead: {
|
|
|
2603
2603
|
}[];
|
|
2604
2604
|
}[];
|
|
2605
2605
|
};
|
|
2606
|
-
|
|
2606
|
+
captureUpdate: "IMMEDIATELY";
|
|
2607
2607
|
};
|
|
2608
2608
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2609
2609
|
} & {
|
|
@@ -2788,7 +2788,7 @@ export declare const actionChangeArrowType: {
|
|
|
2788
2788
|
}[];
|
|
2789
2789
|
}[];
|
|
2790
2790
|
};
|
|
2791
|
-
|
|
2791
|
+
captureUpdate: "IMMEDIATELY";
|
|
2792
2792
|
};
|
|
2793
2793
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2794
2794
|
} & {
|
|
@@ -179,7 +179,7 @@ export declare const actionCopyStyles: {
|
|
|
179
179
|
}[];
|
|
180
180
|
}[];
|
|
181
181
|
};
|
|
182
|
-
|
|
182
|
+
captureUpdate: "EVENTUALLY";
|
|
183
183
|
};
|
|
184
184
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
185
185
|
} & {
|
|
@@ -194,10 +194,10 @@ export declare const actionPasteStyles: {
|
|
|
194
194
|
};
|
|
195
195
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
|
|
196
196
|
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
197
|
-
|
|
197
|
+
captureUpdate: "EVENTUALLY";
|
|
198
198
|
} | {
|
|
199
199
|
elements: import("../element/types").OrderedExcalidrawElement[];
|
|
200
|
-
|
|
200
|
+
captureUpdate: "IMMEDIATELY";
|
|
201
201
|
};
|
|
202
202
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
203
203
|
} & {
|
|
@@ -10,7 +10,7 @@ export declare const actionTextAutoResize: {
|
|
|
10
10
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: AppClassProperties) => {
|
|
11
11
|
appState: Readonly<import("../types").AppState>;
|
|
12
12
|
elements: import("../element/types").OrderedExcalidrawElement[];
|
|
13
|
-
|
|
13
|
+
captureUpdate: "IMMEDIATELY";
|
|
14
14
|
};
|
|
15
15
|
} & {
|
|
16
16
|
keyTest?: undefined;
|
|
@@ -184,7 +184,7 @@ export declare const actionToggleGridMode: {
|
|
|
184
184
|
}[];
|
|
185
185
|
}[];
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
captureUpdate: "EVENTUALLY";
|
|
188
188
|
};
|
|
189
189
|
checked: (appState: AppState) => boolean;
|
|
190
190
|
predicate: (element: readonly import("../element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -182,7 +182,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
182
182
|
}[];
|
|
183
183
|
}[];
|
|
184
184
|
};
|
|
185
|
-
|
|
185
|
+
captureUpdate: "EVENTUALLY";
|
|
186
186
|
};
|
|
187
187
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
188
188
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -182,7 +182,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
182
182
|
}[];
|
|
183
183
|
}[];
|
|
184
184
|
};
|
|
185
|
-
|
|
185
|
+
captureUpdate: "EVENTUALLY";
|
|
186
186
|
} | {
|
|
187
187
|
appState: {
|
|
188
188
|
openSidebar: {
|
|
@@ -347,7 +347,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
347
347
|
}[];
|
|
348
348
|
}[];
|
|
349
349
|
};
|
|
350
|
-
|
|
350
|
+
captureUpdate: "EVENTUALLY";
|
|
351
351
|
};
|
|
352
352
|
checked: (appState: AppState) => boolean;
|
|
353
353
|
predicate: (element: readonly import("../element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -183,7 +183,7 @@ export declare const actionToggleStats: {
|
|
|
183
183
|
}[];
|
|
184
184
|
}[];
|
|
185
185
|
};
|
|
186
|
-
|
|
186
|
+
captureUpdate: "EVENTUALLY";
|
|
187
187
|
};
|
|
188
188
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
189
189
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -183,7 +183,7 @@ export declare const actionToggleViewMode: {
|
|
|
183
183
|
}[];
|
|
184
184
|
}[];
|
|
185
185
|
};
|
|
186
|
-
|
|
186
|
+
captureUpdate: "EVENTUALLY";
|
|
187
187
|
};
|
|
188
188
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
189
189
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -183,7 +183,7 @@ export declare const actionToggleZenMode: {
|
|
|
183
183
|
}[];
|
|
184
184
|
}[];
|
|
185
185
|
};
|
|
186
|
-
|
|
186
|
+
captureUpdate: "EVENTUALLY";
|
|
187
187
|
};
|
|
188
188
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
189
189
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -10,7 +10,7 @@ export declare const actionSendBackward: {
|
|
|
10
10
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
11
11
|
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
12
12
|
appState: Readonly<import("../types").AppState>;
|
|
13
|
-
|
|
13
|
+
captureUpdate: "IMMEDIATELY";
|
|
14
14
|
};
|
|
15
15
|
keyPriority: number;
|
|
16
16
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -29,7 +29,7 @@ export declare const actionBringForward: {
|
|
|
29
29
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
30
30
|
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
31
31
|
appState: Readonly<import("../types").AppState>;
|
|
32
|
-
|
|
32
|
+
captureUpdate: "IMMEDIATELY";
|
|
33
33
|
};
|
|
34
34
|
keyPriority: number;
|
|
35
35
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -48,7 +48,7 @@ export declare const actionSendToBack: {
|
|
|
48
48
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
49
49
|
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
50
50
|
appState: Readonly<import("../types").AppState>;
|
|
51
|
-
|
|
51
|
+
captureUpdate: "IMMEDIATELY";
|
|
52
52
|
};
|
|
53
53
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
54
54
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -66,7 +66,7 @@ export declare const actionBringToFront: {
|
|
|
66
66
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
67
67
|
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
68
68
|
appState: Readonly<import("../types").AppState>;
|
|
69
|
-
|
|
69
|
+
captureUpdate: "IMMEDIATELY";
|
|
70
70
|
};
|
|
71
71
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
72
72
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import type { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
|
|
3
3
|
import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
|
-
import type {
|
|
4
|
+
import type { CaptureUpdateActionType } from "../store";
|
|
5
5
|
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
|
|
6
6
|
/** if false, the action should be prevented */
|
|
7
7
|
export type ActionResult = {
|
|
8
8
|
elements?: readonly ExcalidrawElement[] | null;
|
|
9
9
|
appState?: Partial<AppState> | null;
|
|
10
10
|
files?: BinaryFiles | null;
|
|
11
|
-
|
|
11
|
+
captureUpdate: CaptureUpdateActionType;
|
|
12
12
|
replaceFiles?: boolean;
|
|
13
13
|
} | false;
|
|
14
14
|
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
@@ -371,8 +371,18 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
371
371
|
elements?: SceneData["elements"];
|
|
372
372
|
appState?: Pick<AppState, K> | null | undefined;
|
|
373
373
|
collaborators?: SceneData["collaborators"];
|
|
374
|
-
/**
|
|
375
|
-
|
|
374
|
+
/**
|
|
375
|
+
* Controls which updates should be captured by the `Store`. Captured updates are emmitted and listened to by other components, such as `History` for undo / redo purposes.
|
|
376
|
+
*
|
|
377
|
+
* - `CaptureUpdateAction.IMMEDIATELY`: Updates are immediately undoable. Use for most local updates.
|
|
378
|
+
* - `CaptureUpdateAction.NEVER`: Updates never make it to undo/redo stack. Use for remote updates or scene initialization.
|
|
379
|
+
* - `CaptureUpdateAction.EVENTUALLY`: Updates will be eventually be captured as part of a future increment.
|
|
380
|
+
*
|
|
381
|
+
* Check [API docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/excalidraw-api#captureUpdate) for more details.
|
|
382
|
+
*
|
|
383
|
+
* @default CaptureUpdateAction.EVENTUALLY
|
|
384
|
+
*/
|
|
385
|
+
captureUpdate?: SceneData["captureUpdate"];
|
|
376
386
|
}) => void;
|
|
377
387
|
private triggerRender;
|
|
378
388
|
/**
|
|
@@ -20,7 +20,7 @@ export { mergeLibraryItems, getLibraryItemsHash } from "./data/library";
|
|
|
20
20
|
export { isLinearElement } from "./element/typeChecks";
|
|
21
21
|
export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, } from "./constants";
|
|
22
22
|
export { mutateElement, newElementWith, bumpVersion, } from "./element/mutateElement";
|
|
23
|
-
export {
|
|
23
|
+
export { CaptureUpdateAction } from "./store";
|
|
24
24
|
export { parseLibraryTokensFromUrl, useHandleLibrary } from "./data/library";
|
|
25
25
|
export { sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, } from "./utils";
|
|
26
26
|
export { Sidebar } from "./components/Sidebar/Sidebar";
|
|
@@ -4,7 +4,7 @@ import { Emitter } from "./emitter";
|
|
|
4
4
|
import type { AppState, ObservedAppState } from "./types";
|
|
5
5
|
import type { ValueOf } from "./utility-types";
|
|
6
6
|
export declare const getObservedAppState: (appState: AppState) => ObservedAppState;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const CaptureUpdateAction: {
|
|
8
8
|
/**
|
|
9
9
|
* Immediately undoable.
|
|
10
10
|
*
|
|
@@ -13,7 +13,7 @@ export declare const StoreAction: {
|
|
|
13
13
|
*
|
|
14
14
|
* These updates will _immediately_ make it to the local undo / redo stacks.
|
|
15
15
|
*/
|
|
16
|
-
readonly
|
|
16
|
+
readonly IMMEDIATELY: "IMMEDIATELY";
|
|
17
17
|
/**
|
|
18
18
|
* Never undoable.
|
|
19
19
|
*
|
|
@@ -22,21 +22,21 @@ export declare const StoreAction: {
|
|
|
22
22
|
*
|
|
23
23
|
* These updates will _never_ make it to the local undo / redo stacks.
|
|
24
24
|
*/
|
|
25
|
-
readonly
|
|
25
|
+
readonly NEVER: "NEVER";
|
|
26
26
|
/**
|
|
27
27
|
* Eventually undoable.
|
|
28
28
|
*
|
|
29
29
|
* Use for updates which should not be captured immediately - likely
|
|
30
30
|
* exceptions which are part of some async multi-step process. Otherwise, all
|
|
31
31
|
* such updates would end up being captured with the next
|
|
32
|
-
* `
|
|
32
|
+
* `CaptureUpdateAction.IMMEDIATELY` - triggered either by the next `updateScene`
|
|
33
33
|
* or internally by the editor.
|
|
34
34
|
*
|
|
35
35
|
* These updates will _eventually_ make it to the local undo / redo stacks.
|
|
36
36
|
*/
|
|
37
|
-
readonly
|
|
37
|
+
readonly EVENTUALLY: "EVENTUALLY";
|
|
38
38
|
};
|
|
39
|
-
export type
|
|
39
|
+
export type CaptureUpdateActionType = ValueOf<typeof CaptureUpdateAction>;
|
|
40
40
|
/**
|
|
41
41
|
* Represent an increment to the Store.
|
|
42
42
|
*/
|
|
@@ -18,7 +18,7 @@ import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
|
|
|
18
18
|
import type { ContextMenuItems } from "./components/ContextMenu";
|
|
19
19
|
import type { SnapLine } from "./snapping";
|
|
20
20
|
import type { Merge, MaybePromise, ValueOf, MakeBrand } from "./utility-types";
|
|
21
|
-
import type {
|
|
21
|
+
import type { CaptureUpdateActionType } from "./store";
|
|
22
22
|
import type { UserIdleState } from "./constants";
|
|
23
23
|
export type SocketId = string & {
|
|
24
24
|
_brand: "SocketId";
|
|
@@ -479,7 +479,7 @@ export type SceneData = {
|
|
|
479
479
|
elements?: ImportedDataState["elements"];
|
|
480
480
|
appState?: ImportedDataState["appState"];
|
|
481
481
|
collaborators?: Map<SocketId, Collaborator>;
|
|
482
|
-
|
|
482
|
+
captureUpdate?: CaptureUpdateActionType;
|
|
483
483
|
};
|
|
484
484
|
export type ExportOpts = {
|
|
485
485
|
saveFileToDisk?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dwelle/excalidraw",
|
|
3
|
-
"version": "0.6.0-rc.
|
|
3
|
+
"version": "0.6.0-rc.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/excalidraw/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -85,14 +85,6 @@
|
|
|
85
85
|
"tunnel-rat": "0.1.2"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@babel/core": "7.24.5",
|
|
89
|
-
"@babel/plugin-transform-arrow-functions": "7.24.1",
|
|
90
|
-
"@babel/plugin-transform-async-to-generator": "7.24.1",
|
|
91
|
-
"@babel/plugin-transform-runtime": "7.24.3",
|
|
92
|
-
"@babel/plugin-transform-typescript": "7.24.5",
|
|
93
|
-
"@babel/preset-env": "7.24.5",
|
|
94
|
-
"@babel/preset-react": "7.24.1",
|
|
95
|
-
"@babel/preset-typescript": "7.24.1",
|
|
96
88
|
"@size-limit/preset-big-lib": "9.0.0",
|
|
97
89
|
"@testing-library/dom": "10.4.0",
|
|
98
90
|
"@testing-library/jest-dom": "6.6.3",
|
|
@@ -103,7 +95,6 @@
|
|
|
103
95
|
"@types/resize-observer-browser": "0.1.7",
|
|
104
96
|
"ansicolor": "2.0.3",
|
|
105
97
|
"autoprefixer": "10.4.7",
|
|
106
|
-
"babel-plugin-transform-class-properties": "6.24.1",
|
|
107
98
|
"cross-env": "7.0.3",
|
|
108
99
|
"dotenv": "16.0.1",
|
|
109
100
|
"esbuild": "0.19.10",
|
|
@@ -115,6 +106,7 @@
|
|
|
115
106
|
"jest-diff": "29.7.0",
|
|
116
107
|
"typescript": "4.9.4"
|
|
117
108
|
},
|
|
109
|
+
"repository": "https://github.com/excalidraw/excalidraw",
|
|
118
110
|
"bugs": "https://github.com/excalidraw/excalidraw/issues",
|
|
119
111
|
"homepage": "https://github.com/excalidraw/excalidraw/tree/master/src/packages/excalidraw",
|
|
120
112
|
"repository": "https://github.com/dwelle/excalidraw",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qh as a,rh as b,sh as c}from"../chunk-R7OERAXD.js";import"../chunk-BE2LY6VO.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};
|
|
File without changes
|
|
File without changes
|