docs: small improvements

This commit is contained in:
Emerson Bottero 2022-10-17 19:32:47 -03:00
parent 0da56a1249
commit c8b377bf74
160 changed files with 1292 additions and 140 deletions

View File

@ -18,4 +18,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: packages/mermaid/docs/.vitepress/dist # The folder the action should deploy.
folder: packages/mermaid/src/docs/.vitepress/dist # The folder the action should deploy.

View File

@ -5,12 +5,12 @@ on:
branches:
- develop
paths:
- 'packages/mermaid/docs/**/*'
- 'packages/mermaid/src/docs/**/*'
pull_request:
branches:
- develop
paths:
- 'packages/mermaid/docs/**/*'
- 'packages/mermaid/src/docs/**/*'
jobs:
spellcheck:
name: 'Docs: Spellcheck'
@ -24,5 +24,5 @@ jobs:
node-version: '16'
- run: npm install -g cspell
name: Install cSpell
- run: cspell --config ./cSpell.json "packages/mermaid/docs/**/*.md" --no-progress
- run: cspell --config ./cSpell.json "packages/mermaid/src/docs/**/*.md" --no-progress
name: Run cSpell

2
.gitignore vendored
View File

@ -34,4 +34,4 @@ cypress/snapshots/
tsconfig.tsbuildinfo
#docs generate from code
packages/mermaid/docs/config/setup
packages/mermaid/src/docs/config/setup

View File

