@zsviczian/excalidraw 0.17.0-obsidian-1 → 0.17.0-obsidian-3
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.
- package/dist/excalidraw.development.js +372 -75
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +30 -6
- package/types/actions/actionBoundText.d.ts +20 -4
- package/types/actions/actionCanvas.d.ts +130 -26
- package/types/actions/actionClipboard.d.ts +70 -14
- package/types/actions/actionDeleteSelected.d.ts +30 -6
- package/types/actions/actionElementLock.d.ts +20 -4
- package/types/actions/actionExport.d.ts +86 -22
- package/types/actions/actionFinalize.d.ts +20 -4
- package/types/actions/actionFrame.d.ts +30 -6
- package/types/actions/actionGroup.d.ts +20 -4
- package/types/actions/actionLinearEditor.d.ts +10 -2
- package/types/actions/actionMenu.d.ts +24 -6
- package/types/actions/actionProperties.d.ts +130 -26
- package/types/actions/actionSelectAll.d.ts +10 -2
- package/types/actions/actionStyles.d.ts +10 -2
- package/types/actions/actionToggleGridMode.d.ts +10 -2
- package/types/actions/actionToggleObjectsSnapMode.d.ts +10 -2
- package/types/actions/actionToggleStats.d.ts +10 -2
- package/types/actions/actionToggleViewMode.d.ts +10 -2
- package/types/actions/actionToggleZenMode.d.ts +10 -2
- package/types/appState.d.ts +2 -2
- package/types/components/App.d.ts +28 -6
- package/types/components/Button.d.ts +1 -1
- package/types/components/InlineIcon.d.ts +3 -0
- package/types/components/LayerUI.d.ts +5 -1
- package/types/components/MagicButton.d.ts +9 -0
- package/types/components/MagicSettings.d.ts +8 -0
- package/types/components/Paragraph.d.ts +4 -0
- package/types/components/TTDDialog/MermaidToExcalidraw.d.ts +13 -0
- package/types/components/TTDDialog/TTDDialog.d.ts +29 -0
- package/types/components/TTDDialog/TTDDialogInput.d.ts +9 -0
- package/types/components/TTDDialog/TTDDialogOutput.d.ts +7 -0
- package/types/components/TTDDialog/TTDDialogPanel.d.ts +16 -0
- package/types/components/TTDDialog/TTDDialogPanels.d.ts +4 -0
- package/types/components/TTDDialog/TTDDialogTab.d.ts +7 -0
- package/types/components/TTDDialog/TTDDialogTabTrigger.d.ts +8 -0
- package/types/components/TTDDialog/TTDDialogTabTriggers.d.ts +6 -0
- package/types/components/TTDDialog/TTDDialogTabs.d.ts +9 -0
- package/types/components/TTDDialog/TTDDialogTrigger.d.ts +8 -0
- package/types/components/TTDDialog/common.d.ts +33 -0
- package/types/components/TextField.d.ts +16 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
- package/types/components/icons.d.ts +6 -0
- package/types/components/main-menu/MainMenu.d.ts +6 -0
- package/types/constants.d.ts +24 -2
- package/types/context/tunnels.d.ts +1 -0
- package/types/data/EditorLocalStorage.d.ts +8 -0
- package/types/data/ai/types.d.ts +242 -0
- package/types/data/index.d.ts +3 -3
- package/types/data/magic.d.ts +23 -0
- package/types/data/transform.d.ts +11 -7
- package/types/element/ElementCanvasButtons.d.ts +6 -0
- package/types/element/Hyperlink.d.ts +10 -2
- package/types/element/collision.d.ts +2 -2
- package/types/element/embeddable.d.ts +16 -21
- package/types/element/index.d.ts +3 -4
- package/types/element/linearElementEditor.d.ts +10 -2
- package/types/element/newElement.d.ts +7 -1
- package/types/element/textElement.d.ts +4 -4
- package/types/element/typeChecks.d.ts +9 -6
- package/types/element/types.d.ts +30 -2
- package/types/frame.d.ts +21 -20
- package/types/packages/excalidraw/index.d.ts +2 -0
- package/types/packages/utils.d.ts +3 -3
- package/types/scene/Scene.d.ts +4 -4
- package/types/scene/ShapeCache.d.ts +1 -1
- package/types/scene/comparisons.d.ts +7 -6
- package/types/scene/export.d.ts +3 -3
- package/types/scene/types.d.ts +2 -0
- package/types/shapes.d.ts +1 -1
- package/types/types.d.ts +25 -10
- package/types/utils.d.ts +2 -2
|
@@ -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, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement,
|
|
7
|
+
import { ExcalidrawElement, ExcalidrawLinearElement, 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";
|
|
@@ -38,6 +38,7 @@ export declare const useExcalidrawElements: () => readonly NonDeletedExcalidrawE
|
|
|
38
38
|
export declare const useExcalidrawAppState: () => AppState;
|
|
39
39
|
export declare const useExcalidrawSetAppState: () => <K extends keyof AppState>(state: AppState | ((prevState: Readonly<AppState>, props: Readonly<any>) => AppState | Pick<AppState, K> | null) | Pick<AppState, K> | null, callback?: (() => void) | undefined) => void;
|
|
40
40
|
export declare const useExcalidrawActionManager: () => ActionManager;
|
|
41
|
+
export declare let hostPlugin: any;
|
|
41
42
|
declare class App extends React.Component<AppProps, AppState> {
|
|
42
43
|
canvas: AppClassProperties["canvas"];
|
|
43
44
|
interactiveCanvas: AppClassProperties["interactiveCanvas"];
|
|
@@ -46,7 +47,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
46
47
|
actionManager: ActionManager;
|
|
47
48
|
device: Device;
|
|
48
49
|
private excalidrawContainerRef;
|
|
49
|
-
static defaultProps: Partial<AppProps>;
|
|
50
50
|
scene: Scene;
|
|
51
51
|
renderer: Renderer;
|
|
52
52
|
private fonts;
|
|
@@ -212,10 +212,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
212
212
|
}>, event: PointerEvent]>;
|
|
213
213
|
constructor(props: AppProps);
|
|
214
214
|
private onWindowMessage;
|
|
215
|
-
private
|
|
215
|
+
private cacheEmbeddableRef;
|
|
216
216
|
private getHTMLIFrameElement;
|
|
217
217
|
private handleEmbeddableCenterClick;
|
|
218
|
-
private
|
|
218
|
+
private isIframeLikeElementCenter;
|
|
219
219
|
private updateEmbeddables;
|
|
220
220
|
private renderEmbeddables;
|
|
221
221
|
private getFrameNameDOMId;
|
|
@@ -227,8 +227,18 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
227
227
|
getSceneElements: () => readonly NonDeletedExcalidrawElement[];
|
|
228
228
|
onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
|
|
229
229
|
onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
|
|
230
|
-
exportingFrame:
|
|
230
|
+
exportingFrame: ExcalidrawFrameLikeElement | null;
|
|
231
231
|
}) => Promise<void>;
|
|
232
|
+
private magicGenerations;
|
|
233
|
+
private updateMagicGeneration;
|
|
234
|
+
private getTextFromElements;
|
|
235
|
+
private onMagicFrameGenerate;
|
|
236
|
+
private onIframeSrcCopy;
|
|
237
|
+
private OPENAI_KEY;
|
|
238
|
+
private OPENAI_KEY_IS_PERSISTED;
|
|
239
|
+
private onOpenAIKeyChange;
|
|
240
|
+
private onMagicSettingsConfirm;
|
|
241
|
+
onMagicframeToolSelect: () => void;
|
|
232
242
|
private openEyeDropper;
|
|
233
243
|
private syncActionResult;
|
|
234
244
|
private onBlur;
|
|
@@ -248,6 +258,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
248
258
|
componentWillUnmount(): void;
|
|
249
259
|
private onResize;
|
|
250
260
|
private removeEventListeners;
|
|
261
|
+
/** generally invoked only if fullscreen was invoked programmatically */
|
|
262
|
+
private onFullscreenChange;
|
|
251
263
|
private addEventListeners;
|
|
252
264
|
componentDidUpdate(prevProps: AppProps, prevState: AppState): void;
|
|
253
265
|
private renderInteractiveSceneCallback;
|
|
@@ -398,7 +410,17 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
398
410
|
private isHittingCommonBoundingBoxOfSelectedElements;
|
|
399
411
|
private handleTextOnPointerDown;
|
|
400
412
|
private handleFreeDrawElementOnPointerDown;
|
|
401
|
-
|
|
413
|
+
insertIframeElement: ({ sceneX, sceneY, width, height, }: {
|
|
414
|
+
sceneX: number;
|
|
415
|
+
sceneY: number;
|
|
416
|
+
width: number;
|
|
417
|
+
height: number;
|
|
418
|
+
}) => NonDeleted<ExcalidrawIframeElement>;
|
|
419
|
+
insertEmbeddableElement: ({ sceneX, sceneY, link, }: {
|
|
420
|
+
sceneX: number;
|
|
421
|
+
sceneY: number;
|
|
422
|
+
link: string;
|
|
423
|
+
}) => NonDeleted<import("../element/types").ExcalidrawEmbeddableElement> | undefined;
|
|
402
424
|
private createImageElement;
|
|
403
425
|
private handleLinearElementOnPointerDown;
|
|
404
426
|
private getCurrentItemRoundness;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./Button.scss";
|
|
2
|
-
interface ButtonProps extends React.
|
|
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 */
|
|
@@ -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) => import("react/jsx-runtime").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) => import("react/jsx-runtime").JSX.Element>;
|
|
30
34
|
export default _default;
|
|
@@ -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
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
|
+
import "./MermaidToExcalidraw.scss";
|
|
3
|
+
import { MermaidToExcalidrawLibProps } from "./common";
|
|
4
|
+
import { MermaidOptions } from "@zsviczian/mermaid-to-excalidraw";
|
|
5
|
+
declare const MermaidToExcalidraw: ({ mermaidToExcalidrawLib, selectedElements, }: {
|
|
6
|
+
mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
|
|
7
|
+
selectedElements: readonly NonDeletedExcalidrawElement[];
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default MermaidToExcalidraw;
|
|
10
|
+
export declare const mermaidToExcalidraw: (mermaidDefinition: string, opts?: MermaidOptions, forceSVG?: boolean) => Promise<{
|
|
11
|
+
elements: ExcalidrawElement[];
|
|
12
|
+
files: any;
|
|
13
|
+
} | undefined>;
|
|
@@ -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
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
/**
|
|
18
|
+
* Text to diagram (TTD) dialog
|
|
19
|
+
*/
|
|
20
|
+
export declare const TTDDialogBase: import("react").FC<({
|
|
21
|
+
tab: string;
|
|
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) => import("react/jsx-runtime").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) => import("react/jsx-runtime").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) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -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">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MermaidOptions } from "@zsviczian/mermaid-to-excalidraw";
|
|
2
|
+
import { MermaidToExcalidrawResult } from "@zsviczian/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
|
+
text: 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, text, 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">): import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
displayName: string;
|
|
37
|
+
Badge: {
|
|
38
|
+
({ children, }: {
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
}): import("react/jsx-runtime").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">): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
|
+
Badge: {
|
|
13
|
+
({ children, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const DropDownMenuItemBadge: {
|
|
20
|
+
({ children, }: {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
12
24
|
};
|
|
13
25
|
export default DropdownMenuItem;
|
|
@@ -155,4 +155,10 @@ export declare const frameToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
155
155
|
export declare const mermaidLogoIcon: import("react/jsx-runtime").JSX.Element;
|
|
156
156
|
export declare const ArrowRightIcon: import("react/jsx-runtime").JSX.Element;
|
|
157
157
|
export declare const laserPointerToolIcon: import("react/jsx-runtime").JSX.Element;
|
|
158
|
+
export declare const MagicIcon: import("react/jsx-runtime").JSX.Element;
|
|
159
|
+
export declare const OpenAIIcon: import("react/jsx-runtime").JSX.Element;
|
|
160
|
+
export declare const fullscreenIcon: import("react/jsx-runtime").JSX.Element;
|
|
161
|
+
export declare const eyeIcon: import("react/jsx-runtime").JSX.Element;
|
|
162
|
+
export declare const eyeClosedIcon: import("react/jsx-runtime").JSX.Element;
|
|
163
|
+
export declare const brainIcon: import("react/jsx-runtime").JSX.Element;
|
|
158
164
|
export {};
|
|
@@ -28,6 +28,12 @@ declare const MainMenu: React.FC<{
|
|
|
28
28
|
className?: string | undefined;
|
|
29
29
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
|
+
Badge: {
|
|
32
|
+
({ children, }: {
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
31
37
|
};
|
|
32
38
|
ItemLink: {
|
|
33
39
|
({ icon, shortcut, href, children, onSelect, className, selected, ...rest }: {
|
package/types/constants.d.ts
CHANGED
|
@@ -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;
|
|
@@ -249,4 +250,25 @@ export declare const DEFAULT_SIDEBAR: {
|
|
|
249
250
|
readonly name: "default";
|
|
250
251
|
readonly defaultTab: "library";
|
|
251
252
|
};
|
|
252
|
-
export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "
|
|
253
|
+
export declare const LIBRARY_DISABLED_TYPES: Set<"image" | "embeddable" | "iframe">;
|
|
254
|
+
export declare const TOOL_TYPE: {
|
|
255
|
+
readonly selection: "selection";
|
|
256
|
+
readonly rectangle: "rectangle";
|
|
257
|
+
readonly diamond: "diamond";
|
|
258
|
+
readonly ellipse: "ellipse";
|
|
259
|
+
readonly arrow: "arrow";
|
|
260
|
+
readonly line: "line";
|
|
261
|
+
readonly freedraw: "freedraw";
|
|
262
|
+
readonly text: "text";
|
|
263
|
+
readonly image: "image";
|
|
264
|
+
readonly eraser: "eraser";
|
|
265
|
+
readonly hand: "hand";
|
|
266
|
+
readonly frame: "frame";
|
|
267
|
+
readonly magicframe: "magicframe";
|
|
268
|
+
readonly embeddable: "embeddable";
|
|
269
|
+
readonly laser: "laser";
|
|
270
|
+
};
|
|
271
|
+
export declare const EDITOR_LS_KEYS: {
|
|
272
|
+
readonly OAI_API_KEY: "excalidraw-oai-api-key";
|
|
273
|
+
readonly PUBLISH_LIBRARY: "publish-library-data";
|
|
274
|
+
};
|
|
@@ -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
|
+
}
|