@zsviczian/excalidraw 0.17.6-21 → 0.17.6-23

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zsviczian/excalidraw",
3
- "version": "0.17.6-21",
3
+ "version": "0.17.6-23",
4
4
  "main": "main.js",
5
5
  "types": "types/excalidraw/index.d.ts",
6
6
  "files": [
@@ -356,7 +356,7 @@ declare class App extends React.Component<AppProps, AppState> {
356
356
  /** use when changing scrollX/scrollY/zoom based on user interaction */
357
357
  private translateCanvas;
358
358
  zoomToFit: (target?: readonly ExcalidrawElement[], maxZoom?: number, margin?: number) => void;
359
- getColorAtScenePoint: ({ sceneX, sceneY }: {
359
+ getColorAtScenePoint: ({ sceneX, sceneY, }: {
360
360
  sceneX: number;
361
361
  sceneY: number;
362
362
  }) => string | null;
@@ -1,7 +1,8 @@
1
- import { MermaidConfig } from "@zsviczian/mermaid-to-excalidraw";
2
- import { ExcalidrawElement } from "../../element/types";
3
- import { MermaidToExcalidrawLibProps } from "./common";
1
+ import type { MermaidConfig } from "@zsviczian/mermaid-to-excalidraw";
2
+ import type { ExcalidrawElement } from "../../element/types";
3
+ import type { MermaidToExcalidrawLibProps } from "./common";
4
4
  export declare const loadMermaidToExcalidrawLib: () => Promise<MermaidToExcalidrawLibProps>;
5
+ export declare const loadMermaidLib: () => Promise<MermaidToExcalidrawLibProps>;
5
6
  export declare const mermaidToExcalidraw: (mermaidDefinition: string, opts: MermaidConfig, forceSVG?: boolean) => Promise<{
6
7
  elements?: ExcalidrawElement[];
7
8
  files?: any;
@@ -67,8 +67,7 @@ export declare class Fonts {
67
67
  * @param metadata font metadata
68
68
  * @param fontFacesDecriptors font faces descriptors
69
69
  */
70
- static register(//zsviczian made public
71
- this: Fonts | {
70
+ static register(this: Fonts | {
72
71
  registered: Map<number, {
73
72
  metadata: FontMetadata;
74
73
  fontFaces: ExcalidrawFontFace[];
@@ -28,7 +28,8 @@ getFontFamilies, //zsviczian
28
28
  getFontFamilyString, //zsviczian
29
29
  registerFontsInCSS, //zsviczian
30
30
  getCSSFontDefinition, //zsviczian
31
- loadSceneFonts, } from "../utils/export";
31
+ loadSceneFonts, //zsviczian
32
+ loadMermaid, } from "../utils/export";
32
33
  export { refreshTextDimensions } from "./element/newElement";
33
34
  export { getContainerElement } from "./element/textElement";
34
35
  export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json";
@@ -1,6 +1,7 @@
1
- import { NonDeletedExcalidrawElement } from "./element/types";
1
+ import type { MermaidToExcalidrawLibProps } from "./components/TTDDialog/common";
2
+ import type { NonDeletedExcalidrawElement } from "./element/types";
2
3
  import type { FontMetadata } from "./fonts/FontMetadata";
3
- import { AppState } from "./types";
4
+ import type { AppState } from "./types";
4
5
  export declare let hostPlugin: any;
5
6
  export declare function destroyObsidianUtils(): void;
6
7
  export declare function initializeObsidianUtils(): void;
@@ -21,3 +22,5 @@ export declare function getCSSFontDefinition(fontFamily: number): Promise<string
21
22
  export declare function loadSceneFonts(elements: NonDeletedExcalidrawElement[]): Promise<FontFace[]>;
22
23
  export declare function fetchFontFromVault(url: string | URL): Promise<ArrayBuffer | undefined>;
23
24
  export declare function isTouchInPenMode(appState: AppState, event: React.PointerEvent<HTMLElement> | MouseEvent): boolean;
25
+ export declare function getSharedMermaidInstance(): Promise<MermaidToExcalidrawLibProps>;
26
+ export declare function loadMermaid(): Promise<MermaidToExcalidrawLibProps>;
@@ -43,4 +43,4 @@ export { getLineHeight } from "../excalidraw/fonts/index";
43
43
  export { getFontString, getFontFamilyString } from "../excalidraw/utils";
44
44
  export { getBoundTextMaxWidth } from "../excalidraw/element/textElement";
45
45
  export { mermaidToExcalidraw } from "../excalidraw/components/TTDDialog/MermaidToExcalidrawLib";
46
- export { destroyObsidianUtils, registerLocalFont, getFontFamilies, registerFontsInCSS, getCSSFontDefinition, loadSceneFonts, } from "../excalidraw/obsidianUtils";
46
+ export { destroyObsidianUtils, registerLocalFont, getFontFamilies, registerFontsInCSS, getCSSFontDefinition, loadSceneFonts, getSharedMermaidInstance, loadMermaid, } from "../excalidraw/obsidianUtils";