@wildmio/excalidraw 0.18.0-custom-1 → 0.18.0-custom.2

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 (112) hide show
  1. package/dist/dev/chunk-4FKPNSAF.js +25438 -0
  2. package/dist/dev/chunk-4FKPNSAF.js.map +7 -0
  3. package/dist/dev/{chunk-WCM2OLWY.js → chunk-DJHLEOOZ.js} +5 -5
  4. package/dist/dev/{chunk-WCM2OLWY.js.map → chunk-DJHLEOOZ.js.map} +1 -1
  5. package/dist/dev/{chunk-OCFTI2BU.js → chunk-OWOU4ALI.js} +3 -2
  6. package/dist/dev/chunk-OWOU4ALI.js.map +7 -0
  7. package/dist/dev/{chunk-4BGRJMQS.js → chunk-QRXFLJOF.js} +2 -2
  8. package/dist/dev/data/{image-HFX5FVZR.js → image-ZNW3236J.js} +3 -3
  9. package/dist/dev/index.css +4 -3
  10. package/dist/dev/index.css.map +2 -2
  11. package/dist/dev/index.js +3274 -5359
  12. package/dist/dev/index.js.map +4 -4
  13. package/dist/dev/locales/{de-DE-HE4SJIAA.js → de-DE-ZRDYEPMS.js} +7 -7
  14. package/dist/dev/locales/de-DE-ZRDYEPMS.js.map +7 -0
  15. package/dist/dev/locales/{en-MLZIHOCR.js → en-GWPE5KV7.js} +2 -2
  16. package/dist/dev/locales/{es-ES-EDA76ZAF.js → es-ES-VLQBB7FJ.js} +3 -3
  17. package/dist/dev/locales/es-ES-VLQBB7FJ.js.map +7 -0
  18. package/dist/dev/locales/{fr-FR-Z3SBW42Y.js → fr-FR-A72LKGCO.js} +2 -2
  19. package/dist/dev/locales/{fr-FR-Z3SBW42Y.js.map → fr-FR-A72LKGCO.js.map} +1 -1
  20. package/dist/dev/locales/{it-IT-HD26UZNF.js → it-IT-X34PIOJ2.js} +2 -2
  21. package/dist/dev/locales/{it-IT-HD26UZNF.js.map → it-IT-X34PIOJ2.js.map} +1 -1
  22. package/dist/dev/locales/{nl-NL-RCSOXLW3.js → nl-NL-XGZJ7V2V.js} +226 -226
  23. package/dist/dev/locales/nl-NL-XGZJ7V2V.js.map +7 -0
  24. package/dist/dev/locales/{percentages-TR7IWPFY.js → percentages-OGWD7R2K.js} +2 -2
  25. package/dist/dev/locales/{sk-SK-G2J6PSCB.js → sk-SK-RWC6UWGY.js} +49 -49
  26. package/dist/dev/locales/sk-SK-RWC6UWGY.js.map +7 -0
  27. package/dist/dev/locales/{vi-VN-XF3AYKJ7.js → vi-VN-KBZAVWP5.js} +3 -3
  28. package/dist/dev/locales/{vi-VN-XF3AYKJ7.js.map → vi-VN-KBZAVWP5.js.map} +1 -1
  29. package/dist/dev/subset-shared.chunk.js +1 -1
  30. package/dist/dev/subset-worker.chunk.js +1 -1
  31. package/dist/prod/{chunk-QNG5NH6R.js → chunk-2KZFBCBN.js} +1 -1
  32. package/dist/prod/chunk-AJI3LATG.js +1 -0
  33. package/dist/prod/chunk-B42KGT6Z.js +33 -0
  34. package/dist/prod/{chunk-RKNJTMKK.js → chunk-OVC72EOF.js} +1 -1
  35. package/dist/prod/data/image-T7X6V6XU.js +1 -0
  36. package/dist/prod/index.css +1 -1
  37. package/dist/prod/index.js +18 -25
  38. package/dist/prod/locales/{de-DE-KU2ABQRN.js → de-DE-G3JVZ4MQ.js} +2 -2
  39. package/dist/prod/locales/{en-BARVNJLJ.js → en-7B5CVO5K.js} +1 -1
  40. package/dist/prod/locales/{es-ES-MXQVAWTQ.js → es-ES-ART7BI3G.js} +2 -2
  41. package/dist/prod/locales/{fr-FR-PJOMXPCV.js → fr-FR-XEFNCM4I.js} +1 -1
  42. package/dist/prod/locales/{it-IT-DQZT3VFE.js → it-IT-GIGIGIBJ.js} +3 -3
  43. package/dist/prod/locales/nl-NL-R4C4SUIG.js +13 -0
  44. package/dist/prod/locales/percentages-OL6W367U.js +1 -0
  45. package/dist/prod/locales/sk-SK-MC7UOHQO.js +7 -0
  46. package/dist/prod/locales/{vi-VN-I6Q2YS4S.js → vi-VN-K34TWHF7.js} +1 -1
  47. package/dist/prod/subset-shared.chunk.js +1 -1
  48. package/dist/prod/subset-worker.chunk.js +1 -1
  49. package/dist/types/common/src/colors.d.ts +4 -1
  50. package/dist/types/common/src/constants.d.ts +0 -1
  51. package/dist/types/common/src/utils.d.ts +11 -7
  52. package/dist/types/element/src/Scene.d.ts +3 -3
  53. package/dist/types/element/src/renderElement.d.ts +0 -6
  54. package/dist/types/element/src/shape.d.ts +5 -4
  55. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -0
  56. package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -0
  57. package/dist/types/excalidraw/actions/actionCanvas.d.ts +12 -0
  58. package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -0
  59. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -0
  60. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -0
  61. package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -0
  62. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -0
  63. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +1 -0
  64. package/dist/types/excalidraw/actions/actionExport.d.ts +5 -1
  65. package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -0
  66. package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -0
  67. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -0
  68. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -0
  69. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -0
  70. package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -0
  71. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -0
  72. package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -0
  73. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -0
  74. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -0
  75. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -0
  76. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -0
  77. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -0
  78. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -0
  79. package/dist/types/excalidraw/appState.d.ts +2 -1
  80. package/dist/types/excalidraw/components/App.d.ts +2 -1
  81. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +7 -4
  82. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  83. package/dist/types/excalidraw/components/EyeButton.d.ts +8 -0
  84. package/dist/types/excalidraw/components/MobileMenu.d.ts +2 -1
  85. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  86. package/dist/types/excalidraw/components/icons.d.ts +2 -0
  87. package/dist/types/excalidraw/data/blob.d.ts +314 -2
  88. package/dist/types/excalidraw/data/json.d.ts +157 -1
  89. package/dist/types/excalidraw/data/restore.d.ts +22 -16
  90. package/dist/types/excalidraw/index.d.ts +1 -2
  91. package/dist/types/excalidraw/scene/Renderer.d.ts +3 -1
  92. package/dist/types/excalidraw/scene/types.d.ts +7 -2
  93. package/dist/types/excalidraw/types.d.ts +9 -0
  94. package/dist/types/math/src/range.d.ts +1 -3
  95. package/package.json +4 -4
  96. package/dist/dev/chunk-55IZTNXR.js +0 -5472
  97. package/dist/dev/chunk-55IZTNXR.js.map +0 -7
  98. package/dist/dev/chunk-OCFTI2BU.js.map +0 -7
  99. package/dist/dev/locales/de-DE-HE4SJIAA.js.map +0 -7
  100. package/dist/dev/locales/es-ES-EDA76ZAF.js.map +0 -7
  101. package/dist/dev/locales/nl-NL-RCSOXLW3.js.map +0 -7
  102. package/dist/dev/locales/sk-SK-G2J6PSCB.js.map +0 -7
  103. package/dist/prod/chunk-2KZTCREM.js +0 -4
  104. package/dist/prod/chunk-Q7BNPSJU.js +0 -1
  105. package/dist/prod/data/image-CRABYHXF.js +0 -1
  106. package/dist/prod/locales/nl-NL-AVTAYVB7.js +0 -7
  107. package/dist/prod/locales/percentages-FZSTHYWV.js +0 -1
  108. package/dist/prod/locales/sk-SK-2KAMKFW5.js +0 -7
  109. /package/dist/dev/{chunk-4BGRJMQS.js.map → chunk-QRXFLJOF.js.map} +0 -0
  110. /package/dist/dev/data/{image-HFX5FVZR.js.map → image-ZNW3236J.js.map} +0 -0
  111. /package/dist/dev/locales/{en-MLZIHOCR.js.map → en-GWPE5KV7.js.map} +0 -0
  112. /package/dist/dev/locales/{percentages-TR7IWPFY.js.map → percentages-OGWD7R2K.js.map} +0 -0
