@zsviczian/excalidraw 0.10.0-obsidian-40 → 0.10.0-obsidian-44
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/package.json
CHANGED
|
@@ -113,8 +113,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
113
113
|
private handleCanvasDoubleClick;
|
|
114
114
|
private getElementLinkAtPosition;
|
|
115
115
|
private redirectToLink;
|
|
116
|
-
private attachLinkListener;
|
|
117
|
-
private detachLinkListener;
|
|
118
116
|
private handleCanvasPointerMove;
|
|
119
117
|
private handleTouchMove;
|
|
120
118
|
private handleCanvasPointerDown;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AppState } from "../types";
|
|
2
|
+
import { AppState, ExcalidrawProps } from "../types";
|
|
3
3
|
import { NonDeletedExcalidrawElement } from "./types";
|
|
4
4
|
import { Bounds } from "./bounds";
|
|
5
5
|
import "./Hyperlink.scss";
|
|
6
6
|
export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
|
|
7
|
-
export declare const Hyperlink: ({ element, appState, setAppState, }: {
|
|
7
|
+
export declare const Hyperlink: ({ element, appState, setAppState, onLinkOpen, }: {
|
|
8
8
|
element: NonDeletedExcalidrawElement;
|
|
9
9
|
appState: AppState;
|
|
10
10
|
setAppState: React.Component<any, AppState>["setState"];
|
|
11
|
+
onLinkOpen: ExcalidrawProps["onLinkOpen"];
|
|
11
12
|
}) => JSX.Element | null;
|
|
12
13
|
export declare const normalizeLink: (link: string) => string;
|
|
13
14
|
export declare const isLocalLink: (link: string | null) => boolean;
|
|
@@ -13,11 +13,12 @@ export declare const newTextElement: (opts: {
|
|
|
13
13
|
verticalAlign: VerticalAlign;
|
|
14
14
|
containerId?: ExcalidrawRectangleElement["id"];
|
|
15
15
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawTextElement>;
|
|
16
|
-
export declare const updateTextElement: (element: ExcalidrawTextElement, { text, isDeleted, originalText, rawText, }: {
|
|
16
|
+
export declare const updateTextElement: (element: ExcalidrawTextElement, { text, isDeleted, originalText, rawText, link, }: {
|
|
17
17
|
text: string;
|
|
18
18
|
isDeleted?: boolean | undefined;
|
|
19
19
|
originalText: string;
|
|
20
20
|
rawText?: string | undefined;
|
|
21
|
+
link?: string | undefined;
|
|
21
22
|
}) => ExcalidrawTextElement;
|
|
22
23
|
export declare const newFreeDrawElement: (opts: {
|
|
23
24
|
type: "freedraw";
|
package/types/types.d.ts
CHANGED
|
@@ -201,10 +201,11 @@ export interface ExcalidrawProps {
|
|
|
201
201
|
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
202
202
|
autoFocus?: boolean;
|
|
203
203
|
onBeforeTextEdit?: (textElement: ExcalidrawTextElement) => string;
|
|
204
|
-
onBeforeTextSubmit?: (textElement: ExcalidrawTextElement, textToSubmit: string, originalText: string, isDeleted: boolean) => [string, string];
|
|
204
|
+
onBeforeTextSubmit?: (textElement: ExcalidrawTextElement, textToSubmit: string, originalText: string, isDeleted: boolean) => [string, string, string];
|
|
205
205
|
generateIdForFile?: (file: File) => string | Promise<string>;
|
|
206
206
|
onThemeChange?: (newTheme: string) => void;
|
|
207
|
-
|
|
207
|
+
onLinkOpen?: (element: NonDeletedExcalidrawElement) => void;
|
|
208
|
+
onLinkHover?: (element: NonDeletedExcalidrawElement, event: React.PointerEvent<HTMLCanvasElement>) => void;
|
|
208
209
|
}
|
|
209
210
|
export declare type SceneData = {
|
|
210
211
|
elements?: ImportedDataState["elements"];
|