mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-21 17:26:45 +02:00
Compare commits
58 Commits
sidv/cttes
...
mermaid@11
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4d10e3f258 | ||
![]() |
bf05d8781e | ||
![]() |
2efe741924 | ||
![]() |
5bbf3678c5 | ||
![]() |
83926c9707 | ||
![]() |
49cb8d8388 | ||
![]() |
eb3ed2a5e4 | ||
![]() |
28f9181dd4 | ||
![]() |
5013484924 | ||
![]() |
078038b080 | ||
![]() |
ea9a06160c | ||
![]() |
2cfdd1620a | ||
![]() |
b9f4faa916 | ||
![]() |
21c636c4c6 | ||
![]() |
dd57030732 | ||
![]() |
efba4c18d1 | ||
![]() |
48fd76e076 | ||
![]() |
fdf376f9c8 | ||
![]() |
46b7ee87dd | ||
![]() |
14a94c0c51 | ||
![]() |
24490f7789 | ||
![]() |
09afb077f0 | ||
![]() |
99ee235e75 | ||
![]() |
029a444d32 | ||
![]() |
8c4c92a861 | ||
![]() |
19d46fc823 | ||
![]() |
ae2dc70385 | ||
![]() |
0ad44c12fe | ||
![]() |
ad12fa7fff | ||
![]() |
53bff117aa | ||
![]() |
2fe5e678bf | ||
![]() |
4665b6bf15 | ||
![]() |
a9d317f997 | ||
![]() |
59aaa310dd | ||
![]() |
f4ce428d66 | ||
![]() |
5aecd127bd | ||
![]() |
1990786c2c | ||
![]() |
980c97a44c | ||
![]() |
42177a3098 | ||
![]() |
657e38f6e0 | ||
![]() |
e8ddae4882 | ||
![]() |
c0d6d89330 | ||
![]() |
1cdc73d270 | ||
![]() |
4694ec08d3 | ||
![]() |
e26dbfe11a | ||
![]() |
0d6552e63d | ||
![]() |
e683b8886a | ||
![]() |
765e0cd35c | ||
![]() |
515d880f0a | ||
![]() |
60a30a3beb | ||
![]() |
e95e915d2b | ||
![]() |
99552b3389 | ||
![]() |
7391b05c43 | ||
![]() |
0691c722c3 | ||
![]() |
534a10edea | ||
![]() |
af5e69327b | ||
![]() |
20b03189df | ||
![]() |
3d44eb0f42 |
@@ -7,5 +7,6 @@
|
||||
"access": "public",
|
||||
"baseBranch": "master",
|
||||
"updateInternalDependencies": "patch",
|
||||
"bumpVersionsWithWorkspaceProtocolOnly": true,
|
||||
"ignore": ["@mermaid-js/docs", "@mermaid-js/webpack-test", "@mermaid-js/mermaid-example-diagram"]
|
||||
}
|
||||
|
@@ -58,6 +58,7 @@ rehype
|
||||
roughjs
|
||||
rscratch
|
||||
shiki
|
||||
Slidev
|
||||
sparkline
|
||||
sphinxcontrib
|
||||
ssim
|
||||
|
@@ -59,6 +59,7 @@ To add an integration to this list, see the [Integrations - create page](./integ
|
||||
- [MonsterWriter](https://www.monsterwriter.com/) ✅
|
||||
- [Joplin](https://joplinapp.org) ✅
|
||||
- [LiveBook](https://livebook.dev) ✅
|
||||
- [Slidev](https://sli.dev) ✅
|
||||
- [Tuleap](https://docs.tuleap.org/user-guide/writing-in-tuleap.html#graphs) ✅
|
||||
- [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅
|
||||
- [Mermerd](https://github.com/KarnerTh/mermerd)
|
||||
@@ -134,7 +135,7 @@ Communication tools and platforms
|
||||
### Wikis
|
||||
|
||||
- [DokuWiki](https://dokuwiki.org)
|
||||
- [ComboStrap](https://combostrap.com/mermaid)
|
||||
- [ComboStrap](https://combostrap.com/utility/create-diagram-with-mermaid-vh3ab9yj)
|
||||
- [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid)
|
||||
- [Foswiki](https://foswiki.org)
|
||||
- [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin)
|
||||
|
@@ -12,7 +12,7 @@ Try the Ultimate AI, Mermaid, and Visual Diagramming Suite by creating an accoun
|
||||
|
||||
<br />
|
||||
|
||||
<a href="https://www.producthunt.com/posts/mermaid-chart?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid-chart" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=416671&theme=light" alt="Mermaid Chart - A smarter way to create diagrams | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
<a href="https://www.producthunt.com/products/mermaid-chart?utm_source=badge-follow&utm_medium=badge&utm_souce=badge-mermaid-chart" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/follow.svg?product_id=552855&theme=light" alt="Mermaid Chart - A smarter way to create diagrams | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
|
||||
## About
|
||||
|
||||
|
@@ -6,6 +6,30 @@
|
||||
|
||||
# Blog
|
||||
|
||||
## [Mermaid AI Is Here to Change the Game For Diagram Creation](https://www.mermaidchart.com/blog/posts/mermaid-ai-is-here-to-change-the-game-for-diagram-creation/)
|
||||
|
||||
22 July 2024 · 5 mins
|
||||
|
||||
The Mermaid AI chat interface
|
||||
|
||||
## [How to Make a Sequence Diagram with Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-make-a-sequence-diagram-in-mermaid-chart-step-by-step-guide/)
|
||||
|
||||
8 July 2024 · 6 mins
|
||||
|
||||
Sequence diagrams are important for communicating complex systems in a clear and concise manner.
|
||||
|
||||
## [How to Use the New “Comments” Feature in Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-use-the-new-comments-feature-in-mermaid-chart/)
|
||||
|
||||
2 July 2024 · 3 mins
|
||||
|
||||
How to Use the New Comments Feature in Mermaid Chart
|
||||
|
||||
## [How to Use the official Mermaid Chart for Confluence app](https://www.mermaidchart.com/blog/posts/how-to-use-the-official-mermaid-chart-for-confluence-app/)
|
||||
|
||||
21 May 2024 · 4 mins
|
||||
|
||||
It doesn’t matter if you’re a data enthusiast, software engineer, or visual storyteller; our Confluence app can allow you to embed Mermaid Chart diagrams — and dynamically edit them — within your Confluence pages.
|
||||
|
||||
## [How to Choose the Right Documentation Software](https://www.mermaidchart.com/blog/posts/how-to-choose-the-right-documentation-software/)
|
||||
|
||||
7 May 2024 · 5 mins
|
||||
|
@@ -172,7 +172,7 @@ The `title` is an _optional_ string to be displayed at the top of the Gantt char
|
||||
The `excludes` is an _optional_ attribute that accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".
|
||||
These date will be marked on the graph, and be excluded from the duration calculation of tasks. Meaning that if there are excluded dates during a task interval, the number of 'skipped' days will be added to the end of the task to ensure the duration is as specified in the code.
|
||||
|
||||
#### Weekend (v\<MERMAID_RELEASE_VERSION>+)
|
||||
#### Weekend (v\11.0.0+)
|
||||
|
||||
When excluding weekends, it is possible to configure the weekends to be either Friday and Saturday or Saturday and Sunday. By default weekends are Saturday and Sunday.
|
||||
To define the weekend start day, there is an _optional_ attribute `weekend` that can be added in a new line followed by either `friday` or `saturday`.
|
||||
|
@@ -918,7 +918,7 @@ Usage example:
|
||||
commit
|
||||
```
|
||||
|
||||
### Bottom to Top (`BT:`) (v\<MERMAID_RELEASE_VERSION>+)
|
||||
### Bottom to Top (`BT:`) (v11.0.0+)
|
||||
|
||||
In `BT` (**Bottom-to-Top**) orientation, the commits run from bottom to top of the graph and branches are arranged side-by-side.
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
>
|
||||
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/syntax/packet.md](../../packages/mermaid/src/docs/syntax/packet.md).
|
||||
|
||||
# Packet Diagram (v\<MERMAID_RELEASE_VERSION>+)
|
||||
# Packet Diagram (v11.0.0+)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
@@ -208,18 +208,18 @@ Messages can be of two displayed either solid or with a dotted line.
|
||||
|
||||
There are ten types of arrows currently supported:
|
||||
|
||||
| Type | Description |
|
||||
| -------- | ------------------------------------------------------------------------ |
|
||||
| `->` | Solid line without arrow |
|
||||
| `-->` | Dotted line without arrow |
|
||||
| `->>` | Solid line with arrowhead |
|
||||
| `-->>` | Dotted line with arrowhead |
|
||||
| `<<->>` | Solid line with bidirectional arrowheads (v\<MERMAID_RELEASE_VERSION>+) |
|
||||
| `<<-->>` | Dotted line with bidirectional arrowheads (v\<MERMAID_RELEASE_VERSION>+) |
|
||||
| `-x` | Solid line with a cross at the end |
|
||||
| `--x` | Dotted line with a cross at the end. |
|
||||
| `-)` | Solid line with an open arrow at the end (async) |
|
||||
| `--)` | Dotted line with a open arrow at the end (async) |
|
||||
| Type | Description |
|
||||
| -------- | ---------------------------------------------------- |
|
||||
| `->` | Solid line without arrow |
|
||||
| `-->` | Dotted line without arrow |
|
||||
| `->>` | Solid line with arrowhead |
|
||||
| `-->>` | Dotted line with arrowhead |
|
||||
| `<<->>` | Solid line with bidirectional arrowheads (v11.0.0+) |
|
||||
| `<<-->>` | Dotted line with bidirectional arrowheads (v11.0.0+) |
|
||||
| `-x` | Solid line with a cross at the end |
|
||||
| `--x` | Dotted line with a cross at the end. |
|
||||
| `-)` | Solid line with an open arrow at the end (async) |
|
||||
| `--)` | Dotted line with a open arrow at the end (async) |
|
||||
|
||||
## Activations
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mermaid-js/layout-elk",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.0",
|
||||
"description": "ELK layout engine for mermaid",
|
||||
"module": "dist/mermaid-layout-elk.core.mjs",
|
||||
"types": "dist/packages/mermaid-layout-elk/src/index.d.ts",
|
||||
@@ -32,13 +32,14 @@
|
||||
"d3": "^7.9.0",
|
||||
"elkjs": "^0.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"devDependencies": {
|
||||
"@types/d3": "^7.4.3",
|
||||
"mermaid": "workspace:^"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"mermaid": "^11.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/d3": "^7.4.3"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@
|
||||
"mermaid": "workspace:^"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"mermaid": "workspace:>=10.0.0"
|
||||
"mermaid": "^10 || ^11"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
23
packages/mermaid/CHANGELOG.md
Normal file
23
packages/mermaid/CHANGELOG.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# mermaid
|
||||
|
||||
## 11.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2](https://github.com/calvinvette/mermaid/pull/2) [`bf05d87`](https://github.com/mermaid-js/mermaid/commit/bf05d8781edacb580fdb053da167e968b7570117) Thanks [@calvinvette](https://github.com/calvinvette)! - test changeset
|
||||
|
||||
## 11.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83926c9`](https://github.com/mermaid-js/mermaid/commit/83926c9707b09c34e300888186250191ee8ae30a)]:
|
||||
- @mermaid-js/parser@0.1.1
|
||||
|
||||
## 11.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#5744](https://github.com/mermaid-js/mermaid/pull/5744) [`5013484`](https://github.com/mermaid-js/mermaid/commit/50134849246141ec400e33e08c12c10539b84de9) Thanks [@sidharthv96](https://github.com/sidharthv96)! - Release parser, test changesets
|
||||
|
||||
- Updated dependencies [[`5013484`](https://github.com/mermaid-js/mermaid/commit/50134849246141ec400e33e08c12c10539b84de9)]:
|
||||
- @mermaid-js/parser@0.1.0
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mermaid",
|
||||
"version": "11.0.0-alpha.7",
|
||||
"version": "11.0.1",
|
||||
"description": "Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",
|
||||
"type": "module",
|
||||
"module": "./dist/mermaid.core.mjs",
|
||||
|
@@ -54,7 +54,7 @@ export const draw = async function (text: string, id: string, _version: string,
|
||||
data4Layout.diagramId = id;
|
||||
log.debug('REF1:', data4Layout);
|
||||
await render(data4Layout, svg);
|
||||
const padding = data4Layout.config.flowchart?.padding ?? 8;
|
||||
const padding = data4Layout.config.flowchart?.diagramPadding ?? 8;
|
||||
utils.insertTitle(
|
||||
svg,
|
||||
'flowchartTitleText',
|
||||
|
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div class="-mt-6 mb-8">
|
||||
<a
|
||||
href="https://www.producthunt.com/posts/mermaid-ai-2?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid-ai-2"
|
||||
target="_blank"
|
||||
><img
|
||||
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=465568&theme=light"
|
||||
alt="Mermaid AI - Maximize your diagramming efficiency with Mermaid AI | Product Hunt"
|
||||
style="width: 250px; height: 54px"
|
||||
width="250"
|
||||
height="54"
|
||||
/></a>
|
||||
</div>
|
||||
</template>
|
@@ -1,26 +1,65 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
interface Taglines {
|
||||
label: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
const taglines: Taglines[] = [
|
||||
{
|
||||
label: 'Use the Visual Editor in Mermaid Chart to design and build diagrams',
|
||||
url: 'https://www.mermaidchart.com/play?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=visual_editor',
|
||||
},
|
||||
{
|
||||
label: 'Diagram live with teammates in Mermaid Chart',
|
||||
url: 'https://www.mermaidchart.com/play?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=teams',
|
||||
},
|
||||
{
|
||||
label: 'Skip the rough draft with Mermaid AI in Mermaid Chart',
|
||||
url: 'https://www.mermaidchart.com/play?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=mermaid_ai',
|
||||
},
|
||||
];
|
||||
|
||||
let index = ref(Math.floor(Math.random() * taglines.length));
|
||||
onMounted(() => {
|
||||
setInterval(() => {
|
||||
index.value = (index.value + 1) % taglines.length;
|
||||
}, 60_000);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="w-full top-bar bg-gradient-to-r from-[#bd34fe] to-[#ff3670] flex items-center text-center justify-center p-1 text-white"
|
||||
>
|
||||
<p class="flex-grow text-center tracking-wide text-text">
|
||||
<a
|
||||
href="https://www.mermaidchart.com/landing"
|
||||
target="_blank"
|
||||
class="unstyled flex-grow tracking-wide plausible-event-name=bannerClick"
|
||||
>
|
||||
<span class="text-primary-50 font-semibold">{{
|
||||
[
|
||||
'Try diagramming with ChatGPT at Mermaid Chart',
|
||||
'Try Mermaid’s Visual Editor at Mermaid Chart',
|
||||
'Enjoy live collaboration with teammates at Mermaid Chart',
|
||||
][Math.floor(Math.random() * 3)]
|
||||
}}</span>
|
||||
<button
|
||||
class="ml-4 rounded bg-[#111113] p-1 px-2 text-sm font-semibold tracking-wide text-white"
|
||||
<div class="mb-4 w-full top-bar bg-gradient-to-r from-[#bd34fe] to-[#ff3670] flex p-1">
|
||||
<p class="w-full tracking-wide fade-text">
|
||||
<transition name="fade" mode="out-in">
|
||||
<a
|
||||
:key="index"
|
||||
:href="taglines[index].url"
|
||||
target="_blank"
|
||||
class="unstyled flex justify-center items-center gap-4 text-white tracking-wide plausible-event-name=bannerClick"
|
||||
>
|
||||
Try it now
|
||||
</button>
|
||||
</a>
|
||||
<span class="font-semibold">{{ taglines[index].label }}</span>
|
||||
<button class="rounded bg-[#111113] p-1 px-2 text-sm font-semibold tracking-wide">
|
||||
Try it now
|
||||
</button>
|
||||
</a>
|
||||
</transition>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 1s;
|
||||
}
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.fade-enter-to,
|
||||
.fade-leave-from {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
|
@@ -11,11 +11,11 @@ import HomePage from '../components/HomePage.vue';
|
||||
import TopBar from '../components/TopBar.vue';
|
||||
import { getRedirect } from './redirect.js';
|
||||
// @ts-ignore Type not available
|
||||
import { h } from 'vue';
|
||||
import Theme from 'vitepress/theme';
|
||||
import '../style/main.css';
|
||||
import 'uno.css';
|
||||
import type { EnhanceAppContext } from 'vitepress';
|
||||
import Theme from 'vitepress/theme';
|
||||
import { h } from 'vue';
|
||||
import '../style/main.css';
|
||||
|
||||
export default {
|
||||
...DefaultTheme,
|
||||
@@ -24,6 +24,7 @@ export default {
|
||||
// Keeping this as comment as it took a lot of time to figure out how to add a component to the top bar.
|
||||
'home-hero-before': () => h(TopBar),
|
||||
'home-features-after': () => h(HomePage),
|
||||
'doc-before': () => h(TopBar),
|
||||
});
|
||||
},
|
||||
enhanceApp({ app, router }: EnhanceAppContext) {
|
||||
|
@@ -54,6 +54,7 @@ To add an integration to this list, see the [Integrations - create page](./integ
|
||||
- [MonsterWriter](https://www.monsterwriter.com/) ✅
|
||||
- [Joplin](https://joplinapp.org) ✅
|
||||
- [LiveBook](https://livebook.dev) ✅
|
||||
- [Slidev](https://sli.dev) ✅
|
||||
- [Tuleap](https://docs.tuleap.org/user-guide/writing-in-tuleap.html#graphs) ✅
|
||||
- [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅
|
||||
- [Mermerd](https://github.com/KarnerTh/mermerd)
|
||||
@@ -129,7 +130,7 @@ Communication tools and platforms
|
||||
### Wikis
|
||||
|
||||
- [DokuWiki](https://dokuwiki.org)
|
||||
- [ComboStrap](https://combostrap.com/mermaid)
|
||||
- [ComboStrap](https://combostrap.com/utility/create-diagram-with-mermaid-vh3ab9yj)
|
||||
- [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid)
|
||||
- [Foswiki](https://foswiki.org)
|
||||
- [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin)
|
||||
|
@@ -6,7 +6,7 @@ Try the Ultimate AI, Mermaid, and Visual Diagramming Suite by creating an accoun
|
||||
|
||||
<br />
|
||||
|
||||
<a href="https://www.producthunt.com/posts/mermaid-chart?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid-chart" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=416671&theme=light" alt="Mermaid Chart - A smarter way to create diagrams | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
<a href="https://www.producthunt.com/products/mermaid-chart?utm_source=badge-follow&utm_medium=badge&utm_souce=badge-mermaid-chart" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/follow.svg?product_id=552855&theme=light" alt="Mermaid Chart - A smarter way to create diagrams | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
|
||||
## About
|
||||
|
||||
|
@@ -1,5 +1,29 @@
|
||||
# Blog
|
||||
|
||||
## [Mermaid AI Is Here to Change the Game For Diagram Creation](https://www.mermaidchart.com/blog/posts/mermaid-ai-is-here-to-change-the-game-for-diagram-creation/)
|
||||
|
||||
22 July 2024 · 5 mins
|
||||
|
||||
The Mermaid AI chat interface
|
||||
|
||||
## [How to Make a Sequence Diagram with Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-make-a-sequence-diagram-in-mermaid-chart-step-by-step-guide/)
|
||||
|
||||
8 July 2024 · 6 mins
|
||||
|
||||
Sequence diagrams are important for communicating complex systems in a clear and concise manner.
|
||||
|
||||
## [How to Use the New “Comments” Feature in Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-use-the-new-comments-feature-in-mermaid-chart/)
|
||||
|
||||
2 July 2024 · 3 mins
|
||||
|
||||
How to Use the New Comments Feature in Mermaid Chart
|
||||
|
||||
## [How to Use the official Mermaid Chart for Confluence app](https://www.mermaidchart.com/blog/posts/how-to-use-the-official-mermaid-chart-for-confluence-app/)
|
||||
|
||||
21 May 2024 · 4 mins
|
||||
|
||||
It doesn’t matter if you’re a data enthusiast, software engineer, or visual storyteller; our Confluence app can allow you to embed Mermaid Chart diagrams — and dynamically edit them — within your Confluence pages.
|
||||
|
||||
## [How to Choose the Right Documentation Software](https://www.mermaidchart.com/blog/posts/how-to-choose-the-right-documentation-software/)
|
||||
|
||||
7 May 2024 · 5 mins
|
||||
|
@@ -114,7 +114,7 @@ The `title` is an _optional_ string to be displayed at the top of the Gantt char
|
||||
The `excludes` is an _optional_ attribute that accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".
|
||||
These date will be marked on the graph, and be excluded from the duration calculation of tasks. Meaning that if there are excluded dates during a task interval, the number of 'skipped' days will be added to the end of the task to ensure the duration is as specified in the code.
|
||||
|
||||
#### Weekend (v\<MERMAID_RELEASE_VERSION>+)
|
||||
#### Weekend (v\11.0.0+)
|
||||
|
||||
When excluding weekends, it is possible to configure the weekends to be either Friday and Saturday or Saturday and Sunday. By default weekends are Saturday and Sunday.
|
||||
To define the weekend start day, there is an _optional_ attribute `weekend` that can be added in a new line followed by either `friday` or `saturday`.
|
||||
|
@@ -571,7 +571,7 @@ Usage example:
|
||||
commit
|
||||
```
|
||||
|
||||
### Bottom to Top (`BT:`) (v<MERMAID_RELEASE_VERSION>+)
|
||||
### Bottom to Top (`BT:`) (v11.0.0+)
|
||||
|
||||
In `BT` (**Bottom-to-Top**) orientation, the commits run from bottom to top of the graph and branches are arranged side-by-side.
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Packet Diagram (v<MERMAID_RELEASE_VERSION>+)
|
||||
# Packet Diagram (v11.0.0+)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
@@ -143,18 +143,18 @@ Messages can be of two displayed either solid or with a dotted line.
|
||||
|
||||
There are ten types of arrows currently supported:
|
||||
|
||||
| Type | Description |
|
||||
| -------- | ----------------------------------------------------------------------- |
|
||||
| `->` | Solid line without arrow |
|
||||
| `-->` | Dotted line without arrow |
|
||||
| `->>` | Solid line with arrowhead |
|
||||
| `-->>` | Dotted line with arrowhead |
|
||||
| `<<->>` | Solid line with bidirectional arrowheads (v<MERMAID_RELEASE_VERSION>+) |
|
||||
| `<<-->>` | Dotted line with bidirectional arrowheads (v<MERMAID_RELEASE_VERSION>+) |
|
||||
| `-x` | Solid line with a cross at the end |
|
||||
| `--x` | Dotted line with a cross at the end. |
|
||||
| `-)` | Solid line with an open arrow at the end (async) |
|
||||
| `--)` | Dotted line with a open arrow at the end (async) |
|
||||
| Type | Description |
|
||||
| -------- | ---------------------------------------------------- |
|
||||
| `->` | Solid line without arrow |
|
||||
| `-->` | Dotted line without arrow |
|
||||
| `->>` | Solid line with arrowhead |
|
||||
| `-->>` | Dotted line with arrowhead |
|
||||
| `<<->>` | Solid line with bidirectional arrowheads (v11.0.0+) |
|
||||
| `<<-->>` | Dotted line with bidirectional arrowheads (v11.0.0+) |
|
||||
| `-x` | Solid line with a cross at the end |
|
||||
| `--x` | Dotted line with a cross at the end. |
|
||||
| `-)` | Solid line with an open arrow at the end (async) |
|
||||
| `--)` | Dotted line with a open arrow at the end (async) |
|
||||
|
||||
## Activations
|
||||
|
||||
|
@@ -36,6 +36,7 @@ async function addHtmlSpan(element, node, width, classes, addBackground = false)
|
||||
div.style('white-space', 'nowrap');
|
||||
div.style('line-height', '1.5');
|
||||
div.style('max-width', width + 'px');
|
||||
div.style('text-align', 'center');
|
||||
div.attr('xmlns', 'http://www.w3.org/1999/xhtml');
|
||||
if (addBackground) {
|
||||
div.attr('class', 'labelBkg');
|
||||
|
@@ -19,7 +19,7 @@ const rect = async (parent, node) => {
|
||||
const { themeVariables, handDrawnSeed } = siteConfig;
|
||||
const { clusterBkg, clusterBorder } = themeVariables;
|
||||
|
||||
const { labelStyles, nodeStyles } = styles2String(node);
|
||||
const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);
|
||||
|
||||
// Add outer g element
|
||||
const shapeSvg = parent
|
||||
@@ -79,6 +79,9 @@ const rect = async (parent, node) => {
|
||||
log.debug('Rough node insert CXC', roughNode);
|
||||
return roughNode;
|
||||
}, ':first-child');
|
||||
// Should we affect the options instead of doing this?
|
||||
rect.select('path:nth-child(2)').attr('style', borderStyles.join(';'));
|
||||
rect.select('path').attr('style', backgroundStyles.join(';').replace('fill', 'stroke'));
|
||||
} else {
|
||||
// add the rect
|
||||
rect = shapeSvg.insert('rect', ':first-child');
|
||||
|
@@ -103,7 +103,7 @@ export const cylinder = async (parent: SVGAElement, node: Node) => {
|
||||
Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))
|
||||
) {
|
||||
let y = ry * ry * (1 - (x * x) / (rx * rx));
|
||||
if (y != 0) {
|
||||
if (y > 0) {
|
||||
y = Math.sqrt(y);
|
||||
}
|
||||
y = ry - y;
|
||||
|
@@ -37,6 +37,8 @@ export const styles2String = (node: Node) => {
|
||||
const { stylesArray } = compileStyles(node);
|
||||
const labelStyles: string[] = [];
|
||||
const nodeStyles: string[] = [];
|
||||
const borderStyles: string[] = [];
|
||||
const backgroundStyles: string[] = [];
|
||||
|
||||
stylesArray.forEach((style) => {
|
||||
const key = style[0];
|
||||
@@ -63,10 +65,22 @@ export const styles2String = (node: Node) => {
|
||||
labelStyles.push(style.join(':') + ' !important');
|
||||
} else {
|
||||
nodeStyles.push(style.join(':') + ' !important');
|
||||
if (key.includes('stroke')) {
|
||||
borderStyles.push(style.join(':') + ' !important');
|
||||
}
|
||||
if (key === 'fill') {
|
||||
backgroundStyles.push(style.join(':') + ' !important');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return { labelStyles: labelStyles.join(';'), nodeStyles: nodeStyles.join(';') };
|
||||
return {
|
||||
labelStyles: labelStyles.join(';'),
|
||||
nodeStyles: nodeStyles.join(';'),
|
||||
stylesArray,
|
||||
borderStyles,
|
||||
backgroundStyles,
|
||||
};
|
||||
};
|
||||
|
||||
// Striped fill like start or fork nodes in state diagrams
|
||||
|
@@ -63,7 +63,14 @@ export const question = async (parent: SVGAElement, node: Node): Promise<SVGAEle
|
||||
updateNodeBounds(node, polygon);
|
||||
|
||||
node.intersect = function (point) {
|
||||
log.info('Intersect called SPLIT');
|
||||
log.debug(
|
||||
'APA12 Intersect called SPLIT\npoint:',
|
||||
point,
|
||||
'\nnode:\n',
|
||||
node,
|
||||
'\nres:',
|
||||
intersect.polygon(node, points, point)
|
||||
);
|
||||
return intersect.polygon(node, points, point);
|
||||
};
|
||||
|
||||
|
@@ -62,13 +62,13 @@ export const rectWithTitle = async (parent: SVGElement, node: Node) => {
|
||||
)
|
||||
);
|
||||
|
||||
if (evaluate(getConfig()?.flowchart?.htmlLabels)) {
|
||||
const div = descr.children[0];
|
||||
const dv = select(descr);
|
||||
bbox = div.getBoundingClientRect();
|
||||
dv.attr('width', bbox.width);
|
||||
dv.attr('height', bbox.height);
|
||||
}
|
||||
//if (evaluate(getConfig()?.flowchart?.htmlLabels)) {
|
||||
const div = descr.children[0];
|
||||
const dv = select(descr);
|
||||
bbox = div.getBoundingClientRect();
|
||||
dv.attr('width', bbox.width);
|
||||
dv.attr('height', bbox.height);
|
||||
// }
|
||||
|
||||
const halfPadding = (node.padding || 0) / 2;
|
||||
select(descr).attr(
|
||||
|
@@ -22,7 +22,7 @@ export const setupViewPortForSVG = (
|
||||
svg.attr('viewBox', viewBox);
|
||||
|
||||
// Log the viewBox configuration for debugging
|
||||
log.debug(`viewBox configured: ${viewBox}`);
|
||||
log.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);
|
||||
};
|
||||
|
||||
const calculateDimensionsWithPadding = (svg: SVG, padding: number) => {
|
||||
|
13
packages/parser/CHANGELOG.md
Normal file
13
packages/parser/CHANGELOG.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# @mermaid-js/parser
|
||||
|
||||
## 0.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#5746](https://github.com/mermaid-js/mermaid/pull/5746) [`83926c9`](https://github.com/mermaid-js/mermaid/commit/83926c9707b09c34e300888186250191ee8ae30a) Thanks [@sidharthv96](https://github.com/sidharthv96)! - test changeset
|
||||
|
||||
## 0.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#5744](https://github.com/mermaid-js/mermaid/pull/5744) [`5013484`](https://github.com/mermaid-js/mermaid/commit/50134849246141ec400e33e08c12c10539b84de9) Thanks [@sidharthv96](https://github.com/sidharthv96)! - Release parser, test changesets
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mermaid-js/parser",
|
||||
"version": "0.1.0-rc.2",
|
||||
"version": "0.1.1",
|
||||
"description": "MermaidJS parser",
|
||||
"author": "Yokozuna59",
|
||||
"contributors": [
|
||||
|
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -415,13 +415,13 @@ importers:
|
||||
elkjs:
|
||||
specifier: ^0.9.3
|
||||
version: 0.9.3
|
||||
mermaid:
|
||||
specifier: workspace:^
|
||||
version: link:../mermaid
|
||||
devDependencies:
|
||||
'@types/d3':
|
||||
specifier: ^7.4.3
|
||||
version: 7.4.3
|
||||
mermaid:
|
||||
specifier: workspace:^
|
||||
version: link:../mermaid
|
||||
|
||||
packages/mermaid-zenuml:
|
||||
dependencies:
|
||||
|
Reference in New Issue
Block a user