Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zsviczian/mermaid-to-excalidraw

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zsviczian/mermaid-to-excalidraw - npm Package Compare versions

Comparing version 0.1.1-obsidian-6 to 0.1.1-obsidian-7

2

dist/index.d.ts
export interface MermaidOptions {
fontSize?: number;
}
declare const parseMermaidToExcalidraw: (definition: string, options?: MermaidOptions) => Promise<import("./interfaces.js").MermaidToExcalidrawResult>;
declare const parseMermaidToExcalidraw: (definition: string, options?: MermaidOptions, forceSVG?: boolean) => Promise<import("./interfaces.js").MermaidToExcalidrawResult>;
export { parseMermaidToExcalidraw };
import { graphToExcalidraw } from "./graphToExcalidraw.js";
import { parseMermaid } from "./parseMermaid.js";
const parseMermaidToExcalidraw = async (definition, options = {}) => {
const parsedMermaidData = await parseMermaid(definition);
const parseMermaidToExcalidraw = async (definition, options = {}, forceSVG = false) => {
const parsedMermaidData = await parseMermaid(definition, forceSVG); //zsviczian
const excalidrawElements = graphToExcalidraw(parsedMermaidData, options);

@@ -6,0 +6,0 @@ return excalidrawElements;

@@ -9,2 +9,2 @@ import { GraphImage } from "./interfaces.js";

}
export declare const parseMermaid: (definition: string) => Promise<Flowchart | GraphImage | Sequence>;
export declare const parseMermaid: (definition: string, forceSVG?: boolean) => Promise<Flowchart | GraphImage | Sequence>;

@@ -37,3 +37,4 @@ //import { DEFAULT_FONT_SIZE } from "./constants.js"; //zsviczian

};
export const parseMermaid = async (definition) => {
export const parseMermaid = async (definition, forceSVG = false //zsviczian
) => {
/*mermaid.initialize({

@@ -56,2 +57,4 @@ startOnLoad: false,

document.body.appendChild(svgContainer);
if (forceSVG)
return convertSvgToGraphImage(svgContainer); //zsviczian
let data;

@@ -58,0 +61,0 @@ switch (diagram.type) {

{
"name": "@zsviczian/mermaid-to-excalidraw",
"version": "0.1.1-obsidian-6",
"version": "0.1.1-obsidian-7",
"description": "Mermaid to Excalidraw Diagrams",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc