@excalidraw/excalidraw 0.17.0-a528769 → 0.17.0-dd220bc

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 (82) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/excalidraw-assets-dev/{vendor-18203854dd3b1fb2cc41.js → vendor-0aa6bd65c58be7c84e9c.js} +2 -2
  3. package/dist/excalidraw-with-preact.development.js +372 -75
  4. package/dist/excalidraw-with-preact.production.min.js +1 -1
  5. package/dist/excalidraw.development.js +372 -75
  6. package/dist/excalidraw.production.min.js +1 -1
  7. package/package.json +1 -1
  8. package/types/actions/actionAddToLibrary.d.ts +33 -6
  9. package/types/actions/actionBoundText.d.ts +22 -4
  10. package/types/actions/actionCanvas.d.ts +121 -22
  11. package/types/actions/actionClipboard.d.ts +77 -14
  12. package/types/actions/actionDeleteSelected.d.ts +33 -6
  13. package/types/actions/actionElementLock.d.ts +22 -4
  14. package/types/actions/actionExport.d.ts +94 -22
  15. package/types/actions/actionFinalize.d.ts +22 -4
  16. package/types/actions/actionFrame.d.ts +33 -6
  17. package/types/actions/actionGroup.d.ts +22 -4
  18. package/types/actions/actionLinearEditor.d.ts +11 -2
  19. package/types/actions/actionMenu.d.ts +26 -6
  20. package/types/actions/actionProperties.d.ts +143 -26
  21. package/types/actions/actionSelectAll.d.ts +11 -2
  22. package/types/actions/actionStyles.d.ts +11 -2
  23. package/types/actions/actionToggleGridMode.d.ts +11 -2
  24. package/types/actions/actionToggleObjectsSnapMode.d.ts +11 -2
  25. package/types/actions/actionToggleStats.d.ts +11 -2
  26. package/types/actions/actionToggleViewMode.d.ts +11 -2
  27. package/types/actions/actionToggleZenMode.d.ts +11 -2
  28. package/types/appState.d.ts +2 -2
  29. package/types/components/App.d.ts +27 -6
  30. package/types/components/Button.d.ts +1 -1
  31. package/types/components/InlineIcon.d.ts +3 -0
  32. package/types/components/LayerUI.d.ts +5 -1
  33. package/types/components/MagicButton.d.ts +9 -0
  34. package/types/components/MagicSettings.d.ts +8 -0
  35. package/types/components/Paragraph.d.ts +4 -0
  36. package/types/components/TTDDialog/MermaidToExcalidraw.d.ts +6 -0
  37. package/types/components/TTDDialog/TTDDialog.d.ts +29 -0
  38. package/types/components/TTDDialog/TTDDialogInput.d.ts +9 -0
  39. package/types/components/TTDDialog/TTDDialogOutput.d.ts +7 -0
  40. package/types/components/TTDDialog/TTDDialogPanel.d.ts +16 -0
  41. package/types/components/TTDDialog/TTDDialogPanels.d.ts +4 -0
  42. package/types/components/TTDDialog/TTDDialogTab.d.ts +7 -0
  43. package/types/components/TTDDialog/TTDDialogTabTrigger.d.ts +8 -0
  44. package/types/components/TTDDialog/TTDDialogTabTriggers.d.ts +6 -0
  45. package/types/components/TTDDialog/TTDDialogTabs.d.ts +14 -0
  46. package/types/components/TTDDialog/TTDDialogTrigger.d.ts +8 -0
  47. package/types/components/TTDDialog/common.d.ts +33 -0
  48. package/types/components/TextField.d.ts +16 -0
  49. package/types/components/dropdownMenu/DropdownMenu.d.ts +6 -0
  50. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
  51. package/types/components/icons.d.ts +6 -0
  52. package/types/components/main-menu/MainMenu.d.ts +6 -0
  53. package/types/constants.d.ts +24 -2
  54. package/types/context/tunnels.d.ts +1 -0
  55. package/types/data/EditorLocalStorage.d.ts +8 -0
  56. package/types/data/ai/types.d.ts +242 -0
  57. package/types/data/index.d.ts +3 -3
  58. package/types/data/magic.d.ts +23 -0
  59. package/types/data/transform.d.ts +11 -7
  60. package/types/element/ElementCanvasButtons.d.ts +6 -0
  61. package/types/element/Hyperlink.d.ts +11 -2
  62. package/types/element/collision.d.ts +2 -2
  63. package/types/element/embeddable.d.ts +17 -21
  64. package/types/element/index.d.ts +3 -4
  65. package/types/element/linearElementEditor.d.ts +12 -3
  66. package/types/element/newElement.d.ts +7 -1
  67. package/types/element/textElement.d.ts +2 -2
  68. package/types/element/typeChecks.d.ts +9 -6
  69. package/types/element/types.d.ts +29 -2
  70. package/types/frame.d.ts +21 -20
  71. package/types/packages/excalidraw/index.d.ts +2 -0
  72. package/types/packages/utils.d.ts +2 -2
  73. package/types/scene/Scene.d.ts +4 -4
  74. package/types/scene/ShapeCache.d.ts +1 -1
  75. package/types/scene/comparisons.d.ts +7 -6
  76. package/types/scene/export.d.ts +3 -3
  77. package/types/scene/types.d.ts +2 -0
  78. package/types/shapes.d.ts +1 -1
  79. package/types/types.d.ts +25 -10
  80. package/types/utils.d.ts +2 -2
  81. package/types/components/MermaidToExcalidraw.d.ts +0 -3
  82. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-18203854dd3b1fb2cc41.d.ts → vendor-0aa6bd65c58be7c84e9c.d.ts} +0 -0
