@zsviczian/excalidraw 0.15.2-obsidian-2 → 0.15.2-obsidian-4

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 (108) hide show
  1. package/dist/excalidraw.development.js +1022 -158
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +2 -2
  4. package/types/actions/actionAddToLibrary.d.ts +33 -18
  5. package/types/actions/actionBoundText.d.ts +22 -12
  6. package/types/actions/actionCanvas.d.ts +110 -60
  7. package/types/actions/actionClipboard.d.ts +55 -30
  8. package/types/actions/actionDeleteSelected.d.ts +33 -18
  9. package/types/actions/actionElementLock.d.ts +287 -0
  10. package/types/actions/actionExport.d.ts +100 -55
  11. package/types/actions/actionFinalize.d.ts +22 -12
  12. package/types/actions/actionFlip.d.ts +2 -4
  13. package/types/actions/actionHistory.d.ts +1 -1
  14. package/types/actions/actionLinearEditor.d.ts +11 -6
  15. package/types/actions/actionMenu.d.ts +33 -18
  16. package/types/actions/actionProperties.d.ts +145 -80
  17. package/types/actions/actionStyles.d.ts +11 -6
  18. package/types/actions/actionToggleGridMode.d.ts +11 -6
  19. package/types/actions/actionToggleStats.d.ts +11 -6
  20. package/types/actions/actionToggleViewMode.d.ts +11 -6
  21. package/types/actions/actionToggleZenMode.d.ts +11 -6
  22. package/types/actions/index.d.ts +1 -1
  23. package/types/actions/manager.d.ts +1 -1
  24. package/types/actions/shortcuts.d.ts +1 -1
  25. package/types/actions/types.d.ts +7 -7
  26. package/types/charts.d.ts +2 -2
  27. package/types/clients.d.ts +4 -1
  28. package/types/colors.d.ts +60 -5
  29. package/types/components/ActiveConfirmDialog.d.ts +1 -21
  30. package/types/components/App.d.ts +6 -2
  31. package/types/components/Avatar.d.ts +1 -1
  32. package/types/components/ColorPicker/ColorInput.d.ts +7 -0
  33. package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
  34. package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
  35. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
  36. package/types/components/ColorPicker/Picker.d.ts +18 -0
  37. package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
  38. package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
  39. package/types/components/ColorPicker/ShadeList.d.ts +8 -0
  40. package/types/components/ColorPicker/TopPicks.d.ts +9 -0
  41. package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
  42. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +21 -0
  43. package/types/components/ContextMenu.d.ts +3 -3
  44. package/types/components/Dialog.d.ts +2 -4
  45. package/types/components/EyeDropper.d.ts +18 -0
  46. package/types/components/FilledButton.d.ts +16 -0
  47. package/types/components/FixedSideContainer.d.ts +1 -1
  48. package/types/components/HandButton.d.ts +1 -1
  49. package/types/components/HelpButton.d.ts +1 -1
  50. package/types/components/ImageExportDialog.d.ts +7 -12
  51. package/types/components/Island.d.ts +1 -1
  52. package/types/components/JSONExportDialog.d.ts +1 -1
  53. package/types/components/LayerUI.d.ts +3 -2
  54. package/types/components/LibraryMenu.d.ts +3 -23
  55. package/types/components/LibraryMenuControlButtons.d.ts +4 -4
  56. package/types/components/LibraryMenuHeaderContent.d.ts +3 -1
  57. package/types/components/LibraryMenuItems.d.ts +4 -5
  58. package/types/components/LibraryMenuSection.d.ts +22 -0
  59. package/types/components/LibraryUnit.d.ts +7 -3
  60. package/types/components/LockButton.d.ts +1 -1
  61. package/types/components/MobileMenu.d.ts +1 -1
  62. package/types/components/PenModeButton.d.ts +1 -1
  63. package/types/components/Popover.d.ts +1 -1
  64. package/types/components/ProjectName.d.ts +2 -1
  65. package/types/components/RadioGroup.d.ts +12 -0
  66. package/types/components/Sidebar/Sidebar.d.ts +1 -21
  67. package/types/components/Sidebar/common.d.ts +3 -3
  68. package/types/components/Spinner.d.ts +2 -1
  69. package/types/components/Stack.d.ts +4 -3
  70. package/types/components/Switch.d.ts +9 -0
  71. package/types/components/ToolButton.d.ts +3 -3
  72. package/types/components/Tooltip.d.ts +1 -1
  73. package/types/components/icons.d.ts +8 -1
  74. package/types/constants.d.ts +6 -0
  75. package/types/context/tunnels.d.ts +2 -2
  76. package/types/data/encode.d.ts +1 -1
  77. package/types/data/filesystem.d.ts +1 -1
  78. package/types/data/library.d.ts +3 -45
  79. package/types/data/restore.d.ts +2 -2
  80. package/types/data/types.d.ts +1 -1
  81. package/types/element/Hyperlink.d.ts +11 -6
  82. package/types/element/binding.d.ts +2 -2
  83. package/types/element/bounds.d.ts +1 -1
  84. package/types/element/linearElementEditor.d.ts +11 -6
  85. package/types/element/mutateElement.d.ts +1 -1
  86. package/types/element/newElement.d.ts +1 -1
  87. package/types/element/resizeElements.d.ts +1 -0
  88. package/types/element/transformHandles.d.ts +5 -5
  89. package/types/element/types.d.ts +35 -35
  90. package/types/errors.d.ts +1 -1
  91. package/types/ga.d.ts +5 -5
  92. package/types/hooks/useCreatePortalContainer.d.ts +5 -0
  93. package/types/hooks/useLibraryItemSvg.d.ts +11 -0
  94. package/types/hooks/useOutsideClick.d.ts +19 -1
  95. package/types/hooks/useScrollPosition.d.ts +2 -0
  96. package/types/hooks/useTransition.d.ts +2 -0
  97. package/types/i18n.d.ts +2 -2
  98. package/types/jotai.d.ts +16 -104
  99. package/types/keys.d.ts +1 -1
  100. package/types/packages/excalidraw/index.d.ts +1 -1
  101. package/types/packages/utils.d.ts +2 -2
  102. package/types/renderer/easingFunctions.d.ts +1 -1
  103. package/types/renderer/renderElement.d.ts +2 -2
  104. package/types/scene/Scene.d.ts +4 -4
  105. package/types/scene/types.d.ts +4 -4
  106. package/types/types.d.ts +46 -37
  107. package/types/utility-types.d.ts +13 -13
  108. package/types/utils.d.ts +3 -3
