Socket
Socket
Sign inDemoInstall

mermaid

Package Overview
Dependencies
Maintainers
4
Versions
231
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mermaid - npm Package Compare versions

Comparing version 10.3.0 to 10.3.1

dist/arc-95120417.js

40

dist/config.type.d.ts

@@ -9,3 +9,3 @@ /**

*/
export type DOMPurifyConfiguration = import("dompurify").Config;
export type DOMPurifyConfiguration = import('dompurify').Config;
/**

@@ -41,3 +41,3 @@ * JavaScript function that returns a `FontConfig`.

*/
export type SankeyLinkColor = "source" | "target" | "gradient";
export type SankeyLinkColor = 'source' | 'target' | 'gradient';
/**

@@ -52,3 +52,3 @@ * Controls the alignment of the Sankey diagrams.

*/
export type SankeyNodeAlignment = "left" | "right" | "center" | "justify";
export type SankeyNodeAlignment = 'left' | 'right' | 'center' | 'justify';
/**

@@ -64,3 +64,3 @@ * The font size to use

*/
theme?: string | "default" | "forest" | "dark" | "neutral" | "null";
theme?: string | 'default' | 'forest' | 'dark' | 'neutral' | 'null';
themeVariables?: any;

@@ -86,7 +86,7 @@ themeCSS?: string;

*/
logLevel?: number | string | 0 | 2 | 1 | "trace" | "debug" | "info" | "warn" | "error" | "fatal" | 3 | 4 | 5 | undefined;
logLevel?: number | string | 0 | 2 | 1 | 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | 3 | 4 | 5 | undefined;
/**
* Level of trust for parsed diagram
*/
securityLevel?: string | "strict" | "loose" | "antiscript" | "sandbox" | undefined;
securityLevel?: string | 'strict' | 'loose' | 'antiscript' | 'sandbox' | undefined;
/**

@@ -679,7 +679,7 @@ * Dictates whether mermaid starts on Page load

*/
xAxisPosition?: "top" | "bottom";
xAxisPosition?: 'top' | 'bottom';
/**
* position of y-axis labels
*/
yAxisPosition?: "left" | "right";
yAxisPosition?: 'left' | 'right';
/**

@@ -714,3 +714,3 @@ * stroke width of edges of the box that are inside the quadrant

*/
layoutDirection?: string | "TB" | "BT" | "LR" | "RL";
layoutDirection?: string | 'TB' | 'BT' | 'LR' | 'RL';
/**

@@ -780,3 +780,3 @@ * The minimum width of an entity box. Expressed in pixels.

*/
defaultRenderer?: string | "dagre-d3" | "dagre-wrapper" | "elk";
defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
}

@@ -805,3 +805,3 @@ /**

*/
defaultRenderer?: string | "dagre-d3" | "dagre-wrapper" | "elk";
defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
nodeSpacing?: number;

@@ -866,3 +866,3 @@ rankSpacing?: number;

*/
messageAlign?: string | "left" | "center" | "right";
messageAlign?: string | 'left' | 'center' | 'right';
/**

@@ -946,3 +946,3 @@ * Prolongs the edge of the diagram downwards.

*/
messageAlign?: string | "left" | "center" | "right";
messageAlign?: string | 'left' | 'center' | 'right';
/**

@@ -1058,3 +1058,3 @@ * Prolongs the edge of the diagram downwards.

*/
displayMode?: string | "compact";
displayMode?: string | 'compact';
/**

@@ -1064,3 +1064,3 @@ * On which day a week-based interval should start

*/
weekday?: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
weekday?: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
}

@@ -1119,3 +1119,3 @@ /**

*/
messageAlign?: string | "left" | "center" | "right";
messageAlign?: string | 'left' | 'center' | 'right';
/**

@@ -1177,3 +1177,3 @@ * Mirror actors under diagram

*/
noteAlign?: string | "left" | "center" | "right";
noteAlign?: string | 'left' | 'center' | 'right';
/**

@@ -1254,3 +1254,3 @@ * This sets the font size of actor messages

*/
curve?: string | "basis" | "linear" | "cardinal";
curve?: string | 'basis' | 'linear' | 'cardinal';
/**

@@ -1267,3 +1267,3 @@ * Represents the padding between the labels and the shape

*/
defaultRenderer?: string | "dagre-d3" | "dagre-wrapper" | "elk";
defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
/**

@@ -1298,3 +1298,3 @@ * Width of nodes where text is wrapped.

*/
nodeAlignment?: "left" | "right" | "center" | "justify";
nodeAlignment?: 'left' | 'right' | 'center' | 'justify';
useMaxWidth?: boolean;

@@ -1301,0 +1301,0 @@ }