@@ -4,7 +4,7 @@ import { ActionManager } from "../actions/manager";
4
4
  import { EXPORT_IMAGE_TYPES } from "../constants";
5
5
  import { ExportedElements } from "../data";
6
6
  import { LinearElementEditor } from "../element/linearElementEditor";
7
- import { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameElement } from "../element/types";
7
+ import { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement } from "../element/types";
8
8
  import History from "../history";
9
9
  import Scene from "../scene/Scene";
10
10
  import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType } from "../types";
@@ -45,7 +45,6 @@ declare class App extends React.Component<AppProps, AppState> {
45
45
  actionManager: ActionManager;
46
46
  device: Device;
47
47
  private excalidrawContainerRef;
48
- static defaultProps: Partial<AppProps>;
49
48
  scene: Scene;
50
49
  renderer: Renderer;
51
50
  private fonts;
@@ -210,10 +209,10 @@ declare class App extends React.Component<AppProps, AppState> {
210
209
  }>, event: PointerEvent]>;
211
210
  constructor(props: AppProps);
212
211
  private onWindowMessage;
213
- private updateEmbeddableRef;
212
+ private cacheEmbeddableRef;
214
213
  private getHTMLIFrameElement;
215
214
  private handleEmbeddableCenterClick;
216
- private isEmbeddableCenter;
215
+ private isIframeLikeElementCenter;
217
216
  private updateEmbeddables;
218
217
  private renderEmbeddables;
219
218
  private getFrameNameDOMId;
@@ -225,8 +224,18 @@ declare class App extends React.Component<AppProps, AppState> {
225
224
  getSceneElements: () => readonly NonDeletedExcalidrawElement[];
226
225
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
227
226
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
228
- exportingFrame: ExcalidrawFrameElement | null;
227
+ exportingFrame: ExcalidrawFrameLikeElement | null;
229
228
  }) => Promise<void>;
229
+ private magicGenerations;
230
+ private updateMagicGeneration;
231
+ private getTextFromElements;
232
+ private onMagicFrameGenerate;
233
+ private onIframeSrcCopy;
234
+ private OPENAI_KEY;
235
+ private OPENAI_KEY_IS_PERSISTED;
236
+ private onOpenAIKeyChange;
237
+ private onMagicSettingsConfirm;
238
+ onMagicframeToolSelect: () => void;
230
239
  private openEyeDropper;
