@myoc/element 0.19.535 → 0.19.537

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.
Files changed (37) hide show
  1. package/dist/dev/index.js +41 -7
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +15 -15
  4. package/dist/types/element/src/align.d.ts +5 -1
  5. package/dist/types/excalidraw/actions/actionAlign.d.ts +191 -0
  6. package/dist/types/excalidraw/actions/actionBoundText.d.ts +6 -0
  7. package/dist/types/excalidraw/actions/actionCanvas.d.ts +18 -0
  8. package/dist/types/excalidraw/actions/actionClipboard.d.ts +6 -0
  9. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +3 -0
  10. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +9 -0
  11. package/dist/types/excalidraw/actions/actionDeselect.d.ts +3 -0
  12. package/dist/types/excalidraw/actions/actionElementLock.d.ts +6 -0
  13. package/dist/types/excalidraw/actions/actionExport.d.ts +6 -0
  14. package/dist/types/excalidraw/actions/actionFrame.d.ts +9 -0
  15. package/dist/types/excalidraw/actions/actionGroup.d.ts +6 -0
  16. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +3 -0
  17. package/dist/types/excalidraw/actions/actionLink.d.ts +3 -0
  18. package/dist/types/excalidraw/actions/actionMenu.d.ts +3 -0
  19. package/dist/types/excalidraw/actions/actionProperties.d.ts +6 -0
  20. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +3 -0
  21. package/dist/types/excalidraw/actions/actionStyles.d.ts +3 -0
  22. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +3 -0
  23. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +3 -0
  24. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +3 -0
  25. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +3 -0
  26. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -0
  27. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +3 -0
  28. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +3 -0
  29. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  30. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  31. package/dist/types/excalidraw/appState.d.ts +3 -0
  32. package/dist/types/excalidraw/data/blob.d.ts +3 -0
  33. package/dist/types/excalidraw/data/json.d.ts +3 -0
  34. package/dist/types/excalidraw/editorPreferences.d.ts +5 -2
  35. package/dist/types/excalidraw/types.d.ts +7 -0
  36. package/dist/types/excalidraw/viewport.d.ts +3 -0
  37. package/package.json +4 -4
@@ -111,6 +111,9 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
111
111
  myocSimplifiedMode: boolean;
112
112
  dontResizeLimitMBs: number;
113
113
  hideMainMenus: boolean;
114
+ alignConfiguration: {
115
+ stacking: boolean;
116
+ };
114
117
  arrangeConfiguration: {
115
118
  algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
116
119
  gap: number;
@@ -112,6 +112,9 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
112
112
  myocSimplifiedMode: boolean;
113
113
  dontResizeLimitMBs: number;
114
114
  hideMainMenus: boolean;
115
+ alignConfiguration: {
116
+ stacking: boolean;
117
+ };
115
118
  arrangeConfiguration: {
116
119
  algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
117
120
  gap: number;
@@ -1,11 +1,14 @@
1
- import type { AppState, ArrangePreferences, EditorPreferences, NormalisePreferences, SmartZoomPreferences } from "./types";
1
+ import type { AlignPreferences, AppState, ArrangePreferences, EditorPreferences, NormalisePreferences, SmartZoomPreferences } from "./types";
2
2
  export type ResolvedSmartZoomPreferences = Required<SmartZoomPreferences>;
3
+ export type ResolvedAlignPreferences = Required<AlignPreferences>;
3
4
  export type ResolvedArrangePreferences = Required<ArrangePreferences>;
4
5
  export type ResolvedNormalisePreferences = Required<NormalisePreferences>;
5
6
  export type ResolvedEditorPreferences = {
6
7
  smartZoom: ResolvedSmartZoomPreferences;
8
+ align: ResolvedAlignPreferences;
7
9
  arrange: ResolvedArrangePreferences;
8
10
  normalise: ResolvedNormalisePreferences;
9
11
  };
12
+ export declare const DEFAULT_ALIGN_PREFERENCES: ResolvedAlignPreferences;
10
13
  export declare const DEFAULT_SMART_ZOOM_PREFERENCES: ResolvedSmartZoomPreferences;
11
- export declare const getEffectiveEditorPreferences: (appState: Readonly<Pick<AppState, "arrangeConfiguration" | "normaliseConfiguration">>, editorPreferences?: EditorPreferences) => ResolvedEditorPreferences;
14
+ export declare const getEffectiveEditorPreferences: (appState: Readonly<Pick<AppState, "arrangeConfiguration" | "normaliseConfiguration"> & Partial<Pick<AppState, "alignConfiguration">>>, editorPreferences?: EditorPreferences) => ResolvedEditorPreferences;
@@ -226,12 +226,16 @@ export type ArrangePreferences = {
226
226
  algorithm?: ArrangeAlgorithms;
227
227
  gap?: number;
228
228
  };
229
+ export type AlignPreferences = {
230
+ stacking?: boolean;
231
+ };
229
232
  export type NormalisePreferences = {
230
233
  mode?: NormaliseMode;
231
234
  metric?: NormaliseMetric;
232
235
  };
233
236
  export type EditorPreferences = {
234
237
  smartZoom?: SmartZoomPreferences;
238
+ align?: AlignPreferences;
235
239
  arrange?: ArrangePreferences;
236
240
  normalise?: NormalisePreferences;
237
241
  };
@@ -283,6 +287,9 @@ export interface AppState {
283
287
  dontResizeLimitMBs: number;
284
288
  hideMainMenus: boolean;
285
289
  wheelZoomsOnDefault?: boolean;
290
+ alignConfiguration: {
291
+ stacking: boolean;
292
+ };
286
293
  arrangeConfiguration: {
287
294
  algorithm: ArrangeAlgorithms;
288
295
  gap: number;
@@ -105,6 +105,9 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
105
105
  dontResizeLimitMBs: number;
106
106
  hideMainMenus: boolean;
107
107
  wheelZoomsOnDefault?: boolean;
108
+ alignConfiguration: {
109
+ stacking: boolean;
110
+ };
108
111
  arrangeConfiguration: {
109
112
  algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
110
113
  gap: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myoc/element",
3
- "version": "0.19.535",
3
+ "version": "0.19.537",
4
4
  "type": "module",
5
5
  "types": "./dist/types/element/src/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -64,9 +64,9 @@
64
64
  "build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
65
65
  },
66
66
  "dependencies": {
67
- "@excalidraw/common": "npm:@myoc/common@0.19.535",
68
- "@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.535",
69
- "@excalidraw/math": "npm:@myoc/math@0.19.535",
67
+ "@excalidraw/common": "npm:@myoc/common@0.19.537",
68
+ "@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.537",
69
+ "@excalidraw/math": "npm:@myoc/math@0.19.537",
70
70
  "modern-gif": "2.1.0",
71
71
  "thumbhash": "0.1.1"
72
72
  }