@myoc/math 0.19.518 → 0.19.520

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 (63) hide show
  1. package/dist/types/common/src/colors.d.ts +1 -1
  2. package/dist/types/common/src/constants.d.ts +8 -5
  3. package/dist/types/common/src/utils.d.ts +0 -42
  4. package/dist/types/element/src/bounds.d.ts +18 -1
  5. package/dist/types/element/src/comparisons.d.ts +1 -0
  6. package/dist/types/element/src/image.d.ts +5 -0
  7. package/dist/types/element/src/newElement.d.ts +2 -0
  8. package/dist/types/element/src/types.d.ts +8 -0
  9. package/dist/types/excalidraw/actions/actionBoundText.d.ts +6 -2
  10. package/dist/types/excalidraw/actions/actionCanvas.d.ts +33 -11
  11. package/dist/types/excalidraw/actions/actionClipboard.d.ts +6 -2
  12. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +3 -1
  13. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +9 -3
  14. package/dist/types/excalidraw/actions/actionDeselect.d.ts +3 -1
  15. package/dist/types/excalidraw/actions/actionElementLink.d.ts +3 -1
  16. package/dist/types/excalidraw/actions/actionElementLock.d.ts +6 -2
  17. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +3 -1
  18. package/dist/types/excalidraw/actions/actionExport.d.ts +6 -2
  19. package/dist/types/excalidraw/actions/actionFrame.d.ts +14 -4
  20. package/dist/types/excalidraw/actions/actionGroup.d.ts +6 -2
  21. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +5 -1
  22. package/dist/types/excalidraw/actions/actionLink.d.ts +3 -1
  23. package/dist/types/excalidraw/actions/actionMenu.d.ts +3 -1
  24. package/dist/types/excalidraw/actions/actionProperties.d.ts +18 -5
  25. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +3 -1
  26. package/dist/types/excalidraw/actions/actionStyles.d.ts +3 -1
  27. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +3 -1
  28. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +3 -1
  29. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +3 -1
  30. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +3 -1
  31. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -1
  32. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +3 -1
  33. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +5 -3
  34. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +3 -1
  35. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  36. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  37. package/dist/types/excalidraw/appState.d.ts +2 -1
  38. package/dist/types/excalidraw/components/App.d.ts +13 -28
  39. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  40. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
  41. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  42. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  43. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  44. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  45. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +2 -1
  46. package/dist/types/excalidraw/components/icons.d.ts +2 -0
  47. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +7 -4
  48. package/dist/types/excalidraw/data/blob.d.ts +3 -1
  49. package/dist/types/excalidraw/data/json.d.ts +3 -1
  50. package/dist/types/excalidraw/renderer/animation.d.ts +1 -0
  51. package/dist/types/excalidraw/scene/Renderer.d.ts +2 -0
  52. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  53. package/dist/types/excalidraw/scene/types.d.ts +1 -0
  54. package/dist/types/excalidraw/scroll.d.ts +46 -0
  55. package/dist/types/excalidraw/types.d.ts +24 -3
  56. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  57. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  58. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  59. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  60. package/dist/types/utils/src/index.d.ts +1 -2
  61. package/package.json +2 -2
  62. package/dist/types/utils/src/bbox.d.ts +0 -9
  63. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,4 +1,4 @@
1
- export declare const applyDarkModeFilter: (color: string) => string;
1
+ export declare const applyDarkModeFilter: (color: string, enable?: boolean) => string;
2
2
  export type ColorTuple = readonly [string, string, string, string, string];