231
240
  private syncActionResult;
232
241
  private onBlur;
@@ -246,6 +255,8 @@ declare class App extends React.Component<AppProps, AppState> {
246
255
  componentWillUnmount(): void;
247
256
  private onResize;
248
257
  private removeEventListeners;
258
+ /** generally invoked only if fullscreen was invoked programmatically */
259
+ private onFullscreenChange;
249
260
  private addEventListeners;
250
261
  componentDidUpdate(prevProps: AppProps, prevState: AppState): void;
251
262
  private renderInteractiveSceneCallback;
@@ -386,7 +397,17 @@ declare class App extends React.Component<AppProps, AppState> {
386
397
  private isHittingCommonBoundingBoxOfSelectedElements;
387
398
  private handleTextOnPointerDown;
388
399
  private handleFreeDrawElementOnPointerDown;
389
- private insertEmbeddableElement;
400
+ insertIframeElement: ({ sceneX, sceneY, width, height, }: {
401
+ sceneX: number;
402
+ sceneY: number;
403
+ width: number;
404
+ height: number;
405
+ }) => NonDeleted<ExcalidrawIframeElement>;
406
+ insertEmbeddableElement: ({ sceneX, sceneY, link, }: {
407
+ sceneX: number;
408
+ sceneY: number;
409
+ link: string;
410
+ }) => NonDeleted<import("../element/types").ExcalidrawEmbeddableElement> | undefined;
390
411
  private createImageElement;
391
412
  private handleLinearElementOnPointerDown;
392
413
  private getCurrentItemRoundness;
@@ -1,5 +1,5 @@
1
1
  import "./Button.scss";
2
- interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
2
+ interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
3
3
  type?: "button" | "submit" | "reset";
4
4
  onSelect: () => any;
5
5
  /** whether button is in active state */
@@ -0,0 +1,3 @@
1
+ export declare const InlineIcon: ({ icon }: {
2
+ icon: JSX.Element;
3
+ }) => JSX.Element;
@@ -25,6 +25,10 @@ interface LayerUIProps {
25
25
  children?: React.ReactNode;
26
26
  app: AppClassProperties;
27
27
  isCollaborating: boolean;
28
+ openAIKey: string | null;
29
+ isOpenAIKeyPersisted: boolean;
30
+ onOpenAIAPIKeyChange: (apiKey: string, shouldPersist: boolean) => void;
31
+ onMagicSettingsConfirm: (apiKey: string, shouldPersist: boolean, source: "tool" | "generation" | "settings") => void;
28
32
  }
29
- declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, }: LayerUIProps) => JSX.Element>;
33
+ declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, openAIKey, isOpenAIKeyPersisted, onOpenAIAPIKeyChange, onMagicSettingsConfirm, }: LayerUIProps) => JSX.Element>;
30
34
  export default _default;
