mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Merge branch 'develop' into bug/#4497_unable-to-cherrypick-merge-commit
This commit is contained in:
commit
d65191f6c1
14
CHANGELOG.md
14
CHANGELOG.md
@ -68,7 +68,7 @@ try {
|
|||||||
|
|
||||||
### Init deprecated and InitThrowsErrors removed
|
### Init deprecated and InitThrowsErrors removed
|
||||||
|
|
||||||
The config passed to `init` was not being used eariler.
|
The config passed to `init` was not being used earlier.
|
||||||
It will now be used.
|
It will now be used.
|
||||||
The `init` function is deprecated and will be removed in the next major release.
|
The `init` function is deprecated and will be removed in the next major release.
|
||||||
init currently works as a wrapper to `initialize` and `run`.
|
init currently works as a wrapper to `initialize` and `run`.
|
||||||
@ -195,7 +195,7 @@ mermaid.run({
|
|||||||
- "Cannot activate" in sequenceDiagram [\#647](https://github.com/knsv/mermaid/issues/647)
|
- "Cannot activate" in sequenceDiagram [\#647](https://github.com/knsv/mermaid/issues/647)
|
||||||
- Link \("click" statement\) in flowchart does not work in exported SVG [\#646](https://github.com/knsv/mermaid/issues/646)
|
- Link \("click" statement\) in flowchart does not work in exported SVG [\#646](https://github.com/knsv/mermaid/issues/646)
|
||||||
- How to pass styling [\#639](https://github.com/knsv/mermaid/issues/639)
|
- How to pass styling [\#639](https://github.com/knsv/mermaid/issues/639)
|
||||||
- The live editor cant show seq diagram with notes for 8.0.0-alpha.3 [\#638](https://github.com/knsv/mermaid/issues/638)
|
- The live editor can't show seq diagram with notes for 8.0.0-alpha.3 [\#638](https://github.com/knsv/mermaid/issues/638)
|
||||||
- import mermaid.css with ES6 + NPM [\#634](https://github.com/knsv/mermaid/issues/634)
|
- import mermaid.css with ES6 + NPM [\#634](https://github.com/knsv/mermaid/issues/634)
|
||||||
- Actor line cuts through other elements [\#633](https://github.com/knsv/mermaid/issues/633)
|
- Actor line cuts through other elements [\#633](https://github.com/knsv/mermaid/issues/633)
|
||||||
- Graph TD line out of the picture \(left side\) [\#630](https://github.com/knsv/mermaid/issues/630)
|
- Graph TD line out of the picture \(left side\) [\#630](https://github.com/knsv/mermaid/issues/630)
|
||||||
@ -504,7 +504,7 @@ mermaid.run({
|
|||||||
|
|
||||||
- Docs css: code hard to read [\#324](https://github.com/knsv/mermaid/issues/324)
|
- Docs css: code hard to read [\#324](https://github.com/knsv/mermaid/issues/324)
|
||||||
- About Markpad integration [\#323](https://github.com/knsv/mermaid/issues/323)
|
- About Markpad integration [\#323](https://github.com/knsv/mermaid/issues/323)
|
||||||
- How to link backwords in flowchat? [\#321](https://github.com/knsv/mermaid/issues/321)
|
- How to link backwards in flowchat? [\#321](https://github.com/knsv/mermaid/issues/321)
|
||||||
- Help with editor [\#310](https://github.com/knsv/mermaid/issues/310)
|
- Help with editor [\#310](https://github.com/knsv/mermaid/issues/310)
|
||||||
- +1 [\#293](https://github.com/knsv/mermaid/issues/293)
|
- +1 [\#293](https://github.com/knsv/mermaid/issues/293)
|
||||||
- Basic chart does not render on Chome, but does in Firefox [\#290](https://github.com/knsv/mermaid/issues/290)
|
- Basic chart does not render on Chome, but does in Firefox [\#290](https://github.com/knsv/mermaid/issues/290)
|
||||||
@ -619,7 +619,7 @@ mermaid.run({
|
|||||||
- render to png from the cli does not display the marker-end arrow heads [\#181](https://github.com/knsv/mermaid/issues/181)
|
- render to png from the cli does not display the marker-end arrow heads [\#181](https://github.com/knsv/mermaid/issues/181)
|
||||||
- Links in sequence diagrams [\#159](https://github.com/knsv/mermaid/issues/159)
|
- Links in sequence diagrams [\#159](https://github.com/knsv/mermaid/issues/159)
|
||||||
- comment characters `%%` cause parse error [\#141](https://github.com/knsv/mermaid/issues/141)
|
- comment characters `%%` cause parse error [\#141](https://github.com/knsv/mermaid/issues/141)
|
||||||
- Add a reversed assymetric shape [\#124](https://github.com/knsv/mermaid/issues/124)
|
- Add a reversed asymmetric shape [\#124](https://github.com/knsv/mermaid/issues/124)
|
||||||
- Add syntax for double headed arrows [\#123](https://github.com/knsv/mermaid/issues/123)
|
- Add syntax for double headed arrows [\#123](https://github.com/knsv/mermaid/issues/123)
|
||||||
- Support for font-awesome [\#49](https://github.com/knsv/mermaid/issues/49)
|
- Support for font-awesome [\#49](https://github.com/knsv/mermaid/issues/49)
|
||||||
|
|
||||||
@ -659,7 +659,7 @@ mermaid.run({
|
|||||||
- Auto linewrap for notes in sequence diagrams [\#178](https://github.com/knsv/mermaid/issues/178)
|
- Auto linewrap for notes in sequence diagrams [\#178](https://github.com/knsv/mermaid/issues/178)
|
||||||
- Execute code after initialize [\#176](https://github.com/knsv/mermaid/issues/176)
|
- Execute code after initialize [\#176](https://github.com/knsv/mermaid/issues/176)
|
||||||
- Autoscaling for all diagram types [\#175](https://github.com/knsv/mermaid/issues/175)
|
- Autoscaling for all diagram types [\#175](https://github.com/knsv/mermaid/issues/175)
|
||||||
- Problem wit click event callback [\#174](https://github.com/knsv/mermaid/issues/174)
|
- Problem with click event callback [\#174](https://github.com/knsv/mermaid/issues/174)
|
||||||
- How to escape characters? [\#170](https://github.com/knsv/mermaid/issues/170)
|
- How to escape characters? [\#170](https://github.com/knsv/mermaid/issues/170)
|
||||||
- it can not work [\#167](https://github.com/knsv/mermaid/issues/167)
|
- it can not work [\#167](https://github.com/knsv/mermaid/issues/167)
|
||||||
- UML Class diagram [\#154](https://github.com/knsv/mermaid/issues/154)
|
- UML Class diagram [\#154](https://github.com/knsv/mermaid/issues/154)
|
||||||
@ -762,7 +762,7 @@ mermaid.run({
|
|||||||
- subgraph background is black in rendered flowchart PNG via CLI [\#121](https://github.com/knsv/mermaid/issues/121)
|
- subgraph background is black in rendered flowchart PNG via CLI [\#121](https://github.com/knsv/mermaid/issues/121)
|
||||||
- Integrate editor at https://github.com/naseer/mermaid-webapp [\#110](https://github.com/knsv/mermaid/issues/110)
|
- Integrate editor at https://github.com/naseer/mermaid-webapp [\#110](https://github.com/knsv/mermaid/issues/110)
|
||||||
- Internet Explorer Support [\#99](https://github.com/knsv/mermaid/issues/99)
|
- Internet Explorer Support [\#99](https://github.com/knsv/mermaid/issues/99)
|
||||||
- Assymetric shapes not documented [\#82](https://github.com/knsv/mermaid/issues/82)
|
- Asymmetric shapes not documented [\#82](https://github.com/knsv/mermaid/issues/82)
|
||||||
- NoModificationAllowedError [\#23](https://github.com/knsv/mermaid/issues/23)
|
- NoModificationAllowedError [\#23](https://github.com/knsv/mermaid/issues/23)
|
||||||
- Improve arrows [\#3](https://github.com/knsv/mermaid/issues/3)
|
- Improve arrows [\#3](https://github.com/knsv/mermaid/issues/3)
|
||||||
|
|
||||||
@ -908,7 +908,7 @@ mermaid.run({
|
|||||||
|
|
||||||
- Question marks don't render properly with /dist/mermaid.full.min.js [\#30](https://github.com/knsv/mermaid/issues/30)
|
- Question marks don't render properly with /dist/mermaid.full.min.js [\#30](https://github.com/knsv/mermaid/issues/30)
|
||||||
- Error with some characters [\#25](https://github.com/knsv/mermaid/issues/25)
|
- Error with some characters [\#25](https://github.com/knsv/mermaid/issues/25)
|
||||||
- Provide parse function in browser widthout `require`? [\#21](https://github.com/knsv/mermaid/issues/21)
|
- Provide parse function in browser without `require`? [\#21](https://github.com/knsv/mermaid/issues/21)
|
||||||
- Better label text support [\#18](https://github.com/knsv/mermaid/issues/18)
|
- Better label text support [\#18](https://github.com/knsv/mermaid/issues/18)
|
||||||
- Cap-cased words break parser [\#8](https://github.com/knsv/mermaid/issues/8)
|
- Cap-cased words break parser [\#8](https://github.com/knsv/mermaid/issues/8)
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ describe('Git Graph diagram', () => {
|
|||||||
`gitGraph
|
`gitGraph
|
||||||
commit id: "Normal Commit"
|
commit id: "Normal Commit"
|
||||||
commit id: "Reverse Commit" type: REVERSE
|
commit id: "Reverse Commit" type: REVERSE
|
||||||
commit id: "Hightlight Commit" type: HIGHLIGHT
|
commit id: "Highlight Commit" type: HIGHLIGHT
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
@ -36,7 +36,7 @@ describe('Git Graph diagram', () => {
|
|||||||
`gitGraph
|
`gitGraph
|
||||||
commit id: "Normal Commit with tag" tag: "v1.0.0"
|
commit id: "Normal Commit with tag" tag: "v1.0.0"
|
||||||
commit id: "Reverse Commit with tag" type: REVERSE tag: "RC_1"
|
commit id: "Reverse Commit with tag" type: REVERSE tag: "RC_1"
|
||||||
commit id: "Hightlight Commit" type: HIGHLIGHT tag: "8.8.4"
|
commit id: "Highlight Commit" type: HIGHLIGHT tag: "8.8.4"
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
@ -102,7 +102,7 @@ describe('Git Graph diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('8: should render a simple gitgraph with more than 8 branchs & overriding variables', () => {
|
it('8: should render a simple gitgraph with more than 8 branches & overriding variables', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': {
|
`%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': {
|
||||||
'gitBranchLabel0': '#ffffff',
|
'gitBranchLabel0': '#ffffff',
|
||||||
@ -358,7 +358,7 @@ gitGraph
|
|||||||
`gitGraph TB:
|
`gitGraph TB:
|
||||||
commit id: "Normal Commit"
|
commit id: "Normal Commit"
|
||||||
commit id: "Reverse Commit" type: REVERSE
|
commit id: "Reverse Commit" type: REVERSE
|
||||||
commit id: "Hightlight Commit" type: HIGHLIGHT
|
commit id: "Highlight Commit" type: HIGHLIGHT
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
@ -368,7 +368,7 @@ gitGraph
|
|||||||
`gitGraph TB:
|
`gitGraph TB:
|
||||||
commit id: "Normal Commit with tag" tag: "v1.0.0"
|
commit id: "Normal Commit with tag" tag: "v1.0.0"
|
||||||
commit id: "Reverse Commit with tag" type: REVERSE tag: "RC_1"
|
commit id: "Reverse Commit with tag" type: REVERSE tag: "RC_1"
|
||||||
commit id: "Hightlight Commit" type: HIGHLIGHT tag: "8.8.4"
|
commit id: "Highlight Commit" type: HIGHLIGHT tag: "8.8.4"
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
@ -434,7 +434,7 @@ gitGraph
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('22: should render a simple gitgraph with more than 8 branchs & overriding variables | Vertical Branch', () => {
|
it('22: should render a simple gitgraph with more than 8 branches & overriding variables | Vertical Branch', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': {
|
`%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': {
|
||||||
'gitBranchLabel0': '#ffffff',
|
'gitBranchLabel0': '#ffffff',
|
||||||
|
@ -57,7 +57,7 @@ describe('Timeline diagram', () => {
|
|||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('5: should render a simple timeline with directive overriden colors', () => {
|
it('5: should render a simple timeline with directive overridden colors', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
` %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': {
|
` %%{init: { 'logLevel': 'debug', 'theme': 'default' , 'themeVariables': {
|
||||||
'cScale0': '#ff0000',
|
'cScale0': '#ff0000',
|
||||||
|
@ -173,7 +173,7 @@
|
|||||||
Container(mobile, "Mobile App", "Xamarin", "Provides a limited subset of the Internet Banking functionality to customers via their mobile device.")
|
Container(mobile, "Mobile App", "Xamarin", "Provides a limited subset of the Internet Banking functionality to customers via their mobile device.")
|
||||||
}
|
}
|
||||||
|
|
||||||
Deployment_Node(comp, "Customer's computer", "Mircosoft Windows or Apple macOS"){
|
Deployment_Node(comp, "Customer's computer", "Microsoft Windows or Apple macOS"){
|
||||||
Deployment_Node(browser, "Web Browser", "Google Chrome, Mozilla Firefox,<br/> Apple Safari or Microsoft Edge"){
|
Deployment_Node(browser, "Web Browser", "Google Chrome, Mozilla Firefox,<br/> Apple Safari or Microsoft Edge"){
|
||||||
Container(spa, "Single Page Application", "JavaScript and Angular", "Provides all of the Internet Banking functionality to customers via their web browser.")
|
Container(spa, "Single Page Application", "JavaScript and Angular", "Provides all of the Internet Banking functionality to customers via their web browser.")
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
---
|
---
|
||||||
graph LR
|
graph LR
|
||||||
accTitle: This is a complicated flow
|
accTitle: This is a complicated flow
|
||||||
accDescr: This is the descriptoin for the complicated flow.
|
accDescr: This is the description for the complicated flow.
|
||||||
|
|
||||||
sid-B3655226-6C29-4D00-B685-3D5C734DC7E1["
|
sid-B3655226-6C29-4D00-B685-3D5C734DC7E1["
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<h1>Requirement diagram demos</h1>
|
<h1>Requirement diagram demos</h1>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
requirementDiagram
|
requirementDiagram
|
||||||
accTitle: Requirments demo in black and white
|
accTitle: Requirements demo in black and white
|
||||||
accDescr: A series of requirement boxes showing relationships among them. Has meaningless task names
|
accDescr: A series of requirement boxes showing relationships among them. Has meaningless task names
|
||||||
|
|
||||||
requirement test_req {
|
requirement test_req {
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
</pre>
|
</pre>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<h2>Compsite states can link to themselves</h2>
|
<h2>Composite states can link to themselves</h2>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
stateDiagram-v2
|
stateDiagram-v2
|
||||||
state Active {
|
state Active {
|
||||||
@ -199,7 +199,7 @@
|
|||||||
stateDiagram-v2
|
stateDiagram-v2
|
||||||
[*] --> S1
|
[*] --> S1
|
||||||
S1 --> S2: This long line uses a br tag<br />to create multiple<br />lines.
|
S1 --> S2: This long line uses a br tag<br />to create multiple<br />lines.
|
||||||
S1 --> S3: This transition descripton uses \na newline character\nto create multiple\nlines.
|
S1 --> S3: This transition description uses \na newline character\nto create multiple\nlines.
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
version: '3.9'
|
version: '3.9'
|
||||||
services:
|
services:
|
||||||
mermaid:
|
mermaid:
|
||||||
image: node:18.18.0-alpine3.18
|
image: node:18.18.2-alpine3.18
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
working_dir: /mermaid
|
working_dir: /mermaid
|
||||||
|
@ -97,7 +97,7 @@ See [the accTitle and accDescr usage examples](#acctitle-and-accdescr-usage-exam
|
|||||||
graph LR
|
graph LR
|
||||||
accTitle: Big Decisions
|
accTitle: Big Decisions
|
||||||
accDescr: Bob's Burgers process for making big decisions
|
accDescr: Bob's Burgers process for making big decisions
|
||||||
A[Identify Big Descision] --> B{Make Big Decision}
|
A[Identify Big Decision] --> B{Make Big Decision}
|
||||||
B --> D[Be done]
|
B --> D[Be done]
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ See [the accTitle and accDescr usage examples](#acctitle-and-accdescr-usage-exam
|
|||||||
graph LR
|
graph LR
|
||||||
accTitle: Big Decisions
|
accTitle: Big Decisions
|
||||||
accDescr: Bob's Burgers process for making big decisions
|
accDescr: Bob's Burgers process for making big decisions
|
||||||
A[Identify Big Descision] --> B{Make Big Decision}
|
A[Identify Big Decision] --> B{Make Big Decision}
|
||||||
B --> D[Be done]
|
B --> D[Be done]
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr
|
|||||||
for making very, very big decisions.
|
for making very, very big decisions.
|
||||||
This is actually a very simple flow: identify the big decision and then make the big decision.
|
This is actually a very simple flow: identify the big decision and then make the big decision.
|
||||||
}
|
}
|
||||||
A[Identify Big Descision] --> B{Make Big Decision}
|
A[Identify Big Decision] --> B{Make Big Decision}
|
||||||
B --> D[Be done]
|
B --> D[Be done]
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr
|
|||||||
for making very, very big decisions.
|
for making very, very big decisions.
|
||||||
This is actually a very simple flow: identify the big decision and then make the big decision.
|
This is actually a very simple flow: identify the big decision and then make the big decision.
|
||||||
}
|
}
|
||||||
A[Identify Big Descision] --> B{Make Big Decision}
|
A[Identify Big Decision] --> B{Make Big Decision}
|
||||||
B --> D[Be done]
|
B --> D[Be done]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ flowchart LR
|
|||||||
end
|
end
|
||||||
%% ^ These subgraphs are identical, except for the links to them:
|
%% ^ These subgraphs are identical, except for the links to them:
|
||||||
|
|
||||||
%% Link *to* subgraph1: subgraph1 direction is mantained
|
%% Link *to* subgraph1: subgraph1 direction is maintained
|
||||||
outside --> subgraph1
|
outside --> subgraph1
|
||||||
%% Link *within* subgraph2:
|
%% Link *within* subgraph2:
|
||||||
%% subgraph2 inherits the direction of the top-level graph (LR)
|
%% subgraph2 inherits the direction of the top-level graph (LR)
|
||||||
@ -783,7 +783,7 @@ flowchart LR
|
|||||||
end
|
end
|
||||||
%% ^ These subgraphs are identical, except for the links to them:
|
%% ^ These subgraphs are identical, except for the links to them:
|
||||||
|
|
||||||
%% Link *to* subgraph1: subgraph1 direction is mantained
|
%% Link *to* subgraph1: subgraph1 direction is maintained
|
||||||
outside --> subgraph1
|
outside --> subgraph1
|
||||||
%% Link *within* subgraph2:
|
%% Link *within* subgraph2:
|
||||||
%% subgraph2 inherits the direction of the top-level graph (LR)
|
%% subgraph2 inherits the direction of the top-level graph (LR)
|
||||||
@ -1112,7 +1112,7 @@ flowchart TD
|
|||||||
B-->E(A fa:fa-camera-retro perhaps?)
|
B-->E(A fa:fa-camera-retro perhaps?)
|
||||||
```
|
```
|
||||||
|
|
||||||
Mermaid is compatible with Font Awesome up to verion 5, Free icons only. Check that the icons you use are from the [supported set of icons](https://fontawesome.com/v5/search?o=r&m=free).
|
Mermaid is compatible with Font Awesome up to version 5, Free icons only. Check that the icons you use are from the [supported set of icons](https://fontawesome.com/v5/search?o=r&m=free).
|
||||||
|
|
||||||
## Graph declarations with spaces between vertices and link and without semicolon
|
## Graph declarations with spaces between vertices and link and without semicolon
|
||||||
|
|
||||||
|
@ -102,26 +102,26 @@ Points are used to plot a circle inside the quadrantChart. The syntax is `<text>
|
|||||||
|
|
||||||
## Chart Configurations
|
## Chart Configurations
|
||||||
|
|
||||||
| Parameter | Description | Default value |
|
| Parameter | Description | Default value |
|
||||||
| --------------------------------- | ------------------------------------------------------------------------------------------------- | :-----------: |
|
| --------------------------------- | -------------------------------------------------------------------------------------------------- | :-----------: |
|
||||||
| chartWidth | Width of the chart | 500 |
|
| chartWidth | Width of the chart | 500 |
|
||||||
| chartHeight | Height of the chart | 500 |
|
| chartHeight | Height of the chart | 500 |
|
||||||
| titlePadding | Top and Bottom padding of the title | 10 |
|
| titlePadding | Top and Bottom padding of the title | 10 |
|
||||||
| titleFontSize | Title font size | 20 |
|
| titleFontSize | Title font size | 20 |
|
||||||
| quadrantPadding | Padding outside all the quadrants | 5 |
|
| quadrantPadding | Padding outside all the quadrants | 5 |
|
||||||
| quadrantTextTopPadding | Quadrant text top padding when text is drawn on top ( not data points are there) | 5 |
|
| quadrantTextTopPadding | Quadrant text top padding when text is drawn on top ( not data points are there) | 5 |
|
||||||
| quadrantLabelFontSize | Quadrant text font size | 16 |
|
| quadrantLabelFontSize | Quadrant text font size | 16 |
|
||||||
| quadrantInternalBorderStrokeWidth | Border stroke width inside the quadrants | 1 |
|
| quadrantInternalBorderStrokeWidth | Border stroke width inside the quadrants | 1 |
|
||||||
| quadrantExternalBorderStrokeWidth | Quadrant external border stroke width | 2 |
|
| quadrantExternalBorderStrokeWidth | Quadrant external border stroke width | 2 |
|
||||||
| xAxisLabelPadding | Top and bottom padding of x-axis text | 5 |
|
| xAxisLabelPadding | Top and bottom padding of x-axis text | 5 |
|
||||||
| xAxisLabelFontSize | X-axis texts font size | 16 |
|
| xAxisLabelFontSize | X-axis texts font size | 16 |
|
||||||
| xAxisPosition | Position of x-axis (top , bottom) if there are points the x-axis will alway be rendered in bottom | 'top' |
|
| xAxisPosition | Position of x-axis (top , bottom) if there are points the x-axis will always be rendered in bottom | 'top' |
|
||||||
| yAxisLabelPadding | Left and Right padding of y-axis text | 5 |
|
| yAxisLabelPadding | Left and Right padding of y-axis text | 5 |
|
||||||
| yAxisLabelFontSize | Y-axis texts font size | 16 |
|
| yAxisLabelFontSize | Y-axis texts font size | 16 |
|
||||||
| yAxisPosition | Position of y-axis (left , right) | 'left' |
|
| yAxisPosition | Position of y-axis (left , right) | 'left' |
|
||||||
| pointTextPadding | Padding between point and the below text | 5 |
|
| pointTextPadding | Padding between point and the below text | 5 |
|
||||||
| pointLabelFontSize | Point text font size | 12 |
|
| pointLabelFontSize | Point text font size | 12 |
|
||||||
| pointRadius | Radius of the point to be drawn | 5 |
|
| pointRadius | Radius of the point to be drawn | 5 |
|
||||||
|
|
||||||
## Chart Theme Variables
|
## Chart Theme Variables
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ Note that there are no sections defined, and each time period and its correspond
|
|||||||
|
|
||||||
2. Disable the multiColor option using the `disableMultiColor` option. This will make all time periods and events follow the same color scheme.
|
2. Disable the multiColor option using the `disableMultiColor` option. This will make all time periods and events follow the same color scheme.
|
||||||
|
|
||||||
You will need to add this option either via mermaid.intialize function or directives.
|
You will need to add this option either via mermaid.initialize function or directives.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"version": "10.2.4",
|
"version": "10.2.4",
|
||||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@8.9.0",
|
"packageManager": "pnpm@8.9.2",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"diagram",
|
"diagram",
|
||||||
"markdown",
|
"markdown",
|
||||||
@ -123,7 +123,7 @@
|
|||||||
"vitest": "^0.34.0"
|
"vitest": "^0.34.0"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "18.18.0"
|
"node": "18.18.2"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"report-dir": "coverage/cypress"
|
"report-dir": "coverage/cypress"
|
||||||
|
@ -3,7 +3,7 @@ import { log } from '../logger.js';
|
|||||||
import createLabel from './createLabel.js';
|
import createLabel from './createLabel.js';
|
||||||
import { createText } from '../rendering-util/createText.js';
|
import { createText } from '../rendering-util/createText.js';
|
||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { getConfig } from '../config.js';
|
import { getConfig } from '../diagram-api/diagramAPI.js';
|
||||||
import { evaluate } from '../diagrams/common/common.js';
|
import { evaluate } from '../diagrams/common/common.js';
|
||||||
|
|
||||||
const rect = (parent, node) => {
|
const rect = (parent, node) => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { log } from '../logger.js';
|
import { log } from '../logger.js';
|
||||||
import { getConfig } from '../config.js';
|
import { getConfig } from '../diagram-api/diagramAPI.js';
|
||||||
import { evaluate } from '../diagrams/common/common.js';
|
import { evaluate } from '../diagrams/common/common.js';
|
||||||
import { decodeEntities } from '../mermaidAPI.js';
|
import { decodeEntities } from '../mermaidAPI.js';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { log } from '../logger.js';
|
|||||||
import createLabel from './createLabel.js';
|
import createLabel from './createLabel.js';
|
||||||
import { createText } from '../rendering-util/createText.js';
|
import { createText } from '../rendering-util/createText.js';
|
||||||
import { line, curveBasis, select } from 'd3';
|
import { line, curveBasis, select } from 'd3';
|
||||||
import { getConfig } from '../config.js';
|
import { getConfig } from '../diagram-api/diagramAPI.js';
|
||||||
import utils from '../utils.js';
|
import utils from '../utils.js';
|
||||||
import { evaluate } from '../diagrams/common/common.js';
|
import { evaluate } from '../diagrams/common/common.js';
|
||||||
import { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js';
|
import { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js';
|
||||||
|
@ -231,12 +231,12 @@ export const adjustClustersAndEdges = (graph, depth) => {
|
|||||||
if (children.length > 0) {
|
if (children.length > 0) {
|
||||||
log.debug('Cluster identified', id, descendants);
|
log.debug('Cluster identified', id, descendants);
|
||||||
edges.forEach((edge) => {
|
edges.forEach((edge) => {
|
||||||
// log.debug('Edge, decendants: ', edge, decendants[id]);
|
// log.debug('Edge, descendants: ', edge, descendants[id]);
|
||||||
|
|
||||||
// Check if any edge leaves the cluster (not the actual cluster, that's a link from the box)
|
// Check if any edge leaves the cluster (not the actual cluster, that's a link from the box)
|
||||||
if (edge.v !== id && edge.w !== id) {
|
if (edge.v !== id && edge.w !== id) {
|
||||||
// Any edge where either the one of the nodes is descending to the cluster but not the other
|
// Any edge where either the one of the nodes is descending to the cluster but not the other
|
||||||
// if (decendants[id].indexOf(edge.v) < 0 && decendants[id].indexOf(edge.w) < 0) {
|
// if (descendants[id].indexOf(edge.v) < 0 && descendants[id].indexOf(edge.w) < 0) {
|
||||||
|
|
||||||
const d1 = isDescendant(edge.v, id);
|
const d1 = isDescendant(edge.v, id);
|
||||||
const d2 = isDescendant(edge.w, id);
|
const d2 = isDescendant(edge.w, id);
|
||||||
|
@ -419,7 +419,7 @@ describe('extractDescendants', function () {
|
|||||||
return {};
|
return {};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('Simple case of one level decendants GLB9', function () {
|
it('Simple case of one level descendants GLB9', function () {
|
||||||
/*
|
/*
|
||||||
subgraph A
|
subgraph A
|
||||||
a
|
a
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { log } from '../logger.js';
|
import { log } from '../logger.js';
|
||||||
import { labelHelper, updateNodeBounds, insertPolygonShape } from './shapes/util.js';
|
import { labelHelper, updateNodeBounds, insertPolygonShape } from './shapes/util.js';
|
||||||
import { getConfig } from '../config.js';
|
import { getConfig } from '../diagram-api/diagramAPI.js';
|
||||||
import intersect from './intersect/index.js';
|
import intersect from './intersect/index.js';
|
||||||
import createLabel from './createLabel.js';
|
import createLabel from './createLabel.js';
|
||||||
import note from './shapes/note.js';
|
import note from './shapes/note.js';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { updateNodeBounds, labelHelper } from './util.js';
|
import { updateNodeBounds, labelHelper } from './util.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
|
||||||
const note = async (parent, node) => {
|
const note = async (parent, node) => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import createLabel from '../createLabel.js';
|
import createLabel from '../createLabel.js';
|
||||||
import { createText } from '../../rendering-util/createText.js';
|
import { createText } from '../../rendering-util/createText.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { decodeEntities } from '../../mermaidAPI.js';
|
import { decodeEntities } from '../../mermaidAPI.js';
|
||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { evaluate, sanitizeText } from '../../diagrams/common/common.js';
|
import { evaluate, sanitizeText } from '../../diagrams/common/common.js';
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { addDetector } from './detectType.js';
|
import { addDetector } from './detectType.js';
|
||||||
import { log as _log, setLogLevel as _setLogLevel } from '../logger.js';
|
import { log as _log, setLogLevel as _setLogLevel } from '../logger.js';
|
||||||
import { getConfig as _getConfig } from '../config.js';
|
import {
|
||||||
|
getConfig as _getConfig,
|
||||||
|
setConfig as _setConfig,
|
||||||
|
defaultConfig as _defaultConfig,
|
||||||
|
setSiteConfig as _setSiteConfig,
|
||||||
|
} from '../config.js';
|
||||||
import { sanitizeText as _sanitizeText } from '../diagrams/common/common.js';
|
import { sanitizeText as _sanitizeText } from '../diagrams/common/common.js';
|
||||||
import { setupGraphViewbox as _setupGraphViewbox } from '../setupGraphViewbox.js';
|
import { setupGraphViewbox as _setupGraphViewbox } from '../setupGraphViewbox.js';
|
||||||
import { addStylesForDiagram } from '../styles.js';
|
import { addStylesForDiagram } from '../styles.js';
|
||||||
@ -15,6 +20,9 @@ import * as _commonDb from '../diagrams/common/commonDb.js';
|
|||||||
export const log = _log;
|
export const log = _log;
|
||||||
export const setLogLevel = _setLogLevel;
|
export const setLogLevel = _setLogLevel;
|
||||||
export const getConfig = _getConfig;
|
export const getConfig = _getConfig;
|
||||||
|
export const setConfig = _setConfig;
|
||||||
|
export const defaultConfig = _defaultConfig;
|
||||||
|
export const setSiteConfig = _setSiteConfig;
|
||||||
export const sanitizeText = (text: string) => _sanitizeText(text, getConfig());
|
export const sanitizeText = (text: string) => _sanitizeText(text, getConfig());
|
||||||
export const setupGraphViewbox = _setupGraphViewbox;
|
export const setupGraphViewbox = _setupGraphViewbox;
|
||||||
export const getCommonDb = () => {
|
export const getCommonDb = () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { sanitizeText } from '../common/common.js';
|
import { sanitizeText } from '../common/common.js';
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
@ -33,7 +33,7 @@ export const getC4Type = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const setC4Type = function (c4TypeParam) {
|
export const setC4Type = function (c4TypeParam) {
|
||||||
let sanitizedText = sanitizeText(c4TypeParam, configApi.getConfig());
|
let sanitizedText = sanitizeText(c4TypeParam, getConfig());
|
||||||
c4Type = sanitizedText;
|
c4Type = sanitizedText;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -783,7 +783,7 @@ export const PLACEMENT = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const setTitle = function (txt) {
|
export const setTitle = function (txt) {
|
||||||
let sanitizedText = sanitizeText(txt, configApi.getConfig());
|
let sanitizedText = sanitizeText(txt, getConfig());
|
||||||
title = sanitizedText;
|
title = sanitizedText;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -816,7 +816,7 @@ export default {
|
|||||||
getAccTitle,
|
getAccTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
getConfig: () => configApi.getConfig().c4,
|
getConfig: () => getConfig().c4,
|
||||||
clear,
|
clear,
|
||||||
LINETYPE,
|
LINETYPE,
|
||||||
ARROWTYPE,
|
ARROWTYPE,
|
||||||
|
@ -4,7 +4,7 @@ import { log } from '../../logger.js';
|
|||||||
import { parser } from './parser/c4Diagram.jison';
|
import { parser } from './parser/c4Diagram.jison';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import c4Db from './c4Db.js';
|
import c4Db from './c4Db.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import assignWithDepth from '../../assignWithDepth.js';
|
import assignWithDepth from '../../assignWithDepth.js';
|
||||||
import { wrapLabel, calculateTextWidth, calculateTextHeight } from '../../utils.js';
|
import { wrapLabel, calculateTextWidth, calculateTextHeight } from '../../utils.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
@ -580,8 +580,8 @@ function drawInsideBoundary(
|
|||||||
* @param diagObj
|
* @param diagObj
|
||||||
*/
|
*/
|
||||||
export const draw = function (_text, id, _version, diagObj) {
|
export const draw = function (_text, id, _version, diagObj) {
|
||||||
conf = configApi.getConfig().c4;
|
conf = getConfig().c4;
|
||||||
const securityLevel = configApi.getConfig().securityLevel;
|
const securityLevel = getConfig().securityLevel;
|
||||||
// Handle root and Document for when rendering in sandbox mode
|
// Handle root and Document for when rendering in sandbox mode
|
||||||
let sandboxElement;
|
let sandboxElement;
|
||||||
if (securityLevel === 'sandbox') {
|
if (securityLevel === 'sandbox') {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import type { Selection } from 'd3';
|
import type { Selection } from 'd3';
|
||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import {
|
import {
|
||||||
@ -34,10 +34,10 @@ let namespaceCounter = 0;
|
|||||||
|
|
||||||
let functions: any[] = [];
|
let functions: any[] = [];
|
||||||
|
|
||||||
const sanitizeText = (txt: string) => common.sanitizeText(txt, configApi.getConfig());
|
const sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());
|
||||||
|
|
||||||
const splitClassNameAndType = function (_id: string) {
|
const splitClassNameAndType = function (_id: string) {
|
||||||
const id = common.sanitizeText(_id, configApi.getConfig());
|
const id = common.sanitizeText(_id, getConfig());
|
||||||
let genericType = '';
|
let genericType = '';
|
||||||
let className = id;
|
let className = id;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ const splitClassNameAndType = function (_id: string) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const setClassLabel = function (_id: string, label: string) {
|
export const setClassLabel = function (_id: string, label: string) {
|
||||||
const id = common.sanitizeText(_id, configApi.getConfig());
|
const id = common.sanitizeText(_id, getConfig());
|
||||||
if (label) {
|
if (label) {
|
||||||
label = sanitizeText(label);
|
label = sanitizeText(label);
|
||||||
}
|
}
|
||||||
@ -67,14 +67,14 @@ export const setClassLabel = function (_id: string, label: string) {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export const addClass = function (_id: string) {
|
export const addClass = function (_id: string) {
|
||||||
const id = common.sanitizeText(_id, configApi.getConfig());
|
const id = common.sanitizeText(_id, getConfig());
|
||||||
const { className, type } = splitClassNameAndType(id);
|
const { className, type } = splitClassNameAndType(id);
|
||||||
// Only add class if not exists
|
// Only add class if not exists
|
||||||
if (Object.hasOwn(classes, className)) {
|
if (Object.hasOwn(classes, className)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// alert('Adding class: ' + className);
|
// alert('Adding class: ' + className);
|
||||||
const name = common.sanitizeText(className, configApi.getConfig());
|
const name = common.sanitizeText(className, getConfig());
|
||||||
// alert('Adding class after: ' + name);
|
// alert('Adding class after: ' + name);
|
||||||
classes[name] = {
|
classes[name] = {
|
||||||
id: name,
|
id: name,
|
||||||
@ -97,7 +97,7 @@ export const addClass = function (_id: string) {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export const lookUpDomId = function (_id: string): string {
|
export const lookUpDomId = function (_id: string): string {
|
||||||
const id = common.sanitizeText(_id, configApi.getConfig());
|
const id = common.sanitizeText(_id, getConfig());
|
||||||
if (id in classes) {
|
if (id in classes) {
|
||||||
return classes[id].domId;
|
return classes[id].domId;
|
||||||
}
|
}
|
||||||
@ -139,15 +139,9 @@ export const addRelation = function (relation: ClassRelation) {
|
|||||||
relation.id1 = splitClassNameAndType(relation.id1).className;
|
relation.id1 = splitClassNameAndType(relation.id1).className;
|
||||||
relation.id2 = splitClassNameAndType(relation.id2).className;
|
relation.id2 = splitClassNameAndType(relation.id2).className;
|
||||||
|
|
||||||
relation.relationTitle1 = common.sanitizeText(
|
relation.relationTitle1 = common.sanitizeText(relation.relationTitle1.trim(), getConfig());
|
||||||
relation.relationTitle1.trim(),
|
|
||||||
configApi.getConfig()
|
|
||||||
);
|
|
||||||
|
|
||||||
relation.relationTitle2 = common.sanitizeText(
|
relation.relationTitle2 = common.sanitizeText(relation.relationTitle2.trim(), getConfig());
|
||||||
relation.relationTitle2.trim(),
|
|
||||||
configApi.getConfig()
|
|
||||||
);
|
|
||||||
|
|
||||||
relations.push(relation);
|
relations.push(relation);
|
||||||
};
|
};
|
||||||
@ -267,7 +261,7 @@ export const getTooltip = function (id: string, namespace?: string) {
|
|||||||
* @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
|
* @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
|
||||||
*/
|
*/
|
||||||
export const setLink = function (ids: string, linkStr: string, target: string) {
|
export const setLink = function (ids: string, linkStr: string, target: string) {
|
||||||
const config = configApi.getConfig();
|
const config = getConfig();
|
||||||
ids.split(',').forEach(function (_id) {
|
ids.split(',').forEach(function (_id) {
|
||||||
let id = _id;
|
let id = _id;
|
||||||
if (_id[0].match(/\d/)) {
|
if (_id[0].match(/\d/)) {
|
||||||
@ -303,8 +297,8 @@ export const setClickEvent = function (ids: string, functionName: string, functi
|
|||||||
};
|
};
|
||||||
|
|
||||||
const setClickFunc = function (_domId: string, functionName: string, functionArgs: string) {
|
const setClickFunc = function (_domId: string, functionName: string, functionArgs: string) {
|
||||||
const domId = common.sanitizeText(_domId, configApi.getConfig());
|
const domId = common.sanitizeText(_domId, getConfig());
|
||||||
const config = configApi.getConfig();
|
const config = getConfig();
|
||||||
if (config.securityLevel !== 'loose') {
|
if (config.securityLevel !== 'loose') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -465,7 +459,7 @@ export default {
|
|||||||
getAccTitle,
|
getAccTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
setAccDescription,
|
setAccDescription,
|
||||||
getConfig: () => configApi.getConfig().class,
|
getConfig: () => getConfig().class,
|
||||||
addClass,
|
addClass,
|
||||||
bindFunctions,
|
bindFunctions,
|
||||||
clear,
|
clear,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { select, curveLinear } from 'd3';
|
import { select, curveLinear } from 'd3';
|
||||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { render } from '../../dagre-wrapper/index.js';
|
import { render } from '../../dagre-wrapper/index.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import { interpolateToCurve, getStylesFromArray } from '../../utils.js';
|
import { interpolateToCurve, getStylesFromArray } from '../../utils.js';
|
||||||
|
@ -4,7 +4,7 @@ import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
|||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import svgDraw from './svgDraw.js';
|
import svgDraw from './svgDraw.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
let idCache = {};
|
let idCache = {};
|
||||||
const padding = 20;
|
const padding = 20;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { parseGenericTypes, sanitizeText } from '../common/common.js';
|
import { parseGenericTypes, sanitizeText } from '../common/common.js';
|
||||||
|
|
||||||
export interface ClassNode {
|
export interface ClassNode {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
@ -83,7 +83,7 @@ const clear = function () {
|
|||||||
export default {
|
export default {
|
||||||
Cardinality,
|
Cardinality,
|
||||||
Identification,
|
Identification,
|
||||||
getConfig: () => configApi.getConfig().er,
|
getConfig: () => getConfig().er,
|
||||||
addEntity,
|
addEntity,
|
||||||
addAttributes,
|
addAttributes,
|
||||||
getEntities,
|
getEntities,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||||
import { line, curveBasis, select } from 'd3';
|
import { line, curveBasis, select } from 'd3';
|
||||||
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
|
import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import erMarkers from './erMarkers.js';
|
import erMarkers from './erMarkers.js';
|
||||||
@ -202,7 +202,7 @@ const drawAttributes = (groupNode, entityTextNode, attributes) => {
|
|||||||
let attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect
|
let attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect
|
||||||
|
|
||||||
attributeNodes.forEach((attributeNode) => {
|
attributeNodes.forEach((attributeNode) => {
|
||||||
// Calculate the alignment y co-ordinate for the type/name of the attribute
|
// Calculate the alignment y coordinate for the type/name of the attribute
|
||||||
const alignY = heightOffset + heightPadding + attributeNode.height / 2;
|
const alignY = heightOffset + heightPadding + attributeNode.height / 2;
|
||||||
|
|
||||||
// Position the type attribute
|
// Position the type attribute
|
||||||
@ -579,8 +579,8 @@ export const draw = function (text, id, _version, diagObj) {
|
|||||||
// 2. Make sure they are all added to the graph
|
// 2. Make sure they are all added to the graph
|
||||||
// 3. Add all the edges (relationships) to the graph as well
|
// 3. Add all the edges (relationships) to the graph as well
|
||||||
// 4. Let dagre do its magic to lay out the graph. This assigns:
|
// 4. Let dagre do its magic to lay out the graph. This assigns:
|
||||||
// - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships
|
// - the centre coordinates for each node, bearing in mind the dimensions and edge relationships
|
||||||
// - the path co-ordinates for each edge
|
// - the path coordinates for each edge
|
||||||
// But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0
|
// But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0
|
||||||
// 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by
|
// 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by
|
||||||
// its centre point, which is obtained from the graph, and it's width and height
|
// its centre point, which is obtained from the graph, and it's width and height
|
||||||
|
@ -92,7 +92,7 @@ describe('when parsing ER diagram it...', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('cannot contain % because it interfers with parsing comments', function () {
|
it('cannot contain % because it interferes with parsing comments', function () {
|
||||||
expect(() => {
|
expect(() => {
|
||||||
erDiagram.parser.parse(`erDiagram\n "Blo%rf"\n`);
|
erDiagram.parser.parse(`erDiagram\n "Blo%rf"\n`);
|
||||||
const entities = erDb.getEntities();
|
const entities = erDb.getEntities();
|
||||||
|
@ -561,7 +561,7 @@ export const addEdges = function (edges, diagObj, graph, svg) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// TODO: break out and share with dagre wrapper. The current code in dagre wrapper also adds
|
// TODO: break out and share with dagre wrapper. The current code in dagre wrapper also adds
|
||||||
// adds the line to the graph, but we don't need that here. This is why we cant use the dagre
|
// adds the line to the graph, but we don't need that here. This is why we can't use the dagre
|
||||||
// wrapper directly for this
|
// wrapper directly for this
|
||||||
/**
|
/**
|
||||||
* Add the markers to the edge depending on the type of arrow is
|
* Add the markers to the edge depending on the type of arrow is
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig, defaultConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import {
|
import {
|
||||||
@ -15,7 +15,7 @@ import {
|
|||||||
|
|
||||||
const MERMAID_DOM_ID_PREFIX = 'flowchart-';
|
const MERMAID_DOM_ID_PREFIX = 'flowchart-';
|
||||||
let vertexCounter = 0;
|
let vertexCounter = 0;
|
||||||
let config = configApi.getConfig();
|
let config = getConfig();
|
||||||
let vertices = {};
|
let vertices = {};
|
||||||
let edges = [];
|
let edges = [];
|
||||||
let classes = {};
|
let classes = {};
|
||||||
@ -84,7 +84,7 @@ export const addVertex = function (_id, textObj, type, style, classes, dir, prop
|
|||||||
}
|
}
|
||||||
vertexCounter++;
|
vertexCounter++;
|
||||||
if (textObj !== undefined) {
|
if (textObj !== undefined) {
|
||||||
config = configApi.getConfig();
|
config = getConfig();
|
||||||
txt = sanitizeText(textObj.text.trim());
|
txt = sanitizeText(textObj.text.trim());
|
||||||
vertices[id].labelType = textObj.type;
|
vertices[id].labelType = textObj.type;
|
||||||
// strip quotes if string starts and ends with a quote
|
// strip quotes if string starts and ends with a quote
|
||||||
@ -277,7 +277,7 @@ const setTooltip = function (ids, tooltip) {
|
|||||||
const setClickFun = function (id, functionName, functionArgs) {
|
const setClickFun = function (id, functionName, functionArgs) {
|
||||||
let domId = lookUpDomId(id);
|
let domId = lookUpDomId(id);
|
||||||
// if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
|
// if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
|
||||||
if (configApi.getConfig().securityLevel !== 'loose') {
|
if (getConfig().securityLevel !== 'loose') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (functionName === undefined) {
|
if (functionName === undefined) {
|
||||||
@ -766,7 +766,7 @@ export const lex = {
|
|||||||
firstGraph,
|
firstGraph,
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
defaultConfig: () => configApi.defaultConfig.flowchart,
|
defaultConfig: () => defaultConfig.flowchart,
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
getAccTitle,
|
getAccTitle,
|
||||||
getAccDescription,
|
getAccDescription,
|
||||||
|
@ -4,7 +4,7 @@ import flowDb from './flowDb.js';
|
|||||||
import flowRendererV2 from './flowRenderer-v2.js';
|
import flowRendererV2 from './flowRenderer-v2.js';
|
||||||
import flowStyles from './styles.js';
|
import flowStyles from './styles.js';
|
||||||
import type { MermaidConfig } from '../../config.type.js';
|
import type { MermaidConfig } from '../../config.type.js';
|
||||||
import { setConfig } from '../../config.js';
|
import { setConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
export const diagram = {
|
export const diagram = {
|
||||||
parser: flowParser,
|
parser: flowParser,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||||
import { select, curveLinear, selectAll } from 'd3';
|
import { select, curveLinear, selectAll } from 'd3';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import { render } from '../../dagre-wrapper/index.js';
|
import { render } from '../../dagre-wrapper/index.js';
|
||||||
import { addHtmlLabel } from 'dagre-d3-es/src/dagre-js/label/add-html-label.js';
|
import { addHtmlLabel } from 'dagre-d3-es/src/dagre-js/label/add-html-label.js';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||||
import { select, curveLinear, selectAll } from 'd3';
|
import { select, curveLinear, selectAll } from 'd3';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { render as Render } from 'dagre-d3-es';
|
import { render as Render } from 'dagre-d3-es';
|
||||||
import { applyStyle } from 'dagre-d3-es/src/dagre-js/util.js';
|
import { applyStyle } from 'dagre-d3-es/src/dagre-js/util.js';
|
||||||
import { addHtmlLabel } from 'dagre-d3-es/src/dagre-js/label/add-html-label.js';
|
import { addHtmlLabel } from 'dagre-d3-es/src/dagre-js/label/add-html-label.js';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { addVertices, addEdges } from './flowRenderer.js';
|
import { addVertices, addEdges } from './flowRenderer.js';
|
||||||
import { setConfig } from '../../config.js';
|
import { setConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
setConfig({
|
setConfig({
|
||||||
flowchart: {
|
flowchart: {
|
||||||
|
@ -4,7 +4,7 @@ import dayjsIsoWeek from 'dayjs/plugin/isoWeek.js';
|
|||||||
import dayjsCustomParseFormat from 'dayjs/plugin/customParseFormat.js';
|
import dayjsCustomParseFormat from 'dayjs/plugin/customParseFormat.js';
|
||||||
import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat.js';
|
import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -603,7 +603,7 @@ const compileTasks = function () {
|
|||||||
*/
|
*/
|
||||||
export const setLink = function (ids, _linkStr) {
|
export const setLink = function (ids, _linkStr) {
|
||||||
let linkStr = _linkStr;
|
let linkStr = _linkStr;
|
||||||
if (configApi.getConfig().securityLevel !== 'loose') {
|
if (getConfig().securityLevel !== 'loose') {
|
||||||
linkStr = sanitizeUrl(_linkStr);
|
linkStr = sanitizeUrl(_linkStr);
|
||||||
}
|
}
|
||||||
ids.split(',').forEach(function (id) {
|
ids.split(',').forEach(function (id) {
|
||||||
@ -634,7 +634,7 @@ export const setClass = function (ids, className) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const setClickFun = function (id, functionName, functionArgs) {
|
const setClickFun = function (id, functionName, functionArgs) {
|
||||||
if (configApi.getConfig().securityLevel !== 'loose') {
|
if (getConfig().securityLevel !== 'loose') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (functionName === undefined) {
|
if (functionName === undefined) {
|
||||||
@ -725,7 +725,7 @@ export const bindFunctions = function (element) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getConfig: () => configApi.getConfig().gantt,
|
getConfig: () => getConfig().gantt,
|
||||||
clear,
|
clear,
|
||||||
setDateFormat,
|
setDateFormat,
|
||||||
getDateFormat,
|
getDateFormat,
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
timeMonth,
|
timeMonth,
|
||||||
} from 'd3';
|
} from 'd3';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
|
|
||||||
export const setConf = function () {
|
export const setConf = function () {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { random } from '../../utils.js';
|
import { random } from '../../utils.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { getConfig } from '../../config.js';
|
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
@ -106,9 +105,9 @@ export const getOptions = function () {
|
|||||||
|
|
||||||
export const commit = function (msg, id, type, tag) {
|
export const commit = function (msg, id, type, tag) {
|
||||||
log.debug('Entering commit:', msg, id, type, tag);
|
log.debug('Entering commit:', msg, id, type, tag);
|
||||||
id = common.sanitizeText(id, configApi.getConfig());
|
id = common.sanitizeText(id, getConfig());
|
||||||
msg = common.sanitizeText(msg, configApi.getConfig());
|
msg = common.sanitizeText(msg, getConfig());
|
||||||
tag = common.sanitizeText(tag, configApi.getConfig());
|
tag = common.sanitizeText(tag, getConfig());
|
||||||
const commit = {
|
const commit = {
|
||||||
id: id ? id : seq + '-' + getId(),
|
id: id ? id : seq + '-' + getId(),
|
||||||
message: msg,
|
message: msg,
|
||||||
@ -125,7 +124,7 @@ export const commit = function (msg, id, type, tag) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const branch = function (name, order) {
|
export const branch = function (name, order) {
|
||||||
name = common.sanitizeText(name, configApi.getConfig());
|
name = common.sanitizeText(name, getConfig());
|
||||||
if (branches[name] === undefined) {
|
if (branches[name] === undefined) {
|
||||||
branches[name] = head != null ? head.id : null;
|
branches[name] = head != null ? head.id : null;
|
||||||
branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null };
|
branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null };
|
||||||
@ -149,8 +148,8 @@ export const branch = function (name, order) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const merge = function (otherBranch, custom_id, override_type, custom_tag) {
|
export const merge = function (otherBranch, custom_id, override_type, custom_tag) {
|
||||||
otherBranch = common.sanitizeText(otherBranch, configApi.getConfig());
|
otherBranch = common.sanitizeText(otherBranch, getConfig());
|
||||||
custom_id = common.sanitizeText(custom_id, configApi.getConfig());
|
custom_id = common.sanitizeText(custom_id, getConfig());
|
||||||
|
|
||||||
const currentCommit = commits[branches[curBranch]];
|
const currentCommit = commits[branches[curBranch]];
|
||||||
const otherCommit = commits[branches[otherBranch]];
|
const otherCommit = commits[branches[otherBranch]];
|
||||||
@ -355,7 +354,7 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommitId) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
export const checkout = function (branch) {
|
export const checkout = function (branch) {
|
||||||
branch = common.sanitizeText(branch, configApi.getConfig());
|
branch = common.sanitizeText(branch, getConfig());
|
||||||
if (branches[branch] === undefined) {
|
if (branches[branch] === undefined) {
|
||||||
let error = new Error(
|
let error = new Error(
|
||||||
'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch + '")'
|
'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch + '")'
|
||||||
@ -519,7 +518,7 @@ export const commitType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getConfig: () => configApi.getConfig().gitGraph,
|
getConfig: () => getConfig().gitGraph,
|
||||||
setDirection,
|
setDirection,
|
||||||
setOptions,
|
setOptions,
|
||||||
getOptions,
|
getOptions,
|
||||||
|
@ -6,7 +6,7 @@ describe('when parsing a gitGraph', function () {
|
|||||||
parser.yy = gitGraphAst;
|
parser.yy = gitGraphAst;
|
||||||
parser.yy.clear();
|
parser.yy.clear();
|
||||||
});
|
});
|
||||||
it('should handle a gitGraph commit with NO pararms, get auto-genrated reandom ID', function () {
|
it('should handle a gitGraph commit with NO pararms, get auto-generated reandom ID', function () {
|
||||||
const str = `gitGraph:
|
const str = `gitGraph:
|
||||||
commit
|
commit
|
||||||
`;
|
`;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
export default (dir, _branches) => {
|
export default (dir, _branches) => {
|
||||||
const config = getConfig().gitGraph;
|
const config = getConfig().gitGraph;
|
||||||
|
@ -129,7 +129,7 @@ root
|
|||||||
expect(child.nodeId).toEqual('theId');
|
expect(child.nodeId).toEqual('theId');
|
||||||
expect(child.type).toEqual(mindmap.yy.nodeType.ROUNDED_RECT);
|
expect(child.type).toEqual(mindmap.yy.nodeType.ROUNDED_RECT);
|
||||||
});
|
});
|
||||||
it('MMP-10 mutiple types (circle)', function () {
|
it('MMP-10 multiple types (circle)', function () {
|
||||||
let str = `mindmap
|
let str = `mindmap
|
||||||
root((the root))
|
root((the root))
|
||||||
`;
|
`;
|
||||||
@ -141,7 +141,7 @@ root
|
|||||||
expect(mm.type).toEqual(mindmap.yy.nodeType.CIRCLE);
|
expect(mm.type).toEqual(mindmap.yy.nodeType.CIRCLE);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('MMP-11 mutiple types (cloud)', function () {
|
it('MMP-11 multiple types (cloud)', function () {
|
||||||
let str = `mindmap
|
let str = `mindmap
|
||||||
root)the root(
|
root)the root(
|
||||||
`;
|
`;
|
||||||
@ -152,7 +152,7 @@ root
|
|||||||
expect(mm.children.length).toEqual(0);
|
expect(mm.children.length).toEqual(0);
|
||||||
expect(mm.type).toEqual(mindmap.yy.nodeType.CLOUD);
|
expect(mm.type).toEqual(mindmap.yy.nodeType.CLOUD);
|
||||||
});
|
});
|
||||||
it('MMP-12 mutiple types (bang)', function () {
|
it('MMP-12 multiple types (bang)', function () {
|
||||||
let str = `mindmap
|
let str = `mindmap
|
||||||
root))the root((
|
root))the root((
|
||||||
`;
|
`;
|
||||||
@ -164,7 +164,7 @@ root
|
|||||||
expect(mm.type).toEqual(mindmap.yy.nodeType.BANG);
|
expect(mm.type).toEqual(mindmap.yy.nodeType.BANG);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('MMP-12-a mutiple types (hexagon)', function () {
|
it('MMP-12-a multiple types (hexagon)', function () {
|
||||||
let str = `mindmap
|
let str = `mindmap
|
||||||
root{{the root}}
|
root{{the root}}
|
||||||
`;
|
`;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { sanitizeText as _sanitizeText } from '../../diagrams/common/common.js';
|
import { sanitizeText as _sanitizeText } from '../../diagrams/common/common.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** Created by knut on 14-12-11. */
|
/** Created by knut on 14-12-11. */
|
||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { setupGraphViewbox } from '../../setupGraphViewbox.js';
|
import { setupGraphViewbox } from '../../setupGraphViewbox.js';
|
||||||
import svgDraw from './svgDraw.js';
|
import svgDraw from './svgDraw.js';
|
||||||
import cytoscape from 'cytoscape/dist/cytoscape.umd.js';
|
import cytoscape from 'cytoscape/dist/cytoscape.umd.js';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// @ts-ignore: JISON doesn't support types
|
// @ts-ignore: JISON doesn't support types
|
||||||
import { parser } from './parser/pie.jison';
|
import { parser } from './parser/pie.jison';
|
||||||
import { DEFAULT_PIE_DB, db } from './pieDb.js';
|
import { DEFAULT_PIE_DB, db } from './pieDb.js';
|
||||||
import { setConfig } from '../../config.js';
|
import { setConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
setConfig({
|
setConfig({
|
||||||
securityLevel: 'strict',
|
securityLevel: 'strict',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { getConfig as commonGetConfig } from '../../config.js';
|
import { getConfig as commonGetConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { sanitizeText } from '../common/common.js';
|
import { sanitizeText } from '../common/common.js';
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
|
@ -3,7 +3,7 @@ import { scaleOrdinal, pie as d3pie, arc } from 'd3';
|
|||||||
|
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { cleanAndMerge, parseFontSize } from '../../utils.js';
|
import { cleanAndMerge, parseFontSize } from '../../utils.js';
|
||||||
import type { DrawDefinition, Group, SVG } from '../../diagram-api/types.js';
|
import type { DrawDefinition, Group, SVG } from '../../diagram-api/types.js';
|
||||||
import type { D3Sections, PieDB, Sections } from './pieTypes.js';
|
import type { D3Sections, PieDB, Sections } from './pieTypes.js';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { sanitizeText } from '../common/common.js';
|
import { sanitizeText } from '../common/common.js';
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
@ -11,7 +11,7 @@ import {
|
|||||||
} from '../common/commonDb.js';
|
} from '../common/commonDb.js';
|
||||||
import { QuadrantBuilder } from './quadrantBuilder.js';
|
import { QuadrantBuilder } from './quadrantBuilder.js';
|
||||||
|
|
||||||
const config = configApi.getConfig();
|
const config = getConfig();
|
||||||
|
|
||||||
function textSanitizer(text: string) {
|
function textSanitizer(text: string) {
|
||||||
return sanitizeText(text.trim(), config);
|
return sanitizeText(text.trim(), config);
|
||||||
@ -66,7 +66,7 @@ function setHeight(height: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getQuadrantData() {
|
function getQuadrantData() {
|
||||||
const config = configApi.getConfig();
|
const config = getConfig();
|
||||||
const { themeVariables, quadrantChart: quadrantChartConfig } = config;
|
const { themeVariables, quadrantChart: quadrantChartConfig } = config;
|
||||||
if (quadrantChartConfig) {
|
if (quadrantChartConfig) {
|
||||||
quadrantBuilder.setConfig(quadrantChartConfig);
|
quadrantBuilder.setConfig(quadrantChartConfig);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// @ts-nocheck - don't check until handle it
|
// @ts-nocheck - don't check until handle it
|
||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
import type { Diagram } from '../../Diagram.js';
|
import type { Diagram } from '../../Diagram.js';
|
||||||
@ -27,7 +27,7 @@ export const draw = (txt: string, id: string, _version: string, diagObj: Diagram
|
|||||||
return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;
|
return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const conf = configApi.getConfig();
|
const conf = getConfig();
|
||||||
|
|
||||||
log.debug('Rendering quadrant chart\n' + txt);
|
log.debug('Rendering quadrant chart\n' + txt);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -144,7 +144,7 @@ export default {
|
|||||||
VerifyType,
|
VerifyType,
|
||||||
Relationships,
|
Relationships,
|
||||||
|
|
||||||
getConfig: () => configApi.getConfig().req,
|
getConfig: () => getConfig().req,
|
||||||
|
|
||||||
addRequirement,
|
addRequirement,
|
||||||
getRequirements,
|
getRequirements,
|
||||||
|
@ -5,7 +5,7 @@ import { log } from '../../logger.js';
|
|||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import markers from './requirementMarkers.js';
|
import markers from './requirementMarkers.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
let conf = {};
|
let conf = {};
|
||||||
let relCnt = 0;
|
let relCnt = 0;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
@ -42,7 +42,7 @@ class SankeyNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const findOrCreateNode = (ID: string): SankeyNode => {
|
const findOrCreateNode = (ID: string): SankeyNode => {
|
||||||
ID = common.sanitizeText(ID, configApi.getConfig());
|
ID = common.sanitizeText(ID, getConfig());
|
||||||
|
|
||||||
if (!nodesMap[ID]) {
|
if (!nodesMap[ID]) {
|
||||||
nodesMap[ID] = new SankeyNode(ID);
|
nodesMap[ID] = new SankeyNode(ID);
|
||||||
@ -65,7 +65,7 @@ const getGraph = () => ({
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
nodesMap,
|
nodesMap,
|
||||||
getConfig: () => configApi.getConfig().sankey,
|
getConfig: () => getConfig().sankey,
|
||||||
getNodes,
|
getNodes,
|
||||||
getLinks,
|
getLinks,
|
||||||
getGraph,
|
getGraph,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Diagram } from '../../Diagram.js';
|
import type { Diagram } from '../../Diagram.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig, defaultConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
select as d3select,
|
select as d3select,
|
||||||
@ -41,8 +41,8 @@ const alignmentsMap: Record<
|
|||||||
*/
|
*/
|
||||||
export const draw = function (text: string, id: string, _version: string, diagObj: Diagram): void {
|
export const draw = function (text: string, id: string, _version: string, diagObj: Diagram): void {
|
||||||
// Get Sankey config
|
// Get Sankey config
|
||||||
const { securityLevel, sankey: conf } = configApi.getConfig();
|
const { securityLevel, sankey: conf } = getConfig();
|
||||||
const defaultSankeyConfig = configApi!.defaultConfig!.sankey!;
|
const defaultSankeyConfig = defaultConfig!.sankey!;
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// This code repeats for every diagram
|
// This code repeats for every diagram
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { sanitizeText } from '../common/common.js';
|
import { sanitizeText } from '../common/common.js';
|
||||||
import {
|
import {
|
||||||
@ -196,7 +196,7 @@ export const autoWrap = () => {
|
|||||||
if (wrapEnabled !== undefined) {
|
if (wrapEnabled !== undefined) {
|
||||||
return wrapEnabled;
|
return wrapEnabled;
|
||||||
}
|
}
|
||||||
return configApi.getConfig().sequence.wrap;
|
return getConfig().sequence.wrap;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const clear = function () {
|
export const clear = function () {
|
||||||
@ -251,7 +251,7 @@ export const parseBoxData = function (str) {
|
|||||||
color: color,
|
color: color,
|
||||||
text:
|
text:
|
||||||
title !== undefined
|
title !== undefined
|
||||||
? sanitizeText(title.replace(/^:?(?:no)?wrap:/, ''), configApi.getConfig())
|
? sanitizeText(title.replace(/^:?(?:no)?wrap:/, ''), getConfig())
|
||||||
: undefined,
|
: undefined,
|
||||||
wrap:
|
wrap:
|
||||||
title !== undefined
|
title !== undefined
|
||||||
@ -337,7 +337,7 @@ export const addLinks = function (actorId, text) {
|
|||||||
const actor = getActor(actorId);
|
const actor = getActor(actorId);
|
||||||
// JSON.parse the text
|
// JSON.parse the text
|
||||||
try {
|
try {
|
||||||
let sanitizedText = sanitizeText(text.text, configApi.getConfig());
|
let sanitizedText = sanitizeText(text.text, getConfig());
|
||||||
sanitizedText = sanitizedText.replace(/&/g, '&');
|
sanitizedText = sanitizedText.replace(/&/g, '&');
|
||||||
sanitizedText = sanitizedText.replace(/=/g, '=');
|
sanitizedText = sanitizedText.replace(/=/g, '=');
|
||||||
const links = JSON.parse(sanitizedText);
|
const links = JSON.parse(sanitizedText);
|
||||||
@ -353,7 +353,7 @@ export const addALink = function (actorId, text) {
|
|||||||
const actor = getActor(actorId);
|
const actor = getActor(actorId);
|
||||||
try {
|
try {
|
||||||
const links = {};
|
const links = {};
|
||||||
let sanitizedText = sanitizeText(text.text, configApi.getConfig());
|
let sanitizedText = sanitizeText(text.text, getConfig());
|
||||||
var sep = sanitizedText.indexOf('@');
|
var sep = sanitizedText.indexOf('@');
|
||||||
sanitizedText = sanitizedText.replace(/&/g, '&');
|
sanitizedText = sanitizedText.replace(/&/g, '&');
|
||||||
sanitizedText = sanitizedText.replace(/=/g, '=');
|
sanitizedText = sanitizedText.replace(/=/g, '=');
|
||||||
@ -387,7 +387,7 @@ export const addProperties = function (actorId, text) {
|
|||||||
const actor = getActor(actorId);
|
const actor = getActor(actorId);
|
||||||
// JSON.parse the text
|
// JSON.parse the text
|
||||||
try {
|
try {
|
||||||
let sanitizedText = sanitizeText(text.text, configApi.getConfig());
|
let sanitizedText = sanitizeText(text.text, getConfig());
|
||||||
const properties = JSON.parse(sanitizedText);
|
const properties = JSON.parse(sanitizedText);
|
||||||
// add the deserialized text to the actor's property field.
|
// add the deserialized text to the actor's property field.
|
||||||
insertProperties(actor, properties);
|
insertProperties(actor, properties);
|
||||||
@ -629,7 +629,7 @@ export default {
|
|||||||
getBoxes,
|
getBoxes,
|
||||||
getDiagramTitle,
|
getDiagramTitle,
|
||||||
setDiagramTitle,
|
setDiagramTitle,
|
||||||
getConfig: () => configApi.getConfig().sequence,
|
getConfig: () => getConfig().sequence,
|
||||||
clear,
|
clear,
|
||||||
parseMessage,
|
parseMessage,
|
||||||
parseBoxData,
|
parseBoxData,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { vi } from 'vitest';
|
import { vi } from 'vitest';
|
||||||
import * as configApi from '../../config.js';
|
import { setSiteConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import mermaidAPI from '../../mermaidAPI.js';
|
import mermaidAPI from '../../mermaidAPI.js';
|
||||||
import { Diagram, getDiagramFromText } from '../../Diagram.js';
|
import { Diagram, getDiagramFromText } from '../../Diagram.js';
|
||||||
import { addDiagrams } from '../../diagram-api/diagram-orchestration.js';
|
import { addDiagrams } from '../../diagram-api/diagram-orchestration.js';
|
||||||
@ -1610,7 +1610,7 @@ describe('when rendering a sequenceDiagram APA', function () {
|
|||||||
wrap: false,
|
wrap: false,
|
||||||
mirrorActors: false,
|
mirrorActors: false,
|
||||||
};
|
};
|
||||||
configApi.setSiteConfig({ logLevel: 5, sequence: conf });
|
setSiteConfig({ logLevel: 5, sequence: conf });
|
||||||
});
|
});
|
||||||
let conf;
|
let conf;
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
@ -1631,7 +1631,7 @@ describe('when rendering a sequenceDiagram APA', function () {
|
|||||||
wrap: false,
|
wrap: false,
|
||||||
mirrorActors: false,
|
mirrorActors: false,
|
||||||
};
|
};
|
||||||
configApi.setSiteConfig({ logLevel: 5, sequence: conf });
|
setSiteConfig({ logLevel: 5, sequence: conf });
|
||||||
diagram = new Diagram(`
|
diagram = new Diagram(`
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
Alice->Bob:Hello Bob, how are you?
|
Alice->Bob:Hello Bob, how are you?
|
||||||
|
@ -4,7 +4,7 @@ import svgDraw, { ACTOR_TYPE_WIDTH, drawText, fixLifeLineHeights } from './svgDr
|
|||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import * as svgDrawCommon from '../common/svgDrawCommon.js';
|
import * as svgDrawCommon from '../common/svgDrawCommon.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import assignWithDepth from '../../assignWithDepth.js';
|
import assignWithDepth from '../../assignWithDepth.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
@ -91,7 +91,7 @@ export const bounds = {
|
|||||||
stopy: undefined,
|
stopy: undefined,
|
||||||
};
|
};
|
||||||
this.verticalPos = 0;
|
this.verticalPos = 0;
|
||||||
setConf(configApi.getConfig());
|
setConf(getConfig());
|
||||||
},
|
},
|
||||||
updateVal: function (obj, key, val, fun) {
|
updateVal: function (obj, key, val, fun) {
|
||||||
if (obj[key] === undefined) {
|
if (obj[key] === undefined) {
|
||||||
@ -747,7 +747,7 @@ function adjustCreatedDestroyedData(
|
|||||||
* @param diagObj - A standard diagram containing the db and the text and type etc of the diagram
|
* @param diagObj - A standard diagram containing the db and the text and type etc of the diagram
|
||||||
*/
|
*/
|
||||||
export const draw = function (_text: string, id: string, _version: string, diagObj: Diagram) {
|
export const draw = function (_text: string, id: string, _version: string, diagObj: Diagram) {
|
||||||
const { securityLevel, sequence } = configApi.getConfig();
|
const { securityLevel, sequence } = getConfig();
|
||||||
conf = sequence;
|
conf = sequence;
|
||||||
// Handle root and Document for when rendering in sandbox mode
|
// Handle root and Document for when rendering in sandbox mode
|
||||||
let sandboxElement;
|
let sandboxElement;
|
||||||
|
@ -3,7 +3,7 @@ import idCache from './id-cache.js';
|
|||||||
import stateDb from './stateDb.js';
|
import stateDb from './stateDb.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { generateId } from '../../utils.js';
|
import { generateId } from '../../utils.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
getAccTitle,
|
getAccTitle,
|
||||||
@ -253,7 +253,7 @@ export const addState = function (
|
|||||||
currentDocument.states[trimmedId].note = note;
|
currentDocument.states[trimmedId].note = note;
|
||||||
currentDocument.states[trimmedId].note.text = common.sanitizeText(
|
currentDocument.states[trimmedId].note.text = common.sanitizeText(
|
||||||
currentDocument.states[trimmedId].note.text,
|
currentDocument.states[trimmedId].note.text,
|
||||||
configApi.getConfig()
|
getConfig()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ export function addRelationObjs(item1, item2, relationTitle) {
|
|||||||
currentDocument.relations.push({
|
currentDocument.relations.push({
|
||||||
id1,
|
id1,
|
||||||
id2,
|
id2,
|
||||||
relationTitle: common.sanitizeText(relationTitle, configApi.getConfig()),
|
relationTitle: common.sanitizeText(relationTitle, getConfig()),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,7 +423,7 @@ export const addRelation = function (item1, item2, title) {
|
|||||||
currentDocument.relations.push({
|
currentDocument.relations.push({
|
||||||
id1,
|
id1,
|
||||||
id2,
|
id2,
|
||||||
title: common.sanitizeText(title, configApi.getConfig()),
|
title: common.sanitizeText(title, getConfig()),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -431,7 +431,7 @@ export const addRelation = function (item1, item2, title) {
|
|||||||
export const addDescription = function (id, descr) {
|
export const addDescription = function (id, descr) {
|
||||||
const theState = currentDocument.states[id];
|
const theState = currentDocument.states[id];
|
||||||
const _descr = descr.startsWith(':') ? descr.replace(':', '').trim() : descr;
|
const _descr = descr.startsWith(':') ? descr.replace(':', '').trim() : descr;
|
||||||
theState.descriptions.push(common.sanitizeText(_descr, configApi.getConfig()));
|
theState.descriptions.push(common.sanitizeText(_descr, getConfig()));
|
||||||
};
|
};
|
||||||
|
|
||||||
export const cleanupLabel = function (label) {
|
export const cleanupLabel = function (label) {
|
||||||
@ -542,7 +542,7 @@ const setDirection = (dir) => {
|
|||||||
const trimColon = (str) => (str && str[0] === ':' ? str.substr(1).trim() : str.trim());
|
const trimColon = (str) => (str && str[0] === ':' ? str.substr(1).trim() : str.trim());
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getConfig: () => configApi.getConfig().state,
|
getConfig: () => getConfig().state,
|
||||||
addState,
|
addState,
|
||||||
clear,
|
clear,
|
||||||
getState,
|
getState,
|
||||||
|
@ -212,14 +212,14 @@ describe('state diagram, ', function () {
|
|||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
});
|
});
|
||||||
it('should handle state defintions with separation of id', function () {
|
it('should handle state definitions with separation of id', function () {
|
||||||
const str = `stateDiagram\n
|
const str = `stateDiagram\n
|
||||||
state "Long state description" as state1
|
state "Long state description" as state1
|
||||||
`;
|
`;
|
||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
});
|
});
|
||||||
it('should handle state defintions with separation of id', function () {
|
it('should handle state definitions with separation of id', function () {
|
||||||
const str = `stateDiagram
|
const str = `stateDiagram
|
||||||
state "Not Shooting State" as NotShooting {
|
state "Not Shooting State" as NotShooting {
|
||||||
state "Idle mode" as Idle
|
state "Idle mode" as Idle
|
||||||
@ -360,7 +360,7 @@ describe('state diagram, ', function () {
|
|||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
});
|
});
|
||||||
it('should handle notes for composit states', function () {
|
it('should handle notes for composite states', function () {
|
||||||
const str = `stateDiagram\n
|
const str = `stateDiagram\n
|
||||||
[*] --> NotShooting
|
[*] --> NotShooting
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { render } from '../../dagre-wrapper/index.js';
|
import { render } from '../../dagre-wrapper/index.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
|
@ -4,7 +4,7 @@ import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
|||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
import { drawState, addTitleAndBox, drawEdge } from './shapes.js';
|
import { drawState, addTitleAndBox, drawEdge } from './shapes.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
|
|
||||||
// TODO Move conf object to main conf in mermaidAPI
|
// TODO Move conf object to main conf in mermaidAPI
|
||||||
|
@ -3,7 +3,7 @@ import type { Selection } from 'd3';
|
|||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import svgDraw from './svgDraw.js';
|
import svgDraw from './svgDraw.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { setupGraphViewbox } from '../../setupGraphViewbox.js';
|
import { setupGraphViewbox } from '../../setupGraphViewbox.js';
|
||||||
import type { Diagram } from '../../Diagram.js';
|
import type { Diagram } from '../../Diagram.js';
|
||||||
import type { MermaidConfig } from '../../config.type.js';
|
import type { MermaidConfig } from '../../config.type.js';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as configApi from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import {
|
import {
|
||||||
setAccTitle,
|
setAccTitle,
|
||||||
getAccTitle,
|
getAccTitle,
|
||||||
@ -113,7 +113,7 @@ const getActors = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getConfig: () => configApi.getConfig().journey,
|
getConfig: () => getConfig().journey,
|
||||||
clear,
|
clear,
|
||||||
setDiagramTitle,
|
setDiagramTitle,
|
||||||
getDiagramTitle,
|
getDiagramTitle,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// @ts-nocheck TODO: fix file
|
// @ts-nocheck TODO: fix file
|
||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import svgDraw from './svgDraw.js';
|
import svgDraw from './svgDraw.js';
|
||||||
import { getConfig } from '../../config.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
import { configureSvgSize } from '../../setupGraphViewbox.js';
|
||||||
|
|
||||||
export const setConf = function (cnf) {
|
export const setConf = function (cnf) {
|
||||||
|
@ -386,7 +386,7 @@ describe('Testing xychart jison file', () => {
|
|||||||
'xychart-beta\nx-axis xAxisName\ny-axis yAxisName\n bar "barTitle with space" [ +23 , -4aa5 , 56.6 ] ';
|
'xychart-beta\nx-axis xAxisName\ny-axis yAxisName\n bar "barTitle with space" [ +23 , -4aa5 , 56.6 ] ';
|
||||||
expect(parserFnConstructor(str)).toThrow();
|
expect(parserFnConstructor(str)).toThrow();
|
||||||
});
|
});
|
||||||
it('parse multiple bar and line varient 1', () => {
|
it('parse multiple bar and line variant 1', () => {
|
||||||
const str =
|
const str =
|
||||||
'xychart-beta\nx-axis xAxisName\ny-axis yAxisName\n bar barTitle1 [23, 45, 56.6] \n line lineTitle1 [11, 45.5, 67, 23] \n bar barTitle2 [13, 42, 56.89] \n line lineTitle2 [45, 99, 012]';
|
'xychart-beta\nx-axis xAxisName\ny-axis yAxisName\n bar barTitle1 [23, 45, 56.6] \n line lineTitle1 [11, 45.5, 67, 23] \n bar barTitle2 [13, 42, 56.89] \n line lineTitle2 [45, 99, 012]';
|
||||||
expect(parserFnConstructor(str)).not.toThrow();
|
expect(parserFnConstructor(str)).not.toThrow();
|
||||||
@ -409,7 +409,7 @@ describe('Testing xychart jison file', () => {
|
|||||||
[45, 99, 12]
|
[45, 99, 12]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('parse multiple bar and line varient 2', () => {
|
it('parse multiple bar and line variant 2', () => {
|
||||||
const str = `
|
const str = `
|
||||||
xychart-beta horizontal
|
xychart-beta horizontal
|
||||||
title Basic xychart
|
title Basic xychart
|
||||||
|
@ -78,8 +78,8 @@ function textSanitizer(text: string) {
|
|||||||
function setTmpSVGG(SVGG: Group) {
|
function setTmpSVGG(SVGG: Group) {
|
||||||
tmpSVGGroup = SVGG;
|
tmpSVGGroup = SVGG;
|
||||||
}
|
}
|
||||||
function setOrientation(oriantation: string) {
|
function setOrientation(orientation: string) {
|
||||||
if (oriantation === 'horizontal') {
|
if (orientation === 'horizontal') {
|
||||||
xyChartConfig.chartOrientation = 'horizontal';
|
xyChartConfig.chartOrientation = 'horizontal';
|
||||||
} else {
|
} else {
|
||||||
xyChartConfig.chartOrientation = 'vertical';
|
xyChartConfig.chartOrientation = 'vertical';
|
||||||
|
@ -91,7 +91,7 @@ See [the accTitle and accDescr usage examples](#acctitle-and-accdescr-usage-exam
|
|||||||
graph LR
|
graph LR
|
||||||
accTitle: Big Decisions
|
accTitle: Big Decisions
|
||||||
accDescr: Bob's Burgers process for making big decisions
|
accDescr: Bob's Burgers process for making big decisions
|
||||||
A[Identify Big Descision] --> B{Make Big Decision}
|
A[Identify Big Decision] --> B{Make Big Decision}
|
||||||
B --> D[Be done]
|
B --> D[Be done]
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr
|
|||||||
for making very, very big decisions.
|
for making very, very big decisions.
|
||||||
This is actually a very simple flow: identify the big decision and then make the big decision.
|
This is actually a very simple flow: identify the big decision and then make the big decision.
|
||||||
}
|
}
|
||||||
A[Identify Big Descision] --> B{Make Big Decision}
|
A[Identify Big Decision] --> B{Make Big Decision}
|
||||||
B --> D[Be done]
|
B --> D[Be done]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
"unplugin-vue-components": "^0.25.0",
|
"unplugin-vue-components": "^0.25.0",
|
||||||
"vite": "^4.3.9",
|
"vite": "^4.3.9",
|
||||||
"vite-plugin-pwa": "^0.16.0",
|
"vite-plugin-pwa": "^0.16.0",
|
||||||
"vitepress": "1.0.0-rc.20",
|
"vitepress": "1.0.0-rc.22",
|
||||||
"workbox-window": "^7.0.0"
|
"workbox-window": "^7.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ flowchart LR
|
|||||||
end
|
end
|
||||||
%% ^ These subgraphs are identical, except for the links to them:
|
%% ^ These subgraphs are identical, except for the links to them:
|
||||||
|
|
||||||
%% Link *to* subgraph1: subgraph1 direction is mantained
|
%% Link *to* subgraph1: subgraph1 direction is maintained
|
||||||
outside --> subgraph1
|
outside --> subgraph1
|
||||||
%% Link *within* subgraph2:
|
%% Link *within* subgraph2:
|
||||||
%% subgraph2 inherits the direction of the top-level graph (LR)
|
%% subgraph2 inherits the direction of the top-level graph (LR)
|
||||||
@ -757,7 +757,7 @@ flowchart TD
|
|||||||
B-->E(A fa:fa-camera-retro perhaps?)
|
B-->E(A fa:fa-camera-retro perhaps?)
|
||||||
```
|
```
|
||||||
|
|
||||||
Mermaid is compatible with Font Awesome up to verion 5, Free icons only. Check that the icons you use are from the [supported set of icons](https://fontawesome.com/v5/search?o=r&m=free).
|
Mermaid is compatible with Font Awesome up to version 5, Free icons only. Check that the icons you use are from the [supported set of icons](https://fontawesome.com/v5/search?o=r&m=free).
|
||||||
|
|
||||||
## Graph declarations with spaces between vertices and link and without semicolon
|
## Graph declarations with spaces between vertices and link and without semicolon
|
||||||
|
|
||||||
|
@ -83,26 +83,26 @@ Points are used to plot a circle inside the quadrantChart. The syntax is `<text>
|
|||||||
|
|
||||||
## Chart Configurations
|
## Chart Configurations
|
||||||
|
|
||||||
| Parameter | Description | Default value |
|
| Parameter | Description | Default value |
|
||||||
| --------------------------------- | ------------------------------------------------------------------------------------------------- | :-----------: |
|
| --------------------------------- | -------------------------------------------------------------------------------------------------- | :-----------: |
|
||||||
| chartWidth | Width of the chart | 500 |
|
| chartWidth | Width of the chart | 500 |
|
||||||
| chartHeight | Height of the chart | 500 |
|
| chartHeight | Height of the chart | 500 |
|
||||||
| titlePadding | Top and Bottom padding of the title | 10 |
|
| titlePadding | Top and Bottom padding of the title | 10 |
|
||||||
| titleFontSize | Title font size | 20 |
|
| titleFontSize | Title font size | 20 |
|
||||||
| quadrantPadding | Padding outside all the quadrants | 5 |
|
| quadrantPadding | Padding outside all the quadrants | 5 |
|
||||||
| quadrantTextTopPadding | Quadrant text top padding when text is drawn on top ( not data points are there) | 5 |
|
| quadrantTextTopPadding | Quadrant text top padding when text is drawn on top ( not data points are there) | 5 |
|
||||||
| quadrantLabelFontSize | Quadrant text font size | 16 |
|
| quadrantLabelFontSize | Quadrant text font size | 16 |
|
||||||
| quadrantInternalBorderStrokeWidth | Border stroke width inside the quadrants | 1 |
|
| quadrantInternalBorderStrokeWidth | Border stroke width inside the quadrants | 1 |
|
||||||
| quadrantExternalBorderStrokeWidth | Quadrant external border stroke width | 2 |
|
| quadrantExternalBorderStrokeWidth | Quadrant external border stroke width | 2 |
|
||||||
| xAxisLabelPadding | Top and bottom padding of x-axis text | 5 |
|
| xAxisLabelPadding | Top and bottom padding of x-axis text | 5 |
|
||||||
| xAxisLabelFontSize | X-axis texts font size | 16 |
|
| xAxisLabelFontSize | X-axis texts font size | 16 |
|
||||||
| xAxisPosition | Position of x-axis (top , bottom) if there are points the x-axis will alway be rendered in bottom | 'top' |
|
| xAxisPosition | Position of x-axis (top , bottom) if there are points the x-axis will always be rendered in bottom | 'top' |
|
||||||
| yAxisLabelPadding | Left and Right padding of y-axis text | 5 |
|
| yAxisLabelPadding | Left and Right padding of y-axis text | 5 |
|
||||||
| yAxisLabelFontSize | Y-axis texts font size | 16 |
|
| yAxisLabelFontSize | Y-axis texts font size | 16 |
|
||||||
| yAxisPosition | Position of y-axis (left , right) | 'left' |
|
| yAxisPosition | Position of y-axis (left , right) | 'left' |
|
||||||
| pointTextPadding | Padding between point and the below text | 5 |
|
| pointTextPadding | Padding between point and the below text | 5 |
|
||||||
| pointLabelFontSize | Point text font size | 12 |
|
| pointLabelFontSize | Point text font size | 12 |
|
||||||
| pointRadius | Radius of the point to be drawn | 5 |
|
| pointRadius | Radius of the point to be drawn | 5 |
|
||||||
|
|
||||||
## Chart Theme Variables
|
## Chart Theme Variables
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ Note that there are no sections defined, and each time period and its correspond
|
|||||||
|
|
||||||
2. Disable the multiColor option using the `disableMultiColor` option. This will make all time periods and events follow the same color scheme.
|
2. Disable the multiColor option using the `disableMultiColor` option. This will make all time periods and events follow the same color scheme.
|
||||||
|
|
||||||
You will need to add this option either via mermaid.intialize function or directives.
|
You will need to add this option either via mermaid.initialize function or directives.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { getConfig } from '../config.js';
|
import { getConfig } from '../diagram-api/diagramAPI.js';
|
||||||
import type { HTML, SVG } from '../diagram-api/types.js';
|
import type { HTML, SVG } from '../diagram-api/types.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -221,7 +221,7 @@ properties:
|
|||||||
type: number
|
type: number
|
||||||
default: 16
|
default: 16
|
||||||
|
|
||||||
$defs: # JSON Schema definition (maybe we should move these to a seperate file)
|
$defs: # JSON Schema definition (maybe we should move these to a separate file)
|
||||||
BaseDiagramConfig:
|
BaseDiagramConfig:
|
||||||
# TODO: More config needs to be moved here
|
# TODO: More config needs to be moved here
|
||||||
title: Base Diagram Config
|
title: Base Diagram Config
|
||||||
|
@ -165,7 +165,7 @@ class Theme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup teh label color for the set
|
// Setup the label color for the set
|
||||||
this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;
|
this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;
|
||||||
|
|
||||||
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
||||||
|
@ -203,7 +203,7 @@ class Theme {
|
|||||||
this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) });
|
this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup teh label color for the set
|
// Setup the label color for the set
|
||||||
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);
|
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);
|
||||||
|
|
||||||
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
||||||
|
@ -128,7 +128,7 @@ class Theme {
|
|||||||
this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });
|
this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup teh label color for the set
|
// Setup the label color for the set
|
||||||
this.scaleLabelColor =
|
this.scaleLabelColor =
|
||||||
this.scaleLabelColor !== 'calculated' && this.scaleLabelColor
|
this.scaleLabelColor !== 'calculated' && this.scaleLabelColor
|
||||||
? this.scaleLabelColor
|
? this.scaleLabelColor
|
||||||
|
@ -450,7 +450,7 @@ describe('when parsing font sizes', function () {
|
|||||||
expect(utils.parseFontSize(undefined)).toEqual([undefined, undefined]);
|
expect(utils.parseFontSize(undefined)).toEqual([undefined, undefined]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('handles unparseable input', function () {
|
it('handles unparsable input', function () {
|
||||||
// @ts-expect-error Explicitly testing unparsable input
|
// @ts-expect-error Explicitly testing unparsable input
|
||||||
expect(utils.parseFontSize({ fontSize: 14 })).toEqual([undefined, undefined]);
|
expect(utils.parseFontSize({ fontSize: 14 })).toEqual([undefined, undefined]);
|
||||||
});
|
});
|
||||||
|
123
pnpm-lock.yaml
generated
123
pnpm-lock.yaml
generated
@ -475,8 +475,8 @@ importers:
|
|||||||
specifier: ^0.16.0
|
specifier: ^0.16.0
|
||||||
version: 0.16.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0)
|
version: 0.16.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0)
|
||||||
vitepress:
|
vitepress:
|
||||||
specifier: 1.0.0-rc.20
|
specifier: 1.0.0-rc.22
|
||||||
version: 1.0.0-rc.20(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.27)(search-insights@2.7.0)
|
version: 1.0.0-rc.22(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.27)(search-insights@2.7.0)
|
||||||
workbox-window:
|
workbox-window:
|
||||||
specifier: ^7.0.0
|
specifier: ^7.0.0
|
||||||
version: 7.0.0
|
version: 7.0.0
|
||||||
@ -4562,6 +4562,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==}
|
resolution: {integrity: sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@types/web-bluetooth@0.0.18:
|
||||||
|
resolution: {integrity: sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/ws@8.5.5:
|
/@types/ws@8.5.5:
|
||||||
resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==}
|
resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -5267,6 +5271,10 @@ packages:
|
|||||||
/@vue/devtools-api@6.5.0:
|
/@vue/devtools-api@6.5.0:
|
||||||
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
||||||
|
|
||||||
|
/@vue/devtools-api@6.5.1:
|
||||||
|
resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@vue/reactivity-transform@3.3.4:
|
/@vue/reactivity-transform@3.3.4:
|
||||||
resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==}
|
resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -5330,20 +5338,20 @@ packages:
|
|||||||
- vue
|
- vue
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vueuse/core@10.4.1(vue@3.3.4):
|
/@vueuse/core@10.5.0(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-DkHIfMIoSIBjMgRRvdIvxsyboRZQmImofLyOHADqiVbQVilP8VVHDhBX2ZqoItOgu7dWa8oXiNnScOdPLhdEXg==}
|
resolution: {integrity: sha512-z/tI2eSvxwLRjOhDm0h/SXAjNm8N5ld6/SC/JQs6o6kpJ6Ya50LnEL8g5hoYu005i28L0zqB5L5yAl8Jl26K3A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/web-bluetooth': 0.0.17
|
'@types/web-bluetooth': 0.0.18
|
||||||
'@vueuse/metadata': 10.4.1
|
'@vueuse/metadata': 10.5.0
|
||||||
'@vueuse/shared': 10.4.1(vue@3.3.4)
|
'@vueuse/shared': 10.5.0(vue@3.3.4)
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
vue-demi: 0.14.6(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vueuse/integrations@10.4.1(focus-trap@7.5.2)(vue@3.3.4):
|
/@vueuse/integrations@10.5.0(focus-trap@7.5.4)(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-uRBPyG5Lxoh1A/J+boiioPT3ELEAPEo4t8W6Mr4yTKIQBeW/FcbsotZNPr4k9uz+3QEksMmflWloS9wCnypM7g==}
|
resolution: {integrity: sha512-fm5sXLCK0Ww3rRnzqnCQRmfjDURaI4xMsx+T+cec0ngQqHx/JgUtm8G0vRjwtonIeTBsH1Q8L3SucE+7K7upJQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
async-validator: '*'
|
async-validator: '*'
|
||||||
axios: '*'
|
axios: '*'
|
||||||
@ -5383,10 +5391,10 @@ packages:
|
|||||||
universal-cookie:
|
universal-cookie:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vueuse/core': 10.4.1(vue@3.3.4)
|
'@vueuse/core': 10.5.0(vue@3.3.4)
|
||||||
'@vueuse/shared': 10.4.1(vue@3.3.4)
|
'@vueuse/shared': 10.5.0(vue@3.3.4)
|
||||||
focus-trap: 7.5.2
|
focus-trap: 7.5.4
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
vue-demi: 0.14.6(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
@ -5400,8 +5408,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==}
|
resolution: {integrity: sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vueuse/metadata@10.4.1:
|
/@vueuse/metadata@10.5.0:
|
||||||
resolution: {integrity: sha512-2Sc8X+iVzeuMGHr6O2j4gv/zxvQGGOYETYXEc41h0iZXIRnRbJZGmY/QP8dvzqUelf8vg0p/yEA5VpCEu+WpZg==}
|
resolution: {integrity: sha512-fEbElR+MaIYyCkeM0SzWkdoMtOpIwO72x8WsZHRE7IggiOlILttqttM69AS13nrDxosnDBYdyy3C5mR1LCxHsw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vueuse/shared@10.1.0(vue@3.3.4):
|
/@vueuse/shared@10.1.0(vue@3.3.4):
|
||||||
@ -5422,10 +5430,10 @@ packages:
|
|||||||
- vue
|
- vue
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vueuse/shared@10.4.1(vue@3.3.4):
|
/@vueuse/shared@10.5.0(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-vz5hbAM4qA0lDKmcr2y3pPdU+2EVw/yzfRsBdu+6+USGa4PxqSQRYIUC9/NcT06y+ZgaTsyURw2I9qOFaaXHAg==}
|
resolution: {integrity: sha512-18iyxbbHYLst9MqU1X1QNdMHIjks6wC7XTVf0KNOv5es/Ms6gjVFCAAWTVP2JStuGqydg3DT+ExpFORUEi9yhg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
vue-demi: 0.14.6(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
@ -9274,8 +9282,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==}
|
resolution: {integrity: sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/focus-trap@7.5.2:
|
/focus-trap@7.5.4:
|
||||||
resolution: {integrity: sha512-p6vGNNWLDGwJCiEjkSK6oERj/hEyI9ITsSwIUICBoKLlWiTWXJRfQibCwcoi50rTZdbi87qDtUlMCmQwsGSgPw==}
|
resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
tabbable: 6.2.0
|
tabbable: 6.2.0
|
||||||
dev: true
|
dev: true
|
||||||
@ -14040,8 +14048,8 @@ packages:
|
|||||||
vscode-textmate: 8.0.0
|
vscode-textmate: 8.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/shiki@0.14.4:
|
/shiki@0.14.5:
|
||||||
resolution: {integrity: sha512-IXCRip2IQzKwxArNNq1S+On4KPML3Yyn8Zzs/xRgcgOWIr8ntIK3IKzjFPfjy/7kt9ZMjc+FItfqHRBg8b6tNQ==}
|
resolution: {integrity: sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-sequence-parser: 1.1.1
|
ansi-sequence-parser: 1.1.1
|
||||||
jsonc-parser: 3.2.0
|
jsonc-parser: 3.2.0
|
||||||
@ -15528,6 +15536,42 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/vite@4.4.11(@types/node@18.17.5):
|
||||||
|
resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==}
|
||||||
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
|
hasBin: true
|
||||||
|
peerDependencies:
|
||||||
|
'@types/node': '>= 14'
|
||||||
|
less: '*'
|
||||||
|
lightningcss: ^1.21.0
|
||||||
|
sass: '*'
|
||||||
|
stylus: '*'
|
||||||
|
sugarss: '*'
|
||||||
|
terser: ^5.4.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@types/node':
|
||||||
|
optional: true
|
||||||
|
less:
|
||||||
|
optional: true
|
||||||
|
lightningcss:
|
||||||
|
optional: true
|
||||||
|
sass:
|
||||||
|
optional: true
|
||||||
|
stylus:
|
||||||
|
optional: true
|
||||||
|
sugarss:
|
||||||
|
optional: true
|
||||||
|
terser:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@types/node': 18.17.5
|
||||||
|
esbuild: 0.18.20
|
||||||
|
postcss: 8.4.27
|
||||||
|
rollup: 3.28.0
|
||||||
|
optionalDependencies:
|
||||||
|
fsevents: 2.3.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
/vite@4.4.9(@types/node@18.17.5):
|
/vite@4.4.9(@types/node@18.17.5):
|
||||||
resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==}
|
resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==}
|
||||||
engines: {node: ^14.18.0 || >=16.0.0}
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
@ -15612,12 +15656,12 @@ packages:
|
|||||||
- terser
|
- terser
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vitepress@1.0.0-rc.20(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.27)(search-insights@2.7.0):
|
/vitepress@1.0.0-rc.22(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.27)(search-insights@2.7.0):
|
||||||
resolution: {integrity: sha512-CykMUJ8JLxLcGWek0ew3wln4RYbsOd1+0YzXITTpajggpynm2S331TNkJVOkHrMRc6GYe3y4pS40GfgcW0ZwAw==}
|
resolution: {integrity: sha512-n7le5iikCFgWMuX7sKfzDGJGlrsYQ5trG3S97BghNz2alOTr4Xp+GrB6ShwogUTX9gNgeNmrACjokhW55LNeBA==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
markdown-it-mathjax3: ^4.3.2
|
markdown-it-mathjax3: ^4.3.2
|
||||||
postcss: ^8.4.30
|
postcss: ^8.4.31
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
markdown-it-mathjax3:
|
markdown-it-mathjax3:
|
||||||
optional: true
|
optional: true
|
||||||
@ -15627,15 +15671,15 @@ packages:
|
|||||||
'@docsearch/css': 3.5.2
|
'@docsearch/css': 3.5.2
|
||||||
'@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.7.0)
|
'@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.7.0)
|
||||||
'@types/markdown-it': 13.0.2
|
'@types/markdown-it': 13.0.2
|
||||||
'@vue/devtools-api': 6.5.0
|
'@vue/devtools-api': 6.5.1
|
||||||
'@vueuse/core': 10.4.1(vue@3.3.4)
|
'@vueuse/core': 10.5.0(vue@3.3.4)
|
||||||
'@vueuse/integrations': 10.4.1(focus-trap@7.5.2)(vue@3.3.4)
|
'@vueuse/integrations': 10.5.0(focus-trap@7.5.4)(vue@3.3.4)
|
||||||
focus-trap: 7.5.2
|
focus-trap: 7.5.4
|
||||||
mark.js: 8.11.1
|
mark.js: 8.11.1
|
||||||
minisearch: 6.1.0
|
minisearch: 6.1.0
|
||||||
postcss: 8.4.27
|
postcss: 8.4.27
|
||||||
shiki: 0.14.4
|
shiki: 0.14.5
|
||||||
vite: 4.4.9(@types/node@18.17.5)
|
vite: 4.4.11(@types/node@18.17.5)
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@algolia/client-search'
|
- '@algolia/client-search'
|
||||||
@ -15779,6 +15823,21 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
|
|
||||||
|
/vue-demi@0.14.6(vue@3.3.4):
|
||||||
|
resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
|
||||||
|
engines: {node: '>=12'}
|
||||||
|
hasBin: true
|
||||||
|
requiresBuild: true
|
||||||
|
peerDependencies:
|
||||||
|
'@vue/composition-api': ^1.0.0-rc.1
|
||||||
|
vue: ^3.0.0-0 || ^2.6.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@vue/composition-api':
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
vue: 3.3.4
|
||||||
|
dev: true
|
||||||
|
|
||||||
/vue@3.3.4:
|
/vue@3.3.4:
|
||||||
resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==}
|
resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -22,7 +22,7 @@ const load = async () => {
|
|||||||
Popularisation
|
Popularisation
|
||||||
British popular psychology author Tony Buzan
|
British popular psychology author Tony Buzan
|
||||||
Research
|
Research
|
||||||
On effectivness<br/>and features
|
On effectiveness<br/>and features
|
||||||
On Automatic creation
|
On Automatic creation
|
||||||
Uses
|
Uses
|
||||||
Creative techniques
|
Creative techniques
|
||||||
|
Loading…
x
Reference in New Issue
Block a user