@zsviczian/excalidraw 0.15.2-obsidian-9 → 0.15.2-obsidian-11
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 +2147 -2146
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +9 -0
- package/package.json +7 -2
- package/types/actions/actionAddToLibrary.d.ts +3 -4
- package/types/actions/actionAlign.d.ts +0 -1
- package/types/actions/actionBoundText.d.ts +2 -3
- package/types/actions/actionCanvas.d.ts +18 -19
- package/types/actions/actionClipboard.d.ts +5 -6
- package/types/actions/actionDeleteSelected.d.ts +3 -4
- package/types/actions/actionDistribute.d.ts +0 -1
- package/types/actions/actionDuplicateSelection.d.ts +0 -1
- package/types/actions/actionElementLock.d.ts +2 -3
- package/types/actions/actionExport.d.ts +16 -17
- package/types/actions/actionFinalize.d.ts +2 -3
- package/types/actions/actionFlip.d.ts +0 -1
- package/types/actions/actionFrame.d.ts +3 -4
- package/types/actions/actionGroup.d.ts +0 -1
- package/types/actions/actionLinearEditor.d.ts +1 -2
- package/types/actions/actionMenu.d.ts +3 -4
- package/types/actions/actionProperties.d.ts +13 -14
- package/types/actions/actionSelectAll.d.ts +0 -1
- package/types/actions/actionStyles.d.ts +1 -2
- package/types/actions/actionToggleGridMode.d.ts +1 -2
- package/types/actions/actionToggleStats.d.ts +1 -2
- package/types/actions/actionToggleViewMode.d.ts +1 -2
- package/types/actions/actionToggleZenMode.d.ts +1 -2
- package/types/appState.d.ts +1 -1
- package/types/colors.d.ts +9 -9
- package/types/components/App.d.ts +0 -3
- package/types/components/Button.d.ts +0 -1
- package/types/components/Card.d.ts +0 -1
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
- package/types/components/DefaultSidebar.d.ts +0 -1
- package/types/components/EyeDropper.d.ts +0 -1
- package/types/components/LibraryMenuHeaderContent.d.ts +0 -1
- package/types/components/LibraryUnit.d.ts +0 -1
- package/types/components/LoadingMessage.d.ts +0 -1
- package/types/components/Section.d.ts +1 -1
- package/types/components/Sidebar/SidebarTab.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabs.d.ts +0 -1
- package/types/components/Stack.d.ts +2 -2
- package/types/components/Trans.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +0 -1
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.d.ts +0 -1
- package/types/constants.d.ts +4 -0
- package/types/element/Hyperlink.d.ts +0 -1
- package/types/element/embeddable.d.ts +1 -2
- package/types/element/linearElementEditor.d.ts +1 -2
- package/types/element/newElement.d.ts +1 -1
- package/types/element/textElement.d.ts +2 -6
- package/types/element/types.d.ts +5 -5
- package/types/hooks/useOutsideClick.d.ts +0 -1
- package/types/hooks/useScrollPosition.d.ts +0 -1
- package/types/i18n.d.ts +5 -2
- package/types/packages/excalidraw/dist/excalidraw.development.d.ts +2 -4
- package/types/packages/excalidraw/index.d.ts +1 -0
- package/types/packages/excalidraw/webpack.dev.config.d.ts +73 -62
- package/types/packages/excalidraw/webpack.prod.config.d.ts +88 -71
- package/types/packages/utils.d.ts +2 -1
- package/types/renderer/renderElement.d.ts +1 -1
- package/types/renderer/renderScene.d.ts +2 -1
- package/types/scene/export.d.ts +1 -0
- package/types/types.d.ts +2 -4
- package/types/utility-types.d.ts +1 -1
|
@@ -1,69 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})[];
|
|
1
|
+
import autoprefixer = require("autoprefixer");
|
|
2
|
+
export const mode: string;
|
|
3
|
+
export const entry: {
|
|
4
|
+
"excalidraw.development": string;
|
|
5
|
+
};
|
|
6
|
+
export namespace output {
|
|
7
|
+
const path: string;
|
|
8
|
+
const library: string;
|
|
9
|
+
const libraryTarget: string;
|
|
10
|
+
const filename: string;
|
|
11
|
+
const chunkFilename: string;
|
|
12
|
+
const assetModuleFilename: string;
|
|
13
|
+
const publicPath: string;
|
|
14
|
+
}
|
|
15
|
+
export namespace resolve {
|
|
16
|
+
const extensions: string[];
|
|
17
|
+
}
|
|
18
|
+
export namespace module {
|
|
19
|
+
const rules: ({
|
|
20
|
+
test: RegExp;
|
|
21
|
+
exclude: RegExp;
|
|
22
|
+
use: (string | {
|
|
23
|
+
loader: string;
|
|
24
|
+
options?: undefined;
|
|
26
25
|
} | {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
options: {
|
|
32
|
-
transpileOnly: boolean;
|
|
33
|
-
configFile: string;
|
|
26
|
+
loader: string;
|
|
27
|
+
options: {
|
|
28
|
+
postcssOptions: {
|
|
29
|
+
plugins: (import("postcss").Plugin & autoprefixer.ExportedAPI)[];
|
|
34
30
|
};
|
|
35
|
-
}
|
|
36
|
-
} | {
|
|
37
|
-
test: RegExp;
|
|
38
|
-
type: string;
|
|
31
|
+
};
|
|
39
32
|
})[];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
type?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
test: RegExp;
|
|
36
|
+
exclude: RegExp;
|
|
37
|
+
use: ({
|
|
38
|
+
loader: string;
|
|
39
|
+
options?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
loader: string;
|
|
42
|
+
options: {
|
|
43
|
+
transpileOnly: boolean;
|
|
44
|
+
configFile: string;
|
|
50
45
|
};
|
|
51
|
-
};
|
|
46
|
+
})[];
|
|
47
|
+
type?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
test: RegExp;
|
|
50
|
+
type: string;
|
|
51
|
+
exclude?: undefined;
|
|
52
|
+
use?: undefined;
|
|
53
|
+
})[];
|
|
54
|
+
}
|
|
55
|
+
export namespace optimization {
|
|
56
|
+
namespace splitChunks {
|
|
57
|
+
const chunks: string;
|
|
58
|
+
namespace cacheGroups {
|
|
59
|
+
namespace vendors {
|
|
60
|
+
const test: RegExp;
|
|
61
|
+
const name: string;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export const plugins: any[];
|
|
67
|
+
export const externals: {
|
|
68
|
+
react: {
|
|
69
|
+
root: string;
|
|
70
|
+
commonjs2: string;
|
|
71
|
+
commonjs: string;
|
|
72
|
+
amd: string;
|
|
52
73
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
commonjs: string;
|
|
59
|
-
amd: string;
|
|
60
|
-
};
|
|
61
|
-
"react-dom": {
|
|
62
|
-
root: string;
|
|
63
|
-
commonjs2: string;
|
|
64
|
-
commonjs: string;
|
|
65
|
-
amd: string;
|
|
66
|
-
};
|
|
74
|
+
"react-dom": {
|
|
75
|
+
root: string;
|
|
76
|
+
commonjs2: string;
|
|
77
|
+
commonjs: string;
|
|
78
|
+
amd: string;
|
|
67
79
|
};
|
|
68
80
|
};
|
|
69
|
-
export = _exports;
|
|
@@ -1,78 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import autoprefixer = require("autoprefixer");
|
|
2
|
+
import TerserPlugin = require("terser-webpack-plugin");
|
|
3
|
+
export const mode: string;
|
|
4
|
+
export const entry: {
|
|
5
|
+
"excalidraw.production.min": string;
|
|
6
|
+
};
|
|
7
|
+
export namespace output {
|
|
8
|
+
const path: string;
|
|
9
|
+
const library: string;
|
|
10
|
+
const libraryTarget: string;
|
|
11
|
+
const filename: string;
|
|
12
|
+
const chunkFilename: string;
|
|
13
|
+
const assetModuleFilename: string;
|
|
14
|
+
const publicPath: string;
|
|
15
|
+
}
|
|
16
|
+
export namespace resolve {
|
|
17
|
+
const extensions: string[];
|
|
18
|
+
}
|
|
19
|
+
export namespace module {
|
|
20
|
+
const rules: ({
|
|
21
|
+
test: RegExp;
|
|
22
|
+
exclude: RegExp;
|
|
23
|
+
use: (string | {
|
|
24
|
+
loader: string;
|
|
25
|
+
options?: undefined;
|
|
25
26
|
} | {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
options: {
|
|
31
|
-
transpileOnly: boolean;
|
|
32
|
-
configFile: string;
|
|
27
|
+
loader: string;
|
|
28
|
+
options: {
|
|
29
|
+
postcssOptions: {
|
|
30
|
+
plugins: (import("postcss").Plugin & autoprefixer.ExportedAPI)[];
|
|
33
31
|
};
|
|
34
|
-
}
|
|
35
|
-
loader: string;
|
|
36
|
-
options: {
|
|
37
|
-
presets: (string | (string | {
|
|
38
|
-
runtime: string;
|
|
39
|
-
})[])[];
|
|
40
|
-
plugins: string[];
|
|
41
|
-
};
|
|
42
|
-
})[];
|
|
43
|
-
} | {
|
|
44
|
-
test: RegExp;
|
|
45
|
-
type: string;
|
|
32
|
+
};
|
|
46
33
|
})[];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
34
|
+
type?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
test: RegExp;
|
|
37
|
+
exclude: RegExp;
|
|
38
|
+
use: ({
|
|
39
|
+
loader: string;
|
|
40
|
+
options?: undefined;
|
|
41
|
+
} | {
|
|
42
|
+
loader: string;
|
|
43
|
+
options: {
|
|
44
|
+
transpileOnly: boolean;
|
|
45
|
+
configFile: string;
|
|
46
|
+
presets?: undefined;
|
|
47
|
+
plugins?: undefined;
|
|
59
48
|
};
|
|
60
|
-
}
|
|
49
|
+
} | {
|
|
50
|
+
loader: string;
|
|
51
|
+
options: {
|
|
52
|
+
presets: (string | (string | {
|
|
53
|
+
runtime: string;
|
|
54
|
+
})[])[];
|
|
55
|
+
plugins: string[];
|
|
56
|
+
transpileOnly?: undefined;
|
|
57
|
+
configFile?: undefined;
|
|
58
|
+
};
|
|
59
|
+
})[];
|
|
60
|
+
type?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
test: RegExp;
|
|
63
|
+
type: string;
|
|
64
|
+
exclude?: undefined;
|
|
65
|
+
use?: undefined;
|
|
66
|
+
})[];
|
|
67
|
+
}
|
|
68
|
+
export namespace optimization {
|
|
69
|
+
const minimize: boolean;
|
|
70
|
+
const minimizer: TerserPlugin<import("terser").MinifyOptions>[];
|
|
71
|
+
namespace splitChunks {
|
|
72
|
+
const chunks: string;
|
|
73
|
+
namespace cacheGroups {
|
|
74
|
+
namespace vendors {
|
|
75
|
+
const test: RegExp;
|
|
76
|
+
const name: string;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export const plugins: any[];
|
|
82
|
+
export const externals: {
|
|
83
|
+
react: {
|
|
84
|
+
root: string;
|
|
85
|
+
commonjs2: string;
|
|
86
|
+
commonjs: string;
|
|
87
|
+
amd: string;
|
|
61
88
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
commonjs: string;
|
|
68
|
-
amd: string;
|
|
69
|
-
};
|
|
70
|
-
"react-dom": {
|
|
71
|
-
root: string;
|
|
72
|
-
commonjs2: string;
|
|
73
|
-
commonjs: string;
|
|
74
|
-
amd: string;
|
|
75
|
-
};
|
|
89
|
+
"react-dom": {
|
|
90
|
+
root: string;
|
|
91
|
+
commonjs2: string;
|
|
92
|
+
commonjs: string;
|
|
93
|
+
amd: string;
|
|
76
94
|
};
|
|
77
95
|
};
|
|
78
|
-
export = _exports;
|
|
@@ -21,8 +21,9 @@ export declare const exportToBlob: (opts: ExportOpts & {
|
|
|
21
21
|
quality?: number;
|
|
22
22
|
exportPadding?: number;
|
|
23
23
|
}) => Promise<Blob>;
|
|
24
|
-
export declare const exportToSvg: ({ elements, appState, files, exportPadding, }: Omit<ExportOpts, "getDimensions"> & {
|
|
24
|
+
export declare const exportToSvg: ({ elements, appState, files, exportPadding, renderEmbeddables, }: Omit<ExportOpts, "getDimensions"> & {
|
|
25
25
|
exportPadding?: number | undefined;
|
|
26
|
+
renderEmbeddables?: boolean | undefined;
|
|
26
27
|
}) => Promise<SVGSVGElement>;
|
|
27
28
|
export declare const exportToClipboard: (opts: ExportOpts & {
|
|
28
29
|
mimeType?: string;
|
|
@@ -29,7 +29,7 @@ export declare const setShapeForElement: <T extends ExcalidrawElement>(element:
|
|
|
29
29
|
export declare const invalidateShapeForElement: (element: ExcalidrawElement) => boolean;
|
|
30
30
|
export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean, isExporting?: boolean) => Options;
|
|
31
31
|
export declare const renderElement: (element: NonDeletedExcalidrawElement, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig: RenderConfig, appState: AppState) => void;
|
|
32
|
-
export declare const renderElementToSvg: (element: NonDeletedExcalidrawElement, rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, offsetX: number, offsetY: number, exportWithDarkMode?: boolean, exportingFrameId?: string | null) => void;
|
|
32
|
+
export declare const renderElementToSvg: (element: NonDeletedExcalidrawElement, rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, offsetX: number, offsetY: number, exportWithDarkMode?: boolean, exportingFrameId?: string | null, renderEmbeddables?: boolean) => void;
|
|
33
33
|
export declare const pathsCache: WeakMap<ExcalidrawFreeDrawElement, Path2D>;
|
|
34
34
|
export declare function generateFreeDrawShape(element: ExcalidrawFreeDrawElement): Path2D;
|
|
35
35
|
export declare function getFreeDrawPath2D(element: ExcalidrawFreeDrawElement): Path2D | undefined;
|
|
@@ -42,9 +42,10 @@ export declare const isVisibleElement: (element: ExcalidrawElement, canvasWidth:
|
|
|
42
42
|
scrollX: number;
|
|
43
43
|
scrollY: number;
|
|
44
44
|
}) => boolean;
|
|
45
|
-
export declare const renderSceneToSvg: (elements: readonly NonDeletedExcalidrawElement[], rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, { offsetX, offsetY, exportWithDarkMode, exportingFrameId, }?: {
|
|
45
|
+
export declare const renderSceneToSvg: (elements: readonly NonDeletedExcalidrawElement[], rsvg: RoughSVG, svgRoot: SVGElement, files: BinaryFiles, { offsetX, offsetY, exportWithDarkMode, exportingFrameId, renderEmbeddables, }?: {
|
|
46
46
|
offsetX?: number | undefined;
|
|
47
47
|
offsetY?: number | undefined;
|
|
48
48
|
exportWithDarkMode?: boolean | undefined;
|
|
49
49
|
exportingFrameId?: string | null | undefined;
|
|
50
|
+
renderEmbeddables?: boolean | undefined;
|
|
50
51
|
}) => void;
|
package/types/scene/export.d.ts
CHANGED
|
@@ -20,5 +20,6 @@ export declare const exportToSvg: (elements: readonly NonDeletedExcalidrawElemen
|
|
|
20
20
|
renderFrame?: boolean;
|
|
21
21
|
}, files: BinaryFiles | null, opts?: {
|
|
22
22
|
serializeAsJSON?: () => string;
|
|
23
|
+
renderEmbeddables?: boolean;
|
|
23
24
|
}) => Promise<SVGSVGElement>;
|
|
24
25
|
export declare const getExportSize: (elements: readonly NonDeletedExcalidrawElement[], exportPadding: number, scale: number) => [number, number];
|
package/types/types.d.ts
CHANGED
|
@@ -300,7 +300,7 @@ export interface ExcalidrawProps {
|
|
|
300
300
|
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
301
301
|
autoFocus?: boolean;
|
|
302
302
|
onBeforeTextEdit?: (textElement: ExcalidrawTextElement) => string;
|
|
303
|
-
onBeforeTextSubmit?: (textElement: ExcalidrawTextElement, textToSubmit: string, originalText: string, isDeleted: boolean) => [string, string, string];
|
|
303
|
+
onBeforeTextSubmit?: (textElement: ExcalidrawTextElement, textToSubmit: string, originalText: string, isDeleted: boolean) => [updatedText: string, updatedOriginalText: string, link: string];
|
|
304
304
|
generateIdForFile?: (file: File) => string | Promise<string>;
|
|
305
305
|
onThemeChange?: (newTheme: string) => void;
|
|
306
306
|
onViewModeChange?: (isViewModeEnabled: boolean) => void;
|
|
@@ -314,8 +314,7 @@ export interface ExcalidrawProps {
|
|
|
314
314
|
validateEmbeddable?: boolean | string[] | RegExp | RegExp[] | ((link: string) => boolean | undefined);
|
|
315
315
|
renderEmbeddable?: (element: NonDeleted<ExcalidrawEmbeddableElement>, appState: AppState) => JSX.Element | null;
|
|
316
316
|
renderWebview?: boolean;
|
|
317
|
-
renderEmbeddableMenu?: (
|
|
318
|
-
appState: AppState) => JSX.Element | null;
|
|
317
|
+
renderEmbeddableMenu?: (appState: AppState) => JSX.Element | null;
|
|
319
318
|
}
|
|
320
319
|
export type SceneData = {
|
|
321
320
|
elements?: ImportedDataState["elements"];
|
|
@@ -465,7 +464,6 @@ export type ExcalidrawImperativeAPI = {
|
|
|
465
464
|
bringForward: (elements: readonly ExcalidrawElement[]) => void;
|
|
466
465
|
sendToBack: (elements: readonly ExcalidrawElement[]) => void;
|
|
467
466
|
bringToFront: (elements: readonly ExcalidrawElement[]) => void;
|
|
468
|
-
restore: InstanceType<typeof App>["restore"];
|
|
469
467
|
setMobileModeAllowed: (allow: boolean) => void;
|
|
470
468
|
setActiveTool: InstanceType<typeof App>["setActiveTool"];
|
|
471
469
|
setCursor: InstanceType<typeof App>["setCursor"];
|
package/types/utility-types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export type Mutable<T> = {
|
|
3
2
|
-readonly [P in keyof T]: T[P];
|
|
4
3
|
};
|
|
@@ -22,3 +21,4 @@ export type ForwardRef<T, P = any> = Parameters<CallableType<React.ForwardRefRen
|
|
|
22
21
|
export type ExtractSetType<T extends Set<any>> = T extends Set<infer U> ? U : never;
|
|
23
22
|
export type SameType<T, U> = T extends U ? (U extends T ? true : false) : false;
|
|
24
23
|
export type Assert<T extends true> = T;
|
|
24
|
+
export type NestedKeyOf<T, K = keyof T> = K extends keyof T & (string | number) ? `${K}` | (T[K] extends object ? `${K}.${NestedKeyOf<T[K]>}` : never) : never;
|