@@ -28,3 +28,3 @@ import { DiagramDefinition, DiagramDetector } from './types.js';

export declare class DiagramNotFoundError extends Error {
constructor(message: string);
constructor(name: string);
}
import { Diagram } from '../Diagram.js';
import { MermaidConfig } from '../config.type.js';
import type { MermaidConfig } from '../config.type.js';
import type * as d3 from 'd3';

@@ -27,3 +27,3 @@ export interface InjectUtils {

renderer: any;
parser: any;
parser: ParserDefinition;
styles?: any;

@@ -56,2 +56,8 @@ init?: (config: MermaidConfig) => void;

export type DrawDefinition = (text: string, id: string, version: string, diagramObject: Diagram) => void;
export interface ParserDefinition {
parse: (text: string) => void;
parser: {
yy: DiagramDB;
};
}
/**

@@ -65,4 +71,5 @@ * Type for function parse directive from diagram code.

export type ParseDirectiveDefinition = (statement: string, context: string, type: string) => void;
export type HTML = d3.Selection<HTMLIFrameElement, unknown, Element, unknown>;
export type SVG = d3.Selection<SVGSVGElement, unknown, Element, unknown>;
export type HTML = d3.Selection<HTMLIFrameElement, unknown, Element | null, unknown>;
export type SVG = d3.Selection<SVGSVGElement, unknown, Element | null, unknown>;
export type Group = d3.Selection<SVGGElement, unknown, Element | null, unknown>;
export type DiagramStylesProvider = (options?: any) => string;

@@ -1,2 +0,3 @@

import { DetailedError } from './utils.js';
import type { DetailedError } from './utils.js';
import type { DiagramDefinition } from './diagram-api/types.js';
export type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;

@@ -10,5 +11,6 @@ /**

type: string;
parser: any;
renderer: any;
db: import("./diagram-api/types.js").DiagramDB;
parser: DiagramDefinition['parser'];
renderer: DiagramDefinition['renderer'];
db: DiagramDefinition['db'];
private init?;
private detectError?;

@@ -18,3 +20,3 @@ constructor(text: string);

render(id: string, version: string): Promise<void>;
getParser(): any;
getParser(): import("./diagram-api/types.js").ParserDefinition;
getType(): string;

@@ -21,0 +23,0 @@ }

@@ -1,3 +0,3 @@

import { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;
import type { DiagramDefinition } from '../../diagram-api/types.js';
declare const diagram: DiagramDefinition;
export default diagram;
/**
* Merges the value of `conf` with the passed `cnf`
*
* @param cnf - Config to merge
*/
export declare const setConf: () => void;
/**
* Draws a an info picture in the tag with id: id based on the graph definition in text.

@@ -12,9 +6,8 @@ *

* @param id - The text for the error
* @param mermaidVersion - The version
* @param version - The version
*/
export declare const draw: (_text: string, id: string, mermaidVersion: string) => void;
declare const _default: {
setConf: () => void;
draw: (_text: string, id: string, mermaidVersion: string) => void;
export declare const draw: (_text: string, id: string, version: string) => void;
export declare const renderer: {
draw: (_text: string, id: string, version: string) => void;
};
export default _default;
export default renderer;
export function calculateSvgSizeAttrs(height: number, width: number, useMaxWidth: boolean): Map<'height' | 'width' | 'style', string>;
export function configureSvgSize(svgElem: SVGSVGElement, height: number, width: number, useMaxWidth: boolean): void;
export function configureSvgSize(svgElem: SVG, height: number, width: number, useMaxWidth: boolean): void;
export function setupGraphViewbox(graph: any, svgElem: any, padding: any, useMaxWidth: any): void;
import { SVG } from './diagram-api/types.js';
{
"name": "mermaid",
"version": "10.3.0",
"version": "10.3.1",
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",

@@ -42,3 +42,3 @@ "type": "module",

"dependencies": {
"@braintree/sanitize-url": "^6.0.2",
"@braintree/sanitize-url": "^6.0.1",
"@types/d3-scale": "^4.0.3",

@@ -53,3 +53,3 @@ "@types/d3-scale-chromatic": "^3.0.0",

"dayjs": "^1.11.7",
"dompurify": "3.0.5",
"dompurify": "^3.0.5",
"elkjs": "^0.8.2",

@@ -117,2 +117,3 @@ "khroma": "^2.0.0",

"clean": "rimraf dist",
"dev": "pnpm -w dev",
"docs:code": "typedoc src/defaultConfig.ts src/config.ts src/mermaidAPI.ts && prettier --write ./src/docs/config/setup",

@@ -119,0 +120,0 @@ "docs:build": "rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm scripts/docs.cli.mts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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