@@ -180,7 +180,7 @@ export declare class LinearElementEditor {
180
180
  value: import("../types").NormalizedZoomValue;
181
181
  }>;
182
182
  openMenu: "canvas" | "shape" | null;
183
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
183
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
184
184
  openSidebar: {
185
185
  name: string;
186
186
  tab?: string | undefined;
@@ -228,11 +228,16 @@ export declare class LinearElementEditor {
228
228
  showHyperlinkPopup: false | "info" | "editor";
229
229
  linkOpacity: number;
230
230
  trayModeEnabled: boolean;
231
- colorPalette: {
232
- canvasBackground?: string[] | undefined;
233
- elementBackground?: string[] | undefined;
234
- elementStroke?: string[] | undefined;
235
- };
231
+ colorPalette?: {
232
+ canvasBackground: import("../colors").ColorPaletteCustom;
233
+ elementBackground: import("../colors").ColorPaletteCustom;
234
+ elementStroke: import("../colors").ColorPaletteCustom;
235
+ topPicks: {
236
+ canvasBackground: [string, string, string, string, string];
237
+ elementStroke: [string, string, string, string, string];
238
+ elementBackground: [string, string, string, string, string];
239
+ };
240
+ } | undefined;
236
241
  allowWheelZoom?: boolean | undefined;
237
242
  allowPinchZoom?: boolean | undefined;
238
243
  pinnedScripts?: string[] | undefined;
@@ -1,6 +1,6 @@
1
1
  import { ExcalidrawElement } from "./types";
2
2
  import { Mutable } from "../utility-types";
3
- declare type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TElement>, "id" | "version" | "versionNonce">;
3
+ type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TElement>, "id" | "version" | "versionNonce">;
4
4
  export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
5
5
  export declare const newElementWith: <TElement extends ExcalidrawElement>(element: TElement, updates: ElementUpdate<TElement>) => TElement;
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement, ExcalidrawLinearElement, ExcalidrawGenericElement, NonDeleted, TextAlign, GroupId, VerticalAlign, Arrowhead, ExcalidrawFreeDrawElement, FontFamilyValues, ExcalidrawTextContainer } from "../element/types";
2
2
  import { AppState } from "../types";
3
3
  import { MarkOptional, Mutable } from "../utility-types";
4
- declare type ElementConstructorOpts = MarkOptional<Omit<ExcalidrawGenericElement, "id" | "type" | "isDeleted" | "updated">, "width" | "height" | "angle" | "groupIds" | "boundElements" | "seed" | "version" | "versionNonce" | "link" | "strokeStyle" | "fillStyle" | "strokeColor" | "backgroundColor" | "roughness" | "strokeWidth" | "roundness" | "locked" | "opacity">;
4
+ type ElementConstructorOpts = MarkOptional<Omit<ExcalidrawGenericElement, "id" | "type" | "isDeleted" | "updated">, "width" | "height" | "angle" | "groupIds" | "boundElements" | "seed" | "version" | "versionNonce" | "link" | "strokeStyle" | "fillStyle" | "strokeColor" | "backgroundColor" | "roughness" | "strokeWidth" | "roundness" | "locked" | "opacity">;
5
5
  export declare const newElement: (opts: {
6
6
  type: ExcalidrawGenericElement["type"];
7
7
  } & ElementConstructorOpts) => NonDeleted<ExcalidrawGenericElement>;
@@ -4,5 +4,6 @@ import { PointerDownState } from "../types";
4
4
  export declare const normalizeAngle: (angle: number) => number;
5
5
  export declare const transformElements: (pointerDownState: PointerDownState, transformHandleType: MaybeTransformHandleType, selectedElements: readonly NonDeletedExcalidrawElement[], resizeArrowDirection: "origin" | "end", shouldRotateWithDiscreteAngle: boolean, shouldResizeFromCenter: boolean, shouldMaintainAspectRatio: boolean, pointerX: number, pointerY: number, centerX: number, centerY: number) => boolean;
6
6
  export declare const resizeSingleElement: (originalElements: PointerDownState["originalElements"], shouldMaintainAspectRatio: boolean, element: NonDeletedExcalidrawElement, transformHandleDirection: TransformHandleDirection, shouldResizeFromCenter: boolean, pointerX: number, pointerY: number) => void;
7
+ export declare const resizeMultipleElements: (pointerDownState: PointerDownState, selectedElements: readonly NonDeletedExcalidrawElement[], transformHandleType: "nw" | "ne" | "sw" | "se", shouldResizeFromCenter: boolean, pointerX: number, pointerY: number) => void;
7
8
  export declare const getResizeOffsetXY: (transformHandleType: MaybeTransformHandleType, selectedElements: NonDeletedExcalidrawElement[], x: number, y: number) => [number, number];
8
9
  export declare const getResizeArrowDirection: (transformHandleType: MaybeTransformHandleType, element: NonDeleted<ExcalidrawLinearElement>) => "origin" | "end";
@@ -1,12 +1,12 @@
1
1
  import { ExcalidrawElement, NonDeletedExcalidrawElement, PointerType } from "./types";
2
2
  import { AppState, Zoom } from "../types";
3
- export declare type TransformHandleDirection = "n" | "s" | "w" | "e" | "nw" | "ne" | "sw" | "se";
4
- export declare type TransformHandleType = TransformHandleDirection | "rotation";
5
- export declare type TransformHandle = [number, number, number, number];
6
- export declare type TransformHandles = Partial<{
3
+ export type TransformHandleDirection = "n" | "s" | "w" | "e" | "nw" | "ne" | "sw" | "se";
4
+ export type TransformHandleType = TransformHandleDirection | "rotation";
5
+ export type TransformHandle = [number, number, number, number];
6
+ export type TransformHandles = Partial<{
7
7
  [T in TransformHandleType]: TransformHandle;
8
8
  }>;
9
- export declare type MaybeTransformHandleType = TransformHandleType | false;
9
+ export type MaybeTransformHandleType = TransformHandleType | false;
10
10
  export declare const OMIT_SIDES_FOR_MULTIPLE_ELEMENTS: {
11
11
  e: boolean;
12
12
  s: boolean;
@@ -1,23 +1,23 @@
1
1
  import { Point } from "../types";
2
2
  import { FONT_FAMILY, ROUNDNESS, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "../constants";
3
3
  import { MarkNonNullable, ValueOf } from "../utility-types";
4
- export declare type ChartType = "bar" | "line";
5
- export declare type FillStyle = "hachure" | "cross-hatch" | "solid" | "zigzag";
6
- export declare type FontFamilyKeys = keyof typeof FONT_FAMILY;
7
- export declare type FontFamilyValues = typeof FONT_FAMILY[FontFamilyKeys];
8
- export declare type Theme = typeof THEME[keyof typeof THEME];
9
- export declare type FontString = string & {
4
+ export type ChartType = "bar" | "line";
5
+ export type FillStyle = "hachure" | "cross-hatch" | "solid" | "zigzag";
6
+ export type FontFamilyKeys = keyof typeof FONT_FAMILY;
7
+ export type FontFamilyValues = typeof FONT_FAMILY[FontFamilyKeys];
8
+ export type Theme = typeof THEME[keyof typeof THEME];
9
+ export type FontString = string & {
10
10
  _brand: "fontString";
11
11
  };
12
- export declare type GroupId = string;
13
- export declare type PointerType = "mouse" | "pen" | "touch";
14
- export declare type StrokeRoundness = "round" | "sharp";
15
- export declare type RoundnessType = ValueOf<typeof ROUNDNESS>;
16
- export declare type StrokeStyle = "solid" | "dashed" | "dotted";
17
- export declare type TextAlign = typeof TEXT_ALIGN[keyof typeof TEXT_ALIGN];
18
- declare type VerticalAlignKeys = keyof typeof VERTICAL_ALIGN;
19
- export declare type VerticalAlign = typeof VERTICAL_ALIGN[VerticalAlignKeys];
20
- declare type _ExcalidrawElementBase = Readonly<{
12
+ export type GroupId = string;
13
+ export type PointerType = "mouse" | "pen" | "touch";
14
+ export type StrokeRoundness = "round" | "sharp";
15
+ export type RoundnessType = ValueOf<typeof ROUNDNESS>;
16
+ export type StrokeStyle = "solid" | "dashed" | "dotted";
17
+ export type TextAlign = typeof TEXT_ALIGN[keyof typeof TEXT_ALIGN];
18
+ type VerticalAlignKeys = keyof typeof VERTICAL_ALIGN;
19
+ export type VerticalAlign = typeof VERTICAL_ALIGN[VerticalAlignKeys];
20
+ type _ExcalidrawElementBase = Readonly<{
21
21
  id: string;
22
22
  x: number;
23
23
  y: number;
@@ -60,19 +60,19 @@ declare type _ExcalidrawElementBase = Readonly<{
60
60
  locked: boolean;
61
61
  customData?: Record<string, any>;
62
62
  }>;
63
- export declare type ExcalidrawSelectionElement = _ExcalidrawElementBase & {
63
+ export type ExcalidrawSelectionElement = _ExcalidrawElementBase & {
64
64
  type: "selection";
65
65
  };
66
- export declare type ExcalidrawRectangleElement = _ExcalidrawElementBase & {
66
+ export type ExcalidrawRectangleElement = _ExcalidrawElementBase & {
67
67
  type: "rectangle";
68
68
  };
69
- export declare type ExcalidrawDiamondElement = _ExcalidrawElementBase & {
69
+ export type ExcalidrawDiamondElement = _ExcalidrawElementBase & {
70
70
  type: "diamond";
71
71
  };
72
- export declare type ExcalidrawEllipseElement = _ExcalidrawElementBase & {
72
+ export type ExcalidrawEllipseElement = _ExcalidrawElementBase & {
73
73
  type: "ellipse";
74
74
  };
75
- export declare type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
75
+ export type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
76
76
  type: "image";
77
77
  fileId: FileId | null;
78
78
  /** whether respective file is persisted */
@@ -80,22 +80,22 @@ export declare type ExcalidrawImageElement = _ExcalidrawElementBase & Readonly<{
80
80
  /** X and Y scale factors <-1, 1>, used for image axis flipping */
81
81
  scale: [number, number];
82
82
  }>;
83
- export declare type InitializedExcalidrawImageElement = MarkNonNullable<ExcalidrawImageElement, "fileId">;
83
+ export type InitializedExcalidrawImageElement = MarkNonNullable<ExcalidrawImageElement, "fileId">;
84
84
  /**
85
85
  * These are elements that don't have any additional properties.
86
86
  */
87
- export declare type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
87
+ export type ExcalidrawGenericElement = ExcalidrawSelectionElement | ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement;
88
88
  /**
89
89
  * ExcalidrawElement should be JSON serializable and (eventually) contain
90
90
  * no computed data. The list of all ExcalidrawElements should be shareable
91
91
  * between peers and contain no state local to the peer.
92
92
  */
93
- export declare type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement;
94
- export declare type NonDeleted<TElement extends ExcalidrawElement> = TElement & {
93
+ export type ExcalidrawElement = ExcalidrawGenericElement | ExcalidrawTextElement | ExcalidrawLinearElement | ExcalidrawFreeDrawElement | ExcalidrawImageElement;
94
+ export type NonDeleted<TElement extends ExcalidrawElement> = TElement & {
95
95
  isDeleted: boolean;
96
96
  };
97
- export declare type NonDeletedExcalidrawElement = NonDeleted<ExcalidrawElement>;
98
- export declare type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
97
+ export type NonDeletedExcalidrawElement = NonDeleted<ExcalidrawElement>;
98
+ export type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
99
99
  type: "text";
100
100
  fontSize: number;
101
101
  fontFamily: FontFamilyValues;
@@ -114,18 +114,18 @@ export declare type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
114
114
  _brand: "unitlessLineHeight";
115
115
  };
116
116
  }>;
117
- export declare type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement;
118
- export declare type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawImageElement | ExcalidrawArrowElement;
119
- export declare type ExcalidrawTextElementWithContainer = {
117
+ export type ExcalidrawBindableElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawTextElement | ExcalidrawImageElement;
118
+ export type ExcalidrawTextContainer = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawEllipseElement | ExcalidrawImageElement | ExcalidrawArrowElement;
119
+ export type ExcalidrawTextElementWithContainer = {
120
120
  containerId: ExcalidrawTextContainer["id"];
121
121
  } & ExcalidrawTextElement;
122
- export declare type PointBinding = {
122
+ export type PointBinding = {
123
123
  elementId: ExcalidrawBindableElement["id"];
124
124
  focus: number;
125
125
  gap: number;
126
126
  };
127
- export declare type Arrowhead = "arrow" | "bar" | "dot" | "triangle";
128
- export declare type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
127
+ export type Arrowhead = "arrow" | "bar" | "dot" | "triangle";
128
+ export type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
129
129
  type: "line" | "arrow";
130
130
  points: readonly Point[];
131
131
  lastCommittedPoint: Point | null;
@@ -134,17 +134,17 @@ export declare type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<
134
134
  startArrowhead: Arrowhead | null;
135
135
  endArrowhead: Arrowhead | null;
136
136
  }>;
137
- export declare type ExcalidrawArrowElement = ExcalidrawLinearElement & Readonly<{
137
+ export type ExcalidrawArrowElement = ExcalidrawLinearElement & Readonly<{
138
138
  type: "arrow";
139
139
  }>;
140
- export declare type ExcalidrawFreeDrawElement = _ExcalidrawElementBase & Readonly<{
140
+ export type ExcalidrawFreeDrawElement = _ExcalidrawElementBase & Readonly<{
141
141
  type: "freedraw";
142
142
  points: readonly Point[];
143
143
  pressures: readonly number[];
144
144
  simulatePressure: boolean;
145
145
  lastCommittedPoint: Point | null;
146
146
  }>;
147
- export declare type FileId = string & {
147
+ export type FileId = string & {
148
148
  _brand: "FileId";
149
149
  };
150
150
  export {};
package/types/errors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare type CANVAS_ERROR_NAMES = "CANVAS_ERROR" | "CANVAS_POSSIBLY_TOO_BIG";
1
+ type CANVAS_ERROR_NAMES = "CANVAS_ERROR" | "CANVAS_POSSIBLY_TOO_BIG";
2
2
  export declare class CanvasError extends Error {
3
3
  constructor(message?: string, name?: CANVAS_ERROR_NAMES);
4
4
  }
package/types/ga.d.ts CHANGED
@@ -16,15 +16,15 @@
16
16
  * See GAPoint, GALine, GADirection and GATransform modules for common
17
17
  * operations.
18
18
  */
19
- export declare type Point = NVector;
20
- export declare type Direction = NVector;
21
- export declare type Line = NVector;
22
- export declare type Transform = NVector;
19
+ export type Point = NVector;
20
+ export type Direction = NVector;
21
+ export type Line = NVector;
22
+ export type Transform = NVector;
23
23
  export declare const point: (x: number, y: number) => NVector;
24
24
  export declare const origin: () => NVector;
25
25
  export declare const direction: (x: number, y: number) => NVector;
26
26
  export declare const offset: (x: number, y: number) => NVector;
27
- declare type NVector = readonly [
27
+ type NVector = readonly [
28
28
  number,
29
29
  number,
30
30
  number,
@@ -0,0 +1,5 @@
1
+ export declare const useCreatePortalContainer: (opts?: {
2
+ className?: string;
3
+ parentSelector?: string;
4
+ style?: string;
5
+ }) => HTMLDivElement | null;
@@ -0,0 +1,11 @@
1
+ import { LibraryItem } from "../types";
2
+ export type SvgCache = Map<LibraryItem["id"], SVGSVGElement>;
3
+ export declare const libraryItemSvgsCache: import("jotai").PrimitiveAtom<SvgCache> & {
4
+ init: SvgCache;
5
+ };
6
+ export declare const useLibraryItemSvg: (id: LibraryItem["id"] | null, elements: LibraryItem["elements"] | undefined, svgCache: SvgCache) => SVGSVGElement | undefined;
7
+ export declare const useLibraryCache: () => {
8
+ clearLibraryCache: () => void;
9
+ deleteItemsFromLibraryCache: (items: LibraryItem["id"][]) => void;
10
+ svgCache: SvgCache;
11
+ };
@@ -1,2 +1,20 @@
1
1
  /// <reference types="react" />
2
- export declare const useOutsideClick: (handler: (event: Event) => void) => import("react").MutableRefObject<null>;
2
+ export declare function useOutsideClick<T extends HTMLElement>(ref: React.RefObject<T>,
3
+ /** if performance is of concern, memoize the callback */
4
+ callback: (event: Event) => void,
5
+ /**
6
+ * Optional callback which is called on every click.
7
+ *
8
+ * Should return `true` if click should be considered as inside the container,
9
+ * and `false` if it falls outside and should call the `callback`.
10
+ *
11
+ * Returning `true` overrides the default behavior and `callback` won't be
12
+ * called.
13
+ *
14
+ * Returning `undefined` will fallback to the default behavior.
15
+ */
16
+ isInside?: (event: Event & {
17
+ target: HTMLElement;
18
+ },
19
+ /** the element of the passed ref */
20
+ container: T) => boolean | undefined): void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const useScrollPosition: <T extends HTMLElement>(elementRef: import("react").RefObject<T>) => number;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const useTransition: typeof React.useTransition;
package/types/i18n.d.ts CHANGED
@@ -12,10 +12,10 @@ export declare const setLanguage: (lang: Language) => Promise<void>;
12
12
  export declare const getLanguage: () => Language;
13
13
  export declare const t: (path: string, replacement?: {
14
14
  [key: string]: string | number;
15
- } | undefined) => string;
15
+ } | null | undefined, fallback?: string) => string;
16
16
  export declare const useI18n: () => {
17
17
  t: (path: string, replacement?: {
18
18
  [key: string]: string | number;
19
- } | undefined) => string;
19
+ } | null | undefined, fallback?: string) => string;
20
20
  langCode: string;
21
21
  };
package/types/jotai.d.ts CHANGED
@@ -1,122 +1,34 @@
1
1
  import { PrimitiveAtom } from "jotai";
2
2
  export declare const jotaiScope: unique symbol;
3
3
  export declare const jotaiStore: {
4
- get: <Value>(atom: import("jotai").Atom<Value>) => (Value extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value) | undefined;
5
- asyncGet: <Value_1>(atom: import("jotai").Atom<Value_1>) => Promise<Value_1 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_1>;
4
+ get: <Value>(atom: import("jotai").Atom<Value>) => Awaited<Value> | undefined;
5
+ asyncGet: <Value_1>(atom: import("jotai").Atom<Value_1>) => Promise<Awaited<Value_1>>;
6
6
  set: <Value_2, Update, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_2, Update, Result>, update: Update) => Result;
7
- sub: (atom: {
8
- toString: () => string;
9
- debugLabel?: string | undefined;
10
- read: (get: {
11
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
12
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
13
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
14
- }) => unknown;
15
- }, callback: () => void) => () => void;
7
+ sub: (atom: import("jotai").Atom<unknown>, callback: () => void) => () => void;
16
8
  SECRET_INTERNAL_store: {
17
- r: <Value_6>(readingAtom: import("jotai").Atom<Value_6>, version?: import("jotai/core/store").VersionObject | undefined) => import("jotai/core/store").AtomState<Value_6>;
9
+ r: <Value_3>(readingAtom: import("jotai").Atom<Value_3>, version?: import("jotai/core/store").VersionObject | undefined) => import("jotai/core/store").AtomState<Value_3>;
18
10
  w: <Value_1_1, Update_1, Result_1 extends void | Promise<void>>(writingAtom: import("jotai").WritableAtom<Value_1_1, Update_1, Result_1>, update: Update_1, version?: import("jotai/core/store").VersionObject | undefined) => Result_1;
19
- c: (_atom: {
20
- toString: () => string;
21
- debugLabel?: string | undefined;
22
- read: (get: {
23
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
24
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
25
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
26
- }) => unknown;
27
- } | null, version?: import("jotai/core/store").VersionObject | undefined) => void;
28
- s: (atom: {
29
- toString: () => string;
30
- debugLabel?: string | undefined;
31
- read: (get: {
32
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
33
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
34
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
35
- }) => unknown;
36
- }, callback: (version?: import("jotai/core/store").VersionObject | undefined) => void) => () => void;
37
- h: (values: Iterable<readonly [{
38
- toString: () => string;
39
- debugLabel?: string | undefined;
40
- read: (get: {
41
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
42
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
43
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
44
- }) => unknown;
45
- }, unknown]>, version?: import("jotai/core/store").VersionObject | undefined) => void;
11
+ c: (_atom: import("jotai").Atom<unknown> | null, version?: import("jotai/core/store").VersionObject | undefined) => void;
12
+ s: (atom: import("jotai").Atom<unknown>, callback: (version?: import("jotai/core/store").VersionObject | undefined) => void, version?: import("jotai/core/store").VersionObject | undefined) => () => void;
13
+ h: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>, version?: import("jotai/core/store").VersionObject | undefined) => void;
46
14
  n: (l: () => void) => () => void;
47
- l: () => IterableIterator<{
48
- toString: () => string;
49
- debugLabel?: string | undefined;
50
- read: (get: {
51
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
52
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
53
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
54
- }) => unknown;
55
- }>;
56
- a: (a: {
57
- toString: () => string;
58
- debugLabel?: string | undefined;
59
- read: (get: {
60
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
61
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
62
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
63
- }) => unknown;
64
- }) => import("jotai/core/store").AtomState<unknown> | undefined;
65
- m: (a: {
66
- toString: () => string;
67
- debugLabel?: string | undefined;
68
- read: (get: {
69
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
70
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
71
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
72
- }) => unknown;
73
- }) => {
15
+ l: () => IterableIterator<import("jotai").Atom<unknown>>;
16
+ a: (a: import("jotai").Atom<unknown>) => import("jotai/core/store").AtomState<unknown> | undefined;
17
+ m: (a: import("jotai").Atom<unknown>) => {
74
18
  l: Set<(version?: import("jotai/core/store").VersionObject | undefined) => void>;
75
- t: Set<{
76
- toString: () => string;
77
- debugLabel?: string | undefined;
78
- read: (get: {
79
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
80
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
81
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
82
- }) => unknown;
83
- }>;
19
+ t: Set<import("jotai").Atom<unknown>>;
84
20
  u?: (() => void) | undefined;
85
21
  } | undefined;
86
22
  } | {
87
- r: <Value_7>(readingAtom: import("jotai").Atom<Value_7>, version?: import("jotai/core/store").VersionObject | undefined) => import("jotai/core/store").AtomState<Value_7>;
23
+ r: <Value_4>(readingAtom: import("jotai").Atom<Value_4>, version?: import("jotai/core/store").VersionObject | undefined) => import("jotai/core/store").AtomState<Value_4>;
88
24
  w: <Value_1_2, Update_2, Result_2 extends void | Promise<void>>(writingAtom: import("jotai").WritableAtom<Value_1_2, Update_2, Result_2>, update: Update_2, version?: import("jotai/core/store").VersionObject | undefined) => Result_2;
89
- c: (_atom: {
90
- toString: () => string;
91
- debugLabel?: string | undefined;
92
- read: (get: {
93
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
94
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
95
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
96
- }) => unknown;
97
- } | null, version?: import("jotai/core/store").VersionObject | undefined) => void;
98
- s: (atom: {
99
- toString: () => string;
100
- debugLabel?: string | undefined;
101
- read: (get: {
102
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
103
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
104
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
105
- }) => unknown;
106
- }, callback: (version?: import("jotai/core/store").VersionObject | undefined) => void) => () => void;
107
- h: (values: Iterable<readonly [{
108
- toString: () => string;
109
- debugLabel?: string | undefined;
110
- read: (get: {
111
- <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>): Value_3;
112
- <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>): Value_4;
113
- <Value_5>(atom: import("jotai").Atom<Value_5>): Value_5 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? V_1 extends Promise<infer V_1> ? any : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : V_1 : Value_5;
114
- }) => unknown;
115
- }, unknown]>, version?: import("jotai/core/store").VersionObject | undefined) => void;
25
+ c: (_atom: import("jotai").Atom<unknown> | null, version?: import("jotai/core/store").VersionObject | undefined) => void;
26
+ s: (atom: import("jotai").Atom<unknown>, callback: (version?: import("jotai/core/store").VersionObject | undefined) => void, version?: import("jotai/core/store").VersionObject | undefined) => () => void;
27
+ h: (values: Iterable<readonly [import("jotai").Atom<unknown>, unknown]>, version?: import("jotai/core/store").VersionObject | undefined) => void;
116
28
  n?: undefined;
117
29
  l?: undefined;
118
30
  a?: undefined;
119
31
  m?: undefined;
120
32
  };
121
33
  };
122
- export declare const useAtomWithInitialValue: <T extends unknown, A extends PrimitiveAtom<T>>(atom: A, initialValue: T | (() => T)) => readonly [T extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : T, import("jotai/core/atom").SetAtom<T | ((prev: T) => T), void>];
34
+ export declare const useAtomWithInitialValue: <T extends unknown, A extends PrimitiveAtom<T>>(atom: A, initialValue: T | (() => T)) => readonly [Awaited<T>, import("jotai/core/atom").SetAtom<T | ((prev: T) => T), void>];
package/types/keys.d.ts CHANGED
@@ -70,7 +70,7 @@ export declare const KEYS: {
70
70
  readonly 8: "8";
71
71
  readonly 9: "9";
72
72
  };
73
- export declare type Key = keyof typeof KEYS;
73
+ export type Key = keyof typeof KEYS;
74
74
  export declare const isArrowKey: (key: string) => boolean;
75
75
  export declare const shouldResizeFromCenter: (event: MouseEvent | KeyboardEvent) => boolean;
76
76
  export declare const shouldMaintainAspectRatio: (event: MouseEvent | KeyboardEvent) => boolean;
@@ -6,7 +6,7 @@ import Footer from "../../components/footer/FooterCenter";
6
6
  import MainMenu from "../../components/main-menu/MainMenu";
7
7
  import WelcomeScreen from "../../components/welcome-screen/WelcomeScreen";
8
8
  import LiveCollaborationTrigger from "../../components/live-collaboration/LiveCollaborationTrigger";
9
- declare type PublicExcalidrawProps = Omit<ExcalidrawProps, "forwardedRef">;
9
+ type PublicExcalidrawProps = Omit<ExcalidrawProps, "forwardedRef">;
10
10
  export declare const Excalidraw: React.MemoExoticComponent<React.ForwardRefExoticComponent<PublicExcalidrawProps & React.RefAttributes<ExcalidrawAPIRefValue>>>;
11
11
  export { getSceneVersion, isInvisiblySmallElement, getNonDeletedElements, } from "../../element";
12
12
  export { defaultLang, useI18n, languages } from "../../i18n";
@@ -2,7 +2,7 @@ import { AppState, BinaryFiles } from "../types";
2
2
  import { ExcalidrawElement, NonDeleted } from "../element/types";
3
3
  import { MIME_TYPES } from "../constants";
4
4
  export { MIME_TYPES };
5
- declare type ExportOpts = {
5
+ type ExportOpts = {
6
6
  elements: readonly NonDeleted<ExcalidrawElement>[];
7
7
  appState?: Partial<Omit<AppState, "offsetTop" | "offsetLeft">>;
8
8
  files: BinaryFiles | null;
@@ -36,7 +36,7 @@ export { getCommonBoundingBox } from "../element/bounds";
36
36
  export { getMaximumGroups } from "../groups";
37
37
  export { intersectElementWithLine } from "../element/collision";
38
38
  export { determineFocusDistance } from "../element/collision";
39
- export { measureText, wrapText, getDefaultLineHeight } from "../element/textElement";
39
+ export { measureText, wrapText, getDefaultLineHeight, } from "../element/textElement";
40
40
  export { getFontString } from "../utils";
41
41
  export { getBoundTextMaxWidth } from "../element/textElement";
42
42
  export { mergeLibraryItems } from "../data/library";
@@ -1,4 +1,4 @@
1
- declare type EasingFunction = (progress: number) => number;
1
+ type EasingFunction = (progress: number) => number;
2
2
  interface EasingDictionary {
3
3
  [easing: string]: EasingFunction;
4
4
  }
@@ -15,8 +15,8 @@ export interface ExcalidrawElementWithCanvas {
15
15
  boundTextElementVersion: number | null;
16
16
  }
17
17
  export declare const DEFAULT_LINK_SIZE = 14;
18
- declare type ElementShape = Drawable | Drawable[] | null;
19
- declare type ElementShapes = {
18
+ type ElementShape = Drawable | Drawable[] | null;
19
+ type ElementShapes = {
20
20
  freedraw: Drawable | null;
21
21
  arrow: Drawable[];
22
22
  line: Drawable[];
@@ -1,9 +1,9 @@
1
1
  import { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted } from "../element/types";
2
2
  import { LinearElementEditor } from "../element/linearElementEditor";
3
- declare type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
4
- declare type ElementKey = ExcalidrawElement | ElementIdKey;
5
- declare type SceneStateCallback = () => void;
6
- declare type SceneStateCallbackRemover = () => void;
3
+ type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
4
+ type ElementKey = ExcalidrawElement | ElementIdKey;
5
+ type SceneStateCallback = () => void;
6
+ type SceneStateCallbackRemover = () => void;
7
7
  declare class Scene {
8
8
  private static sceneMapByElement;
9
9
  private static sceneMapById;
@@ -1,6 +1,6 @@
1
1
  import { ExcalidrawTextElement } from "../element/types";
2
2
  import { AppClassProperties, AppState } from "../types";
3
- export declare type RenderConfig = {
3
+ export type RenderConfig = {
4
4
  scrollX: AppState["scrollX"];
5
5
  scrollY: AppState["scrollY"];
6
6
  /** null indicates transparent bg */
@@ -35,15 +35,15 @@ export declare type RenderConfig = {
35
35
  isExporting: boolean;
36
36
  selectionColor?: string;
37
37
  };
38
- export declare type SceneScroll = {
38
+ export type SceneScroll = {
39
39
  scrollX: number;
40
40
  scrollY: number;
41
41
  };
42
42
  export interface Scene {
43
43
  elements: ExcalidrawTextElement[];
44
44
  }
45
- export declare type ExportType = "png" | "clipboard" | "clipboard-svg" | "backend" | "svg";
46
- export declare type ScrollBars = {
45
+ export type ExportType = "png" | "clipboard" | "clipboard-svg" | "backend" | "svg";
46
+ export type ScrollBars = {
47
47
  horizontal: {
48
48
  x: number;
49
49
  y: number;