@@ -118,6 +118,7 @@ export declare const actionSelectAllElementsInFrame: {
118
118
  gridStep: number;
119
119
  gridModeEnabled: boolean;
120
120
  viewModeEnabled: boolean;
121
+ hideAnnotations: boolean;
121
122
  selectedGroupIds: {
122
123
  [groupId: string]: boolean;
123
124
  };
@@ -292,6 +293,7 @@ export declare const actionRemoveAllElementsFromFrame: {
292
293
  gridStep: number;
293
294
  gridModeEnabled: boolean;
294
295
  viewModeEnabled: boolean;
296
+ hideAnnotations: boolean;
295
297
  selectedGroupIds: {
296
298
  [groupId: string]: boolean;
297
299
  };
@@ -467,6 +469,7 @@ export declare const actionupdateFrameRendering: {
467
469
  gridStep: number;
468
470
  gridModeEnabled: boolean;
469
471
  viewModeEnabled: boolean;
472
+ hideAnnotations: boolean;
470
473
  selectedGroupIds: {
471
474
  [groupId: string]: boolean;
472
475
  };
@@ -639,6 +642,7 @@ export declare const actionSetFrameAsActiveTool: {
639
642
  gridStep: number;
640
643
  gridModeEnabled: boolean;
641
644
  viewModeEnabled: boolean;
645
+ hideAnnotations: boolean;
642
646
  selectedGroupIds: {
643
647
  [groupId: string]: boolean;
644
648
  };
@@ -124,6 +124,7 @@ export declare const actionGroup: {
124
124
  gridStep: number;
125
125
  gridModeEnabled: boolean;
126
126
  viewModeEnabled: boolean;
127
+ hideAnnotations: boolean;
127
128
  width: number;
128
129
  height: number;
129
130
  offsetTop: number;
@@ -297,6 +298,7 @@ export declare const actionUngroup: {
297
298
  gridStep: number;
298
299
  gridModeEnabled: boolean;
299
300
  viewModeEnabled: boolean;
301
+ hideAnnotations: boolean;
300
302
  width: number;
301
303
  height: number;
302
304
  offsetTop: number;
@@ -152,6 +152,7 @@ export declare const actionToggleLinearEditor: {
152
152
  gridStep: number;
153
153
  gridModeEnabled: boolean;
154
154
  viewModeEnabled: boolean;
155
+ hideAnnotations: boolean;
155
156
  selectedGroupIds: {
156
157
  [groupId: string]: boolean;
157
158
  };
@@ -117,6 +117,7 @@ export declare const actionLink: {
117
117
  gridStep: number;
118
118
  gridModeEnabled: boolean;
119
119
  viewModeEnabled: boolean;
120
+ hideAnnotations: boolean;
120
121
  selectedGroupIds: {
121
122
  [groupId: string]: boolean;
122
123
  };
@@ -110,6 +110,7 @@ export declare const actionShortcuts: {
110
110
  gridStep: number;
111
111
  gridModeEnabled: boolean;
112
112
  viewModeEnabled: boolean;
113
+ hideAnnotations: boolean;
113
114
  selectedGroupIds: {
114
115
  [groupId: string]: boolean;
115
116
  };
@@ -146,6 +146,7 @@ export declare const actionDecreaseFontSize: {
146
146
  gridStep: number;
147
147
  gridModeEnabled: boolean;
148
148
  viewModeEnabled: boolean;
149
+ hideAnnotations: boolean;
149
150
  selectedGroupIds: {
150
151
  [groupId: string]: boolean;
151
152
  };
@@ -315,6 +316,7 @@ export declare const actionIncreaseFontSize: {
315
316
  gridStep: number;
316
317
  gridModeEnabled: boolean;
317
318
  viewModeEnabled: boolean;
319
+ hideAnnotations: boolean;
318
320
  selectedGroupIds: {
319
321
  [groupId: string]: boolean;
320
322
  };
@@ -122,6 +122,7 @@ export declare const actionSelectAll: {
122
122
  gridStep: number;
123
123
  gridModeEnabled: boolean;
124
124
  viewModeEnabled: boolean;
125
+ hideAnnotations: boolean;
125
126
  width: number;
126
127
  height: number;
127
128
  offsetTop: number;
@@ -117,6 +117,7 @@ export declare const actionCopyStyles: {
117
117
  gridStep: number;
118
118
  gridModeEnabled: boolean;
119
119
  viewModeEnabled: boolean;
120
+ hideAnnotations: boolean;
120
121
  selectedGroupIds: {
121
122
  [groupId: string]: boolean;
122
123
  };
@@ -123,6 +123,7 @@ export declare const actionToggleGridMode: {
123
123
  gridSize: number;
124
124
  gridStep: number;
125
125
  viewModeEnabled: boolean;
126
+ hideAnnotations: boolean;
126
127
  selectedGroupIds: {
127
128
  [groupId: string]: boolean;
128
129
  };
@@ -121,6 +121,7 @@ export declare const actionToggleObjectsSnapMode: {
121
121
  gridSize: number;
122
122
  gridStep: number;
123
123
  viewModeEnabled: boolean;
124
+ hideAnnotations: boolean;
124
125
  selectedGroupIds: {
125
126
  [groupId: string]: boolean;
126
127
  };
@@ -111,6 +111,7 @@ export declare const actionToggleSearchMenu: {
111
111
  gridStep: number;
112
112
  gridModeEnabled: boolean;
113
113
  viewModeEnabled: boolean;
114
+ hideAnnotations: boolean;
114
115
  selectedGroupIds: {
115
116
  [groupId: string]: boolean;
116
117
  };
@@ -124,6 +124,7 @@ export declare const actionToggleStats: {
124
124
  gridStep: number;
125
125
  gridModeEnabled: boolean;
126
126
  viewModeEnabled: boolean;
127
+ hideAnnotations: boolean;
127
128
  selectedGroupIds: {
128
129
  [groupId: string]: boolean;
129
130
  };
@@ -120,6 +120,7 @@ export declare const actionToggleViewMode: {
120
120
  gridSize: number;
121
121
  gridStep: number;
122
122
  gridModeEnabled: boolean;
123
+ hideAnnotations: boolean;
123
124
  selectedGroupIds: {
124
125
  [groupId: string]: boolean;
125
126
  };
@@ -120,6 +120,7 @@ export declare const actionToggleZenMode: {
120
120
  gridStep: number;
121
121
  gridModeEnabled: boolean;
122
122
  viewModeEnabled: boolean;
123
+ hideAnnotations: boolean;
123
124
  selectedGroupIds: {
124
125
  [groupId: string]: boolean;
125
126
  };
@@ -2,17 +2,18 @@ import type { AppState, NormalizedZoomValue } from "./types";
2
2
  export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
3
3
  export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
4
4
  viewBackgroundColor?: string | undefined;
5
+ theme?: import("@excalidraw/element/types").Theme | undefined;
5
6
  name?: string | null | undefined;
6
7
  zoom?: Readonly<{
7
8
  value: NormalizedZoomValue;
8
9
  }> | undefined;
9
10
  scrollX?: number | undefined;
10
11
  scrollY?: number | undefined;
12
+ hideAnnotations?: boolean | undefined;
11
13
  editingGroupId?: string | null | undefined;
12
14
  selectedElementIds?: Readonly<{
13
15
  [id: string]: true;
14
16
  }> | undefined;
15
- theme?: import("@excalidraw/element/types").Theme | undefined;
16
17
  selectedGroupIds?: {
17
18
  [groupId: string]: boolean;
18
19
  } | undefined;
@@ -230,6 +230,7 @@ declare class App extends React.Component<AppProps, AppState> {
230
230
  onScrollChangeEmitter: Emitter<[scrollX: number, scrollY: number, zoom: Readonly<{
231
231
  value: import("../types").NormalizedZoomValue;
232
232
  }>]>;
233
+ onHideAnnotationsChangeEmitter: Emitter<[hideAnnotations: boolean]>;
233
234
  missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
234
235
  onRemoveEventListenersEmitter: Emitter<[]>;
235
236
  constructor(props: AppProps);
@@ -259,7 +260,7 @@ declare class App extends React.Component<AppProps, AppState> {
259
260
  render(): import("react/jsx-runtime").JSX.Element;
260
261
  focusContainer: AppClassProperties["focusContainer"];
261
262
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
262
- getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
263
+ getSceneElementsMapIncludingDeleted: () => SceneElementsMap;
263
264
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
264
265
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
265
266
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -1,10 +1,13 @@
1
1
  import type { ColorPickerType } from "./colorPickerUtils";
2
- interface ColorInputProps {
2
+ /**
3
+ * tries to keep the input color as-is if it's valid, making minimal adjustments
4
+ * (trimming whitespace or adding `#` to hex colors)
5
+ */
6
+ export declare const normalizeInputColor: (color: string) => string | null;
7
+ export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: {
3
8
  color: string;
4
9
  onChange: (color: string) => void;
5
10
  label: string;
6
11
  colorPickerType: ColorPickerType;
7
12
  placeholder?: string;
8
- }
9
- export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,6 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
3
3
  import "./ColorPicker.scss";
4
4
  import type { ColorPickerType } from "./colorPickerUtils";
5
5
  import type { AppState } from "../../types";
6
- export declare const getColor: (color: string) => string | null;
7
6
  interface ColorPickerProps {
8
7
  type: ColorPickerType;
9
8
  /**
@@ -0,0 +1,8 @@
1
+ type EyeButtonProps = {
2
+ name?: string;
3
+ id?: string;
4
+ onClick?(): void;
5
+ status?: "on" | "off";
6
+ };
7
+ export declare const EyeButton: (props: EyeButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -12,6 +12,7 @@ type MobileMenuProps = {
12
12
  elements: readonly NonDeletedExcalidrawElement[];
13
13
  onHandToolToggle: () => void;
14
14
  onPenModeToggle: AppClassProperties["togglePenMode"];
15
+ onEyeButtonClick?: () => void;
15
16
  renderTopRightUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
16
17
  renderTopLeftUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
17
18
  renderSidebars: () => JSX.Element | null;
@@ -19,5 +20,5 @@ type MobileMenuProps = {
19
20
  UIOptions: AppProps["UIOptions"];
20
21
  app: AppClassProperties;
21
22
  };
22
- export declare const MobileMenu: ({ appState, elements, actionManager, setAppState, onHandToolToggle, renderTopLeftUI, renderTopRightUI, renderSidebars, renderWelcomeScreen, UIOptions, app, onPenModeToggle, }: MobileMenuProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const MobileMenu: ({ appState, elements, actionManager, setAppState, onHandToolToggle, renderTopLeftUI, renderTopRightUI, renderSidebars, renderWelcomeScreen, UIOptions, app, onPenModeToggle, onEyeButtonClick, }: MobileMenuProps) => import("react/jsx-runtime").JSX.Element;
23
24
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { ActionManager } from "../../actions/manager";
2
2
  import type { UIAppState } from "../../types";
3
3
  declare const Footer: {
4
- ({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, helpEnabled, showUndoRedo, isTopAligned, }: {
4
+ ({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, helpEnabled, showUndoRedo, isTopAligned, hideAnnotationsControlEnabled, onEyeButtonClick, }: {
5
5
  appState: UIAppState;
6
6
  actionManager: ActionManager;
7
7
  showExitZenModeBtn: boolean;
@@ -9,6 +9,8 @@ declare const Footer: {
9
9
  helpEnabled?: boolean;
10
10
  showUndoRedo: boolean;
11
11
  isTopAligned?: boolean;
12
+ hideAnnotationsControlEnabled?: boolean;
13
+ onEyeButtonClick?: () => void;
12
14
  }): import("react/jsx-runtime").JSX.Element;
13
15
  displayName: string;
14
16
  };
@@ -46,6 +46,8 @@ export declare const HamburgerMenuIcon: import("react/jsx-runtime").JSX.Element;
46
46
  export declare const ExportIcon: import("react/jsx-runtime").JSX.Element;
47
47
  export declare const HelpIcon: import("react/jsx-runtime").JSX.Element;
48
48
  export declare const HelpIconThin: import("react/jsx-runtime").JSX.Element;
49
+ export declare const EyeOnIcon: import("react/jsx-runtime").JSX.Element;
50
+ export declare const EyeOffIcon: import("react/jsx-runtime").JSX.Element;
49
51
  export declare const ExternalLinkIcon: import("react/jsx-runtime").JSX.Element;
50
52
  export declare const GithubIcon: import("react/jsx-runtime").JSX.Element;
51
53
  export declare const DiscordIcon: import("react/jsx-runtime").JSX.Element;
@@ -18,7 +18,163 @@ localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | nu
18
18
  /** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
19
19
  fileHandle?: FileSystemHandle | null) => Promise<{
20
20
  type: "application/vnd.excalidraw+json";
21
- data: import("./restore").RestoredDataState;
21
+ data: {
22
+ elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
23
+ appState: {
24
+ viewBackgroundColor: string;
25
+ theme: import("@excalidraw/element/types").Theme;
26
+ frameRendering: {
27
+ enabled: boolean;
28
+ name: boolean;
29
+ outline: boolean;
30
+ clip: boolean;
31
+ };
32
+ name: string | null;
33
+ zoom: import("../types").Zoom;
34
+ scrollX: number;
35
+ scrollY: number;
36
+ hideAnnotations: boolean;
37
+ viewModeEnabled: boolean;
38
+ openDialog: null | {
39
+ name: "imageExport" | "help" | "jsonExport";
40
+ } | {
41
+ name: "ttd";
42
+ tab: "text-to-diagram" | "mermaid";
43
+ } | {
44
+ name: "commandPalette";
45
+ } | {
46
+ name: "settings";
47
+ } | {
48
+ name: "elementLinkSelector";
49
+ sourceElementId: ExcalidrawElement["id"];
50
+ };
51
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
52
+ selectedElementIds: Readonly<{
53
+ [id: string]: true;
54
+ }>;
55
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
56
+ activeEmbeddable: {
57
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
58
+ state: "hover" | "active";
59
+ } | null;
60
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
61
+ selectedGroupIds: {
62
+ [groupId: string]: boolean;
63
+ };
64
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
65
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
66
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
67
+ isBindingEnabled: boolean;
68
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
69
+ isRotating: boolean;
70
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
71
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
72
+ snapLines: readonly import("../snapping").SnapLine[];
73
+ zenModeEnabled: boolean;
74
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
75
+ isCropping: boolean;
76
+ croppingElementId: ExcalidrawElement["id"] | null;
77
+ searchMatches: Readonly<{
78
+ focusedId: ExcalidrawElement["id"] | null;
79
+ matches: readonly import("../types").SearchMatch[];
80
+ }> | null;
81
+ activeLockedId: string | null;
82
+ hoveredElementIds: Readonly<{
83
+ [id: string]: true;
84
+ }>;
85
+ shouldCacheIgnoreZoom: boolean;
86
+ exportScale: number;
87
+ bindMode: import("@excalidraw/element/types").BindMode;
88
+ gridSize: number;
89
+ contextMenu: {
90
+ items: import("../components/ContextMenu").ContextMenuItems;
91
+ top: number;
92
+ left: number;
93
+ } | null;
94
+ showWelcomeScreen: boolean;
95
+ isLoading: boolean;
96
+ errorMessage: React.ReactNode;
97
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
98
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
99
+ editingFrame: string | null;
100
+ activeTool: {
101
+ lastActiveTool: import("../types").ActiveTool | null;
102
+ locked: boolean;
103
+ fromSelection: boolean;
104
+ } & import("../types").ActiveTool;
105
+ preferredSelectionTool: {
106
+ type: "selection" | "lasso";
107
+ initialized: boolean;
108
+ };
109
+ penMode: boolean;
110
+ penDetected: boolean;
111
+ exportBackground: boolean;
112
+ exportEmbedScene: boolean;
113
+ exportWithDarkMode: boolean;
114
+ currentItemStrokeColor: string;
115
+ currentItemBackgroundColor: string;
116
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
117
+ currentItemStrokeWidth: number;
118
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
119
+ currentItemRoughness: number;
120
+ currentItemOpacity: number;
121
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
122
+ currentItemFontSize: number;
123
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
124
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
125
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
126
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
127
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
128
+ currentItemArrowType: "sharp" | "round" | "elbow";
129
+ cursorButton: "up" | "down";
130
+ scrolledOutside: boolean;
131
+ isResizing: boolean;
132
+ openMenu: "canvas" | null;
133
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
134
+ openSidebar: {
135
+ name: import("../types").SidebarName;
136
+ tab?: import("../types").SidebarTabName;
137
+ } | null;
138
+ defaultSidebarDockedPreference: boolean;
139
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
140
+ previousSelectedElementIds: {
141
+ [id: string]: true;
142
+ };
143
+ selectedElementsAreBeingDragged: boolean;
144
+ toast: {
145
+ message: string;
146
+ closable?: boolean;
147
+ duration?: number;
148
+ } | null;
149
+ gridStep: number;
150
+ gridModeEnabled: boolean;
151
+ fileHandle: FileSystemHandle | null;
152
+ stats: {
153
+ open: boolean;
154
+ panels: number;
155
+ };
156
+ currentChartType: import("@excalidraw/element/types").ChartType;
157
+ pasteDialog: {
158
+ shown: false;
159
+ data: null;
160
+ } | {
161
+ shown: true;
162
+ data: import("../charts").Spreadsheet;
163
+ };
164
+ showHyperlinkPopup: false | "info" | "editor";
165
+ originSnapOffset: {
166
+ x: number;
167
+ y: number;
168
+ } | null;
169
+ objectsSnapModeEnabled: boolean;
170
+ userToFollow: import("../types").UserToFollow | null;
171
+ followedBy: Set<import("../types").SocketId>;
172
+ lockedMultiSelections: {
173
+ [groupId: string]: true;
174
+ };
175
+ };
176
+ files: import("../types").BinaryFiles;
177
+ };
22
178
  } | {
23
179
  type: "application/vnd.excalidrawlib+json";
24
180
  data: ImportedLibraryData;
@@ -27,7 +183,163 @@ export declare const loadFromBlob: (blob: Blob,
27
183
  /** @see restore.localAppState */
28
184
  localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
29
185
  /** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
30
- fileHandle?: FileSystemHandle | null) => Promise<import("./restore").RestoredDataState>;
186
+ fileHandle?: FileSystemHandle | null) => Promise<{
187
+ elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
188
+ appState: {
189
+ viewBackgroundColor: string;
190
+ theme: import("@excalidraw/element/types").Theme;
191
+ frameRendering: {
192
+ enabled: boolean;
193
+ name: boolean;
194
+ outline: boolean;
195
+ clip: boolean;
196
+ };
197
+ name: string | null;
198
+ zoom: import("../types").Zoom;
199
+ scrollX: number;
200
+ scrollY: number;
201
+ hideAnnotations: boolean;
202
+ viewModeEnabled: boolean;
203
+ openDialog: null | {
204
+ name: "imageExport" | "help" | "jsonExport";
205
+ } | {
206
+ name: "ttd";
207
+ tab: "text-to-diagram" | "mermaid";
208
+ } | {
209
+ name: "commandPalette";
210
+ } | {
211
+ name: "settings";
212
+ } | {
213
+ name: "elementLinkSelector";
214
+ sourceElementId: ExcalidrawElement["id"];
215
+ };
216
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
217
+ selectedElementIds: Readonly<{
218
+ [id: string]: true;
219
+ }>;
220
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
221
+ activeEmbeddable: {
222
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
223
+ state: "hover" | "active";
224
+ } | null;
225
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
226
+ selectedGroupIds: {
227
+ [groupId: string]: boolean;
228
+ };
229
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
230
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
231
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
232
+ isBindingEnabled: boolean;
233
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
234
+ isRotating: boolean;
235
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
236
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
237
+ snapLines: readonly import("../snapping").SnapLine[];
238
+ zenModeEnabled: boolean;
239
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
240
+ isCropping: boolean;
241
+ croppingElementId: ExcalidrawElement["id"] | null;
242
+ searchMatches: Readonly<{
243
+ focusedId: ExcalidrawElement["id"] | null;
244
+ matches: readonly import("../types").SearchMatch[];
245
+ }> | null;
246
+ activeLockedId: string | null;
247
+ hoveredElementIds: Readonly<{
248
+ [id: string]: true;
249
+ }>;
250
+ shouldCacheIgnoreZoom: boolean;
251
+ exportScale: number;
252
+ bindMode: import("@excalidraw/element/types").BindMode;
253
+ gridSize: number;
254
+ contextMenu: {
255
+ items: import("../components/ContextMenu").ContextMenuItems;
256
+ top: number;
257
+ left: number;
258
+ } | null;
259
+ showWelcomeScreen: boolean;
260
+ isLoading: boolean;
261
+ errorMessage: React.ReactNode;
262
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
263
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
264
+ editingFrame: string | null;
265
+ activeTool: {
266
+ lastActiveTool: import("../types").ActiveTool | null;
267
+ locked: boolean;
268
+ fromSelection: boolean;
269
+ } & import("../types").ActiveTool;
270
+ preferredSelectionTool: {
271
+ type: "selection" | "lasso";
272
+ initialized: boolean;
273
+ };
274
+ penMode: boolean;
275
+ penDetected: boolean;
276
+ exportBackground: boolean;
277
+ exportEmbedScene: boolean;
278
+ exportWithDarkMode: boolean;
279
+ currentItemStrokeColor: string;
280
+ currentItemBackgroundColor: string;
281
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
282
+ currentItemStrokeWidth: number;
283
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
284
+ currentItemRoughness: number;
285
+ currentItemOpacity: number;
286
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
287
+ currentItemFontSize: number;
288
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
289
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
290
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
291
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
292
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
293
+ currentItemArrowType: "sharp" | "round" | "elbow";
294
+ cursorButton: "up" | "down";
295
+ scrolledOutside: boolean;
296
+ isResizing: boolean;
297
+ openMenu: "canvas" | null;
298
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
299
+ openSidebar: {
300
+ name: import("../types").SidebarName;
301
+ tab?: import("../types").SidebarTabName;
302
+ } | null;
303
+ defaultSidebarDockedPreference: boolean;
304
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
305
+ previousSelectedElementIds: {
306
+ [id: string]: true;
307
+ };
308
+ selectedElementsAreBeingDragged: boolean;
309
+ toast: {
310
+ message: string;
311
+ closable?: boolean;
312
+ duration?: number;
313
+ } | null;
314
+ gridStep: number;
315
+ gridModeEnabled: boolean;
316
+ fileHandle: FileSystemHandle | null;
317
+ stats: {
318
+ open: boolean;
319
+ panels: number;
320
+ };
321
+ currentChartType: import("@excalidraw/element/types").ChartType;
322
+ pasteDialog: {
323
+ shown: false;
324
+ data: null;
325
+ } | {
326
+ shown: true;
327
+ data: import("../charts").Spreadsheet;
328
+ };
329
+ showHyperlinkPopup: false | "info" | "editor";
330
+ originSnapOffset: {
331
+ x: number;
332
+ y: number;
333
+ } | null;
334
+ objectsSnapModeEnabled: boolean;
335
+ userToFollow: import("../types").UserToFollow | null;
336
+ followedBy: Set<import("../types").SocketId>;
337
+ lockedMultiSelections: {
338
+ [groupId: string]: true;
339
+ };
340
+ };
341
+ files: import("../types").BinaryFiles;
342
+ }>;
31
343
  export declare const parseLibraryJSON: (json: string, defaultStatus?: LibraryItem["status"]) => LibraryItem[];
32
344
  export declare const loadLibraryFromBlob: (blob: Blob, defaultStatus?: LibraryItem["status"]) => Promise<LibraryItem[]>;
33
345
  export declare const canvasToBlob: (canvas: HTMLCanvasElement | Promise<HTMLCanvasElement>) => Promise<Blob>;