From 7f098c069c51c9d727bcdbb780e0a03d290e149e Mon Sep 17 00:00:00 2001 From: Kenneth Schackart Date: Thu, 22 Jun 2023 16:00:40 -0700 Subject: [PATCH 01/21] Add citation.cff file --- CITATION.cff | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 000000000..43f8b8936 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,15 @@ +cff-version: 1.2.0 +title: "Mermaid: Generate diagrams from markdown-like text" +message: >- + If you use this software, please cite it using the metadata from this file. +type: software +authors: + - family-names: Sveidqvist + given-names: Knut + - name: "Contributors to Mermaid" +repository-code: "https://github.com/mermaid-js/mermaid" +url: "https://mermaid.js.org/" +abstract: >- + JavaScript based diagramming and charting tool that renders Markdown-inspired + text definitions to create and modify diagrams dynamically. +license: MIT From 07f6358a804900073fee7e69c8430b7ea6f69ca7 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Sat, 24 Jun 2023 22:18:00 +0300 Subject: [PATCH 02/21] fix not rendered style when style is optional --- packages/mermaid/src/diagram-api/diagramAPI.ts | 5 +---- packages/mermaid/src/styles.ts | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/mermaid/src/diagram-api/diagramAPI.ts b/packages/mermaid/src/diagram-api/diagramAPI.ts index 457dd673b..7e89d9cd7 100644 --- a/packages/mermaid/src/diagram-api/diagramAPI.ts +++ b/packages/mermaid/src/diagram-api/diagramAPI.ts @@ -7,7 +7,6 @@ import { addStylesForDiagram } from '../styles.js'; import { DiagramDefinition, DiagramDetector } from './types.js'; import * as _commonDb from '../commonDb.js'; import { parseDirective as _parseDirective } from '../directiveUtils.js'; -import isEmpty from 'lodash-es/isEmpty.js'; /* Packaging and exposing resources for external diagrams so that they can import @@ -51,9 +50,7 @@ export const registerDiagram = ( if (detector) { addDetector(id, detector); } - if (!isEmpty(diagram.styles)) { - addStylesForDiagram(id, diagram.styles); - } + addStylesForDiagram(id, diagram.styles); if (diagram.injectUtils) { diagram.injectUtils( diff --git a/packages/mermaid/src/styles.ts b/packages/mermaid/src/styles.ts index a6e752475..74322f678 100644 --- a/packages/mermaid/src/styles.ts +++ b/packages/mermaid/src/styles.ts @@ -73,8 +73,10 @@ const getStyles = ( `; }; -export const addStylesForDiagram = (type: string, diagramTheme: unknown): void => { - themes[type] = diagramTheme; +export const addStylesForDiagram = (type: string, diagramTheme?: unknown): void => { + if (diagramTheme !== undefined) { + themes[type] = diagramTheme; + } }; export default getStyles; From f90a7dc784561caf35a6b02afa2b005226f63b19 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 02:45:06 +0000 Subject: [PATCH 03/21] fix(deps): update all patch dependencies --- docker-compose.yml | 2 +- package.json | 4 ++-- packages/mermaid/src/docs/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2762f3b99..b492ecba1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.9' services: mermaid: - image: node:18.16.0-alpine3.18 + image: node:18.16.1-alpine3.18 stdin_open: true tty: true working_dir: /mermaid diff --git a/package.json b/package.json index ac197712c..41202e83f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "10.2.3", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", - "packageManager": "pnpm@8.6.2", + "packageManager": "pnpm@8.6.4", "keywords": [ "diagram", "markdown", @@ -121,7 +121,7 @@ "vitest": "^0.32.2" }, "volta": { - "node": "18.16.0" + "node": "18.16.1" }, "nyc": { "report-dir": "coverage/cypress" diff --git a/packages/mermaid/src/docs/package.json b/packages/mermaid/src/docs/package.json index 63d06fd21..37e1cffa6 100644 --- a/packages/mermaid/src/docs/package.json +++ b/packages/mermaid/src/docs/package.json @@ -30,7 +30,7 @@ "unplugin-vue-components": "^0.25.0", "vite": "^4.3.3", "vite-plugin-pwa": "^0.16.0", - "vitepress": "1.0.0-beta.2", + "vitepress": "1.0.0-beta.3", "workbox-window": "^6.5.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 308f6e32e..52ec06740 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -445,8 +445,8 @@ importers: specifier: ^0.16.0 version: 0.16.0(vite@4.3.3)(workbox-build@7.0.0)(workbox-window@6.5.4) vitepress: - specifier: 1.0.0-beta.2 - version: 1.0.0-beta.2(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0) + specifier: 1.0.0-beta.3 + version: 1.0.0-beta.3(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0) workbox-window: specifier: ^6.5.4 version: 6.5.4 @@ -14939,8 +14939,8 @@ packages: - terser dev: true - /vitepress@1.0.0-beta.2(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0): - resolution: {integrity: sha512-DBXYjtYbm3W1IPPJ2TiCaK/XK+o/2XmL2+jslOGKm+txcbmG0kbeB+vadC5tCUZA9NdA+9Ywj3M4548c7t/SDg==} + /vitepress@1.0.0-beta.3(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0): + resolution: {integrity: sha512-GR5Pvr/o343NN1M4Na1shhDYZRrQbjmLq7WE0lla0H8iDPAsHE8agTHLWfu3FWx+3q2KA29sv16+0O9RQKGjlA==} hasBin: true dependencies: '@docsearch/css': 3.5.1 From f2c40271b27d4d44fb16d4bfc907ee08fda50baa Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Mon, 26 Jun 2023 18:02:20 +0300 Subject: [PATCH 04/21] change `diagramTheme` and `themes` to return `string` --- packages/mermaid/src/styles.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/styles.ts b/packages/mermaid/src/styles.ts index 74322f678..f924a4f1f 100644 --- a/packages/mermaid/src/styles.ts +++ b/packages/mermaid/src/styles.ts @@ -1,7 +1,7 @@ import type { FlowChartStyleOptions } from './diagrams/flowchart/styles.js'; import { log } from './logger.js'; -const themes: Record = {}; +const themes: Record string> = {}; const getStyles = ( type: string, @@ -73,9 +73,12 @@ const getStyles = ( `; }; -export const addStylesForDiagram = (type: string, diagramTheme?: unknown): void => { +export const addStylesForDiagram = ( + type: string, + diagramTheme?: (options?: any) => string +): void => { if (diagramTheme !== undefined) { - themes[type] = diagramTheme; + themes[type] = (options) => diagramTheme(options); } }; From 20eb28e1a4ea67a29d3b8e44fd7cdfabbde295f5 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Mon, 26 Jun 2023 18:21:09 +0300 Subject: [PATCH 05/21] fix cspell issues in *.md files --- README.md | 4 ++-- README.zh-CN.md | 2 +- cSpell.json | 2 ++ docs/ecosystem/integrations.md | 8 ++++---- packages/mermaid/src/dagre-wrapper/GraphObjects.md | 6 +++--- packages/mermaid/src/docs/ecosystem/integrations.md | 8 ++++---- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f1df0966b..bdffbe175 100644 --- a/README.md +++ b/README.md @@ -386,7 +386,7 @@ Update version number in `package.json`. npm publish ``` -The above command generates files into the `dist` folder and publishes them to npmjs.org. +The above command generates files into the `dist` folder and publishes them to . ## Related projects @@ -402,7 +402,7 @@ Detailed information about how to contribute can be found in the [contribution g ## Security and safe diagrams -For public sites, it can be precarious to retrieve text from users on the internet, storing that content for presentation in a browser at a later stage. The reason is that the user content can contain embedded malicious scripts that will run when the data is presented. For Mermaid this is a risk, specially as mermaid diagrams contain many characters that are used in html which makes the standard sanitation unusable as it also breaks the diagrams. We still make an effort to sanitise the incoming code and keep refining the process but it is hard to guarantee that there are no loop holes. +For public sites, it can be precarious to retrieve text from users on the internet, storing that content for presentation in a browser at a later stage. The reason is that the user content can contain embedded malicious scripts that will run when the data is presented. For Mermaid this is a risk, specially as mermaid diagrams contain many characters that are used in html which makes the standard sanitation unusable as it also breaks the diagrams. We still make an effort to sanitize the incoming code and keep refining the process but it is hard to guarantee that there are no loop holes. As an extra level of security for sites with external users we are happy to introduce a new security level in which the diagram is rendered in a sandboxed iframe preventing javascript in the code from being executed. This is a great step forward for better security. diff --git a/README.zh-CN.md b/README.zh-CN.md index 9af34998d..9a2e797be 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -322,7 +322,7 @@ Rel(SystemC, customerA, "Sends e-mails to") npm publish ``` -以上的命令会将文件打包到 `dist` 目录并发布至 npmjs.org. +以上的命令会将文件打包到 `dist` 目录并发布至 . ## 相关项目 diff --git a/cSpell.json b/cSpell.json index ff9ef1074..7e25b4e10 100644 --- a/cSpell.json +++ b/cSpell.json @@ -42,6 +42,7 @@ "elkjs", "faber", "flatmap", + "foswiki", "ftplugin", "gantt", "gitea", @@ -51,6 +52,7 @@ "graphviz", "grav", "greywolf", + "gzipped", "huynh", "huynhicode", "inkdrop", diff --git a/docs/ecosystem/integrations.md b/docs/ecosystem/integrations.md index 28db3afff..10041525d 100644 --- a/docs/ecosystem/integrations.md +++ b/docs/ecosystem/integrations.md @@ -66,7 +66,7 @@ They also serve as proof of concept, for the variety of things that can be built ## Blogs -- [Wordpress](https://wordpress.org) +- [WordPress](https://wordpress.org) - [WordPress Markdown Editor](https://wordpress.org/plugins/wp-githuber-md) - [WP-ReliableMD](https://wordpress.org/plugins/wp-reliablemd/) - [Hexo](https://hexo.io) @@ -84,7 +84,7 @@ They also serve as proof of concept, for the variety of things that can be built - [Plugin for Mermaid.js](https://github.com/eFrane/vuepress-plugin-mermaidjs) - [Grav CMS](https://getgrav.org/) - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) - - [Gitlab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) + - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) ## Communication @@ -104,7 +104,7 @@ They also serve as proof of concept, for the variety of things that can be built - [Flex Diagrams Extension](https://www.mediawiki.org/wiki/Extension:Flex_Diagrams) - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) -- [FosWiki](https://foswiki.org) +- [Foswiki](https://foswiki.org) - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) - [DokuWiki](https://dokuwiki.org) - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) @@ -172,7 +172,7 @@ They also serve as proof of concept, for the variety of things that can be built - [rehype-mermaidjs](https://github.com/remcohaszing/rehype-mermaidjs) - [Gatsby](https://www.gatsbyjs.com/) - [gatsby-remark-mermaid](https://github.com/remcohaszing/gatsby-remark-mermaid) -- [jSDoc](https://jsdoc.app/) +- [JSDoc](https://jsdoc.app/) - [jsdoc-mermaid](https://github.com/Jellyvision/jsdoc-mermaid) - [MkDocs](https://www.mkdocs.org) - [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) diff --git a/packages/mermaid/src/dagre-wrapper/GraphObjects.md b/packages/mermaid/src/dagre-wrapper/GraphObjects.md index 184fc5137..840ddf824 100644 --- a/packages/mermaid/src/dagre-wrapper/GraphObjects.md +++ b/packages/mermaid/src/dagre-wrapper/GraphObjects.md @@ -1,6 +1,6 @@ # Cluster handling -Dagre does not support edges between nodes and clusters or between clusters to other clusters. In order to remedy this shortcoming the dagre wrapper implements a few work-arounds. +Dagre does not support edges between nodes and clusters or between clusters to other clusters. In order to remedy this shortcoming the dagre wrapper implements a few workarounds. In the diagram below there are two clusters and there are no edges to nodes outside the own cluster. @@ -73,7 +73,7 @@ Sample object: } ``` -This is set by the renderer of the diagram and insert the data that the wrapper neds for rendering. +This is set by the renderer of the diagram and insert the data that the wrapper needs for rendering. | property | description | | ---------- | ------------------------------------------------------------------------------------------------ | @@ -114,7 +114,7 @@ Required edgeData for proper rendering: | label | overlap between label and labelText? | | labelPos | | | labelType | overlap between label and labelText? | -| thickness | Sets the thinkess of the edge. Can be \['normal', 'thick'\] | +| thickness | Sets the thickness of the edge. Can be \['normal', 'thick'\] | | pattern | Sets the pattern of the edge. Can be \['solid', 'dotted', 'dashed'\] | # Markers diff --git a/packages/mermaid/src/docs/ecosystem/integrations.md b/packages/mermaid/src/docs/ecosystem/integrations.md index be229a8aa..336ae22f5 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations.md +++ b/packages/mermaid/src/docs/ecosystem/integrations.md @@ -60,7 +60,7 @@ They also serve as proof of concept, for the variety of things that can be built ## Blogs -- [Wordpress](https://wordpress.org) +- [WordPress](https://wordpress.org) - [WordPress Markdown Editor](https://wordpress.org/plugins/wp-githuber-md) - [WP-ReliableMD](https://wordpress.org/plugins/wp-reliablemd/) - [Hexo](https://hexo.io) @@ -78,7 +78,7 @@ They also serve as proof of concept, for the variety of things that can be built - [Plugin for Mermaid.js](https://github.com/eFrane/vuepress-plugin-mermaidjs) - [Grav CMS](https://getgrav.org/) - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) - - [Gitlab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) + - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) ## Communication @@ -98,7 +98,7 @@ They also serve as proof of concept, for the variety of things that can be built - [Flex Diagrams Extension](https://www.mediawiki.org/wiki/Extension:Flex_Diagrams) - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) -- [FosWiki](https://foswiki.org) +- [Foswiki](https://foswiki.org) - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) - [DokuWiki](https://dokuwiki.org) - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) @@ -166,7 +166,7 @@ They also serve as proof of concept, for the variety of things that can be built - [rehype-mermaidjs](https://github.com/remcohaszing/rehype-mermaidjs) - [Gatsby](https://www.gatsbyjs.com/) - [gatsby-remark-mermaid](https://github.com/remcohaszing/gatsby-remark-mermaid) -- [jSDoc](https://jsdoc.app/) +- [JSDoc](https://jsdoc.app/) - [jsdoc-mermaid](https://github.com/Jellyvision/jsdoc-mermaid) - [MkDocs](https://www.mkdocs.org) - [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) From f020f4a292cccf570127c2ed236f5453149262b2 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Mon, 26 Jun 2023 19:12:04 +0300 Subject: [PATCH 06/21] remove `diagramTheme` arrow function return Co-authored-by: Sidharth Vinod --- packages/mermaid/src/styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/styles.ts b/packages/mermaid/src/styles.ts index f924a4f1f..2f1988419 100644 --- a/packages/mermaid/src/styles.ts +++ b/packages/mermaid/src/styles.ts @@ -78,7 +78,7 @@ export const addStylesForDiagram = ( diagramTheme?: (options?: any) => string ): void => { if (diagramTheme !== undefined) { - themes[type] = (options) => diagramTheme(options); + themes[type] = diagramTheme; } }; From 3106ddbd1ec0d8c065479cf700e06e47b65f81cd Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Mon, 26 Jun 2023 19:26:56 +0300 Subject: [PATCH 07/21] add `getDiagramStyles` type and use it in `style.ts` --- packages/mermaid/src/diagram-api/types.ts | 2 ++ packages/mermaid/src/styles.ts | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/mermaid/src/diagram-api/types.ts b/packages/mermaid/src/diagram-api/types.ts index 265af6587..ab82e7e74 100644 --- a/packages/mermaid/src/diagram-api/types.ts +++ b/packages/mermaid/src/diagram-api/types.ts @@ -82,3 +82,5 @@ export type ParseDirectiveDefinition = (statement: string, context: string, type export type HTML = d3.Selection; export type SVG = d3.Selection; + +export type getDiagramStyles = (options?: unknown) => string; diff --git a/packages/mermaid/src/styles.ts b/packages/mermaid/src/styles.ts index 2f1988419..001bd1794 100644 --- a/packages/mermaid/src/styles.ts +++ b/packages/mermaid/src/styles.ts @@ -1,7 +1,8 @@ import type { FlowChartStyleOptions } from './diagrams/flowchart/styles.js'; import { log } from './logger.js'; +import { getDiagramStyles } from './diagram-api/types.js'; -const themes: Record string> = {}; +const themes: Record = {}; const getStyles = ( type: string, @@ -73,12 +74,9 @@ const getStyles = ( `; }; -export const addStylesForDiagram = ( - type: string, - diagramTheme?: (options?: any) => string -): void => { - if (diagramTheme !== undefined) { - themes[type] = diagramTheme; +export const addStylesForDiagram = (type: string, getDiagramStyles?: getDiagramStyles): void => { + if (getDiagramStyles !== undefined) { + themes[type] = getDiagramStyles; } }; From 8b67200717607451b03e2357ca72c9577a5121b2 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Mon, 26 Jun 2023 19:31:53 +0300 Subject: [PATCH 08/21] change `options` paramter to any instead of `unknown` --- packages/mermaid/src/diagram-api/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagram-api/types.ts b/packages/mermaid/src/diagram-api/types.ts index ab82e7e74..67730e33c 100644 --- a/packages/mermaid/src/diagram-api/types.ts +++ b/packages/mermaid/src/diagram-api/types.ts @@ -83,4 +83,4 @@ export type HTML = d3.Selection; export type SVG = d3.Selection; -export type getDiagramStyles = (options?: unknown) => string; +export type getDiagramStyles = (options?: any) => string; From 64a28be5e3930d59bc35a1efb857194ecdd91813 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Mon, 26 Jun 2023 20:34:21 +0300 Subject: [PATCH 09/21] rename `getDiagramStyles` type into `DiagramStylesProvider` --- packages/mermaid/src/diagram-api/types.ts | 2 +- packages/mermaid/src/styles.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/mermaid/src/diagram-api/types.ts b/packages/mermaid/src/diagram-api/types.ts index 67730e33c..3b8d00456 100644 --- a/packages/mermaid/src/diagram-api/types.ts +++ b/packages/mermaid/src/diagram-api/types.ts @@ -83,4 +83,4 @@ export type HTML = d3.Selection; export type SVG = d3.Selection; -export type getDiagramStyles = (options?: any) => string; +export type DiagramStylesProvider = (options?: any) => string; diff --git a/packages/mermaid/src/styles.ts b/packages/mermaid/src/styles.ts index 001bd1794..fde079450 100644 --- a/packages/mermaid/src/styles.ts +++ b/packages/mermaid/src/styles.ts @@ -1,8 +1,8 @@ import type { FlowChartStyleOptions } from './diagrams/flowchart/styles.js'; import { log } from './logger.js'; -import { getDiagramStyles } from './diagram-api/types.js'; +import type { DiagramStylesProvider } from './diagram-api/types.js'; -const themes: Record = {}; +const themes: Record = {}; const getStyles = ( type: string, @@ -74,9 +74,9 @@ const getStyles = ( `; }; -export const addStylesForDiagram = (type: string, getDiagramStyles?: getDiagramStyles): void => { - if (getDiagramStyles !== undefined) { - themes[type] = getDiagramStyles; +export const addStylesForDiagram = (type: string, diagramTheme?: DiagramStylesProvider): void => { + if (diagramTheme !== undefined) { + themes[type] = diagramTheme; } }; From 5a96bd1b9f1fb294f74ffb736142bc6556224fe7 Mon Sep 17 00:00:00 2001 From: Tom PERRILLAT-COLLOMB Date: Tue, 27 Jun 2023 00:22:59 +0200 Subject: [PATCH 10/21] fix(flowchart): apply style on doublecircle --- packages/mermaid/src/dagre-wrapper/nodes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mermaid/src/dagre-wrapper/nodes.js b/packages/mermaid/src/dagre-wrapper/nodes.js index b842fa9a5..410703f6c 100644 --- a/packages/mermaid/src/dagre-wrapper/nodes.js +++ b/packages/mermaid/src/dagre-wrapper/nodes.js @@ -602,6 +602,8 @@ const doublecircle = async (parent, node) => { const outerCircle = circleGroup.insert('circle'); const innerCircle = circleGroup.insert('circle'); + circleGroup.attr('class', node.class); + // center the circle around its coordinate outerCircle .attr('style', node.style) From d15590f0a5bf069f66baae87a892ef1a8180e443 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Tue, 27 Jun 2023 02:31:09 +0300 Subject: [PATCH 11/21] add suggested solutions field in bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 1b84bfd45..6d8d4f4f8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -53,8 +53,18 @@ body: Please fill out the info below. Note that you only need to fill out the relevant section value: |- - - Mermaid version: + - Mermaid version: - Browser and Version: [Chrome, Edge, Firefox] + - type: textarea + attributes: + label: Suggested Solutions + description: > + If applicable, suggest solutions that could resolve the bug. + It would help maintainers/contributors to not waist time looking for some, + even pointing the line causing the bug would be great! + placeholder: |- + - Add a new option for ... + - Add a new type for ... - type: textarea attributes: label: Additional Context From 8565a3106da3f614aa7d58a4cde568766f957daf Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 27 Jun 2023 11:35:06 +0530 Subject: [PATCH 12/21] Add release-date --- CITATION.cff | 1 + 1 file changed, 1 insertion(+) diff --git a/CITATION.cff b/CITATION.cff index 43f8b8936..96e96b7a9 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -8,6 +8,7 @@ authors: given-names: Knut - name: "Contributors to Mermaid" repository-code: "https://github.com/mermaid-js/mermaid" +date-released: 2014-12-02 url: "https://mermaid.js.org/" abstract: >- JavaScript based diagramming and charting tool that renders Markdown-inspired From 7bd4e030053caf4036f71a6c676b6648b3e44466 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 27 Jun 2023 11:38:04 +0530 Subject: [PATCH 13/21] Fix lint issue --- CITATION.cff | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 96e96b7a9..2f14a4b3d 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,15 +1,15 @@ cff-version: 1.2.0 -title: "Mermaid: Generate diagrams from markdown-like text" +title: 'Mermaid: Generate diagrams from markdown-like text' message: >- If you use this software, please cite it using the metadata from this file. type: software authors: - family-names: Sveidqvist given-names: Knut - - name: "Contributors to Mermaid" -repository-code: "https://github.com/mermaid-js/mermaid" + - name: 'Contributors to Mermaid' +repository-code: 'https://github.com/mermaid-js/mermaid' date-released: 2014-12-02 -url: "https://mermaid.js.org/" +url: 'https://mermaid.js.org/' abstract: >- JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically. From b60ec8e5ff8fea5ae0679770a3be8d2aa0d0706d Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 27 Jun 2023 11:51:44 +0530 Subject: [PATCH 14/21] Update .github/ISSUE_TEMPLATE/bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 6d8d4f4f8..2f87cd60c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -60,10 +60,9 @@ body: label: Suggested Solutions description: > If applicable, suggest solutions that could resolve the bug. - It would help maintainers/contributors to not waist time looking for some, - even pointing the line causing the bug would be great! + It would help maintainers/contributors to not waste time looking for the solution. Even pointing the line causing the bug would be great! placeholder: |- - - Add a new option for ... + - Variable `parser` in file is not initialised ... - Add a new type for ... - type: textarea attributes: From aa67646b5a377d94f181d24db96e68be0c892f6d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Jun 2023 06:22:43 +0000 Subject: [PATCH 15/21] fix(deps): update all patch dependencies --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 41202e83f..753726610 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "10.2.3", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", - "packageManager": "pnpm@8.6.4", + "packageManager": "pnpm@8.6.5", "keywords": [ "diagram", "markdown", From 120029913d31668e45daa84f7de70dfa519f3b81 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Jun 2023 06:23:27 +0000 Subject: [PATCH 16/21] chore(deps): update dependency eslint-plugin-jsdoc to v46 --- package.json | 2 +- pnpm-lock.yaml | 36 ++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 41202e83f..3b16310ac 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "eslint-plugin-cypress": "^2.13.2", "eslint-plugin-html": "^7.1.0", "eslint-plugin-jest": "^27.2.1", - "eslint-plugin-jsdoc": "^43.0.7", + "eslint-plugin-jsdoc": "^46.0.0", "eslint-plugin-json": "^3.1.0", "eslint-plugin-lodash": "^7.4.0", "eslint-plugin-markdown": "^3.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52ec06740..ca41dea59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -105,8 +105,8 @@ importers: specifier: ^27.2.1 version: 27.2.1(@typescript-eslint/eslint-plugin@5.59.0)(eslint@8.39.0)(jest@29.5.0)(typescript@5.1.3) eslint-plugin-jsdoc: - specifier: ^43.0.7 - version: 43.0.7(eslint@8.39.0) + specifier: ^46.0.0 + version: 46.0.0(eslint@8.39.0) eslint-plugin-json: specifier: ^3.1.0 version: 3.1.0 @@ -2824,9 +2824,9 @@ packages: - search-insights dev: true - /@es-joy/jsdoccomment@0.37.1: - resolution: {integrity: sha512-5vxWJ1gEkEF0yRd0O+uK6dHJf7adrxwQSX8PuRiPfFSAbNLnY0ZJfXaZucoz14Jj2N11xn2DnlEPwWRpYpvRjg==} - engines: {node: ^14 || ^16 || ^17 || ^18 || ^19 || ^20} + /@es-joy/jsdoccomment@0.39.4: + resolution: {integrity: sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==} + engines: {node: '>=16'} dependencies: comment-parser: 1.3.1 esquery: 1.5.0 @@ -6653,7 +6653,7 @@ packages: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.5.0 + semver: 7.5.3 well-known-symbols: 2.0.0 dev: true @@ -8061,20 +8061,20 @@ packages: - typescript dev: true - /eslint-plugin-jsdoc@43.0.7(eslint@8.39.0): - resolution: {integrity: sha512-32Sx5I9VzO/bqbtslCu3L1GHIPo+QEliwqwjWq+qzbUv76wrkH6ifUEE0EbkuNEn+cHlSIOrg/IJ1PGNN72QZA==} - engines: {node: ^14 || ^16 || ^17 || ^18 || ^19 || ^20} + /eslint-plugin-jsdoc@46.0.0(eslint@8.39.0): + resolution: {integrity: sha512-xmB5WleBcPCFYlrFfdjrcfSKOJBLwyGmKa+i+fVqlIHp8g5aAoeQpBGugUzToFtQgd4hNZYlfIcP7QSxC9NYWQ==} + engines: {node: '>=16'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@es-joy/jsdoccomment': 0.37.1 + '@es-joy/jsdoccomment': 0.39.4 are-docs-informative: 0.0.2 comment-parser: 1.3.1 debug: 4.3.4(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint: 8.39.0 esquery: 1.5.0 - semver: 7.5.0 + semver: 7.5.3 spdx-expression-parse: 3.0.1 transitivePeerDependencies: - supports-color @@ -8548,7 +8548,7 @@ packages: proxy-addr: 2.0.7 rfdc: 1.3.0 secure-json-parse: 2.7.0 - semver: 7.5.0 + semver: 7.5.3 tiny-lru: 8.0.2 transitivePeerDependencies: - supports-color @@ -10347,7 +10347,7 @@ packages: jest-util: 29.5.0 natural-compare: 1.4.0 pretty-format: 29.5.0 - semver: 7.5.0 + semver: 7.5.3 transitivePeerDependencies: - supports-color dev: true @@ -11801,7 +11801,7 @@ packages: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.12.1 - semver: 7.5.0 + semver: 7.5.3 validate-npm-package-license: 3.0.4 dev: true @@ -13254,6 +13254,14 @@ packages: lru-cache: 6.0.0 dev: true + /semver@7.5.3: + resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} From f48652322d1cac67a5f15fe1dc97579ffccf0ea8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Jun 2023 07:13:43 +0000 Subject: [PATCH 17/21] chore(deps): update dependency jsdom to v22 --- package.json | 2 +- packages/mermaid/package.json | 2 +- pnpm-lock.yaml | 53 +++++++++++++---------------------- 3 files changed, 21 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 753726610..ed1baa5fa 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "jest": "^29.5.0", "jison": "^0.4.18", "js-yaml": "^4.1.0", - "jsdom": "^21.1.1", + "jsdom": "^22.0.0", "lint-staged": "^13.2.1", "nyc": "^15.1.0", "path-browserify": "^1.0.1", diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index d0c67ee58..8e7e9696d 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -92,7 +92,7 @@ "globby": "^13.1.4", "jison": "^0.4.18", "js-base64": "^3.7.5", - "jsdom": "^21.1.1", + "jsdom": "^22.0.0", "micromatch": "^4.0.5", "path-browserify": "^1.0.1", "prettier": "^2.8.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52ec06740..23903efde 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -144,8 +144,8 @@ importers: specifier: ^4.1.0 version: 4.1.0 jsdom: - specifier: ^21.1.1 - version: 21.1.1 + specifier: ^22.0.0 + version: 22.0.0 lint-staged: specifier: ^13.2.1 version: 13.2.1 @@ -187,7 +187,7 @@ importers: version: 4.1.0(vite@4.3.9) vitest: specifier: ^0.32.2 - version: 0.32.2(@vitest/ui@0.32.2)(jsdom@21.1.1) + version: 0.32.2(@vitest/ui@0.32.2)(jsdom@22.0.0) packages/mermaid: dependencies: @@ -307,8 +307,8 @@ importers: specifier: ^3.7.5 version: 3.7.5 jsdom: - specifier: ^21.1.1 - version: 21.1.1 + specifier: ^22.0.0 + version: 22.0.0 micromatch: specifier: ^4.0.5 version: 4.0.5 @@ -878,7 +878,7 @@ packages: http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.2 + nwsapi: 2.2.5 parse5: 6.0.1 saxes: 5.0.1 symbol-tree: 3.2.4 @@ -4890,7 +4890,7 @@ packages: istanbul-lib-source-maps: 4.0.1 istanbul-reports: 3.1.5 test-exclude: 6.0.0 - vitest: 0.32.2(@vitest/ui@0.32.2)(jsdom@21.1.1) + vitest: 0.32.2(@vitest/ui@0.32.2)(jsdom@22.0.0) transitivePeerDependencies: - supports-color dev: true @@ -4938,7 +4938,7 @@ packages: pathe: 1.1.0 picocolors: 1.0.0 sirv: 2.0.3 - vitest: 0.32.2(@vitest/ui@0.32.2)(jsdom@21.1.1) + vitest: 0.32.2(@vitest/ui@0.32.2)(jsdom@22.0.0) dev: true /@vitest/utils@0.32.2: @@ -5479,13 +5479,6 @@ packages: acorn-walk: 7.2.0 dev: true - /acorn-globals@7.0.1: - resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} - dependencies: - acorn: 8.8.2 - acorn-walk: 8.2.0 - dev: true - /acorn-import-assertions@1.8.0(acorn@8.8.0): resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==} peerDependencies: @@ -10525,9 +10518,9 @@ packages: engines: {node: '>=12.0.0'} dev: true - /jsdom@21.1.1: - resolution: {integrity: sha512-Jjgdmw48RKcdAIQyUD1UdBh2ecH7VqwaXPN3ehoZN6MqgVbMn+lRm1aAT1AsdJRAJpwfa4IpwgzySn61h2qu3w==} - engines: {node: '>=14'} + /jsdom@22.0.0: + resolution: {integrity: sha512-p5ZTEb5h+O+iU02t0GfEjAnkdYPrQSkfuTSMkMYyIoMvUNEHsbG0bHHbfXIcfTqD2UfvjQX7mmgiFsyRwGscVw==} + engines: {node: '>=16'} peerDependencies: canvas: ^2.5.0 peerDependenciesMeta: @@ -10535,19 +10528,16 @@ packages: optional: true dependencies: abab: 2.0.6 - acorn: 8.8.2 - acorn-globals: 7.0.1 cssstyle: 3.0.0 data-urls: 4.0.0 decimal.js: 10.4.3 domexception: 4.0.0 - escodegen: 2.0.0 form-data: 4.0.0 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.2 + nwsapi: 2.2.5 parse5: 7.1.2 rrweb-cssom: 0.6.0 saxes: 6.0.0 @@ -11835,8 +11825,8 @@ packages: path-key: 4.0.0 dev: true - /nwsapi@2.2.2: - resolution: {integrity: sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==} + /nwsapi@2.2.5: + resolution: {integrity: sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ==} dev: true /nyc@15.1.0: @@ -12583,11 +12573,6 @@ packages: once: 1.4.0 dev: true - /punycode@2.1.1: - resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} - engines: {node: '>=6'} - dev: true - /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} @@ -14143,7 +14128,7 @@ packages: engines: {node: '>=0.8'} dependencies: psl: 1.9.0 - punycode: 2.1.1 + punycode: 2.3.0 dev: true /tough-cookie@4.1.2: @@ -14151,7 +14136,7 @@ packages: engines: {node: '>=6'} dependencies: psl: 1.9.0 - punycode: 2.1.1 + punycode: 2.3.0 universalify: 0.2.0 url-parse: 1.5.10 dev: true @@ -14648,7 +14633,7 @@ packages: /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: - punycode: 2.1.1 + punycode: 2.3.0 dev: true /url-parse@1.5.10: @@ -14982,7 +14967,7 @@ packages: - universal-cookie dev: true - /vitest@0.32.2(@vitest/ui@0.32.2)(jsdom@21.1.1): + /vitest@0.32.2(@vitest/ui@0.32.2)(jsdom@22.0.0): resolution: {integrity: sha512-hU8GNNuQfwuQmqTLfiKcqEhZY72Zxb7nnN07koCUNmntNxbKQnVbeIS6sqUgR3eXSlbOpit8+/gr1KpqoMgWCQ==} engines: {node: '>=v14.18.0'} hasBin: true @@ -15028,7 +15013,7 @@ packages: chai: 4.3.7 concordance: 5.0.4 debug: 4.3.4(supports-color@8.1.1) - jsdom: 21.1.1 + jsdom: 22.0.0 local-pkg: 0.4.3 magic-string: 0.30.0 pathe: 1.1.0 From b7af9bace4d0358eb9fce046cd997e466e35f7cb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Jun 2023 08:00:16 +0000 Subject: [PATCH 18/21] chore(deps): update dependency eslint-plugin-unicorn to v47 --- package.json | 2 +- pnpm-lock.yaml | 42 +++++++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index d8a42b38a..0d8b25d40 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "eslint-plugin-markdown": "^3.0.0", "eslint-plugin-no-only-tests": "^3.1.0", "eslint-plugin-tsdoc": "^0.2.17", - "eslint-plugin-unicorn": "^46.0.0", + "eslint-plugin-unicorn": "^47.0.0", "express": "^4.18.2", "globby": "^13.1.4", "husky": "^8.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07b8aa476..e8712b14c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,8 +123,8 @@ importers: specifier: ^0.2.17 version: 0.2.17 eslint-plugin-unicorn: - specifier: ^46.0.0 - version: 46.0.0(eslint@8.39.0) + specifier: ^47.0.0 + version: 47.0.0(eslint@8.39.0) express: specifier: ^4.18.2 version: 4.18.2 @@ -6381,6 +6381,11 @@ packages: engines: {node: '>=8'} dev: true + /ci-info@3.8.0: + resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} + engines: {node: '>=8'} + dev: true + /cjs-module-lexer@1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} dev: true @@ -8115,28 +8120,28 @@ packages: '@microsoft/tsdoc-config': 0.16.2 dev: true - /eslint-plugin-unicorn@46.0.0(eslint@8.39.0): - resolution: {integrity: sha512-j07WkC+PFZwk8J33LYp6JMoHa1lXc1u6R45pbSAipjpfpb7KIGr17VE2D685zCxR5VL4cjrl65kTJflziQWMDA==} - engines: {node: '>=14.18'} + /eslint-plugin-unicorn@47.0.0(eslint@8.39.0): + resolution: {integrity: sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==} + engines: {node: '>=16'} peerDependencies: - eslint: '>=8.28.0' + eslint: '>=8.38.0' dependencies: '@babel/helper-validator-identifier': 7.19.1 '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0) - ci-info: 3.6.2 + ci-info: 3.8.0 clean-regexp: 1.0.0 eslint: 8.39.0 esquery: 1.5.0 indent-string: 4.0.0 - is-builtin-module: 3.2.0 + is-builtin-module: 3.2.1 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 + regjsparser: 0.10.0 safe-regex: 2.1.1 - semver: 7.3.8 + semver: 7.5.3 strip-indent: 3.0.0 dev: true @@ -9602,8 +9607,8 @@ packages: engines: {node: '>=4'} dev: true - /is-builtin-module@3.2.0: - resolution: {integrity: sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==} + /is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} dependencies: builtin-modules: 3.3.0 @@ -9618,7 +9623,7 @@ packages: resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} hasBin: true dependencies: - ci-info: 3.6.2 + ci-info: 3.8.0 dev: true /is-core-module@2.10.0: @@ -10067,7 +10072,7 @@ packages: '@types/node': 18.16.0 babel-jest: 29.5.0(@babel/core@7.12.3) chalk: 4.1.2 - ci-info: 3.6.2 + ci-info: 3.8.0 deepmerge: 4.2.2 glob: 7.2.3 graceful-fs: 4.2.10 @@ -10352,7 +10357,7 @@ packages: '@jest/types': 29.5.0 '@types/node': 18.16.0 chalk: 4.1.2 - ci-info: 3.6.2 + ci-info: 3.8.0 graceful-fs: 4.2.10 picomatch: 2.3.1 dev: true @@ -12808,6 +12813,13 @@ packages: unicode-match-property-value-ecmascript: 2.1.0 dev: true + /regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + dependencies: + jsesc: 0.5.0 + dev: true + /regjsparser@0.9.1: resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} hasBin: true From 1730a229a5a8edcc2f7e48e8074a6f57da0a96c8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Jun 2023 09:21:55 +0000 Subject: [PATCH 19/21] chore(deps): update dependency workbox-window to v7 --- packages/mermaid/src/docs/package.json | 2 +- pnpm-lock.yaml | 23 ++++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/mermaid/src/docs/package.json b/packages/mermaid/src/docs/package.json index 37e1cffa6..f24f9f4bc 100644 --- a/packages/mermaid/src/docs/package.json +++ b/packages/mermaid/src/docs/package.json @@ -31,6 +31,6 @@ "vite": "^4.3.3", "vite-plugin-pwa": "^0.16.0", "vitepress": "1.0.0-beta.3", - "workbox-window": "^6.5.4" + "workbox-window": "^7.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8712b14c..2f1ea7a43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -443,13 +443,13 @@ importers: version: 4.3.3(@types/node@18.16.0) vite-plugin-pwa: specifier: ^0.16.0 - version: 0.16.0(vite@4.3.3)(workbox-build@7.0.0)(workbox-window@6.5.4) + version: 0.16.0(vite@4.3.3)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: specifier: 1.0.0-beta.3 version: 1.0.0-beta.3(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0) workbox-window: - specifier: ^6.5.4 - version: 6.5.4 + specifier: ^7.0.0 + version: 7.0.0 tests/webpack: dependencies: @@ -4843,7 +4843,7 @@ packages: peerDependencies: vite-plugin-pwa: '>=0.16.3 <1' dependencies: - vite-plugin-pwa: 0.16.0(vite@4.3.3)(workbox-build@7.0.0)(workbox-window@6.5.4) + vite-plugin-pwa: 0.16.0(vite@4.3.3)(workbox-build@7.0.0)(workbox-window@7.0.0) dev: true /@vitejs/plugin-vue@4.2.1(vite@4.3.3)(vue@3.2.47): @@ -14781,7 +14781,7 @@ packages: - supports-color dev: true - /vite-plugin-pwa@0.16.0(vite@4.3.3)(workbox-build@7.0.0)(workbox-window@6.5.4): + /vite-plugin-pwa@0.16.0(vite@4.3.3)(workbox-build@7.0.0)(workbox-window@7.0.0): resolution: {integrity: sha512-E+AQRzHxqNU4ZhEeR8X37/foZB+ezJEhXauE/mcf1UITY6k2Pa1dtlFl+BQu57fTdiVlWim5S0Qy44Yap93Dkg==} engines: {node: '>=16.0.0'} peerDependencies: @@ -14794,7 +14794,7 @@ packages: pretty-bytes: 6.1.0 vite: 4.3.3(@types/node@18.16.0) workbox-build: 7.0.0 - workbox-window: 6.5.4 + workbox-window: 7.0.0 transitivePeerDependencies: - supports-color dev: true @@ -15609,10 +15609,6 @@ packages: workbox-core: 7.0.0 dev: true - /workbox-core@6.5.4: - resolution: {integrity: sha512-OXYb+m9wZm8GrORlV2vBbE5EC1FKu71GGp0H4rjmxmF4/HLbMCoTFws87M3dFwgpmg0v00K++PImpNQ6J5NQ6Q==} - dev: true - /workbox-core@7.0.0: resolution: {integrity: sha512-81JkAAZtfVP8darBpfRTovHg8DGAVrKFgHpOArZbdFd78VqHr5Iw65f2guwjE2NlCFbPFDoez3D3/6ZvhI/rwQ==} dev: true @@ -15687,13 +15683,6 @@ packages: resolution: {integrity: sha512-SWfEouQfjRiZ7GNABzHUKUyj8pCoe+RwjfOIajcx6J5mtgKkN+t8UToHnpaJL5UVVOf5YhJh+OHhbVNIHe+LVA==} dev: true - /workbox-window@6.5.4: - resolution: {integrity: sha512-HnLZJDwYBE+hpG25AQBO8RUWBJRaCsI9ksQJEp3aCOFCaG5kqaToAYXFRAHxzRluM2cQbGzdQF5rjKPWPA1fug==} - dependencies: - '@types/trusted-types': 2.0.2 - workbox-core: 6.5.4 - dev: true - /workbox-window@7.0.0: resolution: {integrity: sha512-j7P/bsAWE/a7sxqTzXo3P2ALb1reTfZdvVp6OJ/uLr/C2kZAMvjeWGm8V4htQhor7DOvYg0sSbFN2+flT5U0qA==} dependencies: From f606ad2d9da7cb39bf8c66d18038f5d4a885e0cc Mon Sep 17 00:00:00 2001 From: Marco Beelen Date: Tue, 27 Jun 2023 09:39:43 +0200 Subject: [PATCH 20/21] docs: Howto on foreground color on timelines --- packages/mermaid/src/docs/syntax/timeline.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/docs/syntax/timeline.md b/packages/mermaid/src/docs/syntax/timeline.md index c9bc9161e..a485cba3f 100644 --- a/packages/mermaid/src/docs/syntax/timeline.md +++ b/packages/mermaid/src/docs/syntax/timeline.md @@ -172,9 +172,11 @@ let us look at same example, where we have disabled the multiColor option. ### Customizing Color scheme -You can customize the color scheme using the `cScale0` to `cScale11` theme variables. Mermaid allows you to set unique colors for up-to 12 sections, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. +You can customize the color scheme using the `cScale0` to `cScale11` theme variables, which will change the background colors. Mermaid allows you to set unique colors for up-to 12 sections, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. In case you have more than 12 sections, the color scheme will start to repeat. +If you also want to change the foreground color of a section, you can do so use theme variables corresponding `cScaleLabel0` to `cScaleLabel11` variables. + NOTE: Default values for these theme variables are picked from the selected theme. If you want to override the default values, you can use the `initialize` call to add your custom theme variable values. Example: @@ -183,9 +185,9 @@ Now let's override the default values for the `cScale0` to `cScale2` variables: ```mermaid-example %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': { - 'cScale0': '#ff0000', + 'cScale0': '#ff0000', 'cScaleLabel0': '#ffffff', 'cScale1': '#00ff00', - 'cScale2': '#0000ff' + 'cScale2': '#0000ff', 'cScaleLabel2': '#ffffff' } } }%% timeline title History of Social Media Platform From e2f21a2d984ddaf359c334c6f971dcb5aacc99d9 Mon Sep 17 00:00:00 2001 From: Marco Beelen Date: Tue, 27 Jun 2023 13:03:31 +0200 Subject: [PATCH 21/21] Lint fix --- docs/syntax/timeline.md | 12 +++++++----- packages/mermaid/src/docs/syntax/timeline.md | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/syntax/timeline.md b/docs/syntax/timeline.md index d9915ff3e..d42a2dc7c 100644 --- a/docs/syntax/timeline.md +++ b/docs/syntax/timeline.md @@ -257,9 +257,11 @@ let us look at same example, where we have disabled the multiColor option. ### Customizing Color scheme -You can customize the color scheme using the `cScale0` to `cScale11` theme variables. Mermaid allows you to set unique colors for up-to 12 sections, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. +You can customize the color scheme using the `cScale0` to `cScale11` theme variables, which will change the background colors. Mermaid allows you to set unique colors for up-to 12 sections, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. In case you have more than 12 sections, the color scheme will start to repeat. +If you also want to change the foreground color of a section, you can do so use theme variables corresponding `cScaleLabel0` to `cScaleLabel11` variables. + NOTE: Default values for these theme variables are picked from the selected theme. If you want to override the default values, you can use the `initialize` call to add your custom theme variable values. Example: @@ -268,9 +270,9 @@ Now let's override the default values for the `cScale0` to `cScale2` variables: ```mermaid-example %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': { - 'cScale0': '#ff0000', + 'cScale0': '#ff0000', 'cScaleLabel0': '#ffffff', 'cScale1': '#00ff00', - 'cScale2': '#0000ff' + 'cScale2': '#0000ff', 'cScaleLabel2': '#ffffff' } } }%% timeline title History of Social Media Platform @@ -286,9 +288,9 @@ Now let's override the default values for the `cScale0` to `cScale2` variables: ```mermaid %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': { - 'cScale0': '#ff0000', + 'cScale0': '#ff0000', 'cScaleLabel0': '#ffffff', 'cScale1': '#00ff00', - 'cScale2': '#0000ff' + 'cScale2': '#0000ff', 'cScaleLabel2': '#ffffff' } } }%% timeline title History of Social Media Platform diff --git a/packages/mermaid/src/docs/syntax/timeline.md b/packages/mermaid/src/docs/syntax/timeline.md index a485cba3f..201ab6b16 100644 --- a/packages/mermaid/src/docs/syntax/timeline.md +++ b/packages/mermaid/src/docs/syntax/timeline.md @@ -185,7 +185,7 @@ Now let's override the default values for the `cScale0` to `cScale2` variables: ```mermaid-example %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': { - 'cScale0': '#ff0000', 'cScaleLabel0': '#ffffff', + 'cScale0': '#ff0000', 'cScaleLabel0': '#ffffff', 'cScale1': '#00ff00', 'cScale2': '#0000ff', 'cScaleLabel2': '#ffffff' } } }%%