3
3
  export type ColorPaletteCustom = {
4
4
  [key: string]: ColorTuple | string;
@@ -264,11 +264,12 @@ export declare const ROUGHNESS: {
264
264
  readonly artist: 1;
265
265
  readonly cartoonist: 2;
266
266
  };
267
- export declare const STROKE_WIDTH: {
268
- readonly thin: 1;
269
- readonly bold: 2;
270
- readonly extraBold: 4;
271
- };
267
+ export type StrokeWidthKey = "thin" | "medium" | "bold";
268
+ export declare const STROKE_WIDTH_KEYS: readonly StrokeWidthKey[];
269
+ export declare const STROKE_WIDTH: Readonly<Record<StrokeWidthKey | "extraBold", ExcalidrawElement["strokeWidth"]>>;
270
+ export declare const FREEDRAW_STROKE_WIDTH: Readonly<Record<StrokeWidthKey | "extraBold", ExcalidrawElement["strokeWidth"]>>;
271
+ export declare const getStrokeWidthByKey: (elementType: ExcalidrawElement["type"], strokeWidthKey: StrokeWidthKey) => ExcalidrawElement["strokeWidth"];
272
+ export declare const DEFAULT_ELEMENT_STROKE_WIDTH_KEY: StrokeWidthKey;
272
273
  export declare const DEFAULT_ELEMENT_PROPS: {
273
274
  strokeColor: ExcalidrawElement["strokeColor"];
274
275
  backgroundColor: ExcalidrawElement["backgroundColor"];
@@ -339,3 +340,5 @@ export declare const BIND_MODE_TIMEOUT = 700;
339
340
  export declare const MOBILE_ACTION_BUTTON_BG: {
340
341
  readonly background: "var(--mobile-action-button-bg)";
341
342
  };
343
+ export declare const DEFAULT_STROKE_STREAMLINE = 0.5;
344
+ export declare const DEFAULT_STROKE_STREAMLINE_PRECISE = 0.2;
@@ -37,48 +37,6 @@ export declare const throttleRAF: <T extends any[]>(fn: (...args: T) => void) =>
37
37
  * @returns {number} The tweened value.
38
38
  */
39
39
  export declare const easeOut: (k: number) => number;
40
- /**
41
- * Animates values from `fromValues` to `toValues` using the requestAnimationFrame API.
42
- * Executes the `onStep` callback on each step with the interpolated values.
43
- * Returns a function that can be called to cancel the animation.
44
- *
45
- * @example
46
- * // Example usage:
47
- * const fromValues = { x: 0, y: 0 };
48
- * const toValues = { x: 100, y: 200 };
49
- * const onStep = ({x, y}) => {
50
- * setState(x, y)
51
- * };
52
- * const onCancel = () => {
53
- * console.log("Animation canceled");
54
- * };
55
- *
56
- * const cancelAnimation = easeToValuesRAF({
57
- * fromValues,
58
- * toValues,
59
- * onStep,
60
- * onCancel,
61
- * });
62
- *
63
- * // To cancel the animation:
64
- * cancelAnimation();
65
- */
66
- export declare const easeToValuesRAF: <T extends Record<keyof T, number>, K extends keyof T>({ fromValues, toValues, onStep, duration, interpolateValue, onStart, onEnd, onCancel, }: {
67
- fromValues: T;
68
- toValues: T;
69
- /**
70
- * Interpolate a single value.
71
- * Return undefined to be handled by the default interpolator.
72
- */
73
- interpolateValue?: (fromValue: number, toValue: number,
74
- /** no easing applied */
75
- progress: number, key: K) => number | undefined;
76
- onStep: (values: T) => void;
77
- duration?: number;
78
- onStart?: () => void;
79
- onEnd?: () => void;
80
- onCancel?: () => void;
81
- }) => () => void;
82
40
  export declare const chunk: <T extends any>(array: readonly T[], size: number) => T[][];
83
41
  export declare const selectNode: (node: Element) => void;
84
42
  export declare const removeSelection: () => void;
@@ -2,7 +2,7 @@ import { type Bounds } from "@excalidraw/common";
2
2
  import type { Degrees, GlobalPoint, LineSegment, LocalPoint } from "@excalidraw/math";
3
3
  import type { AppState } from "@excalidraw/excalidraw/types";
4
4
  import type { Drawable, Op } from "roughjs/bin/core";
5
- import type { Arrowhead, ElementsMap, ElementsMapOrArray, ExcalidrawElement, ExcalidrawLinearElement, NonDeleted } from "./types";
5
+ import type { Arrowhead, ElementsMap, ElementsMapOrArray, ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement } from "./types";
6
6
  export type RectangleBox = {
7
7
  x: number;
8
8
  y: number;
@@ -80,4 +80,21 @@ export declare const pointInsideBounds: <P extends GlobalPoint | LocalPoint>(p:
80
80
  export declare const pointInsideBoundsInclusive: <P extends GlobalPoint | LocalPoint>(p: P, bounds: Bounds) => boolean;
81
81
  export declare const doBoundsIntersect: (bounds1: Bounds | null, bounds2: Bounds | null) => boolean;
82
82
  export declare const boundsContainBounds: (outerBounds: Bounds, innerBounds: Bounds) => boolean;
83
+ /**
84
+ * High level helper to get elements overlapping a bounding box.
85
+ * It can be used to get elements overlapping a selection box, for example.
86
+ *
87
+ */
88
+ export declare const elementsOverlappingBBox: ({ elements, elementsMap, bounds, type, excludeElementsInFrames, shouldIgnoreElementFromSelection, }: {
89
+ elements: readonly NonDeletedExcalidrawElement[];
90
+ elementsMap?: ElementsMap;
91
+ bounds: Bounds | ExcalidrawElement;
92
+ /**
93
+ * - overlap: elements overlapping or inside bounds
94
+ * - contain: elements inside bounds
95
+ **/
96
+ type: "contain" | "overlap";
97
+ excludeElementsInFrames?: boolean;
98
+ shouldIgnoreElementFromSelection?: (element: NonDeletedExcalidrawElement) => boolean;
99
+ }) => NonDeletedExcalidrawElement[];
83
100
  export declare const elementCenterPoint: (element: ExcalidrawElement, elementsMap: ElementsMap, xOffset?: number, yOffset?: number) => GlobalPoint;
@@ -3,6 +3,7 @@ export declare const hasBackground: (type: ElementOrToolType) => type is "line"
3
3
  export declare const hasStrokeColor: (type: ElementOrToolType) => type is "line" | "arrow" | "text" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "freedraw";
4
4
  export declare const hasStrokeWidth: (type: ElementOrToolType) => type is "line" | "arrow" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "iframe" | "freedraw";
5
5
  export declare const hasStrokeStyle: (type: ElementOrToolType) => type is "line" | "arrow" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "iframe";
6
+ export declare const hasFreedrawMode: (type: ElementOrToolType) => type is "freedraw";
6
7
  export declare const canChangeRoundness: (type: ElementOrToolType) => type is "line" | "rectangle" | "diamond" | "embeddable" | "iframe" | "image";
7
8
  export declare const toolIsArrow: (type: ElementOrToolType) => type is "arrow";
8
9
  export declare const canHaveArrowheads: (type: ElementOrToolType) => type is "arrow";
@@ -1,5 +1,7 @@
1
1
  import type { AppClassProperties, DataURL, BinaryFiles } from "@excalidraw/excalidraw/types";
2
2
  import type { ExcalidrawElement, FileId, InitializedExcalidrawImageElement } from "./types";
3
+ export declare const generateThumbHash: (image: HTMLImageElement) => string | null;
4
+ export declare const getThumbHashPlaceholder: (thumbHash: string) => HTMLCanvasElement | null;
3
5
  export declare const loadHTMLImageElement: (dataURL: DataURL) => Promise<HTMLImageElement>;
4
6
  /** NOTE: updates cache even if already populated with given image. Thus,
5
7
  * you should filter out the images upstream if you want to optimize this. */
@@ -11,6 +13,9 @@ export declare const updateImageCache: ({ fileIds, files, imageCache, }: {
11
13
  imageCache: Map<FileId, {
12
14
  image: HTMLImageElement | Promise<HTMLImageElement>;
13
15
  mimeType: import("@excalidraw/common/utility-types").ValueOf<typeof import("@excalidraw/common").IMAGE_MIME_TYPES>;
16
+ isPlaceholder?: boolean;
17
+ placeholderImage?: HTMLImageElement;
18
+ transitionStart?: number;
14
19
  }>;
15
20
  /** includes errored files because they cache was updated nonetheless */
16
21
  updatedFiles: Map<FileId, true>;
@@ -38,6 +38,7 @@ export declare const newFreeDrawElement: (opts: {
38
38
  type: "freedraw";
39
39
  points?: ExcalidrawFreeDrawElement["points"];
40
40
  simulatePressure: boolean;
41
+ strokeOptions?: ExcalidrawFreeDrawElement["strokeOptions"];
41
42
  pressures?: ExcalidrawFreeDrawElement["pressures"];
42
43
  } & ElementConstructorOpts) => NonDeleted<ExcalidrawFreeDrawElement>;
43
44
  export declare const newLinearElement: (opts: {
@@ -58,6 +59,7 @@ export declare const newImageElement: (opts: {
58
59
  status?: ExcalidrawImageElement["status"];
59
60
  fileId?: ExcalidrawImageElement["fileId"];
60
61
  fileName?: ExcalidrawImageElement["fileName"];
62
+ thumbHash?: ExcalidrawImageElement["thumbHash"];
61
63
  scale?: ExcalidrawImageElement["scale"];
62
64
  crop?: ExcalidrawImageElement["crop"];
63
65
  } & ElementConstructorOpts) => NonDeleted<ExcalidrawImageElement>;
@@ -130,6 +130,8 @@ export type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
130
130
  type: "image";
131
131
  fileId: FileId | null;
132
132
  fileName: string | null;
133
+ /** compact base64-encoded ThumbHash used while the image is unavailable */
134
+ thumbHash: string | null;
133
135
  /** whether respective file is persisted */
134
136
  status: "pending" | "saved" | "error";
135
137
  /** X and Y scale factors <-1, 1>, used for image axis flipping */
@@ -256,11 +258,17 @@ export type ExcalidrawElbowArrowElement = Merge<ExcalidrawArrowElement, {
256
258
  */
257
259
  endIsSpecial: boolean | null;
258
260
  }>;
261
+ export type StrokeVariability = "variable" | "constant";
262
+ export type StrokeOptions = Readonly<{
263
+ variability: StrokeVariability;
264
+ streamline: number;
265
+ }>;
259
266
  export type ExcalidrawFreeDrawElement = _ExcalidrawElementBase & Readonly<{
260
267
  type: "freedraw";
261
268
  points: readonly LocalPoint[];
262
269
  pressures: readonly number[];
263
270
  simulatePressure: boolean;
271
+ strokeOptions: StrokeOptions;
264
272
  }>;
265
273
  export type FileId = string & {
266
274
  _brand: "FileId";
@@ -93,9 +93,10 @@ export declare const actionBindText: {
93
93
  currentItemStrokeColor: string;
94
94
  currentItemBackgroundColor: string;
95
95
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
96
- currentItemStrokeWidth: number;
96
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
97
97
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
98
98
  currentItemRoughness: number;
99
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
99
100
  currentItemOpacity: number;
100
101
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
101
102
  currentItemFontSize: number;
@@ -153,6 +154,7 @@ export declare const actionBindText: {
153
154
  gridStep: number;
154
155
  gridModeEnabled: boolean;
155
156
  viewModeEnabled: boolean;
157
+ viewModeOnly: boolean;
156
158
  selectedGroupIds: {
157
159
  [groupId: string]: boolean;
158
160
  };
@@ -271,9 +273,10 @@ export declare const actionWrapTextInContainer: {
271
273
  currentItemStrokeColor: string;
272
274
  currentItemBackgroundColor: string;
273
275
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
274
- currentItemStrokeWidth: number;
276
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
275
277
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
276
278
  currentItemRoughness: number;
279
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
277
280
  currentItemOpacity: number;
278
281
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
279
282
  currentItemFontSize: number;
@@ -331,6 +334,7 @@ export declare const actionWrapTextInContainer: {
331
334
  gridStep: number;
332
335
  gridModeEnabled: boolean;
333
336
  viewModeEnabled: boolean;
337
+ viewModeOnly: boolean;
334
338
  selectedGroupIds: {
335
339
  [groupId: string]: boolean;
336
340
  };
@@ -84,9 +84,10 @@ export declare const actionZoomIn: {
84
84
  currentItemStrokeColor: string;
85
85
  currentItemBackgroundColor: string;
86
86
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
87
- currentItemStrokeWidth: number;
87
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
88
88
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
89
89
  currentItemRoughness: number;
90
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
90
91
  currentItemOpacity: number;
91
92
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
92
93
  currentItemFontSize: number;
@@ -144,6 +145,7 @@ export declare const actionZoomIn: {
144
145
  gridStep: number;
145
146
  gridModeEnabled: boolean;
146
147
  viewModeEnabled: boolean;
148
+ viewModeOnly: boolean;
147
149
  selectedGroupIds: {
148
150
  [groupId: string]: boolean;
149
151
  };
@@ -266,9 +268,10 @@ export declare const actionZoomOut: {
266
268
  currentItemStrokeColor: string;
267
269
  currentItemBackgroundColor: string;
268
270
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
269
- currentItemStrokeWidth: number;
271
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
270
272
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
271
273
  currentItemRoughness: number;
274
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
272
275
  currentItemOpacity: number;
273
276
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
274
277
  currentItemFontSize: number;
@@ -326,6 +329,7 @@ export declare const actionZoomOut: {
326
329
  gridStep: number;
327
330
  gridModeEnabled: boolean;
328
331
  viewModeEnabled: boolean;
332
+ viewModeOnly: boolean;
329
333
  selectedGroupIds: {
330
334
  [groupId: string]: boolean;
331
335
  };
@@ -448,9 +452,10 @@ export declare const actionResetZoom: {
448
452
  currentItemStrokeColor: string;
449
453
  currentItemBackgroundColor: string;
450
454
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
451
- currentItemStrokeWidth: number;
455
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
452
456
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
453
457
  currentItemRoughness: number;
458
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
454
459
  currentItemOpacity: number;
455
460
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
456
461
  currentItemFontSize: number;
@@ -508,6 +513,7 @@ export declare const actionResetZoom: {
508
513
  gridStep: number;
509
514
  gridModeEnabled: boolean;
510
515
  viewModeEnabled: boolean;
516
+ viewModeOnly: boolean;
511
517
  selectedGroupIds: {
512
518
  [groupId: string]: boolean;
513
519
  };
@@ -631,9 +637,10 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
631
637
  currentItemStrokeColor: string;
632
638
  currentItemBackgroundColor: string;
633
639
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
634
- currentItemStrokeWidth: number;
640
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
635
641
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
636
642
  currentItemRoughness: number;
643
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
637
644
  currentItemOpacity: number;
638
645
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
639
646
  currentItemFontSize: number;
@@ -691,6 +698,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
691
698
  gridStep: number;
692
699
  gridModeEnabled: boolean;
693
700
  viewModeEnabled: boolean;
701
+ viewModeOnly: boolean;
694
702
  selectedGroupIds: {
695
703
  [groupId: string]: boolean;
696
704
  };
@@ -810,9 +818,10 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
810
818
  currentItemStrokeColor: string;
811
819
  currentItemBackgroundColor: string;
812
820
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
813
- currentItemStrokeWidth: number;
821
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
814
822
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
815
823
  currentItemRoughness: number;
824
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
816
825
  currentItemOpacity: number;
817
826
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
818
827
  currentItemFontSize: number;
@@ -870,6 +879,7 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
870
879
  gridStep: number;
871
880
  gridModeEnabled: boolean;
872
881
  viewModeEnabled: boolean;
882
+ viewModeOnly: boolean;
873
883
  selectedGroupIds: {
874
884
  [groupId: string]: boolean;
875
885
  };
@@ -986,9 +996,10 @@ export declare const actionZoomToFitSelectionInViewport: {
986
996
  currentItemStrokeColor: string;
987
997
  currentItemBackgroundColor: string;
988
998
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
989
- currentItemStrokeWidth: number;
999
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
990
1000
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
991
1001
  currentItemRoughness: number;
1002
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
992
1003
  currentItemOpacity: number;
993
1004
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
994
1005
  currentItemFontSize: number;
@@ -1046,6 +1057,7 @@ export declare const actionZoomToFitSelectionInViewport: {
1046
1057
  gridStep: number;
1047
1058
  gridModeEnabled: boolean;
1048
1059
  viewModeEnabled: boolean;
1060
+ viewModeOnly: boolean;
1049
1061
  selectedGroupIds: {
1050
1062
  [groupId: string]: boolean;
1051
1063
  };
@@ -1166,9 +1178,10 @@ export declare const actionZoomToFitSelection: {
1166
1178
  currentItemStrokeColor: string;
1167
1179
  currentItemBackgroundColor: string;
1168
1180
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1169
- currentItemStrokeWidth: number;
1181
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1170
1182
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1171
1183
  currentItemRoughness: number;
1184
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1172
1185
  currentItemOpacity: number;
1173
1186
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1174
1187
  currentItemFontSize: number;
@@ -1226,6 +1239,7 @@ export declare const actionZoomToFitSelection: {
1226
1239
  gridStep: number;
1227
1240
  gridModeEnabled: boolean;
1228
1241
  viewModeEnabled: boolean;
1242
+ viewModeOnly: boolean;
1229
1243
  selectedGroupIds: {
1230
1244
  [groupId: string]: boolean;
1231
1245
  };
@@ -1347,9 +1361,10 @@ export declare const actionZoomToFit: {
1347
1361
  currentItemStrokeColor: string;
1348
1362
  currentItemBackgroundColor: string;
1349
1363
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1350
- currentItemStrokeWidth: number;
1364
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1351
1365
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1352
1366
  currentItemRoughness: number;
1367
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1353
1368
  currentItemOpacity: number;
1354
1369
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1355
1370
  currentItemFontSize: number;
@@ -1407,6 +1422,7 @@ export declare const actionZoomToFit: {
1407
1422
  gridStep: number;
1408
1423
  gridModeEnabled: boolean;
1409
1424
  viewModeEnabled: boolean;
1425
+ viewModeOnly: boolean;
1410
1426
  selectedGroupIds: {
1411
1427
  [groupId: string]: boolean;
1412
1428
  };
@@ -1523,9 +1539,10 @@ export declare const actionToggleEraserTool: {
1523
1539
  currentItemStrokeColor: string;
1524
1540
  currentItemBackgroundColor: string;
1525
1541
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1526
- currentItemStrokeWidth: number;
1542
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1527
1543
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1528
1544
  currentItemRoughness: number;
1545
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1529
1546
  currentItemOpacity: number;
1530
1547
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1531
1548
  currentItemFontSize: number;
@@ -1583,6 +1600,7 @@ export declare const actionToggleEraserTool: {
1583
1600
  gridStep: number;
1584
1601
  gridModeEnabled: boolean;
1585
1602
  viewModeEnabled: boolean;
1603
+ viewModeOnly: boolean;
1586
1604
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
1587
1605
  width: number;
1588
1606
  height: number;
@@ -1695,9 +1713,10 @@ export declare const actionToggleLassoTool: {
1695
1713
  currentItemStrokeColor: string;
1696
1714
  currentItemBackgroundColor: string;
1697
1715
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1698
- currentItemStrokeWidth: number;
1716
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1699
1717
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1700
1718
  currentItemRoughness: number;
1719
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1701
1720
  currentItemOpacity: number;
1702
1721
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1703
1722
  currentItemFontSize: number;
@@ -1755,6 +1774,7 @@ export declare const actionToggleLassoTool: {
1755
1774
  gridStep: number;
1756
1775
  gridModeEnabled: boolean;
1757
1776
  viewModeEnabled: boolean;
1777
+ viewModeOnly: boolean;
1758
1778
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
1759
1779
  width: number;
1760
1780
  height: number;
@@ -1866,9 +1886,10 @@ export declare const actionToggleHandTool: {
1866
1886
  currentItemStrokeColor: string;
1867
1887
  currentItemBackgroundColor: string;
1868
1888
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
1869
- currentItemStrokeWidth: number;
1889
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1870
1890
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
1871
1891
  currentItemRoughness: number;
1892
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1872
1893
  currentItemOpacity: number;
1873
1894
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1874
1895
  currentItemFontSize: number;
@@ -1926,6 +1947,7 @@ export declare const actionToggleHandTool: {
1926
1947
  gridStep: number;
1927
1948
  gridModeEnabled: boolean;
1928
1949
  viewModeEnabled: boolean;
1950
+ viewModeOnly: boolean;
1929
1951
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
1930
1952
  width: number;
1931
1953
  height: number;
@@ -74,9 +74,10 @@ export declare const actionPaste: {
74
74
  currentItemStrokeColor: string;
75
75
  currentItemBackgroundColor: string;
76
76
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
77
- currentItemStrokeWidth: number;
77
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
78
78
  currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
79
79
  currentItemRoughness: number;
80
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
80
81
  currentItemOpacity: number;
81
82
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
82
83
  currentItemFontSize: number;
@@ -137,6 +138,7 @@ export declare const actionPaste: {
137
138
  gridStep: number;
138
139
  gridModeEnabled: boolean;
139
140
  viewModeEnabled: boolean;
141
+ viewModeOnly: boolean;
140
142
  selectedGroupIds: {
141
143
  [groupId: string]: boolean;
142
144
  };
@@ -290,9 +292,10 @@ export declare const actionCopyAsPng: {
290
292
  currentItemStrokeColor: string;
291
293
  currentItemBackgroundColor: string;
292
294
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
293
- currentItemStrokeWidth: number;
295
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
294
296
  currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
295
297
  currentItemRoughness: number;
298
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
296
299
  currentItemOpacity: number;
297
300
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
298
301
  currentItemFontSize: number;
@@ -353,6 +356,7 @@ export declare const actionCopyAsPng: {
353
356
  gridStep: number;
354
357
  gridModeEnabled: boolean;
355
358
  viewModeEnabled: boolean;
359
+ viewModeOnly: boolean;
356
360
  selectedGroupIds: {
357
361
  [groupId: string]: boolean;
358
362
  };
@@ -75,9 +75,10 @@ export declare const actionToggleCropEditor: {
75
75
  currentItemStrokeColor: string;
76
76
  currentItemBackgroundColor: string;
77
77
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
78
- currentItemStrokeWidth: number;
78
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
79
79
  currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
80
80
  currentItemRoughness: number;
81
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
81
82
  currentItemOpacity: number;
82
83
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
83
84
  currentItemFontSize: number;
@@ -138,6 +139,7 @@ export declare const actionToggleCropEditor: {
138
139
  gridStep: number;
139
140
  gridModeEnabled: boolean;
140
141
  viewModeEnabled: boolean;
142
+ viewModeOnly: boolean;
141
143
  selectedGroupIds: {
142
144
  [groupId: string]: boolean;
143
145
  };
@@ -76,9 +76,10 @@ export declare const actionDeleteSelected: {
76
76
  currentItemStrokeColor: string;
77
77
  currentItemBackgroundColor: string;
78
78
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
79
- currentItemStrokeWidth: number;
79
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
80
80
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
81
81
  currentItemRoughness: number;
82
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
82
83
  currentItemOpacity: number;
83
84
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
84
85
  currentItemFontSize: number;
@@ -139,6 +140,7 @@ export declare const actionDeleteSelected: {
139
140
  gridStep: number;
140
141
  gridModeEnabled: boolean;
141
142
  viewModeEnabled: boolean;
143
+ viewModeOnly: boolean;
142
144
  selectedGroupIds: {
143
145
  [groupId: string]: boolean;
144
146
  };
@@ -275,9 +277,10 @@ export declare const actionDeleteSelected: {
275
277
  currentItemStrokeColor: string;
276
278
  currentItemBackgroundColor: string;
277
279
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
278
- currentItemStrokeWidth: number;
280
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
279
281
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
280
282
  currentItemRoughness: number;
283
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
281
284
  currentItemOpacity: number;
282
285
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
283
286
  currentItemFontSize: number;
@@ -338,6 +341,7 @@ export declare const actionDeleteSelected: {
338
341
  gridStep: number;
339
342
  gridModeEnabled: boolean;
340
343
  viewModeEnabled: boolean;
344
+ viewModeOnly: boolean;
341
345
  selectedGroupIds: {
342
346
  [groupId: string]: boolean;
343
347
  };
@@ -442,9 +446,10 @@ export declare const actionDeleteSelected: {
442
446
  currentItemStrokeColor: string;
443
447
  currentItemBackgroundColor: string;
444
448
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
445
- currentItemStrokeWidth: number;
449
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
446
450
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
447
451
  currentItemRoughness: number;
452
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
448
453
  currentItemOpacity: number;
449
454
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
450
455
  currentItemFontSize: number;
@@ -502,6 +507,7 @@ export declare const actionDeleteSelected: {
502
507
  gridStep: number;
503
508
  gridModeEnabled: boolean;
504
509
  viewModeEnabled: boolean;
510
+ viewModeOnly: boolean;
505
511
  width: number;
506
512
  height: number;
507
513
  offsetTop: number;
@@ -68,9 +68,10 @@ export declare const actionDeselect: {
68
68
  currentItemStrokeColor: string;
69
69
  currentItemBackgroundColor: string;
70
70
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
71
- currentItemStrokeWidth: number;
71
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
72
72
  currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
73
73
  currentItemRoughness: number;
74
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
74
75
  currentItemOpacity: number;
75
76
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
76
77
  currentItemFontSize: number;
@@ -128,6 +129,7 @@ export declare const actionDeselect: {
128
129
  gridStep: number;
129
130
  gridModeEnabled: boolean;
130
131
  viewModeEnabled: boolean;
132
+ viewModeOnly: boolean;
131
133
  width: number;
132
134
  height: number;
133
135
  offsetTop: number;
@@ -104,9 +104,10 @@ export declare const actionLinkToElement: {
104
104
  currentItemStrokeColor: string;
105
105
  currentItemBackgroundColor: string;
106
106
  currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
107
- currentItemStrokeWidth: number;
107
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
108
108
  currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
109
109
  currentItemRoughness: number;
110
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
110
111
  currentItemOpacity: number;
111
112
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
112
113
  currentItemFontSize: number;
@@ -155,6 +156,7 @@ export declare const actionLinkToElement: {
155
156
  gridStep: number;
156
157
  gridModeEnabled: boolean;
157
158
  viewModeEnabled: boolean;
159
+ viewModeOnly: boolean;
158
160
  selectedGroupIds: {
159
161
  [groupId: string]: boolean;
160
162
  };
@@ -86,9 +86,10 @@ export declare const actionToggleElementLock: {
86
86
  currentItemStrokeColor: string;
87
87
  currentItemBackgroundColor: string;
88
88
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
89
- currentItemStrokeWidth: number;
89
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
90
90
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
91
91
  currentItemRoughness: number;
92
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
92
93
  currentItemOpacity: number;
93
94
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
94
95
  currentItemFontSize: number;
@@ -146,6 +147,7 @@ export declare const actionToggleElementLock: {
146
147
  gridStep: number;
147
148
  gridModeEnabled: boolean;
148
149
  viewModeEnabled: boolean;
150
+ viewModeOnly: boolean;
149
151
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
150
152
  width: number;
151
153
  height: number;
@@ -263,9 +265,10 @@ export declare const actionUnlockAllElements: {
263
265
  currentItemStrokeColor: string;
264
266
  currentItemBackgroundColor: string;
265
267
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
266
- currentItemStrokeWidth: number;
268
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
267
269
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
268
270
  currentItemRoughness: number;
271
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
269
272
  currentItemOpacity: number;
270
273
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
271
274
  currentItemFontSize: number;
@@ -323,6 +326,7 @@ export declare const actionUnlockAllElements: {
323
326
  gridStep: number;
324
327
  gridModeEnabled: boolean;
325
328
  viewModeEnabled: boolean;
329
+ viewModeOnly: boolean;
326
330
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
327
331
  width: number;
328
332
  height: number;