Merge branch '5237-unified-layout-common-renderer' of github.com:mermaid-js/mermaid into alanaV11

This commit is contained in:
Knut Sveidqvist
2024-05-24 17:01:29 +02:00
parent 2ba93dd30d
commit be604703aa
13 changed files with 11105 additions and 9007 deletions

View File

@@ -5,4 +5,5 @@ git remote add os_repo git@github.com:mermaid-js/mermaid.git
git pull os_repo main
git pull os_repo
git pull os_repo master
git pull os_repo 5237-unified-layout-common-renderer
```

View File

@@ -44,7 +44,7 @@
},
"devDependencies": {
"concurrently": "^8.2.2",
"mermaid": "workspace:*",
"@mermaid-chart/mermaid": "workspace:*",
"rimraf": "^5.0.5"
},
"files": [

View File

@@ -36,7 +36,7 @@
},
"devDependencies": {
"concurrently": "^8.2.2",
"mermaid": "workspace:^",
"@mermaid-chart/mermaid": "workspace:^",
"rimraf": "^5.0.5"
},
"files": [

View File

@@ -35,7 +35,7 @@
"d3": "^7.9.0"
},
"peerDependencies": {
"mermaid": "workspace:^"
"@mermaid-chart/mermaid": "workspace:^"
},
"files": [
"dist"

View File

@@ -1,7 +1,7 @@
// @ts-nocheck File not ready to check types
import { curveLinear } from 'd3';
import ELK from 'elkjs/lib/elk.bundled.js';
import mermaid from 'mermaid';
import mermaid from '@mermaid-chart/mermaid';
import { findCommonAncestor } from './find-common-ancestor.js';
import config from '../../mermaid/src/defaultConfig';

View File

@@ -37,10 +37,10 @@
"@zenuml/core": "^3.19.2"
},
"devDependencies": {
"mermaid": "workspace:^"
"@mermaid-chart/mermaid": "workspace:^"
},
"peerDependencies": {
"mermaid": "workspace:>=10.0.0"
"@mermaid-chart/mermaid": "workspace:>=10.0.0"
},
"files": [
"dist"

View File

@@ -19,7 +19,7 @@
"@vueuse/core": "^10.9.0",
"font-awesome": "^4.7.0",
"jiti": "^1.21.0",
"mermaid": "workspace:^",
"@mermaid-chart/mermaid": "workspace:^",
"vue": "^3.4.21"
},
"devDependencies": {

View File

@@ -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-beta.1+)
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`.

View File

@@ -571,7 +571,7 @@ Usage example:
commit
```
### Bottom to Top (`BT:`) (v<MERMAID_RELEASE_VERSION>+)
### Bottom to Top (`BT:`) (v11.0.0-beta.1+)
In `BT` (**Bottom-to-Top**) orientation, the commits run from bottom to top of the graph and branches are arranged side-by-side.

View File

@@ -1,4 +1,4 @@
# Packet Diagram (v<MERMAID_RELEASE_VERSION>+)
# Packet Diagram (v11.0.0-beta.1+)
## Introduction

View File

@@ -691,24 +691,24 @@ describe('mermaidAPI', () => {
mermaidAPI.parse('this is not a mermaid diagram definition', { suppressErrors: true })
).resolves.toBe(false);
});
it('resolves for valid definition', async () => {
await expect(mermaidAPI.parse('graph TD;A--x|text including URL space|B;')).resolves
.toMatchInlineSnapshot(`
{
"diagramType": "flowchart-v2",
}
`);
});
// it('resolves for valid definition', async () => {
// await expect(mermaidAPI.parse('graph TD;A--x|text including URL space|B;')).resolves
// .toMatchInlineSnapshot(`
// {
// "diagramType": "flowchart-v2",
// }
// `);
// });
it('returns true for valid definition with silent option', async () => {
await expect(
mermaidAPI.parse('graph TD;A--x|text including URL space|B;', { suppressErrors: true })
).resolves.toMatchInlineSnapshot(`
{
"diagramType": "flowchart-v2",
}
`);
});
// it('returns true for valid definition with silent option', async () => {
// await expect(
// mermaidAPI.parse('graph TD;A--x|text including URL space|B;', { suppressErrors: true })
// ).resolves.toMatchInlineSnapshot(`
// {
// "diagramType": "flowchart-v2",
// }
// `);
// });
});
describe('render', () => {

20055
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -18,6 +18,6 @@
},
"dependencies": {
"@mermaid-js/mermaid-example-diagram": "workspace:*",
"mermaid": "workspace:*"
"@mermaid-chart/mermaid": "workspace:*"
}
}