mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-19 20:24:16 +01:00
Merge branch 'develop' into sidv/mermaidDocs
* develop: chore: Fix lint test: Update vitest Add official vim plugin to list in integrations chore: Add lodash-eslint rule chore: Add lodash-eslint rule feat: Spellcheck docs when building fix: Enable extending lintstagedrc. fix: lintstagedrc `lint:jison` Fix lodash import Formatting Update .vite/build.ts fix Lint Add docs back fix: Core build externals chore: Update dagre-d3-es chore: Use `graphlib` from `dagre-d3-es` fix: Add types to memoized functions chore: Replace lodash with lodash-es Cleanup
This commit is contained in:
@@ -21,7 +21,16 @@
|
||||
"plugin:@cspell/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": ["@typescript-eslint", "no-only-tests", "html", "jest", "jsdoc", "json", "@cspell"],
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"no-only-tests",
|
||||
"html",
|
||||
"jest",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"@cspell",
|
||||
"lodash"
|
||||
],
|
||||
"rules": {
|
||||
"curly": "error",
|
||||
"no-console": "error",
|
||||
@@ -53,7 +62,8 @@
|
||||
"allowEmptyCatch": true
|
||||
}
|
||||
],
|
||||
"no-only-tests/no-only-tests": "error"
|
||||
"no-only-tests/no-only-tests": "error",
|
||||
"lodash/import-scope": ["error", "method"]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
||||
28
.github/workflows/docs.yml
vendored
28
.github/workflows/docs.yml
vendored
@@ -1,28 +0,0 @@
|
||||
name: Documentation Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- 'packages/mermaid/src/docs/**/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- 'packages/mermaid/src/docs/**/*'
|
||||
jobs:
|
||||
spellcheck:
|
||||
name: 'Docs: Spellcheck'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Check out the code
|
||||
- uses: actions/setup-node@v3
|
||||
name: Setup node
|
||||
with:
|
||||
node-version: '18'
|
||||
- run: npm install -g cspell
|
||||
name: Install cSpell
|
||||
- run: cspell --config ./cSpell.json "packages/mermaid/src/docs/**/*.md" --no-progress
|
||||
name: Run cSpell
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"!(docs/**/*)*.{ts,js,json,html,md,mts}": ["eslint --fix", "prettier --write"],
|
||||
"cSpell.json": ["ts-node-esm scripts/fixCSpell.ts"]
|
||||
}
|
||||
5
.lintstagedrc.mjs
Normal file
5
.lintstagedrc.mjs
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
'!(docs/**/*)*.{ts,js,json,html,md,mts}': ['eslint --fix', 'prettier --write'],
|
||||
'cSpell.json': ['ts-node-esm scripts/fixCSpell.ts'],
|
||||
'**/*.jison': ['pnpm -w run lint:jison'],
|
||||
};
|
||||
@@ -4,3 +4,4 @@ cypress/platform/xss3.html
|
||||
coverage
|
||||
# Autogenerated by PNPM
|
||||
pnpm-lock.yaml
|
||||
stats
|
||||
@@ -56,7 +56,7 @@ interface BuildOptions {
|
||||
}
|
||||
|
||||
export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions): InlineConfig => {
|
||||
const external = ['require', 'fs', 'path'];
|
||||
const external: (string | RegExp)[] = ['require', 'fs', 'path'];
|
||||
console.log(entryName, packageOptions[entryName]);
|
||||
const { name, file, packageName } = packageOptions[entryName];
|
||||
let output: OutputOptions = [
|
||||
@@ -80,7 +80,9 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions)
|
||||
);
|
||||
// Core build is used to generate file without bundled dependencies.
|
||||
// This is used by downstream projects to bundle dependencies themselves.
|
||||
external.push(...Object.keys(dependencies));
|
||||
// Ignore dependencies and any dependencies of dependencies
|
||||
// Adapted from the RegEx used by `rollup-plugin-node`
|
||||
external.push(new RegExp('^(?:' + Object.keys(dependencies).join('|') + ')(?:/.+)?$'));
|
||||
// This needs to be an array. Otherwise vite will build esm & umd with same name and overwrite esm with umd.
|
||||
output = [
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"bbox",
|
||||
"bilkent",
|
||||
"bisheng",
|
||||
"braintree",
|
||||
"brolin",
|
||||
"brotli",
|
||||
"codedoc",
|
||||
@@ -30,9 +31,11 @@
|
||||
"edgechromium",
|
||||
"faber",
|
||||
"flatmap",
|
||||
"ftplugin",
|
||||
"gantt",
|
||||
"gitea",
|
||||
"gitgraph",
|
||||
"globby",
|
||||
"graphlib",
|
||||
"grav",
|
||||
"greywolf",
|
||||
@@ -40,11 +43,13 @@
|
||||
"jaoude",
|
||||
"jison",
|
||||
"kaufmann",
|
||||
"khroma",
|
||||
"klemm",
|
||||
"klink",
|
||||
"knsv",
|
||||
"knut",
|
||||
"laganeckas",
|
||||
"lintstagedrc",
|
||||
"lucida",
|
||||
"matthieu",
|
||||
"mdbook",
|
||||
@@ -74,6 +79,7 @@
|
||||
"treemap",
|
||||
"ts-nocheck",
|
||||
"tuleap",
|
||||
"unist",
|
||||
"verdana",
|
||||
"viewports",
|
||||
"vinod",
|
||||
|
||||
@@ -122,6 +122,7 @@ They also serve as proof of concept, for the variety of things that can be built
|
||||
- [Draw.io](https://draw.io) - [Plugin](https://github.com/nopeslide/drawio_mermaid_plugin)
|
||||
- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid)
|
||||
- [Vim](https://www.vim.org)
|
||||
- [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid)
|
||||
- [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram)
|
||||
- [GNU Emacs](https://www.gnu.org/software/emacs/)
|
||||
- [Major mode for .mmd files](https://github.com/abrochard/mermaid-mode)
|
||||
|
||||
12
package.json
12
package.json
@@ -60,8 +60,8 @@
|
||||
"@cspell/eslint-plugin": "^6.14.2",
|
||||
"@types/eslint": "^8.4.10",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/jsdom": "^20.0.1",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/jsdom": "^20.0.1",
|
||||
"@types/lodash": "^4.14.188",
|
||||
"@types/mdast": "^3.0.10",
|
||||
"@types/node": "^18.11.9",
|
||||
@@ -83,16 +83,18 @@
|
||||
"eslint-plugin-jest": "^27.1.5",
|
||||
"eslint-plugin-jsdoc": "^39.6.2",
|
||||
"eslint-plugin-json": "^3.1.0",
|
||||
"eslint-plugin-lodash": "^7.4.0",
|
||||
"eslint-plugin-markdown": "^3.0.0",
|
||||
"eslint-plugin-no-only-tests": "^3.1.0",
|
||||
"eslint-plugin-tsdoc": "^0.2.17",
|
||||
"eslint-plugin-unicorn": "^45.0.0",
|
||||
"express": "^4.18.2",
|
||||
"globby": "^13.1.2",
|
||||
"husky": "^8.0.2",
|
||||
"jest": "^29.3.1",
|
||||
"jison": "^0.4.18",
|
||||
"jsdom": "^20.0.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsdom": "^20.0.2",
|
||||
"lint-staged": "^13.0.3",
|
||||
"path-browserify": "^1.0.1",
|
||||
"pnpm": "^7.15.0",
|
||||
@@ -104,12 +106,8 @@
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.8.4",
|
||||
"vite": "^3.2.3",
|
||||
"vitest": "^0.25.1"
|
||||
"vitest": "^0.25.3"
|
||||
},
|
||||
"sideEffects": [
|
||||
"**/*.css",
|
||||
"**/*.scss"
|
||||
],
|
||||
"volta": {
|
||||
"node": "18.12.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"src/docs/**": ["pnpm --filter mermaid run docs:build --git"],
|
||||
"src/docs.mts": ["pnpm --filter mermaid run docs:build --git"],
|
||||
"src/(defaultConfig|config|mermaidAPI).ts": ["pnpm --filter mermaid run docs:build --git"],
|
||||
"*.jison": ["pnpm run lint:jison"]
|
||||
}
|
||||
7
packages/mermaid/.lintstagedrc.mjs
Normal file
7
packages/mermaid/.lintstagedrc.mjs
Normal file
@@ -0,0 +1,7 @@
|
||||
import baseConfig from '../../.lintstagedrc.mjs';
|
||||
export default {
|
||||
...baseConfig,
|
||||
'src/docs/**': ['pnpm --filter mermaid run docs:build --git'],
|
||||
'src/docs.mts': ['pnpm --filter mermaid run docs:build --git'],
|
||||
'src/(defaultConfig|config|mermaidAPI).ts': ['pnpm --filter mermaid run docs:build --git'],
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mermaid",
|
||||
"version": "9.2.2",
|
||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||
"main": "./dist/mermaid.min.js",
|
||||
"module": "./dist/mermaid.core.mjs",
|
||||
"types": "./dist/mermaid.d.ts",
|
||||
@@ -26,12 +26,13 @@
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"docs:code": "typedoc src/defaultConfig.ts src/config.ts src/mermaidAPI.ts && prettier --write ./src/docs/config/setup",
|
||||
"docs:build": "rimraf ../../docs && pnpm docs:code && ts-node-esm src/docs.mts",
|
||||
"docs:verify": "pnpm docs:code && ts-node-esm src/docs.mts --verify",
|
||||
"docs:build": "rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts",
|
||||
"docs:verify": "pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts --verify",
|
||||
"docs:pre:vitepress": "rimraf src/vitepress && pnpm docs:code && ts-node-esm src/docs.mts --vitepress",
|
||||
"docs:build:vitepress": "pnpm docs:pre:vitepress && vitepress build src/vitepress",
|
||||
"docs:dev": "pnpm docs:pre:vitepress && concurrently \"vitepress dev src/vitepress\" \"ts-node-esm src/docs.mts --watch --vitepress\"",
|
||||
"docs:serve": "pnpm docs:build:vitepress && vitepress serve src/vitepress",
|
||||
"docs:spellcheck": "cspell --config ../../cSpell.json \"src/docs/**/*.md\"",
|
||||
"release": "pnpm build",
|
||||
"prepublishOnly": "pnpm -w run build"
|
||||
},
|
||||
@@ -54,11 +55,11 @@
|
||||
"dependencies": {
|
||||
"@braintree/sanitize-url": "^6.0.0",
|
||||
"d3": "^7.0.0",
|
||||
"dagre-d3-es": "7.0.2",
|
||||
"dagre-d3-es": "7.0.4",
|
||||
"dompurify": "2.4.1",
|
||||
"graphlib": "^2.1.8",
|
||||
"khroma": "^2.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"moment-mini": "^2.24.0",
|
||||
"non-layered-tidy-tree-layout": "^2.0.2",
|
||||
"stylis": "^4.1.2",
|
||||
@@ -68,7 +69,7 @@
|
||||
"@types/d3": "^7.4.0",
|
||||
"@types/dompurify": "^2.4.0",
|
||||
"@types/jsdom": "^20.0.1",
|
||||
"@types/lodash": "^4.14.188",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@types/micromatch": "^4.0.2",
|
||||
"@types/prettier": "^2.7.1",
|
||||
"@types/stylis": "^4.0.2",
|
||||
@@ -78,6 +79,7 @@
|
||||
"chokidar": "^3.5.3",
|
||||
"concurrently": "^7.5.0",
|
||||
"coveralls": "^3.1.1",
|
||||
"cspell": "^6.14.3",
|
||||
"globby": "^13.1.2",
|
||||
"jison": "^0.4.18",
|
||||
"js-base64": "^3.7.2",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlibJson from 'dagre-d3-es/src/graphlib/json';
|
||||
import insertMarkers from './markers';
|
||||
import { updateNodeBounds } from './shapes/util';
|
||||
import {
|
||||
@@ -15,7 +15,7 @@ import { insertEdgeLabel, positionEdgeLabel, insertEdge, clear as clearEdges } f
|
||||
import { log } from '../logger';
|
||||
|
||||
const recursiveRender = (_elem, graph, diagramtype, parentCluster) => {
|
||||
log.info('Graph in recursive render: XXX', graphlib.json.write(graph), parentCluster);
|
||||
log.info('Graph in recursive render: XXX', graphlibJson.write(graph), parentCluster);
|
||||
const dir = graph.graph().rankdir;
|
||||
log.trace('Dir in recursive render - dir:', dir);
|
||||
|
||||
@@ -96,7 +96,7 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => {
|
||||
log.info('#############################################');
|
||||
log.info(graph);
|
||||
dagreLayout(graph);
|
||||
log.info('Graph after layout:', graphlib.json.write(graph));
|
||||
log.info('Graph after layout:', graphlibJson.write(graph));
|
||||
// Move the nodes to the correct place
|
||||
let diff = 0;
|
||||
sortNodesByHierarchy(graph).forEach(function (v) {
|
||||
@@ -153,10 +153,10 @@ export const render = (elem, graph, markers, diagramtype, id) => {
|
||||
clearClusters();
|
||||
clearGraphlib();
|
||||
|
||||
log.warn('Graph at first:', graphlib.json.write(graph));
|
||||
log.warn('Graph at first:', graphlibJson.write(graph));
|
||||
adjustClustersAndEdges(graph);
|
||||
log.warn('Graph after:', graphlib.json.write(graph));
|
||||
// log.warn('Graph ever after:', graphlib.json.write(graph.node('A').graph));
|
||||
log.warn('Graph after:', graphlibJson.write(graph));
|
||||
// log.warn('Graph ever after:', graphlibJson.write(graph.node('A').graph));
|
||||
recursiveRender(elem, graph, diagramtype);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** Decorates with functions required by mermaids dagre-wrapper. */
|
||||
import { log } from '../logger';
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlibJson from 'dagre-d3-es/src/graphlib/json';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib';
|
||||
|
||||
export let clusterDb = {};
|
||||
let decendants = {};
|
||||
@@ -322,7 +323,7 @@ export const adjustClustersAndEdges = (graph, depth) => {
|
||||
graph.setEdge(v, w, edge, e.name);
|
||||
}
|
||||
});
|
||||
log.warn('Adjusted Graph', graphlib.json.write(graph));
|
||||
log.warn('Adjusted Graph', graphlibJson.write(graph));
|
||||
extractor(graph, 0);
|
||||
|
||||
log.trace(clusterDb);
|
||||
@@ -336,7 +337,7 @@ export const adjustClustersAndEdges = (graph, depth) => {
|
||||
};
|
||||
|
||||
export const extractor = (graph, depth) => {
|
||||
log.warn('extractor - ', depth, graphlib.json.write(graph), graph.children('D'));
|
||||
log.warn('extractor - ', depth, graphlibJson.write(graph), graph.children('D'));
|
||||
if (depth > 10) {
|
||||
log.error('Bailing out');
|
||||
return;
|
||||
@@ -415,7 +416,7 @@ export const extractor = (graph, depth) => {
|
||||
return {};
|
||||
});
|
||||
|
||||
log.warn('Old graph before copy', graphlib.json.write(graph));
|
||||
log.warn('Old graph before copy', graphlibJson.write(graph));
|
||||
copy(node, graph, clusterGraph, node);
|
||||
graph.setNode(node, {
|
||||
clusterNode: true,
|
||||
@@ -424,8 +425,8 @@ export const extractor = (graph, depth) => {
|
||||
labelText: clusterDb[node].labelText,
|
||||
graph: clusterGraph,
|
||||
});
|
||||
log.warn('New graph after copy node: (', node, ')', graphlib.json.write(clusterGraph));
|
||||
log.debug('Old graph after copy', graphlib.json.write(graph));
|
||||
log.warn('New graph after copy node: (', node, ')', graphlibJson.write(clusterGraph));
|
||||
log.debug('Old graph after copy', graphlibJson.write(graph));
|
||||
} else {
|
||||
log.warn(
|
||||
'Cluster ** ',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlibJson from 'dagre-d3-es/src/graphlib/json';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib';
|
||||
import {
|
||||
validate,
|
||||
adjustClustersAndEdges,
|
||||
@@ -232,9 +233,9 @@ describe('Graphlib decorations', () => {
|
||||
g.setParent('D', 'C');
|
||||
|
||||
// log.info('Graph before', g.node('D'))
|
||||
// log.info('Graph before', graphlib.json.write(g))
|
||||
// log.info('Graph before', graphlibJson.write(g))
|
||||
adjustClustersAndEdges(g);
|
||||
// log.info('Graph after', graphlib.json.write(g), g.node('C').graph)
|
||||
// log.info('Graph after', graphlibJson.write(g), g.node('C').graph)
|
||||
|
||||
const CGraph = g.node('C').graph;
|
||||
const DGraph = CGraph.node('D').graph;
|
||||
@@ -278,9 +279,9 @@ describe('Graphlib decorations', () => {
|
||||
g.setEdge('A', 'C', { data: 'link2' }, '2');
|
||||
|
||||
log.info('Graph before', g.node('D'));
|
||||
log.info('Graph before', graphlib.json.write(g));
|
||||
log.info('Graph before', graphlibJson.write(g));
|
||||
adjustClustersAndEdges(g);
|
||||
log.trace('Graph after', graphlib.json.write(g));
|
||||
log.trace('Graph after', graphlibJson.write(g));
|
||||
expect(g.nodes()).toEqual(['C', 'B', 'A']);
|
||||
expect(g.nodes().length).toBe(3);
|
||||
expect(g.edges().length).toBe(2);
|
||||
@@ -333,11 +334,11 @@ describe('Graphlib decorations', () => {
|
||||
g.setEdge('c', 'd', { data: 'link2' }, '2');
|
||||
g.setEdge('d', 'e', { data: 'link2' }, '2');
|
||||
|
||||
log.info('Graph before', graphlib.json.write(g));
|
||||
log.info('Graph before', graphlibJson.write(g));
|
||||
adjustClustersAndEdges(g);
|
||||
const bGraph = g.node('b').graph;
|
||||
// log.trace('Graph after', graphlib.json.write(g))
|
||||
log.info('Graph after', graphlib.json.write(bGraph));
|
||||
// log.trace('Graph after', graphlibJson.write(g))
|
||||
log.info('Graph after', graphlibJson.write(bGraph));
|
||||
expect(bGraph.nodes().length).toBe(3);
|
||||
expect(bGraph.edges().length).toBe(2);
|
||||
});
|
||||
@@ -359,13 +360,13 @@ describe('Graphlib decorations', () => {
|
||||
g.setParent('c', 'b');
|
||||
g.setParent('e', 'c');
|
||||
|
||||
log.info('Graph before', graphlib.json.write(g));
|
||||
log.info('Graph before', graphlibJson.write(g));
|
||||
adjustClustersAndEdges(g);
|
||||
const aGraph = g.node('a').graph;
|
||||
const bGraph = aGraph.node('b').graph;
|
||||
log.info('Graph after', graphlib.json.write(aGraph));
|
||||
log.info('Graph after', graphlibJson.write(aGraph));
|
||||
const cGraph = bGraph.node('c').graph;
|
||||
// log.trace('Graph after', graphlib.json.write(g))
|
||||
// log.trace('Graph after', graphlibJson.write(g))
|
||||
expect(aGraph.nodes().length).toBe(1);
|
||||
expect(bGraph.nodes().length).toBe(1);
|
||||
expect(cGraph.nodes().length).toBe(1);
|
||||
@@ -387,14 +388,14 @@ flowchart TB
|
||||
const exportedGraph = JSON.parse(
|
||||
'{"options":{"directed":true,"multigraph":true,"compound":true},"nodes":[{"v":"A","value":{"labelStyle":"","shape":"rect","labelText":"A","rx":0,"ry":0,"class":"default","style":"","id":"A","width":500,"type":"group","padding":15}},{"v":"B","value":{"labelStyle":"","shape":"rect","labelText":"B","rx":0,"ry":0,"class":"default","style":"","id":"B","width":500,"type":"group","padding":15},"parent":"A"},{"v":"b","value":{"labelStyle":"","shape":"rect","labelText":"b","rx":0,"ry":0,"class":"default","style":"","id":"b","padding":15},"parent":"A"},{"v":"c","value":{"labelStyle":"","shape":"rect","labelText":"c","rx":0,"ry":0,"class":"default","style":"","id":"c","padding":15},"parent":"B"},{"v":"a","value":{"labelStyle":"","shape":"rect","labelText":"a","rx":0,"ry":0,"class":"default","style":"","id":"a","padding":15},"parent":"A"}],"edges":[{"v":"b","w":"B","name":"1","value":{"minlen":1,"arrowhead":"normal","arrowTypeStart":"arrow_open","arrowTypeEnd":"arrow_point","thickness":"normal","pattern":"solid","style":"fill:none","labelStyle":"","arrowheadStyle":"fill: #333","labelpos":"c","labelType":"text","label":"","id":"L-b-B","classes":"flowchart-link LS-b LE-B"}},{"v":"a","w":"c","name":"2","value":{"minlen":1,"arrowhead":"normal","arrowTypeStart":"arrow_open","arrowTypeEnd":"arrow_point","thickness":"normal","pattern":"solid","style":"fill:none","labelStyle":"","arrowheadStyle":"fill: #333","labelpos":"c","labelType":"text","label":"","id":"L-a-c","classes":"flowchart-link LS-a LE-c"}}],"value":{"rankdir":"TB","nodesep":50,"ranksep":50,"marginx":8,"marginy":8}}'
|
||||
);
|
||||
const gr = graphlib.json.read(exportedGraph);
|
||||
const gr = graphlibJson.read(exportedGraph);
|
||||
|
||||
log.info('Graph before', graphlib.json.write(gr));
|
||||
log.info('Graph before', graphlibJson.write(gr));
|
||||
adjustClustersAndEdges(gr);
|
||||
const aGraph = gr.node('A').graph;
|
||||
const bGraph = aGraph.node('B').graph;
|
||||
log.info('Graph after', graphlib.json.write(aGraph));
|
||||
// log.trace('Graph after', graphlib.json.write(g))
|
||||
log.info('Graph after', graphlibJson.write(aGraph));
|
||||
// log.trace('Graph after', graphlibJson.write(g))
|
||||
expect(aGraph.parent('c')).toBe('B');
|
||||
expect(aGraph.parent('B')).toBe(undefined);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { select } from 'd3';
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib';
|
||||
import { log } from '../../logger';
|
||||
import { getConfig } from '../../config';
|
||||
import { render } from '../../dagre-wrapper/index.js';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { select } from 'd3';
|
||||
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||
import { log } from '../../logger';
|
||||
import svgDraw from './svgDraw';
|
||||
import { configureSvgSize } from '../../setupGraphViewbox';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib';
|
||||
import { line, curveBasis, select } from 'd3';
|
||||
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
|
||||
import { getConfig } from '../../config';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib';
|
||||
import { select, curveLinear, selectAll } from 'd3';
|
||||
|
||||
import flowDb from './flowDb';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib';
|
||||
import { select, curveLinear, selectAll } from 'd3';
|
||||
import { getConfig } from '../../config';
|
||||
import { render as Render } from 'dagre-d3-es';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import flowDb from '../flowDb';
|
||||
import flow from './flow';
|
||||
import filter from 'lodash/filter';
|
||||
import filter from 'lodash-es/filter';
|
||||
import { setConfig } from '../../../config';
|
||||
|
||||
setConfig({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import flowDb from '../flowDb';
|
||||
import flow from './flow';
|
||||
import filter from 'lodash/filter';
|
||||
import filter from 'lodash-es/filter';
|
||||
import { setConfig } from '../../../config';
|
||||
|
||||
setConfig({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { line, select } from 'd3';
|
||||
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||
import { log } from '../../logger';
|
||||
import { configureSvgSize } from '../../setupGraphViewbox';
|
||||
import common from '../common/common';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib';
|
||||
import { select } from 'd3';
|
||||
import { getConfig } from '../../config';
|
||||
import { render } from '../../dagre-wrapper/index.js';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { select } from 'd3';
|
||||
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
|
||||
import graphlib from 'graphlib';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||
import { log } from '../../logger';
|
||||
import common from '../common/common';
|
||||
import { drawState, addTitleAndBox, drawEdge } from './shapes';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Update https://github.com/mermaid-js/mermaid/blob/18c27c6f1d0537a738cbd95898df301b83c38ffc/packages/mermaid/src/docs.mts#L246 once fixed
|
||||
|
||||
import { expect, test } from 'vitest';
|
||||
import { getRedirect } from './.vitepress/theme/redirect';
|
||||
import { getRedirect } from './redirect';
|
||||
|
||||
test.each([
|
||||
['http://localhost:1234/mermaid/#/flowchart.md', 'syntax/flowchart.html'],
|
||||
@@ -116,6 +116,7 @@ They also serve as proof of concept, for the variety of things that can be built
|
||||
- [Draw.io](https://draw.io) - [Plugin](https://github.com/nopeslide/drawio_mermaid_plugin)
|
||||
- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid)
|
||||
- [Vim](https://www.vim.org)
|
||||
- [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid)
|
||||
- [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram)
|
||||
- [GNU Emacs](https://www.gnu.org/software/emacs/)
|
||||
- [Major mode for .mmd files](https://github.com/abrochard/mermaid-mode)
|
||||
|
||||
@@ -29,7 +29,7 @@ import utils, { directiveSanitizer } from './utils';
|
||||
import DOMPurify from 'dompurify';
|
||||
import { MermaidConfig } from './config.type';
|
||||
import { evaluate } from './diagrams/common/common';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import isEmpty from 'lodash-es/isEmpty';
|
||||
|
||||
// diagram names that support classDef statements
|
||||
const CLASSDEF_DIAGRAMS = ['graph', 'flowchart', 'flowchart-v2', 'stateDiagram', 'stateDiagram-v2'];
|
||||
|
||||
@@ -3,7 +3,7 @@ import utils from './utils';
|
||||
import assignWithDepth from './assignWithDepth';
|
||||
import { detectType } from './diagram-api/detectType';
|
||||
import { addDiagrams } from './diagram-api/diagram-orchestration';
|
||||
import memoize from 'lodash/memoize';
|
||||
import memoize from 'lodash-es/memoize';
|
||||
import { MockD3 } from 'd3';
|
||||
addDiagrams();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { log } from './logger';
|
||||
import { detectType } from './diagram-api/detectType';
|
||||
import assignWithDepth from './assignWithDepth';
|
||||
import { MermaidConfig } from './config.type';
|
||||
import memoize from 'lodash/memoize';
|
||||
import memoize from 'lodash-es/memoize';
|
||||
|
||||
// Effectively an enum of the supported curve types, accessible by name
|
||||
const d3CurveTypes = {
|
||||
@@ -561,8 +561,16 @@ export const drawSimpleText = function (
|
||||
return textElem;
|
||||
};
|
||||
|
||||
export const wrapLabel = memoize(
|
||||
(label, maxWidth, config) => {
|
||||
interface WrapLabelConfig {
|
||||
fontSize: number;
|
||||
fontFamily: string;
|
||||
fontWeight: number;
|
||||
joinWith: string;
|
||||
}
|
||||
|
||||
export const wrapLabel: (label: string, maxWidth: string, config: WrapLabelConfig) => string =
|
||||
memoize(
|
||||
(label: string, maxWidth: string, config: WrapLabelConfig): string => {
|
||||
if (!label) {
|
||||
return label;
|
||||
}
|
||||
@@ -601,14 +609,29 @@ export const wrapLabel = memoize(
|
||||
`${label}${maxWidth}${config.fontSize}${config.fontWeight}${config.fontFamily}${config.joinWith}`
|
||||
);
|
||||
|
||||
const breakString = memoize(
|
||||
(word, maxWidth, hyphenCharacter = '-', config) => {
|
||||
interface BreakStringOutput {
|
||||
hyphenatedStrings: string[];
|
||||
remainingWord: string;
|
||||
}
|
||||
|
||||
const breakString: (
|
||||
word: string,
|
||||
maxWidth: number,
|
||||
hyphenCharacter: string,
|
||||
config: WrapLabelConfig
|
||||
) => BreakStringOutput = memoize(
|
||||
(
|
||||
word: string,
|
||||
maxWidth: number,
|
||||
hyphenCharacter = '-',
|
||||
config: WrapLabelConfig
|
||||
): BreakStringOutput => {
|
||||
config = Object.assign(
|
||||
{ fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },
|
||||
config
|
||||
);
|
||||
const characters = word.split('');
|
||||
const lines = [];
|
||||
const lines: string[] = [];
|
||||
let currentLine = '';
|
||||
characters.forEach((character, index) => {
|
||||
const nextLine = `${currentLine}${character}`;
|
||||
@@ -667,6 +690,16 @@ export function calculateTextWidth(
|
||||
return calculateTextDimensions(text, config).width;
|
||||
}
|
||||
|
||||
interface TextDimensionConfig {
|
||||
fontSize?: number;
|
||||
fontWeight?: number;
|
||||
fontFamily?: string;
|
||||
}
|
||||
interface TextDimensions {
|
||||
width: number;
|
||||
height: number;
|
||||
lineHeight?: number;
|
||||
}
|
||||
/**
|
||||
* This calculates the dimensions of the given text, font size, font family, font weight, and
|
||||
* margins.
|
||||
@@ -676,15 +709,11 @@ export function calculateTextWidth(
|
||||
* the resulting size
|
||||
* @returns The dimensions for the given text
|
||||
*/
|
||||
export const calculateTextDimensions = memoize(
|
||||
function (
|
||||
export const calculateTextDimensions: (
|
||||
text: string,
|
||||
config: {
|
||||
fontSize?: number;
|
||||
fontWeight?: number;
|
||||
fontFamily?: string;
|
||||
}
|
||||
) {
|
||||
config: TextDimensionConfig
|
||||
) => TextDimensions = memoize(
|
||||
(text: string, config: TextDimensionConfig): TextDimensions => {
|
||||
config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);
|
||||
const { fontSize, fontFamily, fontWeight } = config;
|
||||
if (!text) {
|
||||
|
||||
380
pnpm-lock.yaml
generated
380
pnpm-lock.yaml
generated
@@ -91,6 +91,9 @@ importers:
|
||||
eslint-plugin-json:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
eslint-plugin-lodash:
|
||||
specifier: ^7.4.0
|
||||
version: 7.4.0_eslint@8.27.0
|
||||
eslint-plugin-markdown:
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0_eslint@8.27.0
|
||||
@@ -100,6 +103,9 @@ importers:
|
||||
eslint-plugin-tsdoc:
|
||||
specifier: ^0.2.17
|
||||
version: 0.2.17
|
||||
eslint-plugin-unicorn:
|
||||
specifier: ^45.0.0
|
||||
version: 45.0.0_eslint@8.27.0
|
||||
express:
|
||||
specifier: ^4.18.2
|
||||
version: 4.18.2
|
||||
@@ -155,8 +161,8 @@ importers:
|
||||
specifier: ^3.2.3
|
||||
version: 3.2.3_@types+node@18.11.9
|
||||
vitest:
|
||||
specifier: ^0.25.1
|
||||
version: 0.25.1_oullksb5ic6y72oh2wekoaiuii
|
||||
specifier: ^0.25.3
|
||||
version: 0.25.3_oullksb5ic6y72oh2wekoaiuii
|
||||
|
||||
packages/mermaid:
|
||||
dependencies:
|
||||
@@ -167,8 +173,8 @@ importers:
|
||||
specifier: ^7.0.0
|
||||
version: 7.6.1
|
||||
dagre-d3-es:
|
||||
specifier: 7.0.2
|
||||
version: 7.0.2
|
||||
specifier: 7.0.4
|
||||
version: 7.0.4
|
||||
dompurify:
|
||||
specifier: 2.4.1
|
||||
version: 2.4.1
|
||||
@@ -178,7 +184,7 @@ importers:
|
||||
khroma:
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
lodash:
|
||||
lodash-es:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
moment-mini:
|
||||
@@ -203,9 +209,9 @@ importers:
|
||||
'@types/jsdom':
|
||||
specifier: ^20.0.1
|
||||
version: 20.0.1
|
||||
'@types/lodash':
|
||||
specifier: ^4.14.188
|
||||
version: 4.14.188
|
||||
'@types/lodash-es':
|
||||
specifier: ^4.17.6
|
||||
version: 4.17.6
|
||||
'@types/micromatch':
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
@@ -233,6 +239,9 @@ importers:
|
||||
coveralls:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
cspell:
|
||||
specifier: ^6.14.3
|
||||
version: 6.14.3
|
||||
globby:
|
||||
specifier: ^13.1.2
|
||||
version: 13.1.2
|
||||
@@ -1355,21 +1364,84 @@ packages:
|
||||
'@cspell/dict-vue': 3.0.0
|
||||
dev: true
|
||||
|
||||
/@cspell/cspell-bundled-dicts/6.14.3:
|
||||
resolution: {integrity: sha512-bgPBduoDi1jkrcLkmAwRG1c6F1iprF2yfBgEDT19dRG1kYuq/fLGNOcSmEp4CbApn8m0MmxsrhEp8O0Q9owQRQ==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/dict-ada': 4.0.0
|
||||
'@cspell/dict-aws': 3.0.0
|
||||
'@cspell/dict-bash': 4.1.0
|
||||
'@cspell/dict-companies': 3.0.3
|
||||
'@cspell/dict-cpp': 4.0.0
|
||||
'@cspell/dict-cryptocurrencies': 3.0.1
|
||||
'@cspell/dict-csharp': 4.0.1
|
||||
'@cspell/dict-css': 4.0.0
|
||||
'@cspell/dict-dart': 2.0.0
|
||||
'@cspell/dict-django': 4.0.0
|
||||
'@cspell/dict-docker': 1.1.3
|
||||
'@cspell/dict-dotnet': 4.0.0
|
||||
'@cspell/dict-elixir': 4.0.0
|
||||
'@cspell/dict-en-gb': 1.1.33
|
||||
'@cspell/dict-en_us': 4.1.0
|
||||
'@cspell/dict-filetypes': 3.0.0
|
||||
'@cspell/dict-fonts': 3.0.0
|
||||
'@cspell/dict-fullstack': 3.0.0
|
||||
'@cspell/dict-git': 2.0.0
|
||||
'@cspell/dict-golang': 5.0.0
|
||||
'@cspell/dict-haskell': 4.0.0
|
||||
'@cspell/dict-html': 4.0.1
|
||||
'@cspell/dict-html-symbol-entities': 4.0.0
|
||||
'@cspell/dict-java': 5.0.2
|
||||
'@cspell/dict-latex': 3.0.0
|
||||
'@cspell/dict-lorem-ipsum': 3.0.0
|
||||
'@cspell/dict-lua': 3.0.0
|
||||
'@cspell/dict-node': 4.0.1
|
||||
'@cspell/dict-npm': 4.0.1
|
||||
'@cspell/dict-php': 3.0.3
|
||||
'@cspell/dict-powershell': 3.0.0
|
||||
'@cspell/dict-public-licenses': 2.0.0
|
||||
'@cspell/dict-python': 4.0.0
|
||||
'@cspell/dict-r': 2.0.0
|
||||
'@cspell/dict-ruby': 3.0.0
|
||||
'@cspell/dict-rust': 3.0.0
|
||||
'@cspell/dict-scala': 3.0.0
|
||||
'@cspell/dict-software-terms': 3.0.5
|
||||
'@cspell/dict-sql': 2.0.0
|
||||
'@cspell/dict-swift': 2.0.0
|
||||
'@cspell/dict-typescript': 3.0.1
|
||||
'@cspell/dict-vue': 3.0.0
|
||||
dev: true
|
||||
|
||||
/@cspell/cspell-pipe/6.14.2:
|
||||
resolution: {integrity: sha512-9H7Z/jy2tGpMW9T/JOk8T3bqvQoHJIz1wddktA5Lq8fnMqlDhM9le2uykhVlLpemLhWpDS2fNzLJ3sHiaPgHBA==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@cspell/cspell-pipe/6.14.3:
|
||||
resolution: {integrity: sha512-/mLZxJOK3/UFpnR4jrImKY5W4cn5XWjvQPXnFCEzpU0tAAF6GboJgWl30TegqFJjLVCKTNRMOtT1r6kgvb66zw==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@cspell/cspell-service-bus/6.14.2:
|
||||
resolution: {integrity: sha512-IOK4MqwDNS2y29eZjdpHrCQ0ouTWZCS2e3EOmlvY+yUpT7e1AX8pVOaar4jLnXg03evAjrFrrmfmhFI6poO6Hg==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@cspell/cspell-service-bus/6.14.3:
|
||||
resolution: {integrity: sha512-89OWGBzhorhiWcFqFTeHl9Y6WTdd5MGC2XNNCVZLM3VTYaFx4DVkiyxWdkE7gHjYxvNdGSH54/fE18TqLc//dQ==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@cspell/cspell-types/6.14.2:
|
||||
resolution: {integrity: sha512-/EZYVglm6+2GlnkFTzuLuQFr7vrttkhG+ZsNO9EDcFYB5N7O2ndNSkTQFxGi8FS8R3RS5CHyS5X6hANnolzvfQ==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@cspell/cspell-types/6.14.3:
|
||||
resolution: {integrity: sha512-u4Hun0vOQVkk3tJ6VzPjHVmv2dq0D6jYqX8pWLKWRwo38rdoIkdWseN359sWCz96tDM8g5rpSFdmecbWLU7BYg==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@cspell/dict-ada/4.0.0:
|
||||
resolution: {integrity: sha512-M0n4ZYmpLOXbDD07Qb/Ekk0K5pX2C+mCuJ2ZxPgbTq9HGlrN43PmqrGJHWcgtVHE3fd1D4VxS85QcQP6r1Y+KQ==}
|
||||
dev: true
|
||||
@@ -1552,6 +1624,11 @@ packages:
|
||||
engines: {node: '>=14.6'}
|
||||
dev: true
|
||||
|
||||
/@cspell/strong-weak-map/6.14.3:
|
||||
resolution: {integrity: sha512-/FTvcywuwfFTMEpRabL8+rqB/ezSjvMp6todO0SwL/agYQmRIuTvTYLh0Ikq430oVnjo7LDgztW0tHq38UlFLw==}
|
||||
engines: {node: '>=14.6'}
|
||||
dev: true
|
||||
|
||||
/@cspotcode/source-map-support/0.8.1:
|
||||
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -2466,6 +2543,12 @@ packages:
|
||||
resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==}
|
||||
dev: true
|
||||
|
||||
/@types/lodash-es/4.17.6:
|
||||
resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==}
|
||||
dependencies:
|
||||
'@types/lodash': 4.14.188
|
||||
dev: true
|
||||
|
||||
/@types/lodash/4.14.188:
|
||||
resolution: {integrity: sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w==}
|
||||
dev: true
|
||||
@@ -3663,6 +3746,11 @@ packages:
|
||||
ieee754: 1.2.1
|
||||
dev: true
|
||||
|
||||
/builtin-modules/3.3.0:
|
||||
resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/bytes/3.0.0:
|
||||
resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==}
|
||||
engines: {node: '>= 0.8'}
|
||||
@@ -3869,6 +3957,13 @@ packages:
|
||||
jsonlint: 1.6.0
|
||||
dev: true
|
||||
|
||||
/clean-regexp/1.0.0:
|
||||
resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==}
|
||||
engines: {node: '>=4'}
|
||||
dependencies:
|
||||
escape-string-regexp: 1.0.5
|
||||
dev: true
|
||||
|
||||
/clean-stack/2.2.0:
|
||||
resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -4001,6 +4096,11 @@ packages:
|
||||
engines: {node: ^12.20.0 || >=14}
|
||||
dev: true
|
||||
|
||||
/commander/9.4.1:
|
||||
resolution: {integrity: sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==}
|
||||
engines: {node: ^12.20.0 || >=14}
|
||||
dev: true
|
||||
|
||||
/comment-json/4.2.3:
|
||||
resolution: {integrity: sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==}
|
||||
engines: {node: '>= 6'}
|
||||
@@ -4195,6 +4295,17 @@ packages:
|
||||
yaml: 1.10.2
|
||||
dev: true
|
||||
|
||||
/cosmiconfig/7.1.0:
|
||||
resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==}
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
'@types/parse-json': 4.0.0
|
||||
import-fresh: 3.3.0
|
||||
parse-json: 5.2.0
|
||||
path-type: 4.0.0
|
||||
yaml: 1.10.2
|
||||
dev: true
|
||||
|
||||
/coveralls/3.1.1:
|
||||
resolution: {integrity: sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -4247,6 +4358,26 @@ packages:
|
||||
gensequence: 4.0.2
|
||||
dev: true
|
||||
|
||||
/cspell-dictionary/6.14.3:
|
||||
resolution: {integrity: sha512-yIqJEZZj36j1CmmjAiuQOYZM6T62Ih7k35DhAU1hYVARUEEnFN/Uz72UkDj2SAmURVn2On+bAmZ5zCx0JZzf2g==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/cspell-pipe': 6.14.3
|
||||
'@cspell/cspell-types': 6.14.3
|
||||
cspell-trie-lib: 6.14.3
|
||||
fast-equals: 4.0.3
|
||||
gensequence: 4.0.2
|
||||
dev: true
|
||||
|
||||
/cspell-gitignore/6.14.3:
|
||||
resolution: {integrity: sha512-CZTGxx3msF6p1Z0xgLe5LXXvve7DooSuRMBMdGn230usce1nKoxpPoPxgs+zXeCpi+FanykKnoZkdRvjolMpOA==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
cspell-glob: 6.14.3
|
||||
find-up: 5.0.0
|
||||
dev: true
|
||||
|
||||
/cspell-glob/6.14.2:
|
||||
resolution: {integrity: sha512-a9o3lBccEcH2676RGge2YqEORovm+II++D53P6hOW/23ltDe1J509MSY6CJdYdPk/VssOExas6akJ6FbKSCBgw==}
|
||||
engines: {node: '>=14'}
|
||||
@@ -4254,6 +4385,13 @@ packages:
|
||||
micromatch: 4.0.5
|
||||
dev: true
|
||||
|
||||
/cspell-glob/6.14.3:
|
||||
resolution: {integrity: sha512-ISwCK8GqM/dnvtaxA17w1MPmMzFLOqdTz+JWIcR4at47T9qd8bNB0X0P4eqyuqgsbKkWbfnSlsYlEjRHTi4a7A==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
micromatch: 4.0.5
|
||||
dev: true
|
||||
|
||||
/cspell-grammar/6.14.2:
|
||||
resolution: {integrity: sha512-Q9+gwp1U/qnECTqxa7WBMPn6sgBfXPIM68jXg8RgNMAuy1CE+m1eTCM9FBNFNpNKJWjaZPvANLOW5/EStN2A/A==}
|
||||
engines: {node: '>=14'}
|
||||
@@ -4263,6 +4401,15 @@ packages:
|
||||
'@cspell/cspell-types': 6.14.2
|
||||
dev: true
|
||||
|
||||
/cspell-grammar/6.14.3:
|
||||
resolution: {integrity: sha512-Nz8tYUmstyKcFlXbxdw4N8NsQ2ZY/5ztNfouokk47LKaTAS0LyWlLSkZUxN016fMY2h+C+3dI+jaut2H/rtNew==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@cspell/cspell-pipe': 6.14.3
|
||||
'@cspell/cspell-types': 6.14.3
|
||||
dev: true
|
||||
|
||||
/cspell-io/6.14.2:
|
||||
resolution: {integrity: sha512-QyQ0BBfDvF6B37SlSsmlzRnaGqiIHt7c5NsCNKf3ZfioTWkNI/fiabvSkpNGBAkELP6BPBxjsG+TaS+swZp+Kg==}
|
||||
engines: {node: '>=14'}
|
||||
@@ -4273,6 +4420,16 @@ packages:
|
||||
- encoding
|
||||
dev: true
|
||||
|
||||
/cspell-io/6.14.3:
|
||||
resolution: {integrity: sha512-EbH+qopgWIzr9SZCGDsF4AWYgucN4QzYeAgyXjTbV9RnNIGKOKovMe3vN9nxjOZyPKv2TvmgU+uMXDM61iObRw==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/cspell-service-bus': 6.14.3
|
||||
node-fetch: 2.6.7
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: true
|
||||
|
||||
/cspell-lib/6.14.2:
|
||||
resolution: {integrity: sha512-QNsmWix0oFi1CjzFfNG1xAJVl1OC+6kiWvq0A1S8VD3LJhJVvBqSv1vudpL1oS7H2/2yxk9PUC/MajGLi5i5MQ==}
|
||||
engines: {node: '>=14.6'}
|
||||
@@ -4303,6 +4460,36 @@ packages:
|
||||
- encoding
|
||||
dev: true
|
||||
|
||||
/cspell-lib/6.14.3:
|
||||
resolution: {integrity: sha512-RJT5Tbe0UCMCtqDWRujjxq9u23sc2XylIpDP7MnpLx8wLVgFv2WPzESYNRGZqceqZYwBAPnpqS9h2ANxXSi8UQ==}
|
||||
engines: {node: '>=14.6'}
|
||||
dependencies:
|
||||
'@cspell/cspell-bundled-dicts': 6.14.3
|
||||
'@cspell/cspell-pipe': 6.14.3
|
||||
'@cspell/cspell-types': 6.14.3
|
||||
'@cspell/strong-weak-map': 6.14.3
|
||||
clear-module: 4.1.2
|
||||
comment-json: 4.2.3
|
||||
configstore: 5.0.1
|
||||
cosmiconfig: 7.1.0
|
||||
cspell-dictionary: 6.14.3
|
||||
cspell-glob: 6.14.3
|
||||
cspell-grammar: 6.14.3
|
||||
cspell-io: 6.14.3
|
||||
cspell-trie-lib: 6.14.3
|
||||
fast-equals: 4.0.3
|
||||
find-up: 5.0.0
|
||||
fs-extra: 10.1.0
|
||||
gensequence: 4.0.2
|
||||
import-fresh: 3.3.0
|
||||
resolve-from: 5.0.0
|
||||
resolve-global: 1.0.0
|
||||
vscode-languageserver-textdocument: 1.0.7
|
||||
vscode-uri: 3.0.6
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: true
|
||||
|
||||
/cspell-trie-lib/6.14.2:
|
||||
resolution: {integrity: sha512-+aTRwFUzBPFbJ8zlDwzB1ew/gP7L6kddoXjmqCNeFx9B5DiwN1KPFRo+uBx21JOkoavnviGU//DpyWSU9Cittw==}
|
||||
engines: {node: '>=14'}
|
||||
@@ -4313,6 +4500,40 @@ packages:
|
||||
gensequence: 4.0.2
|
||||
dev: true
|
||||
|
||||
/cspell-trie-lib/6.14.3:
|
||||
resolution: {integrity: sha512-WVa5gbD9glsZ4c60qPD5RTwojKc5ooxw/Gn+HC9CBdWv5rE1AmM1V3yVWhYx2ZMbJufboBrzmSjJB9qdmUl3oA==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/cspell-pipe': 6.14.3
|
||||
'@cspell/cspell-types': 6.14.3
|
||||
fs-extra: 10.1.0
|
||||
gensequence: 4.0.2
|
||||
dev: true
|
||||
|
||||
/cspell/6.14.3:
|
||||
resolution: {integrity: sha512-DimVpUiw2iOSvO1daOTtOWjmryVZdFnPmjPhyhWZUqakOEgE2MgoBuk3cFzXqb8GsGXHQh5PqiWr1rqIkQ99qA==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@cspell/cspell-pipe': 6.14.3
|
||||
chalk: 4.1.2
|
||||
commander: 9.4.1
|
||||
cspell-gitignore: 6.14.3
|
||||
cspell-glob: 6.14.3
|
||||
cspell-lib: 6.14.3
|
||||
fast-json-stable-stringify: 2.1.0
|
||||
file-entry-cache: 6.0.1
|
||||
fs-extra: 10.1.0
|
||||
get-stdin: 8.0.0
|
||||
glob: 8.0.3
|
||||
imurmurhash: 0.1.4
|
||||
semver: 7.3.8
|
||||
strip-ansi: 6.0.1
|
||||
vscode-uri: 3.0.6
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: true
|
||||
|
||||
/css-tree/1.0.0-alpha.39:
|
||||
resolution: {integrity: sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
@@ -4681,8 +4902,8 @@ packages:
|
||||
d3-zoom: 3.0.0
|
||||
dev: false
|
||||
|
||||
/dagre-d3-es/7.0.2:
|
||||
resolution: {integrity: sha512-m9+5yhzkf9gyklDMdWlQC/8bayGVlTF8GspmN6XC6nnZjas6kAmffvh0c/EcyFhQ+fp4QIl0fMpNdv76AJGlVQ==}
|
||||
/dagre-d3-es/7.0.4:
|
||||
resolution: {integrity: sha512-fQL8ldFR9UYpecz48d1smrXNJ9zGUK38Vl5OzX6Fhn9LR+oQh0GzHRPQylP5kWawmMTKm1QtqcHMVySMJ5CYaQ==}
|
||||
dependencies:
|
||||
d3: 7.6.1
|
||||
lodash-es: 4.17.21
|
||||
@@ -5421,6 +5642,16 @@ packages:
|
||||
vscode-json-languageservice: 4.2.1
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-lodash/7.4.0_eslint@8.27.0:
|
||||
resolution: {integrity: sha512-Tl83UwVXqe1OVeBRKUeWcfg6/pCW1GTRObbdnbEJgYwjxp5Q92MEWQaH9+dmzbRt6kvYU1Mp893E79nJiCSM8A==}
|
||||
engines: {node: '>=10'}
|
||||
peerDependencies:
|
||||
eslint: '>=2'
|
||||
dependencies:
|
||||
eslint: 8.27.0
|
||||
lodash: 4.17.21
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-markdown/3.0.0_eslint@8.27.0:
|
||||
resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
@@ -5445,6 +5676,31 @@ packages:
|
||||
'@microsoft/tsdoc-config': 0.16.2
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-unicorn/45.0.0_eslint@8.27.0:
|
||||
resolution: {integrity: sha512-iP8cMRxXKHonKioOhnCoCcqVhoqhAp6rB+nsoLjXFDxTHz3btWMAp8xwzjHA0B1K6YV/U/Yvqn1bUXZt8sJPuQ==}
|
||||
engines: {node: '>=14.18'}
|
||||
peerDependencies:
|
||||
eslint: '>=8.28.0'
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.19.1
|
||||
ci-info: 3.6.2
|
||||
clean-regexp: 1.0.0
|
||||
eslint: 8.27.0
|
||||
eslint-utils: 3.0.0_eslint@8.27.0
|
||||
esquery: 1.4.0
|
||||
indent-string: 4.0.0
|
||||
is-builtin-module: 3.2.0
|
||||
jsesc: 3.0.2
|
||||
lodash: 4.17.21
|
||||
pluralize: 8.0.0
|
||||
read-pkg-up: 7.0.1
|
||||
regexp-tree: 0.1.24
|
||||
regjsparser: 0.9.1
|
||||
safe-regex: 2.1.1
|
||||
semver: 7.3.8
|
||||
strip-indent: 3.0.0
|
||||
dev: true
|
||||
|
||||
/eslint-scope/5.1.1:
|
||||
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
@@ -6075,6 +6331,11 @@ packages:
|
||||
engines: {node: '>=0.12.0'}
|
||||
dev: true
|
||||
|
||||
/get-stdin/8.0.0:
|
||||
resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==}
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/get-stream/4.1.0:
|
||||
resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -6161,6 +6422,17 @@ packages:
|
||||
path-is-absolute: 1.0.1
|
||||
dev: true
|
||||
|
||||
/glob/8.0.3:
|
||||
resolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
fs.realpath: 1.0.0
|
||||
inflight: 1.0.6
|
||||
inherits: 2.0.4
|
||||
minimatch: 5.1.0
|
||||
once: 1.4.0
|
||||
dev: true
|
||||
|
||||
/global-dirs/0.1.1:
|
||||
resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -6633,6 +6905,13 @@ packages:
|
||||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/is-builtin-module/3.2.0:
|
||||
resolution: {integrity: sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==}
|
||||
engines: {node: '>=6'}
|
||||
dependencies:
|
||||
builtin-modules: 3.3.0
|
||||
dev: true
|
||||
|
||||
/is-ci/3.0.1:
|
||||
resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==}
|
||||
hasBin: true
|
||||
@@ -7405,12 +7684,23 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/jsesc/0.5.0:
|
||||
resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/jsesc/2.5.2:
|
||||
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
|
||||
engines: {node: '>=4'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/jsesc/3.0.2:
|
||||
resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
|
||||
engines: {node: '>=6'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/json-buffer/3.0.1:
|
||||
resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
|
||||
dev: true
|
||||
@@ -8702,6 +8992,11 @@ packages:
|
||||
xmlbuilder: 15.1.1
|
||||
dev: true
|
||||
|
||||
/pluralize/8.0.0:
|
||||
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
|
||||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/png-async/0.9.4:
|
||||
resolution: {integrity: sha512-B//AXX9TkneKfgtOpT1mdUnnhk2BImGD+a98vImsMU8uo1dBeHyW/kM2erWZ/CsYteTPU/xKG+t6T62heHkC3A==}
|
||||
dev: true
|
||||
@@ -8982,11 +9277,23 @@ packages:
|
||||
strip-indent: 3.0.0
|
||||
dev: true
|
||||
|
||||
/regexp-tree/0.1.24:
|
||||
resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/regexpp/3.2.0:
|
||||
resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/regjsparser/0.9.1:
|
||||
resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
jsesc: 0.5.0
|
||||
dev: true
|
||||
|
||||
/remark-parse/10.0.1:
|
||||
resolution: {integrity: sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==}
|
||||
dependencies:
|
||||
@@ -9217,6 +9524,12 @@ packages:
|
||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
dev: true
|
||||
|
||||
/safe-regex/2.1.1:
|
||||
resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==}
|
||||
dependencies:
|
||||
regexp-tree: 0.1.24
|
||||
dev: true
|
||||
|
||||
/safer-buffer/2.1.2:
|
||||
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
|
||||
|
||||
@@ -10526,6 +10839,53 @@ packages:
|
||||
- terser
|
||||
dev: true
|
||||
|
||||
/vitest/0.25.3_oullksb5ic6y72oh2wekoaiuii:
|
||||
resolution: {integrity: sha512-/UzHfXIKsELZhL7OaM2xFlRF8HRZgAHtPctacvNK8H4vOcbJJAMEgbWNGSAK7Y9b1NBe5SeM7VTuz2RsTHFJJA==}
|
||||
engines: {node: '>=v14.16.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@edge-runtime/vm': '*'
|
||||
'@vitest/browser': '*'
|
||||
'@vitest/ui': '*'
|
||||
happy-dom: '*'
|
||||
jsdom: '*'
|
||||
peerDependenciesMeta:
|
||||
'@edge-runtime/vm':
|
||||
optional: true
|
||||
'@vitest/browser':
|
||||
optional: true
|
||||
'@vitest/ui':
|
||||
optional: true
|
||||
happy-dom:
|
||||
optional: true
|
||||
jsdom:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/chai': 4.3.3
|
||||
'@types/chai-subset': 1.3.3
|
||||
'@types/node': 18.11.9
|
||||
'@vitest/ui': 0.25.1
|
||||
acorn: 8.8.0
|
||||
acorn-walk: 8.2.0
|
||||
chai: 4.3.6
|
||||
debug: 4.3.4
|
||||
jsdom: 20.0.2
|
||||
local-pkg: 0.4.2
|
||||
source-map: 0.6.1
|
||||
strip-literal: 0.4.2
|
||||
tinybench: 2.3.1
|
||||
tinypool: 0.3.0
|
||||
tinyspy: 1.0.2
|
||||
vite: 3.2.3_@types+node@18.11.9
|
||||
transitivePeerDependencies:
|
||||
- less
|
||||
- sass
|
||||
- stylus
|
||||
- sugarss
|
||||
- supports-color
|
||||
- terser
|
||||
dev: true
|
||||
|
||||
/vm2/3.9.11:
|
||||
resolution: {integrity: sha512-PFG8iJRSjvvBdisowQ7iVF580DXb1uCIiGaXgm7tynMR1uTBlv7UJlB1zdv5KJ+Tmq1f0Upnj3fayoEOPpCBKg==}
|
||||
engines: {node: '>=6.0'}
|
||||
|
||||
Reference in New Issue
Block a user