@ -32,7 +32,7 @@ We make all changes via pull requests. As we have many pull requests from develo
- Large changes reviewed by knsv or other developer asked to review by knsv
- Smaller low-risk changes like dependencies, documentation, etc. can be merged by active collaborators
- Documentation (updates to the `package/mermaid/docs` folder is also allowed via direct commits)
- Documentation (updates to the `package/mermaid/src/docs` folder is also allowed via direct commits)
To commit code, create a branch, let it start with the type like feature or bug followed by the issue number for reference and some describing text.
@ -50,16 +50,16 @@ Less strict here, it is OK to commit directly in the `develop` branch if you are
The documentation is written in **Markdown**. For more information about Markdown [see the GitHub Markdown help page](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).
### Documentation source files are in [`/packages/mermaid/docs`](packages/mermaid/docs)
### Documentation source files are in [`/packages/mermaid/src/docs`](packages/mermaid/src/docs)
The source files for the project documentation are located in the [`/packages/mermaid/docs`](packages/mermaid/docs) directory. This is where you should make changes.
The files under `/packages/mermaid/docs` are processed to generate the published documentation, and the resulting files are put into the `/docs` directory.
The source files for the project documentation are located in the [`/packages/mermaid/src/docs`](packages/mermaid/src/docs) directory. This is where you should make changes.
The files under `/packages/mermaid/src/docs` are processed to generate the published documentation, and the resulting files are put into the `/docs` directory.
```mermaid
flowchart LR
classDef default fill:#fff,color:black,stroke:black
source["files in /packages/mermaid/docs\n(changes should be done here)"] -- automatic processing\nto generate the final documentation--> published["files in /docs\ndisplayed on the official documentation site"]
source["files in /packages/mermaid/src/docs\n(changes should be done here)"] -- automatic processing\nto generate the final documentation--> published["files in /docs\ndisplayed on the official documentation site"]
```
@ -148,7 +148,7 @@ it('should render forks and joins', () => {
Finally, if it is not in the documentation, no one will know about it and then **no one will use it**. Wouldn't that be sad? With all the effort that was put into the feature?
The source files for documentation are in `/packages/mermaid/docs` and are written in markdown. Just pick the right section and start typing. See the [Committing Documentation](#committing-documentation) section for more about how the documentation is generated.
The source files for documentation are in `/packages/mermaid/src/docs` and are written in markdown. Just pick the right section and start typing. See the [Committing Documentation](#committing-documentation) section for more about how the documentation is generated.
#### Adding to or changing the documentation organization

View File

@ -1,4 +1,4 @@
import { version } from '../../package.json';
import { version } from '../../../package.json';
import MermaidMarkdown from './mermaid-markdown-all';
import { defineConfig } from 'vitepress';
@ -8,9 +8,12 @@ export default defineConfig({
description: 'Create diagrams and visualizations using text and code.',
base: '/mermaid-docs/',
markdown: MermaidMarkdown,
ignoreDeadLinks: true, //TODO: try to fixe those in autogenerated docs
themeConfig: {
nav: nav(),
editLink: {
pattern: 'https://github.com/mermaid-js/mermaid/edit/develop/docs/:path',
text: 'Edit this page on GitHub',
},
sidebar: {
'/': sidebarAll(),
@ -53,7 +56,7 @@ function nav() {
},
{
text: '💻 Live Editor',
link: '/edit',
link: 'https://mermaid.live',
},
];
}

View File

@ -1,13 +1,17 @@
@media (min-width: 1440px) {
.VPDoc:not(.has-sidebar) .container[data-v-10119189] {
max-width: 100%;
}
.VPDoc.has-aside .content-container[data-v-10119189] {
max-width: 100%;
}
: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);
}
:root {
--vp-layout-max-width: 100%;
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #ff3670);
--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #ff3670 50%);
--vp-home-hero-image-filter: blur(72px);
}

View File

@ -1,4 +1,5 @@
import DefaultTheme from 'vitepress/theme';
// @ts-ignore
import Mermaid from 'vitepress-plugin-mermaid/Mermaid.vue';
import './custom.css';

1050
docs/CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Development and Contribution 🙌

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Overview for Beginners

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Adding a New Diagram/Chart 📊

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Security

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Version 8.6.0 Changes

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Tutorials

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Accessibility Options

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Configuration

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Directives

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# mermaid CLI

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Advanced n00b mermaid (Coming soon..)

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# mermaid

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Module: config
@ -10,7 +10,7 @@
#### Defined in
[config.ts:7](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L7)
[config.ts:7](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L7)
## Functions
@ -32,7 +32,7 @@ Pushes in a directive to the configuration
#### Defined in
[config.ts:191](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L191)
[config.ts:191](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L191)
---
@ -56,7 +56,7 @@ Pushes in a directive to the configuration
#### Defined in
[config.ts:136](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L136)
[config.ts:136](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L136)
---
@ -80,7 +80,7 @@ Pushes in a directive to the configuration
#### Defined in
[config.ts:96](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L96)
[config.ts:96](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L96)
---
@ -114,7 +114,7 @@ Pushes in a directive to the configuration
#### Defined in
[config.ts:222](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L222)
[config.ts:222](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L222)
---
@ -143,7 +143,7 @@ options in-place
#### Defined in
[config.ts:151](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L151)
[config.ts:151](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L151)
---
@ -163,7 +163,7 @@ options in-place
#### Defined in
[config.ts:75](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L75)
[config.ts:75](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L75)
---
@ -195,7 +195,7 @@ corresponding siteConfig value.
#### Defined in
[config.ts:113](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L113)
[config.ts:113](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L113)
---
@ -228,7 +228,7 @@ function _Default value: At default, will mirror Global Config_
#### Defined in
[config.ts:61](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L61)
[config.ts:61](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L61)
---
@ -249,7 +249,7 @@ function _Default value: At default, will mirror Global Config_
#### Defined in
[config.ts:14](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L14)
[config.ts:14](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L14)
---
@ -269,4 +269,4 @@ function _Default value: At default, will mirror Global Config_
#### Defined in
[config.ts:79](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/config.ts#L79)
[config.ts:79](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/config.ts#L79)

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Module: defaultConfig
@ -10,7 +10,7 @@
#### Defined in
[defaultConfig.ts:1855](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/defaultConfig.ts#L1855)
[defaultConfig.ts:1855](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/defaultConfig.ts#L1855)
---
@ -52,4 +52,4 @@ Configuration
#### Defined in
[defaultConfig.ts:31](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/defaultConfig.ts#L31)
[defaultConfig.ts:31](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/defaultConfig.ts#L31)

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Module: mermaidAPI
@ -16,7 +16,7 @@ Renames and re-exports [mermaidAPI](mermaidAPI.md#mermaidapi)
#### Defined in
[mermaidAPI.ts:483](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/mermaidAPI.ts#L483)
[mermaidAPI.ts:483](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/mermaidAPI.ts#L483)
## Functions
@ -36,7 +36,7 @@ Renames and re-exports [mermaidAPI](mermaidAPI.md#mermaidapi)
#### Defined in
[mermaidAPI.ts:73](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/mermaidAPI.ts#L73)
[mermaidAPI.ts:73](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/mermaidAPI.ts#L73)
---
@ -56,4 +56,4 @@ Renames and re-exports [mermaidAPI](mermaidAPI.md#mermaidapi)
#### Defined in
[mermaidAPI.ts:47](https://github.com/emersonbottero/mermaid/blob/57b883c7/packages/mermaid/src/mermaidAPI.ts#L47)
[mermaidAPI.ts:47](https://github.com/emersonbottero/mermaid/blob/0da56a12/packages/mermaid/src/mermaidAPI.ts#L47)

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Theme Configuration

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Usage

View File

@ -1,9 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
---
layout: home
## title: Live Mermaid
<iframe id="editor" src="https://mermaid.live" style="position: fixed;left: 0px;bottom: 0px;right: 0px;top: 80px;width: 100%;height: calc(100% - 80px);"></iframe>

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
---
@ -12,7 +12,7 @@ name: Mermaid
text: Diagramming and charting tool
tagline: JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.
image:
src: /header.png
src: /mermaid-logo.svg
alt: Mermaid
actions:
\- theme: brand
@ -110,6 +110,7 @@ const members = [
.image-container .image-src {
margin: 1rem auto;
max-width: 100%;
width: 100%;
}
.dark .image-src{

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# About Mermaid

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# A Mermaid User-Guide for Beginners

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Diagram Syntax

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Frequently Asked Questions

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Integrations

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
docs/public/apple-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
docs/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

41
docs/public/manifest.json Normal file
View File

@ -0,0 +1,41 @@
{
"name": "App",
"icons": [
{
"src": "/android-icon-36x36.png",
"sizes": "36x36",
"type": "image/png",
"density": "0.75"
},
{
"src": "/android-icon-48x48.png",
"sizes": "48x48",
"type": "image/png",
"density": "1.0"
},
{
"src": "/android-icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"density": "1.5"
},
{
"src": "/android-icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"density": "2.0"
},
{
"src": "/android-icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"density": "3.0"
},
{
"src": "/android-icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"density": "4.0"
}
]
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 491 491" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<!-- <path d="M490.16,84.61C490.16,37.912 452.248,0 405.55,0L84.61,0C37.912,0 0,37.912 0,84.61L0,405.55C0,452.248 37.912,490.16 84.61,490.16L405.55,490.16C452.248,490.16 490.16,452.248 490.16,405.55L490.16,84.61Z" style="fill:rgb(255,54,112);"/> -->
<path d="M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z" style="fill:white;fill-rule:nonzero;"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# C4 Diagrams

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Class diagrams

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Entity Relationship Diagrams

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Examples

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Flowcharts - Basic Syntax
@ -329,12 +329,12 @@ flowchart LR
### Dotted link
```mermaid-example
flowchart LR;
flowchart LR
A-.->B;
```
```mermaid
flowchart LR;
flowchart LR
A-.->B;
```
@ -707,7 +707,7 @@ Examples of tooltip usage below:
```html
<script>
var callback = function () {
const callback = function () {
alert('A callback was triggered');
};
</script>
@ -907,14 +907,14 @@ below:
**Example definition**
```mermaid-example
flowchart LR;
flowchart LR
A-->B[AAA<span>BBB</span>]
B-->D
class A cssClass
```
```mermaid
flowchart LR;
flowchart LR
A-->B[AAA<span>BBB</span>]
B-->D
class A cssClass
@ -936,7 +936,7 @@ The icons are accessed via the syntax fa:#icon class name#.
flowchart TD
B["fab:fa-twitter for peace"]
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner);
B-->D(fa:fa-spinner)
B-->E(A fa:fa-camera-retro perhaps?)
```
@ -944,7 +944,7 @@ flowchart TD
flowchart TD
B["fab:fa-twitter for peace"]
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner);
B-->D(fa:fa-spinner)
B-->E(A fa:fa-camera-retro perhaps?)
```

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Gantt diagrams
@ -341,7 +341,7 @@ To hide the marker, set `todayMarker` to `off`.
It is possible to adjust the margins for rendering the gantt diagram.
This is done by defining the `ganttConfig` part of the configuration object.
How to use the CLI is described in the [mermaidCLI](../config/mermaidCLI.html) page.
How to use the CLI is described in the [mermaidCLI](../config/mermaidCLI) page.
mermaid.ganttConfig can be set to a JSON string with config parameters or the corresponding object.

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Gitgraph Diagrams

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Mindmap

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Pie chart diagrams

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Requirement Diagram

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# Sequence diagrams

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# State diagrams

View File

@ -1,4 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in docs.
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.
# User Journey Diagram

View File

@ -1,5 +1,6 @@
import { defineConfig, searchForWorkspaceRoot } from 'vite';
import path from 'path';
// @ts-ignore: still in alpha
import { SearchPlugin } from 'vitepress-plugin-search';
const virtualModuleId = 'virtual:mermaid-config';
@ -29,7 +30,7 @@ export default defineConfig({
],
resolve: {
alias: {
mermaid: path.join(__dirname, '../dist/mermaid.esm.min.mjs'), // Use this one to build
mermaid: path.join(__dirname, '../../dist/mermaid.esm.min.mjs'), // Use this one to build
},
},
server: {

View File

@ -1,6 +1,6 @@
{
"packages/mermaid/docs/**": ["pnpm run docs:build --git"],
"packages/mermaid/docs.mts": ["pnpm run docs:build --git"],
"packages/mermaid/src/docs/**": ["pnpm run docs:build --git"],
"packages/mermaid/src/docs.mts": ["pnpm run docs:build --git"],
"*.{ts,js,json,html,md,mts}": ["eslint --fix", "prettier --write"],
"*.jison": ["pnpm run lint:jison"]
}

View File

@ -1,13 +0,0 @@
@media (min-width: 1440px) {
.VPDoc:not(.has-sidebar) .container[data-v-10119189] {
max-width: 100%;
}
.VPDoc.has-aside .content-container[data-v-10119189] {
max-width: 100%;
}
}
:root {
--vp-layout-max-width: 100%;
}

View File

@ -1,7 +0,0 @@
---
layout: home
title: Live Mermaid
---
<iframe id="editor" src="https://mermaid.live" style="position: fixed;left: 0px;bottom: 0px;right: 0px;top: 80px;width: 100%;height: calc(100% - 80px);"></iframe>

View File

@ -34,12 +34,12 @@
"predocs:build": "rimraf docs/.vitepress/dist",
"docs:build": "ts-node-esm src/docs.mts",
"docs:verify": "pnpm docs:build --verify",
"docs:code": "typedoc --plugin typedoc-plugin-markdown --readme none --hideBreadcrumbs --hideInPageTOC --namedAnchors --out docs/config/setup --entryPointStrategy expand src/defaultConfig.ts src/config.ts src/mermaidAPI.ts",
"docs:code": "typedoc --plugin typedoc-plugin-markdown --readme none --hideBreadcrumbs --hideInPageTOC --namedAnchors --out src/docs/config/setup --entryPointStrategy expand src/defaultConfig.ts src/config.ts src/mermaidAPI.ts",
"predocs:dev": "pnpm docs:code",
"docs:dev": "vitepress dev docs",
"docs:dev": "vitepress dev src/docs",
"predocs:bundle": "pnpm docs:code",
"docs:bundle": "vitepress build docs",
"docs:serve": "vitepress serve docs",
"docs:bundle": "vitepress build src/docs",
"docs:serve": "vitepress serve src/docs",
"release": "pnpm build",
"lint": "eslint --cache --ignore-path .gitignore . && pnpm lint:jison && prettier --check .",
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .",
@ -77,11 +77,7 @@
"khroma": "^2.0.0",
"lodash": "^4.17.21",
"moment-mini": "^2.24.0",
"non-layered-tidy-tree-layout": "^2.0.2",
"shiki": "^0.11.1",
"stylis": "^4.1.2",
"typedoc": "^0.23.16",
"typedoc-plugin-markdown": "^3.13.6"
"non-layered-tidy-tree-layout": "^2.0.2"
},
"devDependencies": {
"@applitools/eyes-cypress": "^3.25.7",
@ -130,7 +126,11 @@
"unist-util-flatmap": "^1.0.0",
"vitepress": "^1.0.0-alpha.19",
"vitepress-plugin-mermaid": "^2.0.8",
"vitepress-plugin-search": "^1.0.4-alpha.11"
"vitepress-plugin-search": "^1.0.4-alpha.11",
"shiki": "^0.11.1",
"stylis": "^4.1.2",
"typedoc": "^0.23.16",
"typedoc-plugin-markdown": "^3.13.6"
},
"resolutions": {
"d3": "^7.0.0"

View File

@ -47,7 +47,7 @@ const MERMAID_MAJOR_VERSION = (
// These paths are from the root of the mono-repo, not from the
// mermaid sub-directory
const SOURCE_DOCS_DIR = 'docs';
const SOURCE_DOCS_DIR = 'src/docs';
const FINAL_DOCS_DIR = '../../docs';
const AUTOGENERATED_TEXT = `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in ${SOURCE_DOCS_DIR}.`;

View File

@ -1,4 +1,4 @@
import { version } from '../../package.json';
import { version } from '../../../package.json';
import MermaidMarkdown from './mermaid-markdown-all';
import { defineConfig } from 'vitepress';
@ -8,9 +8,12 @@ export default defineConfig({
description: 'Create diagrams and visualizations using text and code.',
base: '/mermaid-docs/',
markdown: MermaidMarkdown,
ignoreDeadLinks: true, //TODO: try to fixe those in autogenerated docs
themeConfig: {
nav: nav(),
editLink: {
pattern: 'https://github.com/mermaid-js/mermaid/edit/develop/docs/:path',
text: 'Edit this page on GitHub',
},
sidebar: {
'/': sidebarAll(),
@ -53,7 +56,7 @@ function nav() {
},
{
text: '💻 Live Editor',
link: '/edit',
link: 'https://mermaid.live',
},
];
}

View File

@ -0,0 +1,17 @@
: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);
}
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #ff3670);
--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #ff3670 50%);
--vp-home-hero-image-filter: blur(72px);
}

View File

@ -1,4 +1,5 @@
import DefaultTheme from 'vitepress/theme';
// @ts-ignore
import Mermaid from 'vitepress-plugin-mermaid/Mermaid.vue';
import './custom.css';

View File

@ -11,10 +11,10 @@ All changes are in descending order, beginning with the newest (latest) version.
🔖 [Release Notes](https://github.com/mermaid-js/mermaid/releases/tag/8.7.0) |
📜 [Full Changelog](https://github.com/mermaid-js/mermaid/compare/8.6.0...8.7.0)
This version brings with it a system for [dynamic and integrated configuration of the diagram themes](../config/theming.md).
This version brings with it a system for [dynamic and integrated configuration of the diagram themes](config/theming.md).
The objective of this is to increase the customizability of mermaid and the ease of Styling, with the customization of themes through the `%%init%%` directive and `initialize` calls.
Themes follow and build upon the Levels of Configuration and employ `directives` to modify and create custom configurations, as they were introduced in Version [8.6.0](../getting-started/8.6.0_docs.md).
Themes follow and build upon the Levels of Configuration and employ `directives` to modify and create custom configurations, as they were introduced in Version [8.6.0](config/8.6.0_docs.md).
**These Theming Configurations, similar to directives, will also be made applicable in the Live-Editor, for easier styling.**

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Some files were not shown because too many files have changed in this diff Show More