From 11f7f426cb45515ae8b1b137c7596ca09f444a49 Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Fri, 28 Feb 2025 08:05:42 -0800 Subject: [PATCH 01/14] verbiage updates --- .../setup/interfaces/mermaid.ParseOptions.md | 22 ------------------- .../mermaid/src/docs/.vitepress/config.ts | 2 +- packages/mermaid/src/docs/index.md | 16 +++++++------- 3 files changed, 9 insertions(+), 31 deletions(-) delete mode 100644 docs/config/setup/interfaces/mermaid.ParseOptions.md diff --git a/docs/config/setup/interfaces/mermaid.ParseOptions.md b/docs/config/setup/interfaces/mermaid.ParseOptions.md deleted file mode 100644 index 717e35565..000000000 --- a/docs/config/setup/interfaces/mermaid.ParseOptions.md +++ /dev/null @@ -1,22 +0,0 @@ -> **Warning** -> -> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. -> -> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseOptions.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseOptions.md). - -# Interface: ParseOptions - -[mermaid](../modules/mermaid.md).ParseOptions - -## Properties - -### suppressErrors - -• `Optional` **suppressErrors**: `boolean` - -If `true`, parse will return `false` instead of throwing error when the diagram is invalid. -The `parseError` function will not be called. - -#### Defined in - -[packages/mermaid/src/types.ts:59](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L59) diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index a40b50fed..5e861a59e 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -104,7 +104,7 @@ function nav() { ], }, { - text: '💻 Live Editor', + text: '💻 Open Editor', link: 'https://mermaid.live', }, ]; diff --git a/packages/mermaid/src/docs/index.md b/packages/mermaid/src/docs/index.md index 218757b10..bb9a6e9e3 100644 --- a/packages/mermaid/src/docs/index.md +++ b/packages/mermaid/src/docs/index.md @@ -15,23 +15,23 @@ hero: alt: Mermaid actions: - theme: brand - text: Get Started - link: /intro/ + text: Try Mermaid Editor + link: https://www.mermaidchart.com/play - theme: alt - text: View on GitHub + text: Build with Mermaid link: https://github.com/mermaid-js/mermaid + - theme: alt + text: Learn more + link: https://mermaid.js.org/intro/ features: - title: ➕ Easy to use! - details: Easily create and render detailed diagrams and charts with the Mermaid Live Editor. - link: https://mermaid.live/ + details: Easily create diagrams and charts with the Mermaid Editor. + link: https://www.mermaidchart.com/play - title: 🧩 Integrations available! details: Use Mermaid with your favorite applications, check out the integrations list. link: ../../ecosystem/integrations-community.md - title: 🏆 Award winning! details: 2019 JavaScript Open Source Award winner for "The Most Exciting Use of Technology". link: https://osawards.com/javascript/2019 - - title: 🥰 Mermaid + Mermaid Chart - details: Mermaid Chart is a major supporter of the Mermaid project. - link: https://www.mermaidchart.com/ --- From 1bed6432ac6a188cd10627344fc401181af6875a Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Wed, 5 Mar 2025 21:24:38 -0800 Subject: [PATCH 02/14] update styling and add assets --- .../setup/interfaces/mermaid.ParseOptions.md | 22 +++++++++++++ docs/public/1-Callout-Easy.svg | 9 ++++++ docs/public/2-Callout-Integrations.svg | 9 ++++++ docs/public/3-Callout-Awards.svg | 9 ++++++ docs/public/Hero-Dark.svg | 19 +++++++++++ docs/public/Hero.svg | 19 +++++++++++ .../mermaid/src/docs/.vitepress/config.ts | 2 +- .../src/docs/.vitepress/theme/custom.css | 32 +++++++++++++------ packages/mermaid/src/docs/index.md | 25 +++++++++------ .../src/docs/public/1-Callout-Easy.svg | 9 ++++++ .../docs/public/2-Callout-Integrations.svg | 9 ++++++ .../src/docs/public/3-Callout-Awards.svg | 9 ++++++ .../mermaid/src/docs/public/Hero-Dark.svg | 19 +++++++++++ packages/mermaid/src/docs/public/Hero.svg | 19 +++++++++++ 14 files changed, 190 insertions(+), 21 deletions(-) create mode 100644 docs/config/setup/interfaces/mermaid.ParseOptions.md create mode 100644 docs/public/1-Callout-Easy.svg create mode 100644 docs/public/2-Callout-Integrations.svg create mode 100644 docs/public/3-Callout-Awards.svg create mode 100644 docs/public/Hero-Dark.svg create mode 100644 docs/public/Hero.svg create mode 100644 packages/mermaid/src/docs/public/1-Callout-Easy.svg create mode 100644 packages/mermaid/src/docs/public/2-Callout-Integrations.svg create mode 100644 packages/mermaid/src/docs/public/3-Callout-Awards.svg create mode 100644 packages/mermaid/src/docs/public/Hero-Dark.svg create mode 100644 packages/mermaid/src/docs/public/Hero.svg diff --git a/docs/config/setup/interfaces/mermaid.ParseOptions.md b/docs/config/setup/interfaces/mermaid.ParseOptions.md new file mode 100644 index 000000000..717e35565 --- /dev/null +++ b/docs/config/setup/interfaces/mermaid.ParseOptions.md @@ -0,0 +1,22 @@ +> **Warning** +> +> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. +> +> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseOptions.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.ParseOptions.md). + +# Interface: ParseOptions + +[mermaid](../modules/mermaid.md).ParseOptions + +## Properties + +### suppressErrors + +• `Optional` **suppressErrors**: `boolean` + +If `true`, parse will return `false` instead of throwing error when the diagram is invalid. +The `parseError` function will not be called. + +#### Defined in + +[packages/mermaid/src/types.ts:59](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L59) diff --git a/docs/public/1-Callout-Easy.svg b/docs/public/1-Callout-Easy.svg new file mode 100644 index 000000000..a6e9251a0 --- /dev/null +++ b/docs/public/1-Callout-Easy.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/public/2-Callout-Integrations.svg b/docs/public/2-Callout-Integrations.svg new file mode 100644 index 000000000..b5ebdf055 --- /dev/null +++ b/docs/public/2-Callout-Integrations.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/public/3-Callout-Awards.svg b/docs/public/3-Callout-Awards.svg new file mode 100644 index 000000000..f10c0fc39 --- /dev/null +++ b/docs/public/3-Callout-Awards.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/public/Hero-Dark.svg b/docs/public/Hero-Dark.svg new file mode 100644 index 000000000..dd095eeef --- /dev/null +++ b/docs/public/Hero-Dark.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/docs/public/Hero.svg b/docs/public/Hero.svg new file mode 100644 index 000000000..0b00cb15b --- /dev/null +++ b/docs/public/Hero.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index 5e861a59e..8e0cd38de 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -104,7 +104,7 @@ function nav() { ], }, { - text: '💻 Open Editor', + text: 'Open Editor', link: 'https://mermaid.live', }, ]; diff --git a/packages/mermaid/src/docs/.vitepress/theme/custom.css b/packages/mermaid/src/docs/.vitepress/theme/custom.css index 1d72056ec..f2e38af1c 100644 --- a/packages/mermaid/src/docs/.vitepress/theme/custom.css +++ b/packages/mermaid/src/docs/.vitepress/theme/custom.css @@ -1,22 +1,34 @@ @import 'font-awesome/css/font-awesome.min.css'; @import '@mdi/font/css/materialdesignicons.min.css'; +/* Colors: Brand */ :root { - --vp-c-brand: #ff3670; - --vp-c-brand-light: #ff5e8c; - --vp-c-brand-lighter: #ff85a8; - --vp-c-brand-lightest: #ff9bb7; - --vp-c-brand-dark: #bd34fe; - --vp-c-brand-darker: #9339bd; - --vp-c-brand-dimm: rgba(100, 108, 255, 0.08); + /* use for colored text */ + --vp-c-pink-1: #e0095f; + + /* use for hover state of button */ + --vp-c-pink-2: #b0134a; + + /* use for background button color */ + --vp-c-pink-3: #e0095f; + + /* use for custom container or badges */ + --vp-c-pink-4: rgba(159, 122, 234, 0.14); } :root { - --vp-home-hero-name-color: transparent; - --vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #ff3670); + --vp-c-brand-1: var(--vp-c-pink-1); + --vp-c-brand-2: var(--vp-c-pink-2); + --vp-c-brand-3: var(--vp-c-pink-3); +} - --vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #ff3670 50%); +:root { + --vp-home-hero-name-color: var(--vp-c-brand-1); + + --vp-home-hero-image-background-image: #ff3670; --vp-home-hero-image-filter: blur(72px); + + --vp-home-feature-color: #ff3670; } .vp-doc > div { diff --git a/packages/mermaid/src/docs/index.md b/packages/mermaid/src/docs/index.md index bb9a6e9e3..432c6d061 100644 --- a/packages/mermaid/src/docs/index.md +++ b/packages/mermaid/src/docs/index.md @@ -11,27 +11,32 @@ hero: tagline: JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically. image: - src: /mermaid-logo.svg - alt: Mermaid + light: /Hero.svg + alt: Mermaid diagram + dark: /Hero-Dark.svg + altDark: Mermaid diagram actions: - theme: brand - text: Try Mermaid Editor + text: Try editor link: https://www.mermaidchart.com/play - theme: alt - text: Build with Mermaid + text: Get started link: https://github.com/mermaid-js/mermaid - - theme: alt - text: Learn more - link: https://mermaid.js.org/intro/ features: - - title: ➕ Easy to use! + - icon: + src: /1-Callout-Easy.svg + title: Easy to use details: Easily create diagrams and charts with the Mermaid Editor. link: https://www.mermaidchart.com/play - - title: 🧩 Integrations available! + - icon: + src: /2-Callout-Integrations.svg + title: Integrations available details: Use Mermaid with your favorite applications, check out the integrations list. link: ../../ecosystem/integrations-community.md - - title: 🏆 Award winning! + - icon: + src: /3-Callout-Awards.svg + title: Award winning details: 2019 JavaScript Open Source Award winner for "The Most Exciting Use of Technology". link: https://osawards.com/javascript/2019 --- diff --git a/packages/mermaid/src/docs/public/1-Callout-Easy.svg b/packages/mermaid/src/docs/public/1-Callout-Easy.svg new file mode 100644 index 000000000..a6e9251a0 --- /dev/null +++ b/packages/mermaid/src/docs/public/1-Callout-Easy.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packages/mermaid/src/docs/public/2-Callout-Integrations.svg b/packages/mermaid/src/docs/public/2-Callout-Integrations.svg new file mode 100644 index 000000000..b5ebdf055 --- /dev/null +++ b/packages/mermaid/src/docs/public/2-Callout-Integrations.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packages/mermaid/src/docs/public/3-Callout-Awards.svg b/packages/mermaid/src/docs/public/3-Callout-Awards.svg new file mode 100644 index 000000000..f10c0fc39 --- /dev/null +++ b/packages/mermaid/src/docs/public/3-Callout-Awards.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packages/mermaid/src/docs/public/Hero-Dark.svg b/packages/mermaid/src/docs/public/Hero-Dark.svg new file mode 100644 index 000000000..dd095eeef --- /dev/null +++ b/packages/mermaid/src/docs/public/Hero-Dark.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/packages/mermaid/src/docs/public/Hero.svg b/packages/mermaid/src/docs/public/Hero.svg new file mode 100644 index 000000000..0b00cb15b --- /dev/null +++ b/packages/mermaid/src/docs/public/Hero.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + From 50e4641666b1f3ebe62afb3ad09619dd24d31d2a Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Wed, 5 Mar 2025 22:26:12 -0800 Subject: [PATCH 03/14] minor updates --- packages/mermaid/src/docs/.vitepress/theme/custom.css | 9 --------- packages/mermaid/src/docs/index.md | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/mermaid/src/docs/.vitepress/theme/custom.css b/packages/mermaid/src/docs/.vitepress/theme/custom.css index f2e38af1c..e0b84864c 100644 --- a/packages/mermaid/src/docs/.vitepress/theme/custom.css +++ b/packages/mermaid/src/docs/.vitepress/theme/custom.css @@ -22,15 +22,6 @@ --vp-c-brand-3: var(--vp-c-pink-3); } -:root { - --vp-home-hero-name-color: var(--vp-c-brand-1); - - --vp-home-hero-image-background-image: #ff3670; - --vp-home-hero-image-filter: blur(72px); - - --vp-home-feature-color: #ff3670; -} - .vp-doc > div { width: 100%; } diff --git a/packages/mermaid/src/docs/index.md b/packages/mermaid/src/docs/index.md index 432c6d061..b23df8d5c 100644 --- a/packages/mermaid/src/docs/index.md +++ b/packages/mermaid/src/docs/index.md @@ -12,9 +12,8 @@ hero: image: light: /Hero.svg - alt: Mermaid diagram dark: /Hero-Dark.svg - altDark: Mermaid diagram + alt: Mermaid diagram actions: - theme: brand text: Try editor From 91931531a6a614b35580fa3762ab09d330fd8035 Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Wed, 5 Mar 2025 22:28:11 -0800 Subject: [PATCH 04/14] update link --- packages/mermaid/src/docs/.vitepress/config.ts | 4 ++-- packages/mermaid/src/docs/index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index 8e0cd38de..24f325794 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -104,8 +104,8 @@ function nav() { ], }, { - text: 'Open Editor', - link: 'https://mermaid.live', + text: '💻 Open Editor', + link: 'https://www.mermaidchart.com/play', }, ]; } diff --git a/packages/mermaid/src/docs/index.md b/packages/mermaid/src/docs/index.md index b23df8d5c..254332456 100644 --- a/packages/mermaid/src/docs/index.md +++ b/packages/mermaid/src/docs/index.md @@ -20,7 +20,7 @@ hero: link: https://www.mermaidchart.com/play - theme: alt text: Get started - link: https://github.com/mermaid-js/mermaid + link: https://docs.mermaidchart.com/mermaid/intro features: - icon: From c8f01b14a8f0f16b89514370ca3ac1d52d23df71 Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Tue, 11 Mar 2025 13:21:07 -0700 Subject: [PATCH 05/14] update links --- packages/mermaid/src/docs/.vitepress/config.ts | 2 +- packages/mermaid/src/docs/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index 24f325794..934df743e 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -105,7 +105,7 @@ function nav() { }, { text: '💻 Open Editor', - link: 'https://www.mermaidchart.com/play', + link: 'https://mermaid.live/', }, ]; } diff --git a/packages/mermaid/src/docs/index.md b/packages/mermaid/src/docs/index.md index 254332456..7a232472e 100644 --- a/packages/mermaid/src/docs/index.md +++ b/packages/mermaid/src/docs/index.md @@ -27,7 +27,7 @@ features: src: /1-Callout-Easy.svg title: Easy to use details: Easily create diagrams and charts with the Mermaid Editor. - link: https://www.mermaidchart.com/play + link: https://mermaid.live/ - icon: src: /2-Callout-Integrations.svg title: Integrations available From fa4d4806fa0784d22b33a408cb02366ad06788e5 Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Tue, 18 Mar 2025 13:08:12 -0700 Subject: [PATCH 06/14] update button text --- packages/mermaid/src/docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/docs/index.md b/packages/mermaid/src/docs/index.md index 7a232472e..65ce6a2a9 100644 --- a/packages/mermaid/src/docs/index.md +++ b/packages/mermaid/src/docs/index.md @@ -16,7 +16,7 @@ hero: alt: Mermaid diagram actions: - theme: brand - text: Try editor + text: Try Playground link: https://www.mermaidchart.com/play - theme: alt text: Get started From b81b66513734b9fedae6b964f79e4c1e0a14ba9e Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 9 Apr 2025 15:24:23 +0530 Subject: [PATCH 07/14] feat: Add tooltip for MermaidChart links --- .cspell/contributors.txt | 4 +- .cspell/mermaid-terms.txt | 5 +- .../src/docs/.vitepress/components/TopBar.vue | 2 +- .../src/docs/.vitepress/theme/index.ts | 83 +++++++++++++++++++ 4 files changed, 89 insertions(+), 5 deletions(-) diff --git a/.cspell/contributors.txt b/.cspell/contributors.txt index b7f52f8d0..80f4df22a 100644 --- a/.cspell/contributors.txt +++ b/.cspell/contributors.txt @@ -2,8 +2,10 @@ Ashish Jain cpettitt Dong Cai +knsv +Knut Sveidqvist Nikolay Rozhkov Peng Xiao Per Brolin +Sidharth Vinod subhash-halder -Vinod Sidharth diff --git a/.cspell/mermaid-terms.txt b/.cspell/mermaid-terms.txt index cb6db41de..69d2c3eb9 100644 --- a/.cspell/mermaid-terms.txt +++ b/.cspell/mermaid-terms.txt @@ -13,11 +13,11 @@ gitgraph gzipped handDrawn kanban -knsv -Knut marginx marginy Markdownish +mermaidchart +mermaidchart mermaidjs mindmap mindmaps @@ -35,7 +35,6 @@ sandboxed siebling statediagram substate -Sveidqvist unfixable Viewbox viewports diff --git a/packages/mermaid/src/docs/.vitepress/components/TopBar.vue b/packages/mermaid/src/docs/.vitepress/components/TopBar.vue index 0914d808e..c37c96e8f 100644 --- a/packages/mermaid/src/docs/.vitepress/components/TopBar.vue +++ b/packages/mermaid/src/docs/.vitepress/components/TopBar.vue @@ -115,7 +115,7 @@ onMounted(() => {