@@ -0,0 +1,9 @@
1
+ import "./ToolIcon.scss";
2
+ export declare const ElementCanvasButton: (props: {
3
+ title?: string;
4
+ icon: JSX.Element;
5
+ name?: string;
6
+ checked: boolean;
7
+ onChange?(): void;
8
+ isMobile?: boolean;
9
+ }) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import "./MagicSettings.scss";
2
+ export declare const MagicSettings: (props: {
3
+ openAIKey: string | null;
4
+ isPersisted: boolean;
5
+ onChange: (key: string, shouldPersist: boolean) => void;
6
+ onConfirm: (key: string, shouldPersist: boolean) => void;
7
+ onClose: () => void;
8
+ }) => JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export declare const Paragraph: (props: {
2
+ children: React.ReactNode;
3
+ style?: React.CSSProperties;
4
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import "./MermaidToExcalidraw.scss";
2
+ import { MermaidToExcalidrawLibProps } from "./common";
3
+ declare const MermaidToExcalidraw: ({ mermaidToExcalidrawLib, }: {
4
+ mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
5
+ }) => JSX.Element;
6
+ export default MermaidToExcalidraw;
@@ -0,0 +1,29 @@
1
+ import "./TTDDialog.scss";
2
+ type OnTestSubmitRetValue = {
3
+ rateLimit?: number | null;
4
+ rateLimitRemaining?: number | null;
5
+ } & ({
6
+ generatedResponse: string | undefined;
7
+ error?: null | undefined;
8
+ } | {
9
+ error: Error;
10
+ generatedResponse?: null | undefined;
11
+ });
12
+ export declare const TTDDialog: (props: {
13
+ onTextSubmit(value: string): Promise<OnTestSubmitRetValue>;
14
+ } | {
15
+ __fallback: true;
16
+ }) => JSX.Element | null;
17
+ /**
18
+ * Text to diagram (TTD) dialog
19
+ */
20
+ export declare const TTDDialogBase: import("react").FC<({
21
+ tab: "text-to-diagram" | "mermaid";
22
+ } & ({
23
+ onTextSubmit(value: string): Promise<OnTestSubmitRetValue>;
24
+ } | {
25
+ __fallback: true;
26
+ })) & {
27
+ __fallback?: boolean | undefined;
28
+ }>;
29
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ChangeEventHandler } from "react";
2
+ interface TTDDialogInputProps {
3
+ input: string;
4
+ placeholder: string;
5
+ onChange: ChangeEventHandler<HTMLTextAreaElement>;
6
+ onKeyboardSubmit?: () => void;
7
+ }
8
+ export declare const TTDDialogInput: ({ input, placeholder, onChange, onKeyboardSubmit, }: TTDDialogInputProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ interface TTDDialogOutputProps {
2
+ error: Error | null;
3
+ canvasRef: React.RefObject<HTMLDivElement>;
4
+ loaded: boolean;
5
+ }
6
+ export declare const TTDDialogOutput: ({ error, canvasRef, loaded, }: TTDDialogOutputProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from "react";
2
+ interface TTDDialogPanelProps {
3
+ label: string;
4
+ children: ReactNode;
5
+ panelAction?: {
6
+ label: string;
7
+ action: () => void;
8
+ icon?: ReactNode;
9
+ };
10
+ panelActionDisabled?: boolean;
11
+ onTextSubmitInProgess?: boolean;
12
+ renderTopRight?: () => ReactNode;
13
+ renderBottomRight?: () => ReactNode;
14
+ }
15
+ export declare const TTDDialogPanel: ({ label, children, panelAction, panelActionDisabled, onTextSubmitInProgess, renderTopRight, renderBottomRight, }: TTDDialogPanelProps) => JSX.Element;
16
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from "react";
2
+ export declare const TTDDialogPanels: ({ children }: {
3
+ children: ReactNode;
4
+ }) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare const TTDDialogTab: {
2
+ ({ tab, children, ...rest }: {
3
+ tab: string;
4
+ children: React.ReactNode;
5
+ } & import("react").HTMLAttributes<HTMLDivElement>): JSX.Element;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,8 @@
1
+ export declare const TTDDialogTabTrigger: {
2
+ ({ children, tab, onSelect, ...rest }: {
3
+ children: React.ReactNode;
4
+ tab: string;
5
+ onSelect?: React.ReactEventHandler<HTMLButtonElement> | undefined;
6
+ } & Omit<import("react").HTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
7
+ displayName: string;
8
+ };
@@ -0,0 +1,6 @@
1
+ export declare const TTDDialogTabTriggers: {
2
+ ({ children, ...rest }: {
3
+ children: React.ReactNode;
4
+ } & import("react").HTMLAttributes<HTMLDivElement>): JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from "react";
2
+ declare const TTDDialogTabs: {
3
+ (props: {
4
+ children: ReactNode;
5
+ } & ({
6
+ dialog: "ttd";
7
+ tab: "text-to-diagram" | "mermaid";
8
+ } | {
9
+ dialog: "settings";
10
+ tab: "text-to-diagram" | "diagram-to-code";
11
+ })): JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export default TTDDialogTabs;
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from "react";
2
+ export declare const TTDDialogTrigger: {
3
+ ({ children, icon, }: {
4
+ children?: ReactNode;
5
+ icon?: JSX.Element | undefined;
6
+ }): JSX.Element;
7
+ displayName: string;
8
+ };
@@ -0,0 +1,33 @@
1
+ import { MermaidOptions } from "@excalidraw/mermaid-to-excalidraw";
2
+ import { MermaidToExcalidrawResult } from "@excalidraw/mermaid-to-excalidraw/dist/interfaces";
3
+ import { NonDeletedExcalidrawElement } from "../../element/types";
4
+ import { AppClassProperties, BinaryFiles } from "../../types";
5
+ export interface MermaidToExcalidrawLibProps {
6
+ loaded: boolean;
7
+ api: Promise<{
8
+ parseMermaidToExcalidraw: (definition: string, options: MermaidOptions) => Promise<MermaidToExcalidrawResult>;
9
+ }>;
10
+ }
11
+ interface ConvertMermaidToExcalidrawFormatProps {
12
+ canvasRef: React.RefObject<HTMLDivElement>;
13
+ mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
14
+ mermaidDefinition: string;
15
+ setError: (error: Error | null) => void;
16
+ data: React.MutableRefObject<{
17
+ elements: readonly NonDeletedExcalidrawElement[];
18
+ files: BinaryFiles | null;
19
+ }>;
20
+ }
21
+ export declare const convertMermaidToExcalidraw: ({ canvasRef, mermaidToExcalidrawLib, mermaidDefinition, setError, data, }: ConvertMermaidToExcalidrawFormatProps) => Promise<void>;
22
+ export declare const LOCAL_STORAGE_KEY_MERMAID_TO_EXCALIDRAW = "mermaid-to-excalidraw";
23
+ export declare const saveMermaidDataToStorage: (data: string) => void;
24
+ export declare const insertToEditor: ({ app, data, text, shouldSaveMermaidDataToStorage, }: {
25
+ app: AppClassProperties;
26
+ data: React.MutableRefObject<{
27
+ elements: readonly NonDeletedExcalidrawElement[];
28
+ files: BinaryFiles | null;
29
+ }>;
30
+ text?: string | undefined;
31
+ shouldSaveMermaidDataToStorage?: boolean | undefined;
32
+ }) => void;
33
+ export {};
@@ -0,0 +1,16 @@
1
+ import { KeyboardEvent } from "react";
2
+ import "./TextField.scss";
3
+ type TextFieldProps = {
4
+ value?: string;
5
+ onChange?: (value: string) => void;
6
+ onClick?: () => void;
7
+ onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
8
+ readonly?: boolean;
9
+ fullWidth?: boolean;
10
+ selectOnRender?: boolean;
11
+ label?: string;
12
+ placeholder?: string;
13
+ isRedacted?: boolean;
14
+ };
15
+ export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
16
+ export {};
@@ -34,6 +34,12 @@ declare const DropdownMenu: {
34
34
  className?: string | undefined;
35
35
  } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
36
36
  displayName: string;
37
+ Badge: {
38
+ ({ children, }: {
39
+ children: React.ReactNode;
40
+ }): JSX.Element;
41
+ displayName: string;
42
+ };
37
43
  };
38
44
  ItemLink: {
39
45
  ({ icon, shortcut, href, children, onSelect, className, selected, ...rest }: {
@@ -9,5 +9,17 @@ declare const DropdownMenuItem: {
9
9
  className?: string | undefined;
10
10
  } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
11
11
  displayName: string;
12
+ Badge: {
13
+ ({ children, }: {
14
+ children: React.ReactNode;
15
+ }): JSX.Element;
16
+ displayName: string;
17
+ };
18
+ };
19
+ export declare const DropDownMenuItemBadge: {
20
+ ({ children, }: {
21
+ children: React.ReactNode;
22
+ }): JSX.Element;
23
+ displayName: string;
12
24
  };
13
25
  export default DropdownMenuItem;
@@ -153,4 +153,10 @@ export declare const frameToolIcon: JSX.Element;
153
153
  export declare const mermaidLogoIcon: JSX.Element;
154
154
  export declare const ArrowRightIcon: JSX.Element;
155
155
  export declare const laserPointerToolIcon: JSX.Element;
156
+ export declare const MagicIcon: JSX.Element;
157
+ export declare const OpenAIIcon: JSX.Element;
158
+ export declare const fullscreenIcon: JSX.Element;
159
+ export declare const eyeIcon: JSX.Element;
160
+ export declare const eyeClosedIcon: JSX.Element;
161
+ export declare const brainIcon: JSX.Element;
156
162
  export {};
@@ -28,6 +28,12 @@ declare const MainMenu: React.FC<{
28
28
  className?: string | undefined;
29
29
  } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
30
30
  displayName: string;
31
+ Badge: {
32
+ ({ children, }: {
33
+ children: React.ReactNode;
34
+ }): JSX.Element;
35
+ displayName: string;
36
+ };
31
37
  };
32
38
  ItemLink: {
33
39
  ({ icon, shortcut, href, children, onSelect, className, selected, ...rest }: {
@@ -63,7 +63,8 @@ export declare enum EVENT {
63
63
  SCROLL = "scroll",
64
64
  EXCALIDRAW_LINK = "excalidraw-link",
65
65
  MENU_ITEM_SELECT = "menu.itemSelect",
66
- MESSAGE = "message"
66
+ MESSAGE = "message",
67
+ FULLSCREENCHANGE = "fullscreenchange"
67
68
  }
68
69
  export declare const YOUTUBE_STATES: {
69
70
  readonly UNSTARTED: -1;
@@ -242,4 +243,25 @@ export declare const DEFAULT_SIDEBAR: {
242
243
  readonly name: "default";
243
244
  readonly defaultTab: "library";
244
245
  };
245
- export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "image">;
246
+ export declare const LIBRARY_DISABLED_TYPES: Set<"image" | "embeddable" | "iframe">;
247
+ export declare const TOOL_TYPE: {
248
+ readonly selection: "selection";
249
+ readonly rectangle: "rectangle";
250
+ readonly diamond: "diamond";
251
+ readonly ellipse: "ellipse";
252
+ readonly arrow: "arrow";
253
+ readonly line: "line";
254
+ readonly freedraw: "freedraw";
255
+ readonly text: "text";
256
+ readonly image: "image";
257
+ readonly eraser: "eraser";
258
+ readonly hand: "hand";
259
+ readonly frame: "frame";
260
+ readonly magicframe: "magicframe";
261
+ readonly embeddable: "embeddable";
262
+ readonly laser: "laser";
263
+ };
264
+ export declare const EDITOR_LS_KEYS: {
265
+ readonly OAI_API_KEY: "excalidraw-oai-api-key";
266
+ readonly PUBLISH_LIBRARY: "publish-library-data";
267
+ };
@@ -11,6 +11,7 @@ type TunnelsContextValue = {
11
11
  DefaultSidebarTriggerTunnel: Tunnel;
12
12
  DefaultSidebarTabTriggersTunnel: Tunnel;
13
13
  OverwriteConfirmDialogTunnel: Tunnel;
14
+ TTDDialogTriggerTunnel: Tunnel;
14
15
  jotaiScope: symbol;
15
16
  };
16
17
  export declare const TunnelsContext: React.Context<TunnelsContextValue>;
@@ -0,0 +1,8 @@
1
+ import { EDITOR_LS_KEYS } from "../constants";
2
+ import { JSONValue } from "../types";
3
+ export declare class EditorLocalStorage {
4
+ static has(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): boolean;
5
+ static get<T extends JSONValue>(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): T | null;
6
+ static set: (key: (typeof EDITOR_LS_KEYS)[keyof typeof EDITOR_LS_KEYS], value: JSONValue) => boolean;
7
+ static delete: (name: (typeof EDITOR_LS_KEYS)[keyof typeof EDITOR_LS_KEYS]) => void;
8
+ }